@algolia/satellite 1.6.0 → 1.8.0
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/cjs/Actions/Accordion/Accordion.d.ts +142 -0
- package/dist/cjs/Actions/Accordion/Accordion.js +149 -0
- package/dist/cjs/Actions/Accordion/Accordion.tailwind.d.ts +5 -0
- package/dist/cjs/Actions/Accordion/Accordion.tailwind.js +44 -0
- package/dist/cjs/Actions/Button/PolymorphicButton.js +2 -2
- package/dist/cjs/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/cjs/Actions/Button/types.d.ts +2 -2
- package/dist/cjs/Actions/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/cjs/Actions/index.d.ts +2 -0
- package/dist/cjs/Actions/index.js +18 -0
- package/dist/cjs/Fields/AutoComplete/AutoComplete.js +4 -4
- package/dist/cjs/Fields/DatePicker/components/Calendar.js +1 -4
- package/dist/cjs/Fields/Field/Field.js +12 -2
- package/dist/cjs/Fields/Field/FieldContext.d.ts +1 -0
- package/dist/cjs/Fields/Field/useField.d.ts +2 -1
- package/dist/cjs/Fields/Field/useField.js +7 -2
- package/dist/cjs/Fields/Form/Form.d.ts +12 -10
- package/dist/cjs/Fields/Form/Form.js +50 -38
- package/dist/cjs/Fields/Form/FormContext.d.ts +6 -6
- package/dist/cjs/Fields/Form/FormContext.js +2 -2
- package/dist/cjs/Fields/Form/index.d.ts +4 -3
- package/dist/cjs/Fields/Form/index.js +31 -21
- package/dist/cjs/Fields/Form/stories/AsynchronousValidation.js +142 -127
- package/dist/cjs/Fields/Form/stories/Complex.js +648 -642
- package/dist/cjs/Fields/Form/stories/DependentFieldsValidation.js +127 -121
- package/dist/cjs/Fields/Form/stories/DirtyFields.js +195 -189
- package/dist/cjs/Fields/Form/stories/DynamicFieldsValidation.js +251 -245
- package/dist/cjs/Fields/Form/stories/ExtraErrors.js +276 -0
- package/dist/cjs/Fields/Form/stories/FieldArrays.js +180 -174
- package/dist/cjs/Fields/Form/stories/JSONForms.js +58 -55
- package/dist/cjs/Fields/Form/stories/MultiStep.js +456 -472
- package/dist/cjs/Fields/Form/stories/ValidationStrategies.js +226 -237
- package/dist/cjs/Fields/Form/useForm.d.ts +1 -1
- package/dist/cjs/Fields/Form/useForm.js +3 -3
- package/dist/cjs/Fields/RangeSlider/RangeSlider.js +7 -8
- package/dist/cjs/Helpers/utilities/focusable.tailwind.js +1 -1
- package/dist/cjs/Indicators/ScrollIndicator/ScrollIndicator.js +1 -2
- package/dist/cjs/Indicators/Skeleton/Skeleton.d.ts +7 -0
- package/dist/cjs/Indicators/Skeleton/Skeleton.js +12 -5
- package/dist/cjs/Layout/Sidebar/SidebarButtonLink.js +1 -1
- package/dist/cjs/Layout/Sidebar/SidebarLink.js +2 -2
- package/dist/cjs/Layout/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +1 -1
- package/dist/cjs/Layout/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +4 -5
- package/dist/cjs/Layout/Tables/DataTable/DataTable.d.ts +3 -1
- package/dist/cjs/Layout/Tables/DataTable/DataTable.js +3 -0
- package/dist/cjs/Layout/Tables/DataTable/components/Body.d.ts +1 -1
- package/dist/cjs/Layout/Tables/DataTable/components/Header.d.ts +1 -1
- package/dist/cjs/Layout/Tables/DataTable/components/HeaderCell.d.ts +1 -1
- package/dist/cjs/Layout/Tables/DataTable/utils.d.ts +1 -1
- package/dist/cjs/Layout/Tables/Table/Table.d.ts +2 -0
- package/dist/cjs/Layout/Tables/Table/Table.js +4 -2
- package/dist/cjs/Layout/Tables/Table/Table.tailwind.js +6 -1
- package/dist/cjs/Navigation/Stepper/Step.js +8 -7
- package/dist/cjs/Navigation/Stepper/Stepper.d.ts +6 -0
- package/dist/cjs/Navigation/Stepper/Stepper.js +9 -3
- package/dist/cjs/Navigation/Stepper/StepperContext.d.ts +2 -1
- package/dist/cjs/Overlay/Dropdown/DropdownContext.d.ts +1 -1
- package/dist/cjs/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +1 -1
- package/dist/cjs/Overlay/MenuButton/components/collapsible/CollapsibleItemsGroupContext.d.ts +1 -1
- package/dist/cjs/Overlay/MenuButton/components/items/LinkItem.d.ts +1 -1
- package/dist/cjs/Overlay/MenuButton/components/items/ToggleItem.d.ts +1 -1
- package/dist/cjs/styles/helpers/makePurgeCssExtractor.js +3 -3
- package/dist/cjs/styles/tailwind.config.js +1 -1
- package/dist/cjs/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/cjs/utils/useTriggerInputChange.js +4 -3
- package/dist/esm/Actions/Accordion/Accordion.d.ts +142 -0
- package/dist/esm/Actions/Accordion/Accordion.js +139 -0
- package/dist/esm/Actions/Accordion/Accordion.tailwind.d.ts +5 -0
- package/dist/esm/Actions/Accordion/Accordion.tailwind.js +43 -0
- package/dist/esm/Actions/Button/PolymorphicButton.js +2 -2
- package/dist/esm/Actions/Button/PolymorphicIconButton.js +2 -2
- package/dist/esm/Actions/Button/types.d.ts +2 -2
- package/dist/esm/Actions/ToggleGroup/ToggleGroup.d.ts +2 -2
- package/dist/esm/Actions/index.d.ts +2 -0
- package/dist/esm/Actions/index.js +2 -2
- package/dist/esm/Fields/AutoComplete/AutoComplete.js +4 -4
- package/dist/esm/Fields/DatePicker/components/Calendar.js +1 -4
- package/dist/esm/Fields/Field/Field.js +13 -3
- package/dist/esm/Fields/Field/FieldContext.d.ts +1 -0
- package/dist/esm/Fields/Field/useField.d.ts +2 -1
- package/dist/esm/Fields/Field/useField.js +7 -2
- package/dist/esm/Fields/Form/Form.d.ts +12 -10
- package/dist/esm/Fields/Form/Form.js +52 -40
- package/dist/esm/Fields/Form/FormContext.d.ts +6 -6
- package/dist/esm/Fields/Form/FormContext.js +1 -1
- package/dist/esm/Fields/Form/index.d.ts +4 -3
- package/dist/esm/Fields/Form/index.js +2 -3
- package/dist/esm/Fields/Form/stories/AsynchronousValidation.js +143 -128
- package/dist/esm/Fields/Form/stories/Complex.js +649 -643
- package/dist/esm/Fields/Form/stories/DependentFieldsValidation.js +128 -122
- package/dist/esm/Fields/Form/stories/DirtyFields.js +196 -190
- package/dist/esm/Fields/Form/stories/DynamicFieldsValidation.js +252 -246
- package/dist/esm/Fields/Form/stories/ExtraErrors.js +266 -0
- package/dist/esm/Fields/Form/stories/FieldArrays.js +181 -175
- package/dist/esm/Fields/Form/stories/JSONForms.js +59 -56
- package/dist/esm/Fields/Form/stories/MultiStep.js +457 -473
- package/dist/esm/Fields/Form/stories/ValidationStrategies.js +227 -238
- package/dist/esm/Fields/Form/useForm.d.ts +1 -1
- package/dist/esm/Fields/Form/useForm.js +3 -3
- package/dist/esm/Fields/RangeSlider/RangeSlider.js +8 -9
- package/dist/esm/Helpers/utilities/focusable.tailwind.js +1 -1
- package/dist/esm/Indicators/ScrollIndicator/ScrollIndicator.js +1 -2
- package/dist/esm/Indicators/Skeleton/Skeleton.d.ts +7 -0
- package/dist/esm/Indicators/Skeleton/Skeleton.js +12 -5
- package/dist/esm/Layout/Sidebar/SidebarButtonLink.js +1 -1
- package/dist/esm/Layout/Sidebar/SidebarLink.js +2 -2
- package/dist/esm/Layout/Sidebar/SidebarLinksGroup/SidebarGroupLink.js +1 -1
- package/dist/esm/Layout/Sidebar/SidebarLinksGroup/SidebarLinksGroup.js +4 -5
- package/dist/esm/Layout/Tables/DataTable/DataTable.d.ts +3 -1
- package/dist/esm/Layout/Tables/DataTable/DataTable.js +3 -0
- package/dist/esm/Layout/Tables/DataTable/components/Body.d.ts +1 -1
- package/dist/esm/Layout/Tables/DataTable/components/Header.d.ts +1 -1
- package/dist/esm/Layout/Tables/DataTable/components/HeaderCell.d.ts +1 -1
- package/dist/esm/Layout/Tables/DataTable/utils.d.ts +1 -1
- package/dist/esm/Layout/Tables/Table/Table.d.ts +2 -0
- package/dist/esm/Layout/Tables/Table/Table.js +4 -2
- package/dist/esm/Layout/Tables/Table/Table.tailwind.js +6 -1
- package/dist/esm/Navigation/Stepper/Step.js +8 -7
- package/dist/esm/Navigation/Stepper/Stepper.d.ts +6 -0
- package/dist/esm/Navigation/Stepper/Stepper.js +9 -3
- package/dist/esm/Navigation/Stepper/StepperContext.d.ts +2 -1
- package/dist/esm/Overlay/Dropdown/DropdownContext.d.ts +1 -1
- package/dist/esm/Overlay/Dropdown/components/DropdownCollapsibleItem/DropdownCollapsibleItemsGroupContext.d.ts +1 -1
- package/dist/esm/Overlay/MenuButton/components/collapsible/CollapsibleItemsGroupContext.d.ts +1 -1
- package/dist/esm/Overlay/MenuButton/components/items/LinkItem.d.ts +1 -1
- package/dist/esm/Overlay/MenuButton/components/items/ToggleItem.d.ts +1 -1
- package/dist/esm/styles/helpers/makePurgeCssExtractor.js +3 -3
- package/dist/esm/styles/tailwind.config.js +1 -1
- package/dist/esm/utils/isCssPropertySupported.d.ts +1 -1
- package/dist/esm/utils/useTriggerInputChange.js +4 -3
- package/dist/satellite.min.css +1 -1
- package/package.json +20 -19
@@ -0,0 +1,142 @@
|
|
1
|
+
import * as RadixAccordion from "@radix-ui/react-accordion";
|
2
|
+
import type { ReactNode, VFC } from "react";
|
3
|
+
import type { IconComponentType } from "../../Icons";
|
4
|
+
declare type AccordionSharedProps = {
|
5
|
+
children: ReactNode;
|
6
|
+
/**
|
7
|
+
* Defines a class name for the `Accordion`.
|
8
|
+
*/
|
9
|
+
className?: string;
|
10
|
+
/**
|
11
|
+
* Defines whether the `Accordion` is disabled, preventing the user from interacting with the accordion and all its items.
|
12
|
+
*/
|
13
|
+
disabled?: boolean;
|
14
|
+
};
|
15
|
+
declare type AccordionSingleProps = {
|
16
|
+
/**
|
17
|
+
* Defines whether a single or multiple items can be expanded at a time.
|
18
|
+
* @default false
|
19
|
+
*/
|
20
|
+
multiple?: false;
|
21
|
+
/**
|
22
|
+
* Defines the controlled value of the item to expand when `multiple` is `false`.
|
23
|
+
* Must be used in conjunction with `onValueChange`.
|
24
|
+
*/
|
25
|
+
value?: RadixAccordion.AccordionSingleProps["value"];
|
26
|
+
/**
|
27
|
+
* Defines the value of the item to expand when initially rendered and `multiple` is `false`.
|
28
|
+
* Use when you do not need to control the state of the items.
|
29
|
+
*/
|
30
|
+
defaultValue?: RadixAccordion.AccordionSingleProps["defaultValue"];
|
31
|
+
/**
|
32
|
+
* Defines the event handler called when the expanded state of an item changes and `multiple` is `false`.
|
33
|
+
*/
|
34
|
+
onChange?: RadixAccordion.AccordionSingleProps["onValueChange"];
|
35
|
+
/**
|
36
|
+
* Allows closing content when clicking trigger for an open item when `multiple` is `false`.
|
37
|
+
* @default true
|
38
|
+
*/
|
39
|
+
collapsible?: boolean;
|
40
|
+
};
|
41
|
+
declare type AccordionMultipleProps = {
|
42
|
+
/**
|
43
|
+
* Defines whether a single or multiple items can be expanded at a time.
|
44
|
+
* @default false
|
45
|
+
*/
|
46
|
+
multiple: true;
|
47
|
+
/**
|
48
|
+
* Defines the controlled value of the item to expand when `multiple` is `true`.
|
49
|
+
* Must be used in conjunction with `onValueChange`.
|
50
|
+
*/
|
51
|
+
value?: RadixAccordion.AccordionMultipleProps["value"];
|
52
|
+
/**
|
53
|
+
* Defines the value of the item to expand when initially rendered when `multiple` is `true`.
|
54
|
+
* Use when you do not need to control the state of the items.
|
55
|
+
*/
|
56
|
+
defaultValue?: RadixAccordion.AccordionMultipleProps["defaultValue"];
|
57
|
+
/**
|
58
|
+
* Defines the event handler called when the expanded state of an item changes and `multiple` is `true`.
|
59
|
+
*/
|
60
|
+
onChange?: RadixAccordion.AccordionMultipleProps["onValueChange"];
|
61
|
+
/**
|
62
|
+
* Only available when `multiple` is `false`.
|
63
|
+
*/
|
64
|
+
collapsible?: never;
|
65
|
+
};
|
66
|
+
export declare type AccordionProps = AccordionSharedProps & (AccordionSingleProps | AccordionMultipleProps);
|
67
|
+
export declare type AccordionItemProps = {
|
68
|
+
children: ReactNode;
|
69
|
+
/**
|
70
|
+
* Defines a class name for the item.
|
71
|
+
*/
|
72
|
+
className?: string;
|
73
|
+
/**
|
74
|
+
* Defines a unique value for the item.
|
75
|
+
*/
|
76
|
+
value: string;
|
77
|
+
/**
|
78
|
+
* Defines whether the item is disabled, preventing the user from interacting with the item.
|
79
|
+
*/
|
80
|
+
disabled?: boolean;
|
81
|
+
};
|
82
|
+
export declare type AccordionHeaderProps = {
|
83
|
+
/**
|
84
|
+
* Defines the title of the header.
|
85
|
+
*/
|
86
|
+
children: ReactNode;
|
87
|
+
/**
|
88
|
+
* Defines a class name for the header.
|
89
|
+
*/
|
90
|
+
className?: string;
|
91
|
+
/**
|
92
|
+
* Defines an icon to display next to the title and description.
|
93
|
+
*/
|
94
|
+
icon?: IconComponentType;
|
95
|
+
/**
|
96
|
+
* Defines a class name for the icon.
|
97
|
+
*/
|
98
|
+
iconClassName?: string;
|
99
|
+
/**
|
100
|
+
* Defines a class name for the icon background.
|
101
|
+
*/
|
102
|
+
iconBgClassName?: string;
|
103
|
+
/**
|
104
|
+
* Defines a description for the header.
|
105
|
+
*/
|
106
|
+
description?: ReactNode;
|
107
|
+
/**
|
108
|
+
* Defines a meta value for the header.
|
109
|
+
*/
|
110
|
+
meta?: ReactNode;
|
111
|
+
/**
|
112
|
+
* Defines an icon to display as the trigger.
|
113
|
+
* Defaults to a chevron icon.
|
114
|
+
*/
|
115
|
+
triggerIcon?: IconComponentType;
|
116
|
+
/**
|
117
|
+
* Defines a class name for the trigger.
|
118
|
+
*/
|
119
|
+
triggerClassName?: string;
|
120
|
+
};
|
121
|
+
export declare type AccordionContentProps = {
|
122
|
+
children: ReactNode;
|
123
|
+
/**
|
124
|
+
* Defines a class name for the content.
|
125
|
+
*/
|
126
|
+
className?: string;
|
127
|
+
};
|
128
|
+
declare type AccordionComponent = VFC<AccordionProps> & {
|
129
|
+
Item: typeof AccordionItem;
|
130
|
+
Header: typeof AccordionHeader;
|
131
|
+
Content: typeof AccordionContent;
|
132
|
+
};
|
133
|
+
/**
|
134
|
+
* The `Accordion` component is a compact section for revealing and hiding content, ideal for keeping interfaces clean.
|
135
|
+
*
|
136
|
+
* See the [Accordion documentation page](https://satellite.algolia.com/components/actions/accordion) for more information.
|
137
|
+
*/
|
138
|
+
export declare const Accordion: AccordionComponent;
|
139
|
+
declare const AccordionItem: import("react").ForwardRefExoticComponent<AccordionItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
140
|
+
declare const AccordionHeader: import("react").ForwardRefExoticComponent<AccordionHeaderProps & import("react").RefAttributes<HTMLButtonElement>>;
|
141
|
+
declare const AccordionContent: import("react").ForwardRefExoticComponent<AccordionContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
142
|
+
export {};
|
@@ -0,0 +1,139 @@
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
4
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
|
5
|
+
var _excluded = ["children", "className"],
|
6
|
+
_excluded2 = ["onChange", "multiple"],
|
7
|
+
_excluded3 = ["onChange", "multiple", "collapsible"];
|
8
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
9
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
10
|
+
import * as RadixAccordion from "@radix-ui/react-accordion";
|
11
|
+
import cx from "clsx";
|
12
|
+
import { forwardRef } from "react";
|
13
|
+
import { ChevronDownIcon } from "../../Icons";
|
14
|
+
import stl from "../../styles/helpers/satellitePrefixer";
|
15
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
16
|
+
var ICON_SIZE = 16;
|
17
|
+
var TRIGGER_ICON_SIZE = 20;
|
18
|
+
|
19
|
+
/**
|
20
|
+
* The `Accordion` component is a compact section for revealing and hiding content, ideal for keeping interfaces clean.
|
21
|
+
*
|
22
|
+
* See the [Accordion documentation page](https://satellite.algolia.com/components/actions/accordion) for more information.
|
23
|
+
*/
|
24
|
+
export var Accordion = function Accordion(_ref) {
|
25
|
+
var children = _ref.children,
|
26
|
+
className = _ref.className,
|
27
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
28
|
+
var sharedProps = {
|
29
|
+
className: cx(stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["flex flex-col"]))), className)
|
30
|
+
};
|
31
|
+
if (props.multiple) {
|
32
|
+
var _onChange = props.onChange,
|
33
|
+
_multiple = props.multiple,
|
34
|
+
_rest = _objectWithoutProperties(props, _excluded2);
|
35
|
+
return /*#__PURE__*/_jsx(RadixAccordion.Root, _objectSpread(_objectSpread(_objectSpread({}, _rest), sharedProps), {}, {
|
36
|
+
type: "multiple",
|
37
|
+
onValueChange: _onChange,
|
38
|
+
children: children
|
39
|
+
}));
|
40
|
+
}
|
41
|
+
var onChange = props.onChange,
|
42
|
+
multiple = props.multiple,
|
43
|
+
_props$collapsible = props.collapsible,
|
44
|
+
collapsible = _props$collapsible === void 0 ? true : _props$collapsible,
|
45
|
+
rest = _objectWithoutProperties(props, _excluded3);
|
46
|
+
return /*#__PURE__*/_jsx(RadixAccordion.Root, _objectSpread(_objectSpread(_objectSpread({}, rest), sharedProps), {}, {
|
47
|
+
type: "single",
|
48
|
+
onValueChange: onChange,
|
49
|
+
collapsible: collapsible,
|
50
|
+
children: children
|
51
|
+
}));
|
52
|
+
};
|
53
|
+
Accordion.displayName = "Accordion";
|
54
|
+
var AccordionItem = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
55
|
+
var value = _ref2.value,
|
56
|
+
disabled = _ref2.disabled,
|
57
|
+
children = _ref2.children,
|
58
|
+
className = _ref2.className;
|
59
|
+
return /*#__PURE__*/_jsx(RadixAccordion.Item, {
|
60
|
+
value: value,
|
61
|
+
disabled: disabled,
|
62
|
+
ref: ref,
|
63
|
+
className: cx(stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["group/accordion-item flex flex-col"]))), className),
|
64
|
+
children: children
|
65
|
+
});
|
66
|
+
});
|
67
|
+
AccordionItem.displayName = "AccordionItem";
|
68
|
+
var AccordionHeader = /*#__PURE__*/forwardRef(function (_ref3, ref) {
|
69
|
+
var children = _ref3.children,
|
70
|
+
description = _ref3.description,
|
71
|
+
Icon = _ref3.icon,
|
72
|
+
_ref3$iconClassName = _ref3.iconClassName,
|
73
|
+
iconClassName = _ref3$iconClassName === void 0 ? stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["typo-subdued"]))) : _ref3$iconClassName,
|
74
|
+
_ref3$iconBgClassName = _ref3.iconBgClassName,
|
75
|
+
iconBgClassName = _ref3$iconBgClassName === void 0 ? stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["bg-grey-100"]))) : _ref3$iconBgClassName,
|
76
|
+
meta = _ref3.meta,
|
77
|
+
triggerIcon = _ref3.triggerIcon,
|
78
|
+
triggerClassName = _ref3.triggerClassName,
|
79
|
+
className = _ref3.className;
|
80
|
+
var TriggerIcon = triggerIcon || ChevronDownIcon;
|
81
|
+
return /*#__PURE__*/_jsx(RadixAccordion.Header, {
|
82
|
+
className: className,
|
83
|
+
children: /*#__PURE__*/_jsxs(RadixAccordion.Trigger, {
|
84
|
+
ref: ref,
|
85
|
+
className: cx(stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["group/accordion-trigger flex gap-x-3 items-center w-full justify-between px-3.5 py-2.5 group-first/accordion-item:rounded-t group-last/accordion-item:rounded-b bg-white border-2 border-transparent focus-visible:outline-none focus-visible:border-accent-600 enabled:hover:bg-grey-50 motion-safe:transition-colors"]))), triggerClassName),
|
86
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
87
|
+
className: stl(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["flex items-center gap-x-3 grow"]))),
|
88
|
+
children: [Icon && /*#__PURE__*/_jsx("span", {
|
89
|
+
className: cx(stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["rounded-full w-8 h-8 flex items-center justify-center shrink-0"]))), iconBgClassName),
|
90
|
+
"aria-hidden": true,
|
91
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
92
|
+
className: cx(iconClassName, stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["group-disabled/accordion-trigger:text-grey-300"])))),
|
93
|
+
width: ICON_SIZE,
|
94
|
+
height: ICON_SIZE
|
95
|
+
})
|
96
|
+
}), /*#__PURE__*/_jsxs("div", {
|
97
|
+
className: stl(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["flex flex-col gap-y-1 text-left grow"]))),
|
98
|
+
children: [/*#__PURE__*/_jsx("div", {
|
99
|
+
className: stl(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["typo-display-heading line-clamp-2 group-disabled/accordion-trigger:text-grey-300"]))),
|
100
|
+
children: children
|
101
|
+
}), typeof description !== "undefined" && /*#__PURE__*/_jsx("div", {
|
102
|
+
className: stl(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["typo-display-body typo-subdued line-clamp-3 group-disabled/accordion-trigger:text-grey-300"]))),
|
103
|
+
children: description
|
104
|
+
})]
|
105
|
+
})]
|
106
|
+
}), /*#__PURE__*/_jsxs("div", {
|
107
|
+
className: stl(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["flex items-center gap-x-2"]))),
|
108
|
+
children: [typeof meta !== "undefined" && /*#__PURE__*/_jsx("div", {
|
109
|
+
className: stl(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["typo-display-caption group-disabled/accordion-trigger:text-grey-300"]))),
|
110
|
+
children: meta
|
111
|
+
}), /*#__PURE__*/_jsx(TriggerIcon, {
|
112
|
+
className: cx(stl(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["shrink-0 typo-subdued group-disabled/accordion-trigger:text-grey-300"]))),
|
113
|
+
// Don't rotate the trigger icon if it's a custom one.
|
114
|
+
!triggerIcon && stl(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral([" group-data-[state=open]/accordion-trigger:rotate-180 motion-safe:transition-transform motion-safe:duration-300 motion-safe:ease-out"])))),
|
115
|
+
width: TRIGGER_ICON_SIZE,
|
116
|
+
height: TRIGGER_ICON_SIZE,
|
117
|
+
"aria-hidden": true
|
118
|
+
})]
|
119
|
+
})]
|
120
|
+
})
|
121
|
+
});
|
122
|
+
});
|
123
|
+
AccordionHeader.displayName = "AccordionHeader";
|
124
|
+
var AccordionContent = /*#__PURE__*/forwardRef(function (_ref4, ref) {
|
125
|
+
var children = _ref4.children,
|
126
|
+
className = _ref4.className;
|
127
|
+
return /*#__PURE__*/_jsx(RadixAccordion.Content, {
|
128
|
+
ref: ref,
|
129
|
+
className: cx(stl(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["typo-display-body typo-subdued overflow-hidden accordion-content"]))), className),
|
130
|
+
children: /*#__PURE__*/_jsx("div", {
|
131
|
+
className: stl(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["px-4 pt-2 pb-4"]))),
|
132
|
+
children: children
|
133
|
+
})
|
134
|
+
});
|
135
|
+
});
|
136
|
+
AccordionContent.displayName = "AccordionContent";
|
137
|
+
Accordion.Item = AccordionItem;
|
138
|
+
Accordion.Header = AccordionHeader;
|
139
|
+
Accordion.Content = AccordionContent;
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import _plugin from "tailwindcss/plugin";
|
2
|
+
// @ts-check
|
3
|
+
var plugin = _plugin;
|
4
|
+
var accordionPlugin = plugin(function (_ref) {
|
5
|
+
var addComponents = _ref.addComponents;
|
6
|
+
var animationDuration = "300ms";
|
7
|
+
var animationEasing = "ease-out";
|
8
|
+
addComponents({
|
9
|
+
/* eslint-disable @algolia/stl/prefer-stl-helper */
|
10
|
+
"@media (prefers-reduced-motion: no-preference)": {
|
11
|
+
".accordion-content": {
|
12
|
+
"&[data-state='open']": {
|
13
|
+
animation: "stl-accordion-content-slide-down ".concat(animationDuration, " ").concat(animationEasing)
|
14
|
+
},
|
15
|
+
"&[data-state='closed']": {
|
16
|
+
animation: "stl-accordion-content-slide-up ".concat(animationDuration, " ").concat(animationEasing)
|
17
|
+
}
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"@keyframes stl-accordion-content-slide-down": {
|
21
|
+
from: {
|
22
|
+
height: "0",
|
23
|
+
opacity: "0"
|
24
|
+
},
|
25
|
+
to: {
|
26
|
+
height: "var(--radix-accordion-content-height)",
|
27
|
+
opacity: "1"
|
28
|
+
}
|
29
|
+
},
|
30
|
+
"@keyframes stl-accordion-content-slide-up": {
|
31
|
+
from: {
|
32
|
+
height: "var(--radix-accordion-content-height)",
|
33
|
+
opacity: "1"
|
34
|
+
},
|
35
|
+
to: {
|
36
|
+
height: "0",
|
37
|
+
opacity: "0"
|
38
|
+
}
|
39
|
+
}
|
40
|
+
/* eslint-enable @algolia/stl/prefer-stl-helper */
|
41
|
+
});
|
42
|
+
});
|
43
|
+
export default accordionPlugin;
|
@@ -33,7 +33,7 @@ export var PolymorphicButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
33
33
|
children = props.children,
|
34
34
|
cleanedProps = _objectWithoutProperties(props, _excluded);
|
35
35
|
if (loading) {
|
36
|
-
// @ts-expect-error
|
36
|
+
// @ts-expect-error disabled is not present in PolymorphicButtonProps
|
37
37
|
cleanedProps.disabled = true;
|
38
38
|
}
|
39
39
|
var buttonClassName = cx(BASE_CLASSNAMES, BUTTON_SIZE_CLASSNAMES[size], BUTTON_VARIANT_CLASSNAMES[variant], cleanedProps.disabled && stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["btn-disabled"]))), className);
|
@@ -41,7 +41,7 @@ export var PolymorphicButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
41
41
|
var iconClassNames = cx(getIconColorClassName(props), loading && stl(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["invisible"]))));
|
42
42
|
var textClassNames = cx(loading && stl(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["invisible"]))));
|
43
43
|
if (isButtonType(props) && !Object.prototype.hasOwnProperty.call(cleanedProps, "type")) {
|
44
|
-
// @ts-expect-error
|
44
|
+
// @ts-expect-error type is not present in PolymorphicButtonProps
|
45
45
|
cleanedProps.type = "button";
|
46
46
|
}
|
47
47
|
return /*#__PURE__*/_jsxs(Component, _objectSpread(_objectSpread({}, cleanedProps), {}, {
|
@@ -44,13 +44,13 @@ export var PolymorphicIconButton = /*#__PURE__*/forwardRef(function (props, ref)
|
|
44
44
|
loading = _props$loading === void 0 ? false : _props$loading,
|
45
45
|
cleanedProps = _objectWithoutProperties(props, _excluded);
|
46
46
|
if (loading) {
|
47
|
-
// @ts-expect-error
|
47
|
+
// @ts-expect-error disabled prop is not present in PolymorphicIconButtonProps
|
48
48
|
cleanedProps.disabled = true;
|
49
49
|
}
|
50
50
|
var iconButtonClassName = cx(BASE_CLASSNAMES, SIZE_CLASSNAMES[size], VARIANT_CLASSNAMES[variant], cleanedProps.disabled && stl(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["btn-disabled"]))), className);
|
51
51
|
var loaderClassNames = stl(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["absolute ", ""])), (variant === "destructive" || variant === "primary") && "text-white");
|
52
52
|
if (isButtonType(props) && !Object.prototype.hasOwnProperty.call(cleanedProps, "type")) {
|
53
|
-
// @ts-
|
53
|
+
// @ts-expect-error type is not present in PolymorphicIconButtonProps
|
54
54
|
cleanedProps.type = "button";
|
55
55
|
}
|
56
56
|
return /*#__PURE__*/_jsx(TooltipWrapper, {
|
@@ -25,8 +25,8 @@ declare type AsProp<C extends React.ElementType> = {
|
|
25
25
|
as?: C;
|
26
26
|
};
|
27
27
|
declare type PropsToOmit<C extends React.ElementType, P> = keyof (AsProp<C> & P);
|
28
|
-
declare type PolymorphicComponentProp<C extends React.ElementType, Props =
|
29
|
-
export declare type PolymorphicComponentPropWithRef<C extends React.ElementType, Props =
|
28
|
+
declare type PolymorphicComponentProp<C extends React.ElementType, Props = object> = React.PropsWithChildren<Props & AsProp<C>> & Omit<React.ComponentPropsWithoutRef<C>, PropsToOmit<C, Props>>;
|
29
|
+
export declare type PolymorphicComponentPropWithRef<C extends React.ElementType, Props = object> = PolymorphicComponentProp<C, Props> & {
|
30
30
|
ref?: PolymorphicRef<C>;
|
31
31
|
};
|
32
32
|
export declare type PolymorphicRef<C extends React.ElementType> = React.ComponentPropsWithRef<C>["ref"];
|
@@ -15,7 +15,7 @@ declare type ToggleGroupSingleProps = {
|
|
15
15
|
type: "single";
|
16
16
|
/**
|
17
17
|
* Defines the controlled value of the pressed item.
|
18
|
-
* Must be used in conjunction with `
|
18
|
+
* Must be used in conjunction with `onChange`.
|
19
19
|
*/
|
20
20
|
value?: RadixToggleGroupSingleProps["value"];
|
21
21
|
/**
|
@@ -31,7 +31,7 @@ declare type ToggleGroupMultipleProps = {
|
|
31
31
|
type: "multiple";
|
32
32
|
/**
|
33
33
|
* Defines the controlled value of the pressed items.
|
34
|
-
* Must be used in conjunction with `
|
34
|
+
* Must be used in conjunction with `onChange`.
|
35
35
|
*/
|
36
36
|
value?: RadixToggleGroupMultipleProps["value"];
|
37
37
|
/**
|
@@ -1,3 +1,5 @@
|
|
1
|
+
export type { AccordionProps as ExperimentalAccordionProps, AccordionContentProps as ExperimentalAccordionContentProps, AccordionHeaderProps as ExperimentalAccordionHeaderProps, AccordionItemProps as ExperimentalAccordionItemProps, } from "./Accordion/Accordion";
|
2
|
+
export { Accordion as ExperimentalAccordion } from "./Accordion/Accordion";
|
1
3
|
export * from "./Button/Button";
|
2
4
|
export * from "./ButtonGroup/ButtonGroup";
|
3
5
|
export * from "./ButtonLink/ButtonLink";
|
@@ -1,3 +1,4 @@
|
|
1
|
+
export { Accordion as ExperimentalAccordion } from "./Accordion/Accordion";
|
1
2
|
export * from "./Button/Button";
|
2
3
|
export * from "./ButtonGroup/ButtonGroup";
|
3
4
|
export * from "./ButtonLink/ButtonLink";
|
@@ -5,5 +6,4 @@ export * from "./IconButton/IconButton";
|
|
5
6
|
export * from "./IconButtonLink/IconButtonLink";
|
6
7
|
export * from "./Switch";
|
7
8
|
export * from "./ToggleButton/ToggleButton";
|
8
|
-
export * from "./ToggleGroup/ToggleGroup";
|
9
|
-
export {};
|
9
|
+
export * from "./ToggleGroup/ToggleGroup";
|
@@ -271,7 +271,7 @@ export var AutoComplete = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
271
271
|
if (!multiple && value && !newInputValue) {
|
272
272
|
multipleSelection.setSelectedItems([]);
|
273
273
|
}
|
274
|
-
(_menuPopper$update = menuPopper.update) === null || _menuPopper$update === void 0
|
274
|
+
void ((_menuPopper$update = menuPopper.update) === null || _menuPopper$update === void 0 ? void 0 : _menuPopper$update.call(menuPopper));
|
275
275
|
},
|
276
276
|
// We need to make sure to define event handlers here so that they can be composed properly
|
277
277
|
onFocus: function onFocus(evt) {
|
@@ -285,7 +285,7 @@ export var AutoComplete = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
285
285
|
},
|
286
286
|
onKeyDown: function onKeyDown(evt) {
|
287
287
|
if (combobox.isOpen && ["ArrowLeft", "ArrowRight"].includes(evt.key)) {
|
288
|
-
// @ts-expect-error
|
288
|
+
// @ts-expect-error wrong type
|
289
289
|
evt.nativeEvent.preventDownshiftDefault = true;
|
290
290
|
}
|
291
291
|
if (multiple && creatable && inputValue.trim().length > 0 && separatorKeys !== null && separatorKeys !== void 0 && separatorKeys.includes(evt.key)) {
|
@@ -323,7 +323,7 @@ export var AutoComplete = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
323
323
|
if (oldHideMenu.current !== hideMenu) {
|
324
324
|
var _menuPopper$update2;
|
325
325
|
oldHideMenu.current = hideMenu;
|
326
|
-
(_menuPopper$update2 = menuPopper.update) === null || _menuPopper$update2 === void 0
|
326
|
+
void ((_menuPopper$update2 = menuPopper.update) === null || _menuPopper$update2 === void 0 ? void 0 : _menuPopper$update2.call(menuPopper));
|
327
327
|
}
|
328
328
|
return /*#__PURE__*/_jsx(AutoCompleteProvider, {
|
329
329
|
locale: locale,
|
@@ -331,7 +331,7 @@ export var AutoComplete = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
331
331
|
className: cx(stl(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["flex"]))), className),
|
332
332
|
ref: function ref(el) {
|
333
333
|
setContainerElement(el);
|
334
|
-
// @ts-expect-error
|
334
|
+
// @ts-expect-error - setContainerMeasureRef does accept HTMLDivElement | null
|
335
335
|
setContainerMeasureRef(el);
|
336
336
|
},
|
337
337
|
children: [/*#__PURE__*/_jsxs("div", {
|
@@ -10,10 +10,7 @@ export var DatePickerCalendar = function DatePickerCalendar(props) {
|
|
10
10
|
var curatedProps = Object.fromEntries(Object.entries(props).filter(function (_ref) {
|
11
11
|
var _ref2 = _slicedToArray(_ref, 1),
|
12
12
|
key = _ref2[0];
|
13
|
-
return (
|
14
|
-
// @ts-expect-error
|
15
|
-
!excludedDayPickerPropsList.includes(key)
|
16
|
-
);
|
13
|
+
return !excludedDayPickerPropsList.includes(key);
|
17
14
|
}));
|
18
15
|
|
19
16
|
/**
|
@@ -7,7 +7,7 @@ import { AlertCircleIcon } from "../../Icons";
|
|
7
7
|
import stl from "../../styles/helpers/satellitePrefixer";
|
8
8
|
import { uniqueId } from "../../utils";
|
9
9
|
import { getTextFromReactNode } from "../../utils/getTextFromReactNode";
|
10
|
-
import {
|
10
|
+
import { useForm } from "../Form/useForm";
|
11
11
|
import { DEFAULT_FIELD_STATE, FieldContext } from "./FieldContext";
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
13
13
|
/**
|
@@ -50,12 +50,16 @@ export var Field = function Field(_ref) {
|
|
50
50
|
_useState2 = _slicedToArray(_useState, 2),
|
51
51
|
requiredContext = _useState2[0],
|
52
52
|
setRequiredContext = _useState2[1];
|
53
|
+
var _useState3 = useState(undefined),
|
54
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
55
|
+
elementToFocusContext = _useState4[0],
|
56
|
+
setElementToFocusContext = _useState4[1];
|
53
57
|
if (process.env.NODE_ENV !== "production") {
|
54
58
|
if (typeof requiredProp !== "undefined" && typeof requiredContext !== "undefined" && requiredProp !== requiredContext) {
|
55
59
|
console.warn("The `required` prop is set to different values on both the Field (`required=".concat(requiredProp, "`) and the underlying input component (`required=").concat(requiredContext, "`)."));
|
56
60
|
}
|
57
61
|
}
|
58
|
-
var form =
|
62
|
+
var form = useForm();
|
59
63
|
var addField = form === null || form === void 0 ? void 0 : form.addField;
|
60
64
|
var removeField = form === null || form === void 0 ? void 0 : form.removeField;
|
61
65
|
useEffect(function () {
|
@@ -78,13 +82,19 @@ export var Field = function Field(_ref) {
|
|
78
82
|
labelId: labelId,
|
79
83
|
descriptionId: descriptionId,
|
80
84
|
inputId: labelFor,
|
81
|
-
setRequired: setRequiredContext
|
85
|
+
setRequired: setRequiredContext,
|
86
|
+
setElementToFocus: setElementToFocusContext
|
82
87
|
},
|
83
88
|
children: /*#__PURE__*/_jsxs("div", {
|
84
89
|
className: className,
|
85
90
|
children: [/*#__PURE__*/_jsxs("label", {
|
86
91
|
className: stl(_templateObject || (_templateObject = _taggedTemplateLiteral(["cursor-pointer flex ", ""])), inline ? "items-center" : "flex-col"),
|
87
92
|
htmlFor: labelFor,
|
93
|
+
onClick: function onClick() {
|
94
|
+
if (!(elementToFocusContext !== null && elementToFocusContext !== void 0 && elementToFocusContext.closest("[aria-disabled=true]")) && !(elementToFocusContext !== null && elementToFocusContext !== void 0 && elementToFocusContext.closest("[disabled=true]"))) {
|
95
|
+
elementToFocusContext === null || elementToFocusContext === void 0 || elementToFocusContext.focus();
|
96
|
+
}
|
97
|
+
},
|
88
98
|
children: [hasLabel && /*#__PURE__*/_jsxs("div", {
|
89
99
|
id: labelId,
|
90
100
|
className: stl(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["truncate ", ""])), inline ? "mr-2" : "mb-1"),
|
@@ -13,6 +13,7 @@ export declare type FieldContextValue = {
|
|
13
13
|
descriptionId?: string;
|
14
14
|
inputId?: string;
|
15
15
|
setRequired?: (required?: boolean) => void;
|
16
|
+
setElementToFocus?: (elementToFocus?: HTMLElement) => void;
|
16
17
|
};
|
17
18
|
export declare const DEFAULT_FIELD_STATE: FieldState;
|
18
19
|
export declare const DEFAULT_CONTEXT_VALUE: FieldContextValue;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { FieldContextValue } from "./FieldContext";
|
2
2
|
export declare type UseFieldProps = {
|
3
3
|
required?: boolean;
|
4
|
+
elementToFocus?: HTMLElement;
|
4
5
|
};
|
5
|
-
export declare const useField: ({ required }?: UseFieldProps) => FieldContextValue;
|
6
|
+
export declare const useField: ({ required, elementToFocus }?: UseFieldProps) => FieldContextValue;
|
@@ -1,19 +1,24 @@
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
-
var _excluded = ["setRequired"];
|
3
|
+
var _excluded = ["setRequired", "setElementToFocus"];
|
4
4
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
5
5
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
6
6
|
import { useContext, useEffect } from "react";
|
7
7
|
import { FieldContext } from "./FieldContext";
|
8
8
|
export var useField = function useField() {
|
9
9
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
10
|
-
required = _ref.required
|
10
|
+
required = _ref.required,
|
11
|
+
elementToFocus = _ref.elementToFocus;
|
11
12
|
var _useContext = useContext(FieldContext),
|
12
13
|
setRequired = _useContext.setRequired,
|
14
|
+
setElementToFocus = _useContext.setElementToFocus,
|
13
15
|
contextValue = _objectWithoutProperties(_useContext, _excluded);
|
14
16
|
useEffect(function () {
|
15
17
|
return setRequired === null || setRequired === void 0 ? void 0 : setRequired(required);
|
16
18
|
}, [setRequired, required]);
|
19
|
+
useEffect(function () {
|
20
|
+
return setElementToFocus === null || setElementToFocus === void 0 ? void 0 : setElementToFocus(elementToFocus);
|
21
|
+
}, [setElementToFocus, elementToFocus]);
|
17
22
|
return _objectSpread({
|
18
23
|
setRequired: setRequired
|
19
24
|
}, contextValue);
|
@@ -1,16 +1,18 @@
|
|
1
1
|
import type { FC, HTMLAttributes, ReactNode, VFC } from "react";
|
2
2
|
import type { ButtonProps } from "../../Actions";
|
3
3
|
import type { AlertProps } from "../../Indicators";
|
4
|
-
import type {
|
5
|
-
export interface
|
4
|
+
import type { FormContextField } from "./FormContext";
|
5
|
+
export interface FormProps extends HTMLAttributes<HTMLFormElement> {
|
6
6
|
}
|
7
|
-
export declare type
|
8
|
-
|
7
|
+
export declare type FormLocale = {
|
8
|
+
errorTitle?: (invalidFields: FormContextField[], extraErrors?: string[]) => ReactNode;
|
9
|
+
errorText?: (invalidFields: FormContextField[], extraErrors?: string[]) => ReactNode;
|
9
10
|
};
|
10
|
-
export interface
|
11
|
-
locale?:
|
11
|
+
export interface FormErrorMessageProps extends Omit<AlertProps, "children"> {
|
12
|
+
locale?: FormLocale;
|
13
|
+
extraErrors?: string[];
|
12
14
|
}
|
13
|
-
export declare const
|
14
|
-
export declare const
|
15
|
-
export declare const
|
16
|
-
export declare const
|
15
|
+
export declare const FormErrorMessage: VFC<FormErrorMessageProps>;
|
16
|
+
export declare const Form: FC<FormProps>;
|
17
|
+
export declare const FormSubmit: FC<ButtonProps>;
|
18
|
+
export declare const FormReset: FC<ButtonProps>;
|