@cube-dev/ui-kit 0.7.3 → 0.7.7

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.
@@ -50,11 +50,13 @@ export interface FormFieldProps extends FormBaseProps {
50
50
  label?: ReactNode;
51
51
  /** Custom label props */
52
52
  labelProps?: Props;
53
- /** Message for the field. Some additional information or error notice. */
53
+ /** Message for the field. Some additional information or error notice */
54
54
  message?: ReactNode;
55
+ /** Description for the field. Will be placed below the label */
56
+ description?: ReactNode;
55
57
  /** A tooltip that is shown inside the label */
56
58
  tooltip?: ReactNode;
57
- /** Whether the element should receive focus on render. */
59
+ /** Whether the element should receive focus on render */
58
60
  autoFocus?: boolean;
59
61
  }
60
62
  export declare type ValidationRuleBase = {
@@ -20,6 +20,12 @@ export declare const LABEL_ARG: {
20
20
  description: string;
21
21
  };
22
22
  };
23
+ export declare const DESCRIPTION_ARG: {
24
+ description: {
25
+ control: string;
26
+ description: string;
27
+ };
28
+ };
23
29
  export declare const NECESSITY_INDICATOR_ARG: {
24
30
  necessityIndicator: {
25
31
  description: string;
@@ -9,25 +9,9 @@ export declare function styledScrollbarStyle({ styledScrollbar: val }: {
9
9
  $?: undefined;
10
10
  display?: undefined;
11
11
  })[] | ({
12
- '--local-scrollbar-thumb-color': string;
13
- '--local-scrollbar-border-color': string;
14
- '--local-scrollbar-bg-color': string;
15
- $?: undefined;
16
- width?: undefined;
17
- height?: undefined;
18
- 'background-color'?: undefined;
19
- 'border-radius'?: undefined;
20
- border?: undefined;
21
- 'background-clip'?: undefined;
22
- 'scrollbar-width'?: undefined;
23
- 'scrollbar-color'?: undefined;
24
- } | {
25
12
  $: string;
26
13
  width: string;
27
14
  height: string;
28
- '--local-scrollbar-thumb-color'?: undefined;
29
- '--local-scrollbar-border-color'?: undefined;
30
- '--local-scrollbar-bg-color'?: undefined;
31
15
  'background-color'?: undefined;
32
16
  'border-radius'?: undefined;
33
17
  border?: undefined;
@@ -37,9 +21,6 @@ export declare function styledScrollbarStyle({ styledScrollbar: val }: {
37
21
  } | {
38
22
  $: string;
39
23
  'background-color': string;
40
- '--local-scrollbar-thumb-color'?: undefined;
41
- '--local-scrollbar-border-color'?: undefined;
42
- '--local-scrollbar-bg-color'?: undefined;
43
24
  width?: undefined;
44
25
  height?: undefined;
45
26
  'border-radius'?: undefined;
@@ -53,9 +34,6 @@ export declare function styledScrollbarStyle({ styledScrollbar: val }: {
53
34
  'border-radius': string;
54
35
  border: string;
55
36
  'background-clip': string;
56
- '--local-scrollbar-thumb-color'?: undefined;
57
- '--local-scrollbar-border-color'?: undefined;
58
- '--local-scrollbar-bg-color'?: undefined;
59
37
  width?: undefined;
60
38
  height?: undefined;
61
39
  'scrollbar-width'?: undefined;
@@ -63,9 +41,6 @@ export declare function styledScrollbarStyle({ styledScrollbar: val }: {
63
41
  } | {
64
42
  'scrollbar-width': string;
65
43
  'scrollbar-color': string;
66
- '--local-scrollbar-thumb-color'?: undefined;
67
- '--local-scrollbar-border-color'?: undefined;
68
- '--local-scrollbar-bg-color'?: undefined;
69
44
  $?: undefined;
70
45
  width?: undefined;
71
46
  height?: undefined;
@@ -148,5 +148,12 @@ declare const TOKENS: {
148
148
  'default-line-height': string;
149
149
  'default-letter-spacing': string;
150
150
  'default-font-weight': string;
151
+ 'scrollbar-width': string;
152
+ 'scrollbar-outline-width': string;
153
+ 'scrollbar-radius': string;
154
+ 'scrollbar-thumb-color': string;
155
+ 'scrollbar-outline-color': string;
156
+ 'scrollbar-bg-color': string;
157
+ 'scrollbar-corner-color': string;
151
158
  };
152
159
  export { TOKENS };
@@ -5,3 +5,4 @@ export { modAttrs } from './modAttrs';
5
5
  export { useSlotProps, SlotProvider, ClearSlots } from './Slots';
6
6
  export { useLayoutEffect } from './useLayoutEffect';
7
7
  export { useCombinedRefs } from './useCombinedRefs';
8
+ export { wrapNodeIfPlain } from './wrapNodeIfPlain';
@@ -0,0 +1,2 @@
1
+ import { ReactNode } from 'react';
2
+ export declare function wrapNodeIfPlain(children: ReactNode, render: () => ReactNode): ReactNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cube-dev/ui-kit",
3
- "version": "0.7.3",
3
+ "version": "0.7.7",
4
4
  "description": "UIKit for Cube Projects",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/mjs/index.js",
@@ -22,15 +22,17 @@
22
22
  "build": "NODE_ENV=production rollup -c",
23
23
  "watch": "rollup -c -w",
24
24
  "test": "jest",
25
+ "test-cover": "jest --coverage",
25
26
  "test-watch": "jest --watch",
26
27
  "format": "prettier --write \"src/**/*.{js,jsx}\"",
27
- "lint": "prettier --check \"src/**/*.{js,jsx}\"",
28
+ "lint": "eslint --cache src && prettier --check \"src/**/*.{js,jsx}\"",
28
29
  "fix": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\" && eslint --fix --cache src --ext .js,.ts,.jsx,.tsx",
29
30
  "compile": "babel src -d dist --copy-files",
30
31
  "storybook": "start-storybook -s ./public -p 6006",
31
32
  "build-storybook": "build-storybook",
32
33
  "chromatic": "npx chromatic",
33
- "size": "size-limit"
34
+ "size": "size-limit",
35
+ "prepare": "husky install"
34
36
  },
35
37
  "keywords": [
36
38
  "uikit"
@@ -38,6 +40,8 @@
38
40
  "author": "Cube Dev Team",
39
41
  "devDependencies": {
40
42
  "@ant-design/icons": "^4.7.0",
43
+ "@commitlint/cli": "16.1.0",
44
+ "@commitlint/config-conventional": "16.0.0",
41
45
  "@open-wc/testing": "^3.0.3",
42
46
  "@react-aria/button": "^3.3.4",
43
47
  "@react-aria/checkbox": "^3.2.3",
@@ -95,6 +99,8 @@
95
99
  "@storybook/preset-create-react-app": "^4.0.0",
96
100
  "@storybook/react": "^6.4.9",
97
101
  "@svgr/rollup": "^6.1.2",
102
+ "@swc/core": "1.2.136",
103
+ "@swc/jest": "0.2.17",
98
104
  "@testing-library/jest-dom": "^5.16.1",
99
105
  "@testing-library/react": "^12.1.2",
100
106
  "@types/react": "^17.0.38",
@@ -103,7 +109,6 @@
103
109
  "@typescript-eslint/parser": "^5.8.1",
104
110
  "@web/test-runner": "^0.13.23",
105
111
  "babel-eslint": "^10.1.0",
106
- "chai": "^4.3.4",
107
112
  "chromatic": "^6.3.3",
108
113
  "clipboard-copy": "^4.0.1",
109
114
  "clsx": "^1.1.1",
@@ -119,14 +124,17 @@
119
124
  "eslint-plugin-react": "^7.28.0",
120
125
  "eslint-plugin-react-hooks": "^4.3.0",
121
126
  "eslint-plugin-storybook": "^0.5.5",
122
- "jest": "^27.4.5",
127
+ "husky": ">=6",
128
+ "jest": "27.5.0",
129
+ "jsdom": "19.0.0",
123
130
  "less-loader": "^10.2.0",
131
+ "lint-staged": ">=10",
124
132
  "netlify-cli": "^8.6.0",
125
133
  "parcel-bundler": "^1.12.4",
126
134
  "prettier": "^2.5.1",
127
135
  "prismjs": "^1.25.0",
128
- "react": ">=17.0.2",
129
- "react-dom": ">=17.0.2",
136
+ "react": "17.0.2",
137
+ "react-dom": "17.0.2",
130
138
  "react-router": "^6.2.1",
131
139
  "react-test-renderer": "^17.0.2",
132
140
  "react-transition-group": "^4.4.2",