@phillips/seldon 1.34.0 → 1.35.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,45 +1,54 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { kebabCase as c } from "../node_modules/change-case/dist/index.js";
3
- const t = "phillips", v = ({ id: a, ...i }, e) => {
4
- const l = c(e);
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { kebabCase as d } from "../node_modules/change-case/dist/index.js";
3
+ import * as u from "react";
4
+ const i = "phillips", v = ({ id: e, ...n }, a) => {
5
+ const t = d(a);
5
6
  return {
6
- ...i,
7
- "data-testid": a ? `${l}-${a}` : `${l}`,
8
- className: `${t}-${l}`
7
+ ...n,
8
+ "data-testid": e ? `${t}-${e}` : `${t}`,
9
+ className: `${i}-${t}`
9
10
  };
10
11
  };
11
- var $ = /* @__PURE__ */ ((a) => (a.xs = "xs", a.sm = "sm", a.md = "md", a.lg = "lg", a.xl = "xl", a))($ || {});
12
- const f = () => {
12
+ var p = /* @__PURE__ */ ((e) => (e.xs = "xs", e.sm = "sm", e.md = "md", e.lg = "lg", e.xl = "xl", e))(p || {});
13
+ const g = () => {
13
14
  };
14
15
  function x({
15
- disabled: a = !1,
16
- id: i,
17
- invalid: e = !1,
18
- invalidText: l = "invalid",
19
- readOnly: s = !1,
20
- type: r,
21
- warn: m = !1,
22
- warnText: d
16
+ disabled: e = !1,
17
+ id: n,
18
+ invalid: a = !1,
19
+ invalidText: t = "invalid",
20
+ readOnly: r = !1,
21
+ type: s,
22
+ warn: l = !1,
23
+ warnText: c
23
24
  }) {
24
- const n = {
25
- disabled: !s && a,
26
- invalid: !s && !a && e,
27
- invalidId: `${i}-error-msg`,
28
- type: r === "toggle" ? "checkbox" : r,
29
- warn: !s && !a && !e && m,
30
- warnId: `${i}-warn-msg`,
25
+ const o = {
26
+ disabled: !r && e,
27
+ invalid: !r && !e && a,
28
+ invalidId: `${n}-error-msg`,
29
+ type: s === "toggle" ? "checkbox" : s,
30
+ warn: !r && !e && !a && l,
31
+ warnId: `${n}-warn-msg`,
31
32
  validation: null
32
33
  };
33
- return n.invalid && (n.validation = /* @__PURE__ */ o("div", { className: `${t}-input__validation ${t}-${r}-input--invalid`, id: n.invalidId, children: l })), n.warn && (n.validation = /* @__PURE__ */ o("div", { className: `${t}-input__validation ${t}-${r}-input--warn`, id: n.warnId, children: d })), n;
34
+ return o.invalid && (o.validation = /* @__PURE__ */ m("div", { className: `${i}-input__validation ${i}-${s}-input--invalid`, id: o.invalidId, children: t })), o.warn && (o.validation = /* @__PURE__ */ m("div", { className: `${i}-input__validation ${i}-${s}-input--warn`, id: o.warnId, children: c })), o;
34
35
  }
35
- const g = (/* @__PURE__ */ new Date()).getFullYear(), w = (a, i = "end", e = "vertical") => `${t}-padding-${e}-${a}-${i}`, N = (a) => /(.+)@(.+){2,}\.(.+){2,}/i.test(a);
36
+ const C = (/* @__PURE__ */ new Date()).getFullYear(), w = (e, n = "end", a = "vertical") => `${i}-padding-${a}-${e}-${n}`, h = (e) => /(.+)@(.+){2,}\.(.+){2,}/i.test(e), I = function(e, n, a = !1) {
37
+ const t = u.Children.toArray(e).filter((r) => r && r.type === n && !a ? r : r && r.type !== n && a);
38
+ return t.length > 0 ? t : null;
39
+ }, N = (e) => {
40
+ const n = e.split("?"), a = new URLSearchParams(n[1]), r = Array.from(a.entries()).map(([l, c]) => [l, encodeURIComponent(c)]).map(([l, c]) => `${l}=${c}`).join("&");
41
+ return `${n[0]}?${r}`;
42
+ };
36
43
  export {
37
- $ as PaddingTokens,
38
- g as defaultYear,
39
- N as emailValidation,
44
+ p as PaddingTokens,
45
+ C as defaultYear,
46
+ h as emailValidation,
47
+ N as encodeURLSearchParams,
48
+ I as findChildrenOfType,
40
49
  w as generatePaddingClassName,
41
50
  v as getCommonProps,
42
- f as noOp,
43
- t as px,
51
+ g as noOp,
52
+ i as px,
44
53
  x as useNormalizedInputProps
45
54
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phillips/seldon",
3
- "version": "1.34.0",
3
+ "version": "1.35.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/PhillipsAuctionHouse/seldon"
@@ -54,7 +54,7 @@
54
54
  "@semantic-release/changelog": "^6.0.3",
55
55
  "@semantic-release/git": "^10.0.1",
56
56
  "@semantic-release/github": "^10.1.0",
57
- "@storybook/addon-essentials": "^8.2.5",
57
+ "@storybook/addon-essentials": "^8.2.7",
58
58
  "@storybook/addon-interactions": "^8.1.4",
59
59
  "@storybook/addon-links": "^8.1.4",
60
60
  "@storybook/addon-mdx-gfm": "^8.2.4",