@pibit.ai/cure-design-system 0.5.12 → 0.6.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.
Files changed (61) hide show
  1. package/dist/applications/date-picker/calendar-value.d.ts +4 -0
  2. package/dist/applications/date-picker/calendar-value.d.ts.map +1 -0
  3. package/dist/applications/date-picker/calendar-value.js +6 -0
  4. package/dist/applications/date-picker/calendar.d.ts.map +1 -1
  5. package/dist/applications/date-picker/calendar.js +130 -124
  6. package/dist/applications/date-picker/date-time-calendar.d.ts.map +1 -1
  7. package/dist/applications/date-picker/date-time-calendar.js +56 -55
  8. package/dist/index.d.ts +1 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +161 -157
  11. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +6 -6
  12. package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +5 -5
  13. package/dist/node_modules/framer-motion/dist/es/utils/use-composed-ref.js +3 -3
  14. package/dist/node_modules/{@react-stately/data/dist → react-stately/dist/private/data}/useListData.js +61 -64
  15. package/dist/primitives/avatar/avatar.d.ts +46 -28
  16. package/dist/primitives/avatar/avatar.d.ts.map +1 -1
  17. package/dist/primitives/avatar/avatar.js +114 -39
  18. package/dist/primitives/avatar/base-components/avatar-online-indicator.d.ts +8 -0
  19. package/dist/primitives/avatar/base-components/avatar-online-indicator.d.ts.map +1 -0
  20. package/dist/primitives/avatar/base-components/avatar-online-indicator.js +29 -0
  21. package/dist/primitives/avatar/base-components/index.d.ts +3 -0
  22. package/dist/primitives/avatar/base-components/index.d.ts.map +1 -0
  23. package/dist/primitives/avatar/base-components/verified-tick.d.ts +7 -0
  24. package/dist/primitives/avatar/base-components/verified-tick.d.ts.map +1 -0
  25. package/dist/primitives/avatar/base-components/verified-tick.js +41 -0
  26. package/dist/primitives/dropdown/dropdown.d.ts +2 -2
  27. package/dist/primitives/input/input.d.ts.map +1 -1
  28. package/dist/primitives/input/input.js +9 -1
  29. package/dist/primitives/select/SearchInput.d.ts +7 -7
  30. package/dist/primitives/select/SearchInput.d.ts.map +1 -1
  31. package/dist/primitives/select/__tests__/multi-select-utils.test.d.ts +2 -0
  32. package/dist/primitives/select/__tests__/multi-select-utils.test.d.ts.map +1 -0
  33. package/dist/primitives/select/combobox.d.ts +1 -2
  34. package/dist/primitives/select/combobox.d.ts.map +1 -1
  35. package/dist/primitives/select/index.d.ts +3 -1
  36. package/dist/primitives/select/index.d.ts.map +1 -1
  37. package/dist/primitives/select/multi-select-utils.d.ts +7 -0
  38. package/dist/primitives/select/multi-select-utils.d.ts.map +1 -0
  39. package/dist/primitives/select/multi-select-utils.js +17 -0
  40. package/dist/primitives/select/multi-select.d.ts +17 -4
  41. package/dist/primitives/select/multi-select.d.ts.map +1 -1
  42. package/dist/primitives/select/multi-select.js +631 -237
  43. package/dist/primitives/select/searchable-select.d.ts +26 -4
  44. package/dist/primitives/select/searchable-select.d.ts.map +1 -1
  45. package/dist/primitives/select/searchable-select.js +292 -189
  46. package/dist/primitives/select/select-checkbox.d.ts +6 -0
  47. package/dist/primitives/select/select-checkbox.d.ts.map +1 -0
  48. package/dist/primitives/select/select-checkbox.js +62 -0
  49. package/dist/primitives/select/select-item.d.ts +3 -1
  50. package/dist/primitives/select/select-item.d.ts.map +1 -1
  51. package/dist/primitives/select/select-item.js +95 -77
  52. package/dist/primitives/select/select-native.d.ts +21 -2
  53. package/dist/primitives/select/select-native.d.ts.map +1 -1
  54. package/dist/primitives/select/select-native.js +88 -0
  55. package/dist/primitives/select/select-shared.d.ts +1 -0
  56. package/dist/primitives/select/select-shared.d.ts.map +1 -1
  57. package/dist/primitives/select/select.d.ts +12 -2
  58. package/dist/primitives/select/select.d.ts.map +1 -1
  59. package/dist/primitives/select/select.js +207 -152
  60. package/dist/styles/components.css +1 -1
  61. package/package.json +4 -4
@@ -1,13 +1,10 @@
1
1
  import { useState as K, useMemo as x } from "react";
2
- function g(s) {
3
- let { initialItems: f = [], initialSelectedKeys: d, getKey: r = (o) => {
4
- var m;
5
- return (m = o.id) !== null && m !== void 0 ? m : o.key;
6
- }, filter: t, initialFilterText: e = "" } = s, [l, i] = K({
2
+ function $(o) {
3
+ let { initialItems: f = [], initialSelectedKeys: d, getKey: i = (m) => m.id ?? m.key, filter: t, initialFilterText: e = "" } = o, [l, r] = K({
7
4
  items: f,
8
5
  selectedKeys: d === "all" ? "all" : new Set(d || []),
9
6
  filterText: e
10
- }), n = x(() => t ? l.items.filter((o) => t(o, l.filterText)) : l.items, [
7
+ }), n = x(() => t ? l.items.filter((m) => t(m, l.filterText)) : l.items, [
11
8
  l.items,
12
9
  l.filterText,
13
10
  t
@@ -16,15 +13,15 @@ function g(s) {
16
13
  ...l,
17
14
  items: n,
18
15
  ...S({
19
- getKey: r
20
- }, i),
21
- getItem(o) {
22
- return l.items.find((m) => r(m) === o);
16
+ getKey: i
17
+ }, r),
18
+ getItem(m) {
19
+ return l.items.find((s) => i(s) === m);
23
20
  }
24
21
  };
25
22
  }
26
- function S(s, f) {
27
- let { cursor: d, getKey: r } = s;
23
+ function S(o, f) {
24
+ let { cursor: d, getKey: i } = o;
28
25
  return {
29
26
  setSelectedKeys(t) {
30
27
  f((e) => ({
@@ -50,8 +47,8 @@ function S(s, f) {
50
47
  ...e,
51
48
  selectedKeys: /* @__PURE__ */ new Set()
52
49
  };
53
- let l = e.selectedKeys === "all" ? new Set(e.items.map(r)) : new Set(e.selectedKeys);
54
- for (let i of t) l.delete(i);
50
+ let l = e.selectedKeys === "all" ? new Set(e.items.map(i)) : new Set(e.selectedKeys);
51
+ for (let r of t) l.delete(r);
55
52
  return {
56
53
  ...e,
57
54
  selectedKeys: l
@@ -69,20 +66,20 @@ function S(s, f) {
69
66
  },
70
67
  insertBefore(t, ...e) {
71
68
  f((l) => {
72
- let i = l.items.findIndex((n) => (r == null ? void 0 : r(n)) === t);
73
- if (i === -1)
74
- if (l.items.length === 0) i = 0;
69
+ let r = l.items.findIndex((n) => (i == null ? void 0 : i(n)) === t);
70
+ if (r === -1)
71
+ if (l.items.length === 0) r = 0;
75
72
  else return l;
76
- return u(l, i, ...e);
73
+ return u(l, r, ...e);
77
74
  });
78
75
  },
79
76
  insertAfter(t, ...e) {
80
77
  f((l) => {
81
- let i = l.items.findIndex((n) => (r == null ? void 0 : r(n)) === t);
82
- if (i === -1)
83
- if (l.items.length === 0) i = 0;
78
+ let r = l.items.findIndex((n) => (i == null ? void 0 : i(n)) === t);
79
+ if (r === -1)
80
+ if (l.items.length === 0) r = 0;
84
81
  else return l;
85
- return u(l, i + 1, ...e);
82
+ return u(l, r + 1, ...e);
86
83
  });
87
84
  },
88
85
  prepend(...t) {
@@ -93,14 +90,14 @@ function S(s, f) {
93
90
  },
94
91
  remove(...t) {
95
92
  f((e) => {
96
- let l = new Set(t), i = e.items.filter((o) => !l.has(r(o))), n = "all";
93
+ let l = new Set(t), r = e.items.filter((m) => !l.has(i(m))), n = "all";
97
94
  if (e.selectedKeys !== "all") {
98
95
  n = new Set(e.selectedKeys);
99
- for (let o of t) n.delete(o);
96
+ for (let m of t) n.delete(m);
100
97
  }
101
- return d == null && i.length === 0 && (n = /* @__PURE__ */ new Set()), {
98
+ return d == null && r.length === 0 && (n = /* @__PURE__ */ new Set()), {
102
99
  ...e,
103
- items: i,
100
+ items: r,
104
101
  selectedKeys: n
105
102
  };
106
103
  });
@@ -112,7 +109,7 @@ function S(s, f) {
112
109
  items: [],
113
110
  selectedKeys: /* @__PURE__ */ new Set()
114
111
  };
115
- let e = t.selectedKeys, l = t.items.filter((i) => !e.has(r(i)));
112
+ let e = t.selectedKeys, l = t.items.filter((r) => !e.has(i(r)));
116
113
  return {
117
114
  ...t,
118
115
  items: l,
@@ -122,10 +119,10 @@ function S(s, f) {
122
119
  },
123
120
  move(t, e) {
124
121
  f((l) => {
125
- let i = l.items.findIndex((m) => r(m) === t);
126
- if (i === -1) return l;
127
- let n = l.items.slice(), [o] = n.splice(i, 1);
128
- return n.splice(e, 0, o), {
122
+ let r = l.items.findIndex((s) => i(s) === t);
123
+ if (r === -1) return l;
124
+ let n = l.items.slice(), [m] = n.splice(r, 1);
125
+ return n.splice(e, 0, m), {
129
126
  ...l,
130
127
  items: n
131
128
  };
@@ -133,80 +130,80 @@ function S(s, f) {
133
130
  },
134
131
  moveBefore(t, e) {
135
132
  f((l) => {
136
- let i = l.items.findIndex((m) => r(m) === t);
137
- if (i === -1) return l;
138
- let o = (Array.isArray(e) ? e : [
133
+ let r = l.items.findIndex((s) => i(s) === t);
134
+ if (r === -1) return l;
135
+ let m = (Array.isArray(e) ? e : [
139
136
  ...e
140
- ]).map((m) => l.items.findIndex((c) => r(c) === m)).sort((m, c) => m - c);
141
- return y(l, o, i);
137
+ ]).map((s) => l.items.findIndex((c) => i(c) === s)).sort((s, c) => s - c);
138
+ return y(l, m, r);
142
139
  });
143
140
  },
144
141
  moveAfter(t, e) {
145
142
  f((l) => {
146
- let i = l.items.findIndex((m) => r(m) === t);
147
- if (i === -1) return l;
148
- let o = (Array.isArray(e) ? e : [
143
+ let r = l.items.findIndex((s) => i(s) === t);
144
+ if (r === -1) return l;
145
+ let m = (Array.isArray(e) ? e : [
149
146
  ...e
150
- ]).map((m) => l.items.findIndex((c) => r(c) === m)).sort((m, c) => m - c);
151
- return y(l, o, i + 1);
147
+ ]).map((s) => l.items.findIndex((c) => i(c) === s)).sort((s, c) => s - c);
148
+ return y(l, m, r + 1);
152
149
  });
153
150
  },
154
151
  update(t, e) {
155
152
  f((l) => {
156
- let i = l.items.findIndex((o) => r(o) === t);
157
- if (i === -1) return l;
153
+ let r = l.items.findIndex((m) => i(m) === t);
154
+ if (r === -1) return l;
158
155
  let n;
159
- return typeof e == "function" ? n = e(l.items[i]) : n = e, {
156
+ return typeof e == "function" ? n = e(l.items[r]) : n = e, {
160
157
  ...l,
161
158
  items: [
162
- ...l.items.slice(0, i),
159
+ ...l.items.slice(0, r),
163
160
  n,
164
- ...l.items.slice(i + 1)
161
+ ...l.items.slice(r + 1)
165
162
  ]
166
163
  };
167
164
  });
168
165
  }
169
166
  };
170
167
  }
171
- function u(s, f, ...d) {
168
+ function u(o, f, ...d) {
172
169
  return {
173
- ...s,
170
+ ...o,
174
171
  items: [
175
- ...s.items.slice(0, f),
172
+ ...o.items.slice(0, f),
176
173
  ...d,
177
- ...s.items.slice(f)
174
+ ...o.items.slice(f)
178
175
  ]
179
176
  };
180
177
  }
181
- function y(s, f, d) {
178
+ function y(o, f, d) {
182
179
  d -= f.filter((e) => e < d).length;
183
- let r = f.map((e) => ({
180
+ let i = f.map((e) => ({
184
181
  from: e,
185
182
  to: d++
186
183
  }));
187
- for (let e = 0; e < r.length; e++) {
188
- let l = r[e].from;
189
- for (let i = e; i < r.length; i++)
190
- r[i].from > l && r[i].from--;
184
+ for (let e = 0; e < i.length; e++) {
185
+ let l = i[e].from;
186
+ for (let r = e; r < i.length; r++)
187
+ i[r].from > l && i[r].from--;
191
188
  }
192
- for (let e = 0; e < r.length; e++) {
193
- let l = r[e];
194
- for (let i = r.length - 1; i > e; i--) {
195
- let n = r[i];
189
+ for (let e = 0; e < i.length; e++) {
190
+ let l = i[e];
191
+ for (let r = i.length - 1; r > e; r--) {
192
+ let n = i[r];
196
193
  n.from < l.to ? l.to++ : n.from++;
197
194
  }
198
195
  }
199
- let t = s.items.slice();
200
- for (let e of r) {
196
+ let t = o.items.slice();
197
+ for (let e of i) {
201
198
  let [l] = t.splice(e.from, 1);
202
199
  t.splice(e.to, 0, l);
203
200
  }
204
201
  return {
205
- ...s,
202
+ ...o,
206
203
  items: t
207
204
  };
208
205
  }
209
206
  export {
210
207
  S as createListActions,
211
- g as useListData
208
+ $ as useListData
212
209
  };
@@ -1,32 +1,50 @@
1
- import { VariantProps } from 'class-variance-authority';
2
- declare const avatarVariants: (props?: ({
3
- size?: "sm" | "md" | "lg" | "xl" | null | undefined;
4
- } & import('class-variance-authority/types').ClassProp) | undefined) => string;
5
- export interface AvatarProps extends VariantProps<typeof avatarVariants> {
6
- /** Image source URL */
7
- src?: string;
8
- /** Alt text for image */
9
- alt?: string;
10
- /** Fallback text (usually initials) */
11
- fallback?: string;
12
- /** Additional CSS classes */
1
+ import { FC, ReactNode } from 'react';
2
+ type AvatarSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
3
+ export interface AvatarProps {
4
+ size?: AvatarSize;
13
5
  className?: string;
6
+ src?: string | null;
7
+ alt?: string;
8
+ /**
9
+ * Display a contrast border around the avatar.
10
+ */
11
+ contrastBorder?: boolean;
12
+ /**
13
+ * Display a badge (i.e. company logo).
14
+ */
15
+ badge?: ReactNode;
16
+ /**
17
+ * Display a status indicator.
18
+ */
19
+ status?: "online" | "offline";
20
+ /**
21
+ * Display a verified tick icon.
22
+ *
23
+ * @default false
24
+ */
25
+ verified?: boolean;
26
+ /**
27
+ * The initials of the user to display if no image is available.
28
+ */
29
+ initials?: string;
30
+ /**
31
+ * An icon to display if no image is available.
32
+ */
33
+ placeholderIcon?: FC<{
34
+ className?: string;
35
+ }>;
36
+ /**
37
+ * A placeholder to display if no image is available.
38
+ */
39
+ placeholder?: ReactNode;
40
+ /**
41
+ * Whether the avatar should show a focus ring when the parent group is in focus.
42
+ * For example, when the avatar is wrapped inside a link.
43
+ *
44
+ * @default false
45
+ */
46
+ focusable?: boolean;
14
47
  }
15
- /**
16
- * Avatar component for user profile images
17
- *
18
- * Features:
19
- * - Automatic fallback to initials
20
- * - Multiple sizes
21
- * - Handles loading states
22
- *
23
- * @example
24
- * <Avatar src="/user.jpg" alt="John Doe" fallback="JD" />
25
- * <Avatar fallback="AB" size="lg" />
26
- */
27
- export declare function Avatar({ src, alt, fallback, size, className }: AvatarProps): import("react/jsx-runtime").JSX.Element;
28
- export declare namespace Avatar {
29
- var displayName: string;
30
- }
48
+ export declare const Avatar: ({ contrastBorder, size, src, alt, initials, placeholder, placeholderIcon: PlaceholderIcon, badge, status, verified, focusable, className, }: AvatarProps) => import("react/jsx-runtime").JSX.Element;
31
49
  export {};
32
50
  //# sourceMappingURL=avatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/primitives/avatar/avatar.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,cAAc;;8EAYlB,CAAC;AAEH,MAAM,WAAW,WAAY,SAAQ,YAAY,CAAC,OAAO,cAAc,CAAC;IACtE,uBAAuB;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,WAAW,2CAkB1E;yBAlBe,MAAM"}
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../src/primitives/avatar/avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAK1D,KAAK,UAAU,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;AAEnE,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,EAAE,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7C;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAwCD,eAAO,MAAM,MAAM,GAAI,6IAapB,WAAW,4CAuFb,CAAC"}
@@ -1,43 +1,118 @@
1
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import * as a from "@radix-ui/react-avatar";
3
- import { cva as n } from "class-variance-authority";
4
- import { cn as r } from "../../utils/cn.js";
5
- const f = n("relative inline-flex shrink-0 overflow-hidden rounded-full", {
6
- variants: {
7
- size: {
8
- sm: "h-8 w-8",
9
- md: "h-10 w-10",
10
- lg: "h-12 w-12",
11
- xl: "h-16 w-16"
12
- }
1
+ import { jsxs as z, jsx as e } from "react/jsx-runtime";
2
+ import { useState as y } from "react";
3
+ import { User01 as h } from "@untitledui/icons";
4
+ import { cx as o } from "../../utils/cn.js";
5
+ import { AvatarOnlineIndicator as N } from "./base-components/avatar-online-indicator.js";
6
+ import { VerifiedTick as j } from "./base-components/verified-tick.js";
7
+ const r = {
8
+ xxs: {
9
+ root: "size-4 outline-[0.5px] -outline-offset-[0.5px]",
10
+ initials: "text-xs font-semibold",
11
+ icon: "size-3"
12
+ },
13
+ xs: {
14
+ root: "size-6 outline-[0.5px] -outline-offset-[0.5px]",
15
+ initials: "text-xs font-semibold",
16
+ icon: "size-4"
17
+ },
18
+ sm: {
19
+ root: "size-8 outline-[0.75px] -outline-offset-[0.75px]",
20
+ initials: "text-sm font-semibold",
21
+ icon: "size-5"
22
+ },
23
+ md: {
24
+ root: "size-10 outline-1 -outline-offset-1",
25
+ initials: "text-md font-semibold",
26
+ icon: "size-6"
13
27
  },
14
- defaultVariants: {
15
- size: "md"
28
+ lg: {
29
+ root: "size-12 outline-1 -outline-offset-1",
30
+ initials: "text-lg font-semibold",
31
+ icon: "size-7"
32
+ },
33
+ xl: {
34
+ root: "size-14 outline-1 -outline-offset-1",
35
+ initials: "text-xl font-semibold",
36
+ icon: "size-8"
37
+ },
38
+ "2xl": {
39
+ root: "size-16 outline-1 -outline-offset-1",
40
+ initials: "text-display-xs font-semibold",
41
+ icon: "size-8"
16
42
  }
17
- });
18
- function c({ src: t, alt: l, fallback: i, size: s, className: m }) {
19
- return /* @__PURE__ */ o(a.Root, { className: r(f({ size: s }), m), children: [
20
- /* @__PURE__ */ e(
21
- a.Image,
22
- {
23
- src: t,
24
- alt: l,
25
- className: "h-full w-full object-cover"
26
- }
27
- ),
28
- /* @__PURE__ */ e(
29
- a.Fallback,
30
- {
31
- className: r(
32
- "flex h-full w-full items-center justify-center",
33
- "bg-gray-200 text-gray-700 font-medium text-sm"
34
- ),
35
- children: i
36
- }
37
- )
38
- ] });
39
- }
40
- c.displayName = "Avatar";
43
+ }, U = ({
44
+ contrastBorder: u = !0,
45
+ size: t = "md",
46
+ src: n,
47
+ alt: f,
48
+ initials: i,
49
+ placeholder: x,
50
+ placeholderIcon: s,
51
+ badge: m,
52
+ status: l,
53
+ verified: c,
54
+ focusable: d = !1,
55
+ className: a
56
+ }) => {
57
+ const [p, b] = y(!1), g = () => n && !p ? /* @__PURE__ */ e(
58
+ "img",
59
+ {
60
+ "data-avatar-img": !0,
61
+ className: "size-full rounded-full object-cover",
62
+ src: n,
63
+ alt: f,
64
+ onError: () => b(!0)
65
+ }
66
+ ) : i ? /* @__PURE__ */ e(
67
+ "span",
68
+ {
69
+ className: o(
70
+ "text-brand-tertiary",
71
+ r[t].initials,
72
+ a
73
+ ),
74
+ children: i == null ? void 0 : i.toLocaleUpperCase()
75
+ }
76
+ ) : s ? /* @__PURE__ */ e(
77
+ s,
78
+ {
79
+ className: o("text-fg-quaternary", r[t].icon)
80
+ }
81
+ ) : x || /* @__PURE__ */ e(h, { className: o("text-fg-quaternary", r[t].icon) }), v = () => l ? /* @__PURE__ */ e(
82
+ N,
83
+ {
84
+ status: l,
85
+ size: t === "xxs" ? "xs" : t
86
+ }
87
+ ) : c ? /* @__PURE__ */ e(
88
+ j,
89
+ {
90
+ size: t === "xxs" ? "xs" : t,
91
+ className: o(
92
+ "absolute right-0 bottom-0",
93
+ (t === "xxs" || t === "xs") && "-right-px -bottom-px"
94
+ )
95
+ }
96
+ ) : m;
97
+ return /* @__PURE__ */ z(
98
+ "div",
99
+ {
100
+ "data-avatar": !0,
101
+ className: o(
102
+ "relative inline-flex shrink-0 items-center justify-center rounded-full bg-[var(--color-utility-brand-25)] outline-transparent",
103
+ // Focus styles
104
+ d && "group-outline-focus-ring group-focus-visible:outline-2 group-focus-visible:outline-offset-2",
105
+ u && "outline outline-[var(--color-brand-50)]",
106
+ r[t].root,
107
+ a
108
+ ),
109
+ children: [
110
+ g(),
111
+ v()
112
+ ]
113
+ }
114
+ );
115
+ };
41
116
  export {
42
- c as Avatar
117
+ U as Avatar
43
118
  };
@@ -0,0 +1,8 @@
1
+ interface AvatarOnlineIndicatorProps {
2
+ size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
3
+ status: "online" | "offline";
4
+ className?: string;
5
+ }
6
+ export declare const AvatarOnlineIndicator: ({ size, status, className, }: AvatarOnlineIndicatorProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=avatar-online-indicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-online-indicator.d.ts","sourceRoot":"","sources":["../../../../src/primitives/avatar/base-components/avatar-online-indicator.tsx"],"names":[],"mappings":"AAaA,UAAU,0BAA0B;IAClC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC/D,MAAM,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,qBAAqB,GAAI,8BAInC,0BAA0B,4CAS5B,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { cx as r } from "../../../utils/cn.js";
3
+ const l = {
4
+ xs: "size-1.5",
5
+ sm: "size-2",
6
+ md: "size-2.5",
7
+ lg: "size-3",
8
+ xl: "size-3.5",
9
+ "2xl": "size-4",
10
+ "3xl": "size-4.5",
11
+ "4xl": "size-5"
12
+ }, a = ({
13
+ size: s,
14
+ status: e,
15
+ className: i
16
+ }) => /* @__PURE__ */ o(
17
+ "span",
18
+ {
19
+ className: r(
20
+ "absolute right-0 bottom-0 rounded-full ring-[1.5px] ring-bg-primary",
21
+ e === "online" ? "bg-fg-success-secondary" : "bg-fg-disabled_subtle",
22
+ l[s],
23
+ i
24
+ )
25
+ }
26
+ );
27
+ export {
28
+ a as AvatarOnlineIndicator
29
+ };
@@ -0,0 +1,3 @@
1
+ export * from './avatar-online-indicator';
2
+ export * from './verified-tick';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/avatar/base-components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface VerifiedTickProps {
2
+ size: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl";
3
+ className?: string;
4
+ }
5
+ export declare const VerifiedTick: ({ size, className }: VerifiedTickProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=verified-tick.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verified-tick.d.ts","sourceRoot":"","sources":["../../../../src/primitives/avatar/base-components/verified-tick.tsx"],"names":[],"mappings":"AAaA,UAAU,iBAAiB;IACzB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,GAAI,qBAAqB,iBAAiB,4CAkBlE,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { jsxs as t, jsx as i } from "react/jsx-runtime";
2
+ import { cx as s } from "../../../utils/cn.js";
3
+ const o = {
4
+ xs: { root: "size-2.5", tick: "size-[4.38px" },
5
+ sm: { root: "size-3", tick: "size-[5.25px]" },
6
+ md: { root: "size-3.5", tick: "size-[6.13px]" },
7
+ lg: { root: "size-4", tick: "size-[7px]" },
8
+ xl: { root: "size-4.5", tick: "size-[7.88px]" },
9
+ "2xl": { root: "size-5", tick: "size-[8.75px]" },
10
+ "3xl": { root: "size-6", tick: "size-[10.5px]" },
11
+ "4xl": { root: "size-8", tick: "size-[14px]" }
12
+ }, r = ({ size: C, className: e }) => /* @__PURE__ */ t(
13
+ "svg",
14
+ {
15
+ "data-verified": !0,
16
+ className: s("z-10 text-utility-blue-500", o[C].root, e),
17
+ viewBox: "0 0 10 10",
18
+ fill: "none",
19
+ children: [
20
+ /* @__PURE__ */ i(
21
+ "path",
22
+ {
23
+ d: "M7.72237 1.77098C7.81734 2.00068 7.99965 2.18326 8.2292 2.27858L9.03413 2.61199C9.26384 2.70714 9.44635 2.88965 9.5415 3.11936C9.63665 3.34908 9.63665 3.60718 9.5415 3.83689L9.20833 4.64125C9.11313 4.87106 9.113 5.12943 9.20863 5.35913L9.54122 6.16325C9.58839 6.27702 9.61268 6.39897 9.6127 6.52214C9.61272 6.6453 9.58847 6.76726 9.54134 6.88105C9.4942 6.99484 9.42511 7.09823 9.33801 7.18531C9.2509 7.27238 9.14749 7.34144 9.03369 7.38854L8.22934 7.72171C7.99964 7.81669 7.81706 7.99899 7.72174 8.22855L7.38833 9.03348C7.29318 9.26319 7.11067 9.4457 6.88096 9.54085C6.65124 9.636 6.39314 9.636 6.16343 9.54085L5.35907 9.20767C5.12935 9.11276 4.87134 9.11295 4.64177 9.20821L3.83684 9.54115C3.60725 9.63608 3.34937 9.636 3.11984 9.54092C2.89032 9.44585 2.70791 9.26356 2.6127 9.03409L2.27918 8.22892C2.18421 7.99923 2.0019 7.81665 1.77235 7.72133L0.967421 7.38792C0.737807 7.29281 0.555355 7.11041 0.460169 6.88083C0.364983 6.65125 0.364854 6.39327 0.45981 6.16359L0.792984 5.35924C0.8879 5.12952 0.887707 4.87151 0.792445 4.64193L0.459749 3.83642C0.41258 3.72265 0.388291 3.60069 0.388272 3.47753C0.388252 3.35436 0.412501 3.2324 0.459634 3.11861C0.506767 3.00482 0.57586 2.90144 0.662965 2.81436C0.75007 2.72728 0.853479 2.65822 0.967283 2.61113L1.77164 2.27795C2.00113 2.18306 2.1836 2.00099 2.27899 1.7717L2.6124 0.966768C2.70755 0.737054 2.89006 0.554547 3.11978 0.459397C3.34949 0.364246 3.60759 0.364246 3.83731 0.459397L4.64166 0.792571C4.87138 0.887487 5.12939 0.887293 5.35897 0.792031L6.16424 0.459913C6.39392 0.364816 6.65197 0.364836 6.88164 0.459968C7.11131 0.555099 7.29379 0.737554 7.38895 0.967208L7.72247 1.77238L7.72237 1.77098Z",
24
+ className: "fill-current"
25
+ }
26
+ ),
27
+ /* @__PURE__ */ i(
28
+ "path",
29
+ {
30
+ fillRule: "evenodd",
31
+ clipRule: "evenodd",
32
+ d: "M6.95829 3.68932C7.02509 3.58439 7.04747 3.45723 7.02051 3.3358C6.99356 3.21437 6.91946 3.10862 6.81454 3.04182C6.70961 2.97502 6.58245 2.95264 6.46102 2.97959C6.33959 3.00655 6.23384 3.08064 6.16704 3.18557L4.33141 6.06995L3.49141 5.01995C3.41375 4.92281 3.30069 4.8605 3.17709 4.84673C3.05349 4.83296 2.92949 4.86885 2.83235 4.94651C2.73522 5.02417 2.67291 5.13723 2.65914 5.26083C2.64536 5.38443 2.68125 5.50843 2.75891 5.60557L4.00891 7.16807C4.0555 7.22638 4.11533 7.27271 4.18344 7.30323C4.25154 7.33375 4.32595 7.34757 4.40047 7.34353C4.47499 7.3395 4.54747 7.31773 4.61188 7.28004C4.67629 7.24234 4.73077 7.18981 4.77079 7.12682L6.95829 3.68932Z",
33
+ fill: "white"
34
+ }
35
+ )
36
+ ]
37
+ }
38
+ );
39
+ export {
40
+ r as VerifiedTick
41
+ };
@@ -31,8 +31,8 @@ export declare const Dropdown: {
31
31
  Root: typeof AriaMenuTrigger;
32
32
  Popover: ({ shouldCloseOnInteractOutside, ...props }: DropdownPopoverProps) => import("react/jsx-runtime").JSX.Element;
33
33
  Menu: <T extends object>(props: DropdownMenuProps<T>) => import("react/jsx-runtime").JSX.Element;
34
- Section: <T extends object>(props: import('react-aria-components').MenuSectionProps<T> & React.RefAttributes<HTMLElement>) => import('react').ReactElement | null;
35
- SectionHeader: (props: React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
34
+ Section: <T>(props: import('react-aria-components').MenuSectionProps<T> & React.RefAttributes<HTMLElement>) => import('react').ReactElement | null;
35
+ SectionHeader: (props: import('react-aria-components').HeaderProps & React.RefAttributes<HTMLElement>) => React.ReactElement | null;
36
36
  Item: ({ label, children, addon, icon: Icon, unstyled, isSelected, size, ...props }: DropdownItemProps) => import("react/jsx-runtime").JSX.Element;
37
37
  Separator: (props: AriaSeparatorProps) => import("react/jsx-runtime").JSX.Element;
38
38
  DotsButton: (props: AriaButtonProps & RefAttributes<HTMLButtonElement>) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/primitives/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,IAAI,kBAAkB,EACrC,MAAM,uBAAuB,CAAC;AAO/B,OAAO,KAAK,EA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,UAAU,SAAS;IACjB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,cACf,SACE,SAAS,EACT,kBAAkB,EAClB,IAAI,CACF,cAAc,EACZ,MAAM,GACN,kBAAkB,GAClB,gBAAgB,GAChB,eAAe,GACf,kBAAkB,CACrB;IACH,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAID,eAAO,MAAM,SAAS;8BAA6B,cAAc;;CAehE,CAAC;AAIF,MAAM,WAAW,UAAW,SAAQ,cAAc,EAAE,SAAS;IAC3D,+CAA+C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,oDAAoD;IACpD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IACtE,kCAAkC;IAClC,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACnC,sCAAsC;IACtC,eAAe,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACtC,6BAA6B;IAC7B,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,KAAK;wXA6Bf,UAAU;;CAqFZ,CAAC"}
@@ -223,7 +223,15 @@ const M = {
223
223
  ref: d,
224
224
  placeholder: L,
225
225
  className: i(
226
- "m-0 w-full bg-transparent text-primary ring-0 outline-hidden placeholder:text-placeholder_subtle autofill:rounded-lg autofill:text-primary",
226
+ "m-0 w-full bg-transparent text-primary ring-0 outline-hidden placeholder:text-placeholder_subtle autofill:text-primary",
227
+ // Chrome paints the autofill background on this element rather than on
228
+ // the group, so it needs the group's corner radius. Hardcoded, it was
229
+ // `rounded-lg` (10px) on every size, while the group is `rounded-md`
230
+ // (8px) at sm and md — the fill's corners pulled back further than the
231
+ // border and left a crescent of the field showing at each one. Only lg
232
+ // matched, by coincidence. `inherit` reads the group's computed radius,
233
+ // so a size that changes its radius later brings the autofill with it.
234
+ "autofill:rounded-[inherit]",
227
235
  "disabled:cursor-not-allowed disabled:text-disabled group-disabled:pointer-events-none",
228
236
  n[s].root,
229
237
  M[s],