@servicetitan/anvil2 1.49.5 → 1.49.7
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/CHANGELOG.md +36 -0
- package/dist/{Alert-aGBkujwE.js → Alert-DNhUyWVm.js} +3 -2
- package/dist/{Alert-aGBkujwE.js.map → Alert-DNhUyWVm.js.map} +1 -1
- package/dist/Alert.js +1 -1
- package/dist/{Announcement-BPwFNhYe.js → Announcement-BBq8zIQ3.js} +3 -2
- package/dist/{Announcement-BPwFNhYe.js.map → Announcement-BBq8zIQ3.js.map} +1 -1
- package/dist/Announcement.js +1 -1
- package/dist/{Breadcrumbs-DjR-2OEH.js → Breadcrumbs-CfJJlIIa.js} +2 -2
- package/dist/{Breadcrumbs-DjR-2OEH.js.map → Breadcrumbs-CfJJlIIa.js.map} +1 -1
- package/dist/Breadcrumbs.js +1 -1
- package/dist/{Calendar-CLSm88D2.js → Calendar-C9oxHTGG.js} +2 -2
- package/dist/{Calendar-CLSm88D2.js.map → Calendar-C9oxHTGG.js.map} +1 -1
- package/dist/{Calendar-BP6r1sP9.js → Calendar-CAYitkfM.js} +2 -2
- package/dist/{Calendar-BP6r1sP9.js.map → Calendar-CAYitkfM.js.map} +1 -1
- package/dist/Calendar.js +2 -2
- package/dist/{Checkbox-DwuDx-t4.js → Checkbox-DbBeuNdW.js} +3 -3
- package/dist/{Checkbox-DwuDx-t4.js.map → Checkbox-DbBeuNdW.js.map} +1 -1
- package/dist/{Checkbox-PkAk1Saq.js → Checkbox-zAKOGEBl.js} +2 -2
- package/dist/{Checkbox-PkAk1Saq.js.map → Checkbox-zAKOGEBl.js.map} +1 -1
- package/dist/Checkbox.js +2 -2
- package/dist/{Chip-X2EwdZ97.js → Chip-UqdorCE2.js} +23 -17
- package/dist/Chip-UqdorCE2.js.map +1 -0
- package/dist/Chip.js +1 -1
- package/dist/{Combobox-DNCq-jkq.js → Combobox-hxGMMb8x.js} +6 -6
- package/dist/{Combobox-DNCq-jkq.js.map → Combobox-hxGMMb8x.js.map} +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/{DataTable-BIhmpU0v.js → DataTable-CUFa7cQK.js} +6 -6
- package/dist/{DataTable-BIhmpU0v.js.map → DataTable-CUFa7cQK.js.map} +1 -1
- package/dist/{DateField-DsGHTMZ1.js → DateField-BT9jJRp5.js} +5 -5
- package/dist/{DateField-DsGHTMZ1.js.map → DateField-BT9jJRp5.js.map} +1 -1
- package/dist/DateField.js +1 -1
- package/dist/{DateFieldRange-Ct979nxF.js → DateFieldRange-ZAic_9mt.js} +5 -5
- package/dist/{DateFieldRange-Ct979nxF.js.map → DateFieldRange-ZAic_9mt.js.map} +1 -1
- package/dist/DateFieldRange.js +1 -1
- package/dist/{DateFieldSingle-frMHnRSg.js → DateFieldSingle-DAtR8ImE.js} +5 -5
- package/dist/{DateFieldSingle-frMHnRSg.js.map → DateFieldSingle-DAtR8ImE.js.map} +1 -1
- package/dist/DateFieldSingle.js +1 -1
- package/dist/{DateFieldYearless-po9ieLod.js → DateFieldYearless-DXO_MPwA.js} +4 -4
- package/dist/{DateFieldYearless-po9ieLod.js.map → DateFieldYearless-DXO_MPwA.js.map} +1 -1
- package/dist/DateFieldYearless.js +1 -1
- package/dist/{DateFieldYearlessRange-Dy8a8O1n.js → DateFieldYearlessRange-Cg6bbPIi.js} +4 -4
- package/dist/{DateFieldYearlessRange-Dy8a8O1n.js.map → DateFieldYearlessRange-Cg6bbPIi.js.map} +1 -1
- package/dist/DateFieldYearlessRange.js +1 -1
- package/dist/{DaysOfTheWeek-2_k3T4n4.js → DaysOfTheWeek-9B9d7-hF.js} +4 -4
- package/dist/{DaysOfTheWeek-2_k3T4n4.js.map → DaysOfTheWeek-9B9d7-hF.js.map} +1 -1
- package/dist/DaysOfTheWeek.js +1 -1
- package/dist/{Dialog-BT7a5KNT.js → Dialog-UzG6-s9H.js} +13 -13
- package/dist/{Dialog-BT7a5KNT.js.map → Dialog-UzG6-s9H.js.map} +1 -1
- package/dist/Dialog.css +32 -32
- package/dist/Dialog.js +1 -1
- package/dist/{Drawer-scQFylHI.js → Drawer-BHK18NYm.js} +12 -12
- package/dist/{Drawer-scQFylHI.js.map → Drawer-BHK18NYm.js.map} +1 -1
- package/dist/Drawer.css +31 -31
- package/dist/Drawer.js +1 -1
- package/dist/{FieldLabel-BIStrC2x.js → FieldLabel-jqlQ1Ldh.js} +2 -2
- package/dist/{FieldLabel-BIStrC2x.js.map → FieldLabel-jqlQ1Ldh.js.map} +1 -1
- package/dist/FieldLabel.js +1 -1
- package/dist/{FieldMessage-DWONT3dr.js → FieldMessage-DdCUxZz-.js} +3 -3
- package/dist/FieldMessage-DdCUxZz-.js.map +1 -0
- package/dist/FieldMessage.js +1 -1
- package/dist/{Helper-DjWotFtO.js → Helper-DzVUQgUJ.js} +2 -2
- package/dist/{Helper-DjWotFtO.js.map → Helper-DzVUQgUJ.js.map} +1 -1
- package/dist/{InputMask-A5LDdyxL.js → InputMask-CJC9xZHG.js} +2 -2
- package/dist/{InputMask-A5LDdyxL.js.map → InputMask-CJC9xZHG.js.map} +1 -1
- package/dist/InputMask.js +1 -1
- package/dist/{Link-DuYh7Xl2.js → Link-CGXEFA9w.js} +13 -4
- package/dist/Link-CGXEFA9w.js.map +1 -0
- package/dist/Link.css +34 -20
- package/dist/Link.js +1 -1
- package/dist/Link.module-ByPQQ0zy.js +14 -0
- package/dist/Link.module-ByPQQ0zy.js.map +1 -0
- package/dist/{LinkButton-pIUNATNE.js → LinkButton-BBCO-4em.js} +5 -2
- package/dist/LinkButton-BBCO-4em.js.map +1 -0
- package/dist/LinkButton.js +1 -1
- package/dist/{ListView-5cRssdYI.js → ListView-D8mfK8Lu.js} +2 -2
- package/dist/{ListView-5cRssdYI.js.map → ListView-D8mfK8Lu.js.map} +1 -1
- package/dist/ListView.js +1 -1
- package/dist/{NumberField-BUFymKV3.js → NumberField-CjWLnD9X.js} +3 -3
- package/dist/{NumberField-BUFymKV3.js.map → NumberField-CjWLnD9X.js.map} +1 -1
- package/dist/NumberField.js +1 -1
- package/dist/{Page-Dgpz2WD7.js → Page-ClI3IOc7.js} +6 -6
- package/dist/{Page-Dgpz2WD7.js.map → Page-ClI3IOc7.js.map} +1 -1
- package/dist/Page.js +1 -1
- package/dist/{Popover-CcMDyKTj.js → Popover-CCXrzBul.js} +27 -6
- package/dist/Popover-CCXrzBul.js.map +1 -0
- package/dist/Popover.css +40 -9
- package/dist/Popover.js +1 -1
- package/dist/{ProgressBar-R_UjSR4o.js → ProgressBar-BpKEr6cO.js} +5 -4
- package/dist/{ProgressBar-R_UjSR4o.js.map → ProgressBar-BpKEr6cO.js.map} +1 -1
- package/dist/ProgressBar.js +1 -1
- package/dist/{Radio-CLR1m8N9.js → Radio-jj0-1dOg.js} +2 -2
- package/dist/{Radio-CLR1m8N9.js.map → Radio-jj0-1dOg.js.map} +1 -1
- package/dist/Radio.js +2 -2
- package/dist/{RadioGroup-m46C69uO.js → RadioGroup-Bxy415eu.js} +3 -3
- package/dist/{RadioGroup-m46C69uO.js.map → RadioGroup-Bxy415eu.js.map} +1 -1
- package/dist/{SearchField-DrgNbG3I.js → SearchField-D6bICv4b.js} +36 -7
- package/dist/SearchField-D6bICv4b.js.map +1 -0
- package/dist/SearchField.css +13 -8
- package/dist/SearchField.js +1 -1
- package/dist/{SelectCard-DViLgRGh.js → SelectCard-CjbsPKZ4.js} +3 -3
- package/dist/{SelectCard-DViLgRGh.js.map → SelectCard-CjbsPKZ4.js.map} +1 -1
- package/dist/SelectCard.js +1 -1
- package/dist/SelectField.js +1 -1
- package/dist/{SelectFieldSync-DF05HvD4.js → SelectFieldSync-BOzavAtv.js} +132 -19
- package/dist/SelectFieldSync-BOzavAtv.js.map +1 -0
- package/dist/{SelectTrigger-BSzOoRsu.js → SelectTrigger-DfVnPiNf.js} +2 -2
- package/dist/{SelectTrigger-BSzOoRsu.js.map → SelectTrigger-DfVnPiNf.js.map} +1 -1
- package/dist/SelectTrigger.js +1 -1
- package/dist/{SelectTriggerBase-CfmRIFRs.js → SelectTriggerBase-D8scKtBr.js} +5 -5
- package/dist/{SelectTriggerBase-CfmRIFRs.js.map → SelectTriggerBase-D8scKtBr.js.map} +1 -1
- package/dist/SelectTriggerBase.css +59 -59
- package/dist/SelectTriggerBase.module-Ce49lamD.js +35 -0
- package/dist/SelectTriggerBase.module-Ce49lamD.js.map +1 -0
- package/dist/{Switch-BXDPs2mD.js → Switch-CGpg2ake.js} +2 -2
- package/dist/{Switch-BXDPs2mD.js.map → Switch-CGpg2ake.js.map} +1 -1
- package/dist/Switch.js +1 -1
- package/dist/Table.js +1 -1
- package/dist/{TextField-B08U4_rt.js → TextField-DNuEXKyN.js} +3 -3
- package/dist/{TextField-B08U4_rt.js.map → TextField-DNuEXKyN.js.map} +1 -1
- package/dist/{TextField-D29fTRGR.js → TextField-Qv6OqiKQ.js} +2 -2
- package/dist/{TextField-D29fTRGR.js.map → TextField-Qv6OqiKQ.js.map} +1 -1
- package/dist/TextField.js +1 -1
- package/dist/{Textarea-Dl4w2-t0.js → Textarea-DdLD4imO.js} +3 -3
- package/dist/{Textarea-Dl4w2-t0.js.map → Textarea-DdLD4imO.js.map} +1 -1
- package/dist/Textarea.js +1 -1
- package/dist/{TimeField-Dpi3fMsn.js → TimeField-C39hYluo.js} +3 -3
- package/dist/{TimeField-Dpi3fMsn.js.map → TimeField-C39hYluo.js.map} +1 -1
- package/dist/TimeField.js +1 -1
- package/dist/Toast.js +2 -2
- package/dist/{Toaster-CRNOANCk.js → Toaster-DJ4tNy-0.js} +2 -2
- package/dist/{Toaster-CRNOANCk.js.map → Toaster-DJ4tNy-0.js.map} +1 -1
- package/dist/{Toaster-B0ogInIl.js → Toaster-DyDVYq4x.js} +148 -53
- package/dist/Toaster-DyDVYq4x.js.map +1 -0
- package/dist/Toaster.css +95 -71
- package/dist/{Toolbar-CPldWSNJ.js → Toolbar-BxYOXLmv.js} +13 -13
- package/dist/{Toolbar-CPldWSNJ.js.map → Toolbar-BxYOXLmv.js.map} +1 -1
- package/dist/Toolbar.js +1 -1
- package/dist/{Tooltip-BbfLb3pI.js → Tooltip-CBy7srE2.js} +2 -2
- package/dist/Tooltip-CBy7srE2.js.map +1 -0
- package/dist/Tooltip.js +1 -1
- package/dist/{YearlessDateInputWithPicker-LiMI-Oer.js → YearlessDateInputWithPicker-DMGx3gE2.js} +2 -2
- package/dist/{YearlessDateInputWithPicker-LiMI-Oer.js.map → YearlessDateInputWithPicker-DMGx3gE2.js.map} +1 -1
- package/dist/beta/components/SelectField/internal/SelectFieldInput.d.ts +14 -3
- package/dist/beta/components/SelectField/internal/SelectFieldLabel.d.ts +12 -1
- package/dist/beta/components/SelectField/internal/useCombo.d.ts +2 -1
- package/dist/beta/components/SelectField/types.d.ts +43 -0
- package/dist/beta.js +5 -5
- package/dist/check_circle-CM0ukqXv.js +6 -0
- package/dist/check_circle-CM0ukqXv.js.map +1 -0
- package/dist/components/Chip/Chip.d.ts +2 -1
- package/dist/components/Chip/internal/Chip.d.ts +2 -1
- package/dist/components/DateFieldRange/internal/MaskedDateRangeInput.d.ts +1 -1
- package/dist/components/DateFieldSingle/internal/MaskedDateInput.d.ts +1 -1
- package/dist/components/Link/internal/Link.d.ts +21 -2
- package/dist/components/Link/useLinkStyles.d.ts +1 -1
- package/dist/components/LinkButton/LinkButton.d.ts +13 -1
- package/dist/components/Popover/internal/PopoverContext.d.ts +1 -0
- package/dist/components/Popover/internal/usePopoverContext.d.ts +1 -0
- package/dist/components/SearchField/SearchField.d.ts +6 -3
- package/dist/components/Stepper/Stepper.d.ts +1 -1
- package/dist/components/Stepper/StepperStep.d.ts +1 -1
- package/dist/components/Tab/Tab.d.ts +1 -1
- package/dist/components/Tab/TabButton.d.ts +1 -1
- package/dist/components/Toast/internal/constants.d.ts +16 -0
- package/dist/error-DR_wWdYY.js +6 -0
- package/dist/error-DR_wWdYY.js.map +1 -0
- package/dist/index.js +40 -40
- package/dist/{utils-CeT0omsG.js → utils-Bkbn9cyk.js} +2 -2
- package/dist/{utils-CeT0omsG.js.map → utils-Bkbn9cyk.js.map} +1 -1
- package/package.json +1 -1
- package/dist/Chip-X2EwdZ97.js.map +0 -1
- package/dist/FieldMessage-DWONT3dr.js.map +0 -1
- package/dist/Link-DuYh7Xl2.js.map +0 -1
- package/dist/Link.module-Cf17JWod.js +0 -12
- package/dist/Link.module-Cf17JWod.js.map +0 -1
- package/dist/LinkButton-pIUNATNE.js.map +0 -1
- package/dist/Popover-CcMDyKTj.js.map +0 -1
- package/dist/SearchField-DrgNbG3I.js.map +0 -1
- package/dist/SelectFieldSync-DF05HvD4.js.map +0 -1
- package/dist/SelectTriggerBase.module-DUhQNr6j.js +0 -33
- package/dist/SelectTriggerBase.module-DUhQNr6j.js.map +0 -1
- package/dist/Toaster-B0ogInIl.js.map +0 -1
- package/dist/Tooltip-BbfLb3pI.js.map +0 -1
- package/dist/check_circle-Dja-C2lM.js +0 -8
- package/dist/check_circle-Dja-C2lM.js.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { UseComboboxPropGetters } from 'downshift';
|
|
2
3
|
import { SelectFieldDownshiftItem } from '../types';
|
|
3
4
|
type GetLabelProps = UseComboboxPropGetters<SelectFieldDownshiftItem>["getLabelProps"];
|
|
@@ -5,10 +6,16 @@ type GetLabelProps = UseComboboxPropGetters<SelectFieldDownshiftItem>["getLabelP
|
|
|
5
6
|
* Props for the SelectFieldLabel component
|
|
6
7
|
* @property {string} label - The text content to display as the label
|
|
7
8
|
* @property {GetLabelProps} getLabelProps - Downshift getter function that returns accessibility props for the label
|
|
9
|
+
* @property {boolean} [required] - Whether the field is required. Shows a red asterisk (*) when true.
|
|
10
|
+
* @property {ReactNode} [moreInfo] - Additional information to display in a tooltip
|
|
11
|
+
* @property {boolean} [openMoreInfo] - Controls the open state of the more info tooltip
|
|
8
12
|
*/
|
|
9
13
|
export type SelectFieldLabelProps = {
|
|
10
14
|
label: string;
|
|
11
15
|
getLabelProps: GetLabelProps;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
moreInfo?: ReactNode;
|
|
18
|
+
openMoreInfo?: boolean;
|
|
12
19
|
};
|
|
13
20
|
/**
|
|
14
21
|
* Internal label component for the SelectField that renders an accessible label element.
|
|
@@ -17,12 +24,16 @@ export type SelectFieldLabelProps = {
|
|
|
17
24
|
* - Renders a FieldLabel with proper accessibility attributes from Downshift
|
|
18
25
|
* - Automatically associates the label with the combobox input
|
|
19
26
|
* - Supports screen readers with proper labeling
|
|
27
|
+
* - Optional required field indicator with red asterisk
|
|
28
|
+
* - Help tooltip with info icon for additional context
|
|
20
29
|
*
|
|
21
30
|
* @example
|
|
22
31
|
* <SelectFieldLabel
|
|
23
32
|
* label="Select an option"
|
|
24
33
|
* getLabelProps={getLabelProps}
|
|
34
|
+
* required
|
|
35
|
+
* moreInfo="Choose from available options"
|
|
25
36
|
* />
|
|
26
37
|
*/
|
|
27
|
-
export declare const SelectFieldLabel: ({ label, getLabelProps, }: SelectFieldLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare const SelectFieldLabel: ({ label, getLabelProps, required, moreInfo, openMoreInfo, }: SelectFieldLabelProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
39
|
export {};
|
|
@@ -11,11 +11,12 @@ export type UseComboOptions = {
|
|
|
11
11
|
onSelectedOptionChange: (option: SelectFieldOption | null) => void;
|
|
12
12
|
displayAs: "popover" | "dialog";
|
|
13
13
|
disableHighlightOnOpen?: boolean;
|
|
14
|
+
disabled: boolean;
|
|
14
15
|
} & Pick<UseComboboxProps<SelectFieldDownshiftItem>, "onInputValueChange" | "onIsOpenChange">;
|
|
15
16
|
/**
|
|
16
17
|
* The purpose of useCombo is to provide an abstraction over the downshift combobox hook.
|
|
17
18
|
*/
|
|
18
|
-
export declare const useCombo: ({ options, pinnedOptions, selectAll, selectedOption, onSelectedOptionChange, onInputValueChange, onIsOpenChange, displayAs, disableHighlightOnOpen, }: UseComboOptions) => {
|
|
19
|
+
export declare const useCombo: ({ options, pinnedOptions, selectAll, selectedOption, onSelectedOptionChange, onInputValueChange, onIsOpenChange, displayAs, disableHighlightOnOpen, disabled, }: UseComboOptions) => {
|
|
19
20
|
inputValue: string;
|
|
20
21
|
getToggleButtonProps: <Options>(options?: import('downshift').UseComboboxGetToggleButtonPropsOptions & Options) => import('downshift').Overwrite<import('downshift').UseComboboxGetToggleButtonPropsReturnValue, Options>;
|
|
21
22
|
getLabelProps: <Options>(options?: import('downshift').UseComboboxGetLabelPropsOptions & Options) => import('downshift').Overwrite<import('downshift').UseComboboxGetLabelPropsReturnValue, Options>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AriaAttributes, ReactElement } from 'react';
|
|
1
2
|
import { LayoutUtilProps, Size } from '../../../types';
|
|
2
3
|
/**
|
|
3
4
|
* Configuration options for the SelectField cache.
|
|
@@ -21,6 +22,7 @@ export type SelectFieldOption = {
|
|
|
21
22
|
label: string;
|
|
22
23
|
searchText?: string;
|
|
23
24
|
group?: SelectFieldGroupByValue;
|
|
25
|
+
disabled?: boolean;
|
|
24
26
|
content?: {
|
|
25
27
|
title?: string;
|
|
26
28
|
description?: string;
|
|
@@ -148,6 +150,46 @@ type SelectFieldCommonSelectFieldProps = {
|
|
|
148
150
|
* @description "dialog" will always display the menu as a dialog.
|
|
149
151
|
*/
|
|
150
152
|
displayMenuAs?: "auto" | "popover" | "dialog";
|
|
153
|
+
/**
|
|
154
|
+
* Error state for the field. Can be a boolean, string message, or ReactElement.
|
|
155
|
+
* When truthy, displays error styling and message.
|
|
156
|
+
*/
|
|
157
|
+
error?: ReactElement | string | boolean;
|
|
158
|
+
/**
|
|
159
|
+
* Hint text displayed below the input field.
|
|
160
|
+
*/
|
|
161
|
+
hint?: ReactElement | string;
|
|
162
|
+
/**
|
|
163
|
+
* Description text displayed below the input field.
|
|
164
|
+
*/
|
|
165
|
+
description?: ReactElement | string;
|
|
166
|
+
/**
|
|
167
|
+
* aria-live behavior for error messages.
|
|
168
|
+
* @default "assertive"
|
|
169
|
+
*/
|
|
170
|
+
errorAriaLive?: AriaAttributes["aria-live"];
|
|
171
|
+
/**
|
|
172
|
+
* Whether the field is required. Shows a red asterisk (*) next to the label.
|
|
173
|
+
*/
|
|
174
|
+
required?: boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Whether the field is disabled.
|
|
177
|
+
* When disabled, the input is still focusable but menu items cannot be selected.
|
|
178
|
+
*/
|
|
179
|
+
disabled?: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* Whether the field is read-only.
|
|
182
|
+
* When read-only, the input is still focusable but menu items cannot be selected.
|
|
183
|
+
*/
|
|
184
|
+
readOnly?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Content to display before the input field.
|
|
187
|
+
*/
|
|
188
|
+
prefix?: string | ReactElement;
|
|
189
|
+
/**
|
|
190
|
+
* Content to display after the input field.
|
|
191
|
+
*/
|
|
192
|
+
suffix?: string | ReactElement;
|
|
151
193
|
} & SelectFieldSearchProps & SelectFieldAddNewOptionProps & LayoutUtilProps;
|
|
152
194
|
type SelectFieldGroupingProps = {
|
|
153
195
|
/**
|
|
@@ -228,5 +270,6 @@ export type SelectFieldDownshiftItem = {
|
|
|
228
270
|
id: string | number;
|
|
229
271
|
type: "option" | "pinned-option" | "select-all";
|
|
230
272
|
original: SelectFieldOption;
|
|
273
|
+
disabled?: boolean;
|
|
231
274
|
};
|
|
232
275
|
export {};
|
package/dist/beta.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DataTable, a as chipsFormatter, c as createColumnHelper, b as currencyFormatter, p as percentFormatter } from './DataTable-
|
|
2
|
-
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect } from './Toolbar-
|
|
3
|
-
export { u as useCalendarBetaProps } from './Calendar-
|
|
4
|
-
export { C as Calendar } from './Calendar-
|
|
5
|
-
export { S as SelectField, a as SelectFieldSync, u as useAdaptiveView } from './SelectFieldSync-
|
|
1
|
+
export { D as DataTable, a as chipsFormatter, c as createColumnHelper, b as currencyFormatter, p as percentFormatter } from './DataTable-CUFa7cQK.js';
|
|
2
|
+
export { T as Toolbar, a as ToolbarButton, c as ToolbarButtonLink, b as ToolbarButtonToggle, e as ToolbarControlGroup, g as ToolbarElement, f as ToolbarSearchField, d as ToolbarSelect } from './Toolbar-BxYOXLmv.js';
|
|
3
|
+
export { u as useCalendarBetaProps } from './Calendar-CAYitkfM.js';
|
|
4
|
+
export { C as Calendar } from './Calendar-C9oxHTGG.js';
|
|
5
|
+
export { S as SelectField, a as SelectFieldSync, u as useAdaptiveView } from './SelectFieldSync-BOzavAtv.js';
|
|
6
6
|
//# sourceMappingURL=beta.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
const SvgCheckCircle = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29 5.7 12.7a.996.996 0 1 1 1.41-1.41L10 14.17l6.88-6.88a.996.996 0 1 1 1.41 1.41l-7.59 7.59a.996.996 0 0 1-1.41 0z" }));
|
|
4
|
+
|
|
5
|
+
export { SvgCheckCircle as S };
|
|
6
|
+
//# sourceMappingURL=check_circle-CM0ukqXv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check_circle-CM0ukqXv.js","sources":["../../hammer-icon/mdi/round/check_circle.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgCheckCircle = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM9.29 16.29 5.7 12.7a.996.996 0 1 1 1.41-1.41L10 14.17l6.88-6.88a.996.996 0 1 1 1.41 1.41l-7.59 7.59a.996.996 0 0 1-1.41 0z\" }));\nexport default SvgCheckCircle;\n"],"names":[],"mappings":";;AACK,MAAC,cAAc,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,+LAA+L,EAAE,CAAC;;;;"}
|
|
@@ -32,7 +32,8 @@ export type ChipProps = DistributiveOmit<CoreChipProps, "prefix" | "avatar"> & D
|
|
|
32
32
|
* - Optional close button for removable chips
|
|
33
33
|
* - Text wrapping support for long labels
|
|
34
34
|
* - Full accessibility support with ARIA attributes
|
|
35
|
-
* - Keyboard navigation (Enter to click, Delete/Backspace to close)
|
|
35
|
+
* - Keyboard navigation (Enter/Space to click, Delete/Backspace to close)
|
|
36
|
+
* - Screen reader instructions for removal actions
|
|
36
37
|
* - Theme-aware color adaptation
|
|
37
38
|
* - Layout utility props for positioning and spacing
|
|
38
39
|
* - Automatic tracking ID generation for analytics
|
|
@@ -55,7 +55,8 @@ export type ChipProps = Omit<ComponentPropsWithoutRef<"span">, "prefix"> & Omit<
|
|
|
55
55
|
* - Optional close button for removable chips
|
|
56
56
|
* - Text wrapping support for long labels
|
|
57
57
|
* - Full accessibility support with ARIA attributes
|
|
58
|
-
* - Keyboard navigation (Enter to click, Delete/Backspace to close)
|
|
58
|
+
* - Keyboard navigation (Enter/Space to click, Delete/Backspace to close)
|
|
59
|
+
* - Screen reader instructions for removal actions
|
|
59
60
|
* - Theme-aware color adaptation
|
|
60
61
|
* - Layout utility props for positioning and spacing
|
|
61
62
|
*
|
|
@@ -32,7 +32,7 @@ export type MaskedDateRangeInputRef = HTMLInputElement & {
|
|
|
32
32
|
* @param props.endDate - The end date.
|
|
33
33
|
* @param props.disableHint - Whether to disable the hint.
|
|
34
34
|
*/
|
|
35
|
-
export declare const MaskedDateRangeInput: import('react').ForwardRefExoticComponent<Omit<TextFieldProps, "ref" | "value" | "onChange" | "
|
|
35
|
+
export declare const MaskedDateRangeInput: import('react').ForwardRefExoticComponent<Omit<TextFieldProps, "ref" | "value" | "onChange" | "hint" | "prefix" | "showCounter"> & {
|
|
36
36
|
onChange: MaskedDateRangeInputChangeHandler;
|
|
37
37
|
mode?: DateMode;
|
|
38
38
|
startDate: DateTime | null;
|
|
@@ -27,7 +27,7 @@ export type MaskedDateInputRef = HTMLInputElement & {
|
|
|
27
27
|
* @param props.onChange - The function to call when the date changes.
|
|
28
28
|
* @param props.mode - The mode of the date input.
|
|
29
29
|
*/
|
|
30
|
-
export declare const MaskedDateInput: import('react').ForwardRefExoticComponent<Omit<TextFieldProps, "ref" | "value" | "onChange" | "
|
|
30
|
+
export declare const MaskedDateInput: import('react').ForwardRefExoticComponent<Omit<TextFieldProps, "ref" | "value" | "onChange" | "hint" | "prefix" | "showCounter"> & {
|
|
31
31
|
onChange: MaskedDateInputChangeHandler;
|
|
32
32
|
mode?: DateMode;
|
|
33
33
|
lastValidDate: DateTime | null;
|
|
@@ -11,12 +11,31 @@ export type LinkProps = ComponentPropsWithoutRef<"a"> & LayoutUtilProps & ({
|
|
|
11
11
|
* @default "primary"
|
|
12
12
|
*/
|
|
13
13
|
appearance?: "primary";
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Whether the link should have a quieter, less prominent appearance
|
|
16
|
+
* @deprecated to be removed on next major - use ghost instead
|
|
17
|
+
*/
|
|
15
18
|
quiet?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the link should have a quieter, less prominent appearance
|
|
21
|
+
* @remarks Only available when appearance is "primary".
|
|
22
|
+
*/
|
|
23
|
+
ghost?: boolean;
|
|
16
24
|
} | {
|
|
17
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* The visual appearance of the LinkButton. Secondary appearance cannot be quiet.
|
|
27
|
+
*/
|
|
18
28
|
appearance: "secondary";
|
|
29
|
+
/**
|
|
30
|
+
* Whether the link should have a quieter, less prominent appearance
|
|
31
|
+
* @deprecated to be removed on next major - use ghost instead
|
|
32
|
+
*/
|
|
19
33
|
quiet?: false;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the LinkButton should have a quieter, less prominent appearance.
|
|
36
|
+
* @remarks Must be false when appearance is "secondary".
|
|
37
|
+
*/
|
|
38
|
+
ghost?: false;
|
|
20
39
|
});
|
|
21
40
|
/**
|
|
22
41
|
* Link component for creating accessible, styled hyperlinks.
|
|
@@ -4,7 +4,7 @@ import { LinkProps } from './Link';
|
|
|
4
4
|
* Props for the useLinkStyles hook.
|
|
5
5
|
* @extends LayoutUtilProps
|
|
6
6
|
*/
|
|
7
|
-
export type UseLinkStylesProps = LayoutUtilProps & Pick<LinkProps, "className" | "appearance" | "quiet" | "style">;
|
|
7
|
+
export type UseLinkStylesProps = LayoutUtilProps & Pick<LinkProps, "className" | "appearance" | "quiet" | "ghost" | "style">;
|
|
8
8
|
/**
|
|
9
9
|
* Hook for generating link styles and class names.
|
|
10
10
|
*
|
|
@@ -14,18 +14,30 @@ export type LinkButtonProps = Omit<ComponentPropsWithoutRef<"button">, "type" |
|
|
|
14
14
|
appearance?: "primary";
|
|
15
15
|
/**
|
|
16
16
|
* Whether the LinkButton should have a quieter, less prominent appearance.
|
|
17
|
+
* @deprecated to be removed on next major - use ghost instead
|
|
17
18
|
* @remarks Only available when appearance is "primary".
|
|
18
19
|
*/
|
|
19
20
|
quiet?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the LinkButton should have a quieter, less prominent appearance.
|
|
23
|
+
* @remarks Only available when appearance is "primary".
|
|
24
|
+
*/
|
|
25
|
+
ghost?: boolean;
|
|
20
26
|
} | {
|
|
21
27
|
/**
|
|
22
|
-
* The visual appearance of the LinkButton. Secondary appearance cannot be
|
|
28
|
+
* The visual appearance of the LinkButton. Secondary appearance cannot be ghost.
|
|
23
29
|
*/
|
|
24
30
|
appearance: "secondary";
|
|
25
31
|
/**
|
|
26
32
|
* Whether the LinkButton should have a quieter, less prominent appearance.
|
|
33
|
+
* @deprecated to be removed on next major - use ghost instead
|
|
27
34
|
* @remarks Must be false when appearance is "secondary".
|
|
28
35
|
*/
|
|
29
36
|
quiet?: false;
|
|
37
|
+
/**
|
|
38
|
+
* Whether the LinkButton should have a quieter, less prominent appearance.
|
|
39
|
+
* @remarks Must be false when appearance is "secondary".
|
|
40
|
+
*/
|
|
41
|
+
ghost?: false;
|
|
30
42
|
}) & DataTrackingId;
|
|
31
43
|
export declare const LinkButton: import('react').ForwardRefExoticComponent<LinkButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -14,6 +14,7 @@ export type PopoverContextProps = {
|
|
|
14
14
|
openState: boolean;
|
|
15
15
|
popoverStyle?: CSSProperties;
|
|
16
16
|
placement?: Placement;
|
|
17
|
+
actualPlacement?: Placement;
|
|
17
18
|
openPopover: () => void;
|
|
18
19
|
closePopover: (replacementFn?: () => void) => void;
|
|
19
20
|
onClose?: PopoverProps["onClose"];
|
|
@@ -36,6 +36,7 @@ export declare function usePopoverContext(): {
|
|
|
36
36
|
disableCloseOnEscape: boolean | undefined;
|
|
37
37
|
modal: boolean | undefined;
|
|
38
38
|
placement: import('@floating-ui/react-dom').Placement | undefined;
|
|
39
|
+
actualPlacement: import('@floating-ui/react-dom').Placement | undefined;
|
|
39
40
|
disableCaret: boolean | undefined;
|
|
40
41
|
noPadding: boolean | undefined;
|
|
41
42
|
fillAvailableHeight: boolean | undefined;
|
|
@@ -17,7 +17,7 @@ export type SearchFieldProps = Omit<ComponentPropsWithoutRef<"input">, "size" |
|
|
|
17
17
|
*/
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
/**
|
|
20
|
-
* Callback when the clear button is clicked
|
|
20
|
+
* Callback when the clear button is clicked or activated via keyboard (Enter/Space)
|
|
21
21
|
*/
|
|
22
22
|
onClear?: () => void;
|
|
23
23
|
} & DataTrackingId;
|
|
@@ -27,6 +27,9 @@ export type SearchFieldProps = Omit<ComponentPropsWithoutRef<"input">, "size" |
|
|
|
27
27
|
* Features:
|
|
28
28
|
* - Search icon prefix for visual clarity
|
|
29
29
|
* - Clear button that appears when input has value
|
|
30
|
+
* - Arrow key navigation between input and clear button (Right arrow to clear button, Left arrow back to input)
|
|
31
|
+
* - Clear button activated with Enter/Space keys
|
|
32
|
+
* - Focus returns to input after clearing
|
|
30
33
|
* - Multiple size variants (small, medium, large)
|
|
31
34
|
* - Controlled and uncontrolled modes
|
|
32
35
|
* - Disabled and read-only states
|
|
@@ -52,7 +55,7 @@ export type SearchFieldProps = Omit<ComponentPropsWithoutRef<"input">, "size" |
|
|
|
52
55
|
* disabled={isLoading}
|
|
53
56
|
* />
|
|
54
57
|
*/
|
|
55
|
-
export declare const SearchField: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "children" | "
|
|
58
|
+
export declare const SearchField: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "size" | "children" | "required" | "prefix"> & LayoutUtilProps & {
|
|
56
59
|
/**
|
|
57
60
|
* Size of the search field
|
|
58
61
|
* @default "medium"
|
|
@@ -64,7 +67,7 @@ export declare const SearchField: import('react').ForwardRefExoticComponent<Omit
|
|
|
64
67
|
*/
|
|
65
68
|
disabled?: boolean;
|
|
66
69
|
/**
|
|
67
|
-
* Callback when the clear button is clicked
|
|
70
|
+
* Callback when the clear button is clicked or activated via keyboard (Enter/Space)
|
|
68
71
|
*/
|
|
69
72
|
onClear?: () => void;
|
|
70
73
|
} & DataTrackingId & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -131,7 +131,7 @@ export declare const Stepper: import('react').ForwardRefExoticComponent<Omit<Omi
|
|
|
131
131
|
* Contact Details
|
|
132
132
|
* </Stepper.Step>
|
|
133
133
|
*/
|
|
134
|
-
Step: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "
|
|
134
|
+
Step: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "disabled" | "onClick"> & {
|
|
135
135
|
controls: string;
|
|
136
136
|
onClick?: (e: import('react').MouseEvent<HTMLButtonElement>, index?: number) => void;
|
|
137
137
|
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
@@ -43,7 +43,7 @@ export type StepperStepProps = Omit<ComponentPropsWithoutRef<"button">, "onClick
|
|
|
43
43
|
* Contact Details
|
|
44
44
|
* </Stepper.Step>
|
|
45
45
|
*/
|
|
46
|
-
export declare const StepperStep: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "
|
|
46
|
+
export declare const StepperStep: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "disabled" | "onClick"> & {
|
|
47
47
|
/**
|
|
48
48
|
* ID of the panel that this step is controlling.
|
|
49
49
|
* Must match the id prop of the corresponding Stepper.Panel.
|
|
@@ -67,7 +67,7 @@ export declare const Tab: import('react').ForwardRefExoticComponent<Omit<Omit<im
|
|
|
67
67
|
* First Tab
|
|
68
68
|
* </Tab.Button>
|
|
69
69
|
*/
|
|
70
|
-
Button: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "
|
|
70
|
+
Button: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "disabled" | "onClick"> & {
|
|
71
71
|
id: string;
|
|
72
72
|
controls: string;
|
|
73
73
|
onClick?: (e: import('react').MouseEvent<HTMLButtonElement>, index?: number) => void;
|
|
@@ -36,7 +36,7 @@ export type TabButtonProps = Omit<ComponentPropsWithoutRef<"button">, "onClick"
|
|
|
36
36
|
* First Tab
|
|
37
37
|
* </Tab.Button>
|
|
38
38
|
*/
|
|
39
|
-
export declare const TabButton: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "
|
|
39
|
+
export declare const TabButton: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "disabled" | "onClick"> & {
|
|
40
40
|
/**
|
|
41
41
|
* Unique identifier for the tab button.
|
|
42
42
|
*/
|
|
@@ -2,3 +2,19 @@
|
|
|
2
2
|
* Animation duration for toast transitions in milliseconds
|
|
3
3
|
*/
|
|
4
4
|
export declare const ANIMATION_DURATION = 300;
|
|
5
|
+
/**
|
|
6
|
+
* Total padding around the toast stack (top + bottom approximation)
|
|
7
|
+
*/
|
|
8
|
+
export declare const TOAST_STACK_PADDING = 48;
|
|
9
|
+
/**
|
|
10
|
+
* Height of the expand/collapse button plus its padding
|
|
11
|
+
*/
|
|
12
|
+
export declare const EXPAND_BUTTON_HEIGHT_WITH_PADDING = 64;
|
|
13
|
+
/**
|
|
14
|
+
* Scroll threshold in pixels from bottom to hide bottom gradient
|
|
15
|
+
*/
|
|
16
|
+
export declare const SCROLL_THRESHOLD = 64;
|
|
17
|
+
/**
|
|
18
|
+
* Throttle interval for scroll and resize event handlers in milliseconds
|
|
19
|
+
*/
|
|
20
|
+
export declare const EVENT_THROTTLE_MS = 16;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
const SvgError = (props) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 24 24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z" }));
|
|
4
|
+
|
|
5
|
+
export { SvgError as S };
|
|
6
|
+
//# sourceMappingURL=error-DR_wWdYY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-DR_wWdYY.js","sources":["../../hammer-icon/mdi/round/error.svg"],"sourcesContent":["import * as React from \"react\";\nconst SvgError = (props) => /* @__PURE__ */ React.createElement(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", width: \"1em\", height: \"1em\", viewBox: \"0 0 24 24\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z\" }));\nexport default SvgError;\n"],"names":[],"mappings":";;AACK,MAAC,QAAQ,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,4BAA4B,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,uJAAuJ,EAAE,CAAC;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
import './anvil-fonts.css';import './index2.css';/* empty css */
|
|
2
2
|
export { DndSort, DndSortCard, DndSortZone } from './DndSort.js';
|
|
3
|
-
export { A as Alert } from './Alert-
|
|
4
|
-
export { A as Announcement } from './Announcement-
|
|
3
|
+
export { A as Alert } from './Alert-DNhUyWVm.js';
|
|
4
|
+
export { A as Announcement } from './Announcement-BBq8zIQ3.js';
|
|
5
5
|
export { A as Avatar } from './Avatar-DeEV-v-b.js';
|
|
6
6
|
export { A as AvatarGroup } from './Avatar-gtxslf5v.js';
|
|
7
7
|
export { B as Badge } from './Badge-DY5xJkqi.js';
|
|
8
|
-
export { B as Breadcrumbs, a as BreadcrumbsElement, b as BreadcrumbsLink } from './Breadcrumbs-
|
|
8
|
+
export { B as Breadcrumbs, a as BreadcrumbsElement, b as BreadcrumbsLink } from './Breadcrumbs-CfJJlIIa.js';
|
|
9
9
|
import { B as Button } from './Button-92_FKAyV.js';
|
|
10
10
|
export { B as ButtonCompound } from './ButtonCompound-COdSELhh.js';
|
|
11
11
|
import { B as ButtonLink } from './ButtonLink-C0zR7Wnb.js';
|
|
12
12
|
import { B as ButtonToggle } from './ButtonToggle--sKvhBoA.js';
|
|
13
|
-
export { a as Calendar, g as CalendarMonth, f as CalendarMonthButton, e as CalendarNext, b as CalendarNow, d as CalendarPrev, c as CalendarYearButton } from './Calendar-
|
|
13
|
+
export { a as Calendar, g as CalendarMonth, f as CalendarMonthButton, e as CalendarNext, b as CalendarNow, d as CalendarPrev, c as CalendarYearButton } from './Calendar-CAYitkfM.js';
|
|
14
14
|
export { C as Card } from './Card-Ch3sMUo5.js';
|
|
15
|
-
export { C as Checkbox } from './Checkbox-
|
|
16
|
-
export { C as CheckboxGroup } from './Checkbox-
|
|
17
|
-
export { C as Chip } from './Chip-
|
|
18
|
-
export { C as Combobox, c as ComboboxContent, a as ComboboxElement, i as ComboboxEmpty, e as ComboboxItem, f as ComboboxItemAddNew, d as ComboboxList, g as ComboboxSearchField, b as ComboboxSelect, h as ComboboxSelectTrigger } from './Combobox-
|
|
15
|
+
export { C as Checkbox } from './Checkbox-zAKOGEBl.js';
|
|
16
|
+
export { C as CheckboxGroup } from './Checkbox-DbBeuNdW.js';
|
|
17
|
+
export { C as Chip } from './Chip-UqdorCE2.js';
|
|
18
|
+
export { C as Combobox, c as ComboboxContent, a as ComboboxElement, i as ComboboxEmpty, e as ComboboxItem, f as ComboboxItemAddNew, d as ComboboxList, g as ComboboxSearchField, b as ComboboxSelect, h as ComboboxSelectTrigger } from './Combobox-hxGMMb8x.js';
|
|
19
19
|
export { u as useInfiniteCombobox } from './useInfiniteCombobox-WcRgC9p6.js';
|
|
20
|
-
export { D as DateField } from './DateField-
|
|
21
|
-
export { D as DateFieldRange } from './DateFieldRange-
|
|
22
|
-
export { D as DateFieldSingle } from './DateFieldSingle-
|
|
23
|
-
export { D as DateFieldYearless } from './DateFieldYearless-
|
|
24
|
-
export { D as DateFieldYearlessRange } from './DateFieldYearlessRange-
|
|
25
|
-
export { D as DaysOfTheWeek } from './DaysOfTheWeek-
|
|
20
|
+
export { D as DateField } from './DateField-BT9jJRp5.js';
|
|
21
|
+
export { D as DateFieldRange } from './DateFieldRange-ZAic_9mt.js';
|
|
22
|
+
export { D as DateFieldSingle } from './DateFieldSingle-DAtR8ImE.js';
|
|
23
|
+
export { D as DateFieldYearless } from './DateFieldYearless-DXO_MPwA.js';
|
|
24
|
+
export { D as DateFieldYearlessRange } from './DateFieldYearlessRange-Cg6bbPIi.js';
|
|
25
|
+
export { D as DaysOfTheWeek } from './DaysOfTheWeek-9B9d7-hF.js';
|
|
26
26
|
export { D as Details, b as DetailsContent, a as DetailsSummary } from './Details-CkaKTRvc.js';
|
|
27
|
-
export { D as Dialog, a as DialogContent, b as DialogFooter, c as DialogHeader } from './Dialog-
|
|
27
|
+
export { D as Dialog, a as DialogContent, b as DialogFooter, c as DialogHeader } from './Dialog-UzG6-s9H.js';
|
|
28
28
|
export { D as DialogCancelButton } from './DialogCancelButton-sTEfx5kf.js';
|
|
29
29
|
export { D as Divider } from './Divider-Olv8yWXD.js';
|
|
30
30
|
export { D as Dnd } from './index-ByS9WvPk.js';
|
|
31
|
-
export { D as Drawer, a as DrawerCancelButton, d as DrawerContent, b as DrawerFooter, c as DrawerHeader } from './Drawer-
|
|
31
|
+
export { D as Drawer, a as DrawerCancelButton, d as DrawerContent, b as DrawerFooter, c as DrawerHeader } from './Drawer-BHK18NYm.js';
|
|
32
32
|
export { E as EditCard } from './EditCard-Ds1UXJIS.js';
|
|
33
|
-
export { F as FieldLabel } from './FieldLabel-
|
|
34
|
-
export { F as FieldMessage } from './FieldMessage-
|
|
33
|
+
export { F as FieldLabel } from './FieldLabel-jqlQ1Ldh.js';
|
|
34
|
+
export { F as FieldMessage } from './FieldMessage-DdCUxZz-.js';
|
|
35
35
|
import { F as Flex } from './Flex-CjPHUTeq.js';
|
|
36
36
|
export { G as Grid } from './Grid-DW2cAuHi.js';
|
|
37
37
|
import { I as Icon } from './Icon-BSuTVNaa.js';
|
|
38
|
-
export { I as InputMask } from './InputMask-
|
|
38
|
+
export { I as InputMask } from './InputMask-CJC9xZHG.js';
|
|
39
39
|
export { L as Layout, a as LayoutElement, b as LayoutItem } from './Layout-CUUb2PVr.js';
|
|
40
|
-
export { L as Link, u as useLinkStyles } from './Link-
|
|
41
|
-
export { L as LinkButton } from './LinkButton-
|
|
40
|
+
export { L as Link, u as useLinkStyles } from './Link-CGXEFA9w.js';
|
|
41
|
+
export { L as LinkButton } from './LinkButton-BBCO-4em.js';
|
|
42
42
|
import { L as Listbox } from './Listbox-C-n4IVVj.js';
|
|
43
43
|
export { a as ListboxOption, b as ListboxOptionGroup } from './Listbox-C-n4IVVj.js';
|
|
44
|
-
export { L as ListView, a as ListViewOption, b as ListViewOptionCell } from './ListView-
|
|
44
|
+
export { L as ListView, a as ListViewOption, b as ListViewOptionCell } from './ListView-D8mfK8Lu.js';
|
|
45
45
|
export { M as Menu, a as MenuItem } from './Menu-Cn2JJe1Y.js';
|
|
46
|
-
export { N as NumberField } from './NumberField-
|
|
46
|
+
export { N as NumberField } from './NumberField-CjWLnD9X.js';
|
|
47
47
|
export { Overflow, OverflowText } from './Overflow.js';
|
|
48
|
-
export { P as Page } from './Page-
|
|
48
|
+
export { P as Page } from './Page-ClI3IOc7.js';
|
|
49
49
|
export { P as Pagination } from './Pagination-CnF6yBr5.js';
|
|
50
|
-
import { P as Popover } from './Popover-
|
|
51
|
-
export { a as PopoverButton, b as PopoverClose, c as PopoverContent, d as PopoverTrigger } from './Popover-
|
|
52
|
-
export { P as ProgressBar } from './ProgressBar-
|
|
53
|
-
export { R as Radio } from './Radio-
|
|
54
|
-
export { R as RadioGroup } from './RadioGroup-
|
|
55
|
-
export { S as SearchField } from './SearchField-
|
|
50
|
+
import { P as Popover } from './Popover-CCXrzBul.js';
|
|
51
|
+
export { a as PopoverButton, b as PopoverClose, c as PopoverContent, d as PopoverTrigger } from './Popover-CCXrzBul.js';
|
|
52
|
+
export { P as ProgressBar } from './ProgressBar-BpKEr6cO.js';
|
|
53
|
+
export { R as Radio } from './Radio-jj0-1dOg.js';
|
|
54
|
+
export { R as RadioGroup } from './RadioGroup-Bxy415eu.js';
|
|
55
|
+
export { S as SearchField } from './SearchField-D6bICv4b.js';
|
|
56
56
|
export { S as SegmentedControl, a as SegmentedControlSegment } from './SegmentedControl-DK1cwC7A.js';
|
|
57
|
-
export { S as SelectCard, a as SelectCardElement, b as SelectCardGroup } from './SelectCard-
|
|
58
|
-
export { S as SelectTrigger } from './SelectTrigger-
|
|
57
|
+
export { S as SelectCard, a as SelectCardElement, b as SelectCardGroup } from './SelectCard-CjbsPKZ4.js';
|
|
58
|
+
export { S as SelectTrigger } from './SelectTrigger-DfVnPiNf.js';
|
|
59
59
|
export { S as SideNav, b as SideNavCollapsible, c as SideNavGroup, a as SideNavLink } from './SideNav-B1sH17Uc.js';
|
|
60
60
|
export { Skeleton, SkeletonCircle, SkeletonPill, SkeletonRectangle, SkeletonText } from './Skeleton.js';
|
|
61
61
|
export { S as Spinner } from './Spinner-xEFwsq8_.js';
|
|
62
62
|
export { S as SrOnly } from './SrOnly-CTsYSuby.js';
|
|
63
63
|
export { S as Stepper, a as StepperFinalPanel, b as StepperList, c as StepperNextButton, d as StepperPanel, e as StepperPrevButton, f as StepperStep } from './Stepper-BZr9ytpD.js';
|
|
64
|
-
export { S as Switch } from './Switch-
|
|
64
|
+
export { S as Switch } from './Switch-CGpg2ake.js';
|
|
65
65
|
export { T as Tab, a as TabButton, b as TabList, c as TabPanel } from './Tab-6UavokJJ.js';
|
|
66
66
|
export { T as Text } from './Text-kPA-VzsB.js';
|
|
67
|
-
export { T as Textarea } from './Textarea-
|
|
68
|
-
export { T as TextField } from './TextField-
|
|
69
|
-
export { T as TimeField } from './TimeField-
|
|
70
|
-
export { T as Toaster } from './Toaster-
|
|
71
|
-
export { t as toast } from './Toaster-
|
|
67
|
+
export { T as Textarea } from './Textarea-DdLD4imO.js';
|
|
68
|
+
export { T as TextField } from './TextField-Qv6OqiKQ.js';
|
|
69
|
+
export { T as TimeField } from './TimeField-C39hYluo.js';
|
|
70
|
+
export { T as Toaster } from './Toaster-DJ4tNy-0.js';
|
|
71
|
+
export { t as toast } from './Toaster-DyDVYq4x.js';
|
|
72
72
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
73
73
|
import { useContext, createContext, useId, useRef, useCallback, useEffect, forwardRef, useState, useMemo } from 'react';
|
|
74
74
|
import { c as cx } from './index-tZvMCc77.js';
|
|
75
75
|
import { u as useLayoutPropsUtil } from './useLayoutPropsUtil-BlIWftBb.js';
|
|
76
76
|
import { u as useMergeRefs } from './useMergeRefs-Dfmtq9cI.js';
|
|
77
|
-
import { T as Tooltip } from './Tooltip-
|
|
78
|
-
export { a as TooltipContent, b as TooltipTrigger } from './Tooltip-
|
|
77
|
+
import { T as Tooltip } from './Tooltip-CBy7srE2.js';
|
|
78
|
+
export { a as TooltipContent, b as TooltipTrigger } from './Tooltip-CBy7srE2.js';
|
|
79
79
|
export { u as useAccessibleColor } from './useAccessibleColor-BYKjkGRg.js';
|
|
80
80
|
export { u as useBreakpoint } from './useBreakpoint-BGCsBhQ7.js';
|
|
81
81
|
export { u as usePrefersColorScheme } from './usePrefersColorScheme-_hT7dK7_.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as DateTime } from './Calendar-
|
|
1
|
+
import { D as DateTime } from './Calendar-CAYitkfM.js';
|
|
2
2
|
|
|
3
3
|
const DateModeToFormatMap = {
|
|
4
4
|
"mm/dd/yyyy": "MM/dd/yyyy",
|
|
@@ -47,4 +47,4 @@ function validateDate({
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export { DateModeToPlaceholderMap as D, DateModeToFormatMap as a, convertStringToDate as c, validateDate as v };
|
|
50
|
-
//# sourceMappingURL=utils-
|
|
50
|
+
//# sourceMappingURL=utils-Bkbn9cyk.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils-
|
|
1
|
+
{"version":3,"file":"utils-Bkbn9cyk.js","sources":["../src/components/DateFieldSingle/internal/constants.ts","../src/components/DateFieldSingle/internal/utils.ts"],"sourcesContent":["import { DateMode } from \"../types\";\n\nexport const DateModeToFormatMap: Record<DateMode, string> = {\n \"mm/dd/yyyy\": \"MM/dd/yyyy\",\n \"dd/mm/yyyy\": \"dd/MM/yyyy\",\n \"yyyy/mm/dd\": \"yyyy/MM/dd\",\n};\n\nexport const DateModeToPlaceholderMap: Record<DateMode, string> = {\n \"dd/mm/yyyy\": \"__/__/____\",\n \"mm/dd/yyyy\": \"__/__/____\",\n \"yyyy/mm/dd\": \"____/__/__\",\n};\n","import { DateTime } from \"luxon\";\n\nexport function convertStringToDate(\n v: string | null | undefined,\n): DateTime | null | undefined {\n if (v === undefined || v === null) {\n return v;\n }\n const date = DateTime.fromISO(v, { setZone: true, zone: \"utc\" }).startOf(\n \"day\",\n );\n if (date.isValid) {\n return date;\n }\n return null;\n}\nexport function validateDate({\n date,\n constraints,\n}: {\n date: DateTime | null;\n constraints: {\n required?: boolean;\n unavailable?: {\n dates?: DateTime[];\n daysOfWeek?: number[];\n };\n minDate?: DateTime;\n maxDate?: DateTime;\n };\n}) {\n const { required, unavailable, minDate, maxDate } = constraints;\n if (!date) {\n return required ? false : true;\n }\n if (unavailable?.dates?.some((d) => d.equals(date))) {\n return false;\n }\n if (unavailable?.daysOfWeek?.includes(date.weekday)) {\n return false;\n }\n if (minDate && date < minDate) {\n return false;\n }\n if (maxDate && date > maxDate) {\n return false;\n }\n return true;\n}\n"],"names":[],"mappings":";;AAEO,MAAM,mBAAA,GAAgD;AAAA,EAC3D,YAAA,EAAc,YAAA;AAAA,EACd,YAAA,EAAc,YAAA;AAAA,EACd,YAAA,EAAc;AAChB;AAEO,MAAM,wBAAA,GAAqD;AAAA,EAChE,YAAA,EAAc,YAAA;AAAA,EACd,YAAA,EAAc,YAAA;AAAA,EACd,YAAA,EAAc;AAChB;;ACVO,SAAS,oBACd,CAAA,EAC6B;AAC7B,EAAA,IAAI,CAAA,KAAM,MAAA,IAAa,CAAA,KAAM,IAAA,EAAM;AACjC,IAAA,OAAO,CAAA;AAAA,EACT;AACA,EAAA,MAAM,IAAA,GAAO,QAAA,CAAS,OAAA,CAAQ,CAAA,EAAG,EAAE,SAAS,IAAA,EAAM,IAAA,EAAM,KAAA,EAAO,CAAA,CAAE,OAAA;AAAA,IAC/D;AAAA,GACF;AACA,EAAA,IAAI,KAAK,OAAA,EAAS;AAChB,IAAA,OAAO,IAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA;AACT;AACO,SAAS,YAAA,CAAa;AAAA,EAC3B,IAAA;AAAA,EACA;AACF,CAAA,EAWG;AACD,EAAA,MAAM,EAAE,QAAA,EAAU,WAAA,EAAa,OAAA,EAAS,SAAQ,GAAI,WAAA;AACpD,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,OAAO,WAAW,KAAA,GAAQ,IAAA;AAAA,EAC5B;AACA,EAAA,IAAI,WAAA,EAAa,OAAO,IAAA,CAAK,CAAC,MAAM,CAAA,CAAE,MAAA,CAAO,IAAI,CAAC,CAAA,EAAG;AACnD,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,WAAA,EAAa,UAAA,EAAY,QAAA,CAAS,IAAA,CAAK,OAAO,CAAA,EAAG;AACnD,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,OAAA,IAAW,OAAO,OAAA,EAAS;AAC7B,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,IAAI,OAAA,IAAW,OAAO,OAAA,EAAS;AAC7B,IAAA,OAAO,KAAA;AAAA,EACT;AACA,EAAA,OAAO,IAAA;AACT;;;;"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Chip-X2EwdZ97.js","sources":["../src/components/Chip/internal/Chip.tsx","../src/components/Chip/Chip.tsx"],"sourcesContent":["import {\n ComponentPropsWithoutRef,\n KeyboardEvent,\n MouseEvent,\n forwardRef,\n useContext,\n useRef,\n useLayoutEffect,\n useState,\n type ReactNode,\n} from \"react\";\nimport cx from \"classnames\";\nimport tinycolor from \"tinycolor2\";\n\nimport { Avatar, AvatarProps } from \"../../Avatar/internal/Avatar\";\nimport { useAccessibleColor, usePrefersColorScheme } from \"../../../hooks\";\nimport Close from \"@servicetitan/hammer-icon/mdi/round/close.svg\";\n\nimport styles from \"../Chip.module.scss\";\nimport { Icon } from \"../../Icon\";\nimport { LayoutUtilProps, Size } from \"../../../types\";\nimport { useLayoutPropsUtil } from \"../../../internal/hooks\";\nimport { ThemeProviderContext } from \"../../../providers/ThemeProvider/internal/ThemeProviderContext\";\n\n/**\n * Props for the Chip component\n * @extends ComponentPropsWithoutRef<\"span\">\n * @extends Omit<LayoutUtilProps, \"flex\" | \"flexBasis\" | \"flexGrow\" | \"flexShrink\">\n */\nexport type ChipProps = Omit<ComponentPropsWithoutRef<\"span\">, \"prefix\"> &\n Omit<LayoutUtilProps, \"flex\" | \"flexBasis\" | \"flexGrow\" | \"flexShrink\"> & {\n /**\n * The text that displays in the chip.\n */\n label: string;\n /**\n * The size of the chip\n * @default medium\n */\n size?: Extract<Size, \"small\" | \"medium\">;\n\n /**\n * Color of the Chip\n */\n color?: string;\n /**\n * Callback for when the Chip is clicked\n *\n * @remarks\n * Adding this will make Chip focusable\n */\n onClick?: (\n e?: MouseEvent<HTMLSpanElement> | KeyboardEvent<HTMLSpanElement>,\n ) => void;\n /**\n * Called when the component is closed. If supplied, a close button will be rendered.\n * @returns void\n */\n onClose?: (\n e: MouseEvent<HTMLSpanElement> | KeyboardEvent<HTMLSpanElement>,\n ) => void;\n /**\n * Wraps text when it overflows\n */\n textWrap?: boolean;\n /**\n * Content displayed in the chip, before the text.\n */\n prefix?: ReactNode;\n\n /**\n * Image URL to display in an avatar before the chip text.\n */\n avatar?: AvatarProps[\"image\"];\n };\n\n/**\n * Chip component for displaying compact information or tags.\n *\n * Features:\n * - Configurable sizes (small, medium)\n * - Custom color support with automatic contrast calculation\n * - Optional click handler for interactive chips\n * - Optional close button for removable chips\n * - Text wrapping support for long labels\n * - Full accessibility support with ARIA attributes\n * - Keyboard navigation (Enter to click, Delete/Backspace to close)\n * - Theme-aware color adaptation\n * - Layout utility props for positioning and spacing\n *\n * @example\n * <Chip\n * label=\"JavaScript\"\n * color=\"#f7df1e\"\n * onClose={(e) => console.log('Chip removed')}\n * onClick={(e) => console.log('Chip clicked')}\n * />\n */\nexport const Chip = forwardRef<HTMLSpanElement, ChipProps>((props, ref) => {\n const { layoutStyles, componentProps } = useLayoutPropsUtil(props);\n const {\n className,\n color,\n onClose,\n onClick,\n label,\n style,\n textWrap,\n prefix,\n avatar,\n size = \"medium\",\n tabIndex,\n ...rest\n } = componentProps;\n\n const innerRef = useRef<HTMLSpanElement>(null);\n const [lines, setLines] = useState(1);\n\n useLayoutEffect(() => {\n const element = innerRef.current;\n\n const observer = new ResizeObserver(() => {\n if (element) {\n const textNode = element.childNodes[0];\n if (textNode && textNode.textContent) {\n const range = document.createRange();\n range.setStart(textNode, 0);\n range.setEnd(textNode, textNode.textContent.length);\n setLines(range.getClientRects().length);\n }\n }\n });\n\n if (element) {\n observer.observe(element);\n }\n\n return () => {\n if (element) {\n observer.unobserve(element);\n }\n };\n }, []);\n\n /*\n * @TODO: below to be updated with localization\n * removeTextIndex is for when removeText comes after the label depending on the language\n */\n const removeText = \", removeable\";\n const newLabel = `${label}${onClose ? removeText : \"\"}`;\n\n const ChipClassNames = cx(styles[\"chip\"], className, {\n [styles[\"size-small\"]]: size === \"small\",\n [styles[\"has-close\"]]: !!onClose,\n [styles[\"text-wrap\"]]: textWrap,\n });\n\n const AvatarClassNames = cx(styles[\"avatar\"], {\n [styles[\"multiline\"]]: textWrap && lines > 1,\n });\n\n const { mode: themeMode } = useContext(ThemeProviderContext);\n const { mode: sysMode } = usePrefersColorScheme();\n const mode = themeMode ?? sysMode;\n\n const { foreground, background, border } = useAccessibleColor(color, mode);\n\n const bgObj = tinycolor(background);\n\n const styleWithColor = {\n \"--int-bg-color\": color && background,\n \"--int-font-color\": color && foreground,\n \"--int-border-color\": color && border,\n \"--int-close-background-color\": color\n ? bgObj.isDark()\n ? bgObj.lighten(15).toHexString()\n : bgObj.darken(15).toHexString()\n : \"#14141429\",\n ...style,\n ...layoutStyles,\n };\n\n const onKeyUpHandler = (e: KeyboardEvent<HTMLSpanElement>) => {\n switch (e.code) {\n case \"Delete\":\n case \"Backspace\":\n onClose?.(e);\n break;\n\n case \"Enter\":\n onClick?.(e);\n break;\n\n default:\n break;\n }\n };\n\n return (\n <span\n className={ChipClassNames}\n style={styleWithColor}\n data-anv=\"chip\"\n role={onClick ? \"button\" : undefined}\n {...(onClick || onClose ? { [\"aria-label\"]: newLabel } : {})}\n {...rest}\n ref={ref}\n onClick={onClick}\n onKeyUp={onKeyUpHandler}\n tabIndex={onClick || onClose ? 0 : tabIndex}\n >\n {avatar != null ? (\n <span className={AvatarClassNames}>\n <Avatar\n className={styles.avatarInner}\n name={label}\n color={color}\n image={avatar}\n size={size === \"small\" ? \"xsmall\" : \"small\"}\n />\n </span>\n ) : null}\n\n {prefix != null ? <span className={styles.prefix}>{prefix}</span> : null}\n\n <span className={styles.inner} ref={innerRef}>\n {label}\n </span>\n\n {!!onClose && (\n <span\n aria-hidden\n aria-label=\"remove button\"\n className={styles[\"close\"]}\n onClick={(e) => {\n e.stopPropagation();\n onClose(e);\n }}\n >\n <Icon aria-hidden svg={Close} size={size} />\n </span>\n )}\n </span>\n );\n});\n\nChip.displayName = \"Chip\";\n","import { ChipProps as CoreChipProps, Chip as CoreChip } from \"./internal/Chip\";\nimport { Icon as CoreIcon, IconProps as CoreIconProps } from \"../Icon\";\nimport { AvatarProps as CoreAvatarProps } from \"../Avatar/internal/Avatar\";\n\nimport { Ref, forwardRef } from \"react\";\nimport { useTrackingId } from \"../../hooks\";\nimport { DataTrackingId, DistributiveOmit } from \"../../types\";\n\n/**\n * Props for the Chip component\n * @property {string} label - The text that displays in the chip\n * @property {\"small\" | \"medium\"} [size] - The size of the chip\n * @property {string} [color] - Color of the Chip\n * @property {(e?: MouseEvent<HTMLSpanElement> | KeyboardEvent<HTMLSpanElement>) => void} [onClick] - Callback for when the Chip is clicked\n * @property {(e: MouseEvent<HTMLSpanElement> | KeyboardEvent<HTMLSpanElement>) => void} [onClose] - Called when the component is closed\n * @property {boolean} [textWrap] - Wraps text when it overflows\n * @property {Svg} [icon] - Icon displayed in the chip, before the text.\n * @property {string} [avatar] - Image URL to display in an avatar before the chip text.\n * @extends CoreChipProps\n * @extends DataTrackingId\n */\nexport type ChipProps = DistributiveOmit<CoreChipProps, \"prefix\" | \"avatar\"> &\n DataTrackingId &\n (\n | { icon?: CoreIconProps[\"svg\"]; avatar?: never }\n | { icon?: never; avatar?: CoreAvatarProps[\"image\"] }\n );\n\n/**\n * Chip component for displaying compact information or tags.\n *\n * Features:\n * - Configurable sizes (small, medium)\n * - Custom color support with automatic contrast calculation\n * - Optional click handler for interactive chips\n * - Optional close button for removable chips\n * - Text wrapping support for long labels\n * - Full accessibility support with ARIA attributes\n * - Keyboard navigation (Enter to click, Delete/Backspace to close)\n * - Theme-aware color adaptation\n * - Layout utility props for positioning and spacing\n * - Automatic tracking ID generation for analytics\n *\n * @example\n * <Chip\n * label=\"JavaScript\"\n * color=\"#f7df1e\"\n * onClose={(e) => console.log('Chip removed')}\n * onClick={(e) => console.log('Chip clicked')}\n * />\n */\nexport const Chip = forwardRef(\n ({ icon, ...props }: ChipProps, ref: Ref<HTMLSpanElement>) => {\n const data = {\n label: props.label,\n size: props.size,\n color: props.color,\n };\n\n const trackingId = useTrackingId({\n name: \"Chip\",\n data,\n hasOverride: !!props[\"data-tracking-id\"],\n });\n\n const prefix =\n icon != null ? (\n <CoreIcon svg={icon} color=\"var(--int-font-color)\" size={props.size} />\n ) : null;\n\n return (\n <CoreChip\n ref={ref}\n data-tracking-id={trackingId}\n {...props}\n prefix={prefix}\n />\n );\n },\n);\nChip.displayName = CoreChip.displayName;\n"],"names":["Chip","Close","CoreIcon","CoreChip"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkGO,MAAMA,MAAA,GAAO,UAAA,CAAuC,CAAC,KAAA,EAAO,GAAA,KAAQ;AACzE,EAAA,MAAM,EAAE,YAAA,EAAc,cAAA,EAAe,GAAI,mBAAmB,KAAK,CAAA;AACjE,EAAA,MAAM;AAAA,IACJ,SAAA;AAAA,IACA,KAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,QAAA;AAAA,IACA,MAAA;AAAA,IACA,MAAA;AAAA,IACA,IAAA,GAAO,QAAA;AAAA,IACP,QAAA;AAAA,IACA,GA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