@widergy/energy-ui 3.22.0 → 3.22.2

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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [3.22.2](https://github.com/widergy/energy-ui/compare/v3.22.1...v3.22.2) (2024-09-26)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * minor fix ([#499](https://github.com/widergy/energy-ui/issues/499)) ([d09e87a](https://github.com/widergy/energy-ui/commit/d09e87a50f8eac7b99d418764a6ef1b598ee7597))
7
+
8
+ ## [3.22.1](https://github.com/widergy/energy-ui/compare/v3.22.0...v3.22.1) (2024-09-25)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * shape prop fixed action card ([#496](https://github.com/widergy/energy-ui/issues/496)) ([10478e0](https://github.com/widergy/energy-ui/commit/10478e0caa4fa88893e5ad161033c90696d8f6a1))
14
+
1
15
  # [3.22.0](https://github.com/widergy/energy-ui/compare/v3.21.2...v3.22.0) (2024-09-24)
2
16
 
3
17
 
@@ -3,23 +3,23 @@
3
3
  ## Props
4
4
 
5
5
 
6
- | Name | Type | Default | Description |
7
- | :----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------ |
8
- | `additionalMessage` | `shape({ Icon: elementType, iconProps: shape({ colorTheme: string, size: string }), labelProps: shape({ colorTheme: string, variant: string }), message: string })` | | Additional message information, including icons and labels. |
9
- | `adornment` | `shape({ alignment: oneOf(['center', 'end', 'start']), position: string, props: object, type: string })` | | Adornment object to customize alignment, position, and type. |
10
- | `BackgroundImage` | `elementType` | | A React component for the background image. |
11
- | `bottomActions` | `arrayOf(shape({ colorTheme: string, disabled: bool, Icon: elementType, label: string, loading: bool, onClick: func }))` | | Defines the list of actions to be displayed at the bottom of the card. |
12
- | `bottomActionsVariant` | `oneOf(['default', 'redirection'])` | | Sets the style variant for bottom actions. |
13
- | `classNames` | `objectOf(string)` | | Css classes |
14
- | `description` | `string` | | Description text to be displayed. |
15
- | `descriptionProps` | `shape({ colorTheme: string, variant: string })` | | Props to customize the description's style. |
16
- | `headerActions` | `arrayOf(shape({ Icon: oneOfType([elementType, string]), iconProps: string, id: oneOfType([number, string]), label: string, loading: bool, onClick: func }))` | | List of actions available in the header section. |
17
- | `headerActionsProps` | `shape({ alignment: oneOf(['center', 'end', 'start']), buttonGroupProps: shape({ colorTheme: string, type: string }), maxNumberOfPrimaryActions: number, variant: oneOf(['default', 'buttonGroup']) })` | | Props to configure header actions alignment, button group, etc. |
18
- | `mainAction` | `func` | | Main action function for the card. |
19
- | `size` | `oneOf(['medium', 'small'])` | `'medium'` | Size of the card, either small or medium. |
20
- | `status` | `string` | | Status text to be displayed. |
21
- | `statusLabel` | `string` | | Status label for additional status info. |
22
- | `statusAlignment` | `oneOf(['center', 'end', 'start'])` | | Alignment of the status element. |
23
- | `title` | `string.isRequired` | | The title of the card, required. |
24
- | `titleProps` | `shape({ variant: string, weight: string })` | | Props to configure the title style. |
25
- | `withBodyPadding` | `bool` | `false` | Adds padding to the card body if`true`. |
6
+ | Name | Type | Default | Description |
7
+ | :----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------ |
8
+ | `additionalMessage` | `shape({ Icon: elementType, iconProps: shape({ colorTheme: string, size: string }), labelProps: shape({ colorTheme: string, variant: string }), message: string })` | | Additional message information, including icons and labels. |
9
+ | `adornment` | `shape({ alignment: oneOf(['center', 'end', 'start']), position: string, props: object, type: string })` | | Adornment object to customize alignment, position, and type. |
10
+ | `BackgroundImage` | `elementType` | | A React component for the background image. |
11
+ | `bottomActions` | `arrayOf(shape({ colorTheme: string, disabled: bool, Icon: elementType, label: string, loading: bool, onClick: func }))` | | Defines the list of actions to be displayed at the bottom of the card. |
12
+ | `bottomActionsVariant` | `oneOf(['default', 'redirection'])` | | Sets the style variant for bottom actions. |
13
+ | `classNames` | `objectOf(string)` | | Css classes |
14
+ | `description` | `string` | | Description text to be displayed. |
15
+ | `descriptionProps` | `shape({ colorTheme: string, variant: string })` | | Props to customize the description's style. |
16
+ | `headerActions` | `arrayOf(shape({ Icon: oneOfType([elementType, string]), iconProps: string, id: oneOfType([number, string]), label: string, loading: bool, onClick: func }))` | | List of actions available in the header section. |
17
+ | `headerActionsProps` | `shape({ alignment: oneOf(['center', 'end', 'start']), buttonGroupProps: shape({ colorTheme: string, shape: string }), maxNumberOfPrimaryActions: number, variant: oneOf(['default', 'buttonGroup']) })` | | Props to configure header actions alignment, button group, etc. |
18
+ | `mainAction` | `func` | | Main action function for the card. |
19
+ | `size` | `oneOf(['medium', 'small'])` | `'medium'` | Size of the card, either small or medium. |
20
+ | `status` | `string` | | Status text to be displayed. |
21
+ | `statusLabel` | `string` | | Status label for additional status info. |
22
+ | `statusAlignment` | `oneOf(['center', 'end', 'start'])` | | Alignment of the status element. |
23
+ | `title` | `string.isRequired` | | The title of the card, required. |
24
+ | `titleProps` | `shape({ variant: string, weight: string })` | | Props to configure the title style. |
25
+ | `withBodyPadding` | `bool` | `false` | Adds padding to the card body if`true`. |
@@ -54,8 +54,7 @@ BottomActions.propTypes = {
54
54
  Icon: (0, _propTypes.oneOfType)([_propTypes.elementType, _propTypes.string]),
55
55
  label: _propTypes.string,
56
56
  loading: _propTypes.bool,
57
- onClick: _propTypes.func,
58
- type: (0, _propTypes.oneOf)([_constants.ACTION_TYPES.DEFAULT, _constants.ACTION_TYPES.REDIRECTION])
57
+ onClick: _propTypes.func
59
58
  })),
60
59
  bottomActionsVariant: _propTypes.string
61
60
  };
@@ -72,7 +72,7 @@ Header.propTypes = {
72
72
  alignment: (0, _propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER, _constants.PLACE_SELF_TYPES.END, _constants.PLACE_SELF_TYPES.START]),
73
73
  buttonGroupProps: (0, _propTypes.shape)({
74
74
  colorTheme: _propTypes.string,
75
- type: _propTypes.string
75
+ shape: _propTypes.string
76
76
  }),
77
77
  maxNumberOfPrimaryActions: _propTypes.number,
78
78
  variant: (0, _propTypes.oneOf)([_constants.HEADER_ACTIONS_VARIANTS.DEFAULT, _constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])
@@ -8,6 +8,7 @@
8
8
  display: flex;
9
9
  flex-direction: column;
10
10
  margin-right: auto;
11
+ overflow-wrap: anywhere;
11
12
  }
12
13
 
13
14
  .medium {
@@ -29,7 +29,7 @@ const HeaderActions = _ref => {
29
29
  const showButtonGroup = headerActionsProps.variant === _constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP;
30
30
  const {
31
31
  colorTheme: buttonGroupColorTheme = 'secondary',
32
- type: buttonGroupType
32
+ shape: buttonGroupShape
33
33
  } = headerActionsProps?.buttonGroupProps || {};
34
34
  const maxNumberOfPrimaryActions = headerActionsProps?.maxNumberOfPrimaryActions || _constants2.DEFAULT_MAX_NUMBER_OF_PRIMARY_ACTIONS;
35
35
  const handleSetMainActionHoverVisible = () => setMainActionHoverVisible(true);
@@ -85,7 +85,7 @@ const HeaderActions = _ref => {
85
85
  })),
86
86
  colorTheme: buttonGroupColorTheme,
87
87
  selected: selectedAction || secondaryActions[0]?.id,
88
- type: buttonGroupType
88
+ shape: buttonGroupShape
89
89
  })));
90
90
  };
91
91
  HeaderActions.propTypes = {
@@ -101,7 +101,7 @@ HeaderActions.propTypes = {
101
101
  alignment: (0, _propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER, _constants.PLACE_SELF_TYPES.END, _constants.PLACE_SELF_TYPES.START]),
102
102
  buttonGroupProps: (0, _propTypes.shape)({
103
103
  colorTheme: _propTypes.string,
104
- type: _propTypes.string
104
+ shape: _propTypes.string
105
105
  }),
106
106
  maxNumberOfPrimaryActions: _propTypes.number,
107
107
  variant: (0, _propTypes.oneOf)([_constants.HEADER_ACTIONS_VARIANTS.DEFAULT, _constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])
@@ -125,7 +125,7 @@ UTActionCard.propTypes = {
125
125
  alignment: (0, _propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER, _constants.PLACE_SELF_TYPES.END, _constants.PLACE_SELF_TYPES.START]),
126
126
  buttonGroupProps: (0, _propTypes.shape)({
127
127
  colorTheme: _propTypes.string,
128
- type: _propTypes.string
128
+ shape: _propTypes.string
129
129
  }),
130
130
  maxNumberOfPrimaryActions: _propTypes.number,
131
131
  variant: (0, _propTypes.oneOf)([_constants.HEADER_ACTIONS_VARIANTS.DEFAULT, _constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])
@@ -44,21 +44,16 @@ const getIconProps = _ref2 => {
44
44
  theme,
45
45
  shade: fillShade || _constants.DEFAULT_INTERNAL_SHADE
46
46
  });
47
- const baseIconProps = {
48
- flexShrink: 0
49
- };
50
47
  const defaultIconProps = {
51
48
  color: iconColor,
52
- size,
53
- ...baseIconProps
49
+ size
54
50
  };
55
51
  const energyIconProps = {
56
52
  stroke: iconColor,
57
53
  ...(size && {
58
54
  width: size,
59
55
  height: size
60
- }),
61
- ...baseIconProps
56
+ })
62
57
  };
63
58
  return {
64
59
  style: filled ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@widergy/energy-ui",
3
- "version": "3.22.0",
3
+ "version": "3.22.2",
4
4
  "description": "Widergy Web Components",
5
5
  "author": "widergy",
6
6
  "license": "MIT",