@dynamic-framework/ui-react 2.1.1 → 2.3.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.
Files changed (77) hide show
  1. package/README.md +8 -0
  2. package/dist/css/dynamic-ui.css +15518 -1105
  3. package/dist/css/dynamic-ui.min.css +3 -3
  4. package/dist/index.esm.js +338 -137
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.js +345 -135
  7. package/dist/index.js.map +1 -1
  8. package/dist/types/components/DBadge/DBadge.d.ts +3 -2
  9. package/dist/types/components/DButton/DButton.d.ts +7 -3
  10. package/dist/types/components/DButtonIcon/DButtonIcon.d.ts +7 -8
  11. package/dist/types/components/DCollapse/DCollapse.d.ts +1 -2
  12. package/dist/types/components/DCreditCard/DCreditCard.d.ts +2 -1
  13. package/dist/types/components/DDataStateWrapper/DDataStateWrapper.d.ts +14 -0
  14. package/dist/types/components/DDataStateWrapper/components/EmptyState.d.ts +8 -0
  15. package/dist/types/components/DDataStateWrapper/components/ErrorState.d.ts +8 -0
  16. package/dist/types/components/DDataStateWrapper/components/LoadingState.d.ts +6 -0
  17. package/dist/types/components/DDataStateWrapper/index.d.ts +2 -0
  18. package/dist/types/components/DDatePicker/DDatePicker.d.ts +2 -1
  19. package/dist/types/components/DDatePicker/components/DDatePickerTime.d.ts +4 -6
  20. package/dist/types/components/DErrorBoundary/DErrorBoundary.d.ts +11 -0
  21. package/dist/types/components/DErrorBoundary/components/DefaultErrorBoundary.d.ts +6 -0
  22. package/dist/types/components/DErrorBoundary/index.d.ts +3 -0
  23. package/dist/types/components/DInputPin/DInputPin.d.ts +2 -1
  24. package/dist/types/components/DPopover/DPopover.d.ts +2 -7
  25. package/dist/types/components/DSelect/DSelect.d.ts +2 -1
  26. package/dist/types/components/DSelect/components/DSelectOptionCheck.d.ts +1 -1
  27. package/dist/types/components/DTabs/DTabs.d.ts +3 -1
  28. package/dist/types/components/DVoucher/DVoucher.d.ts +5 -4
  29. package/dist/types/components/index.d.ts +2 -0
  30. package/package.json +18 -21
  31. package/src/style/_shame.scss +2 -2
  32. package/src/style/abstracts/_mixins.scss +4 -4
  33. package/src/style/abstracts/_utilities-dark.scss +72 -0
  34. package/src/style/abstracts/_utilities.scss +76 -8
  35. package/src/style/abstracts/variables/_+import.scss +2 -6
  36. package/src/style/abstracts/variables/_alerts.scss +1 -1
  37. package/src/style/abstracts/variables/_border.scss +9 -0
  38. package/src/style/abstracts/variables/_buttons.scss +1 -1
  39. package/src/style/abstracts/variables/_carousel.scss +13 -1
  40. package/src/style/abstracts/variables/_colors.scss +2 -2
  41. package/src/style/abstracts/variables/_input-phone.scss +1 -1
  42. package/src/style/abstracts/variables/_navs.scss +23 -27
  43. package/src/style/abstracts/variables/_tooltip.scss +2 -2
  44. package/src/style/abstracts/variables/_typography.scss +0 -40
  45. package/src/style/base/_+import.scss +1 -0
  46. package/src/style/base/_badge.scss +2 -2
  47. package/src/style/base/_carousel.scss +44 -0
  48. package/src/style/base/_collapse.scss +21 -8
  49. package/src/style/base/_nav.scss +10 -59
  50. package/src/style/base/_type.scss +7 -6
  51. package/src/style/components/_+import.scss +0 -1
  52. package/src/style/components/_d-avatar.scss +2 -2
  53. package/src/style/components/_d-carousel.scss +26 -4
  54. package/src/style/components/_d-chip.scss +13 -3
  55. package/src/style/components/_d-credit-card.scss +22 -12
  56. package/src/style/components/_d-icon.scss +17 -0
  57. package/src/style/components/_d-select.scss +59 -25
  58. package/src/style/components/_d-stepper-desktop.scss +2 -2
  59. package/src/style/components/_d-tabs.scss +7 -18
  60. package/src/style/components/_d-timeline.scss +6 -5
  61. package/src/style/components/_d-voucher.scss +2 -1
  62. package/src/style/dynamic-ui.scss +2 -0
  63. package/src/style/helpers/_+import.scss +1 -0
  64. package/src/style/helpers/_animations.scss +13 -0
  65. package/src/style/helpers/_color-bg.scss +1 -3
  66. package/src/style/root/_root.scss +8 -9
  67. package/dist/css/dynamic-ui-non-root.css +0 -37666
  68. package/dist/css/dynamic-ui-non-root.min.css +0 -6
  69. package/dist/css/dynamic-ui-root.css +0 -1132
  70. package/dist/css/dynamic-ui-root.min.css +0 -6
  71. package/src/style/abstracts/variables/_quick-action-button.scss +0 -31
  72. package/src/style/abstracts/variables/_quick-action-check.scss +0 -22
  73. package/src/style/abstracts/variables/_quick-action-select.scss +0 -16
  74. package/src/style/abstracts/variables/_quick-action-switch.scss +0 -19
  75. package/src/style/components/_d-collapse-icon-text.scss +0 -16
  76. package/src/style/dynamic-ui-non-root.scss +0 -15
  77. package/src/style/dynamic-ui-root.scss +0 -5
@@ -1,8 +1,9 @@
1
1
  import type { BaseProps, ComponentColor } from '../interface';
2
+ import { ResponsiveProp } from '../../hooks/useResponsiveProp';
2
3
  type Props = BaseProps & {
3
4
  text?: string;
4
5
  soft?: boolean;
5
- size?: 'sm' | 'lg';
6
+ size?: string | ResponsiveProp;
6
7
  rounded?: boolean;
7
8
  color?: ComponentColor;
8
9
  id?: string;
@@ -12,5 +13,5 @@ type Props = BaseProps & {
12
13
  iconFamilyClass?: string;
13
14
  iconFamilyPrefix?: string;
14
15
  };
15
- export default function DBadge({ text, soft, color, id, rounded, className, size, style, iconStart, iconEnd, iconMaterialStyle, iconFamilyClass, iconFamilyPrefix, dataAttributes, }: Props): import("react/jsx-runtime").JSX.Element;
16
+ export default function DBadge(props: Props): import("react/jsx-runtime").JSX.Element;
16
17
  export {};
@@ -1,13 +1,17 @@
1
1
  import { type ButtonHTMLAttributes } from 'react';
2
- import type { BaseProps, ButtonVariant, ComponentColor, ComponentSize, EndIconProps, StartIconProps } from '../interface';
2
+ import { ResponsiveProp } from '../../hooks/useResponsiveProp';
3
+ import type { BaseProps, ButtonVariant, ComponentColor, EndIconProps, StartIconProps } from '../interface';
3
4
  interface Props extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, BaseProps, StartIconProps, EndIconProps {
5
+ href?: string;
6
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
7
+ rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>['rel'];
4
8
  color?: ComponentColor;
5
- size?: ComponentSize;
9
+ size?: string | ResponsiveProp;
6
10
  variant?: ButtonVariant;
7
11
  text?: string;
8
12
  loading?: boolean;
9
13
  loadingText?: string;
10
14
  loadingAriaLabel?: string;
11
15
  }
12
- declare const DButton: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLButtonElement>>;
16
+ declare const DButton: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
13
17
  export default DButton;
@@ -1,19 +1,18 @@
1
1
  import type { MouseEvent } from 'react';
2
- import type { BaseProps, ButtonType, ButtonVariant, ComponentColor, ComponentSize, FamilyIconProps, InputState } from '../interface';
3
- type Props = BaseProps & FamilyIconProps & {
4
- id?: string;
2
+ import type { BaseProps, ButtonVariant, ComponentColor, ComponentSize, FamilyIconProps, InputState } from '../interface';
3
+ type Props = BaseProps & FamilyIconProps & React.ButtonHTMLAttributes<HTMLButtonElement> & {
5
4
  icon: string;
6
5
  size?: ComponentSize;
7
6
  variant?: ButtonVariant;
8
7
  color?: ComponentColor;
9
8
  state?: InputState;
10
- type?: ButtonType;
11
9
  loading?: boolean;
12
10
  loadingAriaLabel?: string;
13
- ariaLabel?: string;
14
11
  stopPropagationEnabled?: boolean;
15
- disabled?: boolean;
16
- onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
12
+ href?: string;
13
+ target?: React.AnchorHTMLAttributes<HTMLAnchorElement>['target'];
14
+ rel?: React.AnchorHTMLAttributes<HTMLAnchorElement>['rel'];
15
+ onClick?: (event: MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
17
16
  };
18
- export default function DButtonIcon({ id, icon, size, className, variant, state, loadingAriaLabel, iconMaterialStyle, ariaLabel, color, type, loading, disabled, stopPropagationEnabled, style, iconFamilyClass, iconFamilyPrefix, dataAttributes, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
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-runtime").JSX.Element;
19
18
  export {};
@@ -3,7 +3,6 @@ import type { BaseProps, FamilyIconProps } from '../interface';
3
3
  type Props = BaseProps & FamilyIconProps & PropsWithChildren<{
4
4
  id?: string;
5
5
  Component: ReactElement<unknown> | ReactNode;
6
- hasSeparator?: boolean;
7
6
  /**
8
7
  * Reactive prop for controlled and uncontrolled mode.
9
8
  *
@@ -15,5 +14,5 @@ type Props = BaseProps & FamilyIconProps & PropsWithChildren<{
15
14
  iconOpen?: string;
16
15
  iconClose?: string;
17
16
  }>;
18
- export default function DCollapse({ id, className, style, Component, hasSeparator, defaultCollapsed, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, dataAttributes, }: Props): import("react/jsx-runtime").JSX.Element;
17
+ export default function DCollapse({ id, className, style, Component, defaultCollapsed, onChange, children, iconOpen: iconOpenProp, iconClose: iconCloseProp, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, dataAttributes, }: Props): import("react/jsx-runtime").JSX.Element;
19
18
  export {};
@@ -1,6 +1,7 @@
1
+ type CardBrand = 'visa' | 'mastercard';
1
2
  type Props = {
2
3
  className?: string;
3
- brand?: string;
4
+ brand?: CardBrand;
4
5
  isChipVisible?: boolean;
5
6
  name?: string;
6
7
  number?: string;
@@ -0,0 +1,14 @@
1
+ import type { ReactNode } from 'react';
2
+ type Renderable = ReactNode | (() => ReactNode);
3
+ type DDataStateWrapperProps<T> = {
4
+ isLoading: boolean;
5
+ isError: boolean;
6
+ data: T[] | undefined;
7
+ onRetry?: () => void;
8
+ renderLoading?: Renderable;
9
+ renderEmpty?: Renderable;
10
+ renderError?: Renderable;
11
+ children: (data: T[]) => ReactNode;
12
+ };
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/jsx-runtime").JSX.Element | null | undefined;
14
+ export {};
@@ -0,0 +1,8 @@
1
+ interface EmptyStateProps {
2
+ message?: string;
3
+ icon?: string;
4
+ actionText?: string;
5
+ onAction?: () => void;
6
+ }
7
+ export declare function EmptyState({ message, icon, actionText, onAction, }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ type ErrorStateProps = {
2
+ message?: string;
3
+ onRetry?: () => void;
4
+ retryMessage?: string;
5
+ color?: 'danger' | 'warning';
6
+ };
7
+ export declare function ErrorState({ message, onRetry, retryMessage, color, }: ErrorStateProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ type LoadingStateProps = {
2
+ ariaLabel?: string;
3
+ className?: string;
4
+ };
5
+ export declare function LoadingState({ ariaLabel, className }: LoadingStateProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,2 @@
1
+ import DDataStateWrapper from './DDataStateWrapper';
2
+ export default DDataStateWrapper;
@@ -24,6 +24,7 @@ type Props = BaseProps & FamilyIconProps & Omit<DatePickerProps, 'showMonthDropd
24
24
  showHeaderSelectors?: boolean;
25
25
  formatHeaderDate?: string;
26
26
  locale?: Locale;
27
+ ariaLabelInputTime?: string;
27
28
  };
28
- export default function DDatePicker({ inputLabel, inputHint, inputAriaLabel, 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-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
29
30
  export {};
@@ -1,7 +1,5 @@
1
- type Props = {
2
- id?: string;
3
- value?: string;
4
- onChange?: (time: string) => void;
5
- };
6
- export default function DDatePickerTime({ value, onChange, id, }: Props): import("react/jsx-runtime").JSX.Element;
1
+ import { ComponentProps } from 'react';
2
+ import DInput from '../../DInput';
3
+ type Props = Pick<ComponentProps<typeof DInput>, 'id' | 'value' | 'onChange' | 'aria-label'>;
4
+ export default function DDatePickerTime({ ...rest }: Props): import("react/jsx-runtime").JSX.Element;
7
5
  export {};
@@ -0,0 +1,11 @@
1
+ import { type PropsWithChildren, type ReactNode, type ErrorInfo } from 'react';
2
+ import { FallbackProps, useErrorBoundary, getErrorMessage } from 'react-error-boundary';
3
+ export { type FallbackProps, useErrorBoundary, getErrorMessage, };
4
+ export type DErrorBoundaryProps = PropsWithChildren<{
5
+ name?: string;
6
+ fallback?: (props: FallbackProps) => ReactNode;
7
+ resetKeys?: unknown[];
8
+ onReset?: () => void;
9
+ onError?: (error: unknown, info: ErrorInfo) => void;
10
+ }>;
11
+ export default function DErrorBoundary({ name, fallback, resetKeys, onReset, onError, children, }: DErrorBoundaryProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { FallbackProps } from 'react-error-boundary';
2
+ type Props = {
3
+ resetErrorBoundary: FallbackProps['resetErrorBoundary'];
4
+ };
5
+ export default function DefaultErrorBoundary({ resetErrorBoundary }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import DErrorBoundary, { type FallbackProps, useErrorBoundary, getErrorMessage } from './DErrorBoundary';
2
+ export { type FallbackProps, useErrorBoundary, getErrorMessage, };
3
+ export default DErrorBoundary;
@@ -14,6 +14,7 @@ type Props = BaseProps & FamilyIconProps & {
14
14
  invalid?: boolean;
15
15
  valid?: boolean;
16
16
  onChange?: (value: string) => void;
17
+ 'aria-label'?: string;
17
18
  };
18
- export default function DInputPin({ id: idProp, label, placeholder, type, disabled, loading, secret, characters, innerInputMode, hint, invalid, valid, className, style, dataAttributes, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
19
20
  export {};
@@ -1,12 +1,7 @@
1
- import type { PropsWithChildren, ReactElement } from 'react';
1
+ import type { ReactElement, PropsWithChildren } from 'react';
2
2
  import type { BaseProps } from '../interface';
3
3
  type Props = BaseProps & PropsWithChildren<{
4
- /**
5
- * Component to render in call to action
6
- * @param {boolean} open
7
- * @returns {React.ReactElement}
8
- */
9
- renderComponent: (open: boolean) => ReactElement<unknown>;
4
+ renderComponent: (open: boolean) => ReactElement;
10
5
  open: boolean;
11
6
  setOpen?: (open: boolean) => void;
12
7
  adjustContentToRender?: boolean;
@@ -13,6 +13,7 @@ import DSelectPlaceholder from './components/DSelectPlaceholder';
13
13
  import type { BaseProps, EndIconProps, FamilyIconProps, StartIconProps } from '../interface';
14
14
  type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = BaseProps & FamilyIconProps & StartIconProps & EndIconProps & Omit<SelectProps<Option, IsMulti, Group>, 'isDisabled' | 'isClearable' | 'isLoading' | 'isRtl' | 'isSearchable' | 'isMulti'> & {
15
15
  label?: string;
16
+ ariaLabel?: string;
16
17
  hint?: string;
17
18
  invalid?: boolean;
18
19
  valid?: boolean;
@@ -27,7 +28,7 @@ type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = B
27
28
  searchable?: SelectProps<Option, IsMulti, Group>['isSearchable'];
28
29
  multi?: SelectProps<Option, IsMulti, Group>['isMulti'];
29
30
  };
30
- 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, ...props }: Props<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
31
32
  declare const _default: typeof DSelect & {
32
33
  OptionCheck: typeof DSelectOptionCheck;
33
34
  OptionIcon: typeof DSelectOptionIcon;
@@ -1,2 +1,2 @@
1
1
  import type { GroupBase, OptionProps } from 'react-select';
2
- export default function DSelectOptionCheck<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ innerProps, children, isSelected, ...props }: OptionProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
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/jsx-runtime").JSX.Element;
@@ -14,8 +14,10 @@ type Props = BaseProps & PropsWithChildren<{
14
14
  defaultSelected: string;
15
15
  vertical?: boolean;
16
16
  variant?: TabVariant;
17
+ ariaLabel?: string;
18
+ ariaLabelledBy?: string;
17
19
  }>;
18
- declare function DTabs({ children, defaultSelected, onChange, options, className, classNameTab, style, vertical, variant, dataAttributes, }: Props): import("react/jsx-runtime").JSX.Element;
20
+ declare function DTabs({ children, defaultSelected, onChange, options, className, classNameTab, style, vertical, variant, dataAttributes, ariaLabel, ariaLabelledBy, }: Props): import("react/jsx-runtime").JSX.Element;
19
21
  declare const _default: typeof DTabs & {
20
22
  Tab: typeof DTabContent;
21
23
  };
@@ -1,14 +1,15 @@
1
- import { PropsWithChildren, ReactNode } from 'react';
1
+ import { ComponentProps, PropsWithChildren, ReactNode } from 'react';
2
+ import DIcon from '../DIcon';
2
3
  type Props = PropsWithChildren<{
3
4
  amount?: string;
4
5
  amountDetails?: ReactNode;
5
- icon?: string;
6
- color?: string;
6
+ icon?: false | null | string | Partial<ComponentProps<typeof DIcon>>;
7
+ className?: string;
7
8
  message: string;
8
9
  title: string;
9
10
  downloadText?: string;
10
11
  shareText?: string;
11
12
  onError?: (err: Error) => Promise<void> | void;
12
13
  }>;
13
- export default function DVoucher({ amount, amountDetails, icon, color, title, onError, message, downloadText, shareText, children, }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export default function DVoucher({ amount, amountDetails, icon, title, onError, message, downloadText, shareText, className, children, }: Props): import("react/jsx-runtime").JSX.Element;
14
15
  export {};
@@ -48,3 +48,5 @@ export { default as DCreditCard } from './DCreditCard';
48
48
  export { default as DDropdown } from './DDropdown';
49
49
  export { default as DVoucher } from './DVoucher';
50
50
  export { default as DOtp } from './DOtp';
51
+ export { default as DErrorBoundary, useErrorBoundary, type FallbackProps, getErrorMessage, } from './DErrorBoundary';
52
+ export { default as DDataStateWrapper } from './DDataStateWrapper';
package/package.json CHANGED
@@ -3,9 +3,9 @@
3
3
  "sideEffects": [
4
4
  "*.css"
5
5
  ],
6
- "version": "2.1.1",
6
+ "version": "2.3.0",
7
7
  "description": "React Dynamic Framework",
8
- "license": "https://github.com/dynamic-framework/dynamic-ui/blob/master/libraries/dynamic-ui-react/LICENSE.md",
8
+ "license": "https://github.com/dynamic-framework/dynamic-ui/blob/master/LICENSE.md",
9
9
  "repository": {
10
10
  "type": "git",
11
11
  "url": "git+https://github.com/dynamic-framework/dynamic-ui.git"
@@ -75,7 +75,8 @@
75
75
  "lint-staged": "lint-staged",
76
76
  "prepare": "husky",
77
77
  "commitlint": "commitlint --edit",
78
- "verify": "node scripts/verify.js"
78
+ "verify": "node scripts/verify.js",
79
+ "axe": "npx tsx scripts/generate-a11y-report.ts"
79
80
  },
80
81
  "engines": {
81
82
  "node": ">=22.0.0"
@@ -103,24 +104,22 @@
103
104
  "jspdf": "^4.0.0",
104
105
  "lucide-react": "^0.553.0",
105
106
  "react-datepicker": "~8.3.0",
107
+ "react-error-boundary": "^6.1.0",
106
108
  "react-international-phone": "~4.6.0",
107
109
  "react-responsive-pagination": "~2.11.3",
108
110
  "react-select": "~5.10.2"
109
111
  },
110
112
  "devDependencies": {
111
- "@babel/core": "~7.23.2",
112
- "@babel/preset-env": "~7.23.2",
113
- "@babel/preset-react": "~7.22.15",
114
- "@babel/preset-typescript": "~7.23.2",
113
+ "@axe-core/playwright": "^4.11.1",
115
114
  "@commitlint/cli": "~19.3.0",
116
115
  "@commitlint/config-conventional": "~19.2.2",
117
116
  "@mdx-js/react": "~2.3.0",
118
117
  "@popperjs/core": "~2.11.8",
119
118
  "@rollup/plugin-node-resolve": "^15.3.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",
119
+ "@storybook/addon-a11y": "~10.2.8",
120
+ "@storybook/addon-docs": "~10.2.8",
121
+ "@storybook/addon-links": "~10.2.8",
122
+ "@storybook/react-vite": "~10.2.8",
124
123
  "@testing-library/jest-dom": "~6.6.3",
125
124
  "@testing-library/react": "~16.3.0",
126
125
  "@testing-library/user-event": "^14.6.1",
@@ -134,8 +133,6 @@
134
133
  "@vitejs/plugin-react": "~4.7.0",
135
134
  "autoprefixer": "~10.4.16",
136
135
  "axe-playwright": "~1.2.3",
137
- "babel-jest": "^29.7.0",
138
- "babel-loader": "~9.1.3",
139
136
  "conventional-changelog-conventionalcommits": "~6.1.0",
140
137
  "eslint": "~8.52.0",
141
138
  "eslint-config-airbnb": "~19.0.4",
@@ -146,14 +143,13 @@
146
143
  "eslint-plugin-react-hooks": "~4.6.0",
147
144
  "formik": "~2.4.8",
148
145
  "framer-motion": "^12.23.24",
149
- "glob": "^11.1.0",
150
146
  "husky": "~9.1.7",
151
147
  "i18next": "~25.6.1",
152
- "jest": "~29.7.0",
153
- "jest-axe": "~8.0.0",
154
- "jest-cli": "~29.7.0",
155
- "jest-environment-jsdom": "~29.7.0",
148
+ "jest": "^30.3.0",
149
+ "jest-axe": "^10.0.0",
150
+ "jest-environment-jsdom": "^30.3.0",
156
151
  "lint-staged": "^15.2.10",
152
+ "playwright": "^1.58.2",
157
153
  "postcss-cli": "~10.1.0",
158
154
  "react": "~19.2.1",
159
155
  "react-dom": "~19.2.1",
@@ -162,13 +158,14 @@
162
158
  "recharts": "~3.3.0",
163
159
  "remark-gfm": "~4.0.1",
164
160
  "rimraf": "~6.1.0",
165
- "rollup": "~4.53.1",
161
+ "rollup": "^4.59.0",
166
162
  "sass": "~1.69.4",
167
- "storybook": "^9.1.17",
163
+ "storybook": "^10.2.8",
168
164
  "stylelint": "^16.16.0",
169
165
  "stylelint-config-twbs-bootstrap": "^16.0.0",
170
- "ts-jest": "~29.2.3",
166
+ "ts-jest": "^29.4.6",
171
167
  "tslib": "~2.6.2",
168
+ "tsx": "^4.21.0",
172
169
  "typescript": "~5.2.2",
173
170
  "vite": "^6.4.1",
174
171
  "yup": "^1.6.1"
@@ -5,12 +5,12 @@
5
5
  }
6
6
 
7
7
  .text-muted {
8
- --#{$prefix}text-muted: var(--#{$prefix}gray-400);
8
+ --#{$prefix}text-muted: var(--#{$prefix}gray-500);
9
9
  color: var(--#{$prefix}text-muted) !important;
10
10
  }
11
11
 
12
12
  .form-text {
13
- --#{$prefix}form-text: var(--#{$prefix}gray-400);
13
+ --#{$prefix}form-text: var(--#{$prefix}gray-500);
14
14
  color: var(--#{$prefix}form-text) !important;
15
15
  }
16
16
 
@@ -43,12 +43,12 @@
43
43
  // scss-docs-start df-btn-outline-variant-variables-mixin
44
44
  @mixin df-button-outline-variant-variables(
45
45
  $color-name,
46
- $default-color: var(--#{$prefix}#{$color-name}-500),
46
+ $default-color: if($color-name == "warning", var(--#{$prefix}#{$color-name}-700), var(--#{$prefix}#{$color-name}-500)),
47
47
  $default-border-color: $default-color,
48
- $hover-color: var(--#{$prefix}#{$color-name}-600),
48
+ $hover-color: if($color-name == "warning", var(--#{$prefix}#{$color-name}-800), var(--#{$prefix}#{$color-name}-600)),
49
49
  $hover-border-color: $hover-color,
50
50
  $focus-color: $hover-color,
51
- $active-color: var(--#{$prefix}#{$color-name}-700),
51
+ $active-color: if($color-name == "warning", var(--#{$prefix}#{$color-name}-900), var(--#{$prefix}#{$color-name}-700)),
52
52
  $active-border-color: $active-color,
53
53
  $disabled-opacity: $btn-disabled-opacity,
54
54
  $box-shadow: $btn-box-shadow,
@@ -84,7 +84,7 @@
84
84
  // scss-docs-start df-btn-link-variant-variables-mixin
85
85
  @mixin df-button-link-variant-variables(
86
86
  $color-name,
87
- $default-color: var(--#{$prefix}#{$color-name}-500),
87
+ $default-color: if($color-name == "warning", var(--#{$prefix}#{$color-name}-700), var(--#{$prefix}#{$color-name}-500)),
88
88
  $hover-text-color: var(--#{$prefix}#{$color-name}-600),
89
89
  $focus-text-color: var(--#{$prefix}#{$color-name}-600),
90
90
  $active-text-color: var(--#{$prefix}#{$color-name}-700),
@@ -0,0 +1,72 @@
1
+ @mixin generate-dark-utility($utility) {
2
+ $values: map-get($utility, values);
3
+
4
+ @if type-of($values) == "string" or type-of(nth($values, 1)) != "list" {
5
+ $values: zip($values, $values);
6
+ }
7
+
8
+ @each $key, $value in $values {
9
+ $properties: map-get($utility, property);
10
+
11
+ @if type-of($properties) == "string" {
12
+ $properties: append((), $properties);
13
+ }
14
+
15
+ $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
16
+ $property-class: if($property-class == null, "", $property-class);
17
+ $css-variable-name: if(map-has-key($utility, css-variable-name), map-get($utility, css-variable-name), map-get($utility, class));
18
+ $property-class-modifier: if($key, if($property-class == "", "", "-") + $key, "");
19
+
20
+ $is-css-var: map-get($utility, css-var);
21
+ $is-local-vars: map-get($utility, local-vars);
22
+
23
+ @if $value != null {
24
+ $escaped-prefix: "dark\\:";
25
+ $selector: ".#{$escaped-prefix}#{$property-class}#{$property-class-modifier}";
26
+
27
+ @if $is-css-var {
28
+ @media (prefers-color-scheme: dark) {
29
+ #{$selector} {
30
+ --#{$prefix}#{$css-variable-name}: #{$value};
31
+ }
32
+ }
33
+ .dark #{$selector} {
34
+ --#{$prefix}#{$css-variable-name}: #{$value};
35
+ }
36
+ } @else {
37
+ @media (prefers-color-scheme: dark) {
38
+ #{$selector} {
39
+ @each $property in $properties {
40
+ @if $is-local-vars {
41
+ @each $local-var, $variable in $is-local-vars {
42
+ --#{$prefix}#{$local-var}: #{$variable};
43
+ }
44
+ }
45
+ #{$property}: $value if($enable-important-utilities, !important, null);
46
+ }
47
+ }
48
+ }
49
+ .dark #{$selector} {
50
+ @each $property in $properties {
51
+ @if $is-local-vars {
52
+ @each $local-var, $variable in $is-local-vars {
53
+ --#{$prefix}#{$local-var}: #{$variable};
54
+ }
55
+ }
56
+ #{$property}: $value if($enable-important-utilities, !important, null);
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ @mixin generate-dark-utilities($utilities-map) {
65
+ @each $name, $utility in $utilities-map {
66
+ @if map-has-key($utility, values) and map-has-key($utility, property) {
67
+ @include generate-dark-utility($utility);
68
+ }
69
+ }
70
+ }
71
+
72
+ @include generate-dark-utilities($utilities);
@@ -41,6 +41,7 @@ $utilities: map-merge(
41
41
  "shadow": map-merge(
42
42
  map-get($utilities, "shadow"),
43
43
  (
44
+ responsive: true,
44
45
  values: (
45
46
  null: var(--#{$prefix}box-shadow),
46
47
  sm: var(--#{$prefix}box-shadow-sm),
@@ -52,6 +53,7 @@ $utilities: map-merge(
52
53
  "text-opacity": map-merge(
53
54
  map-get($utilities, "text-opacity"),
54
55
  (
56
+ responsive: true,
55
57
  values: map-merge(
56
58
  map-get(map-get($utilities, "text-opacity"), "values"),
57
59
  (
@@ -72,15 +74,82 @@ $utilities: map-merge(
72
74
  responsive: true
73
75
  )
74
76
  ),
77
+ "border": map-merge(
78
+ map-get($utilities, "border"),
79
+ (
80
+ responsive: true,
81
+ )
82
+ ),
83
+ "border-top": map-merge(
84
+ map-get($utilities, "border-top"),
85
+ (
86
+ responsive: true,
87
+ )
88
+ ),
89
+ "border-end": map-merge(
90
+ map-get($utilities, "border-end"),
91
+ (
92
+ responsive: true,
93
+ )
94
+ ),
95
+ "border-bottom": map-merge(
96
+ map-get($utilities, "border-bottom"),
97
+ (
98
+ responsive: true,
99
+ )
100
+ ),
101
+ "border-start": map-merge(
102
+ map-get($utilities, "border-start"),
103
+ (
104
+ responsive: true,
105
+ )
106
+ ),
75
107
  "border-color": map-merge(
76
108
  map-get($utilities, "border-color"),
77
109
  (
110
+ responsive: true,
78
111
  values: map-merge(
79
112
  map-get(map-get($utilities, "border-color"), "values"),
80
113
  map-loop($palette-grays, rgba-css-var, "$key", "border"),
81
114
  )
82
115
  )
83
116
  ),
117
+ "border-width": map-merge(
118
+ map-get($utilities, "border-width"),
119
+ (
120
+ responsive: true,
121
+ )
122
+ ),
123
+ "rounded": map-merge(
124
+ map-get($utilities, "rounded"),
125
+ (
126
+ responsive: true,
127
+ )
128
+ ),
129
+ "rounded-top": map-merge(
130
+ map-get($utilities, "rounded-top"),
131
+ (
132
+ responsive: true,
133
+ )
134
+ ),
135
+ "rounded-end": map-merge(
136
+ map-get($utilities, "rounded-end"),
137
+ (
138
+ responsive: true,
139
+ )
140
+ ),
141
+ "rounded-bottom": map-merge(
142
+ map-get($utilities, "rounded-bottom"),
143
+ (
144
+ responsive: true,
145
+ )
146
+ ),
147
+ "rounded-start": map-merge(
148
+ map-get($utilities, "rounded-start"),
149
+ (
150
+ responsive: true,
151
+ )
152
+ ),
84
153
  "grid-column": (
85
154
  class: "g-col",
86
155
  property: grid-column,
@@ -133,7 +202,13 @@ $utilities: map-merge(
133
202
  map-get($utilities, "font-size"),
134
203
  (
135
204
  responsive: true,
136
- rfs: false
205
+ rfs: false,
206
+ values: map-merge(
207
+ map-get(map-get($utilities, "font-size"), "values"),
208
+ (
209
+ body: var(--#{$prefix}body-font-size)
210
+ )
211
+ )
137
212
  )
138
213
  ),
139
214
  "display-font-size": (
@@ -199,13 +274,6 @@ $utilities: map-merge(
199
274
  wrap: wrap
200
275
  )
201
276
  ),
202
- "body-font-size": (
203
- class: "fs-body",
204
- responsive: true,
205
- css-var: true,
206
- css-variable-name: fs-body-font-size,
207
- values: $body-font-sizes
208
- ),
209
277
  "line-height": (
210
278
  property: line-height,
211
279
  class: lh,
@@ -20,8 +20,8 @@ $focus-ring-opacity: .25 !default;
20
20
  $focus-ring-blur: 0 !default;
21
21
  // custom
22
22
  $focus-ring-border-color: transparent !default;
23
- $focus-ring-color-mapping: "secondary-rgb" !default;
24
- $focus-ring-color: var(--#{$prefix}gray-100) !default;
23
+ $focus-ring-color-mapping: "primary-rgb" !default;
24
+ $focus-ring-color: var(--#{$prefix}focus-ring-color) !default;
25
25
  // end custom
26
26
  $focus-ring-box-shadow: 0 0 $focus-ring-blur $focus-ring-width $focus-ring-color !default;
27
27
  // scss-docs-end focus-ring-variables
@@ -88,10 +88,6 @@ $input-btn-border-width: var(--#{$prefix}border-width) !default;
88
88
  @import "code";
89
89
 
90
90
  // custom
91
- @import "quick-action-button";
92
- @import "quick-action-select";
93
- @import "quick-action-check";
94
- @import "quick-action-switch";
95
91
  @import "cursors";
96
92
  @import "chips";
97
93
  @import "collapse-icon-text";