@capra/core 1.8.0 → 1.8.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/index.cjs +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.mts +9 -9
- package/dist/index.mjs +1 -1
- package/docs/history-changelogs-capra-core--docs.md +6 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -4849,7 +4849,7 @@ const TabNav = ({ activeKey, onTabClick, items, tabPlacement = "horizontal", cen
|
|
|
4849
4849
|
});
|
|
4850
4850
|
}));
|
|
4851
4851
|
}
|
|
4852
|
-
if (item.href && !item.disabled) return /* @__PURE__ */ react.createElement(
|
|
4852
|
+
if (item.href && !item.disabled) return /* @__PURE__ */ react.createElement(react_aria_components.Link, {
|
|
4853
4853
|
key: item.key,
|
|
4854
4854
|
...commonTabProps,
|
|
4855
4855
|
href: item.href,
|
package/dist/index.d.cts
CHANGED
|
@@ -125,7 +125,7 @@ declare const TextInput: React$2.ForwardRefExoticComponent<{
|
|
|
125
125
|
*/
|
|
126
126
|
size?: Size$3; /** Content after the input (e.g. icon or clear button). */
|
|
127
127
|
trailingSlot?: React$2.ReactNode;
|
|
128
|
-
} & 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>>;
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/components/input-helpers/fieldLayout.d.ts
|
|
131
131
|
type FieldLayoutProps = {
|
|
@@ -172,7 +172,7 @@ declare const AutocompleteField: ((props: {
|
|
|
172
172
|
leadingSlot?: React$1.ReactNode;
|
|
173
173
|
size?: Size$3;
|
|
174
174
|
trailingSlot?: React$1.ReactNode;
|
|
175
|
-
} & 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) & {
|
|
176
176
|
Item: typeof AutocompleteItem;
|
|
177
177
|
};
|
|
178
178
|
//#endregion
|
|
@@ -429,7 +429,7 @@ type RadioGroupProps = RadioGroupContextValue & StylingOverrideProps & Omit<Reac
|
|
|
429
429
|
/**
|
|
430
430
|
* A control wrapper for a group of radio buttons.
|
|
431
431
|
*/
|
|
432
|
-
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;
|
|
433
433
|
//#endregion
|
|
434
434
|
//#region src/components/Radio/Radio.d.ts
|
|
435
435
|
type ChildrenLabel = {
|
|
@@ -569,7 +569,7 @@ declare const Checkbox: React$2.ForwardRefExoticComponent<{
|
|
|
569
569
|
checked?: boolean; /** Default checked state for uncontrolled component. */
|
|
570
570
|
defaultChecked?: boolean; /** The label for the checkbox. */
|
|
571
571
|
children?: string | React$2.ReactNode;
|
|
572
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
572
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/components/Collapse/Collapse.d.ts
|
|
575
575
|
/** Props forwarded to React Aria `Disclosure`; see https://reactaria.adobe.com/Disclosure */
|
|
@@ -643,7 +643,7 @@ declare const TextField: React$2.ForwardRefExoticComponent<{
|
|
|
643
643
|
/** Called with the new string value when the input changes. */onChange?: (value: string) => void; /** When true, shows a character count. */
|
|
644
644
|
showCount?: boolean;
|
|
645
645
|
value?: string | number | undefined;
|
|
646
|
-
} & FieldLayoutProps & Omit<TextInputProps, "
|
|
646
|
+
} & FieldLayoutProps & Omit<TextInputProps, "value" | "onChange"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/components/PasswordField/PasswordField.d.ts
|
|
649
649
|
type PasswordFieldProps = Omit<TextFieldProps, 'trailingSlot' | 'type'>;
|
|
@@ -667,7 +667,7 @@ type NumberFieldProps = Omit<TextInputProps, 'type' | 'onChange' | 'min' | 'max'
|
|
|
667
667
|
/**
|
|
668
668
|
* Number field built on React Aria `NumberField`, with custom increment/decrement controls (native spinners hidden).
|
|
669
669
|
*/
|
|
670
|
-
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "
|
|
670
|
+
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "max" | "min" | "step" | "type" | "onChange"> & {
|
|
671
671
|
/** 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) */
|
|
672
672
|
formatOptions?: Intl.NumberFormatOptions; /** Minimum value */
|
|
673
673
|
min?: number; /** Maximum value */
|
|
@@ -689,7 +689,7 @@ type DatePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutProps &
|
|
|
689
689
|
required?: boolean; /** Invalid value; `appearance="danger"` also forces an invalid state for display. */
|
|
690
690
|
isInvalid?: boolean;
|
|
691
691
|
};
|
|
692
|
-
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "
|
|
692
|
+
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "value" | "onChange" | "defaultValue"> & {
|
|
693
693
|
/** Smallest date/time unit shown in the field. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
694
694
|
} & StylingOverrideProps & {
|
|
695
695
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -717,7 +717,7 @@ type DateRangePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutPro
|
|
|
717
717
|
};
|
|
718
718
|
declare const DateRangePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "size" | "appearance" | "leadingSlot"> & {
|
|
719
719
|
/** Placeholders for empty start and end, shown with a swap icon between them when the group is not focus-within. */placeholder?: DateRangePickerFieldPlaceholder;
|
|
720
|
-
} & Pick<DateRangePickerProps<DateValue>, "
|
|
720
|
+
} & Pick<DateRangePickerProps<DateValue>, "value" | "onChange" | "defaultValue" | "shouldCloseOnSelect"> & {
|
|
721
721
|
/** Smallest date/time unit shown in the fields. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
722
722
|
} & StylingOverrideProps & {
|
|
723
723
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -777,7 +777,7 @@ declare const TextArea: React$2.ForwardRefExoticComponent<{
|
|
|
777
777
|
autoSize?: TextAreaAutoSize; /** When true, shows a character count. */
|
|
778
778
|
showCount?: boolean; /** Called with the new string value when the input changes. */
|
|
779
779
|
onChange?: (value: string) => void;
|
|
780
|
-
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "
|
|
780
|
+
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "size" | "onChange" | "className"> & React$2.RefAttributes<HTMLTextAreaElement>>;
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region src/components/Modal/Modal.d.ts
|
|
783
783
|
type ModalSize = 'sm' | 'md' | 'lg';
|
package/dist/index.d.mts
CHANGED
|
@@ -125,7 +125,7 @@ declare const TextInput: React$2.ForwardRefExoticComponent<{
|
|
|
125
125
|
*/
|
|
126
126
|
size?: Size$3; /** Content after the input (e.g. icon or clear button). */
|
|
127
127
|
trailingSlot?: React$2.ReactNode;
|
|
128
|
-
} & 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>>;
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/components/input-helpers/fieldLayout.d.ts
|
|
131
131
|
type FieldLayoutProps = {
|
|
@@ -172,7 +172,7 @@ declare const AutocompleteField: ((props: {
|
|
|
172
172
|
leadingSlot?: React$1.ReactNode;
|
|
173
173
|
size?: Size$3;
|
|
174
174
|
trailingSlot?: React$1.ReactNode;
|
|
175
|
-
} & 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) & {
|
|
176
176
|
Item: typeof AutocompleteItem;
|
|
177
177
|
};
|
|
178
178
|
//#endregion
|
|
@@ -429,7 +429,7 @@ type RadioGroupProps = RadioGroupContextValue & StylingOverrideProps & Omit<Reac
|
|
|
429
429
|
/**
|
|
430
430
|
* A control wrapper for a group of radio buttons.
|
|
431
431
|
*/
|
|
432
|
-
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;
|
|
433
433
|
//#endregion
|
|
434
434
|
//#region src/components/Radio/Radio.d.ts
|
|
435
435
|
type ChildrenLabel = {
|
|
@@ -569,7 +569,7 @@ declare const Checkbox: React$2.ForwardRefExoticComponent<{
|
|
|
569
569
|
checked?: boolean; /** Default checked state for uncontrolled component. */
|
|
570
570
|
defaultChecked?: boolean; /** The label for the checkbox. */
|
|
571
571
|
children?: string | React$2.ReactNode;
|
|
572
|
-
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
572
|
+
} & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "className"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/components/Collapse/Collapse.d.ts
|
|
575
575
|
/** Props forwarded to React Aria `Disclosure`; see https://reactaria.adobe.com/Disclosure */
|
|
@@ -643,7 +643,7 @@ declare const TextField: React$2.ForwardRefExoticComponent<{
|
|
|
643
643
|
/** Called with the new string value when the input changes. */onChange?: (value: string) => void; /** When true, shows a character count. */
|
|
644
644
|
showCount?: boolean;
|
|
645
645
|
value?: string | number | undefined;
|
|
646
|
-
} & FieldLayoutProps & Omit<TextInputProps, "
|
|
646
|
+
} & FieldLayoutProps & Omit<TextInputProps, "value" | "onChange"> & React$2.RefAttributes<HTMLInputElement>>;
|
|
647
647
|
//#endregion
|
|
648
648
|
//#region src/components/PasswordField/PasswordField.d.ts
|
|
649
649
|
type PasswordFieldProps = Omit<TextFieldProps, 'trailingSlot' | 'type'>;
|
|
@@ -667,7 +667,7 @@ type NumberFieldProps = Omit<TextInputProps, 'type' | 'onChange' | 'min' | 'max'
|
|
|
667
667
|
/**
|
|
668
668
|
* Number field built on React Aria `NumberField`, with custom increment/decrement controls (native spinners hidden).
|
|
669
669
|
*/
|
|
670
|
-
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "
|
|
670
|
+
declare const NumberField: React$2.ForwardRefExoticComponent<Omit<TextInputProps, "max" | "min" | "step" | "type" | "onChange"> & {
|
|
671
671
|
/** 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) */
|
|
672
672
|
formatOptions?: Intl.NumberFormatOptions; /** Minimum value */
|
|
673
673
|
min?: number; /** Maximum value */
|
|
@@ -689,7 +689,7 @@ type DatePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutProps &
|
|
|
689
689
|
required?: boolean; /** Invalid value; `appearance="danger"` also forces an invalid state for display. */
|
|
690
690
|
isInvalid?: boolean;
|
|
691
691
|
};
|
|
692
|
-
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "
|
|
692
|
+
declare const DatePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "placeholder" | "size" | "appearance" | "leadingSlot"> & Pick<DatePickerProps<DateValue>, "value" | "onChange" | "defaultValue"> & {
|
|
693
693
|
/** Smallest date/time unit shown in the field. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
694
694
|
} & StylingOverrideProps & {
|
|
695
695
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -717,7 +717,7 @@ type DateRangePickerFieldProps<T extends DateValue = DateValue> = FieldLayoutPro
|
|
|
717
717
|
};
|
|
718
718
|
declare const DateRangePickerField: React$2.ForwardRefExoticComponent<FieldLayoutProps & Pick<TextInputProps, "size" | "appearance" | "leadingSlot"> & {
|
|
719
719
|
/** Placeholders for empty start and end, shown with a swap icon between them when the group is not focus-within. */placeholder?: DateRangePickerFieldPlaceholder;
|
|
720
|
-
} & Pick<DateRangePickerProps<DateValue>, "
|
|
720
|
+
} & Pick<DateRangePickerProps<DateValue>, "value" | "onChange" | "defaultValue" | "shouldCloseOnSelect"> & {
|
|
721
721
|
/** Smallest date/time unit shown in the fields. Only `day` and `second` are supported. */granularity?: "day" | "second";
|
|
722
722
|
} & StylingOverrideProps & {
|
|
723
723
|
/** When true, shows a clear control to the left of the calendar button while the field has a value. */canClear?: boolean; /** Disables the field. */
|
|
@@ -777,7 +777,7 @@ declare const TextArea: React$2.ForwardRefExoticComponent<{
|
|
|
777
777
|
autoSize?: TextAreaAutoSize; /** When true, shows a character count. */
|
|
778
778
|
showCount?: boolean; /** Called with the new string value when the input changes. */
|
|
779
779
|
onChange?: (value: string) => void;
|
|
780
|
-
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "
|
|
780
|
+
} & FieldLayoutProps & StylingOverrideProps & Omit<Omit<React$2.DetailedHTMLProps<React$2.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "style" | "size" | "onChange" | "className"> & React$2.RefAttributes<HTMLTextAreaElement>>;
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region src/components/Modal/Modal.d.ts
|
|
783
783
|
type ModalSize = 'sm' | 'md' | 'lg';
|
package/dist/index.mjs
CHANGED
|
@@ -4825,7 +4825,7 @@ const TabNav = ({ activeKey, onTabClick, items, tabPlacement = "horizontal", cen
|
|
|
4825
4825
|
});
|
|
4826
4826
|
}));
|
|
4827
4827
|
}
|
|
4828
|
-
if (item.href && !item.disabled) return /* @__PURE__ */ React$1.createElement(
|
|
4828
|
+
if (item.href && !item.disabled) return /* @__PURE__ */ React$1.createElement(Link$1, {
|
|
4829
4829
|
key: item.key,
|
|
4830
4830
|
...commonTabProps,
|
|
4831
4831
|
href: item.href,
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# History/Changelogs/@capra-core
|
|
2
2
|
|
|
3
|
+
### 1.8.1
|
|
4
|
+
|
|
5
|
+
#### Patch Changes
|
|
6
|
+
|
|
7
|
+
* [1ebcee1](https://bitbucket.org/cribl/capra-ui/commits/1ebcee1): Fix issue where top-level links in `TabNav` caused a full page refresh when used with `RouterProvider`
|
|
8
|
+
|
|
3
9
|
### 1.8.0
|
|
4
10
|
|
|
5
11
|
#### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capra/core",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core React components for the Capra design system",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"antd": "4.24.16",
|
|
45
45
|
"storybook": "^10.4.6",
|
|
46
46
|
"tsdown": "^0.22.0",
|
|
47
|
-
"@private/building": "0.0.4",
|
|
48
47
|
"@capra/theme": "1.3.0",
|
|
49
48
|
"@private/linting": "0.0.0",
|
|
49
|
+
"@private/building": "0.0.4",
|
|
50
50
|
"@private/testing": "0.0.7",
|
|
51
51
|
"@private/stories": "0.0.0"
|
|
52
52
|
},
|