cortex-react-ui 0.1.106 → 0.1.108

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 (82) hide show
  1. package/README.md +46 -46
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/index.js.map +1 -1
  4. package/lib/cjs/types/Button/Button.d.ts +11 -11
  5. package/lib/cjs/types/Button/index.d.ts +1 -1
  6. package/lib/cjs/types/DatePicker/DatePicker.d.ts +7 -7
  7. package/lib/cjs/types/DatePicker/index.d.ts +1 -1
  8. package/lib/cjs/types/Dialog/ConfirmDialog.d.ts +11 -11
  9. package/lib/cjs/types/Dialog/Dialog.d.ts +12 -12
  10. package/lib/cjs/types/Dialog/DialogActions.d.ts +7 -7
  11. package/lib/cjs/types/Dialog/DialogContent.d.ts +7 -7
  12. package/lib/cjs/types/Dialog/DialogFooter.d.ts +7 -7
  13. package/lib/cjs/types/Dialog/DialogHeader.d.ts +7 -7
  14. package/lib/cjs/types/Dialog/DialogTitle.d.ts +9 -9
  15. package/lib/cjs/types/Dialog/ErrorDialog.d.ts +10 -10
  16. package/lib/cjs/types/Dialog/index.d.ts +8 -8
  17. package/lib/cjs/types/DomContainer/DomContainer.d.ts +7 -7
  18. package/lib/cjs/types/DomContainer/index.d.ts +1 -1
  19. package/lib/cjs/types/Icons/ChevronDownIcon.d.ts +6 -6
  20. package/lib/cjs/types/Icons/ChevronRightIcon.d.ts +6 -6
  21. package/lib/cjs/types/Icons/CrossIcon.d.ts +6 -6
  22. package/lib/cjs/types/Icons/index.d.ts +3 -3
  23. package/lib/cjs/types/Input/Input.d.ts +7 -7
  24. package/lib/cjs/types/Input/index.d.ts +1 -1
  25. package/lib/cjs/types/Menu/ContextMenu.d.ts +13 -13
  26. package/lib/cjs/types/Menu/Divider.d.ts +6 -6
  27. package/lib/cjs/types/Menu/Menu.d.ts +9 -9
  28. package/lib/cjs/types/Menu/MenuGroup.d.ts +8 -8
  29. package/lib/cjs/types/Menu/MenuItem.d.ts +13 -13
  30. package/lib/cjs/types/Menu/PopupMenu.d.ts +16 -16
  31. package/lib/cjs/types/Menu/index.d.ts +6 -6
  32. package/lib/cjs/types/Popper/Popper.d.ts +36 -36
  33. package/lib/cjs/types/Popper/index.d.ts +1 -1
  34. package/lib/cjs/types/Select/Select.d.ts +6 -6
  35. package/lib/cjs/types/Select/index.d.ts +1 -1
  36. package/lib/cjs/types/Selected/Selected.d.ts +8 -0
  37. package/lib/cjs/types/Selected/index.d.ts +1 -0
  38. package/lib/cjs/types/Spinner/Spinner.d.ts +7 -7
  39. package/lib/cjs/types/Spinner/index.d.ts +1 -1
  40. package/lib/cjs/types/TagInput/TagInput.d.ts +12 -12
  41. package/lib/cjs/types/TagInput/TagItem.d.ts +9 -9
  42. package/lib/cjs/types/TagInput/TagSearchInput.d.ts +9 -9
  43. package/lib/cjs/types/TagInput/TagSuggestion.d.ts +13 -13
  44. package/lib/cjs/types/TagInput/TagSuggestionGroup.d.ts +8 -8
  45. package/lib/cjs/types/TagInput/TagSuggestionItem.d.ts +8 -8
  46. package/lib/cjs/types/TagInput/index.d.ts +1 -1
  47. package/lib/cjs/types/TagInput/types.d.ts +14 -14
  48. package/lib/cjs/types/TextField/TextField.d.ts +6 -6
  49. package/lib/cjs/types/TextField/TextFieldInput.d.ts +10 -10
  50. package/lib/cjs/types/TextField/index.d.ts +1 -1
  51. package/lib/cjs/types/ToggleButton/ToggleButton.d.ts +11 -11
  52. package/lib/cjs/types/ToggleButton/index.d.ts +1 -1
  53. package/lib/cjs/types/Tooltip/Tooltip.d.ts +12 -12
  54. package/lib/cjs/types/Tooltip/index.d.ts +1 -1
  55. package/lib/cjs/types/Transition/CSSTransition.d.ts +17 -17
  56. package/lib/cjs/types/Transition/Fade.d.ts +13 -13
  57. package/lib/cjs/types/index.d.ts +10 -10
  58. package/lib/cjs/types/utils/classNames.d.ts +1 -1
  59. package/lib/cjs/types/utils/setRef.d.ts +1 -1
  60. package/lib/cjs/types/utils/useClickOutside.d.ts +2 -2
  61. package/lib/cjs/types/utils/useElement.d.ts +2 -2
  62. package/lib/cjs/types/utils/useForkRef.d.ts +2 -2
  63. package/lib/index.d.ts +189 -189
  64. package/lib/styles/Button/index.scss +147 -147
  65. package/lib/styles/Dialog/index.scss +237 -237
  66. package/lib/styles/Icons/index.scss +9 -9
  67. package/lib/styles/Input/index.scss +69 -69
  68. package/lib/styles/Menu/index.scss +129 -129
  69. package/lib/styles/Popper/index.scss +23 -23
  70. package/lib/styles/Select/index.scss +13 -13
  71. package/lib/styles/Selected/index.scss +69 -0
  72. package/lib/styles/Spinner/index.scss +43 -43
  73. package/lib/styles/TagInput/index.scss +141 -141
  74. package/lib/styles/TextField/index.scss +22 -22
  75. package/lib/styles/ToggleButton/index.scss +60 -60
  76. package/lib/styles/Tooltip/index.scss +24 -24
  77. package/lib/styles/Transition/index.scss +15 -15
  78. package/lib/styles/global.scss +158 -158
  79. package/lib/styles/index.scss +42 -40
  80. package/lib/typings/typings/index.d.ts +30 -30
  81. package/lib/typings/typings/tagInput.d.ts +12 -12
  82. package/package.json +98 -98
@@ -1,158 +1,158 @@
1
- @use "sass:math";
2
-
3
- $default-options: (
4
- properties: true,
5
- colors: true,
6
- );
7
-
8
- // Font
9
- $font-family: Roboto, Helvetica, Arial, 'sans-serif';
10
- $font-weight-semi-bold: 500;
11
- $font-weight-bold: 600;
12
- $font-size-base: 1rem; //16px
13
-
14
- $font-size-h1: $font-size-base * 6; //Headline 1 (96px)
15
- $font-size-h2: $font-size-base * 3.75; //Headline 2 (60px)
16
- $font-size-h3: $font-size-base * 3; //Headline 3 (48px)
17
- $font-size-h4: $font-size-base * 2.125; //Headline 4 (34px)
18
- $font-size-h5: $font-size-base * 1.5; //Headline 5 (24px)
19
- $font-size-h6: $font-size-base * 1.25; //Headline 6 (20px)
20
-
21
- $font-size-xs: $font-size-base * 0.625; //10px
22
- $font-size-sm: $font-size-base * 0.75; //12px
23
- $font-size-md: $font-size-base * 0.875; //14px
24
- $font-size-lg: $font-size-base * 1.125; //18px
25
- $font-size-xl: $font-size-base * 1.25; //20px
26
-
27
- // Border
28
- $border-radius-xs: 4px;
29
- $border-radius-sm: 6px;
30
- $border-radius: 8px;
31
- $border-radius-md: 10px;
32
- $border-radius-lg: 12px;
33
-
34
- // Spacers
35
- $spacer: 1rem !default;
36
- $spacers: (
37
- 0: 0,
38
- 1: math.div($spacer, 4),
39
- 2: math.div($spacer, 2),
40
- 3: $spacer,
41
- 4: $spacer * 1.5,
42
- 5: $spacer * 3,
43
- ) !default;
44
- $spacer-xs: map-get($spacers, 1); //4px
45
- $spacer-sm: map-get($spacers, 2); //8px
46
- $spacer: map-get($spacers, 3); //16px
47
- $spacer-md: map-get($spacers, 4); //24px
48
- $spacer-lg: map-get($spacers, 5); //48px
49
-
50
- // Color
51
- $color-white: #fff;
52
- $color-black: #000;
53
-
54
- $color-red: #ef5350;
55
- $color-red-light: #ef9a9a;
56
- $color-red-lighter: #ffebee;
57
- $color-red-dark: #d32f2f;
58
- $color-red-darker: #b71c1c;
59
-
60
- $color-green: #66bb6a;
61
- $color-green-light: #a5d6a7;
62
- $color-green-lighter: #00f153;
63
- $color-green-dark: #43a047;
64
- $color-green-darker: #2e7d32;
65
-
66
- $color-grey: #9e9e9e;
67
- $color-grey-light: #e0e0e0;
68
- $color-grey-lighter: #f5f5f5;
69
- $color-grey-dark: #616161;
70
- $color-grey-darker: #212121;
71
-
72
- $color-amber: #ffc107;
73
- $color-amber-light: #ffd54f;
74
- $color-amber-lighter: #fff8e1;
75
- $color-amber-dark: #ffa000;
76
- $color-amber-darker: #ff6f00;
77
-
78
- $color-orange: #f8b123;
79
- $color-orange-light: #ffd0b3;
80
- $color-orange-lighter: #fff3e0;
81
- $color-orange-dark: #ec9f83;
82
- $color-orange-darker: #b77056;
83
-
84
- $color-blue: #29b6f6;
85
- $color-blue-light: #4fc3f7;
86
- $color-blue-lighter: #b3e5fc;
87
- $color-blue-dark: #0288d1;
88
- $color-blue-darker: #01579b;
89
-
90
- $color-cyan: #00bcd4;
91
- $color-cyan-light: #4dd0e1;
92
- $color-cyan-lighter: #b2ebf2;
93
- $color-cyan-dark: #0097a7;
94
- $color-cyan-darker: #006064;
95
-
96
- $color-blue-grey: #607d8b;
97
- $color-blue-grey-light: #90a4ae;
98
- $color-blue-grey-lighter: #cfd8dc;
99
- $color-blue-grey-dark: #455a64;
100
- $color-blue-grey-darker: #263238;
101
-
102
- $color-yellow: #fffb00;
103
- $color-yellow-light: #fffc57;
104
- $color-yellow-lighter: #fffeaf;
105
- $color-yellow-dark: #d3cf00;
106
- $color-yellow-darker: #a7a400;
107
-
108
- $color-purple: #9900ff;
109
- $color-purple-light: #ae36fd;
110
- $color-purple-lighter: #d493ff;
111
- $color-purple-dark: #7a00cc;
112
- $color-purple-darker: #54008b;
113
-
114
- @function showProps($internal-options) {
115
- @return get-map-deep($internal-options, "properties") == true;
116
- }
117
-
118
- @function showColors($internal-options) {
119
- @return get-map-deep($internal-options, "colors") == true;
120
- }
121
-
122
- @function str-split($input-string, $separator: " ") {
123
- $result: ();
124
- $index: str-index($input-string, $separator);
125
- $indent: str-length($separator);
126
-
127
- @while ($index != null) {
128
- $item: str-slice($input-string, 1, $index - 1);
129
- $input-string: str-slice($input-string, $index + $indent);
130
- $index: str-index($input-string, $separator);
131
-
132
- @if (str-length($item) != 0) {
133
- $result: append($result, $item);
134
- }
135
- }
136
-
137
- $result: append($result, $input-string);
138
-
139
- @return $result;
140
- }
141
-
142
- @function get-map-deep($map, $keys) {
143
- @each $key in str-split($keys, ".") {
144
- $map: map-get($map, $key);
145
- }
146
- @return $map;
147
- }
148
-
149
- @function is-map($map) {
150
- @return type-of($map) == "map";
151
- }
152
-
153
- @function safe-map-merge($map, $map2) {
154
- @if is-map($map) == true and is-map($map2) == true {
155
- @return map-merge($map, $map2);
156
- }
157
- @return $map;
158
- }
1
+ @use "sass:math";
2
+
3
+ $default-options: (
4
+ properties: true,
5
+ colors: true,
6
+ );
7
+
8
+ // Font
9
+ $font-family: Roboto, Helvetica, Arial, 'sans-serif';
10
+ $font-weight-semi-bold: 500;
11
+ $font-weight-bold: 600;
12
+ $font-size-base: 1rem; //16px
13
+
14
+ $font-size-h1: $font-size-base * 6; //Headline 1 (96px)
15
+ $font-size-h2: $font-size-base * 3.75; //Headline 2 (60px)
16
+ $font-size-h3: $font-size-base * 3; //Headline 3 (48px)
17
+ $font-size-h4: $font-size-base * 2.125; //Headline 4 (34px)
18
+ $font-size-h5: $font-size-base * 1.5; //Headline 5 (24px)
19
+ $font-size-h6: $font-size-base * 1.25; //Headline 6 (20px)
20
+
21
+ $font-size-xs: $font-size-base * 0.625; //10px
22
+ $font-size-sm: $font-size-base * 0.75; //12px
23
+ $font-size-md: $font-size-base * 0.875; //14px
24
+ $font-size-lg: $font-size-base * 1.125; //18px
25
+ $font-size-xl: $font-size-base * 1.25; //20px
26
+
27
+ // Border
28
+ $border-radius-xs: 4px;
29
+ $border-radius-sm: 6px;
30
+ $border-radius: 8px;
31
+ $border-radius-md: 10px;
32
+ $border-radius-lg: 12px;
33
+
34
+ // Spacers
35
+ $spacer: 1rem !default;
36
+ $spacers: (
37
+ 0: 0,
38
+ 1: math.div($spacer, 4),
39
+ 2: math.div($spacer, 2),
40
+ 3: $spacer,
41
+ 4: $spacer * 1.5,
42
+ 5: $spacer * 3,
43
+ ) !default;
44
+ $spacer-xs: map-get($spacers, 1); //4px
45
+ $spacer-sm: map-get($spacers, 2); //8px
46
+ $spacer: map-get($spacers, 3); //16px
47
+ $spacer-md: map-get($spacers, 4); //24px
48
+ $spacer-lg: map-get($spacers, 5); //48px
49
+
50
+ // Color
51
+ $color-white: #fff;
52
+ $color-black: #000;
53
+
54
+ $color-red: #ef5350;
55
+ $color-red-light: #ef9a9a;
56
+ $color-red-lighter: #ffebee;
57
+ $color-red-dark: #d32f2f;
58
+ $color-red-darker: #b71c1c;
59
+
60
+ $color-green: #66bb6a;
61
+ $color-green-light: #a5d6a7;
62
+ $color-green-lighter: #00f153;
63
+ $color-green-dark: #43a047;
64
+ $color-green-darker: #2e7d32;
65
+
66
+ $color-grey: #9e9e9e;
67
+ $color-grey-light: #e0e0e0;
68
+ $color-grey-lighter: #f5f5f5;
69
+ $color-grey-dark: #616161;
70
+ $color-grey-darker: #212121;
71
+
72
+ $color-amber: #ffc107;
73
+ $color-amber-light: #ffd54f;
74
+ $color-amber-lighter: #fff8e1;
75
+ $color-amber-dark: #ffa000;
76
+ $color-amber-darker: #ff6f00;
77
+
78
+ $color-orange: #f8b123;
79
+ $color-orange-light: #ffd0b3;
80
+ $color-orange-lighter: #fff3e0;
81
+ $color-orange-dark: #ec9f83;
82
+ $color-orange-darker: #b77056;
83
+
84
+ $color-blue: #29b6f6;
85
+ $color-blue-light: #4fc3f7;
86
+ $color-blue-lighter: #b3e5fc;
87
+ $color-blue-dark: #0288d1;
88
+ $color-blue-darker: #01579b;
89
+
90
+ $color-cyan: #00bcd4;
91
+ $color-cyan-light: #4dd0e1;
92
+ $color-cyan-lighter: #b2ebf2;
93
+ $color-cyan-dark: #0097a7;
94
+ $color-cyan-darker: #006064;
95
+
96
+ $color-blue-grey: #607d8b;
97
+ $color-blue-grey-light: #90a4ae;
98
+ $color-blue-grey-lighter: #cfd8dc;
99
+ $color-blue-grey-dark: #455a64;
100
+ $color-blue-grey-darker: #263238;
101
+
102
+ $color-yellow: #fffb00;
103
+ $color-yellow-light: #fffc57;
104
+ $color-yellow-lighter: #fffeaf;
105
+ $color-yellow-dark: #d3cf00;
106
+ $color-yellow-darker: #a7a400;
107
+
108
+ $color-purple: #9900ff;
109
+ $color-purple-light: #ae36fd;
110
+ $color-purple-lighter: #d493ff;
111
+ $color-purple-dark: #7a00cc;
112
+ $color-purple-darker: #54008b;
113
+
114
+ @function showProps($internal-options) {
115
+ @return get-map-deep($internal-options, "properties") == true;
116
+ }
117
+
118
+ @function showColors($internal-options) {
119
+ @return get-map-deep($internal-options, "colors") == true;
120
+ }
121
+
122
+ @function str-split($input-string, $separator: " ") {
123
+ $result: ();
124
+ $index: str-index($input-string, $separator);
125
+ $indent: str-length($separator);
126
+
127
+ @while ($index != null) {
128
+ $item: str-slice($input-string, 1, $index - 1);
129
+ $input-string: str-slice($input-string, $index + $indent);
130
+ $index: str-index($input-string, $separator);
131
+
132
+ @if (str-length($item) != 0) {
133
+ $result: append($result, $item);
134
+ }
135
+ }
136
+
137
+ $result: append($result, $input-string);
138
+
139
+ @return $result;
140
+ }
141
+
142
+ @function get-map-deep($map, $keys) {
143
+ @each $key in str-split($keys, ".") {
144
+ $map: map-get($map, $key);
145
+ }
146
+ @return $map;
147
+ }
148
+
149
+ @function is-map($map) {
150
+ @return type-of($map) == "map";
151
+ }
152
+
153
+ @function safe-map-merge($map, $map2) {
154
+ @if is-map($map) == true and is-map($map2) == true {
155
+ @return map-merge($map, $map2);
156
+ }
157
+ @return $map;
158
+ }
@@ -1,40 +1,42 @@
1
- @import "icons";
2
- @import "Transition";
3
- @import "Popper";
4
- @import "Tooltip";
5
- @import "Spinner";
6
- @import "TagInput";
7
- @import "Input";
8
- @import "TextField";
9
- @import "Menu";
10
- @import "Dialog";
11
- @import "Button";
12
- @import "ToggleButton";
13
-
14
- @include icons();
15
- @include popper();
16
- @include tooltip();
17
- @include spinner();
18
- @include taginput();
19
- @include input();
20
- @include menu();
21
- @include dialog();
22
- @include button();
23
- @include toggleButton();
24
-
25
- // @include popper();
26
- // @include popper(
27
- // (
28
- // bgColor: red,
29
- // fgColor: blue,
30
- // )
31
- // );
32
- // @include popper(
33
- // (
34
- // bgColor: red,
35
- // fgColor: blue,
36
- // ),
37
- // (
38
- // properties: false
39
- // )
40
- // );
1
+ @import "icons";
2
+ @import "Transition";
3
+ @import "Popper";
4
+ @import "Tooltip";
5
+ @import "Spinner";
6
+ @import "TagInput";
7
+ @import "Input";
8
+ @import "TextField";
9
+ @import "Menu";
10
+ @import "Dialog";
11
+ @import "Button";
12
+ @import "ToggleButton";
13
+ @import "Selected";
14
+
15
+
16
+ @include icons();
17
+ @include popper();
18
+ @include tooltip();
19
+ @include spinner();
20
+ @include taginput();
21
+ @include input();
22
+ @include menu();
23
+ @include dialog();
24
+ @include button();
25
+ @include toggleButton();
26
+
27
+ // @include popper();
28
+ // @include popper(
29
+ // (
30
+ // bgColor: red,
31
+ // fgColor: blue,
32
+ // )
33
+ // );
34
+ // @include popper(
35
+ // (
36
+ // bgColor: red,
37
+ // fgColor: blue,
38
+ // ),
39
+ // (
40
+ // properties: false
41
+ // )
42
+ // );
@@ -1,31 +1,31 @@
1
- declare module '*.module.scss' {
2
- const classes: { readonly [key: string]: string };
3
- export default classes;
4
- }
5
-
6
- /*
7
- ** Mapped types
8
- */
9
- type Nullable<T> = T | null;
10
- type Writeable<T> = { -readonly [P in keyof T]: T[P] };
11
- type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
12
- type Required<T> = { [P in keyof T]-?: T[P] };
13
- type ValuesOf<T extends readonly any[]> = T[number];
14
- type ObjectValues<T> = T[keyof T];
15
- type IndexableProperties<T> = keyof T extends string | number ? keyof T extends infer P ? P : never : never;
16
- type AssertPropDefined<T, K extends keyof T = never> = {
17
- [P in keyof T]: P extends K ? NonNullable<T[P]> : T[P];
18
- };
19
- type NonEmptyArray<T> = [T, ...T[]];
20
- type ArrayType<T extends Array<any>> = T extends (infer U)[] ? U : never;
21
- type NameOfProp<T, P> = P extends keyof T ? P : never;
22
-
23
- /*
24
- ** Common Types
25
- */
26
- type CustomRange<S = any, E = any> = { start: S, end: E };
27
-
28
- type RefLabel<T = number> = {
29
- id: T;
30
- label: string;
1
+ declare module '*.module.scss' {
2
+ const classes: { readonly [key: string]: string };
3
+ export default classes;
4
+ }
5
+
6
+ /*
7
+ ** Mapped types
8
+ */
9
+ type Nullable<T> = T | null;
10
+ type Writeable<T> = { -readonly [P in keyof T]: T[P] };
11
+ type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
12
+ type Required<T> = { [P in keyof T]-?: T[P] };
13
+ type ValuesOf<T extends readonly any[]> = T[number];
14
+ type ObjectValues<T> = T[keyof T];
15
+ type IndexableProperties<T> = keyof T extends string | number ? keyof T extends infer P ? P : never : never;
16
+ type AssertPropDefined<T, K extends keyof T = never> = {
17
+ [P in keyof T]: P extends K ? NonNullable<T[P]> : T[P];
18
+ };
19
+ type NonEmptyArray<T> = [T, ...T[]];
20
+ type ArrayType<T extends Array<any>> = T extends (infer U)[] ? U : never;
21
+ type NameOfProp<T, P> = P extends keyof T ? P : never;
22
+
23
+ /*
24
+ ** Common Types
25
+ */
26
+ type CustomRange<S = any, E = any> = { start: S, end: E };
27
+
28
+ type RefLabel<T = number> = {
29
+ id: T;
30
+ label: string;
31
31
  };
@@ -1,13 +1,13 @@
1
- // namespace Cortex {
2
- // type Tag = {
3
- // id: string,
4
- // label: string
5
- // };
6
-
7
- // type TagSuggestion = {
8
- // id: string,
9
- // label: string,
10
- // group?: boolean,
11
- // suggestions?: TagSuggestion[]
12
- // };
1
+ // namespace Cortex {
2
+ // type Tag = {
3
+ // id: string,
4
+ // label: string
5
+ // };
6
+
7
+ // type TagSuggestion = {
8
+ // id: string,
9
+ // label: string,
10
+ // group?: boolean,
11
+ // suggestions?: TagSuggestion[]
12
+ // };
13
13
  // }