@itcase/ui-core 1.10.55 → 1.10.60

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.
@@ -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;
@@ -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;
@@ -1,11 +1,15 @@
1
1
  import React from 'react';
2
2
  import type { GeneratedId } from '@itcase/types-core';
3
- import { statusToAppearanceList } from './Notifications';
4
- type NotificationAppearance = (typeof statusToAppearanceList)[keyof typeof statusToAppearanceList];
3
+ import type { AppearanceNotificationKeys, AppearanceSizeKey, AppearanceStyleKey, CompositeAppearanceNotificationKeys } from '@itcase/types-ui';
4
+ /** Full token (`… solid rounded`) or without shape (`… sizeM solid`). */
5
+ type NotificationAppearance = `${AppearanceNotificationKeys} ${AppearanceSizeKey} ${AppearanceStyleKey}` | CompositeAppearanceNotificationKeys;
5
6
  interface Notification {
6
7
  id: GeneratedId;
7
- _closeTimeout?: ReturnType<typeof setTimeout>;
8
8
  isClosing?: boolean;
9
+ isLoading: boolean;
10
+ onClickButton: React.MouseEventHandler<HTMLButtonElement>;
11
+ onClose?: () => void;
12
+ _closeTimeout?: ReturnType<typeof setTimeout>;
9
13
  after: React.ReactNode;
10
14
  appearance?: NotificationAppearance;
11
15
  buttonLabel: string;
@@ -18,12 +22,12 @@ interface Notification {
18
22
  textColor?: string;
19
23
  title: string;
20
24
  type?: 'float' | 'global' | 'toast';
21
- isLoading: boolean;
22
- onClickButton: React.MouseEventHandler<HTMLButtonElement>;
23
- onClose?: () => void;
24
25
  }
25
26
  interface CreatedNotification {
26
27
  id?: Notification['id'];
28
+ isLoading?: Notification['isLoading'];
29
+ onClickButton?: Notification['onClickButton'];
30
+ onClose?: Notification['onClose'];
27
31
  after?: Notification['after'];
28
32
  appearance?: NotificationAppearance;
29
33
  buttonLabel?: Notification['buttonLabel'];
@@ -36,13 +40,10 @@ interface CreatedNotification {
36
40
  textColor?: Notification['textColor'];
37
41
  title?: Notification['title'];
38
42
  type?: Notification['type'];
39
- isLoading?: Notification['isLoading'];
40
- onClickButton?: Notification['onClickButton'];
41
- onClose?: Notification['onClose'];
42
43
  }
43
44
  interface NotificationsProviderProps {
45
+ isLogRequestsErrors?: boolean;
44
46
  children: React.ReactNode;
45
47
  initialNotificationsList: CreatedNotification[];
46
- isLogRequestsErrors?: boolean;
47
48
  }
48
49
  export type { CreatedNotification, Notification, NotificationAppearance, NotificationsProviderProps, };
@@ -45,6 +45,7 @@ export interface StyleAttributes {
45
45
  flex?: CSS.Property.Flex;
46
46
  flexBasis?: CSS.Property.FlexBasis;
47
47
  flexDirection?: CSS.Property.FlexDirection;
48
+ flexGrow?: CSS.Property.FlexGrow;
48
49
  flexShrink?: CSS.Property.FlexShrink;
49
50
  flexWrap?: CSS.Property.FlexWrap;
50
51
  fontFamily?: CSS.Property.FontFamily;
@@ -69,6 +70,10 @@ export interface StyleAttributes {
69
70
  gridTemplateColumns?: CSS.Property.GridTemplateColumns;
70
71
  gridTemplateRows?: CSS.Property.GridTemplateRows;
71
72
  height?: CSS.Property.Height | HeightProps;
73
+ /**
74
+ * Position shorthand: top/right/bottom/left
75
+ */
76
+ inset?: CSS.Property.Inset;
72
77
  justifyContent?: JustifyContentProps;
73
78
  justifyItems?: JustifyItemsProps;
74
79
  justifySelf?: JustifySelfProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui-core",
3
- "version": "1.10.55",
3
+ "version": "1.10.60",
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": "f259be2cb2accf34ddfa100863870c1124ea2efc"
99
+ "gitHead": "d0730e4cc3c0766f62f23dd2be369f8440fff41f"
100
100
  }