@blockle/blocks-react 2.5.2 → 2.5.4
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/display/Icon/IconMask.d.ts +5 -3
- package/dist/components/display/Icon/IconMask.d.ts.map +1 -1
- package/dist/components/display/Icon/IconMask.js +10 -5
- package/dist/components/display/Icon/exampleIconMask.d.ts +1 -1
- package/dist/components/form/Button/Button.d.ts.map +1 -1
- package/dist/components/form/Button/Button.js +1 -1
- package/dist/components/overlay/Dialog/dialogHelper.js +1 -1
- package/package.json +3 -3
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { Atoms, ComponentThemes } from '@blockle/blocks-core';
|
|
1
|
+
import { Atoms, ComponentThemes, MarginAtoms } from '@blockle/blocks-core';
|
|
2
2
|
import { default as React } from 'react';
|
|
3
3
|
type IconTheme = ComponentThemes['icon'];
|
|
4
4
|
export type IconMaskProps = {
|
|
5
5
|
className?: string;
|
|
6
6
|
color?: Atoms['color'];
|
|
7
|
-
|
|
7
|
+
display?: Atoms['display'];
|
|
8
8
|
size?: IconTheme['variants']['size'];
|
|
9
|
-
|
|
9
|
+
src: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
} & MarginAtoms;
|
|
10
12
|
export declare const IconMask: React.FC<IconMaskProps>;
|
|
11
13
|
export {};
|
|
12
14
|
//# sourceMappingURL=IconMask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconMask.d.ts","sourceRoot":"","sources":["../../../../src/components/display/Icon/IconMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"IconMask.d.ts","sourceRoot":"","sources":["../../../../src/components/display/Icon/IconMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,eAAe,EAGpB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,KAAK,SAAS,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;AAEzC,MAAM,MAAM,aAAa,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IAC3B,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;IACrC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,GAAG,WAAW,CAAC;AAEhB,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA6B5C,CAAC"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { classnames, atoms } from "@blockle/blocks-core";
|
|
2
|
+
import { getAtomsAndProps, classnames, atoms } from "@blockle/blocks-core";
|
|
3
3
|
import { useComponentStyles } from "../../../hooks/useComponentStyles/useComponentStyles.js";
|
|
4
4
|
import { iconMask } from "./IconMask.css.js";
|
|
5
5
|
const IconMask = ({
|
|
6
6
|
className,
|
|
7
7
|
color = "currentColor",
|
|
8
8
|
src,
|
|
9
|
-
size
|
|
9
|
+
size,
|
|
10
|
+
style,
|
|
11
|
+
...restProps
|
|
10
12
|
}) => {
|
|
13
|
+
const [atomsProps, otherProps] = getAtomsAndProps(restProps);
|
|
11
14
|
const iconClassName = useComponentStyles("icon", {
|
|
12
15
|
variants: { size }
|
|
13
16
|
});
|
|
@@ -16,14 +19,16 @@ const IconMask = ({
|
|
|
16
19
|
{
|
|
17
20
|
role: "presentation",
|
|
18
21
|
className: classnames(
|
|
19
|
-
atoms({ color }),
|
|
22
|
+
atoms({ color, ...atomsProps }),
|
|
20
23
|
iconMask,
|
|
21
24
|
iconClassName,
|
|
22
25
|
className
|
|
23
26
|
),
|
|
24
27
|
style: {
|
|
25
|
-
mask: `url(${src}) no-repeat center
|
|
26
|
-
|
|
28
|
+
mask: `url(${src}) no-repeat center`,
|
|
29
|
+
...style
|
|
30
|
+
},
|
|
31
|
+
...otherProps
|
|
27
32
|
}
|
|
28
33
|
);
|
|
29
34
|
};
|
|
@@ -2,7 +2,7 @@ import { HeroIconName } from './heroicons.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* EXPORTED ONLY FOR DEMO PURPOSES
|
|
4
4
|
*/
|
|
5
|
-
export declare const HeroIcon: ({ name, ...props }: Omit<
|
|
5
|
+
export declare const HeroIcon: ({ name, ...props }: Omit<any, "src"> & {
|
|
6
6
|
name: HeroIconName;
|
|
7
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
//# sourceMappingURL=exampleIconMask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/form/Button/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,KAAK,EAEV,KAAK,eAAe,EAGpB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EACjB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,KAAK,WAAW,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;AAE7C,MAAM,MAAM,WAAW,GAAG;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACjC,MAAM,CAAC,EAAE,WAAW,CAAC,UAAU,C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AC,CAAC,QAAQ,CAAC,CAAC;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,OAAO,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC;CAC9C,GAAG,IAAI,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,GACnD,WAAW,CAAC;AAId,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwDxC,CAAC"}
|
|
@@ -45,7 +45,7 @@ const Button = ({
|
|
|
45
45
|
atoms(atomsProps),
|
|
46
46
|
className
|
|
47
47
|
),
|
|
48
|
-
type: asChild ?
|
|
48
|
+
type: asChild ? type : type ?? "button",
|
|
49
49
|
...otherProps,
|
|
50
50
|
children: [
|
|
51
51
|
startSlot && /* @__PURE__ */ jsx(Box, { display: "inline-flex", children: startSlot }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockle/blocks-react",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.4",
|
|
4
4
|
"description": "React hooks and components for Blockle",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@vanilla-extract/css": "^1.18.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@blockle/blocks-core": ">=1.
|
|
38
|
-
"@blockle/blocks-react-slot": ">=1.
|
|
37
|
+
"@blockle/blocks-core": ">=1.3.x",
|
|
38
|
+
"@blockle/blocks-react-slot": ">=1.2.x",
|
|
39
39
|
"@vanilla-extract/css": "^1.18.0",
|
|
40
40
|
"react": ">=19.1.0",
|
|
41
41
|
"react-dom": ">=19.1.0"
|