@coveord/plasma-mantine 56.2.5 → 56.3.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.
Files changed (94) hide show
  1. package/.turbo/turbo-build.log +4 -4
  2. package/.turbo/turbo-test.log +61 -60
  3. package/dist/.tsbuildinfo +1 -1
  4. package/dist/cjs/components/action-icon/ActionIcon.d.ts.map +1 -1
  5. package/dist/cjs/components/action-icon/ActionIcon.js +5 -9
  6. package/dist/cjs/components/action-icon/ActionIcon.js.map +1 -1
  7. package/dist/cjs/components/badge/Badge.d.ts +6 -1
  8. package/dist/cjs/components/badge/Badge.d.ts.map +1 -1
  9. package/dist/cjs/components/badge/Badge.js +17 -1
  10. package/dist/cjs/components/badge/Badge.js.map +1 -1
  11. package/dist/cjs/components/browser-preview/BrowserPreview.d.ts.map +1 -1
  12. package/dist/cjs/components/browser-preview/BrowserPreview.js +1 -1
  13. package/dist/cjs/components/browser-preview/BrowserPreview.js.map +1 -1
  14. package/dist/cjs/components/button/Button.d.ts.map +1 -1
  15. package/dist/cjs/components/button/Button.js +5 -3
  16. package/dist/cjs/components/button/Button.js.map +1 -1
  17. package/dist/cjs/components/collection/Collection.js +1 -1
  18. package/dist/cjs/components/collection/Collection.js.map +1 -1
  19. package/dist/cjs/components/collection/enhanceWithCollectionProps.d.ts +3 -1
  20. package/dist/cjs/components/collection/enhanceWithCollectionProps.d.ts.map +1 -1
  21. package/dist/cjs/components/collection/enhanceWithCollectionProps.js +8 -4
  22. package/dist/cjs/components/collection/enhanceWithCollectionProps.js.map +1 -1
  23. package/dist/cjs/components/header/Header.module.css +1 -0
  24. package/dist/cjs/components/info-token/InfoToken.d.ts.map +1 -1
  25. package/dist/cjs/components/info-token/InfoToken.js +2 -3
  26. package/dist/cjs/components/info-token/InfoToken.js.map +1 -1
  27. package/dist/cjs/components/table/Table.module.css +5 -5
  28. package/dist/cjs/styles/DatePicker.module.css +5 -3
  29. package/dist/cjs/styles/DateTimePicker.module.css +17 -0
  30. package/dist/cjs/styles/Input.module.css +6 -0
  31. package/dist/cjs/styles/Radio.module.css +21 -26
  32. package/dist/cjs/styles/ReadOnlyInput.module.css +1 -1
  33. package/dist/cjs/styles/Skeleton.module.css +8 -1
  34. package/dist/cjs/theme/Theme.d.ts.map +1 -1
  35. package/dist/cjs/theme/Theme.js +4 -0
  36. package/dist/cjs/theme/Theme.js.map +1 -1
  37. package/dist/cjs/theme/plasmaCSSVariablesResolver.d.ts.map +1 -1
  38. package/dist/cjs/theme/plasmaCSSVariablesResolver.js +27 -3
  39. package/dist/cjs/theme/plasmaCSSVariablesResolver.js.map +1 -1
  40. package/dist/esm/components/action-icon/ActionIcon.d.ts.map +1 -1
  41. package/dist/esm/components/action-icon/ActionIcon.js +5 -7
  42. package/dist/esm/components/action-icon/ActionIcon.js.map +1 -1
  43. package/dist/esm/components/badge/Badge.d.ts +6 -1
  44. package/dist/esm/components/badge/Badge.d.ts.map +1 -1
  45. package/dist/esm/components/badge/Badge.js +18 -2
  46. package/dist/esm/components/badge/Badge.js.map +1 -1
  47. package/dist/esm/components/browser-preview/BrowserPreview.d.ts.map +1 -1
  48. package/dist/esm/components/browser-preview/BrowserPreview.js +1 -1
  49. package/dist/esm/components/browser-preview/BrowserPreview.js.map +1 -1
  50. package/dist/esm/components/button/Button.d.ts.map +1 -1
  51. package/dist/esm/components/button/Button.js +5 -3
  52. package/dist/esm/components/button/Button.js.map +1 -1
  53. package/dist/esm/components/collection/Collection.js +1 -1
  54. package/dist/esm/components/collection/Collection.js.map +1 -1
  55. package/dist/esm/components/collection/enhanceWithCollectionProps.d.ts +3 -1
  56. package/dist/esm/components/collection/enhanceWithCollectionProps.d.ts.map +1 -1
  57. package/dist/esm/components/collection/enhanceWithCollectionProps.js +14 -4
  58. package/dist/esm/components/collection/enhanceWithCollectionProps.js.map +1 -1
  59. package/dist/esm/components/header/Header.module.css +1 -0
  60. package/dist/esm/components/info-token/InfoToken.d.ts.map +1 -1
  61. package/dist/esm/components/info-token/InfoToken.js +2 -3
  62. package/dist/esm/components/info-token/InfoToken.js.map +1 -1
  63. package/dist/esm/components/table/Table.module.css +5 -5
  64. package/dist/esm/styles/DatePicker.module.css +5 -3
  65. package/dist/esm/styles/DateTimePicker.module.css +17 -0
  66. package/dist/esm/styles/Input.module.css +6 -0
  67. package/dist/esm/styles/Radio.module.css +21 -26
  68. package/dist/esm/styles/ReadOnlyInput.module.css +1 -1
  69. package/dist/esm/styles/Skeleton.module.css +8 -1
  70. package/dist/esm/theme/Theme.d.ts.map +1 -1
  71. package/dist/esm/theme/Theme.js +5 -1
  72. package/dist/esm/theme/Theme.js.map +1 -1
  73. package/dist/esm/theme/plasmaCSSVariablesResolver.d.ts.map +1 -1
  74. package/dist/esm/theme/plasmaCSSVariablesResolver.js +27 -3
  75. package/dist/esm/theme/plasmaCSSVariablesResolver.js.map +1 -1
  76. package/package.json +14 -14
  77. package/src/components/action-icon/ActionIcon.tsx +12 -4
  78. package/src/components/badge/Badge.tsx +23 -4
  79. package/src/components/browser-preview/BrowserPreview.tsx +7 -1
  80. package/src/components/button/Button.tsx +9 -3
  81. package/src/components/collection/Collection.tsx +1 -1
  82. package/src/components/collection/__tests__/Collection.spec.tsx +41 -0
  83. package/src/components/collection/enhanceWithCollectionProps.ts +14 -5
  84. package/src/components/header/Header.module.css +1 -0
  85. package/src/components/info-token/InfoToken.tsx +2 -3
  86. package/src/components/table/Table.module.css +5 -5
  87. package/src/styles/DatePicker.module.css +5 -3
  88. package/src/styles/DateTimePicker.module.css +17 -0
  89. package/src/styles/Input.module.css +6 -0
  90. package/src/styles/Radio.module.css +21 -26
  91. package/src/styles/ReadOnlyInput.module.css +1 -1
  92. package/src/styles/Skeleton.module.css +8 -1
  93. package/src/theme/Theme.tsx +14 -1
  94. package/src/theme/plasmaCSSVariablesResolver.ts +30 -3
@@ -67,7 +67,7 @@
67
67
  /* Table.Header */
68
68
  .headerRoot {
69
69
  border-bottom: 1px solid var(--mantine-color-default-border);
70
- background-color: var(--mantine-color-gray-0);
70
+ background-color: var(--mantine-color-body);
71
71
  padding: var(--mantine-spacing-sm) var(--mantine-spacing-xl);
72
72
  position: relative;
73
73
  min-height: 69px;
@@ -90,7 +90,7 @@
90
90
  vertical-align: middle;
91
91
  white-space: nowrap;
92
92
  text-align: left;
93
- color: var(--mantine-color-gray-6);
93
+ color: var(--mantine-color-text);
94
94
  height: var(--mantine-spacing-xl);
95
95
  font-weight: var(--coveo-fw-bold);
96
96
  font-size: var(--mantine-font-size-sm);
@@ -103,11 +103,11 @@
103
103
  padding-right: var(--mantine-spacing-xl);
104
104
  }
105
105
 
106
- background-color: var(--mantine-color-gray-0);
106
+ background-color: var(--mantine-color-body);
107
107
 
108
108
  &[data-control='true'] {
109
109
  @mixin hover {
110
- background-color: var(--mantine-color-gray-1);
110
+ background-color: var(--mantine-color-default-hover);
111
111
  }
112
112
  }
113
113
  }
@@ -117,7 +117,7 @@
117
117
  }
118
118
 
119
119
  .lastUpdatedLabel {
120
- color: var(--mantine-color-gray-6);
120
+ color: var(--mantine-color-text);
121
121
  }
122
122
 
123
123
  /* Table.Predicate */
@@ -1,6 +1,4 @@
1
1
  .day {
2
- border-radius: var(--mantine-radius-default);
3
-
4
2
  @mixin hover {
5
3
  &:where(:not([data-static], [data-disabled], [data-selected], [data-in-range])) {
6
4
  @mixin light {
@@ -10,6 +8,10 @@
10
8
  }
11
9
 
12
10
  &:where([data-weekend]) {
13
- color: var(--mantine-color-error);
11
+ color: var(--mantine-color-text);
12
+
13
+ &:where([data-selected]) {
14
+ color: var(--mantine-primary-color-contrast);
15
+ }
14
16
  }
15
17
  }
@@ -0,0 +1,17 @@
1
+ .day {
2
+ @mixin hover {
3
+ &:where(:not([data-static], [data-disabled], [data-selected], [data-in-range])) {
4
+ @mixin light {
5
+ background-color: var(--mantine-color-default-hover);
6
+ }
7
+ }
8
+ }
9
+
10
+ &:where([data-weekend]) {
11
+ color: var(--mantine-color-text);
12
+
13
+ &:where([data-selected]) {
14
+ color: var(--mantine-primary-color-contrast);
15
+ }
16
+ }
17
+ }
@@ -31,6 +31,12 @@
31
31
  }
32
32
  }
33
33
 
34
+ .input {
35
+ @mixin dark {
36
+ --input-bg: var(--mantine-color-default);
37
+ }
38
+ }
39
+
34
40
  .section {
35
41
  > svg {
36
42
  color: var(--mantine-color-gray-3);
@@ -1,43 +1,38 @@
1
1
  .labelWrapper {
2
2
  display: flex;
3
3
  align-items: flex-start;
4
+ color: var(--coveo-color-title);
4
5
 
5
- @mixin light {
6
- color: var(--coveo-color-title);
7
-
8
- &[data-disabled] {
9
- .label,
10
- .description {
11
- color: var(--mantine-color-disabled-color);
12
- }
6
+ &[data-disabled] {
7
+ .label,
8
+ .description {
9
+ color: var(--mantine-color-disabled-color);
13
10
  }
14
11
  }
15
12
  }
16
13
 
17
14
  .radio {
18
- @mixin light {
19
- &:not(:checked, [readonly], :disabled, [data-error='true']) {
20
- border-color: var(--coveo-color-input-border);
21
- }
15
+ &:not(:checked, [readonly], :disabled, [data-error='true']) {
16
+ border-color: var(--coveo-color-input-border);
17
+ }
22
18
 
23
- &:disabled {
24
- background-color: var(--mantine-color-disabled);
25
- border-color: var(--mantine-color-default-border);
19
+ &:disabled {
20
+ background-color: var(--mantine-color-disabled);
21
+ border-color: var(--mantine-color-default-border);
26
22
 
27
- & + .icon {
28
- color: var(--mantine-color-placeholder);
29
- }
23
+ & + .icon {
24
+ color: var(--mantine-color-placeholder);
30
25
  }
26
+ }
31
27
 
32
- /* mantine hardcodes disabled styles so we need to write custom styles */
33
- &[readonly] {
34
- border-color: var(--mantine-color-default-border);
35
- background-color: var(--coveo-color-bg-readonly);
36
- color: var(--coveo-color-text-readonly);
28
+ /* mantine hardcodes disabled styles so we need to write custom styles */
29
+ &[readonly] {
30
+ border-color: var(--mantine-color-default-border);
31
+ background-color: var(--coveo-color-bg-readonly);
32
+ color: var(--coveo-color-text-readonly);
37
33
 
38
- & + .icon {
39
- color: var(--coveo-color-text-readonly);
40
- }
34
+ & + .icon {
35
+ color: var(--coveo-color-text-readonly);
41
36
  }
42
37
  }
43
38
  }
@@ -2,7 +2,7 @@
2
2
  cursor: text;
3
3
 
4
4
  --input-bd: var(--mantine-color-default-border);
5
- --input-bg: var(--mantine-color-gray-1);
5
+ --input-bg: var(--coveo-color-bg-readonly);
6
6
  --input-color: var(--mantine-color-text);
7
7
  --input-placeholder-color: var(--mantine-color-text);
8
8
  }
@@ -5,7 +5,14 @@
5
5
  }
6
6
 
7
7
  &::after {
8
- background-color: var(--mantine-color-gray-2);
8
+ @mixin where-light {
9
+ background-color: var(--mantine-color-gray-2);
10
+ }
11
+
12
+ @mixin where-dark {
13
+ background-color: var(--mantine-color-dark-5);
14
+ }
15
+
9
16
  z-index: calc(var(--mantine-z-index-overlay) + 1);
10
17
  }
11
18
  }
@@ -56,7 +56,16 @@ import {
56
56
  Text,
57
57
  Tooltip,
58
58
  } from '@mantine/core';
59
- import {DateInput, DatePicker, MonthPicker, PickerInputBase, TimeInput, TimePicker, YearPicker} from '@mantine/dates';
59
+ import {
60
+ DateInput,
61
+ DatePicker,
62
+ DateTimePicker,
63
+ MonthPicker,
64
+ PickerInputBase,
65
+ TimeInput,
66
+ TimePicker,
67
+ YearPicker,
68
+ } from '@mantine/dates';
60
69
  import {Accordion, CheckboxIcon, CircleLoader, InfoToken} from '../components/index.js';
61
70
  import AccordionClasses from '../styles/Accordion.module.css';
62
71
  import ActionIconClasses from '../styles/ActionIcon.module.css';
@@ -70,6 +79,7 @@ import CheckboxIndicatorClasses from '../styles/CheckboxIndicator.module.css';
70
79
  import ChipClasses from '../styles/Chip.module.css';
71
80
  import ComboboxClasses from '../styles/Combobox.module.css';
72
81
  import DatePickerClasses from '../styles/DatePicker.module.css';
82
+ import DateTimePickerClasses from '../styles/DateTimePicker.module.css';
73
83
  import InputClasses from '../styles/Input.module.css';
74
84
  import InputWrapperClasses from '../styles/InputWrapper.module.css';
75
85
  import ListClasses from '../styles/List.module.css';
@@ -278,6 +288,9 @@ export const plasmaTheme: MantineThemeOverride = createTheme({
278
288
  DatePicker: DatePicker.extend({
279
289
  classNames: DatePickerClasses,
280
290
  }),
291
+ DateTimePicker: DateTimePicker.extend({
292
+ classNames: DateTimePickerClasses,
293
+ }),
281
294
  Divider: Divider.extend({
282
295
  defaultProps: {
283
296
  color: 'var(--mantine-color-default-border)',
@@ -19,7 +19,32 @@ export const plasmaCSSVariablesResolver: CSSVariablesResolver = (theme) => {
19
19
  '--coveo-fw-normal': '400',
20
20
  '--coveo-fw-bold': '500',
21
21
  },
22
- dark: {'--coveo-color-title': 'var(--mantine-color-white)'},
22
+ dark: {
23
+ // custom colors
24
+ '--coveo-color-title': 'var(--mantine-color-white)',
25
+ '--coveo-app-background': theme.colors.dark[8],
26
+ '--coveo-color-input-border': theme.colors.dark[4],
27
+ '--coveo-color-text-readonly': theme.colors.dark[0],
28
+ '--coveo-color-bg-readonly': theme.colors.dark[6],
29
+ '--coveo-color-text-primary': 'var(--mantine-primary-color-4)',
30
+ '--coveo-color-bg-dark-surface': 'var(--mantine-primary-color-3)',
31
+
32
+ // mantine overrides
33
+ '--mantine-primary-color-light': 'var(--mantine-primary-color-7)',
34
+ '--mantine-color-body': theme.colors.dark[8],
35
+ '--mantine-color-default': theme.colors.dark[7],
36
+ '--mantine-color-default-border': theme.colors.dark[6],
37
+ '--mantine-color-default-hover': theme.colors.dark[6],
38
+ '--mantine-color-error': theme.colors.red[4],
39
+ '--mantine-color-text': theme.colors.dark[0],
40
+ '--mantine-color-dimmed': theme.colors.dark[1],
41
+ '--mantine-color-gray-filled': theme.colors.dark[6],
42
+ '--mantine-color-warning-filled': theme.colors.yellow[2],
43
+ '--mantine-color-warning-light': theme.colors.yellow[6],
44
+ '--mantine-color-placeholder': theme.colors.dark[2],
45
+ '--mantine-color-disabled': theme.colors.dark[7],
46
+ '--mantine-color-disabled-color': theme.colors.dark[3],
47
+ },
23
48
  light: {
24
49
  // custom colors
25
50
  '--coveo-app-background': theme.colors.gray[0],
@@ -31,15 +56,17 @@ export const plasmaCSSVariablesResolver: CSSVariablesResolver = (theme) => {
31
56
  '--coveo-color-bg-dark-surface': theme.colors.violet[9],
32
57
 
33
58
  // mantine overrides
59
+ '--mantine-color-body': theme.colors.gray[0],
60
+ '--mantine-color-default': 'var(--mantine-color-white)',
34
61
  '--mantine-color-default-border': theme.colors.gray[2],
62
+ '--mantine-color-default-hover': theme.colors.gray[1],
35
63
  '--mantine-color-error': theme.colors.red[5],
36
64
  '--mantine-color-text': theme.colors.gray[6],
37
65
  '--mantine-color-dimmed': theme.colors.gray[5],
38
66
  '--mantine-color-gray-filled': theme.colors.gray[4],
39
67
  '--mantine-color-warning-filled': theme.colors.yellow[4],
40
68
  '--mantine-color-placeholder': theme.colors.gray[4],
41
- '--mantine-color-default-hover': theme.colors.gray[1],
42
- '--mantine-color-disabled': alpha('var(--mantine-color-gray-4)', 0.1),
69
+ '--mantine-color-disabled': alpha(theme.colors.gray[4], 0.1),
43
70
  '--mantine-color-disabled-color': theme.colors.gray[3],
44
71
  },
45
72
  };