@massimo-cassandro/minimo 1.20.14 → 1.20.16

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.
@@ -1,5 +1,17 @@
1
1
  export default {
2
2
  link: {
3
+ font: {
4
+ weight: {
5
+ $type: 'string',
6
+ $value: '{font.weight.semibold}',
7
+ }
8
+ },
9
+ text: {
10
+ decoration: {
11
+ $type: 'string',
12
+ $value: 'none',
13
+ },
14
+ },
3
15
  color: {
4
16
  $type: 'color',
5
17
  $value: '#0d12ae'
@@ -11,29 +23,48 @@ export default {
11
23
  },
12
24
  },
13
25
  hover: {
14
- color: null
26
+ color: {
27
+ $type: 'color',
28
+ $value: '{link.color}'
29
+ },
30
+ text: {
31
+ decoration: {
32
+ $type: 'string',
33
+ $value: 'underline',
34
+ },
35
+ underline: {
36
+ offset: {
37
+ $type: 'dimension',
38
+ $value: '2px',
39
+ }
40
+ }
41
+ }
15
42
  },
16
43
  focus: {
17
44
  outline: {
18
45
  color: {
19
46
  $type: 'color',
20
- $value: '{link.color}'
47
+ $value: 'color-mix(in srgb, {link.color} 60%, transparent)'
21
48
  },
22
49
  width: {
23
50
  $type: 'dimension',
24
51
  $value: '2px'
25
52
  },
53
+ offset: {
54
+ $type: 'dimension',
55
+ $value: '2px'
56
+ },
26
57
  }
27
58
  },
28
59
  active: {
29
60
  color: {
30
61
  $type: 'color',
31
- $value: '#51054C'
62
+ $value: '{body.background.color}'
32
63
  },
33
64
  background: {
34
65
  color: {
35
66
  $type: 'color',
36
- $value: 'transparent'
67
+ $value: '{primary.100}'
37
68
  }
38
69
  }
39
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massimo-cassandro/minimo",
3
- "version": "1.20.14",
3
+ "version": "1.20.16",
4
4
  "description": "Light css framework & utilities",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -99,27 +99,27 @@ const defaults = {
99
99
  /**
100
100
  * @typedef {Object} ModalAlertParams
101
101
  * @property {string} [type] - Dialog type: `success`, `error`, `warning`, `info`, or `confirm`.
102
- * @property {string | null} [extraClass] - optional dialog extra class
102
+ * @property {string | null} [title] - title text
103
+ * @property {string | null} [mes] - text message (plain or html)
104
+ * @property {((arg?: *) => void) | null} [callback] - optional callback dialog after user choice
105
+ * @property {number | null} [timer] - timer for autoclose (ms). `null` for disable
103
106
  * @property {(() => void) | null} [onOpen] - optional callback on dialog open
104
107
  * @property {(() => void) | null} [onClose] - optional callback on dialog close
108
+ * @property {string | null} [extraClass] - optional dialog extra class
109
+ * @property {string} [okBtnText] - text for 'ok' button
110
+ * @property {string} [okBtnClass] - alternative class for 'ok' button. It replaces the default one
111
+ * @property {string} [cancelBtnText] - text for 'cancel' button
112
+ * @property {string} [cancelBtnClass] - alternative class for 'cancel' button. It replaces the default one
113
+ * @property {boolean} [cancelBtnFocus] - true if the cancel button should be focused when the dialog box opens. It has no effect if an extraBtn is set
114
+ * @property {string | null} [headingClass] - optional extra class for heading
115
+ * @property {DomBuilderItem | null} [extraBtn] - optional extra button (as domBuilder object)
116
+ * @property {boolean} [extraBtnFocus] - true if the extra button should be focused when the dialog box opens (overrides any focus assigned to the 'cancel' button)
105
117
  * @property {boolean} [animation] - if true, dialog will be animated
106
118
  * @property {boolean} [showMarks] - if true, mark iconswill be showed
107
- * @property {((arg?: *) => void) | null} [callback] - optional callback dialog after user choice
108
- * @property {number | null} [timer] - timer for autoclose (ms). `null` for disable
109
- * @property {string | null} [title] - title text
110
- * @property {string | null} [mes] - text message (plain or html)
111
- * @property {string | null} [headingClass] - optional extra class for heading
112
119
  * @property {string | null} [textClass] - optional extra class for text
113
120
  * @property {string | null} [icon] - Icon markup used for the dialog; defaults to the type's icon.
114
121
  * @property {string | null} [altIcon] - Alternate icon markup, used instead of `icon` when `useAltIcon` is `true`.
115
122
  * @property {boolean} [useAltIcon] - When `true`, uses `altIcon` instead of `icon` (e.g. the `danger` icon on a `warning` dialog, or the `warning` icon on a `confirm` dialog).
116
- * @property {DomBuilderItem | null} [extraBtn] - optional extra button (as domBuilder object)
117
- * @property {boolean} [extraBtnFocus] - true if the extra button should be focused when the dialog box opens (overrides any focus assigned to the 'cancel' button)
118
- * @property {string} [okBtnText] - text for 'ok' button
119
- * @property {string} [okBtnClass] - alternative class for 'ok' button. It replaces the default one
120
- * @property {string} [cancelBtnText] - text for 'cancel' button
121
- * @property {string} [cancelBtnClass] - alternative class for 'cancel' button. It replaces the default one
122
- * @property {boolean} [cancelBtnFocus] - true if the cancel button should be focused when the dialog box opens. It has no effect if an extraBtn is set
123
123
  */
124
124
 
125
125
  /**
@@ -72,4 +72,8 @@ fieldset.form-group, fieldset.form-collection-fset {
72
72
  font-style: italic;
73
73
  opacity: .6;
74
74
  }
75
+
76
+ &:has(.table-responsive) {
77
+ min-width: 0;
78
+ }
75
79
  }
@@ -3,9 +3,9 @@
3
3
  a:link, .btn-link {
4
4
  /* TODO rivedere, forse più complicato del necessario */
5
5
  &:not(.btn) {
6
- font-weight: var(--font-weight-semibold);
6
+ font-weight: var(--link-font-weight);
7
7
  color: var(--link-color);
8
- text-decoration: none;
8
+ text-decoration: var(--link-text-decoration);
9
9
  }
10
10
  }
11
11
 
@@ -25,21 +25,21 @@ a:not(.btn), .btn-link {
25
25
  }
26
26
 
27
27
  &:focus-visible {
28
- outline: 1px solid color-mix(in srgb, var(--link-color) 60%, transparent);
29
- outline-offset: 2px;
28
+ outline: var(--link-focus-outline-width) solid color-mix(in srgb, var(--link-focus-outline-color) 60%, transparent);
29
+ outline-offset: var(--link-focus-outline-offset);
30
30
  }
31
31
  @media (hover: hover) {
32
32
  &:hover {
33
- text-decoration: underline;
34
- text-underline-offset: 2px;
33
+ color: var(--link-hover-color);
34
+ text-decoration: var(--link-hover-text-decoration);
35
+ text-underline-offset: var(--link-hover-text-underline-offset);
35
36
  }
36
37
  }
37
38
  &:active {
38
39
  /* TODO rivedere, sostituire con colori specifici da custom props */
39
40
  /* stylelint-disable-next-line declaration-no-important */
40
- color: var(--body-background-color) !important;
41
- outline: 2px solid var(--link-color);
42
- background-color: var(--link-color);
41
+ color: var(--link-active-color) !important;
42
+ background-color: var(--link-active-background-color);
43
43
  offset: 0;
44
44
  }
45
45
  }
@@ -219,11 +219,17 @@
219
219
  --line-height-sm: 1.4;
220
220
  --line-height-xs: 1.25;
221
221
 
222
- --link-active-background-color: transparent;
223
- --link-active-color: #51054c;
222
+ --link-active-background-color: var(--primary-100);
223
+ --link-active-color: var(--body-background-color);
224
224
  --link-color: #0d12ae;
225
- --link-focus-outline-color: var(--link-color);
225
+ --link-focus-outline-color: color-mix(in srgb, var(--link-color) 60%, transparent);
226
+ --link-focus-outline-offset: 2px;
226
227
  --link-focus-outline-width: 2px;
228
+ --link-font-weight: var(--font-weight-semibold);
229
+ --link-hover-color: var(--link-color);
230
+ --link-hover-text-decoration: underline;
231
+ --link-hover-text-underline-offset: 2px;
232
+ --link-text-decoration: none;
227
233
  --link-visited-color: #ae0da3;
228
234
 
229
235
  --malert-backdrop: rgb(0 0 0 / .7);
package/src/minimo.css CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  @import '@minimo/css/badge.css';
26
26
  @import '@minimo/css/text.css';
27
- @import '@minimo/css/anchors.css';
27
+ @import '@minimo/css/links.css';
28
28
  @import '@minimo/css/headings.css';
29
29
  @import '@minimo/css/alerts.css';
30
30
  @import '@minimo/css/icons.css';