@dynamic-framework/ui-react 1.11.0 → 1.12.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 (45) hide show
  1. package/dist/css/dynamic-ui-non-root.css +784 -17
  2. package/dist/css/dynamic-ui-non-root.min.css +1 -1
  3. package/dist/css/dynamic-ui.css +784 -17
  4. package/dist/css/dynamic-ui.min.css +1 -1
  5. package/dist/index.esm.js +83 -159
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.js +92 -166
  8. package/dist/index.js.map +1 -1
  9. package/dist/types/components/DAlert/DAlert.d.ts +15 -0
  10. package/dist/types/components/DAlert/index.d.ts +2 -0
  11. package/dist/types/components/DButton/DButton.d.ts +2 -1
  12. package/dist/types/components/DInputMask/DInputMask.d.ts +16 -0
  13. package/dist/types/components/DInputMask/index.d.ts +2 -0
  14. package/dist/types/components/DModal/DModal.d.ts +2 -2
  15. package/dist/types/components/DToastContainer/useToast.d.ts +2 -2
  16. package/dist/types/components/DTooltip/DTooltip.d.ts +3 -2
  17. package/dist/types/components/config.d.ts +2 -2
  18. package/dist/types/components/index.d.ts +2 -2
  19. package/dist/types/components/interface.d.ts +3 -4
  20. package/dist/types/contexts/DModalContext.d.ts +31 -0
  21. package/dist/types/contexts/DOffcanvasContext.d.ts +31 -0
  22. package/dist/types/contexts/index.d.ts +2 -2
  23. package/dist/types/hooks/index.d.ts +2 -0
  24. package/dist/types/hooks/useDisableBodyScrollEffect.d.ts +1 -0
  25. package/dist/types/hooks/usePortal.d.ts +3 -0
  26. package/package.json +3 -2
  27. package/src/style/abstracts/_maps.scss +1 -1
  28. package/src/style/abstracts/_utilities.scss +2 -5
  29. package/src/style/abstracts/variables/_box-file.scss +1 -0
  30. package/src/style/abstracts/variables/_modals.scss +4 -0
  31. package/src/style/abstracts/variables/_offcanvas.scss +1 -0
  32. package/src/style/abstracts/variables/_typography.scss +1 -0
  33. package/src/style/components/_+import.scss +2 -1
  34. package/src/style/components/{_d-toast.scss → _d-alert.scss} +12 -11
  35. package/src/style/components/_d-box-file.scss +2 -0
  36. package/src/style/components/_d-button.scss +67 -3
  37. package/src/style/components/_d-modal.scss +16 -4
  38. package/src/style/components/_d-offcanvas.scss +4 -0
  39. package/src/style/components/_d-tooltip.scss +35 -0
  40. package/dist/types/components/DAlertBox/DAlertBox.d.ts +0 -9
  41. package/dist/types/components/DAlertBox/index.d.ts +0 -2
  42. package/dist/types/components/DToast/DToast.d.ts +0 -14
  43. package/dist/types/components/DToast/index.d.ts +0 -2
  44. package/dist/types/contexts/ModalContext.d.ts +0 -44
  45. package/dist/types/contexts/OffcanvasContext.d.ts +0 -44
@@ -0,0 +1,15 @@
1
+ import type { PropsWithChildren } from 'react';
2
+ import type { AlertType, BaseProps } from '../interface';
3
+ type Props = BaseProps & PropsWithChildren<{
4
+ id?: string;
5
+ type?: AlertType;
6
+ icon?: string;
7
+ iconFamilyClass?: string;
8
+ iconFamilyPrefix?: string;
9
+ showIcon?: boolean;
10
+ showClose?: boolean;
11
+ soft?: boolean;
12
+ onClose?: () => void;
13
+ }>;
14
+ export default function DAlert({ type, icon, iconFamilyClass, iconFamilyPrefix, showIcon, soft, showClose, onClose, children, id, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ import DAlert from './DAlert';
2
+ export default DAlert;
@@ -15,7 +15,8 @@ type Props = BaseProps & StartIconProps & EndIconProps & {
15
15
  loadingAriaLabel?: string;
16
16
  disabled?: boolean;
17
17
  stopPropagationEnabled?: boolean;
18
+ form?: string;
18
19
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
19
20
  };
20
- export default function DButton({ theme, size, variant, state, text, ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, value, type, pill, loading, loadingAriaLabel, disabled, stopPropagationEnabled, className, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
21
+ export default function DButton({ theme, size, variant, state, text, ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, value, type, pill, loading, loadingAriaLabel, disabled, stopPropagationEnabled, className, form, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
21
22
  export {};
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import type { MaskProps } from '@react-input/mask';
3
+ declare const ForwardedDInputMask: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "onChange">, "value" | "loading" | "label" | "invalid" | "onChange" | keyof import("../interface").BaseProps | keyof import("../interface").FamilyIconProps | keyof import("../interface").LabelIconProps | keyof import("../interface").StartIconProps | keyof import("../interface").EndIconProps | "hint" | "valid" | "floatingLabel" | "inputStart" | "onIconStartClick" | "onIconEndClick"> & import("../interface").BaseProps & import("../interface").FamilyIconProps & import("../interface").LabelIconProps & import("../interface").StartIconProps & import("../interface").EndIconProps & {
4
+ value?: string | undefined;
5
+ label?: string | undefined;
6
+ loading?: boolean | undefined;
7
+ hint?: string | undefined;
8
+ invalid?: boolean | undefined;
9
+ valid?: boolean | undefined;
10
+ floatingLabel?: boolean | undefined;
11
+ inputStart?: import("react").ReactNode;
12
+ onChange?: ((value: string) => void) | undefined;
13
+ onIconStartClick?: ((value?: string | undefined) => void) | undefined;
14
+ onIconEndClick?: ((value?: string | undefined) => void) | undefined;
15
+ } & import("react").RefAttributes<HTMLInputElement>, "ref">, keyof MaskProps> & MaskProps & import("react").RefAttributes<HTMLInputElement>>;
16
+ export default ForwardedDInputMask;
@@ -0,0 +1,2 @@
1
+ import DInputMask from './DInputMask';
2
+ export default DInputMask;
@@ -10,9 +10,9 @@ type Props = BaseProps & PropsWithChildren<{
10
10
  centered?: boolean;
11
11
  fullScreen?: boolean;
12
12
  fullScreenFrom?: ModalFullScreenFrom;
13
- modalSize?: ModalSize;
13
+ size?: ModalSize;
14
14
  }>;
15
- declare function DModal({ name, className, style, staticBackdrop, scrollable, centered, fullScreen, fullScreenFrom, modalSize, children, }: Props): import("react/jsx-runtime").JSX.Element;
15
+ declare function DModal({ name, className, style, staticBackdrop, scrollable, centered, fullScreen, fullScreenFrom, size, children, }: Props): import("react/jsx-runtime").JSX.Element;
16
16
  declare const _default: typeof DModal & {
17
17
  Header: typeof DModalHeader;
18
18
  Body: typeof DModalBody;
@@ -1,7 +1,7 @@
1
1
  import type { ToastPosition } from 'react-toastify';
2
- import type { ToastType } from '../interface';
2
+ import type { AlertType } from '../interface';
3
3
  export type ToastConfig = {
4
- type?: ToastType;
4
+ type?: AlertType;
5
5
  showClose?: boolean;
6
6
  position?: ToastPosition;
7
7
  autoClose?: number | false;
@@ -2,15 +2,16 @@ import type { PropsWithChildren, ReactNode } from 'react';
2
2
  import type { Placement } from '@floating-ui/react';
3
3
  import type { BaseProps, ComponentSize } from '../interface';
4
4
  export type Props = BaseProps & PropsWithChildren<{
5
- classNameContainer?: string;
5
+ childrenClassName?: string;
6
6
  offSet?: number;
7
7
  padding?: number;
8
8
  withHover?: boolean;
9
9
  withFocus?: boolean;
10
10
  withClick?: boolean;
11
11
  open?: boolean;
12
+ theme?: string;
12
13
  size?: ComponentSize;
13
14
  placement?: Placement;
14
15
  Component: ReactNode;
15
16
  }>;
16
- export default function DTooltip({ classNameContainer, className, style, offSet, padding, withFocus, withClick, withHover, open, placement, size, Component, children, }: Props): import("react/jsx-runtime").JSX.Element;
17
+ export default function DTooltip({ className, childrenClassName, style, offSet, padding, withFocus, withClick, withHover, open, theme, placement, size, Component, children, }: Props): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { ToastTypeIconMap } from './interface';
1
+ import { AlertTypeIconMap } from './interface';
2
2
  export declare const PREFIX_BS = "bs-";
3
3
  export declare const ICON_FAMILY_CLASS = "bi";
4
4
  export declare const ICON_FAMILY_PREFIX = "bi-";
5
- export declare const ALERT_TYPE_ICON: ToastTypeIconMap;
5
+ export declare const ALERT_TYPE_ICON: AlertTypeIconMap;
@@ -1,6 +1,5 @@
1
1
  export * from './banking';
2
- export { default as DToast } from './DToast';
3
- export { default as DAlertBox } from './DAlertBox';
2
+ export { default as DAlert } from './DAlert';
4
3
  export { default as DBadge } from './DBadge';
5
4
  export { default as DBoxFile } from './DBoxFile';
6
5
  export { default as DButton } from './DButton';
@@ -14,6 +13,7 @@ export { default as DCurrencyText } from './DCurrencyText';
14
13
  export { default as DDatePicker } from './DDatePicker';
15
14
  export { default as DIcon } from './DIcon';
16
15
  export { default as DInput } from './DInput';
16
+ export { default as DInputMask } from './DInputMask';
17
17
  export { default as DInputCounter } from './DInputCounter';
18
18
  export { default as DInputCurrencyBase } from './DInputCurrencyBase';
19
19
  export { default as DInputCurrency } from './DInputCurrency';
@@ -39,11 +39,10 @@ export type EndIconProps = {
39
39
  iconEndAriaLabel?: string;
40
40
  iconEndTabIndex?: number;
41
41
  };
42
- export type ToastType = 'success' | 'info' | 'warning' | 'danger' | 'light' | 'dark';
43
- export type ToastTypeIconMap = {
44
- [state in ToastType]: string;
42
+ export type AlertType = 'success' | 'info' | 'warning' | 'danger' | 'light' | 'dark' | 'primary' | 'secondary';
43
+ export type AlertTypeIconMap = {
44
+ [state in AlertType]: string;
45
45
  };
46
- export type AlertBoxTheme = 'box-info' | 'box-white' | 'box-secondary';
47
46
  export type ButtonVariant = 'outline' | 'link';
48
47
  export type ButtonType = 'submit' | 'reset' | 'button';
49
48
  export type InputCheckType = 'checkbox' | 'radio';
@@ -0,0 +1,31 @@
1
+ import type { PropsWithChildren, FC } from 'react';
2
+ type ModalComponent<P = any> = FC<ModalProps<P>>;
3
+ type ModalAvailableList<T extends Record<string, unknown>> = {
4
+ [K in keyof T]: ModalComponent<T[K]>;
5
+ };
6
+ type Props<T extends Record<string, unknown>> = PropsWithChildren<{
7
+ portalName: string;
8
+ availableModals: ModalAvailableList<T>;
9
+ }>;
10
+ type ModalStackItem<N extends string = string, P = any> = {
11
+ modalName: N;
12
+ Component: ModalComponent<P>;
13
+ payload: P;
14
+ };
15
+ type OpenModalFunction<P = unknown> = (name: string, payload: P) => void;
16
+ type CloseModalFunction = () => void;
17
+ type ModalContextType<T extends Record<string, unknown>> = {
18
+ stack: ModalStackItem<string, T[keyof T]>[];
19
+ openModal: OpenModalFunction<T[keyof T]>;
20
+ closeModal: CloseModalFunction;
21
+ };
22
+ export type ModalProps<P = unknown> = {
23
+ name: string;
24
+ payload: P;
25
+ openModal: OpenModalFunction<P>;
26
+ closeModal: CloseModalFunction;
27
+ };
28
+ export declare const DModalContext: import("react").Context<ModalContextType<any> | undefined>;
29
+ export declare function DModalContextProvider<T extends Record<string, unknown>>({ portalName, children, availableModals, }: Props<T>): import("react/jsx-runtime").JSX.Element;
30
+ export declare function useDModalContext<T extends Record<string, unknown>>(): ModalContextType<T>;
31
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { PropsWithChildren, FC } from 'react';
2
+ type OffcanvasComponent<P = any> = FC<OffcanvasProps<P>>;
3
+ type OffcanvasAvailableList<T extends Record<string, unknown>> = {
4
+ [K in keyof T]: OffcanvasComponent<T[K]>;
5
+ };
6
+ type Props<T extends Record<string, unknown>> = PropsWithChildren<{
7
+ portalName: string;
8
+ availableOffcanvas: OffcanvasAvailableList<T>;
9
+ }>;
10
+ type OffcanvasStackItem<N extends string = string, P = any> = {
11
+ offcanvasName: N;
12
+ Component: OffcanvasComponent<P>;
13
+ payload: P;
14
+ };
15
+ type OpenOffcanvasFunction<P = unknown> = (name: string, payload: P) => void;
16
+ type CloseOffcanvasFunction = () => void;
17
+ type OffcanvasContextType<T extends Record<string, unknown>> = {
18
+ stack: OffcanvasStackItem<string, T[keyof T]>[];
19
+ openOffcanvas: OpenOffcanvasFunction<T[keyof T]>;
20
+ closeOffcanvas: CloseOffcanvasFunction;
21
+ };
22
+ export type OffcanvasProps<P = any> = {
23
+ name: string;
24
+ payload: P;
25
+ openOffcanvas: OpenOffcanvasFunction<P>;
26
+ closeOffcanvas: CloseOffcanvasFunction;
27
+ };
28
+ export declare const DOffcanvasContext: import("react").Context<OffcanvasContextType<any> | undefined>;
29
+ export declare function DOffcanvasContextProvider<T extends Record<string, unknown>>({ portalName, children, availableOffcanvas, }: Props<T>): import("react/jsx-runtime").JSX.Element;
30
+ export declare function useDOffcanvasContext<T extends Record<string, unknown>>(): OffcanvasContextType<T>;
31
+ export {};
@@ -1,3 +1,3 @@
1
1
  export * from './DContext';
2
- export * from './ModalContext';
3
- export * from './OffcanvasContext';
2
+ export * from './DModalContext';
3
+ export * from './DOffcanvasContext';
@@ -2,3 +2,5 @@ export { default as useFormatCurrency } from './useFormatCurrency';
2
2
  export { default as useInputCurrency } from './useInputCurrency';
3
3
  export { default as useProvidedRefOrCreate } from './useProvidedRefOrCreate';
4
4
  export { default as useStackState } from './useStackState';
5
+ export { default as useDisableBodyScrollEffect } from './useDisableBodyScrollEffect';
6
+ export { default as usePortal } from './usePortal';
@@ -0,0 +1 @@
1
+ export default function useDisableBodyScrollEffect(disable: boolean): void;
@@ -0,0 +1,3 @@
1
+ export default function usePortal(portalName: string): {
2
+ created: boolean;
3
+ };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sideEffects": [
4
4
  "*.css"
5
5
  ],
6
- "version": "1.11.0",
6
+ "version": "1.12.0",
7
7
  "description": "React Dynamic Framework",
8
8
  "license": "MIT",
9
9
  "repository": {
@@ -67,6 +67,7 @@
67
67
  ],
68
68
  "dependencies": {
69
69
  "@floating-ui/react": "^0.26.1",
70
+ "@react-input/mask": "^1.0.20",
70
71
  "@splidejs/react-splide": "^0.7.12",
71
72
  "@splidejs/splide": "^4.1.4",
72
73
  "bootstrap": "^5.3.2",
@@ -143,5 +144,5 @@
143
144
  "react-dom": "^18.2.0",
144
145
  "react-i18next": "^13.3.1"
145
146
  },
146
- "gitHead": "3c33b40ebe68b56e1f5e073a05c76ada032214ed"
147
+ "gitHead": "df024b0bce28372ce5a296946faf8c080751c84f"
147
148
  }
@@ -1,6 +1,6 @@
1
1
  // Theme maps
2
2
 
3
- $alert-boxes: (
3
+ $alert-soft: (
4
4
  "secondary": (var(--#{$prefix}secondary-100), var(--#{$prefix}secondary)),
5
5
  "white": (var(--#{$prefix}white), var(--#{$prefix}secondary)),
6
6
  "info": (var(--#{$prefix}info-100), var(--#{$prefix}info)),
@@ -21,7 +21,7 @@ $utilities: map-merge(
21
21
  values: map-merge(
22
22
  map-get(map-get($utilities, "color"), "values"),
23
23
  // TODO: try to move the map-loop to $utilities-text map libraries/dynamic-ui/node_modules/bootstrap/scss/_maps.scss
24
- map-loop($palette-grays, rgba-css-var, "$key", "text"),
24
+ map-loop(map-merge-multiple($theme-colors-palletes, $palette-grays), rgba-css-var, "$key", "text"),
25
25
  )
26
26
  )
27
27
  ),
@@ -31,10 +31,7 @@ $utilities: map-merge(
31
31
  values: map-merge(
32
32
  map-get(map-get($utilities, "background-color"), "values"),
33
33
  // TODO: try to move the map-loop to $utilities-bg map libraries/dynamic-ui/node_modules/bootstrap/scss/_maps.scss
34
- map-merge(
35
- map-loop($palette-grays, rgba-css-var, "$key", "bg"),
36
- map-loop($bg-soft-colors, rgba-css-var, "$key", "bg")
37
- )
34
+ map-loop(map-merge-multiple($theme-colors-palletes, $palette-grays, $bg-soft-colors), rgba-css-var, "$key", "bg"),
38
35
  )
39
36
  )
40
37
  ),
@@ -1,4 +1,5 @@
1
1
  $box-file-gap: var(--#{$prefix}ref-spacer-3) !default;
2
+ $box-file-background: unset !default;
2
3
  $box-file-border: 1px dashed var(--#{$prefix}gray-700) !default;
3
4
  $box-file-border-radius: var(--#{$prefix}border-radius) !default;
4
5
  $box-file-padding: var(--#{$prefix}ref-spacer-5) !default;
@@ -3,6 +3,10 @@
3
3
  // scss-docs-start modal-variables
4
4
  $modal-inner-padding: 0 !default;
5
5
 
6
+ // custom
7
+ $modal-header-gap: $spacer-4 !default;
8
+ // end custom
9
+
6
10
  $modal-footer-margin-between: $spacer-3 !default;
7
11
 
8
12
  $modal-dialog-margin: .5rem !default;
@@ -3,6 +3,7 @@
3
3
  // scss-docs-start offcanvas-variables
4
4
  $offcanvas-padding-y: $spacer-4 !default;
5
5
  // custom
6
+ $offcanvas-header-gap: $spacer-4 !default;
6
7
  $offcanvas-footer-gap: $spacer-4 !default;
7
8
  // end custom
8
9
  $offcanvas-padding-x: $spacer-4 !default;
@@ -51,6 +51,7 @@ $font-sizes: (
51
51
  $headings-margin-bottom: 0 !default;
52
52
  $headings-font-family: null !default;
53
53
  $headings-font-style: null !default;
54
+ $headings-font-weight: $font-weight-bold !default;
54
55
  $headings-line-height: 1.2 !default;
55
56
  $headings-color: null !default;
56
57
  // scss-docs-end headings-variables
@@ -37,7 +37,7 @@
37
37
  @import "d-quick-action-check";
38
38
  @import "d-quick-action-switch";
39
39
  @import "d-progress";
40
- @import "d-toast";
40
+ @import "d-alert";
41
41
  @import "d-badge";
42
42
  @import "d-chip";
43
43
  @import "d-modal";
@@ -55,6 +55,7 @@
55
55
  @import "d-stepper-mobile";
56
56
  @import "d-paginator";
57
57
  @import "d-card-account";
58
+ @import "d-tooltip";
58
59
 
59
60
  // TODO: review.
60
61
  @import "d-permission-group";
@@ -1,7 +1,7 @@
1
1
  .alert {
2
2
  --#{$prefix}alert-gap: #{$alert-gap};
3
3
  --#{$prefix}alert-box-shadow: #{$alert-box-shadow};
4
- --#{$prefix}alert-icon-color: var(--#{$prefix}alert-component-icon-color, var(--#{$prefix}alert-color));
4
+ --#{$prefix}alert-icon-color: var(--#{$prefix}alert-color);
5
5
  --#{$prefix}alert-separator-opacity: var(--#{$prefix}alert-component-separator-opacity);
6
6
  --#{$prefix}alert-close-icon-size: #{$alert-close-icon-size};
7
7
 
@@ -45,21 +45,22 @@
45
45
  }
46
46
  }
47
47
 
48
- &.alert-box {
48
+ &.alert-soft {
49
49
  --#{$prefix}alert-color: var(--#{$prefix}gray-900);
50
-
51
50
  border-width: 0 0 0 5px;
52
51
 
53
- @each $theme, $value in $alert-boxes {
54
- $background: nth($value, 1);
55
- $color: nth($value, 2);
56
-
57
- &.alert-box-#{$theme} {
58
- --#{$prefix}alert-icon-color: #{$color};
59
- --#{$prefix}alert-border-color: #{$color};
52
+ @each $theme, $value in map-remove($theme-colors, "light", "dark") {
53
+ &.alert-#{$theme} {
54
+ --#{$prefix}alert-icon-color: var(--#{$prefix}#{$theme}-500);
60
55
 
61
- --#{$prefix}alert-bg: #{$background};
56
+ --#{$prefix}alert-bg: var(--#{$prefix}#{$theme}-100);
62
57
  }
63
58
  }
59
+
60
+ &.alert-light {
61
+ --#{$prefix}alert-icon-color: var(--#{$prefix}secondary-500);
62
+ --#{$prefix}alert-border-color: var(--#{$prefix}secondary-500);
63
+ --#{$prefix}alert-bg: var(--#{$prefix}white);
64
+ }
64
65
  }
65
66
  }
@@ -1,5 +1,6 @@
1
1
  .d-box-file {
2
2
  --#{$prefix}box-file-gap: #{$box-file-gap};
3
+ --#{$prefix}box-file-bg: #{$box-file-background};
3
4
  --#{$prefix}box-file-border: #{$box-file-border};
4
5
  --#{$prefix}box-file-border-radius: #{$box-file-border-radius};
5
6
  --#{$prefix}box-file-padding: #{$box-file-padding};
@@ -18,6 +19,7 @@
18
19
  gap: var(--#{$prefix}box-file-gap);
19
20
  width: 100%;
20
21
  cursor: pointer;
22
+ background: var(--#{$prefix}box-file-bg);
21
23
  border: var(--#{$prefix}box-file-border);
22
24
  border-radius: var(--#{$prefix}box-file-border-radius);
23
25
 
@@ -121,13 +121,37 @@
121
121
  }
122
122
  }
123
123
 
124
- @each $color, $value in map-remove($theme-colors, "light", "dark") {
124
+ @each $color, $value in $theme-colors {
125
125
  .btn-#{$color} {
126
- @include df-button-variant($color);
126
+ @if $color == "light" { // default bootstrap style
127
+ @include button-variant(
128
+ $value,
129
+ $value,
130
+ $hover-background: shade-color($value, $btn-hover-bg-shade-amount),
131
+ $hover-border: shade-color($value, $btn-hover-border-shade-amount),
132
+ $active-background: shade-color($value, $btn-active-bg-shade-amount),
133
+ $active-border: shade-color($value, $btn-active-border-shade-amount)
134
+ );
135
+ } @else if $color == "dark" { // default bootstrap style
136
+ @include button-variant(
137
+ $value,
138
+ $value,
139
+ $hover-background: tint-color($value, $btn-hover-bg-tint-amount),
140
+ $hover-border: tint-color($value, $btn-hover-border-tint-amount),
141
+ $active-background: tint-color($value, $btn-active-bg-tint-amount),
142
+ $active-border: tint-color($value, $btn-active-border-tint-amount)
143
+ );
144
+ } @else {
145
+ @include df-button-variant($color);
146
+ }
127
147
  }
128
148
 
129
149
  .btn-outline-#{$color} {
130
- @include df-button-outline-variant($color);
150
+ @if $color == "light" or $color == "dark" { // default bootstrap style
151
+ @include button-outline-variant($value);
152
+ } @else {
153
+ @include df-button-outline-variant($color);
154
+ }
131
155
  }
132
156
 
133
157
  .btn-link-#{$color} {
@@ -160,3 +184,43 @@
160
184
  background-image: none;
161
185
  }
162
186
  }
187
+
188
+ //
189
+ // Link buttons
190
+ //
191
+
192
+ // Make a button look and behave like a link
193
+ .btn-link {
194
+ --#{$prefix}btn-font-weight: #{$font-weight-normal};
195
+ --#{$prefix}btn-color: #{$btn-link-color};
196
+ --#{$prefix}btn-bg: transparent;
197
+ --#{$prefix}btn-border-color: transparent;
198
+ --#{$prefix}btn-hover-color: #{$btn-link-hover-color};
199
+ --#{$prefix}btn-hover-border-color: transparent;
200
+ --#{$prefix}btn-active-color: #{$btn-link-hover-color};
201
+ --#{$prefix}btn-active-border-color: transparent;
202
+ --#{$prefix}btn-disabled-color: #{$btn-link-disabled-color};
203
+ --#{$prefix}btn-disabled-border-color: transparent;
204
+ --#{$prefix}btn-box-shadow: 0 0 0 #000; // Can't use `none` as keyword negates all values when used with multiple shadows
205
+ --#{$prefix}btn-focus-shadow-rgb: #{$btn-link-focus-shadow-rgb};
206
+
207
+ text-decoration: $link-decoration;
208
+ @if $enable-gradients {
209
+ background-image: none;
210
+ }
211
+
212
+ &:hover,
213
+ &:focus-visible {
214
+ text-decoration: $link-hover-decoration;
215
+ }
216
+
217
+ &:focus-visible {
218
+ color: var(--#{$prefix}btn-color);
219
+ }
220
+
221
+ &:hover {
222
+ color: var(--#{$prefix}btn-hover-color);
223
+ }
224
+
225
+ // No need for an active state here
226
+ }
@@ -1,4 +1,5 @@
1
1
  .modal {
2
+ --#{$prefix}modal-header-gap: #{$offcanvas-header-gap};
2
3
  --#{$prefix}modal-body-padding: #{$modal-body-padding};
3
4
  --#{$prefix}modal-footer-padding: #{$modal-footer-padding};
4
5
  --#{$prefix}modal-separator-margin-x: #{$modal-separator-margin-x};
@@ -6,14 +7,19 @@
6
7
  --#{$prefix}modal-separator-bg: #{$modal-separator-bg};
7
8
 
8
9
  .modal-header {
9
- flex-direction: column;
10
- align-items: flex-start;
10
+ flex-direction: row;
11
+ gap: var(--#{$prefix}modal-header-gap);
12
+ align-items: center;
13
+ justify-content: space-between;
14
+
15
+ &:has(.d-modal-close:only-child) {
16
+ justify-content: flex-end;
17
+ }
11
18
  }
12
19
 
13
20
  .d-modal-close {
14
- align-self: flex-end;
21
+ align-self: flex-start;
15
22
  padding: 0;
16
- margin-bottom: $spacer-3;
17
23
  background: transparent;
18
24
  border: 0;
19
25
 
@@ -53,3 +59,9 @@
53
59
  justify-content: flex-end;
54
60
  }
55
61
  }
62
+
63
+ .d-portal {
64
+ .modal {
65
+ display: block;
66
+ }
67
+ }
@@ -1,8 +1,10 @@
1
1
  .offcanvas {
2
+ --#{$prefix}offcanvas-header-gap: #{$offcanvas-header-gap};
2
3
  --#{$prefix}offcanvas-footer-gap: #{$offcanvas-footer-gap};
3
4
 
4
5
  .offcanvas-header {
5
6
  flex-direction: row;
7
+ gap: var(--#{$prefix}offcanvas-header-gap);
6
8
  align-items: center;
7
9
  justify-content: space-between;
8
10
 
@@ -22,6 +24,7 @@
22
24
  }
23
25
 
24
26
  .d-offcanvas-close {
27
+ align-self: flex-start;
25
28
  padding: 0;
26
29
  background: transparent;
27
30
  border: 0;
@@ -43,3 +46,4 @@
43
46
  justify-content: flex-end;
44
47
  }
45
48
  }
49
+
@@ -0,0 +1,35 @@
1
+ .d-tooltip {
2
+ --#{$prefix}tooltip-font-size: var(--#{$prefix}tooltip-component-font-size, var(--#{$prefix}body-font-size));
3
+ --#{$prefix}tooltip-sm-font-size: var(--#{$prefix}ref-fs-small);
4
+ --#{$prefix}tooltip-lg-font-size: var(--#{$prefix}ref-fs-6);
5
+ --#{$prefix}tooltip-bg: var(--#{$prefix}tooltip-component-bg, transparent);
6
+ --#{$prefix}tooltip-border-radius: var(--#{$prefix}tooltip-component-border-radius, var(--#{$prefix}border-radius));
7
+ --#{$prefix}tooltip-color: var(--#{$prefix}tooltip-component-color, var(--#{$prefix}body-color));
8
+ --#{$prefix}tooltip-padding: var(--#{$prefix}tooltip-component-padding, var(--#{$prefix}ref-spacer-2));
9
+ --#{$prefix}tooltip-max-width: var(--#{$prefix}tooltip-component-max-width, 300px);
10
+ max-width: var(--#{$prefix}tooltip-max-width);
11
+ padding: var(--#{$prefix}tooltip-padding);
12
+
13
+ font-size: var(--#{$prefix}tooltip-font-size);
14
+ color: var(--#{$prefix}tooltip-color);
15
+ background: var(--#{$prefix}tooltip-bg);
16
+ border-radius: var(--#{$prefix}tooltip-border-radius);
17
+ fill: var(--#{$prefix}tooltip-bg);
18
+
19
+ &.d-tooltip-sm {
20
+ --#{$prefix}tooltip-font-size: var(--#{$prefix}tooltip-sm-font-size);
21
+ }
22
+
23
+ &.d-tooltip-lg {
24
+ --#{$prefix}tooltip-font-size: var(--#{$prefix}tooltip-lg-font-size);
25
+ }
26
+
27
+ @each $theme, $value in $theme-colors {
28
+ $color: color-contrast-var($value);
29
+
30
+ &.d-tooltip-#{$theme} {
31
+ --#{$prefix}tooltip-color: var(--#{$prefix}tooltip-component-color, #{$color});
32
+ --#{$prefix}tooltip-bg: var(--#{$prefix}tooltip-component-bg, var(--#{$prefix}#{$theme}));
33
+ }
34
+ }
35
+ }
@@ -1,9 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- import type { BaseProps, AlertBoxTheme, FamilyIconProps } from '../interface';
3
- type Props = BaseProps & FamilyIconProps & PropsWithChildren<{
4
- id?: string;
5
- theme?: AlertBoxTheme;
6
- icon?: string;
7
- }>;
8
- export default function DAlertBox({ theme, icon, iconFamilyClass, iconFamilyPrefix, children, id, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
9
- export {};
@@ -1,2 +0,0 @@
1
- import DAlertBox from './DAlertBox';
2
- export default DAlertBox;
@@ -1,14 +0,0 @@
1
- import type { PropsWithChildren } from 'react';
2
- import type { ToastType, BaseProps } from '../interface';
3
- type Props = BaseProps & PropsWithChildren<{
4
- id?: string;
5
- type?: ToastType;
6
- icon?: string;
7
- iconFamilyClass?: string;
8
- iconFamilyPrefix?: string;
9
- showIcon?: boolean;
10
- showClose?: boolean;
11
- onClose?: () => void;
12
- }>;
13
- export default function DToast({ type, icon, iconFamilyClass, iconFamilyPrefix, showIcon, showClose, onClose, children, id, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
14
- export {};
@@ -1,2 +0,0 @@
1
- import DToast from './DToast';
2
- export default DToast;