@dynamic-framework/ui-react 1.24.0 → 1.26.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 (32) hide show
  1. package/dist/css/dynamic-ui-non-root.css +46 -31
  2. package/dist/css/dynamic-ui-non-root.min.css +2 -2
  3. package/dist/css/dynamic-ui-root.css +1 -1
  4. package/dist/css/dynamic-ui-root.min.css +1 -1
  5. package/dist/css/dynamic-ui.css +46 -31
  6. package/dist/css/dynamic-ui.min.css +2 -2
  7. package/dist/index.esm.js +157 -27
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +151 -19
  10. package/dist/index.js.map +1 -1
  11. package/dist/types/components/DInputCheck/DInputCheck.d.ts +2 -2
  12. package/dist/types/components/DInputPin/DInputPin.d.ts +2 -2
  13. package/dist/types/components/DInputRange/DInputRange.d.ts +8 -0
  14. package/dist/types/components/DInputRange/index.d.ts +2 -0
  15. package/dist/types/components/DInputSelect/DInputSelect.d.ts +5 -3
  16. package/dist/types/components/DInputSwitch/DInputSwitch.d.ts +2 -2
  17. package/dist/types/components/DQuickActionCheck/DQuickActionCheck.d.ts +2 -2
  18. package/dist/types/components/DQuickActionSelect/DQuickActionSelect.d.ts +2 -2
  19. package/dist/types/components/DQuickActionSwitch/DQuickActionSwitch.d.ts +2 -2
  20. package/dist/types/components/DTabs/DTabs.d.ts +2 -1
  21. package/dist/types/components/DToast/DToast.d.ts +11 -0
  22. package/dist/types/components/DToast/components/DToastBody.d.ts +5 -0
  23. package/dist/types/components/DToast/components/DToastHeader.d.ts +5 -0
  24. package/dist/types/components/DToast/index.d.ts +4 -0
  25. package/dist/types/components/index.d.ts +2 -0
  26. package/package.json +2 -3
  27. package/src/style/abstracts/variables/_+import.scss +2 -1
  28. package/src/style/abstracts/variables/_forms.scss +5 -1
  29. package/src/style/base/_+import.scss +1 -0
  30. package/src/style/base/_form-range.scss +52 -0
  31. package/src/style/base/_input-group.scss +1 -1
  32. package/src/style/components/_d-select.scss +2 -0
@@ -1,16 +1,16 @@
1
1
  import type { ChangeEvent } from 'react';
2
2
  import type { BaseProps, InputCheckType } from '../interface';
3
3
  type Props = BaseProps & {
4
+ id?: string;
4
5
  type: InputCheckType;
5
6
  name?: string;
6
7
  label?: string;
7
8
  ariaLabel?: string;
8
9
  checked?: boolean;
9
- id: string;
10
10
  disabled?: boolean;
11
11
  indeterminate?: boolean;
12
12
  value?: string;
13
13
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
14
14
  };
15
- export default function DInputCheck({ type, name, label, ariaLabel, checked, id, disabled, indeterminate, value, onChange, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export default function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked, disabled, indeterminate, value, onChange, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
16
16
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { BaseProps, FamilyIconProps, LabelIconProps, PinInputMode, PinInputType, StateIcons } from '../interface';
2
2
  type Props = BaseProps & LabelIconProps & FamilyIconProps & StateIcons & {
3
- id: string;
3
+ id?: string;
4
4
  label?: string;
5
5
  placeholder?: string;
6
6
  type?: PinInputType;
@@ -15,5 +15,5 @@ type Props = BaseProps & LabelIconProps & FamilyIconProps & StateIcons & {
15
15
  valid?: boolean;
16
16
  onChange?: (value: string) => void;
17
17
  };
18
- export default function DInputPin({ id, label, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, placeholder, type, disabled, loading, secret, iconFamilyClass, iconFamilyPrefix, characters, invalidIcon: invalidIconProp, validIcon: validIconProp, innerInputMode, hint, invalid, valid, className, style, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
18
+ export default function DInputPin({ id: idProp, label, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, placeholder, type, disabled, loading, secret, iconFamilyClass, iconFamilyPrefix, characters, invalidIcon: invalidIconProp, validIcon: validIconProp, innerInputMode, hint, invalid, valid, className, style, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
19
19
  export {};
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { BaseProps, LabelIconProps } from '../interface';
3
+ declare const ForwardedDInputRange: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type">, "label" | "ariaLabel" | keyof BaseProps | keyof LabelIconProps | "filledValue"> & BaseProps & LabelIconProps & {
4
+ label?: string | undefined;
5
+ ariaLabel?: string | undefined;
6
+ filledValue?: boolean | undefined;
7
+ } & import("react").RefAttributes<HTMLInputElement>>;
8
+ export default ForwardedDInputRange;
@@ -0,0 +1,2 @@
1
+ import DInputRange from './DInputRange';
2
+ export default DInputRange;
@@ -1,15 +1,17 @@
1
1
  import type { FocusEvent, MouseEvent } from 'react';
2
- import type { BaseProps, EndIconProps, LabelIconProps, StartIconProps } from '../interface';
2
+ import type { BaseProps, EndIconProps, FamilyIconProps, LabelIconProps, StartIconProps, StateIcons } from '../interface';
3
3
  export type DefaultOption = {
4
4
  value: string | number;
5
5
  label: string;
6
6
  };
7
- export type Props<T> = BaseProps & LabelIconProps & StartIconProps & EndIconProps & {
7
+ export type Props<T> = BaseProps & FamilyIconProps & LabelIconProps & StartIconProps & EndIconProps & StateIcons & {
8
8
  id?: string;
9
9
  name?: string;
10
10
  label?: string;
11
11
  disabled?: boolean;
12
12
  loading?: boolean;
13
+ invalid?: boolean;
14
+ valid?: boolean;
13
15
  hint?: string;
14
16
  floatingLabel?: boolean;
15
17
  onBlur?: (event: FocusEvent) => void;
@@ -21,4 +23,4 @@ export type Props<T> = BaseProps & LabelIconProps & StartIconProps & EndIconProp
21
23
  valueExtractor?: (item: T) => string | number;
22
24
  labelExtractor?: (item: T) => string;
23
25
  };
24
- export default function DInputSelect<T extends object = DefaultOption>({ id, name, label, className, style, options, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled, loading, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, hint, value, floatingLabel, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }: Props<T>): import("react/jsx-runtime").JSX.Element;
26
+ export default function DInputSelect<T extends object = DefaultOption>({ id: idProp, name, label, className, style, options, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, disabled, loading, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconFamilyClass, iconFamilyPrefix, iconMaterialStyle, invalidIcon: invalidIconProp, validIcon: validIconProp, hint, value, floatingLabel, invalid, valid, valueExtractor, labelExtractor, onChange, onBlur, onIconStartClick, onIconEndClick, }: Props<T>): import("react/jsx-runtime").JSX.Element;
@@ -1,13 +1,13 @@
1
1
  import type { BaseProps } from '../interface';
2
2
  type Props = BaseProps & {
3
+ id?: string;
3
4
  label?: string;
4
5
  ariaLabel?: string;
5
- id: string;
6
6
  name?: string;
7
7
  checked?: boolean;
8
8
  disabled?: boolean;
9
9
  readonly?: boolean;
10
10
  onChange?: (isChecked: boolean) => void;
11
11
  };
12
- export default function DInputSwitch({ label, ariaLabel, id, name, checked, disabled, readonly, className, style, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export default function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, readonly, className, style, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { ChangeEvent } from 'react';
2
2
  import type { BaseProps } from '../interface';
3
3
  type Props = BaseProps & {
4
- id: string;
4
+ id?: string;
5
5
  name: string;
6
6
  value: string;
7
7
  line1: string;
@@ -10,5 +10,5 @@ type Props = BaseProps & {
10
10
  checked?: boolean;
11
11
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
12
12
  };
13
- export default function DQuickActionCheck({ id, name, value, line1, line2, line3, className, style, checked, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
13
+ export default function DQuickActionCheck({ id: idProp, name, value, line1, line2, line3, className, style, checked, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
14
14
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { ChangeEvent } from 'react';
2
2
  import type { BaseProps } from '../interface';
3
3
  type Props = BaseProps & {
4
- id: string;
4
+ id?: string;
5
5
  name: string;
6
6
  value: string;
7
7
  line1: string;
@@ -9,5 +9,5 @@ type Props = BaseProps & {
9
9
  selected?: boolean;
10
10
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
11
11
  };
12
- export default function DQuickActionSelect({ id, name, value, line1, line2, className, style, selected, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
12
+ export default function DQuickActionSelect({ id: idProp, name, value, line1, line2, className, style, selected, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,6 +1,6 @@
1
1
  import type { BaseProps } from '../interface';
2
2
  type Props = BaseProps & {
3
- id: string;
3
+ id?: string;
4
4
  name?: string;
5
5
  label: string;
6
6
  hint: string;
@@ -8,5 +8,5 @@ type Props = BaseProps & {
8
8
  disabled?: boolean;
9
9
  onClick?: (isChecked: boolean | undefined) => void;
10
10
  };
11
- export default function DQuickActionSwitch({ id, name, label, hint, checked, disabled, className, style, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
11
+ export default function DQuickActionSwitch({ id: idProp, name, label, hint, checked, disabled, className, style, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
12
12
  export {};
@@ -8,13 +8,14 @@ export type DTabOption = {
8
8
  };
9
9
  export type TabVariant = 'tabs' | 'pills' | 'underline';
10
10
  type Props = BaseProps & PropsWithChildren<{
11
+ classNameTab?: string;
11
12
  onChange: (option: DTabOption) => void;
12
13
  options: Array<DTabOption>;
13
14
  defaultSelected: string;
14
15
  vertical?: boolean;
15
16
  variant?: TabVariant;
16
17
  }>;
17
- declare function DTabs({ children, defaultSelected, onChange, options, className, style, vertical, variant, }: Props): import("react/jsx-runtime").JSX.Element;
18
+ declare function DTabs({ children, defaultSelected, onChange, options, className, classNameTab, style, vertical, variant, }: Props): import("react/jsx-runtime").JSX.Element;
18
19
  declare const _default: typeof DTabs & {
19
20
  Tab: typeof DTabContent;
20
21
  };
@@ -0,0 +1,11 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import DToastHeader from './components/DToastHeader';
3
+ import DToastBody from './components/DToastBody';
4
+ import { BaseProps } from '../interface';
5
+ type Props = PropsWithChildren<BaseProps>;
6
+ declare function DToast({ children, className, style }: Props): import("react/jsx-runtime").JSX.Element;
7
+ declare const _default: typeof DToast & {
8
+ Header: typeof DToastHeader;
9
+ Body: typeof DToastBody;
10
+ };
11
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { BaseProps } from '../../interface';
3
+ type Props = PropsWithChildren<BaseProps>;
4
+ export default function DToastBody({ children, className, style }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,5 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { BaseProps } from '../../interface';
3
+ type Props = PropsWithChildren<BaseProps>;
4
+ export default function DToastHeader({ children, className, style }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,4 @@
1
+ import DToast from './DToast';
2
+ export { default as DToastHeader } from './components/DToastHeader';
3
+ export { default as DToastBody } from './components/DToastBody';
4
+ export default DToast;
@@ -21,6 +21,7 @@ export { default as DInputCheck } from './DInputCheck';
21
21
  export { default as DInputPin } from './DInputPin';
22
22
  export { default as DInputSelect, DInputSelectDefaultOption, DInputSelectProps } from './DInputSelect';
23
23
  export { default as DInputSwitch } from './DInputSwitch';
24
+ export { default as DInputRange } from './DInputRange';
24
25
  export { default as DSelect } from './DSelect';
25
26
  export { default as DList, DListItem, } from './DList';
26
27
  export { default as DModal, DModalHeader, DModalBody, DModalFooter, } from './DModal';
@@ -38,4 +39,5 @@ export { default as DStepperDesktop } from './DStepperDesktop';
38
39
  export { default as DStepperMobile } from './DStepperMobile';
39
40
  export { default as DTooltip } from './DTooltip';
40
41
  export { default as DTabs, useTabContext, DTabOption, DTabContent, } from './DTabs';
42
+ export { default as DToast } from './DToast';
41
43
  export { default as DToastContainer, useDToast, } from './DToastContainer';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sideEffects": [
4
4
  "*.css"
5
5
  ],
6
- "version": "1.24.0",
6
+ "version": "1.26.0",
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": {
@@ -116,7 +116,6 @@
116
116
  "autoprefixer": "^10.4.16",
117
117
  "axe-playwright": "^1.2.3",
118
118
  "babel-loader": "^9.1.3",
119
- "bootstrap": "^5.3.2",
120
119
  "eslint": "^8.52.0",
121
120
  "eslint-config-airbnb": "^19.0.4",
122
121
  "eslint-config-airbnb-typescript": "^17.1.0",
@@ -156,5 +155,5 @@
156
155
  "optional": true
157
156
  }
158
157
  },
159
- "gitHead": "9152b65367486ebe3ac167e46cc6b48d0aeed336"
158
+ "gitHead": "21163ab260bbaf17d9ec5793a45fd24574649114"
160
159
  }
@@ -24,7 +24,8 @@ $focus-ring-color: var(--#{$prefix}focus-ring-color) !default;
24
24
  // scss-docs-end focus-ring-variables
25
25
 
26
26
  $component-active-color: var(--#{$prefix}white) !default;
27
- $component-active-bg: $focus-ring-color !default;
27
+ $component-active-bg: var(--#{$prefix}primary) !default;
28
+ $component-focus-shadow: 0 0 0 4px rgba(var(--#{$prefix}primary-rgb), .4) !default;
28
29
 
29
30
  $transition-fade: opacity .3s linear !default;
30
31
 
@@ -120,9 +120,13 @@ $form-select-box-shadow: none !default;
120
120
 
121
121
  // scss-docs-start form-range-variables
122
122
  $form-range-track-bg: var(--#{$prefix}gray-300) !default;
123
+ $form-range-track-height: $spacer-1 !default;
124
+ $form-range-track-border-radius: var(--#{$prefix}ref-spacer-6) !default;
125
+ $form-range-track-box-shadow: none !default;
123
126
 
127
+ $form-range-thumb-width: $spacer-4 !default;
124
128
  $form-range-thumb-box-shadow: 0 .1rem .25rem rgba(var(--#{$prefix}black-rgb), .1) !default;
125
- $form-range-thumb-focus-box-shadow: 0 0 0 1px var(--#{$prefix}body-bg), $input-focus-box-shadow !default;
129
+ $form-range-thumb-focus-box-shadow: $component-focus-shadow !default;
126
130
  $form-range-thumb-active-bg: $component-active-bg !default;
127
131
  $form-range-thumb-disabled-bg: var(--#{$prefix}gray-500) !default;
128
132
  // scss-docs-end form-range-variables
@@ -40,6 +40,7 @@
40
40
  @import "form-switch";
41
41
  @import "form-check";
42
42
  @import "form-control";
43
+ @import "form-range";
43
44
  @import "form-text";
44
45
  @import "input-group";
45
46
  @import "buttons";
@@ -0,0 +1,52 @@
1
+ .form-range {
2
+
3
+ &.form-range-value-indicator {
4
+ &::-webkit-slider-runnable-track {
5
+ background:
6
+ linear-gradient(
7
+ to right,
8
+ $component-active-bg 0%,
9
+ $component-active-bg var(--#{$prefix}form-range-component-value),
10
+ $form-range-track-bg var(--#{$prefix}form-range-component-value),
11
+ $form-range-track-bg 100%
12
+ );
13
+ }
14
+
15
+ &::-moz-range-track {
16
+ background:
17
+ linear-gradient(
18
+ to right,
19
+ $component-active-bg 0%,
20
+ $component-active-bg var(--#{$prefix}form-range-component-value),
21
+ $form-range-track-bg var(--#{$prefix}form-range-component-value),
22
+ $form-range-track-bg 100%
23
+ );
24
+ }
25
+ }
26
+
27
+ &:disabled {
28
+ &.form-range-value-indicator {
29
+ &::-webkit-slider-runnable-track {
30
+ background:
31
+ linear-gradient(
32
+ to right,
33
+ $form-range-thumb-disabled-bg 0%,
34
+ $form-range-thumb-disabled-bg var(--#{$prefix}form-range-component-value),
35
+ $form-range-track-bg var(--#{$prefix}form-range-component-value),
36
+ $form-range-track-bg 100%
37
+ );
38
+ }
39
+
40
+ &::-moz-range-track {
41
+ background:
42
+ linear-gradient(
43
+ to right,
44
+ $form-range-thumb-disabled-bg 0%,
45
+ $form-range-thumb-disabled-bg var(--#{$prefix}form-range-component-value),
46
+ $form-range-track-bg var(--#{$prefix}form-range-component-value),
47
+ $form-range-track-bg 100%
48
+ );
49
+ }
50
+ }
51
+ }
52
+ }
@@ -76,7 +76,7 @@
76
76
  $tooltip-bg-color: map-get($data, "tooltip-bg-color");
77
77
  $box-shadow: map-get($data, "focus-box-shadow");
78
78
 
79
- &:has(.form-control.is-#{$state}) {
79
+ &:has(.form-control.is-#{$state}, .form-select.is-#{$state}) {
80
80
  border-color: $border-color;
81
81
  box-shadow: $box-shadow;
82
82
 
@@ -5,6 +5,7 @@
5
5
 
6
6
  // select
7
7
  --#{$prefix}select-menu-shadow: #{$box-shadow-sm};
8
+ --#{$prefix}select-menu-z-index: #{$zindex-dropdown};
8
9
  --#{$prefix}select-option-focus-bg: var(--#{$prefix}gray-100);
9
10
  --#{$prefix}select-option-selected-color: var(--#{$prefix}secondary);
10
11
  --#{$prefix}select-option-selected-bg: var(--#{$prefix}gray-100);
@@ -101,6 +102,7 @@
101
102
  // select menu
102
103
  .d-select__menu-list {
103
104
  top: calc(var(--#{$prefix}input-border-width) * 2);
105
+ z-index: var(--#{$prefix}select-menu-z-index);
104
106
  margin: calc(var(--#{$prefix}input-border-width) * -1);
105
107
  background: $input-bg;
106
108
  border-radius: var(--#{$prefix}input-border-radius);