@phillips/seldon 1.103.1 → 1.103.3
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/Breadcrumb/Breadcrumb.js +8 -8
- package/dist/components/Button/Button.d.ts +0 -4
- package/dist/components/Button/Button.js +33 -36
- package/dist/components/Button/Button.stories.d.ts +0 -6
- package/dist/components/IconButton/IconButton.d.ts +1 -5
- package/dist/components/IconButton/IconButton.js +17 -18
- package/dist/components/IconButton/IconButton.stories.d.ts +1 -7
- package/dist/components/Pagination/Pagination.js +24 -24
- package/dist/patterns/ViewingsList/ViewingsList.js +11 -11
- package/dist/patterns/ViewingsList/ViewingsListCard.js +50 -81
- package/dist/scss/components/Breadcrumb/_breadcrumb.scss +2 -5
- package/dist/scss/components/Button/_button.scss +5 -24
- package/dist/scss/components/IconButton/_iconButton.scss +28 -10
- package/dist/scss/components/Pagination/_pagination.scss +44 -46
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { getCommonProps as u, px as t } from "../../utils/index.js";
|
|
|
3
3
|
import f from "../../node_modules/classnames/index.js";
|
|
4
4
|
import p from "./BreadcrumbItem.js";
|
|
5
5
|
import { SSRMediaQuery as c } from "../../providers/SeldonProvider/utils.js";
|
|
6
|
-
import
|
|
6
|
+
import g from "../../assets/arrowPrev.svg.js";
|
|
7
7
|
const v = ({
|
|
8
8
|
className: s,
|
|
9
9
|
items: a = [],
|
|
@@ -11,25 +11,25 @@ const v = ({
|
|
|
11
11
|
linkElement: l = "a",
|
|
12
12
|
...e
|
|
13
13
|
}) => {
|
|
14
|
-
const { className:
|
|
15
|
-
return /* @__PURE__ */ h("nav", { "aria-label": "Breadcrumb", className: f(
|
|
14
|
+
const { className: m, ...i } = u(e, "Breadcrumb"), { id: b } = e;
|
|
15
|
+
return /* @__PURE__ */ h("nav", { "aria-label": "Breadcrumb", className: f(m, s), ...i, ...e, children: [
|
|
16
16
|
/* @__PURE__ */ r(c.Media, { lessThan: "md", children: /* @__PURE__ */ r(
|
|
17
17
|
l,
|
|
18
18
|
{
|
|
19
19
|
href: a[1].href ? a[1].href : "/",
|
|
20
|
-
className: `${t}-icon-button ${t}-icon-button--
|
|
20
|
+
className: `${t}-icon-button ${t}-icon-button--primary ${m}__back-button`,
|
|
21
21
|
"data-testid": `${b}-back-button`,
|
|
22
|
-
children: /* @__PURE__ */ r(
|
|
22
|
+
children: /* @__PURE__ */ r(g, {})
|
|
23
23
|
}
|
|
24
24
|
) }),
|
|
25
|
-
/* @__PURE__ */ r(c.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ r("ol", { children: a.map((o,
|
|
25
|
+
/* @__PURE__ */ r(c.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ r("ol", { children: a.map((o, n) => /* @__PURE__ */ r(
|
|
26
26
|
p,
|
|
27
27
|
{
|
|
28
28
|
href: o.href,
|
|
29
29
|
label: o.label,
|
|
30
30
|
element: l,
|
|
31
|
-
isCurrent: a.length - 1 ===
|
|
32
|
-
isTruncateText: d ===
|
|
31
|
+
isCurrent: a.length - 1 === n,
|
|
32
|
+
isTruncateText: d === n
|
|
33
33
|
},
|
|
34
34
|
o.label
|
|
35
35
|
)) }) })
|
|
@@ -16,10 +16,6 @@ export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement | HT
|
|
|
16
16
|
* Is this the principal call to action on the page?
|
|
17
17
|
*/
|
|
18
18
|
variant?: ButtonVariants;
|
|
19
|
-
/**
|
|
20
|
-
* How large should the button be?
|
|
21
|
-
*/
|
|
22
|
-
size?: 'sm' | 'md' | 'lg';
|
|
23
19
|
/**
|
|
24
20
|
* The type of the button.
|
|
25
21
|
*/
|
|
@@ -1,64 +1,61 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
2
|
import p from "../../node_modules/classnames/index.js";
|
|
3
|
-
import { getCommonProps as
|
|
3
|
+
import { getCommonProps as c } from "../../utils/index.js";
|
|
4
4
|
import { ButtonVariants as b } from "./types.js";
|
|
5
|
-
import { forwardRef as
|
|
6
|
-
const
|
|
5
|
+
import { forwardRef as d } from "react";
|
|
6
|
+
const B = d(
|
|
7
7
|
({
|
|
8
|
-
variant:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
isIconLast: m = !1,
|
|
8
|
+
variant: s = b.primary,
|
|
9
|
+
children: t,
|
|
10
|
+
className: r,
|
|
11
|
+
isIconLast: a = !1,
|
|
13
12
|
type: u = "button",
|
|
14
|
-
isDisabled:
|
|
15
|
-
href:
|
|
16
|
-
target:
|
|
17
|
-
...
|
|
18
|
-
},
|
|
19
|
-
const { className: o, ...
|
|
20
|
-
return
|
|
13
|
+
isDisabled: $ = !1,
|
|
14
|
+
href: m,
|
|
15
|
+
target: e,
|
|
16
|
+
...n
|
|
17
|
+
}, l) => {
|
|
18
|
+
const { className: o, ...i } = c(n, "Button");
|
|
19
|
+
return m ? /* @__PURE__ */ f(
|
|
21
20
|
"a",
|
|
22
21
|
{
|
|
23
|
-
...
|
|
24
|
-
ref:
|
|
25
|
-
href:
|
|
22
|
+
...i,
|
|
23
|
+
ref: l,
|
|
24
|
+
href: m,
|
|
26
25
|
className: p(
|
|
27
26
|
`${o}`,
|
|
28
27
|
`${o}--${s}`,
|
|
29
|
-
`${o}--${t}`,
|
|
30
28
|
{
|
|
31
|
-
[`${o}--icon-last`]:
|
|
29
|
+
[`${o}--icon-last`]: a
|
|
32
30
|
},
|
|
33
|
-
|
|
31
|
+
r
|
|
34
32
|
),
|
|
35
|
-
target:
|
|
36
|
-
rel:
|
|
37
|
-
children:
|
|
33
|
+
target: e,
|
|
34
|
+
rel: e === "_blank" ? "noopener noreferrer" : void 0,
|
|
35
|
+
children: t
|
|
38
36
|
}
|
|
39
|
-
) : /* @__PURE__ */
|
|
37
|
+
) : /* @__PURE__ */ f(
|
|
40
38
|
"button",
|
|
41
39
|
{
|
|
42
|
-
...
|
|
43
|
-
ref:
|
|
40
|
+
...i,
|
|
41
|
+
ref: l,
|
|
44
42
|
type: u,
|
|
45
43
|
className: p(
|
|
46
44
|
`${o}`,
|
|
47
45
|
`${o}--${s}`,
|
|
48
|
-
`${o}--${t}`,
|
|
49
46
|
{
|
|
50
|
-
[`${o}--icon-last`]:
|
|
47
|
+
[`${o}--icon-last`]: a
|
|
51
48
|
},
|
|
52
|
-
|
|
49
|
+
r
|
|
53
50
|
),
|
|
54
|
-
disabled:
|
|
55
|
-
...
|
|
56
|
-
children:
|
|
51
|
+
disabled: $,
|
|
52
|
+
...n,
|
|
53
|
+
children: t
|
|
57
54
|
}
|
|
58
55
|
);
|
|
59
56
|
}
|
|
60
57
|
);
|
|
61
|
-
|
|
58
|
+
B.displayName = "Button";
|
|
62
59
|
export {
|
|
63
|
-
|
|
60
|
+
B as default
|
|
64
61
|
};
|
|
@@ -4,12 +4,6 @@ declare const meta: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
component: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
6
|
argTypes: {
|
|
7
|
-
size: {
|
|
8
|
-
options: string[];
|
|
9
|
-
control: {
|
|
10
|
-
type: "select";
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
7
|
variant: {
|
|
14
8
|
options: ButtonVariants[];
|
|
15
9
|
control: {
|
|
@@ -4,10 +4,6 @@ export interface IconButtonProps extends Omit<React.HTMLAttributes<HTMLButtonEle
|
|
|
4
4
|
* Button contents
|
|
5
5
|
*/
|
|
6
6
|
children?: React.ReactElement<SVGElement>;
|
|
7
|
-
/**
|
|
8
|
-
* How large should the button be?
|
|
9
|
-
*/
|
|
10
|
-
size?: 'sm' | 'md' | 'lg';
|
|
11
7
|
/**
|
|
12
8
|
* Mainly used for styling
|
|
13
9
|
*/
|
|
@@ -17,5 +13,5 @@ export interface IconButtonProps extends Omit<React.HTMLAttributes<HTMLButtonEle
|
|
|
17
13
|
*/
|
|
18
14
|
isDisabled?: boolean;
|
|
19
15
|
}
|
|
20
|
-
declare const IconButton: ({ children,
|
|
16
|
+
declare const IconButton: ({ children, variant, isDisabled, className, ...props }: IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
17
|
export default IconButton;
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
import { ButtonVariants as
|
|
6
|
-
const
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import c from "../../node_modules/classnames/index.js";
|
|
3
|
+
import f from "../Button/Button.js";
|
|
4
|
+
import { getCommonProps as p } from "../../utils/index.js";
|
|
5
|
+
import { ButtonVariants as i } from "../Button/types.js";
|
|
6
|
+
const I = ({
|
|
7
7
|
children: s,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
className: n,
|
|
8
|
+
variant: o = i.primary,
|
|
9
|
+
isDisabled: r = !1,
|
|
10
|
+
className: a,
|
|
12
11
|
...t
|
|
13
12
|
}) => {
|
|
14
|
-
const { className:
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
13
|
+
const { className: m, ...n } = p(t, "IconButton");
|
|
14
|
+
return /* @__PURE__ */ e(
|
|
15
|
+
f,
|
|
17
16
|
{
|
|
18
|
-
...
|
|
19
|
-
variant:
|
|
20
|
-
className:
|
|
21
|
-
isDisabled:
|
|
17
|
+
...n,
|
|
18
|
+
variant: o,
|
|
19
|
+
className: c(m, `${m}--${o}`, a),
|
|
20
|
+
isDisabled: r,
|
|
22
21
|
...t,
|
|
23
22
|
children: s
|
|
24
23
|
}
|
|
25
24
|
);
|
|
26
25
|
};
|
|
27
26
|
export {
|
|
28
|
-
|
|
27
|
+
I as default
|
|
29
28
|
};
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import { ButtonVariants } from '../Button/types';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: ({ children,
|
|
4
|
+
component: ({ children, variant, isDisabled, className, ...props }: import('./IconButton').IconButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
argTypes: {
|
|
6
|
-
size: {
|
|
7
|
-
options: string[];
|
|
8
|
-
control: {
|
|
9
|
-
type: "select";
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
6
|
variant: {
|
|
13
7
|
options: ButtonVariants[];
|
|
14
8
|
control: {
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsxs as O, jsx as
|
|
1
|
+
import { jsxs as O, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import f from "../../node_modules/classnames/index.js";
|
|
3
|
-
import { getCommonProps as w, px as
|
|
3
|
+
import { getCommonProps as w, px as u } from "../../utils/index.js";
|
|
4
4
|
import V from "../Select/Select.js";
|
|
5
5
|
import h from "../../assets/chevronRight.svg.js";
|
|
6
6
|
import x from "../IconButton/IconButton.js";
|
|
7
7
|
import { ButtonVariants as b } from "../Button/types.js";
|
|
8
|
-
import { determineOptionValue as
|
|
8
|
+
import { determineOptionValue as i, findOptionFromSelectString as j } from "./utils.js";
|
|
9
9
|
import { usePendingState as k } from "../../utils/hooks.js";
|
|
10
10
|
const G = ({
|
|
11
11
|
className: P,
|
|
12
12
|
onChange: $,
|
|
13
13
|
variant: S = "inline",
|
|
14
14
|
options: n = [],
|
|
15
|
-
value:
|
|
15
|
+
value: p,
|
|
16
16
|
isDisabled: l,
|
|
17
17
|
previousLabel: v = "Previous",
|
|
18
18
|
nextLabel: C = "Next",
|
|
19
|
-
selectLabel:
|
|
19
|
+
selectLabel: g = "Select",
|
|
20
20
|
...s
|
|
21
21
|
}) => {
|
|
22
|
-
const N = "pagination", { className:
|
|
23
|
-
const a =
|
|
22
|
+
const N = "pagination", { className: o, ...I } = w(s, "Pagination"), { id: c } = s, { pendingState: _, setPendingState: y } = k(i(p)), m = _ || p, d = (t, e) => {
|
|
23
|
+
const a = i(t);
|
|
24
24
|
y(a), $(a, e);
|
|
25
25
|
};
|
|
26
26
|
return /* @__PURE__ */ O(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
|
-
className: f(`${
|
|
29
|
+
className: f(`${u}-${N}`, { [`${o}__wrapper`]: o }, P),
|
|
30
30
|
...I,
|
|
31
31
|
...s,
|
|
32
32
|
children: [
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
34
|
x,
|
|
35
35
|
{
|
|
36
|
-
className: f(`${
|
|
36
|
+
className: f(`${o}__button`, `${u}-left-arrow`),
|
|
37
37
|
onClick: () => {
|
|
38
|
-
const t = n.findIndex((a) =>
|
|
38
|
+
const t = n.findIndex((a) => i(a) === m) - 1, e = n.at(t) || "";
|
|
39
39
|
d(e);
|
|
40
40
|
},
|
|
41
41
|
"data-testid": `${c}-previous-button`,
|
|
42
42
|
isDisabled: l,
|
|
43
43
|
"aria-label": v,
|
|
44
|
-
variant: b.
|
|
45
|
-
children: /* @__PURE__ */
|
|
44
|
+
variant: b.primary,
|
|
45
|
+
children: /* @__PURE__ */ r(h, {})
|
|
46
46
|
}
|
|
47
47
|
),
|
|
48
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
49
|
V,
|
|
50
50
|
{
|
|
51
|
-
className: S === "inline" ? `${
|
|
52
|
-
"aria-label":
|
|
51
|
+
className: S === "inline" ? `${u}--inline-pagination` : void 0,
|
|
52
|
+
"aria-label": g,
|
|
53
53
|
value: m,
|
|
54
54
|
onChange: (t) => {
|
|
55
55
|
const e = j(n, t == null ? void 0 : t.currentTarget.value);
|
|
@@ -57,28 +57,28 @@ const G = ({
|
|
|
57
57
|
},
|
|
58
58
|
"data-testid": `${c}-select-button`,
|
|
59
59
|
hideLabel: !0,
|
|
60
|
-
labelText:
|
|
60
|
+
labelText: g,
|
|
61
61
|
disabled: l,
|
|
62
62
|
showIcon: !1,
|
|
63
63
|
children: n.map((t) => {
|
|
64
|
-
const e =
|
|
65
|
-
return /* @__PURE__ */
|
|
64
|
+
const e = i(t);
|
|
65
|
+
return /* @__PURE__ */ r("option", { value: e, children: typeof t == "string" || typeof t == "number" ? t : t.label }, e);
|
|
66
66
|
})
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ r(
|
|
70
70
|
x,
|
|
71
71
|
{
|
|
72
|
-
className: `${
|
|
72
|
+
className: `${o}__button`,
|
|
73
73
|
onClick: () => {
|
|
74
|
-
const t = (n.findIndex((a) =>
|
|
74
|
+
const t = (n.findIndex((a) => i(a) === m) + 1) % n.length, e = n[t];
|
|
75
75
|
d(e);
|
|
76
76
|
},
|
|
77
77
|
"data-testid": `${c}-next-button`,
|
|
78
78
|
isDisabled: l,
|
|
79
79
|
"aria-label": C,
|
|
80
|
-
variant: b.
|
|
81
|
-
children: /* @__PURE__ */
|
|
80
|
+
variant: b.primary,
|
|
81
|
+
children: /* @__PURE__ */ r(h, {})
|
|
82
82
|
}
|
|
83
83
|
)
|
|
84
84
|
]
|
|
@@ -5,7 +5,7 @@ import S from "../../node_modules/classnames/index.js";
|
|
|
5
5
|
import { getCommonProps as M } from "../../utils/index.js";
|
|
6
6
|
import P from "./ViewingsListCard.js";
|
|
7
7
|
import R from "../../components/Button/Button.js";
|
|
8
|
-
const $ = () => Math.floor(Math.random() * 100) + Date.now(),
|
|
8
|
+
const $ = () => Math.floor(Math.random() * 100) + Date.now(), H = ({
|
|
9
9
|
cardTitle: C = "Viewing Details",
|
|
10
10
|
className: E,
|
|
11
11
|
i18n: f = {},
|
|
@@ -16,28 +16,28 @@ const $ = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
|
|
|
16
16
|
viewings: c,
|
|
17
17
|
...i
|
|
18
18
|
}) => {
|
|
19
|
-
const [a, h] = d.useState(c), [m,
|
|
19
|
+
const [a, h] = d.useState(c), [m, s] = d.useState(""), [o, u] = d.useState(), { className: p, ...D } = M(i, "ViewingsList");
|
|
20
20
|
d.useEffect(() => {
|
|
21
21
|
h(c);
|
|
22
22
|
}, [c]);
|
|
23
23
|
const { addViewingsBtnLabel: y = "ADD VIEWINGS" } = f, b = () => {
|
|
24
24
|
const t = `${$()}${a ? "-" + a.length : ""}`;
|
|
25
|
-
|
|
25
|
+
s(t), u(t), r && r(t);
|
|
26
26
|
}, V = (t) => {
|
|
27
|
-
|
|
27
|
+
s(""), typeof e == "function" && e(t);
|
|
28
28
|
}, k = (t) => {
|
|
29
|
-
|
|
29
|
+
s(t), u(a == null ? void 0 : a.find((n) => n.id === t));
|
|
30
30
|
}, x = (t) => {
|
|
31
|
-
N(t) &&
|
|
31
|
+
N(t) && s("");
|
|
32
32
|
}, B = () => {
|
|
33
|
-
typeof
|
|
33
|
+
typeof o == "string" ? typeof e == "function" && e(o) : m === (o == null ? void 0 : o.id) && h((t) => t == null ? void 0 : t.map((n) => n.id === o.id ? o : n)), s("");
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */ L("div", { ...D, className: S(p, E), key: m, ...i }, /* @__PURE__ */ l("h2", { className: S(`${p}__title`), children: O }), a == null ? void 0 : a.map((t,
|
|
35
|
+
return /* @__PURE__ */ L("div", { ...D, className: S(p, E), key: m, ...i }, /* @__PURE__ */ l("h2", { className: S(`${p}__title`), children: O }), a == null ? void 0 : a.map((t, n) => /* @__PURE__ */ l(
|
|
36
36
|
P,
|
|
37
37
|
{
|
|
38
38
|
...t,
|
|
39
39
|
...f,
|
|
40
|
-
cardTitle: t.location ? `${C} ${
|
|
40
|
+
cardTitle: t.location ? `${C} ${n + 1}` : void 0,
|
|
41
41
|
isEditState: m === t.id,
|
|
42
42
|
onCancel: B,
|
|
43
43
|
onDelete: V,
|
|
@@ -45,8 +45,8 @@ const $ = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
|
|
|
45
45
|
onSave: x
|
|
46
46
|
},
|
|
47
47
|
`${t.id}`
|
|
48
|
-
)), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id || $()}`,
|
|
48
|
+
)), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id || $()}`, onClick: b, children: y }));
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
|
-
|
|
51
|
+
H as default
|
|
52
52
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { px as
|
|
1
|
+
import { jsxs as f, jsx as t, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import ft from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { px as i } from "../../utils/index.js";
|
|
5
5
|
import y from "../../components/Input/Input.js";
|
|
6
|
-
import
|
|
6
|
+
import s from "../../components/Button/Button.js";
|
|
7
7
|
import { ButtonVariants as l } from "../../components/Button/types.js";
|
|
8
|
-
import
|
|
9
|
-
const
|
|
8
|
+
import mt from "./ViewingsListCardForm.js";
|
|
9
|
+
const u = `${i}-viewings-list-card`, dt = ({
|
|
10
10
|
address1: d,
|
|
11
11
|
address1Label: C,
|
|
12
12
|
addressUrl: O,
|
|
13
13
|
addressUrlLabel: w,
|
|
14
14
|
address2: v,
|
|
15
15
|
address2Label: x,
|
|
16
|
-
address3:
|
|
17
|
-
address3Label:
|
|
18
|
-
cancelBtnLabel:
|
|
19
|
-
cardTitle:
|
|
20
|
-
deleteBtnLabel:
|
|
21
|
-
editBtnLabel:
|
|
16
|
+
address3: A,
|
|
17
|
+
address3Label: L,
|
|
18
|
+
cancelBtnLabel: T = "CANCEL",
|
|
19
|
+
cardTitle: V = "Add New Viewing",
|
|
20
|
+
deleteBtnLabel: _ = "DELETE",
|
|
21
|
+
editBtnLabel: k = "EDIT",
|
|
22
22
|
isEditState: o,
|
|
23
|
-
enableOnSite:
|
|
24
|
-
enableOnSiteToggleLabel:
|
|
25
|
-
email:
|
|
26
|
-
emailLabel:
|
|
27
|
-
emailLink:
|
|
28
|
-
emailLinkLabel:
|
|
23
|
+
enableOnSite: m = "false",
|
|
24
|
+
enableOnSiteToggleLabel: I = "Enabled on website",
|
|
25
|
+
email: N,
|
|
26
|
+
emailLabel: S = "Email",
|
|
27
|
+
emailLink: j,
|
|
28
|
+
emailLinkLabel: z = "Email Address",
|
|
29
29
|
emailOn: B = "false",
|
|
30
30
|
emailToggleLabel: D = "Include Email Address",
|
|
31
31
|
id: e,
|
|
@@ -54,35 +54,35 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
54
54
|
viewingHours1: nt,
|
|
55
55
|
viewingHours1Label: ot,
|
|
56
56
|
viewingHours2: rt,
|
|
57
|
-
viewingHours2Label:
|
|
57
|
+
viewingHours2Label: at
|
|
58
58
|
}) => {
|
|
59
|
-
const [
|
|
60
|
-
|
|
61
|
-
o &&
|
|
62
|
-
}, [o]),
|
|
59
|
+
const [ct, st] = c.useState(m === "true"), a = c.useRef(null);
|
|
60
|
+
c.useEffect(() => {
|
|
61
|
+
o && a.current && a.current.focus();
|
|
62
|
+
}, [o]), c.useEffect(() => {
|
|
63
63
|
var r, E;
|
|
64
|
-
n &&
|
|
64
|
+
n && a.current && ((E = (r = a.current.closest(`.${i}-viewings-list-card`)) == null ? void 0 : r.querySelector(`.${i}-input--invalid input`)) == null || E.focus());
|
|
65
65
|
}, [n]);
|
|
66
66
|
const lt = () => {
|
|
67
67
|
typeof p == "function" && p();
|
|
68
|
-
},
|
|
68
|
+
}, ut = () => {
|
|
69
69
|
typeof h == "function" && h();
|
|
70
|
-
},
|
|
70
|
+
}, it = (r) => {
|
|
71
71
|
typeof g == "function" && g(r);
|
|
72
72
|
};
|
|
73
|
-
return /* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ f(
|
|
74
74
|
"section",
|
|
75
75
|
{
|
|
76
76
|
"data-testid": `viewings-list-card-${e}`,
|
|
77
77
|
id: e,
|
|
78
|
-
className:
|
|
78
|
+
className: ft(`${u}`, { [`${u}--edit-state`]: o }),
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */ t("h3", { className: `${
|
|
80
|
+
/* @__PURE__ */ t("h3", { className: `${u}__title`, children: V }),
|
|
81
81
|
/* @__PURE__ */ t("input", { type: "hidden", name: "id", value: e }),
|
|
82
82
|
/* @__PURE__ */ t(
|
|
83
83
|
y,
|
|
84
84
|
{
|
|
85
|
-
ref:
|
|
85
|
+
ref: a,
|
|
86
86
|
id: `location-${e}`,
|
|
87
87
|
defaultValue: R,
|
|
88
88
|
labelText: q,
|
|
@@ -94,7 +94,7 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
94
94
|
}
|
|
95
95
|
),
|
|
96
96
|
o ? /* @__PURE__ */ t(
|
|
97
|
-
|
|
97
|
+
mt,
|
|
98
98
|
{
|
|
99
99
|
address1: d,
|
|
100
100
|
address1Label: C,
|
|
@@ -102,12 +102,12 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
102
102
|
addressUrlLabel: w,
|
|
103
103
|
address2: v,
|
|
104
104
|
address2Label: x,
|
|
105
|
-
address3:
|
|
106
|
-
address3Label:
|
|
107
|
-
email:
|
|
108
|
-
emailLabel:
|
|
109
|
-
emailLink:
|
|
110
|
-
emailLinkLabel:
|
|
105
|
+
address3: A,
|
|
106
|
+
address3Label: L,
|
|
107
|
+
email: N,
|
|
108
|
+
emailLabel: S,
|
|
109
|
+
emailLink: j,
|
|
110
|
+
emailLinkLabel: z,
|
|
111
111
|
emailOn: B,
|
|
112
112
|
emailToggleLabel: D,
|
|
113
113
|
id: e,
|
|
@@ -129,7 +129,7 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
129
129
|
viewingHours1: nt,
|
|
130
130
|
viewingHours1Label: ot,
|
|
131
131
|
viewingHours2: rt,
|
|
132
|
-
viewingHours2Label:
|
|
132
|
+
viewingHours2Label: at
|
|
133
133
|
}
|
|
134
134
|
) : null,
|
|
135
135
|
/* @__PURE__ */ t(
|
|
@@ -137,62 +137,31 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
137
137
|
{
|
|
138
138
|
id: `enableOnSite-${e}`,
|
|
139
139
|
type: "toggle",
|
|
140
|
-
defaultChecked:
|
|
141
|
-
labelText:
|
|
140
|
+
defaultChecked: m === "true",
|
|
141
|
+
labelText: I,
|
|
142
142
|
size: "md",
|
|
143
143
|
inline: !0,
|
|
144
144
|
value: "true",
|
|
145
145
|
name: "enableOnSite",
|
|
146
|
-
onChange: () =>
|
|
146
|
+
onChange: () => st((r) => !r),
|
|
147
147
|
readOnly: !o
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
|
|
150
|
+
ct ? null : /* @__PURE__ */ t("input", { type: "hidden", name: "enableOnSite", value: "false" }),
|
|
151
151
|
/* @__PURE__ */ t("hr", {}),
|
|
152
|
-
/* @__PURE__ */ t("div", { className: `${
|
|
152
|
+
/* @__PURE__ */ t("div", { className: `${u}__btn-group ${i}-button__group`, children: o ? /* @__PURE__ */ f($, { children: [
|
|
153
|
+
/* @__PURE__ */ t(s, { id: `vlc-save-btn-${e}`, variant: l.ghost, type: "submit", onClick: it, children: Y }),
|
|
154
|
+
/* @__PURE__ */ t(s, { id: `vlc-cancel-btn-${e}`, variant: l.ghost, type: "button", onClick: lt, children: T })
|
|
155
|
+
] }) : /* @__PURE__ */ f($, { children: [
|
|
156
|
+
/* @__PURE__ */ t(s, { id: `vlc-edit-btn-${e}`, variant: l.ghost, type: "button", onClick: ut, children: k }),
|
|
153
157
|
/* @__PURE__ */ t(
|
|
154
|
-
|
|
155
|
-
{
|
|
156
|
-
id: `vlc-save-btn-${e}`,
|
|
157
|
-
variant: l.ghost,
|
|
158
|
-
type: "submit",
|
|
159
|
-
size: "sm",
|
|
160
|
-
onClick: ut,
|
|
161
|
-
children: Y
|
|
162
|
-
}
|
|
163
|
-
),
|
|
164
|
-
/* @__PURE__ */ t(
|
|
165
|
-
c,
|
|
166
|
-
{
|
|
167
|
-
id: `vlc-cancel-btn-${e}`,
|
|
168
|
-
variant: l.ghost,
|
|
169
|
-
type: "button",
|
|
170
|
-
size: "sm",
|
|
171
|
-
onClick: lt,
|
|
172
|
-
children: L
|
|
173
|
-
}
|
|
174
|
-
)
|
|
175
|
-
] }) : /* @__PURE__ */ m($, { children: [
|
|
176
|
-
/* @__PURE__ */ t(
|
|
177
|
-
c,
|
|
178
|
-
{
|
|
179
|
-
id: `vlc-edit-btn-${e}`,
|
|
180
|
-
variant: l.ghost,
|
|
181
|
-
type: "button",
|
|
182
|
-
size: "sm",
|
|
183
|
-
onClick: it,
|
|
184
|
-
children: _
|
|
185
|
-
}
|
|
186
|
-
),
|
|
187
|
-
/* @__PURE__ */ t(
|
|
188
|
-
c,
|
|
158
|
+
s,
|
|
189
159
|
{
|
|
190
160
|
id: `vlc-delete-btn-${e}`,
|
|
191
161
|
variant: l.ghost,
|
|
192
162
|
type: "button",
|
|
193
|
-
size: "sm",
|
|
194
163
|
onClick: () => typeof b == "function" && b(e),
|
|
195
|
-
children:
|
|
164
|
+
children: _
|
|
196
165
|
}
|
|
197
166
|
)
|
|
198
167
|
] }) })
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
.#{$px}-button {
|
|
4
4
|
@include bodyText;
|
|
5
|
+
@include labelText($button);
|
|
5
6
|
|
|
6
7
|
align-items: center;
|
|
7
8
|
background-color: $pure-black;
|
|
@@ -13,7 +14,7 @@
|
|
|
13
14
|
font-variation-settings: 'wght' 600;
|
|
14
15
|
gap: $margin-xsm;
|
|
15
16
|
justify-content: center;
|
|
16
|
-
padding:
|
|
17
|
+
padding: $padding-sm $padding-md;
|
|
17
18
|
position: relative;
|
|
18
19
|
transition:
|
|
19
20
|
color 0.25s,
|
|
@@ -21,6 +22,8 @@
|
|
|
21
22
|
|
|
22
23
|
svg {
|
|
23
24
|
fill: $pure-white;
|
|
25
|
+
height: $button-label-line-height;
|
|
26
|
+
width: $button-label-line-height;
|
|
24
27
|
|
|
25
28
|
path {
|
|
26
29
|
fill: $pure-white;
|
|
@@ -45,27 +48,6 @@
|
|
|
45
48
|
}
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
&--sm {
|
|
49
|
-
font-size: 0.75rem;
|
|
50
|
-
height: 44px;
|
|
51
|
-
|
|
52
|
-
svg {
|
|
53
|
-
height: 1rem;
|
|
54
|
-
width: 1rem;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&--md,
|
|
59
|
-
&--lg {
|
|
60
|
-
font-size: 1rem;
|
|
61
|
-
height: 48px;
|
|
62
|
-
|
|
63
|
-
svg {
|
|
64
|
-
height: 1.25rem;
|
|
65
|
-
width: 1.25rem;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
51
|
&--link {
|
|
70
52
|
background-color: transparent;
|
|
71
53
|
border: 0;
|
|
@@ -146,8 +128,7 @@
|
|
|
146
128
|
background-color: transparent;
|
|
147
129
|
border: 0;
|
|
148
130
|
color: $pure-black;
|
|
149
|
-
|
|
150
|
-
padding: 0;
|
|
131
|
+
padding: 0 $spacing-micro;
|
|
151
132
|
|
|
152
133
|
svg {
|
|
153
134
|
fill: $pure-black;
|
|
@@ -3,8 +3,15 @@
|
|
|
3
3
|
.#{$px}-icon-button {
|
|
4
4
|
align-items: center;
|
|
5
5
|
display: flex;
|
|
6
|
+
height: $spacing-md;
|
|
6
7
|
justify-content: center;
|
|
7
8
|
padding: 0;
|
|
9
|
+
width: $spacing-md;
|
|
10
|
+
|
|
11
|
+
& > svg {
|
|
12
|
+
height: $button-label-line-height;
|
|
13
|
+
width: $button-label-line-height;
|
|
14
|
+
}
|
|
8
15
|
|
|
9
16
|
&:focus-visible {
|
|
10
17
|
&:focus-visible {
|
|
@@ -21,14 +28,12 @@
|
|
|
21
28
|
&--ghost {
|
|
22
29
|
background: $pure-white;
|
|
23
30
|
color: $pure-black;
|
|
24
|
-
height: 44px;
|
|
25
|
-
width: 44px;
|
|
26
31
|
|
|
27
32
|
& > svg {
|
|
28
33
|
fill: $pure-black;
|
|
29
|
-
height: 1.
|
|
34
|
+
height: calc($button-label-line-height * 1.5); // design-cheats-for-button-large
|
|
30
35
|
margin-inline-end: unset;
|
|
31
|
-
width: 1.
|
|
36
|
+
width: calc($button-label-line-height * 1.5); // design-cheats-for-button-large
|
|
32
37
|
|
|
33
38
|
path {
|
|
34
39
|
fill: $pure-black;
|
|
@@ -58,22 +63,21 @@
|
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
|
|
66
|
+
&--secondary {
|
|
67
|
+
height: $spacing-lg;
|
|
68
|
+
width: $spacing-lg;
|
|
69
|
+
}
|
|
70
|
+
|
|
61
71
|
&--secondary,
|
|
62
72
|
&--tertiary.#{$px}-icon-button {
|
|
63
|
-
height: 28px;
|
|
64
|
-
padding: $spacing-xsm;
|
|
65
|
-
width: 28px;
|
|
66
|
-
|
|
67
73
|
&:focus-visible {
|
|
68
74
|
border-radius: 100px;
|
|
69
75
|
}
|
|
70
76
|
|
|
71
77
|
& > svg {
|
|
72
78
|
fill: $pure-black;
|
|
73
|
-
height: 1.25rem;
|
|
74
79
|
margin-inline-end: unset;
|
|
75
80
|
position: absolute;
|
|
76
|
-
width: 1.25rem;
|
|
77
81
|
|
|
78
82
|
path {
|
|
79
83
|
fill: $pure-black;
|
|
@@ -85,6 +89,20 @@
|
|
|
85
89
|
&:focus-visible {
|
|
86
90
|
border-radius: 100px;
|
|
87
91
|
}
|
|
92
|
+
|
|
93
|
+
&:hover {
|
|
94
|
+
background-color: $button-hover;
|
|
95
|
+
|
|
96
|
+
& > svg {
|
|
97
|
+
fill: $pure-white;
|
|
98
|
+
margin-inline-end: unset;
|
|
99
|
+
position: absolute;
|
|
100
|
+
|
|
101
|
+
path {
|
|
102
|
+
fill: $pure-white;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
88
106
|
}
|
|
89
107
|
|
|
90
108
|
&:disabled {
|
|
@@ -4,68 +4,66 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: row;
|
|
7
|
-
gap: $spacing-
|
|
8
|
-
}
|
|
7
|
+
gap: $spacing-xsm;
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
&-icon-button {
|
|
9
|
+
&__button {
|
|
12
10
|
&:disabled {
|
|
13
11
|
border: unset;
|
|
14
12
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
|
|
14
|
+
&:hover:not(:disabled) {
|
|
15
|
+
background-color: inherit;
|
|
16
|
+
|
|
17
|
+
svg path {
|
|
18
|
+
fill: $pure-black;
|
|
21
19
|
}
|
|
22
20
|
}
|
|
23
21
|
}
|
|
22
|
+
}
|
|
24
23
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
appearance: none;
|
|
30
|
-
border: none;
|
|
31
|
-
font-variation-settings: 'wght' 600;
|
|
32
|
-
line-height: 1.75rem;
|
|
33
|
-
margin-bottom: 0;
|
|
34
|
-
outline: none;
|
|
35
|
-
padding: 0 $spacing-xsm;
|
|
36
|
-
text-align: center;
|
|
37
|
-
text-align-last: center;
|
|
38
|
-
text-decoration: underline;
|
|
39
|
-
text-underline-offset: 6px;
|
|
24
|
+
.#{$px}--inline-pagination__wrapper {
|
|
25
|
+
select {
|
|
26
|
+
@include pText($body-size2);
|
|
40
27
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
28
|
+
appearance: none;
|
|
29
|
+
border: none;
|
|
30
|
+
font-variation-settings: 'wght' 600;
|
|
31
|
+
line-height: 1.75rem;
|
|
32
|
+
margin-bottom: 0;
|
|
33
|
+
outline: none;
|
|
34
|
+
padding: 0 $spacing-xsm;
|
|
35
|
+
text-align: center;
|
|
36
|
+
text-align-last: center;
|
|
37
|
+
text-decoration: underline;
|
|
38
|
+
text-underline-offset: 6px;
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
max-width: 5rem;
|
|
51
|
-
padding: 0.5rem;
|
|
52
|
-
text-decoration: none;
|
|
53
|
-
}
|
|
40
|
+
@include isHeaderDesktop {
|
|
41
|
+
line-height: 2.5rem;
|
|
42
|
+
text-underline-offset: 10px;
|
|
43
|
+
}
|
|
54
44
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
&:disabled {
|
|
46
|
+
border: 1px solid $medium-gray;
|
|
47
|
+
margin: auto;
|
|
48
|
+
max-height: 3.5rem;
|
|
49
|
+
max-width: 5rem;
|
|
50
|
+
padding: 0.5rem;
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
}
|
|
58
53
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
54
|
+
&:hover {
|
|
55
|
+
cursor: pointer;
|
|
62
56
|
}
|
|
63
57
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
display: none;
|
|
58
|
+
&:focus-visible {
|
|
59
|
+
outline: 1px solid $medium-gray;
|
|
67
60
|
}
|
|
68
61
|
}
|
|
62
|
+
|
|
63
|
+
select::-ms-expand {
|
|
64
|
+
border: none;
|
|
65
|
+
display: none;
|
|
66
|
+
}
|
|
69
67
|
}
|
|
70
68
|
|
|
71
69
|
.#{$px}-left-arrow {
|