@dynamic-framework/ui-react 1.36.2 → 2.0.0-dev.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/dynamic-ui-non-root.css +7051 -3728
- package/dist/css/dynamic-ui-non-root.min.css +3 -3
- package/dist/css/dynamic-ui-root.css +339 -161
- package/dist/css/dynamic-ui-root.min.css +3 -3
- package/dist/css/dynamic-ui.css +7392 -3891
- package/dist/css/dynamic-ui.min.css +3 -3
- package/dist/index.esm.js +643 -410
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +687 -437
- package/dist/index.js.map +1 -1
- package/dist/js/bootstrap.bundle.js +3 -6
- package/dist/js/bootstrap.bundle.min.js +2 -2
- package/dist/js/bootstrap.esm.js +3 -6
- package/dist/js/bootstrap.esm.min.js +2 -2
- package/dist/js/bootstrap.js +3 -6
- package/dist/js/bootstrap.min.js +2 -2
- package/dist/types/components/DAlert/DAlert.d.ts +3 -3
- package/dist/types/components/DAvatar/DAvatar.d.ts +1 -3
- package/dist/types/components/DBadge/DBadge.d.ts +4 -3
- package/dist/types/components/DBox/DBox.d.ts +5 -0
- package/dist/types/components/DBox/index.d.ts +2 -0
- package/dist/types/components/DBoxFile/DBoxFile.d.ts +1 -1
- package/dist/types/components/DBoxFile/useDBoxFile.d.ts +2 -2
- package/dist/types/components/DButton/DButton.d.ts +8 -17
- package/dist/types/components/DButtonIcon/DButtonIcon.d.ts +3 -3
- package/dist/types/components/DCarousel/components/DCarouselSlide.d.ts +3 -1
- package/dist/types/components/DChip/DChip.d.ts +3 -3
- package/dist/types/components/DCollapse/DCollapse.d.ts +2 -2
- package/dist/types/components/DCreditCard/DCreditCard.d.ts +12 -0
- package/dist/types/components/DCreditCard/index.d.ts +2 -0
- package/dist/types/components/DDatePicker/DDatePicker.d.ts +3 -3
- package/dist/types/components/DDatePicker/components/DDatePickerHeaderSelector.d.ts +2 -4
- package/dist/types/components/DDropdown/DDropdown.d.ts +20 -0
- package/dist/types/components/DDropdown/index.d.ts +2 -0
- package/dist/types/components/DIconBase/DIconBase.d.ts +13 -9
- package/dist/types/components/DInput/DInput.d.ts +3 -2
- package/dist/types/components/DInputCheck/DInputCheck.d.ts +2 -1
- package/dist/types/components/DInputCounter/DInputCounter.d.ts +3 -2
- package/dist/types/components/DInputCurrency/DInputCurrency.d.ts +4 -3
- package/dist/types/components/DInputMask/DInputMask.d.ts +7 -17
- package/dist/types/components/DInputPhone/DInputPhone.d.ts +2 -2
- package/dist/types/components/DInputPin/DInputPin.d.ts +3 -3
- package/dist/types/components/DInputRange/DInputRange.d.ts +2 -2
- package/dist/types/components/DInputSelect/DInputSelect.d.ts +3 -3
- package/dist/types/components/DInputSwitch/DInputSwitch.d.ts +2 -1
- package/dist/types/components/DLayout/DLayout.d.ts +22 -0
- package/dist/types/components/DLayout/components/DLayoutPane.d.ts +13 -0
- package/dist/types/components/DLayout/index.d.ts +3 -0
- package/dist/types/components/DListGroup/components/DListGroupItem.d.ts +4 -4
- package/dist/types/components/DModal/DModal.d.ts +3 -1
- package/dist/types/components/DOffcanvas/DOffcanvas.d.ts +3 -1
- package/dist/types/components/DOtp/DOtp.d.ts +16 -0
- package/dist/types/components/DOtp/DOtpspec.d.ts +0 -0
- package/dist/types/components/DOtp/components/OtpCountdown.d.ts +7 -0
- package/dist/types/components/DOtp/hooks/useCountdown.d.ts +4 -0
- package/dist/types/components/DOtp/index.d.ts +2 -0
- package/dist/types/components/DPaginator/DPaginator.d.ts +2 -27
- package/dist/types/components/DPasswordStrengthMeter/DPasswordStrengthMeter.d.ts +23 -0
- package/dist/types/components/DPasswordStrengthMeter/PasswordCheckItem.d.ts +7 -0
- package/dist/types/components/DPasswordStrengthMeter/PasswordCheckList.d.ts +14 -0
- package/dist/types/components/DPasswordStrengthMeter/PasswordStrength.d.ts +6 -0
- package/dist/types/components/DPasswordStrengthMeter/index.d.ts +3 -0
- 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 +3 -3
- package/dist/types/components/DTabs/DTabs.d.ts +2 -2
- package/dist/types/components/DTimeline/DTimeline.d.ts +15 -0
- package/dist/types/components/DTimeline/index.d.ts +2 -0
- package/dist/types/components/DToastContainer/useDToast.d.ts +2 -2
- package/dist/types/components/DTooltip/DTooltip.d.ts +1 -2
- package/dist/types/components/DVoucher/DVoucher.d.ts +14 -0
- package/dist/types/components/DVoucher/hooks/useScreenshot.d.ts +5 -0
- package/dist/types/components/DVoucher/hooks/useScreenshotDownload.d.ts +5 -0
- package/dist/types/components/DVoucher/hooks/useScreenshotWebShare.d.ts +5 -0
- package/dist/types/components/DVoucher/index.d.ts +2 -0
- package/dist/types/components/config.d.ts +0 -2
- package/dist/types/components/index.d.ts +8 -9
- package/dist/types/components/interface.d.ts +3 -8
- package/dist/types/contexts/DContext.d.ts +0 -2
- package/dist/types/hooks/tests/useDisableBodyScrollEffect.spec.d.ts +1 -0
- package/dist/types/hooks/tests/useDisableInputWheel.spec.d.ts +1 -0
- package/dist/types/hooks/tests/useFormatCurrency.spec.d.ts +1 -0
- package/dist/types/hooks/tests/useInputCurrency.spec.d.ts +1 -0
- package/dist/types/hooks/tests/useItemSelection.spec.d.ts +1 -0
- package/dist/types/hooks/tests/useMediaBreakpointUp.spec.d.ts +1 -0
- package/dist/types/hooks/tests/useMediaQuery.spec.d.ts +1 -0
- package/dist/types/hooks/tests/usePortal.spec.d.ts +1 -0
- package/dist/types/hooks/tests/useProvidedRefOrCreate.spec.d.ts +1 -0
- package/dist/types/hooks/tests/useStackState.spec.d.ts +1 -0
- package/dist/types/hooks/useInputCurrency.d.ts +1 -1
- package/dist/types/hooks/useProvidedRefOrCreate.d.ts +1 -1
- package/dist/types/hooks/useResponsiveProp.d.ts +35 -0
- package/dist/types/types/polymorphic.d.ts +3 -3
- package/dist/types/utils/tests/attr-accept.spec.d.ts +1 -0
- package/dist/types/utils/tests/changeQueryString.spec.d.ts +1 -0
- package/dist/types/utils/tests/configureI18n.spec.d.ts +1 -0
- package/dist/types/utils/tests/formatCurrency.spec.d.ts +1 -0
- package/dist/types/utils/tests/getCssVariable.spec.d.ts +1 -0
- package/dist/types/utils/tests/getKeyboardFocusableElements.spec.d.ts +1 -0
- package/dist/types/utils/tests/getQueryString.spec.d.ts +1 -0
- package/dist/types/utils/tests/mediaQuery.spec.d.ts +1 -0
- package/dist/types/utils/tests/validatePhoneNumber.spec.d.ts +1 -0
- package/jest/setup.js +93 -2
- package/package.json +57 -57
- package/src/style/_shame.scss +42 -1
- package/src/style/abstracts/_mixins.scss +35 -23
- package/src/style/abstracts/_utilities.scss +70 -1
- package/src/style/abstracts/variables/_+import.scss +3 -2
- package/src/style/abstracts/variables/_alerts.scss +2 -0
- package/src/style/abstracts/variables/_body.scss +10 -3
- package/src/style/abstracts/variables/_border.scss +5 -5
- package/src/style/abstracts/variables/_buttons.scss +19 -11
- package/src/style/abstracts/variables/_cards.scss +6 -4
- package/src/style/abstracts/variables/_chips.scss +2 -2
- package/src/style/abstracts/variables/_colors.scss +147 -70
- package/src/style/abstracts/variables/_datepicker.scss +10 -9
- package/src/style/abstracts/variables/_dropdowns.scss +6 -4
- package/src/style/abstracts/variables/_forms.scss +4 -4
- package/src/style/abstracts/variables/_list-group.scss +2 -2
- package/src/style/abstracts/variables/_modals.scss +4 -3
- package/src/style/abstracts/variables/_offcanvas.scss +1 -0
- package/src/style/abstracts/variables/_pagination.scss +4 -4
- package/src/style/abstracts/variables/_shadow.scss +1 -0
- package/src/style/abstracts/variables/_tables.scss +8 -3
- package/src/style/abstracts/variables/_tooltip.scss +1 -1
- package/src/style/abstracts/variables/_typography.scss +7 -7
- package/src/style/base/_+import.scss +1 -0
- package/src/style/base/_alert.scss +1 -27
- package/src/style/base/_badge.scss +50 -12
- package/src/style/base/_buttons.scss +33 -30
- package/src/style/base/_dropdown.scss +18 -0
- package/src/style/base/_input-group.scss +5 -0
- package/src/style/base/_label.scss +0 -4
- package/src/style/base/_list-group.scss +6 -0
- package/src/style/base/_pagination.scss +2 -0
- package/src/style/base/_tables.scss +4 -0
- package/src/style/base/_tooltip.scss +1 -10
- package/src/style/components/_+import.scss +5 -4
- package/src/style/components/_d-avatar.scss +2 -20
- package/src/style/components/_d-box-file.scss +1 -1
- package/src/style/components/_d-box.scss +13 -0
- package/src/style/components/_d-carousel.scss +19 -1
- package/src/style/components/_d-credit-card.scss +67 -0
- package/src/style/components/_d-datepicker.scss +83 -26
- package/src/style/components/_d-icon.scss +10 -3
- package/src/style/components/_d-modal.scss +3 -0
- package/src/style/components/_d-stepper-desktop.scss +61 -65
- package/src/style/components/_d-stepper-mobile.scss +2 -2
- package/src/style/components/_d-tabs.scss +37 -0
- package/src/style/components/_d-timeline.scss +108 -0
- package/src/style/components/_d-voucher.scss +29 -0
- package/src/style/helpers/_color-bg.scss +13 -3
- package/src/style/root/_root.scss +109 -86
- package/dist/css/bootstrap-icons.css +0 -2106
- package/dist/css/bootstrap-icons.json +0 -2080
- package/dist/css/bootstrap-icons.min.css +0 -5
- package/dist/css/bootstrap-icons.scss +0 -2118
- package/dist/css/fonts/bootstrap-icons.woff +0 -0
- package/dist/css/fonts/bootstrap-icons.woff2 +0 -0
- package/dist/types/components/DInputCurrencyBase/DInputCurrencyBase.d.ts +0 -26
- package/dist/types/components/DInputCurrencyBase/index.d.ts +0 -2
- package/dist/types/components/DInputSearch/DInputSearch.d.ts +0 -17
- package/dist/types/components/DInputSearch/index.d.ts +0 -2
- package/dist/types/components/DList/DList.d.ts +0 -17
- package/dist/types/components/DList/components/DListItem.d.ts +0 -13
- package/dist/types/components/DList/index.d.ts +0 -3
- package/dist/types/components/DQuickActionButton/DQuickActionButton.d.ts +0 -20
- package/dist/types/components/DQuickActionButton/index.d.ts +0 -2
- package/dist/types/components/DQuickActionCheck/DQuickActionCheck.d.ts +0 -17
- package/dist/types/components/DQuickActionCheck/index.d.ts +0 -2
- package/dist/types/components/DQuickActionSelect/DQuickActionSelect.d.ts +0 -13
- package/dist/types/components/DQuickActionSelect/index.d.ts +0 -2
- package/dist/types/components/DQuickActionSwitch/DQuickActionSwitch.d.ts +0 -15
- package/dist/types/components/DQuickActionSwitch/index.d.ts +0 -2
- package/dist/types/components/DSkeleton/DSkeleton.d.ts +0 -11
- package/dist/types/components/DSkeleton/index.d.ts +0 -2
- package/dist/types/components/DTableHead/DTableHead.d.ts +0 -9
- package/dist/types/components/DTableHead/index.d.ts +0 -2
- package/src/style/components/_d-quick-action-button.scss +0 -121
- package/src/style/components/_d-quick-action-check.scss +0 -74
- package/src/style/components/_d-quick-action-select.scss +0 -58
- package/src/style/components/_d-quick-action-switch.scss +0 -64
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { default as DAlert } from './DAlert';
|
|
2
2
|
export { default as DAvatar } from './DAvatar';
|
|
3
3
|
export { default as DBadge } from './DBadge';
|
|
4
|
+
export { default as DBox } from './DBox';
|
|
4
5
|
export { default as DBoxFile } from './DBoxFile';
|
|
5
6
|
export { default as DButton } from './DButton';
|
|
6
7
|
export { default as DButtonIcon } from './DButtonIcon';
|
|
@@ -11,14 +12,15 @@ export { default as DCollapse } from './DCollapse';
|
|
|
11
12
|
export { default as DCurrencyText } from './DCurrencyText';
|
|
12
13
|
export { default as DDatePicker } from './DDatePicker';
|
|
13
14
|
export { default as DIcon } from './DIcon';
|
|
15
|
+
export { default as DLayout, DLayoutPane, } from './DLayout';
|
|
14
16
|
export { default as DIconBase } from './DIconBase';
|
|
15
17
|
export { default as DInput } from './DInput';
|
|
16
18
|
export { default as DInputMask } from './DInputMask';
|
|
17
19
|
export { default as DInputCounter } from './DInputCounter';
|
|
18
|
-
export { default as DInputCurrencyBase } from './DInputCurrencyBase';
|
|
19
20
|
export { default as DInputCurrency } from './DInputCurrency';
|
|
20
|
-
export { default as DInputSearch } from './DInputSearch';
|
|
21
21
|
export { default as DInputPassword } from './DInputPassword';
|
|
22
|
+
export { default as DPasswordStrengthMeter } from './DPasswordStrengthMeter';
|
|
23
|
+
export type { ValidationMessages, ValidationCheck } from './DPasswordStrengthMeter';
|
|
22
24
|
export { default as DInputCheck } from './DInputCheck';
|
|
23
25
|
export { default as DInputPin } from './DInputPin';
|
|
24
26
|
export { default as DInputSelect } from './DInputSelect';
|
|
@@ -26,25 +28,22 @@ export type { DInputSelectDefaultOption, DInputSelectProps } from './DInputSelec
|
|
|
26
28
|
export { default as DInputSwitch } from './DInputSwitch';
|
|
27
29
|
export { default as DInputRange } from './DInputRange';
|
|
28
30
|
export { default as DSelect } from './DSelect';
|
|
29
|
-
export { default as DList, DListItem, } from './DList';
|
|
30
31
|
export { default as DListGroup, DListGroupItem, } from './DListGroup';
|
|
31
32
|
export { default as DModal, DModalHeader, DModalBody, DModalFooter, } from './DModal';
|
|
32
33
|
export { default as DOffcanvas, DOffcanvasHeader, DOffcanvasBody, DOffcanvasFooter, } from './DOffcanvas';
|
|
33
34
|
export { default as DPaginator } from './DPaginator';
|
|
34
35
|
export { default as DPopover } from './DPopover';
|
|
35
36
|
export { default as DProgress } from './DProgress';
|
|
36
|
-
export { default as DQuickActionButton } from './DQuickActionButton';
|
|
37
|
-
export { default as DQuickActionCheck } from './DQuickActionCheck';
|
|
38
|
-
export { default as DQuickActionSelect } from './DQuickActionSelect';
|
|
39
|
-
export { default as DQuickActionSwitch } from './DQuickActionSwitch';
|
|
40
|
-
export { default as DSkeleton } from './DSkeleton';
|
|
41
37
|
export { default as DStepper } from './DStepper';
|
|
42
38
|
export { default as DStepperDesktop } from './DStepperDesktop';
|
|
43
39
|
export { default as DStepperMobile } from './DStepperMobile';
|
|
44
40
|
export { default as DTooltip } from './DTooltip';
|
|
41
|
+
export { default as DTimeline } from './DTimeline';
|
|
45
42
|
export { default as DTabs, useTabContext, DTabContent, } from './DTabs';
|
|
46
43
|
export type { DTabOption } from './DTabs';
|
|
47
44
|
export { default as DToast } from './DToast';
|
|
48
45
|
export { default as DToastContainer, useDToast, } from './DToastContainer';
|
|
49
|
-
export { default as DTableHead } from './DTableHead';
|
|
50
46
|
export { default as DInputPhone } from './DInputPhone';
|
|
47
|
+
export { default as DCreditCard } from './DCreditCard';
|
|
48
|
+
export { default as DDropdown } from './DDropdown';
|
|
49
|
+
export { default as DVoucher } from './DVoucher';
|
|
@@ -24,12 +24,6 @@ export type FamilyIconProps = {
|
|
|
24
24
|
iconFamilyPrefix?: string;
|
|
25
25
|
iconMaterialStyle?: boolean;
|
|
26
26
|
};
|
|
27
|
-
export type LabelIconProps = {
|
|
28
|
-
labelIcon?: string;
|
|
29
|
-
labelIconFamilyClass?: string;
|
|
30
|
-
labelIconFamilyPrefix?: string;
|
|
31
|
-
labelIconMaterialStyle?: boolean;
|
|
32
|
-
};
|
|
33
27
|
export type StartIconProps = {
|
|
34
28
|
iconStart?: string;
|
|
35
29
|
iconStartDisabled?: boolean;
|
|
@@ -48,9 +42,10 @@ export type EndIconProps = {
|
|
|
48
42
|
iconEndTabIndex?: number;
|
|
49
43
|
iconEndMaterialStyle?: boolean;
|
|
50
44
|
};
|
|
51
|
-
export type
|
|
45
|
+
export type ComponentColor = string;
|
|
46
|
+
export type ComponentStateColor = 'success' | 'danger' | 'warning' | 'info';
|
|
52
47
|
export type AlertThemeIconMap = {
|
|
53
|
-
[state in
|
|
48
|
+
[state in ComponentStateColor]: string;
|
|
54
49
|
};
|
|
55
50
|
export type ButtonVariant = 'outline' | 'link';
|
|
56
51
|
export type ButtonType = 'submit' | 'reset' | 'button';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import type { RefObject, ForwardedRef, FocusEvent } from 'react';
|
|
|
2
2
|
import type { Options } from 'currency.js';
|
|
3
3
|
import type { CustomStyles } from '../components/interface';
|
|
4
4
|
export default function useInputCurrency(currencyOptions: Options, value?: number, onFocus?: (event: FocusEvent<HTMLInputElement>) => void, onChange?: (value?: number) => void, onBlur?: (event: FocusEvent<HTMLInputElement>) => void, ref?: ForwardedRef<HTMLInputElement>): {
|
|
5
|
-
inputRef: RefObject<HTMLInputElement>;
|
|
5
|
+
inputRef: RefObject<HTMLInputElement | null>;
|
|
6
6
|
innerValue: string;
|
|
7
7
|
innerType: string;
|
|
8
8
|
handleOnFocus: (event: FocusEvent<HTMLInputElement>) => void;
|
|
@@ -13,4 +13,4 @@ import React from 'react';
|
|
|
13
13
|
* @param providedRef The ref to use - if undefined, will use the ref from a call to React.useRef
|
|
14
14
|
* @type TRef The type of the RefObject which should be created.
|
|
15
15
|
*/
|
|
16
|
-
export default function useProvidedRefOrCreate<TRef>(providedRef?: React.RefObject<TRef>): React.RefObject<TRef>;
|
|
16
|
+
export default function useProvidedRefOrCreate<TRef>(providedRef?: React.RefObject<TRef | null>): React.RefObject<TRef | null>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A mapping of breakpoint names to values for responsive properties.
|
|
3
|
+
*
|
|
4
|
+
* This type allows you to specify a value for one or more
|
|
5
|
+
* breakpoints ('xs', 'sm', 'md', 'lg', 'xl', 'xxl').
|
|
6
|
+
* When used with `useResponsiveProp`, the value for
|
|
7
|
+
* the highest matching breakpoint will be selected.
|
|
8
|
+
*
|
|
9
|
+
* Usage example:
|
|
10
|
+
* ```ts
|
|
11
|
+
* const prop: ResponsiveProp = { xs: "small", md: "medium", xl: "large" };
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export type ResponsiveProp = Partial<Record<'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl', string>>;
|
|
15
|
+
/**
|
|
16
|
+
* React hook to resolve a responsive property value based on the current viewport breakpoint.
|
|
17
|
+
*
|
|
18
|
+
* Given a `ResponsiveProp` object, this hook returns the value for the highest matching breakpoint.
|
|
19
|
+
* If multiple breakpoints match, the value for the largest (highest) breakpoint is used.
|
|
20
|
+
* If no breakpoints match, `undefined` is returned.
|
|
21
|
+
*
|
|
22
|
+
* @param useListener - Whether to listen for breakpoint changes (default: false).
|
|
23
|
+
* @returns An object with a `responsivePropValue` function that takes a
|
|
24
|
+
* `ResponsiveProp` and returns the resolved value.
|
|
25
|
+
*
|
|
26
|
+
* Usage example:
|
|
27
|
+
* ```ts
|
|
28
|
+
* const { responsivePropValue } = useResponsiveProp();
|
|
29
|
+
* const value = responsivePropValue({ xs: "A", md: "B", xl: "C" });
|
|
30
|
+
* // value will be "C" if xl breakpoint is active, "B" if md is active, etc.
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function useResponsiveProp(useListener?: boolean): {
|
|
34
|
+
responsivePropValue: (prop: ResponsiveProp) => string | undefined;
|
|
35
|
+
};
|
|
@@ -27,11 +27,11 @@ interface ForwardRefComponent<IntrinsicElementString, OwnProps = {}> extends For
|
|
|
27
27
|
* so that events are typed when using JSX.IntrinsicElements.
|
|
28
28
|
*/
|
|
29
29
|
<As = IntrinsicElementString>(props: As extends '' ? {
|
|
30
|
-
as: keyof JSX.IntrinsicElements;
|
|
30
|
+
as: keyof React.JSX.IntrinsicElements;
|
|
31
31
|
} : As extends React.ComponentType<infer P> ? Merge<P, OwnProps & {
|
|
32
32
|
as: As;
|
|
33
|
-
}> : As extends keyof JSX.IntrinsicElements ? Merge<JSX.IntrinsicElements[As], OwnProps & {
|
|
33
|
+
}> : As extends keyof React.JSX.IntrinsicElements ? Merge<React.JSX.IntrinsicElements[As], OwnProps & {
|
|
34
34
|
as: As;
|
|
35
|
-
}> : never): React.ReactElement | null;
|
|
35
|
+
}> : never): React.ReactElement<unknown> | null;
|
|
36
36
|
}
|
|
37
37
|
export type { ForwardRefComponent, OwnProps, IntrinsicElement, Merge };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/jest/setup.js
CHANGED
|
@@ -1,6 +1,97 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable react/prop-types */
|
|
2
|
+
const React = require('react');
|
|
2
3
|
|
|
3
|
-
jest.mock('react-responsive-pagination', () =>
|
|
4
|
+
jest.mock('react-responsive-pagination', () => {
|
|
5
|
+
function MockPagination(props) {
|
|
6
|
+
const {
|
|
7
|
+
current,
|
|
8
|
+
total,
|
|
9
|
+
onPageChange,
|
|
10
|
+
className = '',
|
|
11
|
+
} = props;
|
|
12
|
+
|
|
13
|
+
const handleClick = React.useCallback(
|
|
14
|
+
(page) => {
|
|
15
|
+
if (page !== current && page >= 1 && page <= total) {
|
|
16
|
+
onPageChange(page);
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
[current, total, onPageChange],
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
return React.createElement('div', {
|
|
23
|
+
className,
|
|
24
|
+
'data-testid': 'responsive-pagination',
|
|
25
|
+
}, [
|
|
26
|
+
React.createElement('button', {
|
|
27
|
+
type: 'button',
|
|
28
|
+
key: 'prev',
|
|
29
|
+
onClick: () => handleClick(current - 1),
|
|
30
|
+
disabled: current === 1,
|
|
31
|
+
'data-testid': 'pagination-previous',
|
|
32
|
+
}, 'Previous'),
|
|
33
|
+
|
|
34
|
+
...(function getPageButtons() {
|
|
35
|
+
const pageButtons = [];
|
|
36
|
+
const windowSize = 2; // Show current ±2
|
|
37
|
+
const startPage = Math.max(1, current - windowSize);
|
|
38
|
+
const endPage = Math.min(total, current + windowSize);
|
|
39
|
+
// Always show first page
|
|
40
|
+
if (startPage > 1) {
|
|
41
|
+
pageButtons.push(React.createElement('button', {
|
|
42
|
+
key: 1,
|
|
43
|
+
type: 'button',
|
|
44
|
+
onClick: () => handleClick(1),
|
|
45
|
+
'data-testid': 'pagination-page-1',
|
|
46
|
+
'aria-current': current === 1 ? 'page' : undefined,
|
|
47
|
+
style: { fontWeight: current === 1 ? 'bold' : 'normal' },
|
|
48
|
+
}, 1));
|
|
49
|
+
if (startPage > 2) {
|
|
50
|
+
pageButtons.push(React.createElement('span', { key: 'start-ellipsis', style: { margin: '0 4px' } }, '...'));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Window of page buttons
|
|
54
|
+
for (let page = startPage; page <= endPage; page += 1) {
|
|
55
|
+
if (!(page === 1 && startPage > 1)) {
|
|
56
|
+
pageButtons.push(React.createElement('button', {
|
|
57
|
+
key: page,
|
|
58
|
+
type: 'button',
|
|
59
|
+
onClick: () => handleClick(page),
|
|
60
|
+
'data-testid': `pagination-page-${page}`,
|
|
61
|
+
'aria-current': page === current ? 'page' : undefined,
|
|
62
|
+
style: { fontWeight: page === current ? 'bold' : 'normal' },
|
|
63
|
+
}, page));
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Always show last page
|
|
67
|
+
if (endPage < total) {
|
|
68
|
+
if (endPage < total - 1) {
|
|
69
|
+
pageButtons.push(React.createElement('span', { key: 'end-ellipsis', style: { margin: '0 4px' } }, '...'));
|
|
70
|
+
}
|
|
71
|
+
pageButtons.push(React.createElement('button', {
|
|
72
|
+
key: total,
|
|
73
|
+
type: 'button',
|
|
74
|
+
onClick: () => handleClick(total),
|
|
75
|
+
'data-testid': `pagination-page-${total}`,
|
|
76
|
+
'aria-current': total === current ? 'page' : undefined,
|
|
77
|
+
style: { fontWeight: total === current ? 'bold' : 'normal' },
|
|
78
|
+
}, total));
|
|
79
|
+
}
|
|
80
|
+
return pageButtons;
|
|
81
|
+
}()),
|
|
82
|
+
|
|
83
|
+
React.createElement('button', {
|
|
84
|
+
key: 'next',
|
|
85
|
+
type: 'button',
|
|
86
|
+
onClick: () => handleClick(current + 1),
|
|
87
|
+
disabled: current === total,
|
|
88
|
+
'data-testid': 'pagination-next',
|
|
89
|
+
}, 'Next'),
|
|
90
|
+
]);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return MockPagination;
|
|
94
|
+
});
|
|
4
95
|
|
|
5
96
|
jest.mock('@react-input/mask', () => ({
|
|
6
97
|
InputMask: jest.fn(),
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sideEffects": [
|
|
4
4
|
"*.css"
|
|
5
5
|
],
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "2.0.0-dev.10",
|
|
7
7
|
"description": "React Dynamic Framework",
|
|
8
8
|
"license": "https://github.com/dynamic-framework/dynamic-ui/blob/master/libraries/dynamic-ui-react/LICENSE.md",
|
|
9
9
|
"repository": {
|
|
@@ -49,9 +49,13 @@
|
|
|
49
49
|
"build:react:watch": "tsc -p ./tsconfig.build.json && rollup -c rollup.config.mjs",
|
|
50
50
|
"build:scss": "node scripts/build-scss.js",
|
|
51
51
|
"build:scss:watch": "npx nodemon --watch src --ext scss --exec 'npm run build:scss'",
|
|
52
|
-
"
|
|
52
|
+
"dev:ts": "tsc -p tsconfig.build.json",
|
|
53
|
+
"dev:rollup": "rollup -c rollup.config.mjs",
|
|
54
|
+
"dev:scss": "node scripts/build-scss.js",
|
|
55
|
+
"build:once": "npm run dev:ts && npm run dev:rollup && sleep 0.5 && npm run dev:scss && yalc push",
|
|
56
|
+
"watch:ds": "npx nodemon --watch src --ext ts,tsx,scss --delay 1000ms --exec \"npm run build:once\"",
|
|
57
|
+
"cp": "npm run cp:bootstrap && npm run cp:popper",
|
|
53
58
|
"cp:bootstrap": "scripts/cp-boostrap.sh",
|
|
54
|
-
"cp:bootstrap-icons": "scripts/cp-boostrap-icons.sh",
|
|
55
59
|
"cp:popper": "scripts/cp-popper.sh",
|
|
56
60
|
"clean": "rimraf dist-transpiled && rimraf dist",
|
|
57
61
|
"compile": "tsc -p . && rollup -c rollup.config.mjs",
|
|
@@ -67,12 +71,14 @@
|
|
|
67
71
|
"publish:cdn-version": "node scripts/publish-cdn.js",
|
|
68
72
|
"publish:cdn-latest": "aws s3 sync ./dist/ s3://dynamicframework-cdn/assets/latest/ui-react --delete --acl public-read",
|
|
69
73
|
"publish:cdn-rc": "aws s3 sync ./dist/ s3://dynamicframework-cdn/assets/rc/ui-react --delete --acl public-read",
|
|
74
|
+
"publish:cdn-dev": "aws s3 sync ./dist/ s3://dynamicframework-cdn/assets/dev/ui-react --delete --acl public-read",
|
|
70
75
|
"lint-staged": "lint-staged",
|
|
71
|
-
"prepare": "husky
|
|
72
|
-
"commitlint": "commitlint --edit"
|
|
76
|
+
"prepare": "husky",
|
|
77
|
+
"commitlint": "commitlint --edit",
|
|
78
|
+
"verify": "node scripts/verify.js"
|
|
73
79
|
},
|
|
74
80
|
"engines": {
|
|
75
|
-
"node": ">=
|
|
81
|
+
"node": ">=22.0.0"
|
|
76
82
|
},
|
|
77
83
|
"main": "./dist/index.js",
|
|
78
84
|
"module": "./dist/index.esm.js",
|
|
@@ -83,22 +89,23 @@
|
|
|
83
89
|
"jest/"
|
|
84
90
|
],
|
|
85
91
|
"dependencies": {
|
|
86
|
-
"@floating-ui/react": "~0.
|
|
87
|
-
"@react-input/mask": "~
|
|
92
|
+
"@floating-ui/react": "~0.27.16",
|
|
93
|
+
"@react-input/mask": "~2.0.4",
|
|
88
94
|
"@splidejs/react-splide": "~0.7.12",
|
|
89
95
|
"@splidejs/splide": "~4.1.4",
|
|
90
|
-
"bootstrap": "~5.3.
|
|
91
|
-
"classnames": "~2.
|
|
96
|
+
"bootstrap": "~5.3.8",
|
|
97
|
+
"classnames": "~2.5.1",
|
|
92
98
|
"currency.js": "~2.0.4",
|
|
93
|
-
"date-fns": "~
|
|
94
|
-
"file-selector": "
|
|
95
|
-
"google-libphonenumber": "
|
|
96
|
-
"
|
|
97
|
-
"
|
|
99
|
+
"date-fns": "~4.1.0",
|
|
100
|
+
"file-selector": "~2.1.2",
|
|
101
|
+
"google-libphonenumber": "~3.2.43",
|
|
102
|
+
"html2canvas": "^1.4.1",
|
|
103
|
+
"jspdf": "^3.0.3",
|
|
104
|
+
"lucide-react": "^0.553.0",
|
|
98
105
|
"react-datepicker": "~8.3.0",
|
|
99
|
-
"react-international-phone": "~4.
|
|
100
|
-
"react-responsive-pagination": "
|
|
101
|
-
"react-select": "
|
|
106
|
+
"react-international-phone": "~4.6.0",
|
|
107
|
+
"react-responsive-pagination": "~2.11.3",
|
|
108
|
+
"react-select": "~5.10.2"
|
|
102
109
|
},
|
|
103
110
|
"devDependencies": {
|
|
104
111
|
"@babel/core": "~7.23.2",
|
|
@@ -110,32 +117,25 @@
|
|
|
110
117
|
"@mdx-js/react": "~2.3.0",
|
|
111
118
|
"@popperjs/core": "~2.11.8",
|
|
112
119
|
"@rollup/plugin-node-resolve": "^15.3.0",
|
|
113
|
-
"@storybook/addon-a11y": "~
|
|
114
|
-
"@storybook/addon-
|
|
115
|
-
"@storybook/addon-
|
|
116
|
-
"@storybook/
|
|
117
|
-
"@
|
|
118
|
-
"@
|
|
119
|
-
"@storybook/blocks": "~8.2.9",
|
|
120
|
-
"@storybook/react": "~8.2.9",
|
|
121
|
-
"@storybook/react-vite": "~8.2.9",
|
|
122
|
-
"@storybook/test": "~8.2.9",
|
|
123
|
-
"@storybook/theming": "~8.2.9",
|
|
124
|
-
"@testing-library/jest-dom": "~6.1.4",
|
|
125
|
-
"@testing-library/react": "~14.0.0",
|
|
120
|
+
"@storybook/addon-a11y": "~9.0.17",
|
|
121
|
+
"@storybook/addon-docs": "~9.0.17",
|
|
122
|
+
"@storybook/addon-links": "~9.0.17",
|
|
123
|
+
"@storybook/react-vite": "~9.0.17",
|
|
124
|
+
"@testing-library/jest-dom": "~6.6.3",
|
|
125
|
+
"@testing-library/react": "~16.3.0",
|
|
126
126
|
"@testing-library/user-event": "^14.6.1",
|
|
127
|
-
"@types/google-libphonenumber": "
|
|
127
|
+
"@types/google-libphonenumber": "~7.4.30",
|
|
128
128
|
"@types/jest": "~29.5.12",
|
|
129
|
-
"@types/node": "
|
|
130
|
-
"@types/react": "
|
|
131
|
-
"@types/react-dom": "
|
|
129
|
+
"@types/node": "^22.0.0",
|
|
130
|
+
"@types/react": "^19.2.0",
|
|
131
|
+
"@types/react-dom": "^19.2.0",
|
|
132
132
|
"@typescript-eslint/eslint-plugin": "~6.9.0",
|
|
133
133
|
"@typescript-eslint/parser": "~6.9.0",
|
|
134
|
+
"@vitejs/plugin-react": "~4.7.0",
|
|
134
135
|
"autoprefixer": "~10.4.16",
|
|
135
136
|
"axe-playwright": "~1.2.3",
|
|
136
137
|
"babel-jest": "^29.7.0",
|
|
137
138
|
"babel-loader": "~9.1.3",
|
|
138
|
-
"bootstrap-icons": "~1.13.1",
|
|
139
139
|
"conventional-changelog-conventionalcommits": "~6.1.0",
|
|
140
140
|
"eslint": "~8.52.0",
|
|
141
141
|
"eslint-config-airbnb": "~19.0.4",
|
|
@@ -144,41 +144,41 @@
|
|
|
144
144
|
"eslint-plugin-jsx-a11y": "~6.7.1",
|
|
145
145
|
"eslint-plugin-react": "~7.33.2",
|
|
146
146
|
"eslint-plugin-react-hooks": "~4.6.0",
|
|
147
|
-
"formik": "
|
|
148
|
-
"
|
|
149
|
-
"
|
|
147
|
+
"formik": "~2.4.8",
|
|
148
|
+
"framer-motion": "^12.23.24",
|
|
149
|
+
"glob": "^11.1.0",
|
|
150
|
+
"husky": "~9.1.7",
|
|
151
|
+
"i18next": "~25.6.1",
|
|
150
152
|
"jest": "~29.7.0",
|
|
151
153
|
"jest-axe": "~8.0.0",
|
|
152
154
|
"jest-cli": "~29.7.0",
|
|
153
155
|
"jest-environment-jsdom": "~29.7.0",
|
|
154
156
|
"lint-staged": "^15.2.10",
|
|
155
157
|
"postcss-cli": "~10.1.0",
|
|
156
|
-
"react": "~
|
|
157
|
-
"react-dom": "~
|
|
158
|
-
"react-hot-toast": "~2.
|
|
159
|
-
"react-i18next": "~
|
|
160
|
-
"recharts": "~
|
|
161
|
-
"
|
|
162
|
-
"
|
|
158
|
+
"react": "~19.2.1",
|
|
159
|
+
"react-dom": "~19.2.1",
|
|
160
|
+
"react-hot-toast": "~2.6.0",
|
|
161
|
+
"react-i18next": "~16.2.4",
|
|
162
|
+
"recharts": "~3.3.0",
|
|
163
|
+
"remark-gfm": "~4.0.1",
|
|
164
|
+
"rimraf": "~6.1.0",
|
|
165
|
+
"rollup": "~4.53.1",
|
|
163
166
|
"sass": "~1.69.4",
|
|
164
|
-
"storybook": "~
|
|
167
|
+
"storybook": "~9.0.17",
|
|
165
168
|
"stylelint": "^16.16.0",
|
|
166
169
|
"stylelint-config-twbs-bootstrap": "^16.0.0",
|
|
167
170
|
"ts-jest": "~29.2.3",
|
|
168
171
|
"tslib": "~2.6.2",
|
|
169
172
|
"typescript": "~5.2.2",
|
|
173
|
+
"vite": "^6.4.1",
|
|
170
174
|
"yup": "^1.6.1"
|
|
171
175
|
},
|
|
172
176
|
"peerDependencies": {
|
|
173
|
-
"
|
|
174
|
-
"
|
|
175
|
-
"react
|
|
176
|
-
"react-
|
|
177
|
-
"
|
|
178
|
-
|
|
179
|
-
"peerDependenciesMeta": {
|
|
180
|
-
"recharts": {
|
|
181
|
-
"optional": true
|
|
182
|
-
}
|
|
177
|
+
"framer-motion": ">=12 <13",
|
|
178
|
+
"i18next": ">=25 <26",
|
|
179
|
+
"react": ">=18 <20",
|
|
180
|
+
"react-dom": ">=18 <20",
|
|
181
|
+
"react-hot-toast": ">=2 <3",
|
|
182
|
+
"react-i18next": ">=16 <17"
|
|
183
183
|
}
|
|
184
184
|
}
|
package/src/style/_shame.scss
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
/* stylelint-disable declaration-no-important */
|
|
2
2
|
|
|
3
3
|
.flex-1 {
|
|
4
4
|
flex: 1;
|
|
5
5
|
}
|
|
6
|
+
|
|
7
|
+
.text-muted {
|
|
8
|
+
--#{$prefix}text-muted: var(--#{$prefix}gray-400);
|
|
9
|
+
color: var(--#{$prefix}text-muted) !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.form-text {
|
|
13
|
+
--#{$prefix}form-text: var(--#{$prefix}gray-400);
|
|
14
|
+
color: var(--#{$prefix}form-text) !important;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.spinner-border {
|
|
18
|
+
margin-top: 4px;
|
|
19
|
+
margin-bottom: 4px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
th {
|
|
23
|
+
font-weight: var(--#{$prefix}fw-semibold) !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@media (min-width: 1200px) {
|
|
27
|
+
legend {
|
|
28
|
+
margin-bottom: 1rem;
|
|
29
|
+
font-size: 1.25rem;
|
|
30
|
+
line-height: 1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
$container-max-widths: (
|
|
35
|
+
sm: 540px,
|
|
36
|
+
md: 720px,
|
|
37
|
+
lg: 960px,
|
|
38
|
+
xl: 1140px,
|
|
39
|
+
xxl: 1320px
|
|
40
|
+
) !default;
|
|
41
|
+
|
|
42
|
+
@each $size, $width in $container-max-widths {
|
|
43
|
+
.max-w-#{$size} {
|
|
44
|
+
max-width: $width;
|
|
45
|
+
}
|
|
46
|
+
}
|