@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.
- package/dist/BlogCardsSponsoredSection.cjs +5 -3
- package/dist/BlogCardsSponsoredSection.js +68 -64
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +1 -1
- package/dist/BlogListSection.cjs +8 -6
- package/dist/BlogListSection.js +122 -114
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +1 -1
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +1 -1
- package/dist/BlogSingleSection.cjs +1 -1
- package/dist/BlogSingleSection.js +1 -1
- package/dist/BlogsSectionDetailed.cjs +5 -3
- package/dist/BlogsSectionDetailed.js +53 -49
- package/dist/BlogsSectionLarge.cjs +2 -2
- package/dist/BlogsSectionLarge.js +2 -2
- package/dist/BlogsSectionSimple.cjs +9 -7
- package/dist/BlogsSectionSimple.js +53 -47
- package/dist/BlogsSectionSimpleCentered.cjs +7 -5
- package/dist/BlogsSectionSimpleCentered.js +31 -26
- package/dist/BlogsSectionWithFilters.cjs +9 -7
- package/dist/BlogsSectionWithFilters.js +47 -42
- package/dist/BrandHitsSection.cjs +9 -7
- package/dist/BrandHitsSection.js +40 -35
- package/dist/{CategorySimpleCard-BNYjZQTH.cjs → CategorySimpleCard-D5N8cx0Z.cjs} +4 -3
- package/dist/{CategorySimpleCard-BA0S7TaN.js → CategorySimpleCard-DRQuoxXu.js} +17 -15
- package/dist/CheckBoxInput.cjs +27 -27
- package/dist/CheckBoxInput.js +61 -98
- package/dist/ColorInput.cjs +26 -26
- package/dist/ColorInput.js +127 -162
- package/dist/DetailedProductsInfinitiveSection.cjs +2 -2
- package/dist/DetailedProductsInfinitiveSection.js +6 -5
- package/dist/DetailedProductsSection.cjs +2 -2
- package/dist/DetailedProductsSection.js +12 -10
- package/dist/FieldOfInterestsMasonrySection.cjs +5 -3
- package/dist/FieldOfInterestsMasonrySection.js +90 -85
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +4 -4
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +49 -46
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +8 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +44 -40
- package/dist/GeneralWithTagsCardsSection.cjs +12 -8
- package/dist/GeneralWithTagsCardsSection.js +50 -44
- package/dist/GiftCardsSection.cjs +7 -5
- package/dist/GiftCardsSection.js +46 -40
- package/dist/MasonryGeneralCardsSection.cjs +6 -5
- package/dist/MasonryGeneralCardsSection.js +26 -23
- package/dist/Modal.cjs +14 -13
- package/dist/Modal.js +88 -86
- package/dist/OverlayGeneralCardsSection.cjs +7 -5
- package/dist/OverlayGeneralCardsSection.js +30 -35
- package/dist/ProductsWithBannerSection.cjs +8 -6
- package/dist/ProductsWithBannerSection.js +71 -77
- package/dist/QuattroCardsSection.cjs +8 -6
- package/dist/QuattroCardsSection.js +31 -28
- package/dist/ReviewsSection.cjs +11 -9
- package/dist/ReviewsSection.js +38 -36
- package/dist/SalesCampaignsSection.cjs +22 -19
- package/dist/SalesCampaignsSection.js +299 -300
- package/dist/ShopCardsSection.cjs +1 -1
- package/dist/ShopCardsSection.js +1 -1
- package/dist/SimpleCategoriesSection.cjs +2 -2
- package/dist/SimpleCategoriesSection.js +7 -3
- package/dist/SimpleProductsSection.cjs +5 -5
- package/dist/SimpleProductsSection.js +62 -72
- package/dist/UrgentSaleProductsSection.cjs +6 -6
- package/dist/UrgentSaleProductsSection.js +9 -7
- package/dist/{index-DoKMLSVY.cjs → index-0p_3g3pT.cjs} +4 -2
- package/dist/{index-Bhfq_YpE.js → index-BipuzfLW.js} +28 -25
- package/dist/{index-CaAhRJ2-.cjs → index-Bmr3IeZ_.cjs} +12 -11
- package/dist/{index-DWLKvVyZ.js → index-C8QkdNHi.js} +27 -23
- package/dist/{index-B8I1mHMA.js → index-CA59z2ge.js} +29 -26
- package/dist/{index-BnYqZk-h.cjs → index-DHV9awrE.cjs} +4 -2
- package/dist/{index-DxZ71UZ1.js → index-DZ8515cZ.js} +144 -137
- package/dist/{index-D55MR8tU.cjs → index-MiN854X_.cjs} +6 -4
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { s as
|
|
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
|
|
6
|
-
const
|
|
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: ${
|
|
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
|
-
`,
|
|
53
|
-
const {
|
|
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__ */
|
|
56
|
-
|
|
56
|
+
return /* @__PURE__ */ h(
|
|
57
|
+
x,
|
|
57
58
|
{
|
|
58
|
-
ref:
|
|
59
|
+
ref: o,
|
|
59
60
|
className: "simple-category-card",
|
|
60
|
-
onClick: () =>
|
|
61
|
+
onClick: () => s(c),
|
|
62
|
+
href: `${m}${d}${n}`,
|
|
61
63
|
children: [
|
|
62
|
-
/* @__PURE__ */ r("img", { src:
|
|
63
|
-
/* @__PURE__ */ r("div", { className: "card-content", children: /* @__PURE__ */ r("div", { className: "card-content-2", children:
|
|
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
|
-
|
|
71
|
+
y as C
|
|
70
72
|
};
|
package/dist/CheckBoxInput.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";const
|
|
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=>
|
|
8
|
-
max-height: ${e=>
|
|
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=>
|
|
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=>
|
|
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=>
|
|
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=>
|
|
52
|
+
color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"enabled","text")};
|
|
53
53
|
border: 1px solid
|
|
54
|
-
${e=>
|
|
55
|
-
border-radius: ${e=>
|
|
56
|
-
${e=>e.disabled===!0&&`background-color: ${
|
|
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=>
|
|
69
|
+
background-color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","background","backgroundOpacity")};
|
|
70
70
|
border: 1px solid
|
|
71
|
-
${e=>
|
|
71
|
+
${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","border")};
|
|
72
72
|
& .checked {
|
|
73
|
-
height: ${e=>
|
|
74
|
-
width: ${e=>
|
|
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=>
|
|
83
|
-
max-width: ${e=>
|
|
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=>
|
|
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=>
|
|
94
|
+
background-color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"active","background","backgroundOpacity")};
|
|
95
95
|
& .indeterminate {
|
|
96
|
-
height: ${e=>
|
|
97
|
-
width: ${e=>
|
|
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=>
|
|
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: ${
|
|
106
|
-
border-color: ${
|
|
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=>
|
|
110
|
+
color: ${e=>t.getColorRgbaValue(e.theme,"Checkbox",e.color,"disabled","text")};
|
|
111
111
|
}
|
|
112
112
|
& input:focus ~ .checkmark {
|
|
113
|
-
${e=>
|
|
113
|
+
${e=>t.getOutlineCss(e.theme)};
|
|
114
114
|
}
|
|
115
115
|
& input:active ~ .checkmark {
|
|
116
|
-
${e=>
|
|
116
|
+
${e=>t.getOutlineCss(e.theme)};
|
|
117
117
|
}
|
|
118
|
-
`,
|
|
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;
|
package/dist/CheckBoxInput.js
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
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
|
|
6
|
-
import { u as
|
|
7
|
-
const
|
|
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) =>
|
|
14
|
-
max-height: ${(e) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
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: ${
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
117
|
-
width: ${(e) =>
|
|
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) =>
|
|
126
|
-
max-width: ${(e) =>
|
|
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) =>
|
|
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) =>
|
|
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) =>
|
|
153
|
-
width: ${(e) =>
|
|
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) =>
|
|
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: ${
|
|
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: ${
|
|
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) =>
|
|
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
|
-
`,
|
|
197
|
+
`, E = I((e, h) => {
|
|
199
198
|
const {
|
|
200
|
-
containerRef:
|
|
201
|
-
id:
|
|
199
|
+
containerRef: g,
|
|
200
|
+
id: P,
|
|
202
201
|
indeterminate: V,
|
|
203
202
|
disabled: b,
|
|
204
|
-
readOnly:
|
|
205
|
-
label:
|
|
206
|
-
labelPosition:
|
|
203
|
+
readOnly: l,
|
|
204
|
+
label: r,
|
|
205
|
+
labelPosition: m = "right",
|
|
207
206
|
spaceBetween: w,
|
|
208
|
-
customCheckmark:
|
|
207
|
+
customCheckmark: d,
|
|
209
208
|
//----------------
|
|
210
|
-
onChange:
|
|
209
|
+
onChange: s,
|
|
211
210
|
onFocus: c,
|
|
212
|
-
onBlur:
|
|
211
|
+
onBlur: a,
|
|
213
212
|
onClick: $,
|
|
214
213
|
//----------------
|
|
215
|
-
color:
|
|
216
|
-
size:
|
|
214
|
+
color: f = "primary",
|
|
215
|
+
size: C = "small",
|
|
217
216
|
className: v = "",
|
|
218
217
|
style: z = {},
|
|
219
|
-
children:
|
|
220
|
-
...
|
|
218
|
+
children: p,
|
|
219
|
+
...y
|
|
221
220
|
} = e;
|
|
222
|
-
var
|
|
223
|
-
return /* @__PURE__ */
|
|
224
|
-
|
|
221
|
+
var O = { theme: R(), size: C, color: f, disabled: b, readOnly: l };
|
|
222
|
+
return /* @__PURE__ */ u(
|
|
223
|
+
F,
|
|
225
224
|
{
|
|
226
|
-
ref:
|
|
227
|
-
direction:
|
|
225
|
+
ref: g,
|
|
226
|
+
direction: m,
|
|
228
227
|
className: v,
|
|
229
228
|
style: z,
|
|
230
|
-
label:
|
|
231
|
-
labelPosition:
|
|
229
|
+
label: r,
|
|
230
|
+
labelPosition: m,
|
|
232
231
|
spaceBetween: w,
|
|
233
232
|
tabIndex: -1,
|
|
234
|
-
readOnly:
|
|
233
|
+
readOnly: l,
|
|
235
234
|
onClick: $,
|
|
236
|
-
...
|
|
235
|
+
...O,
|
|
237
236
|
children: [
|
|
238
237
|
/* @__PURE__ */ i(
|
|
239
238
|
"input",
|
|
240
239
|
{
|
|
241
|
-
ref:
|
|
240
|
+
ref: h,
|
|
242
241
|
type: "checkbox",
|
|
243
|
-
onBlur: (
|
|
244
|
-
|
|
242
|
+
onBlur: (o) => {
|
|
243
|
+
a && (a == null || a(o));
|
|
245
244
|
},
|
|
246
|
-
onFocus: (
|
|
247
|
-
c && (c == null || c(
|
|
245
|
+
onFocus: (o) => {
|
|
246
|
+
c && (c == null || c(o));
|
|
248
247
|
},
|
|
249
|
-
disabled: b ||
|
|
250
|
-
onChange: (
|
|
251
|
-
...
|
|
248
|
+
disabled: b || l,
|
|
249
|
+
onChange: (o) => s == null ? void 0 : s(o),
|
|
250
|
+
...y
|
|
252
251
|
}
|
|
253
252
|
),
|
|
254
|
-
/* @__PURE__ */
|
|
255
|
-
!
|
|
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:
|
|
297
|
+
title: r
|
|
299
298
|
}
|
|
300
299
|
)
|
|
301
300
|
}
|
|
302
301
|
),
|
|
303
|
-
|
|
302
|
+
d && /* @__PURE__ */ i(B, { children: d })
|
|
304
303
|
] }),
|
|
305
|
-
|
|
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
|
-
|
|
310
|
+
E as default
|
|
348
311
|
};
|
package/dist/ColorInput.cjs
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
"use strict";const
|
|
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=>
|
|
6
|
-
min-height: ${e=>
|
|
7
|
-
max-height: ${e=>
|
|
8
|
-
background-color: ${e=>
|
|
9
|
-
color: ${e=>
|
|
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=>
|
|
12
|
-
border-radius: ${e=>
|
|
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&&
|
|
16
|
-
/* ${e=>e.disabled===!0&&
|
|
17
|
-
${e=>e.disabled===!0&&`background-color: ${
|
|
18
|
-
color: ${
|
|
19
|
-
border: 1px solid ${e=>
|
|
20
|
-
`,
|
|
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=>
|
|
23
|
-
max-height: ${e=>
|
|
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&&
|
|
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&&
|
|
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=>
|
|
38
|
-
height: ${e=>
|
|
39
|
-
border-radius: ${e=>
|
|
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&&
|
|
49
|
-
${e=>e.disabled===!0&&`background-color: ${
|
|
50
|
-
color: ${
|
|
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
|
-
`,
|
|
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
|
-
`,
|
|
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;
|