@aircall/ds 0.16.1 → 0.17.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.
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +141 -25
- package/dist/index.js +252 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { createContext, useCallback, useContext, useSyncExternalStore } from "re
|
|
|
3
3
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
5
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
6
|
-
import { ArrowDownToLine, ArrowLeft, ArrowRight, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlert, CircleAlertIcon, CircleCheck, FLAGS, FlagUs, Info, Loader2Icon, MinusIcon, MoreHorizontalIcon, PanelLeftIcon, Search, Smile, TriangleAlertIcon, XIcon } from "@aircall/react-icons";
|
|
6
|
+
import { ArrowDownToLine, ArrowLeft, ArrowRight, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlert, CircleAlertIcon, CircleCheck, FLAGS, FlagUs, Info, Loader2Icon, Minus, MinusIcon, MoreHorizontalIcon, PanelLeftIcon, Plus, Search, Smile, TriangleAlertIcon, XIcon } from "@aircall/react-icons";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
9
9
|
import { cva } from "class-variance-authority";
|
|
@@ -33,6 +33,7 @@ import EmojiReactPicker, { Categories, EmojiStyle, SuggestionMode, Theme } from
|
|
|
33
33
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
34
34
|
import { ThemeProvider as ThemeProvider$1, useTheme, useTheme as useTheme$1 } from "next-themes";
|
|
35
35
|
import { PreviewCard } from "@base-ui/react/preview-card";
|
|
36
|
+
import { NumberField } from "@base-ui/react/number-field";
|
|
36
37
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
37
38
|
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
38
39
|
import { Select as Select$1 } from "@base-ui/react/select";
|
|
@@ -233,7 +234,9 @@ const de = {
|
|
|
233
234
|
"pagination.previous": "Zurück",
|
|
234
235
|
"pagination.next": "Weiter",
|
|
235
236
|
"actionBar.clearSelection": "Auswahl aufheben",
|
|
236
|
-
"actionBar.itemsSelected": "{{count}} Elemente ausgewählt."
|
|
237
|
+
"actionBar.itemsSelected": "{{count}} Elemente ausgewählt.",
|
|
238
|
+
"fieldLabel.required": "(erforderlich)",
|
|
239
|
+
"fieldLabel.optional": "(optional)"
|
|
237
240
|
};
|
|
238
241
|
var de_default = de;
|
|
239
242
|
|
|
@@ -258,7 +261,9 @@ const en = {
|
|
|
258
261
|
"pagination.previous": "Previous",
|
|
259
262
|
"pagination.next": "Next",
|
|
260
263
|
"actionBar.clearSelection": "Clear selection",
|
|
261
|
-
"actionBar.itemsSelected": "{{count}} items selected."
|
|
264
|
+
"actionBar.itemsSelected": "{{count}} items selected.",
|
|
265
|
+
"fieldLabel.required": "(required)",
|
|
266
|
+
"fieldLabel.optional": "(optional)"
|
|
262
267
|
};
|
|
263
268
|
var en_default = en;
|
|
264
269
|
|
|
@@ -283,7 +288,9 @@ const es = {
|
|
|
283
288
|
"pagination.previous": "Anterior",
|
|
284
289
|
"pagination.next": "Siguiente",
|
|
285
290
|
"actionBar.clearSelection": "Borrar selección",
|
|
286
|
-
"actionBar.itemsSelected": "{{count}} elementos seleccionados."
|
|
291
|
+
"actionBar.itemsSelected": "{{count}} elementos seleccionados.",
|
|
292
|
+
"fieldLabel.required": "(obligatorio)",
|
|
293
|
+
"fieldLabel.optional": "(opcional)"
|
|
287
294
|
};
|
|
288
295
|
var es_default = es;
|
|
289
296
|
|
|
@@ -308,7 +315,9 @@ const fr = {
|
|
|
308
315
|
"pagination.previous": "Précédent",
|
|
309
316
|
"pagination.next": "Suivant",
|
|
310
317
|
"actionBar.clearSelection": "Effacer la sélection",
|
|
311
|
-
"actionBar.itemsSelected": "{{count}} éléments sélectionnés."
|
|
318
|
+
"actionBar.itemsSelected": "{{count}} éléments sélectionnés.",
|
|
319
|
+
"fieldLabel.required": "(obligatoire)",
|
|
320
|
+
"fieldLabel.optional": "(facultatif)"
|
|
312
321
|
};
|
|
313
322
|
var fr_default = fr;
|
|
314
323
|
|
|
@@ -333,7 +342,9 @@ const it = {
|
|
|
333
342
|
"pagination.previous": "Precedente",
|
|
334
343
|
"pagination.next": "Successivo",
|
|
335
344
|
"actionBar.clearSelection": "Cancella selezione",
|
|
336
|
-
"actionBar.itemsSelected": "{{count}} elementi selezionati."
|
|
345
|
+
"actionBar.itemsSelected": "{{count}} elementi selezionati.",
|
|
346
|
+
"fieldLabel.required": "(obbligatorio)",
|
|
347
|
+
"fieldLabel.optional": "(facoltativo)"
|
|
337
348
|
};
|
|
338
349
|
var it_default = it;
|
|
339
350
|
|
|
@@ -1891,13 +1902,20 @@ Textarea.displayName = "Textarea";
|
|
|
1891
1902
|
|
|
1892
1903
|
//#endregion
|
|
1893
1904
|
//#region src/components/input-group.tsx
|
|
1905
|
+
/**
|
|
1906
|
+
* The bordered flex-row shell shared by `InputGroup` and `NumericInput`.
|
|
1907
|
+
* Owns the border, height, hover/focus ring, disabled fade, error halo, and the
|
|
1908
|
+
* affix-driven input padding adjustments. Exported so `NumericInput` renders an
|
|
1909
|
+
* identical container without nesting inside `InputGroup`.
|
|
1910
|
+
*/
|
|
1911
|
+
const inputGroupShellClassName = cn("group/input-group bg-background border-input dark:bg-input/30 relative flex h-10 w-full items-center rounded-md border transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", "not-has-[input:disabled]:not-has-[textarea:disabled]:not-has-[[data-slot][aria-invalid=true]]:hover:border-ring", "has-[input:disabled]:bg-input/50 has-[textarea:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[textarea:disabled]:opacity-50 dark:has-[input:disabled]:bg-input/80 dark:has-[textarea:disabled]:bg-input/80", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/40");
|
|
1894
1912
|
const InputGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
1895
1913
|
const { className, ...props } = componentProps;
|
|
1896
1914
|
return /* @__PURE__ */ jsx("div", {
|
|
1897
1915
|
ref: forwardRef,
|
|
1898
1916
|
"data-slot": "input-group",
|
|
1899
1917
|
role: "group",
|
|
1900
|
-
className: cn(
|
|
1918
|
+
className: cn(inputGroupShellClassName, className),
|
|
1901
1919
|
...props
|
|
1902
1920
|
});
|
|
1903
1921
|
});
|
|
@@ -4138,7 +4156,7 @@ const FieldGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
|
4138
4156
|
});
|
|
4139
4157
|
});
|
|
4140
4158
|
FieldGroup.displayName = "FieldGroup";
|
|
4141
|
-
const fieldVariants = cva("group/field flex w-full gap-2
|
|
4159
|
+
const fieldVariants = cva("group/field flex w-full gap-2", {
|
|
4142
4160
|
variants: { orientation: {
|
|
4143
4161
|
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
4144
4162
|
horizontal: "flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",
|
|
@@ -4168,13 +4186,38 @@ const FieldContent = React.forwardRef((componentProps, forwardRef) => {
|
|
|
4168
4186
|
});
|
|
4169
4187
|
});
|
|
4170
4188
|
FieldContent.displayName = "FieldContent";
|
|
4189
|
+
/**
|
|
4190
|
+
* Label for a field. Renders an `@aircall/ds` Label with field-layout styling, plus an optional
|
|
4191
|
+
* necessity marker — `(required)` or `(optional)` text — after the label content.
|
|
4192
|
+
*
|
|
4193
|
+
* Per Aircall form conventions, **mark the exceptions, not the rule**: in a mostly-mandatory form
|
|
4194
|
+
* tag the few optional fields with `necessityIndicator="optional"`; in a mostly-optional form tag
|
|
4195
|
+
* the few mandatory fields with `necessityIndicator="required"`. Leave it unset when every field
|
|
4196
|
+
* shares the same necessity (the common case). Never mix the two markers in one form. The marker
|
|
4197
|
+
* is readable text — the asterisk (`*`) is intentionally **not** a necessity marker.
|
|
4198
|
+
*
|
|
4199
|
+
* The marker is presentational — set the control's own `required`/`aria-required` for semantics.
|
|
4200
|
+
*
|
|
4201
|
+
* @example
|
|
4202
|
+
* ```tsx
|
|
4203
|
+
* <FieldLabel>Name</FieldLabel>
|
|
4204
|
+
* <FieldLabel necessityIndicator="optional">Nickname</FieldLabel>
|
|
4205
|
+
* ```
|
|
4206
|
+
*/
|
|
4171
4207
|
const FieldLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
4172
|
-
const { className, ...props } = componentProps;
|
|
4173
|
-
|
|
4208
|
+
const { className, children, necessityIndicator, ...props } = componentProps;
|
|
4209
|
+
const t = useDsTranslation("ds");
|
|
4210
|
+
return /* @__PURE__ */ jsxs(Label, {
|
|
4174
4211
|
ref: forwardRef,
|
|
4175
4212
|
"data-slot": "field-label",
|
|
4176
|
-
|
|
4177
|
-
|
|
4213
|
+
"data-necessity": necessityIndicator,
|
|
4214
|
+
className: cn("group/field-label peer/field-label flex w-fit gap-1 leading-normal group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
|
|
4215
|
+
...props,
|
|
4216
|
+
children: [children, necessityIndicator && /* @__PURE__ */ jsx("span", {
|
|
4217
|
+
"data-slot": "field-necessity",
|
|
4218
|
+
className: "font-normal text-muted-foreground",
|
|
4219
|
+
children: necessityIndicator === "required" ? t("fieldLabel.required") : t("fieldLabel.optional")
|
|
4220
|
+
})]
|
|
4178
4221
|
});
|
|
4179
4222
|
});
|
|
4180
4223
|
FieldLabel.displayName = "FieldLabel";
|
|
@@ -4373,6 +4416,202 @@ const HoverCardContent = React.forwardRef((componentProps, forwardRef) => {
|
|
|
4373
4416
|
});
|
|
4374
4417
|
HoverCardContent.displayName = "HoverCardContent";
|
|
4375
4418
|
|
|
4419
|
+
//#endregion
|
|
4420
|
+
//#region src/i18n/number-format.ts
|
|
4421
|
+
/**
|
|
4422
|
+
* @internal
|
|
4423
|
+
* Safe `Intl` locale/format resolution shared by `@aircall/ds` number-formatting
|
|
4424
|
+
* components. Ensures a malformed `locale` or `format` never throws a `RangeError`
|
|
4425
|
+
* from `Intl` mid-render: invalid values degrade to a usable default. Not part of the
|
|
4426
|
+
* consumer contract.
|
|
4427
|
+
*/
|
|
4428
|
+
/** True when `loc` is a locale that `Intl` accepts (string, list, or `Intl.Locale`). */
|
|
4429
|
+
function isUsableLocale(loc) {
|
|
4430
|
+
if (loc == null || loc === "") return false;
|
|
4431
|
+
try {
|
|
4432
|
+
return Intl.getCanonicalLocales(loc).length > 0;
|
|
4433
|
+
} catch {
|
|
4434
|
+
return false;
|
|
4435
|
+
}
|
|
4436
|
+
}
|
|
4437
|
+
/**
|
|
4438
|
+
* Resolves the locale to a value `Intl.NumberFormat` will accept, so a malformed
|
|
4439
|
+
* `locale` (e.g. a half-typed value) never throws a `RangeError` mid-render.
|
|
4440
|
+
* Prefers the explicit prop, then the DS i18n language, then `en-US`.
|
|
4441
|
+
*/
|
|
4442
|
+
function resolveLocale(localeProp, dsLocale) {
|
|
4443
|
+
if (isUsableLocale(localeProp)) return localeProp;
|
|
4444
|
+
if (isUsableLocale(dsLocale)) return dsLocale;
|
|
4445
|
+
return "en-US";
|
|
4446
|
+
}
|
|
4447
|
+
/**
|
|
4448
|
+
* Returns `format` only if `Intl` can build a formatter from it (with the resolved
|
|
4449
|
+
* locale); otherwise `undefined`, so an invalid option (e.g. a bad `currency` or
|
|
4450
|
+
* `unit`) degrades to default number formatting instead of throwing a `RangeError`.
|
|
4451
|
+
*/
|
|
4452
|
+
function resolveFormat(locale, format) {
|
|
4453
|
+
if (format == null) return;
|
|
4454
|
+
try {
|
|
4455
|
+
new Intl.NumberFormat(locale, format).format(0);
|
|
4456
|
+
return format;
|
|
4457
|
+
} catch {
|
|
4458
|
+
return;
|
|
4459
|
+
}
|
|
4460
|
+
}
|
|
4461
|
+
|
|
4462
|
+
//#endregion
|
|
4463
|
+
//#region src/i18n/use-ds-locale.ts
|
|
4464
|
+
function subscribeToLanguage(onChange) {
|
|
4465
|
+
dsI18n.on("languageChanged", onChange);
|
|
4466
|
+
return () => dsI18n.off("languageChanged", onChange);
|
|
4467
|
+
}
|
|
4468
|
+
/**
|
|
4469
|
+
* @internal
|
|
4470
|
+
* Reads the DS i18n active language and re-renders on change. Used by `@aircall/ds`
|
|
4471
|
+
* components as the default `locale` for `Intl`-based formatting (e.g. `NumericInput`).
|
|
4472
|
+
* Not part of the consumer contract.
|
|
4473
|
+
*/
|
|
4474
|
+
function useDsLocale() {
|
|
4475
|
+
return useSyncExternalStore(subscribeToLanguage, () => dsI18n.language, () => dsI18n.language);
|
|
4476
|
+
}
|
|
4477
|
+
|
|
4478
|
+
//#endregion
|
|
4479
|
+
//#region src/components/numeric-input.tsx
|
|
4480
|
+
/**
|
|
4481
|
+
* Locale-aware numeric input. Renders a bordered group `<div>` styled like
|
|
4482
|
+
* `InputGroup` (it IS the group — do not nest it inside an `InputGroup`).
|
|
4483
|
+
*
|
|
4484
|
+
* Two modes:
|
|
4485
|
+
* - **Convenience** (no children): renders `prefix`/`suffix` affixes, the input,
|
|
4486
|
+
* and `−`/`+` steppers (steppers shown unless `hideStepper`).
|
|
4487
|
+
* - **Compound** (children): caller composes `NumericInputControl`,
|
|
4488
|
+
* `NumericInputIncrement`, `NumericInputDecrement`, and `InputGroupAddon`.
|
|
4489
|
+
* In compound mode, the visual invalid halo (red border/ring) follows the inner control's
|
|
4490
|
+
* `aria-invalid` (or DS `Field` state), NOT the `aria-invalid` on `NumericInput` itself.
|
|
4491
|
+
*
|
|
4492
|
+
* Formatting is delegated to Base UI's `format` (`Intl.NumberFormatOptions`) and
|
|
4493
|
+
* `locale` props. `locale` defaults to the DS i18n active language.
|
|
4494
|
+
*
|
|
4495
|
+
* @example
|
|
4496
|
+
* ```tsx
|
|
4497
|
+
* <NumericInput aria-label="Amount" defaultValue={10}
|
|
4498
|
+
* format={{ style: 'currency', currency: 'EUR' }} prefix="€" suffix="EUR" />
|
|
4499
|
+
* ```
|
|
4500
|
+
*/
|
|
4501
|
+
const NumericInput = React.forwardRef((componentProps, forwardRef) => {
|
|
4502
|
+
const { className, children, prefix, suffix, hideStepper = false, locale, format, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, ...rootProps } = componentProps;
|
|
4503
|
+
const resolvedLocale = resolveLocale(locale, useDsLocale());
|
|
4504
|
+
const resolvedFormat = resolveFormat(resolvedLocale, format);
|
|
4505
|
+
const ariaForRoot = children != null ? {
|
|
4506
|
+
"aria-label": ariaLabel,
|
|
4507
|
+
"aria-labelledby": ariaLabelledby,
|
|
4508
|
+
"aria-describedby": ariaDescribedby,
|
|
4509
|
+
"aria-invalid": ariaInvalid
|
|
4510
|
+
} : void 0;
|
|
4511
|
+
const content = children ?? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4512
|
+
prefix != null && /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
4513
|
+
align: "inline-start",
|
|
4514
|
+
children: /* @__PURE__ */ jsx(InputGroupText, { children: prefix })
|
|
4515
|
+
}),
|
|
4516
|
+
/* @__PURE__ */ jsx(NumericInputControl, {
|
|
4517
|
+
"aria-label": ariaLabel,
|
|
4518
|
+
"aria-labelledby": ariaLabelledby,
|
|
4519
|
+
"aria-describedby": ariaDescribedby,
|
|
4520
|
+
"aria-invalid": ariaInvalid
|
|
4521
|
+
}),
|
|
4522
|
+
suffix != null && /* @__PURE__ */ jsx(InputGroupAddon, {
|
|
4523
|
+
align: "inline-end",
|
|
4524
|
+
children: /* @__PURE__ */ jsx(InputGroupText, { children: suffix })
|
|
4525
|
+
}),
|
|
4526
|
+
!hideStepper && /* @__PURE__ */ jsxs(InputGroupAddon, {
|
|
4527
|
+
align: "inline-end",
|
|
4528
|
+
className: "gap-0.5",
|
|
4529
|
+
children: [/* @__PURE__ */ jsx(NumericInputDecrement, {}), /* @__PURE__ */ jsx(NumericInputIncrement, {})]
|
|
4530
|
+
})
|
|
4531
|
+
] });
|
|
4532
|
+
return /* @__PURE__ */ jsx(NumberField.Root, {
|
|
4533
|
+
ref: forwardRef,
|
|
4534
|
+
"data-slot": "numeric-input",
|
|
4535
|
+
locale: resolvedLocale,
|
|
4536
|
+
format: resolvedFormat,
|
|
4537
|
+
className: cn(inputGroupShellClassName, className),
|
|
4538
|
+
...ariaForRoot,
|
|
4539
|
+
...rootProps,
|
|
4540
|
+
children: content
|
|
4541
|
+
});
|
|
4542
|
+
});
|
|
4543
|
+
NumericInput.displayName = "NumericInput";
|
|
4544
|
+
/**
|
|
4545
|
+
* The text input part. Renders a bare `<input>` (direct child of `NumericInput`)
|
|
4546
|
+
* carrying `data-slot="input-group-control"` so the shell's focus halo applies.
|
|
4547
|
+
* The input's `aria-label` deliberately overrides the group's label for the input control.
|
|
4548
|
+
*
|
|
4549
|
+
* @example
|
|
4550
|
+
* ```tsx
|
|
4551
|
+
* <NumericInput aria-label="Quantity" defaultValue={1}>
|
|
4552
|
+
* <NumericInputControl aria-label="Quantity value" />
|
|
4553
|
+
* </NumericInput>
|
|
4554
|
+
* ```
|
|
4555
|
+
*/
|
|
4556
|
+
const NumericInputControl = React.forwardRef((componentProps, forwardRef) => {
|
|
4557
|
+
const { className, ...props } = componentProps;
|
|
4558
|
+
return /* @__PURE__ */ jsx(NumberField.Input, {
|
|
4559
|
+
ref: forwardRef,
|
|
4560
|
+
"data-slot": "input-group-control",
|
|
4561
|
+
className: cn("text-foreground placeholder:text-muted-foreground flex-1 rounded-none border-0 bg-transparent px-3 py-2 text-base shadow-none outline-none disabled:opacity-100 md:text-sm", className),
|
|
4562
|
+
...props
|
|
4563
|
+
});
|
|
4564
|
+
});
|
|
4565
|
+
NumericInputControl.displayName = "NumericInputControl";
|
|
4566
|
+
/**
|
|
4567
|
+
* Increment button. Defaults to a plus icon; pass children to override.
|
|
4568
|
+
*
|
|
4569
|
+
* @example
|
|
4570
|
+
* ```tsx
|
|
4571
|
+
* <NumericInputIncrement />
|
|
4572
|
+
* ```
|
|
4573
|
+
*/
|
|
4574
|
+
const NumericInputIncrement = React.forwardRef((componentProps, forwardRef) => {
|
|
4575
|
+
const { className, children, ...props } = componentProps;
|
|
4576
|
+
return /* @__PURE__ */ jsx(NumberField.Increment, {
|
|
4577
|
+
ref: forwardRef,
|
|
4578
|
+
"data-slot": "numeric-input-increment",
|
|
4579
|
+
className,
|
|
4580
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
4581
|
+
type: "button",
|
|
4582
|
+
variant: "ghost",
|
|
4583
|
+
size: "icon-sm"
|
|
4584
|
+
}),
|
|
4585
|
+
...props,
|
|
4586
|
+
children: children ?? /* @__PURE__ */ jsx(Plus, { className: "size-4" })
|
|
4587
|
+
});
|
|
4588
|
+
});
|
|
4589
|
+
NumericInputIncrement.displayName = "NumericInputIncrement";
|
|
4590
|
+
/**
|
|
4591
|
+
* Decrement button. Defaults to a minus icon; pass children to override.
|
|
4592
|
+
*
|
|
4593
|
+
* @example
|
|
4594
|
+
* ```tsx
|
|
4595
|
+
* <NumericInputDecrement />
|
|
4596
|
+
* ```
|
|
4597
|
+
*/
|
|
4598
|
+
const NumericInputDecrement = React.forwardRef((componentProps, forwardRef) => {
|
|
4599
|
+
const { className, children, ...props } = componentProps;
|
|
4600
|
+
return /* @__PURE__ */ jsx(NumberField.Decrement, {
|
|
4601
|
+
ref: forwardRef,
|
|
4602
|
+
"data-slot": "numeric-input-decrement",
|
|
4603
|
+
className,
|
|
4604
|
+
render: /* @__PURE__ */ jsx(Button, {
|
|
4605
|
+
type: "button",
|
|
4606
|
+
variant: "ghost",
|
|
4607
|
+
size: "icon-sm"
|
|
4608
|
+
}),
|
|
4609
|
+
...props,
|
|
4610
|
+
children: children ?? /* @__PURE__ */ jsx(Minus, { className: "size-4" })
|
|
4611
|
+
});
|
|
4612
|
+
});
|
|
4613
|
+
NumericInputDecrement.displayName = "NumericInputDecrement";
|
|
4614
|
+
|
|
4376
4615
|
//#endregion
|
|
4377
4616
|
//#region src/components/input-otp.tsx
|
|
4378
4617
|
const InputOTP = React.forwardRef((componentProps, forwardRef) => {
|
|
@@ -6029,4 +6268,4 @@ function useAudioGauge(options = {}) {
|
|
|
6029
6268
|
}
|
|
6030
6269
|
|
|
6031
6270
|
//#endregion
|
|
6032
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, DataTree, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Filter, FilterClearAllButton, FilterGroup, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useComboboxAnchor, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|
|
6271
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Anchor, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, DataTree, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, DsI18nProvider, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Filter, FilterClearAllButton, FilterGroup, Gauge, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, NumericInput, NumericInputControl, NumericInputDecrement, NumericInputIncrement, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, SUPPORTED_LANGUAGES, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, anchorVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, detectInitialLanguage, fabVariants, registerI18nNamespace, selectTriggerVariants, spinnerVariants, syncDsLanguage, toast, toggleVariants, useAudioGauge, useComboboxAnchor, useDsTranslation, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|