@phillips/seldon 1.228.0 → 1.230.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.
@@ -1,52 +1,53 @@
1
- import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
- import * as z from "react";
3
- import r from "../../node_modules/classnames/index.js";
4
- import { px as t, useNormalizedInputProps as F } from "../../utils/index.js";
5
- import { TextVariants as M } from "../Text/types.js";
6
- import V from "../Text/Text.js";
7
- const q = z.forwardRef(
1
+ import { jsxs as h, jsx as s } from "react/jsx-runtime";
2
+ import * as _ from "react";
3
+ import l from "../../node_modules/classnames/index.js";
4
+ import { px as t, useNormalizedInputProps as z } from "../../utils/index.js";
5
+ import { TextVariants as F } from "../Text/types.js";
6
+ import H from "../Text/Text.js";
7
+ import { getInputClassNames as M } from "./utils.js";
8
+ const q = _.forwardRef(
8
9
  ({
9
10
  className: p,
10
- inputAdornment: i,
11
- adornmentPosition: l = "start",
12
- defaultValue: _,
13
- disabled: h,
11
+ inputAdornment: r,
12
+ adornmentPosition: m = "start",
13
+ defaultValue: b,
14
+ disabled: f,
14
15
  hideLabel: w,
15
- id: a,
16
- inline: b,
17
- invalid: f,
18
- invalidText: x,
19
- labelText: v,
20
- onChange: y,
21
- onClick: N,
22
- placeholder: I,
16
+ id: n,
17
+ inline: N,
18
+ invalid: x,
19
+ invalidText: y,
20
+ labelText: I,
21
+ onChange: v,
22
+ onClick: T,
23
+ placeholder: C,
23
24
  readOnly: d,
24
- size: T = "md",
25
- type: m = "text",
26
- value: C,
27
- warn: P,
28
- warnText: j,
29
- isSkeletonLoading: s,
30
- ...o
31
- }, k) => {
32
- const e = F({
33
- disabled: h,
34
- id: a,
35
- invalid: f,
36
- invalidText: x,
25
+ size: P = "md",
26
+ type: o = "text",
27
+ value: j,
28
+ warn: k,
29
+ warnText: E,
30
+ isSkeletonLoading: i,
31
+ ...u
32
+ }, R) => {
33
+ const e = z({
34
+ disabled: f,
35
+ id: n,
36
+ invalid: x,
37
+ invalidText: y,
37
38
  readOnly: d,
38
- type: m,
39
- warn: P,
40
- warnText: j
41
- }), R = r(`${t}-${m}-input`, `${t}-input`, `${t}-input--${T}`, {
42
- [`${t}-input--inline`]: b,
39
+ type: o,
40
+ warn: k,
41
+ warnText: E
42
+ }), V = l(`${t}-${o}-input`, `${t}-input`, `${t}-input--${P}`, {
43
+ [`${t}-input--inline`]: N,
43
44
  [`${t}-input--readonly`]: d,
44
45
  [`${t}-input--disabled`]: e.disabled,
45
46
  [`${t}-input--invalid`]: e.invalid,
46
47
  [`${t}-input--warn`]: e.warn,
47
48
  [`${p}__wrapper`]: p,
48
- [`${t}-input--hidden`]: o.hidden
49
- }), u = [
49
+ [`${t}-input--hidden`]: u.hidden
50
+ }), a = M(), c = [
50
51
  "text",
51
52
  "number",
52
53
  "password",
@@ -60,40 +61,40 @@ const q = z.forwardRef(
60
61
  "time",
61
62
  "week"
62
63
  ].includes(e.type ?? ""), $ = {
63
- className: i && u ? r(`${t}-input__wrapper__input`, p, { [`${t}-skeleton`]: s }) : r(`${t}-input__input`, p, { [`${t}-skeleton`]: s }),
64
- "data-testid": a,
64
+ className: r && c ? l(a.wrapperInput, p, { [`${t}-skeleton`]: i }) : l(a.input, p, { [`${t}-skeleton`]: i }),
65
+ "data-testid": n,
65
66
  disabled: e.disabled,
66
- id: a,
67
- onChange: y,
68
- onClick: N,
69
- placeholder: s ? "" : I,
67
+ id: n,
68
+ onChange: v,
69
+ onClick: T,
70
+ placeholder: i ? "" : C,
70
71
  readOnly: d,
71
- ref: k,
72
+ ref: R,
72
73
  type: e.type,
73
- ...e.type !== "checkbox" && e.type !== "radio" ? { value: C, defaultValue: _ } : {},
74
- ...o
74
+ ...e.type !== "checkbox" && e.type !== "radio" ? { value: j, defaultValue: b } : {},
75
+ ...u
75
76
  };
76
- return /* @__PURE__ */ c("div", { className: R, children: [
77
- /* @__PURE__ */ n(
78
- V,
77
+ return /* @__PURE__ */ h("div", { className: V, children: [
78
+ /* @__PURE__ */ s(
79
+ H,
79
80
  {
80
81
  element: "label",
81
- variant: M.labelMedium,
82
- className: r(`${t}-input__label`, {
83
- [`${t}-input__label--hidden`]: w,
84
- [`${t}-skeleton`]: s
82
+ variant: F.labelMedium,
83
+ className: l(a.label, {
84
+ [a.labelHidden]: w,
85
+ [a.skeleton]: i
85
86
  }),
86
- "data-testid": `label-${a}`,
87
- htmlFor: a,
88
- children: v
87
+ "data-testid": `label-${n}`,
88
+ htmlFor: n,
89
+ children: I
89
90
  }
90
91
  ),
91
- i && u ? /* @__PURE__ */ c("div", { className: `${t}-input__wrapper`, "data-testid": `wrapper-${a}`, children: [
92
- l === "start" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${a}`, children: i }),
93
- /* @__PURE__ */ n("input", { ...$ }),
94
- l === "end" && /* @__PURE__ */ n("span", { className: `${t}-input__wrapper__adornment`, id: "adornment", "data-testid": `adornment-${a}`, children: i })
95
- ] }) : /* @__PURE__ */ n("input", { ...$ }),
96
- e.validation ? e.validation : /* @__PURE__ */ n("p", { className: `${t}-input__empty-validation`, children: " " })
92
+ r && c ? /* @__PURE__ */ h("div", { className: a.wrapper, "data-testid": `wrapper-${n}`, children: [
93
+ m === "start" && /* @__PURE__ */ s("span", { className: a.adornment, id: "adornment", "data-testid": `adornment-${n}`, children: r }),
94
+ /* @__PURE__ */ s("input", { ...$ }),
95
+ m === "end" && /* @__PURE__ */ s("span", { className: a.adornment, id: "adornment", "data-testid": `adornment-${n}`, children: r })
96
+ ] }) : /* @__PURE__ */ s("input", { ...$ }),
97
+ e.validation ? e.validation : /* @__PURE__ */ s("p", { className: a.emptyValidation, children: " " })
97
98
  ] });
98
99
  }
99
100
  );
@@ -0,0 +1,11 @@
1
+ export declare const getInputClassNames: () => {
2
+ readonly adornment: "seldon-input__wrapper__adornment";
3
+ readonly emptyValidation: "seldon-input__empty-validation";
4
+ readonly input: "seldon-input__input";
5
+ readonly label: "seldon-input__label";
6
+ readonly labelHidden: "seldon-input__label--hidden";
7
+ readonly skeleton: "seldon-skeleton";
8
+ readonly validation: "seldon-input__validation";
9
+ readonly wrapper: "seldon-input__wrapper";
10
+ readonly wrapperInput: "seldon-input__wrapper__input";
11
+ };
@@ -0,0 +1,108 @@
1
+ import { px as p } from "../../utils/index.js";
2
+ import "react/jsx-runtime";
3
+ import "../../providers/SeldonProvider/utils.js";
4
+ import "react";
5
+ import "../Button/Button.js";
6
+ import "../IconButton/IconButton.js";
7
+ import "../Accordion/Accordion.js";
8
+ import "../Accordion/AccordionItem.js";
9
+ import "../../node_modules/classnames/index.js";
10
+ import "../Icon/Icon.js";
11
+ import "../Carousel/Carousel.js";
12
+ import "../Carousel/CarouselArrows.js";
13
+ import "../Carousel/CarouselContent.js";
14
+ import "../Carousel/CarouselItem.js";
15
+ import "../Carousel/CarouselDots.js";
16
+ import "../Collapsible/Collapsible.js";
17
+ import "../Collapsible/CollapsibleContent.js";
18
+ import "../Collapsible/CollapsibleTrigger.js";
19
+ import "../ContentPeek/ContentPeek.js";
20
+ import "../Detail/Detail.js";
21
+ import "../Drawer/Drawer.js";
22
+ import "../Dropdown/Dropdown.js";
23
+ import "../Grid/Grid.js";
24
+ import "../GridItem/GridItem.js";
25
+ import "./Input.js";
26
+ import "../Link/Link.js";
27
+ import "../Link/types.js";
28
+ import "../LinkBlock/LinkBlock.js";
29
+ import "../LinkList/LinkList.js";
30
+ import "../Modal/Modal.js";
31
+ import "../Navigation/Navigation.js";
32
+ import "../Navigation/NavigationItem/NavigationItem.js";
33
+ import "../Navigation/NavigationItemTrigger/NavigationItemTrigger.js";
34
+ import "../Navigation/NavigationList/NavigationList.js";
35
+ import "../Pagination/Pagination.js";
36
+ import "../PinchZoom/PinchZoom.js";
37
+ import "../Row/Row.js";
38
+ import "../Search/Search.js";
39
+ import "../SeldonImage/SeldonImage.js";
40
+ import "../Select/Select.js";
41
+ import "../SplitPanel/SplitPanel.js";
42
+ import "../Tabs/TabsContainer.js";
43
+ import "../Tabs/TabsContent.js";
44
+ import "../Tags/Tags.js";
45
+ import "../Text/Text.js";
46
+ import "../TextSymbol/TextSymbol.js";
47
+ import "../Video/Video.js";
48
+ import "../../patterns/DetailList/DetailList.js";
49
+ import "../../patterns/FavoritesCollectionTile/FavoritesCollectionTile.js";
50
+ import "../../patterns/HeroBanner/HeroBanner.js";
51
+ import "../../patterns/TextBanner/TextBanner.js";
52
+ import "../../patterns/LanguageSelector/LanguageSelector.js";
53
+ import "../../patterns/SaleHeaderBanner/SaleHeaderBanner.js";
54
+ import "../../patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js";
55
+ import "../../patterns/Social/Social.js";
56
+ import "../../patterns/Subscribe/Subscribe.js";
57
+ import "../../patterns/UserManagement/UserManagement.js";
58
+ import "../../patterns/ViewingsList/StatefulViewingsList.js";
59
+ import "../../patterns/ViewingsList/ViewingsList.js";
60
+ import "../ComboBox/ComboBox.js";
61
+ import "../ComposedModal/ComposedModal.js";
62
+ import "../ExitGateCard/ExitGateCard.js";
63
+ import "../Loader/Loader.js";
64
+ import "../PageContentWrapper/PageContentWrapper.js";
65
+ import "../../patterns/FiltersInline/FilterButton.js";
66
+ import "../../patterns/FiltersInline/FiltersInline.js";
67
+ import "../../patterns/SaleCard/SaleCard.js";
68
+ import "../../patterns/SaleCard/SaleCardActions.js";
69
+ import "../../patterns/ViewingDetails/ViewingDetails.js";
70
+ import "../ProgressIndicator/ProgressIndicator.js";
71
+ import "../../site-furniture/Header/Header.js";
72
+ import "../AddToCalendar/AddToCalendar.js";
73
+ import "../Article/Article.js";
74
+ import "../Countdown/Countdown.js";
75
+ import "../DescriptiveRadioButton/DescriptiveRadioButton.js";
76
+ import "../DescriptiveRadioButtonGroup/DescriptiveRadioButtonGroup.js";
77
+ import "../Divider/Divider.js";
78
+ import "../FavoritingTileButton/FavoritingTileButton.js";
79
+ import "../Filter/Filter.js";
80
+ import "../Filter/FilterInput.js";
81
+ import "../Filter/FilterHeader.js";
82
+ import "../NotificationBanner/NotificationBanner.js";
83
+ import "../Pictogram/Pictogram.js";
84
+ import "../TextArea/TextArea.js";
85
+ import "../Toast/Toast.js";
86
+ import "../Toast/ToastContextProvider.js";
87
+ import "../../patterns/AccountPageHeader/AccountPageHeader.js";
88
+ import "../../patterns/BidSnapshot/BidSnapshot.js";
89
+ import "../../patterns/FilterMenu/FilterMenu.js";
90
+ import "../../patterns/ObjectTile/ObjectTile.js";
91
+ import "../../patterns/CountryPicker/CountryPicker.js";
92
+ import "../../patterns/ProgressWizard/ProgressWizard.js";
93
+ import "../../patterns/ProgressWizard/types.js";
94
+ import "../../patterns/PhoneNumberInput/PhoneNumberInput.js";
95
+ const Lp = () => ({
96
+ adornment: `${p}-input__wrapper__adornment`,
97
+ emptyValidation: `${p}-input__empty-validation`,
98
+ input: `${p}-input__input`,
99
+ label: `${p}-input__label`,
100
+ labelHidden: `${p}-input__label--hidden`,
101
+ skeleton: `${p}-skeleton`,
102
+ validation: `${p}-input__validation`,
103
+ wrapper: `${p}-input__wrapper`,
104
+ wrapperInput: `${p}-input__wrapper__input`
105
+ });
106
+ export {
107
+ Lp as getInputClassNames
108
+ };
@@ -1,86 +1,87 @@
1
- import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
- import * as k from "react";
1
+ import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
+ import * as g from "react";
3
3
  import n from "../../node_modules/classnames/index.js";
4
- import { px as e, useNormalizedInputProps as z } from "../../utils/index.js";
4
+ import { px as e, useNormalizedInputProps as k } from "../../utils/index.js";
5
5
  import { SelectVariants as c } from "./types.js";
6
- import D from "../Icon/Icon.js";
7
- import { TextVariants as F } from "../Text/types.js";
8
- import I from "../Text/Text.js";
9
- const M = k.forwardRef(
6
+ import z from "../Icon/Icon.js";
7
+ import { TextVariants as D } from "../Text/types.js";
8
+ import F from "../Text/Text.js";
9
+ import { getInputClassNames as H } from "../Input/utils.js";
10
+ const M = g.forwardRef(
10
11
  ({
11
- children: m,
12
- className: i,
13
- defaultValue: d,
14
- disabled: u,
15
- hideLabel: $,
12
+ children: d,
13
+ className: s,
14
+ defaultValue: u,
15
+ disabled: $,
16
+ hideLabel: f,
16
17
  id: t,
17
- showIcon: r = !0,
18
- variant: _ = c.default,
19
- inline: f,
20
- invalid: b,
18
+ showIcon: o = !0,
19
+ variant: b = c.default,
20
+ inline: C,
21
+ invalid: _,
21
22
  invalidText: v,
22
- labelText: h,
23
- onChange: w,
24
- onClick: g,
25
- readOnly: o,
26
- size: x = "md",
27
- value: C,
23
+ labelText: w,
24
+ onChange: x,
25
+ onClick: q,
26
+ readOnly: p,
27
+ size: N = "md",
28
+ value: h,
28
29
  warn: y,
29
- warnText: N,
30
- isStandalone: S = !1,
31
- ...j
30
+ warnText: S,
31
+ isStandalone: j = !1,
32
+ ...I
32
33
  }, P) => {
33
- const l = "select", a = z({
34
- disabled: u,
34
+ const i = "select", a = k({
35
+ disabled: $,
35
36
  id: t,
36
- invalid: b,
37
+ invalid: _,
37
38
  invalidText: v,
38
- readOnly: o,
39
- type: l,
39
+ readOnly: p,
40
+ type: i,
40
41
  warn: y,
41
- warnText: N
42
- }), R = n(`${e}-${l}-input`, `${e}-input`, `${e}-input--${x}`, {
43
- [`${e}-input--inline`]: f,
44
- [`${e}-input--readonly`]: o,
42
+ warnText: S
43
+ }), l = H(), R = n(`${e}-${i}-input`, `${e}-input`, `${e}-input--${N}`, {
44
+ [`${e}-input--inline`]: C,
45
+ [`${e}-input--readonly`]: p,
45
46
  [`${e}-input--disabled`]: a.disabled,
46
47
  [`${e}-input--invalid`]: a.invalid,
47
48
  [`${e}-input--warn`]: a.warn,
48
- [`${i}__wrapper`]: i,
49
- [`${e}-${l}-input__standalone`]: S
50
- }), T = n(i, `${e}-input__input`, {
51
- [`${e}-input__select--tertiary`]: _ === c.tertiary
49
+ [`${s}__wrapper`]: s,
50
+ [`${e}-${i}-input__standalone`]: j
51
+ }), T = n(s, l.input, {
52
+ [`${e}-input__select--tertiary`]: b === c.tertiary
52
53
  }), V = n(`${e}-select-container`, {
53
- [`${e}-select-container--show__icon`]: r
54
+ [`${e}-select-container--show__icon`]: o
54
55
  });
55
- return /* @__PURE__ */ p("div", { className: R, children: [
56
- /* @__PURE__ */ s(
57
- I,
56
+ return /* @__PURE__ */ m("div", { className: R, children: [
57
+ /* @__PURE__ */ r(
58
+ F,
58
59
  {
59
60
  element: "label",
60
- variant: F.labelMedium,
61
+ variant: D.labelMedium,
61
62
  "data-testid": `${t}-label`,
62
63
  htmlFor: t,
63
- className: n(`${e}-input__label`, { [`${e}-input__label--hidden`]: $ }),
64
- children: h
64
+ className: n(l.label, { [l.labelHidden]: f }),
65
+ children: w
65
66
  }
66
67
  ),
67
- /* @__PURE__ */ p("div", { className: V, children: [
68
- /* @__PURE__ */ s(
68
+ /* @__PURE__ */ m("div", { className: V, children: [
69
+ /* @__PURE__ */ r(
69
70
  "select",
70
71
  {
71
72
  className: T,
72
73
  "data-testid": t,
73
- defaultValue: d,
74
+ defaultValue: u,
74
75
  disabled: a.disabled,
75
76
  id: t,
76
- onChange: w,
77
+ onChange: x,
77
78
  ref: P,
78
- value: C,
79
- ...j,
80
- children: m
79
+ value: h,
80
+ ...I,
81
+ children: d
81
82
  }
82
83
  ),
83
- r ? /* @__PURE__ */ s(D, { icon: "ChevronDown" }) : null
84
+ o ? /* @__PURE__ */ r(z, { icon: "ChevronDown" }) : null
84
85
  ] }),
85
86
  a.validation
86
87
  ] });
@@ -1,70 +1,71 @@
1
- import { jsxs as d, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
2
  import k from "../../components/Icon/Icon.js";
3
3
  import { TextVariants as w } from "../../components/Text/types.js";
4
- import p from "../../components/Text/Text.js";
5
- import t from "../../node_modules/classnames/index.js";
6
- import { countries as P } from "./constants.js";
7
- import { forwardRef as b } from "react";
8
- import { useNormalizedInputProps as I, px as T } from "../../utils/index.js";
9
- const j = b(
4
+ import m from "../../components/Text/Text.js";
5
+ import i from "../../node_modules/classnames/index.js";
6
+ import { countries as I } from "./constants.js";
7
+ import { forwardRef as P } from "react";
8
+ import { useNormalizedInputProps as T } from "../../utils/index.js";
9
+ import { getInputClassNames as N } from "../../components/Input/utils.js";
10
+ const V = P(
10
11
  ({
11
- labelText: g,
12
- ariaLabel: m = g,
13
- displayValue: _,
14
- onClick: f,
12
+ labelText: d,
13
+ ariaLabel: s = d,
14
+ displayValue: f,
15
+ onClick: _,
15
16
  hasError: n = !1,
16
- errorMsg: s,
17
+ errorMsg: u,
17
18
  id: o,
18
- className: u,
19
+ className: h,
19
20
  baseClassName: r,
20
- variantConfig: h
21
- }, $) => {
22
- const { isPhone: l, value: c } = h, e = I({
21
+ variantConfig: $
22
+ }, v) => {
23
+ const { isPhone: l, value: a } = $, e = T({
23
24
  id: "country-picker-trigger-input",
24
25
  invalid: n,
25
- invalidText: s,
26
+ invalidText: u,
26
27
  type: "text"
27
- }), v = e.invalidId, a = l ? c : P.filter((y) => y.name === c)?.[0]?.code, x = () => e.validation ? e.validation : /* @__PURE__ */ i("p", { className: `${T}-input__empty-validation`, children: " " });
28
- return /* @__PURE__ */ d("div", { className: t(`${r}__trigger`, u), children: [
29
- /* @__PURE__ */ i(
30
- p,
28
+ }), c = N(), y = e.invalidId, g = l ? a : I.filter((b) => b.name === a)?.[0]?.code, x = () => e.validation ? e.validation : /* @__PURE__ */ t("p", { className: c.emptyValidation, children: " " });
29
+ return /* @__PURE__ */ p("div", { className: i(`${r}__trigger`, h), children: [
30
+ /* @__PURE__ */ t(
31
+ m,
31
32
  {
32
33
  element: "label",
33
34
  variant: w.labelMedium,
34
- className: t(`${r}__trigger-label`, {
35
+ className: i(`${r}__trigger-label`, c.label, {
35
36
  [`${r}__trigger-label--error`]: n
36
37
  }),
37
38
  id: o ? `${o}-label` : void 0,
38
- children: g
39
+ children: d
39
40
  }
40
41
  ),
41
- /* @__PURE__ */ d(
42
+ /* @__PURE__ */ p(
42
43
  "button",
43
44
  {
44
- ref: $,
45
+ ref: v,
45
46
  type: "button",
46
- "aria-label": m,
47
+ "aria-label": s,
47
48
  "aria-invalid": e.invalid,
48
- "aria-describedby": v,
49
- className: t(`${r}__trigger-btn`, {
49
+ "aria-describedby": y,
50
+ className: i(`${r}__trigger-btn`, c.input, {
50
51
  [`${r}__trigger-btn--error`]: n,
51
52
  [`${r}__trigger-btn--is-phone`]: l
52
53
  }),
53
- onClick: f,
54
+ onClick: _,
54
55
  "data-testid": "country-picker-trigger",
55
56
  id: o,
56
57
  children: [
57
- a && /* @__PURE__ */ i("span", { className: `${r}__trigger-flag`, children: /* @__PURE__ */ i(
58
+ g && /* @__PURE__ */ t("span", { className: `${r}__trigger-flag`, children: /* @__PURE__ */ t(
58
59
  "img",
59
60
  {
60
- src: `https://flagcdn.com/h20/${a.toLowerCase()}.png`,
61
- srcSet: `https://flagcdn.com/h40/${a.toLowerCase()}.png 2x`,
62
- alt: `${c} flag`,
61
+ src: `https://flagcdn.com/h20/${g.toLowerCase()}.png`,
62
+ srcSet: `https://flagcdn.com/h40/${g.toLowerCase()}.png 2x`,
63
+ alt: `${a} flag`,
63
64
  className: `${r}__trigger-flag-img`
64
65
  }
65
66
  ) }),
66
- /* @__PURE__ */ i(p, { className: t(`${r}__trigger-text`), children: _ }),
67
- /* @__PURE__ */ i("span", { className: t(`${r}__trigger-icon`), children: /* @__PURE__ */ i(k, { icon: "ChevronDown", color: "black-100", width: 16, height: 16 }) })
67
+ /* @__PURE__ */ t(m, { className: i(`${r}__trigger-text`), children: f }),
68
+ /* @__PURE__ */ t("span", { className: i(`${r}__trigger-icon`), children: /* @__PURE__ */ t(k, { icon: "ChevronDown", color: "black-100", width: 16, height: 16 }) })
68
69
  ]
69
70
  }
70
71
  ),
@@ -72,7 +73,7 @@ const j = b(
72
73
  ] });
73
74
  }
74
75
  );
75
- j.displayName = "CountryPickerTrigger";
76
+ V.displayName = "CountryPickerTrigger";
76
77
  export {
77
- j as default
78
+ V as default
78
79
  };
@@ -2,9 +2,9 @@ import { jsxs as p, jsx as e } from "react/jsx-runtime";
2
2
  import b, { forwardRef as _ } from "react";
3
3
  import { getCommonProps as P, px as x, useNormalizedInputProps as I } from "../../utils/index.js";
4
4
  import $ from "../../node_modules/classnames/index.js";
5
- import S from "../CountryPicker/CountryPicker.js";
6
- import T from "../../components/Input/Input.js";
7
- import { getSafeCountryCallingCode as L } from "../CountryPicker/utils.js";
5
+ import L from "../CountryPicker/CountryPicker.js";
6
+ import S from "../../components/Input/Input.js";
7
+ import { getSafeCountryCallingCode as T } from "../CountryPicker/utils.js";
8
8
  import { countries as j } from "../CountryPicker/constants.js";
9
9
  const k = _(
10
10
  ({
@@ -41,11 +41,11 @@ const k = _(
41
41
  }
42
42
  ),
43
43
  /* @__PURE__ */ e(
44
- S,
44
+ L,
45
45
  {
46
46
  triggerLabelText: n,
47
47
  triggerAriaLabel: `${n.replace("*", "")} country`,
48
- triggerDisplayValue: i ? `+${L(i.code)}` : "",
48
+ triggerDisplayValue: i ? `+${T(i.code)}` : "",
49
49
  hasTriggerError: !!a,
50
50
  modalTitle: "Country code",
51
51
  searchInputLabel: "Search country",
@@ -58,7 +58,7 @@ const k = _(
58
58
  )
59
59
  ] }),
60
60
  /* @__PURE__ */ e("div", { className: `${t}__input`, children: /* @__PURE__ */ e(
61
- T,
61
+ S,
62
62
  {
63
63
  className: `${t}__input-phone`,
64
64
  id: "phone-input",
@@ -71,7 +71,8 @@ const k = _(
71
71
  invalid: !!a,
72
72
  disabled: y,
73
73
  invalidText: "",
74
- "aria-describedby": r.invalidId
74
+ "aria-describedby": r.invalidId,
75
+ maxLength: 25
75
76
  }
76
77
  ) })
77
78
  ] }),
@@ -7,8 +7,8 @@
7
7
  width: 100%;
8
8
 
9
9
  &-label {
10
- font-variation-settings: 'wght' 600;
11
10
  margin-bottom: $spacing-xsm;
11
+ white-space: nowrap;
12
12
 
13
13
  &--error {
14
14
  color: $error-red;
@@ -16,6 +16,8 @@
16
16
  }
17
17
 
18
18
  &-btn {
19
+ @include text($bodyMedium);
20
+
19
21
  align-items: center;
20
22
  appearance: none;
21
23
  background: $white;
@@ -46,6 +48,8 @@
46
48
  &-text {
47
49
  flex: 1;
48
50
  font-variation-settings: 'wght' 600;
51
+ margin-left: $spacing-xsm;
52
+ margin-right: $spacing-xsm;
49
53
  overflow: hidden;
50
54
  text-align: left;
51
55
  text-overflow: ellipsis;
@@ -55,17 +59,11 @@
55
59
  &-icon {
56
60
  align-items: center;
57
61
  display: flex;
58
- margin-left: $spacing-sm;
59
-
60
- @media (min-width: $breakpoint-md) {
61
- height: 1.25rem;
62
- width: 1.25rem;
63
- }
64
62
 
65
- @media (min-width: $breakpoint-xl) {
66
- height: 1.5rem;
67
- width: 1.5rem;
68
- }
63
+ // 1.4em matches the line-height from body-styles mixin, ensuring icon scales with font-size at different breakpoints
64
+ // This keeps the trigger button height aligned with the Input component across all screen sizes
65
+ height: 1.4em;
66
+ width: 1.4em;
69
67
  }
70
68
 
71
69
  &-flag {
@@ -73,7 +71,6 @@
73
71
  display: flex;
74
72
  height: 1rem;
75
73
  justify-content: center;
76
- margin-right: $spacing-sm;
77
74
  overflow: hidden;
78
75
  width: 1.5rem;
79
76
 
@@ -1,13 +1,28 @@
1
1
  @use '../../allPartials' as *;
2
2
 
3
3
  .#{$px}-filter-button {
4
- border: 1.5px solid $light-gray;
4
+ border: 1px solid $bg-border;
5
5
  gap: 4px;
6
6
  height: inherit;
7
7
  padding: $spacing-xsm $spacing-sm;
8
8
 
9
+ &:hover {
10
+ border: 1px solid $black-100;
11
+ box-shadow: none;
12
+ }
13
+
14
+ &:focus-visible {
15
+ box-shadow: 0 0 0 0.5px $bg-border;
16
+ outline: none;
17
+ }
18
+
9
19
  &--selected {
10
- border: 1.5px solid $black-100;
20
+ border: 1px solid $black-100;
21
+
22
+ &:focus-visible {
23
+ box-shadow: 0 0 0 0.5px $black-100;
24
+ outline: none;
25
+ }
11
26
  }
12
27
 
13
28
  &--filter {
@@ -15,18 +15,12 @@
15
15
  }
16
16
 
17
17
  &__country-picker {
18
- flex: 0 0 25%;
19
- margin-right: $spacing-xsm;
20
- min-width: 150px; // just big enough for flag and 3 digit code
18
+ flex: 0 0 30%;
21
19
  }
22
20
 
23
21
  &__input {
24
- flex: 1 1 75%;
25
- flex-grow: 1;
26
-
27
- &-phone {
28
- margin-bottom: 0;
29
- }
22
+ flex: 1 1 70%;
23
+ min-width: 0; // ensures input shrinks properly in flex container, 0 prevents overflow and lets flex-basis do its thing
30
24
 
31
25
  // Hide input validation inside phone number input, we use a shared one
32
26
  .#{$px}-input__validation {
@@ -39,17 +33,13 @@
39
33
  }
40
34
 
41
35
  @media screen and (min-width: $breakpoint-xl) {
42
- &__wrapper {
43
- align-items: center;
44
- }
45
-
46
36
  &__country-picker {
47
- flex: 0 0 40%;
37
+ flex: 0 0 37.5%;
48
38
  min-width: 0;
49
39
  }
50
40
 
51
41
  &__input {
52
- flex: 1 1 60%;
42
+ flex: 1 1 62.5%;
53
43
  min-width: 0;
54
44
  }
55
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.228.0",
3
+ "version": "1.230.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"