@caspeco/casper-ui-library 5.0.1 → 5.1.1

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 +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-item.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-item.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAahE,KAAK,iBAAiB,GAAG;IACxB,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,iBAAiB,2CAiBhF"}
1
+ {"version":3,"file":"combobox-item.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/combobox-item.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAahE,KAAK,iBAAiB,GAAG;IACxB,IAAI,EAAE,gBAAgB,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,iBAAiB,2CAkBhF"}
@@ -1,24 +1,25 @@
1
- import { jsxs as t, jsx as e } from "react/jsx-runtime";
2
- import { Flex as d } from "@chakra-ui/react";
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { Flex as t } from "@chakra-ui/react";
3
3
  import { Box as a } from "../box/box.js";
4
- import { Tag as r } from "../tag/tag.js";
4
+ import { Tag as o } from "../tag/tag.js";
5
5
  import { ThemeSpaceVariable as c } from "../../theme/theme-types.js";
6
6
  const s = {
7
- info: r.Info,
8
- success: r.Success,
9
- warning: r.Warning,
10
- error: r.Error,
11
- primary: r.Primary,
12
- secondary: r.Secondary,
13
- neutral: r,
14
- undefined: r.ComboboxItem
7
+ info: o.Info,
8
+ success: o.Success,
9
+ warning: o.Warning,
10
+ error: o.Error,
11
+ primary: o.Primary,
12
+ secondary: o.Secondary,
13
+ neutral: o,
14
+ undefined: o.ComboboxItem
15
15
  };
16
- function b({ item: o, asPlainText: p, isDeleting: n }) {
17
- const l = n ? "primary" : o.variant || "neutral", i = s[l];
18
- return p ? /* @__PURE__ */ t(d, { gap: c.XSmall, overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: [
19
- o.prepend,
20
- o.label
21
- ] }) : /* @__PURE__ */ e(a, { overflow: "hidden", children: /* @__PURE__ */ e(i, { prepend: o.prepend, dot: o.dot, solid: n, children: /* @__PURE__ */ e(a, { display: "block", overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: o.label }) }) });
16
+ function b({ item: r, asPlainText: p, isDeleting: n }) {
17
+ const l = n ? "primary" : r.variant || "neutral", d = s[l];
18
+ return p ? /* @__PURE__ */ i(t, { gap: c.XSmall, overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: [
19
+ r.prepend,
20
+ r.label,
21
+ r.append
22
+ ] }) : /* @__PURE__ */ e(a, { overflow: "hidden", children: /* @__PURE__ */ e(d, { prepend: r.prepend, append: r.append, dot: r.dot, solid: n, children: /* @__PURE__ */ e(a, { display: "block", overflow: "hidden", whiteSpace: "nowrap", textOverflow: "ellipsis", children: r.label }) }) });
22
23
  }
23
24
  export {
24
25
  b as ComboboxItem
@@ -2,8 +2,9 @@ import { ResponsiveValue } from '@chakra-ui/react';
2
2
  import { Placement } from '@floating-ui/dom';
3
3
  import { LayoutProps, MarginProps } from '../../theme/index.js';
4
4
  import { RefObject } from 'react';
5
+ import { Tag, TagProps } from '../tag/index.js';
5
6
  export type { Placement };
6
- export type ComboboxTagVariant = "info" | "success" | "warning" | "error" | "neutral" | "primary" | "secondary";
7
+ export type ComboboxTagVariant = Lowercase<Exclude<keyof typeof Tag, keyof React.FC<TagProps> | "ComboboxItem">>;
7
8
  export type Locales = "en-US" | "nb-NO" | "da-DK" | "sv-SE" | "en-GB";
8
9
  export type ComboboxItem = {
9
10
  /**
@@ -22,6 +23,10 @@ export type ComboboxItem = {
22
23
  * Optional element to prepend to the item.
23
24
  */
24
25
  prepend?: JSX.Element | null;
26
+ /**
27
+ * Optional element to append to the item.
28
+ */
29
+ append?: JSX.Element | null;
25
30
  /**
26
31
  * Optional tag dot to display in front of the item label.
27
32
  * Will be colored according to the variant.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/combobox/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,MAAM,MAAM,kBAAkB,GAC3B,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,GACP,SAAS,GACT,SAAS,GACT,WAAW,CAAC;AAEf,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtE,MAAM,MAAM,YAAY,GAAG;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,GAAG,CAAC;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7B;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd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CAAC,EAAE,KAAK,CAAC;IAAC,cAAc,CAAC,EAAE,SAAS,GAAG,KAAK,CAAA;CAAE,CAC7D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../lib/components/tag/tag.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAA8B,MAAM,SAAS,CAAC;AAkChF,eAAO,MAAM,GAAG,EAAE,oBAEjB,CAAC"}
1
+ {"version":3,"file":"tag.d.ts","sourceRoot":"","sources":["../../../lib/components/tag/tag.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,oBAAoB,EAA8B,MAAM,SAAS,CAAC;AAoChF,eAAO,MAAM,GAAG,EAAE,oBAEjB,CAAC"}
@@ -1,42 +1,44 @@
1
- import { jsx as n, jsxs as u, Fragment as S } from "react/jsx-runtime";
2
- import { Tag as f, Circle as v, TagLabel as x, TagCloseButton as y } from "@chakra-ui/react";
3
- import { Icon as b } from "../icon/icon.js";
4
- function o({
5
- children: a,
6
- dot: r,
1
+ import { jsx as n, jsxs as f, Fragment as s } from "react/jsx-runtime";
2
+ import { Tag as v, Circle as x, TagLabel as y, TagCloseButton as b } from "@chakra-ui/react";
3
+ import { Icon as T } from "../icon/icon.js";
4
+ function i({
5
+ children: r,
6
+ dot: a,
7
7
  icon: t,
8
8
  onClose: e,
9
- ariaLabel: c,
9
+ ariaLabel: m,
10
10
  prepend: l,
11
- size: s = "xs",
12
- variant: m = "neutral",
13
- isDisabled: d,
14
- ...g
11
+ size: d = "xs",
12
+ variant: g = "neutral",
13
+ isDisabled: u,
14
+ append: c,
15
+ ...S
15
16
  }) {
16
- return /* @__PURE__ */ u(f, { size: s, variant: m, ...g, children: [
17
- r && /* @__PURE__ */ n(v, { className: "tag-dot" }),
18
- t && /* @__PURE__ */ n(b, { className: "tag-icon", icon: t }),
19
- l && /* @__PURE__ */ n(S, { children: l }),
20
- /* @__PURE__ */ n(x, { display: "flex", alignContent: "center", children: a }),
17
+ return /* @__PURE__ */ f(v, { size: d, variant: g, ...S, children: [
18
+ a && /* @__PURE__ */ n(x, { className: "tag-dot" }),
19
+ t && /* @__PURE__ */ n(T, { className: "tag-icon", icon: t }),
20
+ l && /* @__PURE__ */ n(s, { children: l }),
21
+ /* @__PURE__ */ n(y, { display: "flex", alignContent: "center", children: r }),
22
+ c && /* @__PURE__ */ n(s, { children: c }),
21
23
  e && /* @__PURE__ */ n(
22
- y,
24
+ b,
23
25
  {
24
- "aria-label": c,
25
- isDisabled: d,
26
+ "aria-label": m,
27
+ isDisabled: u,
26
28
  color: "inherit",
27
29
  onClick: e
28
30
  }
29
31
  )
30
32
  ] });
31
33
  }
32
- const i = ({ solid: a, ...r }) => /* @__PURE__ */ n(o, { variant: a ? "neutralSolid" : "neutral", ...r });
33
- i.Primary = ({ solid: a, ...r }) => /* @__PURE__ */ n(o, { variant: a ? "primarySolid" : "primary", ...r });
34
- i.Secondary = ({ solid: a, ...r }) => /* @__PURE__ */ n(o, { variant: a ? "secondarySolid" : "secondary", ...r });
35
- i.Success = ({ solid: a, ...r }) => /* @__PURE__ */ n(o, { variant: a ? "successSolid" : "success", ...r });
36
- i.Error = ({ solid: a, ...r }) => /* @__PURE__ */ n(o, { variant: a ? "errorSolid" : "error", ...r });
37
- i.Warning = ({ solid: a, ...r }) => /* @__PURE__ */ n(o, { variant: a ? "warningSolid" : "warning", ...r });
38
- i.Info = ({ solid: a, ...r }) => /* @__PURE__ */ n(o, { variant: a ? "infoSolid" : "info", ...r });
39
- i.ComboboxItem = ({ ...a }) => /* @__PURE__ */ n(o, { variant: "comboboxItem", ...a });
34
+ const o = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "neutralSolid" : "neutral", ...a });
35
+ o.Primary = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "primarySolid" : "primary", ...a });
36
+ o.Secondary = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "secondarySolid" : "secondary", ...a });
37
+ o.Success = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "successSolid" : "success", ...a });
38
+ o.Error = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "errorSolid" : "error", ...a });
39
+ o.Warning = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "warningSolid" : "warning", ...a });
40
+ o.Info = ({ solid: r, ...a }) => /* @__PURE__ */ n(i, { variant: r ? "infoSolid" : "info", ...a });
41
+ o.ComboboxItem = ({ ...r }) => /* @__PURE__ */ n(i, { variant: "comboboxItem", ...r });
40
42
  export {
41
- i as Tag
43
+ o as Tag
42
44
  };
@@ -19,6 +19,10 @@ export type TagPropsBase = {
19
19
  * Element to prepend to the tag. Use if you need to display a custom element to the left of the label.
20
20
  */
21
21
  prepend?: JSX.Element | null;
22
+ /**
23
+ * Element to append to the tag. Use if you need to display a custom element to the right of the label.
24
+ */
25
+ append?: JSX.Element | null;
22
26
  /**
23
27
  * Disables the close button of the tag.
24
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/tag/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,IAAI,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEpF,KAAK,yBAAyB,GAAG,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;AAElE,MAAM,MAAM,YAAY,GAAG;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;IAC7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H,SAAS,EAAE,MAAM,CAAC;CAClB,CAAC;AAIF,KAAK,sBAAsB,GAAG,YAAY,GAAG;IAC5C,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,UAAU,CAAC,EAAE,KAAK,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AAKpE,MAAM,MAAM,oBAAoB,GAAG,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,GAAG;IACvD,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC5B,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC9B,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC1B,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACzB,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IAC5B,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAC5B,cAAc,GACd,SAAS,GACT,cAAc,GACd,SAAS,GACT,gBAAgB,GAChB,WAAW,GACX,cAAc,GACd,SAAS,GACT,YAAY,GACZ,OAAO,GACP,cAAc,GACd,SAAS,GACT,WAAW,GACX,MAAM,GAEN,cAAc,CAAC;AAElB,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG;IACzC,OAAO,EAAE,mBAAmB,CAAC;CAC7B,CAAC"}
@@ -1,287 +1,289 @@
1
- import { computePosition as ot, flip as st } from "../../core/dist/floating-ui.core.js";
2
- import { createCoords as m, rectToClientRect as J, floor as A, max as E, round as H, min as z } from "../../utils/dist/floating-ui.utils.js";
3
- import { getOverflowAncestors as M, isElement as v, getDocumentElement as O, getWindow as L, getFrameElement as K, getComputedStyle as R, isHTMLElement as b, isWebKit as Q, isTopLayer as S, getParentNode as W, isLastTraversableNode as N, isTableElement as rt, isContainingBlock as Y, getContainingBlock as ct, getNodeName as _, isOverflowElement as $, getNodeScroll as I } from "../../utils/dist/floating-ui.utils.dom.js";
1
+ import { computePosition as st, flip as rt } from "../../core/dist/floating-ui.core.js";
2
+ import { createCoords as w, rectToClientRect as J, floor as A, max as E, round as D, min as V } from "../../utils/dist/floating-ui.utils.js";
3
+ import { getOverflowAncestors as z, isElement as v, getDocumentElement as R, getWindow as L, getFrameElement as U, getComputedStyle as b, isHTMLElement as C, isWebKit as Q, isTopLayer as _, getParentNode as W, isLastTraversableNode as H, isTableElement as ct, isContainingBlock as Y, getContainingBlock as lt, getNodeName as $, isOverflowElement as q, getNodeScroll as I } from "../../utils/dist/floating-ui.utils.dom.js";
4
4
  function Z(t) {
5
- const e = R(t);
6
- let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
7
- const o = b(t), r = o ? t.offsetWidth : n, s = o ? t.offsetHeight : i, c = H(n) !== r || H(i) !== s;
8
- return c && (n = r, i = s), {
9
- width: n,
10
- height: i,
5
+ const e = b(t);
6
+ let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
7
+ const i = C(t), r = i ? t.offsetWidth : o, s = i ? t.offsetHeight : n, c = D(o) !== r || D(n) !== s;
8
+ return c && (o = r, n = s), {
9
+ width: o,
10
+ height: n,
11
11
  $: c
12
12
  };
13
13
  }
14
- function q(t) {
14
+ function X(t) {
15
15
  return v(t) ? t : t.contextElement;
16
16
  }
17
17
  function F(t) {
18
- const e = q(t);
19
- if (!b(e))
20
- return m(1);
21
- const n = e.getBoundingClientRect(), {
22
- width: i,
23
- height: o,
18
+ const e = X(t);
19
+ if (!C(e))
20
+ return w(1);
21
+ const o = e.getBoundingClientRect(), {
22
+ width: n,
23
+ height: i,
24
24
  $: r
25
25
  } = Z(e);
26
- let s = (r ? H(n.width) : n.width) / i, c = (r ? H(n.height) : n.height) / o;
26
+ let s = (r ? D(o.width) : o.width) / n, c = (r ? D(o.height) : o.height) / i;
27
27
  return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
28
28
  x: s,
29
29
  y: c
30
30
  };
31
31
  }
32
- const lt = /* @__PURE__ */ m(0);
33
- function X(t) {
32
+ const ft = /* @__PURE__ */ w(0);
33
+ function tt(t) {
34
34
  const e = L(t);
35
- return !Q() || !e.visualViewport ? lt : {
35
+ return !Q() || !e.visualViewport ? ft : {
36
36
  x: e.visualViewport.offsetLeft,
37
37
  y: e.visualViewport.offsetTop
38
38
  };
39
39
  }
40
- function ft(t, e, n) {
41
- return e === void 0 && (e = !1), !n || e && n !== L(t) ? !1 : e;
40
+ function ut(t, e, o) {
41
+ return e === void 0 && (e = !1), !o || e && o !== L(t) ? !1 : e;
42
42
  }
43
- function T(t, e, n, i) {
44
- e === void 0 && (e = !1), n === void 0 && (n = !1);
45
- const o = t.getBoundingClientRect(), r = q(t);
46
- let s = m(1);
47
- e && (i ? v(i) && (s = F(i)) : s = F(t));
48
- const c = ft(r, n, i) ? X(r) : m(0);
49
- let l = (o.left + c.x) / s.x, f = (o.top + c.y) / s.y, u = o.width / s.x, h = o.height / s.y;
43
+ function T(t, e, o, n) {
44
+ e === void 0 && (e = !1), o === void 0 && (o = !1);
45
+ const i = t.getBoundingClientRect(), r = X(t);
46
+ let s = w(1);
47
+ e && (n ? v(n) && (s = F(n)) : s = F(t));
48
+ const c = ut(r, o, n) ? tt(r) : w(0);
49
+ let f = (i.left + c.x) / s.x, l = (i.top + c.y) / s.y, u = i.width / s.x, h = i.height / s.y;
50
50
  if (r) {
51
- const p = L(r), a = i && v(i) ? L(i) : i;
52
- let x = p, g = K(x);
53
- for (; g && i && a !== x; ) {
54
- const w = F(g), d = g.getBoundingClientRect(), y = R(g), C = d.left + (g.clientLeft + parseFloat(y.paddingLeft)) * w.x, B = d.top + (g.clientTop + parseFloat(y.paddingTop)) * w.y;
55
- l *= w.x, f *= w.y, u *= w.x, h *= w.y, l += C, f += B, x = L(g), g = K(x);
51
+ const d = L(r), a = n && v(n) ? L(n) : n;
52
+ let m = d, p = U(m);
53
+ for (; p && n && a !== m; ) {
54
+ const y = F(p), g = p.getBoundingClientRect(), x = b(p), O = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * y.x, S = g.top + (p.clientTop + parseFloat(x.paddingTop)) * y.y;
55
+ f *= y.x, l *= y.y, u *= y.x, h *= y.y, f += O, l += S, m = L(p), p = U(m);
56
56
  }
57
57
  }
58
58
  return J({
59
59
  width: u,
60
60
  height: h,
61
- x: l,
62
- y: f
61
+ x: f,
62
+ y: l
63
63
  });
64
64
  }
65
- function k(t, e) {
66
- const n = I(t).scrollLeft;
67
- return e ? e.left + n : T(O(t)).left + n;
65
+ function M(t, e) {
66
+ const o = I(t).scrollLeft;
67
+ return e ? e.left + o : T(R(t)).left + o;
68
68
  }
69
- function tt(t, e, n) {
70
- n === void 0 && (n = !1);
71
- const i = t.getBoundingClientRect(), o = i.left + e.scrollLeft - (n ? 0 : (
72
- // RTL <body> scrollbar.
73
- k(t, i)
74
- )), r = i.top + e.scrollTop;
69
+ function et(t, e) {
70
+ const o = t.getBoundingClientRect(), n = o.left + e.scrollLeft - M(t, o), i = o.top + e.scrollTop;
75
71
  return {
76
- x: o,
77
- y: r
72
+ x: n,
73
+ y: i
78
74
  };
79
75
  }
80
- function ut(t) {
76
+ function ht(t) {
81
77
  let {
82
78
  elements: e,
83
- rect: n,
84
- offsetParent: i,
85
- strategy: o
79
+ rect: o,
80
+ offsetParent: n,
81
+ strategy: i
86
82
  } = t;
87
- const r = o === "fixed", s = O(i), c = e ? S(e.floating) : !1;
88
- if (i === s || c && r)
89
- return n;
90
- let l = {
83
+ const r = i === "fixed", s = R(n), c = e ? _(e.floating) : !1;
84
+ if (n === s || c && r)
85
+ return o;
86
+ let f = {
91
87
  scrollLeft: 0,
92
88
  scrollTop: 0
93
- }, f = m(1);
94
- const u = m(0), h = b(i);
95
- if ((h || !h && !r) && ((_(i) !== "body" || $(s)) && (l = I(i)), b(i))) {
96
- const a = T(i);
97
- f = F(i), u.x = a.x + i.clientLeft, u.y = a.y + i.clientTop;
89
+ }, l = w(1);
90
+ const u = w(0), h = C(n);
91
+ if ((h || !h && !r) && (($(n) !== "body" || q(s)) && (f = I(n)), C(n))) {
92
+ const a = T(n);
93
+ l = F(n), u.x = a.x + n.clientLeft, u.y = a.y + n.clientTop;
98
94
  }
99
- const p = s && !h && !r ? tt(s, l, !0) : m(0);
95
+ const d = s && !h && !r ? et(s, f) : w(0);
100
96
  return {
101
- width: n.width * f.x,
102
- height: n.height * f.y,
103
- x: n.x * f.x - l.scrollLeft * f.x + u.x + p.x,
104
- y: n.y * f.y - l.scrollTop * f.y + u.y + p.y
97
+ width: o.width * l.x,
98
+ height: o.height * l.y,
99
+ x: o.x * l.x - f.scrollLeft * l.x + u.x + d.x,
100
+ y: o.y * l.y - f.scrollTop * l.y + u.y + d.y
105
101
  };
106
102
  }
107
- function ht(t) {
103
+ function at(t) {
108
104
  return Array.from(t.getClientRects());
109
105
  }
110
- function at(t) {
111
- const e = O(t), n = I(t), i = t.ownerDocument.body, o = E(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), r = E(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
112
- let s = -n.scrollLeft + k(t);
113
- const c = -n.scrollTop;
114
- return R(i).direction === "rtl" && (s += E(e.clientWidth, i.clientWidth) - o), {
115
- width: o,
106
+ function dt(t) {
107
+ const e = R(t), o = I(t), n = t.ownerDocument.body, i = E(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), r = E(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
108
+ let s = -o.scrollLeft + M(t);
109
+ const c = -o.scrollTop;
110
+ return b(n).direction === "rtl" && (s += E(e.clientWidth, n.clientWidth) - i), {
111
+ width: i,
116
112
  height: r,
117
113
  x: s,
118
114
  y: c
119
115
  };
120
116
  }
121
- function dt(t, e) {
122
- const n = L(t), i = O(t), o = n.visualViewport;
123
- let r = i.clientWidth, s = i.clientHeight, c = 0, l = 0;
124
- if (o) {
125
- r = o.width, s = o.height;
126
- const f = Q();
127
- (!f || f && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
117
+ const K = 25;
118
+ function gt(t, e) {
119
+ const o = L(t), n = R(t), i = o.visualViewport;
120
+ let r = n.clientWidth, s = n.clientHeight, c = 0, f = 0;
121
+ if (i) {
122
+ r = i.width, s = i.height;
123
+ const u = Q();
124
+ (!u || u && e === "fixed") && (c = i.offsetLeft, f = i.offsetTop);
128
125
  }
126
+ const l = M(n);
127
+ if (l <= 0) {
128
+ const u = n.ownerDocument, h = u.body, d = getComputedStyle(h), a = u.compatMode === "CSS1Compat" && parseFloat(d.marginLeft) + parseFloat(d.marginRight) || 0, m = Math.abs(n.clientWidth - h.clientWidth - a);
129
+ m <= K && (r -= m);
130
+ } else l <= K && (r += l);
129
131
  return {
130
132
  width: r,
131
133
  height: s,
132
134
  x: c,
133
- y: l
135
+ y: f
134
136
  };
135
137
  }
136
- const gt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
137
- function pt(t, e) {
138
- const n = T(t, !0, e === "fixed"), i = n.top + t.clientTop, o = n.left + t.clientLeft, r = b(t) ? F(t) : m(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = o * r.x, f = i * r.y;
138
+ const pt = /* @__PURE__ */ new Set(["absolute", "fixed"]);
139
+ function mt(t, e) {
140
+ const o = T(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, r = C(t) ? F(t) : w(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, f = i * r.x, l = n * r.y;
139
141
  return {
140
142
  width: s,
141
143
  height: c,
142
- x: l,
143
- y: f
144
+ x: f,
145
+ y: l
144
146
  };
145
147
  }
146
- function j(t, e, n) {
147
- let i;
148
+ function j(t, e, o) {
149
+ let n;
148
150
  if (e === "viewport")
149
- i = dt(t, n);
151
+ n = gt(t, o);
150
152
  else if (e === "document")
151
- i = at(O(t));
153
+ n = dt(R(t));
152
154
  else if (v(e))
153
- i = pt(e, n);
155
+ n = mt(e, o);
154
156
  else {
155
- const o = X(t);
156
- i = {
157
- x: e.x - o.x,
158
- y: e.y - o.y,
157
+ const i = tt(t);
158
+ n = {
159
+ x: e.x - i.x,
160
+ y: e.y - i.y,
159
161
  width: e.width,
160
162
  height: e.height
161
163
  };
162
164
  }
163
- return J(i);
165
+ return J(n);
164
166
  }
165
- function et(t, e) {
166
- const n = W(t);
167
- return n === e || !v(n) || N(n) ? !1 : R(n).position === "fixed" || et(n, e);
167
+ function nt(t, e) {
168
+ const o = W(t);
169
+ return o === e || !v(o) || H(o) ? !1 : b(o).position === "fixed" || nt(o, e);
168
170
  }
169
- function wt(t, e) {
170
- const n = e.get(t);
171
- if (n)
172
- return n;
173
- let i = M(t, [], !1).filter((c) => v(c) && _(c) !== "body"), o = null;
174
- const r = R(t).position === "fixed";
171
+ function yt(t, e) {
172
+ const o = e.get(t);
173
+ if (o)
174
+ return o;
175
+ let n = z(t, [], !1).filter((c) => v(c) && $(c) !== "body"), i = null;
176
+ const r = b(t).position === "fixed";
175
177
  let s = r ? W(t) : t;
176
- for (; v(s) && !N(s); ) {
177
- const c = R(s), l = Y(s);
178
- !l && c.position === "fixed" && (o = null), (r ? !l && !o : !l && c.position === "static" && !!o && gt.has(o.position) || $(s) && !l && et(t, s)) ? i = i.filter((u) => u !== s) : o = c, s = W(s);
178
+ for (; v(s) && !H(s); ) {
179
+ const c = b(s), f = Y(s);
180
+ !f && c.position === "fixed" && (i = null), (r ? !f && !i : !f && c.position === "static" && !!i && pt.has(i.position) || q(s) && !f && nt(t, s)) ? n = n.filter((u) => u !== s) : i = c, s = W(s);
179
181
  }
180
- return e.set(t, i), i;
182
+ return e.set(t, n), n;
181
183
  }
182
- function mt(t) {
184
+ function wt(t) {
183
185
  let {
184
186
  element: e,
185
- boundary: n,
186
- rootBoundary: i,
187
- strategy: o
187
+ boundary: o,
188
+ rootBoundary: n,
189
+ strategy: i
188
190
  } = t;
189
- const s = [...n === "clippingAncestors" ? S(e) ? [] : wt(e, this._c) : [].concat(n), i], c = s[0], l = s.reduce((f, u) => {
190
- const h = j(e, u, o);
191
- return f.top = E(h.top, f.top), f.right = z(h.right, f.right), f.bottom = z(h.bottom, f.bottom), f.left = E(h.left, f.left), f;
192
- }, j(e, c, o));
191
+ const s = [...o === "clippingAncestors" ? _(e) ? [] : yt(e, this._c) : [].concat(o), n], c = s[0], f = s.reduce((l, u) => {
192
+ const h = j(e, u, i);
193
+ return l.top = E(h.top, l.top), l.right = V(h.right, l.right), l.bottom = V(h.bottom, l.bottom), l.left = E(h.left, l.left), l;
194
+ }, j(e, c, i));
193
195
  return {
194
- width: l.right - l.left,
195
- height: l.bottom - l.top,
196
- x: l.left,
197
- y: l.top
196
+ width: f.right - f.left,
197
+ height: f.bottom - f.top,
198
+ x: f.left,
199
+ y: f.top
198
200
  };
199
201
  }
200
202
  function xt(t) {
201
203
  const {
202
204
  width: e,
203
- height: n
205
+ height: o
204
206
  } = Z(t);
205
207
  return {
206
208
  width: e,
207
- height: n
209
+ height: o
208
210
  };
209
211
  }
210
- function yt(t, e, n) {
211
- const i = b(e), o = O(e), r = n === "fixed", s = T(t, !0, r, e);
212
+ function vt(t, e, o) {
213
+ const n = C(e), i = R(e), r = o === "fixed", s = T(t, !0, r, e);
212
214
  let c = {
213
215
  scrollLeft: 0,
214
216
  scrollTop: 0
215
217
  };
216
- const l = m(0);
217
- function f() {
218
- l.x = k(o);
218
+ const f = w(0);
219
+ function l() {
220
+ f.x = M(i);
219
221
  }
220
- if (i || !i && !r)
221
- if ((_(e) !== "body" || $(o)) && (c = I(e)), i) {
222
+ if (n || !n && !r)
223
+ if (($(e) !== "body" || q(i)) && (c = I(e)), n) {
222
224
  const a = T(e, !0, r, e);
223
- l.x = a.x + e.clientLeft, l.y = a.y + e.clientTop;
224
- } else o && f();
225
- r && !i && o && f();
226
- const u = o && !i && !r ? tt(o, c) : m(0), h = s.left + c.scrollLeft - l.x - u.x, p = s.top + c.scrollTop - l.y - u.y;
225
+ f.x = a.x + e.clientLeft, f.y = a.y + e.clientTop;
226
+ } else i && l();
227
+ r && !n && i && l();
228
+ const u = i && !n && !r ? et(i, c) : w(0), h = s.left + c.scrollLeft - f.x - u.x, d = s.top + c.scrollTop - f.y - u.y;
227
229
  return {
228
230
  x: h,
229
- y: p,
231
+ y: d,
230
232
  width: s.width,
231
233
  height: s.height
232
234
  };
233
235
  }
234
- function V(t) {
235
- return R(t).position === "static";
236
+ function N(t) {
237
+ return b(t).position === "static";
236
238
  }
237
239
  function G(t, e) {
238
- if (!b(t) || R(t).position === "fixed")
240
+ if (!C(t) || b(t).position === "fixed")
239
241
  return null;
240
242
  if (e)
241
243
  return e(t);
242
- let n = t.offsetParent;
243
- return O(t) === n && (n = n.ownerDocument.body), n;
244
+ let o = t.offsetParent;
245
+ return R(t) === o && (o = o.ownerDocument.body), o;
244
246
  }
245
- function nt(t, e) {
246
- const n = L(t);
247
- if (S(t))
248
- return n;
249
- if (!b(t)) {
250
- let o = W(t);
251
- for (; o && !N(o); ) {
252
- if (v(o) && !V(o))
253
- return o;
254
- o = W(o);
247
+ function ot(t, e) {
248
+ const o = L(t);
249
+ if (_(t))
250
+ return o;
251
+ if (!C(t)) {
252
+ let i = W(t);
253
+ for (; i && !H(i); ) {
254
+ if (v(i) && !N(i))
255
+ return i;
256
+ i = W(i);
255
257
  }
256
- return n;
258
+ return o;
257
259
  }
258
- let i = G(t, e);
259
- for (; i && rt(i) && V(i); )
260
- i = G(i, e);
261
- return i && N(i) && V(i) && !Y(i) ? n : i || ct(t) || n;
260
+ let n = G(t, e);
261
+ for (; n && ct(n) && N(n); )
262
+ n = G(n, e);
263
+ return n && H(n) && N(n) && !Y(n) ? o : n || lt(t) || o;
262
264
  }
263
- const vt = async function(t) {
264
- const e = this.getOffsetParent || nt, n = this.getDimensions, i = await n(t.floating);
265
+ const bt = async function(t) {
266
+ const e = this.getOffsetParent || ot, o = this.getDimensions, n = await o(t.floating);
265
267
  return {
266
- reference: yt(t.reference, await e(t.floating), t.strategy),
268
+ reference: vt(t.reference, await e(t.floating), t.strategy),
267
269
  floating: {
268
270
  x: 0,
269
271
  y: 0,
270
- width: i.width,
271
- height: i.height
272
+ width: n.width,
273
+ height: n.height
272
274
  }
273
275
  };
274
276
  };
275
277
  function Rt(t) {
276
- return R(t).direction === "rtl";
278
+ return b(t).direction === "rtl";
277
279
  }
278
- const Ot = {
279
- convertOffsetParentRelativeRectToViewportRelativeRect: ut,
280
- getDocumentElement: O,
281
- getClippingRect: mt,
282
- getOffsetParent: nt,
283
- getElementRects: vt,
284
- getClientRects: ht,
280
+ const Ct = {
281
+ convertOffsetParentRelativeRectToViewportRelativeRect: ht,
282
+ getDocumentElement: R,
283
+ getClippingRect: wt,
284
+ getOffsetParent: ot,
285
+ getElementRects: bt,
286
+ getClientRects: at,
285
287
  getDimensions: xt,
286
288
  getScale: F,
287
289
  isElement: v,
@@ -290,105 +292,105 @@ const Ot = {
290
292
  function it(t, e) {
291
293
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
292
294
  }
293
- function bt(t, e) {
294
- let n = null, i;
295
- const o = O(t);
295
+ function Ot(t, e) {
296
+ let o = null, n;
297
+ const i = R(t);
296
298
  function r() {
297
299
  var c;
298
- clearTimeout(i), (c = n) == null || c.disconnect(), n = null;
300
+ clearTimeout(n), (c = o) == null || c.disconnect(), o = null;
299
301
  }
300
- function s(c, l) {
301
- c === void 0 && (c = !1), l === void 0 && (l = 1), r();
302
- const f = t.getBoundingClientRect(), {
302
+ function s(c, f) {
303
+ c === void 0 && (c = !1), f === void 0 && (f = 1), r();
304
+ const l = t.getBoundingClientRect(), {
303
305
  left: u,
304
306
  top: h,
305
- width: p,
307
+ width: d,
306
308
  height: a
307
- } = f;
308
- if (c || e(), !p || !a)
309
+ } = l;
310
+ if (c || e(), !d || !a)
309
311
  return;
310
- const x = A(h), g = A(o.clientWidth - (u + p)), w = A(o.clientHeight - (h + a)), d = A(u), C = {
311
- rootMargin: -x + "px " + -g + "px " + -w + "px " + -d + "px",
312
- threshold: E(0, z(1, l)) || 1
312
+ const m = A(h), p = A(i.clientWidth - (u + d)), y = A(i.clientHeight - (h + a)), g = A(u), O = {
313
+ rootMargin: -m + "px " + -p + "px " + -y + "px " + -g + "px",
314
+ threshold: E(0, V(1, f)) || 1
313
315
  };
314
- let B = !0;
315
- function P(U) {
316
- const D = U[0].intersectionRatio;
317
- if (D !== l) {
318
- if (!B)
316
+ let S = !0;
317
+ function k(P) {
318
+ const B = P[0].intersectionRatio;
319
+ if (B !== f) {
320
+ if (!S)
319
321
  return s();
320
- D ? s(!1, D) : i = setTimeout(() => {
322
+ B ? s(!1, B) : n = setTimeout(() => {
321
323
  s(!1, 1e-7);
322
324
  }, 1e3);
323
325
  }
324
- D === 1 && !it(f, t.getBoundingClientRect()) && s(), B = !1;
326
+ B === 1 && !it(l, t.getBoundingClientRect()) && s(), S = !1;
325
327
  }
326
328
  try {
327
- n = new IntersectionObserver(P, {
328
- ...C,
329
+ o = new IntersectionObserver(k, {
330
+ ...O,
329
331
  // Handle <iframe>s
330
- root: o.ownerDocument
332
+ root: i.ownerDocument
331
333
  });
332
334
  } catch {
333
- n = new IntersectionObserver(P, C);
335
+ o = new IntersectionObserver(k, O);
334
336
  }
335
- n.observe(t);
337
+ o.observe(t);
336
338
  }
337
339
  return s(!0), r;
338
340
  }
339
- function Et(t, e, n, i) {
340
- i === void 0 && (i = {});
341
+ function Ft(t, e, o, n) {
342
+ n === void 0 && (n = {});
341
343
  const {
342
- ancestorScroll: o = !0,
344
+ ancestorScroll: i = !0,
343
345
  ancestorResize: r = !0,
344
346
  elementResize: s = typeof ResizeObserver == "function",
345
347
  layoutShift: c = typeof IntersectionObserver == "function",
346
- animationFrame: l = !1
347
- } = i, f = q(t), u = o || r ? [...f ? M(f) : [], ...M(e)] : [];
348
- u.forEach((d) => {
349
- o && d.addEventListener("scroll", n, {
348
+ animationFrame: f = !1
349
+ } = n, l = X(t), u = i || r ? [...l ? z(l) : [], ...z(e)] : [];
350
+ u.forEach((g) => {
351
+ i && g.addEventListener("scroll", o, {
350
352
  passive: !0
351
- }), r && d.addEventListener("resize", n);
353
+ }), r && g.addEventListener("resize", o);
352
354
  });
353
- const h = f && c ? bt(f, n) : null;
354
- let p = -1, a = null;
355
- s && (a = new ResizeObserver((d) => {
356
- let [y] = d;
357
- y && y.target === f && a && (a.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
358
- var C;
359
- (C = a) == null || C.observe(e);
360
- })), n();
361
- }), f && !l && a.observe(f), a.observe(e));
362
- let x, g = l ? T(t) : null;
363
- l && w();
364
- function w() {
365
- const d = T(t);
366
- g && !it(g, d) && n(), g = d, x = requestAnimationFrame(w);
355
+ const h = l && c ? Ot(l, o) : null;
356
+ let d = -1, a = null;
357
+ s && (a = new ResizeObserver((g) => {
358
+ let [x] = g;
359
+ x && x.target === l && a && (a.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
360
+ var O;
361
+ (O = a) == null || O.observe(e);
362
+ })), o();
363
+ }), l && !f && a.observe(l), a.observe(e));
364
+ let m, p = f ? T(t) : null;
365
+ f && y();
366
+ function y() {
367
+ const g = T(t);
368
+ p && !it(p, g) && o(), p = g, m = requestAnimationFrame(y);
367
369
  }
368
- return n(), () => {
369
- var d;
370
- u.forEach((y) => {
371
- o && y.removeEventListener("scroll", n), r && y.removeEventListener("resize", n);
372
- }), h?.(), (d = a) == null || d.disconnect(), a = null, l && cancelAnimationFrame(x);
370
+ return o(), () => {
371
+ var g;
372
+ u.forEach((x) => {
373
+ i && x.removeEventListener("scroll", o), r && x.removeEventListener("resize", o);
374
+ }), h?.(), (g = a) == null || g.disconnect(), a = null, f && cancelAnimationFrame(m);
373
375
  };
374
376
  }
375
- const Ft = st, Wt = (t, e, n) => {
376
- const i = /* @__PURE__ */ new Map(), o = {
377
- platform: Ot,
378
- ...n
377
+ const Wt = rt, St = (t, e, o) => {
378
+ const n = /* @__PURE__ */ new Map(), i = {
379
+ platform: Ct,
380
+ ...o
379
381
  }, r = {
380
- ...o.platform,
381
- _c: i
382
+ ...i.platform,
383
+ _c: n
382
384
  };
383
- return ot(t, e, {
384
- ...o,
385
+ return st(t, e, {
386
+ ...i,
385
387
  platform: r
386
388
  });
387
389
  };
388
390
  export {
389
- Et as autoUpdate,
390
- Wt as computePosition,
391
- Ft as flip,
392
- M as getOverflowAncestors,
393
- Ot as platform
391
+ Ft as autoUpdate,
392
+ St as computePosition,
393
+ Wt as flip,
394
+ z as getOverflowAncestors,
395
+ Ct as platform
394
396
  };
@@ -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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caspeco/casper-ui-library",
3
- "version": "5.0.1",
3
+ "version": "5.1.1",
4
4
  "prettier": "@caspeco/prettier-config",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -25,23 +25,23 @@
25
25
  "@arethetypeswrong/cli": "^0.18.2",
26
26
  "@caspeco/eslint-config": "^4.0.5",
27
27
  "@caspeco/prettier-config": "^1.0.6",
28
- "@eslint/js": "^9.33.0",
29
- "@testing-library/jest-dom": "^6.7.0",
28
+ "@eslint/js": "^9.34.0",
29
+ "@testing-library/jest-dom": "^6.8.0",
30
30
  "@testing-library/react": "^16.3.0",
31
31
  "@types/jest": "^30.0.0",
32
32
  "@types/node": "^24.3.0",
33
33
  "@types/react": "^18.3.12",
34
34
  "@types/react-dom": "^18.3.1",
35
- "@vitejs/plugin-react-swc": "^4.0.0",
36
- "eslint": "^9.33.0",
35
+ "@vitejs/plugin-react-swc": "^4.0.1",
36
+ "eslint": "^9.34.0",
37
37
  "eslint-plugin-react-hooks": "^5.2.0",
38
38
  "eslint-plugin-react-refresh": "^0.4.20",
39
39
  "globals": "^16.3.0",
40
40
  "jsdom": "^26.1.0",
41
41
  "tsc-alias": "^1.8.16",
42
42
  "typescript": "~5.9.2",
43
- "typescript-eslint": "^8.39.1",
44
- "vite": "^7.1.2",
43
+ "typescript-eslint": "^8.40.0",
44
+ "vite": "^7.1.3",
45
45
  "vite-plugin-dts": "^4.5.4",
46
46
  "vite-tsconfig-paths": "^5.1.4",
47
47
  "vitest": "^3.2.4"
@@ -54,7 +54,7 @@
54
54
  },
55
55
  "dependencies": {
56
56
  "@chakra-ui/anatomy": "^2.3.4",
57
- "@floating-ui/dom": "^1.7.3",
57
+ "@floating-ui/dom": "^1.7.4",
58
58
  "@tanstack/react-table": "^8.21.3",
59
59
  "csstype": "^3.1.3",
60
60
  "date-fns": "^4.1.0"