@dynamic-framework/ui-react 2.0.0-dev.6 → 2.0.0-dev.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/dynamic-ui-non-root.css +127 -510
- package/dist/css/dynamic-ui-non-root.min.css +2 -2
- package/dist/css/dynamic-ui-root.css +62 -556
- package/dist/css/dynamic-ui-root.min.css +2 -2
- package/dist/css/dynamic-ui.css +188 -1065
- package/dist/css/dynamic-ui.min.css +2 -2
- package/dist/index.esm.js +152 -98
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +150 -96
- package/dist/index.js.map +1 -1
- package/dist/types/components/DIconBase/DIconBase.d.ts +10 -2
- package/dist/types/components/DInput/DInput.d.ts +2 -1
- package/dist/types/components/DInputCounter/DInputCounter.d.ts +3 -2
- package/dist/types/components/DInputCurrency/DInputCurrency.d.ts +3 -2
- package/dist/types/components/DInputPhone/DInputPhone.d.ts +1 -1
- package/dist/types/components/config.d.ts +0 -2
- package/dist/types/hooks/useResponsiveProp.d.ts +35 -0
- package/package.json +16 -25
- package/src/style/abstracts/_mixins.scss +34 -16
- package/src/style/abstracts/variables/_colors.scss +8 -2
- package/src/style/base/_buttons.scss +11 -125
- package/src/style/base/_label.scss +0 -4
- package/src/style/components/_d-datepicker.scss +23 -4
- package/src/style/root/_root.scss +94 -88
- package/dist/types/components/DBarChart/DBarChart.d.ts +0 -9
- package/dist/types/components/DMinimalLineChart/DMinimalLineChart.d.ts +0 -9
- package/dist/types/components/DMultiLineChart/DMultiLineChart.d.ts +0 -9
- package/dist/types/components/DPieChart/DPieChart.d.ts +0 -9
- package/dist/types/components/DRadialBarChart/DRadialBarChart.d.ts +0 -6
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import type { BaseProps, ComponentColor } from '../interface';
|
|
2
|
+
import { ResponsiveProp } from '../../hooks/useResponsiveProp';
|
|
2
3
|
type Props = BaseProps & {
|
|
3
4
|
icon: string;
|
|
4
5
|
color?: ComponentColor;
|
|
5
|
-
size?: string;
|
|
6
|
+
size?: string | ResponsiveProp;
|
|
7
|
+
/**
|
|
8
|
+
* Enables real-time breakpoint listeners for responsive size changes.
|
|
9
|
+
* When set to true, the component will listen for size changes and update responsively.
|
|
10
|
+
* Note: Enabling this feature may have performance implications, especially
|
|
11
|
+
* in complex or frequently updated components.
|
|
12
|
+
*/
|
|
13
|
+
useListenerSize?: boolean;
|
|
6
14
|
hasCircle?: boolean;
|
|
7
15
|
materialStyle?: boolean;
|
|
8
16
|
familyClass?: string;
|
|
9
17
|
familyPrefix?: string;
|
|
10
18
|
strokeWidth?: number;
|
|
11
19
|
};
|
|
12
|
-
export default function DIconBase({ icon, color, style, className, size, hasCircle, materialStyle, familyClass, familyPrefix, strokeWidth, dataAttributes, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export default function DIconBase({ icon, color, style, className, size, useListenerSize, hasCircle, materialStyle, familyClass, familyPrefix, strokeWidth, dataAttributes, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
21
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { BaseProps, ComponentSize, EndIconProps, FamilyIconProps, StartIconProps } from '../interface';
|
|
3
|
-
declare const ForwardedDInput: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
3
|
+
declare const ForwardedDInput: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "onChange">, "label" | "invalid" | "value" | "onChange" | "size" | keyof BaseProps | keyof FamilyIconProps | keyof StartIconProps | keyof EndIconProps | "loading" | "hint" | "valid" | "floatingLabel" | "inputStart" | "inputEnd" | "readonly" | "onIconStartClick" | "onIconEndClick"> & BaseProps & FamilyIconProps & StartIconProps & EndIconProps & {
|
|
4
4
|
value?: string | undefined;
|
|
5
5
|
label?: string | undefined;
|
|
6
6
|
loading?: boolean | undefined;
|
|
@@ -11,6 +11,7 @@ declare const ForwardedDInput: import("react").ForwardRefExoticComponent<Omit<Om
|
|
|
11
11
|
floatingLabel?: boolean | undefined;
|
|
12
12
|
inputStart?: ReactNode;
|
|
13
13
|
inputEnd?: ReactNode;
|
|
14
|
+
readonly?: boolean | undefined;
|
|
14
15
|
onChange?: ((value: string) => void) | undefined;
|
|
15
16
|
onIconStartClick?: ((value?: string) => void) | undefined;
|
|
16
17
|
onIconEndClick?: ((value?: string) => void) | undefined;
|
|
@@ -5,7 +5,7 @@ type NonDInputProps = {
|
|
|
5
5
|
maxValue: number;
|
|
6
6
|
onChange?: (value?: number) => void;
|
|
7
7
|
};
|
|
8
|
-
declare const ForwardedDInputCounter: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
8
|
+
declare const ForwardedDInputCounter: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "onChange">, "label" | "invalid" | "value" | "onChange" | "size" | keyof import("../interface").BaseProps | keyof import("../interface").FamilyIconProps | keyof import("../interface").StartIconProps | keyof import("../interface").EndIconProps | "loading" | "hint" | "valid" | "floatingLabel" | "inputStart" | "inputEnd" | "readonly" | "onIconStartClick" | "onIconEndClick"> & import("../interface").BaseProps & import("../interface").FamilyIconProps & import("../interface").StartIconProps & import("../interface").EndIconProps & {
|
|
9
9
|
value?: string | undefined;
|
|
10
10
|
label?: string | undefined;
|
|
11
11
|
loading?: boolean | undefined;
|
|
@@ -16,8 +16,9 @@ declare const ForwardedDInputCounter: import("react").ForwardRefExoticComponent<
|
|
|
16
16
|
floatingLabel?: boolean | undefined;
|
|
17
17
|
inputStart?: import("react").ReactNode;
|
|
18
18
|
inputEnd?: import("react").ReactNode;
|
|
19
|
+
readonly?: boolean | undefined;
|
|
19
20
|
onChange?: ((value: string) => void) | undefined;
|
|
20
21
|
onIconStartClick?: ((value?: string | undefined) => void) | undefined;
|
|
21
22
|
onIconEndClick?: ((value?: string | undefined) => void) | undefined;
|
|
22
|
-
} & import("react").RefAttributes<HTMLInputElement>, "ref">, "
|
|
23
|
+
} & import("react").RefAttributes<HTMLInputElement>, "ref">, "value" | "onChange" | "type" | "validIcon" | "invalidIcon">, keyof NonDInputProps> & NonDInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
23
24
|
export default ForwardedDInputCounter;
|
|
@@ -6,7 +6,7 @@ type NonDInputProps = {
|
|
|
6
6
|
currencyCode?: string;
|
|
7
7
|
onChange?: (value?: number) => void;
|
|
8
8
|
};
|
|
9
|
-
declare const ForwardedDInputCurrency: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
9
|
+
declare const ForwardedDInputCurrency: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "value" | "onChange">, "label" | "invalid" | "value" | "onChange" | "size" | keyof import("../interface").BaseProps | keyof import("../interface").FamilyIconProps | keyof import("../interface").StartIconProps | keyof import("../interface").EndIconProps | "loading" | "hint" | "valid" | "floatingLabel" | "inputStart" | "inputEnd" | "readonly" | "onIconStartClick" | "onIconEndClick"> & import("../interface").BaseProps & import("../interface").FamilyIconProps & import("../interface").StartIconProps & import("../interface").EndIconProps & {
|
|
10
10
|
value?: string | undefined;
|
|
11
11
|
label?: string | undefined;
|
|
12
12
|
loading?: boolean | undefined;
|
|
@@ -17,8 +17,9 @@ declare const ForwardedDInputCurrency: import("react").ForwardRefExoticComponent
|
|
|
17
17
|
floatingLabel?: boolean | undefined;
|
|
18
18
|
inputStart?: import("react").ReactNode;
|
|
19
19
|
inputEnd?: import("react").ReactNode;
|
|
20
|
+
readonly?: boolean | undefined;
|
|
20
21
|
onChange?: ((value: string) => void) | undefined;
|
|
21
22
|
onIconStartClick?: ((value?: string | undefined) => void) | undefined;
|
|
22
23
|
onIconEndClick?: ((value?: string | undefined) => void) | undefined;
|
|
23
|
-
} & import("react").RefAttributes<HTMLInputElement>, "ref">, "
|
|
24
|
+
} & import("react").RefAttributes<HTMLInputElement>, "ref">, "value" | "onChange" | "type">, keyof NonDInputProps> & NonDInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
24
25
|
export default ForwardedDInputCurrency;
|
|
@@ -7,7 +7,7 @@ type OnChangeType = {
|
|
|
7
7
|
country: ParsedCountry;
|
|
8
8
|
isValid: boolean;
|
|
9
9
|
};
|
|
10
|
-
declare const ForwardedDInputPhone: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "
|
|
10
|
+
declare const ForwardedDInputPhone: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "pattern" | "value" | "inputMode" | "onChange" | "onWheel" | "type">, "label" | "invalid" | "value" | "onChange" | "size" | keyof BaseProps | keyof FamilyIconProps | keyof EndIconProps | "loading" | "hint" | "valid" | "floatingLabel" | "inputEnd" | "onIconEndClick" | "countrySelectorProps" | "filteredCountries" | "defaultCountry"> & BaseProps & FamilyIconProps & EndIconProps & {
|
|
11
11
|
value?: string | undefined;
|
|
12
12
|
label?: string | undefined;
|
|
13
13
|
loading?: boolean | undefined;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A mapping of breakpoint names to values for responsive properties.
|
|
3
|
+
*
|
|
4
|
+
* This type allows you to specify a value for one or more
|
|
5
|
+
* breakpoints ('xs', 'sm', 'md', 'lg', 'xl', 'xxl').
|
|
6
|
+
* When used with `useResponsiveProp`, the value for
|
|
7
|
+
* the highest matching breakpoint will be selected.
|
|
8
|
+
*
|
|
9
|
+
* Usage example:
|
|
10
|
+
* ```ts
|
|
11
|
+
* const prop: ResponsiveProp = { xs: "small", md: "medium", xl: "large" };
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export type ResponsiveProp = Partial<Record<'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl', string>>;
|
|
15
|
+
/**
|
|
16
|
+
* React hook to resolve a responsive property value based on the current viewport breakpoint.
|
|
17
|
+
*
|
|
18
|
+
* Given a `ResponsiveProp` object, this hook returns the value for the highest matching breakpoint.
|
|
19
|
+
* If multiple breakpoints match, the value for the largest (highest) breakpoint is used.
|
|
20
|
+
* If no breakpoints match, `undefined` is returned.
|
|
21
|
+
*
|
|
22
|
+
* @param useListener - Whether to listen for breakpoint changes (default: false).
|
|
23
|
+
* @returns An object with a `responsivePropValue` function that takes a
|
|
24
|
+
* `ResponsiveProp` and returns the resolved value.
|
|
25
|
+
*
|
|
26
|
+
* Usage example:
|
|
27
|
+
* ```ts
|
|
28
|
+
* const { responsivePropValue } = useResponsiveProp();
|
|
29
|
+
* const value = responsivePropValue({ xs: "A", md: "B", xl: "C" });
|
|
30
|
+
* // value will be "C" if xl breakpoint is active, "B" if md is active, etc.
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function useResponsiveProp(useListener?: boolean): {
|
|
34
|
+
responsivePropValue: (prop: ResponsiveProp) => string | undefined;
|
|
35
|
+
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sideEffects": [
|
|
4
4
|
"*.css"
|
|
5
5
|
],
|
|
6
|
-
"version": "2.0.0-dev.
|
|
6
|
+
"version": "2.0.0-dev.8",
|
|
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": {
|
|
@@ -54,9 +54,8 @@
|
|
|
54
54
|
"dev:scss": "node scripts/build-scss.js",
|
|
55
55
|
"build:once": "npm run dev:ts && npm run dev:rollup && sleep 0.5 && npm run dev:scss && yalc push",
|
|
56
56
|
"watch:ds": "npx nodemon --watch src --ext ts,tsx,scss --delay 1000ms --exec \"npm run build:once\"",
|
|
57
|
-
"cp": "npm run cp:bootstrap && npm run cp:popper
|
|
57
|
+
"cp": "npm run cp:bootstrap && npm run cp:popper",
|
|
58
58
|
"cp:bootstrap": "scripts/cp-boostrap.sh",
|
|
59
|
-
"cp:bootstrap-icons": "scripts/cp-boostrap-icons.sh",
|
|
60
59
|
"cp:popper": "scripts/cp-popper.sh",
|
|
61
60
|
"clean": "rimraf dist-transpiled && rimraf dist",
|
|
62
61
|
"compile": "tsc -p . && rollup -c rollup.config.mjs",
|
|
@@ -75,7 +74,8 @@
|
|
|
75
74
|
"publish:cdn-dev": "aws s3 sync ./dist/ s3://dynamicframework-cdn/assets/dev/ui-react --delete --acl public-read",
|
|
76
75
|
"lint-staged": "lint-staged",
|
|
77
76
|
"prepare": "husky",
|
|
78
|
-
"commitlint": "commitlint --edit"
|
|
77
|
+
"commitlint": "commitlint --edit",
|
|
78
|
+
"verify": "node scripts/verify.js"
|
|
79
79
|
},
|
|
80
80
|
"engines": {
|
|
81
81
|
"node": ">=22.0.0"
|
|
@@ -126,9 +126,9 @@
|
|
|
126
126
|
"@testing-library/user-event": "^14.6.1",
|
|
127
127
|
"@types/google-libphonenumber": "~7.4.30",
|
|
128
128
|
"@types/jest": "~29.5.12",
|
|
129
|
-
"@types/node": "
|
|
130
|
-
"@types/react": "
|
|
131
|
-
"@types/react-dom": "
|
|
129
|
+
"@types/node": "^22.0.0",
|
|
130
|
+
"@types/react": "^19.2.0",
|
|
131
|
+
"@types/react-dom": "^19.2.0",
|
|
132
132
|
"@typescript-eslint/eslint-plugin": "~6.9.0",
|
|
133
133
|
"@typescript-eslint/parser": "~6.9.0",
|
|
134
134
|
"@vitejs/plugin-react": "~4.7.0",
|
|
@@ -136,7 +136,6 @@
|
|
|
136
136
|
"axe-playwright": "~1.2.3",
|
|
137
137
|
"babel-jest": "^29.7.0",
|
|
138
138
|
"babel-loader": "~9.1.3",
|
|
139
|
-
"bootstrap-icons": "~1.13.1",
|
|
140
139
|
"conventional-changelog-conventionalcommits": "~6.1.0",
|
|
141
140
|
"eslint": "~8.52.0",
|
|
142
141
|
"eslint-config-airbnb": "~19.0.4",
|
|
@@ -146,6 +145,7 @@
|
|
|
146
145
|
"eslint-plugin-react": "~7.33.2",
|
|
147
146
|
"eslint-plugin-react-hooks": "~4.6.0",
|
|
148
147
|
"formik": "~2.4.8",
|
|
148
|
+
"framer-motion": "^12.23.24",
|
|
149
149
|
"glob": "^11.1.0",
|
|
150
150
|
"husky": "~9.1.7",
|
|
151
151
|
"i18next": "~25.6.1",
|
|
@@ -155,8 +155,8 @@
|
|
|
155
155
|
"jest-environment-jsdom": "~29.7.0",
|
|
156
156
|
"lint-staged": "^15.2.10",
|
|
157
157
|
"postcss-cli": "~10.1.0",
|
|
158
|
-
"react": "~19.2.
|
|
159
|
-
"react-dom": "~19.2.
|
|
158
|
+
"react": "~19.2.1",
|
|
159
|
+
"react-dom": "~19.2.1",
|
|
160
160
|
"react-hot-toast": "~2.6.0",
|
|
161
161
|
"react-i18next": "~16.2.4",
|
|
162
162
|
"recharts": "~3.3.0",
|
|
@@ -174,20 +174,11 @@
|
|
|
174
174
|
"yup": "^1.6.1"
|
|
175
175
|
},
|
|
176
176
|
"peerDependencies": {
|
|
177
|
-
"framer-motion": "
|
|
178
|
-
"i18next": "
|
|
179
|
-
"react": "
|
|
180
|
-
"react-dom": "
|
|
181
|
-
"react-hot-toast": "
|
|
182
|
-
"react-i18next": "
|
|
183
|
-
"recharts": "~3.3.0"
|
|
184
|
-
},
|
|
185
|
-
"peerDependenciesMeta": {
|
|
186
|
-
"recharts": {
|
|
187
|
-
"optional": true
|
|
188
|
-
},
|
|
189
|
-
"formik": {
|
|
190
|
-
"optional": true
|
|
191
|
-
}
|
|
177
|
+
"framer-motion": ">=12 <13",
|
|
178
|
+
"i18next": ">=25 <26",
|
|
179
|
+
"react": ">=18 <20",
|
|
180
|
+
"react-dom": ">=18 <20",
|
|
181
|
+
"react-hot-toast": ">=2 <3",
|
|
182
|
+
"react-i18next": ">=16 <17"
|
|
192
183
|
}
|
|
193
184
|
}
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
@mixin df-button-outline-variant-variables(
|
|
45
45
|
$color-name,
|
|
46
46
|
$default-color: var(--#{$prefix}#{$color-name}-500),
|
|
47
|
-
$
|
|
48
|
-
$hover-
|
|
49
|
-
$
|
|
50
|
-
$focus-
|
|
51
|
-
$active-
|
|
52
|
-
$active-
|
|
47
|
+
$default-border-color: $default-color,
|
|
48
|
+
$hover-color: var(--#{$prefix}#{$color-name}-600),
|
|
49
|
+
$hover-border-color: $hover-color,
|
|
50
|
+
$focus-color: $hover-color,
|
|
51
|
+
$active-color: var(--#{$prefix}#{$color-name}-700),
|
|
52
|
+
$active-border-color: $active-color,
|
|
53
53
|
$disabled-opacity: $btn-disabled-opacity,
|
|
54
54
|
$box-shadow: $btn-box-shadow,
|
|
55
55
|
$focus-shadow-rgb: var(--#{$prefix}#{$color-name}-500-rgb),
|
|
@@ -57,21 +57,21 @@
|
|
|
57
57
|
) {
|
|
58
58
|
--#{$prefix}btn-outline-#{$color-name}-color: #{$default-color};
|
|
59
59
|
--#{$prefix}btn-outline-#{$color-name}-bg: transparent;
|
|
60
|
-
--#{$prefix}btn-outline-#{$color-name}-border-color: #{$default-color};
|
|
60
|
+
--#{$prefix}btn-outline-#{$color-name}-border-color: #{$default-border-color};
|
|
61
61
|
--#{$prefix}btn-outline-#{$color-name}-box-shadow: #{$box-shadow};
|
|
62
62
|
|
|
63
|
-
--#{$prefix}btn-outline-#{$color-name}-hover-color: #{$hover-
|
|
64
|
-
--#{$prefix}btn-outline-#{$color-name}-hover-bg:
|
|
65
|
-
--#{$prefix}btn-outline-#{$color-name}-hover-border-color: #{$hover-
|
|
63
|
+
--#{$prefix}btn-outline-#{$color-name}-hover-color: #{$hover-color};
|
|
64
|
+
--#{$prefix}btn-outline-#{$color-name}-hover-bg: transparent;
|
|
65
|
+
--#{$prefix}btn-outline-#{$color-name}-hover-border-color: #{$hover-border-color};
|
|
66
66
|
|
|
67
|
-
--#{$prefix}btn-outline-#{$color-name}-focus-color: #{$focus-
|
|
68
|
-
--#{$prefix}btn-outline-#{$color-name}-focus-bg:
|
|
69
|
-
--#{$prefix}btn-outline-#{$color-name}-focus-border-color: #{$focus-
|
|
67
|
+
--#{$prefix}btn-outline-#{$color-name}-focus-color: #{$focus-color};
|
|
68
|
+
--#{$prefix}btn-outline-#{$color-name}-focus-bg: transparent;
|
|
69
|
+
--#{$prefix}btn-outline-#{$color-name}-focus-border-color: #{$focus-color};
|
|
70
70
|
--#{$prefix}btn-outline-#{$color-name}-focus-shadow-rgb: #{$focus-shadow-rgb};
|
|
71
71
|
|
|
72
|
-
--#{$prefix}btn-outline-#{$color-name}-active-color: #{$active-
|
|
73
|
-
--#{$prefix}btn-outline-#{$color-name}-active-bg:
|
|
74
|
-
--#{$prefix}btn-outline-#{$color-name}-active-border-color: #{$active-
|
|
72
|
+
--#{$prefix}btn-outline-#{$color-name}-active-color: #{$active-color};
|
|
73
|
+
--#{$prefix}btn-outline-#{$color-name}-active-bg: transparent;
|
|
74
|
+
--#{$prefix}btn-outline-#{$color-name}-active-border-color: #{$active-border-color};
|
|
75
75
|
--#{$prefix}btn-outline-#{$color-name}-active-box-shadow: #{$active-box-shadow};
|
|
76
76
|
|
|
77
77
|
--#{$prefix}btn-outline-#{$color-name}-disabled-color: #{$default-color};
|
|
@@ -120,6 +120,24 @@
|
|
|
120
120
|
}
|
|
121
121
|
// scss-docs-end df-btn-link-variant-variables-mixin
|
|
122
122
|
|
|
123
|
+
@mixin df-button-variant-outline-mapper($color-name) {
|
|
124
|
+
--#{$prefix}btn-color: var(--#{$prefix}btn-outline-#{$color-name}-color);
|
|
125
|
+
--#{$prefix}btn-border-color: var(--#{$prefix}btn-outline-#{$color-name}-border-color);
|
|
126
|
+
|
|
127
|
+
--#{$prefix}btn-hover-color: var(--#{$prefix}btn-outline-#{$color-name}-hover-color);
|
|
128
|
+
--#{$prefix}btn-hover-border-color: var(--#{$prefix}btn-outline-#{$color-name}-hover-border-color);
|
|
129
|
+
--#{$prefix}btn-active-color: var(--#{$prefix}btn-outline-#{$color-name}-active-color);
|
|
130
|
+
--#{$prefix}btn-active-border-color: var(--#{$prefix}btn-outline-#{$color-name}-active-border-color);
|
|
131
|
+
|
|
132
|
+
--#{$prefix}btn-focus-color: var(--#{$prefix}btn-outline-#{$color-name}-focus-color);
|
|
133
|
+
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-outline-#{$color-name}-focus-shadow-rgb);
|
|
134
|
+
|
|
135
|
+
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
|
|
136
|
+
|
|
137
|
+
--#{$prefix}btn-disabled-border-color: var(--#{$prefix}btn-outline-#{$color-name}-disabled-border-color);
|
|
138
|
+
--#{$prefix}btn-disabled-color: var(--#{$prefix}btn-outline-#{$color-name}-disabled-color);
|
|
139
|
+
}
|
|
140
|
+
|
|
123
141
|
// scss-docs-start df-btn-variant-mixin
|
|
124
142
|
@mixin df-button-variant-mapper($color-name, $variant-name: "") {
|
|
125
143
|
@if $variant-name != "" {
|
|
@@ -362,7 +362,7 @@ $dark: $gray-900 !default;
|
|
|
362
362
|
// scss-docs-end theme-color-variables
|
|
363
363
|
|
|
364
364
|
// scss-docs-start theme-colors-map
|
|
365
|
-
$theme-colors: (
|
|
365
|
+
$theme-colors-base: (
|
|
366
366
|
"primary": $primary,
|
|
367
367
|
"secondary": $secondary,
|
|
368
368
|
"success": $success,
|
|
@@ -371,6 +371,9 @@ $theme-colors: (
|
|
|
371
371
|
"danger": $danger,
|
|
372
372
|
"light": $light,
|
|
373
373
|
"dark": $dark,
|
|
374
|
+
) !default;
|
|
375
|
+
|
|
376
|
+
$theme-colors-extra: (
|
|
374
377
|
"indigo": $indigo,
|
|
375
378
|
"purple": $purple,
|
|
376
379
|
"pink": $pink,
|
|
@@ -379,8 +382,10 @@ $theme-colors: (
|
|
|
379
382
|
"yellow": $yellow,
|
|
380
383
|
"green": $green,
|
|
381
384
|
"teal": $teal,
|
|
382
|
-
"cyan": $cyan
|
|
385
|
+
"cyan": $cyan,
|
|
383
386
|
) !default;
|
|
387
|
+
|
|
388
|
+
$theme-colors: map-merge($theme-colors-base, $theme-colors-extra) !default;
|
|
384
389
|
// scss-docs-end theme-colors-map
|
|
385
390
|
|
|
386
391
|
// TODO: check this.
|
|
@@ -564,6 +569,7 @@ $theme-colors-palettes: (
|
|
|
564
569
|
"danger-700": $danger-700,
|
|
565
570
|
"danger-800": $danger-800,
|
|
566
571
|
"danger-900": $danger-900,
|
|
572
|
+
// extras colors
|
|
567
573
|
"indigo-25": $indigo-25,
|
|
568
574
|
"indigo-50": $indigo-50,
|
|
569
575
|
"indigo-100": $indigo-100,
|
|
@@ -155,133 +155,19 @@
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
@each $color, $value in $theme-colors {
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
.btn-link-#{$color} {
|
|
163
|
-
@include df-button-variant-mapper($color, "link");
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
.btn-outline-primary {
|
|
169
|
-
--#{$prefix}btn-color: var(--#{$prefix}primary-500);
|
|
170
|
-
--#{$prefix}btn-border-color: var(--#{$prefix}primary-500);
|
|
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);
|
|
176
|
-
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-primary-focus-shadow-rgb);
|
|
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);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
.btn-outline-secondary {
|
|
184
|
-
--#{$prefix}btn-color: var(--#{$prefix}secondary-700);
|
|
185
|
-
--#{$prefix}btn-hover-border-color: var(--#{$prefix}secondary-400);
|
|
186
|
-
--#{$prefix}btn-border-color: var(--#{$prefix}secondary-200);
|
|
187
|
-
--#{$prefix}btn-active-border-color: var(--#{$prefix}secondary-400);
|
|
188
|
-
--#{$prefix}btn-focus-color: var(--#{$prefix}secondary-700);
|
|
189
|
-
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-secondary-focus-shadow-rgb);
|
|
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);
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.btn-outline-light {
|
|
197
|
-
--#{$prefix}btn-color: var(--#{$prefix}gray-25);
|
|
198
|
-
--#{$prefix}btn-hover-border-color: var(--#{$prefix}gray-50);
|
|
199
|
-
--#{$prefix}btn-border-color: var(--#{$prefix}gray-25);
|
|
200
|
-
--#{$prefix}btn-active-border-color: var(--#{$prefix}gray-50);
|
|
201
|
-
--#{$prefix}btn-active-color: var(--#{$prefix}gray-50);
|
|
202
|
-
--#{$prefix}btn-hover-color: var(--#{$prefix}gray-50);
|
|
203
|
-
--#{$prefix}btn-focus-color: var(--#{$prefix}gray-50);
|
|
204
|
-
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
|
|
205
|
-
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-light-focus-shadow-rgb);
|
|
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);
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.btn-outline-success {
|
|
213
|
-
--#{$prefix}btn-color: var(--#{$prefix}success-500);
|
|
214
|
-
--#{$prefix}btn-hover-border-color: var(--#{$prefix}success-700);
|
|
215
|
-
--#{$prefix}btn-border-color: var(--#{$prefix}success-500);
|
|
216
|
-
--#{$prefix}btn-active-border-color: var(--#{$prefix}success-600);
|
|
217
|
-
--#{$prefix}btn-active-color: var(--#{$prefix}success-700);
|
|
218
|
-
--#{$prefix}btn-hover-color: var(--#{$prefix}success-700);
|
|
219
|
-
--#{$prefix}btn-focus-color: var(--#{$prefix}success-700);
|
|
220
|
-
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
|
|
221
|
-
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-success-focus-shadow-rgb);
|
|
222
|
-
// Disabled state
|
|
223
|
-
--#{$prefix}btn-disabled-border-color: var(--#{$prefix}success-500);
|
|
224
|
-
--#{$prefix}btn-disabled-color: var(--#{$prefix}success-500);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.btn-outline-danger {
|
|
228
|
-
--#{$prefix}btn-color: var(--#{$prefix}danger-500);
|
|
229
|
-
--#{$prefix}btn-hover-border-color: var(--#{$prefix}danger-700);
|
|
230
|
-
--#{$prefix}btn-border-color: var(--#{$prefix}danger-500);
|
|
231
|
-
--#{$prefix}btn-active-border-color: var(--#{$prefix}danger-600);
|
|
232
|
-
--#{$prefix}btn-active-color: var(--#{$prefix}danger-700);
|
|
233
|
-
--#{$prefix}btn-hover-color: var(--#{$prefix}danger-700);
|
|
234
|
-
--#{$prefix}btn-focus-color: var(--#{$prefix}danger-700);
|
|
235
|
-
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
|
|
236
|
-
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-danger-focus-shadow-rgb);
|
|
237
|
-
// Disabled state
|
|
238
|
-
--#{$prefix}btn-disabled-border-color: var(--#{$prefix}danger-500);
|
|
239
|
-
--#{$prefix}btn-disabled-color: var(--#{$prefix}danger-500);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.btn-outline-info {
|
|
243
|
-
--#{$prefix}btn-color: var(--#{$prefix}info-500);
|
|
244
|
-
--#{$prefix}btn-hover-border-color: var(--#{$prefix}info-700);
|
|
245
|
-
--#{$prefix}btn-border-color: var(--#{$prefix}info-500);
|
|
246
|
-
--#{$prefix}btn-active-border-color: var(--#{$prefix}info-600);
|
|
247
|
-
--#{$prefix}btn-active-color: var(--#{$prefix}info-700);
|
|
248
|
-
--#{$prefix}btn-hover-color: var(--#{$prefix}info-700);
|
|
249
|
-
--#{$prefix}btn-focus-color: var(--#{$prefix}info-700);
|
|
250
|
-
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
|
|
251
|
-
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-info-focus-shadow-rgb);
|
|
252
|
-
// Disabled state
|
|
253
|
-
--#{$prefix}btn-disabled-border-color: var(--#{$prefix}info-500);
|
|
254
|
-
--#{$prefix}btn-disabled-color: var(--#{$prefix}info-500);
|
|
255
|
-
}
|
|
158
|
+
@if not map-has-key($theme-colors-extra, $color) {
|
|
159
|
+
.btn-#{$color} {
|
|
160
|
+
@include df-button-variant-mapper($color);
|
|
161
|
+
}
|
|
256
162
|
|
|
257
|
-
.btn-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
--#{$prefix}btn-hover-color: var(--#{$prefix}warning-600);
|
|
261
|
-
--#{$prefix}btn-hover-border-color: var(--#{$prefix}warning-600);
|
|
262
|
-
--#{$prefix}btn-active-color: var(--#{$prefix}warning-700);
|
|
263
|
-
--#{$prefix}btn-active-border-color: var(--#{$prefix}warning-700);
|
|
264
|
-
--#{$prefix}btn-focus-color: var(--#{$prefix}warning-700);
|
|
265
|
-
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-warning-focus-shadow-rgb);
|
|
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);
|
|
270
|
-
}
|
|
163
|
+
.btn-link-#{$color} {
|
|
164
|
+
@include df-button-variant-mapper($color, "link");
|
|
165
|
+
}
|
|
271
166
|
|
|
272
|
-
.btn-outline
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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);
|
|
279
|
-
--#{$prefix}btn-focus-color: var(--#{$prefix}black);
|
|
280
|
-
--#{$prefix}btn-box-shadow: #{$btn-box-shadow};
|
|
281
|
-
--#{$prefix}btn-focus-shadow-rgb: var(--#{$prefix}btn-dark-focus-shadow-rgb);
|
|
282
|
-
// Disabled state
|
|
283
|
-
--#{$prefix}btn-disabled-border-color: var(--#{$prefix}black);
|
|
284
|
-
--#{$prefix}btn-disabled-color: var(--#{$prefix}black);
|
|
167
|
+
.btn-outline-#{$color} {
|
|
168
|
+
@include df-button-variant-outline-mapper($color);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
285
171
|
}
|
|
286
172
|
|
|
287
173
|
.btn-lg {
|
|
@@ -138,10 +138,29 @@
|
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
.custom-year-selector {
|
|
141
|
-
width:
|
|
142
|
-
background:
|
|
143
|
-
color: var(--#{$prefix}
|
|
144
|
-
|
|
141
|
+
width: 8ch;
|
|
142
|
+
background: transparent;
|
|
143
|
+
color: var(--#{$prefix}body-color);
|
|
144
|
+
margin: auto;
|
|
145
|
+
|
|
146
|
+
.input-group {
|
|
147
|
+
border: 0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.d-select__indicator-separator {
|
|
151
|
+
display: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.d-select__control {
|
|
155
|
+
background-color: var(--#{$prefix}datepicker-top-header-bg);
|
|
156
|
+
padding: var(--bs-ref-spacer-1) var(--bs-ref-spacer-1);
|
|
157
|
+
flex-wrap: nowrap;
|
|
158
|
+
color: var(--#{$prefix}white);
|
|
159
|
+
border: 0;
|
|
160
|
+
}
|
|
161
|
+
.d-select__menu-list {
|
|
162
|
+
max-height: 10lh;
|
|
163
|
+
}
|
|
145
164
|
}
|
|
146
165
|
|
|
147
166
|
&-selector {
|