@caspeco/casper-ui-library 5.1.0 → 5.2.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/README.md CHANGED
@@ -63,3 +63,4 @@ export default defineConfig({
63
63
  3. Make your changes.
64
64
  4. Bump the `version` field in `package.json` (following [Semantic versioning](https://semver.org/)) and run `npm install`.
65
65
  5. Open a [pull request](https://github.com/Caspeco/casper-ui-library/pulls) using the template and assign a reviewer.
66
+ 6. When you have gotten your PR approved, merge the PR. If you have a new version in package.json it will automatically publish your changes to npm. A new version of the documentation website will always be built.
@@ -1,5 +1,5 @@
1
1
  import { BreadcrumbItemProps as ChakraBreadcrumbItemProps } from '@chakra-ui/react';
2
- type ChakraBreadcrumbItemProperties = Pick<ChakraBreadcrumbItemProps, "children" | "isCurrentPage" | "key" | "color">;
2
+ type ChakraBreadcrumbItemProperties = Pick<ChakraBreadcrumbItemProps, "overflow" | "children" | "isCurrentPage" | "key" | "color">;
3
3
  export type BreadcrumbItemProps = ChakraBreadcrumbItemProperties;
4
4
  export declare function BreadcrumbItem({ children, ...props }: BreadcrumbItemProps): import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb-item.d.ts","sourceRoot":"","sources":["../../../lib/components/breadcrumbs/breadcrumb-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,mBAAmB,IAAI,yBAAyB,EACrD,MAAM,kBAAkB,CAAC;AAE1B,KAAK,8BAA8B,GAAG,IAAI,CACzC,yBAAyB,EACzB,UAAU,GAAG,eAAe,GAAG,KAAK,GAAG,OAAO,CAC9C,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAEjE,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAEzE"}
1
+ {"version":3,"file":"breadcrumb-item.d.ts","sourceRoot":"","sources":["../../../lib/components/breadcrumbs/breadcrumb-item.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,mBAAmB,IAAI,yBAAyB,EACrD,MAAM,kBAAkB,CAAC;AAE1B,KAAK,8BAA8B,GAAG,IAAI,CACzC,yBAAyB,EACzB,UAAU,GAAG,UAAU,GAAG,eAAe,GAAG,KAAK,GAAG,OAAO,CAC3D,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG,8BAA8B,CAAC;AAEjE,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAMzE"}
@@ -1,8 +1,8 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { BreadcrumbItem as t } from "@chakra-ui/react";
3
- function a({ children: r, ...m }) {
4
- return /* @__PURE__ */ e(t, { ...m, children: r });
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { BreadcrumbItem as o } from "@chakra-ui/react";
3
+ function c({ children: r, ...e }) {
4
+ return /* @__PURE__ */ m(o, { whiteSpace: "nowrap", overflow: "hidden", ...e, children: r });
5
5
  }
6
6
  export {
7
- a as BreadcrumbItem
7
+ c as BreadcrumbItem
8
8
  };
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb-link.d.ts","sourceRoot":"","sources":["../../../lib/components/breadcrumbs/breadcrumb-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,mBAAmB,IAAI,yBAAyB,EACrD,MAAM,kBAAkB,CAAC;AAE1B,KAAK,8BAA8B,GAAG,IAAI,CAAC,yBAAyB,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;AAClG,MAAM,MAAM,mBAAmB,GAAG,8BAA8B,GAAG;IAClE,EAAE,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAEzE"}
1
+ {"version":3,"file":"breadcrumb-link.d.ts","sourceRoot":"","sources":["../../../lib/components/breadcrumbs/breadcrumb-link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,mBAAmB,IAAI,yBAAyB,EACrD,MAAM,kBAAkB,CAAC;AAE1B,KAAK,8BAA8B,GAAG,IAAI,CAAC,yBAAyB,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,CAAC,CAAC;AAClG,MAAM,MAAM,mBAAmB,GAAG,8BAA8B,GAAG;IAClE,EAAE,CAAC,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,mBAAmB,2CAMzE"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { BreadcrumbLink as n } from "@chakra-ui/react";
3
- function t({ children: r, ...m }) {
4
- return /* @__PURE__ */ i(n, { ...m, children: r });
2
+ import { BreadcrumbLink as o } from "@chakra-ui/react";
3
+ function t({ children: r, ...e }) {
4
+ return /* @__PURE__ */ i(o, { overflow: "hidden", textOverflow: "ellipsis", ...e, children: r });
5
5
  }
6
6
  export {
7
7
  t as BreadcrumbLink
@@ -1,11 +1,22 @@
1
+ import { As } from '@chakra-ui/react';
1
2
  export type Breadcrumb = {
2
3
  title: string;
3
- as?: any;
4
+ as?: As;
4
5
  to?: string;
5
6
  href?: string;
6
7
  };
7
8
  export type BreadcrumbsProps = {
9
+ /**
10
+ * The number of items to show before the ellipsis when collapsed.
11
+ * @default 1
12
+ */
13
+ itemsBeforeCollapse?: number;
14
+ /**
15
+ * The number of items to show after the ellipsis when collapsed.
16
+ * @default 2
17
+ */
18
+ itemsAfterCollapse?: number;
8
19
  breadCrumbs: Breadcrumb[];
9
20
  };
10
- export declare function Breadcrumbs({ breadCrumbs }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function Breadcrumbs({ breadCrumbs, itemsBeforeCollapse, itemsAfterCollapse, }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
11
22
  //# sourceMappingURL=breadcrumbs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../lib/components/breadcrumbs/breadcrumbs.tsx"],"names":[],"mappings":"AAMA,MAAM,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,GAAG,CAAC;IACT,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAMF,MAAM,MAAM,gBAAgB,GAAG;IAC9B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC1B,CAAC;AAgEF,wBAAgB,WAAW,CAAC,EAAE,WAAW,EAAE,EAAE,gBAAgB,2CAoC5D"}
1
+ {"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../lib/components/breadcrumbs/breadcrumbs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkC,KAAK,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAI3E,MAAM,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,EAAE,CAAC;IACR,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAMF,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC1B,CAAC;AAgEF,wBAAgB,WAAW,CAAC,EAC3B,WAAW,EACX,mBAAuB,EACvB,kBAAsB,GACtB,EAAE,gBAAgB,2CA6DlB"}
@@ -1,55 +1,80 @@
1
- import { jsx as o, jsxs as h } from "react/jsx-runtime";
2
- import { Breadcrumb as p } from "@chakra-ui/react";
3
- import { BreadcrumbItem as u } from "./breadcrumb-item.js";
4
- import { BreadcrumbLink as f } from "./breadcrumb-link.js";
5
- import { Menu as d } from "../menu/menu.js";
6
- import { MenuButton as g } from "../menu/menu-button.js";
7
- import { MenuList as M } from "../menu/menu-list.js";
8
- import { MenuItem as s } from "../menu/menu-item.js";
9
- import { ThemeFontVariable as k, ThemeFontSizeVariable as S, ThemeColorVariable as c } from "../../theme/theme-types.js";
10
- function y({ key: n, isCurrentPage: i, breadCrumb: t }) {
11
- const e = i ? c.OnBackground : c.OnBackgroundSubdued;
12
- return /* @__PURE__ */ h(u, { isCurrentPage: i, color: e, children: [
13
- t.as && t.to && !t.href && /* @__PURE__ */ o(f, { as: t.as, to: t.to, children: t.title }),
14
- t.href && !t.as && !t.to && /* @__PURE__ */ o(f, { href: t.href, children: t.title })
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
+ import { Breadcrumb as f } from "@chakra-ui/react";
3
+ import { BreadcrumbItem as M } from "./breadcrumb-item.js";
4
+ import { BreadcrumbLink as m } from "./breadcrumb-link.js";
5
+ import { Menu as O } from "../menu/menu.js";
6
+ import { MenuButton as w } from "../menu/menu-button.js";
7
+ import { MenuList as z } from "../menu/menu-list.js";
8
+ import { MenuItem as u } from "../menu/menu-item.js";
9
+ import { ThemeFontVariable as a, ThemeFontSizeVariable as B, ThemeColorVariable as c } from "../../theme/theme-types.js";
10
+ function g({ key: n, isCurrentPage: e, breadCrumb: t }) {
11
+ const i = e ? c.OnBackground : c.OnBackgroundSubdued;
12
+ return /* @__PURE__ */ d(M, { isCurrentPage: e, color: i, children: [
13
+ t.as && t.to && !t.href && /* @__PURE__ */ o(m, { as: t.as, to: t.to, children: t.title }),
14
+ t.href && !t.as && !t.to && /* @__PURE__ */ o(m, { href: t.href, children: t.title })
15
15
  ] }, n);
16
16
  }
17
- function I({ key: n, breadCrumbs: i }) {
18
- return /* @__PURE__ */ o(u, { color: c.OnBackgroundSubdued, children: /* @__PURE__ */ h(d, { children: [
19
- /* @__PURE__ */ o(g, { variant: "ghost", size: "sm", "aria-label": "Show collapsed items", children: "..." }),
20
- /* @__PURE__ */ o(M, { children: i.map((t, e) => t.as && t.to ? /* @__PURE__ */ o(s, { as: t.as, to: t.to, children: t.title }, e) : t.href ? /* @__PURE__ */ o(s, { itemType: "link", href: t.href, children: t.title }, e) : /* @__PURE__ */ o(s, { isDisabled: !0, children: t.title }, e)) })
17
+ function F({ key: n, breadCrumbs: e }) {
18
+ return /* @__PURE__ */ o(M, { overflow: "unset", color: c.OnBackgroundSubdued, children: /* @__PURE__ */ d(O, { children: [
19
+ /* @__PURE__ */ o(w, { variant: "ghost", size: "sm", "aria-label": "Show collapsed items", children: "..." }),
20
+ /* @__PURE__ */ o(z, { children: e.map((t, i) => t.as && t.to ? /* @__PURE__ */ o(u, { as: t.as, to: t.to, children: t.title }, i) : t.href ? /* @__PURE__ */ o(u, { itemType: "link", href: t.href, children: t.title }, i) : /* @__PURE__ */ o(u, { isDisabled: !0, children: t.title }, i)) })
21
21
  ] }) }, n);
22
22
  }
23
- function D({ breadCrumbs: n }) {
24
- const i = n.length > 4, t = i ? n.slice(1, -2) : [], e = n.filter((r) => !t.includes(r)), m = i ? [
25
- ...e.slice(0, 1),
23
+ function H({
24
+ breadCrumbs: n,
25
+ itemsBeforeCollapse: e = 1,
26
+ itemsAfterCollapse: t = 2
27
+ }) {
28
+ const i = e + t;
29
+ if (!(n.length > i)) {
30
+ const l = n;
31
+ return /* @__PURE__ */ o(
32
+ f,
33
+ {
34
+ color: c.OnBackground,
35
+ fontSize: B.Medium,
36
+ fontFamily: a.Body,
37
+ width: "100%",
38
+ children: l.map((r, s, h) => {
39
+ const I = s + 1 === h.length;
40
+ return g({
41
+ key: s.toString(),
42
+ isCurrentPage: I,
43
+ breadCrumb: r
44
+ });
45
+ })
46
+ }
47
+ );
48
+ }
49
+ const k = n.slice(0, e), p = t > 0 ? n.slice(-t) : [], S = n.slice(e, n.length - t), y = [
50
+ ...k,
26
51
  {
27
52
  title: "",
28
- as: "",
29
53
  isMenuButton: !0
30
54
  },
31
- ...e.slice(1)
32
- ] : e;
55
+ ...p
56
+ ];
33
57
  return /* @__PURE__ */ o(
34
- p,
58
+ f,
35
59
  {
36
60
  color: c.OnBackground,
37
- fontSize: S.Medium,
38
- fontFamily: k.Body,
39
- children: m.map((r, l, a) => {
40
- const B = l + 1 === a.length;
41
- return r.isMenuButton ? I({
42
- key: l.toString(),
43
- breadCrumbs: t
44
- }) : y({
45
- key: l.toString(),
46
- isCurrentPage: B,
47
- breadCrumb: r
61
+ fontSize: B.Medium,
62
+ fontFamily: a.Body,
63
+ width: "100%",
64
+ children: y.map((l, r, s) => {
65
+ const h = r + 1 === s.length;
66
+ return l.isMenuButton ? F({
67
+ key: r.toString(),
68
+ breadCrumbs: S
69
+ }) : g({
70
+ key: r.toString(),
71
+ isCurrentPage: h,
72
+ breadCrumb: l
48
73
  });
49
74
  })
50
75
  }
51
76
  );
52
77
  }
53
78
  export {
54
- D as Breadcrumbs
79
+ H as Breadcrumbs
55
80
  };
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-button.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAsBlD,wBAAgB,cAAc,CAAC,EAC9B,EAAE,EACF,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,IAAI,EACJ,OAAO,EACP,KAAK,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,cAAc,GACd,EAAE,kBAAkB,2CAwKpB"}
1
+ {"version":3,"file":"combobox-button.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-button.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAsBlD,wBAAgB,cAAc,CAAC,EAC9B,EAAE,EACF,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,cAAc,EACd,SAAS,EACT,aAAa,EACb,IAAI,EACJ,OAAO,EACP,KAAK,EACL,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,QAAQ,EACR,cAAc,GACd,EAAE,kBAAkB,2CAiLpB"}
@@ -1,16 +1,16 @@
1
1
  import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
- import { useStyleConfig as E, Flex as u, Box as d, Input as F } from "@chakra-ui/react";
3
- import { Fragment as L } from "react";
4
- import { ComboboxItem as O } from "./combobox-item.js";
5
- import { Tag as N } from "../tag/tag.js";
6
- import { Icon as X } from "../icon/icon.js";
7
- import { Icons as K } from "../icon/types.js";
8
- import { ThemeColorVariable as n, ThemeSpaceVariable as c, ThemeRadiusVariable as T, ThemeIconSizeVariable as U } from "../../theme/theme-types.js";
9
- function y() {
2
+ import { useStyleConfig as F, Flex as u, Box as d, Input as L } from "@chakra-ui/react";
3
+ import { Fragment as N } from "react";
4
+ import { ComboboxItem as y } from "./combobox-item.js";
5
+ import { Tag as X } from "../tag/tag.js";
6
+ import { Icon as $ } from "../icon/icon.js";
7
+ import { Icons as v } from "../icon/types.js";
8
+ import { ThemeColorVariable as r, ThemeSpaceVariable as c, ThemeRadiusVariable as K, ThemeIconSizeVariable as T } from "../../theme/theme-types.js";
9
+ function s() {
10
10
  return /* @__PURE__ */ i(
11
11
  d,
12
12
  {
13
- backgroundColor: n.NeutralContainer,
13
+ backgroundColor: r.NeutralContainer,
14
14
  width: "8px",
15
15
  borderRadius: "4px",
16
16
  marginRight: "-8px",
@@ -21,45 +21,45 @@ function y() {
21
21
  height: "100%",
22
22
  width: "8px",
23
23
  display: "block",
24
- backgroundColor: n.Surface
24
+ backgroundColor: r.Surface
25
25
  }
26
26
  }
27
27
  );
28
28
  }
29
29
  function H({
30
- id: s,
30
+ id: _,
31
31
  asPlainText: l,
32
32
  inputValue: b,
33
- selectedItems: r,
34
- displayItems: _,
35
- toggleItem: x,
36
- highlightState: f,
33
+ selectedItems: n,
34
+ displayItems: E,
35
+ toggleItem: C,
36
+ highlightState: e,
37
37
  openState: a,
38
38
  parentStrings: j,
39
39
  size: B,
40
40
  variant: R,
41
- label: C,
41
+ label: S,
42
42
  placeHolderText: V,
43
43
  isDisabled: h,
44
44
  isReadOnly: m,
45
- isInvalid: W,
46
- collapsed: S,
47
- hasPendingDelete: w,
48
- setHasPendingDelete: g,
49
- setInputValue: k,
50
- onSearch: t,
51
- isSingleSelect: v
45
+ isInvalid: w,
46
+ collapsed: k,
47
+ hasPendingDelete: g,
48
+ setHasPendingDelete: x,
49
+ setInputValue: t,
50
+ onSearch: O,
51
+ isSingleSelect: W
52
52
  }) {
53
- const z = E("Combobox", { size: B, variant: R }), A = (o) => {
54
- if (o.key === "Enter" && (o.preventDefault(), o.stopPropagation(), a.isOpen ? x(_[f.index]) : a.open()), o.key === "Escape") {
53
+ const z = F("Combobox", { size: B, variant: R }), A = (o) => {
54
+ if (o.key === "Enter" && (o.preventDefault(), o.stopPropagation(), a.isOpen ? C(E[e.index]) : a.open()), o.key === "Escape") {
55
55
  if (!a.isOpen) return;
56
- o.preventDefault(), o.stopPropagation(), a.close(), l || (k(""), t?.(""));
56
+ o.preventDefault(), o.stopPropagation(), a.close(), l || (t(""), O?.(""));
57
57
  }
58
- o.key === "Backspace" ? b.length === 0 && r.length > 0 && !l && (w ? (x(r[r.length - 1]), g(!1)) : g(!0)) : g(!1), o.key === "ArrowDown" && (a.isOpen ? f.next() : a.open()), o.key === "ArrowUp" && (a.isOpen ? f.previous() : a.open());
58
+ o.key === "Backspace" ? b.length === 0 && n.length > 0 && !l && (g ? (C(n[n.length - 1]), x(!1)) : x(!0)) : x(!1), o.key === "ArrowDown" && (a.isOpen ? e.next() : a.open()), o.key === "ArrowUp" && (a.isOpen ? e.previous() : a.open());
59
59
  }, D = (o) => {
60
60
  o.preventDefault(), o.stopPropagation();
61
- const e = o.target.value;
62
- k(e), t?.(e), f.set(0), a.open();
61
+ const f = o.target.value;
62
+ t(f), O?.(f), e.set(0), a.open();
63
63
  };
64
64
  return /* @__PURE__ */ p(
65
65
  u,
@@ -67,27 +67,32 @@ function H({
67
67
  __css: z,
68
68
  "aria-disabled": h,
69
69
  "aria-readonly": m,
70
- borderRadius: T.Small,
70
+ "aria-invalid": w,
71
+ borderRadius: K.Small,
71
72
  padding: c.Small,
72
- _focusWithin: {
73
- borderColor: n.Info,
74
- boxShadow: `0 0 0 4px ${n.InfoContainer}`,
75
- backgroundColor: n.Surface
73
+ _focusWithin: w ? {
74
+ borderColor: r.Error,
75
+ boxShadow: `0 0 0 4px ${r.ErrorContainer}`,
76
+ backgroundColor: r.Surface
77
+ } : {
78
+ borderColor: r.Info,
79
+ boxShadow: `0 0 0 4px ${r.InfoContainer}`,
80
+ backgroundColor: r.Surface
76
81
  },
77
82
  _disabled: {
78
83
  borderColor: "transparent",
79
- backgroundColor: n.SurfaceDisabled
84
+ backgroundColor: r.SurfaceDisabled
80
85
  },
81
86
  children: [
82
87
  /* @__PURE__ */ p(
83
88
  u,
84
89
  {
85
- flexWrap: S || v ? "nowrap" : "wrap",
90
+ flexWrap: k || W ? "nowrap" : "wrap",
86
91
  gap: c.Small,
87
92
  overflow: "hidden",
88
93
  children: [
89
- C && /* @__PURE__ */ i(d, { whiteSpace: "nowrap", children: C }),
90
- !l && (S ? r.length > 0 && /* @__PURE__ */ p(
94
+ S && /* @__PURE__ */ i(d, { whiteSpace: "nowrap", children: S }),
95
+ !l && (k ? n.length > 0 && /* @__PURE__ */ p(
91
96
  u,
92
97
  {
93
98
  gap: c.XSmall,
@@ -96,48 +101,48 @@ function H({
96
101
  whiteSpace: "nowrap",
97
102
  textOverflow: "ellipsis",
98
103
  children: [
99
- r.length > 3 && /* @__PURE__ */ i(y, {}),
100
- r.length > 2 && /* @__PURE__ */ i(y, {}),
101
- r.length > 1 && /* @__PURE__ */ i(N, { children: r.length - 1 }),
104
+ n.length > 3 && /* @__PURE__ */ i(s, {}),
105
+ n.length > 2 && /* @__PURE__ */ i(s, {}),
106
+ n.length > 1 && /* @__PURE__ */ i(X, { children: n.length - 1 }),
102
107
  /* @__PURE__ */ i(
103
- O,
108
+ y,
104
109
  {
105
- isDeleting: w,
106
- item: r[r.length - 1],
110
+ isDeleting: g,
111
+ item: n[n.length - 1],
107
112
  asPlainText: l
108
113
  }
109
114
  )
110
115
  ]
111
116
  }
112
- ) : r.map((o, e) => /* @__PURE__ */ i(
113
- O,
117
+ ) : n.map((o, f) => /* @__PURE__ */ i(
118
+ y,
114
119
  {
115
120
  item: o,
116
121
  asPlainText: l,
117
- isDeleting: e === r.length - 1 && w
122
+ isDeleting: f === n.length - 1 && g
118
123
  },
119
124
  o.id
120
125
  ))),
121
- l && r.length > 0 && b === r[0].label && j[r[0].id]?.map((o) => /* @__PURE__ */ p(L, { children: [
126
+ l && n.length > 0 && b === n[0].label && j[n[0].id]?.map((o) => /* @__PURE__ */ p(N, { children: [
122
127
  /* @__PURE__ */ i(
123
128
  d,
124
129
  {
125
- color: n.OnSurfaceSubdued,
130
+ color: r.OnSurfaceSubdued,
126
131
  textOverflow: "ellipsis",
127
132
  overflow: "hidden",
128
133
  whiteSpace: "nowrap",
129
134
  children: o
130
135
  }
131
136
  ),
132
- /* @__PURE__ */ i(d, { color: n.OnSurfaceSubdued, children: "/" })
137
+ /* @__PURE__ */ i(d, { color: r.OnSurfaceSubdued, children: "/" })
133
138
  ] }, o)),
134
139
  /* @__PURE__ */ i(
135
- F,
140
+ L,
136
141
  {
137
- id: s,
142
+ id: _,
138
143
  isDisabled: h,
139
144
  isReadOnly: m,
140
- isInvalid: W,
145
+ isInvalid: w,
141
146
  onKeyDown: A,
142
147
  variant: "unstyled",
143
148
  value: b,
@@ -147,14 +152,14 @@ function H({
147
152
  placeholder: V,
148
153
  border: "none",
149
154
  flex: 1,
150
- color: n.OnSurface,
155
+ color: r.OnSurface,
151
156
  outline: "none",
152
157
  _placeholder: {
153
- color: n.OnSurfaceSubdued
158
+ color: r.OnSurfaceSubdued
154
159
  },
155
160
  _disabled: {
156
161
  cursor: "not-allowed",
157
- color: n.OnSurfaceSubdued
162
+ color: r.OnSurfaceSubdued
158
163
  }
159
164
  }
160
165
  )
@@ -162,11 +167,11 @@ function H({
162
167
  }
163
168
  ),
164
169
  /* @__PURE__ */ i(u, { className: "combobox-dropdown-icon", justifyContent: "center", alignItems: "center", children: /* @__PURE__ */ i(
165
- X,
170
+ $,
166
171
  {
167
- icon: K.TreeViewCollapse,
168
- size: U.Small,
169
- color: h || m ? n.OnSurfaceSubdued : n.OnSurface
172
+ icon: v.TreeViewCollapse,
173
+ size: T.Small,
174
+ color: h || m ? r.OnSurfaceSubdued : r.OnSurface
170
175
  }
171
176
  ) })
172
177
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-theme.d.ts","sourceRoot":"","sources":["../../../../lib/theme/theme-config/components/combobox-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAoE5E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIzB,CAAC"}
1
+ {"version":3,"file":"combobox-theme.d.ts","sourceRoot":"","sources":["../../../../lib/theme/theme-config/components/combobox-theme.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAgF5E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIzB,CAAC"}
@@ -12,6 +12,18 @@ const a = {
12
12
  '&[aria-readonly="true"]': {
13
13
  borderColor: "transparent",
14
14
  backgroundColor: o.SurfaceDisabled
15
+ },
16
+ '&[aria-invalid="true"]': {
17
+ borderColor: o.Error,
18
+ _focusWithin: {
19
+ borderColor: o.Error,
20
+ boxShadow: `0 0 0 4px ${o.ErrorContainer}`
21
+ },
22
+ "@media(hover: hover)": {
23
+ "&:hover:not(:focus-within)": {
24
+ borderColor: o.ErrorHover
25
+ }
26
+ }
15
27
  }
16
28
  }, n = {
17
29
  outline: {
@@ -7,6 +7,7 @@ export declare const paginatorConfig: {
7
7
  display: string;
8
8
  justifyContent: string;
9
9
  alignItems: string;
10
+ fontVariant: string;
10
11
  padding: ThemeSpaceVariable;
11
12
  gap: ThemeSpaceVariable;
12
13
  div: {
@@ -1 +1 @@
1
- {"version":3,"file":"paginator-theme.d.ts","sourceRoot":"","sources":["../../../../lib/theme/theme-config/components/paginator-theme.ts"],"names":[],"mappings":"AACA,OAAO,EACN,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB1B,CAAC"}
1
+ {"version":3,"file":"paginator-theme.d.ts","sourceRoot":"","sources":["../../../../lib/theme/theme-config/components/paginator-theme.ts"],"names":[],"mappings":"AACA,OAAO,EACN,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiB1B,CAAC"}
@@ -1,22 +1,23 @@
1
- import { defineStyleConfig as o } from "@chakra-ui/react";
2
- import { ThemeFontSizeVariable as a, ThemeSpaceVariable as e, ThemeColorVariable as i, ThemeFontVariable as t } from "../../theme-types.js";
3
- const r = o({
1
+ import { defineStyleConfig as a } from "@chakra-ui/react";
2
+ import { ThemeFontSizeVariable as o, ThemeSpaceVariable as e, ThemeColorVariable as t, ThemeFontVariable as i } from "../../theme-types.js";
3
+ const l = a({
4
4
  baseStyle: {
5
5
  width: "100%",
6
- fontFamily: t.Body,
7
- color: i.OnBackground,
6
+ fontFamily: i.Body,
7
+ color: t.OnBackground,
8
8
  display: "flex",
9
9
  justifyContent: "flex-end",
10
10
  alignItems: "center",
11
+ fontVariant: "tabular-nums",
11
12
  padding: e.Small,
12
13
  gap: e.Medium,
13
14
  div: {
14
15
  button: {
15
- fontSize: a.Large
16
+ fontSize: o.Large
16
17
  }
17
18
  }
18
19
  }
19
20
  });
20
21
  export {
21
- r as paginatorConfig
22
+ l as paginatorConfig
22
23
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caspeco/casper-ui-library",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "prettier": "@caspeco/prettier-config",
5
5
  "type": "module",
6
6
  "sideEffects": false,