@widergy/energy-ui 3.182.0 → 3.183.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 (32) hide show
  1. package/CHANGELOG.md +15 -2
  2. package/dist/components/UTActionCard/components/HeaderActions/index.js +1 -1
  3. package/dist/components/UTActionCard/index.js +1 -1
  4. package/dist/components/UTChip/constants.js +1 -1
  5. package/dist/components/UTChip/index.js +1 -1
  6. package/dist/components/UTChip/styles.module.scss +35 -8
  7. package/dist/components/UTChip/utils.js +1 -1
  8. package/dist/components/UTIcon/constants.js +1 -1
  9. package/dist/components/UTIcon/index.js +1 -1
  10. package/dist/components/UTIcon/styles.module.scss +6 -0
  11. package/dist/components/UTIcon/theme.js +1 -1
  12. package/dist/components/UTStatusMessage/index.js +1 -1
  13. package/dist/constants/testIds.js +1 -1
  14. package/dist/esm/components/UTActionCard/components/HeaderActions/index.js +1 -1
  15. package/dist/esm/components/UTActionCard/index.js +1 -1
  16. package/dist/esm/components/UTChip/constants.js +1 -1
  17. package/dist/esm/components/UTChip/index.js +1 -1
  18. package/dist/esm/components/UTChip/styles.module.scss +35 -8
  19. package/dist/esm/components/UTChip/utils.js +1 -1
  20. package/dist/esm/components/UTIcon/constants.js +1 -1
  21. package/dist/esm/components/UTIcon/index.js +1 -1
  22. package/dist/esm/components/UTIcon/styles.module.scss +6 -0
  23. package/dist/esm/components/UTIcon/theme.js +1 -1
  24. package/dist/esm/components/UTStatusMessage/index.js +1 -1
  25. package/dist/esm/constants/testIds.js +1 -1
  26. package/dist/esm/utils/hooks/useCSSVariables/constants.js +1 -0
  27. package/dist/esm/utils/hooks/useCSSVariables/dimensionTokens.js +1 -1
  28. package/dist/esm/utils/hooks/useCSSVariables/index.js +1 -1
  29. package/dist/utils/hooks/useCSSVariables/constants.js +1 -0
  30. package/dist/utils/hooks/useCSSVariables/dimensionTokens.js +1 -1
  31. package/dist/utils/hooks/useCSSVariables/index.js +1 -1
  32. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,9 +1,22 @@
1
- # [3.182.0](https://github.com/widergy/energy-ui/compare/v3.181.0...v3.182.0) (2026-09-01)
1
+ # [3.183.0](https://github.com/widergy/energy-ui/compare/v3.182.0...v3.183.0) (2026-09-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * [AXCH-1879] area style for container in uticon ([#857](https://github.com/widergy/energy-ui/issues/857)) ([0f32b9d](https://github.com/widergy/energy-ui/commit/0f32b9dec93af332b69e4470f97e446b8398bc72))
2
7
 
3
8
 
4
9
  ### Features
5
10
 
6
- * [WDS-22] add card variant to UTCheckbox ([#856](https://github.com/widergy/energy-ui/issues/856)) ([aca6147](https://github.com/widergy/energy-ui/commit/aca6147821df722275ad3b2f977dd31a43ab1743))
11
+ * [WDS-18] add chip support in status message and color support i… ([#853](https://github.com/widergy/energy-ui/issues/853)) ([6d14e2e](https://github.com/widergy/energy-ui/commit/6d14e2e046020ead0ac0d59eda7281ebda66666f))
12
+
13
+ # [3.182.0](https://github.com/widergy/energy-ui/compare/v3.181.0...v3.182.0) (2026-09-01)
14
+
15
+ ### Novedades y Mejoras
16
+
17
+ * Los casilleros de selección múltiple ahora cuentan con una variante visual de tarjeta: permiten mostrar un ícono, título, descripción y texto de ayuda emergente, manteniendo una apariencia consistente con los botones de opción única en formato tarjeta. [#856](https://github.com/widergy/Energy-UI/pull/856) [WDS-22](https://widergy.atlassian.net/browse/WDS-22)
18
+ * Se unificó el estilo visual de los controles de selección no marcados y deshabilitados entre casilleros y botones de opción, logrando mayor coherencia en toda la interfaz. [#856](https://github.com/widergy/Energy-UI/pull/856) [WDS-22](https://widergy.atlassian.net/browse/WDS-22)
19
+ * Mejoras internas de la plataforma. [`a7826d1`](https://github.com/widergy/Energy-UI/commit/a7826d1)
7
20
 
8
21
  # [3.181.0](https://github.com/widergy/energy-ui/compare/v3.180.3...v3.181.0) (2026-08-31)
9
22
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_isEmpty=_interopRequireDefault(require("lodash/isEmpty")),_propTypes=require("prop-types"),_UTButton=_interopRequireDefault(require("../../../UTButton")),_UTButtonGroup=_interopRequireDefault(require("../../../UTButtonGroup")),_UTMenu=_interopRequireDefault(require("../../../UTMenu")),_UTTooltip=_interopRequireDefault(require("../../../UTTooltip")),_constants=require("../../constants"),_utils=require("./utils"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var n,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(n=t?o:r){if(n.has(e))return n.get(e);n.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?n(s,t,a):s[t]=e[t]);return s})(e,t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},_extends.apply(null,arguments)}const HeaderActions=e=>{var t,r;let{headerActions:o,headerActionsProps:n,setMainActionHoverVisible:a}=e;const[s,p]=(0,_react.useState)(),[l,i]=(0,_react.useState)(null===(t=o.find(e=>{let{selectedDefault:t}=e;return t}))||void 0===t?void 0:t.id),u=n.variant===_constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP,{colorTheme:c="secondary",shape:_}=(null==n?void 0:n.buttonGroupProps)||{},d=()=>a(!0),f=()=>{d(),p()},{primaryActions:T,secondaryActions:y}=(0,_utils.processActions)(o,u?null:f),m=(null==n?void 0:n.buttonSize)||"medium";return _react.default.createElement("div",{className:"".concat(_stylesModule.default.headerActionsContainer," ").concat(_stylesModule.default["placeSelf-".concat(n.alignment)]),onClick:e=>e.stopPropagation(),onMouseEnter:()=>a(!1),onMouseLeave:d},T.map(e=>_react.default.createElement(_UTTooltip.default,{tippyProps:{appendTo:()=>document.body,interactive:!1},content:e.label&&_react.default.createElement("span",null,e.label)},_react.default.createElement("div",null,_react.default.createElement(_UTButton.default,_extends({},e,{classNames:{root:_stylesModule.default.zIndex},size:m,variant:"text"}),e.title)))),!(0,_isEmpty.default)(y)&&(u?_react.default.createElement(_UTButtonGroup.default,{actions:y.map(e=>({...e,onClick:()=>{i(e.id),e.onClick()}})),colorTheme:c,selected:l||(null===(r=y[0])||void 0===r?void 0:r.id),shape:_}):_react.default.createElement(_react.default.Fragment,null,_react.default.createElement(_UTMenu.default,{anchor:s,iconBefore:!0,items:y,menuPlacement:"bottom-end",onClose:f,scrollBarProps:{options:{suppressScrollY:!0,suppressScrollX:!0}}}),_react.default.createElement(_UTButton.default,{classNames:{root:_stylesModule.default.zIndex},Icon:"IconDots",onClick:e=>{e.stopPropagation(),s?p():p(e.currentTarget)},size:"medium",variant:"text"}))))};HeaderActions.propTypes={headerActions:(0,_propTypes.arrayOf)((0,_propTypes.shape)({Icon:(0,_propTypes.oneOfType)([_propTypes.elementType,_propTypes.string]),id:(0,_propTypes.oneOfType)([_propTypes.number,_propTypes.string]),isPrimary:_propTypes.bool,title:_propTypes.string,label:_propTypes.string,loading:_propTypes.bool,onClick:_propTypes.func,selectedDefault:_propTypes.bool})),headerActionsProps:(0,_propTypes.shape)({alignment:(0,_propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER,_constants.PLACE_SELF_TYPES.END,_constants.PLACE_SELF_TYPES.START]),buttonGroupProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,shape:_propTypes.string}),variant:(0,_propTypes.oneOf)([_constants.HEADER_ACTIONS_VARIANTS.DEFAULT,_constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),setMainActionHoverVisible:_propTypes.func};var _default=exports.default=(0,_react.memo)(HeaderActions);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_isEmpty=_interopRequireDefault(require("lodash/isEmpty")),_propTypes=require("prop-types"),_UTButton=_interopRequireDefault(require("../../../UTButton")),_UTButtonGroup=_interopRequireDefault(require("../../../UTButtonGroup")),_UTMenu=_interopRequireDefault(require("../../../UTMenu")),_UTTooltip=_interopRequireDefault(require("../../../UTTooltip")),_constants=require("../../constants"),_utils=require("./utils"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,o=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var n,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(n=t?o:r){if(n.has(e))return n.get(e);n.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?n(s,t,a):s[t]=e[t]);return s})(e,t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},_extends.apply(null,arguments)}const HeaderActions=e=>{var t,r;let{headerActions:o,headerActionsProps:n,setMainActionHoverVisible:a}=e;const[s,p]=(0,_react.useState)(),[l,i]=(0,_react.useState)(null===(t=o.find(e=>{let{selectedDefault:t}=e;return t}))||void 0===t?void 0:t.id),u=n.variant===_constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP,{colorTheme:c="secondary",shape:_,size:d}=(null==n?void 0:n.buttonGroupProps)||{},f=()=>a(!0),T=()=>{f(),p()},{primaryActions:y,secondaryActions:m}=(0,_utils.processActions)(o,u?null:T),E=(null==n?void 0:n.buttonSize)||"medium";return _react.default.createElement("div",{className:"".concat(_stylesModule.default.headerActionsContainer," ").concat(_stylesModule.default["placeSelf-".concat(n.alignment)]),onClick:e=>e.stopPropagation(),onMouseEnter:()=>a(!1),onMouseLeave:f},y.map(e=>_react.default.createElement(_UTTooltip.default,{tippyProps:{appendTo:()=>document.body,interactive:!1},content:e.label&&_react.default.createElement("span",null,e.label)},_react.default.createElement("div",null,_react.default.createElement(_UTButton.default,_extends({},e,{classNames:{root:_stylesModule.default.zIndex},size:E,variant:"text"}),e.title)))),!(0,_isEmpty.default)(m)&&(u?_react.default.createElement(_UTButtonGroup.default,{actions:m.map(e=>({...e,onClick:()=>{i(e.id),e.onClick()}})),colorTheme:c,selected:l||(null===(r=m[0])||void 0===r?void 0:r.id),shape:_,size:d}):_react.default.createElement(_react.default.Fragment,null,_react.default.createElement(_UTMenu.default,{anchor:s,iconBefore:!0,items:m,menuPlacement:"bottom-end",onClose:T,scrollBarProps:{options:{suppressScrollY:!0,suppressScrollX:!0}}}),_react.default.createElement(_UTButton.default,{classNames:{root:_stylesModule.default.zIndex},Icon:"IconDots",onClick:e=>{e.stopPropagation(),s?p():p(e.currentTarget)},size:"medium",variant:"text"}))))};HeaderActions.propTypes={headerActions:(0,_propTypes.arrayOf)((0,_propTypes.shape)({Icon:(0,_propTypes.oneOfType)([_propTypes.elementType,_propTypes.string]),id:(0,_propTypes.oneOfType)([_propTypes.number,_propTypes.string]),isPrimary:_propTypes.bool,title:_propTypes.string,label:_propTypes.string,loading:_propTypes.bool,onClick:_propTypes.func,selectedDefault:_propTypes.bool})),headerActionsProps:(0,_propTypes.shape)({alignment:(0,_propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER,_constants.PLACE_SELF_TYPES.END,_constants.PLACE_SELF_TYPES.START]),buttonGroupProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,shape:_propTypes.string}),variant:(0,_propTypes.oneOf)([_constants.HEADER_ACTIONS_VARIANTS.DEFAULT,_constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),setMainActionHoverVisible:_propTypes.func};var _default=exports.default=(0,_react.memo)(HeaderActions);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_propTypes=require("prop-types"),_array=require("@widergy/web-utils/lib/array"),_object=require("@widergy/web-utils/lib/object"),_UTTouchableWithoutFeedback=_interopRequireDefault(require("../UTTouchableWithoutFeedback")),_BottomActions=_interopRequireDefault(require("./components/BottomActions")),_AdditionalMessage=_interopRequireDefault(require("./components/AdditionalMessage")),_Header=_interopRequireDefault(require("./components/Header")),_constants=require("./constants"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var s=new WeakMap,o=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var r,n,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(r=t?o:s){if(r.has(e))return r.get(e);r.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(n.get||n.set)?r(a,t,n):a[t]=e[t]);return a})(e,t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var o in s)({}).hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},_extends.apply(null,arguments)}const UTActionCard=e=>{let{additionalMessage:t,adornment:s,BackgroundImage:o,bottomActions:r,bottomActionsVariant:n,children:a,classNames:p={},description:i,descriptionProps:c={},headerActions:_,headerActionsProps:l={variant:_constants.HEADER_ACTIONS_VARIANTS.DEFAULT},hideHeader:d=!1,mainAction:T,size:u=_constants.SIZES.MEDIUM,status:y,statusAlignment:f,statusLabel:E,testIds:g={},title:A,titleProps:m={},withBodyPadding:b=!0}=e;const[h,P]=(0,_react.useState)(!0),{backgroundDataTestId:S,containerDataTestId:I,statusDataTestId:C}=g;return _react.default.createElement("div",{className:"".concat(_stylesModule.default.cardContainer," ").concat(p.container)},_react.default.createElement(_UTTouchableWithoutFeedback.default,{className:"".concat(_stylesModule.default.innerContainer," ").concat(p.innerContainer," ").concat(T?"".concat(_stylesModule.default.withMainAction," ").concat(h&&"".concat(_stylesModule.default.mainActionHover," ").concat(p.mainActionHover)):_stylesModule.default.withoutMainAction),dataTestId:I,onClick:()=>null==T?void 0:T()},o&&_react.default.createElement(o,{className:"".concat(_stylesModule.default.backgroundImage," ").concat(p.backgroundImage),"data-testid":S}),_react.default.createElement("div",{className:"".concat(_stylesModule.default.headerAndChildrenContainer," ").concat(p.headerAndChildrenContainer)},!d&&_react.default.createElement(_Header.default,{adornment:s,classNames:p,description:i,descriptionProps:c,headerActions:_,headerActionsProps:l,mainAction:T,setMainActionHoverVisible:P,size:u,status:y,statusAlignment:f,statusDataTestId:C,statusLabel:E,title:A,titleProps:m}),a&&_react.default.createElement("div",{className:"".concat(d?_stylesModule.default.withoutHeader:""," ").concat(b?_stylesModule.default["bodyPadding-".concat(u)]:_stylesModule.default["withoutBodyPadding-".concat(u)])},a))),!(0,_object.objectIsEmpty)(t)&&_react.default.createElement(_AdditionalMessage.default,_extends({},t,{size:u})),!(0,_array.isEmpty)(r)&&_react.default.createElement(_BottomActions.default,{actions:r,bottomActionsVariant:n,size:u}))};UTActionCard.propTypes={additionalMessage:(0,_propTypes.shape)({Icon:_propTypes.elementType,iconProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,size:_propTypes.string}),labelProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,variant:_propTypes.string}),message:_propTypes.string}),adornment:(0,_propTypes.shape)({alignment:(0,_propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER,_constants.PLACE_SELF_TYPES.END,_constants.PLACE_SELF_TYPES.START]),position:_propTypes.string,props:_propTypes.object,type:_propTypes.string}),BackgroundImage:_propTypes.elementType,bottomActions:(0,_propTypes.arrayOf)((0,_propTypes.shape)({colorTheme:_propTypes.string,disabled:_propTypes.bool,Icon:_propTypes.elementType,label:_propTypes.string,loading:_propTypes.bool,onClick:_propTypes.func})),bottomActionsVariant:(0,_propTypes.oneOf)([_constants.ACTION_TYPES.DEFAULT,_constants.ACTION_TYPES.REDIRECTION]),classNames:(0,_propTypes.objectOf)(_propTypes.string),description:_propTypes.string,descriptionProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,variant:_propTypes.string}),headerActions:(0,_propTypes.arrayOf)((0,_propTypes.shape)({Icon:(0,_propTypes.oneOfType)([_propTypes.elementType,_propTypes.string]),iconProps:_propTypes.string,id:(0,_propTypes.oneOfType)([_propTypes.number,_propTypes.string]),label:_propTypes.string,loading:_propTypes.bool,onClick:_propTypes.func})),headerActionsProps:(0,_propTypes.shape)({alignment:(0,_propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER,_constants.PLACE_SELF_TYPES.END,_constants.PLACE_SELF_TYPES.START]),buttonGroupProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,shape:_propTypes.string}),variant:(0,_propTypes.oneOf)([_constants.HEADER_ACTIONS_VARIANTS.DEFAULT,_constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),hideHeader:_propTypes.bool,mainAction:_propTypes.func,size:(0,_propTypes.oneOf)([_constants.SIZES.MEDIUM,_constants.SIZES.SMALL]),status:_propTypes.string,statusLabel:_propTypes.string,statusAlignment:(0,_propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER,_constants.PLACE_SELF_TYPES.END,_constants.PLACE_SELF_TYPES.START]),testIds:(0,_propTypes.shape)({backgroundDataTestId:_propTypes.string,containerDataTestId:_propTypes.string,statusDataTestId:_propTypes.string}),title:_propTypes.string,titleProps:(0,_propTypes.shape)({variant:_propTypes.string,weight:_propTypes.string}),withBodyPadding:_propTypes.bool};var _default=exports.default=(0,_react.memo)(UTActionCard);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_propTypes=require("prop-types"),_array=require("@widergy/web-utils/lib/array"),_object=require("@widergy/web-utils/lib/object"),_UTTouchableWithoutFeedback=_interopRequireDefault(require("../UTTouchableWithoutFeedback")),_BottomActions=_interopRequireDefault(require("./components/BottomActions")),_AdditionalMessage=_interopRequireDefault(require("./components/AdditionalMessage")),_Header=_interopRequireDefault(require("./components/Header")),_constants=require("./constants"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var s=new WeakMap,o=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var r,n,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(r=t?o:s){if(r.has(e))return r.get(e);r.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((n=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(n.get||n.set)?r(a,t,n):a[t]=e[t]);return a})(e,t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var o in s)({}).hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},_extends.apply(null,arguments)}const UTActionCard=e=>{let{additionalMessage:t,adornment:s,BackgroundImage:o,bottomActions:r,bottomActionsVariant:n,children:a,classNames:p={},description:i,descriptionProps:c={},headerActions:_,headerActionsProps:l={variant:_constants.HEADER_ACTIONS_VARIANTS.DEFAULT},hideHeader:d=!1,mainAction:T,size:u=_constants.SIZES.MEDIUM,status:y,statusAlignment:f,statusLabel:g,testIds:E={},title:A,titleProps:m={},withBodyPadding:b=!0}=e;const[h,P]=(0,_react.useState)(!0),{backgroundDataTestId:S,containerDataTestId:I,statusDataTestId:C}=E;return _react.default.createElement("div",{className:"".concat(_stylesModule.default.cardContainer," ").concat(p.container)},_react.default.createElement(_UTTouchableWithoutFeedback.default,{className:"".concat(_stylesModule.default.innerContainer," ").concat(p.innerContainer," ").concat(T?"".concat(_stylesModule.default.withMainAction," ").concat(h&&"".concat(_stylesModule.default.mainActionHover," ").concat(p.mainActionHover)):_stylesModule.default.withoutMainAction),dataTestId:I,onClick:()=>null==T?void 0:T()},o&&_react.default.createElement(o,{className:"".concat(_stylesModule.default.backgroundImage," ").concat(p.backgroundImage),"data-testid":S}),_react.default.createElement("div",{className:"".concat(_stylesModule.default.headerAndChildrenContainer," ").concat(p.headerAndChildrenContainer)},!d&&_react.default.createElement(_Header.default,{adornment:s,classNames:p,description:i,descriptionProps:c,headerActions:_,headerActionsProps:l,mainAction:T,setMainActionHoverVisible:P,size:u,status:y,statusAlignment:f,statusDataTestId:C,statusLabel:g,title:A,titleProps:m}),a&&_react.default.createElement("div",{className:"".concat(d?_stylesModule.default.withoutHeader:""," ").concat(b?_stylesModule.default["bodyPadding-".concat(u)]:_stylesModule.default["withoutBodyPadding-".concat(u)])},a))),!(0,_object.objectIsEmpty)(t)&&_react.default.createElement(_AdditionalMessage.default,_extends({},t,{size:u})),!(0,_array.isEmpty)(r)&&_react.default.createElement(_BottomActions.default,{actions:r,bottomActionsVariant:n,size:u}))};UTActionCard.propTypes={additionalMessage:(0,_propTypes.shape)({Icon:_propTypes.elementType,iconProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,size:_propTypes.string}),labelProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,variant:_propTypes.string}),message:_propTypes.string}),adornment:(0,_propTypes.shape)({alignment:(0,_propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER,_constants.PLACE_SELF_TYPES.END,_constants.PLACE_SELF_TYPES.START]),position:_propTypes.string,props:_propTypes.object,type:_propTypes.string}),BackgroundImage:_propTypes.elementType,bottomActions:(0,_propTypes.arrayOf)((0,_propTypes.shape)({colorTheme:_propTypes.string,disabled:_propTypes.bool,Icon:_propTypes.elementType,label:_propTypes.string,loading:_propTypes.bool,onClick:_propTypes.func})),bottomActionsVariant:(0,_propTypes.oneOf)([_constants.ACTION_TYPES.DEFAULT,_constants.ACTION_TYPES.REDIRECTION]),classNames:(0,_propTypes.objectOf)(_propTypes.string),description:_propTypes.string,descriptionProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,variant:_propTypes.string}),headerActions:(0,_propTypes.arrayOf)((0,_propTypes.shape)({Icon:(0,_propTypes.oneOfType)([_propTypes.elementType,_propTypes.string]),iconProps:_propTypes.string,id:(0,_propTypes.oneOfType)([_propTypes.number,_propTypes.string]),label:_propTypes.string,loading:_propTypes.bool,onClick:_propTypes.func})),headerActionsProps:(0,_propTypes.shape)({alignment:(0,_propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER,_constants.PLACE_SELF_TYPES.END,_constants.PLACE_SELF_TYPES.START]),buttonGroupProps:(0,_propTypes.shape)({colorTheme:_propTypes.string,shape:_propTypes.string,size:_propTypes.string}),variant:(0,_propTypes.oneOf)([_constants.HEADER_ACTIONS_VARIANTS.DEFAULT,_constants.HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),hideHeader:_propTypes.bool,mainAction:_propTypes.func,size:(0,_propTypes.oneOf)([_constants.SIZES.MEDIUM,_constants.SIZES.SMALL]),status:_propTypes.string,statusLabel:_propTypes.string,statusAlignment:(0,_propTypes.oneOf)([_constants.PLACE_SELF_TYPES.CENTER,_constants.PLACE_SELF_TYPES.END,_constants.PLACE_SELF_TYPES.START]),testIds:(0,_propTypes.shape)({backgroundDataTestId:_propTypes.string,containerDataTestId:_propTypes.string,statusDataTestId:_propTypes.string}),title:_propTypes.string,titleProps:(0,_propTypes.shape)({variant:_propTypes.string,weight:_propTypes.string}),withBodyPadding:_propTypes.bool};var _default=exports.default=(0,_react.memo)(UTActionCard);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CHIP_VARIANT=exports.CHIP_SIZES=exports.ADORNMENT_TYPES=exports.ADORNMENT_COMPONENT_MAPPER=void 0;var _UTIcon=_interopRequireDefault(require("../UTIcon")),_UTAvatar=_interopRequireDefault(require("../UTAvatar"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const CHIP_VARIANT=exports.CHIP_VARIANT={DEFAULT:"default",OUTLINE:"outline"},CHIP_SIZES=exports.CHIP_SIZES={MEDIUM:"medium",SMALL:"small"},ADORNMENT_TYPES=exports.ADORNMENT_TYPES={ICON:"icon",AVATAR:"avatar",IMAGE:"image"},ADORNMENT_COMPONENT_MAPPER=exports.ADORNMENT_COMPONENT_MAPPER={[ADORNMENT_TYPES.ICON]:_UTIcon.default,[ADORNMENT_TYPES.AVATAR]:_UTAvatar.default,[ADORNMENT_TYPES.IMAGE]:"img"};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_COLOR=exports.CHIP_VARIANT=exports.CHIP_SIZES=exports.CHIP_ICON_SIZE=exports.ADORNMENT_TYPES=exports.ADORNMENT_COMPONENT_MAPPER=void 0;var _UTIcon=_interopRequireDefault(require("../UTIcon")),_UTAvatar=_interopRequireDefault(require("../UTAvatar"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const CHIP_VARIANT=exports.CHIP_VARIANT={DEFAULT:"default",OUTLINE:"outline",SOLID:"solid"},DEFAULT_COLOR=exports.DEFAULT_COLOR=null,CHIP_SIZES=exports.CHIP_SIZES={MEDIUM:"medium",SMALL:"small"},CHIP_ICON_SIZE=exports.CHIP_ICON_SIZE={[CHIP_SIZES.MEDIUM]:"var(--UT-chip-icon-size-md, 20px)",[CHIP_SIZES.SMALL]:"var(--UT-chip-icon-size-sm, 16px)"},ADORNMENT_TYPES=exports.ADORNMENT_TYPES={ICON:"icon",AVATAR:"avatar",IMAGE:"image"},ADORNMENT_COMPONENT_MAPPER=exports.ADORNMENT_COMPONENT_MAPPER={[ADORNMENT_TYPES.ICON]:_UTIcon.default,[ADORNMENT_TYPES.AVATAR]:_UTAvatar.default,[ADORNMENT_TYPES.IMAGE]:"img"};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_propTypes=require("prop-types"),_UTButton=_interopRequireDefault(require("../UTButton")),_UTLabel=_interopRequireDefault(require("../UTLabel")),_utils=require("./utils"),_constants=require("./constants"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var n=new WeakMap,r=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var o,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(o=t?r:n){if(o.has(e))return o.get(e);o.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?o(s,t,a):s[t]=e[t]);return s})(e,t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_extends.apply(null,arguments)}const UTChip=e=>{let{active:t,adornment:n,children:r,dataTestId:o,disabled:a,isDragging:s,onClick:l,onClose:i,size:p=_constants.CHIP_SIZES.MEDIUM,variant:u=_constants.CHIP_VARIANT.DEFAULT}=e;const{Adornment:c,adornmentProps:_,buttonProps:d,Container:f,containerProps:T,labelProps:y}=(0,_utils.getItemsProps)({active:t,adornment:n,dataTestId:o,disabled:a,isDragging:s,onClick:l,size:p,variant:u}),I=i?e=>{e.stopPropagation(),i(e)}:void 0;return _react.default.createElement(f,_extends({className:"\n ".concat(_stylesModule.default.chipContainer,"\n ").concat(_stylesModule.default[p],"\n ").concat(_stylesModule.default[u],"\n ").concat(t?_stylesModule.default.active:"","\n ").concat(a?_stylesModule.default.disabled:"","\n ").concat(s?_stylesModule.default.dragging:"","\n ").concat(l&&!a?_stylesModule.default.interactive:_stylesModule.default.nonInteractive,"\n ")},T),c&&_react.default.createElement(c,_),_react.default.createElement(_UTLabel.default,y,r),I&&_react.default.createElement(_UTButton.default,_extends({},d,{Icon:"IconX",onClick:I,size:"small",variant:"text"})))};UTChip.propTypes={active:_propTypes.bool,adornment:(0,_propTypes.shape)({props:_propTypes.object,type:(0,_propTypes.oneOf)([_constants.ADORNMENT_TYPES.ICON,_constants.ADORNMENT_TYPES.AVATAR,_constants.ADORNMENT_TYPES.IMAGE])}),dataTestId:_propTypes.string,disabled:_propTypes.bool,isDragging:_propTypes.bool,onClick:_propTypes.func,onClose:_propTypes.func,size:(0,_propTypes.oneOf)([_constants.CHIP_SIZES.MEDIUM,_constants.CHIP_SIZES.SMALL]),variant:(0,_propTypes.oneOf)([_constants.CHIP_VARIANT.DEFAULT,_constants.CHIP_VARIANT.OUTLINE])};var _default=exports.default=(0,_react.memo)(UTChip);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_propTypes=require("prop-types"),_UTButton=_interopRequireDefault(require("../UTButton")),_UTLabel=_interopRequireDefault(require("../UTLabel")),_utils=require("./utils"),_constants=require("./constants"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var n=new WeakMap,o=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var r,s,a={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return a;if(r=t?o:n){if(r.has(e))return r.get(e);r.set(e,a)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((s=(r=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(s.get||s.set)?r(a,t,s):a[t]=e[t]);return a})(e,t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},_extends.apply(null,arguments)}const UTChip=e=>{let{active:t,adornment:n,children:o,color:r=_constants.DEFAULT_COLOR,dataTestId:s,disabled:a,isDragging:l,onClick:i,onClose:p,size:c=_constants.CHIP_SIZES.MEDIUM,textColor:u,variant:_=_constants.CHIP_VARIANT.DEFAULT}=e;const d=(0,_utils.getColorStyle)({color:r,textColor:u,variant:_}),{Adornment:f,adornmentProps:T,buttonProps:y,Container:I,containerProps:C,labelProps:g}=(0,_utils.getItemsProps)({active:t,adornment:n,dataTestId:s,disabled:a,isDragging:l,onClick:i,resolvedTextColor:d.color,size:c,variant:_}),M=p?e=>{e.stopPropagation(),p(e)}:void 0;return _react.default.createElement(I,_extends({className:"\n ".concat(_stylesModule.default.chipContainer,"\n ").concat(_stylesModule.default[c],"\n ").concat(_stylesModule.default[_],"\n ").concat(t?_stylesModule.default.active:"","\n ").concat(a?_stylesModule.default.disabled:"","\n ").concat(l?_stylesModule.default.dragging:"","\n ").concat(i&&!a?_stylesModule.default.interactive:_stylesModule.default.nonInteractive,"\n "),style:d},C),f&&_react.default.createElement(f,T),_react.default.createElement(_UTLabel.default,g,o),M&&_react.default.createElement(_UTButton.default,_extends({},y,{Icon:"IconX",onClick:M,size:"small",variant:"text"})))};UTChip.propTypes={active:_propTypes.bool,adornment:(0,_propTypes.shape)({props:_propTypes.object,type:(0,_propTypes.oneOf)([_constants.ADORNMENT_TYPES.ICON,_constants.ADORNMENT_TYPES.AVATAR,_constants.ADORNMENT_TYPES.IMAGE])}),color:_propTypes.string,dataTestId:_propTypes.string,disabled:_propTypes.bool,isDragging:_propTypes.bool,onClick:_propTypes.func,onClose:_propTypes.func,size:(0,_propTypes.oneOf)([_constants.CHIP_SIZES.MEDIUM,_constants.CHIP_SIZES.SMALL]),textColor:_propTypes.string,variant:(0,_propTypes.oneOf)([_constants.CHIP_VARIANT.DEFAULT,_constants.CHIP_VARIANT.OUTLINE,_constants.CHIP_VARIANT.SOLID])};var _default=exports.default=(0,_react.memo)(UTChip);
@@ -1,12 +1,13 @@
1
+ $dragging-shadow-color: rgba(0, 0, 0, 0.25);
2
+
1
3
  .chipContainer {
2
4
  align-items: center;
3
5
  border-style: solid;
4
- border-radius: 30px;
6
+ border-radius: var(--UT-chip-radius, 9999px);
5
7
  border-width: 1px;
6
8
  display: flex;
7
9
  flex-direction: row;
8
10
  flex-shrink: 0;
9
- grid-gap: 8px;
10
11
  transition:
11
12
  background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
12
13
  box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
@@ -17,11 +18,13 @@
17
18
  }
18
19
 
19
20
  .small {
20
- padding: 4px 8px;
21
+ gap: var(--UT-chip-gap-sm, 4px);
22
+ padding: var(--UT-chip-padding-y-sm, 4px) var(--UT-chip-padding-x-sm, 8px);
21
23
  }
22
24
 
23
25
  .medium {
24
- padding: 8px 12px;
26
+ gap: var(--UT-chip-gap-md, 8px);
27
+ padding: var(--UT-chip-padding-y-md, 8px) var(--UT-chip-padding-x-md, 12px);
25
28
  }
26
29
 
27
30
  .interactive {
@@ -49,7 +52,7 @@
49
52
 
50
53
  &.dragging {
51
54
  background-color: var(--light01);
52
- box-shadow: 0 4px 4px 0px rgba(0, 0, 0, 0.25);
55
+ box-shadow: 0 4px 4px 0 $dragging-shadow-color;
53
56
  }
54
57
 
55
58
  &:not(.dragging) {
@@ -83,7 +86,7 @@
83
86
 
84
87
  &.dragging {
85
88
  background-color: var(--light01);
86
- box-shadow: 0 4px 4px 0px rgba(0, 0, 0, 0.25);
89
+ box-shadow: 0 4px 4px 0 $dragging-shadow-color;
87
90
  }
88
91
 
89
92
  &:not(.dragging) {
@@ -100,8 +103,32 @@
100
103
  }
101
104
  }
102
105
 
106
+ .solid {
107
+ border-color: transparent;
108
+
109
+ &:not(.disabled) {
110
+ &:hover {
111
+ filter: brightness(0.92);
112
+ }
113
+
114
+ &.interactive {
115
+ &:active {
116
+ filter: brightness(0.85);
117
+ }
118
+ }
119
+
120
+ &.dragging {
121
+ box-shadow: 0 4px 4px 0 $dragging-shadow-color;
122
+ }
123
+ }
124
+
125
+ &.disabled {
126
+ opacity: 0.5;
127
+ }
128
+ }
129
+
103
130
  .imageAdornment {
104
- height: 24px;
131
+ height: var(--UT-chip-image-size, 24px);
105
132
  object-fit: cover;
106
- width: 24px;
133
+ width: var(--UT-chip-image-size, 24px);
107
134
  }
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getTextVariant=exports.getTextColorTheme=exports.getItemsProps=exports.getDefaultAdornmentProps=exports.getButtonColorTheme=void 0;var _isEmpty=_interopRequireDefault(require("lodash/isEmpty")),_Palette=require("../../constants/Palette"),_constants=require("../UTLabel/constants"),_UTTouchableWithoutFeedback=_interopRequireDefault(require("../UTTouchableWithoutFeedback")),_constants2=require("./constants"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const getTextColorTheme=e=>{let{active:t,disabled:a,isDragging:o,variant:r}=e;return!t||a||o?_Palette.COLOR_THEMES.gray:r===_constants2.CHIP_VARIANT.DEFAULT?_Palette.COLOR_THEMES.light:_Palette.COLOR_THEMES.accent};exports.getTextColorTheme=getTextColorTheme;const getButtonColorTheme=e=>{let{active:t,disabled:a,isDragging:o,variant:r}=e;return!t||a||o?_Palette.COLOR_THEMES.gray:r===_constants2.CHIP_VARIANT.DEFAULT?_Palette.COLOR_THEMES.negative:_Palette.COLOR_THEMES.primary};exports.getButtonColorTheme=getButtonColorTheme;const getTextVariant=e=>e===_constants2.CHIP_SIZES.SMALL?_constants.VARIANTS_NAMES.SMALL:_constants.VARIANTS_NAMES.BODY;exports.getTextVariant=getTextVariant;const getDefaultAdornmentProps=e=>{var t;let{active:a,adornment:o,disabled:r,isDragging:n,variant:s}=e;return(0,_isEmpty.default)(o)||!o.type?{}:o.type===_constants2.ADORNMENT_TYPES.ICON?{...o.props,colorTheme:getTextColorTheme({active:a,disabled:r,isDragging:n,variant:s}),size:20}:o.type===_constants2.ADORNMENT_TYPES.AVATAR?{...o.props,size:"small"}:o.type===_constants2.ADORNMENT_TYPES.IMAGE?{...o.props,className:"".concat(_stylesModule.default.imageAdornment," ").concat((null===(t=o.props)||void 0===t?void 0:t.className)||"")}:{}};exports.getDefaultAdornmentProps=getDefaultAdornmentProps;const getItemsProps=e=>{let{active:t,adornment:a,dataTestId:o,disabled:r,isDragging:n,onClick:s,size:i,variant:l}=e;return{Adornment:null!=a&&a.type?_constants2.ADORNMENT_COMPONENT_MAPPER[null==a?void 0:a.type]:null,adornmentProps:getDefaultAdornmentProps({active:t,adornment:a,disabled:r,variant:l}),Container:s&&!r?_UTTouchableWithoutFeedback.default:"div",containerProps:s&&!r?{onClick:s,dataTestId:o}:{"data-testid":o},labelProps:{colorTheme:getTextColorTheme({active:t,disabled:r,isDragging:n,variant:l}),variant:getTextVariant(i)},buttonProps:{colorTheme:getButtonColorTheme({active:t,disabled:r,isDragging:n,variant:l})}}};exports.getItemsProps=getItemsProps;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseLinearGradient=exports.isGradientColor=exports.getTextVariant=exports.getTextColorTheme=exports.getItemsProps=exports.getDefaultAdornmentProps=exports.getColorStyle=exports.getButtonColorTheme=void 0;var _isEmpty=_interopRequireDefault(require("lodash/isEmpty")),_Palette=require("../../constants/Palette"),_constants=require("../UTIcon/constants"),_constants2=require("../UTLabel/constants"),_UTTouchableWithoutFeedback=_interopRequireDefault(require("../UTTouchableWithoutFeedback")),_constants3=require("./constants"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(t){return t&&t.__esModule?t:{default:t}}const GRADIENT_REGEX=/^linear-gradient\(([\s\S]+)\)$/i,splitTopLevel=t=>{const{parts:e,current:r}=t.split("").reduce((t,e)=>{const r=t.depth+("("===e?1:")"===e?-1:0);return","===e&&0===r?{parts:[...t.parts,t.current],current:"",depth:r}:{...t,current:t.current+e,depth:r}},{parts:[],current:"",depth:0});return r.trim()?[...e,r]:e},isGradientColor=t=>"string"==typeof t&&GRADIENT_REGEX.test(t.trim());exports.isGradientColor=isGradientColor;const DIRECTION_REGEX=/^(-?\d+(?:\.\d+)?(?:deg|grad|rad|turn)|to\s)/i,parseLinearGradient=t=>{const e=isGradientColor(t)&&t.trim().match(GRADIENT_REGEX);if(!e)return null;const r=splitTopLevel(e[1]).map(t=>t.trim()),o=DIRECTION_REGEX.test(r[0]),n=o?r[0]:null,a=o?r.slice(1):r;return{direction:n,stops:a.map((t,e)=>{const r=t.trim().split(/\s+/),o=r[r.length-1],n=/%$/.test(o);return{color:n?r.slice(0,-1).join(" "):r.join(" "),offset:n?o:"".concat(e/Math.max(a.length-1,1)*100,"%")}})}};exports.parseLinearGradient=parseLinearGradient;const getTintedGradient=(t,e)=>{const r=parseLinearGradient(t);if(!r)return null;const o=r.stops.map(t=>"color-mix(in srgb, ".concat(t.color," ").concat(e,"%, transparent) ").concat(t.offset)).join(", ");return"linear-gradient(".concat(r.direction?"".concat(r.direction,", "):"").concat(o,")")},getColorStyle=t=>{var e;let{color:r,textColor:o,variant:n}=t;if(!r&&!o)return{};const a=isGradientColor(r),s=a?null===(e=parseLinearGradient(r))||void 0===e||null===(e=e.stops[0])||void 0===e?void 0:e.color:r;return n===_constants3.CHIP_VARIANT.SOLID?{...r&&(a?{backgroundImage:r}:{backgroundColor:r}),borderColor:"transparent",color:o||"#FFFFFF"}:n===_constants3.CHIP_VARIANT.OUTLINE?{backgroundColor:"transparent",...s&&{borderColor:"color-mix(in srgb, ".concat(s," 40%, transparent)")},color:o||"var(--dark05)"}:{...a?{backgroundImage:getTintedGradient(r,14)}:s&&{backgroundColor:"color-mix(in srgb, ".concat(s," 14%, transparent)")},borderColor:"transparent",color:o||s}};exports.getColorStyle=getColorStyle;const getTextColorTheme=t=>{let{active:e,disabled:r,isDragging:o,variant:n}=t;return!e||r||o?_Palette.COLOR_THEMES.gray:n===_constants3.CHIP_VARIANT.DEFAULT?_Palette.COLOR_THEMES.light:_Palette.COLOR_THEMES.accent};exports.getTextColorTheme=getTextColorTheme;const getButtonColorTheme=t=>{let{active:e,disabled:r,isDragging:o,variant:n}=t;return!e||r||o?_Palette.COLOR_THEMES.gray:n===_constants3.CHIP_VARIANT.DEFAULT?_Palette.COLOR_THEMES.negative:_Palette.COLOR_THEMES.primary};exports.getButtonColorTheme=getButtonColorTheme;const getTextVariant=t=>t===_constants3.CHIP_SIZES.SMALL?_constants2.VARIANTS_NAMES.SMALL:_constants2.VARIANTS_NAMES.BODY;exports.getTextVariant=getTextVariant;const getDefaultAdornmentProps=t=>{var e;let{active:r,adornment:o,disabled:n,isDragging:a,resolvedTextColor:s,size:i,variant:l}=t;return(0,_isEmpty.default)(o)||!o.type?{}:o.type===_constants3.ADORNMENT_TYPES.ICON?{...o.props,colorTheme:s?_constants.CURRENT_COLOR:getTextColorTheme({active:r,disabled:n,isDragging:a,variant:l}),size:_constants3.CHIP_ICON_SIZE[i]}:o.type===_constants3.ADORNMENT_TYPES.AVATAR?{...o.props,size:"small"}:o.type===_constants3.ADORNMENT_TYPES.IMAGE?{...o.props,className:"".concat(_stylesModule.default.imageAdornment," ").concat((null===(e=o.props)||void 0===e?void 0:e.className)||"")}:{}};exports.getDefaultAdornmentProps=getDefaultAdornmentProps;const getItemsProps=t=>{let{active:e,adornment:r,dataTestId:o,disabled:n,isDragging:a,onClick:s,resolvedTextColor:i,size:l,variant:c}=t;return{Adornment:null!=r&&r.type?_constants3.ADORNMENT_COMPONENT_MAPPER[null==r?void 0:r.type]:null,adornmentProps:getDefaultAdornmentProps({active:e,adornment:r,disabled:n,isDragging:a,resolvedTextColor:i,size:l,variant:c}),Container:s&&!n?_UTTouchableWithoutFeedback.default:"div",containerProps:s&&!n?{onClick:s,dataTestId:o}:{"data-testid":o},labelProps:{colorTheme:i?void 0:getTextColorTheme({active:e,disabled:n,isDragging:a,variant:c}),style:i?{color:i}:void 0,variant:getTextVariant(l)},buttonProps:{colorTheme:getButtonColorTheme({active:e,disabled:n,isDragging:a,variant:c})}}};exports.getItemsProps=getItemsProps;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FILLED_ICON_SUFIX=exports.FILLED_ICON_COLOR=exports.ENERGY_ICON_PREFIX=exports.ENERGY_ICONS=exports.DEFAULT_VARIANT=exports.DEFAULT_INTERNAL_SHADE=exports.DEFAULT_ICON_SIZE=exports.DEFAULT_COLOR_THEME=exports.AREA_BORDER_WIDTH=void 0;var _react=_interopRequireDefault(require("react")),_Palette=require("../../constants/Palette");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var EnergyIconBottledGas=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M14.955 8h-5.91A3.036 3.036 0 0 0 6 11.027v4.946A3.036 3.036 0 0 0 9.045 19h5.91A3.036 3.036 0 0 0 18 15.973v-4.946A3.036 3.036 0 0 0 14.955 8Z",strokeMiterlimit:"10"}),_react.default.createElement("path",{d:"M9.25 8V4.448c0-.524.42-.948.94-.948h3.62c.52 0 .94.424.94.948V8M8 19v1.016c0 .543.408.984.911.984h6.178c.503 0 .911-.44.911-.984V19M6 12h12",strokeMiterlimit:"10"}))};EnergyIconBottledGas.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconBottledGasPlus=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M6.786 9.357V6.313c0-.45.36-.813.806-.813h3.102a.81.81 0 0 1 .806.813v3.044m-5.786 9.429v.87c0 .466.35.844.781.844h5.295c.431 0 .781-.377.781-.843v-.871m-8.571-6h10.286m-2.61-3.429H6.61A2.603 2.603 0 0 0 4 11.952v4.239a2.603 2.603 0 0 0 2.61 2.595h5.066a2.603 2.603 0 0 0 2.61-2.595v-4.239a2.603 2.603 0 0 0-2.61-2.595Z",strokeWidth:"1.5",strokeMiterlimit:"10"}),_react.default.createElement("path",{d:"M15 6h6m-3-3v6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};EnergyIconBottledGasPlus.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconCar=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M0 0h24v24H0z",stroke:"none"}),_react.default.createElement("path",{d:"M5 17H3v-6l2-5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0H9m-6-6h15m-6 0V6"}),_react.default.createElement("path",{d:"M5 17a2 2 0 1 0 4 0 2 2 0 1 0-4 0M15 17a2 2 0 1 0 4 0 2 2 0 1 0-4 0"}))};EnergyIconCar.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"icon icon-tabler icons-tabler-outline icon-tabler-car"};var EnergyIconCarbonFootprint=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M21.72 15.19c-.8 3.17-5.19 5.09-8.65 4.87-.66-.67-2.9-3.34-2.06-6.78.98-4.02 7-5.57 9.92-7.42.62-.39 1.8 5.35.79 9.33Z"}),_react.default.createElement("path",{d:"M18.52 11.16c-3.57 1.15-5.98 5.03-5.45 8.9M8.41 19.32c-2.05-.82-3.78-2.26-4.25-4.13-1.01-3.98.17-9.72.79-9.33M4.95 5.86c1.34.85 3.32 1.63 5.18 2.62"}))};EnergyIconCarbonFootprint.defaultProps={width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",strokeWidth:"2"};var EnergyIconCart=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M4 19a2 2 0 1 0 4 0 2 2 0 0 0-4 0ZM15 19a2 2 0 1 0 4 0 2 2 0 0 0-4 0ZM6 5l14 1-1 7H6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),_react.default.createElement("path",{d:"M4 3h2v14h11",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};EnergyIconCart.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconChatSparkFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.833 5c-.487 0-.954.193-1.297.535A1.819 1.819 0 0 0 4 6.824v7.529c0 .482.192.946.536 1.288.343.342.81.536 1.297.536h2.834a1 1 0 0 1 .706.291l2.833 2.824a1 1 0 1 1-1.412 1.416l-2.54-2.531h-2.42a3.838 3.838 0 0 1-2.71-1.12A3.819 3.819 0 0 1 2 14.354v-7.53c0-1.015.405-1.988 1.124-2.704A3.838 3.838 0 0 1 5.834 3h11.333c1.015 0 1.99.402 2.709 1.119A3.818 3.818 0 0 1 21 6.824v4.235a1 1 0 1 1-2 0V6.824c0-.483-.192-.946-.536-1.289A1.839 1.839 0 0 0 17.167 5H5.833Zm.89 3.706a1 1 0 0 1 1-1h7.555a1 1 0 1 1 0 2H7.722a1 1 0 0 1-1-1Zm0 3.765a1 1 0 0 1 1-1h4.721a1 1 0 1 1 0 2H7.722a1 1 0 0 1-1-1Zm10.62 1.196a1 1 0 0 1 .973.765c.113.469.352.897.691 1.237.339.34.764.58 1.229.693a1 1 0 0 1 0 1.943c-.465.113-.89.352-1.229.693-.339.34-.578.768-.691 1.236a1 1 0 0 1-1.944 0 2.622 2.622 0 0 0-.691-1.236 2.602 2.602 0 0 0-1.23-.693 1 1 0 0 1 0-1.943c.465-.113.89-.353 1.23-.693.338-.34.578-.768.69-1.237a1 1 0 0 1 .973-.765Zm0 3.146a4.608 4.608 0 0 1-.519.52 4.586 4.586 0 0 1 .52.52 4.603 4.603 0 0 1 .52-.52 4.553 4.553 0 0 1-.52-.52Z"}))};EnergyIconChatSparkFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumption=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.645.828a.75.75 0 0 0-.72.54l-7.848 26.906a.75.75 0 0 0 .72.96h10.361L19.021 46.33a.75.75 0 0 0 1.369.509l17.937-26.906a.75.75 0 0 0-.624-1.166H27.574L33.922 1.84a.75.75 0 0 0-.702-1.013H18.645Z"}))};EnergyIconConsumption.defaultProps={width:"49",height:"48",viewBox:"0 0 49 48",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumptionBoxFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 20.833A4.167 4.167 0 0 0 20.833 25v50A4.167 4.167 0 0 0 25 79.167h50A4.167 4.167 0 0 0 79.167 75V25A4.167 4.167 0 0 0 75 20.833H25ZM12.5 25c0-6.904 5.596-12.5 12.5-12.5h50c6.904 0 12.5 5.596 12.5 12.5v50c0 6.904-5.596 12.5-12.5 12.5H25c-6.904 0-12.5-5.596-12.5-12.5V25Z"}),_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.183 33.458c1.635.455 2.554 2.03 2.053 3.516l-3.286 9.747h6.287c1.017 0 1.97.454 2.548 1.215a2.6 2.6 0 0 1 .348 2.597L52.17 64.848c-.606 1.454-2.393 2.186-3.992 1.636-1.6-.551-2.405-2.176-1.8-3.63l4.375-10.503h-5.991c-.982 0-1.906-.424-2.49-1.142-.584-.717-.758-1.645-.47-2.498l4.512-13.387c.501-1.486 2.233-2.322 3.868-1.866Z"}))};EnergyIconConsumptionBoxFilled.defaultProps={width:"100",height:"100",viewBox:"0 0 100 100",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumptionBoxPlusFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.207 20a1 1 0 0 1-1 1H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5.986a1 1 0 0 1-2 0V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h6.207a1 1 0 0 1 1 1Z"}),_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.549 7.702a.78.78 0 0 1 .349 1.047l-.836 1.67h.838a.78.78 0 0 1 .698 1.13l-1.4 2.8a.78.78 0 0 1-1.396-.698l.836-1.671H10.8a.78.78 0 0 1-.698-1.13l1.4-2.8a.78.78 0 0 1 1.047-.348Z"}),_react.default.createElement("path",{d:"M17.098 13.5c.483 0 .875.392.875.875v1.75h1.75a.875.875 0 1 1 0 1.75h-1.75v1.75a.875.875 0 0 1-1.75 0v-1.75h-1.75a.875.875 0 1 1 0-1.75h1.75v-1.75c0-.483.391-.875.875-.875Z"}))};EnergyIconConsumptionBoxPlusFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumptionBoxRightFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.207 20a1 1 0 0 1-1 1H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5.986a1 1 0 0 1-2 0V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h6.207a1 1 0 0 1 1 1Z"}),_react.default.createElement("path",{d:"M17.9 14.2a.78.78 0 1 0-1 1.2l.745.62H15a.78.78 0 1 0 0 1.56h2.647l-.746.62a.78.78 0 1 0 .998 1.2l2.4-2a.78.78 0 0 0 0-1.2l-2.4-2Z"}),_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.549 7.702a.78.78 0 0 1 .349 1.047l-.836 1.67h.838a.78.78 0 0 1 .698 1.13l-1.4 2.8a.78.78 0 0 1-1.396-.698l.836-1.671H10.8a.78.78 0 0 1-.698-1.13l1.4-2.8a.78.78 0 0 1 1.047-.348Z"}))};EnergyIconConsumptionBoxRightFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumptionBoxMinusFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.207 20a1 1 0 0 1-1 1H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5.986a1 1 0 0 1-2 0V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h6.207a1 1 0 0 1 1 1Z"}),_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.549 7.702a.78.78 0 0 1 .349 1.047l-.836 1.67h.838a.78.78 0 0 1 .698 1.13l-1.4 2.8a.78.78 0 0 1-1.396-.698l.836-1.671H10.8a.78.78 0 0 1-.698-1.13l1.4-2.8a.78.78 0 0 1 1.047-.348Z"}),_react.default.createElement("path",{d:"M15.086 14.697a1 1 0 0 1 1.414 0l1.293 1.293 1.293-1.293a1 1 0 0 1 1.414 1.415l-1.293 1.293 1.293 1.292a1 1 0 0 1-1.414 1.415l-1.293-1.293-1.293 1.293a1 1 0 0 1-1.414-1.415l1.293-1.293-1.293-1.292a1 1 0 0 1 0-1.415Z"}))};EnergyIconConsumptionBoxMinusFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconEdit=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m16.019 10.679-2.695-2.695 1.948-1.95 2.694 2.695-1.947 1.95Zm-6.94 6.946-2.976.27.264-2.955 5.617-5.617 2.696 2.696-5.6 5.606ZM19.405 7.338l-.001-.001-2.738-2.738c-.741-.74-2.014-.774-2.716-.07l-8.996 8.997a1.973 1.973 0 0 0-.57 1.214l-.38 4.17a1.002 1.002 0 0 0 1.088 1.086l4.17-.38a1.974 1.974 0 0 0 1.214-.567l8.997-8.997c.728-.73.697-1.948-.068-2.714Z"}))};EnergyIconEdit.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconHome=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),_react.default.createElement("path",{d:"M12 17.99v-3 3Z"}),_react.default.createElement("path",{d:"M12 17.99v-3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};EnergyIconHome.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconMessageEdit=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M8 9h8M8 13h6M13 20l-1 1-3-3H6a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5.5M18.93 15.522a1.797 1.797 0 0 1 2.933.583 1.8 1.8 0 0 1-.39 1.96l-2.903 2.93H16v-2.57l2.93-2.903Z"}))};EnergyIconMessageEdit.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconQuestionFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M10 2.287a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-10 8c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10-10-4.477-10-10Zm8.475-5.655a3.6 3.6 0 1 1 2.857 6.598.5.5 0 0 0-.334.5 1 1 0 0 1-1.996.114 2.5 2.5 0 0 1 1.65-2.495 1.6 1.6 0 1 0-1.855-2.458 1 1 0 0 1-1.594-1.208 3.6 3.6 0 0 1 1.272-1.051ZM10 14.287a1 1 0 0 1 1 1v.01a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1Z"}))};EnergyIconQuestionFilled.defaultProps={width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconSendFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M20.816 10.742 3.93 2.504a1.086 1.086 0 0 0-.524-.106 1.11 1.11 0 0 0-.508.16c-.152.098-.277.231-.367.387-.086.16-.133.336-.133.52v.027c0 .145.02.285.055.426l1.617 6.48c.024.086.07.165.137.223.07.055.152.094.242.102l7.117.793c.118.015.227.07.309.16a.49.49 0 0 1-.309.808l-7.117.793a.438.438 0 0 0-.379.325l-1.617 6.48a1.712 1.712 0 0 0-.055.422v.031c0 .18.047.36.137.516.086.16.211.293.363.387.157.097.329.152.508.16.184.011.364-.028.524-.106l16.886-8.238c.235-.113.434-.293.57-.516a1.378 1.378 0 0 0 0-1.48 1.426 1.426 0 0 0-.57-.516Zm0 0",fill:"currentColor"}))};EnergyIconSendFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconTruck=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M8 45.333v-32h26.667V16H48l8 13.333v16h-4c-2.134 4.236-3.616 5.301-6.667 5.334-3.599-.425-4.786-1.6-5.333-5.334H24c-.368 3.882-1.607 4.975-5.333 5.334-3.698-.845-5.033-1.904-5.334-5.334H8Z",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),_react.default.createElement("path",{d:"M13.333 45.333a5.333 5.333 0 1 0 10.667 0 5.333 5.333 0 0 0-10.667 0ZM40 45.333a5.333 5.333 0 1 0 10.667 0 5.333 5.333 0 0 0-10.667 0Z",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),_react.default.createElement("path",{d:"M13.333 45.333H8V34.667M5.333 13.333h29.334v32m-10.667 0h16m10.667 0H56v-16m0 0H34.667m21.333 0L48 16H34.667M8 24h10.667",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}))};EnergyIconTruck.defaultProps={width:"24",height:"24",viewBox:"0 0 64 64",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconFileTextSparkFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.923 2.953a.973.973 0 0 0-.974.977v13.675a.978.978 0 0 0 .974.976h4.872c.538 0 .974.438.974.977 0 .54-.436.977-.974.977H5.923a2.92 2.92 0 0 1-2.067-.858A2.934 2.934 0 0 1 3 17.605V3.93c0-.777.308-1.522.856-2.072A2.92 2.92 0 0 1 5.923 1h6.82c.259 0 .507.103.69.286l4.871 4.884a.978.978 0 0 1 .286.69v3.42a.976.976 0 1 1-1.949 0V7.836h-2.923a1.946 1.946 0 0 1-1.378-.572 1.956 1.956 0 0 1-.57-1.381v-2.93H5.922Zm7.795 1.382 1.545 1.549h-1.545v-1.55Zm-6.82 3.502c0-.54.436-.977.974-.977h.974c.538 0 .975.438.975.977 0 .54-.437.977-.975.977h-.974a.976.976 0 0 1-.975-.977Zm0 3.907c0-.54.436-.977.974-.977h5.846c.538 0 .974.438.974.977 0 .54-.436.977-.974.977H7.872a.976.976 0 0 1-.975-.977Zm10.717 1.465c.45 0 .842.31.947.747a3.666 3.666 0 0 0 2.693 2.7.976.976 0 0 1 0 1.898 3.652 3.652 0 0 0-2.693 2.699.975.975 0 0 1-1.894 0 3.665 3.665 0 0 0-2.692-2.699.976.976 0 0 1 0-1.899 3.652 3.652 0 0 0 2.692-2.699.975.975 0 0 1 .947-.747Zm0 3.234a5.602 5.602 0 0 1-1.159 1.162 5.596 5.596 0 0 1 1.16 1.161 5.612 5.612 0 0 1 1.158-1.161 5.617 5.617 0 0 1-1.159-1.162ZM6.897 15.65c0-.54.437-.977.975-.977h2.923c.538 0 .974.438.974.977 0 .54-.436.977-.974.977H7.872a.976.976 0 0 1-.975-.977Z"}))};EnergyIconFileTextSparkFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconFlameFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),_react.default.createElement("path",{d:"M10 2c0-.88 1.056-1.331 1.692-.722 1.958 1.876 3.096 5.995 1.75 9.12l-.08.174.012.003c.625.133 1.203-.43 2.303-2.173l.14-.224a1 1 0 0 1 1.582-.153C18.733 9.46 20 12.402 20 14.295 20 18.56 16.409 22 12 22s-8-3.44-8-7.706c0-2.252 1.022-4.716 2.632-6.301l.605-.589c.241-.236.434-.43.618-.624C9.285 5.268 10 3.856 10 2"}))};EnergyIconFlameFilled.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",className:"icon icon-tabler icons-tabler-filled icon-tabler-flame"};var EnergyIconBoltFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),_react.default.createElement("path",{d:"m13 2 .018.001.016.001.083.005.011.002h.011l.038.009.052.008.016.006.011.001.029.011.052.014.019.009.015.004.028.014.04.017.021.012.022.01.023.015.031.017.034.024.018.011.013.012.024.017.038.034.022.017.008.01.014.012.036.041.026.027.006.009c.12.147.196.322.218.513l.001.012.002.041L14 3v6h5a1 1 0 0 1 .868 1.497l-.06.091-8 11C11.24 22.371 10 21.968 10 21v-6H5a1 1 0 0 1-.868-1.497l.06-.091 8-11 .01-.013.018-.024.033-.038.018-.022.009-.008.013-.014.04-.036.028-.026.008-.006a1 1 0 0 1 .402-.199l.011-.001.027-.005.074-.013.011-.001.041-.002z"}))};EnergyIconBoltFilled.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",className:"icon icon-tabler icons-tabler-filled icon-tabler-bolt"};var EnergyIconPresentationFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),_react.default.createElement("path",{d:"M21 3a1 1 0 0 1 0 2v9a3 3 0 0 1-3 3h-5v2h2a1 1 0 0 1 0 2H9a1 1 0 0 1 0-2h2v-2H6a3 3 0 0 1-3-3V5a1 1 0 1 1 0-2zm-4.293 4.293a1 1 0 0 0-1.414 0L13 9.585l-1.293-1.292a1 1 0 0 0-1.414 0l-3 3a1 1 0 0 0 0 1.414l.094.083a1 1 0 0 0 1.32-.083L11 10.415l1.293 1.292a1 1 0 0 0 1.414 0l3-3a1 1 0 0 0 0-1.414"}))};EnergyIconPresentationFilled.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",className:"icon icon-tabler icons-tabler-filled icon-tabler-presentation"};var EnergyIconCreditCardsFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m13.172 4.39.823 1.427.017.03h2.76a2.395 2.395 0 0 1 2.395 2.395v5.113a2.395 2.395 0 0 1-2.395 2.395H8.341l-1.242.717c-1.194.69-2.766.365-3.473-.86l-2.47-4.279c-.708-1.224-.202-2.748.991-3.437L9.7 3.531c1.194-.689 2.766-.365 3.473.86Zm-1.444.834.36.623H9.021l.534-.308.978-.565a.916.916 0 0 1 .901-.032.75.75 0 0 1 .294.282Zm-8.747 4.11L6.07 7.55c-.065.22-.1.452-.1.692v5.113c0 .578.204 1.11.546 1.523l-.252.146c-.475.274-.993.101-1.195-.25l-2.471-4.28c-.203-.35-.093-.885.382-1.16Zm5.384-1.82a.728.728 0 0 0-.728.728v.385H17.5v-.385a.728.728 0 0 0-.728-.728H8.365Zm9.135 2.78H7.637v3.06c0 .403.326.729.728.729h8.407a.728.728 0 0 0 .728-.728v-3.061Z"}))};EnergyIconCreditCardsFilled.defaultProps={width:"20",height:"20",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};const FILLED_ICON_COLOR=exports.FILLED_ICON_COLOR="transparent",DEFAULT_INTERNAL_SHADE=exports.DEFAULT_INTERNAL_SHADE=_Palette.COLOR_SHADES.shade02,DEFAULT_COLOR_THEME=exports.DEFAULT_COLOR_THEME=_Palette.COLOR_THEMES.dark,DEFAULT_VARIANT=exports.DEFAULT_VARIANT="default",FILLED_ICON_SUFIX=exports.FILLED_ICON_SUFIX="Filled",ENERGY_ICON_PREFIX=exports.ENERGY_ICON_PREFIX="Energy",DEFAULT_ICON_SIZE=exports.DEFAULT_ICON_SIZE=24,AREA_BORDER_WIDTH=exports.AREA_BORDER_WIDTH="1px",ENERGY_ICONS=exports.ENERGY_ICONS={EnergyIconBottledGas:EnergyIconBottledGas,EnergyIconBottledGasPlus:EnergyIconBottledGasPlus,EnergyIconCar:EnergyIconCar,EnergyIconCarbonFootprint:EnergyIconCarbonFootprint,EnergyIconCart:EnergyIconCart,EnergyIconChatSparkFilled:EnergyIconChatSparkFilled,EnergyIconConsumption:EnergyIconConsumption,EnergyIconConsumptionBoxFilled:EnergyIconConsumptionBoxFilled,EnergyIconEdit:EnergyIconEdit,EnergyIconFileTextSparkFilled:EnergyIconFileTextSparkFilled,EnergyIconHome:EnergyIconHome,EnergyIconMessageEdit:EnergyIconMessageEdit,EnergyIconQuestionFilled:EnergyIconQuestionFilled,EnergyIconSendFilled:EnergyIconSendFilled,EnergyIconTruck:EnergyIconTruck,EnergyIconConsumptionBoxPlusFilled:EnergyIconConsumptionBoxPlusFilled,EnergyIconConsumptionBoxRightFilled:EnergyIconConsumptionBoxRightFilled,EnergyIconConsumptionBoxMinusFilled:EnergyIconConsumptionBoxMinusFilled,EnergyIconFlameFilled:EnergyIconFlameFilled,EnergyIconBoltFilled:EnergyIconBoltFilled,EnergyIconPresentationFilled:EnergyIconPresentationFilled,EnergyIconCreditCardsFilled:EnergyIconCreditCardsFilled};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FILLED_ICON_SUFIX=exports.FILLED_ICON_COLOR=exports.ENERGY_ICON_PREFIX=exports.ENERGY_ICONS=exports.DEFAULT_VARIANT=exports.DEFAULT_INTERNAL_SHADE=exports.DEFAULT_ICON_SIZE=exports.DEFAULT_COLOR_THEME=exports.CURRENT_COLOR=exports.AREA_BORDER_WIDTH=void 0;var _react=_interopRequireDefault(require("react")),_Palette=require("../../constants/Palette");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var EnergyIconBottledGas=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M14.955 8h-5.91A3.036 3.036 0 0 0 6 11.027v4.946A3.036 3.036 0 0 0 9.045 19h5.91A3.036 3.036 0 0 0 18 15.973v-4.946A3.036 3.036 0 0 0 14.955 8Z",strokeMiterlimit:"10"}),_react.default.createElement("path",{d:"M9.25 8V4.448c0-.524.42-.948.94-.948h3.62c.52 0 .94.424.94.948V8M8 19v1.016c0 .543.408.984.911.984h6.178c.503 0 .911-.44.911-.984V19M6 12h12",strokeMiterlimit:"10"}))};EnergyIconBottledGas.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconBottledGasPlus=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M6.786 9.357V6.313c0-.45.36-.813.806-.813h3.102a.81.81 0 0 1 .806.813v3.044m-5.786 9.429v.87c0 .466.35.844.781.844h5.295c.431 0 .781-.377.781-.843v-.871m-8.571-6h10.286m-2.61-3.429H6.61A2.603 2.603 0 0 0 4 11.952v4.239a2.603 2.603 0 0 0 2.61 2.595h5.066a2.603 2.603 0 0 0 2.61-2.595v-4.239a2.603 2.603 0 0 0-2.61-2.595Z",strokeWidth:"1.5",strokeMiterlimit:"10"}),_react.default.createElement("path",{d:"M15 6h6m-3-3v6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};EnergyIconBottledGasPlus.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconCar=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M0 0h24v24H0z",stroke:"none"}),_react.default.createElement("path",{d:"M5 17H3v-6l2-5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0H9m-6-6h15m-6 0V6"}),_react.default.createElement("path",{d:"M5 17a2 2 0 1 0 4 0 2 2 0 1 0-4 0M15 17a2 2 0 1 0 4 0 2 2 0 1 0-4 0"}))};EnergyIconCar.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:"icon icon-tabler icons-tabler-outline icon-tabler-car"};var EnergyIconCarbonFootprint=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M21.72 15.19c-.8 3.17-5.19 5.09-8.65 4.87-.66-.67-2.9-3.34-2.06-6.78.98-4.02 7-5.57 9.92-7.42.62-.39 1.8 5.35.79 9.33Z"}),_react.default.createElement("path",{d:"M18.52 11.16c-3.57 1.15-5.98 5.03-5.45 8.9M8.41 19.32c-2.05-.82-3.78-2.26-4.25-4.13-1.01-3.98.17-9.72.79-9.33M4.95 5.86c1.34.85 3.32 1.63 5.18 2.62"}))};EnergyIconCarbonFootprint.defaultProps={width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg",strokeWidth:"2"};var EnergyIconCart=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M4 19a2 2 0 1 0 4 0 2 2 0 0 0-4 0ZM15 19a2 2 0 1 0 4 0 2 2 0 0 0-4 0ZM6 5l14 1-1 7H6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),_react.default.createElement("path",{d:"M4 3h2v14h11",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};EnergyIconCart.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconChatSparkFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.833 5c-.487 0-.954.193-1.297.535A1.819 1.819 0 0 0 4 6.824v7.529c0 .482.192.946.536 1.288.343.342.81.536 1.297.536h2.834a1 1 0 0 1 .706.291l2.833 2.824a1 1 0 1 1-1.412 1.416l-2.54-2.531h-2.42a3.838 3.838 0 0 1-2.71-1.12A3.819 3.819 0 0 1 2 14.354v-7.53c0-1.015.405-1.988 1.124-2.704A3.838 3.838 0 0 1 5.834 3h11.333c1.015 0 1.99.402 2.709 1.119A3.818 3.818 0 0 1 21 6.824v4.235a1 1 0 1 1-2 0V6.824c0-.483-.192-.946-.536-1.289A1.839 1.839 0 0 0 17.167 5H5.833Zm.89 3.706a1 1 0 0 1 1-1h7.555a1 1 0 1 1 0 2H7.722a1 1 0 0 1-1-1Zm0 3.765a1 1 0 0 1 1-1h4.721a1 1 0 1 1 0 2H7.722a1 1 0 0 1-1-1Zm10.62 1.196a1 1 0 0 1 .973.765c.113.469.352.897.691 1.237.339.34.764.58 1.229.693a1 1 0 0 1 0 1.943c-.465.113-.89.352-1.229.693-.339.34-.578.768-.691 1.236a1 1 0 0 1-1.944 0 2.622 2.622 0 0 0-.691-1.236 2.602 2.602 0 0 0-1.23-.693 1 1 0 0 1 0-1.943c.465-.113.89-.353 1.23-.693.338-.34.578-.768.69-1.237a1 1 0 0 1 .973-.765Zm0 3.146a4.608 4.608 0 0 1-.519.52 4.586 4.586 0 0 1 .52.52 4.603 4.603 0 0 1 .52-.52 4.553 4.553 0 0 1-.52-.52Z"}))};EnergyIconChatSparkFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumption=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.645.828a.75.75 0 0 0-.72.54l-7.848 26.906a.75.75 0 0 0 .72.96h10.361L19.021 46.33a.75.75 0 0 0 1.369.509l17.937-26.906a.75.75 0 0 0-.624-1.166H27.574L33.922 1.84a.75.75 0 0 0-.702-1.013H18.645Z"}))};EnergyIconConsumption.defaultProps={width:"49",height:"48",viewBox:"0 0 49 48",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumptionBoxFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M25 20.833A4.167 4.167 0 0 0 20.833 25v50A4.167 4.167 0 0 0 25 79.167h50A4.167 4.167 0 0 0 79.167 75V25A4.167 4.167 0 0 0 75 20.833H25ZM12.5 25c0-6.904 5.596-12.5 12.5-12.5h50c6.904 0 12.5 5.596 12.5 12.5v50c0 6.904-5.596 12.5-12.5 12.5H25c-6.904 0-12.5-5.596-12.5-12.5V25Z"}),_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M50.183 33.458c1.635.455 2.554 2.03 2.053 3.516l-3.286 9.747h6.287c1.017 0 1.97.454 2.548 1.215a2.6 2.6 0 0 1 .348 2.597L52.17 64.848c-.606 1.454-2.393 2.186-3.992 1.636-1.6-.551-2.405-2.176-1.8-3.63l4.375-10.503h-5.991c-.982 0-1.906-.424-2.49-1.142-.584-.717-.758-1.645-.47-2.498l4.512-13.387c.501-1.486 2.233-2.322 3.868-1.866Z"}))};EnergyIconConsumptionBoxFilled.defaultProps={width:"100",height:"100",viewBox:"0 0 100 100",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumptionBoxPlusFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.207 20a1 1 0 0 1-1 1H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5.986a1 1 0 0 1-2 0V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h6.207a1 1 0 0 1 1 1Z"}),_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.549 7.702a.78.78 0 0 1 .349 1.047l-.836 1.67h.838a.78.78 0 0 1 .698 1.13l-1.4 2.8a.78.78 0 0 1-1.396-.698l.836-1.671H10.8a.78.78 0 0 1-.698-1.13l1.4-2.8a.78.78 0 0 1 1.047-.348Z"}),_react.default.createElement("path",{d:"M17.098 13.5c.483 0 .875.392.875.875v1.75h1.75a.875.875 0 1 1 0 1.75h-1.75v1.75a.875.875 0 0 1-1.75 0v-1.75h-1.75a.875.875 0 1 1 0-1.75h1.75v-1.75c0-.483.391-.875.875-.875Z"}))};EnergyIconConsumptionBoxPlusFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumptionBoxRightFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.207 20a1 1 0 0 1-1 1H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5.986a1 1 0 0 1-2 0V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h6.207a1 1 0 0 1 1 1Z"}),_react.default.createElement("path",{d:"M17.9 14.2a.78.78 0 1 0-1 1.2l.745.62H15a.78.78 0 1 0 0 1.56h2.647l-.746.62a.78.78 0 1 0 .998 1.2l2.4-2a.78.78 0 0 0 0-1.2l-2.4-2Z"}),_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.549 7.702a.78.78 0 0 1 .349 1.047l-.836 1.67h.838a.78.78 0 0 1 .698 1.13l-1.4 2.8a.78.78 0 0 1-1.396-.698l.836-1.671H10.8a.78.78 0 0 1-.698-1.13l1.4-2.8a.78.78 0 0 1 1.047-.348Z"}))};EnergyIconConsumptionBoxRightFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconConsumptionBoxMinusFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.207 20a1 1 0 0 1-1 1H6a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5.986a1 1 0 0 1-2 0V6a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h6.207a1 1 0 0 1 1 1Z"}),_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.549 7.702a.78.78 0 0 1 .349 1.047l-.836 1.67h.838a.78.78 0 0 1 .698 1.13l-1.4 2.8a.78.78 0 0 1-1.396-.698l.836-1.671H10.8a.78.78 0 0 1-.698-1.13l1.4-2.8a.78.78 0 0 1 1.047-.348Z"}),_react.default.createElement("path",{d:"M15.086 14.697a1 1 0 0 1 1.414 0l1.293 1.293 1.293-1.293a1 1 0 0 1 1.414 1.415l-1.293 1.293 1.293 1.292a1 1 0 0 1-1.414 1.415l-1.293-1.293-1.293 1.293a1 1 0 0 1-1.414-1.415l1.293-1.293-1.293-1.292a1 1 0 0 1 0-1.415Z"}))};EnergyIconConsumptionBoxMinusFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconEdit=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m16.019 10.679-2.695-2.695 1.948-1.95 2.694 2.695-1.947 1.95Zm-6.94 6.946-2.976.27.264-2.955 5.617-5.617 2.696 2.696-5.6 5.606ZM19.405 7.338l-.001-.001-2.738-2.738c-.741-.74-2.014-.774-2.716-.07l-8.996 8.997a1.973 1.973 0 0 0-.57 1.214l-.38 4.17a1.002 1.002 0 0 0 1.088 1.086l4.17-.38a1.974 1.974 0 0 0 1.214-.567l8.997-8.997c.728-.73.697-1.948-.068-2.714Z"}))};EnergyIconEdit.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconHome=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"m9.02 2.84-5.39 4.2C2.73 7.74 2 9.23 2 10.36v7.41c0 2.32 1.89 4.22 4.21 4.22h11.58c2.32 0 4.21-1.9 4.21-4.21V10.5c0-1.21-.81-2.76-1.8-3.45l-6.18-4.33c-1.4-.98-3.65-.93-5 .12Z",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),_react.default.createElement("path",{d:"M12 17.99v-3 3Z"}),_react.default.createElement("path",{d:"M12 17.99v-3",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};EnergyIconHome.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconMessageEdit=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M8 9h8M8 13h6M13 20l-1 1-3-3H6a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h12a3 3 0 0 1 3 3v5.5M18.93 15.522a1.797 1.797 0 0 1 2.933.583 1.8 1.8 0 0 1-.39 1.96l-2.903 2.93H16v-2.57l2.93-2.903Z"}))};EnergyIconMessageEdit.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconQuestionFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M10 2.287a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-10 8c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10-10-4.477-10-10Zm8.475-5.655a3.6 3.6 0 1 1 2.857 6.598.5.5 0 0 0-.334.5 1 1 0 0 1-1.996.114 2.5 2.5 0 0 1 1.65-2.495 1.6 1.6 0 1 0-1.855-2.458 1 1 0 0 1-1.594-1.208 3.6 3.6 0 0 1 1.272-1.051ZM10 14.287a1 1 0 0 1 1 1v.01a1 1 0 1 1-2 0v-.01a1 1 0 0 1 1-1Z"}))};EnergyIconQuestionFilled.defaultProps={width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconSendFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M20.816 10.742 3.93 2.504a1.086 1.086 0 0 0-.524-.106 1.11 1.11 0 0 0-.508.16c-.152.098-.277.231-.367.387-.086.16-.133.336-.133.52v.027c0 .145.02.285.055.426l1.617 6.48c.024.086.07.165.137.223.07.055.152.094.242.102l7.117.793c.118.015.227.07.309.16a.49.49 0 0 1-.309.808l-7.117.793a.438.438 0 0 0-.379.325l-1.617 6.48a1.712 1.712 0 0 0-.055.422v.031c0 .18.047.36.137.516.086.16.211.293.363.387.157.097.329.152.508.16.184.011.364-.028.524-.106l16.886-8.238c.235-.113.434-.293.57-.516a1.378 1.378 0 0 0 0-1.48 1.426 1.426 0 0 0-.57-.516Zm0 0",fill:"currentColor"}))};EnergyIconSendFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconTruck=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M8 45.333v-32h26.667V16H48l8 13.333v16h-4c-2.134 4.236-3.616 5.301-6.667 5.334-3.599-.425-4.786-1.6-5.333-5.334H24c-.368 3.882-1.607 4.975-5.333 5.334-3.698-.845-5.033-1.904-5.334-5.334H8Z",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),_react.default.createElement("path",{d:"M13.333 45.333a5.333 5.333 0 1 0 10.667 0 5.333 5.333 0 0 0-10.667 0ZM40 45.333a5.333 5.333 0 1 0 10.667 0 5.333 5.333 0 0 0-10.667 0Z",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}),_react.default.createElement("path",{d:"M13.333 45.333H8V34.667M5.333 13.333h29.334v32m-10.667 0h16m10.667 0H56v-16m0 0H34.667m21.333 0L48 16H34.667M8 24h10.667",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"}))};EnergyIconTruck.defaultProps={width:"24",height:"24",viewBox:"0 0 64 64",fill:"none",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconFileTextSparkFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.923 2.953a.973.973 0 0 0-.974.977v13.675a.978.978 0 0 0 .974.976h4.872c.538 0 .974.438.974.977 0 .54-.436.977-.974.977H5.923a2.92 2.92 0 0 1-2.067-.858A2.934 2.934 0 0 1 3 17.605V3.93c0-.777.308-1.522.856-2.072A2.92 2.92 0 0 1 5.923 1h6.82c.259 0 .507.103.69.286l4.871 4.884a.978.978 0 0 1 .286.69v3.42a.976.976 0 1 1-1.949 0V7.836h-2.923a1.946 1.946 0 0 1-1.378-.572 1.956 1.956 0 0 1-.57-1.381v-2.93H5.922Zm7.795 1.382 1.545 1.549h-1.545v-1.55Zm-6.82 3.502c0-.54.436-.977.974-.977h.974c.538 0 .975.438.975.977 0 .54-.437.977-.975.977h-.974a.976.976 0 0 1-.975-.977Zm0 3.907c0-.54.436-.977.974-.977h5.846c.538 0 .974.438.974.977 0 .54-.436.977-.974.977H7.872a.976.976 0 0 1-.975-.977Zm10.717 1.465c.45 0 .842.31.947.747a3.666 3.666 0 0 0 2.693 2.7.976.976 0 0 1 0 1.898 3.652 3.652 0 0 0-2.693 2.699.975.975 0 0 1-1.894 0 3.665 3.665 0 0 0-2.692-2.699.976.976 0 0 1 0-1.899 3.652 3.652 0 0 0 2.692-2.699.975.975 0 0 1 .947-.747Zm0 3.234a5.602 5.602 0 0 1-1.159 1.162 5.596 5.596 0 0 1 1.16 1.161 5.612 5.612 0 0 1 1.158-1.161 5.617 5.617 0 0 1-1.159-1.162ZM6.897 15.65c0-.54.437-.977.975-.977h2.923c.538 0 .974.438.974.977 0 .54-.436.977-.974.977H7.872a.976.976 0 0 1-.975-.977Z"}))};EnergyIconFileTextSparkFilled.defaultProps={width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};var EnergyIconFlameFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),_react.default.createElement("path",{d:"M10 2c0-.88 1.056-1.331 1.692-.722 1.958 1.876 3.096 5.995 1.75 9.12l-.08.174.012.003c.625.133 1.203-.43 2.303-2.173l.14-.224a1 1 0 0 1 1.582-.153C18.733 9.46 20 12.402 20 14.295 20 18.56 16.409 22 12 22s-8-3.44-8-7.706c0-2.252 1.022-4.716 2.632-6.301l.605-.589c.241-.236.434-.43.618-.624C9.285 5.268 10 3.856 10 2"}))};EnergyIconFlameFilled.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",className:"icon icon-tabler icons-tabler-filled icon-tabler-flame"};var EnergyIconBoltFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),_react.default.createElement("path",{d:"m13 2 .018.001.016.001.083.005.011.002h.011l.038.009.052.008.016.006.011.001.029.011.052.014.019.009.015.004.028.014.04.017.021.012.022.01.023.015.031.017.034.024.018.011.013.012.024.017.038.034.022.017.008.01.014.012.036.041.026.027.006.009c.12.147.196.322.218.513l.001.012.002.041L14 3v6h5a1 1 0 0 1 .868 1.497l-.06.091-8 11C11.24 22.371 10 21.968 10 21v-6H5a1 1 0 0 1-.868-1.497l.06-.091 8-11 .01-.013.018-.024.033-.038.018-.022.009-.008.013-.014.04-.036.028-.026.008-.006a1 1 0 0 1 .402-.199l.011-.001.027-.005.074-.013.011-.001.041-.002z"}))};EnergyIconBoltFilled.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",className:"icon icon-tabler icons-tabler-filled icon-tabler-bolt"};var EnergyIconPresentationFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),_react.default.createElement("path",{d:"M21 3a1 1 0 0 1 0 2v9a3 3 0 0 1-3 3h-5v2h2a1 1 0 0 1 0 2H9a1 1 0 0 1 0-2h2v-2H6a3 3 0 0 1-3-3V5a1 1 0 1 1 0-2zm-4.293 4.293a1 1 0 0 0-1.414 0L13 9.585l-1.293-1.292a1 1 0 0 0-1.414 0l-3 3a1 1 0 0 0 0 1.414l.094.083a1 1 0 0 0 1.32-.083L11 10.415l1.293 1.292a1 1 0 0 0 1.414 0l3-3a1 1 0 0 0 0-1.414"}))};EnergyIconPresentationFilled.defaultProps={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"currentColor",className:"icon icon-tabler icons-tabler-filled icon-tabler-presentation"};var EnergyIconCreditCardsFilled=function(e){return _react.default.createElement("svg",e,_react.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m13.172 4.39.823 1.427.017.03h2.76a2.395 2.395 0 0 1 2.395 2.395v5.113a2.395 2.395 0 0 1-2.395 2.395H8.341l-1.242.717c-1.194.69-2.766.365-3.473-.86l-2.47-4.279c-.708-1.224-.202-2.748.991-3.437L9.7 3.531c1.194-.689 2.766-.365 3.473.86Zm-1.444.834.36.623H9.021l.534-.308.978-.565a.916.916 0 0 1 .901-.032.75.75 0 0 1 .294.282Zm-8.747 4.11L6.07 7.55c-.065.22-.1.452-.1.692v5.113c0 .578.204 1.11.546 1.523l-.252.146c-.475.274-.993.101-1.195-.25l-2.471-4.28c-.203-.35-.093-.885.382-1.16Zm5.384-1.82a.728.728 0 0 0-.728.728v.385H17.5v-.385a.728.728 0 0 0-.728-.728H8.365Zm9.135 2.78H7.637v3.06c0 .403.326.729.728.729h8.407a.728.728 0 0 0 .728-.728v-3.061Z"}))};EnergyIconCreditCardsFilled.defaultProps={width:"20",height:"20",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"};const CURRENT_COLOR=exports.CURRENT_COLOR="currentColor",FILLED_ICON_COLOR=exports.FILLED_ICON_COLOR="transparent",DEFAULT_INTERNAL_SHADE=exports.DEFAULT_INTERNAL_SHADE=_Palette.COLOR_SHADES.shade02,DEFAULT_COLOR_THEME=exports.DEFAULT_COLOR_THEME=_Palette.COLOR_THEMES.dark,DEFAULT_VARIANT=exports.DEFAULT_VARIANT="default",FILLED_ICON_SUFIX=exports.FILLED_ICON_SUFIX="Filled",ENERGY_ICON_PREFIX=exports.ENERGY_ICON_PREFIX="Energy",DEFAULT_ICON_SIZE=exports.DEFAULT_ICON_SIZE=24,AREA_BORDER_WIDTH=exports.AREA_BORDER_WIDTH="1px",ENERGY_ICONS=exports.ENERGY_ICONS={EnergyIconBottledGas:EnergyIconBottledGas,EnergyIconBottledGasPlus:EnergyIconBottledGasPlus,EnergyIconCar:EnergyIconCar,EnergyIconCarbonFootprint:EnergyIconCarbonFootprint,EnergyIconCart:EnergyIconCart,EnergyIconChatSparkFilled:EnergyIconChatSparkFilled,EnergyIconConsumption:EnergyIconConsumption,EnergyIconConsumptionBoxFilled:EnergyIconConsumptionBoxFilled,EnergyIconEdit:EnergyIconEdit,EnergyIconFileTextSparkFilled:EnergyIconFileTextSparkFilled,EnergyIconHome:EnergyIconHome,EnergyIconMessageEdit:EnergyIconMessageEdit,EnergyIconQuestionFilled:EnergyIconQuestionFilled,EnergyIconSendFilled:EnergyIconSendFilled,EnergyIconTruck:EnergyIconTruck,EnergyIconConsumptionBoxPlusFilled:EnergyIconConsumptionBoxPlusFilled,EnergyIconConsumptionBoxRightFilled:EnergyIconConsumptionBoxRightFilled,EnergyIconConsumptionBoxMinusFilled:EnergyIconConsumptionBoxMinusFilled,EnergyIconFlameFilled:EnergyIconFlameFilled,EnergyIconBoltFilled:EnergyIconBoltFilled,EnergyIconPresentationFilled:EnergyIconPresentationFilled,EnergyIconCreditCardsFilled:EnergyIconCreditCardsFilled};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_WithTheme=_interopRequireDefault(require("../WithTheme")),_iconTypes=require("../../types/iconTypes"),_theme=require("./theme"),_constants=require("./constants");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,r){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(_interopRequireWildcard=function(e,r){if(!r&&e&&e.__esModule)return e;var n,o,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(n=r?a:t){if(n.has(e))return n.get(e);n.set(e,s)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(o.get||o.set)?n(s,r,o):s[r]=e[r]);return s})(e,r)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},_extends.apply(null,arguments)}const UTIcon=e=>{let{area:r,areaBackground:t,areaBorderColor:a,areaRadius:n,areaSize:o,classes:s,className:i,color:l,colorTheme:c,dataTestId:u,fillShade:d,fillTheme:f,name:_,shade:p,size:h,theme:m,variant:T=_constants.DEFAULT_VARIANT}=e;const y=(0,_theme.getIconProps)({area:r,areaBackground:t,areaBorderColor:a,areaRadius:n,areaSize:o,color:l,colorTheme:c,fillShade:d,fillTheme:f,name:_,shade:p,theme:m,size:h}),v=(0,_theme.getClassNames)({area:r,color:l,colorTheme:c,classes:s,className:i,size:h,variant:T}),g=(0,_theme.getComponent)(_);return g?_react.default.createElement(_react.Suspense,{fallback:null},_react.default.createElement(g,_extends({className:v,"data-testid":u},y))):null};UTIcon.propTypes=_iconTypes.iconPropTypes;var _default=exports.default=(0,_WithTheme.default)(_theme.retrieveStyle)(UTIcon);
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _react=_interopRequireWildcard(require("react")),_WithTheme=_interopRequireDefault(require("../WithTheme")),_iconTypes=require("../../types/iconTypes"),_theme=require("./theme"),_constants=require("./constants");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap,a=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var n,o,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(n=t?a:r){if(n.has(e))return n.get(e);n.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((o=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(o.get||o.set)?n(s,t,o):s[t]=e[t]);return s})(e,t)}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)({}).hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},_extends.apply(null,arguments)}const UTIcon=e=>{let{area:t,areaBackground:r,areaBorderColor:a,areaRadius:n,areaSize:o,classes:s,className:l,color:i,colorTheme:c,dataTestId:u,fillShade:d,fillTheme:f,name:_,shade:p,size:h,theme:m,variant:T=_constants.DEFAULT_VARIANT}=e;const{areaStyle:y,...v}=(0,_theme.getIconProps)({area:t,areaBackground:r,areaBorderColor:a,areaRadius:n,areaSize:o,color:i,colorTheme:c,fillShade:d,fillTheme:f,name:_,shade:p,theme:m,size:h}),{container:g,icon:q}=(0,_theme.getClassNames)({area:t,color:i,colorTheme:c,classes:s,className:l,size:h,variant:T}),W=(0,_theme.getComponent)(_);if(!W)return null;const b=_react.default.createElement(W,_extends({className:q,"data-testid":u},v));return _react.default.createElement(_react.Suspense,{fallback:null},t?_react.default.createElement("div",{className:g,style:y},b):b)};UTIcon.propTypes=_iconTypes.iconPropTypes;var _default=exports.default=(0,_WithTheme.default)(_theme.retrieveStyle)(UTIcon);
@@ -4,6 +4,12 @@ $padding-large: 10px;
4
4
  $padding-xlarge: 12px;
5
5
  $padding-xxlarge: 21px;
6
6
 
7
+ .container {
8
+ display: inline-flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ }
12
+
7
13
  .withArea {
8
14
  border-radius: var(--UT-icon-area-radius, 9999px);
9
15
  box-sizing: content-box;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.retrieveStyle=exports.retrieveColor=exports.getIconProps=exports.getComponent=exports.getClassNames=void 0;var _react=_interopRequireDefault(require("react")),TablerIcons=_interopRequireWildcard(require("@tabler/icons-react")),_componentUtils=require("../../utils/componentUtils"),_countries=_interopRequireDefault(require("../../constants/countries")),_constants=require("./constants"),_stylesModule=_interopRequireDefault(require("./styles.module.scss")),_flagsComponents=_interopRequireDefault(require("./components/FlagsIcons/flagsComponents"));function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var o=new WeakMap,r=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var a,n,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(a=t?r:o){if(a.has(e))return a.get(e);a.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((n=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(n.get||n.set)?a(s,t,n):s[t]=e[t]);return s})(e,t)}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const FLAG_CODES=new Set(_countries.default.map(e=>{let{code:t}=e;return t})),flagComponentCache={},isCSSVar=e=>"string"==typeof e&&e.startsWith("var("),getFlagComponent=e=>{if(!(e in flagComponentCache)){const t=_flagsComponents.default[e];flagComponentCache[e]=t?_react.default.lazy(t):null}return flagComponentCache[e]},retrieveColor=e=>{var t;let{colorTheme:o,shade:r,theme:a}=e;return(a.Palette[o]||(null===(t=a.Palette.actions)||void 0===t?void 0:t[o])||a.Palette[_constants.DEFAULT_COLOR_THEME])[r||(0,_componentUtils.getDefaultColorShade)(o)]};exports.retrieveColor=retrieveColor;const getAreaStyle=e=>{let{area:t,areaBackground:o,areaBorderColor:r,areaRadius:a,areaSize:n,resolvedSize:s}=e;if(!t)return{};const l=s||_constants.DEFAULT_ICON_SIZE;return{...n?{padding:Math.max((n-l)/2,0)}:{},...o&&{backgroundColor:o},...r&&{border:"".concat(_constants.AREA_BORDER_WIDTH," solid ").concat(r)},...void 0!==a&&{borderRadius:a}}},getIconProps=e=>{let{area:t,areaBackground:o,areaBorderColor:r,areaRadius:a,areaSize:n,color:s,colorTheme:l,fillShade:c,fillTheme:i,name:u,shade:d,size:_,style:p,theme:g}=e;const h=retrieveColor({colorTheme:s||l,theme:g,shade:d}),f=u.endsWith(_constants.FILLED_ICON_SUFIX),C=u.startsWith(_constants.ENERGY_ICON_PREFIX),m=FLAG_CODES.has(u),v=f?_constants.FILLED_ICON_COLOR:h,P=i&&retrieveColor({colorTheme:i,theme:g,shade:c||_constants.DEFAULT_INTERNAL_SHADE}),R=isCSSVar(_),E=R?void 0:_,S={stroke:v,...E&&{width:E,height:E}};return{style:{...f?{color:h}:p||{},...R?{width:_,height:_}:{},...getAreaStyle({area:t,areaBackground:o,areaBorderColor:r,areaRadius:a,areaSize:n,resolvedSize:E})},...P&&{fill:P},...C?S:m?{width:E||24,height:E||24}:{color:v,size:E},name:u}};exports.getIconProps=getIconProps;const VARIANT_STYLE_MAPPER=function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},getClassNames=e=>{let{area:t,color:o,colorTheme:r,classes:a,className:n,size:s,variant:l}=e;const c=VARIANT_STYLE_MAPPER(a)["".concat(r||o).concat((0,_componentUtils.capitalize)(l))];return"".concat(n," ").concat(_stylesModule.default.icon," ").concat(t&&"".concat(_stylesModule.default.withArea," ").concat(c," ").concat(_stylesModule.default["size".concat(s)]))};exports.getClassNames=getClassNames;const retrieveStyle=e=>{var t,o,r;let{color:a,colorTheme:n,shade:s,theme:l}=e;const c=retrieveColor({colorTheme:a||n,theme:l,shade:s}),i="".concat(_constants.AREA_BORDER_WIDTH," solid ").concat(c),u={accent:(null===(t=l.Palette.actions)||void 0===t?void 0:t.accent["01"])||l.Palette.accent["01"],dark:l.Palette.light["03"],error:l.Palette.error["01"],gray:l.Palette.light["03"],information:l.Palette.information["01"],light:l.Palette.light["03"],negative:(null===(o=l.Palette.actions)||void 0===o?void 0:o.negative["01"])||l.Palette.negative["01"],neutral:(null===(r=l.Palette.actions)||void 0===r?void 0:r.neutral["01"])||l.Palette.neutral["01"],success:l.Palette.success["01"],warning:l.Palette.warning["01"]};return Object.keys(u).reduce((e,t)=>(e["".concat(t,"Default")]={backgroundColor:u[t]},e["".concat(t,"Outlined")]={border:i},e),{})};exports.retrieveStyle=retrieveStyle;const getComponent=e=>_constants.ENERGY_ICONS[e]?_constants.ENERGY_ICONS[e]:TablerIcons[e]?TablerIcons[e]:FLAG_CODES.has(e)?getFlagComponent(e):null;exports.getComponent=getComponent;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.retrieveStyle=exports.retrieveColor=exports.getIconProps=exports.getComponent=exports.getClassNames=void 0;var _react=_interopRequireDefault(require("react")),TablerIcons=_interopRequireWildcard(require("@tabler/icons-react")),_componentUtils=require("../../utils/componentUtils"),_countries=_interopRequireDefault(require("../../constants/countries")),_constants=require("./constants"),_stylesModule=_interopRequireDefault(require("./styles.module.scss")),_flagsComponents=_interopRequireDefault(require("./components/FlagsIcons/flagsComponents"));function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var o=new WeakMap,r=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var a,n,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(a=t?r:o){if(a.has(e))return a.get(e);a.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((n=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(n.get||n.set)?a(s,t,n):s[t]=e[t]);return s})(e,t)}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const FLAG_CODES=new Set(_countries.default.map(e=>{let{code:t}=e;return t})),flagComponentCache={},isCSSVar=e=>"string"==typeof e&&e.startsWith("var("),getFlagComponent=e=>{if(!(e in flagComponentCache)){const t=_flagsComponents.default[e];flagComponentCache[e]=t?_react.default.lazy(t):null}return flagComponentCache[e]},retrieveColor=e=>{var t;let{colorTheme:o,shade:r,theme:a}=e;if(o===_constants.CURRENT_COLOR)return _constants.CURRENT_COLOR;return(a.Palette[o]||(null===(t=a.Palette.actions)||void 0===t?void 0:t[o])||a.Palette[_constants.DEFAULT_COLOR_THEME])[r||(0,_componentUtils.getDefaultColorShade)(o)]};exports.retrieveColor=retrieveColor;const getAreaStyle=e=>{let{area:t,areaBackground:o,areaBorderColor:r,areaRadius:a,areaSize:n,resolvedSize:s}=e;if(!t)return{};const l=s||_constants.DEFAULT_ICON_SIZE;return{...n?{padding:Math.max((n-l)/2,0)}:{},...o&&{backgroundColor:o},...r&&{border:"".concat(_constants.AREA_BORDER_WIDTH," solid ").concat(r)},...void 0!==a&&{borderRadius:a}}},getIconProps=e=>{let{area:t,areaBackground:o,areaBorderColor:r,areaRadius:a,areaSize:n,color:s,colorTheme:l,fillShade:c,fillTheme:i,name:u,shade:d,size:_,style:p,theme:f}=e;const g=retrieveColor({colorTheme:s||l,theme:f,shade:d}),C=u.endsWith(_constants.FILLED_ICON_SUFIX),h=u.startsWith(_constants.ENERGY_ICON_PREFIX),m=FLAG_CODES.has(u),v=C?_constants.FILLED_ICON_COLOR:g,R=i&&retrieveColor({colorTheme:i,theme:f,shade:c||_constants.DEFAULT_INTERNAL_SHADE}),E=isCSSVar(_),P=E?void 0:_,S={stroke:v,...P&&{width:P,height:P}};return{style:{...C?{color:g}:p||{},...E?{width:_,height:_}:{}},areaStyle:getAreaStyle({area:t,areaBackground:o,areaBorderColor:r,areaRadius:a,areaSize:n,resolvedSize:P}),...R&&{fill:R},...h?S:m?{width:P||24,height:P||24}:{color:v,size:P},name:u}};exports.getIconProps=getIconProps;const VARIANT_STYLE_MAPPER=function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}},getClassNames=e=>{let{area:t,color:o,colorTheme:r,classes:a,className:n,size:s,variant:l}=e;const c=VARIANT_STYLE_MAPPER(a)["".concat(r||o).concat((0,_componentUtils.capitalize)(l))];return{icon:"".concat(n," ").concat(_stylesModule.default.icon),container:t?"".concat(_stylesModule.default.container," ").concat(_stylesModule.default.withArea," ").concat(c," ").concat(_stylesModule.default["size".concat(s)]):_stylesModule.default.container}};exports.getClassNames=getClassNames;const retrieveStyle=e=>{var t,o,r;let{color:a,colorTheme:n,shade:s,theme:l}=e;const c=retrieveColor({colorTheme:a||n,theme:l,shade:s}),i="".concat(_constants.AREA_BORDER_WIDTH," solid ").concat(c),u={accent:(null===(t=l.Palette.actions)||void 0===t?void 0:t.accent["01"])||l.Palette.accent["01"],dark:l.Palette.light["03"],error:l.Palette.error["01"],gray:l.Palette.light["03"],information:l.Palette.information["01"],light:l.Palette.light["03"],negative:(null===(o=l.Palette.actions)||void 0===o?void 0:o.negative["01"])||l.Palette.negative["01"],neutral:(null===(r=l.Palette.actions)||void 0===r?void 0:r.neutral["01"])||l.Palette.neutral["01"],success:l.Palette.success["01"],warning:l.Palette.warning["01"]};return Object.keys(u).reduce((e,t)=>(e["".concat(t,"Default")]={backgroundColor:u[t]},e["".concat(t,"Outlined")]={border:i},e),{})};exports.retrieveStyle=retrieveStyle;const getComponent=e=>_constants.ENERGY_ICONS[e]?_constants.ENERGY_ICONS[e]:TablerIcons[e]?TablerIcons[e]:FLAG_CODES.has(e)?getFlagComponent(e):null;exports.getComponent=getComponent;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=require("prop-types"),_react=_interopRequireDefault(require("react")),_UTButton=_interopRequireDefault(require("../UTButton")),_UTIcon=_interopRequireDefault(require("../UTIcon")),_UTLabel=_interopRequireDefault(require("../UTLabel")),_UTLoading=_interopRequireDefault(require("../UTLoading")),_WithTheme=_interopRequireDefault(require("../WithTheme")),_testIds=require("../../constants/testIds"),_constants=require("./constants"),_theme=require("./theme"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},_extends.apply(null,arguments)}const{statusMessage:statusMessage}=_testIds.TEST_IDS,UTStatusMessage=e=>{let{area:t,children:a,classes:s,colorTheme:r=_constants.COLOR_THEMES.DEFAULT,contentMaxWidth:o=_constants.DEFAULT_CONTENT_MAX_WIDTH,description:n,descriptionProps:l,flag:c,HeaderComponent:p,helpText:i,helpTextProps:d,icon:u="IconInfoCircle",iconProps:_={size:40},loading:T,primaryAction:y,primaryActionProps:f,primaryActionText:m,secondaryAction:g,secondaryActionProps:h,secondaryActionText:M,showHeader:x=!0,title:b,titleProps:E}=e;return _react.default.createElement("div",{className:"".concat(_stylesModule.default.root," ").concat(t?_stylesModule.default.area:""," ").concat(s.root||"")},c&&_react.default.createElement("div",{className:s.flag||"","data-testid":statusMessage.flag}),_react.default.createElement("div",{className:"".concat(_stylesModule.default.container," ").concat(s.container," ").concat(t?_stylesModule.default.areaPadding:"")},T?_react.default.createElement(_UTLoading.default,{loading:!0,text:null}):x?_react.default.createElement("div",{className:s.banner},p?_react.default.createElement(p,null):_react.default.createElement("div",{className:s.iconContainer},_react.default.createElement(_UTIcon.default,_extends({name:u,colorTheme:_constants.ICON_COLOR_THEMES[r],dataTestId:statusMessage.icon},_)))):null,_react.default.createElement("div",{className:"".concat(_stylesModule.default.content," ").concat(s.content),style:{"--statusMessage-content-max-width":"number"==typeof o?"".concat(o,"px"):o}},(b||n||i)&&_react.default.createElement("div",{className:_stylesModule.default.section},b&&_react.default.createElement(_UTLabel.default,_extends({align:"center",dataTestId:statusMessage.title,variant:"title3",weight:"medium"},E),b),n&&_react.default.createElement(_UTLabel.default,_extends({align:"center",colorTheme:"gray",dataTestId:statusMessage.description,variant:"body",withMarkdown:!0},l),n),i&&_react.default.createElement(_UTLabel.default,_extends({align:"center",colorTheme:"gray",dataTestId:statusMessage.helperText,variant:"small"},d),i)),a,(y||g)&&_react.default.createElement("div",{className:_stylesModule.default.section},y&&_react.default.createElement(_UTButton.default,_extends({onClick:y},f),m),g&&_react.default.createElement(_UTButton.default,_extends({onClick:g,variant:"text"},h),M)))))};UTStatusMessage.propTypes={area:_propTypes.bool,children:_propTypes.element,classes:_propTypes.object,colorTheme:_propTypes.string,contentMaxWidth:(0,_propTypes.oneOfType)([_propTypes.number,_propTypes.string]),description:_propTypes.string,descriptionProps:_propTypes.object,flag:_propTypes.bool,flagColor:_propTypes.string,HeaderComponent:_propTypes.element,helpText:_propTypes.string,helpTextProps:_propTypes.object,icon:_propTypes.string,iconBackgroundColor:_propTypes.string,iconProps:_propTypes.object,loading:_propTypes.bool,primaryAction:_propTypes.func,primaryActionProps:_propTypes.object,primaryActionText:_propTypes.string,secondaryAction:_propTypes.func,secondaryActionProps:_propTypes.object,secondaryActionText:_propTypes.string,showBanner:_propTypes.bool,showHeader:_propTypes.bool,title:_propTypes.string,titleProps:_propTypes.object};const UTStatusMessageWithTheme=(0,_WithTheme.default)(_theme.retrieveStyle)(UTStatusMessage);UTStatusMessageWithTheme.displayName="UTStatusMessage";var _default=exports.default=UTStatusMessageWithTheme;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var _propTypes=require("prop-types"),_react=_interopRequireDefault(require("react")),_UTButton=_interopRequireDefault(require("../UTButton")),_UTChip=_interopRequireDefault(require("../UTChip")),_constants=require("../UTChip/constants"),_UTIcon=_interopRequireDefault(require("../UTIcon")),_UTLabel=_interopRequireDefault(require("../UTLabel")),_UTLoading=_interopRequireDefault(require("../UTLoading")),_WithTheme=_interopRequireDefault(require("../WithTheme")),_testIds=require("../../constants/testIds"),_constants2=require("./constants"),_theme=require("./theme"),_stylesModule=_interopRequireDefault(require("./styles.module.scss"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},_extends.apply(null,arguments)}const{statusMessage:statusMessage}=_testIds.TEST_IDS,UTStatusMessage=e=>{let{area:t,children:a,chipProps:s,chipText:r,classes:o,colorTheme:n=_constants2.COLOR_THEMES.DEFAULT,contentMaxWidth:p=_constants2.DEFAULT_CONTENT_MAX_WIDTH,description:l,descriptionProps:c,flag:i,HeaderComponent:d,helpText:u,helpTextProps:_,icon:T="IconInfoCircle",iconProps:y={size:40},loading:f,primaryAction:m,primaryActionProps:g,primaryActionText:h,secondaryAction:M,secondaryActionProps:x,secondaryActionText:U,showHeader:E=!0,title:b,titleProps:q}=e;return _react.default.createElement("div",{className:"".concat(_stylesModule.default.root," ").concat(t?_stylesModule.default.area:""," ").concat(o.root||"")},i&&_react.default.createElement("div",{className:o.flag||"","data-testid":statusMessage.flag}),_react.default.createElement("div",{className:"".concat(_stylesModule.default.container," ").concat(o.container," ").concat(t?_stylesModule.default.areaPadding:"")},f?_react.default.createElement(_UTLoading.default,{loading:!0,text:null}):E?_react.default.createElement("div",{className:o.banner},d?_react.default.createElement(d,null):_react.default.createElement("div",{className:o.iconContainer},_react.default.createElement(_UTIcon.default,_extends({name:T,colorTheme:_constants2.ICON_COLOR_THEMES[n],dataTestId:statusMessage.icon},y)))):null,r&&_react.default.createElement(_UTChip.default,_extends({dataTestId:statusMessage.chip,size:_constants.CHIP_SIZES.MEDIUM},s,{onClose:void 0}),r),_react.default.createElement("div",{className:"".concat(_stylesModule.default.content," ").concat(o.content),style:{"--statusMessage-content-max-width":"number"==typeof p?"".concat(p,"px"):p}},(b||l||u)&&_react.default.createElement("div",{className:_stylesModule.default.section},b&&_react.default.createElement(_UTLabel.default,_extends({align:"center",dataTestId:statusMessage.title,variant:"title3",weight:"medium"},q),b),l&&_react.default.createElement(_UTLabel.default,_extends({align:"center",colorTheme:"gray",dataTestId:statusMessage.description,variant:"body",withMarkdown:!0},c),l),u&&_react.default.createElement(_UTLabel.default,_extends({align:"center",colorTheme:"gray",dataTestId:statusMessage.helperText,variant:"small"},_),u)),a,(m||M)&&_react.default.createElement("div",{className:_stylesModule.default.section},m&&_react.default.createElement(_UTButton.default,_extends({onClick:m},g),h),M&&_react.default.createElement(_UTButton.default,_extends({onClick:M,variant:"text"},x),U)))))};UTStatusMessage.propTypes={area:_propTypes.bool,children:_propTypes.element,chipProps:_propTypes.object,chipText:_propTypes.string,classes:_propTypes.object,colorTheme:_propTypes.string,contentMaxWidth:(0,_propTypes.oneOfType)([_propTypes.number,_propTypes.string]),description:_propTypes.string,descriptionProps:_propTypes.object,flag:_propTypes.bool,flagColor:_propTypes.string,HeaderComponent:_propTypes.element,helpText:_propTypes.string,helpTextProps:_propTypes.object,icon:_propTypes.string,iconBackgroundColor:_propTypes.string,iconProps:_propTypes.object,loading:_propTypes.bool,primaryAction:_propTypes.func,primaryActionProps:_propTypes.object,primaryActionText:_propTypes.string,secondaryAction:_propTypes.func,secondaryActionProps:_propTypes.object,secondaryActionText:_propTypes.string,showBanner:_propTypes.bool,showHeader:_propTypes.bool,title:_propTypes.string,titleProps:_propTypes.object};const UTStatusMessageWithTheme=(0,_WithTheme.default)(_theme.retrieveStyle)(UTStatusMessage);UTStatusMessageWithTheme.displayName="UTStatusMessage";var _default=exports.default=UTStatusMessageWithTheme;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEST_IDS=exports.ID_CONSTANTS=void 0;const ID_CONSTANTS=exports.ID_CONSTANTS={ACTIONS:"actions",ADD_FILTER_BUTTON:"addFilterButton",AVATAR:"avatar",BOTTOM_NAV:"bottomNav",CANVAS:"canvas",CELL:"cell",CLEAR_BUTTON:"clearButton",CLIENT_FILTER:"clientFilter",COLLAPSED_PANEL_CONTENT:"collapsedPanelContent",COLLAPSE_BUTTON:"collapseButton",COLLAPSE_BUTTON_TOOLTIP:"collapseButtonTooltip",CREDIT_CARD:"creditCard",CUSTOM_SEARCH_ACTION:"customSearchAction",DATA_CATEGORY:"dataCategory",DATA_ELEMENT:"dataElement",DELETE_BUTTON:"deleteButton",DELETE_BUTTON_TOOLTIP:"deleteButtonTooltip",ADDITIONAL_CONTENT:"additionalContent",ADDITIONAL_CONTENT_BODY:"additionalContentBody",DESCRIPTION:"description",DIALOG:"dialog",EDIT_BUTTON:"editButton",EDIT_BUTTON_TOOLTIP:"editButtonTooltip",EXPANDED_PANEL_CONTENT:"expandedPanelContent",EXPANDED_PANEL_CONTENT_CATEGORY:"expandedPanelContentCategory",EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY:"expandedPanelContentCategoryEmpty",EXPANDED_PANEL_CONTENT_CATEGORY_HEADER:"expandedPanelContentCategoryHeader",EXPANDED_PANEL_CONTENT_CATEGORY_ITEM:"expandedPanelContentCategoryItem",EXPANDED_PANEL_CONTENT_HEADER:"expandedPanelContentHeader",EXPAND_BUTTON:"expandButton",FILTER_GROUPING:"filterGrouping",GROUPING_PANEL:"groupingPanel",HEADER:"header",HELP_TEXT:"helpText",ICON:"icon",INVALID_PARAMS:"invalidParams",LABEL:"label",MAIN_BUTTON:"mainButton",NAME:"name",NAME_CONTAINER:"nameContainer",ONBOARDING:"onboarding",PAGINATION_NEXT:"paginationNext",PAGINATION_PREV:"paginationPrev",PANEL:"panel",PERSISTENT_FILTER:"persistentFilter",PINNED:"pinned",POPPER:"popper",SEARCH_BUTTON:"searchButton",SECONDARY_ACTION:"secondaryAction",SEARCH_BUTTON_TOOLTIP:"searchButtonTooltip",SEARCH_FIELD:"searchField",SELECTION_COMPONENT:"selectionComponent",SIDEBAR:"sidebar",SIDEBAR_BUTTON:"sidebarButton",STATUS_MESSAGE:"statusMessage",TABLE:"table",TERTIARY_ACTION:"tertiaryAction",TABLE_ROW:"tableRow",TITLE:"title",USER_FILTER:"userFilter",UT_RICH_TEXT:"UTRichText",UT_SNACKBAR:"UTSnackbar",VALIDATION_DATA:"validationData",WORKFLOW_CONTAINER:"workflowContainer"},TEST_IDS=exports.TEST_IDS={barChart:{bar:{tooltip:"barChart.bar.tooltip."},xAxis:{secondaryLabel:"barChart.xAxis.secondaryLabel.",mainLabel:"barChart.xAxis.mainLabel."}},breadcrumbs:{item:"breadcrumbs.item"},creditCard:{cardField:"".concat(ID_CONSTANTS.CREDIT_CARD,".cardField"),cvcField:"".concat(ID_CONSTANTS.CREDIT_CARD,".cvcField"),expires:"".concat(ID_CONSTANTS.CREDIT_CARD,".expires"),nameField:"".concat(ID_CONSTANTS.CREDIT_CARD,".nameField")},dataCategory:{container:"".concat(ID_CONSTANTS.DATA_CATEGORY,".container"),collapseButton:"".concat(ID_CONSTANTS.DATA_CATEGORY,".collapseButton"),item:"".concat(ID_CONSTANTS.DATA_CATEGORY,".item")},dataElement:{container:"".concat(ID_CONSTANTS.DATA_ELEMENT,".container"),collapseButton:"".concat(ID_CONSTANTS.DATA_ELEMENT,".collapseButton"),switchAction:"".concat(ID_CONSTANTS.DATA_ELEMENT,".actionSwitch"),buttonAction:"".concat(ID_CONSTANTS.DATA_ELEMENT,".actionButton")},dialog:{acceptButton:"".concat(ID_CONSTANTS.DIALOG,".acceptButton"),cancelButton:"".concat(ID_CONSTANTS.DIALOG,".cancelButton"),closeButton:"".concat(ID_CONSTANTS.DIALOG,".closeButton"),title:"".concat(ID_CONSTANTS.DIALOG,".title")},filterGrouping:{groupingPanel:{collapsedPanelContent:{expandButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.COLLAPSED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPAND_BUTTON)},expandedPanelContent:{expandedPanelContentCategory:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_CATEGORY),expandedPanelContentHeader:{addFilterButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.ADD_FILTER_BUTTON),collapseButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.COLLAPSE_BUTTON),collapseButtonTooltip:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.COLLAPSE_BUTTON_TOOLTIP),customSearchAction:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.CUSTOM_SEARCH_ACTION),searchButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_BUTTON),searchButtonTooltip:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_BUTTON_TOOLTIP),searchField:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_FIELD),title:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.TITLE)}}}},onboarding:{close:"".concat(ID_CONSTANTS.ONBOARDING,".close"),description:"".concat(ID_CONSTANTS.ONBOARDING,".description"),nextButton:"".concat(ID_CONSTANTS.ONBOARDING,".nextButton"),prevButton:"".concat(ID_CONSTANTS.ONBOARDING,".prevButton"),title:"".concat(ID_CONSTANTS.ONBOARDING,".title")},panel:{additionalContent:{body:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT_BODY),sidebar:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.SIDEBAR),sidebarButton:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.SIDEBAR_BUTTON,".")},backButton:"".concat(ID_CONSTANTS.PANEL,".backButton"),closeButton:"".concat(ID_CONSTANTS.PANEL,".closeButton"),mainAction:"".concat(ID_CONSTANTS.PANEL,".mainAction"),mainButton:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.MAIN_BUTTON),paginationNext:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.PAGINATION_NEXT),paginationPrev:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.PAGINATION_PREV),secondaryAction:"".concat(ID_CONSTANTS.PANEL,".secondaryAction"),title:"".concat(ID_CONSTANTS.PANEL,".title")},signature:"signature",snackBar:{closeButton:"snackbar.closeButton",label:"snackbar.label"},statusMessage:{description:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".description"),flag:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".flag"),helperText:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".helperText"),icon:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".icon"),title:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".title")},table:{tableHeader:{title:"".concat(ID_CONSTANTS.TABLE,".tableHeader.title")}},tabs:{tab:"tabs.tab."},wrapperObservation:{actionIcon:"wrapperObservation.actionIcon."},UTLoading:{logoLoader:"UTLoading.logoLoader",spinner:"UTLoading.spinner"},UTRichText:{content:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".content"),field:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".field"),helpText:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.HELP_TEXT),label:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.LABEL),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".root"),submitButton:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".submitButton"),tableToolbar:{addColumnAfter:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addColumnAfter"),addColumnBefore:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addColumnBefore"),addRowAfter:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addRowAfter"),deleteColumn:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteColumn"),deleteRow:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteRow"),deleteTable:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteTable"),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.root")},toolbar:{bold:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.bold"),italic:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.italic"),list:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.list"),listNumbers:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.listNumbers"),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.root"),table:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.table")},validation:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.VALIDATION_DATA)},UTSnackbar:{closeButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".closeButton"),description:"".concat(ID_CONSTANTS.UT_SNACKBAR,".description"),label:"".concat(ID_CONSTANTS.UT_SNACKBAR,".label"),primaryActionButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".primaryActionButton"),root:"".concat(ID_CONSTANTS.UT_SNACKBAR,".root"),secondaryActionButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".secondaryActionButton")},UTDatePickerV1TestID:{calendar:"UTDatePickerV1.calendar",calendarPrevBtn:"UTDatePickerV1.calendarPrevBtn",calendarNextBtn:"UTDatePickerV1.calendarNextBtn",calendarMonthYear:"UTDatePickerV1.calendarMonthYear"},workflowContainer:{bottomNav:{backButton:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".backButton"),nextButton:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".nextButton"),primaryAction:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".primaryAction"),secondaryAction:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".secondaryAction")},header:{helpText:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".helpText"),requiredFieldInfo:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".requiredFieldInfo"),subtitle:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".subtitle"),tagline:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".tagline"),title:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".title")}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEST_IDS=exports.ID_CONSTANTS=void 0;const ID_CONSTANTS=exports.ID_CONSTANTS={ACTIONS:"actions",ADD_FILTER_BUTTON:"addFilterButton",AVATAR:"avatar",BOTTOM_NAV:"bottomNav",CANVAS:"canvas",CELL:"cell",CLEAR_BUTTON:"clearButton",CLIENT_FILTER:"clientFilter",COLLAPSED_PANEL_CONTENT:"collapsedPanelContent",COLLAPSE_BUTTON:"collapseButton",COLLAPSE_BUTTON_TOOLTIP:"collapseButtonTooltip",CREDIT_CARD:"creditCard",CUSTOM_SEARCH_ACTION:"customSearchAction",DATA_CATEGORY:"dataCategory",DATA_ELEMENT:"dataElement",DELETE_BUTTON:"deleteButton",DELETE_BUTTON_TOOLTIP:"deleteButtonTooltip",ADDITIONAL_CONTENT:"additionalContent",ADDITIONAL_CONTENT_BODY:"additionalContentBody",DESCRIPTION:"description",DIALOG:"dialog",EDIT_BUTTON:"editButton",EDIT_BUTTON_TOOLTIP:"editButtonTooltip",EXPANDED_PANEL_CONTENT:"expandedPanelContent",EXPANDED_PANEL_CONTENT_CATEGORY:"expandedPanelContentCategory",EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY:"expandedPanelContentCategoryEmpty",EXPANDED_PANEL_CONTENT_CATEGORY_HEADER:"expandedPanelContentCategoryHeader",EXPANDED_PANEL_CONTENT_CATEGORY_ITEM:"expandedPanelContentCategoryItem",EXPANDED_PANEL_CONTENT_HEADER:"expandedPanelContentHeader",EXPAND_BUTTON:"expandButton",FILTER_GROUPING:"filterGrouping",GROUPING_PANEL:"groupingPanel",HEADER:"header",HELP_TEXT:"helpText",ICON:"icon",INVALID_PARAMS:"invalidParams",LABEL:"label",MAIN_BUTTON:"mainButton",NAME:"name",NAME_CONTAINER:"nameContainer",ONBOARDING:"onboarding",PAGINATION_NEXT:"paginationNext",PAGINATION_PREV:"paginationPrev",PANEL:"panel",PERSISTENT_FILTER:"persistentFilter",PINNED:"pinned",POPPER:"popper",SEARCH_BUTTON:"searchButton",SECONDARY_ACTION:"secondaryAction",SEARCH_BUTTON_TOOLTIP:"searchButtonTooltip",SEARCH_FIELD:"searchField",SELECTION_COMPONENT:"selectionComponent",SIDEBAR:"sidebar",SIDEBAR_BUTTON:"sidebarButton",STATUS_MESSAGE:"statusMessage",TABLE:"table",TERTIARY_ACTION:"tertiaryAction",TABLE_ROW:"tableRow",TITLE:"title",USER_FILTER:"userFilter",UT_RICH_TEXT:"UTRichText",UT_SNACKBAR:"UTSnackbar",VALIDATION_DATA:"validationData",WORKFLOW_CONTAINER:"workflowContainer"},TEST_IDS=exports.TEST_IDS={barChart:{bar:{tooltip:"barChart.bar.tooltip."},xAxis:{secondaryLabel:"barChart.xAxis.secondaryLabel.",mainLabel:"barChart.xAxis.mainLabel."}},breadcrumbs:{item:"breadcrumbs.item"},creditCard:{cardField:"".concat(ID_CONSTANTS.CREDIT_CARD,".cardField"),cvcField:"".concat(ID_CONSTANTS.CREDIT_CARD,".cvcField"),expires:"".concat(ID_CONSTANTS.CREDIT_CARD,".expires"),nameField:"".concat(ID_CONSTANTS.CREDIT_CARD,".nameField")},dataCategory:{container:"".concat(ID_CONSTANTS.DATA_CATEGORY,".container"),collapseButton:"".concat(ID_CONSTANTS.DATA_CATEGORY,".collapseButton"),item:"".concat(ID_CONSTANTS.DATA_CATEGORY,".item")},dataElement:{container:"".concat(ID_CONSTANTS.DATA_ELEMENT,".container"),collapseButton:"".concat(ID_CONSTANTS.DATA_ELEMENT,".collapseButton"),switchAction:"".concat(ID_CONSTANTS.DATA_ELEMENT,".actionSwitch"),buttonAction:"".concat(ID_CONSTANTS.DATA_ELEMENT,".actionButton")},dialog:{acceptButton:"".concat(ID_CONSTANTS.DIALOG,".acceptButton"),cancelButton:"".concat(ID_CONSTANTS.DIALOG,".cancelButton"),closeButton:"".concat(ID_CONSTANTS.DIALOG,".closeButton"),title:"".concat(ID_CONSTANTS.DIALOG,".title")},filterGrouping:{groupingPanel:{collapsedPanelContent:{expandButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.COLLAPSED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPAND_BUTTON)},expandedPanelContent:{expandedPanelContentCategory:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_CATEGORY),expandedPanelContentHeader:{addFilterButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.ADD_FILTER_BUTTON),collapseButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.COLLAPSE_BUTTON),collapseButtonTooltip:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.COLLAPSE_BUTTON_TOOLTIP),customSearchAction:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.CUSTOM_SEARCH_ACTION),searchButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_BUTTON),searchButtonTooltip:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_BUTTON_TOOLTIP),searchField:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_FIELD),title:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.TITLE)}}}},onboarding:{close:"".concat(ID_CONSTANTS.ONBOARDING,".close"),description:"".concat(ID_CONSTANTS.ONBOARDING,".description"),nextButton:"".concat(ID_CONSTANTS.ONBOARDING,".nextButton"),prevButton:"".concat(ID_CONSTANTS.ONBOARDING,".prevButton"),title:"".concat(ID_CONSTANTS.ONBOARDING,".title")},panel:{additionalContent:{body:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT_BODY),sidebar:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.SIDEBAR),sidebarButton:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.SIDEBAR_BUTTON,".")},backButton:"".concat(ID_CONSTANTS.PANEL,".backButton"),closeButton:"".concat(ID_CONSTANTS.PANEL,".closeButton"),mainAction:"".concat(ID_CONSTANTS.PANEL,".mainAction"),mainButton:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.MAIN_BUTTON),paginationNext:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.PAGINATION_NEXT),paginationPrev:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.PAGINATION_PREV),secondaryAction:"".concat(ID_CONSTANTS.PANEL,".secondaryAction"),title:"".concat(ID_CONSTANTS.PANEL,".title")},signature:"signature",snackBar:{closeButton:"snackbar.closeButton",label:"snackbar.label"},statusMessage:{chip:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".chip"),description:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".description"),flag:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".flag"),helperText:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".helperText"),icon:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".icon"),title:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".title")},table:{tableHeader:{title:"".concat(ID_CONSTANTS.TABLE,".tableHeader.title")}},tabs:{tab:"tabs.tab."},wrapperObservation:{actionIcon:"wrapperObservation.actionIcon."},UTLoading:{logoLoader:"UTLoading.logoLoader",spinner:"UTLoading.spinner"},UTRichText:{content:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".content"),field:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".field"),helpText:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.HELP_TEXT),label:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.LABEL),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".root"),submitButton:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".submitButton"),tableToolbar:{addColumnAfter:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addColumnAfter"),addColumnBefore:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addColumnBefore"),addRowAfter:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addRowAfter"),deleteColumn:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteColumn"),deleteRow:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteRow"),deleteTable:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteTable"),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.root")},toolbar:{bold:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.bold"),italic:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.italic"),list:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.list"),listNumbers:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.listNumbers"),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.root"),table:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.table")},validation:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.VALIDATION_DATA)},UTSnackbar:{closeButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".closeButton"),description:"".concat(ID_CONSTANTS.UT_SNACKBAR,".description"),label:"".concat(ID_CONSTANTS.UT_SNACKBAR,".label"),primaryActionButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".primaryActionButton"),root:"".concat(ID_CONSTANTS.UT_SNACKBAR,".root"),secondaryActionButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".secondaryActionButton")},UTDatePickerV1TestID:{calendar:"UTDatePickerV1.calendar",calendarPrevBtn:"UTDatePickerV1.calendarPrevBtn",calendarNextBtn:"UTDatePickerV1.calendarNextBtn",calendarMonthYear:"UTDatePickerV1.calendarMonthYear"},workflowContainer:{bottomNav:{backButton:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".backButton"),nextButton:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".nextButton"),primaryAction:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".primaryAction"),secondaryAction:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".secondaryAction")},header:{helpText:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".helpText"),requiredFieldInfo:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".requiredFieldInfo"),subtitle:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".subtitle"),tagline:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".tagline"),title:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".title")}}};
@@ -1 +1 @@
1
- function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_extends.apply(null,arguments)}import React,{Fragment,memo,useState}from"react";import isEmpty from"lodash/isEmpty";import{arrayOf,bool,elementType,func,number,oneOf,oneOfType,shape,string}from"prop-types";import UTButton from"../../../UTButton";import UTButtonGroup from"../../../UTButtonGroup";import UTMenu from"../../../UTMenu";import UTTooltip from"../../../UTTooltip";import{HEADER_ACTIONS_VARIANTS,PLACE_SELF_TYPES}from"../../constants";import{processActions}from"./utils";import styles from"./styles.module.scss";const HeaderActions=e=>{var t,o;let{headerActions:n,headerActionsProps:r,setMainActionHoverVisible:s}=e;const[a,i]=useState(),[l,c]=useState(null===(t=n.find(e=>{let{selectedDefault:t}=e;return t}))||void 0===t?void 0:t.id),p=r.variant===HEADER_ACTIONS_VARIANTS.BUTTON_GROUP,{colorTheme:m="secondary",shape:u}=(null==r?void 0:r.buttonGroupProps)||{},T=()=>s(!0),d=()=>{T(),i()},{primaryActions:E,secondaryActions:A}=processActions(n,p?null:d),f=(null==r?void 0:r.buttonSize)||"medium";return React.createElement("div",{className:"".concat(styles.headerActionsContainer," ").concat(styles["placeSelf-".concat(r.alignment)]),onClick:e=>e.stopPropagation(),onMouseEnter:()=>s(!1),onMouseLeave:T},E.map(e=>React.createElement(UTTooltip,{tippyProps:{appendTo:()=>document.body,interactive:!1},content:e.label&&React.createElement("span",null,e.label)},React.createElement("div",null,React.createElement(UTButton,_extends({},e,{classNames:{root:styles.zIndex},size:f,variant:"text"}),e.title)))),!isEmpty(A)&&(p?React.createElement(UTButtonGroup,{actions:A.map(e=>({...e,onClick:()=>{c(e.id),e.onClick()}})),colorTheme:m,selected:l||(null===(o=A[0])||void 0===o?void 0:o.id),shape:u}):React.createElement(React.Fragment,null,React.createElement(UTMenu,{anchor:a,iconBefore:!0,items:A,menuPlacement:"bottom-end",onClose:d,scrollBarProps:{options:{suppressScrollY:!0,suppressScrollX:!0}}}),React.createElement(UTButton,{classNames:{root:styles.zIndex},Icon:"IconDots",onClick:e=>{e.stopPropagation(),a?i():i(e.currentTarget)},size:"medium",variant:"text"}))))};HeaderActions.propTypes={headerActions:arrayOf(shape({Icon:oneOfType([elementType,string]),id:oneOfType([number,string]),isPrimary:bool,title:string,label:string,loading:bool,onClick:func,selectedDefault:bool})),headerActionsProps:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),buttonGroupProps:shape({colorTheme:string,shape:string}),variant:oneOf([HEADER_ACTIONS_VARIANTS.DEFAULT,HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),setMainActionHoverVisible:func};export default memo(HeaderActions);
1
+ function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_extends.apply(null,arguments)}import React,{Fragment,memo,useState}from"react";import isEmpty from"lodash/isEmpty";import{arrayOf,bool,elementType,func,number,oneOf,oneOfType,shape,string}from"prop-types";import UTButton from"../../../UTButton";import UTButtonGroup from"../../../UTButtonGroup";import UTMenu from"../../../UTMenu";import UTTooltip from"../../../UTTooltip";import{HEADER_ACTIONS_VARIANTS,PLACE_SELF_TYPES}from"../../constants";import{processActions}from"./utils";import styles from"./styles.module.scss";const HeaderActions=e=>{var t,o;let{headerActions:n,headerActionsProps:r,setMainActionHoverVisible:s}=e;const[a,i]=useState(),[l,c]=useState(null===(t=n.find(e=>{let{selectedDefault:t}=e;return t}))||void 0===t?void 0:t.id),p=r.variant===HEADER_ACTIONS_VARIANTS.BUTTON_GROUP,{colorTheme:m="secondary",shape:u,size:T}=(null==r?void 0:r.buttonGroupProps)||{},d=()=>s(!0),E=()=>{d(),i()},{primaryActions:A,secondaryActions:f}=processActions(n,p?null:E),y=(null==r?void 0:r.buttonSize)||"medium";return React.createElement("div",{className:"".concat(styles.headerActionsContainer," ").concat(styles["placeSelf-".concat(r.alignment)]),onClick:e=>e.stopPropagation(),onMouseEnter:()=>s(!1),onMouseLeave:d},A.map(e=>React.createElement(UTTooltip,{tippyProps:{appendTo:()=>document.body,interactive:!1},content:e.label&&React.createElement("span",null,e.label)},React.createElement("div",null,React.createElement(UTButton,_extends({},e,{classNames:{root:styles.zIndex},size:y,variant:"text"}),e.title)))),!isEmpty(f)&&(p?React.createElement(UTButtonGroup,{actions:f.map(e=>({...e,onClick:()=>{c(e.id),e.onClick()}})),colorTheme:m,selected:l||(null===(o=f[0])||void 0===o?void 0:o.id),shape:u,size:T}):React.createElement(React.Fragment,null,React.createElement(UTMenu,{anchor:a,iconBefore:!0,items:f,menuPlacement:"bottom-end",onClose:E,scrollBarProps:{options:{suppressScrollY:!0,suppressScrollX:!0}}}),React.createElement(UTButton,{classNames:{root:styles.zIndex},Icon:"IconDots",onClick:e=>{e.stopPropagation(),a?i():i(e.currentTarget)},size:"medium",variant:"text"}))))};HeaderActions.propTypes={headerActions:arrayOf(shape({Icon:oneOfType([elementType,string]),id:oneOfType([number,string]),isPrimary:bool,title:string,label:string,loading:bool,onClick:func,selectedDefault:bool})),headerActionsProps:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),buttonGroupProps:shape({colorTheme:string,shape:string}),variant:oneOf([HEADER_ACTIONS_VARIANTS.DEFAULT,HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),setMainActionHoverVisible:func};export default memo(HeaderActions);
@@ -1 +1 @@
1
- function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)({}).hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},_extends.apply(null,arguments)}import React,{memo,useState}from"react";import{arrayOf,bool,elementType,func,number,object,objectOf,oneOf,oneOfType,shape,string}from"prop-types";import{isEmpty}from"@widergy/web-utils/lib/array";import{objectIsEmpty}from"@widergy/web-utils/lib/object";import UTTouchableWithoutFeedback from"../UTTouchableWithoutFeedback";import BottomActions from"./components/BottomActions";import AdditionalMessage from"./components/AdditionalMessage";import Header from"./components/Header";import{ACTION_TYPES,HEADER_ACTIONS_VARIANTS,PLACE_SELF_TYPES,SIZES}from"./constants";import styles from"./styles.module.scss";const UTActionCard=t=>{let{additionalMessage:e,adornment:n,BackgroundImage:a,bottomActions:o,bottomActionsVariant:s,children:i,classNames:r={},description:c,descriptionProps:l={},headerActions:d,headerActionsProps:m={variant:HEADER_ACTIONS_VARIANTS.DEFAULT},hideHeader:E=!1,mainAction:p,size:T=SIZES.MEDIUM,status:A,statusAlignment:g,statusLabel:u,testIds:b={},title:h,titleProps:S={},withBodyPadding:P=!0}=t;const[y,I]=useState(!0),{backgroundDataTestId:_,containerDataTestId:f,statusDataTestId:C}=b;return React.createElement("div",{className:"".concat(styles.cardContainer," ").concat(r.container)},React.createElement(UTTouchableWithoutFeedback,{className:"".concat(styles.innerContainer," ").concat(r.innerContainer," ").concat(p?"".concat(styles.withMainAction," ").concat(y&&"".concat(styles.mainActionHover," ").concat(r.mainActionHover)):styles.withoutMainAction),dataTestId:f,onClick:()=>null==p?void 0:p()},a&&React.createElement(a,{className:"".concat(styles.backgroundImage," ").concat(r.backgroundImage),"data-testid":_}),React.createElement("div",{className:"".concat(styles.headerAndChildrenContainer," ").concat(r.headerAndChildrenContainer)},!E&&React.createElement(Header,{adornment:n,classNames:r,description:c,descriptionProps:l,headerActions:d,headerActionsProps:m,mainAction:p,setMainActionHoverVisible:I,size:T,status:A,statusAlignment:g,statusDataTestId:C,statusLabel:u,title:h,titleProps:S}),i&&React.createElement("div",{className:"".concat(E?styles.withoutHeader:""," ").concat(P?styles["bodyPadding-".concat(T)]:styles["withoutBodyPadding-".concat(T)])},i))),!objectIsEmpty(e)&&React.createElement(AdditionalMessage,_extends({},e,{size:T})),!isEmpty(o)&&React.createElement(BottomActions,{actions:o,bottomActionsVariant:s,size:T}))};UTActionCard.propTypes={additionalMessage:shape({Icon:elementType,iconProps:shape({colorTheme:string,size:string}),labelProps:shape({colorTheme:string,variant:string}),message:string}),adornment:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),position:string,props:object,type:string}),BackgroundImage:elementType,bottomActions:arrayOf(shape({colorTheme:string,disabled:bool,Icon:elementType,label:string,loading:bool,onClick:func})),bottomActionsVariant:oneOf([ACTION_TYPES.DEFAULT,ACTION_TYPES.REDIRECTION]),classNames:objectOf(string),description:string,descriptionProps:shape({colorTheme:string,variant:string}),headerActions:arrayOf(shape({Icon:oneOfType([elementType,string]),iconProps:string,id:oneOfType([number,string]),label:string,loading:bool,onClick:func})),headerActionsProps:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),buttonGroupProps:shape({colorTheme:string,shape:string}),variant:oneOf([HEADER_ACTIONS_VARIANTS.DEFAULT,HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),hideHeader:bool,mainAction:func,size:oneOf([SIZES.MEDIUM,SIZES.SMALL]),status:string,statusLabel:string,statusAlignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),testIds:shape({backgroundDataTestId:string,containerDataTestId:string,statusDataTestId:string}),title:string,titleProps:shape({variant:string,weight:string}),withBodyPadding:bool};export default memo(UTActionCard);
1
+ function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)({}).hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},_extends.apply(null,arguments)}import React,{memo,useState}from"react";import{arrayOf,bool,elementType,func,number,object,objectOf,oneOf,oneOfType,shape,string}from"prop-types";import{isEmpty}from"@widergy/web-utils/lib/array";import{objectIsEmpty}from"@widergy/web-utils/lib/object";import UTTouchableWithoutFeedback from"../UTTouchableWithoutFeedback";import BottomActions from"./components/BottomActions";import AdditionalMessage from"./components/AdditionalMessage";import Header from"./components/Header";import{ACTION_TYPES,HEADER_ACTIONS_VARIANTS,PLACE_SELF_TYPES,SIZES}from"./constants";import styles from"./styles.module.scss";const UTActionCard=t=>{let{additionalMessage:e,adornment:n,BackgroundImage:a,bottomActions:o,bottomActionsVariant:s,children:i,classNames:r={},description:c,descriptionProps:l={},headerActions:d,headerActionsProps:m={variant:HEADER_ACTIONS_VARIANTS.DEFAULT},hideHeader:E=!1,mainAction:p,size:T=SIZES.MEDIUM,status:A,statusAlignment:g,statusLabel:u,testIds:b={},title:h,titleProps:S={},withBodyPadding:P=!0}=t;const[y,I]=useState(!0),{backgroundDataTestId:_,containerDataTestId:f,statusDataTestId:C}=b;return React.createElement("div",{className:"".concat(styles.cardContainer," ").concat(r.container)},React.createElement(UTTouchableWithoutFeedback,{className:"".concat(styles.innerContainer," ").concat(r.innerContainer," ").concat(p?"".concat(styles.withMainAction," ").concat(y&&"".concat(styles.mainActionHover," ").concat(r.mainActionHover)):styles.withoutMainAction),dataTestId:f,onClick:()=>null==p?void 0:p()},a&&React.createElement(a,{className:"".concat(styles.backgroundImage," ").concat(r.backgroundImage),"data-testid":_}),React.createElement("div",{className:"".concat(styles.headerAndChildrenContainer," ").concat(r.headerAndChildrenContainer)},!E&&React.createElement(Header,{adornment:n,classNames:r,description:c,descriptionProps:l,headerActions:d,headerActionsProps:m,mainAction:p,setMainActionHoverVisible:I,size:T,status:A,statusAlignment:g,statusDataTestId:C,statusLabel:u,title:h,titleProps:S}),i&&React.createElement("div",{className:"".concat(E?styles.withoutHeader:""," ").concat(P?styles["bodyPadding-".concat(T)]:styles["withoutBodyPadding-".concat(T)])},i))),!objectIsEmpty(e)&&React.createElement(AdditionalMessage,_extends({},e,{size:T})),!isEmpty(o)&&React.createElement(BottomActions,{actions:o,bottomActionsVariant:s,size:T}))};UTActionCard.propTypes={additionalMessage:shape({Icon:elementType,iconProps:shape({colorTheme:string,size:string}),labelProps:shape({colorTheme:string,variant:string}),message:string}),adornment:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),position:string,props:object,type:string}),BackgroundImage:elementType,bottomActions:arrayOf(shape({colorTheme:string,disabled:bool,Icon:elementType,label:string,loading:bool,onClick:func})),bottomActionsVariant:oneOf([ACTION_TYPES.DEFAULT,ACTION_TYPES.REDIRECTION]),classNames:objectOf(string),description:string,descriptionProps:shape({colorTheme:string,variant:string}),headerActions:arrayOf(shape({Icon:oneOfType([elementType,string]),iconProps:string,id:oneOfType([number,string]),label:string,loading:bool,onClick:func})),headerActionsProps:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),buttonGroupProps:shape({colorTheme:string,shape:string,size:string}),variant:oneOf([HEADER_ACTIONS_VARIANTS.DEFAULT,HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),hideHeader:bool,mainAction:func,size:oneOf([SIZES.MEDIUM,SIZES.SMALL]),status:string,statusLabel:string,statusAlignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),testIds:shape({backgroundDataTestId:string,containerDataTestId:string,statusDataTestId:string}),title:string,titleProps:shape({variant:string,weight:string}),withBodyPadding:bool};export default memo(UTActionCard);
@@ -1 +1 @@
1
- import UTIcon from"../UTIcon";import UTAvatar from"../UTAvatar";export const CHIP_VARIANT={DEFAULT:"default",OUTLINE:"outline"};export const CHIP_SIZES={MEDIUM:"medium",SMALL:"small"};export const ADORNMENT_TYPES={ICON:"icon",AVATAR:"avatar",IMAGE:"image"};export const ADORNMENT_COMPONENT_MAPPER={[ADORNMENT_TYPES.ICON]:UTIcon,[ADORNMENT_TYPES.AVATAR]:UTAvatar,[ADORNMENT_TYPES.IMAGE]:"img"};
1
+ import UTIcon from"../UTIcon";import UTAvatar from"../UTAvatar";export const CHIP_VARIANT={DEFAULT:"default",OUTLINE:"outline",SOLID:"solid"};export const DEFAULT_COLOR=null;export const CHIP_SIZES={MEDIUM:"medium",SMALL:"small"};export const CHIP_ICON_SIZE={[CHIP_SIZES.MEDIUM]:"var(--UT-chip-icon-size-md, 20px)",[CHIP_SIZES.SMALL]:"var(--UT-chip-icon-size-sm, 16px)"};export const ADORNMENT_TYPES={ICON:"icon",AVATAR:"avatar",IMAGE:"image"};export const ADORNMENT_COMPONENT_MAPPER={[ADORNMENT_TYPES.ICON]:UTIcon,[ADORNMENT_TYPES.AVATAR]:UTAvatar,[ADORNMENT_TYPES.IMAGE]:"img"};
@@ -1 +1 @@
1
- function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_extends.apply(null,arguments)}import React,{memo}from"react";import{bool,func,object,oneOf,shape,string}from"prop-types";import UTButton from"../UTButton";import UTLabel from"../UTLabel";import{getItemsProps}from"./utils";import{ADORNMENT_TYPES,CHIP_SIZES,CHIP_VARIANT}from"./constants";import styles from"./styles.module.scss";const UTChip=t=>{let{active:e,adornment:n,children:o,dataTestId:a,disabled:s,isDragging:r,onClick:i,onClose:c,size:l=CHIP_SIZES.MEDIUM,variant:p=CHIP_VARIANT.DEFAULT}=t;const{Adornment:m,adornmentProps:d,buttonProps:I,Container:T,containerProps:E,labelProps:g}=getItemsProps({active:e,adornment:n,dataTestId:a,disabled:s,isDragging:r,onClick:i,size:l,variant:p}),A=c?t=>{t.stopPropagation(),c(t)}:void 0;return React.createElement(T,_extends({className:"\n ".concat(styles.chipContainer,"\n ").concat(styles[l],"\n ").concat(styles[p],"\n ").concat(e?styles.active:"","\n ").concat(s?styles.disabled:"","\n ").concat(r?styles.dragging:"","\n ").concat(i&&!s?styles.interactive:styles.nonInteractive,"\n ")},E),m&&React.createElement(m,d),React.createElement(UTLabel,g,o),A&&React.createElement(UTButton,_extends({},I,{Icon:"IconX",onClick:A,size:"small",variant:"text"})))};UTChip.propTypes={active:bool,adornment:shape({props:object,type:oneOf([ADORNMENT_TYPES.ICON,ADORNMENT_TYPES.AVATAR,ADORNMENT_TYPES.IMAGE])}),dataTestId:string,disabled:bool,isDragging:bool,onClick:func,onClose:func,size:oneOf([CHIP_SIZES.MEDIUM,CHIP_SIZES.SMALL]),variant:oneOf([CHIP_VARIANT.DEFAULT,CHIP_VARIANT.OUTLINE])};export default memo(UTChip);
1
+ function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)({}).hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},_extends.apply(null,arguments)}import React,{memo}from"react";import{bool,func,object,oneOf,shape,string}from"prop-types";import UTButton from"../UTButton";import UTLabel from"../UTLabel";import{getColorStyle,getItemsProps}from"./utils";import{ADORNMENT_TYPES,CHIP_SIZES,CHIP_VARIANT,DEFAULT_COLOR}from"./constants";import styles from"./styles.module.scss";const UTChip=t=>{let{active:e,adornment:o,children:n,color:r=DEFAULT_COLOR,dataTestId:s,disabled:a,isDragging:l,onClick:i,onClose:c,size:p=CHIP_SIZES.MEDIUM,textColor:T,variant:m=CHIP_VARIANT.DEFAULT}=t;const I=getColorStyle({color:r,textColor:T,variant:m}),{Adornment:d,adornmentProps:C,buttonProps:g,Container:A,containerProps:E,labelProps:P}=getItemsProps({active:e,adornment:o,dataTestId:s,disabled:a,isDragging:l,onClick:i,resolvedTextColor:I.color,size:p,variant:m}),_=c?t=>{t.stopPropagation(),c(t)}:void 0;return React.createElement(A,_extends({className:"\n ".concat(styles.chipContainer,"\n ").concat(styles[p],"\n ").concat(styles[m],"\n ").concat(e?styles.active:"","\n ").concat(a?styles.disabled:"","\n ").concat(l?styles.dragging:"","\n ").concat(i&&!a?styles.interactive:styles.nonInteractive,"\n "),style:I},E),d&&React.createElement(d,C),React.createElement(UTLabel,P,n),_&&React.createElement(UTButton,_extends({},g,{Icon:"IconX",onClick:_,size:"small",variant:"text"})))};UTChip.propTypes={active:bool,adornment:shape({props:object,type:oneOf([ADORNMENT_TYPES.ICON,ADORNMENT_TYPES.AVATAR,ADORNMENT_TYPES.IMAGE])}),color:string,dataTestId:string,disabled:bool,isDragging:bool,onClick:func,onClose:func,size:oneOf([CHIP_SIZES.MEDIUM,CHIP_SIZES.SMALL]),textColor:string,variant:oneOf([CHIP_VARIANT.DEFAULT,CHIP_VARIANT.OUTLINE,CHIP_VARIANT.SOLID])};export default memo(UTChip);