@cube-dev/ui-kit 0.7.5 → 0.7.9

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 (49) hide show
  1. package/dist/cjs/components/Root.d.ts +4 -0
  2. package/dist/cjs/components/forms/Checkbox/Checkbox.d.ts +8 -2
  3. package/dist/cjs/components/forms/Checkbox/CheckboxGroup.d.ts +4 -1
  4. package/dist/cjs/components/forms/FieldWrapper.d.ts +7 -1
  5. package/dist/cjs/components/forms/Form/Field.d.ts +2 -0
  6. package/dist/cjs/components/forms/Form/Form.d.ts +3 -0
  7. package/dist/cjs/components/forms/NumberInput/NumberInput.d.ts +6 -1
  8. package/dist/cjs/components/forms/PasswordInput/PasswordInput.d.ts +4 -1
  9. package/dist/cjs/components/forms/RadioGroup/Radio.d.ts +4 -1
  10. package/dist/cjs/components/forms/RadioGroup/RadioGroup.d.ts +11 -1
  11. package/dist/cjs/components/forms/SearchInput/SearchInput.d.ts +4 -1
  12. package/dist/cjs/components/forms/Switch/Switch.d.ts +4 -1
  13. package/dist/cjs/components/forms/TextArea/TextArea.d.ts +4 -1
  14. package/dist/cjs/components/forms/TextInput/TextInput.d.ts +4 -1
  15. package/dist/cjs/components/forms/TextInput/TextInputBase.d.ts +1 -0
  16. package/dist/cjs/index.d.ts +20 -5
  17. package/dist/cjs/index.js +6 -6
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/shared/form.d.ts +4 -2
  20. package/dist/cjs/stories/FormFieldArgs.d.ts +6 -0
  21. package/dist/cjs/styles/styledScrollbar.d.ts +0 -25
  22. package/dist/cjs/tokens.d.ts +7 -0
  23. package/dist/cjs/utils/react/nullableValue.d.ts +18 -0
  24. package/dist/cjs/utils/warnings.d.ts +2 -0
  25. package/dist/mjs/components/Root.d.ts +4 -0
  26. package/dist/mjs/components/forms/Checkbox/Checkbox.d.ts +8 -2
  27. package/dist/mjs/components/forms/Checkbox/CheckboxGroup.d.ts +4 -1
  28. package/dist/mjs/components/forms/FieldWrapper.d.ts +7 -1
  29. package/dist/mjs/components/forms/Form/Field.d.ts +2 -0
  30. package/dist/mjs/components/forms/Form/Form.d.ts +3 -0
  31. package/dist/mjs/components/forms/NumberInput/NumberInput.d.ts +6 -1
  32. package/dist/mjs/components/forms/PasswordInput/PasswordInput.d.ts +4 -1
  33. package/dist/mjs/components/forms/RadioGroup/Radio.d.ts +4 -1
  34. package/dist/mjs/components/forms/RadioGroup/RadioGroup.d.ts +11 -1
  35. package/dist/mjs/components/forms/SearchInput/SearchInput.d.ts +4 -1
  36. package/dist/mjs/components/forms/Switch/Switch.d.ts +4 -1
  37. package/dist/mjs/components/forms/TextArea/TextArea.d.ts +4 -1
  38. package/dist/mjs/components/forms/TextInput/TextInput.d.ts +4 -1
  39. package/dist/mjs/components/forms/TextInput/TextInputBase.d.ts +1 -0
  40. package/dist/mjs/index.d.ts +20 -5
  41. package/dist/mjs/index.js +5 -5
  42. package/dist/mjs/index.js.map +1 -1
  43. package/dist/mjs/shared/form.d.ts +4 -2
  44. package/dist/mjs/stories/FormFieldArgs.d.ts +6 -0
  45. package/dist/mjs/styles/styledScrollbar.d.ts +0 -25
  46. package/dist/mjs/tokens.d.ts +7 -0
  47. package/dist/mjs/utils/react/nullableValue.d.ts +18 -0
  48. package/dist/mjs/utils/warnings.d.ts +2 -0
  49. package/package.json +2 -1
@@ -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 };
@@ -0,0 +1,18 @@
1
+ import { Props } from '../../components/types';
2
+ export declare function castNullableStringValue<T>(props: T): T;
3
+ export declare function castNullableNumberValue<T>(props: T): T;
4
+ export declare function castNullableIsSelected<T>(props: T): T;
5
+ export declare function castNullableSelectedKey<T>(props: T): T;
6
+ export declare function castNullableField<T>(props: T, keys: string[], type?: string, cast?: (k: any) => any): T;
7
+ export declare type WithNullableValue<T extends Props> = Omit<T, 'value' | 'defaultValue'> & {
8
+ value?: T['value'] | any;
9
+ defaultValue?: T['defaultValue'] | any;
10
+ };
11
+ export declare type WithNullableSelected<T extends Props> = Omit<T, 'isSelected' | 'defaultSelected'> & {
12
+ isSelected?: T['isSelected'] | any;
13
+ defaultSelected?: T['defaultSelected'] | any;
14
+ };
15
+ export declare type WithNullableSelectedKey<T extends Props> = Omit<T, 'selectedKey' | 'defaultSelectedKey'> & {
16
+ selectedKey?: T['selectedKey'] | any;
17
+ defaultSelectedKey?: T['defaultSelectedKey'] | any;
18
+ };
@@ -1 +1,3 @@
1
1
  export declare function propDeprecationWarning(name: any, props: any, propList: any): void;
2
+ export declare function accessibilityWarning(...args: any[]): void;
3
+ export declare function warn(...args: any[]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cube-dev/ui-kit",
3
- "version": "0.7.5",
3
+ "version": "0.7.9",
4
4
  "description": "UIKit for Cube Projects",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/mjs/index.js",
@@ -20,6 +20,7 @@
20
20
  "scripts": {
21
21
  "start": "PARCEL_AUTOINSTALL=false parcel src/storybook.html",
22
22
  "build": "NODE_ENV=production rollup -c",
23
+ "build:esm": "NODE_ENV=production ESM_BUILD_ONLY=true rollup -c",
23
24
  "watch": "rollup -c -w",
24
25
  "test": "jest",
25
26
  "test-cover": "jest --coverage",