@blockle/blocks-react 2.5.3 → 2.5.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"IconMask.css.d.ts","sourceRoot":"","sources":["../../../../src/components/display/Icon/IconMask.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,QASnB,CAAC"}
1
+ {"version":3,"file":"IconMask.css.d.ts","sourceRoot":"","sources":["../../../../src/components/display/Icon/IconMask.css.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,QAQnB,CAAC"}
@@ -7,7 +7,6 @@ const iconMask = style({
7
7
  [layers.molecule]: {
8
8
  aspectRatio: "1 / 1",
9
9
  maskSize: "100%",
10
- display: "inline-block",
11
10
  backgroundColor: "currentcolor"
12
11
  }
13
12
  }
@@ -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
- src: string;
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,EAErB,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,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwB5C,CAAC"}
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,CA8B5C,CAAC"}
@@ -1,13 +1,17 @@
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
+ display = "inline-block",
12
+ ...restProps
10
13
  }) => {
14
+ const [atomsProps, otherProps] = getAtomsAndProps(restProps);
11
15
  const iconClassName = useComponentStyles("icon", {
12
16
  variants: { size }
13
17
  });
@@ -16,14 +20,16 @@ const IconMask = ({
16
20
  {
17
21
  role: "presentation",
18
22
  className: classnames(
19
- atoms({ color }),
23
+ atoms({ color, ...atomsProps }),
20
24
  iconMask,
21
25
  iconClassName,
22
26
  className
23
27
  ),
24
28
  style: {
25
- mask: `url(${src}) no-repeat center`
26
- }
29
+ mask: `url(${src}) no-repeat center`,
30
+ ...style
31
+ },
32
+ ...otherProps
27
33
  }
28
34
  );
29
35
  };
@@ -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<import('./IconMask.js').IconMaskProps, "src"> & {
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockle/blocks-react",
3
- "version": "2.5.3",
3
+ "version": "2.5.5",
4
4
  "description": "React hooks and components for Blockle",
5
5
  "type": "module",
6
6
  "exports": {