@loomhq/lens 11.15.0 → 11.15.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.
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
2
  export declare const IconButtonBox: import("@emotion/styled").StyledComponent<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, IconButtonBoxProps, object>;
3
- declare const IconButton: ({ altText, icon, onClick, iconColor, isActive, isDisabled, size, ...props }: IconButtonProps & React.ComponentProps<typeof IconButtonBox>) => React.JSX.Element;
3
+ declare const IconButton: ({ altText, icon, onClick, iconColor, backgroundColor, isActive, isDisabled, size, ...props }: IconButtonProps & React.ComponentProps<typeof IconButtonBox>) => React.JSX.Element;
4
4
  type IconButtonProps = {
5
5
  altText: string;
6
6
  icon?: React.ReactNode;
7
7
  onClick?: React.ReactEventHandler;
8
8
  iconColor?: string;
9
+ backgroundColor?: string;
9
10
  isActive?: boolean;
10
11
  isDisabled?: boolean;
11
12
  size?: 'small' | 'medium' | 'large';
@@ -13,5 +14,6 @@ type IconButtonProps = {
13
14
  type IconButtonBoxProps = {
14
15
  size?: 'small' | 'medium';
15
16
  isActive?: boolean;
17
+ backgroundColor?: string;
16
18
  };
17
19
  export default IconButton;
@@ -22,7 +22,7 @@ function SvgHighlightText(props) {
22
22
  "path",
23
23
  {
24
24
  d: "M5 4H6C6.79565 4 7.55871 4.31607 8.12132 4.87868C8.68393 5.44129 9 6.20435 9 7C9 6.20435 9.31607 5.44129 9.87868 4.87868C10.4413 4.31607 11.2044 4 12 4H13",
25
- stroke: "#111019",
25
+ stroke: "currentColor",
26
26
  fill: "currentColor",
27
27
  strokeWidth: "2",
28
28
  strokeLinecap: "round",
@@ -32,7 +32,7 @@ function SvgHighlightText(props) {
32
32
  "path",
33
33
  {
34
34
  d: "M13 20H12C11.2044 20 10.4413 19.6839 9.87868 19.1213C9.31607 18.5587 9 17.7956 9 17C9 17.7956 8.68393 18.5587 8.12132 19.1213C7.55871 19.6839 6.79565 20 6 20H5",
35
- stroke: "#111019",
35
+ stroke: "currentColor",
36
36
  fill: "currentColor",
37
37
  strokeWidth: "2",
38
38
  strokeLinecap: "round",
@@ -42,7 +42,7 @@ function SvgHighlightText(props) {
42
42
  "path",
43
43
  {
44
44
  d: "M5 16H4C3.46957 16 2.96086 15.7893 2.58579 15.4142C2.21071 15.0391 2 14.5304 2 14V10C2 9.46957 2.21071 8.96086 2.58579 8.58579C2.96086 8.21071 3.46957 8 4 8H5",
45
- stroke: "#111019",
45
+ stroke: "currentColor",
46
46
  fill: "none",
47
47
  strokeWidth: "2",
48
48
  strokeLinecap: "round",
@@ -52,7 +52,7 @@ function SvgHighlightText(props) {
52
52
  "path",
53
53
  {
54
54
  d: "M13 8H20C20.5304 8 21.0391 8.21071 21.4142 8.58579C21.7893 8.96086 22 9.46957 22 10V14C22 14.5304 21.7893 15.0391 21.4142 15.4142C21.0391 15.7893 20.5304 16 20 16H13",
55
- stroke: "#111019",
55
+ stroke: "currentColor",
56
56
  fill: "none",
57
57
  strokeWidth: "2",
58
58
  strokeLinecap: "round",
@@ -62,7 +62,7 @@ function SvgHighlightText(props) {
62
62
  "path",
63
63
  {
64
64
  d: "M9 7V17",
65
- stroke: "#111019",
65
+ stroke: "currentColor",
66
66
  fill: "currentColor",
67
67
  strokeWidth: "2",
68
68
  strokeLinecap: "round",
@@ -2607,7 +2607,7 @@ function SvgHighlightText(props) {
2607
2607
  "path",
2608
2608
  {
2609
2609
  d: "M5 4H6C6.79565 4 7.55871 4.31607 8.12132 4.87868C8.68393 5.44129 9 6.20435 9 7C9 6.20435 9.31607 5.44129 9.87868 4.87868C10.4413 4.31607 11.2044 4 12 4H13",
2610
- stroke: "#111019",
2610
+ stroke: "currentColor",
2611
2611
  fill: "currentColor",
2612
2612
  strokeWidth: "2",
2613
2613
  strokeLinecap: "round",
@@ -2617,7 +2617,7 @@ function SvgHighlightText(props) {
2617
2617
  "path",
2618
2618
  {
2619
2619
  d: "M13 20H12C11.2044 20 10.4413 19.6839 9.87868 19.1213C9.31607 18.5587 9 17.7956 9 17C9 17.7956 8.68393 18.5587 8.12132 19.1213C7.55871 19.6839 6.79565 20 6 20H5",
2620
- stroke: "#111019",
2620
+ stroke: "currentColor",
2621
2621
  fill: "currentColor",
2622
2622
  strokeWidth: "2",
2623
2623
  strokeLinecap: "round",
@@ -2627,7 +2627,7 @@ function SvgHighlightText(props) {
2627
2627
  "path",
2628
2628
  {
2629
2629
  d: "M5 16H4C3.46957 16 2.96086 15.7893 2.58579 15.4142C2.21071 15.0391 2 14.5304 2 14V10C2 9.46957 2.21071 8.96086 2.58579 8.58579C2.96086 8.21071 3.46957 8 4 8H5",
2630
- stroke: "#111019",
2630
+ stroke: "currentColor",
2631
2631
  fill: "none",
2632
2632
  strokeWidth: "2",
2633
2633
  strokeLinecap: "round",
@@ -2637,7 +2637,7 @@ function SvgHighlightText(props) {
2637
2637
  "path",
2638
2638
  {
2639
2639
  d: "M13 8H20C20.5304 8 21.0391 8.21071 21.4142 8.58579C21.7893 8.96086 22 9.46957 22 10V14C22 14.5304 21.7893 15.0391 21.4142 15.4142C21.0391 15.7893 20.5304 16 20 16H13",
2640
- stroke: "#111019",
2640
+ stroke: "currentColor",
2641
2641
  fill: "none",
2642
2642
  strokeWidth: "2",
2643
2643
  strokeLinecap: "round",
@@ -2647,7 +2647,7 @@ function SvgHighlightText(props) {
2647
2647
  "path",
2648
2648
  {
2649
2649
  d: "M9 7V17",
2650
- stroke: "#111019",
2650
+ stroke: "currentColor",
2651
2651
  fill: "currentColor",
2652
2652
  strokeWidth: "2",
2653
2653
  strokeLinecap: "round",
@@ -4360,45 +4360,29 @@ var SvgTask = () => /* @__PURE__ */ React191.createElement("svg", { viewBox: "0
4360
4360
 
4361
4361
  // src/components/icon/available-icons/thumbs-down.tsx
4362
4362
  import React192 from "react";
4363
- var SvgThumbsDown = () => /* @__PURE__ */ React192.createElement(
4364
- "svg",
4363
+ var SvgThumbsDown = () => /* @__PURE__ */ React192.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ React192.createElement(
4364
+ "path",
4365
4365
  {
4366
- xmlns: "http://www.w3.org/2000/svg",
4367
- viewBox: "0 0 24 24",
4368
- fill: "currentColor"
4369
- },
4370
- /* @__PURE__ */ React192.createElement(
4371
- "path",
4372
- {
4373
- d: "M12.2574 9.65011L9.65746 15.5C9.1403 15.5 8.64432 15.2946 8.27863 14.9289C7.91294 14.5632 7.7075 14.0672 7.7075 13.55V10.9501H4.02856C3.84013 10.9522 3.65348 10.9134 3.48155 10.8362C3.30963 10.759 3.15653 10.6454 3.03287 10.5032C2.90922 10.361 2.81796 10.1936 2.76542 10.0126C2.71287 9.83166 2.70031 9.64142 2.72859 9.45511L3.62557 3.60521C3.67258 3.29523 3.83004 3.01268 4.06893 2.80963C4.30781 2.60657 4.61204 2.49669 4.92555 2.50023H12.2574M12.2574 9.65011V2.50023M12.2574 9.65011H13.9929C14.3608 9.65661 14.7182 9.52782 14.9974 9.28818C15.2766 9.04854 15.458 8.71473 15.5074 8.35013V3.80021C15.458 3.43561 15.2766 3.1018 14.9974 2.86216C14.7182 2.62252 14.3608 2.49373 13.9929 2.50023H12.2574",
4374
- stroke: "#111019",
4375
- strokeWidth: "1.5",
4376
- strokeLinecap: "round",
4377
- strokeLinejoin: "round"
4378
- }
4379
- )
4380
- );
4366
+ d: "M12.2574 9.65011L9.65746 15.5C9.1403 15.5 8.64432 15.2946 8.27863 14.9289C7.91294 14.5632 7.7075 14.0672 7.7075 13.55V10.9501H4.02856C3.84013 10.9522 3.65348 10.9134 3.48155 10.8362C3.30963 10.759 3.15653 10.6454 3.03287 10.5032C2.90922 10.361 2.81796 10.1936 2.76542 10.0126C2.71287 9.83166 2.70031 9.64142 2.72859 9.45511L3.62557 3.60521C3.67258 3.29523 3.83004 3.01268 4.06893 2.80963C4.30781 2.60657 4.61204 2.49669 4.92555 2.50023H12.2574M12.2574 9.65011V2.50023M12.2574 9.65011H13.9929C14.3608 9.65661 14.7182 9.52782 14.9974 9.28818C15.2766 9.04854 15.458 8.71473 15.5074 8.35013V3.80021C15.458 3.43561 15.2766 3.1018 14.9974 2.86216C14.7182 2.62252 14.3608 2.49373 13.9929 2.50023H12.2574",
4367
+ stroke: "currentColor",
4368
+ strokeWidth: "1.5",
4369
+ strokeLinecap: "round",
4370
+ strokeLinejoin: "round"
4371
+ }
4372
+ ));
4381
4373
 
4382
4374
  // src/components/icon/available-icons/thumbs-up.tsx
4383
4375
  import React193 from "react";
4384
- var SvgThumbsUp = () => /* @__PURE__ */ React193.createElement(
4385
- "svg",
4376
+ var SvgThumbsUp = () => /* @__PURE__ */ React193.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ React193.createElement(
4377
+ "path",
4386
4378
  {
4387
- xmlns: "http://www.w3.org/2000/svg",
4388
- viewBox: "0 0 24 24",
4389
- fill: "currentColor"
4390
- },
4391
- /* @__PURE__ */ React193.createElement(
4392
- "path",
4393
- {
4394
- d: "M5.74998 8.34996L8.34996 2.5C8.86713 2.5 9.36312 2.70544 9.72881 3.07114C10.0945 3.43683 10.3 3.93282 10.3 4.44999V7.04997H13.9789C14.1674 7.04784 14.354 7.0867 14.5259 7.16386C14.6979 7.24103 14.851 7.35465 14.9746 7.49685C15.0983 7.63906 15.1895 7.80645 15.2421 7.98743C15.2946 8.16841 15.3072 8.35864 15.2789 8.54496L14.3819 14.3949C14.3349 14.7049 14.1775 14.9875 13.9386 15.1905C13.6997 15.3936 13.3954 15.5035 13.0819 15.4999H5.74998M5.74998 8.34996V15.4999M5.74998 8.34996H3.79999C3.45521 8.34996 3.12455 8.48693 2.88076 8.73072C2.63696 8.97452 2.5 9.30517 2.5 9.64995V14.1999C2.5 14.5447 2.63696 14.8754 2.88076 15.1192C3.12455 15.363 3.45521 15.4999 3.79999 15.4999H5.74998",
4395
- stroke: "#111019",
4396
- strokeWidth: "1.5",
4397
- strokeLinecap: "round",
4398
- strokeLinejoin: "round"
4399
- }
4400
- )
4401
- );
4379
+ d: "M5.74998 8.34996L8.34996 2.5C8.86713 2.5 9.36312 2.70544 9.72881 3.07114C10.0945 3.43683 10.3 3.93282 10.3 4.44999V7.04997H13.9789C14.1674 7.04784 14.354 7.0867 14.5259 7.16386C14.6979 7.24103 14.851 7.35465 14.9746 7.49685C15.0983 7.63906 15.1895 7.80645 15.2421 7.98743C15.2946 8.16841 15.3072 8.35864 15.2789 8.54496L14.3819 14.3949C14.3349 14.7049 14.1775 14.9875 13.9386 15.1905C13.6997 15.3936 13.3954 15.5035 13.0819 15.4999H5.74998M5.74998 8.34996V15.4999M5.74998 8.34996H3.79999C3.45521 8.34996 3.12455 8.48693 2.88076 8.73072C2.63696 8.97452 2.5 9.30517 2.5 9.64995V14.1999C2.5 14.5447 2.63696 14.8754 2.88076 15.1192C3.12455 15.363 3.45521 15.4999 3.79999 15.4999H5.74998",
4380
+ stroke: "currentColor",
4381
+ strokeWidth: "1.5",
4382
+ strokeLinecap: "round",
4383
+ strokeLinejoin: "round"
4384
+ }
4385
+ ));
4402
4386
 
4403
4387
  // src/components/icon/available-icons/timer.tsx
4404
4388
  import * as React194 from "react";
@@ -1,23 +1,15 @@
1
1
  // src/components/icon/available-icons/thumbs-down.tsx
2
2
  import React from "react";
3
- var SvgThumbsDown = () => /* @__PURE__ */ React.createElement(
4
- "svg",
3
+ var SvgThumbsDown = () => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ React.createElement(
4
+ "path",
5
5
  {
6
- xmlns: "http://www.w3.org/2000/svg",
7
- viewBox: "0 0 24 24",
8
- fill: "currentColor"
9
- },
10
- /* @__PURE__ */ React.createElement(
11
- "path",
12
- {
13
- d: "M12.2574 9.65011L9.65746 15.5C9.1403 15.5 8.64432 15.2946 8.27863 14.9289C7.91294 14.5632 7.7075 14.0672 7.7075 13.55V10.9501H4.02856C3.84013 10.9522 3.65348 10.9134 3.48155 10.8362C3.30963 10.759 3.15653 10.6454 3.03287 10.5032C2.90922 10.361 2.81796 10.1936 2.76542 10.0126C2.71287 9.83166 2.70031 9.64142 2.72859 9.45511L3.62557 3.60521C3.67258 3.29523 3.83004 3.01268 4.06893 2.80963C4.30781 2.60657 4.61204 2.49669 4.92555 2.50023H12.2574M12.2574 9.65011V2.50023M12.2574 9.65011H13.9929C14.3608 9.65661 14.7182 9.52782 14.9974 9.28818C15.2766 9.04854 15.458 8.71473 15.5074 8.35013V3.80021C15.458 3.43561 15.2766 3.1018 14.9974 2.86216C14.7182 2.62252 14.3608 2.49373 13.9929 2.50023H12.2574",
14
- stroke: "#111019",
15
- strokeWidth: "1.5",
16
- strokeLinecap: "round",
17
- strokeLinejoin: "round"
18
- }
19
- )
20
- );
6
+ d: "M12.2574 9.65011L9.65746 15.5C9.1403 15.5 8.64432 15.2946 8.27863 14.9289C7.91294 14.5632 7.7075 14.0672 7.7075 13.55V10.9501H4.02856C3.84013 10.9522 3.65348 10.9134 3.48155 10.8362C3.30963 10.759 3.15653 10.6454 3.03287 10.5032C2.90922 10.361 2.81796 10.1936 2.76542 10.0126C2.71287 9.83166 2.70031 9.64142 2.72859 9.45511L3.62557 3.60521C3.67258 3.29523 3.83004 3.01268 4.06893 2.80963C4.30781 2.60657 4.61204 2.49669 4.92555 2.50023H12.2574M12.2574 9.65011V2.50023M12.2574 9.65011H13.9929C14.3608 9.65661 14.7182 9.52782 14.9974 9.28818C15.2766 9.04854 15.458 8.71473 15.5074 8.35013V3.80021C15.458 3.43561 15.2766 3.1018 14.9974 2.86216C14.7182 2.62252 14.3608 2.49373 13.9929 2.50023H12.2574",
7
+ stroke: "currentColor",
8
+ strokeWidth: "1.5",
9
+ strokeLinecap: "round",
10
+ strokeLinejoin: "round"
11
+ }
12
+ ));
21
13
  export {
22
14
  SvgThumbsDown
23
15
  };
@@ -1,23 +1,15 @@
1
1
  // src/components/icon/available-icons/thumbs-up.tsx
2
2
  import React from "react";
3
- var SvgThumbsUp = () => /* @__PURE__ */ React.createElement(
4
- "svg",
3
+ var SvgThumbsUp = () => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none" }, /* @__PURE__ */ React.createElement(
4
+ "path",
5
5
  {
6
- xmlns: "http://www.w3.org/2000/svg",
7
- viewBox: "0 0 24 24",
8
- fill: "currentColor"
9
- },
10
- /* @__PURE__ */ React.createElement(
11
- "path",
12
- {
13
- d: "M5.74998 8.34996L8.34996 2.5C8.86713 2.5 9.36312 2.70544 9.72881 3.07114C10.0945 3.43683 10.3 3.93282 10.3 4.44999V7.04997H13.9789C14.1674 7.04784 14.354 7.0867 14.5259 7.16386C14.6979 7.24103 14.851 7.35465 14.9746 7.49685C15.0983 7.63906 15.1895 7.80645 15.2421 7.98743C15.2946 8.16841 15.3072 8.35864 15.2789 8.54496L14.3819 14.3949C14.3349 14.7049 14.1775 14.9875 13.9386 15.1905C13.6997 15.3936 13.3954 15.5035 13.0819 15.4999H5.74998M5.74998 8.34996V15.4999M5.74998 8.34996H3.79999C3.45521 8.34996 3.12455 8.48693 2.88076 8.73072C2.63696 8.97452 2.5 9.30517 2.5 9.64995V14.1999C2.5 14.5447 2.63696 14.8754 2.88076 15.1192C3.12455 15.363 3.45521 15.4999 3.79999 15.4999H5.74998",
14
- stroke: "#111019",
15
- strokeWidth: "1.5",
16
- strokeLinecap: "round",
17
- strokeLinejoin: "round"
18
- }
19
- )
20
- );
6
+ d: "M5.74998 8.34996L8.34996 2.5C8.86713 2.5 9.36312 2.70544 9.72881 3.07114C10.0945 3.43683 10.3 3.93282 10.3 4.44999V7.04997H13.9789C14.1674 7.04784 14.354 7.0867 14.5259 7.16386C14.6979 7.24103 14.851 7.35465 14.9746 7.49685C15.0983 7.63906 15.1895 7.80645 15.2421 7.98743C15.2946 8.16841 15.3072 8.35864 15.2789 8.54496L14.3819 14.3949C14.3349 14.7049 14.1775 14.9875 13.9386 15.1905C13.6997 15.3936 13.3954 15.5035 13.0819 15.4999H5.74998M5.74998 8.34996V15.4999M5.74998 8.34996H3.79999C3.45521 8.34996 3.12455 8.48693 2.88076 8.73072C2.63696 8.97452 2.5 9.30517 2.5 9.64995V14.1999C2.5 14.5447 2.63696 14.8754 2.88076 15.1192C3.12455 15.363 3.45521 15.4999 3.79999 15.4999H5.74998",
7
+ stroke: "currentColor",
8
+ strokeWidth: "1.5",
9
+ strokeLinecap: "round",
10
+ strokeLinejoin: "round"
11
+ }
12
+ ));
21
13
  export {
22
14
  SvgThumbsUp
23
15
  };
package/dist/index.js CHANGED
@@ -2505,7 +2505,9 @@ var sizeStyles = {
2505
2505
  }
2506
2506
  };
2507
2507
  var IconButtonBox = styled13.button`
2508
- background-color: ${(props) => props.isActive ? getColorValue("backgroundActive") : "transparent"};
2508
+ background-color: ${(props) => getColorValue(
2509
+ props.isActive ? "backgroundActive" : props.backgroundColor
2510
+ ) || "transparent"};
2509
2511
  border: none;
2510
2512
  appearance: none;
2511
2513
  cursor: pointer;
@@ -2561,6 +2563,7 @@ var IconButton = (_a) => {
2561
2563
  icon,
2562
2564
  onClick,
2563
2565
  iconColor = "body",
2566
+ backgroundColor,
2564
2567
  isActive,
2565
2568
  isDisabled,
2566
2569
  size = "medium"
@@ -2569,6 +2572,7 @@ var IconButton = (_a) => {
2569
2572
  "icon",
2570
2573
  "onClick",
2571
2574
  "iconColor",
2575
+ "backgroundColor",
2572
2576
  "isActive",
2573
2577
  "isDisabled",
2574
2578
  "size"
@@ -2580,7 +2584,8 @@ var IconButton = (_a) => {
2580
2584
  onClick,
2581
2585
  isActive,
2582
2586
  disabled: isDisabled,
2583
- size
2587
+ size,
2588
+ backgroundColor
2584
2589
  }, props),
2585
2590
  /* @__PURE__ */ React16.createElement(
2586
2591
  icon_default,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loomhq/lens",
3
- "version": "11.15.0",
3
+ "version": "11.15.2",
4
4
  "packageManager": "pnpm@8.9.2",
5
5
  "scripts": {
6
6
  "preinstall": "npx only-allow pnpm",