@massimo-cassandro/minimo 1.16.2 → 1.17.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 (69) hide show
  1. package/design-tokens/_src/headings.minimo.tokens.mjs +8 -0
  2. package/design-tokens/_src/typography.minimo.tokens.mjs +1 -1
  3. package/design-tokens/tokens/{headings.minimo.tokens.jsonc → design-tokens/_src/headings.minimo.tokens.jsonc} +8 -0
  4. package/design-tokens/tokens/src/components/inner-nav/inner-nav.minimo.tokens.jsonc +20 -0
  5. package/design-tokens/tokens/src/components/modal-alert/modal-alert.minimo.tokens.jsonc +166 -0
  6. package/design-tokens/tokens/src/components/slide-up-down-toggle/slide-up-down-toggle.minimo.tokens.jsonc +14 -0
  7. package/design-tokens/utilities/build-tokens-src/formats/css.mjs +1 -1
  8. package/design-tokens/utilities/build-tokens-src/formats/penpot.mjs +1 -1
  9. package/design-tokens/utilities/check-unresolved-custom-props.mjs +11 -12
  10. package/design-tokens/utilities/tokens-config-sample.mjs +1 -1
  11. package/package.json +1 -1
  12. package/src/components/inner-nav/inner-nav.css +2 -2
  13. package/src/components/inner-nav/inner-nav.minimo.tokens.mjs +15 -0
  14. package/src/components/modal-alert/modal-alert.js +295 -165
  15. package/src/components/modal-alert/modal-alert.minimo.tokens.mjs +164 -0
  16. package/src/components/modal-alert/modal-alert.module.css +145 -0
  17. package/src/components/modal-alert/svg/confirm.svg +4 -1
  18. package/src/components/modal-alert/svg/danger.svg +4 -0
  19. package/src/components/modal-alert/svg/error.svg +4 -1
  20. package/src/components/modal-alert/svg/info.svg +4 -1
  21. package/src/components/modal-alert/svg/success.svg +4 -1
  22. package/src/components/modal-alert/svg/warning.svg +4 -1
  23. package/src/components/slide-up-down-toggle/slide-up-down-toggle.minimo.tokens.mjs +9 -0
  24. package/src/components/slide-up-down-toggle/slide-up-down-toggle.module.css +2 -2
  25. package/src/custom-properties.css +26 -0
  26. package/src/components/modal-alert/TODO modal-alert-demo/demo.css +0 -63
  27. package/src/components/modal-alert/TODO modal-alert-demo/demo.js +0 -155
  28. package/src/components/modal-alert/TODO.md +0 -3
  29. package/src/components/modal-alert/customization-templates/custom-modal-alert.css +0 -46
  30. package/src/components/modal-alert/customization-templates/custom-modal-alert.js +0 -89
  31. package/src/components/modal-alert/defaults.js +0 -58
  32. package/src/components/modal-alert/marks.js +0 -9
  33. package/src/components/modal-alert/modal-alert.css +0 -159
  34. package/src/components/modal-alert/svg/svg-to-js.mjs +0 -26
  35. /package/design-tokens/tokens/{alerts.minimo.tokens.jsonc → design-tokens/_src/alerts.minimo.tokens.jsonc} +0 -0
  36. /package/design-tokens/tokens/{badge.minimo.tokens.jsonc → design-tokens/_src/badge.minimo.tokens.jsonc} +0 -0
  37. /package/design-tokens/tokens/{btn-close.minimo.tokens.jsonc → design-tokens/_src/btn-close.minimo.tokens.jsonc} +0 -0
  38. /package/design-tokens/tokens/{btn-color-themes.minimo.tokens.jsonc → design-tokens/_src/btn-color-themes.minimo.tokens.jsonc} +0 -0
  39. /package/design-tokens/tokens/{btn.minimo.tokens.jsonc → design-tokens/_src/btn.minimo.tokens.jsonc} +0 -0
  40. /package/design-tokens/tokens/{color-accent.minimo.tokens.jsonc → design-tokens/_src/color-accent.minimo.tokens.jsonc} +0 -0
  41. /package/design-tokens/tokens/{color-neutral.minimo.tokens.jsonc → design-tokens/_src/color-neutral.minimo.tokens.jsonc} +0 -0
  42. /package/design-tokens/tokens/{color-primary.minimo.tokens.jsonc → design-tokens/_src/color-primary.minimo.tokens.jsonc} +0 -0
  43. /package/design-tokens/tokens/{color-secondary.minimo.tokens.jsonc → design-tokens/_src/color-secondary.minimo.tokens.jsonc} +0 -0
  44. /package/design-tokens/tokens/{flex-grid.minimo.tokens.jsonc → design-tokens/_src/flex-grid.minimo.tokens.jsonc} +0 -0
  45. /package/design-tokens/tokens/{form-validation.minimo.tokens.jsonc → design-tokens/_src/form-validation.minimo.tokens.jsonc} +0 -0
  46. /package/design-tokens/tokens/{form.minimo.tokens.jsonc → design-tokens/_src/form.minimo.tokens.jsonc} +0 -0
  47. /package/design-tokens/tokens/{layout.minimo.tokens.jsonc → design-tokens/_src/layout.minimo.tokens.jsonc} +0 -0
  48. /package/design-tokens/tokens/{link.minimo.tokens.jsonc → design-tokens/_src/link.minimo.tokens.jsonc} +0 -0
  49. /package/design-tokens/tokens/{modal-popup.minimo.tokens.jsonc → design-tokens/_src/modal-popup.minimo.tokens.jsonc} +0 -0
  50. /package/design-tokens/tokens/{radius.minimo.tokens.jsonc → design-tokens/_src/radius.minimo.tokens.jsonc} +0 -0
  51. /package/design-tokens/tokens/{shadows.minimo.tokens.jsonc → design-tokens/_src/shadows.minimo.tokens.jsonc} +0 -0
  52. /package/design-tokens/tokens/{size.minimo.tokens.jsonc → design-tokens/_src/size.minimo.tokens.jsonc} +0 -0
  53. /package/design-tokens/tokens/{status.minimo.tokens.jsonc → design-tokens/_src/status.minimo.tokens.jsonc} +0 -0
  54. /package/design-tokens/tokens/{switch.minimo.tokens.jsonc → design-tokens/_src/switch.minimo.tokens.jsonc} +0 -0
  55. /package/design-tokens/tokens/{table.minimo.tokens.jsonc → design-tokens/_src/table.minimo.tokens.jsonc} +0 -0
  56. /package/design-tokens/tokens/{text.minimo.tokens.jsonc → design-tokens/_src/text.minimo.tokens.jsonc} +0 -0
  57. /package/design-tokens/tokens/{typography.minimo.tokens.jsonc → design-tokens/_src/typography.minimo.tokens.jsonc} +0 -0
  58. /package/design-tokens/tokens/{utility.minimo.tokens.jsonc → design-tokens/_src/utility.minimo.tokens.jsonc} +0 -0
  59. /package/design-tokens/tokens/{z-index.minimo.tokens.jsonc → design-tokens/_src/z-index.minimo.tokens.jsonc} +0 -0
  60. /package/design-tokens/tokens/{components → src/components/sf-macro}/sf-macro.minimo.tokens.jsonc +0 -0
  61. /package/design-tokens/tokens/{components → src/components/snackbar}/snackbar.minimo.tokens.jsonc +0 -0
  62. /package/design-tokens/tokens/{components → src/components/spinner}/spinner.minimo.tokens.jsonc +0 -0
  63. /package/design-tokens/tokens/{components → src/components/unsplash-page}/unsplash-page.minimo.tokens.jsonc +0 -0
  64. /package/design-tokens/tokens/{web-components → src/web-components/s-datatable-component}/simple-datatable.minimo.tokens.jsonc +0 -0
  65. /package/{design-tokens/_src/components → src/components/sf-macro}/sf-macro.minimo.tokens.mjs +0 -0
  66. /package/{design-tokens/_src/components → src/components/snackbar}/snackbar.minimo.tokens.mjs +0 -0
  67. /package/{design-tokens/_src/components → src/components/spinner}/spinner.minimo.tokens.mjs +0 -0
  68. /package/{design-tokens/_src/components → src/components/unsplash-page}/unsplash-page.minimo.tokens.mjs +0 -0
  69. /package/{design-tokens/_src/web-components → src/web-components/s-datatable-component}/simple-datatable.minimo.tokens.mjs +0 -0
@@ -0,0 +1,145 @@
1
+ .malert {
2
+ width: 600px;
3
+ max-width: 90vw;
4
+ padding: 0;
5
+ background-color: var(--malert-background-color);
6
+ border: none;
7
+ border-radius: var(--malert-border-radius);
8
+ box-shadow: var(--malert-box-shadow, var(--default-box-shadow));
9
+ /* box-shadow: 2px 2px 12px #000; */
10
+
11
+ &::backdrop {
12
+ overscroll-behavior: contain;
13
+ background-color: var(--malert-backdrop);
14
+ }
15
+
16
+ &, * {
17
+ box-sizing: border-box;
18
+ }
19
+ }
20
+
21
+ .success {
22
+ --_malert-color: var(--malert-success-bg);
23
+ --_malert-color-fg: var(--malert-success-fg);
24
+ }
25
+ .info {
26
+ --_malert-color: var(--malert-info-bg);
27
+ --_malert-color-fg: var(--malert-info-fg);
28
+ }
29
+ .warning {
30
+ --_malert-color: var(--malert-warning-bg);
31
+ --_malert-color-fg: var(--malert-warning-fg);
32
+ }
33
+ .error {
34
+ --_malert-color: var(--malert-error-bg);
35
+ --_malert-color-fg: var(--malert-error-fg);
36
+ }
37
+ .confirm {
38
+ --_malert-color: var(--malert-confirm-bg);
39
+ --_malert-color-fg: var(--malert-confirm-fg);
40
+ }
41
+
42
+
43
+ .innerWrapper{
44
+ display: flex;
45
+ flex-flow: column nowrap;
46
+ /* gap: .7rem; */
47
+ align-items: stretch;
48
+ justify-content: flex-start;
49
+
50
+ @media screen and (min-width: 600px) {
51
+ flex-direction: row;
52
+ }
53
+ }
54
+
55
+
56
+ .mMark {
57
+ display: flex;
58
+ flex: 0;
59
+ align-items: center;
60
+ justify-content: center;
61
+ width: 100%;
62
+ padding: .4rem;
63
+ background-color: var(--_malert-color-bg);
64
+
65
+ svg {
66
+ width: 100px;
67
+ aspect-ratio: 1;
68
+ fill: var(--_malert-color-fg);
69
+ }
70
+
71
+ @media screen and (min-width: 600px) {
72
+ flex-direction: row;
73
+ align-items: flex-start;
74
+ width: auto;
75
+ padding: 1rem;
76
+ /* svg {
77
+ width: 100px;
78
+ } */
79
+ }
80
+ }
81
+
82
+ .mBody {
83
+ display: flex;
84
+ flex: 1;
85
+ flex-flow: column nowrap;
86
+ gap: .5rem;
87
+ align-items: stretch;
88
+ justify-content: flex-start;
89
+ padding: .5rem;
90
+
91
+ text-align: center;
92
+
93
+ @media screen and (min-width: 600px) {
94
+ padding: 1rem;
95
+ text-align: left;
96
+ }
97
+ }
98
+
99
+ .mHeading {
100
+ font-family: var(--malert-heading-font-family);
101
+ font-size: var(--malert-heading-font-size);
102
+ font-weight: var(--malert-heading-font-weight);
103
+ line-height: var(--malert-heading-line-height);
104
+ }
105
+ .mText {
106
+ font-family: var(--malert-text-font-family);
107
+ font-size: var(--malert-text-font-size);
108
+ }
109
+
110
+ .mBtns {
111
+ display: flex;
112
+ flex-flow: column nowrap;
113
+ gap: 1rem;
114
+ align-items: center;
115
+ justify-content: flex-start;
116
+
117
+ padding-top: 1rem;
118
+ margin-top: auto;
119
+
120
+ @media screen and (min-width: 600px) {
121
+ flex-direction: row;
122
+ justify-content: space-between;
123
+ }
124
+ }
125
+
126
+
127
+ .mAnimated {
128
+ transform: translateY(-500%);
129
+ animation: dialog-in .3s ease-out;
130
+
131
+ &[open] {
132
+ transform: none;
133
+ }
134
+ }
135
+
136
+ @keyframes dialog-in {
137
+ from {
138
+ opacity: 0;
139
+ transform: translateY(-50%);
140
+ }
141
+ to {
142
+ opacity: 1;
143
+ transform: translateY(0);
144
+ }
145
+ }
@@ -1 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 132"><circle cx="66" cy="66" r="63"/><path d="M44 48a21.928 21.928 0 0 1 6.443-15.556A21.931 21.931 0 0 1 66 26c12.15 0 22 9.85 22 22 0 6.14-2.668 11.543-6.573 15.683-6.514 6.91-15.363 4.47-15.363 16.065v7.935M66 105.816v-6.975"/></svg>
1
+ <svg width="134" height="134" viewBox="0 0 134 134" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M126.5 67C126.5 34.1391 99.8609 7.5 67 7.5C34.1391 7.5 7.5 34.1391 7.5 67C7.5 99.8609 34.1391 126.5 67 126.5C99.8609 126.5 126.5 99.8609 126.5 67ZM133.5 67C133.5 103.727 103.727 133.5 67 133.5C30.2731 133.5 0.5 103.727 0.5 67C0.5 30.2731 30.2731 0.5 67 0.5C103.727 0.5 133.5 30.2731 133.5 67Z" fill="#8720C5"/>
3
+ <path d="M66.2711 92.088C70.854 92.0881 74.5417 95.761 74.569 100.238C74.5416 104.716 70.8539 108.389 66.2711 108.389C55.2711 107.989 55.2711 92.488 66.2711 92.088ZM74.5709 100.288C74.5709 100.272 74.5691 100.255 74.569 100.238C74.5691 100.222 74.5709 100.205 74.5709 100.189V100.288ZM43.4703 35.2882C52.9703 22.6882 80.7705 23.0887 90.1705 35.3887L90.4703 35.2882C94.4703 40.1882 95.2711 49.7885 92.2711 55.6885C91.0711 58.1885 89.4705 60.288 87.6705 62.088C84.2705 65.488 79.7707 68.0884 75.8707 70.4884C74.0708 71.5883 72.6705 72.6884 71.6705 73.9884C69.4707 77.0883 69.2711 80.1883 69.2711 84.2882H63.4703C60.9704 75.8883 61.6711 68.8887 69.0709 63.8887C75.2709 59.3887 82.8707 54.9882 82.3707 46.2882C82.4707 42.8883 81.6708 40.1883 80.0709 37.9884C78.5709 35.7884 76.4707 34.1885 73.8707 33.1885C68.7709 30.9886 61.5711 30.9881 56.2711 33.088C51.5712 34.7879 47.8706 38.1881 46.6705 43.088C48.9705 43.088 50.8707 43.4887 52.3707 44.3887C55.5705 46.1888 55.6707 50.9881 53.0709 53.2882C50.4709 55.5882 45.1703 55.2885 42.4703 52.6885C38.0705 48.5885 40.2704 39.2882 43.4703 35.2882Z" fill="#8720C5"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="134" height="134" viewBox="0 0 134 134" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M61.16 100.44C61.16 98.7867 61.72 97.4 62.84 96.28C63.96 95.16 65.32 94.6 66.92 94.6C68.5733 94.6 69.96 95.16 71.08 96.28C72.2 97.4 72.76 98.7867 72.76 100.44C72.76 102.04 72.2 103.4 71.08 104.52C69.96 105.64 68.5733 106.2 66.92 106.2C65.32 106.2 63.96 105.667 62.84 104.6C61.72 103.48 61.16 102.093 61.16 100.44ZM69.16 88.84H64.68C64.68 85.8533 64.6267 83.1867 64.52 80.84C64.4667 78.44 64.3333 76.3333 64.12 74.52C63.96 72.6533 63.7733 70.9467 63.56 69.4C63.3467 67.8 63.1333 66.2533 62.92 64.76C62.5467 62.6267 62.2267 60.7867 61.96 59.24C61.6933 57.64 61.4533 56.0933 61.24 54.6C61.08 53.1067 61 51.4267 61 49.56C61 47.48 61.5067 45.88 62.52 44.76C63.5333 43.5867 65 43 66.92 43C68.84 43 70.3067 43.5867 71.32 44.76C72.3333 45.88 72.84 47.48 72.84 49.56C72.84 51.3733 72.7333 53.0267 72.52 54.52C72.36 56.0133 72.1467 57.5867 71.88 59.24C71.6133 60.84 71.2933 62.7333 70.92 64.92C70.6533 66.3067 70.4133 67.8 70.2 69.4C69.9867 70.9467 69.8 72.6533 69.64 74.52C69.48 76.3867 69.3467 78.4933 69.24 80.84C69.1867 83.1333 69.16 85.8 69.16 88.84Z" fill="#CC0000"/>
3
+ <path d="M62.8659 12.5C64.7904 9.16666 69.6015 9.16668 71.526 12.5L131.715 116.75C133.639 120.083 131.233 124.25 127.384 124.25H7.00747L6.65102 124.238C3.01218 123.991 0.812961 119.979 2.67739 116.75L62.8659 12.5ZM10.4713 117.25H123.921L67.1959 19L10.4713 117.25Z" fill="#CC0000"/>
4
+ </svg>
@@ -1 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 132"><circle cx="66" cy="66" r="63"/><path d="M35 39l61.4 54.4m0-54.4L35 93.2"/></svg>
1
+ <svg width="134" height="134" viewBox="0 0 134 134" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M126.5 67C126.5 34.1391 99.8609 7.5 67 7.5C34.1391 7.5 7.5 34.1391 7.5 67C7.5 99.8609 34.1391 126.5 67 126.5C99.8609 126.5 126.5 99.8609 126.5 67ZM133.5 67C133.5 103.727 103.727 133.5 67 133.5C30.2731 133.5 0.5 103.727 0.5 67C0.5 30.2731 30.2731 0.5 67 0.5C103.727 0.5 133.5 30.2731 133.5 67Z" fill="#CC0000"/>
3
+ <path d="M33.3795 37.6783C34.6613 36.2317 36.8741 36.0981 38.3209 37.3795L66.6471 62.4762L95.0836 37.3756C96.5327 36.0967 98.7448 36.2345 100.024 37.6832C101.303 39.1324 101.165 41.3445 99.7155 42.6237L71.9264 67.1539L99.7203 91.7799C101.167 93.0617 101.301 95.2735 100.019 96.7203C98.7373 98.1672 96.5256 98.301 95.0787 97.0192L66.6383 71.8219L38.316 96.8239C36.8669 98.103 34.6548 97.9652 33.3756 96.5162C32.0968 95.0671 32.2344 92.8549 33.6832 91.5758L61.359 67.1442L33.6783 42.6198C32.2319 41.3379 32.0978 39.125 33.3795 37.6783Z" fill="#CC0000"/>
4
+ </svg>
@@ -1 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 132"><circle cx="66" cy="66" r="63"/><path d="M74 105l-8.6.237V45.713L56 46m9.6-13.025V26"/></svg>
1
+ <svg width="134" height="134" viewBox="0 0 134 134" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M127 67.5C127 34.6391 100.361 8 67.5 8C34.6391 8 8 34.6391 8 67.5C8 100.361 34.6391 127 67.5 127C100.361 127 127 100.361 127 67.5ZM134 67.5C134 104.227 104.227 134 67.5 134C30.7731 134 1 104.227 1 67.5C1 30.7731 30.7731 1 67.5 1C104.227 1 134 30.7731 134 67.5Z" fill="#0288D1"/>
3
+ <path d="M71.1602 45.0811C73.1598 45.0811 74.6397 45.6812 75.5996 46.8809C76.6396 48.0008 77.1601 50.0812 77.1602 53.1211C77.1602 54.641 76.8401 56.5611 76.2002 58.8809C75.5602 61.1208 74.6795 63.801 73.5596 66.9209C70.7595 74.521 67.9462 82.1164 65.1602 89.7217C65.0001 90.2817 64.6801 91.1616 64.2002 92.3613C63.8002 93.5612 63.4401 94.8012 63.1201 96.0811C62.8001 97.2809 62.6397 98.2811 62.6396 99.0811C62.6396 99.801 62.8402 100.441 63.2402 101.001C63.6402 101.561 64.2802 101.842 65.1602 101.842C66.3601 101.842 67.6 101.361 68.8799 100.401C70.1598 99.4415 71.3997 98.2416 72.5996 96.8018C73.8796 95.3618 74.9599 93.9615 75.8398 92.6016C76.7998 91.2416 77.52 90.1613 78 89.3613L81.5996 91.4014C80.6396 93.3213 79.3196 95.4418 77.6396 97.7617C76.0398 100.002 74.1999 102.161 72.1201 104.241C70.0402 106.241 67.7601 107.881 65.2803 109.161C62.8003 110.441 60.2396 111.081 57.5996 111.081C55.2797 111.081 53.5193 110.481 52.3193 109.281C51.1995 108.001 50.6396 106.001 50.6396 103.281C50.6397 100.961 50.9998 98.4816 51.7197 95.8418C54.2588 87.2088 57.4964 78.7666 60.4795 70.2812C61.5994 67.1614 62.3999 64.6416 62.8799 62.7217C63.3599 60.7217 63.5996 59.2011 63.5996 58.1611C63.5996 57.0412 63.4 56.321 63 56.001C62.68 55.6011 62.3198 55.4014 61.9199 55.4014C60.7999 55.4014 59.4799 56.0814 57.96 57.4414C56.5201 58.8013 55.1999 60.281 54 61.8809C52.8 63.4809 51.9595 64.7216 51.4795 65.6016L48 63.4414C48.96 61.6014 50.28 59.6415 51.96 57.5615C53.7199 55.4816 55.6799 53.4815 57.8398 51.5615C60.0798 49.6415 62.3196 48.0809 64.5596 46.8809C66.8796 45.6809 69.0802 45.0811 71.1602 45.0811ZM78.7998 23C83.2181 23 86.7998 26.5817 86.7998 31C86.7998 35.4183 83.2181 39 78.7998 39C74.3815 39 70.7998 35.4183 70.7998 31C70.7998 26.5817 74.3815 23 78.7998 23Z" fill="#0288D1"/>
4
+ </svg>
@@ -1 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 132"><circle cx="66" cy="66" r="63"/><path d="M101.4 42L52.7 90.6 31 69.3"/></svg>
1
+ <svg width="134" height="134" viewBox="0 0 134 134" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M126.5 67C126.5 34.1391 99.8609 7.5 67 7.5C34.1391 7.5 7.5 34.1391 7.5 67C7.5 99.8609 34.1391 126.5 67 126.5C99.8609 126.5 126.5 99.8609 126.5 67ZM133.5 67C133.5 103.727 103.727 133.5 67 133.5C30.2731 133.5 0.5 103.727 0.5 67C0.5 30.2731 30.2731 0.5 67 0.5C103.727 0.5 133.5 30.2731 133.5 67Z" fill="#297E2D"/>
3
+ <path d="M99.9277 40.5224C101.296 39.1572 103.512 39.1595 104.877 40.5273C106.242 41.8956 106.24 44.1121 104.872 45.4775L53.7207 96.5244L29.5478 72.7978C28.1686 71.4439 28.1483 69.2281 29.5019 67.8486C30.856 66.4691 33.0726 66.4477 34.4521 67.8017L53.6787 86.6758L99.9277 40.5224Z" fill="#388E3C"/>
4
+ </svg>
@@ -1 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 132 132"><circle cx="66" cy="66" r="63"/><path d="M41.839 72.475v-37.2c0-3.852 3.143-6.975 7.02-6.975s7.02 3.123 7.02 6.975V65.5m0-30.225v-9.3c0-3.852 3.143-6.975 7.02-6.975s7.02 3.123 7.02 6.975V65.5m0-30.225c0-3.852 3.143-6.975 7.02-6.975 3.878 0 7.02 3.123 7.02 6.975V65.5m0-20.925c0-3.852 3.144-6.975 7.02-6.975 3.878 0 7.021 3.123 7.021 6.975V84.1C98 99.509 85.428 112 69.92 112h-9.36c-9.896-1.357-18.517-6.496-23.401-13.95L24.522 73.637c-2.584-3.53-1.799-8.475 1.755-11.043 3.555-2.568 8.531-1.788 11.116 1.743l4.212 8.138"/></svg>
1
+ <svg width="134" height="134" viewBox="0 0 134 134" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M126.5 67C126.5 34.1391 99.8609 7.5 67 7.5C34.1391 7.5 7.5 34.1391 7.5 67C7.5 99.8609 34.1391 126.5 67 126.5C99.8609 126.5 126.5 99.8609 126.5 67ZM133.5 67C133.5 103.727 103.727 133.5 67 133.5C30.2731 133.5 0.5 103.727 0.5 67C0.5 30.2731 30.2731 0.5 67 0.5C103.727 0.5 133.5 30.2731 133.5 67Z" fill="#CC0000"/>
3
+ <path d="M53.8789 66.5V36.2754L53.874 36.0723C53.7675 33.9875 52.0278 32.3 49.8594 32.2998C47.6208 32.2998 45.8389 34.0983 45.8389 36.2754V73.4746C45.8389 75.1315 44.4957 76.4746 42.8389 76.4746C42.7884 76.4746 42.7383 76.4732 42.6885 76.4707C41.5744 76.501 40.4872 75.9106 39.9404 74.8545L35.8486 66.9482C34.21 64.8907 31.2001 64.4603 29.0342 66.0254C26.8936 67.5724 26.3767 70.4919 27.7998 72.6582L27.9434 72.8652L28.0723 73.0576C28.1128 73.1231 28.1511 73.1903 28.1865 73.2588L40.7451 97.5195C45.0778 104.05 52.7638 108.715 61.7832 110H70.9189C84.7888 110 96 98.8333 96 85.0996V45.5752C96 43.3981 94.218 41.5996 91.9795 41.5996C89.7411 41.5998 87.96 43.3982 87.96 45.5752V66.5C87.96 68.1568 86.6167 69.4999 84.96 69.5C83.3031 69.5 81.96 68.1569 81.96 66.5V36.2754C81.96 34.0983 80.178 32.2998 77.9394 32.2998C75.701 32.2999 73.9189 34.0983 73.9189 36.2754V66.5C73.9189 68.1569 72.5758 69.5 70.9189 69.5C69.2623 69.4998 67.9189 68.1567 67.9189 66.5V26.9746C67.9187 24.7977 66.1377 23.0001 63.8994 23C61.661 23 59.8791 24.7977 59.8789 26.9746V66.5C59.8789 68.1569 58.5358 69.5 56.8789 69.5C55.2221 69.4999 53.8789 68.1568 53.8789 66.5ZM73.9189 27.1377C75.151 26.5996 76.511 26.2998 77.9394 26.2998C83.4551 26.2998 87.96 30.7481 87.96 36.2754V36.4375C89.1918 35.8996 90.5514 35.5997 91.9795 35.5996C97.4952 35.5996 102 40.0479 102 45.5752V85.0996C102 102.183 88.066 116 70.9189 116H61.5596C61.4232 116 61.2864 115.991 61.1514 115.973C50.5128 114.514 41.0695 108.966 35.6494 100.694C35.5933 100.609 35.5412 100.52 35.4941 100.429L22.9453 76.1826C19.5685 71.3211 20.6969 64.6476 25.5205 61.1621C29.9932 57.9302 36.1038 58.5528 39.8389 62.4131V36.2754C39.8389 30.7481 44.3437 26.2998 49.8594 26.2998C51.2874 26.2999 52.647 26.5998 53.8789 27.1377V26.9746C53.8791 21.4475 58.3838 17 63.8994 17C69.4149 17.0001 73.9187 21.4476 73.9189 26.9746V27.1377Z" fill="#CC0000"/>
4
+ </svg>
@@ -0,0 +1,9 @@
1
+ export default {
2
+ 'slide': {
3
+ 'duration': {
4
+ $type: 'duration',
5
+ $value: '500ms'
6
+ },
7
+ }
8
+ };
9
+
@@ -56,8 +56,8 @@
56
56
  height: auto;
57
57
  overflow: hidden;
58
58
  transition:
59
- height var(--slide-duration, 500ms) ease,
60
- display var(--slide-duration, 500ms) allow-discrete;
59
+ height var(--slide-duration) ease,
60
+ display var(--slide-duration) allow-discrete;
61
61
  }
62
62
 
63
63
  /* collapsed state: height animates to 0, then display snaps to none */
@@ -173,13 +173,17 @@
173
173
  --grid-cols: 3;
174
174
  --grid-min-col-width: 6rem;
175
175
  --headings-color: var(--text-color);
176
+ --headings-font-family: var(--font-family);
176
177
  --headings-font-weight: var(--font-weight-semibold);
177
178
  --headings-h1-font-size: var(--font-size-2xl);
178
179
  --headings-h1-font-weight: var(--headings-font-weight);
179
180
  --headings-h2-font-size: var(--font-size-xl);
180
181
  --headings-h3-font-size: var(--font-size-lg);
181
182
  --headings-h4-font-size: var(--font-size-md);
183
+ --headings-line-height: var(--line-height-xs);
182
184
  --headings-text-align: inherit;
185
+ --inner-nav-gap: var(--size-lg);
186
+ --inner-nav-margin-block: var(--size-base);
183
187
  --layout-container-max-width: 80rem;
184
188
  --line-height-base: 1.5;
185
189
  --line-height-sm: 1.4;
@@ -190,6 +194,27 @@
190
194
  --link-focus-outline-color: var(--link-color);
191
195
  --link-focus-outline-width: .125rem;
192
196
  --link-visited-color: #ae0da3;
197
+ --malert-backdrop: rgb(0 0 0 / .7);
198
+ --malert-background-color: #fff;
199
+ --malert-border-radius: var(--radius-xs);
200
+ --malert-box-shadow: 0 .025rem .25rem 0 color-mix(in srgb, var(--malert-box-shadow-color) 15%, transparent), -.01875rem .1875rem .20625rem -.03125rem color-mix(in srgb, var(--malert-box-shadow-color) 15%, transparent), -.03125rem .38125rem .4125rem -.05625rem color-mix(in srgb, var(--malert-box-shadow-color) 14%, transparent), -.05625rem .7rem .75625rem -.0875rem color-mix(in srgb, var(--malert-box-shadow-color) 14%, transparent), -.1rem 1.21875rem 1.31875rem -.11875rem color-mix(in srgb, var(--malert-box-shadow-color) 13%, transparent), -.16875rem 2.04375rem 2.2125rem -.14375rem color-mix(in srgb, var(--malert-box-shadow-color) 13%, transparent), -.26875rem 3.25rem 3.525rem -.175rem color-mix(in srgb, var(--malert-box-shadow-color) 12%, transparent);
201
+ --malert-box-shadow-color: #000;
202
+ --malert-confirm-bg: hsl(277deg 72% 45%);
203
+ --malert-confirm-fg: #fff;
204
+ --malert-error-bg: var(--status-danger-background-color);
205
+ --malert-error-fg: var(--status-danger-fg);
206
+ --malert-heading-font-family: var(--headings-font-family);
207
+ --malert-heading-font-size: var(--headings-h2-font-size);
208
+ --malert-heading-font-weight: var(--headings-font-weight);
209
+ --malert-heading-line-height: var(--headings-line-height);
210
+ --malert-info-bg: var(--status-info-background-color);
211
+ --malert-info-fg: var(--status-info-fg);
212
+ --malert-success-bg: var(--status-success-background-color);
213
+ --malert-success-fg: var(--status-success-fg);
214
+ --malert-text-font-family: var(--font-family);
215
+ --malert-text-font-size: var(--font-size-base);
216
+ --malert-warning-bg: var(--status-warning-background-color);
217
+ --malert-warning-fg: var(--status-warning-fg);
193
218
  --modal-popup-backdrop-color: rgb(0 0 0 / .6);
194
219
  --modal-popup-border-radius: var(--size-base);
195
220
  --modal-popup-btn-close-size: 1.6rem;
@@ -244,6 +269,7 @@
244
269
  --size-xl: 2rem;
245
270
  --size-xs: .5rem;
246
271
  --size-xxs: .25rem;
272
+ --slide-duration: 500ms;
247
273
  --snackbar-background-color: var(--secondary-100);
248
274
  --snackbar-border-radius: var(--radius-xs);
249
275
  --snackbar-btn-close-active-background-color: transparent;
@@ -1,63 +0,0 @@
1
- @import '../src/modal-alert.css';
2
-
3
- :root {
4
- /* comment to use defaults */
5
- --malert-success-color: #09544b;
6
- --malert-success-color-fg: #fff;
7
- --malert-info-color: #0e2467;
8
- --malert-info-color-fg: #fff;
9
- --malert-warning-color: hsl(56deg 100% 30%);
10
- --malert-warning-color-fg: #fff;
11
- --malert-error-color: #c00;
12
- --malert-error-color-fg: #fff;
13
- --malert-confirm-color: #940b7f;
14
- --malert-confirm-color-fg: #fff;
15
-
16
- /* --malert-marks-stroke-width: 6px; */
17
- /* --malert-backdrop */
18
- /* --malert-border-radius */
19
- /* --malert-box-shadow */
20
- /* --malert-heading-font-family */
21
- /* --malert-heading-font-size */
22
- /* --malert-heading-font-weigth */
23
- /* --malert-heading-line-height */
24
- /* --malert-body-font-family */
25
- }
26
- html {
27
- font-family: sans-serif;
28
- }
29
-
30
- .demo-buttons .btn {
31
- --malert-color: rgb(16, 89, 162);
32
- --malert-color-fg: #fff;
33
- margin: 1rem;
34
- }
35
-
36
-
37
- /* applied to body on dialog opening */
38
- .modal-alert-is-open {
39
- overflow: hidden;
40
- }
41
-
42
- .text-success {
43
- color: var(--malert-success-color);
44
- }
45
-
46
- /* `--malert-color` & `--malert-color-fg` are set by main css */
47
-
48
- .btn {
49
- padding: .5rem 1rem;
50
- color: var(--malert-color-fg);
51
- cursor: pointer;
52
- background-color: var(--malert-color);
53
- border: 1px solid var(--malert-color);
54
- border-radius: 4px;
55
- }
56
- .btn-outline {
57
- color: var(--malert-color);
58
- background-color: var(--malert-color-fg);
59
- }
60
- .btn:focus {
61
- outline: 1px solid var(--malert-color);
62
- outline-offset: 3px;
63
- }
@@ -1,155 +0,0 @@
1
- import mAlert from '../src/modal-alert.js';
2
-
3
- const custom_defaults = {
4
-
5
- //settings to be applied to all dialog types
6
- globals: {
7
- onOpen: () => {
8
- // console.log('open'); // eslint-disable-line
9
- document.body.classList.add('modal-alert-is-open');
10
- },
11
- onClose: () => {
12
- // console.log('close'); // eslint-disable-line
13
- document.body.classList.remove('modal-alert-is-open');
14
- },
15
- cssFile: null
16
- },
17
-
18
- success: {
19
- title: 'Done!',
20
- mes: null,
21
- ok_btn_text: 'OK',
22
- heading_class: 'text-success',
23
- ok_btn_class: 'btn',
24
- timer: 4000, // ms
25
- },
26
- error: {
27
- title: 'An error has occurred',
28
- mes: null,
29
- ok_btn_text: 'OK',
30
- heading_class: null,
31
- text_class: null,
32
- ok_btn_class: 'btn',
33
- timer: null,
34
- },
35
- warning: {
36
- title: 'Attention!',
37
- mes: null,
38
- ok_btn_text: 'OK',
39
- heading_class: null,
40
- text_class: null,
41
- ok_btn_class: 'btn',
42
- timer: null,
43
- },
44
- info: {
45
- title: null,
46
- mes: null,
47
- ok_btn_text: 'OK',
48
- heading_class: null,
49
- text_class: null,
50
- ok_btn_class: 'btn',
51
- timer: null,
52
- },
53
- confirm: {
54
- title: 'Do you confirm?',
55
- mes: null,
56
- ok_btn_text: 'OK',
57
- cancel_btn_text: 'Cancel',
58
- cancel_focus: true, // false to give focus to the ok button
59
- heading_class: null,
60
- text_class: null,
61
- ok_btn_class: 'btn btn-outline',
62
- cancel_btn_class: 'btn',
63
- callback: null,
64
- timer: null,
65
- }
66
- };
67
-
68
- document.querySelector('.demo-success').addEventListener('click', () => {
69
- mAlert({
70
- type : 'success',
71
- mes: 'Lorem ipsum dolor sit amet',
72
- callback: () => alert('callback')
73
- }, custom_defaults);
74
- }, false);
75
-
76
- document.querySelector('.demo-info').addEventListener('click', () => {
77
- mAlert({
78
- type : 'info',
79
- title: 'Info',
80
- mes: '<strong>Lorem ipsum</strong> dolor sit amet'
81
- }, custom_defaults);
82
- }, false);
83
-
84
- document.querySelector('.demo-error').addEventListener('click', () => {
85
- mAlert({
86
- type : 'error'
87
- }, custom_defaults);
88
- }, false);
89
-
90
- document.querySelector('.demo-error-extra-btn').addEventListener('click', () => {
91
- mAlert({
92
- type : 'error',
93
- ok_btn_class: 'btn btn-error btn btn-outline',
94
- extra_btn: '<button type="button" data-malert-result="extra-btn-result" class="btn btn-error extra-btn">Extra btn</button>',
95
- extra_btn_selector: '.extra-btn',
96
- extra_btn_focus: true,
97
- callback: result => alert(result === 'extra-btn-result'? 'Extra button pressed' : 'OK button pressed')
98
- }, custom_defaults);
99
- }, false);
100
-
101
- document.querySelector('.demo-warning').addEventListener('click', () => {
102
- mAlert({
103
- type : 'warning',
104
- mes: '<p>Quo dolorum cumque quo placeat aperiam doloribus dolorum animi. Sunt et dolores quas autem. Porro inventore ratione. Ex facere doloremque. Consectetur enim dolor. Sint ut facere quidem et et dicta natus itaque.</p> <p>Odit in eos repellat exercitationem tempore blanditiis voluptate. Dignissimos est tempora qui ducimus at et expedita esse.</p>'
105
- }, custom_defaults);
106
- }, false);
107
-
108
- document.querySelector('.demo-confirm').addEventListener('click', () => {
109
- mAlert({
110
- type : 'confirm',
111
- callback: result => alert(`${result? 'OK' : 'Cancel'} button pressed`)
112
- }, custom_defaults);
113
- }, false);
114
-
115
-
116
- // forms
117
- // Confirm on form submit
118
- document.getElementById('test-form').addEventListener('submit', e => {
119
- let choiceIsNeeded = true;
120
-
121
- if(choiceIsNeeded) {
122
- e.preventDefault();
123
- mAlert({
124
- type : 'confirm',
125
- title: 'A choice is needed',
126
- mes: 'Some message...',
127
- ok_btn_text: 'Continue submit',
128
- cancel_btn_text: 'Stop',
129
- callback: result => {
130
- if(result) {
131
- alert('submit');
132
- e.target.submit();
133
- } else {
134
- alert('submit canceled');
135
- }
136
- }
137
- }, custom_defaults);
138
- }
139
-
140
- }, false);
141
-
142
- // Error on form submit
143
- document.getElementById('test-form2').addEventListener('submit', e => {
144
- let isError = true;
145
-
146
- if(isError) {
147
- e.preventDefault();
148
- mAlert({
149
- type : 'error',
150
- title: 'Oh my! There is an error...',
151
- mes: 'Some message'
152
- }, custom_defaults);
153
- }
154
-
155
- }, false);
@@ -1,3 +0,0 @@
1
- da rivedere
2
- spostare custom props nel dictionary
3
- eliminare customization-templates, gestire tutto da tokens
@@ -1,46 +0,0 @@
1
-
2
- @import '@massimo-cassandro/modal-alert';
3
-
4
-
5
- .modal-alert {
6
- --malert-success-color: var(--status-success-color);
7
- --malert-success-color-fg: var(--status-success-fg);
8
-
9
- --malert-info-color: var(--status-info-color);
10
- --malert-info-color-fg: var(--status-info-fg);
11
-
12
- --malert-warning-color: var(--status-warning-color);
13
- --malert-warning-color-fg: var(--status-warning-fg);
14
-
15
- --malert-danger-color: var(--status-danger-color);
16
- --malert-danger-color-fg: var(--status-danger-fg);
17
-
18
- --malert-confirm-color: var(--status-warning-color);
19
- --malert-confirm-color-fg: var(--status-warning-fg);
20
-
21
- /* --malert-marks-stroke-width: 6px; */
22
- --malert-backdrop: rgb(0 0 0 / .3);
23
- --malert-border-radius: var(--radius-md);
24
- /* --malert-box-shadow: var(--box-shadow); */
25
- --malert-heading-font-family: var(--font-family);
26
- /* --malert-heading-line-height: */
27
- --malert-heading-font-size: 1.8rem;
28
- --malert-heading-font-weigth: var(--font-size-base);
29
- --malert-body-font-family: var(--font-family);
30
-
31
- top: 50%;
32
- left: 50%;
33
- translate: -50% -50%;
34
- }
35
-
36
-
37
-
38
- .malert-mark {
39
- svg {
40
- width: 7rem;
41
- max-width: none;
42
- height: 7rem;
43
- fill: var(--malert-color-fg);
44
- stroke: none;
45
- }
46
- }
@@ -1,89 +0,0 @@
1
- // import './modal-alert.css'; // importato direttamente dal css principale per ottimizzarne l'uso
2
-
3
- import modalAlert from '@massimo-cassandro/modal-alert';
4
-
5
- import checkIcon from './svg/check-circle-duotone.svg?inline';
6
- import infoIcon from './svg/info-duotone.svg?inline';
7
- import confirmIcon from './svg/question-duotone.svg?inline';
8
- import warningIcon from './svg/warning-duotone.svg?inline';
9
- import errorIcon from './svg/x-circle-duotone.svg?inline';
10
-
11
- const custom_defaults = {
12
-
13
- globals: {
14
- onOpen: () => {
15
- document.body.classList.add('overflow-hidden');
16
- },
17
- onClose: () => {
18
- document.body.classList.remove('overflow-hidden');
19
- },
20
- cssFile: null,
21
- animation: true,
22
- showMarks: true,
23
- },
24
-
25
- success: {
26
- title: 'Operazione completata',
27
- mes: null,
28
- ok_btn_text: 'OK',
29
- heading_class: null,
30
- ok_btn_class: 'btn btn-success',
31
- timer: 4000, // ms
32
- },
33
- error: {
34
- title: 'Si è verificato un errore',
35
- mes: null,
36
- ok_btn_text: 'OK',
37
- heading_class: null,
38
- text_class: null,
39
- ok_btn_class: 'btn btn-danger',
40
- timer: null,
41
- },
42
- warning: {
43
- title: 'Attenzione!',
44
- mes: null,
45
- ok_btn_text: 'OK',
46
- heading_class: null,
47
- text_class: null,
48
- ok_btn_class: 'btn btn-warning',
49
- timer: null,
50
- },
51
- info: {
52
- title: null,
53
- mes: null,
54
- ok_btn_text: 'OK',
55
- heading_class: null,
56
- text_class: null,
57
- ok_btn_class: 'btn btn-info',
58
- timer: null,
59
- },
60
- confirm: {
61
- title: 'Confermi?',
62
- mes: null,
63
- ok_btn_text: 'OK',
64
- cancel_btn_text: 'Cancel',
65
- cancel_focus: true, // false to give focus to the ok button
66
- heading_class: null,
67
- text_class: null,
68
- ok_btn_class: 'btn btn-warning',
69
- cancel_btn_class: 'btn btn-outline-secondary',
70
- callback: null,
71
- timer: null
72
- }
73
- };
74
-
75
- const marks = {
76
- success: checkIcon,
77
- error: errorIcon,
78
- warning: warningIcon,
79
- info: infoIcon,
80
- confirm: confirmIcon
81
- };
82
-
83
- /**
84
- * @param {Record<string, *>} params
85
- * @returns {void}
86
- */
87
- export function mAlert(params) {
88
- modalAlert(params, custom_defaults, marks);
89
- }