@widergy/energy-ui 3.182.0 → 3.184.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 (38) 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/UTChip/constants.js +1 -1
  5. package/dist/components/UTChip/index.js +1 -1
  6. package/dist/components/UTChip/styles.module.scss +35 -8
  7. package/dist/components/UTChip/utils.js +1 -1
  8. package/dist/components/UTIcon/constants.js +1 -1
  9. package/dist/components/UTIcon/index.js +1 -1
  10. package/dist/components/UTIcon/styles.module.scss +6 -0
  11. package/dist/components/UTIcon/theme.js +1 -1
  12. package/dist/components/UTRichText/styles.module.scss +9 -28
  13. package/dist/components/UTRichText/utils/contentBuilders.js +1 -1
  14. package/dist/components/UTRichText/utils/markdownBuilders.js +1 -0
  15. package/dist/components/UTStatusMessage/index.js +1 -1
  16. package/dist/constants/testIds.js +1 -1
  17. package/dist/esm/components/UTActionCard/components/HeaderActions/index.js +1 -1
  18. package/dist/esm/components/UTActionCard/index.js +1 -1
  19. package/dist/esm/components/UTChip/constants.js +1 -1
  20. package/dist/esm/components/UTChip/index.js +1 -1
  21. package/dist/esm/components/UTChip/styles.module.scss +35 -8
  22. package/dist/esm/components/UTChip/utils.js +1 -1
  23. package/dist/esm/components/UTIcon/constants.js +1 -1
  24. package/dist/esm/components/UTIcon/index.js +1 -1
  25. package/dist/esm/components/UTIcon/styles.module.scss +6 -0
  26. package/dist/esm/components/UTIcon/theme.js +1 -1
  27. package/dist/esm/components/UTRichText/styles.module.scss +9 -28
  28. package/dist/esm/components/UTRichText/utils/contentBuilders.js +1 -1
  29. package/dist/esm/components/UTRichText/utils/markdownBuilders.js +1 -0
  30. package/dist/esm/components/UTStatusMessage/index.js +1 -1
  31. package/dist/esm/constants/testIds.js +1 -1
  32. package/dist/esm/utils/hooks/useCSSVariables/constants.js +1 -0
  33. package/dist/esm/utils/hooks/useCSSVariables/dimensionTokens.js +1 -1
  34. package/dist/esm/utils/hooks/useCSSVariables/index.js +1 -1
  35. package/dist/utils/hooks/useCSSVariables/constants.js +1 -0
  36. package/dist/utils/hooks/useCSSVariables/dimensionTokens.js +1 -1
  37. package/dist/utils/hooks/useCSSVariables/index.js +1 -1
  38. package/package.json +1 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEST_IDS=exports.ID_CONSTANTS=void 0;const ID_CONSTANTS=exports.ID_CONSTANTS={ACTIONS:"actions",ADD_FILTER_BUTTON:"addFilterButton",AVATAR:"avatar",BOTTOM_NAV:"bottomNav",CANVAS:"canvas",CELL:"cell",CLEAR_BUTTON:"clearButton",CLIENT_FILTER:"clientFilter",COLLAPSED_PANEL_CONTENT:"collapsedPanelContent",COLLAPSE_BUTTON:"collapseButton",COLLAPSE_BUTTON_TOOLTIP:"collapseButtonTooltip",CREDIT_CARD:"creditCard",CUSTOM_SEARCH_ACTION:"customSearchAction",DATA_CATEGORY:"dataCategory",DATA_ELEMENT:"dataElement",DELETE_BUTTON:"deleteButton",DELETE_BUTTON_TOOLTIP:"deleteButtonTooltip",ADDITIONAL_CONTENT:"additionalContent",ADDITIONAL_CONTENT_BODY:"additionalContentBody",DESCRIPTION:"description",DIALOG:"dialog",EDIT_BUTTON:"editButton",EDIT_BUTTON_TOOLTIP:"editButtonTooltip",EXPANDED_PANEL_CONTENT:"expandedPanelContent",EXPANDED_PANEL_CONTENT_CATEGORY:"expandedPanelContentCategory",EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY:"expandedPanelContentCategoryEmpty",EXPANDED_PANEL_CONTENT_CATEGORY_HEADER:"expandedPanelContentCategoryHeader",EXPANDED_PANEL_CONTENT_CATEGORY_ITEM:"expandedPanelContentCategoryItem",EXPANDED_PANEL_CONTENT_HEADER:"expandedPanelContentHeader",EXPAND_BUTTON:"expandButton",FILTER_GROUPING:"filterGrouping",GROUPING_PANEL:"groupingPanel",HEADER:"header",HELP_TEXT:"helpText",ICON:"icon",INVALID_PARAMS:"invalidParams",LABEL:"label",MAIN_BUTTON:"mainButton",NAME:"name",NAME_CONTAINER:"nameContainer",ONBOARDING:"onboarding",PAGINATION_NEXT:"paginationNext",PAGINATION_PREV:"paginationPrev",PANEL:"panel",PERSISTENT_FILTER:"persistentFilter",PINNED:"pinned",POPPER:"popper",SEARCH_BUTTON:"searchButton",SECONDARY_ACTION:"secondaryAction",SEARCH_BUTTON_TOOLTIP:"searchButtonTooltip",SEARCH_FIELD:"searchField",SELECTION_COMPONENT:"selectionComponent",SIDEBAR:"sidebar",SIDEBAR_BUTTON:"sidebarButton",STATUS_MESSAGE:"statusMessage",TABLE:"table",TERTIARY_ACTION:"tertiaryAction",TABLE_ROW:"tableRow",TITLE:"title",USER_FILTER:"userFilter",UT_RICH_TEXT:"UTRichText",UT_SNACKBAR:"UTSnackbar",VALIDATION_DATA:"validationData",WORKFLOW_CONTAINER:"workflowContainer"},TEST_IDS=exports.TEST_IDS={barChart:{bar:{tooltip:"barChart.bar.tooltip."},xAxis:{secondaryLabel:"barChart.xAxis.secondaryLabel.",mainLabel:"barChart.xAxis.mainLabel."}},breadcrumbs:{item:"breadcrumbs.item"},creditCard:{cardField:"".concat(ID_CONSTANTS.CREDIT_CARD,".cardField"),cvcField:"".concat(ID_CONSTANTS.CREDIT_CARD,".cvcField"),expires:"".concat(ID_CONSTANTS.CREDIT_CARD,".expires"),nameField:"".concat(ID_CONSTANTS.CREDIT_CARD,".nameField")},dataCategory:{container:"".concat(ID_CONSTANTS.DATA_CATEGORY,".container"),collapseButton:"".concat(ID_CONSTANTS.DATA_CATEGORY,".collapseButton"),item:"".concat(ID_CONSTANTS.DATA_CATEGORY,".item")},dataElement:{container:"".concat(ID_CONSTANTS.DATA_ELEMENT,".container"),collapseButton:"".concat(ID_CONSTANTS.DATA_ELEMENT,".collapseButton"),switchAction:"".concat(ID_CONSTANTS.DATA_ELEMENT,".actionSwitch"),buttonAction:"".concat(ID_CONSTANTS.DATA_ELEMENT,".actionButton")},dialog:{acceptButton:"".concat(ID_CONSTANTS.DIALOG,".acceptButton"),cancelButton:"".concat(ID_CONSTANTS.DIALOG,".cancelButton"),closeButton:"".concat(ID_CONSTANTS.DIALOG,".closeButton"),title:"".concat(ID_CONSTANTS.DIALOG,".title")},filterGrouping:{groupingPanel:{collapsedPanelContent:{expandButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.COLLAPSED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPAND_BUTTON)},expandedPanelContent:{expandedPanelContentCategory:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_CATEGORY),expandedPanelContentHeader:{addFilterButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.ADD_FILTER_BUTTON),collapseButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.COLLAPSE_BUTTON),collapseButtonTooltip:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.COLLAPSE_BUTTON_TOOLTIP),customSearchAction:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.CUSTOM_SEARCH_ACTION),searchButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_BUTTON),searchButtonTooltip:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_BUTTON_TOOLTIP),searchField:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_FIELD),title:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.TITLE)}}}},onboarding:{close:"".concat(ID_CONSTANTS.ONBOARDING,".close"),description:"".concat(ID_CONSTANTS.ONBOARDING,".description"),nextButton:"".concat(ID_CONSTANTS.ONBOARDING,".nextButton"),prevButton:"".concat(ID_CONSTANTS.ONBOARDING,".prevButton"),title:"".concat(ID_CONSTANTS.ONBOARDING,".title")},panel:{additionalContent:{body:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT_BODY),sidebar:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.SIDEBAR),sidebarButton:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.SIDEBAR_BUTTON,".")},backButton:"".concat(ID_CONSTANTS.PANEL,".backButton"),closeButton:"".concat(ID_CONSTANTS.PANEL,".closeButton"),mainAction:"".concat(ID_CONSTANTS.PANEL,".mainAction"),mainButton:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.MAIN_BUTTON),paginationNext:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.PAGINATION_NEXT),paginationPrev:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.PAGINATION_PREV),secondaryAction:"".concat(ID_CONSTANTS.PANEL,".secondaryAction"),title:"".concat(ID_CONSTANTS.PANEL,".title")},signature:"signature",snackBar:{closeButton:"snackbar.closeButton",label:"snackbar.label"},statusMessage:{description:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".description"),flag:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".flag"),helperText:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".helperText"),icon:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".icon"),title:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".title")},table:{tableHeader:{title:"".concat(ID_CONSTANTS.TABLE,".tableHeader.title")}},tabs:{tab:"tabs.tab."},wrapperObservation:{actionIcon:"wrapperObservation.actionIcon."},UTLoading:{logoLoader:"UTLoading.logoLoader",spinner:"UTLoading.spinner"},UTRichText:{content:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".content"),field:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".field"),helpText:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.HELP_TEXT),label:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.LABEL),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".root"),submitButton:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".submitButton"),tableToolbar:{addColumnAfter:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addColumnAfter"),addColumnBefore:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addColumnBefore"),addRowAfter:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addRowAfter"),deleteColumn:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteColumn"),deleteRow:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteRow"),deleteTable:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteTable"),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.root")},toolbar:{bold:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.bold"),italic:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.italic"),list:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.list"),listNumbers:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.listNumbers"),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.root"),table:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.table")},validation:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.VALIDATION_DATA)},UTSnackbar:{closeButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".closeButton"),description:"".concat(ID_CONSTANTS.UT_SNACKBAR,".description"),label:"".concat(ID_CONSTANTS.UT_SNACKBAR,".label"),primaryActionButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".primaryActionButton"),root:"".concat(ID_CONSTANTS.UT_SNACKBAR,".root"),secondaryActionButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".secondaryActionButton")},UTDatePickerV1TestID:{calendar:"UTDatePickerV1.calendar",calendarPrevBtn:"UTDatePickerV1.calendarPrevBtn",calendarNextBtn:"UTDatePickerV1.calendarNextBtn",calendarMonthYear:"UTDatePickerV1.calendarMonthYear"},workflowContainer:{bottomNav:{backButton:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".backButton"),nextButton:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".nextButton"),primaryAction:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".primaryAction"),secondaryAction:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".secondaryAction")},header:{helpText:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".helpText"),requiredFieldInfo:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".requiredFieldInfo"),subtitle:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".subtitle"),tagline:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".tagline"),title:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".title")}}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TEST_IDS=exports.ID_CONSTANTS=void 0;const ID_CONSTANTS=exports.ID_CONSTANTS={ACTIONS:"actions",ADD_FILTER_BUTTON:"addFilterButton",AVATAR:"avatar",BOTTOM_NAV:"bottomNav",CANVAS:"canvas",CELL:"cell",CLEAR_BUTTON:"clearButton",CLIENT_FILTER:"clientFilter",COLLAPSED_PANEL_CONTENT:"collapsedPanelContent",COLLAPSE_BUTTON:"collapseButton",COLLAPSE_BUTTON_TOOLTIP:"collapseButtonTooltip",CREDIT_CARD:"creditCard",CUSTOM_SEARCH_ACTION:"customSearchAction",DATA_CATEGORY:"dataCategory",DATA_ELEMENT:"dataElement",DELETE_BUTTON:"deleteButton",DELETE_BUTTON_TOOLTIP:"deleteButtonTooltip",ADDITIONAL_CONTENT:"additionalContent",ADDITIONAL_CONTENT_BODY:"additionalContentBody",DESCRIPTION:"description",DIALOG:"dialog",EDIT_BUTTON:"editButton",EDIT_BUTTON_TOOLTIP:"editButtonTooltip",EXPANDED_PANEL_CONTENT:"expandedPanelContent",EXPANDED_PANEL_CONTENT_CATEGORY:"expandedPanelContentCategory",EXPANDED_PANEL_CONTENT_CATEGORY_EMPTY:"expandedPanelContentCategoryEmpty",EXPANDED_PANEL_CONTENT_CATEGORY_HEADER:"expandedPanelContentCategoryHeader",EXPANDED_PANEL_CONTENT_CATEGORY_ITEM:"expandedPanelContentCategoryItem",EXPANDED_PANEL_CONTENT_HEADER:"expandedPanelContentHeader",EXPAND_BUTTON:"expandButton",FILTER_GROUPING:"filterGrouping",GROUPING_PANEL:"groupingPanel",HEADER:"header",HELP_TEXT:"helpText",ICON:"icon",INVALID_PARAMS:"invalidParams",LABEL:"label",MAIN_BUTTON:"mainButton",NAME:"name",NAME_CONTAINER:"nameContainer",ONBOARDING:"onboarding",PAGINATION_NEXT:"paginationNext",PAGINATION_PREV:"paginationPrev",PANEL:"panel",PERSISTENT_FILTER:"persistentFilter",PINNED:"pinned",POPPER:"popper",SEARCH_BUTTON:"searchButton",SECONDARY_ACTION:"secondaryAction",SEARCH_BUTTON_TOOLTIP:"searchButtonTooltip",SEARCH_FIELD:"searchField",SELECTION_COMPONENT:"selectionComponent",SIDEBAR:"sidebar",SIDEBAR_BUTTON:"sidebarButton",STATUS_MESSAGE:"statusMessage",TABLE:"table",TERTIARY_ACTION:"tertiaryAction",TABLE_ROW:"tableRow",TITLE:"title",USER_FILTER:"userFilter",UT_RICH_TEXT:"UTRichText",UT_SNACKBAR:"UTSnackbar",VALIDATION_DATA:"validationData",WORKFLOW_CONTAINER:"workflowContainer"},TEST_IDS=exports.TEST_IDS={barChart:{bar:{tooltip:"barChart.bar.tooltip."},xAxis:{secondaryLabel:"barChart.xAxis.secondaryLabel.",mainLabel:"barChart.xAxis.mainLabel."}},breadcrumbs:{item:"breadcrumbs.item"},creditCard:{cardField:"".concat(ID_CONSTANTS.CREDIT_CARD,".cardField"),cvcField:"".concat(ID_CONSTANTS.CREDIT_CARD,".cvcField"),expires:"".concat(ID_CONSTANTS.CREDIT_CARD,".expires"),nameField:"".concat(ID_CONSTANTS.CREDIT_CARD,".nameField")},dataCategory:{container:"".concat(ID_CONSTANTS.DATA_CATEGORY,".container"),collapseButton:"".concat(ID_CONSTANTS.DATA_CATEGORY,".collapseButton"),item:"".concat(ID_CONSTANTS.DATA_CATEGORY,".item")},dataElement:{container:"".concat(ID_CONSTANTS.DATA_ELEMENT,".container"),collapseButton:"".concat(ID_CONSTANTS.DATA_ELEMENT,".collapseButton"),switchAction:"".concat(ID_CONSTANTS.DATA_ELEMENT,".actionSwitch"),buttonAction:"".concat(ID_CONSTANTS.DATA_ELEMENT,".actionButton")},dialog:{acceptButton:"".concat(ID_CONSTANTS.DIALOG,".acceptButton"),cancelButton:"".concat(ID_CONSTANTS.DIALOG,".cancelButton"),closeButton:"".concat(ID_CONSTANTS.DIALOG,".closeButton"),title:"".concat(ID_CONSTANTS.DIALOG,".title")},filterGrouping:{groupingPanel:{collapsedPanelContent:{expandButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.COLLAPSED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPAND_BUTTON)},expandedPanelContent:{expandedPanelContentCategory:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_CATEGORY),expandedPanelContentHeader:{addFilterButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.ADD_FILTER_BUTTON),collapseButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.COLLAPSE_BUTTON),collapseButtonTooltip:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.COLLAPSE_BUTTON_TOOLTIP),customSearchAction:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.CUSTOM_SEARCH_ACTION),searchButton:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_BUTTON),searchButtonTooltip:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_BUTTON_TOOLTIP),searchField:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.SEARCH_FIELD),title:"".concat(ID_CONSTANTS.FILTER_GROUPING,".").concat(ID_CONSTANTS.GROUPING_PANEL,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT,".").concat(ID_CONSTANTS.EXPANDED_PANEL_CONTENT_HEADER,".").concat(ID_CONSTANTS.TITLE)}}}},onboarding:{close:"".concat(ID_CONSTANTS.ONBOARDING,".close"),description:"".concat(ID_CONSTANTS.ONBOARDING,".description"),nextButton:"".concat(ID_CONSTANTS.ONBOARDING,".nextButton"),prevButton:"".concat(ID_CONSTANTS.ONBOARDING,".prevButton"),title:"".concat(ID_CONSTANTS.ONBOARDING,".title")},panel:{additionalContent:{body:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT_BODY),sidebar:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.SIDEBAR),sidebarButton:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.ADDITIONAL_CONTENT,".").concat(ID_CONSTANTS.SIDEBAR_BUTTON,".")},backButton:"".concat(ID_CONSTANTS.PANEL,".backButton"),closeButton:"".concat(ID_CONSTANTS.PANEL,".closeButton"),mainAction:"".concat(ID_CONSTANTS.PANEL,".mainAction"),mainButton:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.MAIN_BUTTON),paginationNext:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.PAGINATION_NEXT),paginationPrev:"".concat(ID_CONSTANTS.PANEL,".").concat(ID_CONSTANTS.PAGINATION_PREV),secondaryAction:"".concat(ID_CONSTANTS.PANEL,".secondaryAction"),title:"".concat(ID_CONSTANTS.PANEL,".title")},signature:"signature",snackBar:{closeButton:"snackbar.closeButton",label:"snackbar.label"},statusMessage:{chip:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".chip"),description:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".description"),flag:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".flag"),helperText:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".helperText"),icon:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".icon"),title:"".concat(ID_CONSTANTS.STATUS_MESSAGE,".title")},table:{tableHeader:{title:"".concat(ID_CONSTANTS.TABLE,".tableHeader.title")}},tabs:{tab:"tabs.tab."},wrapperObservation:{actionIcon:"wrapperObservation.actionIcon."},UTLoading:{logoLoader:"UTLoading.logoLoader",spinner:"UTLoading.spinner"},UTRichText:{content:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".content"),field:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".field"),helpText:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.HELP_TEXT),label:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.LABEL),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".root"),submitButton:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".submitButton"),tableToolbar:{addColumnAfter:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addColumnAfter"),addColumnBefore:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addColumnBefore"),addRowAfter:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.addRowAfter"),deleteColumn:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteColumn"),deleteRow:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteRow"),deleteTable:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.deleteTable"),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".tableToolbar.root")},toolbar:{bold:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.bold"),italic:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.italic"),list:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.list"),listNumbers:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.listNumbers"),root:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.root"),table:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".toolbar.table")},validation:"".concat(ID_CONSTANTS.UT_RICH_TEXT,".").concat(ID_CONSTANTS.VALIDATION_DATA)},UTSnackbar:{closeButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".closeButton"),description:"".concat(ID_CONSTANTS.UT_SNACKBAR,".description"),label:"".concat(ID_CONSTANTS.UT_SNACKBAR,".label"),primaryActionButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".primaryActionButton"),root:"".concat(ID_CONSTANTS.UT_SNACKBAR,".root"),secondaryActionButton:"".concat(ID_CONSTANTS.UT_SNACKBAR,".secondaryActionButton")},UTDatePickerV1TestID:{calendar:"UTDatePickerV1.calendar",calendarPrevBtn:"UTDatePickerV1.calendarPrevBtn",calendarNextBtn:"UTDatePickerV1.calendarNextBtn",calendarMonthYear:"UTDatePickerV1.calendarMonthYear"},workflowContainer:{bottomNav:{backButton:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".backButton"),nextButton:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".nextButton"),primaryAction:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".primaryAction"),secondaryAction:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.BOTTOM_NAV,".secondaryAction")},header:{helpText:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".helpText"),requiredFieldInfo:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".requiredFieldInfo"),subtitle:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".subtitle"),tagline:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".tagline"),title:"".concat(ID_CONSTANTS.WORKFLOW_CONTAINER,".").concat(ID_CONSTANTS.HEADER,".title")}}};
@@ -1 +1 @@
1
- function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_extends.apply(null,arguments)}import React,{Fragment,memo,useState}from"react";import isEmpty from"lodash/isEmpty";import{arrayOf,bool,elementType,func,number,oneOf,oneOfType,shape,string}from"prop-types";import UTButton from"../../../UTButton";import UTButtonGroup from"../../../UTButtonGroup";import UTMenu from"../../../UTMenu";import UTTooltip from"../../../UTTooltip";import{HEADER_ACTIONS_VARIANTS,PLACE_SELF_TYPES}from"../../constants";import{processActions}from"./utils";import styles from"./styles.module.scss";const HeaderActions=e=>{var t,o;let{headerActions:n,headerActionsProps:r,setMainActionHoverVisible:s}=e;const[a,i]=useState(),[l,c]=useState(null===(t=n.find(e=>{let{selectedDefault:t}=e;return t}))||void 0===t?void 0:t.id),p=r.variant===HEADER_ACTIONS_VARIANTS.BUTTON_GROUP,{colorTheme:m="secondary",shape:u}=(null==r?void 0:r.buttonGroupProps)||{},T=()=>s(!0),d=()=>{T(),i()},{primaryActions:E,secondaryActions:A}=processActions(n,p?null:d),f=(null==r?void 0:r.buttonSize)||"medium";return React.createElement("div",{className:"".concat(styles.headerActionsContainer," ").concat(styles["placeSelf-".concat(r.alignment)]),onClick:e=>e.stopPropagation(),onMouseEnter:()=>s(!1),onMouseLeave:T},E.map(e=>React.createElement(UTTooltip,{tippyProps:{appendTo:()=>document.body,interactive:!1},content:e.label&&React.createElement("span",null,e.label)},React.createElement("div",null,React.createElement(UTButton,_extends({},e,{classNames:{root:styles.zIndex},size:f,variant:"text"}),e.title)))),!isEmpty(A)&&(p?React.createElement(UTButtonGroup,{actions:A.map(e=>({...e,onClick:()=>{c(e.id),e.onClick()}})),colorTheme:m,selected:l||(null===(o=A[0])||void 0===o?void 0:o.id),shape:u}):React.createElement(React.Fragment,null,React.createElement(UTMenu,{anchor:a,iconBefore:!0,items:A,menuPlacement:"bottom-end",onClose:d,scrollBarProps:{options:{suppressScrollY:!0,suppressScrollX:!0}}}),React.createElement(UTButton,{classNames:{root:styles.zIndex},Icon:"IconDots",onClick:e=>{e.stopPropagation(),a?i():i(e.currentTarget)},size:"medium",variant:"text"}))))};HeaderActions.propTypes={headerActions:arrayOf(shape({Icon:oneOfType([elementType,string]),id:oneOfType([number,string]),isPrimary:bool,title:string,label:string,loading:bool,onClick:func,selectedDefault:bool})),headerActionsProps:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),buttonGroupProps:shape({colorTheme:string,shape:string}),variant:oneOf([HEADER_ACTIONS_VARIANTS.DEFAULT,HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),setMainActionHoverVisible:func};export default memo(HeaderActions);
1
+ function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)({}).hasOwnProperty.call(o,n)&&(e[n]=o[n])}return e},_extends.apply(null,arguments)}import React,{Fragment,memo,useState}from"react";import isEmpty from"lodash/isEmpty";import{arrayOf,bool,elementType,func,number,oneOf,oneOfType,shape,string}from"prop-types";import UTButton from"../../../UTButton";import UTButtonGroup from"../../../UTButtonGroup";import UTMenu from"../../../UTMenu";import UTTooltip from"../../../UTTooltip";import{HEADER_ACTIONS_VARIANTS,PLACE_SELF_TYPES}from"../../constants";import{processActions}from"./utils";import styles from"./styles.module.scss";const HeaderActions=e=>{var t,o;let{headerActions:n,headerActionsProps:r,setMainActionHoverVisible:s}=e;const[a,i]=useState(),[l,c]=useState(null===(t=n.find(e=>{let{selectedDefault:t}=e;return t}))||void 0===t?void 0:t.id),p=r.variant===HEADER_ACTIONS_VARIANTS.BUTTON_GROUP,{colorTheme:m="secondary",shape:u,size:T}=(null==r?void 0:r.buttonGroupProps)||{},d=()=>s(!0),E=()=>{d(),i()},{primaryActions:A,secondaryActions:f}=processActions(n,p?null:E),y=(null==r?void 0:r.buttonSize)||"medium";return React.createElement("div",{className:"".concat(styles.headerActionsContainer," ").concat(styles["placeSelf-".concat(r.alignment)]),onClick:e=>e.stopPropagation(),onMouseEnter:()=>s(!1),onMouseLeave:d},A.map(e=>React.createElement(UTTooltip,{tippyProps:{appendTo:()=>document.body,interactive:!1},content:e.label&&React.createElement("span",null,e.label)},React.createElement("div",null,React.createElement(UTButton,_extends({},e,{classNames:{root:styles.zIndex},size:y,variant:"text"}),e.title)))),!isEmpty(f)&&(p?React.createElement(UTButtonGroup,{actions:f.map(e=>({...e,onClick:()=>{c(e.id),e.onClick()}})),colorTheme:m,selected:l||(null===(o=f[0])||void 0===o?void 0:o.id),shape:u,size:T}):React.createElement(React.Fragment,null,React.createElement(UTMenu,{anchor:a,iconBefore:!0,items:f,menuPlacement:"bottom-end",onClose:E,scrollBarProps:{options:{suppressScrollY:!0,suppressScrollX:!0}}}),React.createElement(UTButton,{classNames:{root:styles.zIndex},Icon:"IconDots",onClick:e=>{e.stopPropagation(),a?i():i(e.currentTarget)},size:"medium",variant:"text"}))))};HeaderActions.propTypes={headerActions:arrayOf(shape({Icon:oneOfType([elementType,string]),id:oneOfType([number,string]),isPrimary:bool,title:string,label:string,loading:bool,onClick:func,selectedDefault:bool})),headerActionsProps:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),buttonGroupProps:shape({colorTheme:string,shape:string}),variant:oneOf([HEADER_ACTIONS_VARIANTS.DEFAULT,HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),setMainActionHoverVisible:func};export default memo(HeaderActions);
@@ -1 +1 @@
1
- function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)({}).hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},_extends.apply(null,arguments)}import React,{memo,useState}from"react";import{arrayOf,bool,elementType,func,number,object,objectOf,oneOf,oneOfType,shape,string}from"prop-types";import{isEmpty}from"@widergy/web-utils/lib/array";import{objectIsEmpty}from"@widergy/web-utils/lib/object";import UTTouchableWithoutFeedback from"../UTTouchableWithoutFeedback";import BottomActions from"./components/BottomActions";import AdditionalMessage from"./components/AdditionalMessage";import Header from"./components/Header";import{ACTION_TYPES,HEADER_ACTIONS_VARIANTS,PLACE_SELF_TYPES,SIZES}from"./constants";import styles from"./styles.module.scss";const UTActionCard=t=>{let{additionalMessage:e,adornment:n,BackgroundImage:a,bottomActions:o,bottomActionsVariant:s,children:i,classNames:r={},description:c,descriptionProps:l={},headerActions:d,headerActionsProps:m={variant:HEADER_ACTIONS_VARIANTS.DEFAULT},hideHeader:E=!1,mainAction:p,size:T=SIZES.MEDIUM,status:A,statusAlignment:g,statusLabel:u,testIds:b={},title:h,titleProps:S={},withBodyPadding:P=!0}=t;const[y,I]=useState(!0),{backgroundDataTestId:_,containerDataTestId:f,statusDataTestId:C}=b;return React.createElement("div",{className:"".concat(styles.cardContainer," ").concat(r.container)},React.createElement(UTTouchableWithoutFeedback,{className:"".concat(styles.innerContainer," ").concat(r.innerContainer," ").concat(p?"".concat(styles.withMainAction," ").concat(y&&"".concat(styles.mainActionHover," ").concat(r.mainActionHover)):styles.withoutMainAction),dataTestId:f,onClick:()=>null==p?void 0:p()},a&&React.createElement(a,{className:"".concat(styles.backgroundImage," ").concat(r.backgroundImage),"data-testid":_}),React.createElement("div",{className:"".concat(styles.headerAndChildrenContainer," ").concat(r.headerAndChildrenContainer)},!E&&React.createElement(Header,{adornment:n,classNames:r,description:c,descriptionProps:l,headerActions:d,headerActionsProps:m,mainAction:p,setMainActionHoverVisible:I,size:T,status:A,statusAlignment:g,statusDataTestId:C,statusLabel:u,title:h,titleProps:S}),i&&React.createElement("div",{className:"".concat(E?styles.withoutHeader:""," ").concat(P?styles["bodyPadding-".concat(T)]:styles["withoutBodyPadding-".concat(T)])},i))),!objectIsEmpty(e)&&React.createElement(AdditionalMessage,_extends({},e,{size:T})),!isEmpty(o)&&React.createElement(BottomActions,{actions:o,bottomActionsVariant:s,size:T}))};UTActionCard.propTypes={additionalMessage:shape({Icon:elementType,iconProps:shape({colorTheme:string,size:string}),labelProps:shape({colorTheme:string,variant:string}),message:string}),adornment:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),position:string,props:object,type:string}),BackgroundImage:elementType,bottomActions:arrayOf(shape({colorTheme:string,disabled:bool,Icon:elementType,label:string,loading:bool,onClick:func})),bottomActionsVariant:oneOf([ACTION_TYPES.DEFAULT,ACTION_TYPES.REDIRECTION]),classNames:objectOf(string),description:string,descriptionProps:shape({colorTheme:string,variant:string}),headerActions:arrayOf(shape({Icon:oneOfType([elementType,string]),iconProps:string,id:oneOfType([number,string]),label:string,loading:bool,onClick:func})),headerActionsProps:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),buttonGroupProps:shape({colorTheme:string,shape:string}),variant:oneOf([HEADER_ACTIONS_VARIANTS.DEFAULT,HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),hideHeader:bool,mainAction:func,size:oneOf([SIZES.MEDIUM,SIZES.SMALL]),status:string,statusLabel:string,statusAlignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),testIds:shape({backgroundDataTestId:string,containerDataTestId:string,statusDataTestId:string}),title:string,titleProps:shape({variant:string,weight:string}),withBodyPadding:bool};export default memo(UTActionCard);
1
+ function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var a in n)({}).hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},_extends.apply(null,arguments)}import React,{memo,useState}from"react";import{arrayOf,bool,elementType,func,number,object,objectOf,oneOf,oneOfType,shape,string}from"prop-types";import{isEmpty}from"@widergy/web-utils/lib/array";import{objectIsEmpty}from"@widergy/web-utils/lib/object";import UTTouchableWithoutFeedback from"../UTTouchableWithoutFeedback";import BottomActions from"./components/BottomActions";import AdditionalMessage from"./components/AdditionalMessage";import Header from"./components/Header";import{ACTION_TYPES,HEADER_ACTIONS_VARIANTS,PLACE_SELF_TYPES,SIZES}from"./constants";import styles from"./styles.module.scss";const UTActionCard=t=>{let{additionalMessage:e,adornment:n,BackgroundImage:a,bottomActions:o,bottomActionsVariant:s,children:i,classNames:r={},description:c,descriptionProps:l={},headerActions:d,headerActionsProps:m={variant:HEADER_ACTIONS_VARIANTS.DEFAULT},hideHeader:E=!1,mainAction:p,size:T=SIZES.MEDIUM,status:A,statusAlignment:g,statusLabel:u,testIds:b={},title:h,titleProps:S={},withBodyPadding:P=!0}=t;const[y,I]=useState(!0),{backgroundDataTestId:_,containerDataTestId:f,statusDataTestId:C}=b;return React.createElement("div",{className:"".concat(styles.cardContainer," ").concat(r.container)},React.createElement(UTTouchableWithoutFeedback,{className:"".concat(styles.innerContainer," ").concat(r.innerContainer," ").concat(p?"".concat(styles.withMainAction," ").concat(y&&"".concat(styles.mainActionHover," ").concat(r.mainActionHover)):styles.withoutMainAction),dataTestId:f,onClick:()=>null==p?void 0:p()},a&&React.createElement(a,{className:"".concat(styles.backgroundImage," ").concat(r.backgroundImage),"data-testid":_}),React.createElement("div",{className:"".concat(styles.headerAndChildrenContainer," ").concat(r.headerAndChildrenContainer)},!E&&React.createElement(Header,{adornment:n,classNames:r,description:c,descriptionProps:l,headerActions:d,headerActionsProps:m,mainAction:p,setMainActionHoverVisible:I,size:T,status:A,statusAlignment:g,statusDataTestId:C,statusLabel:u,title:h,titleProps:S}),i&&React.createElement("div",{className:"".concat(E?styles.withoutHeader:""," ").concat(P?styles["bodyPadding-".concat(T)]:styles["withoutBodyPadding-".concat(T)])},i))),!objectIsEmpty(e)&&React.createElement(AdditionalMessage,_extends({},e,{size:T})),!isEmpty(o)&&React.createElement(BottomActions,{actions:o,bottomActionsVariant:s,size:T}))};UTActionCard.propTypes={additionalMessage:shape({Icon:elementType,iconProps:shape({colorTheme:string,size:string}),labelProps:shape({colorTheme:string,variant:string}),message:string}),adornment:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),position:string,props:object,type:string}),BackgroundImage:elementType,bottomActions:arrayOf(shape({colorTheme:string,disabled:bool,Icon:elementType,label:string,loading:bool,onClick:func})),bottomActionsVariant:oneOf([ACTION_TYPES.DEFAULT,ACTION_TYPES.REDIRECTION]),classNames:objectOf(string),description:string,descriptionProps:shape({colorTheme:string,variant:string}),headerActions:arrayOf(shape({Icon:oneOfType([elementType,string]),iconProps:string,id:oneOfType([number,string]),label:string,loading:bool,onClick:func})),headerActionsProps:shape({alignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),buttonGroupProps:shape({colorTheme:string,shape:string,size:string}),variant:oneOf([HEADER_ACTIONS_VARIANTS.DEFAULT,HEADER_ACTIONS_VARIANTS.BUTTON_GROUP])}),hideHeader:bool,mainAction:func,size:oneOf([SIZES.MEDIUM,SIZES.SMALL]),status:string,statusLabel:string,statusAlignment:oneOf([PLACE_SELF_TYPES.CENTER,PLACE_SELF_TYPES.END,PLACE_SELF_TYPES.START]),testIds:shape({backgroundDataTestId:string,containerDataTestId:string,statusDataTestId:string}),title:string,titleProps:shape({variant:string,weight:string}),withBodyPadding:bool};export default memo(UTActionCard);
@@ -1 +1 @@
1
- import UTIcon from"../UTIcon";import UTAvatar from"../UTAvatar";export const CHIP_VARIANT={DEFAULT:"default",OUTLINE:"outline"};export const CHIP_SIZES={MEDIUM:"medium",SMALL:"small"};export const ADORNMENT_TYPES={ICON:"icon",AVATAR:"avatar",IMAGE:"image"};export const ADORNMENT_COMPONENT_MAPPER={[ADORNMENT_TYPES.ICON]:UTIcon,[ADORNMENT_TYPES.AVATAR]:UTAvatar,[ADORNMENT_TYPES.IMAGE]:"img"};
1
+ import UTIcon from"../UTIcon";import UTAvatar from"../UTAvatar";export const CHIP_VARIANT={DEFAULT:"default",OUTLINE:"outline",SOLID:"solid"};export const DEFAULT_COLOR=null;export const CHIP_SIZES={MEDIUM:"medium",SMALL:"small"};export const CHIP_ICON_SIZE={[CHIP_SIZES.MEDIUM]:"var(--UT-chip-icon-size-md, 20px)",[CHIP_SIZES.SMALL]:"var(--UT-chip-icon-size-sm, 16px)"};export const ADORNMENT_TYPES={ICON:"icon",AVATAR:"avatar",IMAGE:"image"};export const ADORNMENT_COMPONENT_MAPPER={[ADORNMENT_TYPES.ICON]:UTIcon,[ADORNMENT_TYPES.AVATAR]:UTAvatar,[ADORNMENT_TYPES.IMAGE]:"img"};
@@ -1 +1 @@
1
- function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)({}).hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},_extends.apply(null,arguments)}import React,{memo}from"react";import{bool,func,object,oneOf,shape,string}from"prop-types";import UTButton from"../UTButton";import UTLabel from"../UTLabel";import{getItemsProps}from"./utils";import{ADORNMENT_TYPES,CHIP_SIZES,CHIP_VARIANT}from"./constants";import styles from"./styles.module.scss";const UTChip=t=>{let{active:e,adornment:n,children:o,dataTestId:a,disabled:s,isDragging:r,onClick:i,onClose:c,size:l=CHIP_SIZES.MEDIUM,variant:p=CHIP_VARIANT.DEFAULT}=t;const{Adornment:m,adornmentProps:d,buttonProps:I,Container:T,containerProps:E,labelProps:g}=getItemsProps({active:e,adornment:n,dataTestId:a,disabled:s,isDragging:r,onClick:i,size:l,variant:p}),A=c?t=>{t.stopPropagation(),c(t)}:void 0;return React.createElement(T,_extends({className:"\n ".concat(styles.chipContainer,"\n ").concat(styles[l],"\n ").concat(styles[p],"\n ").concat(e?styles.active:"","\n ").concat(s?styles.disabled:"","\n ").concat(r?styles.dragging:"","\n ").concat(i&&!s?styles.interactive:styles.nonInteractive,"\n ")},E),m&&React.createElement(m,d),React.createElement(UTLabel,g,o),A&&React.createElement(UTButton,_extends({},I,{Icon:"IconX",onClick:A,size:"small",variant:"text"})))};UTChip.propTypes={active:bool,adornment:shape({props:object,type:oneOf([ADORNMENT_TYPES.ICON,ADORNMENT_TYPES.AVATAR,ADORNMENT_TYPES.IMAGE])}),dataTestId:string,disabled:bool,isDragging:bool,onClick:func,onClose:func,size:oneOf([CHIP_SIZES.MEDIUM,CHIP_SIZES.SMALL]),variant:oneOf([CHIP_VARIANT.DEFAULT,CHIP_VARIANT.OUTLINE])};export default memo(UTChip);
1
+ function _extends(){return _extends=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)({}).hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},_extends.apply(null,arguments)}import React,{memo}from"react";import{bool,func,object,oneOf,shape,string}from"prop-types";import UTButton from"../UTButton";import UTLabel from"../UTLabel";import{getColorStyle,getItemsProps}from"./utils";import{ADORNMENT_TYPES,CHIP_SIZES,CHIP_VARIANT,DEFAULT_COLOR}from"./constants";import styles from"./styles.module.scss";const UTChip=t=>{let{active:e,adornment:o,children:n,color:r=DEFAULT_COLOR,dataTestId:s,disabled:a,isDragging:l,onClick:i,onClose:c,size:p=CHIP_SIZES.MEDIUM,textColor:T,variant:m=CHIP_VARIANT.DEFAULT}=t;const I=getColorStyle({color:r,textColor:T,variant:m}),{Adornment:d,adornmentProps:C,buttonProps:g,Container:A,containerProps:E,labelProps:P}=getItemsProps({active:e,adornment:o,dataTestId:s,disabled:a,isDragging:l,onClick:i,resolvedTextColor:I.color,size:p,variant:m}),_=c?t=>{t.stopPropagation(),c(t)}:void 0;return React.createElement(A,_extends({className:"\n ".concat(styles.chipContainer,"\n ").concat(styles[p],"\n ").concat(styles[m],"\n ").concat(e?styles.active:"","\n ").concat(a?styles.disabled:"","\n ").concat(l?styles.dragging:"","\n ").concat(i&&!a?styles.interactive:styles.nonInteractive,"\n "),style:I},E),d&&React.createElement(d,C),React.createElement(UTLabel,P,n),_&&React.createElement(UTButton,_extends({},g,{Icon:"IconX",onClick:_,size:"small",variant:"text"})))};UTChip.propTypes={active:bool,adornment:shape({props:object,type:oneOf([ADORNMENT_TYPES.ICON,ADORNMENT_TYPES.AVATAR,ADORNMENT_TYPES.IMAGE])}),color:string,dataTestId:string,disabled:bool,isDragging:bool,onClick:func,onClose:func,size:oneOf([CHIP_SIZES.MEDIUM,CHIP_SIZES.SMALL]),textColor:string,variant:oneOf([CHIP_VARIANT.DEFAULT,CHIP_VARIANT.OUTLINE,CHIP_VARIANT.SOLID])};export default memo(UTChip);
@@ -1,12 +1,13 @@
1
+ $dragging-shadow-color: rgba(0, 0, 0, 0.25);
2
+
1
3
  .chipContainer {
2
4
  align-items: center;
3
5
  border-style: solid;
4
- border-radius: 30px;
6
+ border-radius: var(--UT-chip-radius, 9999px);
5
7
  border-width: 1px;
6
8
  display: flex;
7
9
  flex-direction: row;
8
10
  flex-shrink: 0;
9
- grid-gap: 8px;
10
11
  transition:
11
12
  background-color 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
12
13
  box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1) 0ms,
@@ -17,11 +18,13 @@
17
18
  }
18
19
 
19
20
  .small {
20
- padding: 4px 8px;
21
+ gap: var(--UT-chip-gap-sm, 4px);
22
+ padding: var(--UT-chip-padding-y-sm, 4px) var(--UT-chip-padding-x-sm, 8px);
21
23
  }
22
24
 
23
25
  .medium {
24
- padding: 8px 12px;
26
+ gap: var(--UT-chip-gap-md, 8px);
27
+ padding: var(--UT-chip-padding-y-md, 8px) var(--UT-chip-padding-x-md, 12px);
25
28
  }
26
29
 
27
30
  .interactive {
@@ -49,7 +52,7 @@
49
52
 
50
53
  &.dragging {
51
54
  background-color: var(--light01);
52
- box-shadow: 0 4px 4px 0px rgba(0, 0, 0, 0.25);
55
+ box-shadow: 0 4px 4px 0 $dragging-shadow-color;
53
56
  }
54
57
 
55
58
  &:not(.dragging) {
@@ -83,7 +86,7 @@
83
86
 
84
87
  &.dragging {
85
88
  background-color: var(--light01);
86
- box-shadow: 0 4px 4px 0px rgba(0, 0, 0, 0.25);
89
+ box-shadow: 0 4px 4px 0 $dragging-shadow-color;
87
90
  }
88
91
 
89
92
  &:not(.dragging) {
@@ -100,8 +103,32 @@
100
103
  }
101
104
  }
102
105
 
106
+ .solid {
107
+ border-color: transparent;
108
+
109
+ &:not(.disabled) {
110
+ &:hover {
111
+ filter: brightness(0.92);
112
+ }
113
+
114
+ &.interactive {
115
+ &:active {
116
+ filter: brightness(0.85);
117
+ }
118
+ }
119
+
120
+ &.dragging {
121
+ box-shadow: 0 4px 4px 0 $dragging-shadow-color;
122
+ }
123
+ }
124
+
125
+ &.disabled {
126
+ opacity: 0.5;
127
+ }
128
+ }
129
+
103
130
  .imageAdornment {
104
- height: 24px;
131
+ height: var(--UT-chip-image-size, 24px);
105
132
  object-fit: cover;
106
- width: 24px;
133
+ width: var(--UT-chip-image-size, 24px);
107
134
  }
@@ -1 +1 @@
1
- import isEmpty from"lodash/isEmpty";import{COLOR_THEMES}from"../../constants/Palette";import{VARIANTS_NAMES}from"../UTLabel/constants";import UTTouchableWithoutFeedback from"../UTTouchableWithoutFeedback";import{ADORNMENT_COMPONENT_MAPPER,ADORNMENT_TYPES,CHIP_VARIANT,CHIP_SIZES}from"./constants";import styles from"./styles.module.scss";export const getTextColorTheme=t=>{let{active:e,disabled:a,isDragging:o,variant:r}=t;return!e||a||o?COLOR_THEMES.gray:r===CHIP_VARIANT.DEFAULT?COLOR_THEMES.light:COLOR_THEMES.accent};export const getButtonColorTheme=t=>{let{active:e,disabled:a,isDragging:o,variant:r}=t;return!e||a||o?COLOR_THEMES.gray:r===CHIP_VARIANT.DEFAULT?COLOR_THEMES.negative:COLOR_THEMES.primary};export const getTextVariant=t=>t===CHIP_SIZES.SMALL?VARIANTS_NAMES.SMALL:VARIANTS_NAMES.BODY;export const getDefaultAdornmentProps=t=>{var e;let{active:a,adornment:o,disabled:r,isDragging:i,variant:n}=t;return isEmpty(o)||!o.type?{}:o.type===ADORNMENT_TYPES.ICON?{...o.props,colorTheme:getTextColorTheme({active:a,disabled:r,isDragging:i,variant:n}),size:20}:o.type===ADORNMENT_TYPES.AVATAR?{...o.props,size:"small"}:o.type===ADORNMENT_TYPES.IMAGE?{...o.props,className:"".concat(styles.imageAdornment," ").concat((null===(e=o.props)||void 0===e?void 0:e.className)||"")}:{}};export const getItemsProps=t=>{let{active:e,adornment:a,dataTestId:o,disabled:r,isDragging:i,onClick:n,size:s,variant:T}=t;return{Adornment:null!=a&&a.type?ADORNMENT_COMPONENT_MAPPER[null==a?void 0:a.type]:null,adornmentProps:getDefaultAdornmentProps({active:e,adornment:a,disabled:r,variant:T}),Container:n&&!r?UTTouchableWithoutFeedback:"div",containerProps:n&&!r?{onClick:n,dataTestId:o}:{"data-testid":o},labelProps:{colorTheme:getTextColorTheme({active:e,disabled:r,isDragging:i,variant:T}),variant:getTextVariant(s)},buttonProps:{colorTheme:getButtonColorTheme({active:e,disabled:r,isDragging:i,variant:T})}}};
1
+ import isEmpty from"lodash/isEmpty";import{COLOR_THEMES}from"../../constants/Palette";import{CURRENT_COLOR}from"../UTIcon/constants";import{VARIANTS_NAMES}from"../UTLabel/constants";import UTTouchableWithoutFeedback from"../UTTouchableWithoutFeedback";import{ADORNMENT_COMPONENT_MAPPER,ADORNMENT_TYPES,CHIP_ICON_SIZE,CHIP_VARIANT,CHIP_SIZES}from"./constants";import styles from"./styles.module.scss";const GRADIENT_REGEX=/^linear-gradient\(([\s\S]+)\)$/i,splitTopLevel=t=>{const{parts:r,current:e}=t.split("").reduce((t,r)=>{const e=t.depth+("("===r?1:")"===r?-1:0);return","===r&&0===e?{parts:[...t.parts,t.current],current:"",depth:e}:{...t,current:t.current+r,depth:e}},{parts:[],current:"",depth:0});return e.trim()?[...r,e]:r};export const isGradientColor=t=>"string"==typeof t&&GRADIENT_REGEX.test(t.trim());const DIRECTION_REGEX=/^(-?\d+(?:\.\d+)?(?:deg|grad|rad|turn)|to\s)/i;export const parseLinearGradient=t=>{const r=isGradientColor(t)&&t.trim().match(GRADIENT_REGEX);if(!r)return null;const e=splitTopLevel(r[1]).map(t=>t.trim()),o=DIRECTION_REGEX.test(e[0]),n=o?e[0]:null,a=o?e.slice(1):e;return{direction:n,stops:a.map((t,r)=>{const e=t.trim().split(/\s+/),o=e[e.length-1],n=/%$/.test(o);return{color:n?e.slice(0,-1).join(" "):e.join(" "),offset:n?o:"".concat(r/Math.max(a.length-1,1)*100,"%")}})}};const getTintedGradient=(t,r)=>{const e=parseLinearGradient(t);if(!e)return null;const o=e.stops.map(t=>"color-mix(in srgb, ".concat(t.color," ").concat(r,"%, transparent) ").concat(t.offset)).join(", ");return"linear-gradient(".concat(e.direction?"".concat(e.direction,", "):"").concat(o,")")};export const getColorStyle=t=>{var r;let{color:e,textColor:o,variant:n}=t;if(!e&&!o)return{};const a=isGradientColor(e),i=a?null===(r=parseLinearGradient(e))||void 0===r||null===(r=r.stops[0])||void 0===r?void 0:r.color:e;return n===CHIP_VARIANT.SOLID?{...e&&(a?{backgroundImage:e}:{backgroundColor:e}),borderColor:"transparent",color:o||"#FFFFFF"}:n===CHIP_VARIANT.OUTLINE?{backgroundColor:"transparent",...i&&{borderColor:"color-mix(in srgb, ".concat(i," 40%, transparent)")},color:o||"var(--dark05)"}:{...a?{backgroundImage:getTintedGradient(e,14)}:i&&{backgroundColor:"color-mix(in srgb, ".concat(i," 14%, transparent)")},borderColor:"transparent",color:o||i}};export const getTextColorTheme=t=>{let{active:r,disabled:e,isDragging:o,variant:n}=t;return!r||e||o?COLOR_THEMES.gray:n===CHIP_VARIANT.DEFAULT?COLOR_THEMES.light:COLOR_THEMES.accent};export const getButtonColorTheme=t=>{let{active:r,disabled:e,isDragging:o,variant:n}=t;return!r||e||o?COLOR_THEMES.gray:n===CHIP_VARIANT.DEFAULT?COLOR_THEMES.negative:COLOR_THEMES.primary};export const getTextVariant=t=>t===CHIP_SIZES.SMALL?VARIANTS_NAMES.SMALL:VARIANTS_NAMES.BODY;export const getDefaultAdornmentProps=t=>{var r;let{active:e,adornment:o,disabled:n,isDragging:a,resolvedTextColor:i,size:s,variant:l}=t;return isEmpty(o)||!o.type?{}:o.type===ADORNMENT_TYPES.ICON?{...o.props,colorTheme:i?CURRENT_COLOR:getTextColorTheme({active:e,disabled:n,isDragging:a,variant:l}),size:CHIP_ICON_SIZE[s]}:o.type===ADORNMENT_TYPES.AVATAR?{...o.props,size:"small"}:o.type===ADORNMENT_TYPES.IMAGE?{...o.props,className:"".concat(styles.imageAdornment," ").concat((null===(r=o.props)||void 0===r?void 0:r.className)||"")}:{}};export const getItemsProps=t=>{let{active:r,adornment:e,dataTestId:o,disabled:n,isDragging:a,onClick:i,resolvedTextColor:s,size:l,variant:c}=t;return{Adornment:null!=e&&e.type?ADORNMENT_COMPONENT_MAPPER[null==e?void 0:e.type]:null,adornmentProps:getDefaultAdornmentProps({active:r,adornment:e,disabled:n,isDragging:a,resolvedTextColor:s,size:l,variant:c}),Container:i&&!n?UTTouchableWithoutFeedback:"div",containerProps:i&&!n?{onClick:i,dataTestId:o}:{"data-testid":o},labelProps:{colorTheme:s?void 0:getTextColorTheme({active:r,disabled:n,isDragging:a,variant:c}),style:s?{color:s}:void 0,variant:getTextVariant(l)},buttonProps:{colorTheme:getButtonColorTheme({active:r,disabled:n,isDragging:a,variant:c})}}};
@@ -1 +1 @@
1
- import React from"react";import{COLOR_SHADES,COLOR_THEMES}from"../../constants/Palette";var EnergyIconBottledGas=function(e){return React.createElement("svg",e,React.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.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.createElement("svg",e,React.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.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.createElement("svg",e,React.createElement("path",{d:"M0 0h24v24H0z",stroke:"none"}),React.createElement("path",{d:"M5 17H3v-6l2-5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0H9m-6-6h15m-6 0V6"}),React.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.createElement("svg",e,React.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.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.createElement("svg",e,React.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.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.createElement("svg",e,React.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.createElement("svg",e,React.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.createElement("svg",e,React.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.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.createElement("svg",e,React.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.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.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.createElement("svg",e,React.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.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.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.createElement("svg",e,React.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.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.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.createElement("svg",e,React.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.createElement("svg",e,React.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.createElement("path",{d:"M12 17.99v-3 3Z"}),React.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.createElement("svg",e,React.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.createElement("svg",e,React.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.createElement("svg",e,React.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.createElement("svg",e,React.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.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.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.createElement("svg",e,React.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.createElement("svg",e,React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.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.createElement("svg",e,React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.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.createElement("svg",e,React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.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.createElement("svg",e,React.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"};export const FILLED_ICON_COLOR="transparent";export const DEFAULT_INTERNAL_SHADE=COLOR_SHADES.shade02;export const DEFAULT_COLOR_THEME=COLOR_THEMES.dark;export const DEFAULT_VARIANT="default";export const FILLED_ICON_SUFIX="Filled";export const ENERGY_ICON_PREFIX="Energy";export const DEFAULT_ICON_SIZE=24;export const AREA_BORDER_WIDTH="1px";export const 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
+ import React from"react";import{COLOR_SHADES,COLOR_THEMES}from"../../constants/Palette";var EnergyIconBottledGas=function(e){return React.createElement("svg",e,React.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.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.createElement("svg",e,React.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.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.createElement("svg",e,React.createElement("path",{d:"M0 0h24v24H0z",stroke:"none"}),React.createElement("path",{d:"M5 17H3v-6l2-5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0H9m-6-6h15m-6 0V6"}),React.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.createElement("svg",e,React.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.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.createElement("svg",e,React.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.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.createElement("svg",e,React.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.createElement("svg",e,React.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.createElement("svg",e,React.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.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.createElement("svg",e,React.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.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.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.createElement("svg",e,React.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.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.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.createElement("svg",e,React.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.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.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.createElement("svg",e,React.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.createElement("svg",e,React.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.createElement("path",{d:"M12 17.99v-3 3Z"}),React.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.createElement("svg",e,React.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.createElement("svg",e,React.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.createElement("svg",e,React.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.createElement("svg",e,React.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.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.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.createElement("svg",e,React.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.createElement("svg",e,React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.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.createElement("svg",e,React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.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.createElement("svg",e,React.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),React.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.createElement("svg",e,React.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"};export const CURRENT_COLOR="currentColor";export const FILLED_ICON_COLOR="transparent";export const DEFAULT_INTERNAL_SHADE=COLOR_SHADES.shade02;export const DEFAULT_COLOR_THEME=COLOR_THEMES.dark;export const DEFAULT_VARIANT="default";export const FILLED_ICON_SUFIX="Filled";export const ENERGY_ICON_PREFIX="Energy";export const DEFAULT_ICON_SIZE=24;export const AREA_BORDER_WIDTH="1px";export const 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
- function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},_extends.apply(null,arguments)}import React,{Suspense}from"react";import WithTheme from"../WithTheme";import{iconPropTypes}from"../../types/iconTypes";import{getClassNames,getComponent,getIconProps,retrieveStyle}from"./theme";import{DEFAULT_VARIANT}from"./constants";const UTIcon=e=>{let{area:a,areaBackground:r,areaBorderColor:t,areaRadius:o,areaSize:s,classes:n,className:l,color:c,colorTheme:i,dataTestId:m,fillShade:p,fillTheme:d,name:h,shade:T,size:f,theme:u,variant:g=DEFAULT_VARIANT}=e;const y=getIconProps({area:a,areaBackground:r,areaBorderColor:t,areaRadius:o,areaSize:s,color:c,colorTheme:i,fillShade:p,fillTheme:d,name:h,shade:T,theme:u,size:f}),I=getClassNames({area:a,color:c,colorTheme:i,classes:n,className:l,size:f,variant:g}),S=getComponent(h);return S?React.createElement(Suspense,{fallback:null},React.createElement(S,_extends({className:I,"data-testid":m},y))):null};UTIcon.propTypes=iconPropTypes;export default WithTheme(retrieveStyle)(UTIcon);
1
+ function _extends(){return _extends=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var r=arguments[a];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},_extends.apply(null,arguments)}import React,{Suspense}from"react";import WithTheme from"../WithTheme";import{iconPropTypes}from"../../types/iconTypes";import{getClassNames,getComponent,getIconProps,retrieveStyle}from"./theme";import{DEFAULT_VARIANT}from"./constants";const UTIcon=e=>{let{area:a,areaBackground:r,areaBorderColor:t,areaRadius:o,areaSize:s,classes:n,className:l,color:c,colorTheme:i,dataTestId:m,fillShade:p,fillTheme:d,name:h,shade:T,size:f,theme:u,variant:g=DEFAULT_VARIANT}=e;const{areaStyle:y,...S}=getIconProps({area:a,areaBackground:r,areaBorderColor:t,areaRadius:o,areaSize:s,color:c,colorTheme:i,fillShade:p,fillTheme:d,name:h,shade:T,theme:u,size:f}),{container:v,icon:I}=getClassNames({area:a,color:c,colorTheme:i,classes:n,className:l,size:f,variant:g}),N=getComponent(h);if(!N)return null;const R=React.createElement(N,_extends({className:I,"data-testid":m},S));return React.createElement(Suspense,{fallback:null},a?React.createElement("div",{className:v,style:y},R):R)};UTIcon.propTypes=iconPropTypes;export default WithTheme(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
- import React from"react";import*as TablerIcons from"@tabler/icons-react";import{capitalize,getDefaultColorShade}from"../../utils/componentUtils";import countries from"../../constants/countries";import{ENERGY_ICONS,ENERGY_ICON_PREFIX,FILLED_ICON_COLOR,FILLED_ICON_SUFIX,DEFAULT_INTERNAL_SHADE,DEFAULT_COLOR_THEME,DEFAULT_ICON_SIZE,AREA_BORDER_WIDTH}from"./constants";import styles from"./styles.module.scss";import flagComponentMap from"./components/FlagsIcons/flagsComponents";const FLAG_CODES=new Set(countries.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=flagComponentMap[e];flagComponentCache[e]=t?React.lazy(t):null}return flagComponentCache[e]};export const retrieveColor=e=>{var t;let{colorTheme:o,shade:a,theme:r}=e;return(r.Palette[o]||(null===(t=r.Palette.actions)||void 0===t?void 0:t[o])||r.Palette[DEFAULT_COLOR_THEME])[a||getDefaultColorShade(o)]};const getAreaStyle=e=>{let{area:t,areaBackground:o,areaBorderColor:a,areaRadius:r,areaSize:n,resolvedSize:l}=e;if(!t)return{};const c=l||DEFAULT_ICON_SIZE;return{...n?{padding:Math.max((n-c)/2,0)}:{},...o&&{backgroundColor:o},...a&&{border:"".concat(AREA_BORDER_WIDTH," solid ").concat(a)},...void 0!==r&&{borderRadius:r}}};export const getIconProps=e=>{let{area:t,areaBackground:o,areaBorderColor:a,areaRadius:r,areaSize:n,color:l,colorTheme:c,fillShade:s,fillTheme:i,name:d,shade:m,size:h,style:C,theme:E}=e;const g=retrieveColor({colorTheme:l||c,theme:E,shade:m}),u=d.endsWith(FILLED_ICON_SUFIX),_=d.startsWith(ENERGY_ICON_PREFIX),I=FLAG_CODES.has(d),p=u?FILLED_ICON_COLOR:g,R=i&&retrieveColor({colorTheme:i,theme:E,shade:s||DEFAULT_INTERNAL_SHADE}),S=isCSSVar(h),A=S?void 0:h,T={stroke:p,...A&&{width:A,height:A}};return{style:{...u?{color:g}:C||{},...S?{width:h,height:h}:{},...getAreaStyle({area:t,areaBackground:o,areaBorderColor:a,areaRadius:r,areaSize:n,resolvedSize:A})},...R&&{fill:R},..._?T:I?{width:A||24,height:A||24}:{color:p,size:A},name:d}};const VARIANT_STYLE_MAPPER=function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}};export const getClassNames=e=>{let{area:t,color:o,colorTheme:a,classes:r,className:n,size:l,variant:c}=e;const s=VARIANT_STYLE_MAPPER(r)["".concat(a||o).concat(capitalize(c))];return"".concat(n," ").concat(styles.icon," ").concat(t&&"".concat(styles.withArea," ").concat(s," ").concat(styles["size".concat(l)]))};export const retrieveStyle=e=>{var t,o,a;let{color:r,colorTheme:n,shade:l,theme:c}=e;const s=retrieveColor({colorTheme:r||n,theme:c,shade:l}),i="".concat(AREA_BORDER_WIDTH," solid ").concat(s),d={accent:(null===(t=c.Palette.actions)||void 0===t?void 0:t.accent["01"])||c.Palette.accent["01"],dark:c.Palette.light["03"],error:c.Palette.error["01"],gray:c.Palette.light["03"],information:c.Palette.information["01"],light:c.Palette.light["03"],negative:(null===(o=c.Palette.actions)||void 0===o?void 0:o.negative["01"])||c.Palette.negative["01"],neutral:(null===(a=c.Palette.actions)||void 0===a?void 0:a.neutral["01"])||c.Palette.neutral["01"],success:c.Palette.success["01"],warning:c.Palette.warning["01"]};return Object.keys(d).reduce((e,t)=>(e["".concat(t,"Default")]={backgroundColor:d[t]},e["".concat(t,"Outlined")]={border:i},e),{})};export const getComponent=e=>ENERGY_ICONS[e]?ENERGY_ICONS[e]:TablerIcons[e]?TablerIcons[e]:FLAG_CODES.has(e)?getFlagComponent(e):null;
1
+ import React from"react";import*as TablerIcons from"@tabler/icons-react";import{capitalize,getDefaultColorShade}from"../../utils/componentUtils";import countries from"../../constants/countries";import{ENERGY_ICONS,ENERGY_ICON_PREFIX,CURRENT_COLOR,FILLED_ICON_COLOR,FILLED_ICON_SUFIX,DEFAULT_INTERNAL_SHADE,DEFAULT_COLOR_THEME,DEFAULT_ICON_SIZE,AREA_BORDER_WIDTH}from"./constants";import styles from"./styles.module.scss";import flagComponentMap from"./components/FlagsIcons/flagsComponents";const FLAG_CODES=new Set(countries.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=flagComponentMap[e];flagComponentCache[e]=t?React.lazy(t):null}return flagComponentCache[e]};export const retrieveColor=e=>{var t;let{colorTheme:o,shade:a,theme:r}=e;if(o===CURRENT_COLOR)return CURRENT_COLOR;return(r.Palette[o]||(null===(t=r.Palette.actions)||void 0===t?void 0:t[o])||r.Palette[DEFAULT_COLOR_THEME])[a||getDefaultColorShade(o)]};const getAreaStyle=e=>{let{area:t,areaBackground:o,areaBorderColor:a,areaRadius:r,areaSize:n,resolvedSize:l}=e;if(!t)return{};const c=l||DEFAULT_ICON_SIZE;return{...n?{padding:Math.max((n-c)/2,0)}:{},...o&&{backgroundColor:o},...a&&{border:"".concat(AREA_BORDER_WIDTH," solid ").concat(a)},...void 0!==r&&{borderRadius:r}}};export const getIconProps=e=>{let{area:t,areaBackground:o,areaBorderColor:a,areaRadius:r,areaSize:n,color:l,colorTheme:c,fillShade:s,fillTheme:i,name:C,shade:d,size:m,style:h,theme:E}=e;const _=retrieveColor({colorTheme:l||c,theme:E,shade:d}),u=C.endsWith(FILLED_ICON_SUFIX),R=C.startsWith(ENERGY_ICON_PREFIX),g=FLAG_CODES.has(C),I=u?FILLED_ICON_COLOR:_,O=i&&retrieveColor({colorTheme:i,theme:E,shade:s||DEFAULT_INTERNAL_SHADE}),p=isCSSVar(m),S=p?void 0:m,T={stroke:I,...S&&{width:S,height:S}};return{style:{...u?{color:_}:h||{},...p?{width:m,height:m}:{}},areaStyle:getAreaStyle({area:t,areaBackground:o,areaBorderColor:a,areaRadius:r,areaSize:n,resolvedSize:S}),...O&&{fill:O},...R?T:g?{width:S||24,height:S||24}:{color:I,size:S},name:C}};const VARIANT_STYLE_MAPPER=function(){return{...arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}};export const getClassNames=e=>{let{area:t,color:o,colorTheme:a,classes:r,className:n,size:l,variant:c}=e;const s=VARIANT_STYLE_MAPPER(r)["".concat(a||o).concat(capitalize(c))];return{icon:"".concat(n," ").concat(styles.icon),container:t?"".concat(styles.container," ").concat(styles.withArea," ").concat(s," ").concat(styles["size".concat(l)]):styles.container}};export const retrieveStyle=e=>{var t,o,a;let{color:r,colorTheme:n,shade:l,theme:c}=e;const s=retrieveColor({colorTheme:r||n,theme:c,shade:l}),i="".concat(AREA_BORDER_WIDTH," solid ").concat(s),C={accent:(null===(t=c.Palette.actions)||void 0===t?void 0:t.accent["01"])||c.Palette.accent["01"],dark:c.Palette.light["03"],error:c.Palette.error["01"],gray:c.Palette.light["03"],information:c.Palette.information["01"],light:c.Palette.light["03"],negative:(null===(o=c.Palette.actions)||void 0===o?void 0:o.negative["01"])||c.Palette.negative["01"],neutral:(null===(a=c.Palette.actions)||void 0===a?void 0:a.neutral["01"])||c.Palette.neutral["01"],success:c.Palette.success["01"],warning:c.Palette.warning["01"]};return Object.keys(C).reduce((e,t)=>(e["".concat(t,"Default")]={backgroundColor:C[t]},e["".concat(t,"Outlined")]={border:i},e),{})};export const getComponent=e=>ENERGY_ICONS[e]?ENERGY_ICONS[e]:TablerIcons[e]?TablerIcons[e]:FLAG_CODES.has(e)?getFlagComponent(e):null;
@@ -11,17 +11,12 @@
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  grid-gap: var(--UT-richText-gap);
14
- // En longhand y no en shorthand: sin los fallbacks, sass-lint lee los dos var()
15
- // como el mismo token y pide colapsarlos en uno solo.
16
14
  padding-bottom: var(--UT-richText-padding-y);
17
15
  padding-left: var(--UT-richText-padding-x);
18
16
  padding-right: var(--UT-richText-padding-x);
19
17
  padding-top: var(--UT-richText-padding-y);
20
18
  }
21
19
 
22
- // El foco engrosa el borde a 2px con un box-shadow interior en vez de subir el
23
- // border-width. El shadow no participa del layout, así que el padding no necesita
24
- // compensar nada y el contenido no se corre al enfocar.
25
20
  .fieldFocused {
26
21
  border-color: var(--actionAccent04);
27
22
  box-shadow: inset 0 0 0 1px var(--actionAccent04);
@@ -30,8 +25,6 @@
30
25
  .fieldError {
31
26
  border-color: var(--actionError04);
32
27
 
33
- // Con error el anillo de foco toma el color de error, para no mezclar dos
34
- // colores en el mismo borde.
35
28
  &.fieldFocused {
36
29
  box-shadow: inset 0 0 0 1px var(--actionError04);
37
30
  }
@@ -48,22 +41,19 @@
48
41
  padding-right: 0;
49
42
  }
50
43
 
51
- // El área de scroll y el wrapper que monta Tiptap se estiran para que el
52
- // contenteditable ocupe todo el espacio disponible, y no solo el alto de su
53
- // contenido. Así el espacio vacío debajo del texto ES área editable: clickear ahí
54
- // enfoca de forma nativa y ProseMirror pone el cursor en la posición más cercana,
55
- // sin ningún handler de JS.
56
44
  .scrollArea {
57
45
  display: flex;
58
46
  flex-direction: column;
59
47
  max-height: var(--UT-richText-content-max-height);
60
48
  min-height: var(--UT-richText-content-min-height);
49
+ overflow-x: hidden;
61
50
  overflow-y: auto;
62
51
  }
63
52
 
64
53
  .editorWrapper {
65
54
  display: flex;
66
55
  flex: 1 1 auto;
56
+ min-width: 0;
67
57
  }
68
58
 
69
59
  .helpText {
@@ -75,6 +65,7 @@
75
65
  flex: 1 1 auto;
76
66
  font-size: var(--UT-richText-body-size);
77
67
  line-height: var(--UT-richText-body-lh);
68
+ min-width: 0;
78
69
  outline: none;
79
70
 
80
71
  p {
@@ -87,9 +78,6 @@
87
78
  padding-left: var(--UT-richText-list-indent);
88
79
  }
89
80
 
90
- // Separación entre bloques hermanos del documento (párrafo ↔ párrafo,
91
- // párrafo ↔ lista). Solo hijos directos: los párrafos dentro de un li no
92
- // llevan margen.
93
81
  > * + * {
94
82
  margin-top: var(--UT-richText-block-gap);
95
83
  }
@@ -107,14 +95,14 @@
107
95
  text-decoration: underline;
108
96
  }
109
97
 
110
- // --- Estilos de tabla ---
111
- // Applies only to tables rendered inside the editor (not in email output, which uses
112
- // inline styles via the `style` attribute set by buildTableNode / EnergyTable*).
113
-
114
- // Wrapper generado por Tiptap cuando resizable:true. Scroll horizontal cuando la
115
- // tabla supera el ancho del contenedor.
116
98
  :global(.tableWrapper) {
117
99
  overflow-x: auto;
100
+ overflow-y: hidden;
101
+ // sass-lint 1.12 es anterior a estas dos propiedades y las lee como mal escritas.
102
+ // sass-lint:disable no-misspelled-properties
103
+ scrollbar-color: var(--light04) transparent;
104
+ scrollbar-width: thin;
105
+ // sass-lint:enable no-misspelled-properties
118
106
 
119
107
  & + * {
120
108
  margin-top: var(--UT-textEditor-block-gap, 8px);
@@ -192,8 +180,6 @@
192
180
  }
193
181
  }
194
182
 
195
- // Column resize handle — spans the full column height by extending beyond the cell
196
- // boundaries with large top/bottom values (td/th don't clip overflow by default).
197
183
  :global(.column-resize-handle) {
198
184
  background-color: var(--actionAccent04);
199
185
  bottom: -9999px;
@@ -207,12 +193,10 @@
207
193
  z-index: 10;
208
194
  }
209
195
 
210
- // Cursor de redimensionado activo.
211
196
  :global(.resize-cursor) {
212
197
  cursor: col-resize;
213
198
  }
214
199
 
215
- // Tiptap selection highlight on cells.
216
200
  .selectedCell {
217
201
  &::after {
218
202
  background: var(--actionAccent01);
@@ -224,9 +208,6 @@
224
208
  }
225
209
  }
226
210
 
227
- // Única clase global necesaria: la genera la extensión Placeholder de Tiptap,
228
- // así que CSS Modules la hashearía y la regla no aplicaría. Va anidada dentro
229
- // de .editorContent, así que no se filtra fuera del editor.
230
211
  :global(.is-editor-empty) {
231
212
  &:first-child {
232
213
  &::before {
@@ -1 +1 @@
1
- import{generateHTML}from"@tiptap/html";import isEmpty from"lodash/isEmpty";import{buildBaseExtensions}from"../constants.js";import{dedupeExtensions}from"../utils.js";import{buildModuleGroups}from"./moduleResolution.js";const TABLE_EMAIL_STYLE="border-collapse: collapse; width: 100%; border-spacing: 0;",HEADER_CELL_EMAIL_STYLE="border: 1px solid #CCCCCC; padding: 8px 12px; text-align: left; font-family: inherit; font-weight: 600; background-color: #F5F5F5;",DATA_CELL_EMAIL_STYLE="border: 1px solid #CCCCCC; padding: 8px 12px; text-align: left; font-family: inherit;",buildParagraph=t=>({type:"paragraph",content:t?[{type:"text",text:String(t)}]:[]}),PARAGRAPH_SEPARATOR=/(?:\r?\n){2,}/,LINE_SEPARATOR=/\r?\n/,buildEmptyParagraph=()=>({type:"paragraph"}),buildParagraphContent=t=>t.split(LINE_SEPARATOR).flatMap((t,e)=>[...e>0?[{type:"hardBreak"}]:[],...t?[{type:"text",text:t}]:[]]);export const buildParagraphNodes=t=>t?t.split(PARAGRAPH_SEPARATOR).map(t=>{const e=buildParagraphContent(t);return isEmpty(e)?buildEmptyParagraph():{type:"paragraph",content:e}}):[buildEmptyParagraph()];export const buildTableNode=t=>{let{headers:e,rows:o,cellColwidth:a}=t;return{type:"table",attrs:{style:TABLE_EMAIL_STYLE},content:[{type:"tableRow",content:e.map(t=>({type:"tableHeader",attrs:{colspan:1,colwidth:a?[a]:null,rowspan:1,style:HEADER_CELL_EMAIL_STYLE},content:[buildParagraph(t)]}))},...o.map(t=>({type:"tableRow",content:t.map(t=>({type:"tableCell",attrs:{colspan:1,colwidth:a?[a]:null,rowspan:1,style:DATA_CELL_EMAIL_STYLE},content:[buildParagraph(t)]}))}))]}};export const buildSerializationExtensions=function(){let{moduleConfig:t,modules:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return dedupeExtensions([...buildBaseExtensions({}),...buildModuleGroups(e,t).flat().flatMap(t=>t.resolvedExtensions)])};export const serializeToHTML=function(t){let{moduleConfig:e,modules:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return generateHTML(t,buildSerializationExtensions({moduleConfig:e,modules:o}))};
1
+ import{getSchema}from"@tiptap/core";import{generateHTML,generateJSON}from"@tiptap/html";import isEmpty from"lodash/isEmpty";import{buildBaseExtensions}from"../constants.js";import{dedupeExtensions}from"../utils.js";import{buildModuleGroups}from"./moduleResolution.js";export const buildSerializationExtensions=function(){let{moduleConfig:e,modules:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return dedupeExtensions([...buildBaseExtensions({}),...buildModuleGroups(t,e).flat().flatMap(e=>e.resolvedExtensions)])};const buildEmptyParagraph=()=>({type:"paragraph"}),buildPlainInlineContent=e=>e?[{type:"text",text:e}]:[],buildInlineNodes=(e,t)=>(e||[]).reduce((e,n)=>{var o;if("text"===n.type||null!==(o=t.nodes[n.type])&&void 0!==o&&o.isInline)return[...e,n];const l=buildInlineNodes(n.content,t);return isEmpty(l)?e:isEmpty(e)?l:[...e,{type:"hardBreak"},...l]},[]),buildInlineHTMLContent=(e,t)=>{let{extensions:n,schema:o}=t;if(!e)return[];const{content:l}=generateJSON("<p>".concat(e,"</p>"),n);return buildInlineNodes(l,o)},buildInlineContentResolver=function(){let{inlineHTML:e,moduleConfig:t,modules:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e)return buildPlainInlineContent;const o=buildSerializationExtensions({moduleConfig:t,modules:n}),l=getSchema(o);return e=>buildInlineHTMLContent(e,{extensions:o,schema:l})},PARAGRAPH_SEPARATOR=/(?:\r?\n){2,}/,LINE_SEPARATOR=/\r?\n/,buildParagraphContent=(e,t)=>e.split(LINE_SEPARATOR).map(t).reduce((e,t)=>isEmpty(t)?e:isEmpty(e)?t:[...e,{type:"hardBreak"},...t],[]);export const buildParagraphNodes=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return[buildEmptyParagraph()];const n=buildInlineContentResolver(t);return e.split(PARAGRAPH_SEPARATOR).map(e=>{const t=buildParagraphContent(e,n);return isEmpty(t)?buildEmptyParagraph():{type:"paragraph",content:t}})};export const buildNodesFromHTML=function(e){let{moduleConfig:t,modules:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return[buildEmptyParagraph()];const{content:o}=generateJSON(e,buildSerializationExtensions({moduleConfig:t,modules:n}));return isEmpty(o)?[buildEmptyParagraph()]:o};const TABLE_HEADER_TYPE="tableHeader",TABLE_EMAIL_STYLE="border-collapse: collapse; width: 100%; border-spacing: 0;",HEADER_CELL_EMAIL_STYLE="border: 1px solid #CCCCCC; padding: 8px 12px; text-align: left; font-family: inherit; font-weight: 600; background-color: #F5F5F5;",DATA_CELL_EMAIL_STYLE="border: 1px solid #CCCCCC; padding: 8px 12px; text-align: left; font-family: inherit;",buildParagraph=(e,t)=>({type:"paragraph",content:e?t(String(e)):[]});export const buildTableNode=e=>{let{cellColwidth:t,headers:n,inlineHTML:o,moduleConfig:l,modules:i,rows:r}=e;const a=buildInlineContentResolver({inlineHTML:o,moduleConfig:l,modules:i});return{type:"table",attrs:{style:TABLE_EMAIL_STYLE},content:[{type:"tableRow",content:n.map(e=>({type:"tableHeader",attrs:{colspan:1,colwidth:t?[t]:null,rowspan:1,style:HEADER_CELL_EMAIL_STYLE},content:[buildParagraph(e,a)]}))},...r.map(e=>({type:"tableRow",content:e.map(e=>({type:"tableCell",attrs:{colspan:1,colwidth:t?[t]:null,rowspan:1,style:DATA_CELL_EMAIL_STYLE},content:[buildParagraph(e,a)]}))}))]}};const serializeInlineContent=(e,t)=>(e||[]).map(e=>generateHTML({type:"doc",content:[e]},t).replace(/^<p>|<\/p>$/g,"")).filter(Boolean).join("<br>");export const readTableNode=function(e){var t;let{moduleConfig:n,modules:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=buildSerializationExtensions({moduleConfig:n,modules:o}),i=e=>serializeInlineContent(e.content,l),r=(null==e?void 0:e.content)||[],a="tableHeader"===(null===(t=r[0])||void 0===t||null===(t=t.content)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.type),[d,s]=a?[r[0],r.slice(1)]:[null,r],u=((null==d?void 0:d.content)||[]).map(e=>{var t;return null===(t=e.attrs)||void 0===t||null===(t=t.colwidth)||void 0===t?void 0:t[0]}),[p]=u;return{cellColwidth:u.every(e=>e===p)&&null!=p?p:void 0,headers:((null==d?void 0:d.content)||[]).map(i),inlineHTML:!0,rows:s.map(e=>(e.content||[]).map(i))}};export const serializeToHTML=function(e){let{moduleConfig:t,modules:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return generateHTML(e,buildSerializationExtensions({moduleConfig:t,modules:n}))};
@@ -0,0 +1 @@
1
+ import{buildNodesFromHTML}from"./contentBuilders.js";const PARAGRAPH_SEPARATOR=/(?:\r?\n){2,}/,LINE_SEPARATOR=/\r?\n/,BULLET_MARKER=/^\s*[-*+]\s+/,ORDERED_MARKER=/^\s*\d+[.)]\s+/,HTML_ESCAPES={"&":"&amp;","<":"&lt;",">":"&gt;"},BACKSLASH_ESCAPES={"*":"&#42;","[":"&#91;","\\":"&#92;","]":"&#93;",_:"&#95;","`":"&#96;"},INLINE_RULES=[{pattern:/\*\*(?=\S)([\s\S]*?\S)\*\*/g,replacement:"<strong>$1</strong>"},{pattern:/(^|\s)__(?=\S)([\s\S]*?\S)__(?=\s|$|[.,;:!?)])/g,replacement:"$1<strong>$2</strong>"},{pattern:/(^|[\s(])\*(?=\S)([^*]*\S)\*(?=\s|$|[.,;:!?)])/g,replacement:"$1<em>$2</em>"},{pattern:/(^|\s)_(?=\S)([^_]*\S)_(?=\s|$|[.,;:!?)])/g,replacement:"$1<em>$2</em>"},{pattern:/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,replacement:'<a href="$2">$1</a>'}],buildInlineHTML=e=>INLINE_RULES.reduce((e,t)=>{let{pattern:n,replacement:l}=t;return e.replace(n,l)},e.replace(/&(?!#?\w+;)|[<>]/g,e=>HTML_ESCAPES[e]).replace(/\\([*_[\]`\\])/g,(e,t)=>BACKSLASH_ESCAPES[t])),buildLineGroups=e=>e.reduce((e,t)=>{const n=(BULLET_MARKER.test(t)?"ul":ORDERED_MARKER.test(t)&&"ol")||"p",l=e[e.length-1];return(null==l?void 0:l.tag)===n?l.lines.push(t):e.push({lines:[t],tag:n}),e},[]),buildGroupHTML=e=>{var t;let{lines:n,tag:l}=e;if("p"===l){const e=n.map(e=>buildInlineHTML(e.trim())).filter(Boolean).join("<br>");return e?"<p>".concat(e,"</p>"):""}const r="ul"===l?BULLET_MARKER:ORDERED_MARKER,o=n.map(e=>"<li>".concat(buildInlineHTML(e.replace(r,"").trim()),"</li>")),s="ol"===l?Number(null===(t=n[0].match(/\d+/))||void 0===t?void 0:t[0]):null,a=s>1?' start="'.concat(s,'"'):"";return"<".concat(l).concat(a,">").concat(o.join(""),"</").concat(l,">")};export const buildNodesFromMarkdown=function(e){let{moduleConfig:t,modules:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=(e||"").split(PARAGRAPH_SEPARATOR).flatMap(e=>buildLineGroups(e.split(LINE_SEPARATOR)).map(buildGroupHTML)).filter(Boolean).join("");return buildNodesFromHTML(l,{moduleConfig:t,modules:n})};
@@ -1 +1 @@
1
- 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 n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},_extends.apply(null,arguments)}import{bool,element,func,number,object,oneOfType,string}from"prop-types";import React from"react";import UTButton from"../UTButton";import UTIcon from"../UTIcon";import UTLabel from"../UTLabel";import UTLoading from"../UTLoading";import WithTheme from"../WithTheme";import{TEST_IDS}from"../../constants/testIds";import{ICON_COLOR_THEMES,COLOR_THEMES,DEFAULT_CONTENT_MAX_WIDTH}from"./constants";import{retrieveStyle}from"./theme";import styles from"./styles.module.scss";const{statusMessage:statusMessage}=TEST_IDS,UTStatusMessage=e=>{let{area:t,children:a,classes:n,colorTheme:s=COLOR_THEMES.DEFAULT,contentMaxWidth:o=DEFAULT_CONTENT_MAX_WIDTH,description:r,descriptionProps:c,flag:i,HeaderComponent:l,helpText:m,helpTextProps:T,icon:d="IconInfoCircle",iconProps:p={size:40},loading:g,primaryAction:u,primaryActionProps:h,primaryActionText:y,secondaryAction:E,secondaryActionProps:f,secondaryActionText:b,showHeader:x=!0,title:U,titleProps:M}=e;return React.createElement("div",{className:"".concat(styles.root," ").concat(t?styles.area:""," ").concat(n.root||"")},i&&React.createElement("div",{className:n.flag||"","data-testid":statusMessage.flag}),React.createElement("div",{className:"".concat(styles.container," ").concat(n.container," ").concat(t?styles.areaPadding:"")},g?React.createElement(UTLoading,{loading:!0,text:null}):x?React.createElement("div",{className:n.banner},l?React.createElement(l,null):React.createElement("div",{className:n.iconContainer},React.createElement(UTIcon,_extends({name:d,colorTheme:ICON_COLOR_THEMES[s],dataTestId:statusMessage.icon},p)))):null,React.createElement("div",{className:"".concat(styles.content," ").concat(n.content),style:{"--statusMessage-content-max-width":"number"==typeof o?"".concat(o,"px"):o}},(U||r||m)&&React.createElement("div",{className:styles.section},U&&React.createElement(UTLabel,_extends({align:"center",dataTestId:statusMessage.title,variant:"title3",weight:"medium"},M),U),r&&React.createElement(UTLabel,_extends({align:"center",colorTheme:"gray",dataTestId:statusMessage.description,variant:"body",withMarkdown:!0},c),r),m&&React.createElement(UTLabel,_extends({align:"center",colorTheme:"gray",dataTestId:statusMessage.helperText,variant:"small"},T),m)),a,(u||E)&&React.createElement("div",{className:styles.section},u&&React.createElement(UTButton,_extends({onClick:u},h),y),E&&React.createElement(UTButton,_extends({onClick:E,variant:"text"},f),b)))))};UTStatusMessage.propTypes={area:bool,children:element,classes:object,colorTheme:string,contentMaxWidth:oneOfType([number,string]),description:string,descriptionProps:object,flag:bool,flagColor:string,HeaderComponent:element,helpText:string,helpTextProps:object,icon:string,iconBackgroundColor:string,iconProps:object,loading:bool,primaryAction:func,primaryActionProps:object,primaryActionText:string,secondaryAction:func,secondaryActionProps:object,secondaryActionText:string,showBanner:bool,showHeader:bool,title:string,titleProps:object};const UTStatusMessageWithTheme=WithTheme(retrieveStyle)(UTStatusMessage);UTStatusMessageWithTheme.displayName="UTStatusMessage";export default UTStatusMessageWithTheme;
1
+ 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)}import{bool,element,func,number,object,oneOfType,string}from"prop-types";import React from"react";import UTButton from"../UTButton";import UTChip from"../UTChip";import{CHIP_SIZES}from"../UTChip/constants";import UTIcon from"../UTIcon";import UTLabel from"../UTLabel";import UTLoading from"../UTLoading";import WithTheme from"../WithTheme";import{TEST_IDS}from"../../constants/testIds";import{ICON_COLOR_THEMES,COLOR_THEMES,DEFAULT_CONTENT_MAX_WIDTH}from"./constants";import{retrieveStyle}from"./theme";import styles from"./styles.module.scss";const{statusMessage:statusMessage}=TEST_IDS,UTStatusMessage=e=>{let{area:t,children:a,chipProps:s,chipText:o,classes:n,colorTheme:r=COLOR_THEMES.DEFAULT,contentMaxWidth:c=DEFAULT_CONTENT_MAX_WIDTH,description:i,descriptionProps:l,flag:m,HeaderComponent:T,helpText:p,helpTextProps:d,icon:g="IconInfoCircle",iconProps:h={size:40},loading:u,primaryAction:y,primaryActionProps:E,primaryActionText:f,secondaryAction:U,secondaryActionProps:b,secondaryActionText:x,showHeader:M=!0,title:_,titleProps:C}=e;return React.createElement("div",{className:"".concat(styles.root," ").concat(t?styles.area:""," ").concat(n.root||"")},m&&React.createElement("div",{className:n.flag||"","data-testid":statusMessage.flag}),React.createElement("div",{className:"".concat(styles.container," ").concat(n.container," ").concat(t?styles.areaPadding:"")},u?React.createElement(UTLoading,{loading:!0,text:null}):M?React.createElement("div",{className:n.banner},T?React.createElement(T,null):React.createElement("div",{className:n.iconContainer},React.createElement(UTIcon,_extends({name:g,colorTheme:ICON_COLOR_THEMES[r],dataTestId:statusMessage.icon},h)))):null,o&&React.createElement(UTChip,_extends({dataTestId:statusMessage.chip,size:CHIP_SIZES.MEDIUM},s,{onClose:void 0}),o),React.createElement("div",{className:"".concat(styles.content," ").concat(n.content),style:{"--statusMessage-content-max-width":"number"==typeof c?"".concat(c,"px"):c}},(_||i||p)&&React.createElement("div",{className:styles.section},_&&React.createElement(UTLabel,_extends({align:"center",dataTestId:statusMessage.title,variant:"title3",weight:"medium"},C),_),i&&React.createElement(UTLabel,_extends({align:"center",colorTheme:"gray",dataTestId:statusMessage.description,variant:"body",withMarkdown:!0},l),i),p&&React.createElement(UTLabel,_extends({align:"center",colorTheme:"gray",dataTestId:statusMessage.helperText,variant:"small"},d),p)),a,(y||U)&&React.createElement("div",{className:styles.section},y&&React.createElement(UTButton,_extends({onClick:y},E),f),U&&React.createElement(UTButton,_extends({onClick:U,variant:"text"},b),x)))))};UTStatusMessage.propTypes={area:bool,children:element,chipProps:object,chipText:string,classes:object,colorTheme:string,contentMaxWidth:oneOfType([number,string]),description:string,descriptionProps:object,flag:bool,flagColor:string,HeaderComponent:element,helpText:string,helpTextProps:object,icon:string,iconBackgroundColor:string,iconProps:object,loading:bool,primaryAction:func,primaryActionProps:object,primaryActionText:string,secondaryAction:func,secondaryActionProps:object,secondaryActionText:string,showBanner:bool,showHeader:bool,title:string,titleProps:object};const UTStatusMessageWithTheme=WithTheme(retrieveStyle)(UTStatusMessage);UTStatusMessageWithTheme.displayName="UTStatusMessage";export default UTStatusMessageWithTheme;