@dynamic-framework/ui-react 1.14.0 → 1.15.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.
- package/dist/css/dynamic-ui-non-root.css +234 -29
- package/dist/css/dynamic-ui-non-root.min.css +1 -1
- package/dist/css/dynamic-ui.css +234 -29
- package/dist/css/dynamic-ui.min.css +1 -1
- package/dist/index.esm.js +213 -65
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +213 -66
- package/dist/index.js.map +1 -1
- package/dist/js/bootstrap.bundle.js +6314 -0
- package/dist/js/bootstrap.bundle.min.js +7 -0
- package/dist/js/bootstrap.esm.js +4447 -0
- package/dist/js/bootstrap.esm.min.js +7 -0
- package/dist/js/bootstrap.js +4494 -0
- package/dist/js/bootstrap.min.js +7 -0
- package/dist/types/components/DAlert/DAlert.d.ts +6 -1
- package/dist/types/components/DBoxFile/DBoxFile.d.ts +2 -2
- package/dist/types/components/DButton/DButton.d.ts +1 -1
- package/dist/types/components/DChip/DChip.d.ts +5 -1
- package/dist/types/components/DCollapse/DCollapse.d.ts +5 -3
- package/dist/types/components/DDatePicker/DDatePicker.d.ts +6 -6
- package/dist/types/components/DDatePickerHeader/DDatePickerHeader.d.ts +5 -5
- package/dist/types/components/DInput/DInput.d.ts +3 -2
- package/dist/types/components/DInputCounter/DInputCounter.d.ts +3 -2
- package/dist/types/components/DInputCurrency/DInputCurrency.d.ts +2 -1
- package/dist/types/components/DInputCurrencyBase/DInputCurrencyBase.d.ts +2 -1
- package/dist/types/components/DInputMask/DInputMask.d.ts +2 -1
- package/dist/types/components/DInputPassword/DInputPassword.d.ts +1 -1
- package/dist/types/components/DInputPin/DInputPin.d.ts +3 -3
- package/dist/types/components/DInputSearch/DInputSearch.d.ts +3 -5
- package/dist/types/components/DInputSelect/index.d.ts +1 -1
- package/dist/types/components/DModal/components/DModalHeader.d.ts +6 -4
- package/dist/types/components/DMonthPicker/DMonthPicker.d.ts +5 -4
- package/dist/types/components/DOffcanvas/components/DOffcanvasHeader.d.ts +6 -4
- package/dist/types/components/DPopover/DPopover.d.ts +5 -0
- package/dist/types/components/DSelect/DSelect.d.ts +41 -0
- package/dist/types/components/DSelect/components/DSelectClearIndicator.d.ts +2 -0
- package/dist/types/components/DSelect/components/DSelectDropdownIndicator.d.ts +2 -0
- package/dist/types/components/DSelect/components/DSelectLoadingIndicator.d.ts +2 -0
- package/dist/types/components/DSelect/components/DSelectMultiValueRemove.d.ts +2 -0
- package/dist/types/components/DSelect/components/DSelectOptionCheck.d.ts +2 -0
- package/dist/types/components/DSelect/components/DSelectOptionEmoji.d.ts +7 -0
- package/dist/types/components/DSelect/components/DSelectOptionIcon.d.ts +7 -0
- package/dist/types/components/DSelect/components/DSelectSingleValueEmoji.d.ts +2 -0
- package/dist/types/components/DSelect/components/DSelectSingleValueEmojiText.d.ts +2 -0
- package/dist/types/components/DSelect/components/DSelectSingleValueIconText.d.ts +2 -0
- package/dist/types/components/DSelect/index.d.ts +4 -0
- package/dist/types/components/DStepper/DStepper.d.ts +5 -2
- package/dist/types/components/DStepperDesktop/DStepperDesktop.d.ts +5 -2
- package/dist/types/components/DTabs/index.d.ts +1 -1
- package/dist/types/components/DToastContainer/useToast.d.ts +3 -1
- package/dist/types/components/config.d.ts +0 -2
- package/dist/types/components/index.d.ts +2 -3
- package/dist/types/components/interface.d.ts +8 -0
- package/dist/types/contexts/DContext.d.ts +37 -12
- package/package.json +7 -4
- package/src/style/abstracts/variables/_buttons.scss +1 -1
- package/src/style/abstracts/variables/_forms.scss +2 -2
- package/src/style/components/_+import.scss +1 -0
- package/src/style/components/_d-badge.scss +1 -1
- package/src/style/components/_d-button.scss +6 -1
- package/src/style/components/_d-icon.scss +2 -4
- package/src/style/components/_d-input.scss +3 -13
- package/src/style/components/_d-select.scss +252 -0
- package/src/style/components/_d-tabs.scss +0 -5
- package/dist/types/components/DCardAccount/DCardAccount.d.ts +0 -13
- package/dist/types/components/DCardAccount/index.d.ts +0 -2
- package/dist/types/components/DCollapseIconText/DCollapseIconText.d.ts +0 -22
- package/dist/types/components/DCollapseIconText/index.d.ts +0 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GroupBase, OptionProps } from 'react-select';
|
|
2
|
+
export type OptionEmoji = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
emoji: string;
|
|
6
|
+
};
|
|
7
|
+
export default function DSelectOptionEmoji<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, data, ...props }: OptionProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { GroupBase, OptionProps } from 'react-select';
|
|
2
|
+
export type OptionIcon = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
icon: string;
|
|
6
|
+
};
|
|
7
|
+
export default function DSelectOptionIcon<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, data, ...props }: OptionProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { GroupBase, SingleValueProps } from 'react-select';
|
|
2
|
+
export default function DSelectSingleValueEmoji<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { GroupBase, SingleValueProps } from 'react-select';
|
|
2
|
+
export default function DSelectSingleValueEmojiText<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { GroupBase, SingleValueProps } from 'react-select';
|
|
2
|
+
export default function DSelectSingleValueIconText<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ children, getValue, ...props }: SingleValueProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -7,9 +7,12 @@ export type Step = {
|
|
|
7
7
|
type Props = BaseProps & {
|
|
8
8
|
options: Array<Step>;
|
|
9
9
|
currentStep: number;
|
|
10
|
-
|
|
10
|
+
iconSuccess?: string;
|
|
11
|
+
iconSuccessFamilyClass?: string;
|
|
12
|
+
iconSuccessFamilyPrefix?: string;
|
|
13
|
+
iconSuccessMaterialStyle?: boolean;
|
|
11
14
|
vertical?: boolean;
|
|
12
15
|
breakpoint?: BreakpointSize;
|
|
13
16
|
};
|
|
14
|
-
export default function DStepper({ options, currentStep,
|
|
17
|
+
export default function DStepper({ options, currentStep, iconSuccess, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle, vertical, breakpoint, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
15
18
|
export {};
|
|
@@ -6,8 +6,11 @@ type Step = {
|
|
|
6
6
|
type Props = BaseProps & {
|
|
7
7
|
options: Array<Step>;
|
|
8
8
|
currentStep: number;
|
|
9
|
-
|
|
9
|
+
iconSuccess?: string;
|
|
10
|
+
iconSuccessFamilyClass?: string;
|
|
11
|
+
iconSuccessFamilyPrefix?: string;
|
|
12
|
+
iconSuccessMaterialStyle?: boolean;
|
|
10
13
|
vertical?: boolean;
|
|
11
14
|
};
|
|
12
|
-
export default function DStepper({ options, currentStep,
|
|
15
|
+
export default function DStepper({ options, currentStep, iconSuccess: iconSuccessProp, iconSuccessFamilyClass, iconSuccessFamilyPrefix, iconSuccessMaterialStyle, vertical, className, style, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
16
|
export {};
|
|
@@ -5,7 +5,9 @@ export type ToastConfig = {
|
|
|
5
5
|
showClose?: boolean;
|
|
6
6
|
position?: ToastPosition;
|
|
7
7
|
autoClose?: number | false;
|
|
8
|
+
icon?: string;
|
|
9
|
+
iconClose?: string;
|
|
8
10
|
};
|
|
9
11
|
export default function useToast(): {
|
|
10
|
-
toast: (message: string, { position, type, showClose, autoClose, }?: ToastConfig) => void;
|
|
12
|
+
toast: (message: string, { position, type, showClose, autoClose, icon, iconClose, }?: ToastConfig) => void;
|
|
11
13
|
};
|
|
@@ -4,11 +4,9 @@ export { default as DBadge } from './DBadge';
|
|
|
4
4
|
export { default as DBoxFile } from './DBoxFile';
|
|
5
5
|
export { default as DButton } from './DButton';
|
|
6
6
|
export { default as DCard, DCardHeader, DCardBody, DCardFooter, } from './DCard';
|
|
7
|
-
export { default as DCardAccount } from './DCardAccount';
|
|
8
7
|
export { default as DCarousel, DCarouselSlide, } from './DCarousel';
|
|
9
8
|
export { default as DChip } from './DChip';
|
|
10
9
|
export { default as DCollapse } from './DCollapse';
|
|
11
|
-
export { default as DCollapseIconText } from './DCollapseIconText';
|
|
12
10
|
export { default as DCurrencyText } from './DCurrencyText';
|
|
13
11
|
export { default as DDatePicker } from './DDatePicker';
|
|
14
12
|
export { default as DIcon } from './DIcon';
|
|
@@ -22,8 +20,9 @@ export { default as DInputSearch } from './DInputSearch';
|
|
|
22
20
|
export { default as DInputPassword } from './DInputPassword';
|
|
23
21
|
export { default as DInputCheck } from './DInputCheck';
|
|
24
22
|
export { default as DInputPin } from './DInputPin';
|
|
25
|
-
export { default as DInputSelect, DInputSelectProps } from './DInputSelect';
|
|
23
|
+
export { default as DInputSelect, DInputSelectDefaultOption, DInputSelectProps } from './DInputSelect';
|
|
26
24
|
export { default as DInputSwitch } from './DInputSwitch';
|
|
25
|
+
export { default as DSelect } from './DSelect';
|
|
27
26
|
export { default as DList, DListItem, } from './DList';
|
|
28
27
|
export { default as DModal, DModalHeader, DModalBody, DModalFooter, } from './DModal';
|
|
29
28
|
export { default as DOffcanvas, DOffcanvasHeader, DOffcanvasBody, DOffcanvasFooter, } from './DOffcanvas';
|
|
@@ -19,11 +19,13 @@ export type BaseProps = {
|
|
|
19
19
|
export type FamilyIconProps = {
|
|
20
20
|
iconFamilyClass?: string;
|
|
21
21
|
iconFamilyPrefix?: string;
|
|
22
|
+
iconMaterialStyle?: boolean;
|
|
22
23
|
};
|
|
23
24
|
export type LabelIconProps = {
|
|
24
25
|
labelIcon?: string;
|
|
25
26
|
labelIconFamilyClass?: string;
|
|
26
27
|
labelIconFamilyPrefix?: string;
|
|
28
|
+
labelIconMaterialStyle?: boolean;
|
|
27
29
|
};
|
|
28
30
|
export type StartIconProps = {
|
|
29
31
|
iconStart?: string;
|
|
@@ -32,6 +34,7 @@ export type StartIconProps = {
|
|
|
32
34
|
iconStartFamilyPrefix?: string;
|
|
33
35
|
iconStartAriaLabel?: string;
|
|
34
36
|
iconStartTabIndex?: number;
|
|
37
|
+
iconStartMaterialStyle?: boolean;
|
|
35
38
|
};
|
|
36
39
|
export type EndIconProps = {
|
|
37
40
|
iconEnd?: string;
|
|
@@ -40,6 +43,11 @@ export type EndIconProps = {
|
|
|
40
43
|
iconEndFamilyPrefix?: string;
|
|
41
44
|
iconEndAriaLabel?: string;
|
|
42
45
|
iconEndTabIndex?: number;
|
|
46
|
+
iconEndMaterialStyle?: boolean;
|
|
47
|
+
};
|
|
48
|
+
export type StateIcons = {
|
|
49
|
+
invalidIcon?: string;
|
|
50
|
+
validIcon?: string;
|
|
43
51
|
};
|
|
44
52
|
export type AlertType = 'success' | 'info' | 'warning' | 'danger' | 'light' | 'dark' | 'primary' | 'secondary';
|
|
45
53
|
export type AlertTypeIconMap = {
|
|
@@ -1,22 +1,47 @@
|
|
|
1
1
|
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import type { AlertTypeIconMap } from '../components/interface';
|
|
3
|
+
type CurrencyProps = {
|
|
4
|
+
symbol: string;
|
|
5
|
+
precision: number;
|
|
6
|
+
separator: string;
|
|
7
|
+
decimal: string;
|
|
8
|
+
};
|
|
9
|
+
type IconProps = {
|
|
10
|
+
familyClass: string;
|
|
11
|
+
familyPrefix: string;
|
|
12
|
+
materialStyle: boolean;
|
|
13
|
+
};
|
|
14
|
+
type IconMapProps = {
|
|
15
|
+
x: string;
|
|
16
|
+
xLg: string;
|
|
17
|
+
chevronDown: string;
|
|
18
|
+
chevronUp: string;
|
|
19
|
+
chevronLeft: string;
|
|
20
|
+
chevronRight: string;
|
|
21
|
+
alert: AlertTypeIconMap;
|
|
22
|
+
upload: string;
|
|
23
|
+
calendar: string;
|
|
24
|
+
check: string;
|
|
25
|
+
input: {
|
|
26
|
+
invalid: string;
|
|
27
|
+
valid: string;
|
|
28
|
+
search: string;
|
|
29
|
+
show: string;
|
|
30
|
+
hide: string;
|
|
31
|
+
decrease: string;
|
|
32
|
+
increase: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
2
35
|
type Props = {
|
|
3
36
|
language: string;
|
|
4
|
-
currency:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
separator: string;
|
|
8
|
-
decimal: string;
|
|
9
|
-
};
|
|
10
|
-
icon: {
|
|
11
|
-
familyClass?: string;
|
|
12
|
-
familyPrefix?: string;
|
|
13
|
-
materialStyle?: boolean;
|
|
14
|
-
};
|
|
37
|
+
currency: CurrencyProps;
|
|
38
|
+
icon: IconProps;
|
|
39
|
+
iconMap: IconMapProps;
|
|
15
40
|
};
|
|
16
41
|
type Context = Props & {
|
|
17
42
|
setContext: (value: Props) => void;
|
|
18
43
|
};
|
|
19
44
|
export declare const DContext: import("react").Context<Context>;
|
|
20
|
-
export declare function DContextProvider({ language, currency, icon, children, }: PropsWithChildren<Partial<Props>>): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function DContextProvider({ language, currency, icon, iconMap, children, }: PropsWithChildren<Partial<Props>>): import("react/jsx-runtime").JSX.Element;
|
|
21
46
|
export declare function useDContext(): Context;
|
|
22
47
|
export {};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"sideEffects": [
|
|
4
4
|
"*.css"
|
|
5
5
|
],
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.15.0",
|
|
7
7
|
"description": "React Dynamic Framework",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"repository": {
|
|
@@ -43,14 +43,15 @@
|
|
|
43
43
|
"test": "jest",
|
|
44
44
|
"test:watch": "jest --watch",
|
|
45
45
|
"test:storybook": "test-storybook",
|
|
46
|
-
"build": "pnpm clean && pnpm build:react && pnpm build:scss",
|
|
46
|
+
"build": "pnpm clean && pnpm build:react && pnpm build:scss && pnpm cp:bootstrap",
|
|
47
47
|
"build:react": "tsc -p ./tsconfig.build.json && rollup -c rollup.config.mjs",
|
|
48
48
|
"build:react:watch": "tsc -p ./tsconfig.build.json && rollup -c rollup.config.mjs",
|
|
49
49
|
"build:scss": "./scripts/build-scss.sh",
|
|
50
|
+
"cp:bootstrap": "scripts/cp-boostrap.sh",
|
|
50
51
|
"clean": "rimraf dist-transpiled && rimraf dist",
|
|
51
52
|
"compile": "tsc -p . && rollup -c rollup.config.mjs",
|
|
52
53
|
"storybook": "storybook dev -p 6006",
|
|
53
|
-
"build:storybook": "storybook build -o docs",
|
|
54
|
+
"build:storybook": "storybook build --docs -o docs",
|
|
54
55
|
"eslint": "pnpm eslint:src && pnpm eslint:stories && pnpm eslint:test",
|
|
55
56
|
"eslint:src": "eslint src/**/*{.ts,.tsx} --ignore-pattern '**/*.spec.tsx'",
|
|
56
57
|
"eslint:stories": "eslint stories/**/*.stories.tsx",
|
|
@@ -70,6 +71,7 @@
|
|
|
70
71
|
"@react-input/mask": "^1.0.20",
|
|
71
72
|
"@splidejs/react-splide": "^0.7.12",
|
|
72
73
|
"@splidejs/splide": "^4.1.4",
|
|
74
|
+
"@types/react-datepicker": "^4.19.1",
|
|
73
75
|
"bootstrap": "^5.3.2",
|
|
74
76
|
"classnames": "^2.3.2",
|
|
75
77
|
"currency.js": "^2.0.4",
|
|
@@ -79,6 +81,7 @@
|
|
|
79
81
|
"react-datepicker": "^4.21.0",
|
|
80
82
|
"react-dropzone": "^14.2.3",
|
|
81
83
|
"react-responsive-pagination": "^2.2.3",
|
|
84
|
+
"react-select": "^5.8.0",
|
|
82
85
|
"react-toastify": "^9.1.3"
|
|
83
86
|
},
|
|
84
87
|
"devDependencies": {
|
|
@@ -144,5 +147,5 @@
|
|
|
144
147
|
"react-dom": "^18.2.0",
|
|
145
148
|
"react-i18next": "^13.3.1"
|
|
146
149
|
},
|
|
147
|
-
"gitHead": "
|
|
150
|
+
"gitHead": "a37c9aa8e3eac83d13f9c2b8837334aa35ad0128"
|
|
148
151
|
}
|
|
@@ -19,7 +19,7 @@ $btn-padding-y-lg: .875rem !default;
|
|
|
19
19
|
$btn-padding-x-lg: $spacer-4 !default;
|
|
20
20
|
$btn-font-size-lg: $h6-font-size !default;
|
|
21
21
|
|
|
22
|
-
$btn-border-width:
|
|
22
|
+
$btn-border-width: 1px !default;
|
|
23
23
|
|
|
24
24
|
$btn-font-weight: $font-weight-normal !default;
|
|
25
25
|
$btn-box-shadow: none !default;
|
|
@@ -40,10 +40,10 @@ $input-font-size-lg: $input-font-size !default;
|
|
|
40
40
|
$input-bg: var(--#{$prefix}white) !default;
|
|
41
41
|
$input-disabled-color: var(--#{$prefix}gray) !default;
|
|
42
42
|
$input-disabled-bg: var(--#{$prefix}gray-100) !default;
|
|
43
|
-
$input-disabled-border-color: var(--#{$prefix}gray-
|
|
43
|
+
$input-disabled-border-color: var(--#{$prefix}gray-300) !default;
|
|
44
44
|
|
|
45
45
|
$input-color: var(--#{$prefix}gray) !default;
|
|
46
|
-
$input-border-color: var(--#{$prefix}gray-
|
|
46
|
+
$input-border-color: var(--#{$prefix}gray-300) !default; // unused
|
|
47
47
|
$input-border-width: $input-btn-border-width !default; // unused
|
|
48
48
|
$input-box-shadow: $box-shadow-inset !default; // unused
|
|
49
49
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
--#{$prefix}btn-sm-font-size: #{$btn-font-size-sm};
|
|
27
27
|
--#{$prefix}btn-sm-border-radius: var(--#{$prefix}btn-component-sm-border-radius, #{$btn-border-radius-sm});
|
|
28
28
|
|
|
29
|
-
display: flex;
|
|
29
|
+
display: inline-flex;
|
|
30
30
|
flex-direction: row;
|
|
31
31
|
gap: var(--#{$prefix}btn-gap, $spacer-2);
|
|
32
32
|
align-items: center;
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
&:hover,
|
|
58
58
|
&.hover {
|
|
59
59
|
color: var(--#{$prefix}btn-hover-color);
|
|
60
|
+
text-decoration: none;
|
|
60
61
|
background-color: var(--#{$prefix}btn-hover-bg);
|
|
61
62
|
border-color: var(--#{$prefix}btn-hover-border-color);
|
|
62
63
|
}
|
|
@@ -155,6 +156,10 @@
|
|
|
155
156
|
}
|
|
156
157
|
|
|
157
158
|
.btn-link-#{$color} {
|
|
159
|
+
span {
|
|
160
|
+
text-decoration: underline;
|
|
161
|
+
}
|
|
162
|
+
|
|
158
163
|
@include df-button-link-variant($color);
|
|
159
164
|
}
|
|
160
165
|
}
|
|
@@ -5,15 +5,13 @@
|
|
|
5
5
|
--#{$prefix}icon-padding: var(--#{$prefix}icon-component-padding, 0);
|
|
6
6
|
--#{$prefix}icon-loading-duration: var(--#{$prefix}icon-component-loading-duration, 1.8);
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
display: inline-flex !important; // stylelint-disable-line declaration-no-important
|
|
8
|
+
display: inline-flex !important; /* stylelint-disable-line declaration-no-important */
|
|
10
9
|
align-items: center;
|
|
11
10
|
justify-content: center;
|
|
12
11
|
width: var(--#{$prefix}icon-size);
|
|
13
12
|
height: var(--#{$prefix}icon-size);
|
|
14
13
|
padding: var(--#{$prefix}icon-padding);
|
|
15
|
-
|
|
16
|
-
font-size: var(--#{$prefix}icon-size) !important; // stylelint-disable-line declaration-no-important
|
|
14
|
+
font-size: var(--#{$prefix}icon-size) !important; /* stylelint-disable-line declaration-no-important */
|
|
17
15
|
color: var(--#{$prefix}icon-color);
|
|
18
16
|
background-color: var(--#{$prefix}icon-bg-color);
|
|
19
17
|
border-radius: var(--#{$prefix}icon-padding);
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
--#{$prefix}input-label-padding-x: #{$form-label-padding-x};
|
|
8
8
|
--#{$prefix}input-label-padding-y: #{$form-label-padding-y};
|
|
9
9
|
--#{$prefix}input-label-gap: #{$form-label-gap};
|
|
10
|
-
// label if input has value
|
|
11
|
-
--#{$prefix}input-label-has-value-color: #{$form-label-has-value-color};
|
|
12
10
|
|
|
13
11
|
// input group
|
|
14
12
|
--#{$prefix}input-group-border-color: #{$input-group-border-color};
|
|
@@ -31,7 +29,7 @@
|
|
|
31
29
|
// input disabled
|
|
32
30
|
--#{$prefix}input-group-disabled-border-color: #{$input-disabled-border-color};
|
|
33
31
|
--#{$prefix}input-group-disabled-bg: #{$input-disabled-bg};
|
|
34
|
-
--#{$prefix}input-group-disabled-color: #{$input-
|
|
32
|
+
--#{$prefix}input-group-disabled-color: #{$input-disabled-color};
|
|
35
33
|
|
|
36
34
|
display: flex;
|
|
37
35
|
flex-direction: column;
|
|
@@ -74,7 +72,7 @@
|
|
|
74
72
|
}
|
|
75
73
|
|
|
76
74
|
// not empty
|
|
77
|
-
.input-group:not(:focus-within):not(.has-validation):has(.form-control:not(:placeholder-shown
|
|
75
|
+
.input-group:not(:focus-within):not(.has-validation):has(.form-control:not(:placeholder-shown)) {
|
|
78
76
|
border-color: var(--#{$prefix}input-group-hover-border-color);
|
|
79
77
|
}
|
|
80
78
|
|
|
@@ -95,9 +93,7 @@
|
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
.d-input-validation-icon {
|
|
98
|
-
|
|
99
|
-
--#{$prefix}icon-color: #{$tooltip-bg-color};
|
|
100
|
-
}
|
|
96
|
+
--#{$prefix}icon-color: #{$tooltip-bg-color};
|
|
101
97
|
}
|
|
102
98
|
}
|
|
103
99
|
}
|
|
@@ -144,10 +140,6 @@
|
|
|
144
140
|
.input-group-text {
|
|
145
141
|
border: 0;
|
|
146
142
|
outline: 0;
|
|
147
|
-
|
|
148
|
-
&:disabled {
|
|
149
|
-
color: var(--#{$prefix}input-group-disabled-color);
|
|
150
|
-
}
|
|
151
143
|
}
|
|
152
144
|
|
|
153
145
|
// input disabled
|
|
@@ -157,11 +149,9 @@
|
|
|
157
149
|
|
|
158
150
|
|
|
159
151
|
&:has(.form-control:disabled) {
|
|
160
|
-
border-color: var(--#{$prefix}input-group-disabled-color);
|
|
161
152
|
|
|
162
153
|
// input addons disabled
|
|
163
154
|
.input-group-text {
|
|
164
|
-
color: var(--#{$prefix}input-group-disabled-color);
|
|
165
155
|
background: var(--#{$prefix}input-group-disabled-bg);
|
|
166
156
|
}
|
|
167
157
|
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
// stylelint-disable selector-class-pattern
|
|
2
|
+
|
|
3
|
+
.d-select {
|
|
4
|
+
--#{$prefix}input-gap: #{$spacer-2};
|
|
5
|
+
|
|
6
|
+
// label
|
|
7
|
+
--#{$prefix}input-label-color: #{$form-label-color};
|
|
8
|
+
--#{$prefix}input-label-font-weight: #{$form-label-font-weight};
|
|
9
|
+
--#{$prefix}input-label-font-size: #{$form-label-font-size};
|
|
10
|
+
--#{$prefix}input-label-padding-x: #{$form-label-padding-x};
|
|
11
|
+
--#{$prefix}input-label-padding-y: #{$form-label-padding-y};
|
|
12
|
+
--#{$prefix}input-label-gap: #{$form-label-gap};
|
|
13
|
+
|
|
14
|
+
// input group
|
|
15
|
+
--#{$prefix}input-group-border-color: #{$input-group-border-color};
|
|
16
|
+
--#{$prefix}input-group-border-width: #{$input-group-border-width};
|
|
17
|
+
--#{$prefix}input-group-border-radius: #{$input-group-border-radius};
|
|
18
|
+
// input group hover
|
|
19
|
+
--#{$prefix}input-group-hover-border-color: #{$input-group-hover-border-color};
|
|
20
|
+
// input group focus
|
|
21
|
+
--#{$prefix}input-group-focus-border-color: #{$input-group-focus-border-color};
|
|
22
|
+
--#{$prefix}input-group-focus-box-shadow: #{$input-group-focus-box-shadow};
|
|
23
|
+
|
|
24
|
+
// input
|
|
25
|
+
--#{$prefix}input-padding-y: #{$input-padding-y};
|
|
26
|
+
--#{$prefix}input-padding-x: #{$input-padding-x};
|
|
27
|
+
--#{$prefix}input-font-family: #{$input-font-family};
|
|
28
|
+
--#{$prefix}input-font-size: #{$input-font-size};
|
|
29
|
+
--#{$prefix}input-font-weight: #{$input-font-weight};
|
|
30
|
+
--#{$prefix}input-line-height: #{$input-line-height};
|
|
31
|
+
--#{$prefix}input-color: #{$input-color};
|
|
32
|
+
--#{$prefix}input-bg: #{$input-bg};
|
|
33
|
+
--#{$prefix}input-focus-color: #{$input-focus-color};
|
|
34
|
+
--#{$prefix}input-focus-bg: #{$input-focus-bg};
|
|
35
|
+
--#{$prefix}input-placeholder-color: #{$input-placeholder-color};
|
|
36
|
+
|
|
37
|
+
// hint
|
|
38
|
+
--#{$prefix}input-form-text-padding: #{$form-control-padding-y} #{$form-control-padding-x};
|
|
39
|
+
--#{$prefix}input-form-text-gap: #{$form-control-gap};
|
|
40
|
+
--#{$prefix}input-form-text-color: #{$form-control-color};
|
|
41
|
+
|
|
42
|
+
// input disabled
|
|
43
|
+
--#{$prefix}input-group-disabled-border-color: #{$input-disabled-border-color};
|
|
44
|
+
--#{$prefix}input-group-disabled-bg: #{$input-disabled-bg};
|
|
45
|
+
--#{$prefix}input-group-disabled-color: #{$input-disabled-color};
|
|
46
|
+
|
|
47
|
+
// select
|
|
48
|
+
--#{$prefix}select-menu-shadow: #{$box-shadow-sm};
|
|
49
|
+
|
|
50
|
+
--#{$prefix}select-option-focus-bg: var(--#{$prefix}gray-100);
|
|
51
|
+
|
|
52
|
+
--#{$prefix}select-option-selected-color: var(--#{$prefix}secondary);
|
|
53
|
+
--#{$prefix}select-option-selected-bg: var(--#{$prefix}gray-100);
|
|
54
|
+
|
|
55
|
+
--#{$prefix}select-option-is-checkbox-font-size: var(--#{$prefix}body-font-size);
|
|
56
|
+
--#{$prefix}select-option-is-checkbox-font-weight: var(--#{$prefix}ref-fw-normal);
|
|
57
|
+
--#{$prefix}select-option-is-checkbox-color: var(--#{$prefix}gray-900);
|
|
58
|
+
|
|
59
|
+
--#{$prefix}select-option-has-icon-icon-size: #{$spacer-3};
|
|
60
|
+
|
|
61
|
+
--#{$prefix}select-multi-value-padding-x: var(--#{$prefix}input-gap);
|
|
62
|
+
--#{$prefix}select-multi-value-padding-y: 0;
|
|
63
|
+
--#{$prefix}select-multi-value-margin-right: var(--#{$prefix}input-gap);
|
|
64
|
+
--#{$prefix}select-multi-value-background: var(--#{$prefix}gray-100);
|
|
65
|
+
--#{$prefix}select-multi-value-border-radius: #{$spacer-1};
|
|
66
|
+
--#{$prefix}select-multi-value-label-color: var(--#{$prefix}secondary);
|
|
67
|
+
|
|
68
|
+
--#{$prefix}select-indicator-width: #{$spacer-4};
|
|
69
|
+
--#{$prefix}select-indicator-height: #{$spacer-4};
|
|
70
|
+
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-direction: column;
|
|
73
|
+
gap: var(--#{$prefix}input-gap);
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
|
|
76
|
+
// focus
|
|
77
|
+
&:focus-within {
|
|
78
|
+
.input-group {
|
|
79
|
+
border-color: var(--#{$prefix}input-group-focus-border-color);
|
|
80
|
+
box-shadow: var(--#{$prefix}input-group-focus-box-shadow);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.d-select-control {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
gap: var(--#{$prefix}input-gap);
|
|
88
|
+
width: 100%;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
label {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
flex-direction: row;
|
|
94
|
+
gap: var(--#{$prefix}input-label-gap);
|
|
95
|
+
align-items: center;
|
|
96
|
+
|
|
97
|
+
.d-select-icon {
|
|
98
|
+
.d-icon {
|
|
99
|
+
--#{$prefix}icon-color: var(--#{$prefix}focus-ring-color);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// input with elements
|
|
105
|
+
.input-group {
|
|
106
|
+
border: var(--#{$prefix}input-group-border-width) solid var(--#{$prefix}input-group-border-color);
|
|
107
|
+
border-radius: var(--#{$prefix}input-group-border-radius);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// not empty
|
|
111
|
+
.input-group:not(.disabled):not(:focus-within):not(.has-validation):has(.d-select__value-container--has-value) {
|
|
112
|
+
border-color: var(--#{$prefix}input-group-hover-border-color);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// input hint
|
|
116
|
+
.input-group ~ .form-text {
|
|
117
|
+
display: inline-flex;
|
|
118
|
+
flex-direction: row;
|
|
119
|
+
gap: var(--#{$prefix}input-form-text-gap);
|
|
120
|
+
align-items: center;
|
|
121
|
+
padding: var(--#{$prefix}input-form-text-padding);
|
|
122
|
+
color: var(--#{$prefix}input-form-text-color);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// select control
|
|
126
|
+
.d-select-component {
|
|
127
|
+
border-radius: var(--#{$prefix}input-group-border-radius);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.d-select__control {
|
|
131
|
+
width: 100%;
|
|
132
|
+
padding: var(--#{$prefix}input-padding-y) var(--#{$prefix}input-padding-x);
|
|
133
|
+
font-family: var(--#{$prefix}input-font-family);
|
|
134
|
+
@include rfs($input-font-size, --#{$prefix}input-font-size);
|
|
135
|
+
font-weight: var(--#{$prefix}input-font-weight);
|
|
136
|
+
line-height: var(--#{$prefix}input-line-height);
|
|
137
|
+
color: var(--#{$prefix}input-color);
|
|
138
|
+
appearance: none; // Fix appearance for date inputs in Safari
|
|
139
|
+
background-color: var(--#{$prefix}input-bg);
|
|
140
|
+
background-clip: padding-box;
|
|
141
|
+
// border: $input-border-width solid $input-border-color;
|
|
142
|
+
|
|
143
|
+
@include border-radius($input-border-radius, 0);
|
|
144
|
+
|
|
145
|
+
@include transition($input-transition);
|
|
146
|
+
|
|
147
|
+
// Customize the `:focus` state to imitate native WebKit styles.
|
|
148
|
+
&:focus {
|
|
149
|
+
color: var(--#{$prefix}input-focus-color);
|
|
150
|
+
background-color: var(--#{$prefix}input-focus-bg);
|
|
151
|
+
outline: 0;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.d-select__placeholder {
|
|
156
|
+
color: var(--#{$prefix}input-placeholder-color);
|
|
157
|
+
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
|
|
158
|
+
opacity: 1;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// select menu
|
|
162
|
+
.d-select__menu-list {
|
|
163
|
+
top: calc(var(--#{$prefix}input-group-border-width) * 2);
|
|
164
|
+
background: var(--#{$prefix}input-bg);
|
|
165
|
+
border-radius: var(--#{$prefix}input-group-border-radius);
|
|
166
|
+
box-shadow: var(--#{$prefix}select-menu-shadow);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.d-select__control--menu-is-open .d-select__dropdown-indicator {
|
|
170
|
+
transform: rotateX(180deg);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// select option
|
|
174
|
+
.d-select__option {
|
|
175
|
+
display: block;
|
|
176
|
+
padding: var(--#{$prefix}input-padding-y) var(--#{$prefix}input-padding-x);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.d-select__option--is-focused {
|
|
180
|
+
background: var(--#{$prefix}select-option-focus-bg);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.d-select__option--is-selected {
|
|
184
|
+
color: var(--#{$prefix}select-option-selected-color);
|
|
185
|
+
background: var(--#{$prefix}select-option-selected-bg);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// select option with checkbox
|
|
189
|
+
.d-select__option--is-checkbox {
|
|
190
|
+
padding: 0;
|
|
191
|
+
|
|
192
|
+
> label {
|
|
193
|
+
width: 100%;
|
|
194
|
+
padding: var(--#{$prefix}input-padding-x);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.form-check-input {
|
|
198
|
+
margin-right: var(--#{$prefix}input-padding-x);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.d-select__option--is-checkbox label {
|
|
203
|
+
font-size: var(--#{$prefix}select-option-is-checkbox-font-size);
|
|
204
|
+
font-weight: var(--#{$prefix}select-option-is-checkbox-font-weight);
|
|
205
|
+
color: var(--#{$prefix}select-option-is-checkbox-color);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// select multi control
|
|
209
|
+
.d-select__multi-value {
|
|
210
|
+
padding: var(--#{$prefix}select-multi-value-padding-y) var(--#{$prefix}select-multi-value-padding-x);
|
|
211
|
+
margin-right: var(--#{$prefix}select-multi-value-margin-right);
|
|
212
|
+
background: var(--#{$prefix}select-multi-value-background);
|
|
213
|
+
border-radius: var(--#{$prefix}select-multi-value-border-radius);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.d-select__multi-value__label {
|
|
217
|
+
color: var(--#{$prefix}select-multi-value-label-color);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.d-select__control--has-icon,
|
|
221
|
+
.d-select__option--has-icon {
|
|
222
|
+
display: flex;
|
|
223
|
+
flex-direction: row;
|
|
224
|
+
gap: var(--#{$prefix}input-padding-x);
|
|
225
|
+
align-items: center;
|
|
226
|
+
white-space: nowrap;
|
|
227
|
+
|
|
228
|
+
.d-icon {
|
|
229
|
+
--bs-icon-size: var(--#{$prefix}select-option-has-icon-icon-size);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.d-select__indicator {
|
|
234
|
+
display: flex;
|
|
235
|
+
align-items: center;
|
|
236
|
+
justify-content: center;
|
|
237
|
+
width: var(--#{$prefix}select-indicator-width);
|
|
238
|
+
height: var(--#{$prefix}select-indicator-height);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.d-select__indicator-separator {
|
|
242
|
+
width: var(--#{$prefix}input-gap);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&.disabled .d-select__control {
|
|
246
|
+
background: var(--#{$prefix}input-group-disabled-bg);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
&.disabled .input-group {
|
|
250
|
+
border-color: var(--#{$prefix}input-group-disabled-border-color);
|
|
251
|
+
}
|
|
252
|
+
}
|