@phillips/seldon 1.42.0 → 1.43.0
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/components/Accordion/AccordionItem.d.ts +1 -5
- package/dist/components/Accordion/AccordionItem.js +85 -75
- package/dist/components/Accordion/types.d.ts +0 -3
- package/dist/components/Accordion/utils.d.ts +8 -0
- package/dist/components/Accordion/utils.js +10 -6
- package/dist/components/ViewingsList/ViewingsListCard.js +38 -38
- package/dist/scss/_vars.scss +1 -1
- package/dist/scss/components/Accordion/_accordion.scss +21 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +9 -9
- package/package.json +1 -1
|
@@ -24,10 +24,6 @@ export interface AccordionItemProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
24
24
|
* When true applied the transition keyframe animation on item expand. Default as false.
|
|
25
25
|
*/
|
|
26
26
|
hasTransition?: boolean;
|
|
27
|
-
/**
|
|
28
|
-
* When true, isCollapsed won't be toggled.
|
|
29
|
-
*/
|
|
30
|
-
isControlled?: boolean;
|
|
31
27
|
}
|
|
32
|
-
declare const AccordionItem: ({ isLocked, variation, label, isLastItem, hasTransition, children,
|
|
28
|
+
declare const AccordionItem: ({ isLocked, variation, label, isLastItem, hasTransition, children, ...props }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
29
|
export default AccordionItem;
|
|
@@ -1,101 +1,111 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import v from "../../assets/lock.svg.js";
|
|
1
|
+
import { jsxs as g, jsx as o, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as $ } from "../../utils/index.js";
|
|
3
|
+
import f from "../../assets/plus.svg.js";
|
|
4
|
+
import h from "../../assets/minus.svg.js";
|
|
5
|
+
import _ from "../../assets/lock.svg.js";
|
|
7
6
|
import d from "../../node_modules/classnames/index.js";
|
|
8
|
-
import { Item as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
import { Item as p, Trigger as C, Content as v } from "../../node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
8
|
+
import { getIconClasses as u } from "./utils.js";
|
|
9
|
+
const x = ({
|
|
10
|
+
children: n,
|
|
11
|
+
className: m,
|
|
12
12
|
baseClassName: t,
|
|
13
|
-
disable:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
isLargeVariation: s,
|
|
17
|
-
id: c
|
|
13
|
+
disable: s,
|
|
14
|
+
isLargeVariation: c,
|
|
15
|
+
id: e
|
|
18
16
|
}) => {
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
N,
|
|
17
|
+
const r = s, l = /* @__PURE__ */ o(
|
|
18
|
+
"img",
|
|
22
19
|
{
|
|
23
|
-
|
|
20
|
+
className: u(t, c, "lock"),
|
|
21
|
+
src: _,
|
|
22
|
+
"data-testid": `${e}-lockedIcon`,
|
|
23
|
+
"aria-hidden": !0
|
|
24
|
+
}
|
|
25
|
+
), a = /* @__PURE__ */ o(
|
|
26
|
+
"img",
|
|
27
|
+
{
|
|
28
|
+
className: u(t, c, "plus"),
|
|
29
|
+
src: f,
|
|
30
|
+
"data-testid": `${e}-plusIcon`,
|
|
31
|
+
"aria-hidden": !0
|
|
32
|
+
}
|
|
33
|
+
), i = /* @__PURE__ */ o(
|
|
34
|
+
"img",
|
|
35
|
+
{
|
|
36
|
+
className: u(t, c, "minus"),
|
|
37
|
+
src: h,
|
|
38
|
+
"data-testid": `${e}-minusIcon`,
|
|
39
|
+
"aria-hidden": !0
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
return /* @__PURE__ */ o(
|
|
43
|
+
C,
|
|
44
|
+
{
|
|
45
|
+
"data-disabled": s,
|
|
24
46
|
asChild: !0,
|
|
25
|
-
className: d(t, { [`${t}--hoverable`]: !
|
|
26
|
-
children: /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
className: d(`${t}__icon`, { [`${t}__icon--lg`]: s }),
|
|
32
|
-
src: g,
|
|
33
|
-
"data-testid": $,
|
|
34
|
-
"aria-hidden": !0
|
|
35
|
-
}
|
|
36
|
-
)
|
|
47
|
+
className: d(t, { [`${t}--hoverable`]: !s }, m),
|
|
48
|
+
children: /* @__PURE__ */ g("div", { "data-testid": `${e}-trigger`, children: [
|
|
49
|
+
/* @__PURE__ */ o("div", { className: d(`${t}__text`, { [`${t}__text--lg`]: c }), children: n }),
|
|
50
|
+
r && l,
|
|
51
|
+
!r && a,
|
|
52
|
+
!r && i
|
|
37
53
|
] })
|
|
38
54
|
}
|
|
39
55
|
);
|
|
40
|
-
},
|
|
41
|
-
children:
|
|
42
|
-
baseClassName:
|
|
56
|
+
}, N = ({
|
|
57
|
+
children: n,
|
|
58
|
+
baseClassName: m,
|
|
43
59
|
disable: t,
|
|
44
|
-
hasTransition:
|
|
45
|
-
isLargeVariation:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
T,
|
|
60
|
+
hasTransition: s,
|
|
61
|
+
isLargeVariation: c,
|
|
62
|
+
className: e
|
|
63
|
+
}) => /* @__PURE__ */ o(I, { children: t && n ? /* @__PURE__ */ o("div", { children: n }) : /* @__PURE__ */ o(
|
|
64
|
+
v,
|
|
50
65
|
{
|
|
51
66
|
asChild: !0,
|
|
52
67
|
className: d(
|
|
53
|
-
{ [`${
|
|
54
|
-
{ [`${
|
|
55
|
-
|
|
56
|
-
s
|
|
68
|
+
{ [`${m}__content--lg`]: c },
|
|
69
|
+
{ [`${m}--transition`]: s },
|
|
70
|
+
e
|
|
57
71
|
),
|
|
58
|
-
children:
|
|
72
|
+
children: n
|
|
59
73
|
}
|
|
60
|
-
) }),
|
|
61
|
-
isLocked:
|
|
62
|
-
variation:
|
|
74
|
+
) }), P = ({
|
|
75
|
+
isLocked: n,
|
|
76
|
+
variation: m,
|
|
63
77
|
label: t,
|
|
64
|
-
isLastItem:
|
|
65
|
-
hasTransition:
|
|
66
|
-
children:
|
|
67
|
-
|
|
68
|
-
...c
|
|
78
|
+
isLastItem: s,
|
|
79
|
+
hasTransition: c = !1,
|
|
80
|
+
children: e,
|
|
81
|
+
...r
|
|
69
82
|
}) => {
|
|
70
|
-
const
|
|
71
|
-
return /* @__PURE__ */
|
|
72
|
-
|
|
83
|
+
const { className: l } = $(r, "Accordion"), a = m === "lg", i = `${l}-item`;
|
|
84
|
+
return /* @__PURE__ */ g(
|
|
85
|
+
p,
|
|
73
86
|
{
|
|
74
|
-
disabled:
|
|
87
|
+
disabled: n,
|
|
75
88
|
value: t,
|
|
76
|
-
className: d(
|
|
89
|
+
className: d(i, { [`${i}__border-bottom`]: !s }),
|
|
77
90
|
children: [
|
|
78
|
-
/* @__PURE__ */
|
|
79
|
-
|
|
91
|
+
/* @__PURE__ */ o(
|
|
92
|
+
x,
|
|
80
93
|
{
|
|
81
|
-
disable:
|
|
82
|
-
isLargeVariation:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
id: c == null ? void 0 : c.id,
|
|
86
|
-
baseClassName: `${u}-label`,
|
|
94
|
+
disable: n,
|
|
95
|
+
isLargeVariation: a,
|
|
96
|
+
id: r == null ? void 0 : r.id,
|
|
97
|
+
baseClassName: `${i}-label`,
|
|
87
98
|
children: t
|
|
88
99
|
}
|
|
89
100
|
),
|
|
90
|
-
/* @__PURE__ */
|
|
91
|
-
|
|
101
|
+
/* @__PURE__ */ o(
|
|
102
|
+
N,
|
|
92
103
|
{
|
|
93
|
-
disable:
|
|
94
|
-
hasTransition:
|
|
95
|
-
isLargeVariation:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
children: a
|
|
104
|
+
disable: n,
|
|
105
|
+
hasTransition: c,
|
|
106
|
+
isLargeVariation: a,
|
|
107
|
+
baseClassName: i,
|
|
108
|
+
children: e
|
|
99
109
|
}
|
|
100
110
|
)
|
|
101
111
|
]
|
|
@@ -103,5 +113,5 @@ const j = ({
|
|
|
103
113
|
);
|
|
104
114
|
};
|
|
105
115
|
export {
|
|
106
|
-
|
|
116
|
+
P as default
|
|
107
117
|
};
|
|
@@ -12,8 +12,6 @@ export interface AccordionHeaderType {
|
|
|
12
12
|
*/
|
|
13
13
|
baseClassName: string;
|
|
14
14
|
disable: boolean;
|
|
15
|
-
isCollapsed: boolean;
|
|
16
|
-
setIsCollapsed: React.Dispatch<React.SetStateAction<boolean>>;
|
|
17
15
|
isLargeVariation: boolean;
|
|
18
16
|
/**
|
|
19
17
|
* Unique id for icon component testing
|
|
@@ -39,7 +37,6 @@ export interface AccordionContentType {
|
|
|
39
37
|
*/
|
|
40
38
|
hasTransition?: boolean;
|
|
41
39
|
isLargeVariation: boolean;
|
|
42
|
-
isCollapsed: boolean;
|
|
43
40
|
}
|
|
44
41
|
export declare enum AccordionVariants {
|
|
45
42
|
multiple = "multiple",
|
|
@@ -15,3 +15,11 @@ export interface AccordionVariantProps {
|
|
|
15
15
|
* The collapsible prop should only be passed when the variant is single
|
|
16
16
|
*/
|
|
17
17
|
export declare const getAccordionVariantProps: (variant?: AccordionVariantKey) => AccordionVariantProps;
|
|
18
|
+
/**
|
|
19
|
+
* A helper for getting the classes of the Accordion icons
|
|
20
|
+
* @param className - The className of the component
|
|
21
|
+
* @param isLargeVariation - Determines whether the variation on text style is large or small.
|
|
22
|
+
* @param iconName - The name of the icon to be displayed
|
|
23
|
+
* @returns the classes that should be applied for the icon
|
|
24
|
+
*/
|
|
25
|
+
export declare const getIconClasses: (className: string, isLargeVariation: boolean, iconName: string) => string;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import n from "../../node_modules/classnames/index.js";
|
|
2
|
+
import { AccordionVariants as l } from "./types.js";
|
|
3
|
+
const r = (i) => {
|
|
4
|
+
const o = { type: "multiple" };
|
|
5
|
+
return i === l.singleCollapsible && (o.type = "single", o.collapsible = !0), i === l.singleNonCollapsible && (o.type = "single", o.collapsible = !1), o;
|
|
6
|
+
}, p = (i, o, e) => n(`${i}__icon`, `${i}-${e}__icon`, {
|
|
7
|
+
[`${i}__icon--lg`]: o
|
|
8
|
+
});
|
|
6
9
|
export {
|
|
7
|
-
|
|
10
|
+
r as getAccordionVariantProps,
|
|
11
|
+
p as getIconClasses
|
|
8
12
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as m, jsx as t, Fragment as $ } from "react/jsx-runtime";
|
|
2
2
|
import * as a from "react";
|
|
3
3
|
import mt from "../../node_modules/classnames/index.js";
|
|
4
|
-
import { px as
|
|
4
|
+
import { px as u } from "../../utils/index.js";
|
|
5
5
|
import y from "../Input/Input.js";
|
|
6
6
|
import c from "../Button/Button.js";
|
|
7
7
|
import { ButtonVariants as l } from "../Button/types.js";
|
|
8
8
|
import ft from "./ViewingsListCardForm.js";
|
|
9
|
-
const i = `${
|
|
10
|
-
address1:
|
|
9
|
+
const i = `${u}-viewings-list-card`, dt = ({
|
|
10
|
+
address1: d,
|
|
11
11
|
address1Label: C,
|
|
12
12
|
addressUrl: O,
|
|
13
13
|
addressUrlLabel: w,
|
|
@@ -19,8 +19,8 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
19
19
|
cardTitle: T = "Add New Viewing",
|
|
20
20
|
deleteBtnLabel: V = "DELETE",
|
|
21
21
|
editBtnLabel: _ = "EDIT",
|
|
22
|
-
isEditState:
|
|
23
|
-
enableOnSite:
|
|
22
|
+
isEditState: o,
|
|
23
|
+
enableOnSite: f = "false",
|
|
24
24
|
enableOnSiteToggleLabel: k = "Enabled on website",
|
|
25
25
|
email: I,
|
|
26
26
|
emailLabel: N = "Email",
|
|
@@ -32,10 +32,10 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
32
32
|
invalidFields: n,
|
|
33
33
|
location: R,
|
|
34
34
|
locationLabel: q = "Location",
|
|
35
|
-
onCancel:
|
|
36
|
-
onEdit:
|
|
37
|
-
onDelete:
|
|
38
|
-
onSave:
|
|
35
|
+
onCancel: p,
|
|
36
|
+
onEdit: h,
|
|
37
|
+
onDelete: b,
|
|
38
|
+
onSave: g,
|
|
39
39
|
previewDates: G,
|
|
40
40
|
previewDatesLabel: H,
|
|
41
41
|
previewHours1: J,
|
|
@@ -52,37 +52,37 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
52
52
|
viewingDates: tt,
|
|
53
53
|
viewingDatesLabel: et,
|
|
54
54
|
viewingHours1: nt,
|
|
55
|
-
viewingHours1Label:
|
|
56
|
-
viewingHours2:
|
|
57
|
-
viewingHours2Label:
|
|
55
|
+
viewingHours1Label: ot,
|
|
56
|
+
viewingHours2: rt,
|
|
57
|
+
viewingHours2Label: st
|
|
58
58
|
}) => {
|
|
59
|
-
const [at, ct] = a.useState(
|
|
59
|
+
const [at, ct] = a.useState(f === "true"), s = a.useRef(null);
|
|
60
60
|
a.useEffect(() => {
|
|
61
|
-
|
|
62
|
-
}, [
|
|
63
|
-
var
|
|
64
|
-
n &&
|
|
61
|
+
o && s.current && s.current.focus();
|
|
62
|
+
}, [o]), a.useEffect(() => {
|
|
63
|
+
var r, E;
|
|
64
|
+
n && s.current && ((E = (r = s.current.closest(`.${u}-viewings-list-card`)) == null ? void 0 : r.querySelector(`.${u}-input--invalid input`)) == null || E.focus());
|
|
65
65
|
}, [n]);
|
|
66
66
|
const lt = () => {
|
|
67
|
-
typeof f == "function" && f();
|
|
68
|
-
}, it = () => {
|
|
69
67
|
typeof p == "function" && p();
|
|
70
|
-
},
|
|
71
|
-
typeof
|
|
68
|
+
}, it = () => {
|
|
69
|
+
typeof h == "function" && h();
|
|
70
|
+
}, ut = (r) => {
|
|
71
|
+
typeof g == "function" && g(r);
|
|
72
72
|
};
|
|
73
|
-
return /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ m(
|
|
74
74
|
"section",
|
|
75
75
|
{
|
|
76
76
|
"data-testid": `viewings-list-card-${e}`,
|
|
77
77
|
id: e,
|
|
78
|
-
className: mt(`${i}`, { [`${i}--edit-state`]:
|
|
78
|
+
className: mt(`${i}`, { [`${i}--edit-state`]: o }),
|
|
79
79
|
children: [
|
|
80
80
|
/* @__PURE__ */ t("h3", { className: `${i}__title`, children: T }),
|
|
81
81
|
/* @__PURE__ */ t("input", { type: "hidden", name: "id", value: e }),
|
|
82
82
|
/* @__PURE__ */ t(
|
|
83
83
|
y,
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
85
|
+
ref: s,
|
|
86
86
|
id: `location-${e}`,
|
|
87
87
|
defaultValue: R,
|
|
88
88
|
labelText: q,
|
|
@@ -90,13 +90,13 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
90
90
|
name: "location",
|
|
91
91
|
invalid: n == null ? void 0 : n.location,
|
|
92
92
|
invalidText: n == null ? void 0 : n.location,
|
|
93
|
-
readOnly: !
|
|
93
|
+
readOnly: !o
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
|
-
|
|
96
|
+
o ? /* @__PURE__ */ t(
|
|
97
97
|
ft,
|
|
98
98
|
{
|
|
99
|
-
address1:
|
|
99
|
+
address1: d,
|
|
100
100
|
address1Label: C,
|
|
101
101
|
addressUrl: O,
|
|
102
102
|
addressUrlLabel: w,
|
|
@@ -127,9 +127,9 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
127
127
|
viewingDates: tt,
|
|
128
128
|
viewingDatesLabel: et,
|
|
129
129
|
viewingHours1: nt,
|
|
130
|
-
viewingHours1Label:
|
|
131
|
-
viewingHours2:
|
|
132
|
-
viewingHours2Label:
|
|
130
|
+
viewingHours1Label: ot,
|
|
131
|
+
viewingHours2: rt,
|
|
132
|
+
viewingHours2Label: st
|
|
133
133
|
}
|
|
134
134
|
) : null,
|
|
135
135
|
/* @__PURE__ */ t(
|
|
@@ -137,19 +137,19 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
137
137
|
{
|
|
138
138
|
id: `enableOnSite-${e}`,
|
|
139
139
|
type: "toggle",
|
|
140
|
-
defaultChecked:
|
|
140
|
+
defaultChecked: f === "true",
|
|
141
141
|
labelText: k,
|
|
142
142
|
size: "md",
|
|
143
143
|
inline: !0,
|
|
144
144
|
value: "true",
|
|
145
145
|
name: "enableOnSite",
|
|
146
|
-
onChange: () => ct((
|
|
147
|
-
readOnly: !
|
|
146
|
+
onChange: () => ct((r) => !r),
|
|
147
|
+
readOnly: !o
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
150
|
at ? null : /* @__PURE__ */ t("input", { type: "hidden", name: "enableOnSite", value: "false" }),
|
|
151
151
|
/* @__PURE__ */ t("hr", {}),
|
|
152
|
-
/* @__PURE__ */ t("div", { className: `${i}__btn-group ${
|
|
152
|
+
/* @__PURE__ */ t("div", { className: `${i}__btn-group ${u}-button__group`, children: o ? /* @__PURE__ */ m($, { children: [
|
|
153
153
|
/* @__PURE__ */ t(
|
|
154
154
|
c,
|
|
155
155
|
{
|
|
@@ -172,7 +172,7 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
172
172
|
children: L
|
|
173
173
|
}
|
|
174
174
|
)
|
|
175
|
-
] }) : /* @__PURE__ */
|
|
175
|
+
] }) : /* @__PURE__ */ m($, { children: [
|
|
176
176
|
/* @__PURE__ */ t(
|
|
177
177
|
c,
|
|
178
178
|
{
|
|
@@ -191,7 +191,7 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
191
191
|
variant: l.ghost,
|
|
192
192
|
type: "button",
|
|
193
193
|
size: "sm",
|
|
194
|
-
onClick: () => typeof
|
|
194
|
+
onClick: () => typeof b == "function" && b(e),
|
|
195
195
|
children: V
|
|
196
196
|
}
|
|
197
197
|
)
|
|
@@ -201,5 +201,5 @@ const i = `${d}-viewings-list-card`, $t = ({
|
|
|
201
201
|
);
|
|
202
202
|
};
|
|
203
203
|
export {
|
|
204
|
-
|
|
204
|
+
dt as default
|
|
205
205
|
};
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
border-bottom: 1px solid $keyline-gray;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
&[data-state='open'] {
|
|
18
18
|
display: block;
|
|
19
19
|
font-weight: 400;
|
|
20
20
|
height: auto;
|
|
@@ -39,6 +39,26 @@
|
|
|
39
39
|
animation: slide-up 250ms end;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
&[data-state='open'] {
|
|
43
|
+
.phillips-accordion-item-label-plus__icon {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.phillips-accordion-item-label-minus__icon {
|
|
48
|
+
display: block;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&[data-state='closed'] {
|
|
53
|
+
.phillips-accordion-item-label-plus__icon {
|
|
54
|
+
display: block;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.phillips-accordion-item-label-minus__icon {
|
|
58
|
+
display: none;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
42
62
|
@keyframes slide-down {
|
|
43
63
|
from {
|
|
44
64
|
height: 0;
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { kebabCase as d } from "../node_modules/change-case/dist/index.js";
|
|
3
3
|
import * as u from "react";
|
|
4
|
-
const
|
|
4
|
+
const s = "seldon", x = ({ id: e, ...n }, a) => {
|
|
5
5
|
const t = d(a);
|
|
6
6
|
return {
|
|
7
7
|
...n,
|
|
8
8
|
"data-testid": e ? `${t}-${e}` : `${t}`,
|
|
9
|
-
className: `${
|
|
9
|
+
className: `${s}-${t}`
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
|
-
var
|
|
12
|
+
var $ = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e.xxl = "xxl", e))($ || {});
|
|
13
13
|
const v = () => {
|
|
14
14
|
};
|
|
15
15
|
function g({
|
|
@@ -18,7 +18,7 @@ function g({
|
|
|
18
18
|
invalid: a = !1,
|
|
19
19
|
invalidText: t = "invalid",
|
|
20
20
|
readOnly: r = !1,
|
|
21
|
-
type:
|
|
21
|
+
type: i,
|
|
22
22
|
warn: l = !1,
|
|
23
23
|
warnText: c
|
|
24
24
|
}) {
|
|
@@ -26,14 +26,14 @@ function g({
|
|
|
26
26
|
disabled: !r && e,
|
|
27
27
|
invalid: !r && !e && a,
|
|
28
28
|
invalidId: `${n}-error-msg`,
|
|
29
|
-
type:
|
|
29
|
+
type: i === "toggle" ? "checkbox" : i,
|
|
30
30
|
warn: !r && !e && !a && l,
|
|
31
31
|
warnId: `${n}-warn-msg`,
|
|
32
32
|
validation: null
|
|
33
33
|
};
|
|
34
|
-
return o.invalid && (o.validation = /* @__PURE__ */ m("div", { className: `${
|
|
34
|
+
return o.invalid && (o.validation = /* @__PURE__ */ m("div", { className: `${s}-input__validation ${s}-${i}-input--invalid`, id: o.invalidId, children: t })), o.warn && (o.validation = /* @__PURE__ */ m("div", { className: `${s}-input__validation ${s}-${i}-input--warn`, id: o.warnId, children: c })), o;
|
|
35
35
|
}
|
|
36
|
-
const C = (/* @__PURE__ */ new Date()).getFullYear(), w = (e, n = "end", a = "vertical") => `${
|
|
36
|
+
const C = (/* @__PURE__ */ new Date()).getFullYear(), w = (e, n = "end", a = "vertical") => `${s}-padding-${a}-${e}-${n}`, h = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), I = function(e, n, a = !1) {
|
|
37
37
|
const t = u.Children.toArray(e).filter((r) => r && r.type === n && !a ? r : r && r.type !== n && a);
|
|
38
38
|
return t.length > 0 ? t : null;
|
|
39
39
|
}, N = (e) => {
|
|
@@ -41,7 +41,7 @@ const C = (/* @__PURE__ */ new Date()).getFullYear(), w = (e, n = "end", a = "ve
|
|
|
41
41
|
return `${n[0]}?${r}`;
|
|
42
42
|
};
|
|
43
43
|
export {
|
|
44
|
-
|
|
44
|
+
$ as PaddingTokens,
|
|
45
45
|
C as defaultYear,
|
|
46
46
|
h as emailValidation,
|
|
47
47
|
N as encodeURLSearchParams,
|
|
@@ -49,6 +49,6 @@ export {
|
|
|
49
49
|
w as generatePaddingClassName,
|
|
50
50
|
x as getCommonProps,
|
|
51
51
|
v as noOp,
|
|
52
|
-
|
|
52
|
+
s as px,
|
|
53
53
|
g as useNormalizedInputProps
|
|
54
54
|
};
|