@widergy/energy-ui 3.181.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 (46) hide show
  1. package/CHANGELOG.md +22 -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/UTCheckList/versions/V1/README.MD +91 -61
  5. package/dist/components/UTCheckList/versions/V1/index.js +1 -1
  6. package/dist/components/UTCheckbox/versions/V1/constants.js +1 -1
  7. package/dist/components/UTCheckbox/versions/V1/index.js +1 -1
  8. package/dist/components/UTCheckbox/versions/V1/theme.js +1 -1
  9. package/dist/components/UTCheckbox/versions/V1/utils.js +1 -0
  10. package/dist/components/UTChip/constants.js +1 -1
  11. package/dist/components/UTChip/index.js +1 -1
  12. package/dist/components/UTChip/styles.module.scss +35 -8
  13. package/dist/components/UTChip/utils.js +1 -1
  14. package/dist/components/UTIcon/constants.js +1 -1
  15. package/dist/components/UTIcon/index.js +1 -1
  16. package/dist/components/UTIcon/styles.module.scss +6 -0
  17. package/dist/components/UTIcon/theme.js +1 -1
  18. package/dist/components/UTRadioGroup/versions/V1/components/Radio/theme.js +1 -1
  19. package/dist/components/UTStatusMessage/index.js +1 -1
  20. package/dist/constants/testIds.js +1 -1
  21. package/dist/esm/components/UTActionCard/components/HeaderActions/index.js +1 -1
  22. package/dist/esm/components/UTActionCard/index.js +1 -1
  23. package/dist/esm/components/UTCheckList/versions/V1/README.MD +91 -61
  24. package/dist/esm/components/UTCheckList/versions/V1/index.js +1 -1
  25. package/dist/esm/components/UTCheckbox/versions/V1/constants.js +1 -1
  26. package/dist/esm/components/UTCheckbox/versions/V1/index.js +1 -1
  27. package/dist/esm/components/UTCheckbox/versions/V1/theme.js +1 -1
  28. package/dist/esm/components/UTCheckbox/versions/V1/utils.js +1 -0
  29. package/dist/esm/components/UTChip/constants.js +1 -1
  30. package/dist/esm/components/UTChip/index.js +1 -1
  31. package/dist/esm/components/UTChip/styles.module.scss +35 -8
  32. package/dist/esm/components/UTChip/utils.js +1 -1
  33. package/dist/esm/components/UTIcon/constants.js +1 -1
  34. package/dist/esm/components/UTIcon/index.js +1 -1
  35. package/dist/esm/components/UTIcon/styles.module.scss +6 -0
  36. package/dist/esm/components/UTIcon/theme.js +1 -1
  37. package/dist/esm/components/UTRadioGroup/versions/V1/components/Radio/theme.js +1 -1
  38. package/dist/esm/components/UTStatusMessage/index.js +1 -1
  39. package/dist/esm/constants/testIds.js +1 -1
  40. package/dist/esm/utils/hooks/useCSSVariables/constants.js +1 -0
  41. package/dist/esm/utils/hooks/useCSSVariables/dimensionTokens.js +1 -1
  42. package/dist/esm/utils/hooks/useCSSVariables/index.js +1 -1
  43. package/dist/utils/hooks/useCSSVariables/constants.js +1 -0
  44. package/dist/utils/hooks/useCSSVariables/dimensionTokens.js +1 -1
  45. package/dist/utils/hooks/useCSSVariables/index.js +1 -1
  46. package/package.json +1 -1
@@ -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.retrieveStyle=void 0;var _constants=require("../../constants"),_constants2=require("./constants");const SPACING_VALUES={[_constants.SPACING.SMALL]:"var(--UT-radioGroup-control-gap-sm, 4px)",[_constants.SPACING.MEDIUM]:"var(--UT-radioGroup-control-gap-md, 8px)"},getCardRadioColors=t=>{let{accent04:o,disabled:e,selected:r,theme:a}=t;const n=a.Palette.gray["04"];return{backgroundColor:r?e?n:o:"transparent",borderColor:e?n:r?o:a.Palette.light["04"]}},retrieveStyle=t=>{var o,e,r,a,n;let{theme:i,variant:l=_constants2.RADIO_VARIANTS.DEFAULT,disabled:c,selected:d,spacing:s=_constants.SPACING.MEDIUM,reversed:p}=t;const A=(null===(o=i.Palette.actions)||void 0===o?void 0:o.accent["01"])||i.Palette.accent["01"],g=(null===(e=i.Palette.actions)||void 0===e?void 0:e.accent["02"])||i.Palette.accent["02"],u=(null===(r=i.Palette.actions)||void 0===r?void 0:r.accent["03"])||i.Palette.accent["03"],h=(null===(a=i.Palette.actions)||void 0===a?void 0:a.accent["04"])||i.Palette.accent["04"],v=(null===(n=i.Palette.actions)||void 0===n?void 0:n.accent["05"])||i.Palette.accent["05"],x={[_constants2.RADIO_VARIANTS.CARD]:{backgroundColor:i.Palette.light["01"],boxShadow:"none",outline:"1px solid ".concat(i.Palette.light["04"]," !important"),"&:hover":{backgroundColor:i.Palette.light["03"]},"&:active":{backgroundColor:i.Palette.light["04"],"& $description":{color:i.Palette.gray["03"]}}},[_constants2.RADIO_VARIANTS.BUTTON]:{backgroundColor:i.Palette.light["01"],"&:hover":{backgroundColor:i.Palette.light["03"]},"&:active":{backgroundColor:i.Palette.light["04"]}},[_constants2.RADIO_VARIANTS.DEFAULT]:{}}[l],I={[_constants2.RADIO_VARIANTS.CARD]:{boxShadow:"none",outline:"2px solid ".concat(u," !important"),"& $icon path":{fill:v},"&:hover":{backgroundColor:A,outline:"2px solid ".concat(u," !important")},"&:active":{backgroundColor:g,outline:"2px solid ".concat(u," !important")}},[_constants2.RADIO_VARIANTS.BUTTON]:{},[_constants2.RADIO_VARIANTS.DEFAULT]:{}}[l],C={[_constants2.RADIO_VARIANTS.CARD]:{backgroundColor:i.Palette.light["03"],boxShadow:"none",outline:"2px solid transparent !important",pointerEvents:"none","& $name, & $description":{color:i.Palette.gray["04"]},"& $icon path":{fill:i.Palette.gray["04"]}},[_constants2.RADIO_VARIANTS.BUTTON]:{backgroundColor:i.Palette.light["01"],opacity:.5},[_constants2.RADIO_VARIANTS.DEFAULT]:{opacity:.5}}[l];return{root:{alignItems:"center !important",borderRadius:l===_constants2.RADIO_VARIANTS.CARD?"var(--UT-radioGroup-card-radius, 12px)":"var(--UT-radioGroup-row-radius, 8px)",display:"flex",flexDirection:"row",gap:SPACING_VALUES[s]||SPACING_VALUES[_constants.SPACING.MEDIUM],minHeight:"var(--UT-radioGroup-row-min-height, 24px)",overflow:l===_constants2.RADIO_VARIANTS.CARD?"visible":"hidden",...l!==_constants2.RADIO_VARIANTS.DEFAULT&&{padding:"var(--UT-radioGroup-row-padding-y, 12px) var(--UT-radioGroup-row-padding-x, 16px)"},...c?C:d?I:x},radioCircleContainer:{borderRadius:"50%",overflow:"hidden",padding:3,"&:hover":{backgroundColor:A},"&:active":{backgroundColor:g}},radioCircle:{alignItems:"center",border:"1px solid ".concat(i.Palette.light["05"]),borderRadius:"50%",display:"flex",flexShrink:0,height:"var(--UT-radioGroup-control-size, 16px)",justifyContent:"center",width:"var(--UT-radioGroup-control-size, 16px)",...d&&{backgroundColor:h,borderColor:h}},radioDot:{backgroundColor:i.Palette.light["01"],borderRadius:"50%",height:"var(--UT-radioGroup-control-dot-size, 8px)",width:"var(--UT-radioGroup-control-dot-size, 8px)"},cardRadio:{alignItems:"center",border:"1px solid transparent",borderRadius:"50%",display:"flex",flexShrink:0,height:"var(--UT-radioGroup-control-size, 16px)",justifyContent:"center",width:"var(--UT-radioGroup-control-size, 16px)",...getCardRadioColors({accent04:h,disabled:c,selected:d,theme:i})},content:{alignItems:"center",display:"flex",flexDirection:p?"row-reverse":"row",gap:SPACING_VALUES[s]||SPACING_VALUES[_constants.SPACING.MEDIUM],marginRight:"auto"},contentContainer:{display:"flex",flexDirection:"column",gap:"var(--UT-radioGroup-content-gap, 4px)"},titleAndTooltip:{alignItems:"center",display:"flex",gap:"var(--gap-xs, 4px)"},tooltip:{display:"flex"},icon:{flexShrink:0,height:"36px",width:"36px"},iconImage:{borderRadius:"50%",flexShrink:0,height:"36px",objectFit:"cover",width:"36px"},infoIcon:{flexShrink:0},name:{},description:{}}};exports.retrieveStyle=retrieveStyle;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.retrieveStyle=void 0;var _constants=require("../../constants"),_constants2=require("./constants");const SPACING_VALUES={[_constants.SPACING.SMALL]:"var(--UT-radioGroup-control-gap-sm, 4px)",[_constants.SPACING.MEDIUM]:"var(--UT-radioGroup-control-gap-md, 8px)"},getCardRadioColors=t=>{let{accent04:o,disabled:e,selected:r,theme:a}=t;const n=a.Palette.gray["04"];return{backgroundColor:r?e?n:o:"transparent",borderColor:r?e?n:o:a.Palette.light["05"]}},retrieveStyle=t=>{var o,e,r,a,n;let{theme:i,variant:l=_constants2.RADIO_VARIANTS.DEFAULT,disabled:c,selected:d,spacing:s=_constants.SPACING.MEDIUM,reversed:p}=t;const A=(null===(o=i.Palette.actions)||void 0===o?void 0:o.accent["01"])||i.Palette.accent["01"],g=(null===(e=i.Palette.actions)||void 0===e?void 0:e.accent["02"])||i.Palette.accent["02"],u=(null===(r=i.Palette.actions)||void 0===r?void 0:r.accent["03"])||i.Palette.accent["03"],h=(null===(a=i.Palette.actions)||void 0===a?void 0:a.accent["04"])||i.Palette.accent["04"],v=(null===(n=i.Palette.actions)||void 0===n?void 0:n.accent["05"])||i.Palette.accent["05"],x={[_constants2.RADIO_VARIANTS.CARD]:{backgroundColor:i.Palette.light["01"],boxShadow:"none",outline:"1px solid ".concat(i.Palette.light["04"]," !important"),"&:hover":{backgroundColor:i.Palette.light["03"]},"&:active":{backgroundColor:i.Palette.light["04"],"& $description":{color:i.Palette.gray["03"]}}},[_constants2.RADIO_VARIANTS.BUTTON]:{backgroundColor:i.Palette.light["01"],"&:hover":{backgroundColor:i.Palette.light["03"]},"&:active":{backgroundColor:i.Palette.light["04"]}},[_constants2.RADIO_VARIANTS.DEFAULT]:{}}[l],I={[_constants2.RADIO_VARIANTS.CARD]:{boxShadow:"none",outline:"2px solid ".concat(u," !important"),"& $icon path":{fill:v},"&:hover":{backgroundColor:A,outline:"2px solid ".concat(u," !important")},"&:active":{backgroundColor:g,outline:"2px solid ".concat(u," !important")}},[_constants2.RADIO_VARIANTS.BUTTON]:{},[_constants2.RADIO_VARIANTS.DEFAULT]:{}}[l],C={[_constants2.RADIO_VARIANTS.CARD]:{backgroundColor:i.Palette.light["03"],boxShadow:"none",outline:"2px solid transparent !important",pointerEvents:"none","& $name, & $description":{color:i.Palette.gray["04"]},"& $icon path":{fill:i.Palette.gray["04"]}},[_constants2.RADIO_VARIANTS.BUTTON]:{backgroundColor:i.Palette.light["01"],opacity:.5},[_constants2.RADIO_VARIANTS.DEFAULT]:{opacity:.5}}[l];return{root:{alignItems:"center !important",borderRadius:l===_constants2.RADIO_VARIANTS.CARD?"var(--UT-radioGroup-card-radius, 12px)":"var(--UT-radioGroup-row-radius, 8px)",display:"flex",flexDirection:"row",gap:SPACING_VALUES[s]||SPACING_VALUES[_constants.SPACING.MEDIUM],minHeight:"var(--UT-radioGroup-row-min-height, 24px)",overflow:l===_constants2.RADIO_VARIANTS.CARD?"visible":"hidden",...l!==_constants2.RADIO_VARIANTS.DEFAULT&&{padding:"var(--UT-radioGroup-row-padding-y, 12px) var(--UT-radioGroup-row-padding-x, 16px)"},...c?C:d?I:x},radioCircleContainer:{borderRadius:"50%",overflow:"hidden",padding:3,"&:hover":{backgroundColor:A},"&:active":{backgroundColor:g}},radioCircle:{alignItems:"center",border:"1px solid ".concat(i.Palette.light["05"]),borderRadius:"50%",display:"flex",flexShrink:0,height:"var(--UT-radioGroup-control-size, 16px)",justifyContent:"center",width:"var(--UT-radioGroup-control-size, 16px)",...d&&{backgroundColor:h,borderColor:h}},radioDot:{backgroundColor:i.Palette.light["01"],borderRadius:"50%",height:"var(--UT-radioGroup-control-dot-size, 8px)",width:"var(--UT-radioGroup-control-dot-size, 8px)"},cardRadio:{alignItems:"center",border:"1px solid transparent",borderRadius:"50%",display:"flex",flexShrink:0,height:"var(--UT-radioGroup-control-size, 16px)",justifyContent:"center",width:"var(--UT-radioGroup-control-size, 16px)",...getCardRadioColors({accent04:h,disabled:c,selected:d,theme:i})},content:{alignItems:"center",display:"flex",flexDirection:p?"row-reverse":"row",gap:SPACING_VALUES[s]||SPACING_VALUES[_constants.SPACING.MEDIUM],marginRight:"auto"},contentContainer:{display:"flex",flexDirection:"column",gap:"var(--UT-radioGroup-content-gap, 4px)"},titleAndTooltip:{alignItems:"center",display:"flex",gap:"var(--gap-xs, 4px)"},tooltip:{display:"flex"},icon:{flexShrink:0,height:"36px",width:"36px"},iconImage:{borderRadius:"50%",flexShrink:0,height:"36px",objectFit:"cover",width:"36px"},infoIcon:{flexShrink:0},name:{},description:{}}};exports.retrieveStyle=retrieveStyle;
@@ -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,56 +1,58 @@
1
1
  # UTCheckList
2
2
 
3
- ## Description
3
+ ## Descripción
4
4
 
5
- `UTCheckList` is a customizable component that renders a list of checkboxes, allowing users to select multiple options from a provided list. It supports features like select all, indeterminate state, error display, and dynamic options. The "Select All" checkbox only affects options that are not disabled. Additionally, it allows for grouping options by category, with ungrouped options appearing first.
5
+ `UTCheckList` es un componente personalizable que renderiza una lista de checkboxes, permitiendo a los usuarios seleccionar múltiples opciones de una lista. Soporta funcionalidades como "seleccionar todos", estado indeterminado, mensaje de error y opciones dinámicas. El checkbox de "Seleccionar todos" solo afecta a las opciones que no están deshabilitadas. Además, permite agrupar opciones por categoría, mostrando primero las que no tienen categoría.
6
6
 
7
7
  ## Props
8
8
 
9
- | Name | Type | Default | Description |
10
- | ----------------- | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
11
- | actions | object | | Actions to render within `UTFieldLabel`. |
12
- | classNames | objectOf(string) | | Custom class names to apply to different elements of the checklist (`root`, `header`, `checkboxesContainer`, `item`, `selectAll`). |
13
- | CustomRow | elementType | | Custom component to render data of every checkbox |
14
- | disabled | bool | false | Disables all checkboxes in the checklist when true. |
15
- | |
16
- | error | string | | Error message to display. |
17
- | horizontalSpacing | string | medium | Spacing between the checkbox and the title horizontally. |
18
- | isSimple | bool | false | Simplifies the selection process to only allow single checkbox selection. |
19
- | onChange | func.isRequired | | Function to call when the selection changes. |
20
- | options | arrayOf(shape) | | Array of options to be displayed as checkboxes. Each option is an object with `name`, `value`, `disabled`, `checked`, and optionally `category`. |
21
- | required | bool | false | Indicates if the checklist is required. |
22
- | reversed | bool | false | If true, reverses the order of title and checkbox. |
23
- | selectAllLabel | string | | Label for the "Select All" checkbox. |
24
- | showSelectAll | bool | true | Determines whether to show the "Select All" checkbox. |
25
- | title | string | | Title for the checklist. |
26
- | value | arrayOf(string) | [] | Array of selected values. |
27
- | variant | string | | Variant style for the checklist. |
28
- | verticalSpacing | string | medium | Spacing between the checkbox items vertically. |
29
-
30
- ### Option Object
31
-
32
- The `options` prop is an array of objects, each representing an option:
33
-
34
- | Name | Type | Description |
35
- | -------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
36
- | category | string | (Optional) Category under which the option will be grouped. If not provided, the option will appear ungrouped at the top. |
37
- | checked | bool | Indicates if the option is checked. |
38
- | disabled | bool | Indicates if the option is disabled. |
39
- | label | string | Label to display for the option. |
40
- | value | string | Value of the option. |
41
-
42
- ## Usage
43
-
44
- ### Basic Example
9
+ | Nombre | Tipo | Default | Descripción |
10
+ | ------------------ | ---------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------ |
11
+ | actions | object | | Acciones a renderizar dentro de `UTFieldLabel`. |
12
+ | classNames | objectOf(string) | | Nombres de clase personalizados para distintos elementos del checklist (`root`, `header`, `checkboxesContainer`, `item`, `selectAll`). |
13
+ | CustomRow | elementType | | Componente custom para renderizar el contenido de cada checkbox. |
14
+ | disabled | bool | false | Deshabilita todos los checkboxes del checklist cuando es `true`. |
15
+ | error | string | | Mensaje de error a mostrar. |
16
+ | horizontalSpacing | string | medium | Espaciado horizontal entre el checkbox y el título. |
17
+ | isSimple | bool | false | Simplifica la selección para permitir marcar un solo checkbox a la vez. |
18
+ | onChange | func.isRequired | | Función a llamar cuando cambia la selección. |
19
+ | options | arrayOf(shape) | | Array de opciones a mostrar como checkboxes. Ver [Objeto Option](#objeto-option). |
20
+ | required | bool | false | Indica si el checklist es obligatorio. |
21
+ | reversed | bool | false | Si es `true`, invierte el orden del título y el checkbox. |
22
+ | selectAllLabel | string | | Etiqueta para el checkbox de "Seleccionar todos". |
23
+ | showSelectAll | bool | true | Determina si se muestra el checkbox de "Seleccionar todos". |
24
+ | title | string | | Título del checklist. |
25
+ | value | arrayOf(string) | [] | Array de valores seleccionados. |
26
+ | variant | string | | Variante visual del checklist (`default`, `button` o `card`, según lo soportado por `UTCheckbox`). |
27
+ | verticalSpacing | string | medium | Espaciado vertical entre los items. |
28
+
29
+ ### Objeto Option
30
+
31
+ El prop `options` es un array de objetos. Cada campo del objeto se reenvía al `UTCheckbox` correspondiente cuando aplica (por ejemplo `description`, `tooltip` e `icon` solo tienen efecto visual en la variante `card`):
32
+
33
+ | Nombre | Tipo | Descripción |
34
+ | ----------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------- |
35
+ | category | string | (Opcional) Categoría bajo la cual se agrupa la opción. Sin categoría, la opción aparece sin agrupar arriba. |
36
+ | checked | bool | Indica si la opción está marcada. |
37
+ | description | string | (Opcional) Texto secundario bajo el título. **Solo tiene efecto en la variante `card`.** |
38
+ | disabled | bool | Indica si la opción está deshabilitada. |
39
+ | icon | string \| elementType \| `{ src, alt }` | (Opcional) Ícono de la opción. En variantes `default`/`button` es el nombre de un ícono de `UTIcon`. En la variante `card` admite además un componente custom o un objeto `{ src, alt }` para una imagen. |
40
+ | name | string | Etiqueta a mostrar para la opción. |
41
+ | tooltip | string | (Opcional) Texto de ayuda junto al título. **Solo tiene efecto en la variante `card`.** |
42
+ | value | string | Valor de la opción. |
43
+
44
+ ## Uso
45
+
46
+ ### Ejemplo básico
45
47
 
46
48
  ```jsx
47
49
  import React from 'react';
48
50
  import UTCheckList from './UTCheckList';
49
51
 
50
52
  const options = [
51
- { name: 'Option 1', value: '1' },
52
- { name: 'Option 2', value: '2' },
53
- { name: 'Option 3', value: '3', disabled: true, checked: true }
53
+ { name: 'Opción 1', value: '1' },
54
+ { name: 'Opción 2', value: '2' },
55
+ { name: 'Opción 3', value: '3', disabled: true, checked: true }
54
56
  ];
55
57
 
56
58
  const Example = () => {
@@ -58,12 +60,12 @@ const Example = () => {
58
60
 
59
61
  return (
60
62
  <UTCheckList
61
- error="Please select at least one option"
62
- title="Select Options"
63
+ error="Selecciona al menos una opción"
64
+ title="Selecciona opciones"
63
65
  onChange={setSelectedOptions}
64
66
  options={options}
65
67
  required
66
- selectAllLabel="Select All"
68
+ selectAllLabel="Seleccionar todos"
67
69
  value={selectedOptions}
68
70
  />
69
71
  );
@@ -72,17 +74,17 @@ const Example = () => {
72
74
  export default Example;
73
75
  ```
74
76
 
75
- ### Categorized Example
77
+ ### Ejemplo categorizado
76
78
 
77
79
  ```jsx
78
80
  import React from 'react';
79
81
  import UTCheckList from './UTCheckList';
80
82
 
81
83
  const options = [
82
- { name: 'Option 1', value: '1' },
83
- { name: 'Option 2', value: '2', category: 'Group A' },
84
- { name: 'Option 3', value: '3', category: 'Group B', disabled: true },
85
- { name: 'Option 4', value: '4', category: 'Group A' }
84
+ { name: 'Opción 1', value: '1' },
85
+ { name: 'Opción 2', value: '2', category: 'Grupo A' },
86
+ { name: 'Opción 3', value: '3', category: 'Grupo B', disabled: true },
87
+ { name: 'Opción 4', value: '4', category: 'Grupo A' }
86
88
  ];
87
89
 
88
90
  const Example = () => {
@@ -90,11 +92,11 @@ const Example = () => {
90
92
 
91
93
  return (
92
94
  <UTCheckList
93
- error="Please select at least one option"
94
- title="Categorized CheckList"
95
+ error="Selecciona al menos una opción"
96
+ title="Checklist categorizado"
95
97
  onChange={setSelectedOptions}
96
98
  options={options}
97
- selectAllLabel="Select All"
99
+ selectAllLabel="Seleccionar todos"
98
100
  value={selectedOptions}
99
101
  />
100
102
  );
@@ -103,32 +105,60 @@ const Example = () => {
103
105
  export default Example;
104
106
  ```
105
107
 
106
- ### Custom Styles Example
108
+ ### Ejemplo con variante `card`
107
109
 
108
110
  ```jsx
109
111
  import React from 'react';
110
112
  import UTCheckList from './UTCheckList';
111
113
 
112
- const customStyles = {
113
- root: { padding: 10 },
114
- checkboxesContainer: { backgroundColor: 'lightgrey' },
115
- header: { color: 'blue' }
114
+ const options = [
115
+ {
116
+ name: 'Plan Residencial',
117
+ value: '1',
118
+ icon: 'IconHome',
119
+ description: 'Cubre el consumo de un hogar estándar',
120
+ tooltip: 'Ideal para tu hogar'
121
+ },
122
+ { name: 'Plan Comercial', value: '2', icon: 'IconBuildingStore', description: 'Pensado para pequeños comercios' }
123
+ ];
124
+
125
+ const Example = () => {
126
+ const [selectedOptions, setSelectedOptions] = React.useState([]);
127
+
128
+ return (
129
+ <UTCheckList
130
+ title="Selecciona un plan"
131
+ onChange={setSelectedOptions}
132
+ options={options}
133
+ value={selectedOptions}
134
+ variant="card"
135
+ />
136
+ );
116
137
  };
117
138
 
139
+ export default Example;
140
+ ```
141
+
142
+ ### Ejemplo con estilos personalizados
143
+
144
+ ```jsx
145
+ import React from 'react';
146
+ import UTCheckList from './UTCheckList';
147
+
118
148
  const Example = () => {
119
149
  const options = [
120
- { name: 'Option 1', value: '1' },
121
- { name: 'Option 2', value: '2' }
150
+ { name: 'Opción 1', value: '1' },
151
+ { name: 'Opción 2', value: '2' }
122
152
  ];
123
153
 
124
154
  const [selectedOptions, setSelectedOptions] = React.useState([]);
125
155
 
126
156
  return (
127
157
  <UTCheckList
128
- title="Custom Styled CheckList"
158
+ title="Checklist con estilos personalizados"
129
159
  onChange={setSelectedOptions}
130
160
  options={options}
131
- style={customStyles}
161
+ classNames={{ root: 'custom-root', checkboxesContainer: 'custom-container', header: 'custom-header' }}
132
162
  value={selectedOptions}
133
163
  />
134
164
  );
@@ -1 +1 @@
1
- import React,{useEffect,useCallback,useMemo}from"react";import{arrayOf,bool,elementType,func,objectOf,shape,string}from"prop-types";import{buttonTypes}from"../../../../types/buttonTypes";import{formatErrorToValidation}from"../../../UTValidation/utils";import{SPACING,BUTTON_VARIANT}from"../../../UTCheckbox/versions/V1/constants";import UTCheckBox from"../../../UTCheckbox";import UTFieldLabel from"../../../UTFieldLabel";import UTLabel from"../../../UTLabel";import UTValidation from"../../../UTValidation";import{isChecked,convertIfIsString,getPropValueBasedOnVariant}from"./utils";import styles from"./styles.module.scss";import{NO_CATEGORY}from"./constants";const UTCheckList=e=>{let{actions:t,classNames:a={},CustomRow:o,dataTestId:s,disabled:r,error:l,horizontalSpacing:n="medium",isSimple:i=!1,itemDataTestId:c,onChange:m=()=>{},options:d,required:u,reversed:p,selectAllLabel:T,showSelectAll:g=!0,title:v,value:b=null,variant:C,verticalSpacing:f="medium"}=e;const h=getPropValueBasedOnVariant(C,p,!0),y=getPropValueBasedOnVariant(C,f,SPACING.SMALL)===SPACING.SMALL?styles.smallVerticalSpacing:"",O=useMemo(()=>l&&formatErrorToValidation(l,{withIcon:!1}),[l]);useEffect(()=>{if(b){const e=convertIfIsString(b);JSON.stringify(e)!==JSON.stringify(b)&&m(e)}},[b,m]);const N=useMemo(()=>{const e=d.reduce((e,t)=>{const a=t.category||NO_CATEGORY;return e[a]||(e[a]=[]),e[a].push(t),e},{NO_CATEGORY:[]});return Object.entries(e).filter(e=>{let[,t]=e;return t.length>0}).sort((e,t)=>{let[a]=e,[o]=t;return a===NO_CATEGORY?-1:o===NO_CATEGORY?1:0})},[d]),A=useMemo(()=>d.filter(e=>!e.disabled),[d]),R=useMemo(()=>A.every(e=>null==b?void 0:b.includes(e.value)),[A,b]),U=useMemo(()=>A.some(e=>null==b?void 0:b.includes(e.value))&&!R,[A,b,R]),k=useCallback(e=>{if(i)m([e]);else{var t;const a=null!=b&&null!==(t=b.some)&&void 0!==t&&t.call(b,t=>t===e)?b.filter(t=>t!==e):[...b||[],e];m(a)}},[b,m,i]),E=useCallback(()=>{m(R?[]:A.map(e=>e.value))},[R,A,m]);return React.createElement("div",{className:"".concat(styles.container," ").concat(y," ").concat(a.root),"data-testid":s},(v||O)&&React.createElement("div",{className:"".concat(styles.headerContainer," ").concat(a.header)},v&&React.createElement(UTFieldLabel,{actions:t,required:u},v),O&&React.createElement(UTValidation,{validationData:O})),React.createElement("div",{className:"".concat(styles.checkboxesContainer," ").concat(y," ").concat(C===BUTTON_VARIANT&&styles.buttonVariant," ").concat(a.checkboxesContainer)},g&&!i&&React.createElement(UTCheckBox,{className:a.selectAll,dataTestId:c?"".concat(c,".selectAll"):null,disabled:r,indeterminate:U,onChange:E,reversed:h,spacing:n,title:T,value:R,variant:C,version:"V1"}),N.map((e,t)=>{let[s,l]=e;const m="".concat(s,"-").concat(l.map(e=>e.value).join("-"));return React.createElement("div",{className:"".concat(styles.categoryContainer," ").concat(y),key:m},s!==NO_CATEGORY&&React.createElement(UTLabel,{className:styles.categoryTitle,colorTheme:"gray",variant:"small",weight:"medium"},s.toUpperCase()),l.map((e,s)=>React.createElement(UTCheckBox,{classNames:a.item,CustomComponent:o?React.createElement(o,{item:e,isChecked:isChecked(e,b)}):void 0,dataTestId:c?"".concat(c,".category_").concat(t,".").concat(s):null,disabled:e.disabled||r,isSimple:i,key:e.value,icon:e.icon,onChange:()=>k(e.value),reversed:i?h:p,spacing:n,title:e.name,value:isChecked(e,b),variant:C,version:"V1"})))})))};UTCheckList.propTypes={actions:arrayOf(buttonTypes),classNames:objectOf(string),CustomRow:elementType,dataTestId:string,disabled:bool,error:string,horizontalSpacing:string,isSimple:bool,itemDataTestId:string,onChange:func,options:arrayOf(shape({checked:bool,disabled:bool,icon:string,name:string,value:string,category:string})),required:bool,reversed:bool,selectAllLabel:string,showSelectAll:bool,title:string,value:arrayOf(string),variant:string,verticalSpacing:string};export default UTCheckList;
1
+ import React,{useEffect,useCallback,useMemo}from"react";import{arrayOf,bool,elementType,func,objectOf,oneOfType,shape,string}from"prop-types";import{buttonTypes}from"../../../../types/buttonTypes";import{formatErrorToValidation}from"../../../UTValidation/utils";import{SPACING,BUTTON_VARIANT}from"../../../UTCheckbox/versions/V1/constants";import UTCheckBox from"../../../UTCheckbox";import UTFieldLabel from"../../../UTFieldLabel";import UTLabel from"../../../UTLabel";import UTValidation from"../../../UTValidation";import{isChecked,convertIfIsString,getPropValueBasedOnVariant}from"./utils";import styles from"./styles.module.scss";import{NO_CATEGORY}from"./constants";const UTCheckList=e=>{let{actions:t,classNames:a={},CustomRow:o,dataTestId:s,disabled:n,error:r,horizontalSpacing:i="medium",isSimple:l=!1,itemDataTestId:c,onChange:m=()=>{},options:d,required:u,reversed:p,selectAllLabel:T,showSelectAll:g=!0,title:f,value:v=null,variant:b,verticalSpacing:C="medium"}=e;const y=getPropValueBasedOnVariant(b,p,!0),h=getPropValueBasedOnVariant(b,C,SPACING.SMALL)===SPACING.SMALL?styles.smallVerticalSpacing:"",O=useMemo(()=>r&&formatErrorToValidation(r,{withIcon:!1}),[r]);useEffect(()=>{if(v){const e=convertIfIsString(v);JSON.stringify(e)!==JSON.stringify(v)&&m(e)}},[v,m]);const N=useMemo(()=>{const e=d.reduce((e,t)=>{const a=t.category||NO_CATEGORY;return e[a]||(e[a]=[]),e[a].push(t),e},{NO_CATEGORY:[]});return Object.entries(e).filter(e=>{let[,t]=e;return t.length>0}).sort((e,t)=>{let[a]=e,[o]=t;return a===NO_CATEGORY?-1:o===NO_CATEGORY?1:0})},[d]),A=useMemo(()=>d.filter(e=>!e.disabled),[d]),R=useMemo(()=>A.every(e=>null==v?void 0:v.includes(e.value)),[A,v]),U=useMemo(()=>A.some(e=>null==v?void 0:v.includes(e.value))&&!R,[A,v,R]),k=useCallback(e=>{if(l)m([e]);else{var t;const a=null!=v&&null!==(t=v.some)&&void 0!==t&&t.call(v,t=>t===e)?v.filter(t=>t!==e):[...v||[],e];m(a)}},[v,m,l]),E=useCallback(()=>{m(R?[]:A.map(e=>e.value))},[R,A,m]);return React.createElement("div",{className:"".concat(styles.container," ").concat(h," ").concat(a.root),"data-testid":s},(f||O)&&React.createElement("div",{className:"".concat(styles.headerContainer," ").concat(a.header)},f&&React.createElement(UTFieldLabel,{actions:t,required:u},f),O&&React.createElement(UTValidation,{validationData:O})),React.createElement("div",{className:"".concat(styles.checkboxesContainer," ").concat(h," ").concat(b===BUTTON_VARIANT&&styles.buttonVariant," ").concat(a.checkboxesContainer)},g&&!l&&React.createElement(UTCheckBox,{className:a.selectAll,dataTestId:c?"".concat(c,".selectAll"):null,disabled:n,indeterminate:U,onChange:E,reversed:y,spacing:i,title:T,value:R,variant:b,version:"V1"}),N.map((e,t)=>{let[s,r]=e;const m="".concat(s,"-").concat(r.map(e=>e.value).join("-"));return React.createElement("div",{className:"".concat(styles.categoryContainer," ").concat(h),key:m},s!==NO_CATEGORY&&React.createElement(UTLabel,{className:styles.categoryTitle,colorTheme:"gray",variant:"small",weight:"medium"},s.toUpperCase()),r.map((e,s)=>React.createElement(UTCheckBox,{classNames:a.item,CustomComponent:o?React.createElement(o,{item:e,isChecked:isChecked(e,v)}):void 0,dataTestId:c?"".concat(c,".category_").concat(t,".").concat(s):null,description:e.description,disabled:e.disabled||n,isSimple:l,key:e.value,icon:e.icon,onChange:()=>k(e.value),reversed:l?y:p,spacing:i,title:e.name,tooltip:e.tooltip,value:isChecked(e,v),variant:b,version:"V1"})))})))};UTCheckList.propTypes={actions:arrayOf(buttonTypes),classNames:objectOf(string),CustomRow:elementType,dataTestId:string,disabled:bool,error:string,horizontalSpacing:string,isSimple:bool,itemDataTestId:string,onChange:func,options:arrayOf(shape({category:string,checked:bool,description:string,disabled:bool,icon:oneOfType([string,elementType,shape({alt:string,src:string})]),name:string,tooltip:string,value:string})),required:bool,reversed:bool,selectAllLabel:string,showSelectAll:bool,title:string,value:arrayOf(string),variant:string,verticalSpacing:string};export default UTCheckList;