@cagatayfdn/flora-components 0.0.127 → 0.0.128
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/Checkbox.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-font-weight:initial;--tw-content:"";--tw-border-style:solid;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.
|
|
1
|
+
/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-font-weight:initial;--tw-content:"";--tw-border-style:solid;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}._checkbox_1msjn_2{--tw-leading:18px;height:20px;line-height:18px;display:inline-block;position:relative}._checkbox_1msjn_2 input[type=checkbox]{left:calc(var(--spacing,.25rem)*0);z-index:2;cursor:pointer;vertical-align:middle;opacity:0;width:100%;height:100%;position:absolute}._checkbox_1msjn_2 label{margin-bottom:calc(var(--spacing,.25rem)*0);cursor:pointer;--tw-leading:22px;--tw-font-weight:var(--font-weight-normal,400);line-height:22px;font-weight:var(--font-weight-normal,400);color:var(--white);padding-left:18px}._checkbox_1msjn_2 label span{margin-left:10px}._checkbox_1msjn_2 input[type=checkbox]+label:before,._checkbox_1msjn_2 input[type=checkbox]+label:after{top:2px;left:calc(var(--spacing,.25rem)*0);cursor:pointer;vertical-align:middle;--tw-content:"";content:var(--tw-content);display:inline-block;position:absolute}._checkbox_1msjn_2 input[type=checkbox]+label:after{width:18px;height:18px;font-size:var(--font-lg);color:var(--white);border-radius:4px}._checkbox_1msjn_2 input[type=checkbox]+label:before{border-style:var(--tw-border-style);--tw-border-style:solid;border-style:solid;border-width:1px;border-color:var(--gray-ec);background-color:var(--gray-f7);border-radius:4px;width:18px;height:18px}._checkbox_1msjn_2 input[type=checkbox]:disabled{cursor:not-allowed}._checkbox_1msjn_2 input[type=checkbox]:disabled+label{opacity:.3}._checkbox_1msjn_2 input[type=checkbox]:checked+label:before{top:2px;left:calc(var(--spacing,.25rem)*0);z-index:1;border-color:var(--checkbox-checked);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:10px;background-color:var(--checkbox-checked);text-align:center;--tw-leading:17px;color:var(--gray-fd);font-size:11px;line-height:17px}._checkbox_1msjn_2 a{cursor:pointer!important;text-decoration-line:underline!important}._checkbox__filter_1msjn_2{border-style:var(--tw-border-style);--tw-border-style:solid;border-style:solid;border-width:2px;border-color:var(--dark-47);background-color:var(--dark);height:40px;padding-top:10px;padding-bottom:10px;padding-right:10px;padding-left:calc(var(--spacing,.25rem)*0);border-radius:5px;align-items:center;display:flex}._checkbox__filter_1msjn_2 label{margin-left:16px}._checkbox__filter_1msjn_2 label span{--tw-font-weight:var(--font-weight-semibold,600);font-weight:var(--font-weight-semibold,600);color:var(--white)}._checkbox__filter_1msjn_2 input{width:18px!important;height:18px!important}._checkbox__filter_1msjn_2 input+label:before{border-style:var(--tw-border-style);--tw-border-style:solid;border-style:solid;border-width:1px;border-color:var(--gray-ec);background-color:var(--gray-f7);border-radius:4px;width:18px;height:18px;margin-top:6px;margin-left:16px}._switch_1msjn_2{margin-bottom:calc(var(--spacing,.25rem)*0);min-width:43px;height:26px;display:inline-block;position:relative}._switch_1msjn_2._text-hide_1msjn_2:before,._switch_1msjn_2._text-hide_1msjn_2:after{display:none!important}._switch_1msjn_2 input{height:calc(var(--spacing,.25rem)*0);width:calc(var(--spacing,.25rem)*0);opacity:0}._slider_1msjn_2{top:calc(var(--spacing,.25rem)*0);right:calc(var(--spacing,.25rem)*0);bottom:calc(var(--spacing,.25rem)*0);left:calc(var(--spacing,.25rem)*0);cursor:pointer;transition-property:.4s;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));background-color:#78788029;position:absolute}._slider_1msjn_2:after{--tw-leading:28px;color:var(--white);--tw-content:"";content:var(--tw-content);padding-left:30px;line-height:28px}._slider_1msjn_2:before{background-color:var(--white);width:22px;height:22px;transition-property:.4s;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-content:"";content:var(--tw-content);position:absolute;bottom:2px;left:2px}input:checked+._slider_1msjn_2{background-color:var(--success)}input:checked+._slider_1msjn_2:after{--tw-content:"";content:var(--tw-content);padding-left:10px}input:checked+._slider_1msjn_2:before{--tw-translate-x:17px;translate:var(--tw-translate-x)var(--tw-translate-y)}._slider_1msjn_2._round_1msjn_2{border-radius:34px}._slider_1msjn_2._round_1msjn_2:before{--tw-shadow:0 3px 1px 0 var(--tw-shadow-color,#0000000f),0 3px 8px 0 var(--tw-shadow-color,#00000026);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-radius:3.40282e38px}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
import { j as e } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
-
import
|
|
2
|
+
import b, { useState as k, useEffect as p } from "react";
|
|
3
3
|
import { c as u } from "../../index-BHf7G3IG.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import '../../Checkbox.css';const y = "
|
|
4
|
+
import C from "../Label/Label.js";
|
|
5
|
+
import w from "../ValidationError/ValidationError.js";
|
|
6
|
+
import '../../Checkbox.css';const y = "_checkbox_1msjn_2", E = "_checkbox__filter_1msjn_2", N = "_slider_1msjn_2", R = "_round_1msjn_2", s = {
|
|
7
7
|
checkbox: y,
|
|
8
8
|
checkbox__filter: E,
|
|
9
|
-
switch: "
|
|
10
|
-
"text-hide": "_text-
|
|
9
|
+
switch: "_switch_1msjn_2",
|
|
10
|
+
"text-hide": "_text-hide_1msjn_2",
|
|
11
11
|
slider: N,
|
|
12
12
|
round: R
|
|
13
|
-
}, S =
|
|
13
|
+
}, S = b.forwardRef(
|
|
14
14
|
({
|
|
15
|
-
name:
|
|
15
|
+
name: c,
|
|
16
16
|
label: i,
|
|
17
17
|
labelAppearance: x,
|
|
18
18
|
error: n,
|
|
19
19
|
isDisabled: r = !1,
|
|
20
20
|
isInline: h,
|
|
21
|
-
checked:
|
|
21
|
+
checked: t = !1,
|
|
22
22
|
onChange: _,
|
|
23
|
-
filterInput:
|
|
23
|
+
filterInput: m,
|
|
24
24
|
wrapperClassName: f,
|
|
25
25
|
...o
|
|
26
26
|
}) => {
|
|
27
|
-
const [a, d] =
|
|
28
|
-
|
|
27
|
+
const [a, d] = k(
|
|
28
|
+
t || !!o.value
|
|
29
29
|
);
|
|
30
30
|
p(() => {
|
|
31
|
-
d(
|
|
32
|
-
}, [
|
|
33
|
-
const
|
|
31
|
+
d(t);
|
|
32
|
+
}, [t]);
|
|
33
|
+
const j = (l) => {
|
|
34
34
|
!o.readOnly && !r && (l.persist(), d(!a), _ && _(l));
|
|
35
35
|
};
|
|
36
36
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
37
37
|
/* @__PURE__ */ e.jsxs(
|
|
38
38
|
"div",
|
|
39
39
|
{
|
|
40
|
-
className: u(
|
|
41
|
-
[
|
|
42
|
-
[
|
|
40
|
+
className: u(s.checkbox, f, {
|
|
41
|
+
[s.inline]: h,
|
|
42
|
+
[s.checkbox__filter]: m
|
|
43
43
|
}),
|
|
44
44
|
"data-testid": "checkbox",
|
|
45
45
|
children: [
|
|
@@ -47,19 +47,19 @@ import '../../Checkbox.css';const y = "_checkbox_webnw_2", E = "_checkbox__filte
|
|
|
47
47
|
"input",
|
|
48
48
|
{
|
|
49
49
|
type: "checkbox",
|
|
50
|
-
name:
|
|
51
|
-
id:
|
|
50
|
+
name: c,
|
|
51
|
+
id: c,
|
|
52
52
|
disabled: r,
|
|
53
53
|
checked: a,
|
|
54
|
-
onChange:
|
|
54
|
+
onChange: j,
|
|
55
55
|
...o
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
|
-
/* @__PURE__ */ e.jsx(
|
|
58
|
+
/* @__PURE__ */ e.jsx(C, { className: s.label, name: c, appearance: x, children: i && /* @__PURE__ */ e.jsx("span", { children: i }) })
|
|
59
59
|
]
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
|
-
n && /* @__PURE__ */ e.jsx(
|
|
62
|
+
n && /* @__PURE__ */ e.jsx(w, { ...n })
|
|
63
63
|
] });
|
|
64
64
|
}
|
|
65
65
|
);
|