@mgdis/mg-components 5.8.2 → 5.9.1

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 (57) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mg-action-more_31.cjs.entry.js +196 -63
  3. package/dist/cjs/mg-components.cjs.js +1 -1
  4. package/dist/collection/components/atoms/mg-card/mg-card.conf.js +8 -0
  5. package/dist/collection/components/atoms/mg-card/mg-card.css +54 -0
  6. package/dist/collection/components/atoms/mg-card/mg-card.js +106 -4
  7. package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +38 -7
  8. package/dist/collection/components/atoms/mg-icon/mg-icon.css +70 -11
  9. package/dist/collection/components/atoms/mg-icon/mg-icon.js +57 -21
  10. package/dist/collection/components/atoms/mg-tag/mg-tag.css +12 -12
  11. package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +44 -5
  12. package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +12 -9
  13. package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +1 -1
  14. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +1 -0
  15. package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +1 -1
  16. package/dist/collection/components/molecules/mg-action-more/mg-action-more.css +1 -0
  17. package/dist/collection/components/molecules/mg-details/mg-details.css +0 -3
  18. package/dist/collection/components/molecules/mg-details/mg-details.js +1 -1
  19. package/dist/collection/components/molecules/mg-message/mg-message.css +1 -19
  20. package/dist/collection/components/molecules/mg-message/mg-message.js +9 -4
  21. package/dist/collection/components/molecules/mg-modal/mg-modal.css +1 -0
  22. package/dist/collection/components/molecules/mg-panel/mg-panel.css +1 -0
  23. package/dist/collection/components/molecules/mg-popover/mg-popover.css +2 -0
  24. package/dist/collection/styles/reset-mg-card-slotted-variables.scss +1 -0
  25. package/dist/collection/variables.css +7 -1
  26. package/dist/components/mg-action-more.js +1 -1
  27. package/dist/components/mg-card2.js +60 -6
  28. package/dist/components/mg-details.js +2 -2
  29. package/dist/components/mg-icon2.js +66 -22
  30. package/dist/components/mg-input-numeric.js +12 -9
  31. package/dist/components/mg-menu-item2.js +2 -2
  32. package/dist/components/mg-message.js +2 -2
  33. package/dist/components/mg-modal.js +1 -1
  34. package/dist/components/mg-panel.js +1 -1
  35. package/dist/components/mg-popover2.js +1 -1
  36. package/dist/components/mg-tag.js +1 -1
  37. package/dist/components/mg-tooltip2.js +44 -5
  38. package/dist/components/popper.js +3 -4
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/mg-action-more_31.entry.js +196 -63
  41. package/dist/esm/mg-components.js +1 -1
  42. package/dist/mg-components/mg-components.css +1 -1
  43. package/dist/mg-components/mg-components.esm.js +1 -1
  44. package/dist/mg-components/p-9a93b7af.entry.js +1 -0
  45. package/dist/mg-components/styles/reset-mg-card-slotted-variables.scss +1 -0
  46. package/dist/mg-components/variables.css +7 -1
  47. package/dist/types/components/atoms/mg-card/mg-card.conf.d.ts +16 -0
  48. package/dist/types/components/atoms/mg-card/mg-card.d.ts +29 -0
  49. package/dist/types/components/atoms/mg-icon/mg-icon.conf.d.ts +10 -2
  50. package/dist/types/components/atoms/mg-icon/mg-icon.d.ts +13 -5
  51. package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +21 -0
  52. package/dist/types/components/molecules/inputs/mg-input-numeric/mg-input-numeric.d.ts +5 -5
  53. package/dist/types/components/molecules/mg-message/mg-message.conf.d.ts +5 -1
  54. package/dist/types/components/molecules/mg-message/mg-message.d.ts +6 -5
  55. package/dist/types/components.d.ts +35 -9
  56. package/package.json +5 -5
  57. package/dist/mg-components/p-0b68c4b4.entry.js +0 -1
@@ -17,7 +17,7 @@ const patchBrowser = () => {
17
17
  };
18
18
 
19
19
  patchBrowser().then(options => {
20
- return index.bootstrapLazy([["mg-action-more_31.cjs",[[1,"mg-action-more",{"icon":[16],"button":[16],"items":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]}],[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1025,"title-pattern"],"titlePatternErrorMessage":[1025,"title-pattern-error-message"],"expanded":[1028],"expandToggleDisabled":[1028,"expand-toggle-disabled"],"titleEditable":[4,"title-editable"],"classList":[32],"isEditing":[32],"updatedPanelTitle":[32]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"hideNavigationLabels":[4,"hide-navigation-labels"],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"resizable":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-checkbox",{"value":[1040],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"checkboxItems":[32],"displayError":[64]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"currency":[1],"max":[2],"min":[2],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"hasFocus":[32],"displayError":[64]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"displayError":[64]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"classList":[32],"options":[32],"checked":[32]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[1028,"close-button"],"hide":[1028],"classList":[32],"hasActions":[32]}],[1,"mg-modal",{"identifier":[1],"modalTitle":[1,"modal-title"],"closeButton":[1028,"close-button"],"hide":[1028],"hasActions":[32],"hasContent":[32],"classList":[32]},[[8,"keydown","handleKeyDown"]]],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classList":[32]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]}],[1,"mg-divider",{"size":[1]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"disabled":[4],"valid":[1028],"invalid":[1028],"classList":[32],"requiredMessage":[32],"displayError":[64]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1]}],[1,"mg-skip-links",{"links":[1040]}],[1,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classList":[32]}],[1,"mg-input-text",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"type":[1],"icon":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"readonlyValue":[32],"displayError":[64]}],[1,"mg-menu-item",{"identifier":[1],"href":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isInMainMenu":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]}],[1,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1],"isChildMenu":[32]}],[1,"mg-popover",{"identifier":[1],"placement":[1],"arrowHide":[4,"arrow-hide"],"closeButton":[4,"close-button"],"display":[1028],"disabled":[1028],"classList":[32]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]}],[1,"mg-badge",{"value":[1032],"label":[1],"variant":[1],"outline":[4],"classList":[32]}],[1,"mg-card"],[1,"mg-button",{"variant":[1],"identifier":[1],"label":[1],"type":[1],"fullWidth":[1028,"full-width"],"form":[1025],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classList":[32]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"isLegend":[4,"is-legend"],"tagName":[32]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[1028]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"spin":[4],"classList":[32]}]]],["mg-item-more.cjs",[[1,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]}]]]], options);
20
+ return index.bootstrapLazy([["mg-action-more_31.cjs",[[1,"mg-action-more",{"icon":[16],"button":[16],"items":[16],"displayChevron":[4,"display-chevron"],"expanded":[32]}],[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1025,"title-pattern"],"titlePatternErrorMessage":[1025,"title-pattern-error-message"],"expanded":[1028],"expandToggleDisabled":[1028,"expand-toggle-disabled"],"titleEditable":[4,"title-editable"],"classList":[32],"isEditing":[32],"updatedPanelTitle":[32]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"hideNavigationLabels":[4,"hide-navigation-labels"],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"resizable":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-checkbox",{"value":[1040],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"checkboxItems":[32],"displayError":[64]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"currency":[1],"max":[2],"min":[2],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"hasFocus":[32],"displayError":[64]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"displayError":[64]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"classList":[32],"options":[32],"checked":[32]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[1028,"close-button"],"hide":[1028],"classList":[32],"hasActions":[32]}],[1,"mg-modal",{"identifier":[1],"modalTitle":[1,"modal-title"],"closeButton":[1028,"close-button"],"hide":[1028],"hasActions":[32],"hasContent":[32],"classList":[32]},[[8,"keydown","handleKeyDown"]]],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classList":[32]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]}],[1,"mg-divider",{"size":[1]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"disabled":[4],"valid":[1028],"invalid":[1028],"classList":[32],"requiredMessage":[32],"displayError":[64]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1]}],[1,"mg-skip-links",{"links":[1040]}],[1,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classList":[32]}],[1,"mg-input-text",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"type":[1],"icon":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"readonlyValue":[32],"displayError":[64]}],[1,"mg-menu-item",{"identifier":[1],"href":[1],"status":[1537],"expanded":[1028],"size":[32],"navigationButtonClassList":[32],"direction":[32],"isInMainMenu":[32],"isItemMore":[32],"hasChildren":[32],"displayNotificationBadge":[32]}],[1,"mg-menu",{"label":[1],"direction":[513],"itemmore":[16],"size":[1],"isChildMenu":[32]}],[1,"mg-popover",{"identifier":[1],"placement":[1],"arrowHide":[4,"arrow-hide"],"closeButton":[4,"close-button"],"display":[1028],"disabled":[1028],"classList":[32]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]}],[1,"mg-badge",{"value":[1032],"label":[1],"variant":[1],"outline":[4],"classList":[32]}],[1,"mg-card",{"variant":[1],"variantStyle":[1025,"variant-style"],"classList":[32]}],[1,"mg-button",{"variant":[1],"identifier":[1],"label":[1],"type":[1],"fullWidth":[1028,"full-width"],"form":[1025],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classList":[32]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"isLegend":[4,"is-legend"],"tagName":[32]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[1028]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"variantStyle":[1025,"variant-style"],"spin":[4],"classList":[32]}]]],["mg-item-more.cjs",[[1,"mg-item-more",{"icon":[16],"slotlabel":[16],"size":[1],"parentMenu":[32]}]]]], options);
21
21
  });
22
22
 
23
23
  exports.setNonce = index.setNonce;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * List available variants
3
+ */
4
+ export const variants = ['info', 'warning', 'success', 'danger', 'app'];
5
+ /**
6
+ * List available variant styles
7
+ */
8
+ export const variantStyles = ['bar-left', 'fill'];
@@ -1,6 +1,7 @@
1
1
  .mg-card {
2
2
  position: relative;
3
3
  width: 100%;
4
+ max-width: var(--mg-card-max-width);
4
5
  padding: var(--mg-card-padding, var(--mg-card-padding-default));
5
6
  overflow: var(--mg-card-overflow, var(--mg-card-overflow-default));
6
7
  box-sizing: border-box;
@@ -16,4 +17,57 @@
16
17
  --mg-card-border-radius: var(--mg-card-border-radius-default);
17
18
  --mg-card-background: var(--mg-card-background-default);
18
19
  --mg-card-box-shadow: var(--mg-card-box-shadow-default);
20
+ --mg-card-max-width: unset;
21
+ }
22
+ .mg-card.mg-card--info {
23
+ overflow: hidden;
24
+ }
25
+ .mg-card.mg-card--info.mg-card--bar-left .mg-card__bar {
26
+ background-color: hsl(var(--color-info-h), var(--color-info-s), var(--color-info-l));
27
+ }
28
+ .mg-card.mg-card--info.mg-card--fill {
29
+ background-color: hsl(var(--color-info-h), var(--color-info-s), var(--mg-color-soft-l));
30
+ }
31
+ .mg-card.mg-card--warning {
32
+ overflow: hidden;
33
+ }
34
+ .mg-card.mg-card--warning.mg-card--bar-left .mg-card__bar {
35
+ background-color: hsl(var(--color-warning-h), var(--color-warning-s), var(--color-warning-l));
36
+ }
37
+ .mg-card.mg-card--warning.mg-card--fill {
38
+ background-color: hsl(var(--color-warning-h), var(--color-warning-s), var(--mg-color-soft-l));
39
+ }
40
+ .mg-card.mg-card--success {
41
+ overflow: hidden;
42
+ }
43
+ .mg-card.mg-card--success.mg-card--bar-left .mg-card__bar {
44
+ background-color: hsl(var(--color-success-h), var(--color-success-s), var(--color-success-l));
45
+ }
46
+ .mg-card.mg-card--success.mg-card--fill {
47
+ background-color: hsl(var(--color-success-h), var(--color-success-s), var(--mg-color-soft-l));
48
+ }
49
+ .mg-card.mg-card--danger {
50
+ overflow: hidden;
51
+ }
52
+ .mg-card.mg-card--danger.mg-card--bar-left .mg-card__bar {
53
+ background-color: hsl(var(--color-danger-h), var(--color-danger-s), var(--color-danger-l));
54
+ }
55
+ .mg-card.mg-card--danger.mg-card--fill {
56
+ background-color: hsl(var(--color-danger-h), var(--color-danger-s), var(--mg-color-soft-l));
57
+ }
58
+ .mg-card.mg-card--app {
59
+ overflow: hidden;
60
+ }
61
+ .mg-card.mg-card--app.mg-card--bar-left .mg-card__bar {
62
+ background-color: hsl(var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-app-l));
63
+ }
64
+ .mg-card.mg-card--app.mg-card--fill {
65
+ background-color: hsl(var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-soft-l));
66
+ }
67
+ .mg-card__bar {
68
+ position: absolute;
69
+ top: 0;
70
+ left: 0;
71
+ width: 0.3rem;
72
+ height: 100%;
19
73
  }
@@ -1,15 +1,55 @@
1
1
  import { h } from '@stencil/core';
2
+ import { ClassList } from '../../../utils/components.utils';
3
+ import { variantStyles, variants } from './mg-card.conf';
2
4
  export class MgCard {
3
- /*************
4
- * Lifecycle *
5
- *************/
5
+ constructor() {
6
+ /*************
7
+ * Private *
8
+ *************/
9
+ this.name = 'mg-card';
10
+ this.baseClass = this.name;
11
+ this.variant = undefined;
12
+ this.variantStyle = undefined;
13
+ this.classList = new ClassList([this.baseClass]);
14
+ }
15
+ validateVariant(newValue, oldValue) {
16
+ if (newValue && !variants.includes(newValue))
17
+ throw new Error(`<${this.name}> prop "variant" must match VariantType type.`);
18
+ if (Boolean(newValue)) {
19
+ if (this.variantStyle === undefined)
20
+ this.variantStyle = 'bar-left';
21
+ this.classList.add(`${this.baseClass}--${newValue}`);
22
+ }
23
+ if (Boolean(oldValue))
24
+ this.classList.delete(`${this.baseClass}--${oldValue}`);
25
+ }
26
+ validateVariantStyle(newValue, oldValue) {
27
+ if (newValue && !variantStyles.includes(newValue))
28
+ throw new Error(`<${this.name}> prop "variantStyle" must match VariantStyleType type.`);
29
+ else if (Boolean(newValue) && !variants.includes(this.variant))
30
+ throw new Error(`<${this.name}> prop "variantStyle" must be paired with ${JSON.stringify(variants)} "variant" prop.`);
31
+ if (Boolean(newValue))
32
+ this.classList.add(`${this.baseClass}--${newValue}`);
33
+ if (Boolean(oldValue))
34
+ this.classList.delete(`${this.baseClass}--${oldValue}`);
35
+ }
36
+ /**
37
+ * Check if props are well configured on init
38
+ *
39
+ * @returns {void}
40
+ */
41
+ componentWillLoad() {
42
+ this.validateVariant(this.variant);
43
+ this.validateVariantStyle(this.variantStyle);
44
+ }
6
45
  /**
7
46
  * Render
8
47
  *
9
48
  * @returns {HTMLElement} HTML Element
10
49
  */
11
50
  render() {
12
- return (h("div", { class: "mg-card" }, h("slot", null)));
51
+ var _a;
52
+ return (h("div", { class: this.classList.join() }, ((_a = this.variantStyle) === null || _a === void 0 ? void 0 : _a.startsWith('bar-')) && h("span", { class: "mg-card__bar" }), h("slot", null)));
13
53
  }
14
54
  static get is() { return "mg-card"; }
15
55
  static get encapsulation() { return "shadow"; }
@@ -23,4 +63,66 @@ export class MgCard {
23
63
  "$": ["mg-card.css"]
24
64
  };
25
65
  }
66
+ static get properties() {
67
+ return {
68
+ "variant": {
69
+ "type": "string",
70
+ "mutable": false,
71
+ "complexType": {
72
+ "original": "undefined | VariantType",
73
+ "resolved": "\"app\" | \"danger\" | \"info\" | \"success\" | \"warning\"",
74
+ "references": {
75
+ "VariantType": {
76
+ "location": "import",
77
+ "path": "./mg-card.conf"
78
+ }
79
+ }
80
+ },
81
+ "required": false,
82
+ "optional": false,
83
+ "docs": {
84
+ "tags": [],
85
+ "text": "Define variant prop\nDefault: undefined"
86
+ },
87
+ "attribute": "variant",
88
+ "reflect": false
89
+ },
90
+ "variantStyle": {
91
+ "type": "string",
92
+ "mutable": true,
93
+ "complexType": {
94
+ "original": "undefined | VariantStyleType",
95
+ "resolved": "\"bar-left\" | \"fill\"",
96
+ "references": {
97
+ "VariantStyleType": {
98
+ "location": "import",
99
+ "path": "./mg-card.conf"
100
+ }
101
+ }
102
+ },
103
+ "required": false,
104
+ "optional": false,
105
+ "docs": {
106
+ "tags": [],
107
+ "text": "Define variantStyle prop\nDefault: undefined"
108
+ },
109
+ "attribute": "variant-style",
110
+ "reflect": false
111
+ }
112
+ };
113
+ }
114
+ static get states() {
115
+ return {
116
+ "classList": {}
117
+ };
118
+ }
119
+ static get watchers() {
120
+ return [{
121
+ "propName": "variant",
122
+ "methodName": "validateVariant"
123
+ }, {
124
+ "propName": "variantStyle",
125
+ "methodName": "validateVariantStyle"
126
+ }];
127
+ }
26
128
  }
@@ -72,7 +72,11 @@ export const icons = {
72
72
  'ellipsis-vertical': () => (h("path", { fill: "currentColor", d: "M6.17 13.5A1.83 1.83 0 1 0 8 11.67c-1.01 0-1.83.82-1.83 1.83Zm0-11A1.83 1.83 0 1 0 8 .67c-1.01 0-1.83.82-1.83 1.83Zm0 5.5A1.83 1.83 0 1 0 8 6.17c-1.01 0-1.83.82-1.83 1.83Z" })),
73
73
  'euro': () => (h("path", { fill: "currentColor", d: "m12.1 11.02 1.4 1.42a5.948 5.948 0 0 1-4 1.56c-2.64 0-4.86-1.68-5.66-4.04H1.5v-1.5h2.02C3.5 8.3 3.5 8.16 3.5 8c0-.18 0-.36.04-.54H1.5v-1.5h2.38C4.7 3.66 6.9 2 9.5 2c1.54 0 2.94.6 4 1.56l-1.4 1.42c-.7-.6-1.6-.98-2.6-.98-1.46 0-2.74.78-3.44 1.96h3.5v1.5H5.54c-.02.18-.04.36-.04.54 0 .16 0 .32.02.46h4.04v1.5H6.02C6.7 11.18 8.02 12 9.5 12c1 0 1.9-.38 2.6-.98Z" })),
74
74
  'euro-circle': () => (h("path", { fill: "currentColor", d: "M8 .67C3.95.67.67 3.95.67 8S3.95 15.33 8 15.33s7.33-3.28 7.33-7.33S12.05.67 8 .67Zm2.27 11.4c-.38.09-.76.14-1.15.14a4.038 4.038 0 0 1-3.99-2.92h-.58c-.13 0-.23-.1-.23-.22v-.54c0-.12.11-.22.23-.22h.41a5.34 5.34 0 0 1 0-.8h-.41c-.13 0-.23-.1-.23-.22v-.58c0-.13.11-.22.23-.22h.63c.6-1.65 2.18-2.74 3.94-2.71.34 0 .68.03 1.02.1.12.03.19.16.16.28l-.23.84c-.03.12-.15.19-.27.17-.24-.05-.48-.08-.73-.08A2.42 2.42 0 0 0 6.81 6.5h2.71c.12.03.2.15.17.27l-.13.58c-.02.1-.12.18-.22.18H6.52c-.03.26-.03.53 0 .8h2.63c.12.03.2.15.17.27l-.11.52c-.03.1-.12.18-.22.18H6.8c.36.96 1.28 1.6 2.31 1.61.3 0 .59-.04.88-.1.12-.02.24.05.27.18l.17.84c.02.12-.05.24-.17.27v-.03Z" })),
75
- 'exclamation-circle': () => (h("path", { fill: "currentColor", d: "M8 15.33c4.05 0 7.33-3.28 7.33-7.33S12.05.67 8 .67.67 3.95.67 8 3.95 15.33 8 15.33Zm.95-3.3c0 .15-.12.27-.28.27h-1.4c-.15 0-.28-.12-.28-.27v-1.31c0-.15.12-.28.28-.28h1.4c.15 0 .28.12.28.28v1.31ZM7 3.96c0-.14.11-.25.25-.25H8.7c.14 0 .25.11.25.25v4.8c0 .14-.11.25-.25.25H7.25c-.14 0-.25-.11-.25-.25V3.95Z" })),
75
+ 'exclamation-circle': () => (h("path", { fill: "currentColor", stroke: "currentColor", d: "M8.75 9.5h.5v-6h-2.5v6h2Zm.5 1V10h-2.5v2.5h2.5v-2ZM1.5 8a6.5 6.5 0 1 1 13 0 6.5 6.5 0 0 1-13 0Z" })),
76
+ 'exclamation-circle-outline': () => [
77
+ h("path", { fill: "currentColor", key: "exclamation-circle-outline-1", d: "M8.75 4v5h-1.5V4h1.5ZM8.75 12v-1.5h-1.5V12h1.5Z" }),
78
+ h("path", { fill: "currentColor", key: "exclamation-circle-outline-2", "fill-rule": "evenodd", d: "M8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM2 8a6 6 0 1 0 12 0A6 6 0 0 0 2 8Z" }),
79
+ ],
76
80
  'exclamation-stamp': () => (h("path", { fill: "currentColor", d: "m15 8-1.55-1.86.22-2.46-2.3-.55L10.17 1 8 1.98 5.84 1 4.63 3.13l-2.29.54.22 2.46L1.01 8l1.55 1.86-.22 2.47 2.3.55 1.2 2.13L8 14.03l2.17.98 1.2-2.13 2.3-.55-.22-2.46L15 8.01Zm-6.36 3.35H7.36v-1.34h1.28v1.34Zm0-2.67H7.36V4.67h1.28v4.01Z" })),
77
81
  'exclamation-triangle': () => (h("path", { fill: "currentColor", d: "m14.3 13.88-6-12a.32.32 0 0 0-.41-.15.31.31 0 0 0-.15.15l-6 12a.31.31 0 0 0 .14.42.32.32 0 0 0 .14 0H14a.31.31 0 0 0 .33-.29.23.23 0 0 0-.03-.13ZM7 6a.28.28 0 0 1 .28-.28h1.46A.28.28 0 0 1 9 6v4a.29.29 0 0 1-.28.29H7.3A.29.29 0 0 1 7 10Zm2 7a.31.31 0 0 1-.31.32H7.34A.32.32 0 0 1 7 13v-1.37a.31.31 0 0 1 .32-.31h1.39a.31.31 0 0 1 .31.31Z" })),
78
82
  'eye': () => [
@@ -92,14 +96,37 @@ export const icons = {
92
96
  h("path", { key: "file-download-1", fill: "currentColor", d: "M13.12 3.67 10.41.87a.63.63 0 0 0-.47-.2h-.17v3.66h3.54v-.17a.69.69 0 0 0-.19-.49Z" }),
93
97
  h("path", { key: "file-download-2", fill: "currentColor", d: "M13.31 14.65v-9.4H9.55a.67.67 0 0 1-.66-.68V.67H3.35a.67.67 0 0 0-.66.66v13.32a.67.67 0 0 0 .66.68h9.3a.67.67 0 0 0 .66-.66Zm-2.91-4.24-2.54 2.53a.18.18 0 0 1-.26 0l-2.54-2.53a.2.2 0 0 1-.06-.15.18.18 0 0 1 .19-.18h1.34a.2.2 0 0 0 .2-.2V7.27a.19.19 0 0 1 .19-.18h1.63a.18.18 0 0 1 .18.19v2.6a.2.2 0 0 0 .2.2h1.34a.16.16 0 0 1 .14.06.19.19 0 0 1-.01.27Z" }),
94
98
  ],
95
- 'file-excel': () => (h("path", { fill: "currentColor", d: "M8.89 4.43V.67H3.35a.65.65 0 0 0-.66.66v13.34a.65.65 0 0 0 .66.66h9.3a.65.65 0 0 0 .66-.66V5.09H9.55a.65.65 0 0 1-.66-.66Zm1.66 3.2-1.66 2.58 1.66 2.59a.34.34 0 0 1-.1.46.31.31 0 0 1-.18.05h-1a.32.32 0 0 1-.27-.17c-.54-1-1-1.9-1-1.9-.18.41-.28.55-1 1.9a.33.33 0 0 1-.29.18h-1A.34.34 0 0 1 5.4 13a.41.41 0 0 1 0-.18l1.67-2.58-1.62-2.61a.34.34 0 0 1 .1-.46.37.37 0 0 1 .18 0h1a.33.33 0 0 1 .3.17c.72 1.35.55.93 1 1.9 0 0 .17-.33 1-1.9a.33.33 0 0 1 .3-.17h1a.33.33 0 0 1 .33.33.41.41 0 0 1-.11.13ZM13.31 4v.17H9.77V.67h.17a.67.67 0 0 1 .47.19l2.71 2.71a.66.66 0 0 1 .19.43Z" })),
96
- 'file-pdf': () => (h("path", { fill: "currentColor", d: "M7.74 8a2.68 2.68 0 0 1-.06-1.3c.24 0 .21 1.02.06 1.3Zm0 1.31a12.5 12.5 0 0 1-.79 1.75 9.8 9.8 0 0 1 1.75-.61 3.63 3.63 0 0 1-1.01-1.14Zm-2.66 3.47s.36-.15 1-1.12a3.71 3.71 0 0 0-1 1.12Zm4.49-7.67h3.78v9.56a.65.65 0 0 1-.66.66H3.31a.66.66 0 0 1-.66-.66V1.33a.65.65 0 0 1 .7-.66h5.56v3.77a.67.67 0 0 0 .66.67Zm-.22 5a2.78 2.78 0 0 1-1.18-1.5 4 4 0 0 0 .17-1.78.7.7 0 0 0-.78-.6.69.69 0 0 0-.56.41 4.58 4.58 0 0 0 .23 2.14 26 26 0 0 1-1.13 2.38c-.76.39-2 1.24-1.52 1.89a.87.87 0 0 0 .6.28c.5 0 1-.5 1.7-1.72A15.24 15.24 0 0 1 9.07 11a4.34 4.34 0 0 0 1.78.54.72.72 0 0 0 .74-.7.78.78 0 0 0-.19-.51c-.4-.4-1.51-.33-2.05-.23Zm3.81-6.53L10.44.86A.71.71 0 0 0 10 .67h-.2v3.55h3.55v-.17a.7.7 0 0 0-.19-.47ZM11.1 10.9c.11-.08-.07-.33-1.19-.25 1.03.44 1.19.25 1.19.25Z" })),
99
+ 'file-excel': () => [
100
+ h("path", { key: "file-excel-1", fill: "currentColor", "fill-rule": "evenodd", d: "M9 5V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5H9Zm-.018 7h1.335L8.776 9.48l1.5-2.48H9.02l-.795 1.485a5.09 5.09 0 0 0-.157.436h-.014a2.59 2.59 0 0 0-.15-.422L7.19 7H5.82l1.457 2.5L5.683 12h1.342l.865-1.614c.06-.156.099-.272.115-.349h.014c.035.163.069.274.101.335L8.982 12Z" }),
101
+ h("path", { key: "file-excel-2", fill: "currentColor", d: "M10 4V1l3 3h-3Z" }),
102
+ ],
103
+ 'file-excel-outline': () => [
104
+ h("path", { fill: "currentColor", key: "file-excel-outline-1", d: "M8.982 12h1.335L8.776 9.48l1.5-2.48H9.02l-.795 1.485a5.09 5.09 0 0 0-.157.436h-.014a2.59 2.59 0 0 0-.15-.422L7.19 7H5.82l1.457 2.5L5.683 12h1.342l.865-1.614c.06-.156.099-.272.115-.349h.014c.035.163.069.274.101.335L8.982 12Z" }),
105
+ h("path", { fill: "currentColor", key: "file-excel-outline-2", d: "M4 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4l-3-3H4Zm6 3V2.537L11.254 4H10Zm2 1v9H4V2h5v3h3Z" }),
106
+ ],
107
+ 'file-pdf': () => [
108
+ h("path", { fill: "currentColor", key: "file-pdf-1", d: "M6.464 11.274a3.81 3.81 0 0 0-.393.207c-.223.137-.37.27-.444.387-.072.11-.073.19-.03.273a.175.175 0 0 0 .019.034.223.223 0 0 0 .027-.01c.103-.042.268-.177.48-.433.12-.147.234-.3.34-.458ZM7.706 10.267c.252-.06.507-.108.764-.146a8.824 8.824 0 0 1-.386-.65 15.7 15.7 0 0 1-.378.796ZM9.579 10.63a2.916 2.916 0 0 0 .341.314c.164.123.28.165.344.168a.082.082 0 0 0 .053-.012.232.232 0 0 0 .07-.094.33.33 0 0 0 .045-.152.072.072 0 0 0-.02-.047c-.039-.047-.15-.116-.391-.159a2.926 2.926 0 0 0-.463-.04l.02.022ZM8.051 7.952c.064-.205.114-.414.151-.626.024-.142.033-.26.029-.352a.464.464 0 0 0-.024-.15.391.391 0 0 0-.11.03c-.066.027-.12.08-.148.215a.744.744 0 0 0-.01.057c-.018.142-.006.331.044.565.018.084.041.171.068.26Z" }),
109
+ h("path", { fill: "currentColor", key: "file-pdf-2", "fill-rule": "evenodd", d: "M9 1v4h4v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h5ZM5.42 12.713a.613.613 0 0 1-.332-.318c-.147-.294-.098-.588.06-.834.15-.233.4-.43.68-.596a5.816 5.816 0 0 1 1.122-.489c.303-.544.571-1.107.804-1.686a5.554 5.554 0 0 1-.326-.98c-.065-.303-.09-.603-.034-.86.056-.268.207-.509.492-.623l.055-.02a.75.75 0 0 1 .4-.038.53.53 0 0 1 .362.276c.066.124.09.27.096.407.005.142-.01.3-.036.465-.063.386-.204.859-.394 1.358.21.447.458.874.742 1.277a4.457 4.457 0 0 1 1.01.038c.276.049.556.147.727.352a.64.64 0 0 1 .151.392.88.88 0 0 1-.104.426.788.788 0 0 1-.312.341.647.647 0 0 1-.342.078c-.25-.01-.495-.148-.706-.315a4.327 4.327 0 0 1-.69-.72 8.812 8.812 0 0 0-1.512.308 8.57 8.57 0 0 1-.773 1.143c-.22.265-.46.496-.701.596a.6.6 0 0 1-.44.022Z" }),
110
+ h("path", { fill: "currentColor", key: "file-pdf-3", d: "M10 1v3h3l-3-3Z" }),
111
+ ],
112
+ 'file-pdf-outline': () => [
113
+ h("path", { fill: "currentColor", key: "file-pdf-outline-1", d: "M5.42 12.713a.613.613 0 0 1-.332-.318c-.147-.294-.098-.588.06-.834.15-.233.4-.43.68-.596a5.816 5.816 0 0 1 1.122-.489c.303-.544.571-1.107.804-1.686a5.503 5.503 0 0 1-.326-.98c-.065-.303-.09-.603-.034-.86.056-.268.207-.509.492-.623.145-.058.303-.09.455-.058a.53.53 0 0 1 .362.276c.066.124.09.27.096.407.005.142-.01.3-.036.465-.063.386-.204.859-.394 1.358.21.447.458.874.742 1.277a4.354 4.354 0 0 1 1.01.038c.276.049.556.147.727.352a.64.64 0 0 1 .151.392.88.88 0 0 1-.104.426.788.788 0 0 1-.268.315.648.648 0 0 1-.386.104c-.25-.01-.495-.148-.706-.315a4.324 4.324 0 0 1-.69-.72 8.812 8.812 0 0 0-1.512.308 8.57 8.57 0 0 1-.773 1.143c-.22.265-.46.496-.701.596a.6.6 0 0 1-.44.022Zm1.044-1.44a3.81 3.81 0 0 0-.348.18c-.248.148-.41.29-.49.415-.07.11-.072.19-.03.273a.175.175 0 0 0 .02.034.223.223 0 0 0 .027-.01c.103-.042.268-.177.48-.433.12-.147.234-.3.34-.458Zm1.242-1.006c.252-.06.507-.108.764-.146a8.824 8.824 0 0 1-.386-.65 15.7 15.7 0 0 1-.378.796Zm2.18.65a2.971 2.971 0 0 1-.328-.309c.155.001.31.015.463.04.24.043.352.112.392.159.012.012.02.03.02.047a.33.33 0 0 1-.045.152.232.232 0 0 1-.071.094.082.082 0 0 1-.053.012c-.07-.003-.196-.05-.377-.194Zm-1.684-3.59c-.037.21-.087.42-.15.625a3.355 3.355 0 0 1-.069-.26c-.057-.268-.065-.478-.034-.623.028-.134.082-.188.148-.214a.391.391 0 0 1 .11-.03.464.464 0 0 1 .024.15c.004.092-.005.209-.029.351Z" }),
114
+ h("path", { fill: "currentColor", key: "file-pdf-outline-2", d: "M3 2a1 1 0 0 1 1-1h6l3 3v10a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V2Zm7 .537V4h1.254L10 2.537ZM12 14V5H9V2H4v12h8Z" }),
115
+ ],
97
116
  'file-text': () => (h("path", { fill: "currentColor", d: "M8.89 4.56V.67H3.35c-.36 0-.66.3-.66.66v13.32c0 .37.29.67.66.68h9.3c.36 0 .66-.3.66-.66V5.25H9.55c-.37 0-.67-.31-.66-.68Zm1.77 6.75c0 .19-.15.34-.34.35H5.68c-.19 0-.34-.16-.34-.35v-.23c0-.19.15-.34.34-.34h4.64c.19 0 .34.15.34.34v.23Zm0-1.83c0 .19-.15.34-.34.34H5.68c-.19 0-.34-.15-.34-.34v-.23c0-.19.15-.34.34-.34h4.64c.19 0 .34.15.34.34v.23Zm0-2.06v.23c0 .19-.15.34-.34.34H5.68c-.19 0-.34-.15-.34-.34v-.23c0-.19.15-.34.34-.35h4.64c.19 0 .34.16.34.35Zm2.65-3.27v.17H9.77V.67h.17c.18 0 .35.07.47.2l2.71 2.8c.13.13.19.31.19.49Z" })),
98
117
  'file-text-outline': () => (h("path", { fill: "currentColor", d: "M10.31 10.74H5.69c-.2 0-.36.16-.36.35v.22c0 .19.16.35.36.35h4.62c.2 0 .36-.16.36-.35v-.22c0-.19-.16-.35-.36-.35Zm0-1.84H5.69c-.2 0-.36.16-.36.36v.21c0 .2.16.35.36.35h4.62c.2 0 .36-.15.36-.35v-.21c0-.2-.16-.36-.36-.36Zm0-1.83H5.69c-.2 0-.36.16-.36.35v.22c0 .19.16.35.36.35h4.62c.2 0 .36-.16.36-.35v-.22c0-.19-.16-.35-.36-.35Zm0 3.67H5.69c-.2 0-.36.16-.36.35v.22c0 .19.16.35.36.35h4.62c.2 0 .36-.16.36-.35v-.22c0-.19-.16-.35-.36-.35Zm0-1.84H5.69c-.2 0-.36.16-.36.36v.21c0 .2.16.35.36.35h4.62c.2 0 .36-.15.36-.35v-.21c0-.2-.16-.36-.36-.36Zm0-1.83H5.69c-.2 0-.36.16-.36.35v.22c0 .19.16.35.36.35h4.62c.2 0 .36-.16.36-.35v-.22c0-.19-.16-.35-.36-.35Zm2.76-2.64L9.69.92A.8.8 0 0 0 9.1.67H3.35c-.36 0-.66.3-.66.66v13.32c0 .37.29.67.66.68h9.3c.36 0 .66-.3.66-.66V5.05c0-.23-.07-.45-.24-.62Zm-.76 9.9H3.69V1.67h5.2v2.75c0 .46.37.83.83.83h2.59v9.08Z" })),
99
118
  'file-upload': () => [
100
119
  h("path", { key: "file-upload-1", fill: "currentColor", d: "M13.1 3.7 10.4.9c-.1-.1-.3-.2-.5-.2h-.1v3.7h3.5v-.2c0-.2-.1-.4-.2-.5z" }),
101
120
  h("path", { key: "file-upload-2", fill: "currentColor", d: "M13.3 14.6V5.3H9.6c-.4 0-.7-.3-.7-.7V.7H3.3c-.3 0-.6.3-.6.6v13.3c0 .4.3.7.7.7h9.3c.3 0 .6-.3.6-.7zm-3-4.6H8.9c-.1 0-.2.1-.2.2v2.6c0 .1-.1.2-.2.2H6.9c-.1 0-.2-.1-.2-.2v-2.6c0-.1-.1-.2-.2-.2H5.1C5 9.9 5 9.8 5 9.7l2.5-2.6c.1-.1.2-.1.3 0l2.5 2.5.1.1c.1.2 0 .3-.1.3z" }),
102
121
  ],
122
+ 'file-word': () => [
123
+ h("path", { fill: "currentColor", "fill-rule": "evenodd", key: "file-word-1", d: "M9 5V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V5H9ZM5 7l1.091 5h1.002L8 8.262 8.91 12h.98L11 7h-.93l-.701 3.492L8.568 7H7.47l-.836 3.434L5.944 7H5Z" }),
124
+ h("path", { fill: "currentColor", key: "file-word-2", d: "M10 4V1l3 3h-3Z" }),
125
+ ],
126
+ 'file-word-outline': () => [
127
+ h("path", { fill: "currentColor", d: "m5 7 1.091 5h1.002L8 8.262 8.91 12h.98L11 7h-.93l-.701 3.492L8.568 7H7.47l-.836 3.434L5.944 7H5Z" }),
128
+ h("path", { fill: "currentColor", d: "M4 1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4l-3-3H4Zm6 3V2.537L11.254 4H10Zm2 1v9H4V2h5v3h3Z" }),
129
+ ],
103
130
  'filter': () => (h("path", { fill: "currentColor", d: "M13.74 1.66H2.26a.6.6 0 0 0-.59.6.59.59 0 0 0 .17.42l4.58 4.58v5.1a.58.58 0 0 0 .25.48l2 1.39a.6.6 0 0 0 .83-.15.59.59 0 0 0 .1-.34V7.26l4.58-4.58a.6.6 0 0 0 0-.84.64.64 0 0 0-.44-.18Z" })),
104
131
  'floppy-disk': () => (h("path", { fill: "currentColor", d: "m13.93 4.44-2.37-2.37c-.25-.25-.6-.4-.96-.4H3.03c-.75 0-1.36.61-1.36 1.36v9.94c0 .75.61 1.36 1.36 1.36h9.94c.75 0 1.36-.61 1.36-1.36V5.4c0-.36-.14-.7-.4-.96ZM8 12.52A1.81 1.81 0 1 1 8 8.9a1.81 1.81 0 0 1 0 3.62Zm2.71-5.77c0 .09-.04.18-.1.24a.35.35 0 0 1-.24.1H3.82c-.19 0-.34-.15-.34-.34V3.82c0-.19.15-.34.34-.34h6.55c.19 0 .34.15.34.34v2.93Z" })),
105
132
  'folder': () => (h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2C1.27 2.67.68 3.27.67 4v8c0 .73.6 1.32 1.33 1.33h12c.73 0 1.32-.6 1.33-1.33V5.78c0-.73-.6-1.33-1.33-1.34Z" })),
@@ -179,8 +206,8 @@ export const icons = {
179
206
  'user': () => (h("path", { fill: "currentColor", d: "M8 8.79a3.56 3.56 0 1 0-3.56-3.56A3.56 3.56 0 0 0 8 8.79Zm3.17.79H9.8a4.27 4.27 0 0 1-3.6 0H4.83a3.16 3.16 0 0 0-3.16 3.17v.4a1.18 1.18 0 0 0 1.18 1.18h10.3a1.18 1.18 0 0 0 1.18-1.18v-.4a3.16 3.16 0 0 0-3.16-3.17Z" })),
180
207
  'user-circle': () => (h("path", { fill: "currentColor", d: "M8 .62C3.95.61.66 3.9.65 7.95c0 4.05 3.28 7.34 7.33 7.35 4.04 0 7.33-3.26 7.35-7.3.02-4.05-3.25-7.36-7.3-7.38H8Zm0 .75c3.64 0 6.59 2.96 6.58 6.6V8c0 1.35-.41 2.66-1.19 3.76a2.713 2.713 0 0 0-2.66-2.37H9.54c-.98.46-2.1.46-3.08 0H5.28c-1.36 0-2.5 1.02-2.67 2.37A6.483 6.483 0 0 1 1.42 8a6.59 6.59 0 0 1 6.55-6.63H8ZM5 5.63c0-1.68 1.37-3.05 3.05-3.05 1.68 0 3.05 1.37 3.05 3.05 0 1.68-1.37 3.05-3.05 3.05H8c-1.66-.03-3-1.39-3-3.05Z" })),
181
208
  'user-pen-fancy-outline': () => [
182
- h("path", { fill: "currentColor", d: "M7.5 7a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5Zm0-4C6.67 3 6 3.67 6 4.5S6.67 6 7.5 6 9 5.33 9 4.5 8.33 3 7.5 3ZM11.12 11.46l-.22.54-.3.77s-.04.09-.06.13c-.03.04-.06.07-.1.1-.05.04-.1.07-.16.08L7.52 14l-.07-.07 1.45-1.45h.13c.15 0 .27-.06.36-.16a.56.56 0 0 0 .1-.15c.01-.02.02-.04.03-.07v-.02s.01-.05.01-.08v-.03c0-.28-.23-.5-.51-.5-.28.01-.5.24-.5.51v.14l-.76.75-.14.13-.55.55-.07-.07.16-.48.1-.29.24-.71.42-1.27c.05-.16.17-.28.32-.32l1.31-.52 1.57 1.57ZM14.56 8.22l-2.05 1.87-.7.64-.06.05-.32.29-1.52-1.52.28-.31.06-.06.64-.7 1.88-2.04c1.16-1.31 3.11.61 1.79 1.78Z" }),
183
- h("path", { fill: "currentColor", d: "M9 8H6c-2.21 0-4 1.79-4 4 0 .55.45 1 1 1h3.11l.33-1H3c0-1.66 1.34-3 3-3h3.05l.12-.13.71-.77C9.6 8.03 9.3 8 9 8Z" }),
209
+ h("path", { fill: "currentColor", key: "user-pen-fancy-outline-1", d: "M7.5 7a2.5 2.5 0 0 1 0-5 2.5 2.5 0 0 1 0 5Zm0-4C6.67 3 6 3.67 6 4.5S6.67 6 7.5 6 9 5.33 9 4.5 8.33 3 7.5 3ZM11.12 11.46l-.22.54-.3.77s-.04.09-.06.13c-.03.04-.06.07-.1.1-.05.04-.1.07-.16.08L7.52 14l-.07-.07 1.45-1.45h.13c.15 0 .27-.06.36-.16a.56.56 0 0 0 .1-.15c.01-.02.02-.04.03-.07v-.02s.01-.05.01-.08v-.03c0-.28-.23-.5-.51-.5-.28.01-.5.24-.5.51v.14l-.76.75-.14.13-.55.55-.07-.07.16-.48.1-.29.24-.71.42-1.27c.05-.16.17-.28.32-.32l1.31-.52 1.57 1.57ZM14.56 8.22l-2.05 1.87-.7.64-.06.05-.32.29-1.52-1.52.28-.31.06-.06.64-.7 1.88-2.04c1.16-1.31 3.11.61 1.79 1.78Z" }),
210
+ h("path", { fill: "currentColor", key: "user-pen-fancy-outline-2", d: "M9 8H6c-2.21 0-4 1.79-4 4 0 .55.45 1 1 1h3.11l.33-1H3c0-1.66 1.34-3 3-3h3.05l.12-.13.71-.77C9.6 8.03 9.3 8 9 8Z" }),
184
211
  ],
185
212
  'user-group': () => (h("path", { fill: "currentColor", d: "M13.15 4.12c-.81-.01-1.47.65-1.48 1.46 0 .82.65 1.47 1.46 1.48s1.47-.65 1.48-1.46-.65-1.47-1.46-1.48Zm-10.04.01a1.47 1.47 0 0 0-1.58 1.59c.06.71.62 1.28 1.34 1.34.81.07 1.52-.53 1.59-1.34.06-.81-.54-1.52-1.35-1.59Zm7.36.39c-.22-.84-.87-1.51-1.71-1.75-1.36-.41-2.8.36-3.22 1.72-.18.61-.13 1.27.14 1.85.41.9 1.33 1.48 2.32 1.45 1.41.01 2.56-1.14 2.57-2.55 0-.24-.03-.49-.1-.72Zm-.71 4h-.19c-.99.49-2.14.49-3.13 0h-.19c-1.46 0-2.64 1.18-2.64 2.64v2.69c1.23.93 2.74 1.47 4.39 1.47s3.17-.55 4.4-1.48v-2.68c0-1.46-1.18-2.64-2.64-2.64Zm5.52.25a7.282 7.282 0 0 1-1.65 3.91c-.08.1-.16.19-.25.28-.08.09-.17.18-.25.27v-.55h.03v-.72s.01-.07 0-.1v-.66c.01-1.25-.66-2.4-1.76-3 .27-.26.63-.41 1-.41h1.51c.63.01 1.17.41 1.37.98ZM2.86 11.16v1.52h.01v.55l-.28-.31c-.08-.08-.15-.16-.22-.24A7.238 7.238 0 0 1 .74 8.86c.16-.62.72-1.07 1.4-1.07h1.47c.37-.01.73.12 1.01.37-1.1.6-1.77 1.75-1.76 3Z" })),
186
213
  'user-plus': () => (h("path", { fill: "currentColor", d: "M14,3.33H12.65V2a.36.36,0,0,0-.35-.33h-.65A.36.36,0,0,0,11.3,2V3.33H10a.34.34,0,0,0-.33.34v.66a.34.34,0,0,0,.33.34H11.3V6a.37.37,0,0,0,.35.33h.65A.37.37,0,0,0,12.65,6V4.67H14a.34.34,0,0,0,.32-.34V3.67A.34.34,0,0,0,14,3.33ZM9.28,9.77h-.2a5.19,5.19,0,0,1-3.91,0H5A3,3,0,0,0,1.7,12.46h0v.72A1.27,1.27,0,0,0,3,14.33h8.25a1.26,1.26,0,0,0,1.36-1.14v-.68A3,3,0,0,0,9.37,9.76H9.28ZM7.13,3.7A2.64,2.64,0,1,1,4.5,6.34h0A2.64,2.64,0,0,1,7.13,3.7Z" })),
@@ -192,8 +219,12 @@ export const icons = {
192
219
  /**
193
220
  * List of all possibles sizes
194
221
  */
195
- export const sizes = ['small', 'regular', 'large', 'extra-large'];
222
+ export const sizes = ['small', 'regular', 'medium', 'large', 'extra-large'];
196
223
  /**
197
224
  * List of all possibles variants
198
225
  */
199
- export const variants = ['success', 'warning', 'danger', 'info'];
226
+ export const variants = ['success', 'warning', 'danger', 'info', 'app'];
227
+ /**
228
+ * List of all possibles variants styles
229
+ */
230
+ export const variantStyles = ['icon', 'background', 'full'];
@@ -30,37 +30,96 @@
30
30
  vertical-align: middle;
31
31
  }
32
32
 
33
+ .mg-icon {
34
+ color: currentColor;
35
+ }
33
36
  .mg-icon[size=small], .mg-icon.mg-icon--size-small {
34
37
  width: var(--mg-icon-small-size);
35
38
  height: var(--mg-icon-small-size);
36
39
  }
40
+ .mg-icon[size=small][class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon), .mg-icon.mg-icon--size-small[class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon) {
41
+ padding: calc(var(--mg-icon-small-size) / 2);
42
+ }
37
43
  .mg-icon[size=regular], .mg-icon.mg-icon--size-regular {
38
44
  width: var(--mg-icon-regular-size);
39
45
  height: var(--mg-icon-regular-size);
40
46
  }
47
+ .mg-icon[size=regular][class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon), .mg-icon.mg-icon--size-regular[class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon) {
48
+ padding: calc(var(--mg-icon-regular-size) / 2);
49
+ }
50
+ .mg-icon[size=medium], .mg-icon.mg-icon--size-medium {
51
+ width: var(--mg-icon-medium-size);
52
+ height: var(--mg-icon-medium-size);
53
+ }
54
+ .mg-icon[size=medium][class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon), .mg-icon.mg-icon--size-medium[class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon) {
55
+ padding: calc(var(--mg-icon-medium-size) / 2);
56
+ }
41
57
  .mg-icon[size=large], .mg-icon.mg-icon--size-large {
42
58
  width: var(--mg-icon-large-size);
43
59
  height: var(--mg-icon-large-size);
44
60
  }
61
+ .mg-icon[size=large][class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon), .mg-icon.mg-icon--size-large[class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon) {
62
+ padding: calc(var(--mg-icon-large-size) / 2);
63
+ }
45
64
  .mg-icon[size=extra-large], .mg-icon.mg-icon--size-extra-large {
46
65
  width: var(--mg-icon-extra-large-size);
47
66
  height: var(--mg-icon-extra-large-size);
48
67
  }
49
- .mg-icon[class*=mg-icon--variant-] {
50
- border-radius: var(--mg-message-border-radius);
51
- padding: 0.3rem;
68
+ .mg-icon[size=extra-large][class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon), .mg-icon.mg-icon--size-extra-large[class*=mg-icon--variant-]:not(.mg-icon--variant-style-icon) {
69
+ padding: calc(var(--mg-icon-extra-large-size) / 2);
70
+ }
71
+ .mg-icon.mg-icon--variant-success.mg-icon--variant-style-icon {
72
+ color: hsl(var(--color-success-h), var(--color-success-s), var(--color-success-l));
73
+ }
74
+ .mg-icon.mg-icon--variant-warning.mg-icon--variant-style-icon {
75
+ color: hsl(var(--color-warning-h), var(--color-warning-s), var(--color-warning-l));
76
+ }
77
+ .mg-icon.mg-icon--variant-danger.mg-icon--variant-style-icon {
78
+ color: hsl(var(--color-danger-h), var(--color-danger-s), var(--color-danger-l));
52
79
  }
53
- .mg-icon.mg-icon--variant-success {
54
- background-color: hsl(var(--color-success-h), var(--color-success-s), calc(var(--color-success-l) + 20%));
80
+ .mg-icon.mg-icon--variant-info.mg-icon--variant-style-icon {
81
+ color: hsl(var(--color-info-h), var(--color-info-s), var(--color-info-l));
55
82
  }
56
- .mg-icon.mg-icon--variant-warning {
57
- background-color: hsl(var(--color-warning-h), var(--color-warning-s), calc(var(--color-warning-l) + 20%));
83
+ .mg-icon.mg-icon--variant-app.mg-icon--variant-style-icon {
84
+ color: hsl(var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-app-l));
58
85
  }
59
- .mg-icon.mg-icon--variant-danger {
60
- background-color: hsl(var(--color-danger-h), var(--color-danger-s), calc(var(--color-danger-l) + 20%));
86
+ .mg-icon.mg-icon--variant-success.mg-icon--variant-style-background {
87
+ background-color: hsl(var(--color-success-h), var(--color-success-s), var(--mg-color-soft-l));
61
88
  }
62
- .mg-icon.mg-icon--variant-info {
63
- background-color: hsl(var(--color-info-h), var(--color-info-s), calc(var(--color-info-l) + 20%));
89
+ .mg-icon.mg-icon--variant-warning.mg-icon--variant-style-background {
90
+ background-color: hsl(var(--color-warning-h), var(--color-warning-s), var(--mg-color-soft-l));
91
+ }
92
+ .mg-icon.mg-icon--variant-danger.mg-icon--variant-style-background {
93
+ background-color: hsl(var(--color-danger-h), var(--color-danger-s), var(--mg-color-soft-l));
94
+ }
95
+ .mg-icon.mg-icon--variant-info.mg-icon--variant-style-background {
96
+ background-color: hsl(var(--color-info-h), var(--color-info-s), var(--mg-color-soft-l));
97
+ }
98
+ .mg-icon.mg-icon--variant-app.mg-icon--variant-style-background {
99
+ background-color: hsl(var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-soft-l));
100
+ }
101
+ .mg-icon.mg-icon--variant-success.mg-icon--variant-style-full {
102
+ color: hsl(var(--color-success-h), var(--color-success-s), var(--color-success-l));
103
+ background-color: hsl(var(--color-success-h), var(--color-success-s), var(--mg-color-soft-l));
104
+ }
105
+ .mg-icon.mg-icon--variant-warning.mg-icon--variant-style-full {
106
+ color: hsl(var(--color-warning-h), var(--color-warning-s), var(--color-warning-l));
107
+ background-color: hsl(var(--color-warning-h), var(--color-warning-s), var(--mg-color-soft-l));
108
+ }
109
+ .mg-icon.mg-icon--variant-danger.mg-icon--variant-style-full {
110
+ color: hsl(var(--color-danger-h), var(--color-danger-s), var(--color-danger-l));
111
+ background-color: hsl(var(--color-danger-h), var(--color-danger-s), var(--mg-color-soft-l));
112
+ }
113
+ .mg-icon.mg-icon--variant-info.mg-icon--variant-style-full {
114
+ color: hsl(var(--color-info-h), var(--color-info-s), var(--color-info-l));
115
+ background-color: hsl(var(--color-info-h), var(--color-info-s), var(--mg-color-soft-l));
116
+ }
117
+ .mg-icon.mg-icon--variant-app.mg-icon--variant-style-full {
118
+ color: hsl(var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-app-l));
119
+ background-color: hsl(var(--mg-color-app-h), var(--mg-color-app-s), var(--mg-color-soft-l));
120
+ }
121
+ .mg-icon[class*=mg-icon--variant-] {
122
+ border-radius: var(--mg-icon-border-radius);
64
123
  }
65
124
 
66
125
  /**
@@ -1,5 +1,5 @@
1
1
  import { h } from '@stencil/core';
2
- import { icons, sizes, variants } from './mg-icon.conf';
2
+ import { icons, sizes, variants, variantStyles } from './mg-icon.conf';
3
3
  import { ClassList } from '../../../utils/components.utils';
4
4
  export class MgIcon {
5
5
  constructor() {
@@ -12,40 +12,50 @@ export class MgIcon {
12
12
  this.icon = undefined;
13
13
  this.size = 'regular';
14
14
  this.variant = undefined;
15
+ this.variantStyle = undefined;
15
16
  this.spin = false;
16
17
  this.classList = new ClassList(['mg-icon']);
17
18
  }
18
19
  validateIcon(newValue, oldValue) {
19
- if (!Object.keys(icons).includes(newValue)) {
20
+ if (!Object.keys(icons).includes(newValue))
20
21
  throw new Error(`<mg-icon> prop "icon" must be one of: ${Object.keys(icons).join(', ')}`);
21
- }
22
22
  else {
23
- if (oldValue !== undefined) {
23
+ if (oldValue !== undefined)
24
24
  this.classList.delete(`mg-icon--${oldValue}`);
25
- }
26
25
  this.classList.add(`mg-icon--${newValue}`);
27
26
  }
28
27
  }
29
28
  validateSize(newValue, oldValue) {
30
- if (!sizes.includes(newValue)) {
29
+ if (!sizes.includes(newValue))
31
30
  throw new Error(`<mg-icon> prop "size" must be one of: ${sizes.join(', ')}`);
32
- }
33
31
  else {
34
- if (oldValue !== undefined) {
32
+ if (oldValue !== undefined)
35
33
  this.classList.delete(`mg-icon--size-${oldValue}`);
36
- }
37
34
  this.classList.add(`mg-icon--size-${newValue}`);
38
35
  }
39
36
  }
40
37
  validateVariant(newValue, oldValue) {
41
- if (newValue !== undefined && !variants.includes(newValue)) {
42
- throw new Error(`<mg-icon> prop "variant" must be one of: ${variants.join(', ')}`);
38
+ if (Boolean(newValue)) {
39
+ if (!variants.includes(newValue))
40
+ throw new Error(`<mg-icon> prop "variant" must be one of: ${variants.join(', ')}`);
41
+ else {
42
+ if (this.variantStyle === undefined)
43
+ this.variantStyle = 'background';
44
+ if (oldValue !== undefined)
45
+ this.classList.delete(`mg-icon--variant-${oldValue}`);
46
+ this.classList.add(`mg-icon--variant-${newValue}`);
47
+ }
43
48
  }
44
- else if (newValue !== undefined) {
45
- if (oldValue !== undefined) {
46
- this.classList.delete(`mg-icon--variant-${oldValue}`);
49
+ }
50
+ validateVariantStyle(newValue, oldValue) {
51
+ if (Boolean(newValue)) {
52
+ if (!variantStyles.includes(newValue))
53
+ throw new Error(`<mg-icon> prop "variantStyle" must be one of: ${variantStyles.join(', ')}`);
54
+ else {
55
+ if (oldValue !== undefined)
56
+ this.classList.delete(`mg-icon--variant-style-${oldValue}`);
57
+ this.classList.add(`mg-icon--variant-style-${newValue}`);
47
58
  }
48
- this.classList.add(`mg-icon--variant-${newValue}`);
49
59
  }
50
60
  }
51
61
  handleSpin(newValue) {
@@ -67,6 +77,7 @@ export class MgIcon {
67
77
  this.validateIcon(this.icon);
68
78
  this.validateSize(this.size);
69
79
  this.validateVariant(this.variant);
80
+ this.validateVariantStyle(this.variantStyle);
70
81
  this.handleSpin(this.spin);
71
82
  }
72
83
  /**
@@ -99,11 +110,11 @@ export class MgIcon {
99
110
  "resolved": "string",
100
111
  "references": {}
101
112
  },
102
- "required": false,
113
+ "required": true,
103
114
  "optional": false,
104
115
  "docs": {
105
116
  "tags": [],
106
- "text": "Icon to display"
117
+ "text": "Icon to display."
107
118
  },
108
119
  "attribute": "icon",
109
120
  "reflect": false
@@ -113,7 +124,7 @@ export class MgIcon {
113
124
  "mutable": false,
114
125
  "complexType": {
115
126
  "original": "IconSizeType",
116
- "resolved": "\"extra-large\" | \"large\" | \"regular\" | \"small\"",
127
+ "resolved": "\"extra-large\" | \"large\" | \"medium\" | \"regular\" | \"small\"",
117
128
  "references": {
118
129
  "IconSizeType": {
119
130
  "location": "import",
@@ -136,7 +147,7 @@ export class MgIcon {
136
147
  "mutable": false,
137
148
  "complexType": {
138
149
  "original": "IconVariantType",
139
- "resolved": "\"danger\" | \"info\" | \"success\" | \"warning\"",
150
+ "resolved": "\"app\" | \"danger\" | \"info\" | \"success\" | \"warning\"",
140
151
  "references": {
141
152
  "IconVariantType": {
142
153
  "location": "import",
@@ -145,14 +156,36 @@ export class MgIcon {
145
156
  }
146
157
  },
147
158
  "required": false,
148
- "optional": true,
159
+ "optional": false,
149
160
  "docs": {
150
161
  "tags": [],
151
- "text": "Define icon variant\nAdd a background to the icon based on variant color"
162
+ "text": "Define icon variant color"
152
163
  },
153
164
  "attribute": "variant",
154
165
  "reflect": false
155
166
  },
167
+ "variantStyle": {
168
+ "type": "string",
169
+ "mutable": true,
170
+ "complexType": {
171
+ "original": "IconVariantStyleType",
172
+ "resolved": "\"background\" | \"full\" | \"icon\"",
173
+ "references": {
174
+ "IconVariantStyleType": {
175
+ "location": "import",
176
+ "path": "./mg-icon.conf"
177
+ }
178
+ }
179
+ },
180
+ "required": false,
181
+ "optional": false,
182
+ "docs": {
183
+ "tags": [],
184
+ "text": "Define icon color variant style\nAdd a color to the icon based on variant color with given style\n'full': Used to set a circular background with variant soft color and icon variant color\n'background': Used to set a circular background with variant soft color\n'icon': Used to set a color only to the icon"
185
+ },
186
+ "attribute": "variant-style",
187
+ "reflect": false
188
+ },
156
189
  "spin": {
157
190
  "type": "boolean",
158
191
  "mutable": false,
@@ -188,6 +221,9 @@ export class MgIcon {
188
221
  }, {
189
222
  "propName": "variant",
190
223
  "methodName": "validateVariant"
224
+ }, {
225
+ "propName": "variantStyle",
226
+ "methodName": "validateVariantStyle"
191
227
  }, {
192
228
  "propName": "spin",
193
229
  "methodName": "handleSpin"