@dynamic-framework/ui-react 2.5.2 → 2.6.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 +38 -10
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +466 -83
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +471 -82
- 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/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 +1 -1
- package/dist/types/components/DIconBase/DIconBase.d.ts +2 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/types/contexts/DContext.d.ts +25 -3
- 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 +4 -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/base/_backdrop.scss +7 -0
- package/src/style/components/_d-carousel.scss +1 -1
- package/src/style/components/_d-modal.scss +8 -0
- package/src/style/root/_root.scss +31 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
type Props = {
|
|
2
3
|
password: string;
|
|
3
4
|
regex: RegExp;
|
|
4
5
|
text: string;
|
|
5
6
|
};
|
|
6
|
-
export default function PasswordCheckItem({ password, regex, text, }: Props): import("react
|
|
7
|
+
export default function PasswordCheckItem({ password, regex, text, }: Props): import("react").JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { ValidationMessages, ValidationCheck } from './DPasswordStrengthMeter';
|
|
2
3
|
type Props = {
|
|
3
4
|
password: string;
|
|
@@ -10,5 +11,5 @@ export declare const CHECK_REGEX: {
|
|
|
10
11
|
number: RegExp;
|
|
11
12
|
specialChar: RegExp;
|
|
12
13
|
};
|
|
13
|
-
export default function PasswordChecksList({ password, validationMessages, enabledChecks, }: Props): import("react
|
|
14
|
+
export default function PasswordChecksList({ password, validationMessages, enabledChecks, }: Props): import("react").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
type Props = {
|
|
2
3
|
strength: number;
|
|
3
4
|
total: number;
|
|
4
5
|
};
|
|
5
|
-
export default function PasswordStrengthBar({ strength, total }: Props): import("react
|
|
6
|
+
export default function PasswordStrengthBar({ strength, total }: Props): import("react").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -6,5 +6,5 @@ type Props = BaseProps & PropsWithChildren<{
|
|
|
6
6
|
setOpen?: (open: boolean) => void;
|
|
7
7
|
adjustContentToRender?: boolean;
|
|
8
8
|
}>;
|
|
9
|
-
export default function DPopover({ children, renderComponent, open, setOpen, adjustContentToRender, className, style, dataAttributes, }: Props): import("react
|
|
9
|
+
export default function DPopover({ children, renderComponent, open, setOpen, adjustContentToRender, className, style, dataAttributes, }: Props): import("react").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps } from '../interface';
|
|
2
3
|
type Props = BaseProps & {
|
|
3
4
|
currentValue: number;
|
|
@@ -7,5 +8,5 @@ type Props = BaseProps & {
|
|
|
7
8
|
enableStripedAnimation?: boolean;
|
|
8
9
|
height?: string | number;
|
|
9
10
|
};
|
|
10
|
-
export default function DProgress({ className, style, currentValue, minValue, maxValue, hideCurrentValue, enableStripedAnimation, height, dataAttributes, }: Props): import("react
|
|
11
|
+
export default function DProgress({ className, style, currentValue, minValue, maxValue, hideCurrentValue, enableStripedAnimation, height, dataAttributes, }: Props): import("react").JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { Props as SelectProps, GroupBase } from 'react-select';
|
|
2
3
|
import DSelectOptionCheck from './components/DSelectOptionCheck';
|
|
3
4
|
import DSelectOptionIcon from './components/DSelectOptionIcon';
|
|
@@ -28,7 +29,7 @@ type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = B
|
|
|
28
29
|
searchable?: SelectProps<Option, IsMulti, Group>['isSearchable'];
|
|
29
30
|
multi?: SelectProps<Option, IsMulti, Group>['isMulti'];
|
|
30
31
|
};
|
|
31
|
-
declare function DSelect<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ id: idProp, className, style, label, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, menuWithMaxContent, disabled, clearable, loading, floatingLabel, rtl, searchable, multi, components, defaultValue, placeholder, onIconStartClick, onIconEndClick, dataAttributes, ariaLabel, ...props }: Props<Option, IsMulti, Group>): import("react
|
|
32
|
+
declare function DSelect<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ id: idProp, className, style, label, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, menuWithMaxContent, disabled, clearable, loading, floatingLabel, rtl, searchable, multi, components, defaultValue, placeholder, onIconStartClick, onIconEndClick, dataAttributes, ariaLabel, ...props }: Props<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
32
33
|
declare const _default: typeof DSelect & {
|
|
33
34
|
OptionCheck: typeof DSelectOptionCheck;
|
|
34
35
|
OptionIcon: typeof DSelectOptionIcon;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, ClearIndicatorProps } from 'react-select';
|
|
2
|
-
export default function DSelectClearIndicator<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectClearIndicator<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: ClearIndicatorProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, DropdownIndicatorProps } from 'react-select';
|
|
2
|
-
export default function DSelectDropdownIndicator<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: DropdownIndicatorProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectDropdownIndicator<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: DropdownIndicatorProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, LoadingIndicatorProps } from 'react-select';
|
|
2
|
-
export default function DSelectLoadingIndicator<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ innerProps, }: LoadingIndicatorProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectLoadingIndicator<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ innerProps, }: LoadingIndicatorProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, MultiValueRemoveProps } from 'react-select';
|
|
2
|
-
export default function DSelectMultiValueRemove<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: MultiValueRemoveProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectMultiValueRemove<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: MultiValueRemoveProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, OptionProps } from 'react-select';
|
|
2
|
-
export default function DSelectOptionCheck<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, isSelected, ...props }: OptionProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectOptionCheck<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, isSelected, ...props }: OptionProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, OptionProps } from 'react-select';
|
|
2
3
|
export type OptionEmoji = {
|
|
3
4
|
label: string;
|
|
4
5
|
value: string;
|
|
5
6
|
emoji: string;
|
|
6
7
|
};
|
|
7
|
-
export default function DSelectOptionEmoji<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, data, ...props }: OptionProps<Option, IsMulti, Group>): import("react
|
|
8
|
+
export default function DSelectOptionEmoji<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, data, ...props }: OptionProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, OptionProps } from 'react-select';
|
|
2
3
|
export type OptionIcon = {
|
|
3
4
|
label: string;
|
|
4
5
|
value: string;
|
|
5
6
|
icon: string;
|
|
6
7
|
};
|
|
7
|
-
export default function DSelectOptionIcon<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, data, ...props }: OptionProps<Option, IsMulti, Group>): import("react
|
|
8
|
+
export default function DSelectOptionIcon<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, data, ...props }: OptionProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, PlaceholderProps } from 'react-select';
|
|
2
|
-
export default function DSelectPlaceholder<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ selectProps, innerProps: innerPropsProp, children, ...props }: PlaceholderProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectPlaceholder<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ selectProps, innerProps: innerPropsProp, children, ...props }: PlaceholderProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, SingleValueProps } from 'react-select';
|
|
2
|
-
export default function DSelectSingleValueEmoji<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectSingleValueEmoji<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, SingleValueProps } from 'react-select';
|
|
2
|
-
export default function DSelectSingleValueEmojiText<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectSingleValueEmojiText<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { GroupBase, SingleValueProps } from 'react-select';
|
|
2
|
-
export default function DSelectSingleValueIconText<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react
|
|
3
|
+
export default function DSelectSingleValueIconText<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react").JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps, BreakpointSize } from '../interface';
|
|
2
3
|
export type Step = {
|
|
3
4
|
label: string;
|
|
@@ -15,5 +16,5 @@ type Props = BaseProps & {
|
|
|
15
16
|
completed?: boolean;
|
|
16
17
|
breakpoint?: BreakpointSize;
|
|
17
18
|
};
|
|
18
|
-
export default function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle, vertical, breakpoint, className, completed, style, dataAttributes, }: Props): import("react
|
|
19
|
+
export default function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle, vertical, breakpoint, className, completed, style, dataAttributes, }: Props): import("react").JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps } from '../interface';
|
|
2
3
|
type Step = {
|
|
3
4
|
label: string;
|
|
@@ -15,5 +16,5 @@ type Props = BaseProps & {
|
|
|
15
16
|
completed?: boolean;
|
|
16
17
|
alignStart?: boolean;
|
|
17
18
|
};
|
|
18
|
-
export default function DStepper({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle, vertical, completed, alignStart, className, style, }: Props): import("react
|
|
19
|
+
export default function DStepper({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle, vertical, completed, alignStart, className, style, }: Props): import("react").JSX.Element;
|
|
19
20
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type { BaseProps } from '../interface';
|
|
2
3
|
type Step = {
|
|
3
4
|
label: string;
|
|
@@ -8,5 +9,5 @@ type Props = BaseProps & {
|
|
|
8
9
|
options: Array<Step>;
|
|
9
10
|
currentStep: number;
|
|
10
11
|
};
|
|
11
|
-
export default function DStepper({ options, currentStep, className, style, }: Props): import("react
|
|
12
|
+
export default function DStepper({ options, currentStep, className, style, }: Props): import("react").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -17,7 +17,7 @@ type Props = BaseProps & PropsWithChildren<{
|
|
|
17
17
|
ariaLabel?: string;
|
|
18
18
|
ariaLabelledBy?: string;
|
|
19
19
|
}>;
|
|
20
|
-
declare function DTabs({ children, defaultSelected, onChange, options, className, classNameTab, style, vertical, variant, dataAttributes, ariaLabel, ariaLabelledBy, }: Props): import("react
|
|
20
|
+
declare function DTabs({ children, defaultSelected, onChange, options, className, classNameTab, style, vertical, variant, dataAttributes, ariaLabel, ariaLabelledBy, }: Props): import("react").JSX.Element;
|
|
21
21
|
declare const _default: typeof DTabs & {
|
|
22
22
|
Tab: typeof DTabContent;
|
|
23
23
|
};
|
|
@@ -3,5 +3,5 @@ import type { BaseProps } from '../../interface';
|
|
|
3
3
|
type Props = BaseProps & PropsWithChildren<{
|
|
4
4
|
tab: string;
|
|
5
5
|
}>;
|
|
6
|
-
export default function DTabContent({ tab, children, className, style, }: Props): import("react
|
|
6
|
+
export default function DTabContent({ tab, children, className, style, }: Props): import("react").JSX.Element | null;
|
|
7
7
|
export {};
|
|
@@ -11,5 +11,5 @@ export type DTimelineItem = {
|
|
|
11
11
|
type Props = BaseProps & {
|
|
12
12
|
items: DTimelineItem[];
|
|
13
13
|
};
|
|
14
|
-
export default function DTimeline({ className, style, dataAttributes, items, }: Props): import("react
|
|
14
|
+
export default function DTimeline({ className, style, dataAttributes, items, }: Props): import("react").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -3,7 +3,7 @@ import DToastHeader from './components/DToastHeader';
|
|
|
3
3
|
import DToastBody from './components/DToastBody';
|
|
4
4
|
import { BaseProps } from '../interface';
|
|
5
5
|
type Props = PropsWithChildren<BaseProps>;
|
|
6
|
-
declare function DToast({ children, className, style, dataAttributes, }: Props): import("react
|
|
6
|
+
declare function DToast({ children, className, style, dataAttributes, }: Props): import("react").JSX.Element;
|
|
7
7
|
declare const _default: typeof DToast & {
|
|
8
8
|
Header: typeof DToastHeader;
|
|
9
9
|
Body: typeof DToastBody;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { BaseProps } from '../../interface';
|
|
3
3
|
type Props = PropsWithChildren<BaseProps>;
|
|
4
|
-
export default function DToastBody({ children, className, style }: Props): import("react
|
|
4
|
+
export default function DToastBody({ children, className, style }: Props): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { BaseProps } from '../../interface';
|
|
3
3
|
type Props = PropsWithChildren<BaseProps>;
|
|
4
|
-
export default function DToastHeader({ children, className, style }: Props): import("react
|
|
4
|
+
export default function DToastHeader({ children, className, style }: Props): import("react").JSX.Element;
|
|
5
5
|
export {};
|
|
@@ -36,4 +36,4 @@ export type DToastContainerProps = {
|
|
|
36
36
|
*/
|
|
37
37
|
gutter?: number;
|
|
38
38
|
};
|
|
39
|
-
export default function DToastContainer({ containerClassName, position, reverseOrder, containerStyle, toastOptions, gutter, }: DToastContainerProps): import("react
|
|
39
|
+
export default function DToastContainer({ containerClassName, position, reverseOrder, containerStyle, toastOptions, gutter, }: DToastContainerProps): import("react").JSX.Element;
|
|
@@ -13,4 +13,4 @@ export type Props = BaseProps & PropsWithChildren<{
|
|
|
13
13
|
placement?: Placement;
|
|
14
14
|
Component: ReactNode;
|
|
15
15
|
}>;
|
|
16
|
-
export default function DTooltip({ className, childrenClassName, style, offSet, padding, withFocus, withClick, withHover, open, placement, size, Component, children, }: Props): import("react
|
|
16
|
+
export default function DTooltip({ className, childrenClassName, style, offSet, padding, withFocus, withClick, withHover, open, placement, size, Component, children, }: Props): import("react").JSX.Element;
|
|
@@ -11,5 +11,5 @@ type Props = PropsWithChildren<{
|
|
|
11
11
|
shareText?: string;
|
|
12
12
|
onError?: (err: Error) => Promise<void> | void;
|
|
13
13
|
}>;
|
|
14
|
-
export default function DVoucher({ amount, amountDetails, icon, title, onError, message, downloadText, shareText, className, children, }: Props): import("react
|
|
14
|
+
export default function DVoucher({ amount, amountDetails, icon, title, onError, message, downloadText, shareText, className, children, }: Props): import("react").JSX.Element;
|
|
15
15
|
export {};
|
|
@@ -16,6 +16,8 @@ export { default as DLayout, DLayoutPane, } from './DLayout';
|
|
|
16
16
|
export type { DLayoutGap } from './DLayout';
|
|
17
17
|
export { default as DIconBase } from './DIconBase';
|
|
18
18
|
export { default as DInput } from './DInput';
|
|
19
|
+
export { default as DInputSearch } from './DInputSearch';
|
|
20
|
+
export type { DInputSearchProps } from './DInputSearch';
|
|
19
21
|
export { default as DInputMask } from './DInputMask';
|
|
20
22
|
export { default as DInputCounter } from './DInputCounter';
|
|
21
23
|
export { default as DInputCurrency } from './DInputCurrency';
|
|
@@ -51,4 +53,7 @@ export { default as DDropdown } from './DDropdown';
|
|
|
51
53
|
export { default as DVoucher } from './DVoucher';
|
|
52
54
|
export { default as DOtp } from './DOtp';
|
|
53
55
|
export { default as DErrorBoundary, useErrorBoundary, type FallbackProps, getErrorMessage, } from './DErrorBoundary';
|
|
54
|
-
export { default as DDataStateWrapper } from './DDataStateWrapper';
|
|
56
|
+
export { default as DDataStateWrapper, EmptyState, ErrorState, LoadingState, } from './DDataStateWrapper';
|
|
57
|
+
export type { DDataStateMessages } from './DDataStateWrapper';
|
|
58
|
+
export { default as DConfirmModalContainer } from './DConfirmModal/DConfirmModalContainer';
|
|
59
|
+
export type { ConfirmModalEntry, ConfirmModalStore } from './DConfirmModal/types';
|
|
@@ -47,7 +47,7 @@ export type ComponentStateColor = 'success' | 'danger' | 'warning' | 'info';
|
|
|
47
47
|
export type AlertThemeIconMap = {
|
|
48
48
|
[state in ComponentStateColor]: string;
|
|
49
49
|
};
|
|
50
|
-
export type ButtonVariant = 'outline' | 'link' | 'soft';
|
|
50
|
+
export type ButtonVariant = 'solid' | 'outline' | 'link' | 'soft';
|
|
51
51
|
export type ButtonType = 'submit' | 'reset' | 'button';
|
|
52
52
|
export type InputCheckType = 'checkbox' | 'radio';
|
|
53
53
|
export type PinInputMode = 'numeric' | 'text' | 'tel';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { PortalContextProps } from './DPortalContext';
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
2
|
+
import { type PortalContextProps } from './DPortalContext';
|
|
3
3
|
import type { AlertThemeIconMap } from '../components/interface';
|
|
4
4
|
/**
|
|
5
5
|
* Currency formatting configuration used by `DContextProvider`.
|
|
@@ -99,10 +99,32 @@ export declare const DContext: import("react").Context<Context>;
|
|
|
99
99
|
* component to configure icons, currency, language, and portal settings
|
|
100
100
|
* for all descendant Dynamic UI components.
|
|
101
101
|
*
|
|
102
|
+
* To enable confirmation modals you must also mount `DConfirmModalContainer`
|
|
103
|
+
* somewhere inside this provider (typically right before the closing tag of
|
|
104
|
+
* your root layout), similar to how `DToastContainer` works:
|
|
105
|
+
*
|
|
106
|
+
* ```tsx
|
|
107
|
+
* // Default: portalName="d-portal"
|
|
108
|
+
* <DContextProvider>
|
|
109
|
+
* <App />
|
|
110
|
+
* <DConfirmModalContainer nodeId="d-portal" />
|
|
111
|
+
* </DContextProvider>
|
|
112
|
+
* ```
|
|
113
|
+
*
|
|
114
|
+
* If you customize `portalName`, match it in `DConfirmModalContainer.nodeId`:
|
|
115
|
+
*
|
|
116
|
+
* ```tsx
|
|
117
|
+
* // Custom portalName
|
|
118
|
+
* <DContextProvider portalName="my-custom-portal">
|
|
119
|
+
* <App />
|
|
120
|
+
* <DConfirmModalContainer nodeId="my-custom-portal" />
|
|
121
|
+
* </DContextProvider>
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
102
124
|
* @template T - Map of portal name → payload shape (e.g. `{ modal: { title: string } }`).
|
|
103
125
|
* Pass it once at the top level: `<DContextProvider<MyPortals> ...>`.
|
|
104
126
|
*/
|
|
105
|
-
export declare function DContextProvider<T extends Record<string, unknown>>({ language, currency, icon, iconMap, portalName, availablePortals, children, }: PropsWithChildren<Partial<DContextProviderProps<T>>>): import("react
|
|
127
|
+
export declare function DContextProvider<T extends Record<string, unknown>>({ language, currency, icon, iconMap, portalName, availablePortals, children, }: PropsWithChildren<Partial<DContextProviderProps<T>>>): import("react").JSX.Element;
|
|
106
128
|
/**
|
|
107
129
|
* Returns the Dynamic UI context value set by `DContextProvider`.
|
|
108
130
|
* Falls back to the library's built-in defaults when no `DContextProvider`
|
|
@@ -61,7 +61,7 @@ export type PortalProps<P = unknown> = {
|
|
|
61
61
|
payload: P;
|
|
62
62
|
};
|
|
63
63
|
export declare const DPortalContext: import("react").Context<PortalContextType<any> | undefined>;
|
|
64
|
-
export declare function DPortalContextProvider<T extends Record<string, unknown>>({ portalName, children, availablePortals, }: PortalContextProps<T>): import("react
|
|
64
|
+
export declare function DPortalContextProvider<T extends Record<string, unknown>>({ portalName, children, availablePortals, }: PortalContextProps<T>): import("react").JSX.Element;
|
|
65
65
|
/**
|
|
66
66
|
* Hook to open/close registered portals (modals, offcanvas, etc.).
|
|
67
67
|
*
|
|
@@ -6,4 +6,6 @@ export { default as useStackState } from './useStackState';
|
|
|
6
6
|
export { default as useDisableBodyScrollEffect } from './useDisableBodyScrollEffect';
|
|
7
7
|
export { default as useItemSelection } from './useItemSelection';
|
|
8
8
|
export { default as useMediaQuery } from './useMediaQuery';
|
|
9
|
+
export { default as useConfirmModal } from './useConfirmModal';
|
|
10
|
+
export type { UseConfirmModalConfig, UseConfirmModalReturn, ConfirmModalColor, CriticalConfirmConfig, } from './useConfirmModal';
|
|
9
11
|
export { useMediaBreakpointUpXs, useMediaBreakpointUpSm, useMediaBreakpointUpMd, useMediaBreakpointUpLg, useMediaBreakpointUpXl, useMediaBreakpointUpXxl, } from './useMediaBreakpointUp';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { UseConfirmModalConfig, UseConfirmModalReturn } from '../components/DConfirmModal/types';
|
|
2
|
+
export type { ConfirmModalColor, CriticalConfirmConfig, UseConfirmModalConfig, UseConfirmModalReturn, } from '../components/DConfirmModal/types';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to display a confirmation modal.
|
|
5
|
+
*
|
|
6
|
+
* Renders into the portal node specified by `DConfirmModalContainer` (typically `#d-portal`).
|
|
7
|
+
* The confirm modal floats above the portal stack and handles its own Escape key,
|
|
8
|
+
* preventing interference with underlying modals.
|
|
9
|
+
*
|
|
10
|
+
* Requires both `DContextProvider` wrapping your application AND an explicit
|
|
11
|
+
* `<DConfirmModalContainer nodeId="d-portal" />` mounted in your app.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* function App() {
|
|
15
|
+
* return (
|
|
16
|
+
* <DContextProvider>
|
|
17
|
+
* <YourContent />
|
|
18
|
+
* <DConfirmModalContainer nodeId="d-portal" />
|
|
19
|
+
* </DContextProvider>
|
|
20
|
+
* );
|
|
21
|
+
* }
|
|
22
|
+
*
|
|
23
|
+
* function MyComponent() {
|
|
24
|
+
* const confirm = useConfirmModal({
|
|
25
|
+
* title: 'Delete Account',
|
|
26
|
+
* message: 'This action cannot be undone.',
|
|
27
|
+
* critical: { code: 'DELETE ACCOUNT' },
|
|
28
|
+
* onConfirm: async () => { await deleteAccount(); },
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* return <DButton onClick={confirm.open} text="Delete" color="danger" />;
|
|
32
|
+
* }
|
|
33
|
+
*/
|
|
34
|
+
export default function useConfirmModal(config: UseConfirmModalConfig): UseConfirmModalReturn;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sideEffects": [
|
|
4
4
|
"*.css"
|
|
5
5
|
],
|
|
6
|
-
"version": "2.
|
|
6
|
+
"version": "2.6.0",
|
|
7
7
|
"description": "React Dynamic Framework",
|
|
8
8
|
"license": "https://github.com/dynamic-framework/dynamic-ui/blob/master/LICENSE.md",
|
|
9
9
|
"repository": {
|
|
@@ -61,8 +61,10 @@
|
|
|
61
61
|
"compile": "tsc -p . && rollup -c rollup.config.mjs",
|
|
62
62
|
"storybook": "storybook dev -p 6006",
|
|
63
63
|
"build:storybook": "storybook build --docs -o docs",
|
|
64
|
-
"generate:registry": "node scripts/generate-api.mjs && node scripts/generate-schema.mjs",
|
|
64
|
+
"generate:registry": "node scripts/generate-api.mjs && node scripts/generate-schema.mjs && node scripts/generate-token-overrides.mjs && node scripts/generate-token-overrides-schema.mjs",
|
|
65
65
|
"validate:registry": "node scripts/validate-registry.mjs",
|
|
66
|
+
"generate:token-overrides": "node scripts/generate-token-overrides.mjs && node scripts/generate-token-overrides-schema.mjs",
|
|
67
|
+
"validate:token-overrides": "node scripts/validate-token-overrides.mjs",
|
|
66
68
|
"eslint": "npm run eslint:src && npm run eslint:stories && npm run eslint:test",
|
|
67
69
|
"eslint:src": "eslint 'src/**/*.ts' 'src/**/*.tsx' --ignore-pattern '**/*.spec.tsx'",
|
|
68
70
|
"eslint:stories": "eslint stories/**/*.stories.tsx",
|
package/src/style/_shame.scss
CHANGED
|
@@ -44,3 +44,16 @@ $container-max-widths: (
|
|
|
44
44
|
max-width: $width;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
|
+
|
|
48
|
+
.no-visible-scroll {
|
|
49
|
+
overflow: auto;
|
|
50
|
+
-ms-overflow-style: none;
|
|
51
|
+
scrollbar-width: none;
|
|
52
|
+
|
|
53
|
+
&::-webkit-scrollbar {
|
|
54
|
+
display: none;
|
|
55
|
+
width: 0;
|
|
56
|
+
height: 0;
|
|
57
|
+
background: transparent;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// scss-docs-start form-text-variables
|
|
2
2
|
$form-text-margin-top: var(--#{$prefix}ref-spacer-1) !default;
|
|
3
|
-
$form-text-color: var(--#{$prefix}
|
|
3
|
+
$form-text-color: var(--#{$prefix}gray-400) !default;
|
|
4
4
|
// scss-docs-end form-text-variables
|
|
5
5
|
|
|
6
6
|
// scss-docs-start form-label-variables
|
|
@@ -14,7 +14,7 @@ $list-group-item-bg-scale: 0% !default;
|
|
|
14
14
|
$list-group-item-color-scale: 40% !default;
|
|
15
15
|
// fusv-enable
|
|
16
16
|
|
|
17
|
-
$list-group-hover-bg: var(--#{$prefix}subtle
|
|
17
|
+
$list-group-hover-bg: var(--#{$prefix}primary-bg-subtle) !default;
|
|
18
18
|
|
|
19
19
|
$list-group-disabled-color: var(--#{$prefix}gray-600) !default;
|
|
20
20
|
|
|
@@ -7,3 +7,10 @@
|
|
|
7
7
|
|
|
8
8
|
@include overlay-backdrop(var(--#{$prefix}backdrop-zindex), var(--#{$prefix}backdrop-bg), var(--#{$prefix}backdrop-opacity));
|
|
9
9
|
}
|
|
10
|
+
|
|
11
|
+
.backdrop-confirm-modal {
|
|
12
|
+
--#{$prefix}backdrop-zindex: #{$zindex-modal + 9};
|
|
13
|
+
--#{$prefix}backdrop-filter: 5px;
|
|
14
|
+
--#{$prefix}backdrop-bg: transparent;
|
|
15
|
+
backdrop-filter: blur(var(--#{$prefix}backdrop-filter));
|
|
16
|
+
}
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
.d-carousel-pagination {
|
|
51
51
|
bottom: var(--#{$prefix}carousel-pagination-bottom);
|
|
52
52
|
position: relative;
|
|
53
|
-
margin-top: var(--#{$prefix}
|
|
53
|
+
margin-top: var(--#{$prefix}ref-spacer-4);
|
|
54
54
|
width: fit-content;
|
|
55
55
|
padding: var(--#{$prefix}ref-spacer-2) var(--#{$prefix}ref-spacer-4);
|
|
56
56
|
border-radius: var(--#{$prefix}border-radius-lg);
|
|
@@ -52,3 +52,11 @@
|
|
|
52
52
|
display: block;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
|
|
56
|
+
.confirm-modal {
|
|
57
|
+
--#{$prefix}modal-zindex: #{$zindex-modal + 10};
|
|
58
|
+
--#{$prefix}shadow-confirm-modal: var(--#{$prefix}box-shadow-sm), 0 0 100px 30px rgba(0, 0, 0, .3);
|
|
59
|
+
.modal-content {
|
|
60
|
+
--#{$prefix}modal-box-shadow: var(--#{$prefix}shadow-confirm-modal);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -295,6 +295,37 @@
|
|
|
295
295
|
$focus-shadow-rgb: var(--#{$prefix}gray-900-rgb),
|
|
296
296
|
);
|
|
297
297
|
|
|
298
|
+
} @else if $color == "warning" {
|
|
299
|
+
@include df-button-variant-variables($color);
|
|
300
|
+
@include df-button-outline-variant-variables($color);
|
|
301
|
+
@include df-button-link-variant-variables($color);
|
|
302
|
+
|
|
303
|
+
// Manual soft warning variant: keep default soft backgrounds,
|
|
304
|
+
// but force the text one tone darker for better contrast.
|
|
305
|
+
--#{$prefix}btn-soft-warning-color: var(--#{$prefix}warning-800);
|
|
306
|
+
--#{$prefix}btn-soft-warning-bg: var(--#{$prefix}warning-50);
|
|
307
|
+
--#{$prefix}btn-soft-warning-border-color: transparent;
|
|
308
|
+
--#{$prefix}btn-soft-warning-box-shadow: #{$btn-box-shadow};
|
|
309
|
+
|
|
310
|
+
--#{$prefix}btn-soft-warning-hover-color: var(--#{$prefix}warning-800);
|
|
311
|
+
--#{$prefix}btn-soft-warning-hover-bg: var(--#{$prefix}warning-100);
|
|
312
|
+
--#{$prefix}btn-soft-warning-hover-border-color: transparent;
|
|
313
|
+
|
|
314
|
+
--#{$prefix}btn-soft-warning-focus-color: var(--#{$prefix}warning-800);
|
|
315
|
+
--#{$prefix}btn-soft-warning-focus-bg: var(--#{$prefix}warning-100);
|
|
316
|
+
--#{$prefix}btn-soft-warning-focus-border-color: transparent;
|
|
317
|
+
--#{$prefix}btn-soft-warning-focus-shadow-rgb: var(--#{$prefix}warning-500-rgb);
|
|
318
|
+
|
|
319
|
+
--#{$prefix}btn-soft-warning-active-color: var(--#{$prefix}warning-800);
|
|
320
|
+
--#{$prefix}btn-soft-warning-active-bg: var(--#{$prefix}warning-200);
|
|
321
|
+
--#{$prefix}btn-soft-warning-active-border-color: transparent;
|
|
322
|
+
--#{$prefix}btn-soft-warning-active-box-shadow: #{$btn-active-box-shadow};
|
|
323
|
+
|
|
324
|
+
--#{$prefix}btn-soft-warning-disabled-color: var(--#{$prefix}warning-800);
|
|
325
|
+
--#{$prefix}btn-soft-warning-disabled-bg: var(--#{$prefix}warning-50);
|
|
326
|
+
--#{$prefix}btn-soft-warning-disabled-border-color: transparent;
|
|
327
|
+
--#{$prefix}btn-soft-warning-disabled-opacity: #{$btn-disabled-opacity};
|
|
328
|
+
|
|
298
329
|
} @else if $color == "secondary" {
|
|
299
330
|
@include df-button-variant-variables(
|
|
300
331
|
"secondary",
|