@commercelayer/app-elements 5.6.0 → 5.7.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/CodeEditorComponent--5lVbv6t.js +720 -0
- package/dist/InputDateComponent-NpCZmpgY.js +4887 -0
- package/dist/RuleEngineComponent-BbIy4caP.js +1404 -0
- package/dist/dictionaries/customers.d.ts +1 -1
- package/dist/dictionaries/orders.d.ts +7 -7
- package/dist/dictionaries/promotions.d.ts +2 -2
- package/dist/dictionaries/returns.d.ts +4 -4
- package/dist/dictionaries/shipments.d.ts +4 -4
- package/dist/dictionaries/stockTransfers.d.ts +4 -4
- package/dist/dictionaries/types.d.ts +2 -2
- package/dist/fetchCoreResourcesSuggestions-DLZhtrDX.js +124 -0
- package/dist/helpers/appsNavigation.d.ts +2 -2
- package/dist/helpers/attachments.d.ts +1 -1
- package/dist/helpers/date.d.ts +13 -13
- package/dist/helpers/downloadJsonAsFile.d.ts +1 -1
- package/dist/helpers/resources.d.ts +4 -4
- package/dist/helpers/tracking.d.ts +4 -4
- package/dist/hooks/useClickAway.d.ts +1 -1
- package/dist/hooks/useEditMetadataOverlay.d.ts +3 -3
- package/dist/hooks/useEditTagsOverlay.d.ts +2 -2
- package/dist/hooks/useIsChanged.d.ts +1 -1
- package/dist/{main-YD7ko8U-.js → main-BqlK85T7.js} +26914 -28733
- package/dist/main.d.ts +60 -60
- package/dist/main.js +1 -1
- package/dist/{parseISO-Cq_loYUP.js → parseISO-B-bk2SyC.js} +17 -17
- package/dist/providers/CoreSdkProvider/CoreSdkProvider.d.ts +1 -1
- package/dist/providers/CoreSdkProvider/makeSdkClient.d.ts +1 -1
- package/dist/providers/CoreSdkProvider/useCoreApi.d.ts +1 -1
- package/dist/providers/GTMProvider.d.ts +1 -1
- package/dist/providers/TokenProvider/MockTokenProvider.d.ts +1 -1
- package/dist/providers/TokenProvider/TokenProvider.d.ts +1 -1
- package/dist/providers/TokenProvider/getAccessTokenFromUrl.d.ts +1 -1
- package/dist/providers/TokenProvider/index.d.ts +1 -1
- package/dist/providers/TokenProvider/reducer.d.ts +2 -2
- package/dist/providers/TokenProvider/storage.d.ts +4 -4
- package/dist/providers/TokenProvider/types.d.ts +10 -10
- package/dist/providers/TokenProvider/url.d.ts +1 -1
- package/dist/providers/TokenProvider/validateToken.d.ts +2 -2
- package/dist/providers/createApp.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind.config.js +141 -142
- package/dist/ui/atoms/A.d.ts +1 -1
- package/dist/ui/atoms/Alert.d.ts +1 -1
- package/dist/ui/atoms/Avatar.d.ts +3 -3
- package/dist/ui/atoms/Avatar.utils.d.ts +18 -18
- package/dist/ui/atoms/AvatarLetter/colors.d.ts +1 -1
- package/dist/ui/atoms/Badge/Badge.d.ts +3 -3
- package/dist/ui/atoms/Badge/badgeVariants.d.ts +1 -1
- package/dist/ui/atoms/ButtonFilter.d.ts +1 -1
- package/dist/ui/atoms/Card.d.ts +15 -11
- package/dist/ui/atoms/CodeBlock.d.ts +1 -1
- package/dist/ui/atoms/EmptyState.d.ts +1 -1
- package/dist/ui/atoms/Grid.d.ts +6 -6
- package/dist/ui/atoms/Hint.d.ts +1 -1
- package/dist/ui/atoms/Hr.d.ts +2 -2
- package/dist/ui/atoms/Icon/Icon.d.ts +2 -2
- package/dist/ui/atoms/Icon/icons.d.ts +1 -1
- package/dist/ui/atoms/PageHeading/PageHeading.d.ts +3 -3
- package/dist/ui/atoms/PageHeading/PageHeadingToolbar.d.ts +2 -2
- package/dist/ui/atoms/Progress.d.ts +1 -1
- package/dist/ui/atoms/RadialProgress.d.ts +2 -2
- package/dist/ui/atoms/Section.d.ts +2 -2
- package/dist/ui/atoms/Skeleton.d.ts +1 -1
- package/dist/ui/atoms/Spacer.d.ts +3 -3
- package/dist/ui/atoms/StatusDot.d.ts +1 -1
- package/dist/ui/atoms/StatusIcon.d.ts +2 -2
- package/dist/ui/atoms/Table/Table.d.ts +1 -1
- package/dist/ui/atoms/Tag.d.ts +3 -3
- package/dist/ui/atoms/Text.d.ts +6 -6
- package/dist/ui/atoms/Tooltip.d.ts +2 -2
- package/dist/ui/composite/ActionButtons/ActionButtons.d.ts +2 -2
- package/dist/ui/composite/Address.d.ts +1 -1
- package/dist/ui/composite/Dropdown/Dropdown.d.ts +1 -1
- package/dist/ui/composite/Dropdown/DropdownItem.d.ts +11 -7
- package/dist/ui/composite/Dropdown/DropdownMenu.d.ts +3 -3
- package/dist/ui/composite/HomePageLayout.d.ts +3 -3
- package/dist/ui/composite/List.d.ts +2 -2
- package/dist/ui/composite/ListDetails.d.ts +2 -2
- package/dist/ui/composite/ListDetailsItem.d.ts +3 -3
- package/dist/ui/composite/ListItem.d.ts +7 -7
- package/dist/ui/composite/PageError.d.ts +2 -2
- package/dist/ui/composite/PageLayout.d.ts +6 -6
- package/dist/ui/composite/Routes/Routes.d.ts +3 -3
- package/dist/ui/composite/Routes/index.d.ts +2 -2
- package/dist/ui/composite/Routes/utils.d.ts +5 -5
- package/dist/ui/composite/SearchBar.d.ts +1 -1
- package/dist/ui/composite/Timeline.d.ts +1 -1
- package/dist/ui/composite/Toast.d.ts +1 -1
- package/dist/ui/composite/Toolbar.d.ts +6 -6
- package/dist/ui/forms/CodeEditor/CodeEditorComponent.d.ts +4 -4
- package/dist/ui/forms/CodeEditor/HookedCodeEditor.d.ts +1 -1
- package/dist/ui/forms/CodeEditor/fetchCoreResourcesSuggestions.d.ts +7 -7
- package/dist/ui/forms/CodeEditor/index.d.ts +1 -1
- package/dist/ui/forms/Input/Input.d.ts +2 -2
- package/dist/ui/forms/InputCheckbox/HookedInputCheckbox.d.ts +1 -1
- package/dist/ui/forms/InputCheckbox/InputCheckbox.d.ts +2 -2
- package/dist/ui/forms/InputCheckbox/index.d.ts +1 -1
- package/dist/ui/forms/InputCheckboxGroup/HookedInputCheckboxGroup.d.ts +1 -1
- package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroupItem.d.ts +2 -2
- package/dist/ui/forms/InputCheckboxGroup/index.d.ts +2 -2
- package/dist/ui/forms/InputCheckboxGroup/reducer.d.ts +3 -3
- package/dist/ui/forms/InputCurrency/HookedInputCurrency.d.ts +1 -1
- package/dist/ui/forms/InputCurrency/InputCurrency.d.ts +3 -3
- package/dist/ui/forms/InputCurrency/index.d.ts +1 -1
- package/dist/ui/forms/InputCurrency/utils.d.ts +1 -1
- package/dist/ui/forms/InputCurrencyRange.d.ts +3 -3
- package/dist/ui/forms/InputDate/HookedInputDate.d.ts +1 -1
- package/dist/ui/forms/InputDateRange/HookedInputDateRange.d.ts +1 -1
- package/dist/ui/forms/InputDateRange/InputDateRange.d.ts +5 -5
- package/dist/ui/forms/InputDateRange/index.d.ts +1 -1
- package/dist/ui/forms/InputFeedback.d.ts +1 -1
- package/dist/ui/forms/InputFile.d.ts +1 -1
- package/dist/ui/forms/InputJson.d.ts +1 -1
- package/dist/ui/forms/InputRadioGroup/HookedInputRadioGroup.d.ts +1 -1
- package/dist/ui/forms/InputRadioGroup/index.d.ts +1 -1
- package/dist/ui/forms/InputResourceGroup/FullList.d.ts +3 -3
- package/dist/ui/forms/InputResourceGroup/HookedInputResourceGroup.d.ts +1 -1
- package/dist/ui/forms/InputResourceGroup/InputResourceGroup.d.ts +1 -1
- package/dist/ui/forms/InputResourceGroup/index.d.ts +2 -2
- package/dist/ui/forms/InputResourceGroup/utils.d.ts +3 -3
- package/dist/ui/forms/InputSelect/CreatableComponent.d.ts +1 -1
- package/dist/ui/forms/InputSelect/GenericAsyncComponent.d.ts +1 -1
- package/dist/ui/forms/InputSelect/HookedInputSelect.d.ts +1 -1
- package/dist/ui/forms/InputSelect/InputSelect.d.ts +1 -1
- package/dist/ui/forms/InputSelect/SelectComponent.d.ts +1 -1
- package/dist/ui/forms/InputSelect/index.d.ts +3 -3
- package/dist/ui/forms/InputSelect/styles.d.ts +1 -1
- package/dist/ui/forms/InputSelect/utils.d.ts +1 -1
- package/dist/ui/forms/InputSimpleSelect/InputSimpleSelect.d.ts +1 -1
- package/dist/ui/forms/InputSimpleSelect/index.d.ts +2 -2
- package/dist/ui/forms/InputSpinner/HookedInputSpinner.d.ts +1 -1
- package/dist/ui/forms/InputSpinner/InputSpinner.d.ts +1 -1
- package/dist/ui/forms/InputSpinner/index.d.ts +1 -1
- package/dist/ui/forms/InputSwitch/InputSwitch.d.ts +1 -1
- package/dist/ui/forms/InputSwitch/index.d.ts +1 -1
- package/dist/ui/forms/InputTextArea/index.d.ts +1 -1
- package/dist/ui/forms/InputToggleButton/HookedInputToggleButton.d.ts +1 -1
- package/dist/ui/forms/InputToggleButton/InputToggleButton.d.ts +4 -4
- package/dist/ui/forms/InputToggleButton/index.d.ts +2 -2
- package/dist/ui/forms/MarketWithCurrencySelector/HookedMarketWithCurrencySelector.d.ts +2 -2
- package/dist/ui/forms/MarketWithCurrencySelector/index.d.ts +1 -1
- package/dist/ui/forms/ReactHookForm/HookedValidationApiError.d.ts +1 -1
- package/dist/ui/forms/ReactHookForm/setApiFormErrors.d.ts +1 -1
- package/dist/ui/forms/ReactHookForm/useValidationFeedback.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/Action/ActionListItem.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/Action/ActionValue.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/Action/index.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/Condition/ArrayMatch.d.ts +0 -0
- package/dist/ui/forms/RuleEngine/Condition/ConditionListItem.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/Condition/ConditionMatcher.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/Condition/ConditionValue.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/Condition/Connector.d.ts +0 -0
- package/dist/ui/forms/RuleEngine/Condition/RangeInputs.d.ts +0 -0
- package/dist/ui/forms/RuleEngine/Condition/ValueComponents/InputArrayMatch.d.ts +2 -2
- package/dist/ui/forms/RuleEngine/Condition/ValueComponents/InputNumberRange.d.ts +2 -2
- package/dist/ui/forms/RuleEngine/Condition/ValueComponents/InputTextRange.d.ts +2 -2
- package/dist/ui/forms/RuleEngine/Condition/dictionaries.d.ts +0 -0
- package/dist/ui/forms/RuleEngine/Condition/index.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/Condition/types.d.ts +0 -0
- package/dist/ui/forms/RuleEngine/Condition/utils.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/RuleEngineComponent.d.ts +4 -4
- package/dist/ui/forms/RuleEngine/RuleEngineContext.d.ts +1 -1
- package/dist/ui/forms/RuleEngine/utils.d.ts +6 -6
- package/dist/ui/internals/FlexRow.d.ts +1 -1
- package/dist/ui/internals/InputWrapper.d.ts +6 -6
- package/dist/ui/internals/InteractiveElement.className.d.ts +4 -4
- package/dist/ui/internals/Overlay.d.ts +1 -1
- package/dist/ui/resources/ResourceAddress/ResourceAddress.d.ts +2 -2
- package/dist/ui/resources/ResourceAddress/ResourceAddressFormFields.d.ts +1 -1
- package/dist/ui/resources/ResourceAddress/index.d.ts +1 -1
- package/dist/ui/resources/ResourceAddress/useResourceAddressOverlay.d.ts +2 -2
- package/dist/ui/resources/ResourceAttachments/index.d.ts +1 -1
- package/dist/ui/resources/ResourceDetails/useEditDetailsOverlay.d.ts +2 -2
- package/dist/ui/resources/ResourceLineItems/index.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/ResourceListItem.d.ts +2 -2
- package/dist/ui/resources/ResourceListItem/ResourceListItem.mocks.d.ts +9 -0
- package/dist/ui/resources/ResourceListItem/index.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/types.d.ts +3 -3
- package/dist/ui/resources/ResourceMetadata/ResourceMetadata.d.ts +2 -2
- package/dist/ui/resources/ResourceMetadata/index.d.ts +1 -1
- package/dist/ui/resources/ResourceOrderTimeline.d.ts +1 -1
- package/dist/ui/resources/ResourcePaymentMethod.d.ts +3 -3
- package/dist/ui/resources/ResourceShipmentParcels.mocks.d.ts +2 -2
- package/dist/ui/resources/ResourceTags.d.ts +3 -3
- package/dist/ui/resources/useResourceFilters/FieldCurrencyRange.d.ts +1 -2
- package/dist/ui/resources/useResourceFilters/FiltersForm.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/FiltersNav.d.ts +1 -2
- package/dist/ui/resources/useResourceFilters/FiltersSearchBar.d.ts +3 -3
- package/dist/ui/resources/useResourceFilters/adaptFormValuesToSdk.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adaptFormValuesToUrlQuery.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adaptSdkToMetrics.d.ts +4 -4
- package/dist/ui/resources/useResourceFilters/adaptSdkToUrlQuery.d.ts +2 -2
- package/dist/ui/resources/useResourceFilters/adaptUrlQueryToFormValues.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adaptUrlQueryToSdk.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adaptUrlQueryToUrlQuery.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/adapters.types.d.ts +8 -8
- package/dist/ui/resources/useResourceFilters/timeUtils.d.ts +1 -1
- package/dist/ui/resources/useResourceFilters/types.d.ts +18 -18
- package/dist/ui/resources/useResourceFilters/useResourceFilters.d.ts +10 -11
- package/dist/ui/resources/useResourceFilters/utils.d.ts +2 -2
- package/dist/ui/resources/useResourceList/adaptMetricsOrderToCore.d.ts +1 -1
- package/dist/ui/resources/useResourceList/index.d.ts +1 -1
- package/dist/ui/resources/useResourceList/infiniteFetcher.d.ts +5 -5
- package/dist/ui/resources/useResourceList/metricsApiClient.d.ts +4 -4
- package/dist/ui/resources/useResourceList/reducer.d.ts +5 -5
- package/dist/ui/resources/useResourceList/useResourceList.d.ts +10 -10
- package/dist/ui/resources/useResourceList/utils.d.ts +1 -1
- package/dist/utils/array.d.ts +1 -1
- package/dist/utils/htmltags.d.ts +1 -1
- package/dist/utils/pagination.d.ts +4 -4
- package/dist/vendor.css +1 -1
- package/package.json +32 -35
- package/dist/CodeEditorComponent-DhpbUF3I.js +0 -739
- package/dist/InputDateComponent-BZyuY3F6.js +0 -4964
- package/dist/RuleEngineComponent-UggkM5Zc.js +0 -1390
- package/dist/fetchCoreResourcesSuggestions-CZkDwjO2.js +0 -126
package/dist/ui/atoms/Hr.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export type HrProps = Omit<React.HTMLProps<HTMLHRElement>,
|
|
1
|
+
export type HrProps = Omit<React.HTMLProps<HTMLHRElement>, "children"> & {
|
|
2
2
|
/**
|
|
3
3
|
* The variant of the horizontal rule.
|
|
4
4
|
* @default solid
|
|
5
5
|
*/
|
|
6
|
-
variant?:
|
|
6
|
+
variant?: "solid" | "dashed";
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* This component wraps an [`<hr>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/hr) HTML element.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
import { iconMapping } from './icons';
|
|
3
|
-
type IconWeight =
|
|
4
|
-
export interface IconProps extends ComponentPropsWithRef<
|
|
3
|
+
type IconWeight = "regular" | "bold" | "light" | "fill";
|
|
4
|
+
export interface IconProps extends ComponentPropsWithRef<"svg"> {
|
|
5
5
|
/**
|
|
6
6
|
* Name of the icon to display
|
|
7
7
|
*/
|
|
@@ -13,14 +13,14 @@ export interface PageHeadingProps {
|
|
|
13
13
|
/**
|
|
14
14
|
* If `true` removes element vertical paddings
|
|
15
15
|
*/
|
|
16
|
-
gap?:
|
|
16
|
+
gap?: "none" | "only-top" | "only-bottom" | "both";
|
|
17
17
|
/**
|
|
18
18
|
* When set, it will render a badge (default as warning variant)
|
|
19
19
|
*/
|
|
20
20
|
badge?: {
|
|
21
21
|
label: string;
|
|
22
22
|
/** @default warning-solid */
|
|
23
|
-
variant?: BadgeProps[
|
|
23
|
+
variant?: BadgeProps["variant"];
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* When set, it will render a navigation (eg: go back) button on the left side of the first row
|
|
@@ -32,7 +32,7 @@ export interface PageHeadingProps {
|
|
|
32
32
|
* Button icon
|
|
33
33
|
* @default arrowLeft
|
|
34
34
|
*/
|
|
35
|
-
icon?:
|
|
35
|
+
icon?: "x" | "arrowLeft";
|
|
36
36
|
};
|
|
37
37
|
/**
|
|
38
38
|
* When set, it will render a proper toolbar on the right side of the first row
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ToolbarItem } from '../../composite/Toolbar';
|
|
2
1
|
import { DropdownItemProps } from '../../composite/Dropdown/DropdownItem';
|
|
3
|
-
|
|
2
|
+
import { ToolbarItem } from '../../composite/Toolbar';
|
|
3
|
+
type ToolbarButton = Omit<ToolbarItem, "dropdownItems">;
|
|
4
4
|
export interface PageHeadingToolbarProps {
|
|
5
5
|
/**
|
|
6
6
|
* Toolbar first level `Button`s.
|
|
@@ -18,7 +18,7 @@ export interface ProgressProps extends React.ProgressHTMLAttributes<HTMLProgress
|
|
|
18
18
|
* - `percentage` - Display the completion status as a percentage
|
|
19
19
|
* - `none` - Do not display the completion
|
|
20
20
|
*/
|
|
21
|
-
displayMode?:
|
|
21
|
+
displayMode?: "fraction" | "percentage" | "none";
|
|
22
22
|
children: React.ReactNode;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
@@ -11,11 +11,11 @@ export interface RadialProgressProps extends SVGAttributes<SVGElement> {
|
|
|
11
11
|
* When missing, default size is 42px, small is 24px
|
|
12
12
|
* @default 'large'
|
|
13
13
|
*/
|
|
14
|
-
size?:
|
|
14
|
+
size?: "small" | "large";
|
|
15
15
|
/**
|
|
16
16
|
* Optional icon to be rendered in the center of the circle
|
|
17
17
|
*/
|
|
18
|
-
icon?: StatusIconProps[
|
|
18
|
+
icon?: StatusIconProps["name"];
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Used to render a radial progress with a pending and a progress state. It also accepts an optional icon to be rendered in the center of the circle.
|
|
@@ -8,9 +8,9 @@ export interface SectionProps {
|
|
|
8
8
|
*/
|
|
9
9
|
title?: ReactNode;
|
|
10
10
|
/** Size for the title prop. */
|
|
11
|
-
titleSize?:
|
|
11
|
+
titleSize?: "normal" | "small";
|
|
12
12
|
/** Specify `none` to remove border. */
|
|
13
|
-
border?:
|
|
13
|
+
border?: "none";
|
|
14
14
|
/** This will render a button on the right side of the row. */
|
|
15
15
|
actionButton?: ReactNode;
|
|
16
16
|
/** CSS classes. */
|
|
@@ -23,7 +23,7 @@ export interface SkeletonItemProps {
|
|
|
23
23
|
/**
|
|
24
24
|
* Can be `box` (default) to render a rectangular shape or `circle`
|
|
25
25
|
*/
|
|
26
|
-
type?:
|
|
26
|
+
type?: "box" | "circle";
|
|
27
27
|
/**
|
|
28
28
|
* CSS dimension for width. It can be number if expressed in pixels or string.
|
|
29
29
|
* Example: `16`, `1rem` or '100%'.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface SpacerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
/**
|
|
4
4
|
* Value to be applied as `margin-top`
|
|
@@ -27,8 +27,8 @@ export interface SpacerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
27
27
|
* 12: 3rem, 48px
|
|
28
28
|
* 14: 3.5rem, 56px
|
|
29
29
|
*/
|
|
30
|
-
type SpacerValues =
|
|
31
|
-
declare function Spacer({ top, bottom, left, right, children, ...rest }: SpacerProps):
|
|
30
|
+
type SpacerValues = "1" | "2" | "4" | "6" | "8" | "10" | "12" | "14";
|
|
31
|
+
declare function Spacer({ top, bottom, left, right, children, ...rest }: SpacerProps): React.ReactNode;
|
|
32
32
|
declare namespace Spacer {
|
|
33
33
|
var displayName: string;
|
|
34
34
|
}
|
|
@@ -7,10 +7,10 @@ export interface StatusIconProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
7
7
|
/**
|
|
8
8
|
* Background color, `none` for no background
|
|
9
9
|
*/
|
|
10
|
-
background?:
|
|
10
|
+
background?: "green" | "orange" | "red" | "gray" | "lightGray" | "teal" | "white" | "black" | "none";
|
|
11
11
|
/**
|
|
12
12
|
* padding around the icon can bne: 'none' | 'small' | 'large'
|
|
13
13
|
*/
|
|
14
|
-
gap?:
|
|
14
|
+
gap?: "none" | "small" | "medium" | "large";
|
|
15
15
|
}
|
|
16
16
|
export declare const StatusIcon: React.FC<StatusIconProps>;
|
package/dist/ui/atoms/Tag.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { FlexRowProps } from '../internals/FlexRow';
|
|
2
1
|
import { FC, JSX } from 'react';
|
|
3
|
-
|
|
2
|
+
import { FlexRowProps } from '../internals/FlexRow';
|
|
3
|
+
type Props = Pick<FlexRowProps, "children"> & {
|
|
4
4
|
/**
|
|
5
5
|
* Icon component
|
|
6
6
|
* Example: `<StatusIcon>` or `<RadialProgress>` or `<Avatar>`
|
|
7
7
|
*/
|
|
8
8
|
icon?: JSX.Element;
|
|
9
9
|
};
|
|
10
|
-
export type TagProps = React.HTMLAttributes<HTMLElement> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>,
|
|
10
|
+
export type TagProps = React.HTMLAttributes<HTMLElement> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "href"> & Props;
|
|
11
11
|
export declare const Tag: FC<TagProps>;
|
|
12
12
|
export {};
|
package/dist/ui/atoms/Text.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { JSX, ReactNode } from 'react';
|
|
2
|
-
type TextVariant =
|
|
3
|
-
type TextSize =
|
|
4
|
-
type TextWeight =
|
|
5
|
-
type TextAlignment =
|
|
6
|
-
type TextWrap =
|
|
2
|
+
type TextVariant = "danger" | "success" | "primary" | "warning" | "info" | "plain" | "disabled";
|
|
3
|
+
type TextSize = "small" | "regular" | "large" | "inherit";
|
|
4
|
+
type TextWeight = "regular" | "medium" | "semibold" | "bold" | "inherit";
|
|
5
|
+
type TextAlignment = "center" | "left" | "right" | "inherit";
|
|
6
|
+
type TextWrap = "normal" | "nowrap" | "inherit";
|
|
7
7
|
export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
variant?: TextVariant;
|
|
@@ -11,7 +11,7 @@ export interface TextProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
11
11
|
weight?: TextWeight;
|
|
12
12
|
align?: TextAlignment;
|
|
13
13
|
wrap?: TextWrap;
|
|
14
|
-
tag?:
|
|
14
|
+
tag?: "div" | "span";
|
|
15
15
|
}
|
|
16
16
|
declare function Text({ children, className, variant, weight, size, align, wrap, tag, ...rest }: TextProps): JSX.Element;
|
|
17
17
|
declare namespace Text {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PlacesType, TooltipRefProps } from 'react-tooltip';
|
|
3
|
-
export {
|
|
3
|
+
export type { TooltipRefProps } from 'react-tooltip';
|
|
4
4
|
export interface TooltipProps {
|
|
5
5
|
/** Tooltip unique identifier */
|
|
6
6
|
id?: string;
|
|
@@ -13,7 +13,7 @@ export interface TooltipProps {
|
|
|
13
13
|
* If the tooltip is too close to the edge of the screen, it will be repositioned automatically.
|
|
14
14
|
* @default 'top'
|
|
15
15
|
*/
|
|
16
|
-
direction?: Extract<PlacesType,
|
|
16
|
+
direction?: Extract<PlacesType, "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end">;
|
|
17
17
|
/**
|
|
18
18
|
* If true, the tooltip will have a fixed width of 280px.
|
|
19
19
|
* If false or undefined, the tooltip will have a max-width of 280px and no minimum width.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ButtonProps } from '../../atoms/Button';
|
|
2
1
|
import { MouseEventHandler } from 'react';
|
|
2
|
+
import { ButtonProps } from '../../atoms/Button';
|
|
3
3
|
export interface ActionButtonsProps {
|
|
4
4
|
actions: Array<{
|
|
5
5
|
label: string;
|
|
6
6
|
onClick: MouseEventHandler<HTMLButtonElement>;
|
|
7
|
-
variant?: ButtonProps[
|
|
7
|
+
variant?: ButtonProps["variant"];
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
@@ -3,7 +3,7 @@ export interface AddressProps {
|
|
|
3
3
|
/**
|
|
4
4
|
* The address to be visualized
|
|
5
5
|
*/
|
|
6
|
-
address?: Pick<AddressType,
|
|
6
|
+
address?: Pick<AddressType, "first_name" | "last_name" | "company" | "line_1" | "line_2" | "city" | "state_code" | "zip_code" | "country_code" | "billing_info" | "phone" | "notes"> | null;
|
|
7
7
|
/**
|
|
8
8
|
* Optional address title (if added it will be shown in bold on top of address infos)
|
|
9
9
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DropdownMenuProps } from './DropdownMenu';
|
|
2
|
-
export interface DropdownProps extends Pick<DropdownMenuProps,
|
|
2
|
+
export interface DropdownProps extends Pick<DropdownMenuProps, "menuHeader" | "menuPosition" | "menuWidth"> {
|
|
3
3
|
/** The trigger for the dropdown menu. Can be a JSX Element or simply a `string`. */
|
|
4
4
|
dropdownLabel?: React.ReactNode;
|
|
5
5
|
/** List of links and actions. You can use a combination of `DropdownItem` and `DropdownDivider` components. */
|
|
@@ -2,7 +2,7 @@ import { IconProps } from '../../atoms/Icon/Icon';
|
|
|
2
2
|
export type DropdownItemProps = React.HTMLAttributes<HTMLElement> & {
|
|
3
3
|
label: string;
|
|
4
4
|
info?: string;
|
|
5
|
-
icon?: IconProps[
|
|
5
|
+
icon?: IconProps["name"] | "keep-space";
|
|
6
6
|
} & ({
|
|
7
7
|
/**
|
|
8
8
|
* render the component as anchor tag
|
|
@@ -72,6 +72,8 @@ export declare const DropdownItem: import('../../atoms/SkeletonTemplate').Skelet
|
|
|
72
72
|
inert?: boolean | undefined | undefined;
|
|
73
73
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
74
74
|
is?: string | undefined | undefined;
|
|
75
|
+
exportparts?: string | undefined | undefined;
|
|
76
|
+
part?: string | undefined | undefined;
|
|
75
77
|
children?: import('react').ReactNode | Iterable<import('react').ReactNode>;
|
|
76
78
|
'data-tooltip-id'?: string | undefined;
|
|
77
79
|
'data-tooltip-place'?: import('react-tooltip').PlacesType | undefined;
|
|
@@ -161,7 +163,7 @@ export declare const DropdownItem: import('../../atoms/SkeletonTemplate').Skelet
|
|
|
161
163
|
onBlurCapture?: import('react').FocusEventHandler<HTMLElement> | undefined;
|
|
162
164
|
onChange?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
163
165
|
onChangeCapture?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
164
|
-
onBeforeInput?: import('react').
|
|
166
|
+
onBeforeInput?: import('react').InputEventHandler<HTMLElement> | undefined;
|
|
165
167
|
onBeforeInputCapture?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
166
168
|
onInput?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
167
169
|
onInputCapture?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
@@ -211,8 +213,6 @@ export declare const DropdownItem: import('../../atoms/SkeletonTemplate').Skelet
|
|
|
211
213
|
onProgressCapture?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
212
214
|
onRateChange?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
213
215
|
onRateChangeCapture?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
214
|
-
onResize?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
215
|
-
onResizeCapture?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
216
216
|
onSeeked?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
217
217
|
onSeekedCapture?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
218
218
|
onSeeking?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
@@ -293,6 +293,8 @@ export declare const DropdownItem: import('../../atoms/SkeletonTemplate').Skelet
|
|
|
293
293
|
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLElement> | undefined;
|
|
294
294
|
onScroll?: import('react').UIEventHandler<HTMLElement> | undefined;
|
|
295
295
|
onScrollCapture?: import('react').UIEventHandler<HTMLElement> | undefined;
|
|
296
|
+
onScrollEnd?: import('react').UIEventHandler<HTMLElement> | undefined;
|
|
297
|
+
onScrollEndCapture?: import('react').UIEventHandler<HTMLElement> | undefined;
|
|
296
298
|
onWheel?: import('react').WheelEventHandler<HTMLElement> | undefined;
|
|
297
299
|
onWheelCapture?: import('react').WheelEventHandler<HTMLElement> | undefined;
|
|
298
300
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLElement> | undefined;
|
|
@@ -372,6 +374,8 @@ export declare const DropdownItem: import('../../atoms/SkeletonTemplate').Skelet
|
|
|
372
374
|
inert?: boolean | undefined | undefined;
|
|
373
375
|
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
374
376
|
is?: string | undefined | undefined;
|
|
377
|
+
exportparts?: string | undefined | undefined;
|
|
378
|
+
part?: string | undefined | undefined;
|
|
375
379
|
children?: import('react').ReactNode | Iterable<import('react').ReactNode>;
|
|
376
380
|
'data-tooltip-id'?: string | undefined;
|
|
377
381
|
'data-tooltip-place'?: import('react-tooltip').PlacesType | undefined;
|
|
@@ -461,7 +465,7 @@ export declare const DropdownItem: import('../../atoms/SkeletonTemplate').Skelet
|
|
|
461
465
|
onBlurCapture?: import('react').FocusEventHandler<HTMLElement> | undefined;
|
|
462
466
|
onChange?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
463
467
|
onChangeCapture?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
464
|
-
onBeforeInput?: import('react').
|
|
468
|
+
onBeforeInput?: import('react').InputEventHandler<HTMLElement> | undefined;
|
|
465
469
|
onBeforeInputCapture?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
466
470
|
onInput?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
467
471
|
onInputCapture?: import('react').FormEventHandler<HTMLElement> | undefined;
|
|
@@ -511,8 +515,6 @@ export declare const DropdownItem: import('../../atoms/SkeletonTemplate').Skelet
|
|
|
511
515
|
onProgressCapture?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
512
516
|
onRateChange?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
513
517
|
onRateChangeCapture?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
514
|
-
onResize?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
515
|
-
onResizeCapture?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
516
518
|
onSeeked?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
517
519
|
onSeekedCapture?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
518
520
|
onSeeking?: import('react').ReactEventHandler<HTMLElement> | undefined;
|
|
@@ -593,6 +595,8 @@ export declare const DropdownItem: import('../../atoms/SkeletonTemplate').Skelet
|
|
|
593
595
|
onLostPointerCaptureCapture?: import('react').PointerEventHandler<HTMLElement> | undefined;
|
|
594
596
|
onScroll?: import('react').UIEventHandler<HTMLElement> | undefined;
|
|
595
597
|
onScrollCapture?: import('react').UIEventHandler<HTMLElement> | undefined;
|
|
598
|
+
onScrollEnd?: import('react').UIEventHandler<HTMLElement> | undefined;
|
|
599
|
+
onScrollEndCapture?: import('react').UIEventHandler<HTMLElement> | undefined;
|
|
596
600
|
onWheel?: import('react').WheelEventHandler<HTMLElement> | undefined;
|
|
597
601
|
onWheelCapture?: import('react').WheelEventHandler<HTMLElement> | undefined;
|
|
598
602
|
onAnimationStart?: import('react').AnimationEventHandler<HTMLElement> | undefined;
|
|
@@ -3,14 +3,14 @@ export interface DropdownMenuProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
3
3
|
/** Menu content */
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
/** Set to `none` to hide the top arrow */
|
|
6
|
-
arrow?:
|
|
6
|
+
arrow?: "none";
|
|
7
7
|
/** Optional header for the dropdown menu */
|
|
8
8
|
menuHeader?: string;
|
|
9
9
|
/**
|
|
10
10
|
* Opening position of the dropdown menu
|
|
11
11
|
* @default bottom-right
|
|
12
12
|
*/
|
|
13
|
-
menuPosition?:
|
|
13
|
+
menuPosition?: "bottom-left" | "bottom-right" | "top-left" | "top-right";
|
|
14
14
|
/**
|
|
15
15
|
* If set, the arrow will be centered when trigger button is smaller than 50px
|
|
16
16
|
* Otherwise it will fallback to a default centering based on 32px trigger button
|
|
@@ -20,6 +20,6 @@ export interface DropdownMenuProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
20
20
|
* Set a wider menu, fixed to 280px.
|
|
21
21
|
* By default, when no width is set, the menu adjusts its width dynamically to accommodate content, within a range of 150px to 250px.
|
|
22
22
|
**/
|
|
23
|
-
menuWidth?:
|
|
23
|
+
menuWidth?: "wide";
|
|
24
24
|
}
|
|
25
25
|
export declare const DropdownMenu: FC<DropdownMenuProps>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { JSX, ReactNode } from 'react';
|
|
1
2
|
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
2
3
|
import { PageHeadingToolbarProps } from '../atoms/PageHeading/PageHeadingToolbar';
|
|
3
|
-
|
|
4
|
-
export interface HomePageLayoutProps extends Pick<PageHeadingProps, 'title'> {
|
|
4
|
+
export interface HomePageLayoutProps extends Pick<PageHeadingProps, "title"> {
|
|
5
5
|
/**
|
|
6
6
|
* Page content
|
|
7
7
|
*/
|
|
@@ -15,7 +15,7 @@ export interface HomePageLayoutProps extends Pick<PageHeadingProps, 'title'> {
|
|
|
15
15
|
* This component renders a standard `PageLayout` but holds some logic
|
|
16
16
|
* to define some default behavior for the home page, such as the navigation button label and action.
|
|
17
17
|
*/
|
|
18
|
-
export declare function HomePageLayout({ title, children, toolbar }: HomePageLayoutProps): JSX.Element;
|
|
18
|
+
export declare function HomePageLayout({ title, children, toolbar, }: HomePageLayoutProps): JSX.Element;
|
|
19
19
|
export declare namespace HomePageLayout {
|
|
20
20
|
var displayName: string;
|
|
21
21
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PaginationProps } from '../atoms/Pagination';
|
|
2
1
|
import { JSX, ReactNode } from 'react';
|
|
2
|
+
import { PaginationProps } from '../atoms/Pagination';
|
|
3
3
|
type ListPagination = {
|
|
4
4
|
recordsPerPage: number;
|
|
5
5
|
recordCount: number;
|
|
6
|
-
} & Omit<PaginationProps,
|
|
6
|
+
} & Omit<PaginationProps, "className" | "isDisabled">;
|
|
7
7
|
export interface ListProps {
|
|
8
8
|
/**
|
|
9
9
|
* List name displayed in the heading
|
|
@@ -15,7 +15,7 @@ export interface ListDetailsProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* Font size
|
|
17
17
|
*/
|
|
18
|
-
fontSize?:
|
|
18
|
+
fontSize?: "normal" | "small";
|
|
19
19
|
/**
|
|
20
20
|
* Show skeleton when this is `true`
|
|
21
21
|
*/
|
|
@@ -25,7 +25,7 @@ export interface ListDetailsProps {
|
|
|
25
25
|
*/
|
|
26
26
|
loadingLines?: number;
|
|
27
27
|
}
|
|
28
|
-
declare function ListDetails({ title, children, fontSize, isLoading, loadingLines, className }: ListDetailsProps): JSX.Element;
|
|
28
|
+
declare function ListDetails({ title, children, fontSize, isLoading, loadingLines, className, }: ListDetailsProps): JSX.Element;
|
|
29
29
|
declare namespace ListDetails {
|
|
30
30
|
var displayName: string;
|
|
31
31
|
}
|
|
@@ -17,15 +17,15 @@ export interface ListDetailsItemProps {
|
|
|
17
17
|
/**
|
|
18
18
|
* Specify `none` to remove border
|
|
19
19
|
*/
|
|
20
|
-
border?:
|
|
20
|
+
border?: "none";
|
|
21
21
|
/**
|
|
22
22
|
* Text alignment for children on the right side.
|
|
23
23
|
*/
|
|
24
|
-
childrenAlign?:
|
|
24
|
+
childrenAlign?: "left" | "right";
|
|
25
25
|
/**
|
|
26
26
|
* Specify `none` to remove side gutter
|
|
27
27
|
*/
|
|
28
|
-
gutter?:
|
|
28
|
+
gutter?: "none";
|
|
29
29
|
}
|
|
30
30
|
export declare function ListDetailsItem({ label, children, isLoading, border, gutter, childrenAlign, ...rest }: ListDetailsItemProps): JSX.Element;
|
|
31
31
|
export declare namespace ListDetailsItem {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { FlexRowProps } from '../internals/FlexRow';
|
|
2
1
|
import { FC, JSX } from 'react';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { FlexRowProps } from '../internals/FlexRow';
|
|
3
|
+
type ListItemVariant = "list" | "boxed";
|
|
4
|
+
export type ListItemProps = React.HTMLAttributes<HTMLElement> & Pick<FlexRowProps, "alignItems" | "children"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "href"> & {
|
|
5
5
|
/**
|
|
6
6
|
* Icon component
|
|
7
7
|
* Example: `<StatusIcon>` or `<RadialProgress>` or `<Avatar>`
|
|
@@ -11,7 +11,7 @@ export type ListItemProps = React.HTMLAttributes<HTMLElement> & Pick<FlexRowProp
|
|
|
11
11
|
* Icon alignment
|
|
12
12
|
* @default 'top'
|
|
13
13
|
*/
|
|
14
|
-
alignIcon?:
|
|
14
|
+
alignIcon?: "top" | "center" | "bottom";
|
|
15
15
|
/**
|
|
16
16
|
* Control the horizontal padding (`x`) or vertical padding (`y`).
|
|
17
17
|
* You can specify `none` to remove the padding.
|
|
@@ -19,17 +19,17 @@ export type ListItemProps = React.HTMLAttributes<HTMLElement> & Pick<FlexRowProp
|
|
|
19
19
|
* By default, the padding is set to `y` when the ListItem is a **not** clickable list, `xy` otherwise.
|
|
20
20
|
* @default 'xy'
|
|
21
21
|
*/
|
|
22
|
-
padding?:
|
|
22
|
+
padding?: "xy" | "x" | "y" | "none";
|
|
23
23
|
/**
|
|
24
24
|
* Control the padding size.
|
|
25
25
|
* @default '4'
|
|
26
26
|
*/
|
|
27
|
-
paddingSize?:
|
|
27
|
+
paddingSize?: "6" | "4" | "2";
|
|
28
28
|
/**
|
|
29
29
|
* Border style to render
|
|
30
30
|
* @default 'solid'
|
|
31
31
|
*/
|
|
32
|
-
borderStyle?:
|
|
32
|
+
borderStyle?: "solid" | "dashed" | "none";
|
|
33
33
|
/**
|
|
34
34
|
* ListItem variant: 'list' or 'boxed' with rounded borders
|
|
35
35
|
* @default 'list'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
2
1
|
import { JSX } from 'react';
|
|
3
|
-
|
|
2
|
+
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
3
|
+
export interface PageErrorProps extends Pick<PageHeadingProps, "navigationButton"> {
|
|
4
4
|
/**
|
|
5
5
|
* Main page title wrapped in a h1 element
|
|
6
6
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { ContainerProps } from '../atoms/Container';
|
|
2
3
|
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
3
4
|
import { OverlayProps } from '../internals/Overlay';
|
|
4
|
-
|
|
5
|
-
export type PageLayoutProps = Pick<PageHeadingProps, 'title' | 'description' | 'navigationButton' | 'toolbar' | 'gap'> & Pick<ContainerProps, 'minHeight'> & {
|
|
5
|
+
export type PageLayoutProps = Pick<PageHeadingProps, "title" | "description" | "navigationButton" | "toolbar" | "gap"> & Pick<ContainerProps, "minHeight"> & {
|
|
6
6
|
/**
|
|
7
7
|
* Page content
|
|
8
8
|
*/
|
|
@@ -11,7 +11,7 @@ export type PageLayoutProps = Pick<PageHeadingProps, 'title' | 'description' | '
|
|
|
11
11
|
* When mode is `test`, it will render a `TEST DATA` Badge to inform user api is working in test mode.
|
|
12
12
|
* Only if app is standalone mode.
|
|
13
13
|
*/
|
|
14
|
-
mode?:
|
|
14
|
+
mode?: "test" | "live";
|
|
15
15
|
/**
|
|
16
16
|
* Optional prop to enable scroll to top behavior on location change
|
|
17
17
|
*/
|
|
@@ -26,13 +26,13 @@ export type PageLayoutProps = Pick<PageHeadingProps, 'title' | 'description' | '
|
|
|
26
26
|
/**
|
|
27
27
|
* Footer element to be rendered at the bottom of the overlay.
|
|
28
28
|
**/
|
|
29
|
-
overlayFooter?: OverlayProps[
|
|
29
|
+
overlayFooter?: OverlayProps["footer"];
|
|
30
30
|
});
|
|
31
31
|
export declare const PageLayout: import('../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
32
|
-
description?: ReactNode;
|
|
33
32
|
title: ReactNode;
|
|
34
33
|
toolbar?: import('../atoms/PageHeading/PageHeadingToolbar').PageHeadingToolbarProps | undefined;
|
|
35
34
|
gap?: "none" | "only-top" | "only-bottom" | "both" | undefined;
|
|
35
|
+
description?: ReactNode;
|
|
36
36
|
navigationButton?: {
|
|
37
37
|
label: string;
|
|
38
38
|
onClick: () => void;
|
|
@@ -50,10 +50,10 @@ export declare const PageLayout: import('../atoms/SkeletonTemplate').SkeletonTem
|
|
|
50
50
|
delayMs?: number | undefined;
|
|
51
51
|
isLoading?: boolean | undefined;
|
|
52
52
|
} | {
|
|
53
|
-
description?: ReactNode;
|
|
54
53
|
title: ReactNode;
|
|
55
54
|
toolbar?: import('../atoms/PageHeading/PageHeadingToolbar').PageHeadingToolbarProps | undefined;
|
|
56
55
|
gap?: "none" | "only-top" | "only-bottom" | "both" | undefined;
|
|
56
|
+
description?: ReactNode;
|
|
57
57
|
navigationButton?: {
|
|
58
58
|
label: string;
|
|
59
59
|
onClick: () => void;
|
|
@@ -31,7 +31,7 @@ import { GetParams } from './utils';
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function Routes<T extends Record<string, {
|
|
33
33
|
path: string;
|
|
34
|
-
}>>({ routes, list }: {
|
|
34
|
+
}>>({ routes, list, }: {
|
|
35
35
|
/** Object of available app routes build using the `createRoute` helper method */
|
|
36
36
|
routes: T;
|
|
37
37
|
/**
|
|
@@ -47,14 +47,14 @@ export declare function Routes<T extends Record<string, {
|
|
|
47
47
|
};
|
|
48
48
|
};
|
|
49
49
|
}): JSX.Element;
|
|
50
|
-
export declare function LoadingPage({ overlay }: {
|
|
50
|
+
export declare function LoadingPage({ overlay, }: {
|
|
51
51
|
overlay?: boolean;
|
|
52
52
|
}): JSX.Element;
|
|
53
53
|
/**
|
|
54
54
|
* This component can be used as error component when the resource is not found by passing the resource type.
|
|
55
55
|
* When empty it will render a generic page not found message.
|
|
56
56
|
*/
|
|
57
|
-
export declare function GenericPageNotFound({ resource }: {
|
|
57
|
+
export declare function GenericPageNotFound({ resource, }: {
|
|
58
58
|
resource?: ListableResourceType;
|
|
59
59
|
}): JSX.Element;
|
|
60
60
|
/**
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { GenericPageNotFound, LoadingPage,
|
|
2
|
-
export { createRoute, createTypedRoute, type GetParams, type Route } from './utils';
|
|
1
|
+
export { GenericPageNotFound, LoadingPage, type PageProps, Routes, } from './Routes';
|
|
2
|
+
export { createRoute, createTypedRoute, type GetParams, type Route, } from './utils';
|
|
@@ -53,7 +53,7 @@ export declare const createTypedRoute: <Parameters extends Record<string, any>>(
|
|
|
53
53
|
export type GetParams<R extends {
|
|
54
54
|
makePath: (...arg: any[]) => string;
|
|
55
55
|
}> = {
|
|
56
|
-
[K in keyof Parameters<R[
|
|
56
|
+
[K in keyof Parameters<R["makePath"]>[0]]: Exclude<ToLiteral<Parameters<R["makePath"]>[0][K]>, "undefined" | "null">;
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
59
|
* Cast a valid `string | number | bigint | boolean | null | undefined` to literal.
|
|
@@ -66,7 +66,7 @@ export type GetParams<R extends {
|
|
|
66
66
|
*/
|
|
67
67
|
type ToLiteral<V extends string | number | bigint | boolean | null | undefined> = `${V}`;
|
|
68
68
|
export interface Route<Path extends `/${string}/` | `/`, Parameters extends Record<string, unknown> = ExtractParameters<Path>> {
|
|
69
|
-
path: Path extends `/${infer P}/` ? `/${P}` :
|
|
69
|
+
path: Path extends `/${infer P}/` ? `/${P}` : "/";
|
|
70
70
|
makePath: (parameters: Parameters, searchParams?: string | URLSearchParams) => string;
|
|
71
71
|
}
|
|
72
72
|
type ExtractParameters<Path extends string> = Path extends `${string}:${infer Var}/${infer Rest}` ? Simplify<FixOptional<{
|
|
@@ -76,9 +76,9 @@ type FixOptional<T extends Record<string, any>> = Omit<T, `${string}?`> & {
|
|
|
76
76
|
[K in keyof T as K extends `${infer VariableName}?` ? VariableName : never]?: T[K];
|
|
77
77
|
};
|
|
78
78
|
type ErrorParameters<Parameters extends Record<string, any>, Path extends string> = keyof ({
|
|
79
|
-
[key in keyof ExtractParameters<Path> as key extends keyof Parameters ? never : undefined extends ExtractParameters<Path>[key] ? key extends string ? `${key}?` : key : key]-?:
|
|
79
|
+
[key in keyof ExtractParameters<Path> as key extends keyof Parameters ? never : undefined extends ExtractParameters<Path>[key] ? key extends string ? `${key}?` : key : key]-?: "Is not properly set.";
|
|
80
80
|
} & {
|
|
81
|
-
[key in keyof Parameters as key extends string ? Path extends `${string}/:${key}${undefined extends Parameters[key] ?
|
|
81
|
+
[key in keyof Parameters as key extends string ? Path extends `${string}/:${key}${undefined extends Parameters[key] ? "?" : ""}/${string}` ? never : undefined extends Parameters[key] ? `${key}?` : key : never]-?: "Is not properly set.";
|
|
82
82
|
});
|
|
83
|
-
type ValidPath<Parameters extends Record<string, any>, Path extends string> = ErrorParameters<Parameters, Path> extends never ? Path : `Missing variable '${ErrorParameters<Parameters, Path> extends string ? ErrorParameters<Parameters, Path> :
|
|
83
|
+
type ValidPath<Parameters extends Record<string, any>, Path extends string> = ErrorParameters<Parameters, Path> extends never ? Path : `Missing variable '${ErrorParameters<Parameters, Path> extends string ? ErrorParameters<Parameters, Path> : "unknown"}'`;
|
|
84
84
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SkeletonTemplateProps } from '../atoms/SkeletonTemplate';
|
|
2
|
-
export interface SearchBarProps extends Pick<SkeletonTemplateProps,
|
|
2
|
+
export interface SearchBarProps extends Pick<SkeletonTemplateProps, "isLoading" | "delayMs"> {
|
|
3
3
|
/**
|
|
4
4
|
* Initial value of the search bar. When changed, the search bar will be updated.
|
|
5
5
|
*/
|