@aircall/ds 0.35.0 → 0.35.3
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.
|
@@ -61,7 +61,12 @@ const BLOCKS_COLORS = [
|
|
|
61
61
|
"navbar-foreground",
|
|
62
62
|
"navbar-accent",
|
|
63
63
|
"navbar-accent-foreground",
|
|
64
|
-
"navbar-icon-bg"
|
|
64
|
+
"navbar-icon-bg",
|
|
65
|
+
"add-on-ai-assist-pro",
|
|
66
|
+
"add-on-analytics-plus",
|
|
67
|
+
"add-on-surveys",
|
|
68
|
+
"add-on-whatsapp",
|
|
69
|
+
"add-on-aiva"
|
|
65
70
|
];
|
|
66
71
|
const twMerge = extendTailwindMerge({ extend: { theme: {
|
|
67
72
|
color: [...DS_COLORS, ...BLOCKS_COLORS],
|
|
@@ -151,7 +156,8 @@ const de = {
|
|
|
151
156
|
"pagination.previous": "Zurück",
|
|
152
157
|
"pagination.next": "Weiter",
|
|
153
158
|
"actionBar.clearSelection": "Auswahl aufheben",
|
|
154
|
-
"actionBar.itemsSelected": "{{count}}
|
|
159
|
+
"actionBar.itemsSelected": "{{count}} Element ausgewählt.",
|
|
160
|
+
"actionBar.itemsSelected_plural": "{{count}} Elemente ausgewählt.",
|
|
155
161
|
"fieldLabel.required": "(erforderlich)",
|
|
156
162
|
"fieldLabel.optional": "(optional)",
|
|
157
163
|
"fieldLabel.moreInfo": "Weitere Informationen",
|
|
@@ -199,7 +205,8 @@ const en = {
|
|
|
199
205
|
"pagination.previous": "Previous",
|
|
200
206
|
"pagination.next": "Next",
|
|
201
207
|
"actionBar.clearSelection": "Clear selection",
|
|
202
|
-
"actionBar.itemsSelected": "{{count}}
|
|
208
|
+
"actionBar.itemsSelected": "{{count}} item selected.",
|
|
209
|
+
"actionBar.itemsSelected_plural": "{{count}} items selected.",
|
|
203
210
|
"fieldLabel.required": "(required)",
|
|
204
211
|
"fieldLabel.optional": "(optional)",
|
|
205
212
|
"fieldLabel.moreInfo": "More information",
|
|
@@ -247,7 +254,8 @@ const es = {
|
|
|
247
254
|
"pagination.previous": "Anterior",
|
|
248
255
|
"pagination.next": "Siguiente",
|
|
249
256
|
"actionBar.clearSelection": "Borrar selección",
|
|
250
|
-
"actionBar.itemsSelected": "{{count}}
|
|
257
|
+
"actionBar.itemsSelected": "{{count}} elemento seleccionado.",
|
|
258
|
+
"actionBar.itemsSelected_plural": "{{count}} elementos seleccionados.",
|
|
251
259
|
"fieldLabel.required": "(obligatorio)",
|
|
252
260
|
"fieldLabel.optional": "(opcional)",
|
|
253
261
|
"fieldLabel.moreInfo": "Más información",
|
|
@@ -295,7 +303,8 @@ const fr = {
|
|
|
295
303
|
"pagination.previous": "Précédent",
|
|
296
304
|
"pagination.next": "Suivant",
|
|
297
305
|
"actionBar.clearSelection": "Effacer la sélection",
|
|
298
|
-
"actionBar.itemsSelected": "{{count}}
|
|
306
|
+
"actionBar.itemsSelected": "{{count}} élément sélectionné.",
|
|
307
|
+
"actionBar.itemsSelected_plural": "{{count}} éléments sélectionnés.",
|
|
299
308
|
"fieldLabel.required": "(obligatoire)",
|
|
300
309
|
"fieldLabel.optional": "(facultatif)",
|
|
301
310
|
"fieldLabel.moreInfo": "Plus d'informations",
|
|
@@ -343,7 +352,8 @@ const it = {
|
|
|
343
352
|
"pagination.previous": "Precedente",
|
|
344
353
|
"pagination.next": "Successivo",
|
|
345
354
|
"actionBar.clearSelection": "Cancella selezione",
|
|
346
|
-
"actionBar.itemsSelected": "{{count}}
|
|
355
|
+
"actionBar.itemsSelected": "{{count}} elemento selezionato.",
|
|
356
|
+
"actionBar.itemsSelected_plural": "{{count}} elementi selezionati.",
|
|
347
357
|
"fieldLabel.required": "(obbligatorio)",
|
|
348
358
|
"fieldLabel.optional": "(facoltativo)",
|
|
349
359
|
"fieldLabel.moreInfo": "Maggiori informazioni",
|
|
@@ -399,6 +409,7 @@ dsI18n.init({
|
|
|
399
409
|
de: { ds: de },
|
|
400
410
|
it: { ds: it }
|
|
401
411
|
},
|
|
412
|
+
compatibilityJSON: "v3",
|
|
402
413
|
interpolation: { escapeValue: false },
|
|
403
414
|
keySeparator: false,
|
|
404
415
|
returnNull: false,
|
|
@@ -423,6 +434,7 @@ function getLanguageSnapshot() {
|
|
|
423
434
|
* Used by @aircall/ds and @aircall/blocks components only — not part of the consumer contract.
|
|
424
435
|
*/
|
|
425
436
|
function useDsTranslation(ns) {
|
|
437
|
+
"use no memo";
|
|
426
438
|
const language = useSyncExternalStore(subscribe, getLanguageSnapshot, getLanguageSnapshot);
|
|
427
439
|
return useCallback((key, opts) => dsI18n.t(key, {
|
|
428
440
|
ns,
|
package/dist/data-table.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as DataTable } from "./data-table-
|
|
1
|
+
import { t as DataTable } from "./data-table-C_8IrmFW.js";
|
|
2
2
|
export { DataTable };
|
package/dist/index.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ declare namespace AccordionContent {
|
|
|
96
96
|
/** `cva` variant definitions for {@link Button} — resolves `variant`, `size`, and `block` into class names. */
|
|
97
97
|
declare const buttonVariants: (props?: ({
|
|
98
98
|
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
99
|
-
size?: "default" | "
|
|
99
|
+
size?: "default" | "icon" | "sm" | "lg" | "icon-sm" | "icon-lg" | null | undefined;
|
|
100
100
|
block?: boolean | null | undefined;
|
|
101
101
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
102
102
|
/**
|
|
@@ -4673,7 +4673,7 @@ declare namespace NumericInputDecrement {
|
|
|
4673
4673
|
* )} />
|
|
4674
4674
|
* ```
|
|
4675
4675
|
*/
|
|
4676
|
-
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
4676
|
+
declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
4677
4677
|
value?: string;
|
|
4678
4678
|
onChange?: (newValue: string) => unknown;
|
|
4679
4679
|
maxLength: number;
|
|
@@ -4688,7 +4688,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
|
|
|
4688
4688
|
children?: never;
|
|
4689
4689
|
} & React.RefAttributes<HTMLInputElement> & {
|
|
4690
4690
|
containerClassName?: string;
|
|
4691
|
-
}, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
4691
|
+
}, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
|
|
4692
4692
|
value?: string;
|
|
4693
4693
|
onChange?: (newValue: string) => unknown;
|
|
4694
4694
|
maxLength: number;
|
|
@@ -6646,7 +6646,7 @@ declare function useDsLocale(): string;
|
|
|
6646
6646
|
//#endregion
|
|
6647
6647
|
//#region src/i18n/keys.d.ts
|
|
6648
6648
|
/** All translation keys owned by the `ds` namespace. Flat dotted keys (keySeparator: false). */
|
|
6649
|
-
type DsI18nKey = 'spinner.loading' | 'pagination.label' | 'pagination.previousPage' | 'pagination.nextPage' | 'dataTable.selectAllRows' | 'dataTable.selectRow' | 'dataCombobox.noResults' | 'tree.collapse' | 'tree.expand' | 'multiselect.remove' | 'multiselect.clearAll' | 'multiselect.addItem' | 'multiselect.search' | 'sidebar.toggle' | 'drawer.close' | 'emojiPicker.emoji' | 'emojiPicker.choose' | 'actionBar.selectionActions' | 'pagination.previous' | 'pagination.next' | 'actionBar.clearSelection' | 'actionBar.itemsSelected' | 'fieldLabel.required' | 'fieldLabel.optional' | 'fieldLabel.moreInfo' | 'datePicker.beforeMin' | 'datePicker.afterMax' | 'datePicker.unavailable' | 'datePicker.rangeOrder' | 'richTextarea.noResults' | 'richTextarea.slashNoCommands' | 'richTextarea.bold' | 'richTextarea.italic' | 'richTextarea.underline' | 'richTextarea.strikethrough' | 'richTextarea.inlineCode' | 'richTextarea.bulletedList' | 'richTextarea.numberedList' | 'richTextarea.link' | 'richTextarea.linkPlaceholder' | 'richTextarea.linkText' | 'richTextarea.linkEdit' | 'richTextarea.linkOpen' | 'richTextarea.linkRemove';
|
|
6649
|
+
type DsI18nKey = 'spinner.loading' | 'pagination.label' | 'pagination.previousPage' | 'pagination.nextPage' | 'dataTable.selectAllRows' | 'dataTable.selectRow' | 'dataCombobox.noResults' | 'tree.collapse' | 'tree.expand' | 'multiselect.remove' | 'multiselect.clearAll' | 'multiselect.addItem' | 'multiselect.search' | 'sidebar.toggle' | 'drawer.close' | 'emojiPicker.emoji' | 'emojiPicker.choose' | 'actionBar.selectionActions' | 'pagination.previous' | 'pagination.next' | 'actionBar.clearSelection' | 'actionBar.itemsSelected' | 'actionBar.itemsSelected_plural' | 'fieldLabel.required' | 'fieldLabel.optional' | 'fieldLabel.moreInfo' | 'datePicker.beforeMin' | 'datePicker.afterMax' | 'datePicker.unavailable' | 'datePicker.rangeOrder' | 'richTextarea.noResults' | 'richTextarea.slashNoCommands' | 'richTextarea.bold' | 'richTextarea.italic' | 'richTextarea.underline' | 'richTextarea.strikethrough' | 'richTextarea.inlineCode' | 'richTextarea.bulletedList' | 'richTextarea.numberedList' | 'richTextarea.link' | 'richTextarea.linkPlaceholder' | 'richTextarea.linkText' | 'richTextarea.linkEdit' | 'richTextarea.linkOpen' | 'richTextarea.linkRemove';
|
|
6650
6650
|
/** A complete set of translations for one language. Missing a key is a compile error. */
|
|
6651
6651
|
type DsLocale = Record<DsI18nKey, string>;
|
|
6652
6652
|
//#endregion
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as Button, E as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-
|
|
1
|
+
import { C as Button, E as cn, S as registerI18nNamespace, T as linkStyle, _ as ActionBarHeight, a as TableFooter, b as detectInitialLanguage, c as TableRow, d as Checkbox, f as Spinner, g as ActionBarContext, h as ActionBarButton, i as TableCell, l as useFetchMoreSentinel, m as ActionBar, n as Table, o as TableHead, p as spinnerVariants, r as TableBody, s as TableHeader, t as DataTable, u as Skeleton, v as useDsTranslation, w as buttonVariants, x as dsI18n, y as SUPPORTED_LANGUAGES } from "./data-table-C_8IrmFW.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { createContext, useContext, useSyncExternalStore } from "react";
|
|
4
4
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
@@ -3451,6 +3451,7 @@ function ComboboxLoadedRows(componentProps) {
|
|
|
3451
3451
|
* meaningless when only a window is mounted.
|
|
3452
3452
|
*/
|
|
3453
3453
|
function ComboboxVirtualRows(componentProps) {
|
|
3454
|
+
"use no memo";
|
|
3454
3455
|
const { getItemValue, getItemLabel, renderItem, disabledKeys, estimateRowHeight, sentinelRef, showFetchSentinel, scrollRowIntoViewRef } = componentProps;
|
|
3455
3456
|
const filteredItems = Combobox$1.useFilteredItems();
|
|
3456
3457
|
const [spacerElement, setSpacerElement] = React.useState(null);
|
|
@@ -5731,6 +5732,7 @@ const ARIA_MAX_STATIC = {
|
|
|
5731
5732
|
* (in locale order) plus separators, validity state, and imperative helpers.
|
|
5732
5733
|
*/
|
|
5733
5734
|
function useSegmentedDate(options) {
|
|
5735
|
+
"use no memo";
|
|
5734
5736
|
const { mask, value: externalValue, onCommit, onEscape, onOpenRequest, onAnnounce, locale = "en-US", minDate, maxDate, disabled = false, invalid: consumerInvalid = false, isDateBlocked, onReject, getCrossClampDay, isCrossoverRejected, onCrossoverReject } = options;
|
|
5735
5737
|
const { segmentOrder, separators } = mask;
|
|
5736
5738
|
const yearMin = minDate ? minDate.getFullYear() : ARIA_MIN.year;
|
|
@@ -6448,6 +6450,7 @@ function formatDateForInput(date) {
|
|
|
6448
6450
|
* ```
|
|
6449
6451
|
*/
|
|
6450
6452
|
const DatePicker = React.forwardRef((componentProps, forwardRef) => {
|
|
6453
|
+
"use no memo";
|
|
6451
6454
|
const { className, mode = "single", locale, disabled = false, invalid = false, disabledDates, minDate: minDateProp, maxDate: maxDateProp, captionLayout, open: openProp, onOpenChange, footer, triggerClassName, id, name, "data-testid": dataTestId = "date-picker-input", onValueChange, onRangeChange, ...rest } = componentProps;
|
|
6452
6455
|
const { value: _v, defaultValue: _dv, predefinedRanges: _pr, "data-testid-to": dataTestIdTo = "date-picker-input-to", ...props } = rest;
|
|
6453
6456
|
const dsLocale = useDsLocale();
|
|
@@ -11737,8 +11740,10 @@ const SidebarProvider = React.forwardRef((componentProps, forwardRef) => {
|
|
|
11737
11740
|
const openState = typeof value === "function" ? value(open) : value;
|
|
11738
11741
|
if (setOpenProp) setOpenProp(openState);
|
|
11739
11742
|
else _setOpen(openState);
|
|
11740
|
-
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
11741
11743
|
}, [setOpenProp, open]);
|
|
11744
|
+
React.useEffect(() => {
|
|
11745
|
+
document.cookie = `${SIDEBAR_COOKIE_NAME}=${open}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
11746
|
+
}, [open]);
|
|
11742
11747
|
const toggleSidebar = React.useCallback(() => {
|
|
11743
11748
|
return isMobile ? setOpenMobile((open) => !open) : setOpen((open) => !open);
|
|
11744
11749
|
}, [
|
|
@@ -12643,7 +12648,7 @@ ToggleGroup.displayName = "ToggleGroup";
|
|
|
12643
12648
|
* Renders a `<button aria-pressed>` that inherits `variant` and `size` from the group context.
|
|
12644
12649
|
*/
|
|
12645
12650
|
const ToggleGroupItem = React.forwardRef((componentProps, forwardRef) => {
|
|
12646
|
-
const { className, children, variant = "default", size = "default", ...props } = componentProps;
|
|
12651
|
+
const { className, children, variant = "default", size = "default", pressedColor, ...props } = componentProps;
|
|
12647
12652
|
const context = React.useContext(ToggleGroupContext);
|
|
12648
12653
|
return /* @__PURE__ */ jsx(Toggle$1, {
|
|
12649
12654
|
ref: forwardRef,
|
|
@@ -12653,7 +12658,8 @@ const ToggleGroupItem = React.forwardRef((componentProps, forwardRef) => {
|
|
|
12653
12658
|
"data-spacing": context.spacing,
|
|
12654
12659
|
className: cn("shrink-0 text-foreground group-data-[spacing=0]/toggle-group:rounded-none group-data-[spacing=0]/toggle-group:px-2 group-data-[spacing=0]/toggle-group:shadow-none group-data-[spacing=0]/toggle-group:border group-data-[spacing=0]/toggle-group:border-input focus:z-10 focus-visible:z-10 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-end]:pr-1.5 group-data-[spacing=0]/toggle-group:has-data-[icon=inline-start]:pl-1.5 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:rounded-l-md group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:rounded-t-md group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:last:rounded-r-md group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:last:rounded-b-md group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:border-l-0 group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:border-t-0 group-data-[orientation=horizontal]/toggle-group:data-[spacing=0]:first:border-l group-data-[orientation=vertical]/toggle-group:data-[spacing=0]:first:border-t group-data-[block=true]/toggle-group:flex-1", toggleVariants({
|
|
12655
12660
|
variant: context.variant || variant,
|
|
12656
|
-
size: context.size || size
|
|
12661
|
+
size: context.size || size,
|
|
12662
|
+
pressedColor
|
|
12657
12663
|
}), className),
|
|
12658
12664
|
...props,
|
|
12659
12665
|
children
|