beez-ui 2.7.1 → 3.0.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +43 -13
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/dist/components/account-menu.d.ts +4 -3
  5. package/dist/components/account-menu.js +63 -54
  6. package/dist/components/alert.d.ts +15 -15
  7. package/dist/components/alert.js +289 -270
  8. package/dist/components/animated-theme-toggler.js +1 -1
  9. package/dist/components/avatar.d.ts +56 -31
  10. package/dist/components/avatar.js +394 -277
  11. package/dist/components/badge.d.ts +8 -28
  12. package/dist/components/badge.js +55 -108
  13. package/dist/components/calendar.d.ts +36 -26
  14. package/dist/components/calendar.js +132 -1227
  15. package/dist/components/card.d.ts +36 -25
  16. package/dist/components/card.js +895 -72
  17. package/dist/components/carousel.d.ts +63 -47
  18. package/dist/components/carousel.js +496 -777
  19. package/dist/components/data-table.d.ts +5 -4
  20. package/dist/components/data-table.js +7 -6
  21. package/dist/components/dialog-surface.d.ts +23 -1
  22. package/dist/components/dialog-surface.js +99 -3
  23. package/dist/components/dialog.d.ts +80 -45
  24. package/dist/components/dialog.js +258 -503
  25. package/dist/components/dropdown-menu.d.ts +56 -73
  26. package/dist/components/dropdown-menu.js +79 -714
  27. package/dist/components/field.d.ts +3 -1
  28. package/dist/components/field.js +49 -39
  29. package/dist/components/filter-presets-bar.js +2 -2
  30. package/dist/components/filter-query-bar.js +1 -1
  31. package/dist/components/hover-card.d.ts +42 -41
  32. package/dist/components/hover-card.js +57 -483
  33. package/dist/components/pagination.d.ts +53 -31
  34. package/dist/components/pagination.js +176 -412
  35. package/dist/components/popover.d.ts +11 -23
  36. package/dist/components/popover.js +19 -304
  37. package/dist/components/{alert-dialog.d.ts → primitives/alert-dialog.d.ts} +17 -5
  38. package/dist/components/{alert-dialog.js → primitives/alert-dialog.js} +102 -54
  39. package/dist/components/primitives/avatar.d.ts +46 -0
  40. package/dist/components/primitives/avatar.js +267 -0
  41. package/dist/components/primitives/calendar.d.ts +37 -0
  42. package/dist/components/primitives/calendar.js +1250 -0
  43. package/dist/components/primitives/carousel.d.ts +106 -0
  44. package/dist/components/primitives/carousel.js +928 -0
  45. package/dist/components/primitives/dialog.d.ts +62 -0
  46. package/dist/components/primitives/dialog.js +490 -0
  47. package/dist/components/primitives/dropdown-menu-items.d.ts +59 -0
  48. package/dist/components/primitives/dropdown-menu-items.js +265 -0
  49. package/dist/components/primitives/dropdown-menu.d.ts +64 -0
  50. package/dist/components/primitives/dropdown-menu.js +557 -0
  51. package/dist/components/primitives/hover-card.d.ts +50 -0
  52. package/dist/components/primitives/hover-card.js +507 -0
  53. package/dist/components/primitives/pagination.d.ts +65 -0
  54. package/dist/components/primitives/pagination.js +373 -0
  55. package/dist/components/primitives/popover.d.ts +22 -0
  56. package/dist/components/primitives/popover.js +213 -0
  57. package/dist/components/primitives/select.d.ts +36 -0
  58. package/dist/components/primitives/select.js +407 -0
  59. package/dist/components/primitives/tooltip.d.ts +30 -0
  60. package/dist/components/primitives/tooltip.js +277 -0
  61. package/dist/components/radio-group.d.ts +30 -17
  62. package/dist/components/radio-group.js +266 -315
  63. package/dist/components/rich-link-editor.js +1 -1
  64. package/dist/components/select.d.ts +51 -42
  65. package/dist/components/select.js +163 -495
  66. package/dist/components/skeleton.d.ts +16 -15
  67. package/dist/components/skeleton.js +99 -205
  68. package/dist/components/split-button.js +1 -1
  69. package/dist/components/switch.d.ts +3 -6
  70. package/dist/components/switch.js +163 -170
  71. package/dist/components/tabs.d.ts +3 -11
  72. package/dist/components/tabs.js +61 -75
  73. package/dist/components/themed-toaster.d.ts +1 -1
  74. package/dist/components/themed-toaster.js +1 -1
  75. package/dist/components/toaster.d.ts +1 -1
  76. package/dist/components/toaster.js +1 -1
  77. package/dist/components/tooltip.d.ts +36 -31
  78. package/dist/components/tooltip.js +44 -284
  79. package/dist/constants/alert.d.ts +5 -1
  80. package/dist/constants/alert.js +5 -1
  81. package/dist/constants/avatar.d.ts +24 -1
  82. package/dist/constants/avatar.js +19 -0
  83. package/dist/constants/calendar.d.ts +12 -0
  84. package/dist/constants/calendar.js +12 -0
  85. package/dist/constants/card.d.ts +23 -0
  86. package/dist/constants/card.js +20 -0
  87. package/dist/constants/carousel.d.ts +31 -13
  88. package/dist/constants/carousel.js +32 -11
  89. package/dist/constants/dialog.d.ts +6 -1
  90. package/dist/constants/dialog.js +5 -1
  91. package/dist/constants/dropdown-menu.d.ts +2 -2
  92. package/dist/constants/dropdown-menu.js +2 -2
  93. package/dist/constants/pagination.d.ts +13 -2
  94. package/dist/constants/pagination.js +13 -2
  95. package/dist/constants/select.d.ts +4 -2
  96. package/dist/constants/select.js +4 -2
  97. package/dist/constants/switch.d.ts +5 -16
  98. package/dist/constants/switch.js +6 -14
  99. package/dist/hooks/use-today.d.ts +7 -0
  100. package/dist/hooks/use-today.js +50 -0
  101. package/dist/hooks.d.ts +1 -0
  102. package/dist/hooks.js +1 -0
  103. package/dist/index.d.ts +0 -1
  104. package/dist/index.js +0 -1
  105. package/dist/motion/glide-indicator.d.ts +1 -1
  106. package/dist/motion/glide-indicator.js +1 -1
  107. package/dist/motion/presence.d.ts +0 -1
  108. package/dist/motion/presence.js +0 -1
  109. package/dist/styles.css +1 -1
  110. package/package.json +1 -6
@@ -1,305 +1,65 @@
1
1
  "use client";
2
2
  import { c as _c } from "react/compiler-runtime";
3
+ import { Tooltip as TooltipRoot, TooltipContent, TooltipTrigger } from "./primitives/tooltip.js";
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
5
  /**
4
- * Arc's Tooltip (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a short dark bubble on Arc's tokens that
5
- * waits a moment, then rises a few pixels from its trigger. While a tooltip is open, and briefly after it closes, the
6
- * next one opens at once and only fades. It keeps the Radix composition (`Tooltip`, `TooltipTrigger`,
7
- * `TooltipContent`, `TooltipProvider`) and adds Arc's shorthand: `<Tooltip content="..." side="...">` wraps its child.
8
- */
9
- import * as React from "react";
10
- import { Tooltip as TooltipPrimitive } from "radix-ui";
11
- import { ArcFloatingSlot } from "../motion/arc-floating-slot.js";
12
- import { createOverlayWarmth, useOpenedWhileWarm } from "../motion/overlay-warmth.js";
13
- import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../motion/presence.js";
14
- import { cn } from "../lib/utils.js";
15
- import { TOOLTIP_COLLISION_PADDING_PX, TOOLTIP_INSTANT_MOTION, TOOLTIP_MOTION, TOOLTIP_OPEN_DELAY_MS, TOOLTIP_SIDE_OFFSET_PX, TOOLTIP_SKIP_WINDOW_MS } from "../constants/tooltip.js";
16
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
17
- /** Every tooltip on the page shares one skip window, whichever provider it belongs to. */
18
- const tooltipWarmth = createOverlayWarmth(TOOLTIP_SKIP_WINDOW_MS);
19
- /** Whether the page was already warm when the surrounding layer opened, so its entrance only fades. */
20
- const TooltipOpenedWhileWarmContext = React.createContext(false);
21
- /** Tells a `Tooltip` whether a `TooltipProvider` already wraps it. */
22
- const TooltipProviderPresenceContext = React.createContext(false);
23
- /**
24
- * Shares the open delay among the tooltips it wraps.
25
- * @param props - Radix provider properties. `delayDuration` defaults to Arc's 250ms.
26
- * @returns The provider.
27
- */
28
- function TooltipProvider(t0) {
29
- const $ = _c(6);
30
- let props;
31
- let t1;
32
- if ($[0] !== t0) {
33
- ({delayDuration: t1, ...props} = t0);
34
- $[0] = t0;
35
- $[1] = props;
36
- $[2] = t1;
37
- } else {
38
- props = $[1];
39
- t1 = $[2];
40
- }
41
- const delayDuration = t1 === undefined ? TOOLTIP_OPEN_DELAY_MS : t1;
42
- let t2;
43
- if ($[3] !== delayDuration || $[4] !== props) {
44
- t2 = /* @__PURE__ */ _jsx(TooltipProviderPresenceContext.Provider, {
45
- value: true,
46
- children: /* @__PURE__ */ _jsx(TooltipPrimitive.Provider, {
47
- "data-slot": "tooltip-provider",
48
- delayDuration,
49
- ...props
50
- })
51
- });
52
- $[3] = delayDuration;
53
- $[4] = props;
54
- $[5] = t2;
55
- } else {
56
- t2 = $[5];
57
- }
58
- return t2;
59
- }
60
- /**
61
- * Owns the open state of one tooltip. It works with or without a `TooltipProvider`: without one it brings its own,
62
- * as Arc's Tooltip does.
63
- * @param props - Radix root properties plus Arc's optional `content` and `side` shorthand.
64
- * @returns The tooltip root.
6
+ * A short label on hover or focus that opens without delay when moving between tooltips.
7
+ * @param props - The bubble content, the trigger and optional placement and open state.
8
+ * @returns The trigger with its tooltip.
65
9
  */
66
10
  function Tooltip(t0) {
67
- const $ = _c(29);
68
- let children;
69
- let content;
70
- let delayDuration;
71
- let props;
72
- let side;
73
- if ($[0] !== t0) {
74
- ({content, side, children, delayDuration, ...props} = t0);
75
- $[0] = t0;
76
- $[1] = children;
77
- $[2] = content;
78
- $[3] = delayDuration;
79
- $[4] = props;
80
- $[5] = side;
81
- } else {
82
- children = $[1];
83
- content = $[2];
84
- delayDuration = $[3];
85
- props = $[4];
86
- side = $[5];
87
- }
88
- const [motionOpen, setMotionOpen] = useMotionOpenState(props);
89
- const isWarm = React.useSyncExternalStore(tooltipWarmth.subscribe, tooltipWarmth.isWarm, tooltipWarmth.isWarmOnServer);
90
- const openedWhileWarm = useOpenedWhileWarm(motionOpen, isWarm);
91
- const hasProvider = React.useContext(TooltipProviderPresenceContext);
11
+ const $ = _c(16);
12
+ const { content, children, side, align, sideOffset, collisionPadding, contentClassName, open, defaultOpen, onOpenChange, delayDuration } = t0;
92
13
  let t1;
93
- let t2;
94
- if ($[6] !== motionOpen) {
95
- t1 = () => {
96
- if (!motionOpen) {
97
- return;
98
- }
99
- return tooltipWarmth.open();
100
- };
101
- t2 = [motionOpen];
102
- $[6] = motionOpen;
103
- $[7] = t1;
104
- $[8] = t2;
105
- } else {
106
- t1 = $[7];
107
- t2 = $[8];
108
- }
109
- React.useEffect(t1, t2);
110
- const usesShorthand = content !== undefined;
111
- const t3 = isWarm ? 0 : delayDuration;
112
- let t4;
113
- if ($[9] !== children || $[10] !== content || $[11] !== side || $[12] !== usesShorthand) {
114
- t4 = usesShorthand ? /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(TooltipTrigger, {
14
+ if ($[0] !== children) {
15
+ t1 = /* @__PURE__ */ _jsx(TooltipTrigger, {
115
16
  asChild: true,
116
17
  children
117
- }), /* @__PURE__ */ _jsx(TooltipContent, {
118
- side,
119
- children: content
120
- })] }) : children;
121
- $[9] = children;
122
- $[10] = content;
123
- $[11] = side;
124
- $[12] = usesShorthand;
125
- $[13] = t4;
126
- } else {
127
- t4 = $[13];
128
- }
129
- let t5;
130
- if ($[14] !== motionOpen || $[15] !== props || $[16] !== setMotionOpen || $[17] !== t3 || $[18] !== t4) {
131
- t5 = /* @__PURE__ */ _jsx(TooltipPrimitive.Root, {
132
- "data-slot": "tooltip",
133
- ...props,
134
- delayDuration: t3,
135
- open: motionOpen,
136
- onOpenChange: setMotionOpen,
137
- children: t4
138
- });
139
- $[14] = motionOpen;
140
- $[15] = props;
141
- $[16] = setMotionOpen;
142
- $[17] = t3;
143
- $[18] = t4;
144
- $[19] = t5;
145
- } else {
146
- t5 = $[19];
147
- }
148
- let t6;
149
- if ($[20] !== openedWhileWarm || $[21] !== t5) {
150
- t6 = /* @__PURE__ */ _jsx(TooltipOpenedWhileWarmContext.Provider, {
151
- value: openedWhileWarm,
152
- children: t5
153
- });
154
- $[20] = openedWhileWarm;
155
- $[21] = t5;
156
- $[22] = t6;
157
- } else {
158
- t6 = $[22];
159
- }
160
- let t7;
161
- if ($[23] !== motionOpen || $[24] !== t6) {
162
- t7 = /* @__PURE__ */ _jsx(MotionOpenProvider, {
163
- scope: "tooltip",
164
- open: motionOpen,
165
- children: t6
166
- });
167
- $[23] = motionOpen;
168
- $[24] = t6;
169
- $[25] = t7;
170
- } else {
171
- t7 = $[25];
172
- }
173
- const root = t7;
174
- let t8;
175
- if ($[26] !== hasProvider || $[27] !== root) {
176
- t8 = hasProvider ? root : /* @__PURE__ */ _jsx(TooltipProvider, { children: root });
177
- $[26] = hasProvider;
178
- $[27] = root;
179
- $[28] = t8;
180
- } else {
181
- t8 = $[28];
182
- }
183
- return t8;
184
- }
185
- function TooltipTrigger(t0) {
186
- const $ = _c(4);
187
- let props;
188
- if ($[0] !== t0) {
189
- ({...props} = t0);
190
- $[0] = t0;
191
- $[1] = props;
192
- } else {
193
- props = $[1];
194
- }
195
- let t1;
196
- if ($[2] !== props) {
197
- t1 = /* @__PURE__ */ _jsx(TooltipPrimitive.Trigger, {
198
- "data-slot": "tooltip-trigger",
199
- ...props
200
18
  });
201
- $[2] = props;
202
- $[3] = t1;
19
+ $[0] = children;
20
+ $[1] = t1;
203
21
  } else {
204
- t1 = $[3];
22
+ t1 = $[1];
205
23
  }
206
- return t1;
207
- }
208
- /**
209
- * Renders Arc's bubble: inverted colors, a hairline border, the raised shadow and 15rem of maximum width.
210
- * @param props - Radix content properties. `sideOffset` defaults to 8px and `collisionPadding` to 12px.
211
- * @returns The portaled bubble.
212
- */
213
- function TooltipContent(t0) {
214
- const $ = _c(22);
215
- let children;
216
- let className;
217
- let props;
218
- let t1;
219
24
  let t2;
220
- if ($[0] !== t0) {
221
- ({className, sideOffset: t1, collisionPadding: t2, children, ...props} = t0);
222
- $[0] = t0;
223
- $[1] = children;
224
- $[2] = className;
225
- $[3] = props;
226
- $[4] = t1;
227
- $[5] = t2;
228
- } else {
229
- children = $[1];
230
- className = $[2];
231
- props = $[3];
232
- t1 = $[4];
233
- t2 = $[5];
234
- }
235
- const sideOffset = t1 === undefined ? TOOLTIP_SIDE_OFFSET_PX : t1;
236
- const collisionPadding = t2 === undefined ? TOOLTIP_COLLISION_PADDING_PX : t2;
237
- const openedWhileWarm = React.useContext(TooltipOpenedWhileWarmContext);
238
- const t3 = props.forceMount;
239
- let t4;
240
- if ($[6] !== openedWhileWarm) {
241
- t4 = () => openedWhileWarm ? TOOLTIP_INSTANT_MOTION : TOOLTIP_MOTION;
242
- $[6] = openedWhileWarm;
243
- $[7] = t4;
244
- } else {
245
- t4 = $[7];
246
- }
247
- let t5;
248
- if ($[8] !== className) {
249
- t5 = cn("z-50 inline-flex w-fit max-w-60 origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-(--radius-control) border border-[color-mix(in_oklab,var(--background)_14%,var(--foreground))] bg-foreground px-(--space-4) py-(--space-3) font-sans text-sm leading-(--leading-body) font-normal tracking-(--tracking-body) text-background shadow-(--shadow-raised) has-data-[slot=kbd]:pr-(--space-3) **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm", className);
250
- $[8] = className;
251
- $[9] = t5;
252
- } else {
253
- t5 = $[9];
254
- }
255
- let t6;
256
- if ($[10] !== children || $[11] !== collisionPadding || $[12] !== props || $[13] !== sideOffset || $[14] !== t5) {
257
- t6 = /* @__PURE__ */ _jsx(TooltipPrimitive.Content, {
258
- forceMount: true,
259
- "data-slot": "tooltip-content",
25
+ if ($[2] !== align || $[3] !== collisionPadding || $[4] !== content || $[5] !== contentClassName || $[6] !== side || $[7] !== sideOffset) {
26
+ t2 = /* @__PURE__ */ _jsx(TooltipContent, {
27
+ side,
28
+ align,
260
29
  sideOffset,
261
30
  collisionPadding,
262
- className: t5,
263
- ...props,
264
- children
265
- });
266
- $[10] = children;
267
- $[11] = collisionPadding;
268
- $[12] = props;
269
- $[13] = sideOffset;
270
- $[14] = t5;
271
- $[15] = t6;
272
- } else {
273
- t6 = $[15];
274
- }
275
- let t7;
276
- if ($[16] !== t4 || $[17] !== t6) {
277
- t7 = /* @__PURE__ */ _jsx(ArcFloatingSlot, {
278
- motion: t4,
279
- children: t6
31
+ className: contentClassName,
32
+ children: content
280
33
  });
281
- $[16] = t4;
282
- $[17] = t6;
283
- $[18] = t7;
34
+ $[2] = align;
35
+ $[3] = collisionPadding;
36
+ $[4] = content;
37
+ $[5] = contentClassName;
38
+ $[6] = side;
39
+ $[7] = sideOffset;
40
+ $[8] = t2;
284
41
  } else {
285
- t7 = $[18];
42
+ t2 = $[8];
286
43
  }
287
- let t8;
288
- if ($[19] !== props.forceMount || $[20] !== t7) {
289
- t8 = /* @__PURE__ */ _jsx(TooltipPrimitive.Portal, {
290
- forceMount: true,
291
- children: /* @__PURE__ */ _jsx(MotionPresence, {
292
- scope: "tooltip",
293
- forceMount: t3,
294
- children: t7
295
- })
44
+ let t3;
45
+ if ($[9] !== defaultOpen || $[10] !== delayDuration || $[11] !== onOpenChange || $[12] !== open || $[13] !== t1 || $[14] !== t2) {
46
+ t3 = /* @__PURE__ */ _jsxs(TooltipRoot, {
47
+ open,
48
+ defaultOpen,
49
+ onOpenChange,
50
+ delayDuration,
51
+ children: [t1, t2]
296
52
  });
297
- $[19] = props.forceMount;
298
- $[20] = t7;
299
- $[21] = t8;
53
+ $[9] = defaultOpen;
54
+ $[10] = delayDuration;
55
+ $[11] = onOpenChange;
56
+ $[12] = open;
57
+ $[13] = t1;
58
+ $[14] = t2;
59
+ $[15] = t3;
300
60
  } else {
301
- t8 = $[21];
61
+ t3 = $[15];
302
62
  }
303
- return t8;
63
+ return t3;
304
64
  }
305
- export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
65
+ export { Tooltip };
@@ -1,8 +1,12 @@
1
1
  /** Copy and options of Arc's Alert. */
2
2
  /** Arc's semantic tones for an alert; `danger` interrupts as an alert, the rest are polite statuses. */
3
3
  export type AlertTone = "info" | "success" | "warning" | "danger";
4
- /** Default Spanish accessible name of the dismiss button. */
4
+ /** Default Spanish accessible name of the dismiss button, followed by the alert's title. */
5
5
  export declare const ALERT_DISMISS_LABEL = "Descartar aviso";
6
+ /** Separator between the dismiss label and the title, as in "Descartar aviso: Nueva versión". */
7
+ export declare const ALERT_DISMISS_LABEL_SEPARATOR = ": ";
8
+ /** Vertical travel, in em, of a new title or detail rising in and the old one lifting out. */
9
+ export declare const ALERT_TEXT_OFFSET_EM = 0.3;
6
10
  /** Live-region roles: only a danger alert interrupts; every other tone is announced politely. */
7
11
  export declare const ALERT_TONE_ROLE: {
8
12
  readonly info: "status";
@@ -1,5 +1,9 @@
1
- /** Default Spanish accessible name of the dismiss button. */
1
+ /** Default Spanish accessible name of the dismiss button, followed by the alert's title. */
2
2
  export const ALERT_DISMISS_LABEL = "Descartar aviso";
3
+ /** Separator between the dismiss label and the title, as in "Descartar aviso: Nueva versión". */
4
+ export const ALERT_DISMISS_LABEL_SEPARATOR = ": ";
5
+ /** Vertical travel, in em, of a new title or detail rising in and the old one lifting out. */
6
+ export const ALERT_TEXT_OFFSET_EM = .3;
3
7
  /** Live-region roles: only a danger alert interrupts; every other tone is announced politely. */
4
8
  export const ALERT_TONE_ROLE = {
5
9
  info: "status",
@@ -1,10 +1,33 @@
1
- /** Copy and options of Arc's Avatar presence dot. */
1
+ /** Copy and options of Arc's Avatar and Avatar group. */
2
2
  /** Presence an avatar can show with Arc's status dot. */
3
3
  export type AvatarStatus = "online" | "offline";
4
+ /** Avatar diameters: 24px (`sm`), 32px (`md`), 40px (`lg`) and Arc's 88px profile size (`xl`). */
5
+ export type AvatarSize = "sm" | "md" | "lg" | "xl";
6
+ /** Sizes an avatar group accepts for its avatars and overflow chip. */
7
+ export type AvatarGroupSize = "sm" | "md" | "lg";
4
8
  /** Default Spanish labels read by assistive technology for each presence. */
5
9
  export declare const AVATAR_STATUS_LABEL: {
6
10
  readonly online: "En línea";
7
11
  readonly offline: "Desconectado";
8
12
  };
13
+ /** Separator between the name and the presence in the avatar's accessible name, as in "Ana, En línea". */
14
+ export declare const AVATAR_LABEL_SEPARATOR = ", ";
9
15
  /** Scale the status dot grows from and shrinks back to. */
10
16
  export declare const AVATAR_STATUS_HIDDEN_SCALE = 0.6;
17
+ /** Diameter of each size in CSS pixels, passed to image adapters as the `sizes` hint. */
18
+ export declare const AVATAR_SIZE_PX: {
19
+ readonly sm: 24;
20
+ readonly md: 32;
21
+ readonly lg: 40;
22
+ readonly xl: 88;
23
+ };
24
+ /** Default Spanish accessible name of an avatar group, also used in its overflow label. */
25
+ export declare const AVATAR_GROUP_DEFAULT_LABEL = "Integrantes";
26
+ /** Avatars an avatar group shows before the rest collapse into the overflow chip. */
27
+ export declare const AVATAR_GROUP_DEFAULT_MAX = 4;
28
+ /** Word that closes the overflow chip's accessible name, as in "2 integrantes más". */
29
+ export declare const AVATAR_GROUP_OVERFLOW_SUFFIX = "m\u00E1s";
30
+ /** Vertical travel, in em, of the overflow count rolling in the direction it moved. */
31
+ export declare const AVATAR_GROUP_COUNT_OFFSET_EM = 0.4;
32
+ /** Scale a joining or leaving member's slot opens from and closes to. */
33
+ export declare const AVATAR_GROUP_SLOT_HIDDEN_SCALE = 0.9;
@@ -3,5 +3,24 @@ export const AVATAR_STATUS_LABEL = {
3
3
  online: "En línea",
4
4
  offline: "Desconectado"
5
5
  };
6
+ /** Separator between the name and the presence in the avatar's accessible name, as in "Ana, En línea". */
7
+ export const AVATAR_LABEL_SEPARATOR = ", ";
6
8
  /** Scale the status dot grows from and shrinks back to. */
7
9
  export const AVATAR_STATUS_HIDDEN_SCALE = .6;
10
+ /** Diameter of each size in CSS pixels, passed to image adapters as the `sizes` hint. */
11
+ export const AVATAR_SIZE_PX = {
12
+ sm: 24,
13
+ md: 32,
14
+ lg: 40,
15
+ xl: 88
16
+ };
17
+ /** Default Spanish accessible name of an avatar group, also used in its overflow label. */
18
+ export const AVATAR_GROUP_DEFAULT_LABEL = "Integrantes";
19
+ /** Avatars an avatar group shows before the rest collapse into the overflow chip. */
20
+ export const AVATAR_GROUP_DEFAULT_MAX = 4;
21
+ /** Word that closes the overflow chip's accessible name, as in "2 integrantes más". */
22
+ export const AVATAR_GROUP_OVERFLOW_SUFFIX = "más";
23
+ /** Vertical travel, in em, of the overflow count rolling in the direction it moved. */
24
+ export const AVATAR_GROUP_COUNT_OFFSET_EM = .4;
25
+ /** Scale a joining or leaving member's slot opens from and closes to. */
26
+ export const AVATAR_GROUP_SLOT_HIDDEN_SCALE = .9;
@@ -22,3 +22,15 @@ export declare const CALENDAR_COPY: {
22
22
  };
23
23
  /** Months in a year, to compare dates by calendar month. */
24
24
  export declare const CALENDAR_MONTHS_PER_YEAR = 12;
25
+ /** Locale of `Calendar` when the consumer does not pick one: Spanish as written in Argentina, weeks start on Monday. */
26
+ export declare const CALENDAR_DEFAULT_LOCALE = "es-AR";
27
+ /**
28
+ * Languages `Calendar` ships full translations for, including react-day-picker's accessible labels. Any other locale
29
+ * keeps English labels while month and weekday names come from `Intl`.
30
+ */
31
+ export declare const CALENDAR_TRANSLATED_LANGUAGE: {
32
+ readonly spanish: "es";
33
+ readonly english: "en";
34
+ };
35
+ /** Separator between the language and the region of a BCP 47 locale such as `es-AR`. */
36
+ export declare const CALENDAR_LOCALE_SEPARATOR = "-";
@@ -20,3 +20,15 @@ export const CALENDAR_SELECTION_DISC_ATTRIBUTE = "data-selection-disc";
20
20
  export const CALENDAR_COPY = { today: "Hoy" };
21
21
  /** Months in a year, to compare dates by calendar month. */
22
22
  export const CALENDAR_MONTHS_PER_YEAR = 12;
23
+ /** Locale of `Calendar` when the consumer does not pick one: Spanish as written in Argentina, weeks start on Monday. */
24
+ export const CALENDAR_DEFAULT_LOCALE = "es-AR";
25
+ /**
26
+ * Languages `Calendar` ships full translations for, including react-day-picker's accessible labels. Any other locale
27
+ * keeps English labels while month and weekday names come from `Intl`.
28
+ */
29
+ export const CALENDAR_TRANSLATED_LANGUAGE = {
30
+ spanish: "es",
31
+ english: "en"
32
+ };
33
+ /** Separator between the language and the region of a BCP 47 locale such as `es-AR`. */
34
+ export const CALENDAR_LOCALE_SEPARATOR = "-";
@@ -0,0 +1,23 @@
1
+ /** Copy and tuning of Arc's Card and its quick look, adapted from Arc (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md). */
2
+ /** Heading levels a card title can take; Arc renders an `h3`. */
3
+ export type CardHeadingLevel = 2 | 3 | 4;
4
+ /** Heading level of the card title when none is passed. */
5
+ export declare const CARD_DEFAULT_HEADING_LEVEL = 3;
6
+ /** Default Spanish accessible name of the quick look's close button. */
7
+ export declare const CARD_CLOSE_LABEL = "Cerrar vista r\u00E1pida";
8
+ /** Visual duration, in seconds, of the spring that grows the card into the quick look. */
9
+ export declare const CARD_GROW_DURATION_S = 0.3;
10
+ /** Visual duration, in seconds, of the slightly quicker spring that settles the quick look back into the card. */
11
+ export declare const CARD_SETTLE_DURATION_S = 0.26;
12
+ /** Time, in milliseconds, the closing quick look travels above the page before the card takes over again. */
13
+ export declare const CARD_RETURN_MS = 300;
14
+ /** Delay, in seconds, between the words of a new status rising in one after another. */
15
+ export declare const CARD_STATUS_WORD_STAGGER_S = 0.03;
16
+ /** Vertical travel, in em, of a status line rising in and the old one lifting away. */
17
+ export declare const CARD_STATUS_OFFSET_EM = 0.3;
18
+ /** Vertical travel, in pixels, of the quick look details settling in under the copy. */
19
+ export declare const CARD_DETAILS_OFFSET_PX = 6;
20
+ /** Scale the quick look's close button grows from. */
21
+ export declare const CARD_CLOSE_HIDDEN_SCALE = 0.9;
22
+ /** Scale the close button dips to while pressed. */
23
+ export declare const CARD_CLOSE_PRESS_SCALE = 0.94;
@@ -0,0 +1,20 @@
1
+ /** Heading level of the card title when none is passed. */
2
+ export const CARD_DEFAULT_HEADING_LEVEL = 3;
3
+ /** Default Spanish accessible name of the quick look's close button. */
4
+ export const CARD_CLOSE_LABEL = "Cerrar vista rápida";
5
+ /** Visual duration, in seconds, of the spring that grows the card into the quick look. */
6
+ export const CARD_GROW_DURATION_S = .3;
7
+ /** Visual duration, in seconds, of the slightly quicker spring that settles the quick look back into the card. */
8
+ export const CARD_SETTLE_DURATION_S = .26;
9
+ /** Time, in milliseconds, the closing quick look travels above the page before the card takes over again. */
10
+ export const CARD_RETURN_MS = 300;
11
+ /** Delay, in seconds, between the words of a new status rising in one after another. */
12
+ export const CARD_STATUS_WORD_STAGGER_S = .03;
13
+ /** Vertical travel, in em, of a status line rising in and the old one lifting away. */
14
+ export const CARD_STATUS_OFFSET_EM = .3;
15
+ /** Vertical travel, in pixels, of the quick look details settling in under the copy. */
16
+ export const CARD_DETAILS_OFFSET_PX = 6;
17
+ /** Scale the quick look's close button grows from. */
18
+ export const CARD_CLOSE_HIDDEN_SCALE = .9;
19
+ /** Scale the close button dips to while pressed. */
20
+ export const CARD_CLOSE_PRESS_SCALE = .94;
@@ -1,16 +1,8 @@
1
1
  /** Tuning of `Carousel`, adapted from Arc's carousel (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md). */
2
- /** Orientation of the slide track; vertical carousels move with the up and down arrows. */
3
- export type CarouselOrientation = "horizontal" | "vertical";
4
- /** Arrow keys that move to the previous and next slide along each axis. */
2
+ /** Arrow keys that move to the previous and next slide. */
5
3
  export declare const CAROUSEL_KEYS: {
6
- readonly horizontal: {
7
- readonly previous: "ArrowLeft";
8
- readonly next: "ArrowRight";
9
- };
10
- readonly vertical: {
11
- readonly previous: "ArrowUp";
12
- readonly next: "ArrowDown";
13
- };
4
+ readonly previous: "ArrowLeft";
5
+ readonly next: "ArrowRight";
14
6
  };
15
7
  /** Keys that jump to the first and the last slide, as in Arc. */
16
8
  export declare const CAROUSEL_EDGE_KEYS: {
@@ -19,7 +11,8 @@ export declare const CAROUSEL_EDGE_KEYS: {
19
11
  };
20
12
  /**
21
13
  * Focused elements, and composite widgets around them, that own their arrow, Home and End keys instead of moving the
22
- * carousel: text entry plus the ARIA widgets with their own keyboard navigation.
14
+ * carousel: text entry plus the ARIA widgets with their own keyboard navigation. The carousel's own indicator tab
15
+ * list is excluded through {@link CAROUSEL_INDICATORS_SELECTOR}.
23
16
  */
24
17
  export declare const CAROUSEL_OWN_KEYBOARD_SELECTOR: string;
25
18
  /** Length, in px, of a resting indicator dot and of the active pill it stretches into. */
@@ -27,11 +20,36 @@ export declare const CAROUSEL_INDICATOR_LENGTH_PX: {
27
20
  readonly dot: 6;
28
21
  readonly pill: 22;
29
22
  };
30
- /** Default copy of the slide indicators. */
23
+ /** Width of one slide when the consumer does not pick one, as in Arc: a share of the carousel, capped. */
24
+ export declare const CAROUSEL_DEFAULT_SLIDE_SIZE = "min(80cqw, 340px)";
25
+ /** CSS custom property the slides and the control row read the slide width from. */
26
+ export declare const CAROUSEL_SLIDE_SIZE_PROPERTY = "--carousel-slide";
27
+ /** Default copy of the carousel, in Spanish. */
31
28
  export declare const CAROUSEL_COPY: {
29
+ /** Spoken role of the carousel root, in place of the English "carousel". */
30
+ readonly roleDescription: "carrusel";
31
+ /** Spoken role of each slide, in place of the English "slide". */
32
+ readonly slideRoleDescription: "diapositiva";
33
+ /** Accessible name of the draggable slide area. */
34
+ readonly viewportLabel: "Diapositivas";
35
+ /** Accessible name of the indicator tab list. */
32
36
  readonly indicatorsLabel: "Elegir una diapositiva";
37
+ /** Accessible name of the previous arrow. */
38
+ readonly previous: "Diapositiva anterior";
39
+ /** Accessible name of the next arrow. */
40
+ readonly next: "Diapositiva siguiente";
41
+ /** Accessible name of the rotation control while slides rotate. */
42
+ readonly pauseRotation: "Pausar la rotación de diapositivas";
43
+ /** Accessible name of the rotation control while rotation is paused. */
44
+ readonly startRotation: "Iniciar la rotación de diapositivas";
33
45
  readonly slideLabelPrefix: "Diapositiva";
34
46
  readonly slideLabelSeparator: "de";
35
47
  };
36
48
  /** Root of a carousel; a nested carousel owns the keys pressed inside it. */
37
49
  export declare const CAROUSEL_ROOT_SELECTOR = "[data-slot=\"carousel\"]";
50
+ /** The carousel's own indicator tab list, whose arrow, Home and End keys move the carousel. */
51
+ export declare const CAROUSEL_INDICATORS_SELECTOR = "[data-slot=\"carousel-indicators\"]";
52
+ /** Size, in px, of the play and pause icons of the rotation control. */
53
+ export declare const CAROUSEL_ROTATION_ICON_SIZE_PX = 15;
54
+ /** Scale the rotation icon grows from when it swaps between play and pause. */
55
+ export declare const CAROUSEL_ROTATION_ICON_ENTER_SCALE = 0.6;
@@ -1,13 +1,8 @@
1
- /** Arrow keys that move to the previous and next slide along each axis. */
1
+ /** Tuning of `Carousel`, adapted from Arc's carousel (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md). */
2
+ /** Arrow keys that move to the previous and next slide. */
2
3
  export const CAROUSEL_KEYS = {
3
- horizontal: {
4
- previous: "ArrowLeft",
5
- next: "ArrowRight"
6
- },
7
- vertical: {
8
- previous: "ArrowUp",
9
- next: "ArrowDown"
10
- }
4
+ previous: "ArrowLeft",
5
+ next: "ArrowRight"
11
6
  };
12
7
  /** Keys that jump to the first and the last slide, as in Arc. */
13
8
  export const CAROUSEL_EDGE_KEYS = {
@@ -16,7 +11,8 @@ export const CAROUSEL_EDGE_KEYS = {
16
11
  };
17
12
  /**
18
13
  * Focused elements, and composite widgets around them, that own their arrow, Home and End keys instead of moving the
19
- * carousel: text entry plus the ARIA widgets with their own keyboard navigation.
14
+ * carousel: text entry plus the ARIA widgets with their own keyboard navigation. The carousel's own indicator tab
15
+ * list is excluded through {@link CAROUSEL_INDICATORS_SELECTOR}.
20
16
  */
21
17
  export const CAROUSEL_OWN_KEYBOARD_SELECTOR = [
22
18
  "input",
@@ -43,11 +39,36 @@ export const CAROUSEL_INDICATOR_LENGTH_PX = {
43
39
  dot: 6,
44
40
  pill: 22
45
41
  };
46
- /** Default copy of the slide indicators. */
42
+ /** Width of one slide when the consumer does not pick one, as in Arc: a share of the carousel, capped. */
43
+ export const CAROUSEL_DEFAULT_SLIDE_SIZE = "min(80cqw, 340px)";
44
+ /** CSS custom property the slides and the control row read the slide width from. */
45
+ export const CAROUSEL_SLIDE_SIZE_PROPERTY = "--carousel-slide";
46
+ /** Default copy of the carousel, in Spanish. */
47
47
  export const CAROUSEL_COPY = {
48
+ /** Spoken role of the carousel root, in place of the English "carousel". */
49
+ roleDescription: "carrusel",
50
+ /** Spoken role of each slide, in place of the English "slide". */
51
+ slideRoleDescription: "diapositiva",
52
+ /** Accessible name of the draggable slide area. */
53
+ viewportLabel: "Diapositivas",
54
+ /** Accessible name of the indicator tab list. */
48
55
  indicatorsLabel: "Elegir una diapositiva",
56
+ /** Accessible name of the previous arrow. */
57
+ previous: "Diapositiva anterior",
58
+ /** Accessible name of the next arrow. */
59
+ next: "Diapositiva siguiente",
60
+ /** Accessible name of the rotation control while slides rotate. */
61
+ pauseRotation: "Pausar la rotación de diapositivas",
62
+ /** Accessible name of the rotation control while rotation is paused. */
63
+ startRotation: "Iniciar la rotación de diapositivas",
49
64
  slideLabelPrefix: "Diapositiva",
50
65
  slideLabelSeparator: "de"
51
66
  };
52
67
  /** Root of a carousel; a nested carousel owns the keys pressed inside it. */
53
68
  export const CAROUSEL_ROOT_SELECTOR = "[data-slot=\"carousel\"]";
69
+ /** The carousel's own indicator tab list, whose arrow, Home and End keys move the carousel. */
70
+ export const CAROUSEL_INDICATORS_SELECTOR = "[data-slot=\"carousel-indicators\"]";
71
+ /** Size, in px, of the play and pause icons of the rotation control. */
72
+ export const CAROUSEL_ROTATION_ICON_SIZE_PX = 15;
73
+ /** Scale the rotation icon grows from when it swaps between play and pause. */
74
+ export const CAROUSEL_ROTATION_ICON_ENTER_SCALE = .6;
@@ -1,6 +1,11 @@
1
- /** Tuning shared by the Arc surfaces of `Dialog` and `AlertDialog`. */
1
+ /** Tuning and default copy shared by the Arc surfaces of `Dialog` and its `alert` mode. */
2
2
  /** Vertical offsets, in em, of a changed title or description rising in and lifting out while the dialog is open. */
3
3
  export declare const DIALOG_TEXT_SWAP_OFFSET_EM: {
4
4
  readonly enter: 0.3;
5
5
  readonly exit: -0.3;
6
6
  };
7
+ /** Default Spanish copy of Dialog; the close button name can be overridden with `closeLabel`. */
8
+ export declare const DIALOG_DEFAULT_COPY: {
9
+ /** Accessible name of the built-in close button (Arc's "Close dialog"). */
10
+ readonly closeLabel: "Cerrar diálogo";
11
+ };