@itcase/ui-core 1.10.54 → 1.10.57

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.
@@ -91,8 +91,8 @@ function NotificationsProvider(props) {
91
91
  []);
92
92
  const notificationsAPI = React.useMemo(() => ({
93
93
  hideNotifications: hideNotifications,
94
- removeNotification: removeNotification,
95
94
  notificationStatuses: STATUSES,
95
+ removeNotification: removeNotification,
96
96
  showNotification: showNotification,
97
97
  }),
98
98
  // Functions is never changes, no sense to set as dependencies
@@ -114,7 +114,8 @@ function NotificationsProvider(props) {
114
114
  if (responseError.message) {
115
115
  // prevent from showing many network errors
116
116
  const errorListToDedupe = ['network'];
117
- const id = errorListToDedupe.includes(responseError.key)
117
+ const id = typeof responseError.key === 'string' &&
118
+ errorListToDedupe.includes(responseError.key)
118
119
  ? responseError.key
119
120
  : undefined;
120
121
  showNotification({
@@ -29,6 +29,7 @@ var styleAttributes = [
29
29
  'columnGap',
30
30
  'columnWidth',
31
31
  'height',
32
+ 'inset',
32
33
  'justifyContent',
33
34
  'justifyItems',
34
35
  'justifySelf',
@@ -37,6 +37,9 @@ function useStyles(props) {
37
37
  const { deviceCurrentMainType, deviceCurrentType, deviceTypesList } = UIContext.useUserDeviceContext();
38
38
  const propsStyleAttributes = React.useMemo(() => {
39
39
  const styles = Object.entries(props).reduce((result, [propKey, propValue]) => {
40
+ if (propValue === false || propValue == null) {
41
+ return result;
42
+ }
40
43
  const styleAttributeKey = getTargetStyleAttributeKey(propKey, propValue);
41
44
  if (styleAttributeKey) {
42
45
  result[propKey] = propValue;
@@ -89,8 +89,8 @@ function NotificationsProvider(props) {
89
89
  []);
90
90
  const notificationsAPI = useMemo(() => ({
91
91
  hideNotifications: hideNotifications,
92
- removeNotification: removeNotification,
93
92
  notificationStatuses: STATUSES,
93
+ removeNotification: removeNotification,
94
94
  showNotification: showNotification,
95
95
  }),
96
96
  // Functions is never changes, no sense to set as dependencies
@@ -112,7 +112,8 @@ function NotificationsProvider(props) {
112
112
  if (responseError.message) {
113
113
  // prevent from showing many network errors
114
114
  const errorListToDedupe = ['network'];
115
- const id = errorListToDedupe.includes(responseError.key)
115
+ const id = typeof responseError.key === 'string' &&
116
+ errorListToDedupe.includes(responseError.key)
116
117
  ? responseError.key
117
118
  : undefined;
118
119
  showNotification({
@@ -25,6 +25,7 @@ var styleAttributes = [
25
25
  'columnGap',
26
26
  'columnWidth',
27
27
  'height',
28
+ 'inset',
28
29
  'justifyContent',
29
30
  'justifyItems',
30
31
  'justifySelf',
@@ -35,6 +35,9 @@ function useStyles(props) {
35
35
  const { deviceCurrentMainType, deviceCurrentType, deviceTypesList } = useUserDeviceContext();
36
36
  const propsStyleAttributes = useMemo(() => {
37
37
  const styles = Object.entries(props).reduce((result, [propKey, propValue]) => {
38
+ if (propValue === false || propValue == null) {
39
+ return result;
40
+ }
38
41
  const styleAttributeKey = getTargetStyleAttributeKey(propKey, propValue);
39
42
  if (styleAttributeKey) {
40
43
  result[propKey] = propValue;
@@ -69,6 +69,10 @@ export interface StyleAttributes {
69
69
  gridTemplateColumns?: CSS.Property.GridTemplateColumns;
70
70
  gridTemplateRows?: CSS.Property.GridTemplateRows;
71
71
  height?: CSS.Property.Height | HeightProps;
72
+ /**
73
+ * Position shorthand: top/right/bottom/left
74
+ */
75
+ inset?: CSS.Property.Inset;
72
76
  justifyContent?: JustifyContentProps;
73
77
  justifyItems?: JustifyItemsProps;
74
78
  justifySelf?: JustifySelfProps;
@@ -122,7 +126,7 @@ export interface StyleAttributes {
122
126
  whiteSpace?: CSS.Property.WhiteSpace;
123
127
  width?: CSS.Property.Width | WidthProps;
124
128
  writingMode?: CSS.Property.WritingMode;
125
- zIndex?: CSS.Property.ZIndex;
129
+ zIndex?: string;
126
130
  }
127
131
  type WrappedInterface<T> = {
128
132
  [P in keyof T as `${P & string}Wrapper`]: T[P];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui-core",
3
- "version": "1.10.54",
3
+ "version": "1.10.57",
4
4
  "description": "UI shared components",
5
5
  "keywords": [
6
6
  "Modal",
@@ -96,5 +96,5 @@
96
96
  "rollup-plugin-peer-deps-external": "^2.2.4",
97
97
  "rollup-preserve-directives": "^1.1.3"
98
98
  },
99
- "gitHead": "5b13e50aec51841ef5b22866bd55ae9b03db9aef"
99
+ "gitHead": "915d05f7b9579e649e0e113acf841710ec33cc18"
100
100
  }