@capra/core 1.5.1 → 1.5.2
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/index.d.cts +12 -11
- package/dist/index.d.mts +12 -11
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React$2 from "react";
|
|
|
2
2
|
import React$1, { HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy } from "react";
|
|
3
3
|
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, RouterProvider } from "react-aria-components";
|
|
4
4
|
import { SvgIcon } from "@capra/icons";
|
|
5
|
+
import { SvgLogo } from "@capra/icons/logos";
|
|
5
6
|
|
|
6
7
|
//#region src/utils/stylingOverride.d.ts
|
|
7
8
|
interface StylingOverrideProps {
|
|
@@ -124,7 +125,7 @@ declare const TextInput: React$2.ForwardRefExoticComponent<{
|
|
|
124
125
|
*/
|
|
125
126
|
size?: Size$3; /** Content after the input (e.g. icon or clear button). */
|
|
126
127
|
trailingSlot?: React$2.ReactNode;
|
|
127
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "
|
|
128
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "size" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
128
129
|
//#endregion
|
|
129
130
|
//#region src/components/input-helpers/fieldLayout.d.ts
|
|
130
131
|
type FieldLayoutProps = {
|
|
@@ -171,7 +172,7 @@ declare const AutocompleteField: ((props: {
|
|
|
171
172
|
leadingSlot?: React$1.ReactNode;
|
|
172
173
|
size?: Size$3;
|
|
173
174
|
trailingSlot?: React$1.ReactNode;
|
|
174
|
-
} & StylingOverrideProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "
|
|
175
|
+
} & StylingOverrideProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "size" | "className"> & React$1.RefAttributes<HTMLInputElement>, "ref">, "value" | "onChange"> & React$1.RefAttributes<HTMLInputElement>) => React$1.ReactElement) & {
|
|
175
176
|
Item: typeof AutocompleteItem;
|
|
176
177
|
};
|
|
177
178
|
//#endregion
|
|
@@ -428,7 +429,7 @@ type RadioGroupProps = RadioGroupContextValue & StylingOverrideProps & Omit<Reac
|
|
|
428
429
|
/**
|
|
429
430
|
* A control wrapper for a group of radio buttons.
|
|
430
431
|
*/
|
|
431
|
-
declare const RadioGroup: (props: RadioGroupContextValue & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref">, "
|
|
432
|
+
declare const RadioGroup: (props: RadioGroupContextValue & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref">, "onChange" | "className"> & React$2.RefAttributes<HTMLFieldSetElement>) => React$2.ReactElement;
|
|
432
433
|
//#endregion
|
|
433
434
|
//#region src/components/Radio/Radio.d.ts
|
|
434
435
|
type ChildrenLabel = {
|
|
@@ -510,9 +511,9 @@ type TagProps = DraggableProps & {
|
|
|
510
511
|
*/
|
|
511
512
|
color?: TagColor;
|
|
512
513
|
/**
|
|
513
|
-
* The icon to display in the tag.
|
|
514
|
+
* The icon or logo to display in the tag.
|
|
514
515
|
*/
|
|
515
|
-
icon?: SvgIcon;
|
|
516
|
+
icon?: SvgIcon | SvgLogo;
|
|
516
517
|
/**
|
|
517
518
|
* The label text to display in the tag.
|
|
518
519
|
*/
|
|
@@ -561,7 +562,7 @@ declare const Checkbox: React$2.ForwardRefExoticComponent<{
|
|
|
561
562
|
checked?: boolean; /** Default checked state for uncontrolled component. */
|
|
562
563
|
defaultChecked?: boolean; /** The label for the checkbox. */
|
|
563
564
|
children?: string | React$2.ReactNode;
|
|
564
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
565
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
565
566
|
//#endregion
|
|
566
567
|
//#region src/components/Collapse/Collapse.d.ts
|
|
567
568
|
/** Props forwarded to React Aria `Disclosure`; see https://reactaria.adobe.com/Disclosure */
|
|
@@ -635,7 +636,7 @@ declare const TextField: React$2.ForwardRefExoticComponent<{
|
|
|
635
636
|
/** Called with the new string value when the input changes. */onChange?: (value: string) => void; /** When true, shows a character count. */
|
|
636
637
|
showCount?: boolean;
|
|
637
638
|
value?: string | number | undefined;
|
|
638
|
-
} & FieldLayoutProps & Omit<TextInputProps, "
|
|
639
|
+
} & FieldLayoutProps & Omit<TextInputProps, "value" | "onChange"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
639
640
|
//#endregion
|
|
640
641
|
//#region src/components/PasswordField/PasswordField.d.ts
|
|
641
642
|
type PasswordFieldProps = Omit<TextFieldProps, 'trailingSlot' | 'type'>;
|
|
@@ -659,7 +660,7 @@ type NumberFieldProps = Omit<TextInputProps, 'type' | 'onChange' | 'min' | 'max'
|
|
|
659
660
|
/**
|
|
660
661
|
* Number field built on React Aria `NumberField`, with custom increment/decrement controls (native spinners hidden).
|
|
661
662
|
*/
|
|
662
|
-
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "
|
|
663
|
+
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "max" | "min" | "step" | "type" | "onChange"> & {
|
|
663
664
|
/** Called with the unformatted number value when the number changes. */onChange?: (value: number) => void; /** Locale-aware display and parsing for the displayed value (see https://react-aria.adobe.com/NumberField#format-options) */
|
|
664
665
|
formatOptions?: Intl.NumberFormatOptions; /** Minimum value */
|
|
665
666
|
min?: number; /** Maximum value */
|
|
@@ -681,7 +682,7 @@ type DatePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutProps &
|
|
|
681
682
|
required?: boolean; /** Invalid value; `appearance="danger"` also forces an invalid state for display. */
|
|
682
683
|
isInvalid?: boolean;
|
|
683
684
|
};
|
|
684
|
-
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "
|
|
685
|
+
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "value" | "onChange" | "defaultValue"> & {
|
|
685
686
|
/** Smallest date/time unit shown in the field. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
686
687
|
} & StylingOverrideProps & {
|
|
687
688
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -709,7 +710,7 @@ type DateRangePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutPro
|
|
|
709
710
|
};
|
|
710
711
|
declare const DateRangePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "size" | "appearance" | "leadingSlot"> & {
|
|
711
712
|
/** Placeholders for empty start and end, shown with a swap icon between them when the group is not focus-within. */placeholder?: DateRangePickerFieldPlaceholder;
|
|
712
|
-
} & Pick<DateRangePickerProps<DateValue>, "
|
|
713
|
+
} & Pick<DateRangePickerProps<DateValue>, "value" | "onChange" | "defaultValue" | "shouldCloseOnSelect"> & {
|
|
713
714
|
/** Smallest date/time unit shown in the fields. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
714
715
|
} & StylingOverrideProps & {
|
|
715
716
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -769,7 +770,7 @@ declare const TextArea: React$2.ForwardRefExoticComponent<{
|
|
|
769
770
|
autoSize?: TextAreaAutoSize; /** When true, shows a character count. */
|
|
770
771
|
showCount?: boolean; /** Called with the new string value when the input changes. */
|
|
771
772
|
onChange?: (value: string) => void;
|
|
772
|
-
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "
|
|
773
|
+
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "size" | "onChange" | "className"> & React$2.RefAttributes<HTMLTextAreaElement>>;
|
|
773
774
|
//#endregion
|
|
774
775
|
//#region src/components/Modal/Modal.d.ts
|
|
775
776
|
type ModalSize = 'sm' | 'md' | 'lg';
|
package/dist/index.d.mts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React$2 from "react";
|
|
|
2
2
|
import React$1, { HTMLAttributeAnchorTarget, HTMLAttributeReferrerPolicy } from "react";
|
|
3
3
|
import { SvgIcon } from "@capra/icons";
|
|
4
4
|
import { BreadcrumbProps as BreadcrumbProps$1, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps$1, ComboBoxRenderProps, DatePickerProps, DateRangePickerProps, DateValue, DisclosureProps, Focusable, LinkProps as LinkProps$1, ListBoxItemProps, PopoverProps as PopoverProps$1, RouterProvider } from "react-aria-components";
|
|
5
|
+
import { SvgLogo } from "@capra/icons/logos";
|
|
5
6
|
|
|
6
7
|
//#region src/utils/stylingOverride.d.ts
|
|
7
8
|
interface StylingOverrideProps {
|
|
@@ -124,7 +125,7 @@ declare const TextInput: React$2.ForwardRefExoticComponent<{
|
|
|
124
125
|
*/
|
|
125
126
|
size?: Size$3; /** Content after the input (e.g. icon or clear button). */
|
|
126
127
|
trailingSlot?: React$2.ReactNode;
|
|
127
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "
|
|
128
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "size" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
128
129
|
//#endregion
|
|
129
130
|
//#region src/components/input-helpers/fieldLayout.d.ts
|
|
130
131
|
type FieldLayoutProps = {
|
|
@@ -171,7 +172,7 @@ declare const AutocompleteField: ((props: {
|
|
|
171
172
|
leadingSlot?: React$1.ReactNode;
|
|
172
173
|
size?: Size$3;
|
|
173
174
|
trailingSlot?: React$1.ReactNode;
|
|
174
|
-
} & StylingOverrideProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "
|
|
175
|
+
} & StylingOverrideProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "style" | "size" | "className"> & React$1.RefAttributes<HTMLInputElement>, "ref">, "value" | "onChange"> & React$1.RefAttributes<HTMLInputElement>) => React$1.ReactElement) & {
|
|
175
176
|
Item: typeof AutocompleteItem;
|
|
176
177
|
};
|
|
177
178
|
//#endregion
|
|
@@ -428,7 +429,7 @@ type RadioGroupProps = RadioGroupContextValue & StylingOverrideProps & Omit<Reac
|
|
|
428
429
|
/**
|
|
429
430
|
* A control wrapper for a group of radio buttons.
|
|
430
431
|
*/
|
|
431
|
-
declare const RadioGroup: (props: RadioGroupContextValue & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref">, "
|
|
432
|
+
declare const RadioGroup: (props: RadioGroupContextValue & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>, "ref">, "onChange" | "className"> & React$2.RefAttributes<HTMLFieldSetElement>) => React$2.ReactElement;
|
|
432
433
|
//#endregion
|
|
433
434
|
//#region src/components/Radio/Radio.d.ts
|
|
434
435
|
type ChildrenLabel = {
|
|
@@ -510,9 +511,9 @@ type TagProps = DraggableProps & {
|
|
|
510
511
|
*/
|
|
511
512
|
color?: TagColor;
|
|
512
513
|
/**
|
|
513
|
-
* The icon to display in the tag.
|
|
514
|
+
* The icon or logo to display in the tag.
|
|
514
515
|
*/
|
|
515
|
-
icon?: SvgIcon;
|
|
516
|
+
icon?: SvgIcon | SvgLogo;
|
|
516
517
|
/**
|
|
517
518
|
* The label text to display in the tag.
|
|
518
519
|
*/
|
|
@@ -561,7 +562,7 @@ declare const Checkbox: React$2.ForwardRefExoticComponent<{
|
|
|
561
562
|
checked?: boolean; /** Default checked state for uncontrolled component. */
|
|
562
563
|
defaultChecked?: boolean; /** The label for the checkbox. */
|
|
563
564
|
children?: string | React$2.ReactNode;
|
|
564
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
565
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
565
566
|
//#endregion
|
|
566
567
|
//#region src/components/Collapse/Collapse.d.ts
|
|
567
568
|
/** Props forwarded to React Aria `Disclosure`; see https://reactaria.adobe.com/Disclosure */
|
|
@@ -635,7 +636,7 @@ declare const TextField: React$2.ForwardRefExoticComponent<{
|
|
|
635
636
|
/** Called with the new string value when the input changes. */onChange?: (value: string) => void; /** When true, shows a character count. */
|
|
636
637
|
showCount?: boolean;
|
|
637
638
|
value?: string | number | undefined;
|
|
638
|
-
} & FieldLayoutProps & Omit<TextInputProps, "
|
|
639
|
+
} & FieldLayoutProps & Omit<TextInputProps, "value" | "onChange"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
639
640
|
//#endregion
|
|
640
641
|
//#region src/components/PasswordField/PasswordField.d.ts
|
|
641
642
|
type PasswordFieldProps = Omit<TextFieldProps, 'trailingSlot' | 'type'>;
|
|
@@ -659,7 +660,7 @@ type NumberFieldProps = Omit<TextInputProps, 'type' | 'onChange' | 'min' | 'max'
|
|
|
659
660
|
/**
|
|
660
661
|
* Number field built on React Aria `NumberField`, with custom increment/decrement controls (native spinners hidden).
|
|
661
662
|
*/
|
|
662
|
-
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "
|
|
663
|
+
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "max" | "min" | "step" | "type" | "onChange"> & {
|
|
663
664
|
/** Called with the unformatted number value when the number changes. */onChange?: (value: number) => void; /** Locale-aware display and parsing for the displayed value (see https://react-aria.adobe.com/NumberField#format-options) */
|
|
664
665
|
formatOptions?: Intl.NumberFormatOptions; /** Minimum value */
|
|
665
666
|
min?: number; /** Maximum value */
|
|
@@ -681,7 +682,7 @@ type DatePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutProps &
|
|
|
681
682
|
required?: boolean; /** Invalid value; `appearance="danger"` also forces an invalid state for display. */
|
|
682
683
|
isInvalid?: boolean;
|
|
683
684
|
};
|
|
684
|
-
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "
|
|
685
|
+
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "value" | "onChange" | "defaultValue"> & {
|
|
685
686
|
/** Smallest date/time unit shown in the field. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
686
687
|
} & StylingOverrideProps & {
|
|
687
688
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -709,7 +710,7 @@ type DateRangePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutPro
|
|
|
709
710
|
};
|
|
710
711
|
declare const DateRangePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "size" | "appearance" | "leadingSlot"> & {
|
|
711
712
|
/** Placeholders for empty start and end, shown with a swap icon between them when the group is not focus-within. */placeholder?: DateRangePickerFieldPlaceholder;
|
|
712
|
-
} & Pick<DateRangePickerProps<DateValue>, "
|
|
713
|
+
} & Pick<DateRangePickerProps<DateValue>, "value" | "onChange" | "defaultValue" | "shouldCloseOnSelect"> & {
|
|
713
714
|
/** Smallest date/time unit shown in the fields. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
714
715
|
} & StylingOverrideProps & {
|
|
715
716
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -769,7 +770,7 @@ declare const TextArea: React$2.ForwardRefExoticComponent<{
|
|
|
769
770
|
autoSize?: TextAreaAutoSize; /** When true, shows a character count. */
|
|
770
771
|
showCount?: boolean; /** Called with the new string value when the input changes. */
|
|
771
772
|
onChange?: (value: string) => void;
|
|
772
|
-
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "
|
|
773
|
+
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "size" | "onChange" | "className"> & React$2.RefAttributes<HTMLTextAreaElement>>;
|
|
773
774
|
//#endregion
|
|
774
775
|
//#region src/components/Modal/Modal.d.ts
|
|
775
776
|
type ModalSize = 'sm' | 'md' | 'lg';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capra/core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core React components for the Capra design system",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"react-aria": "^3.48.0",
|
|
36
36
|
"react-aria-components": "^1.17.0",
|
|
37
|
-
"@capra/icons": "1.6.
|
|
37
|
+
"@capra/icons": "1.6.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@ant-design/icons": "4.8.3",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
"antd": "4.24.16",
|
|
44
44
|
"storybook": "^10.4.6",
|
|
45
45
|
"tsdown": "^0.22.0",
|
|
46
|
-
"@private/building": "0.0.
|
|
47
|
-
"@capra/theme": "1.2.
|
|
48
|
-
"@private/testing": "0.0.7",
|
|
46
|
+
"@private/building": "0.0.4",
|
|
47
|
+
"@capra/theme": "1.2.1",
|
|
49
48
|
"@private/linting": "0.0.0",
|
|
49
|
+
"@private/testing": "0.0.7",
|
|
50
50
|
"@private/stories": "0.0.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|