@lanaco/lnc-react-ui 4.0.183 → 4.0.185

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.
Files changed (75) hide show
  1. package/dist/BlogCardsSponsoredSection.cjs +5 -3
  2. package/dist/BlogCardsSponsoredSection.js +68 -64
  3. package/dist/BlogCategoryCardsSection.cjs +1 -1
  4. package/dist/BlogCategoryCardsSection.js +1 -1
  5. package/dist/BlogListSection.cjs +8 -6
  6. package/dist/BlogListSection.js +122 -114
  7. package/dist/BlogProductCardsSection.cjs +1 -1
  8. package/dist/BlogProductCardsSection.js +1 -1
  9. package/dist/BlogShopCardsSection.cjs +1 -1
  10. package/dist/BlogShopCardsSection.js +1 -1
  11. package/dist/BlogSingleSection.cjs +1 -1
  12. package/dist/BlogSingleSection.js +1 -1
  13. package/dist/BlogsSectionDetailed.cjs +5 -3
  14. package/dist/BlogsSectionDetailed.js +53 -49
  15. package/dist/BlogsSectionLarge.cjs +2 -2
  16. package/dist/BlogsSectionLarge.js +2 -2
  17. package/dist/BlogsSectionSimple.cjs +9 -7
  18. package/dist/BlogsSectionSimple.js +53 -47
  19. package/dist/BlogsSectionSimpleCentered.cjs +7 -5
  20. package/dist/BlogsSectionSimpleCentered.js +31 -26
  21. package/dist/BlogsSectionWithFilters.cjs +9 -7
  22. package/dist/BlogsSectionWithFilters.js +47 -42
  23. package/dist/BrandHitsSection.cjs +9 -7
  24. package/dist/BrandHitsSection.js +40 -35
  25. package/dist/{CategorySimpleCard-BNYjZQTH.cjs → CategorySimpleCard-D5N8cx0Z.cjs} +4 -3
  26. package/dist/{CategorySimpleCard-BA0S7TaN.js → CategorySimpleCard-DRQuoxXu.js} +17 -15
  27. package/dist/CheckBoxInput.cjs +27 -27
  28. package/dist/CheckBoxInput.js +61 -98
  29. package/dist/ColorInput.cjs +26 -26
  30. package/dist/ColorInput.js +127 -162
  31. package/dist/DetailedProductsInfinitiveSection.cjs +2 -2
  32. package/dist/DetailedProductsInfinitiveSection.js +6 -5
  33. package/dist/DetailedProductsSection.cjs +2 -2
  34. package/dist/DetailedProductsSection.js +12 -10
  35. package/dist/FieldOfInterestsMasonrySection.cjs +5 -3
  36. package/dist/FieldOfInterestsMasonrySection.js +90 -85
  37. package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +4 -4
  38. package/dist/FieldOfInterestsWithAvatarsCardsSection.js +49 -46
  39. package/dist/FieldOfInterestsWithTagsCardsSection.cjs +8 -6
  40. package/dist/FieldOfInterestsWithTagsCardsSection.js +44 -40
  41. package/dist/GeneralWithTagsCardsSection.cjs +12 -8
  42. package/dist/GeneralWithTagsCardsSection.js +50 -44
  43. package/dist/GiftCardsSection.cjs +7 -5
  44. package/dist/GiftCardsSection.js +46 -40
  45. package/dist/MasonryGeneralCardsSection.cjs +6 -5
  46. package/dist/MasonryGeneralCardsSection.js +26 -23
  47. package/dist/Modal.cjs +14 -13
  48. package/dist/Modal.js +88 -86
  49. package/dist/OverlayGeneralCardsSection.cjs +7 -5
  50. package/dist/OverlayGeneralCardsSection.js +30 -35
  51. package/dist/ProductsWithBannerSection.cjs +8 -6
  52. package/dist/ProductsWithBannerSection.js +71 -77
  53. package/dist/QuattroCardsSection.cjs +8 -6
  54. package/dist/QuattroCardsSection.js +31 -28
  55. package/dist/ReviewsSection.cjs +11 -9
  56. package/dist/ReviewsSection.js +38 -36
  57. package/dist/SalesCampaignsSection.cjs +22 -19
  58. package/dist/SalesCampaignsSection.js +299 -300
  59. package/dist/ShopCardsSection.cjs +1 -1
  60. package/dist/ShopCardsSection.js +1 -1
  61. package/dist/SimpleCategoriesSection.cjs +2 -2
  62. package/dist/SimpleCategoriesSection.js +7 -3
  63. package/dist/SimpleProductsSection.cjs +5 -5
  64. package/dist/SimpleProductsSection.js +62 -72
  65. package/dist/UrgentSaleProductsSection.cjs +6 -6
  66. package/dist/UrgentSaleProductsSection.js +9 -7
  67. package/dist/{index-DoKMLSVY.cjs → index-0p_3g3pT.cjs} +4 -2
  68. package/dist/{index-Bhfq_YpE.js → index-BipuzfLW.js} +28 -25
  69. package/dist/{index-CaAhRJ2-.cjs → index-Bmr3IeZ_.cjs} +12 -11
  70. package/dist/{index-DWLKvVyZ.js → index-C8QkdNHi.js} +27 -23
  71. package/dist/{index-B8I1mHMA.js → index-CA59z2ge.js} +29 -26
  72. package/dist/{index-BnYqZk-h.cjs → index-DHV9awrE.cjs} +4 -2
  73. package/dist/{index-DxZ71UZ1.js → index-DZ8515cZ.js} +144 -137
  74. package/dist/{index-D55MR8tU.cjs → index-MiN854X_.cjs} +6 -4
  75. package/package.json +1 -1
@@ -1,9 +1,10 @@
1
- import { jsxs as d, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as s } from "react";
3
- import { s as c } from "./emotion-styled.browser.esm-BNN1dTl3.js";
1
+ import { jsxs as h, jsx as r } from "react/jsx-runtime";
2
+ import { forwardRef as g } from "react";
3
+ import { s as l } from "./emotion-styled.browser.esm-BNN1dTl3.js";
4
4
  import { o as e } from "./utils-Dc5zIpaz.js";
5
- import { M as h } from "./consts-BuFChS64.js";
6
- const g = c.div`
5
+ import { M as p } from "./consts-BuFChS64.js";
6
+ const x = l.a`
7
+ text-decoration: none;
7
8
  display: flex;
8
9
  flex-direction: column;
9
10
  gap: 0;
@@ -39,7 +40,7 @@ const g = c.div`
39
40
  max-height: 8.25rem;
40
41
  }
41
42
 
42
- @media (max-width: ${h + "px"}) {
43
+ @media (max-width: ${p + "px"}) {
43
44
  min-width: 8.75rem;
44
45
  max-width: 8.75rem;
45
46
 
@@ -49,22 +50,23 @@ const g = c.div`
49
50
  max-height: 5.375rem;
50
51
  }
51
52
  }
52
- `, v = s((i, a) => {
53
- const { uuid: o, image: t, name: m, onSelectCard: n = () => {
53
+ `, y = g((i, o) => {
54
+ const { image: a, name: t, urlPrefix: m, urlSufix: n, code: d, uuid: c, onSelectCard: s = () => {
54
55
  } } = i;
55
- return /* @__PURE__ */ d(
56
- g,
56
+ return /* @__PURE__ */ h(
57
+ x,
57
58
  {
58
- ref: a,
59
+ ref: o,
59
60
  className: "simple-category-card",
60
- onClick: () => n(o),
61
+ onClick: () => s(c),
62
+ href: `${m}${d}${n}`,
61
63
  children: [
62
- /* @__PURE__ */ r("img", { src: t }),
63
- /* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children: m }) })
64
+ /* @__PURE__ */ r("img", { src: a }),
65
+ /* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children: t }) })
64
66
  ]
65
67
  }
66
68
  );
67
69
  });
68
70
  export {
69
- v as C
71
+ y as C
70
72
  };
@@ -1,19 +1,19 @@
1
- "use strict";const n=require("react/jsx-runtime"),z=require("react"),t=require("./index-BpbMKBf_.cjs"),R=require("./emotion-styled.browser.esm-BtEseadx.cjs"),o=require("./utils-RnrgDDZP.cjs"),j=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),V=e=>e=="left"?"row-reverse":"row",i=(e,s)=>`calc(${e.components.Checkbox.default.enabled.sizes[s]} / 2)`,O=R.styled.label`
1
+ "use strict";const i=require("react/jsx-runtime"),R=require("react"),j=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-RnrgDDZP.cjs"),V=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),O=e=>e=="left"?"row-reverse":"row",o=(e,l)=>`calc(${e.components.Checkbox.default.enabled.sizes[l]} / 2)`,I=j.styled.label`
2
2
  -webkit-user-select: none;
3
3
  -moz-user-select: none;
4
4
  -ms-user-select: none;
5
5
  user-select: none;
6
6
  cursor: pointer;
7
- min-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
8
- max-height: ${e=>o.getSizeValueWithUnits(e.theme,e.size)};
7
+ min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
8
+ max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
9
9
  display: inline-flex;
10
10
  align-items: center;
11
11
  justify-content: start;
12
- flex-direction: ${e=>V(e.labelPosition)};
12
+ flex-direction: ${e=>O(e.labelPosition)};
13
13
  ${e=>e.spaceBetween==!0&&"justify-content: space-between;"}
14
14
  width: 100%;
15
15
  ${e=>e.disabled===!0&&"pointer-events: none;"}
16
- ${e=>o.getComponentTypographyCss(e.theme,"Checkbox",e.size,"enabled")};
16
+ ${e=>t.getComponentTypographyCss(e.theme,"Checkbox",e.size,"enabled")};
17
17
  gap: 0.75rem;
18
18
  position: relative;
19
19
  & .checkbox-label {
@@ -23,7 +23,7 @@
23
23
  min-height: 0;
24
24
  overflow: hidden;
25
25
  text-overflow: ellipsis;
26
- color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
26
+ color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
27
27
  }
28
28
  & input {
29
29
  position: absolute;
@@ -49,11 +49,11 @@
49
49
  align-items: center;
50
50
  transition: all 0.2s ease;
51
51
  background-color: transparent;
52
- color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
52
+ color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
53
53
  border: 1px solid
54
- ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","border")};
55
- border-radius: ${e=>o.getBorderRadiusValueWithUnits(e.theme,"slight")};
56
- ${e=>e.disabled===!0&&`background-color: ${o.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")}`};
54
+ ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","border")};
55
+ border-radius: ${e=>t.getBorderRadiusValueWithUnits(e.theme,"slight")};
56
+ ${e=>e.disabled===!0&&`background-color: ${t.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")}`};
57
57
  & svg {
58
58
  height: 0;
59
59
  width: 0;
@@ -66,12 +66,12 @@
66
66
  }
67
67
  }
68
68
  & input:checked ~ .checkmark {
69
- background-color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","background","backgroundOpacity")};
69
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","background","backgroundOpacity")};
70
70
  border: 1px solid
71
- ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","border")};
71
+ ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","border")};
72
72
  & .checked {
73
- height: ${e=>i(e.theme,e.size)};
74
- width: ${e=>i(e.theme,e.size)};
73
+ height: ${e=>o(e.theme,e.size)};
74
+ width: ${e=>o(e.theme,e.size)};
75
75
  stroke: white;
76
76
  }
77
77
  & .indeterminate {
@@ -79,40 +79,40 @@
79
79
  width: 0;
80
80
  }
81
81
  & img {
82
- max-height: ${e=>i(e.theme,e.size)};
83
- max-width: ${e=>i(e.theme,e.size)};
82
+ max-height: ${e=>o(e.theme,e.size)};
83
+ max-width: ${e=>o(e.theme,e.size)};
84
84
  }
85
85
  }
86
86
  & input:checked ~ .checkbox-label {
87
- color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","text")};
87
+ color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","text")};
88
88
  }
89
89
  & input:indeterminate ~ .checkmark {
90
90
  & .checked {
91
91
  height: 0;
92
92
  width: 0;
93
93
  }
94
- background-color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","background","backgroundOpacity")};
94
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","background","backgroundOpacity")};
95
95
  & .indeterminate {
96
- height: ${e=>i(e.theme,e.size)};
97
- width: ${e=>i(e.theme,e.size)};
96
+ height: ${e=>o(e.theme,e.size)};
97
+ width: ${e=>o(e.theme,e.size)};
98
98
  stroke: white;
99
99
  }
100
100
  }
101
101
  & input:indeterminate ~ .checkbox-label {
102
- color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
102
+ color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
103
103
  }
104
104
  & input:disabled ~ .checkmark {
105
- ${e=>e.readOnly!==!0&&`background-color: ${o.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")};
106
- border-color: ${o.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")};
105
+ ${e=>e.readOnly!==!0&&`background-color: ${t.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")};
106
+ border-color: ${t.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","border")};
107
107
  `};
108
108
  }
109
109
  & input:disabled ~ .checkbox-label {
110
- color: ${e=>o.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","text")};
110
+ color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","text")};
111
111
  }
112
112
  & input:focus ~ .checkmark {
113
- ${e=>o.getOutlineCss(e.theme)};
113
+ ${e=>t.getOutlineCss(e.theme)};
114
114
  }
115
115
  & input:active ~ .checkmark {
116
- ${e=>o.getOutlineCss(e.theme)};
116
+ ${e=>t.getOutlineCss(e.theme)};
117
117
  }
118
- `,g=z.forwardRef((e,s)=>{const{containerRef:k,id:B,indeterminate:I,disabled:u,readOnly:d,label:a,labelPosition:m="right",spaceBetween:x,customCheckmark:h,onChange:b,onFocus:l,onBlur:c,onClick:y,color:p="primary",size:C="small",className:w="",style:f={},children:L,...$}=e;var P={theme:j.useTheme(),size:C,color:p,disabled:u,readOnly:d};const T=r=>{c&&(c==null||c(r))},v=r=>{l&&(l==null||l(r))};return n.jsxs(O,{ref:k,direction:m,className:w,style:f,label:a,labelPosition:m,spaceBetween:x,tabIndex:-1,readOnly:d,onClick:y,...P,children:[n.jsx("input",{ref:s,type:"checkbox",onBlur:T,onFocus:v,disabled:u||d,onChange:r=>b==null?void 0:b(r),...$}),n.jsxs("div",{className:"checkmark",tabIndex:-1,children:[!h&&n.jsx("svg",{viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,disabled:!0,tabIndex:-1,className:"checked",children:n.jsx("path",{d:"M1 3.15385L2.89474 5L7 1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",tabIndex:-1})}),n.jsx("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,disabled:!0,tabIndex:-1,className:"indeterminate",children:n.jsx("path",{d:"M1 1H7",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",tabIndex:-1,title:a})}),h&&n.jsx(n.Fragment,{children:h})]}),a&&n.jsx("div",{className:"checkbox-label",tabIndex:-1,children:a})]})});g.propTypes={containerRef:t.PropTypes.any,id:t.PropTypes.any,defaultChecked:t.PropTypes.bool,checked:t.PropTypes.bool,disabled:t.PropTypes.bool,readOnly:t.PropTypes.bool,label:t.PropTypes.oneOfType([t.PropTypes.string,t.PropTypes.element]),indeterminate:t.PropTypes.bool,labelPosition:t.PropTypes.oneOf(["right","left"]),tabIndex:t.PropTypes.number,spaceBetween:t.PropTypes.bool,customCheckmark:t.PropTypes.element,onChange:t.PropTypes.func,onBlur:t.PropTypes.func,onFocus:t.PropTypes.func,onClick:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=g;
118
+ `,B=R.forwardRef((e,l)=>{const{containerRef:m,id:L,indeterminate:q,disabled:b,readOnly:h,label:r,labelPosition:u="right",spaceBetween:g,customCheckmark:s,onChange:d,onFocus:a,onBlur:c,onClick:k,color:x="primary",size:C="small",className:w="",style:$={},children:N,...f}=e;var v={theme:V.useTheme(),size:C,color:x,disabled:b,readOnly:h};const z=n=>{c&&(c==null||c(n))},y=n=>{a&&(a==null||a(n))};return i.jsxs(I,{ref:m,direction:u,className:w,style:$,label:r,labelPosition:u,spaceBetween:g,tabIndex:-1,readOnly:h,onClick:k,...v,children:[i.jsx("input",{ref:l,type:"checkbox",onBlur:z,onFocus:y,disabled:b||h,onChange:n=>d==null?void 0:d(n),...f}),i.jsxs("div",{className:"checkmark",tabIndex:-1,children:[!s&&i.jsx("svg",{viewBox:"0 0 8 6",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,disabled:!0,tabIndex:-1,className:"checked",children:i.jsx("path",{d:"M1 3.15385L2.89474 5L7 1",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",tabIndex:-1})}),i.jsx("svg",{width:"8",height:"2",viewBox:"0 0 8 2",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,disabled:!0,tabIndex:-1,className:"indeterminate",children:i.jsx("path",{d:"M1 1H7",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",tabIndex:-1,title:r})}),s&&i.jsx(i.Fragment,{children:s})]}),r&&i.jsx("div",{className:"checkbox-label",tabIndex:-1,children:r})]})});module.exports=B;
@@ -1,21 +1,20 @@
1
- import { jsxs as k, jsx as i, Fragment as B } from "react/jsx-runtime";
1
+ import { jsxs as u, jsx as i, Fragment as B } from "react/jsx-runtime";
2
2
  import { forwardRef as I } from "react";
3
- import { P as t } from "./index-CblbdqjE.js";
4
3
  import { s as j } from "./emotion-styled.browser.esm-BNN1dTl3.js";
5
- import { d as g, c as L, b as n, a as N, e as x } from "./utils-Dc5zIpaz.js";
6
- import { u as P } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
7
- const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.components.Checkbox.default.enabled.sizes[d]} / 2)`, T = j.label`
4
+ import { d as k, c as L, b as t, a as N, e as x } from "./utils-Dc5zIpaz.js";
5
+ import { u as R } from "./emotion-element-f0de968e.browser.esm-CkCiQliQ.js";
6
+ const W = (e) => e == "left" ? "row-reverse" : "row", n = (e, h) => `calc(${e.components.Checkbox.default.enabled.sizes[h]} / 2)`, F = j.label`
8
7
  -webkit-user-select: none;
9
8
  -moz-user-select: none;
10
9
  -ms-user-select: none;
11
10
  user-select: none;
12
11
  cursor: pointer;
13
- min-height: ${(e) => g(e.theme, e.size)};
14
- max-height: ${(e) => g(e.theme, e.size)};
12
+ min-height: ${(e) => k(e.theme, e.size)};
13
+ max-height: ${(e) => k(e.theme, e.size)};
15
14
  display: inline-flex;
16
15
  align-items: center;
17
16
  justify-content: start;
18
- flex-direction: ${(e) => R(e.labelPosition)};
17
+ flex-direction: ${(e) => W(e.labelPosition)};
19
18
  ${(e) => e.spaceBetween == !0 && "justify-content: space-between;"}
20
19
  width: 100%;
21
20
  ${(e) => e.disabled === !0 && "pointer-events: none;"}
@@ -29,7 +28,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
29
28
  min-height: 0;
30
29
  overflow: hidden;
31
30
  text-overflow: ellipsis;
32
- color: ${(e) => n(
31
+ color: ${(e) => t(
33
32
  e.theme,
34
33
  "Checkbox",
35
34
  e.color,
@@ -61,7 +60,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
61
60
  align-items: center;
62
61
  transition: all 0.2s ease;
63
62
  background-color: transparent;
64
- color: ${(e) => n(
63
+ color: ${(e) => t(
65
64
  e.theme,
66
65
  "Checkbox",
67
66
  e.color,
@@ -69,7 +68,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
69
68
  "text"
70
69
  )};
71
70
  border: 1px solid
72
- ${(e) => n(
71
+ ${(e) => t(
73
72
  e.theme,
74
73
  "Checkbox",
75
74
  e.color,
@@ -77,7 +76,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
77
76
  "border"
78
77
  )};
79
78
  border-radius: ${(e) => N(e.theme, "slight")};
80
- ${(e) => e.disabled === !0 && `background-color: ${n(
79
+ ${(e) => e.disabled === !0 && `background-color: ${t(
81
80
  e.theme,
82
81
  "Checkbox",
83
82
  e.color,
@@ -96,7 +95,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
96
95
  }
97
96
  }
98
97
  & input:checked ~ .checkmark {
99
- background-color: ${(e) => n(
98
+ background-color: ${(e) => t(
100
99
  e.theme,
101
100
  "Checkbox",
102
101
  e.color,
@@ -105,7 +104,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
105
104
  "backgroundOpacity"
106
105
  )};
107
106
  border: 1px solid
108
- ${(e) => n(
107
+ ${(e) => t(
109
108
  e.theme,
110
109
  "Checkbox",
111
110
  e.color,
@@ -113,8 +112,8 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
113
112
  "border"
114
113
  )};
115
114
  & .checked {
116
- height: ${(e) => o(e.theme, e.size)};
117
- width: ${(e) => o(e.theme, e.size)};
115
+ height: ${(e) => n(e.theme, e.size)};
116
+ width: ${(e) => n(e.theme, e.size)};
118
117
  stroke: white;
119
118
  }
120
119
  & .indeterminate {
@@ -122,12 +121,12 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
122
121
  width: 0;
123
122
  }
124
123
  & img {
125
- max-height: ${(e) => o(e.theme, e.size)};
126
- max-width: ${(e) => o(e.theme, e.size)};
124
+ max-height: ${(e) => n(e.theme, e.size)};
125
+ max-width: ${(e) => n(e.theme, e.size)};
127
126
  }
128
127
  }
129
128
  & input:checked ~ .checkbox-label {
130
- color: ${(e) => n(
129
+ color: ${(e) => t(
131
130
  e.theme,
132
131
  "Checkbox",
133
132
  e.color,
@@ -140,7 +139,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
140
139
  height: 0;
141
140
  width: 0;
142
141
  }
143
- background-color: ${(e) => n(
142
+ background-color: ${(e) => t(
144
143
  e.theme,
145
144
  "Checkbox",
146
145
  e.color,
@@ -149,13 +148,13 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
149
148
  "backgroundOpacity"
150
149
  )};
151
150
  & .indeterminate {
152
- height: ${(e) => o(e.theme, e.size)};
153
- width: ${(e) => o(e.theme, e.size)};
151
+ height: ${(e) => n(e.theme, e.size)};
152
+ width: ${(e) => n(e.theme, e.size)};
154
153
  stroke: white;
155
154
  }
156
155
  }
157
156
  & input:indeterminate ~ .checkbox-label {
158
- color: ${(e) => n(
157
+ color: ${(e) => t(
159
158
  e.theme,
160
159
  "Checkbox",
161
160
  e.color,
@@ -164,14 +163,14 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
164
163
  )};
165
164
  }
166
165
  & input:disabled ~ .checkmark {
167
- ${(e) => e.readOnly !== !0 && `background-color: ${n(
166
+ ${(e) => e.readOnly !== !0 && `background-color: ${t(
168
167
  e.theme,
169
168
  "Checkbox",
170
169
  e.color,
171
170
  "disabled",
172
171
  "border"
173
172
  )};
174
- border-color: ${n(
173
+ border-color: ${t(
175
174
  e.theme,
176
175
  "Checkbox",
177
176
  e.color,
@@ -181,7 +180,7 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
181
180
  `};
182
181
  }
183
182
  & input:disabled ~ .checkbox-label {
184
- color: ${(e) => n(
183
+ color: ${(e) => t(
185
184
  e.theme,
186
185
  "Checkbox",
187
186
  e.color,
@@ -195,64 +194,64 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
195
194
  & input:active ~ .checkmark {
196
195
  ${(e) => x(e.theme)};
197
196
  }
198
- `, F = I((e, d) => {
197
+ `, E = I((e, h) => {
199
198
  const {
200
- containerRef: f,
201
- id: W,
199
+ containerRef: g,
200
+ id: P,
202
201
  indeterminate: V,
203
202
  disabled: b,
204
- readOnly: h,
205
- label: a,
206
- labelPosition: u = "right",
203
+ readOnly: l,
204
+ label: r,
205
+ labelPosition: m = "right",
207
206
  spaceBetween: w,
208
- customCheckmark: s,
207
+ customCheckmark: d,
209
208
  //----------------
210
- onChange: m,
209
+ onChange: s,
211
210
  onFocus: c,
212
- onBlur: l,
211
+ onBlur: a,
213
212
  onClick: $,
214
213
  //----------------
215
- color: C = "primary",
216
- size: y = "small",
214
+ color: f = "primary",
215
+ size: C = "small",
217
216
  className: v = "",
218
217
  style: z = {},
219
- children: M,
220
- ...O
218
+ children: p,
219
+ ...y
221
220
  } = e;
222
- var p = { theme: P(), size: y, color: C, disabled: b, readOnly: h };
223
- return /* @__PURE__ */ k(
224
- T,
221
+ var O = { theme: R(), size: C, color: f, disabled: b, readOnly: l };
222
+ return /* @__PURE__ */ u(
223
+ F,
225
224
  {
226
- ref: f,
227
- direction: u,
225
+ ref: g,
226
+ direction: m,
228
227
  className: v,
229
228
  style: z,
230
- label: a,
231
- labelPosition: u,
229
+ label: r,
230
+ labelPosition: m,
232
231
  spaceBetween: w,
233
232
  tabIndex: -1,
234
- readOnly: h,
233
+ readOnly: l,
235
234
  onClick: $,
236
- ...p,
235
+ ...O,
237
236
  children: [
238
237
  /* @__PURE__ */ i(
239
238
  "input",
240
239
  {
241
- ref: d,
240
+ ref: h,
242
241
  type: "checkbox",
243
- onBlur: (r) => {
244
- l && (l == null || l(r));
242
+ onBlur: (o) => {
243
+ a && (a == null || a(o));
245
244
  },
246
- onFocus: (r) => {
247
- c && (c == null || c(r));
245
+ onFocus: (o) => {
246
+ c && (c == null || c(o));
248
247
  },
249
- disabled: b || h,
250
- onChange: (r) => m == null ? void 0 : m(r),
251
- ...O
248
+ disabled: b || l,
249
+ onChange: (o) => s == null ? void 0 : s(o),
250
+ ...y
252
251
  }
253
252
  ),
254
- /* @__PURE__ */ k("div", { className: "checkmark", tabIndex: -1, children: [
255
- !s && /* @__PURE__ */ i(
253
+ /* @__PURE__ */ u("div", { className: "checkmark", tabIndex: -1, children: [
254
+ !d && /* @__PURE__ */ i(
256
255
  "svg",
257
256
  {
258
257
  viewBox: "0 0 8 6",
@@ -295,54 +294,18 @@ const R = (e) => e == "left" ? "row-reverse" : "row", o = (e, d) => `calc(${e.co
295
294
  strokeLinecap: "round",
296
295
  strokeLinejoin: "round",
297
296
  tabIndex: -1,
298
- title: a
297
+ title: r
299
298
  }
300
299
  )
301
300
  }
302
301
  ),
303
- s && /* @__PURE__ */ i(B, { children: s })
302
+ d && /* @__PURE__ */ i(B, { children: d })
304
303
  ] }),
305
- a && /* @__PURE__ */ i("div", { className: "checkbox-label", tabIndex: -1, children: a })
304
+ r && /* @__PURE__ */ i("div", { className: "checkbox-label", tabIndex: -1, children: r })
306
305
  ]
307
306
  }
308
307
  );
309
308
  });
310
- F.propTypes = {
311
- containerRef: t.any,
312
- id: t.any,
313
- defaultChecked: t.bool,
314
- checked: t.bool,
315
- disabled: t.bool,
316
- readOnly: t.bool,
317
- label: t.oneOfType([t.string, t.element]),
318
- /**
319
- * Default state indeterminate
320
- */
321
- indeterminate: t.bool,
322
- labelPosition: t.oneOf(["right", "left"]),
323
- tabIndex: t.number,
324
- spaceBetween: t.bool,
325
- customCheckmark: t.element,
326
- //---------------------------------------------------------------
327
- onChange: t.func,
328
- onBlur: t.func,
329
- onFocus: t.func,
330
- onClick: t.func,
331
- //---------------------------------------------------------------
332
- className: t.string,
333
- style: t.object,
334
- size: t.oneOf(["small", "medium", "large"]),
335
- color: t.oneOf([
336
- "primary",
337
- "secondary",
338
- "success",
339
- "danger",
340
- "warning",
341
- "information",
342
- "neutral",
343
- "gray"
344
- ])
345
- };
346
309
  export {
347
- F as default
310
+ E as default
348
311
  };
@@ -1,42 +1,42 @@
1
- "use strict";const i=require("react/jsx-runtime"),m=require("react"),P=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./index-BpbMKBf_.cjs"),n=require("./utils-RnrgDDZP.cjs"),N=require("./index-Cp66dWMi.cjs"),A=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),H=require("./useUpdateEffect-BtMgpgIV.cjs"),R=(e,o)=>`calc(${n.getSizeValueWithUnits(e,o)} - 1rem)`,L=P.styled.label`
1
+ "use strict";const l=require("react/jsx-runtime"),b=require("react"),V=require("./emotion-styled.browser.esm-BtEseadx.cjs"),t=require("./utils-RnrgDDZP.cjs"),H=require("./index-Cp66dWMi.cjs"),K=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),L=require("./useUpdateEffect-BtMgpgIV.cjs"),F=(e,n)=>`calc(${t.getSizeValueWithUnits(e,n)} - 1rem)`,N=V.styled.label`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  gap: 0.5rem;
5
- ${e=>n.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")};
6
- min-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
7
- max-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
8
- background-color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
9
- color: ${e=>n.getColorRgbaValue(e.theme,"Input",e.isFocused?"primary":e.color,"enabled","text")};
5
+ ${e=>t.getComponentTypographyCss(e.theme,"Input",e.size,"enabled")};
6
+ min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
7
+ max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
8
+ background-color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.color,"enabled","background")};
9
+ color: ${e=>t.getColorRgbaValue(e.theme,"Input",e.isFocused?"primary":e.color,"enabled","text")};
10
10
  border: 1px solid
11
- ${e=>n.getColorRgbaValue(e.theme,"Input",e.isFocused?"primary":e.color,"enabled","border")};
12
- border-radius: ${e=>n.getBorderRadiusValueWithUnits(e.theme,"regular")};
11
+ ${e=>t.getColorRgbaValue(e.theme,"Input",e.isFocused?"primary":e.color,"enabled","border")};
12
+ border-radius: ${e=>t.getBorderRadiusValueWithUnits(e.theme,"regular")};
13
13
  padding: 0.625rem 0.75rem;
14
14
  width: 100%;
15
- ${e=>!e.disabled&&e.readOnly!==!0&&e.isFocused===!0&&n.getOutlineCss(e.theme)};
16
- /* ${e=>e.disabled===!0&&n.getDisabledBackgroundCss(e.theme)} */
17
- ${e=>e.disabled===!0&&`background-color: ${n.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
18
- color: ${o=>n.getColorRgbaValue(o.theme,"Input",o.color,"disabled","text")};`}
19
- border: 1px solid ${e=>n.getColorRgbaValue(e.theme,"Input",e.color,"disabled","border")};
20
- `,G=P.styled.div`
15
+ ${e=>!e.disabled&&e.readOnly!==!0&&e.isFocused===!0&&t.getOutlineCss(e.theme)};
16
+ /* ${e=>e.disabled===!0&&t.getDisabledBackgroundCss(e.theme)} */
17
+ ${e=>e.disabled===!0&&`background-color: ${t.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
18
+ color: ${n=>t.getColorRgbaValue(n.theme,"Input",n.color,"disabled","text")};`}
19
+ border: 1px solid ${e=>t.getColorRgbaValue(e.theme,"Input",e.color,"disabled","border")};
20
+ `,P=V.styled.div`
21
21
  ${e=>!e.disabled&&e.readOnly!==!0&&"cursor: pointer;"}
22
- min-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
23
- max-height: ${e=>n.getSizeValueWithUnits(e.theme,e.size)};
22
+ min-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
23
+ max-height: ${e=>t.getSizeValueWithUnits(e.theme,e.size)};
24
24
  display: inline-flex;
25
25
  align-items: center;
26
26
  justify-content: center;
27
27
  ${e=>e.withInput==!0&&"width: 100%;"}
28
28
  & div {
29
29
  &:focus {
30
- ${e=>e.disabled!==!0&&e.withInput!==!0&&e.readOnly!==!0&&n.getOutlineCss(e.theme)};
30
+ ${e=>e.disabled!==!0&&e.withInput!==!0&&e.readOnly!==!0&&t.getOutlineCss(e.theme)};
31
31
  }
32
32
  &:hover {
33
- ${e=>!e.disabled&&!e.withInput&&e.readOnly!==!0&&n.getOutlineCss(e.theme)};
33
+ ${e=>!e.disabled&&!e.withInput&&e.readOnly!==!0&&t.getOutlineCss(e.theme)};
34
34
  }
35
35
  ${e=>e.disabled===!0&&`opacity: ${e.theme.palette.opacity[e.theme.palette.disabled.opacity]};`}
36
36
  box-sizing: border-box;
37
- min-width: ${e=>R(e.theme,e.size)};
38
- height: ${e=>R(e.theme,e.size)};
39
- border-radius: ${e=>n.getBorderRadiusValueWithUnits(e.theme,"curved")};
37
+ min-width: ${e=>F(e.theme,e.size)};
38
+ height: ${e=>F(e.theme,e.size)};
39
+ border-radius: ${e=>t.getBorderRadiusValueWithUnits(e.theme,"curved")};
40
40
  overflow: hidden;
41
41
  & input[type="color"] {
42
42
  border: 0;
@@ -45,12 +45,12 @@
45
45
  height: 200%;
46
46
  cursor: pointer;
47
47
  transform: translate(-25%, -25%);
48
- /* ${e=>e.disabled===!0&&n.getDisabledStateCss(e.theme)}; */
49
- ${e=>e.disabled===!0&&`background-color: ${n.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
50
- color: ${o=>n.getColorRgbaValue(o.theme,"Input",o.color,"disabled","text")};`}
48
+ /* ${e=>e.disabled===!0&&t.getDisabledStateCss(e.theme)}; */
49
+ ${e=>e.disabled===!0&&`background-color: ${t.getColorRgbaValue(e.theme,"Input",e.color,"disabled","background","backgroundOpacity")};
50
+ color: ${n=>t.getColorRgbaValue(n.theme,"Input",n.color,"disabled","text")};`}
51
51
  }
52
52
  }
53
- `,J=P.styled.span`
53
+ `,G=V.styled.span`
54
54
  display: flex;
55
55
  align-items: center;
56
56
  overflow: hidden;
@@ -61,4 +61,4 @@
61
61
  background-color: transparent;
62
62
  width: 100%;
63
63
  }
64
- `,F=m.forwardRef((e,o)=>{const{id:u,name:y,defaultValue:I="#000000",value:r,size:w="small",tabIndex:p,withInput:f=!1,className:O="",style:S={},color:d="primary",debounceTime:j=0,readOnly:a,disabled:s,onChange:x=()=>{},onFocus:k=()=>{},onBlur:B=()=>{},onInput:U=()=>{},onKeyDown:q=()=>{},labelRef:W,inputProps:$,...V}=e,v=A.useTheme(),[c,C]=m.useState(r),[D,z]=m.useState(!1),E=new RegExp(/^#[0-9A-F]{6}$/i);H.useUpdateEffect(()=>C(r),[r]);const _=m.useCallback(N.debounce((l,T)=>K(l,T),j),[x]),K=(l,T)=>{x&&x(l,T)},h=l=>{r&&C(l.target.value),_(l,l.target.value)},b=l=>{z(!0),k(l)},g=l=>{E.test(c)||C(I),z(!1),B(l)};return i.jsx(G,{ref:o,theme:v,size:w,className:O,style:S,disabled:s,readOnly:a,withInput:f,...V,children:f?i.jsxs(L,{withInput:f,theme:v,color:d,size:w,disabled:s,readOnly:a,tabIndex:p,isFocused:D,children:[i.jsx("div",{children:i.jsx("input",{type:"color",ref:o,id:u,name:y,value:c,disabled:s||a,onChange:h,onBlur:g,onFocus:b,color:d,...$})}),i.jsx(J,{children:i.jsx("input",{ref:W,value:c,onChange:h,onFocus:b,onBlur:g,onInput:U,onKeyDown:q,disabled:s||a,...V})})]}):i.jsx("div",{children:r==null||r=="undefined"?i.jsx("input",{type:"color",ref:o,id:u,name:y,defaultValue:I,disabled:s||a,onChange:h,onBlur:g,onFocus:b,color:d,tabIndex:p,...$}):i.jsx("input",{type:"color",ref:o,id:u,name:y,value:c,disabled:s||a,onChange:h,onBlur:g,onFocus:b,color:d,tabIndex:p,...$})})})});F.propTypes={id:t.PropTypes.any,name:t.PropTypes.string,defaultValue:t.PropTypes.string,value:t.PropTypes.string,debounceTime:t.PropTypes.number,disabled:t.PropTypes.bool,readOnly:t.PropTypes.bool,tabIndex:t.PropTypes.number,preventDefault:t.PropTypes.bool,labelRef:t.PropTypes.any,inputProps:t.PropTypes.bool,withInput:t.PropTypes.bool,onChange:t.PropTypes.func,onBlur:t.PropTypes.func,onFocus:t.PropTypes.func,onInput:t.PropTypes.func,onKeyDown:t.PropTypes.func,className:t.PropTypes.string,style:t.PropTypes.object,size:t.PropTypes.oneOf(["small","medium","large"]),color:t.PropTypes.oneOf(["primary","secondary","success","danger","warning","information","neutral","gray"])};module.exports=F;
64
+ `,J=b.forwardRef((e,n)=>{const{id:u,name:m,defaultValue:w="#000000",value:a,size:z="small",tabIndex:y,withInput:$=!1,className:j="",style:k={},color:r="primary",debounceTime:O=0,readOnly:o,disabled:d,onChange:x=()=>{},onFocus:B=()=>{},onBlur:U=()=>{},onInput:q=()=>{},onKeyDown:W=()=>{},labelRef:E,inputProps:C,...v}=e,R=K.useTheme(),[s,f]=b.useState(a),[T,S]=b.useState(!1),_=new RegExp(/^#[0-9A-F]{6}$/i);L.useUpdateEffect(()=>f(a),[a]);const D=b.useCallback(H.debounce((i,I)=>A(i,I),O),[x]),A=(i,I)=>{x&&x(i,I)},c=i=>{a&&f(i.target.value),D(i,i.target.value)},h=i=>{S(!0),B(i)},g=i=>{_.test(s)||f(w),S(!1),U(i)};return l.jsx(P,{ref:n,theme:R,size:z,className:j,style:k,disabled:d,readOnly:o,withInput:$,...v,children:$?l.jsxs(N,{withInput:$,theme:R,color:r,size:z,disabled:d,readOnly:o,tabIndex:y,isFocused:T,children:[l.jsx("div",{children:l.jsx("input",{type:"color",ref:n,id:u,name:m,value:s,disabled:d||o,onChange:c,onBlur:g,onFocus:h,color:r,...C})}),l.jsx(G,{children:l.jsx("input",{ref:E,value:s,onChange:c,onFocus:h,onBlur:g,onInput:q,onKeyDown:W,disabled:d||o,...v})})]}):l.jsx("div",{children:a==null||a=="undefined"?l.jsx("input",{type:"color",ref:n,id:u,name:m,defaultValue:w,disabled:d||o,onChange:c,onBlur:g,onFocus:h,color:r,tabIndex:y,...C}):l.jsx("input",{type:"color",ref:n,id:u,name:m,value:s,disabled:d||o,onChange:c,onBlur:g,onFocus:h,color:r,tabIndex:y,...C})})})});module.exports=J;