@cagatayfdn/flora-components 0.0.106 → 0.0.107
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 +1 -1
- package/dist/components/Checkbox/Checkbox.js +96 -92
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/Checkbox.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:icons;src:url(./icons.ttf?d7c5f4afeb19a281435835a1c99d5e42) format("truetype"),url(./icons.woff?d7c5f4afeb19a281435835a1c99d5e42) format("woff"),url(./icons.woff2?d7c5f4afeb19a281435835a1c99d5e42) format("woff2")}i[class^=icon-]:before,i[class*=" icon-"]:before{font-family:icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}._icon-
|
|
1
|
+
@font-face{font-family:icons;src:url(./icons.ttf?d7c5f4afeb19a281435835a1c99d5e42) format("truetype"),url(./icons.woff?d7c5f4afeb19a281435835a1c99d5e42) format("woff"),url(./icons.woff2?d7c5f4afeb19a281435835a1c99d5e42) format("woff2")}i[class^=icon-]:before,i[class*=" icon-"]:before{font-family:icons!important;font-style:normal;font-weight:400!important;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}._icon-applications_1jok7_16:before{content:""}._icon-attach_1jok7_20:before{content:""}._icon-attachment_1jok7_24:before{content:""}._icon-billing_1jok7_28:before{content:""}._icon-box_1jok7_32:before{content:""}._icon-calendar_1jok7_36:before{content:""}._icon-cart_1jok7_40:before{content:""}._icon-certificate_1jok7_44:before{content:""}._icon-check_1jok7_48:before{content:""}._icon-chevron-left_1jok7_52:before{content:""}._icon-chevron-right_1jok7_56:before{content:""}._icon-circle-minus_1jok7_60:before{content:""}._icon-circle-plus_1jok7_64:before{content:""}._icon-clock_1jok7_68:before{content:""}._icon-close_1jok7_72:before{content:""}._icon-copy_1jok7_76:before{content:""}._icon-credit-card_1jok7_80:before{content:""}._icon-document_1jok7_84:before{content:""}._icon-domain-registration_1jok7_88:before{content:""}._icon-domains_1jok7_92:before{content:""}._icon-down-arrow_1jok7_96:before{content:""}._icon-down-square_1jok7_100:before{content:""}._icon-down_1jok7_96:before{content:""}._icon-download_1jok7_108:before{content:""}._icon-edit-outline_1jok7_112:before{content:""}._icon-edit_1jok7_112:before{content:""}._icon-email_1jok7_120:before{content:""}._icon-environment_1jok7_124:before{content:""}._icon-error-fill_1jok7_128:before{content:""}._icon-error_1jok7_128:before{content:""}._icon-fileTextOutlined_1jok7_136:before{content:""}._icon-info_1jok7_140:before{content:""}._icon-install_1jok7_144:before{content:""}._icon-link_1jok7_148:before{content:""}._icon-log_1jok7_152:before{content:""}._icon-menu-close_1jok7_156:before{content:""}._icon-menu-open_1jok7_160:before{content:""}._icon-monitoring_1jok7_164:before{content:""}._icon-network_1jok7_168:before{content:""}._icon-no-results_1jok7_172:before{content:""}._icon-not-edit_1jok7_176:before{content:""}._icon-out_1jok7_180:before{content:""}._icon-path_1jok7_184:before{content:""}._icon-plus_1jok7_188:before{content:""}._icon-preview_1jok7_192:before{content:""}._icon-profile_1jok7_196:before{content:""}._icon-project-list_1jok7_200:before{content:""}._icon-projects_1jok7_204:before{content:""}._icon-reload_1jok7_208:before{content:""}._icon-retry_1jok7_212:before{content:""}._icon-search_1jok7_216:before{content:""}._icon-settings_1jok7_220:before{content:""}._icon-support_1jok7_224:before{content:""}._icon-trash_1jok7_228:before{content:""}._icon-users_1jok7_232:before{content:""}._icon-warning_1jok7_236:before{content:""}._checkbox_1jok7_240{line-height:18px;position:relative;height:20px;display:inline-block}._checkbox_1jok7_240 input[type=checkbox]{vertical-align:middle;left:0;position:absolute;z-index:2;width:100%;height:100%;cursor:pointer;opacity:0}._checkbox_1jok7_240 label{padding-left:18px;line-height:22px;font-weight:400;cursor:pointer;color:#fff;margin-bottom:0}._checkbox_1jok7_240 label span{margin-left:10px}._checkbox_1jok7_240 input[type=checkbox]+label:before,._checkbox_1jok7_240 input[type=checkbox]+label:after{content:"";font-family:icons;display:inline-block;vertical-align:middle;position:absolute;top:2px;left:0;cursor:pointer}._checkbox_1jok7_240 input[type=checkbox]+label:after{color:#fff;font-size:18px;width:18px;height:18px;border-radius:4px}._checkbox_1jok7_240 input[type=checkbox]+label:before{height:18px;width:18px;background-color:#e9f0f7;border:solid 1px #c8daec;border-radius:4px}._checkbox_1jok7_240 input[type=checkbox]:disabled{cursor:not-allowed}._checkbox_1jok7_240 input[type=checkbox]:disabled+label{opacity:.3}._checkbox_1jok7_240 input[type=checkbox]:checked+label:before{content:"";text-align:center;top:2px;left:0;z-index:1;background-color:#6c7ebe;border-color:#6c7ebe;color:#fdfdfd;font-size:11px;line-height:17px}._checkbox_1jok7_240 a{text-decoration:underline!important;cursor:pointer!important}._checkbox__filter_1jok7_314{background-color:#2b344c;color:#fff;border:2px solid #262e47;border-radius:5px;padding:10px 0;display:flex;align-items:center}._checkbox__filter_1jok7_314 label{margin-left:16px}._checkbox__filter_1jok7_314 input{width:18px!important;height:18px!important}._checkbox__filter_1jok7_314 input+label:before{margin-top:8px;margin-left:16px;height:18px;width:18px;background-color:#e9f0f7;border:solid 1px #c8daec;border-radius:4px}._switch_1jok7_340{position:relative;display:inline-block;min-width:43px;height:26px;margin-bottom:0}._switch_1jok7_340._text-hide_1jok7_347:before,._switch_1jok7_340._text-hide_1jok7_347:after{display:none!important}._switch_1jok7_340 input{opacity:0;width:0;height:0}._slider_1jok7_357{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#78788029;-webkit-transition:.4s;transition:.4s}._slider_1jok7_357:after{content:"";color:#fff;line-height:28px;padding-left:30px}._slider_1jok7_357:before{position:absolute;content:"";height:22px;width:22px;left:2px;bottom:2px;background-color:#fff;-webkit-transition:.4s;transition:.4s}input:checked+._slider_1jok7_357{background-color:#71d200}input:checked+._slider_1jok7_357:after{content:"";padding-left:10px}input:checked+._slider_1jok7_357:before{-webkit-transform:translateX(17px);-moz-transform:translateX(17px);-ms-transform:translateX(17px);-o-transform:translateX(17px);transform-origin:center center}._slider_1jok7_357._round_1jok7_404{border-radius:34px}._slider_1jok7_357._round_1jok7_404:before{border-radius:50%;box-shadow:0 3px 1px #0000000f,0 3px 8px #00000026}
|
|
@@ -1,120 +1,124 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { c as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import '../../Checkbox.css';const
|
|
7
|
-
"icon-applications": "_icon-
|
|
8
|
-
"icon-attach": "_icon-
|
|
9
|
-
"icon-attachment": "_icon-
|
|
10
|
-
"icon-billing": "_icon-
|
|
11
|
-
"icon-box": "_icon-
|
|
12
|
-
"icon-calendar": "_icon-
|
|
13
|
-
"icon-cart": "_icon-
|
|
14
|
-
"icon-certificate": "_icon-
|
|
15
|
-
"icon-check": "_icon-
|
|
16
|
-
"icon-chevron-left": "_icon-chevron-
|
|
17
|
-
"icon-chevron-right": "_icon-chevron-
|
|
18
|
-
"icon-circle-minus": "_icon-circle-
|
|
19
|
-
"icon-circle-plus": "_icon-circle-
|
|
20
|
-
"icon-clock": "_icon-
|
|
21
|
-
"icon-close": "_icon-
|
|
22
|
-
"icon-copy": "_icon-
|
|
23
|
-
"icon-credit-card": "_icon-credit-
|
|
24
|
-
"icon-document": "_icon-
|
|
25
|
-
"icon-domain-registration": "_icon-domain-
|
|
26
|
-
"icon-domains": "_icon-
|
|
27
|
-
"icon-down-arrow": "_icon-down-
|
|
28
|
-
"icon-down-square": "_icon-down-
|
|
29
|
-
"icon-down": "_icon-
|
|
30
|
-
"icon-download": "_icon-
|
|
31
|
-
"icon-edit-outline": "_icon-edit-
|
|
32
|
-
"icon-edit": "_icon-
|
|
33
|
-
"icon-email": "_icon-
|
|
34
|
-
"icon-environment": "_icon-
|
|
35
|
-
"icon-error-fill": "_icon-error-
|
|
36
|
-
"icon-error": "_icon-
|
|
37
|
-
"icon-fileTextOutlined": "_icon-
|
|
38
|
-
"icon-info": "_icon-
|
|
39
|
-
"icon-install": "_icon-
|
|
40
|
-
"icon-link": "_icon-
|
|
41
|
-
"icon-log": "_icon-
|
|
42
|
-
"icon-menu-close": "_icon-menu-
|
|
43
|
-
"icon-menu-open": "_icon-menu-
|
|
44
|
-
"icon-monitoring": "_icon-
|
|
45
|
-
"icon-network": "_icon-
|
|
46
|
-
"icon-no-results": "_icon-no-
|
|
47
|
-
"icon-not-edit": "_icon-not-
|
|
48
|
-
"icon-out": "_icon-
|
|
49
|
-
"icon-path": "_icon-
|
|
50
|
-
"icon-plus": "_icon-
|
|
51
|
-
"icon-preview": "_icon-
|
|
52
|
-
"icon-profile": "_icon-
|
|
53
|
-
"icon-project-list": "_icon-project-
|
|
54
|
-
"icon-projects": "_icon-
|
|
55
|
-
"icon-reload": "_icon-
|
|
56
|
-
"icon-retry": "_icon-
|
|
57
|
-
"icon-search": "_icon-
|
|
58
|
-
"icon-settings": "_icon-
|
|
59
|
-
"icon-support": "_icon-
|
|
60
|
-
"icon-trash": "_icon-
|
|
61
|
-
"icon-users": "_icon-
|
|
62
|
-
"icon-warning": "_icon-
|
|
63
|
-
checkbox:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
import { j as o } from "../../jsx-runtime-BcAkpsdy.js";
|
|
2
|
+
import m, { useState as f, useEffect as x } from "react";
|
|
3
|
+
import { c as w } from "../../index-BHf7G3IG.js";
|
|
4
|
+
import b from "../Label/Label.js";
|
|
5
|
+
import g from "../ValidationError/ValidationError.js";
|
|
6
|
+
import '../../Checkbox.css';const v = "_checkbox_1jok7_240", y = "_checkbox__filter_1jok7_314", C = "_slider_1jok7_357", E = "_round_1jok7_404", i = {
|
|
7
|
+
"icon-applications": "_icon-applications_1jok7_16",
|
|
8
|
+
"icon-attach": "_icon-attach_1jok7_20",
|
|
9
|
+
"icon-attachment": "_icon-attachment_1jok7_24",
|
|
10
|
+
"icon-billing": "_icon-billing_1jok7_28",
|
|
11
|
+
"icon-box": "_icon-box_1jok7_32",
|
|
12
|
+
"icon-calendar": "_icon-calendar_1jok7_36",
|
|
13
|
+
"icon-cart": "_icon-cart_1jok7_40",
|
|
14
|
+
"icon-certificate": "_icon-certificate_1jok7_44",
|
|
15
|
+
"icon-check": "_icon-check_1jok7_48",
|
|
16
|
+
"icon-chevron-left": "_icon-chevron-left_1jok7_52",
|
|
17
|
+
"icon-chevron-right": "_icon-chevron-right_1jok7_56",
|
|
18
|
+
"icon-circle-minus": "_icon-circle-minus_1jok7_60",
|
|
19
|
+
"icon-circle-plus": "_icon-circle-plus_1jok7_64",
|
|
20
|
+
"icon-clock": "_icon-clock_1jok7_68",
|
|
21
|
+
"icon-close": "_icon-close_1jok7_72",
|
|
22
|
+
"icon-copy": "_icon-copy_1jok7_76",
|
|
23
|
+
"icon-credit-card": "_icon-credit-card_1jok7_80",
|
|
24
|
+
"icon-document": "_icon-document_1jok7_84",
|
|
25
|
+
"icon-domain-registration": "_icon-domain-registration_1jok7_88",
|
|
26
|
+
"icon-domains": "_icon-domains_1jok7_92",
|
|
27
|
+
"icon-down-arrow": "_icon-down-arrow_1jok7_96",
|
|
28
|
+
"icon-down-square": "_icon-down-square_1jok7_100",
|
|
29
|
+
"icon-down": "_icon-down_1jok7_96",
|
|
30
|
+
"icon-download": "_icon-download_1jok7_108",
|
|
31
|
+
"icon-edit-outline": "_icon-edit-outline_1jok7_112",
|
|
32
|
+
"icon-edit": "_icon-edit_1jok7_112",
|
|
33
|
+
"icon-email": "_icon-email_1jok7_120",
|
|
34
|
+
"icon-environment": "_icon-environment_1jok7_124",
|
|
35
|
+
"icon-error-fill": "_icon-error-fill_1jok7_128",
|
|
36
|
+
"icon-error": "_icon-error_1jok7_128",
|
|
37
|
+
"icon-fileTextOutlined": "_icon-fileTextOutlined_1jok7_136",
|
|
38
|
+
"icon-info": "_icon-info_1jok7_140",
|
|
39
|
+
"icon-install": "_icon-install_1jok7_144",
|
|
40
|
+
"icon-link": "_icon-link_1jok7_148",
|
|
41
|
+
"icon-log": "_icon-log_1jok7_152",
|
|
42
|
+
"icon-menu-close": "_icon-menu-close_1jok7_156",
|
|
43
|
+
"icon-menu-open": "_icon-menu-open_1jok7_160",
|
|
44
|
+
"icon-monitoring": "_icon-monitoring_1jok7_164",
|
|
45
|
+
"icon-network": "_icon-network_1jok7_168",
|
|
46
|
+
"icon-no-results": "_icon-no-results_1jok7_172",
|
|
47
|
+
"icon-not-edit": "_icon-not-edit_1jok7_176",
|
|
48
|
+
"icon-out": "_icon-out_1jok7_180",
|
|
49
|
+
"icon-path": "_icon-path_1jok7_184",
|
|
50
|
+
"icon-plus": "_icon-plus_1jok7_188",
|
|
51
|
+
"icon-preview": "_icon-preview_1jok7_192",
|
|
52
|
+
"icon-profile": "_icon-profile_1jok7_196",
|
|
53
|
+
"icon-project-list": "_icon-project-list_1jok7_200",
|
|
54
|
+
"icon-projects": "_icon-projects_1jok7_204",
|
|
55
|
+
"icon-reload": "_icon-reload_1jok7_208",
|
|
56
|
+
"icon-retry": "_icon-retry_1jok7_212",
|
|
57
|
+
"icon-search": "_icon-search_1jok7_216",
|
|
58
|
+
"icon-settings": "_icon-settings_1jok7_220",
|
|
59
|
+
"icon-support": "_icon-support_1jok7_224",
|
|
60
|
+
"icon-trash": "_icon-trash_1jok7_228",
|
|
61
|
+
"icon-users": "_icon-users_1jok7_232",
|
|
62
|
+
"icon-warning": "_icon-warning_1jok7_236",
|
|
63
|
+
checkbox: v,
|
|
64
|
+
checkbox__filter: y,
|
|
65
|
+
switch: "_switch_1jok7_340",
|
|
66
|
+
"text-hide": "_text-hide_1jok7_347",
|
|
67
|
+
slider: C,
|
|
68
|
+
round: E
|
|
69
|
+
}, F = m.forwardRef(
|
|
69
70
|
({
|
|
70
|
-
name:
|
|
71
|
+
name: c,
|
|
71
72
|
label: e,
|
|
72
73
|
labelAppearance: j,
|
|
73
74
|
error: t,
|
|
74
75
|
isDisabled: r = !1,
|
|
75
|
-
isInline:
|
|
76
|
-
checked:
|
|
77
|
-
onChange:
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
isInline: d,
|
|
77
|
+
checked: n = !1,
|
|
78
|
+
onChange: k,
|
|
79
|
+
filterInput: h,
|
|
80
|
+
wrapperClassName: p,
|
|
81
|
+
..._
|
|
80
82
|
}) => {
|
|
81
|
-
const [s,
|
|
82
|
-
|
|
83
|
+
const [s, l] = f(
|
|
84
|
+
n || !!_.value
|
|
83
85
|
);
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
const
|
|
88
|
-
!
|
|
86
|
+
x(() => {
|
|
87
|
+
l(n);
|
|
88
|
+
}, [n]);
|
|
89
|
+
const u = (a) => {
|
|
90
|
+
!_.readOnly && !r && (a.persist(), l(!s), k && k(a));
|
|
89
91
|
};
|
|
90
|
-
return /* @__PURE__ */
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
+
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
93
|
+
/* @__PURE__ */ o.jsxs(
|
|
92
94
|
"div",
|
|
93
95
|
{
|
|
94
|
-
className:
|
|
95
|
-
[
|
|
96
|
+
className: w(i.checkbox, p, {
|
|
97
|
+
[i.inline]: d,
|
|
98
|
+
[i.checkbox__filter]: h
|
|
96
99
|
}),
|
|
97
100
|
"data-testid": "checkbox",
|
|
98
101
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
102
|
+
/* @__PURE__ */ o.jsx(
|
|
100
103
|
"input",
|
|
101
104
|
{
|
|
102
105
|
type: "checkbox",
|
|
103
|
-
name:
|
|
106
|
+
name: c,
|
|
107
|
+
id: c,
|
|
104
108
|
disabled: r,
|
|
105
109
|
checked: s,
|
|
106
|
-
onChange:
|
|
107
|
-
...
|
|
110
|
+
onChange: u,
|
|
111
|
+
..._
|
|
108
112
|
}
|
|
109
113
|
),
|
|
110
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ o.jsx(b, { className: i.label, name: c, appearance: j, children: e && /* @__PURE__ */ o.jsx("span", { children: e }) })
|
|
111
115
|
]
|
|
112
116
|
}
|
|
113
117
|
),
|
|
114
|
-
t && /* @__PURE__ */
|
|
118
|
+
t && /* @__PURE__ */ o.jsx(g, { ...t })
|
|
115
119
|
] });
|
|
116
120
|
}
|
|
117
121
|
);
|
|
118
122
|
export {
|
|
119
|
-
|
|
123
|
+
F as default
|
|
120
124
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -248,6 +248,7 @@ export declare const Checkbox: React_2.ForwardRefExoticComponent<{
|
|
|
248
248
|
wrapperClassName?: string | undefined;
|
|
249
249
|
checked?: boolean | undefined;
|
|
250
250
|
isInline?: boolean | undefined;
|
|
251
|
+
filterInput?: boolean | undefined;
|
|
251
252
|
} & FormElementProps & Pick<EventProps<HTMLInputElement>, "onClick" | "onChange" | "onFocus"> & React_2.RefAttributes<HTMLInputElement>>;
|
|
252
253
|
|
|
253
254
|
export declare type CheckboxProps = {
|
|
@@ -258,6 +259,7 @@ export declare type CheckboxProps = {
|
|
|
258
259
|
wrapperClassName?: string;
|
|
259
260
|
checked?: boolean;
|
|
260
261
|
isInline?: boolean;
|
|
262
|
+
filterInput?: boolean;
|
|
261
263
|
} & FormElementProps & Pick<EventProps<HTMLInputElement>, 'onChange' | 'onFocus' | 'onClick'>;
|
|
262
264
|
|
|
263
265
|
export declare const CLIENT_DATE_AND_TIME_FORMAT = "DD MMMM YYYY HH:mm";
|
package/dist/index.d.ts
CHANGED
|
@@ -248,6 +248,7 @@ export declare const Checkbox: React_2.ForwardRefExoticComponent<{
|
|
|
248
248
|
wrapperClassName?: string | undefined;
|
|
249
249
|
checked?: boolean | undefined;
|
|
250
250
|
isInline?: boolean | undefined;
|
|
251
|
+
filterInput?: boolean | undefined;
|
|
251
252
|
} & FormElementProps & Pick<EventProps<HTMLInputElement>, "onClick" | "onChange" | "onFocus"> & React_2.RefAttributes<HTMLInputElement>>;
|
|
252
253
|
|
|
253
254
|
export declare type CheckboxProps = {
|
|
@@ -258,6 +259,7 @@ export declare type CheckboxProps = {
|
|
|
258
259
|
wrapperClassName?: string;
|
|
259
260
|
checked?: boolean;
|
|
260
261
|
isInline?: boolean;
|
|
262
|
+
filterInput?: boolean;
|
|
261
263
|
} & FormElementProps & Pick<EventProps<HTMLInputElement>, 'onChange' | 'onFocus' | 'onClick'>;
|
|
262
264
|
|
|
263
265
|
export declare const CLIENT_DATE_AND_TIME_FORMAT = "DD MMMM YYYY HH:mm";
|