@dynamic-framework/ui-react 2.0.0-dev.3 → 2.0.0-dev.5

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 (33) hide show
  1. package/dist/css/dynamic-ui-non-root.css +294 -46
  2. package/dist/css/dynamic-ui-non-root.min.css +3 -3
  3. package/dist/css/dynamic-ui-root.css +2 -2
  4. package/dist/css/dynamic-ui-root.min.css +2 -2
  5. package/dist/css/dynamic-ui.css +294 -46
  6. package/dist/css/dynamic-ui.min.css +3 -3
  7. package/dist/index.esm.js +234 -25
  8. package/dist/index.esm.js.map +1 -1
  9. package/dist/index.js +268 -57
  10. package/dist/index.js.map +1 -1
  11. package/dist/types/components/DButton/DButton.d.ts +7 -17
  12. package/dist/types/components/DInputCheck/DInputCheck.d.ts +2 -1
  13. package/dist/types/components/DInputMask/DInputMask.d.ts +7 -17
  14. package/dist/types/components/DInputSwitch/DInputSwitch.d.ts +2 -1
  15. package/dist/types/components/DLayout/DLayout.d.ts +2 -1
  16. package/dist/types/components/DPasswordStrengthMeter/DPasswordStrengthMeter.d.ts +23 -0
  17. package/dist/types/components/DPasswordStrengthMeter/PasswordCheckItem.d.ts +7 -0
  18. package/dist/types/components/DPasswordStrengthMeter/PasswordCheckList.d.ts +14 -0
  19. package/dist/types/components/DPasswordStrengthMeter/PasswordStrength.d.ts +6 -0
  20. package/dist/types/components/DPasswordStrengthMeter/index.d.ts +3 -0
  21. package/dist/types/components/DVoucher/DVoucher.d.ts +14 -0
  22. package/dist/types/components/DVoucher/hooks/useScreenshot.d.ts +5 -0
  23. package/dist/types/components/DVoucher/hooks/useScreenshotDownload.d.ts +5 -0
  24. package/dist/types/components/DVoucher/hooks/useScreenshotWebShare.d.ts +5 -0
  25. package/dist/types/components/DVoucher/index.d.ts +2 -0
  26. package/dist/types/components/index.d.ts +3 -0
  27. package/jest/setup.js +0 -2
  28. package/package.json +35 -29
  29. package/src/style/abstracts/_utilities.scss +19 -0
  30. package/src/style/abstracts/variables/_buttons.scss +2 -0
  31. package/src/style/base/_buttons.scss +56 -65
  32. package/src/style/components/_+import.scss +1 -0
  33. package/src/style/components/_d-voucher.scss +30 -0
@@ -1,23 +1,13 @@
1
- import type { MouseEvent, ReactNode } from 'react';
2
- import type { BaseProps, ButtonType, ButtonVariant, ComponentColor, ComponentSize, EndIconProps, InputState, StartIconProps } from '../interface';
3
- type Props = BaseProps & StartIconProps & EndIconProps & {
4
- id?: string;
1
+ import { type ButtonHTMLAttributes } from 'react';
2
+ import type { BaseProps, ButtonVariant, ComponentColor, ComponentSize, EndIconProps, StartIconProps } from '../interface';
3
+ interface Props extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'color'>, BaseProps, StartIconProps, EndIconProps {
5
4
  color?: ComponentColor;
6
5
  size?: ComponentSize;
7
6
  variant?: ButtonVariant;
8
- state?: InputState;
9
7
  text?: string;
10
- children?: ReactNode;
11
- ariaLabel?: string;
12
- value?: string;
13
- type?: ButtonType;
14
- loadingText?: string;
15
8
  loading?: boolean;
9
+ loadingText?: string;
16
10
  loadingAriaLabel?: string;
17
- disabled?: boolean;
18
- stopPropagationEnabled?: boolean;
19
- form?: string;
20
- onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
21
- };
22
- export default function DButton({ color, size, variant, state, text, children, ariaLabel, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartMaterialStyle, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndMaterialStyle, loadingText, value, type, loading, loadingAriaLabel, disabled, stopPropagationEnabled, className, style, form, dataAttributes, onClick, }: Props): import("react/jsx-runtime").JSX.Element;
23
- export {};
11
+ }
12
+ declare const DButton: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLButtonElement>>;
13
+ export default DButton;
@@ -7,6 +7,7 @@ type Props = ComponentPropsWithoutRef<'input'> & BaseProps & {
7
7
  label?: string;
8
8
  ariaLabel?: string;
9
9
  checked?: boolean;
10
+ inputClassName?: string;
10
11
  disabled?: boolean;
11
12
  invalid?: boolean;
12
13
  valid?: boolean;
@@ -15,5 +16,5 @@ type Props = ComponentPropsWithoutRef<'input'> & BaseProps & {
15
16
  value?: string;
16
17
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
17
18
  };
18
- export default function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked, disabled, invalid, valid, indeterminate, value, hint, onChange, className, style, dataAttributes, ...props }: Props): import("react/jsx-runtime").JSX.Element;
19
+ export default function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked, disabled, invalid, valid, indeterminate, inputClassName, value, hint, onChange, className, style, dataAttributes, ...props }: Props): import("react/jsx-runtime").JSX.Element;
19
20
  export {};
@@ -1,18 +1,8 @@
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">, "onChange" | "value">, "size" | "onChange" | "label" | "invalid" | "value" | keyof import("../interface").BaseProps | keyof import("../interface").FamilyIconProps | keyof import("../interface").StartIconProps | keyof import("../interface").EndIconProps | "loading" | "hint" | "valid" | "floatingLabel" | "inputStart" | "inputEnd" | "onIconStartClick" | "onIconEndClick"> & import("../interface").BaseProps & import("../interface").FamilyIconProps & import("../interface").StartIconProps & import("../interface").EndIconProps & {
4
- value?: string | undefined;
5
- label?: string | undefined;
6
- loading?: boolean | undefined;
7
- hint?: string | undefined;
8
- size?: import("../interface").ComponentSize | undefined;
9
- invalid?: boolean | undefined;
10
- valid?: boolean | undefined;
11
- floatingLabel?: boolean | undefined;
12
- inputStart?: import("react").ReactNode;
13
- inputEnd?: import("react").ReactNode;
14
- onChange?: ((value: string) => void) | undefined;
15
- onIconStartClick?: ((value?: string | undefined) => void) | undefined;
16
- onIconEndClick?: ((value?: string | undefined) => void) | undefined;
17
- } & import("react").RefAttributes<HTMLInputElement>, "ref">, keyof MaskProps> & MaskProps & import("react").RefAttributes<HTMLInputElement>>;
1
+ import { type InputMaskProps } from '@react-input/mask';
2
+ import type { ComponentPropsWithoutRef } from 'react';
3
+ import DInput from '../DInput';
4
+ import type { Merge } from '../../types';
5
+ type NonDInputProps = InputMaskProps<typeof DInput>;
6
+ type Props = Merge<ComponentPropsWithoutRef<typeof DInput>, NonDInputProps>;
7
+ declare const ForwardedDInputMask: import("react").ForwardRefExoticComponent<Omit<Props, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
18
8
  export default ForwardedDInputMask;
@@ -6,10 +6,11 @@ type Props = BaseProps & {
6
6
  name?: string;
7
7
  checked?: boolean;
8
8
  disabled?: boolean;
9
+ inputClassName?: string;
9
10
  invalid?: boolean;
10
11
  valid?: boolean;
11
12
  readonly?: boolean;
12
13
  onChange?: (isChecked: boolean) => void;
13
14
  };
14
- export default function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid, valid, readonly, className, style, dataAttributes, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
15
+ export default function DInputSwitch({ id: idProp, label, ariaLabel, name, checked, disabled, invalid, valid, readonly, className, style, dataAttributes, inputClassName, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
15
16
  export {};
@@ -13,8 +13,9 @@ type Props = PropsWithChildren<BaseProps & {
13
13
  gapLg?: Gap;
14
14
  gapXl?: Gap;
15
15
  gapXxl?: Gap;
16
+ columns?: number;
16
17
  }>;
17
- declare function DLayout({ className, style, children, gap, gapSm, gapMd, gapLg, gapXl, gapXxl, dataAttributes, }: Props): import("react/jsx-runtime").JSX.Element;
18
+ declare function DLayout({ className, style, children, gap, columns, gapSm, gapMd, gapLg, gapXl, gapXxl, dataAttributes, }: Props): import("react/jsx-runtime").JSX.Element;
18
19
  declare const _default: typeof DLayout & {
19
20
  Pane: typeof DLayoutPane;
20
21
  };
@@ -0,0 +1,23 @@
1
+ import type { BaseProps } from '../interface';
2
+ export type ValidationMessages = {
3
+ number: string;
4
+ lowercaseLetter: string;
5
+ uppercaseLetter: string;
6
+ especialChar: string;
7
+ notMatch?: string;
8
+ };
9
+ export type ValidationCheck = 'uppercase' | 'lowercase' | 'number' | 'specialChar';
10
+ type Props = BaseProps & {
11
+ id?: string;
12
+ label?: string;
13
+ placeholder?: string;
14
+ value?: string;
15
+ name?: string;
16
+ disabled?: boolean;
17
+ invalid?: boolean;
18
+ validationMessages?: ValidationMessages;
19
+ enabledChecks?: ValidationCheck[];
20
+ onChange?: (value: string) => void;
21
+ };
22
+ export default function DPasswordStrengthMeter({ id, label, placeholder, value, name, disabled, invalid, validationMessages, enabledChecks, className, style, dataAttributes, onChange, }: Props): import("react/jsx-runtime").JSX.Element;
23
+ export {};
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ password: string;
3
+ regex: RegExp;
4
+ text: string;
5
+ };
6
+ export default function PasswordCheckItem({ password, regex, text, }: Props): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { ValidationMessages, ValidationCheck } from './DPasswordStrengthMeter';
2
+ type Props = {
3
+ password: string;
4
+ validationMessages: ValidationMessages;
5
+ enabledChecks: ValidationCheck[];
6
+ };
7
+ export declare const CHECK_REGEX: {
8
+ uppercase: RegExp;
9
+ lowercase: RegExp;
10
+ number: RegExp;
11
+ specialChar: RegExp;
12
+ };
13
+ export default function PasswordChecksList({ password, validationMessages, enabledChecks, }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,6 @@
1
+ type Props = {
2
+ strength: number;
3
+ total: number;
4
+ };
5
+ export default function PasswordStrengthBar({ strength, total }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ import DPasswordStrengthMeter from './DPasswordStrengthMeter';
2
+ export type { ValidationMessages, ValidationCheck } from './DPasswordStrengthMeter';
3
+ export default DPasswordStrengthMeter;
@@ -0,0 +1,14 @@
1
+ import { PropsWithChildren, ReactNode } from 'react';
2
+ type Props = PropsWithChildren<{
3
+ amount?: string;
4
+ amountDetails?: ReactNode;
5
+ icon?: string;
6
+ color?: string;
7
+ message: string;
8
+ title: string;
9
+ downloadText?: string;
10
+ shareText?: string;
11
+ onError?: (err: Error) => Promise<void> | void;
12
+ }>;
13
+ export default function DVoucher({ amount, amountDetails, icon, color, title, onError, message, downloadText, shareText, children, }: Props): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export default function useScreenshot(): {
3
+ clipRef: import("react").RefObject<HTMLDivElement | null>;
4
+ takeBlob: (type?: string) => Promise<Blob>;
5
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export default function useScreenshotDownload(): {
3
+ download: () => Promise<void>;
4
+ downloadRef: import("react").RefObject<HTMLDivElement | null>;
5
+ };
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export default function useScreenshotWebShare(): {
3
+ share: () => Promise<void>;
4
+ shareRef: import("react").RefObject<HTMLDivElement | null>;
5
+ };
@@ -0,0 +1,2 @@
1
+ import DVoucher from './DVoucher';
2
+ export default DVoucher;
@@ -19,6 +19,8 @@ export { default as DInputMask } from './DInputMask';
19
19
  export { default as DInputCounter } from './DInputCounter';
20
20
  export { default as DInputCurrency } from './DInputCurrency';
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';
@@ -45,3 +47,4 @@ export { default as DTableHead } from './DTableHead';
45
47
  export { default as DInputPhone } from './DInputPhone';
46
48
  export { default as DCreditCard } from './DCreditCard';
47
49
  export { default as DDropdown } from './DDropdown';
50
+ export { default as DVoucher } from './DVoucher';
package/jest/setup.js CHANGED
@@ -1,8 +1,6 @@
1
1
  /* eslint-disable react/prop-types */
2
2
  const React = require('react');
3
3
 
4
- jest.mock('react-content-loader', () => jest.fn());
5
-
6
4
  jest.mock('react-responsive-pagination', () => {
7
5
  function MockPagination(props) {
8
6
  const {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sideEffects": [
4
4
  "*.css"
5
5
  ],
6
- "version": "2.0.0-dev.3",
6
+ "version": "2.0.0-dev.5",
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": {
@@ -89,22 +89,23 @@
89
89
  "jest/"
90
90
  ],
91
91
  "dependencies": {
92
- "@floating-ui/react": "~0.26.1",
93
- "@react-input/mask": "~1.0.20",
92
+ "@floating-ui/react": "~0.27.16",
93
+ "@react-input/mask": "~2.0.4",
94
94
  "@splidejs/react-splide": "~0.7.12",
95
95
  "@splidejs/splide": "~4.1.4",
96
- "bootstrap": "~5.3.3",
97
- "classnames": "~2.3.2",
96
+ "bootstrap": "~5.3.8",
97
+ "classnames": "~2.5.1",
98
98
  "currency.js": "~2.0.4",
99
- "date-fns": "~2.30.0",
100
- "file-selector": "^2.1.2",
101
- "google-libphonenumber": "^3.2.40",
102
- "i18next": "~23.6.0",
103
- "lucide-react": "^0.548.0",
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",
104
105
  "react-datepicker": "~8.3.0",
105
- "react-international-phone": "~4.5.0",
106
- "react-responsive-pagination": "^2.9.0",
107
- "react-select": "^5.8.3"
106
+ "react-international-phone": "~4.6.0",
107
+ "react-responsive-pagination": "~2.11.3",
108
+ "react-select": "~5.10.2"
108
109
  },
109
110
  "devDependencies": {
110
111
  "@babel/core": "~7.23.2",
@@ -126,8 +127,8 @@
126
127
  "@types/google-libphonenumber": "~7.4.30",
127
128
  "@types/jest": "~29.5.12",
128
129
  "@types/node": "~18.15.3",
129
- "@types/react": "~19.1.8",
130
- "@types/react-dom": "~19.1.6",
130
+ "@types/react": "~19.2.2",
131
+ "@types/react-dom": "~19.2.2",
131
132
  "@typescript-eslint/eslint-plugin": "~6.9.0",
132
133
  "@typescript-eslint/parser": "~6.9.0",
133
134
  "@vitejs/plugin-react": "~4.7.0",
@@ -144,23 +145,24 @@
144
145
  "eslint-plugin-jsx-a11y": "~6.7.1",
145
146
  "eslint-plugin-react": "~7.33.2",
146
147
  "eslint-plugin-react-hooks": "~4.6.0",
147
- "formik": "~2.4.6",
148
- "glob": "~10.3.10",
148
+ "formik": "~2.4.8",
149
+ "glob": "^11.1.0",
149
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": "~19.1.0",
157
- "react-dom": "~19.1.0",
158
- "react-hot-toast": "~2.5.2",
159
- "react-i18next": "~13.3.1",
160
- "recharts": "~3.1.0",
158
+ "react": "~19.2.0",
159
+ "react-dom": "~19.2.0",
160
+ "react-hot-toast": "~2.6.0",
161
+ "react-i18next": "~16.2.4",
162
+ "recharts": "~3.3.0",
161
163
  "remark-gfm": "~4.0.1",
162
- "rimraf": "~6.0.1",
163
- "rollup": "^4.27.4",
164
+ "rimraf": "~6.1.0",
165
+ "rollup": "~4.53.1",
164
166
  "sass": "~1.69.4",
165
167
  "storybook": "~9.0.17",
166
168
  "stylelint": "^16.16.0",
@@ -172,15 +174,19 @@
172
174
  "yup": "^1.6.1"
173
175
  },
174
176
  "peerDependencies": {
175
- "react": "~19.1.0",
176
- "react-dom": "~19.1.0",
177
- "react-hot-toast": "~2.5.2",
178
- "react-i18next": "~13.3.1",
179
- "recharts": "~3.1.0"
177
+ "i18next": "~25.6.1",
178
+ "react": "~19.2.0",
179
+ "react-dom": "~19.2.0",
180
+ "react-hot-toast": "~2.6.0",
181
+ "react-i18next": "~16.2.4",
182
+ "recharts": "~3.3.0"
180
183
  },
181
184
  "peerDependenciesMeta": {
182
185
  "recharts": {
183
186
  "optional": true
187
+ },
188
+ "formik": {
189
+ "optional": true
184
190
  }
185
191
  }
186
192
  }
@@ -81,6 +81,25 @@ $utilities: map-merge(
81
81
  )
82
82
  )
83
83
  ),
84
+ "grid-column": (
85
+ class: "g-col",
86
+ property: grid-column,
87
+ responsive: true,
88
+ values: (
89
+ 13: auto/span 13,
90
+ 14: auto/span 14,
91
+ 15: auto/span 15,
92
+ 16: auto/span 16,
93
+ 17: auto/span 17,
94
+ 18: auto/span 18,
95
+ 19: auto/span 19,
96
+ 20: auto/span 20,
97
+ 21: auto/span 21,
98
+ 22: auto/span 22,
99
+ 23: auto/span 23,
100
+ 24: auto/span 24
101
+ )
102
+ ),
84
103
  "overlay": (
85
104
  property: opacity,
86
105
  class: "overlay",
@@ -34,3 +34,5 @@ $btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, bord
34
34
  $btn-outline-primary-hover-color: inherit !default;
35
35
  $btn-outline-primary-hover-bg: transparent !default;
36
36
  $btn-outline-primary-focus-bg: transparent !default;
37
+
38
+ $btn-loading-gap: var(--#{$prefix}ref-spacer-2) !default;
@@ -21,7 +21,9 @@
21
21
  --#{$prefix}btn-sm-padding-x: #{$btn-padding-x-sm};
22
22
  --#{$prefix}btn-sm-font-size: #{$btn-font-size-sm};
23
23
  --#{$prefix}btn-box-shadow: #{btn-box-shadow};
24
+ --#{$prefix}btn-loading-gap: #{$btn-loading-gap};
24
25
 
26
+ position: relative;
25
27
  display: inline-flex;
26
28
  flex-direction: row;
27
29
  gap: var(--#{$prefix}btn-gap, $spacer-2);
@@ -46,10 +48,6 @@
46
48
  @include box-shadow(var(--#{$prefix}btn-box-shadow));
47
49
  @include transition($btn-transition);
48
50
 
49
- > span {
50
- text-decoration: var(--#{$prefix}btn-text-decoration);
51
- }
52
-
53
51
  // hover selectors
54
52
  &.hover,
55
53
  &:hover {
@@ -81,6 +79,16 @@
81
79
  box-shadow: var(--#{$prefix}btn-focus-box-shadow);
82
80
  }
83
81
  }
82
+ /* stylelint-disable-next-line scss/selector-no-union-class-name */
83
+ &-loading {
84
+ position: relative;
85
+ display: inline-flex;
86
+ gap: var(--#{$prefix}btn-loading-gap);
87
+ align-items: center;
88
+ justify-content: center;
89
+ width: 100%;
90
+ height: 100%;
91
+ }
84
92
 
85
93
  .btn-check.focus-visible + &,
86
94
  .btn-check:focus-visible + & {
@@ -130,11 +138,13 @@
130
138
  &.disabled,
131
139
  &:disabled,
132
140
  fieldset:disabled & {
141
+
133
142
  color: var(--#{$prefix}btn-disabled-color);
134
143
  pointer-events: none;
135
144
  background-color: var(--#{$prefix}btn-disabled-bg);
136
145
  background-image: if($enable-gradients, none, null);
137
146
  border-color: var(--#{$prefix}btn-disabled-border-color);
147
+
138
148
  opacity: var(--#{$prefix}btn-disabled-opacity);
139
149
  @include box-shadow(none);
140
150
  }
@@ -157,20 +167,17 @@
157
167
 
158
168
  .btn-outline-primary {
159
169
  --#{$prefix}btn-color: var(--#{$prefix}primary-500);
160
- --#{$prefix}btn-hover-border-color: var(--#{$prefix}primary-700);
161
170
  --#{$prefix}btn-border-color: var(--#{$prefix}primary-500);
162
- --#{$prefix}btn-active-color: var(--#{$prefix}primary-500);
163
- --#{$prefix}btn-active-border-color: var(--#{$prefix}primary-600);
164
- --#{$prefix}btn-hover-color: var(--#{$prefix}primary-700);
165
- --#{$prefix}btn-focus-color: var(--#{$prefix}primary-600);
166
- --#{$prefix}btn-active-color: var(--#{$prefix}primary-600);
167
- --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
171
+ --#{$prefix}btn-hover-color: var(--#{$prefix}primary-600);
172
+ --#{$prefix}btn-hover-border-color: var(--#{$prefix}primary-600);
173
+ --#{$prefix}btn-active-color: var(--#{$prefix}primary-700);
174
+ --#{$prefix}btn-active-border-color: var(--#{$prefix}primary-700);
175
+ --#{$prefix}btn-focus-color: var(--#{$prefix}primary-700);
168
176
  --#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-primary-focus-shadow-rgb);
169
- &:disabled,
170
- &.disabled {
171
- --#{$prefix}btn-disabled-border-color: var(--#{$prefix}primary-500);
172
- --#{$prefix}btn-disabled-color: var(--#{$prefix}primary-500);
173
- }
177
+ --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
178
+ // Disabled state
179
+ --#{$prefix}btn-disabled-color: var(--#{$prefix}primary-500);
180
+ --#{$prefix}btn-disabled-border-color: var(--#{$prefix}primary-500);
174
181
  }
175
182
 
176
183
  .btn-outline-secondary {
@@ -178,21 +185,17 @@
178
185
  --#{$prefix}btn-hover-border-color: var(--#{$prefix}secondary-400);
179
186
  --#{$prefix}btn-border-color: var(--#{$prefix}secondary-200);
180
187
  --#{$prefix}btn-active-border-color: var(--#{$prefix}secondary-400);
181
- --#{$prefix}btn-active-color: var(--#{$prefix}secondary-700);
182
- --#{$prefix}btn-hover-color: var(--#{$prefix}secondary-700);
183
188
  --#{$prefix}btn-focus-color: var(--#{$prefix}secondary-700);
184
- --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
185
189
  --#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-secondary-focus-shadow-rgb);
186
- &:disabled,
187
- &.disabled {
188
- --#{$prefix}btn-disabled-border-color: var(--#{$prefix}secondary-200);
189
- --#{$prefix}btn-disabled-color: var(--#{$prefix}secondary-600);
190
- }
190
+ --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
191
+ // Disabled state
192
+ --#{$prefix}btn-disabled-color: var(--#{$prefix}secondary-700);
193
+ --#{$prefix}btn-disabled-border-color: var(--#{$prefix}secondary-200);
191
194
  }
192
195
 
193
196
  .btn-outline-light {
194
197
  --#{$prefix}btn-color: var(--#{$prefix}gray-25);
195
- --#{$prefix}btn-hover-border-color: var(--#{$prefix}gray-25);
198
+ --#{$prefix}btn-hover-border-color: var(--#{$prefix}gray-50);
196
199
  --#{$prefix}btn-border-color: var(--#{$prefix}gray-25);
197
200
  --#{$prefix}btn-active-border-color: var(--#{$prefix}gray-50);
198
201
  --#{$prefix}btn-active-color: var(--#{$prefix}gray-50);
@@ -200,12 +203,10 @@
200
203
  --#{$prefix}btn-focus-color: var(--#{$prefix}gray-50);
201
204
  --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
202
205
  --#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-light-focus-shadow-rgb);
203
- &:disabled,
204
- &.disabled {
205
- --#{$prefix}btn-disabled-border-color: var(--#{$prefix}gray-25);
206
- --#{$prefix}btn-disabled-color: var(--#{$prefix}gray-25);
207
- opacity: var(--#{$prefix}btn-disabled-opacity);
208
- }
206
+ // Disabled state
207
+ --#{$prefix}btn-disabled-border-color: var(--#{$prefix}gray-25);
208
+ --#{$prefix}btn-disabled-color: var(--#{$prefix}gray-25);
209
+ opacity: var(--#{$prefix}btn-disabled-opacity);
209
210
  }
210
211
 
211
212
  .btn-outline-success {
@@ -218,11 +219,9 @@
218
219
  --#{$prefix}btn-focus-color: var(--#{$prefix}success-700);
219
220
  --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
220
221
  --#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-success-focus-shadow-rgb);
221
- &:disabled,
222
- &.disabled {
223
- --#{$prefix}btn-disabled-border-color: var(--#{$prefix}success-500);
224
- --#{$prefix}btn-disabled-color: var(--#{$prefix}success-500);
225
- }
222
+ // Disabled state
223
+ --#{$prefix}btn-disabled-border-color: var(--#{$prefix}success-500);
224
+ --#{$prefix}btn-disabled-color: var(--#{$prefix}success-500);
226
225
  }
227
226
 
228
227
  .btn-outline-danger {
@@ -235,11 +234,9 @@
235
234
  --#{$prefix}btn-focus-color: var(--#{$prefix}danger-700);
236
235
  --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
237
236
  --#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-danger-focus-shadow-rgb);
238
- &:disabled,
239
- &.disabled {
240
- --#{$prefix}btn-active-border-color: var(--#{$prefix}danger-500);
241
- --#{$prefix}btn-disabled-color: var(--#{$prefix}danger-500);
242
- }
237
+ // Disabled state
238
+ --#{$prefix}btn-disabled-border-color: var(--#{$prefix}danger-500);
239
+ --#{$prefix}btn-disabled-color: var(--#{$prefix}danger-500);
243
240
  }
244
241
 
245
242
  .btn-outline-info {
@@ -252,45 +249,39 @@
252
249
  --#{$prefix}btn-focus-color: var(--#{$prefix}info-700);
253
250
  --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
254
251
  --#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-info-focus-shadow-rgb);
255
- &:disabled,
256
- &.disabled {
257
- --#{$prefix}btn-disabled-border-color: var(--#{$prefix}info-500);
258
- --#{$prefix}btn-disabled-color: var(--#{$prefix}info-500);
259
- }
252
+ // Disabled state
253
+ --#{$prefix}btn-disabled-border-color: var(--#{$prefix}info-500);
254
+ --#{$prefix}btn-disabled-color: var(--#{$prefix}info-500);
260
255
  }
261
256
 
262
257
  .btn-outline-warning {
263
- --#{$prefix}btn-color: var(--#{$prefix}warning-600);
264
- --#{$prefix}btn-hover-border-color: var(--#{$prefix}warning-700);
258
+ --#{$prefix}btn-color: var(--#{$prefix}warning-500);
265
259
  --#{$prefix}btn-border-color: var(--#{$prefix}warning-500);
266
- --#{$prefix}btn-active-border-color: var(--#{$prefix}warning-600);
260
+ --#{$prefix}btn-hover-color: var(--#{$prefix}warning-600);
261
+ --#{$prefix}btn-hover-border-color: var(--#{$prefix}warning-600);
267
262
  --#{$prefix}btn-active-color: var(--#{$prefix}warning-700);
268
- --#{$prefix}btn-hover-color: var(--#{$prefix}warning-700);
263
+ --#{$prefix}btn-active-border-color: var(--#{$prefix}warning-700);
269
264
  --#{$prefix}btn-focus-color: var(--#{$prefix}warning-700);
270
- --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
271
265
  --#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-warning-focus-shadow-rgb);
272
- &:disabled,
273
- &.disabled {
274
- --#{$prefix}btn-disabled-border-color: var(--#{$prefix}warning-500);
275
- --#{$prefix}btn-disabled-color: var(--#{$prefix}warning-600);
276
- }
266
+ --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
267
+ // Disabled state
268
+ --#{$prefix}btn-disabled-border-color: var(--#{$prefix}warning-500);
269
+ --#{$prefix}btn-disabled-color: var(--#{$prefix}warning-500);
277
270
  }
278
271
 
279
272
  .btn-outline-dark {
280
273
  --#{$prefix}btn-color: var(--#{$prefix}black);
281
- --#{$prefix}btn-hover-border-color: var(--#{$prefix}black);
274
+ --#{$prefix}btn-hover-border-color: var(--#{$prefix}gray-600);
282
275
  --#{$prefix}btn-border-color: var(--#{$prefix}black);
283
- --#{$prefix}btn-active-border-color: var(--#{$prefix}black);
284
- --#{$prefix}btn-active-color: var(--#{$prefix}black);
285
- --#{$prefix}btn-hover-color: var(--#{$prefix}black);
276
+ --#{$prefix}btn-active-border-color: var(--#{$prefix}gray-600);
277
+ --#{$prefix}btn-active-color: var(--#{$prefix}gray-600);
278
+ --#{$prefix}btn-hover-color: var(--#{$prefix}gray-600);
286
279
  --#{$prefix}btn-focus-color: var(--#{$prefix}black);
287
280
  --#{$prefix}btn-box-shadow: #{$btn-box-shadow};
288
281
  --#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-dark-focus-shadow-rgb);
289
- &:disabled,
290
- &.disabled {
291
- --#{$prefix}btn-disabled-border-color: var(--#{$prefix}black);
292
- --#{$prefix}btn-disabled-color: var(--#{$prefix}black);
293
- }
282
+ // Disabled state
283
+ --#{$prefix}btn-disabled-border-color: var(--#{$prefix}black);
284
+ --#{$prefix}btn-disabled-color: var(--#{$prefix}black);
294
285
  }
295
286
 
296
287
  .btn-lg {
@@ -11,6 +11,7 @@
11
11
  @import "d-collapse-icon-text";
12
12
  @import "d-datepicker";
13
13
  @import "d-timepicker";
14
+ @import "d-voucher";
14
15
  @import "d-close";
15
16
  @import "d-popover";
16
17
  @import "d-box-file";
@@ -0,0 +1,30 @@
1
+ .d-voucher {
2
+ --#{$prefix}voucher-header-gap: var(--#{$prefix}ref-spacer-4);
3
+ --#{$prefix}voucher-amount-padding: var(--#{$prefix}ref-spacer-4);
4
+ --#{$prefix}voucher-amount-background: var(--#{$prefix}secondary-50);
5
+ --#{$prefix}voucher-amount-rounded: var(--#{$prefix}ref-spacer-4);
6
+ --#{$prefix}voucher-footer-gap: var(--#{$prefix}ref-spacer-4);
7
+ --#{$prefix}voucher-margin: 0 0 var(--#{$prefix}ref-spacer-4) 0;
8
+ }
9
+
10
+ .d-voucher-header {
11
+ display: flex;
12
+ flex-direction: column;
13
+ gap: var(--#{$prefix}voucher-header-gap);
14
+ align-items: center;
15
+ justify-content: center;
16
+ margin: var(--#{$prefix}voucher-margin);
17
+ }
18
+
19
+ .d-voucher-amount {
20
+ padding: var(--#{$prefix}voucher-amount-padding);
21
+ background: var(--#{$prefix}voucher-amount-background);
22
+ border-radius: var(--#{$prefix}voucher-amount-rounded);
23
+ }
24
+
25
+ .d-voucher-footer {
26
+ display: flex;
27
+ gap: var(--#{$prefix}voucher-footer-gap);
28
+ justify-content: center;
29
+ justify-content: flex-start;
30
+ }