@alma-oss/spirit-web-react 4.1.0 → 4.2.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/README.md +2 -1
- package/bundles/web-react.umd.js +765 -419
- package/bundles/web-react.umd.js.map +1 -1
- package/bundles/web-react.umd.min.js +1 -1
- package/bundles/web-react.umd.min.js.map +1 -1
- package/components/Accordion/Accordion.cjs +24 -8
- package/components/Accordion/Accordion.cjs.map +1 -1
- package/components/Accordion/Accordion.d.ts +5 -3
- package/components/Accordion/Accordion.js +2 -0
- package/components/Accordion/Accordion.js.map +1 -1
- package/components/Accordion/AccordionHeader.d.ts +5 -3
- package/components/Accordion/AccordionHeader.js +14 -4
- package/components/Accordion/AccordionHeader.js.map +1 -1
- package/components/Accordion/AccordionItem.d.ts +5 -3
- package/components/Accordion/AccordionItem.js +2 -0
- package/components/Accordion/AccordionItem.js.map +1 -1
- package/components/Accordion/UncontrolledAccordion.d.ts +5 -3
- package/components/Accordion/UncontrolledAccordion.js +3 -1
- package/components/Accordion/UncontrolledAccordion.js.map +1 -1
- package/components/Accordion/useAccordion.d.ts +2 -2
- package/components/Accordion/useAccordion.js.map +1 -1
- package/components/ActionGroup/ActionGroup.cjs +4 -2
- package/components/ActionGroup/ActionGroup.cjs.map +1 -1
- package/components/Avatar/Avatar.js.map +1 -1
- package/components/Button/Button.cjs +49 -12
- package/components/Button/Button.cjs.map +1 -1
- package/components/Button/Button.js.map +1 -1
- package/components/Button/useButtonStyleProps.js +6 -6
- package/components/Button/useButtonStyleProps.js.map +1 -1
- package/components/ButtonLink/ButtonLink.js.map +1 -1
- package/components/ButtonLink/useButtonLinkStyleProps.js +6 -6
- package/components/ButtonLink/useButtonLinkStyleProps.js.map +1 -1
- package/components/Card/CardLink.d.ts +1 -1
- package/components/Card/CardLink.js.map +1 -1
- package/components/Checkbox/Checkbox.cjs +45 -1
- package/components/Checkbox/Checkbox.cjs.map +1 -1
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/useCheckboxStyleProps.js +5 -2
- package/components/Checkbox/useCheckboxStyleProps.js.map +1 -1
- package/components/Collapse/Collapse.cjs +2 -2
- package/components/Collapse/Collapse.cjs.map +1 -1
- package/components/ControlButton/ControlButton.js.map +1 -1
- package/components/ControlButton/useControlButtonStyleProps.js +3 -4
- package/components/ControlButton/useControlButtonStyleProps.js.map +1 -1
- package/components/Drawer/Drawer.cjs +49 -12
- package/components/Drawer/Drawer.cjs.map +1 -1
- package/components/Drawer/DrawerPanel.js.map +1 -1
- package/components/FileUploader/FileUploader.cjs +6 -4
- package/components/FileUploader/FileUploader.cjs.map +1 -1
- package/components/FileUploader/FileUploaderAttachment.js +3 -3
- package/components/FileUploader/FileUploaderAttachment.js.map +1 -1
- package/components/FileUploader/FileUploaderList.js +2 -1
- package/components/FileUploader/FileUploaderList.js.map +1 -1
- package/components/FileUploader/constants.d.ts +1 -0
- package/components/FileUploader/constants.js +1 -0
- package/components/FileUploader/constants.js.map +1 -1
- package/components/FileUploader/useFileUploaderInput.js.map +1 -1
- package/components/Flex/Flex.cjs +4 -2
- package/components/Flex/Flex.cjs.map +1 -1
- package/components/Flex/Flex.d.ts +2 -0
- package/components/Flex/Flex.js +2 -0
- package/components/Flex/Flex.js.map +1 -1
- package/components/Flex/useFlexStyleProps.d.ts +2 -2
- package/components/Footer/Footer.cjs +40 -3
- package/components/Footer/Footer.cjs.map +1 -1
- package/components/Footer/Footer.d.ts +2 -2
- package/components/Footer/Footer.js +5 -3
- package/components/Footer/Footer.js.map +1 -1
- package/components/Footer/useFooterStyleProps.d.ts +2 -2
- package/components/Footer/useFooterStyleProps.js.map +1 -1
- package/components/Grid/Grid.cjs +10 -5
- package/components/Grid/Grid.cjs.map +1 -1
- package/components/Grid/Grid.d.ts +2 -0
- package/components/Grid/Grid.js +2 -0
- package/components/Grid/Grid.js.map +1 -1
- package/components/Grid/GridItem.d.ts +2 -0
- package/components/Grid/GridItem.js +2 -0
- package/components/Grid/GridItem.js.map +1 -1
- package/components/Grid/useGridItemStyleProps.d.ts +2 -2
- package/components/Grid/useGridItemStyleProps.js +6 -5
- package/components/Grid/useGridItemStyleProps.js.map +1 -1
- package/components/Grid/useGridStyleProps.d.ts +2 -2
- package/components/Header/Header.cjs +49 -12
- package/components/Header/Header.cjs.map +1 -1
- package/components/Header/HeaderDialogLink.js.map +1 -1
- package/components/Header/HeaderLink.js.map +1 -1
- package/components/Hidden/Hidden.d.ts +9 -0
- package/components/Hidden/Hidden.js +31 -0
- package/components/Hidden/Hidden.js.map +1 -0
- package/components/Hidden/index.d.ts +1 -0
- package/components/Hidden/index.js +2 -0
- package/components/Hidden/index.js.map +1 -0
- package/components/Icon/Icon.js.map +1 -1
- package/components/Icon/useIconStyleProps.d.ts +10 -10
- package/components/Link/Link.js.map +1 -1
- package/components/Matrix/Matrix.cjs.map +1 -1
- package/components/Matrix/Matrix.js +2 -2
- package/components/Matrix/Matrix.js.map +1 -1
- package/components/Matrix/useMatrixStyleProps.d.ts +1 -1
- package/components/Matrix/useMatrixStyleProps.js.map +1 -1
- package/components/Modal/Modal.cjs +54 -16
- package/components/Modal/Modal.cjs.map +1 -1
- package/components/Modal/ModalCloseButton.js +2 -1
- package/components/Modal/ModalCloseButton.js.map +1 -1
- package/components/Modal/ModalHeader.js +2 -1
- package/components/Modal/ModalHeader.js.map +1 -1
- package/components/Modal/constants.d.ts +1 -0
- package/components/Modal/constants.js +2 -0
- package/components/Modal/constants.js.map +1 -0
- package/components/Modal/useModalDialogStyleProps.js +1 -2
- package/components/Modal/useModalDialogStyleProps.js.map +1 -1
- package/components/Navigation/NavigationAction.js.map +1 -1
- package/components/Navigation/NavigationAvatar.js.map +1 -1
- package/components/Pagination/Pagination.cjs +61 -19
- package/components/Pagination/Pagination.cjs.map +1 -1
- package/components/Pagination/PaginationButtonLink.js +4 -1
- package/components/Pagination/PaginationButtonLink.js.map +1 -1
- package/components/Pagination/PaginationLink.js +4 -2
- package/components/Pagination/PaginationLink.js.map +1 -1
- package/components/Pagination/PaginationLinkNext.js.map +1 -1
- package/components/Pagination/PaginationLinkPrevious.js.map +1 -1
- package/components/Pagination/UncontrolledPagination.js +2 -1
- package/components/Pagination/UncontrolledPagination.js.map +1 -1
- package/components/Pagination/constants.d.ts +1 -0
- package/components/Pagination/constants.js +1 -0
- package/components/Pagination/constants.js.map +1 -1
- package/components/PricingPlan/PricingPlan.cjs +54 -16
- package/components/PricingPlan/PricingPlan.cjs.map +1 -1
- package/components/Radio/Radio.cjs +45 -1
- package/components/Radio/Radio.cjs.map +1 -1
- package/components/Radio/Radio.js.map +1 -1
- package/components/Radio/useRadioStyleProps.js +5 -2
- package/components/Radio/useRadioStyleProps.js.map +1 -1
- package/components/ScrollView/ScrollView.cjs +80 -11
- package/components/ScrollView/ScrollView.cjs.map +1 -1
- package/components/ScrollView/ScrollViewArrows.js +3 -8
- package/components/ScrollView/ScrollViewArrows.js.map +1 -1
- package/components/ScrollView/constants.d.ts +1 -0
- package/components/ScrollView/constants.js +1 -0
- package/components/ScrollView/constants.js.map +1 -1
- package/components/ScrollView/index.d.ts +1 -0
- package/components/ScrollView/index.js +1 -0
- package/components/ScrollView/index.js.map +1 -1
- package/components/ScrollView/useScrollCallback.d.ts +10 -0
- package/components/ScrollView/useScrollCallback.js +41 -0
- package/components/ScrollView/useScrollCallback.js.map +1 -0
- package/components/ScrollView/useScrollPosition.js.map +1 -1
- package/components/SegmentedControl/SegmentedControlContext.js.map +1 -1
- package/components/Select/Select.js.map +1 -1
- package/components/Skeleton/useSkeletonShapeStyleProps.d.ts +10 -10
- package/components/SkipLink/SkipLink.js.map +1 -1
- package/components/Slider/Slider.js.map +1 -1
- package/components/Spinner/Spinner.js.map +1 -1
- package/components/SplitButton/SplitButton.cjs +52 -12
- package/components/SplitButton/SplitButton.cjs.map +1 -1
- package/components/SplitButton/UncontrolledSplitButton.js +2 -0
- package/components/SplitButton/UncontrolledSplitButton.js.map +1 -1
- package/components/SplitButton/constants.d.ts +1 -0
- package/components/SplitButton/constants.js +2 -0
- package/components/SplitButton/constants.js.map +1 -0
- package/components/Tabs/TabContext.js.map +1 -1
- package/components/Tabs/TabLink.js.map +1 -1
- package/components/Tag/Tag.js.map +1 -1
- package/components/TextArea/TextArea.cjs +7 -1
- package/components/TextArea/TextArea.cjs.map +1 -1
- package/components/TextArea/TextArea.js.map +1 -1
- package/components/TextArea/useAdjustHeight.js.map +1 -1
- package/components/TextField/TextField.cjs +7 -1
- package/components/TextField/TextField.cjs.map +1 -1
- package/components/TextField/TextField.js.map +1 -1
- package/components/TextFieldBase/TextFieldBase.cjs +7 -1
- package/components/TextFieldBase/TextFieldBase.cjs.map +1 -1
- package/components/TextFieldBase/TextFieldBase.d.ts +2 -2
- package/components/TextFieldBase/TextFieldBase.js.map +1 -1
- package/components/TextFieldBase/TextFieldBaseInput.js.map +1 -1
- package/components/TextFieldBase/TextFieldBasePasswordToggle.js +5 -1
- package/components/TextFieldBase/TextFieldBasePasswordToggle.js.map +1 -1
- package/components/TextFieldBase/constants.d.ts +2 -0
- package/components/TextFieldBase/constants.js +3 -0
- package/components/TextFieldBase/constants.js.map +1 -0
- package/components/Toast/Toast.cjs +1 -1
- package/components/Toast/Toast.cjs.map +1 -1
- package/components/Toast/ToastBarLink.js.map +1 -1
- package/components/Toast/ToastContext.js +2 -2
- package/components/Toast/ToastContext.js.map +1 -1
- package/components/Toast/UncontrolledToast.js +2 -1
- package/components/Toast/UncontrolledToast.js.map +1 -1
- package/components/Toast/useToastBarStyleProps.d.ts +10 -10
- package/components/Toggle/Toggle.cjs +46 -1
- package/components/Toggle/Toggle.cjs.map +1 -1
- package/components/Toggle/Toggle.js.map +1 -1
- package/components/Toggle/useToggleStyleProps.js +5 -2
- package/components/Toggle/useToggleStyleProps.js.map +1 -1
- package/components/UNSTABLE_Header/UNSTABLE_HeaderLogo.js.map +1 -1
- package/components/components.cjs +441 -285
- package/components/components.cjs.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/constants/constants.cjs +6 -0
- package/constants/constants.cjs.map +1 -1
- package/constants/index.d.ts +1 -0
- package/constants/index.js +1 -0
- package/constants/index.js.map +1 -1
- package/constants/inputs.d.ts +4 -0
- package/constants/inputs.js +5 -0
- package/constants/inputs.js.map +1 -0
- package/hooks/hooks.cjs +48 -7
- package/hooks/hooks.cjs.map +1 -1
- package/hooks/index.d.ts +2 -1
- package/hooks/index.js +2 -1
- package/hooks/index.js.map +1 -1
- package/hooks/useDeprecationMessage.js +2 -2
- package/hooks/useDeprecationMessage.js.map +1 -1
- package/hooks/useInputPositionClass.d.ts +2 -0
- package/hooks/useInputPositionClass.js +8 -0
- package/hooks/useInputPositionClass.js.map +1 -0
- package/hooks/useSymmetry.d.ts +7 -0
- package/hooks/useSymmetry.js +39 -0
- package/hooks/useSymmetry.js.map +1 -0
- package/index.cjs +444 -290
- package/index.cjs.map +1 -1
- package/package.json +11 -18
- package/spirit-web-react.cjs +444 -290
- package/spirit-web-react.cjs.map +1 -1
- package/spirit-web-react.min.cjs +1 -1
- package/types/accordion.d.ts +14 -7
- package/types/box.d.ts +2 -2
- package/types/button.d.ts +2 -2
- package/types/checkbox.d.ts +2 -1
- package/types/controlButton.d.ts +2 -2
- package/types/flex.d.ts +2 -3
- package/types/footer.d.ts +7 -2
- package/types/grid.d.ts +3 -5
- package/types/hidden.d.ts +10 -0
- package/types/hidden.js +2 -0
- package/types/hidden.js.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/index.js.map +1 -1
- package/types/item.d.ts +2 -2
- package/types/pricingPlan.d.ts +1 -1
- package/types/radio.d.ts +2 -1
- package/types/shared/inputs.d.ts +3 -0
- package/types/slider.d.ts +2 -2
- package/types/toggle.d.ts +2 -1
- package/hooks/useDirectionClass.d.ts +0 -2
- package/hooks/useDirectionClass.js +0 -5
- package/hooks/useDirectionClass.js.map +0 -1
package/types/accordion.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ElementType, type ReactNode } from 'react';
|
|
2
|
-
import { type ChildrenProps, type ElementTypeProps, type
|
|
2
|
+
import { type ChildrenProps, type ElementTypeProps, type SpiritPolymorphicElementPropsWithRef, type StyleProps } from './shared';
|
|
3
3
|
export type AccordionOpenStateType = string | string[] | undefined;
|
|
4
4
|
export interface AccordionHandlingProps {
|
|
5
5
|
open: AccordionOpenStateType;
|
|
@@ -8,18 +8,25 @@ export interface AccordionHandlingProps {
|
|
|
8
8
|
export interface AccordionItemContextProps {
|
|
9
9
|
id: string;
|
|
10
10
|
}
|
|
11
|
-
export interface BaseAccordionProps extends ChildrenProps, StyleProps
|
|
11
|
+
export interface BaseAccordionProps extends ChildrenProps, StyleProps {
|
|
12
12
|
}
|
|
13
|
-
export interface
|
|
13
|
+
export interface AccordionBaseProps extends BaseAccordionProps, AccordionHandlingProps {
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type AccordionProps<T extends ElementType> = ElementTypeProps<T> & AccordionBaseProps;
|
|
16
|
+
export type SpiritAccordionProps<T extends ElementType = 'section'> = AccordionProps<T> & SpiritPolymorphicElementPropsWithRef<T, AccordionProps<T>>;
|
|
17
|
+
export type AccordionHeaderProps<T extends ElementType = 'h3'> = ElementTypeProps<T> & {
|
|
16
18
|
slot?: ReactNode;
|
|
19
|
+
} & BaseAccordionProps;
|
|
20
|
+
export type SpiritAccordionHeaderProps<T extends ElementType = 'h3'> = AccordionHeaderProps<T> & SpiritPolymorphicElementPropsWithRef<T, AccordionHeaderProps<T>>;
|
|
21
|
+
export interface AccordionItemBaseProps extends BaseAccordionProps, AccordionItemContextProps {
|
|
17
22
|
}
|
|
18
|
-
export
|
|
19
|
-
|
|
23
|
+
export type AccordionItemProps<T extends ElementType> = ElementTypeProps<T> & AccordionItemBaseProps;
|
|
24
|
+
export type SpiritAccordionItemProps<T extends ElementType = 'article'> = AccordionItemProps<T> & SpiritPolymorphicElementPropsWithRef<T, AccordionItemProps<T>>;
|
|
20
25
|
export interface AccordionContentProps extends BaseAccordionProps {
|
|
21
26
|
}
|
|
22
|
-
export interface
|
|
27
|
+
export interface UncontrolledAccordionBaseProps extends BaseAccordionProps {
|
|
23
28
|
defaultOpen?: AccordionOpenStateType;
|
|
24
29
|
stayOpen?: boolean;
|
|
25
30
|
}
|
|
31
|
+
export type UncontrolledAccordionProps<T extends ElementType> = ElementTypeProps<T> & UncontrolledAccordionBaseProps;
|
|
32
|
+
export type SpiritUncontrolledAccordionProps<T extends ElementType = 'section'> = UncontrolledAccordionProps<T> & SpiritPolymorphicElementPropsWithRef<T, UncontrolledAccordionProps<T>>;
|
package/types/box.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ElementType, type JSXElementConstructor } from 'react';
|
|
2
|
-
import { type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type BackgroundGradientsDictionaryType, type BackgroundNeutralColorsType, type BorderAccentColorsType, type BorderColorsDictionaryType, type BorderEmotionColorsType, type BorderRadiiTokenType, type BorderStylesDictionaryType, type BorderWidthsDictionaryType, type ChildrenProps, type SingleOrResponsive, type SpaceToken, type
|
|
2
|
+
import { type BackgroundAccentColorsType, type BackgroundColorsDictionaryType, type BackgroundEmotionColorsType, type BackgroundGradientsDictionaryType, type BackgroundNeutralColorsType, type BorderAccentColorsType, type BorderColorsDictionaryType, type BorderEmotionColorsType, type BorderRadiiTokenType, type BorderStylesDictionaryType, type BorderWidthsDictionaryType, type ChildrenProps, type SingleOrResponsive, type SpaceToken, type SpiritPolymorphicElementPropsWithRef, type StyleProps, type TextColorProps } from './shared';
|
|
3
3
|
export type BoxBackgroundColorsType = BackgroundColorsDictionaryType | BackgroundAccentColorsType | BackgroundEmotionColorsType | BackgroundNeutralColorsType;
|
|
4
4
|
export interface BoxBaseProps extends ChildrenProps, TextColorProps, StyleProps {
|
|
5
5
|
backgroundColor?: BoxBackgroundColorsType;
|
|
@@ -19,4 +19,4 @@ export interface BoxBaseProps extends ChildrenProps, TextColorProps, StyleProps
|
|
|
19
19
|
export type BoxProps<E extends ElementType> = {
|
|
20
20
|
elementType?: E | JSXElementConstructor<unknown>;
|
|
21
21
|
} & BoxBaseProps;
|
|
22
|
-
export type SpiritBoxProps<E extends ElementType = 'div'> = BoxProps<E> &
|
|
22
|
+
export type SpiritBoxProps<E extends ElementType = 'div'> = BoxProps<E> & SpiritPolymorphicElementPropsWithRef<E, BoxProps<E>>;
|
package/types/button.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ElementType } from 'react';
|
|
2
|
-
import type { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, SizesDictionaryType, StyleProps } from './shared';
|
|
2
|
+
import type { ButtonSizesType, ButtonType, ChildrenProps, ClickEvents, ComponentButtonColorNamesType, EmotionColorNamesType, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
|
|
3
3
|
export type ButtonColor<C> = ComponentButtonColorNamesType<C> | EmotionColorNamesType<C>;
|
|
4
4
|
export type ButtonSize<S> = keyof S extends never ? SizesDictionaryType : ButtonSizesType | S;
|
|
5
5
|
export interface ButtonBaseProps<C = void, S = void> extends ChildrenProps, StyleProps, ClickEvents {
|
|
@@ -7,7 +7,7 @@ export interface ButtonBaseProps<C = void, S = void> extends ChildrenProps, Styl
|
|
|
7
7
|
isDisabled?: boolean;
|
|
8
8
|
isBlock?: boolean;
|
|
9
9
|
isLoading?: boolean;
|
|
10
|
-
isSymmetrical?: boolean
|
|
10
|
+
isSymmetrical?: SingleOrResponsive<boolean>;
|
|
11
11
|
size?: ButtonSize<S>;
|
|
12
12
|
}
|
|
13
13
|
export type ButtonProps<E extends ElementType, C = void, S = void> = {
|
package/types/checkbox.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type LabelProps } from './label';
|
|
3
|
-
import { type ChildrenProps, type HelperTextProps, type InputBaseProps, type ItemProps, type RequiredProps, type SpiritInputElementPropsWithRef, type Validation, type ValidationTextProp } from './shared';
|
|
3
|
+
import { type ChildrenProps, type HelperTextProps, type InputBaseProps, type InputPositionType, type ItemProps, type RequiredProps, type SingleOrResponsive, type SpiritInputElementPropsWithRef, type Validation, type ValidationTextProp } from './shared';
|
|
4
4
|
export type CheckboxElementBaseProps = SpiritInputElementPropsWithRef;
|
|
5
5
|
export interface CheckboxProps extends CheckboxElementBaseProps, ChildrenProps, LabelProps, ItemProps, InputBaseProps, Validation, ValidationTextProp, RequiredProps, HelperTextProps {
|
|
6
6
|
indeterminate?: boolean;
|
|
7
7
|
isChecked?: boolean;
|
|
8
|
+
inputPosition?: SingleOrResponsive<InputPositionType>;
|
|
8
9
|
label: ReactNode;
|
|
9
10
|
}
|
|
10
11
|
export interface SpiritCheckboxProps extends CheckboxProps {
|
package/types/controlButton.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type ComponentPropsWithRef, type ElementType } from 'react';
|
|
2
|
-
import type { ButtonType, ChildrenProps, ClickEvents, SizesDictionaryType, StyleProps } from './shared';
|
|
2
|
+
import type { ButtonType, ChildrenProps, ClickEvents, SingleOrResponsive, SizesDictionaryType, StyleProps } from './shared';
|
|
3
3
|
export type ControlButtonSize<S> = keyof S extends never ? SizesDictionaryType : 'small' | 'medium' | 'large' | S;
|
|
4
4
|
export interface ControlButtonBaseProps<S = void> extends ChildrenProps, StyleProps, ClickEvents {
|
|
5
5
|
isDisabled?: boolean;
|
|
6
6
|
isSubtle?: boolean;
|
|
7
|
-
isSymmetrical?: boolean
|
|
7
|
+
isSymmetrical?: SingleOrResponsive<boolean>;
|
|
8
8
|
size?: ControlButtonSize<S>;
|
|
9
9
|
}
|
|
10
10
|
export type ControlButtonProps<E extends ElementType, S = void> = {
|
package/types/flex.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ElementType, type JSXElementConstructor } from 'react';
|
|
2
|
-
import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type DirectionExtendedDictionaryType, type SingleOrResponsive, type SpaceToken, type
|
|
2
|
+
import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type DirectionExtendedDictionaryType, type SingleOrResponsive, type SpaceToken, type SpiritPolymorphicElementPropsWithRef, type StyleProps } from './shared';
|
|
3
3
|
export interface FlexElementTypeProps<T extends ElementType = 'div'> {
|
|
4
4
|
elementType?: T | JSXElementConstructor<unknown>;
|
|
5
5
|
}
|
|
@@ -27,5 +27,4 @@ export interface FlexCustomLayoutProps {
|
|
|
27
27
|
}
|
|
28
28
|
export interface FlexProps<T extends ElementType = 'div'> extends FlexElementTypeProps<T>, FlexCustomLayoutProps {
|
|
29
29
|
}
|
|
30
|
-
export
|
|
31
|
-
}
|
|
30
|
+
export type SpiritFlexProps<T extends ElementType = 'div'> = FlexProps<T> & ChildrenProps & StyleProps & SpiritPolymorphicElementPropsWithRef<T, FlexProps<T>>;
|
package/types/footer.d.ts
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
import { type BackgroundColorsDictionaryType, type ChildrenProps, type SpaceToken, type SpiritPolymorphicElementPropsWithRef, type StyleProps, type TextAlignmentType } from './shared';
|
|
2
3
|
export interface FooterStyleProps {
|
|
3
4
|
paddingTop?: SpaceToken;
|
|
4
5
|
paddingBottom?: SpaceToken;
|
|
5
6
|
backgroundColor?: BackgroundColorsDictionaryType;
|
|
6
7
|
textAlignment?: TextAlignmentType;
|
|
7
8
|
}
|
|
8
|
-
export interface
|
|
9
|
+
export interface FooterBaseProps extends FooterStyleProps, ChildrenProps, StyleProps {
|
|
9
10
|
}
|
|
11
|
+
export type FooterProps<E extends ElementType> = {
|
|
12
|
+
elementType?: E;
|
|
13
|
+
} & FooterBaseProps;
|
|
14
|
+
export type SpiritFooterProps<E extends ElementType = 'footer'> = FooterProps<E> & SpiritPolymorphicElementPropsWithRef<E, FooterProps<E>>;
|
package/types/grid.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ElementType, type JSXElementConstructor } from 'react';
|
|
2
|
-
import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type GridColumns, type SingleOrResponsive, type SpaceToken, type
|
|
2
|
+
import { type AlignmentXExtendedDictionaryType, type AlignmentYExtendedDictionaryType, type ChildrenProps, type GridColumns, type SingleOrResponsive, type SpaceToken, type SpiritPolymorphicElementPropsWithRef, type StyleProps } from './shared';
|
|
3
3
|
export type GridColsBreakpoints = {
|
|
4
4
|
mobile?: GridColumns;
|
|
5
5
|
tablet?: GridColumns;
|
|
@@ -42,7 +42,5 @@ export interface GridProps<T extends ElementType = 'div'> extends GridElementTyp
|
|
|
42
42
|
}
|
|
43
43
|
export interface GridItemProps<T extends ElementType = 'div'> extends GridItemElementTypeProps<T>, GridItemCustomLayoutProps {
|
|
44
44
|
}
|
|
45
|
-
export
|
|
46
|
-
|
|
47
|
-
export interface SpiritGridItemProps<T extends ElementType = 'div'> extends GridItemProps<T>, ChildrenProps, StyleProps, TransferProps {
|
|
48
|
-
}
|
|
45
|
+
export type SpiritGridProps<T extends ElementType = 'div'> = GridProps<T> & ChildrenProps & StyleProps & SpiritPolymorphicElementPropsWithRef<T, GridProps<T>>;
|
|
46
|
+
export type SpiritGridItemProps<T extends ElementType = 'div'> = GridItemProps<T> & ChildrenProps & StyleProps & SpiritPolymorphicElementPropsWithRef<T, GridItemProps<T>>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ElementType, type JSXElementConstructor } from 'react';
|
|
2
|
+
import { type BreakpointToken, type ChildrenProps, type SpiritPolymorphicElementPropsWithRef, type StyleProps } from './shared';
|
|
3
|
+
export interface HiddenBaseProps extends ChildrenProps, StyleProps {
|
|
4
|
+
from?: BreakpointToken;
|
|
5
|
+
on?: BreakpointToken | BreakpointToken[];
|
|
6
|
+
}
|
|
7
|
+
export type HiddenProps<E extends ElementType> = {
|
|
8
|
+
elementType?: E | JSXElementConstructor<unknown>;
|
|
9
|
+
} & HiddenBaseProps;
|
|
10
|
+
export type SpiritHiddenProps<E extends ElementType = 'span'> = HiddenProps<E> & SpiritPolymorphicElementPropsWithRef<E, HiddenProps<E>>;
|
package/types/hidden.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hidden.js","sourceRoot":"","sources":["../../src/types/hidden.ts"],"names":[],"mappings":""}
|
package/types/index.d.ts
CHANGED
package/types/index.js
CHANGED
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AAC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{ type ElementType, type JSXElementConstructor } from 'react';
|
|
1
|
+
import { type ElementType, type JSXElementConstructor, type ReactNode } from 'react';
|
|
2
2
|
import { type StyleProps, type TransferProps } from './shared';
|
|
3
3
|
export interface AriaItemElementTypeProps<T extends ElementType = 'button'> {
|
|
4
4
|
elementType?: T | JSXElementConstructor<unknown>;
|
|
@@ -12,5 +12,5 @@ export interface SpiritItemProps<T extends ElementType = 'button'> extends AriaI
|
|
|
12
12
|
iconName?: string;
|
|
13
13
|
isDisabled?: boolean;
|
|
14
14
|
isSelected?: boolean;
|
|
15
|
-
label: string |
|
|
15
|
+
label: string | ReactNode;
|
|
16
16
|
}
|
package/types/pricingPlan.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface PricingPlanBaseProps extends ChildrenProps, StyleProps {
|
|
|
7
7
|
}
|
|
8
8
|
export interface PricingPlanHeaderBaseProps extends StyleProps {
|
|
9
9
|
action?: ReactNode;
|
|
10
|
-
badge?:
|
|
10
|
+
badge?: ReactNode;
|
|
11
11
|
note?: string;
|
|
12
12
|
price?: string;
|
|
13
13
|
subtitle?: string;
|
package/types/radio.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type LabelProps } from './label';
|
|
3
|
-
import { type ChildrenProps, type HelperTextProps, type InputBaseProps, type ItemProps, type RequiredProps, type SpiritInputElementPropsWithRef, type Validation } from './shared';
|
|
3
|
+
import { type ChildrenProps, type HelperTextProps, type InputBaseProps, type InputPositionType, type ItemProps, type RequiredProps, type SingleOrResponsive, type SpiritInputElementPropsWithRef, type Validation } from './shared';
|
|
4
4
|
export type RadioElementBaseProps = SpiritInputElementPropsWithRef;
|
|
5
5
|
export interface RadioProps extends RadioElementBaseProps, ChildrenProps, LabelProps, ItemProps, HelperTextProps, InputBaseProps, RequiredProps, Omit<Validation, 'isRequired'> {
|
|
6
|
+
inputPosition?: SingleOrResponsive<InputPositionType>;
|
|
6
7
|
isChecked?: boolean;
|
|
7
8
|
label: ReactNode;
|
|
8
9
|
}
|
package/types/shared/inputs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type AriaRole, type ReactNode } from 'react';
|
|
2
|
+
import { type InputPositions } from '../../constants';
|
|
2
3
|
import { type ValidationStatesDictionaryType } from './dictionaries';
|
|
3
4
|
export type ValidationState = ValidationStatesDictionaryType;
|
|
4
5
|
export type ValidationTextType = ReactNode | ReactNode[];
|
|
@@ -29,3 +30,5 @@ export interface ValidationTextProp {
|
|
|
29
30
|
export interface RequiredProps {
|
|
30
31
|
id: string;
|
|
31
32
|
}
|
|
33
|
+
export type InputPositionKeys = keyof typeof InputPositions;
|
|
34
|
+
export type InputPositionType = (typeof InputPositions)[InputPositionKeys];
|
package/types/slider.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ChangeEvent, type ReactNode } from 'react';
|
|
2
2
|
import { type HelperTextProps, type InputBaseProps, type RequiredProps, type SpiritInputElementPropsWithRef, type StyleProps, type Validation, type ValidationTextType } from './shared';
|
|
3
3
|
export type SliderBaseProps = SpiritInputElementPropsWithRef;
|
|
4
4
|
export interface SliderProps extends SliderBaseProps, HelperTextProps, InputBaseProps, RequiredProps, Validation, StyleProps {
|
|
@@ -7,7 +7,7 @@ export interface SliderProps extends SliderBaseProps, HelperTextProps, InputBase
|
|
|
7
7
|
label: ReactNode;
|
|
8
8
|
max?: number;
|
|
9
9
|
min?: number;
|
|
10
|
-
onChange: (event:
|
|
10
|
+
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
11
11
|
step?: number;
|
|
12
12
|
validationText?: ValidationTextType;
|
|
13
13
|
value: number;
|
package/types/toggle.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type ChangeEvent, type ReactNode } from 'react';
|
|
2
2
|
import { type LabelProps } from './label';
|
|
3
|
-
import { type ChildrenProps, type HelperTextProps, type InputBaseProps, type RequiredProps, type SpiritInputElementPropsWithRef, type StyleProps, type Validation, type ValidationTextType } from './shared';
|
|
3
|
+
import { type ChildrenProps, type HelperTextProps, type InputBaseProps, type InputPositionType, type RequiredProps, type SingleOrResponsive, type SpiritInputElementPropsWithRef, type StyleProps, type Validation, type ValidationTextType } from './shared';
|
|
4
4
|
export type ToggleElementBaseProps = SpiritInputElementPropsWithRef;
|
|
5
5
|
export interface ToggleProps extends ToggleElementBaseProps, ChildrenProps, LabelProps, RequiredProps, InputBaseProps, HelperTextProps, StyleProps, Validation {
|
|
6
6
|
hasIndicators?: boolean;
|
|
7
|
+
inputPosition?: SingleOrResponsive<InputPositionType>;
|
|
7
8
|
isChecked?: boolean;
|
|
8
9
|
isDisabled?: boolean;
|
|
9
10
|
isFluid?: boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDirectionClass.js","sourceRoot":"","sources":["../../src/hooks/useDirectionClass.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,UAAU,iBAAiB,CAAC,cAAsB,EAAE,QAA2B;IACnF,OAAO,4BAA4B,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;AAChE,CAAC"}
|