@dynamic-framework/ui-react 2.5.2 → 2.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/README.md +4 -0
- package/dist/css/dynamic-ui.css +44 -12
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +538 -100
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +541 -97
- package/dist/index.js.map +1 -1
- package/dist/types/components/DAlert/DAlert.d.ts +1 -1
- package/dist/types/components/DAvatar/DAvatar.d.ts +2 -1
- package/dist/types/components/DBadge/DBadge.d.ts +2 -1
- package/dist/types/components/DBox/DBox.d.ts +1 -1
- package/dist/types/components/DBoxFile/DBoxFile.d.ts +1 -1
- package/dist/types/components/DButtonIcon/DButtonIcon.d.ts +1 -1
- package/dist/types/components/DCard/DCard.d.ts +1 -1
- package/dist/types/components/DCard/components/DCardBody.d.ts +1 -1
- package/dist/types/components/DCard/components/DCardFooter.d.ts +1 -1
- package/dist/types/components/DCard/components/DCardHeader.d.ts +1 -1
- package/dist/types/components/DCarousel/DCarousel.d.ts +9 -2
- package/dist/types/components/DCarousel/components/DCarouselSlide.d.ts +1 -1
- package/dist/types/components/DChip/DChip.d.ts +2 -1
- package/dist/types/components/DCollapse/DCollapse.d.ts +1 -1
- package/dist/types/components/DConfirmModal/DConfirmModalContainer.d.ts +21 -0
- package/dist/types/components/DConfirmModal/DConfirmModalUI.d.ts +7 -0
- package/dist/types/components/DConfirmModal/confirmModalStore.d.ts +6 -0
- package/dist/types/components/DConfirmModal/types.d.ts +45 -0
- package/dist/types/components/DCreditCard/DCreditCard.d.ts +2 -1
- package/dist/types/components/DCurrencyText/DCurrencyText.d.ts +2 -1
- package/dist/types/components/DDataStateWrapper/DDataStateWrapper.d.ts +8 -1
- package/dist/types/components/DDataStateWrapper/components/EmptyState.d.ts +2 -1
- package/dist/types/components/DDataStateWrapper/components/ErrorState.d.ts +2 -1
- package/dist/types/components/DDataStateWrapper/components/LoadingState.d.ts +2 -1
- package/dist/types/components/DDataStateWrapper/index.d.ts +4 -0
- package/dist/types/components/DDatePicker/DDatePicker.d.ts +2 -1
- package/dist/types/components/DDatePicker/components/DDatePickerHeaderSelector.d.ts +1 -1
- package/dist/types/components/DDatePicker/components/DDatePickerTime.d.ts +1 -1
- package/dist/types/components/DDropdown/DDropdown.d.ts +4 -1
- package/dist/types/components/DErrorBoundary/DErrorBoundary.d.ts +1 -1
- package/dist/types/components/DErrorBoundary/components/DefaultErrorBoundary.d.ts +2 -1
- package/dist/types/components/DIcon/DIcon.d.ts +4 -4
- package/dist/types/components/DIconBase/DIconBase.d.ts +5 -3
- package/dist/types/components/DIconBase/index.d.ts +1 -0
- package/dist/types/components/DInputCheck/DInputCheck.d.ts +1 -1
- package/dist/types/components/DInputPin/DInputPin.d.ts +2 -1
- package/dist/types/components/DInputSearch/DInputSearch.d.ts +11 -0
- package/dist/types/components/DInputSearch/index.d.ts +3 -0
- package/dist/types/components/DInputSelect/DInputSelect.d.ts +1 -1
- package/dist/types/components/DInputSwitch/DInputSwitch.d.ts +2 -1
- package/dist/types/components/DLayout/DLayout.d.ts +1 -1
- package/dist/types/components/DLayout/components/DLayoutPane.d.ts +1 -1
- package/dist/types/components/DListGroup/DListGroup.d.ts +1 -1
- package/dist/types/components/DListGroup/components/DListGroupItem.d.ts +1 -1
- package/dist/types/components/DModal/DModal.d.ts +1 -1
- package/dist/types/components/DModal/components/DModalBody.d.ts +1 -1
- package/dist/types/components/DModal/components/DModalFooter.d.ts +1 -1
- package/dist/types/components/DModal/components/DModalHeader.d.ts +1 -1
- package/dist/types/components/DOffcanvas/DOffcanvas.d.ts +15 -3
- package/dist/types/components/DOffcanvas/components/DOffcanvasBody.d.ts +1 -1
- package/dist/types/components/DOffcanvas/components/DOffcanvasFooter.d.ts +1 -1
- package/dist/types/components/DOffcanvas/components/DOffcanvasHeader.d.ts +1 -1
- package/dist/types/components/DOtp/DOtp.d.ts +1 -1
- package/dist/types/components/DOtp/components/OtpCountdown.d.ts +2 -1
- package/dist/types/components/DPaginator/DPaginator.d.ts +2 -1
- package/dist/types/components/DPasswordStrengthMeter/DPasswordStrengthMeter.d.ts +3 -1
- package/dist/types/components/DPasswordStrengthMeter/PasswordCheckItem.d.ts +2 -1
- package/dist/types/components/DPasswordStrengthMeter/PasswordCheckList.d.ts +2 -1
- package/dist/types/components/DPasswordStrengthMeter/PasswordStrength.d.ts +2 -1
- package/dist/types/components/DPopover/DPopover.d.ts +1 -1
- package/dist/types/components/DProgress/DProgress.d.ts +2 -1
- package/dist/types/components/DSelect/DSelect.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectClearIndicator.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectDropdownIndicator.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectLoadingIndicator.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectMultiValueRemove.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectOptionCheck.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectOptionEmoji.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectOptionIcon.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectPlaceholder.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectSingleValueEmoji.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectSingleValueEmojiText.d.ts +2 -1
- package/dist/types/components/DSelect/components/DSelectSingleValueIconText.d.ts +2 -1
- package/dist/types/components/DStepper/DStepper.d.ts +2 -1
- package/dist/types/components/DStepperDesktop/DStepperDesktop.d.ts +2 -1
- package/dist/types/components/DStepperMobile/DStepperMobile.d.ts +2 -1
- package/dist/types/components/DTabs/DTabs.d.ts +1 -1
- package/dist/types/components/DTabs/components/DTabContent.d.ts +1 -1
- package/dist/types/components/DTimeline/DTimeline.d.ts +1 -1
- package/dist/types/components/DToast/DToast.d.ts +1 -1
- package/dist/types/components/DToast/components/DToastBody.d.ts +1 -1
- package/dist/types/components/DToast/components/DToastHeader.d.ts +1 -1
- package/dist/types/components/DToastContainer/DToastContainer.d.ts +1 -1
- package/dist/types/components/DTooltip/DTooltip.d.ts +1 -1
- package/dist/types/components/DVoucher/DVoucher.d.ts +1 -1
- package/dist/types/components/index.d.ts +6 -1
- package/dist/types/components/interface.d.ts +6 -4
- package/dist/types/contexts/DContext.d.ts +27 -4
- package/dist/types/contexts/DPortalContext.d.ts +1 -1
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/useConfirmModal.d.ts +34 -0
- package/package.json +6 -2
- package/src/style/_shame.scss +13 -0
- package/src/style/abstracts/variables/_forms.scss +1 -1
- package/src/style/abstracts/variables/_list-group.scss +1 -1
- package/src/style/abstracts/variables/_offcanvas.scss +8 -0
- package/src/style/base/_backdrop.scss +7 -0
- package/src/style/components/_d-carousel.scss +20 -2
- package/src/style/components/_d-modal.scss +8 -0
- package/src/style/root/_root.scss +31 -0
|
@@ -14,5 +14,5 @@ type Props = BaseProps & PropsWithChildren<{
|
|
|
14
14
|
iconCloseMaterialStyle?: boolean;
|
|
15
15
|
onClose?: () => void;
|
|
16
16
|
}>;
|
|
17
|
-
export default function DAlert({ color, icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose, onClose, children, id, className, style, dataAttributes, }: Props): import("react
|
|
17
|
+
export default function DAlert({ color, icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose, onClose, children, id, className, style, dataAttributes, }: Props): import("react").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { AvatarSize, BaseProps } from '../interface';
|
|
2
3
|
type Props = BaseProps & {
|
|
3
4
|
id?: string;
|
|
@@ -6,5 +7,5 @@ type Props = BaseProps & {
|
|
|
6
7
|
name?: string;
|
|
7
8
|
useNameAsInitials?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export default function DAvatar({ id, size, image, name: nameProp, useNameAsInitials, className, style, dataAttributes, }: Props): import("react
|
|
10
|
+
export default function DAvatar({ id, size, image, name: nameProp, useNameAsInitials, className, style, dataAttributes, }: Props): import("react").JSX.Element;
|
|
10
11
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps, ComponentColor } from '../interface';
|
|
2
3
|
import { ResponsiveProp } from '../../hooks/useResponsiveProp';
|
|
3
4
|
type Props = BaseProps & {
|
|
@@ -13,5 +14,5 @@ type Props = BaseProps & {
|
|
|
13
14
|
iconFamilyClass?: string;
|
|
14
15
|
iconFamilyPrefix?: string;
|
|
15
16
|
};
|
|
16
|
-
export default function DBadge(props: Props): import("react
|
|
17
|
+
export default function DBadge(props: Props): import("react").JSX.Element;
|
|
17
18
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { BaseProps } from '../interface';
|
|
3
3
|
type Props = PropsWithChildren<BaseProps>;
|
|
4
|
-
export default function DBox({ className, style, children, dataAttributes, }: Props): import("react
|
|
4
|
+
export default function DBox({ className, style, children, dataAttributes, }: Props): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -5,5 +5,5 @@ type Props = BaseProps & FamilyIconProps & DBoxFileProps & {
|
|
|
5
5
|
icon?: string | false;
|
|
6
6
|
children?: ReactNode | ((openFileDialog: () => void) => ReactNode);
|
|
7
7
|
};
|
|
8
|
-
export default function DBoxFile({ icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, children, className, style, dataAttributes, ...props }: Props): import("react
|
|
8
|
+
export default function DBoxFile({ icon: iconProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, children, className, style, dataAttributes, ...props }: Props): import("react").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -14,5 +14,5 @@ type Props = BaseProps & FamilyIconProps & React.ButtonHTMLAttributes<HTMLButton
|
|
|
14
14
|
rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>['rel'];
|
|
15
15
|
onClick?: (event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
|
|
16
16
|
};
|
|
17
|
-
export default function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, disabled, color, loading, href, target, rel, stopPropagationEnabled, style, iconFamilyClass, iconFamilyPrefix, dataAttributes, onClick, 'aria-label': ariaLabelProp, ...rest }: Props): import("react
|
|
17
|
+
export default function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, disabled, color, loading, href, target, rel, stopPropagationEnabled, style, iconFamilyClass, iconFamilyPrefix, dataAttributes, onClick, 'aria-label': ariaLabelProp, ...rest }: Props): import("react").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -4,7 +4,7 @@ import DCardBody from './components/DCardBody';
|
|
|
4
4
|
import DCardFooter from './components/DCardFooter';
|
|
5
5
|
import type { BaseProps } from '../interface';
|
|
6
6
|
type Props = PropsWithChildren<BaseProps>;
|
|
7
|
-
declare function DCard({ className, style, children, dataAttributes, }: Props): import("react
|
|
7
|
+
declare function DCard({ className, style, children, dataAttributes, }: Props): import("react").JSX.Element;
|
|
8
8
|
declare const _default: typeof DCard & {
|
|
9
9
|
Header: typeof DCardHeader;
|
|
10
10
|
Body: typeof DCardBody;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { BaseProps } from '../../interface';
|
|
3
3
|
type Props = PropsWithChildren<BaseProps>;
|
|
4
|
-
export default function DCardBody({ className, style, children, }: Props): import("react
|
|
4
|
+
export default function DCardBody({ className, style, children, }: Props): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { BaseProps } from '../../interface';
|
|
3
3
|
type Props = PropsWithChildren<BaseProps>;
|
|
4
|
-
export default function DCardFooter({ className, style, children, }: Props): import("react
|
|
4
|
+
export default function DCardFooter({ className, style, children, }: Props): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
2
|
import type { BaseProps } from '../../interface';
|
|
3
3
|
type Props = PropsWithChildren<BaseProps>;
|
|
4
|
-
export default function DCardHeader({ className, style, children, }: Props): import("react
|
|
4
|
+
export default function DCardHeader({ className, style, children, }: Props): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Splide } from '@splidejs/react-splide';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
3
|
import type { SplideProps } from '@splidejs/react-splide';
|
|
4
|
+
import DIcon from '../DIcon';
|
|
4
5
|
import DCarouselSlide from './components/DCarouselSlide';
|
|
5
6
|
import type { BaseProps } from '../interface';
|
|
7
|
+
type ArrowIconProps = {
|
|
8
|
+
/** DIcon props used to render the "previous" arrow icon. */
|
|
9
|
+
iconArrowLeft?: ComponentProps<typeof DIcon>;
|
|
10
|
+
/** DIcon props used to render the "next" arrow icon. */
|
|
11
|
+
iconArrowRight?: ComponentProps<typeof DIcon>;
|
|
12
|
+
};
|
|
6
13
|
declare const _default: import("react").ForwardRefExoticComponent<SplideProps & BaseProps & {
|
|
7
14
|
children?: import("react").ReactNode;
|
|
8
|
-
} & import("react").RefAttributes<Splide>> & {
|
|
15
|
+
} & ArrowIconProps & import("react").RefAttributes<Splide>> & {
|
|
9
16
|
Slide: typeof DCarouselSlide;
|
|
10
17
|
};
|
|
11
18
|
export default _default;
|
|
@@ -3,5 +3,5 @@ import { SplideSlide } from '@splidejs/react-splide';
|
|
|
3
3
|
type Props = Omit<React.ComponentProps<typeof SplideSlide>, 'className'> & {
|
|
4
4
|
className?: string;
|
|
5
5
|
};
|
|
6
|
-
export default function DCarouselSlide({ className, ...props }: Props): import("react
|
|
6
|
+
export default function DCarouselSlide({ className, ...props }: Props): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps, ComponentColor, FamilyIconProps } from '../interface';
|
|
2
3
|
type Props = BaseProps & FamilyIconProps & {
|
|
3
4
|
color?: ComponentColor;
|
|
@@ -11,5 +12,5 @@ type Props = BaseProps & FamilyIconProps & {
|
|
|
11
12
|
closeAriaLabel?: string;
|
|
12
13
|
onClose?: () => void;
|
|
13
14
|
};
|
|
14
|
-
export default function DChip({ color, text, icon, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose, closeAriaLabel, className, style, dataAttributes, onClose, }: Props): import("react
|
|
15
|
+
export default function DChip({ color, text, icon, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, iconClose: iconCloseProp, iconCloseFamilyClass, iconCloseFamilyPrefix, iconCloseMaterialStyle, showClose, closeAriaLabel, className, style, dataAttributes, onClose, }: Props): import("react").JSX.Element;
|
|
15
16
|
export {};
|
|
@@ -14,5 +14,5 @@ type Props = BaseProps & FamilyIconProps & PropsWithChildren<{
|
|
|
14
14
|
iconOpen?: string;
|
|
15
15
|
iconClose?: string;
|
|
16
16
|
}>;
|
|
17
|
-
export default function DCollapse({ id, className, style, Component, defaultCollapsed, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, dataAttributes, }: Props): import("react
|
|
17
|
+
export default function DCollapse({ id, className, style, Component, defaultCollapsed, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, dataAttributes, }: Props): import("react").JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type Props = {
|
|
3
|
+
/** ID of the DOM element (portal node) to render the confirm modal into. */
|
|
4
|
+
nodeId: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Container that renders confirm modals into the specified portal node.
|
|
8
|
+
*
|
|
9
|
+
* Must be explicitly mounted by the user (typically as a sibling of app content
|
|
10
|
+
* within `DContextProvider`). The container floats above the portal stack and
|
|
11
|
+
* intercepts Escape key events to close the top confirm modal without affecting
|
|
12
|
+
* underlying modals or overlays.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* <DContextProvider>
|
|
16
|
+
* <App />
|
|
17
|
+
* <DConfirmModalContainer nodeId="d-portal" />
|
|
18
|
+
* </DContextProvider>
|
|
19
|
+
*/
|
|
20
|
+
export default function DConfirmModalContainer({ nodeId }: Props): import("react").ReactPortal | null;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { ConfirmModalStore } from './types';
|
|
3
|
+
export type { ConfirmModalEntry, Listener, ConfirmModalStore } from './types';
|
|
4
|
+
export declare function createConfirmModalStore(): ConfirmModalStore;
|
|
5
|
+
export declare const ConfirmModalStoreContext: import("react").Context<ConfirmModalStore | null>;
|
|
6
|
+
export declare function useConfirmModalStore(): ConfirmModalStore;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration options for useConfirmModal hook
|
|
3
|
+
*/
|
|
4
|
+
export interface CriticalConfirmConfig {
|
|
5
|
+
code: string;
|
|
6
|
+
codeLabel?: string;
|
|
7
|
+
inputPlaceholder?: string;
|
|
8
|
+
}
|
|
9
|
+
export type ConfirmModalColor = 'primary' | 'danger' | 'warning';
|
|
10
|
+
export interface UseConfirmModalConfig {
|
|
11
|
+
title?: string;
|
|
12
|
+
message?: string;
|
|
13
|
+
confirmLabel?: string;
|
|
14
|
+
cancelLabel?: string;
|
|
15
|
+
confirmColor?: ConfirmModalColor;
|
|
16
|
+
onConfirm: () => void | Promise<void>;
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
critical?: CriticalConfirmConfig;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Entry in the confirm modal store
|
|
22
|
+
*/
|
|
23
|
+
export type ConfirmModalEntry = UseConfirmModalConfig & {
|
|
24
|
+
id: string;
|
|
25
|
+
onConfirmAction: () => Promise<void>;
|
|
26
|
+
onCloseAction: () => void;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Listener function for store subscription
|
|
30
|
+
*/
|
|
31
|
+
export type Listener = (entries: ConfirmModalEntry[]) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Confirm modal store interface
|
|
34
|
+
*/
|
|
35
|
+
export type ConfirmModalStore = {
|
|
36
|
+
subscribe(listener: Listener): () => void;
|
|
37
|
+
push(entry: ConfirmModalEntry): void;
|
|
38
|
+
remove(id: string): void;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Return type of useConfirmModal hook
|
|
42
|
+
*/
|
|
43
|
+
export interface UseConfirmModalReturn {
|
|
44
|
+
open: () => void;
|
|
45
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
type CardBrand = 'visa' | 'mastercard';
|
|
2
3
|
type Props = {
|
|
3
4
|
className?: string;
|
|
@@ -9,5 +10,5 @@ type Props = {
|
|
|
9
10
|
isVertical?: boolean;
|
|
10
11
|
logoImage?: string;
|
|
11
12
|
};
|
|
12
|
-
export default function DCreditCard({ brand, name, number, holderText, logoImage, isChipVisible, className, isVertical, }: Props): import("react
|
|
13
|
+
export default function DCreditCard({ brand, name, number, holderText, logoImage, isChipVisible, className, isVertical, }: Props): import("react").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps } from '../interface';
|
|
2
3
|
type Props = BaseProps & {
|
|
3
4
|
value: number;
|
|
4
5
|
};
|
|
5
|
-
export default function DCurrencyText({ value, className, style, dataAttributes, }: Props): import("react
|
|
6
|
+
export default function DCurrencyText({ value, className, style, dataAttributes, }: Props): import("react").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
type Renderable = ReactNode | (() => ReactNode);
|
|
3
|
+
export type DDataStateMessages = {
|
|
4
|
+
loading?: string;
|
|
5
|
+
empty?: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
retry?: string;
|
|
8
|
+
};
|
|
3
9
|
type DDataStateWrapperProps<T> = {
|
|
4
10
|
isLoading: boolean;
|
|
5
11
|
isError: boolean;
|
|
6
12
|
data: T[] | undefined;
|
|
7
13
|
onRetry?: () => void;
|
|
14
|
+
messages?: DDataStateMessages;
|
|
8
15
|
renderLoading?: Renderable;
|
|
9
16
|
renderEmpty?: Renderable;
|
|
10
17
|
renderError?: Renderable;
|
|
11
18
|
children: (data: T[]) => ReactNode;
|
|
12
19
|
};
|
|
13
|
-
export default function DDataStateWrapper<T>({ isLoading, isError, data, onRetry, renderLoading, renderEmpty, renderError, children, }: DDataStateWrapperProps<T>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react
|
|
20
|
+
export default function DDataStateWrapper<T>({ isLoading, isError, data, onRetry, messages, renderLoading, renderEmpty, renderError, children, }: DDataStateWrapperProps<T>): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
14
21
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
interface EmptyStateProps {
|
|
2
3
|
message?: string;
|
|
3
4
|
icon?: string;
|
|
4
5
|
actionText?: string;
|
|
5
6
|
onAction?: () => void;
|
|
6
7
|
}
|
|
7
|
-
export declare function EmptyState({ message, icon, actionText, onAction, }: EmptyStateProps): import("react
|
|
8
|
+
export declare function EmptyState({ message, icon, actionText, onAction, }: EmptyStateProps): import("react").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
type ErrorStateProps = {
|
|
2
3
|
message?: string;
|
|
3
4
|
onRetry?: () => void;
|
|
4
5
|
retryMessage?: string;
|
|
5
6
|
color?: 'danger' | 'warning';
|
|
6
7
|
};
|
|
7
|
-
export declare function ErrorState({ message, onRetry, retryMessage, color, }: ErrorStateProps): import("react
|
|
8
|
+
export declare function ErrorState({ message, onRetry, retryMessage, color, }: ErrorStateProps): import("react").JSX.Element;
|
|
8
9
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
type LoadingStateProps = {
|
|
2
3
|
ariaLabel?: string;
|
|
3
4
|
className?: string;
|
|
4
5
|
};
|
|
5
|
-
export declare function LoadingState({ ariaLabel, className }: LoadingStateProps): import("react
|
|
6
|
+
export declare function LoadingState({ ariaLabel, className }: LoadingStateProps): import("react").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import DDataStateWrapper from './DDataStateWrapper';
|
|
2
|
+
export { EmptyState } from './components/EmptyState';
|
|
3
|
+
export { ErrorState } from './components/ErrorState';
|
|
4
|
+
export { LoadingState } from './components/LoadingState';
|
|
5
|
+
export type { DDataStateMessages } from './DDataStateWrapper';
|
|
2
6
|
export default DDataStateWrapper;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { DatePickerProps } from 'react-datepicker';
|
|
2
3
|
import { Locale } from 'date-fns';
|
|
3
4
|
import type { BaseProps, ButtonVariant, ComponentColor, ComponentSize, FamilyIconProps } from '../interface';
|
|
@@ -26,5 +27,5 @@ type Props = BaseProps & FamilyIconProps & Omit<DatePickerProps, 'showMonthDropd
|
|
|
26
27
|
locale?: Locale;
|
|
27
28
|
ariaLabelInputTime?: string;
|
|
28
29
|
};
|
|
29
|
-
export default function DDatePicker({ inputLabel, inputHint, inputAriaLabel, ariaLabelInputTime, inputActionAriaLabel, inputId, timeId, timeInputLabel, minYearSelect, maxYearSelect, iconHeaderSize, iconMaterialStyle, iconInput, headerPrevMonthAriaLabel, headerNextMonthAriaLabel, invalid, valid, renderCustomHeader: renderCustomHeaderProp, className, dateFormatCalendar, style, dataAttributes, placeholder, showHeaderSelectors, formatHeaderDate, ...props }: Props): import("react
|
|
30
|
+
export default function DDatePicker({ inputLabel, inputHint, inputAriaLabel, ariaLabelInputTime, inputActionAriaLabel, inputId, timeId, timeInputLabel, minYearSelect, maxYearSelect, iconHeaderSize, iconMaterialStyle, iconInput, headerPrevMonthAriaLabel, headerNextMonthAriaLabel, invalid, valid, renderCustomHeader: renderCustomHeaderProp, className, dateFormatCalendar, style, dataAttributes, placeholder, showHeaderSelectors, formatHeaderDate, ...props }: Props): import("react").JSX.Element;
|
|
30
31
|
export {};
|
|
@@ -35,5 +35,5 @@ type Props = BaseProps & FamilyIconProps & ReactDatePickerCustomHeaderProps & {
|
|
|
35
35
|
monthsShown?: number;
|
|
36
36
|
locale?: Locale;
|
|
37
37
|
} & Omit<ComponentProps<typeof DButton>, 'iconStart' | 'onClick' | 'disabled'>;
|
|
38
|
-
export default function DDatePickerHeaderSelector({ date, changeYear, changeMonth, decreaseMonth, increaseMonth, decreaseYear, increaseYear, monthDate, formatHeaderDate, pickerType, prevMonthButtonDisabled, nextMonthButtonDisabled, monthsShown, iconPrev, iconNext, prevYearButtonDisabled, nextYearButtonDisabled, prevMonthAriaLabel, nextMonthAriaLabel, prevYearAriaLabel, nextYearAriaLabel, iconSize, style, className, minYearSelect, maxYearSelect, showHeaderSelectors, customHeaderCount, locale, }: Props): import("react
|
|
38
|
+
export default function DDatePickerHeaderSelector({ date, changeYear, changeMonth, decreaseMonth, increaseMonth, decreaseYear, increaseYear, monthDate, formatHeaderDate, pickerType, prevMonthButtonDisabled, nextMonthButtonDisabled, monthsShown, iconPrev, iconNext, prevYearButtonDisabled, nextYearButtonDisabled, prevMonthAriaLabel, nextMonthAriaLabel, prevYearAriaLabel, nextYearAriaLabel, iconSize, style, className, minYearSelect, maxYearSelect, showHeaderSelectors, customHeaderCount, locale, }: Props): import("react").JSX.Element;
|
|
39
39
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import DInput from '../../DInput';
|
|
3
3
|
type Props = Pick<ComponentProps<typeof DInput>, 'id' | 'value' | 'onChange' | 'aria-label'>;
|
|
4
|
-
export default function DDatePickerTime({ ...rest }: Props): import("react
|
|
4
|
+
export default function DDatePickerTime({ ...rest }: Props): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -8,6 +8,7 @@ export type DropdownAction = {
|
|
|
8
8
|
isDivider?: boolean;
|
|
9
9
|
label: string;
|
|
10
10
|
};
|
|
11
|
+
type DropdownPlacement = 'auto' | 'down' | 'up' | 'start' | 'end';
|
|
11
12
|
type Props = {
|
|
12
13
|
actions: DropdownAction[];
|
|
13
14
|
dropdownToggle?: ((props: {
|
|
@@ -16,6 +17,8 @@ type Props = {
|
|
|
16
17
|
}) => React.ReactNode);
|
|
17
18
|
className?: string;
|
|
18
19
|
classNameMenu?: string;
|
|
20
|
+
asPortal?: boolean;
|
|
21
|
+
placement?: DropdownPlacement;
|
|
19
22
|
};
|
|
20
|
-
export default function DDropdown({ actions, dropdownToggle, className, classNameMenu, }: Props): import("react
|
|
23
|
+
export default function DDropdown({ actions, dropdownToggle, className, classNameMenu, asPortal, placement, }: Props): import("react").JSX.Element;
|
|
21
24
|
export {};
|
|
@@ -8,4 +8,4 @@ export type DErrorBoundaryProps = PropsWithChildren<{
|
|
|
8
8
|
onReset?: () => void;
|
|
9
9
|
onError?: (error: unknown, info: ErrorInfo) => void;
|
|
10
10
|
}>;
|
|
11
|
-
export default function DErrorBoundary({ name, fallback, resetKeys, onReset, onError, children, }: DErrorBoundaryProps): import("react
|
|
11
|
+
export default function DErrorBoundary({ name, fallback, resetKeys, onReset, onError, children, }: DErrorBoundaryProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { FallbackProps } from 'react-error-boundary';
|
|
2
3
|
type Props = {
|
|
3
4
|
resetErrorBoundary: FallbackProps['resetErrorBoundary'];
|
|
4
5
|
};
|
|
5
|
-
export default function DefaultErrorBoundary({ resetErrorBoundary }: Props): import("react
|
|
6
|
+
export default function DefaultErrorBoundary({ resetErrorBoundary }: Props): import("react").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
type Props =
|
|
4
|
-
export default function DIcon({ familyClass: propFamilyClass, familyPrefix: propFamilyPrefix, materialStyle: propMaterialStyle, ...props }: Props): import("react
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DIconBaseProps } from '../DIconBase';
|
|
3
|
+
type Props = DIconBaseProps;
|
|
4
|
+
export default function DIcon({ icon, familyClass: propFamilyClass, familyPrefix: propFamilyPrefix, materialStyle: propMaterialStyle, ...props }: Props): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { BaseProps, ComponentColor, IconValue } from '../interface';
|
|
2
3
|
import { ResponsiveProp } from '../../hooks/useResponsiveProp';
|
|
3
4
|
type Props = BaseProps & {
|
|
4
|
-
icon:
|
|
5
|
+
icon: IconValue;
|
|
5
6
|
color?: ComponentColor;
|
|
6
7
|
size?: string | ResponsiveProp;
|
|
7
8
|
/**
|
|
@@ -17,5 +18,6 @@ type Props = BaseProps & {
|
|
|
17
18
|
familyPrefix?: string;
|
|
18
19
|
strokeWidth?: number;
|
|
19
20
|
};
|
|
20
|
-
export
|
|
21
|
+
export type DIconBaseProps = Props;
|
|
22
|
+
export default function DIconBase({ icon, color, style, className, size, useListenerSize, hasCircle, materialStyle, familyClass, familyPrefix, strokeWidth, dataAttributes, }: Props): import("react").JSX.Element;
|
|
21
23
|
export {};
|
|
@@ -16,5 +16,5 @@ type Props = ComponentPropsWithoutRef<'input'> & BaseProps & {
|
|
|
16
16
|
value?: string;
|
|
17
17
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
18
18
|
};
|
|
19
|
-
export default function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked, disabled, invalid, valid, indeterminate, inputClassName, value, hint, onChange, className, style, dataAttributes, ...props }: Props): import("react
|
|
19
|
+
export default function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked, disabled, invalid, valid, indeterminate, inputClassName, value, hint, onChange, className, style, dataAttributes, ...props }: Props): import("react").JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps, FamilyIconProps, PinInputMode, PinInputType } from '../interface';
|
|
2
3
|
type Props = BaseProps & FamilyIconProps & {
|
|
3
4
|
id?: string;
|
|
@@ -16,5 +17,5 @@ type Props = BaseProps & FamilyIconProps & {
|
|
|
16
17
|
onChange?: (value: string) => void;
|
|
17
18
|
'aria-label'?: string;
|
|
18
19
|
};
|
|
19
|
-
export default function DInputPin({ id: idProp, label, placeholder, type, disabled, loading, secret, characters, innerInputMode, hint, invalid, valid, className, style, dataAttributes, onChange, 'aria-label': ariaLabel, }: Props): import("react
|
|
20
|
+
export default function DInputPin({ id: idProp, label, placeholder, type, disabled, loading, secret, characters, innerInputMode, hint, invalid, valid, className, style, dataAttributes, onChange, 'aria-label': ariaLabel, }: Props): import("react").JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
import DInput from '../DInput';
|
|
3
|
+
type DInputProps = ComponentProps<typeof DInput>;
|
|
4
|
+
export type DInputSearchProps = Omit<DInputProps, 'onChange' | 'defaultValue' | 'type'> & {
|
|
5
|
+
debounceMs?: number;
|
|
6
|
+
defaultValue?: string;
|
|
7
|
+
onChange?: (value: string) => void;
|
|
8
|
+
onImmediateChange?: (value: string) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const ForwardedDInputSearch: import("react").ForwardRefExoticComponent<Omit<DInputSearchProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
11
|
+
export default ForwardedDInputSearch;
|
|
@@ -24,4 +24,4 @@ export type Props<T> = BaseProps & FamilyIconProps & StartIconProps & EndIconPro
|
|
|
24
24
|
valueExtractor?: (item: T) => string | number;
|
|
25
25
|
labelExtractor?: (item: T) => string;
|
|
26
26
|
};
|
|
27
|
-
export default function DInputSelect<T extends object = DefaultOption>({ id: idProp, name, label, className, style, options, disabled, loading, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, hint, value, size, floatingLabel, invalid, valid, dataAttributes, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }: Props<T>): import("react
|
|
27
|
+
export default function DInputSelect<T extends object = DefaultOption>({ id: idProp, name, label, className, style, options, disabled, loading, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, hint, value, size, floatingLabel, invalid, valid, dataAttributes, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }: Props<T>): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps } from '../interface';
|
|
2
3
|
type Props = BaseProps & {
|
|
3
4
|
id?: string;
|
|
@@ -12,5 +13,5 @@ type Props = BaseProps & {
|
|
|
12
13
|
readonly?: boolean;
|
|
13
14
|
onChange?: (isChecked: boolean) => void;
|
|
14
15
|
};
|
|
15
|
-
export default function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid, valid, readonly, className, style, dataAttributes, inputClassName, onChange, }: Props): import("react
|
|
16
|
+
export default function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid, valid, readonly, className, style, dataAttributes, inputClassName, onChange, }: Props): import("react").JSX.Element;
|
|
16
17
|
export {};
|
|
@@ -14,7 +14,7 @@ type Props = PropsWithChildren<BaseProps & {
|
|
|
14
14
|
gapXxl?: DLayoutGap;
|
|
15
15
|
columns?: number;
|
|
16
16
|
}>;
|
|
17
|
-
declare function DLayout({ className, style, children, gap, columns, gapSm, gapMd, gapLg, gapXl, gapXxl, dataAttributes, }: Props): import("react
|
|
17
|
+
declare function DLayout({ className, style, children, gap, columns, gapSm, gapMd, gapLg, gapXl, gapXxl, dataAttributes, }: Props): import("react").JSX.Element;
|
|
18
18
|
declare const _default: typeof DLayout & {
|
|
19
19
|
Pane: typeof DLayoutPane;
|
|
20
20
|
};
|
|
@@ -9,5 +9,5 @@ type Props = PropsWithChildren<BaseProps & {
|
|
|
9
9
|
colsXl?: string | number;
|
|
10
10
|
colsXxl?: string | number;
|
|
11
11
|
}>;
|
|
12
|
-
export default function DLayoutPane({ className, style, children, cols, colsXs, colsSm, colsMd, colsLg, colsXl, colsXxl, dataAttributes, }: Props): import("react
|
|
12
|
+
export default function DLayoutPane({ className, style, children, cols, colsXs, colsSm, colsMd, colsLg, colsXl, colsXxl, dataAttributes, }: Props): import("react").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -7,7 +7,7 @@ type Props = BaseProps & PropsWithChildren<{
|
|
|
7
7
|
flush?: boolean;
|
|
8
8
|
horizontal?: boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
9
9
|
}>;
|
|
10
|
-
declare function DListGroup({ as, numbered, flush, horizontal, children, className, style, dataAttributes, }: Props): import("react
|
|
10
|
+
declare function DListGroup({ as, numbered, flush, horizontal, children, className, style, dataAttributes, }: Props): import("react").JSX.Element;
|
|
11
11
|
declare const _default: typeof DListGroup & {
|
|
12
12
|
Item: typeof DListGroupItem;
|
|
13
13
|
};
|
|
@@ -9,5 +9,5 @@ type Props = BaseProps & StartIconProps & EndIconProps & PropsWithChildren<{
|
|
|
9
9
|
onClick?: () => void;
|
|
10
10
|
color?: ComponentColor;
|
|
11
11
|
}>;
|
|
12
|
-
export default function DListGroupItem({ as, action: actionProp, active, disabled, href, onClick, color, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, children, className, style, dataAttributes, }: Props): import("react
|
|
12
|
+
export default function DListGroupItem({ as, action: actionProp, active, disabled, href, onClick, color, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, children, className, style, dataAttributes, }: Props): import("react").JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -14,7 +14,7 @@ type Props = BaseProps & PropsWithChildren<{
|
|
|
14
14
|
size?: ModalSize;
|
|
15
15
|
transition?: Transition;
|
|
16
16
|
}>;
|
|
17
|
-
declare function DModal({ name, className, style, staticBackdrop, scrollable, centered, fullScreen, fullScreenFrom, size, transition, children, dataAttributes, }: Props): import("react
|
|
17
|
+
declare function DModal({ name, className, style, staticBackdrop, scrollable, centered, fullScreen, fullScreenFrom, size, transition, children, dataAttributes, }: Props): import("react").JSX.Element;
|
|
18
18
|
declare const _default: typeof DModal & {
|
|
19
19
|
Header: typeof DModalHeader;
|
|
20
20
|
Body: typeof DModalBody;
|
|
@@ -3,5 +3,5 @@ import type { BaseProps } from '../../interface';
|
|
|
3
3
|
type Props = BaseProps & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export default function DModalBody({ children, className, style, }: Props): import("react
|
|
6
|
+
export default function DModalBody({ children, className, style, }: Props): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,5 +3,5 @@ import type { BaseProps } from '../../interface';
|
|
|
3
3
|
type Props = BaseProps & PropsWithChildren<{
|
|
4
4
|
actionPlacement?: 'start' | 'end' | 'fill' | 'center';
|
|
5
5
|
}>;
|
|
6
|
-
export default function DModalFooter({ className, style, actionPlacement, children, }: Props): import("react
|
|
6
|
+
export default function DModalFooter({ className, style, actionPlacement, children, }: Props): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -6,5 +6,5 @@ type Props = BaseProps & FamilyIconProps & PropsWithChildren<{
|
|
|
6
6
|
materialStyle?: boolean;
|
|
7
7
|
onClose?: () => void;
|
|
8
8
|
}>;
|
|
9
|
-
export default function DModalHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle, }: Props): import("react
|
|
9
|
+
export default function DModalHeader({ showCloseButton, onClose, children, className, style, iconFamilyClass, iconFamilyPrefix, icon: iconProp, materialStyle, }: Props): import("react").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { type Transition } from 'framer-motion';
|
|
2
|
-
import type
|
|
2
|
+
import { type PropsWithChildren } from 'react';
|
|
3
|
+
import { ResponsiveProp } from '../../hooks/useResponsiveProp';
|
|
3
4
|
import DOffcanvasHeader from './components/DOffcanvasHeader';
|
|
4
5
|
import DOffcanvasBody from './components/DOffcanvasBody';
|
|
5
6
|
import DOffcanvasFooter from './components/DOffcanvasFooter';
|
|
6
7
|
import type { BaseProps, OffcanvasPositionToggleFrom } from '../interface';
|
|
8
|
+
type OffcanvasResponsivePlacement = Partial<Record<'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl', OffcanvasPositionToggleFrom>>;
|
|
7
9
|
type Props = BaseProps & PropsWithChildren<{
|
|
8
10
|
name: string;
|
|
9
11
|
staticBackdrop?: boolean;
|
|
10
12
|
scrollable?: boolean;
|
|
11
|
-
openFrom?: OffcanvasPositionToggleFrom;
|
|
13
|
+
openFrom?: OffcanvasPositionToggleFrom | OffcanvasResponsivePlacement;
|
|
14
|
+
/**
|
|
15
|
+
* Overrides the offcanvas size on the `start`/`end` placements (defaults to `400px`).
|
|
16
|
+
* Accepts any CSS length (e.g. `'320px'`, `'50vw'`, `'100%'`) or a `ResponsiveProp` object.
|
|
17
|
+
*/
|
|
18
|
+
width?: string | ResponsiveProp;
|
|
19
|
+
/**
|
|
20
|
+
* Overrides the offcanvas size on the `top`/`bottom` placements (defaults to `100%`).
|
|
21
|
+
* Accepts any CSS length (e.g. `'50vh'`, `'320px'`) or a `ResponsiveProp` object.
|
|
22
|
+
*/
|
|
23
|
+
height?: string | ResponsiveProp;
|
|
12
24
|
transition?: Transition;
|
|
13
25
|
}>;
|
|
14
|
-
declare function DOffcanvas({ name, className, style, staticBackdrop, scrollable, openFrom, transition, children, dataAttributes, }: Props): import("react
|
|
26
|
+
declare function DOffcanvas({ name, className, style, staticBackdrop, scrollable, openFrom, width, height, transition, children, dataAttributes, }: Props): import("react").JSX.Element;
|
|
15
27
|
declare const _default: typeof DOffcanvas & {
|
|
16
28
|
Header: typeof DOffcanvasHeader;
|
|
17
29
|
Body: typeof DOffcanvasBody;
|
|
@@ -3,5 +3,5 @@ import type { BaseProps } from '../../interface';
|
|
|
3
3
|
type Props = BaseProps & {
|
|
4
4
|
children: ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export default function DOffcanvasBody({ children, className, style, }: Props): import("react
|
|
6
|
+
export default function DOffcanvasBody({ children, className, style, }: Props): import("react").JSX.Element;
|
|
7
7
|
export {};
|
|
@@ -3,5 +3,5 @@ import type { BaseProps } from '../../interface';
|
|
|
3
3
|
type Props = BaseProps & PropsWithChildren<{
|
|
4
4
|
actionPlacement?: 'start' | 'end' | 'fill';
|
|
5
5
|
}>;
|
|
6
|
-
export default function DOffcanvasFooter({ actionPlacement, children, className, style, }: Props): import("react
|
|
6
|
+
export default function DOffcanvasFooter({ actionPlacement, children, className, style, }: Props): import("react").JSX.Element;
|
|
7
7
|
export {};
|