@dynamic-framework/ui-react 1.32.2 → 1.33.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.
@@ -10,9 +10,10 @@ type Props = ComponentPropsWithoutRef<'input'> & BaseProps & {
10
10
  disabled?: boolean;
11
11
  invalid?: boolean;
12
12
  valid?: boolean;
13
+ hint?: string;
13
14
  indeterminate?: boolean;
14
15
  value?: string;
15
16
  onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
16
17
  };
17
- export default function DInputCheck({ id: idProp, type, name, label, ariaLabel, checked, disabled, invalid, valid, indeterminate, value, onChange, className, style, dataAttributes, ...props }: Props): import("react/jsx-runtime").JSX.Element;
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;
18
19
  export {};
@@ -9,6 +9,7 @@ import DSelectLoadingIndicator from './components/DSelectLoadingIndicator';
9
9
  import DSelectOptionEmoji from './components/DSelectOptionEmoji';
10
10
  import DSelectSingleValueEmoji from './components/DSelectSingleValueEmoji';
11
11
  import DSelectSingleValueEmojiText from './components/DSelectSingleValueEmojiText';
12
+ import DSelectPlaceholder from './components/DSelectPlaceholder';
12
13
  import type { BaseProps, EndIconProps, FamilyIconProps, LabelIconProps, StartIconProps } from '../interface';
13
14
  type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = BaseProps & FamilyIconProps & LabelIconProps & StartIconProps & EndIconProps & Omit<SelectProps<Option, IsMulti, Group>, 'isDisabled' | 'isClearable' | 'isLoading' | 'isRtl' | 'isSearchable' | 'isMulti'> & {
14
15
  label?: string;
@@ -25,7 +26,7 @@ type Props<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = B
25
26
  searchable?: SelectProps<Option, IsMulti, Group>['isSearchable'];
26
27
  multi?: SelectProps<Option, IsMulti, Group>['isMulti'];
27
28
  };
28
- declare function DSelect<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ id, className, style, label, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, menuWithMaxContent, disabled, clearable, loading, rtl, searchable, multi, components, defaultValue, onIconStartClick, onIconEndClick, dataAttributes, ...props }: Props<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
29
+ declare function DSelect<Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ id: idProp, className, style, label, labelIcon, labelIconFamilyClass, labelIconFamilyPrefix, hint, iconFamilyClass, iconFamilyPrefix, iconStart, iconStartFamilyClass, iconStartFamilyPrefix, iconStartAriaLabel, iconStartTabIndex, iconEnd, iconEndFamilyClass, iconEndFamilyPrefix, iconEndAriaLabel, iconEndTabIndex, invalid, valid, menuWithMaxContent, disabled, clearable, loading, rtl, searchable, multi, components, defaultValue, placeholder, onIconStartClick, onIconEndClick, dataAttributes, ...props }: Props<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
29
30
  declare const _default: typeof DSelect & {
30
31
  OptionCheck: typeof DSelectOptionCheck;
31
32
  OptionIcon: typeof DSelectOptionIcon;
@@ -37,5 +38,6 @@ declare const _default: typeof DSelect & {
37
38
  OptionEmoji: typeof DSelectOptionEmoji;
38
39
  SingleValueEmoji: typeof DSelectSingleValueEmoji;
39
40
  SingleValueEmojiText: typeof DSelectSingleValueEmojiText;
41
+ Placeholder: typeof DSelectPlaceholder;
40
42
  };
41
43
  export default _default;
@@ -0,0 +1,2 @@
1
+ import type { GroupBase, PlaceholderProps } from 'react-select';
2
+ export default function DSelectPlaceholder<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ selectProps, innerProps: innerPropsProp, children, ...props }: PlaceholderProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
@@ -42,8 +42,8 @@ export { default as DStepper } from './DStepper';
42
42
  export { default as DStepperDesktop } from './DStepperDesktop';
43
43
  export { default as DStepperMobile } from './DStepperMobile';
44
44
  export { default as DTooltip } from './DTooltip';
45
- export { default as DTabs, useTabContext } from './DTabs';
46
- export type { DTabOption, DTabContent } from './DTabs';
45
+ export { default as DTabs, useTabContext, DTabContent, } from './DTabs';
46
+ export type { DTabOption } from './DTabs';
47
47
  export { default as DToast } from './DToast';
48
48
  export { default as DToastContainer, useDToast, } from './DToastContainer';
49
49
  export { default as DTableHead } from './DTableHead';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "sideEffects": [
4
4
  "*.css"
5
5
  ],
6
- "version": "1.32.2",
6
+ "version": "1.33.0",
7
7
  "description": "React Dynamic Framework",
8
8
  "license": "https://github.com/dynamic-framework/dynamic-ui/blob/master/libraries/dynamic-ui-react/LICENSE.md",
9
9
  "repository": {
@@ -43,11 +43,11 @@
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 && pnpm cp",
46
+ "build": "npm run clean && npm run build:react && npm run build:scss && npm run cp",
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": "node scripts/build-scss.js",
50
- "cp": "pnpm cp:bootstrap && pnpm cp:popper && pnpm cp:bootstrap-icons",
50
+ "cp": "npm run cp:bootstrap && npm run cp:popper && npm run cp:bootstrap-icons",
51
51
  "cp:bootstrap": "scripts/cp-boostrap.sh",
52
52
  "cp:bootstrap-icons": "scripts/cp-boostrap-icons.sh",
53
53
  "cp:popper": "scripts/cp-popper.sh",
@@ -55,17 +55,22 @@
55
55
  "compile": "tsc -p . && rollup -c rollup.config.mjs",
56
56
  "storybook": "storybook dev -p 6006",
57
57
  "build:storybook": "storybook build --docs -o docs",
58
- "eslint": "pnpm eslint:src && pnpm eslint:stories && pnpm eslint:test",
58
+ "eslint": "npm run eslint:src && npm run eslint:stories && npm run eslint:test",
59
59
  "eslint:src": "eslint src/**/*{.ts,.tsx} --ignore-pattern '**/*.spec.tsx'",
60
60
  "eslint:stories": "eslint stories/**/*.stories.tsx",
61
61
  "eslint:test": "eslint src/**/*.spec.tsx",
62
62
  "stylelint": "stylelint \"**/*.{css,scss}\" --rd",
63
- "postversion": "pnpm build:scss",
64
- "publish:cdn": "pnpm publish:cdn-version && pnpm publish:cdn-latest",
63
+ "postversion": "npm run build:scss",
64
+ "publish:cdn": "npm run publish:cdn-version && npm run publish:cdn-latest",
65
65
  "publish:cdn-version": "node scripts/publish-cdn.js",
66
66
  "publish:cdn-latest": "aws s3 sync ./dist/ s3://dynamicframework-cdn/assets/latest/ui-react --delete --acl public-read",
67
67
  "publish:cdn-rc": "aws s3 sync ./dist/ s3://dynamicframework-cdn/assets/rc/ui-react --delete --acl public-read",
68
- "lint-staged": "lint-staged"
68
+ "lint-staged": "lint-staged",
69
+ "prepare": "husky install",
70
+ "commitlint": "commitlint --edit"
71
+ },
72
+ "engines": {
73
+ "node": ">=20.13.1"
69
74
  },
70
75
  "main": "./dist/index.js",
71
76
  "module": "./dist/index.esm.js",
@@ -76,94 +81,97 @@
76
81
  "jest/"
77
82
  ],
78
83
  "dependencies": {
79
- "@floating-ui/react": "^0.26.1",
80
- "@react-input/mask": "^1.0.20",
81
- "@splidejs/react-splide": "^0.7.12",
82
- "@splidejs/splide": "^4.1.4",
83
- "@types/react-datepicker": "^4.19.1",
84
- "bootstrap": "^5.3.3",
85
- "classnames": "^2.3.2",
86
- "currency.js": "^2.0.4",
87
- "date-fns": "^2.30.0",
88
- "i18next": "^23.6.0",
89
- "react-content-loader": "^6.2.1",
90
- "react-datepicker": "^4.21.0",
91
- "react-dropzone": "^14.2.3",
92
- "react-responsive-pagination": "^2.4.1",
93
- "react-select": "^5.8.0"
84
+ "@floating-ui/react": "~0.26.1",
85
+ "@react-input/mask": "~1.0.20",
86
+ "@splidejs/react-splide": "~0.7.12",
87
+ "@splidejs/splide": "~4.1.4",
88
+ "@types/react-datepicker": "~4.19.1",
89
+ "bootstrap": "~5.3.3",
90
+ "classnames": "~2.3.2",
91
+ "currency.js": "~2.0.4",
92
+ "date-fns": "~2.30.0",
93
+ "i18next": "~23.6.0",
94
+ "react-content-loader": "~6.2.1",
95
+ "react-datepicker": "~4.21.0",
96
+ "react-dropzone": "~14.2.3",
97
+ "react-responsive-pagination": "^2.9.0",
98
+ "react-select": "^5.8.3"
94
99
  },
95
100
  "devDependencies": {
96
- "@babel/core": "^7.23.2",
97
- "@babel/preset-env": "^7.23.2",
98
- "@babel/preset-react": "^7.22.15",
99
- "@babel/preset-typescript": "^7.23.2",
100
- "@mdx-js/react": "^2.3.0",
101
- "@popperjs/core": "^2.11.8",
102
- "@rollup/plugin-node-resolve": "^15.2.3",
103
- "@storybook/addon-a11y": "^8.2.9",
104
- "@storybook/addon-actions": "^8.2.9",
105
- "@storybook/addon-essentials": "^8.2.9",
106
- "@storybook/addon-interactions": "^8.2.9",
107
- "@storybook/addon-links": "^8.2.9",
108
- "@storybook/addon-viewport": "^8.2.9",
109
- "@storybook/blocks": "^8.2.9",
110
- "@storybook/react": "^8.2.9",
111
- "@storybook/react-vite": "^8.2.9",
112
- "@storybook/test": "^8.2.9",
113
- "@storybook/theming": "^8.2.9",
114
- "@testing-library/jest-dom": "^6.1.4",
115
- "@testing-library/react": "^14.0.0",
116
- "@types/jest": "^29.5.12",
117
- "@types/node": "^18.15.3",
118
- "@types/react": "^18.2.31",
119
- "@types/react-datepicker": "^4.19.1",
120
- "@types/react-dom": "^18.2.14",
121
- "@typescript-eslint/eslint-plugin": "^6.9.0",
122
- "@typescript-eslint/parser": "^6.9.0",
123
- "autoprefixer": "^10.4.16",
124
- "axe-playwright": "^1.2.3",
125
- "babel-loader": "^9.1.3",
126
- "bootstrap-icons": "^1.11.3",
127
- "eslint": "^8.52.0",
128
- "eslint-config-airbnb": "^19.0.4",
129
- "eslint-config-airbnb-typescript": "^17.1.0",
130
- "eslint-plugin-import": "^2.29.0",
131
- "eslint-plugin-jsx-a11y": "^6.7.1",
132
- "eslint-plugin-react": "^7.33.2",
133
- "eslint-plugin-react-hooks": "^4.6.0",
134
- "glob": "^10.3.10",
135
- "jest": "^29.7.0",
136
- "jest-axe": "^8.0.0",
137
- "jest-cli": "^29.7.0",
138
- "jest-environment-jsdom": "^29.7.0",
139
- "lint-staged": "^15.0.2",
140
- "postcss-cli": "^10.1.0",
141
- "react": "^18.2.0",
142
- "react-dom": "^18.2.0",
143
- "react-hot-toast": "^2.4.1",
144
- "react-i18next": "^13.3.1",
145
- "recharts": "^2.12.7",
146
- "rimraf": "^5.0.5",
147
- "rollup": "^4.1.4",
148
- "sass": "^1.69.4",
149
- "storybook": "^8.2.9",
150
- "stylelint": "^15.11.0",
151
- "stylelint-config-twbs-bootstrap": "^11.0.1",
152
- "ts-jest": "^29.2.3",
153
- "tslib": "^2.6.2",
154
- "typescript": "^5.2.2"
101
+ "@babel/core": "~7.23.2",
102
+ "@babel/preset-env": "~7.23.2",
103
+ "@babel/preset-react": "~7.22.15",
104
+ "@babel/preset-typescript": "~7.23.2",
105
+ "@commitlint/cli": "~19.3.0",
106
+ "@commitlint/config-conventional": "~19.2.2",
107
+ "@mdx-js/react": "~2.3.0",
108
+ "@popperjs/core": "~2.11.8",
109
+ "@rollup/plugin-node-resolve": "^15.3.0",
110
+ "@storybook/addon-a11y": "~8.2.9",
111
+ "@storybook/addon-actions": "~8.2.9",
112
+ "@storybook/addon-essentials": "~8.2.9",
113
+ "@storybook/addon-interactions": "~8.2.9",
114
+ "@storybook/addon-links": "~8.2.9",
115
+ "@storybook/addon-viewport": "~8.2.9",
116
+ "@storybook/blocks": "~8.2.9",
117
+ "@storybook/react": "~8.2.9",
118
+ "@storybook/react-vite": "~8.2.9",
119
+ "@storybook/test": "~8.2.9",
120
+ "@storybook/theming": "~8.2.9",
121
+ "@testing-library/jest-dom": "~6.1.4",
122
+ "@testing-library/react": "~14.0.0",
123
+ "@types/jest": "~29.5.12",
124
+ "@types/node": "~18.15.3",
125
+ "@types/react": "~18.2.31",
126
+ "@types/react-datepicker": "~4.19.1",
127
+ "@types/react-dom": "~18.2.14",
128
+ "@typescript-eslint/eslint-plugin": "~6.9.0",
129
+ "@typescript-eslint/parser": "~6.9.0",
130
+ "autoprefixer": "~10.4.16",
131
+ "axe-playwright": "~1.2.3",
132
+ "babel-loader": "~9.1.3",
133
+ "bootstrap-icons": "~1.11.3",
134
+ "conventional-changelog-conventionalcommits": "~6.1.0",
135
+ "eslint": "~8.52.0",
136
+ "eslint-config-airbnb": "~19.0.4",
137
+ "eslint-config-airbnb-typescript": "~17.1.0",
138
+ "eslint-plugin-import": "~2.29.0",
139
+ "eslint-plugin-jsx-a11y": "~6.7.1",
140
+ "eslint-plugin-react": "~7.33.2",
141
+ "eslint-plugin-react-hooks": "~4.6.0",
142
+ "glob": "~10.3.10",
143
+ "husky": "~8.0.3",
144
+ "jest": "~29.7.0",
145
+ "jest-axe": "~8.0.0",
146
+ "jest-cli": "~29.7.0",
147
+ "jest-environment-jsdom": "~29.7.0",
148
+ "lint-staged": "^15.2.10",
149
+ "postcss-cli": "~10.1.0",
150
+ "react": "~18.2.0",
151
+ "react-dom": "~18.2.0",
152
+ "react-hot-toast": "~2.4.1",
153
+ "react-i18next": "~13.3.1",
154
+ "recharts": "~2.12.7",
155
+ "rimraf": "~5.0.5",
156
+ "rollup": "^4.27.4",
157
+ "sass": "~1.69.4",
158
+ "storybook": "~8.2.9",
159
+ "stylelint": "~15.11.0",
160
+ "stylelint-config-twbs-bootstrap": "~11.0.1",
161
+ "ts-jest": "~29.2.3",
162
+ "tslib": "~2.6.2",
163
+ "typescript": "~5.2.2"
155
164
  },
156
165
  "peerDependencies": {
157
- "react": "^18.2.0",
158
- "react-dom": "^18.2.0",
159
- "react-hot-toast": "^2.4.1",
160
- "react-i18next": "^13.3.1",
161
- "recharts": "^2.12.7"
166
+ "react": "~18.2.0",
167
+ "react-dom": "~18.2.0",
168
+ "react-hot-toast": "~2.4.1",
169
+ "react-i18next": "~13.3.1",
170
+ "recharts": "~2.12.7"
162
171
  },
163
172
  "peerDependenciesMeta": {
164
173
  "recharts": {
165
174
  "optional": true
166
175
  }
167
- },
168
- "gitHead": "9744c7852de4244bec758d81a3b92b568305df8e"
176
+ }
169
177
  }
@@ -46,7 +46,7 @@ $input-plaintext-color: var(--#{$prefix}body-color) !default;
46
46
  // scss-docs-start form-check-variables
47
47
  $form-check-input-width: 1em !default;
48
48
  $form-check-min-height: $form-check-input-width !default;
49
- $form-check-padding-start: $form-check-input-width - .5em !default;
49
+ $form-check-padding-start: $form-check-input-width !default;
50
50
  $form-check-input-focus-box-shadow: var(--#{$prefix}form-check-input-focus-box-shadow) !default;
51
51
  $form-check-input-focus-border: var(--#{$prefix}form-check-input-focus-border-color) !default;
52
52
  $form-check-input-checked-bg-image: url("data:image/svg+xml, <svg viewBox='-4 -6 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M14.294 0.594229C14.3863 0.498719 14.4966 0.422536 14.6186 0.370127C14.7406 0.317718 14.8719 0.290132 15.0046 0.288978C15.1374 0.287824 15.2691 0.313126 15.392 0.363407C15.5149 0.413688 15.6265 0.487941 15.7204 0.581833C15.8143 0.675726 15.8886 0.787378 15.9389 0.910275C15.9891 1.03317 16.0144 1.16485 16.0133 1.29763C16.0121 1.43041 15.9846 1.56163 15.9321 1.68363C15.8797 1.80564 15.8036 1.91598 15.708 2.00823L6.70804 11.0082C6.52051 11.1957 6.26621 11.301 6.00104 11.301C5.73588 11.301 5.48157 11.1957 5.29404 11.0082L0.293041 6.00723C0.110883 5.81863 0.0100885 5.56602 0.0123669 5.30383C0.0146453 5.04163 0.119815 4.79082 0.305223 4.60541C0.490631 4.42 0.741443 4.31483 1.00364 4.31255C1.26584 4.31028 1.51844 4.41107 1.70704 4.59323L6.00104 8.88723L14.294 0.594229V0.594229Z' fill='#{$white}'/></svg>") !default;
@@ -6,3 +6,21 @@
6
6
  --#{$prefix}form-check-input-focus-border-color: #{$component-focus-border-color};
7
7
  --#{$prefix}form-check-input-focus-box-shadow: #{$input-btn-focus-box-shadow};
8
8
  }
9
+
10
+ .form-check {
11
+ .form-text {
12
+ --#{$prefix}form-text-padding: 0 var(--#{$prefix}ref-spacer-2);
13
+
14
+ display: flex;
15
+ }
16
+
17
+ @each $state, $data in $form-validation-states {
18
+ $border-color: map-get($data, "border-color");
19
+
20
+ &:has(.form-check-input.is-#{$state}) {
21
+ .form-text {
22
+ color: $border-color;
23
+ }
24
+ }
25
+ }
26
+ }
@@ -44,11 +44,13 @@
44
44
  border-right: 1px solid var(--#{$prefix}nav-tabs-border-color);
45
45
  border-bottom-color: transparent;
46
46
  }
47
- .nav-link.active{
47
+
48
+ .nav-link.active {
48
49
  background-color: var(--#{$prefix}nav-link-hover-bg);
49
50
  border-right: 1px solid currentcolor;
50
51
  }
51
52
  }
53
+
52
54
  .nav-link {
53
55
  padding: var(--#{$prefix}nav-link-padding-y) var(--#{$prefix}nav-link-padding-x);
54
56
  border-bottom: 1px solid var(--#{$prefix}gray-300);
@@ -2,6 +2,11 @@
2
2
 
3
3
  // stylelint-disable selector-class-pattern
4
4
 
5
+ .react-datepicker-wrapper {
6
+ width: 100%;
7
+ margin-inline: auto;
8
+ }
9
+
5
10
  .react-datepicker {
6
11
  --#{$prefix}datepicker-font-family: var(--#{$prefix}font-sans-serif);
7
12
  --#{$prefix}datepicker-border: 0px;
@@ -210,7 +210,7 @@
210
210
  --#{$prefix}label-padding-y: var(--#{$prefix}ref-spacer-0);
211
211
  --#{$prefix}label-padding-x: var(--#{$prefix}ref-spacer-0);
212
212
  --#{$prefix}label-margin-bottom: var(--#{$prefix}ref-spacer-1);
213
- --#{$prefix}label-font-size: var(--#{$prefix}fs-small);
213
+ --#{$prefix}label-font-size: var(--#{$prefix}body-font-size);
214
214
  --#{$prefix}label-font-weight: var(--#{$prefix}fw-normal);
215
215
  --#{$prefix}label-color: var(--#{$prefix}gray-700);
216
216