@massimo-cassandro/minimo 1.33.0 → 1.33.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 (84) hide show
  1. package/README.md +2 -1
  2. package/dev-tools/starter-kit/source_files/{CLAUDE-frontend.md → app/CLAUDE.md} +1 -1
  3. package/dev-tools/starter-kit/source_files/app/assets/api_htaccess +20 -0
  4. package/dev-tools/starter-kit/source_files/{layout-critical.css → app/css/layout.critical.css} +1 -1
  5. package/dev-tools/starter-kit/source_files/app/css/layout.css +0 -0
  6. package/dev-tools/starter-kit/source_files/app/index.js +1 -0
  7. package/dev-tools/starter-kit/source_files/root/webpack-config-modules/inline-critical-css.mjs +41 -0
  8. package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/purgecss-setup.mjs +1 -1
  9. package/dev-tools/starter-kit/{webpack.config.mjs → source_files/root/webpack.config.mjs} +50 -24
  10. package/dev-tools/starter-kit/starter-install.sh +141 -83
  11. package/dev-tools/stylelint-config/test/test.module.scss +9 -0
  12. package/package.json +1 -1
  13. package/snippets/php/iviewer.php +488 -0
  14. package/snippets/twig-symfony/ViewerController.php +549 -0
  15. package/src/custom-properties.css +29 -0
  16. package/src/minimo.css +3 -0
  17. package/src/utilities/dom-builder/dom-builder.js +9 -5
  18. package/src/web-components/json-table/json-table-component.js +387 -38
  19. package/src/web-components/json-table/json-table-component.module.css +190 -0
  20. package/src/web-components/json-table/json-table.minimo.tokens.mjs +195 -0
  21. package/src/web-components/json-table/readme.md +603 -82
  22. package/src/web-components/json-table/src/cell-content.js +136 -0
  23. package/src/web-components/json-table/src/content-utils.js +103 -0
  24. package/src/web-components/json-table/src/data-types.js +280 -0
  25. package/src/web-components/json-table/src/defaults.js +377 -58
  26. package/src/web-components/json-table/src/get-data.js +105 -10
  27. package/src/web-components/json-table/src/icons.js +80 -0
  28. package/src/web-components/json-table/src/info-section.js +85 -50
  29. package/src/web-components/json-table/src/main-builder.js +175 -52
  30. package/src/web-components/json-table/src/pagination.js +253 -0
  31. package/src/web-components/json-table/src/parse-cols.js +113 -0
  32. package/src/web-components/json-table/src/parse-rows.js +81 -0
  33. package/src/web-components/json-table/src/resolve-params.js +102 -32
  34. package/src/web-components/json-table/src/search.js +71 -0
  35. package/src/web-components/json-table/src/sorting.js +111 -0
  36. package/src/web-components/json-table/src/table-body.js +109 -0
  37. package/src/web-components/json-table/src/table-builder.js +152 -0
  38. package/src/web-components/json-table/src/table-tfoot.js +56 -0
  39. package/src/web-components/json-table/src/table-thead.js +183 -0
  40. package/src/web-components/json-table/src/update-info.js +43 -24
  41. package/src/web-components/s-datatable-component/{docs.md → readme.md} +5 -3
  42. package/src/web-components/s-datatable-component/s-datatable-component.js +1 -1
  43. package/types/global.d.ts +17 -3
  44. package/dev-tools/starter-kit/source_files/app_index.js +0 -1
  45. package/snippets/config-templates/_htaccess +0 -69
  46. package/snippets/config-templates/robots.txt +0 -5
  47. package/snippets/config-templates/rollup.config.mjs +0 -115
  48. /package/dev-tools/starter-kit/source_files/{_root_robots.txt → app/assets/robots.txt} +0 -0
  49. /package/dev-tools/starter-kit/source_files/{_root_htaccess → app/assets/root_htaccess} +0 -0
  50. /package/{src → dev-tools/starter-kit/source_files/app/css}/fonts.css +0 -0
  51. /package/dev-tools/starter-kit/source_files/{favicons-readme.md → app/favicons/favicons-readme.md} +0 -0
  52. /package/dev-tools/starter-kit/{webpack-template.ejs → source_files/app/tpl/index.ejs} +0 -0
  53. /package/dev-tools/starter-kit/source_files/{__project__.code-workspace → root/__project__.code-workspace} +0 -0
  54. /package/dev-tools/starter-kit/source_files/{_browserslistrc → root/_browserslistrc} +0 -0
  55. /package/dev-tools/starter-kit/source_files/{_editorconfig → root/_editorconfig} +0 -0
  56. /package/dev-tools/starter-kit/source_files/{_gitignore → root/_gitignore} +0 -0
  57. /package/dev-tools/starter-kit/source_files/{_prettierrc → root/_prettierrc} +0 -0
  58. /package/dev-tools/starter-kit/source_files/{eslint.config.mjs → root/eslint.config.mjs} +0 -0
  59. /package/dev-tools/starter-kit/source_files/{jsconfig.json → root/jsconfig.json} +0 -0
  60. /package/dev-tools/starter-kit/{package-tpl.json → source_files/root/package-tpl.json} +0 -0
  61. /package/dev-tools/starter-kit/source_files/{stylelint.config.mjs → root/stylelint.config.mjs} +0 -0
  62. /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/css-rules.mjs +0 -0
  63. /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/get-jsConfig-aliases.mjs +0 -0
  64. /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/mini-svg-data-uri-loader.cjs +0 -0
  65. /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/postcss.config.mjs +0 -0
  66. /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/purgecss-variables-safelist.mjs +0 -0
  67. /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/svg-rules.mjs +0 -0
  68. /package/dev-tools/starter-kit/{webpack-config-modules → source_files/root/webpack-config-modules}/svgo.config.mjs +0 -0
  69. /package/snippets/{config-templates/_github → _github}/dependabot.yml +0 -0
  70. /package/snippets/{error-pages/error-pages.js → error-pages.js} +0 -0
  71. /package/snippets/{config-templates/react → react}/offcanvas/offcanvas.jsx +0 -0
  72. /package/snippets/{config-templates/react → react}/offcanvas/offcanvas.module.scss +0 -0
  73. /package/snippets/{config-templates → root}/_hintrc.cjs +0 -0
  74. /package/snippets/{config-templates → root}/_npmignore +0 -0
  75. /package/snippets/{config-templates → root}/_npmrc +0 -0
  76. /package/snippets/{config-templates → root}/_stylelintignore +0 -0
  77. /package/snippets/{config-templates → root}/babel.config--react.json +0 -0
  78. /package/snippets/{config-templates → root}/babel.config--solidJS.json +0 -0
  79. /package/snippets/{ImgViewerController.php → twig-symfony/ImgViewerController.php} +0 -0
  80. /package/snippets/{UnsplashController.php → twig-symfony/UnsplashController.php} +0 -0
  81. /package/snippets/{config-templates → twig-symfony}/_env.local +0 -0
  82. /package/snippets/{error-pages → twig-symfony}/bundles/TwigBundle/Exception/error.html.twig +0 -0
  83. /package/snippets/{flash-messages.html.twig → twig-symfony/flash-messages.html.twig} +0 -0
  84. /package/snippets/{minimo-form-layout.html.twig → twig-symfony/minimo-form-layout.html.twig} +0 -0
@@ -13,8 +13,15 @@ json-table {
13
13
  position: relative;
14
14
  display: block;
15
15
  margin-block: var(--jt-wrapper-margin-block);
16
+
17
+ /* server-side request in progress */
18
+ &[aria-busy='true'] .table {
19
+ opacity: var(--jt-busy-opacity);
20
+ }
16
21
  }
17
22
 
23
+ /* =>> info section */
24
+
18
25
  .infoOuter {
19
26
  padding-block-end: var(--jt-info-outer-padding-block-end);
20
27
  }
@@ -49,9 +56,192 @@ json-table {
49
56
  }
50
57
  }
51
58
 
59
+ /* =>> table */
60
+
61
+ /* table wrapper + footer bar */
62
+ .tableOuter {
63
+ position: relative;
64
+ }
65
+
66
+ .tableWrapper {
67
+ position: relative;
68
+ }
69
+
52
70
  .table {
53
71
  /* vertical spacing is handled by the wrapper */
54
72
  margin-block: 0;
73
+
74
+ /* the sort button fills the whole cell: the cell padding moves to the button */
75
+ th.sortable {
76
+ padding: 0;
77
+ }
78
+
79
+ /* cell shown when there are no rows */
80
+ .empty {
81
+ padding-block: var(--jt-empty-padding-block);
82
+ font-style: italic;
83
+ color: var(--jt-empty-color);
84
+ text-align: center;
85
+ }
86
+
87
+ /* boolean cells */
88
+ .boolCell {
89
+ text-align: center;
90
+
91
+ svg {
92
+ display: inline-block;
93
+ width: var(--jt-bool-icon-size);
94
+ height: auto;
95
+ aspect-ratio: 1;
96
+ vertical-align: -.15em;
97
+ fill: currentColor;
98
+ }
99
+ }
100
+
101
+ .boolTrue {
102
+ color: var(--jt-bool-true-color);
103
+ }
104
+
105
+ .boolFalse {
106
+ color: var(--jt-bool-false-color);
107
+ }
108
+ }
109
+
110
+ /* =>> footer bar: caption (start) + pagination (end) */
111
+
112
+ .tableFooter {
113
+ display: flex;
114
+ flex-flow: row wrap;
115
+ gap: var(--jt-info-gap);
116
+ align-items: center;
117
+ justify-content: space-between;
118
+ padding-block-start: var(--jt-table-footer-padding-block-start);
119
+ }
120
+
121
+ .caption {
122
+ flex: 1 1 auto;
123
+ font-size: var(--jt-caption-font-size);
124
+ color: var(--jt-caption-color);
125
+ }
126
+
127
+ .pagination {
128
+ margin-inline-start: auto;
129
+ }
130
+
131
+ .paginationList {
132
+ display: flex;
133
+ flex-flow: row wrap;
134
+ padding: 0;
135
+ margin: 0;
136
+ list-style: none;
137
+ }
138
+
139
+ .paginationItem {
140
+ border: var(--jt-pagination-border-width) solid var(--jt-pagination-border-color);
141
+ border-inline-start-width: 0;
142
+
143
+ &:first-child {
144
+ border-inline-start-width: var(--jt-pagination-border-width);
145
+ border-start-start-radius: var(--jt-pagination-radius);
146
+ border-end-start-radius: var(--jt-pagination-radius);
147
+ }
148
+
149
+ &:last-child {
150
+ border-start-end-radius: var(--jt-pagination-radius);
151
+ border-end-end-radius: var(--jt-pagination-radius);
152
+ }
153
+ }
154
+
155
+ .paginationBtn,
156
+ .paginationEllipsis {
157
+ display: flex;
158
+ align-items: center;
159
+ justify-content: center;
160
+ min-width: var(--jt-pagination-btn-min-width);
161
+ height: 100%;
162
+ padding: var(--jt-pagination-btn-padding-block) var(--jt-pagination-btn-padding-inline);
163
+ font: inherit;
164
+ font-size: var(--jt-pagination-font-size);
165
+ line-height: var(--jt-pagination-line-height);
166
+ color: inherit;
167
+ }
168
+
169
+ .paginationBtn {
170
+ cursor: pointer;
171
+
172
+ &[disabled] {
173
+ cursor: default;
174
+ opacity: var(--jt-pagination-disabled-opacity);
175
+ }
176
+
177
+ &[aria-current='page'] {
178
+ font-weight: var(--jt-pagination-current-font-weight);
179
+ cursor: default;
180
+ background-color: var(--jt-pagination-current-background-color);
181
+ }
182
+
183
+ @media (hover: hover) {
184
+ &:hover:not([disabled], [aria-current='page']) {
185
+ background-color: var(--jt-pagination-hover-background-color);
186
+ }
187
+ }
188
+
189
+ svg {
190
+ width: var(--jt-pagination-icon-size);
191
+ aspect-ratio: 1;
192
+ fill: currentColor;
193
+ }
194
+ }
195
+
196
+ .paginationArrow {
197
+ padding-inline: calc(var(--jt-pagination-btn-padding-inline) / 2);
198
+ }
199
+
200
+ /* =>> sorting (thead) */
201
+
202
+ .sortable {
203
+ @media (hover: hover) {
204
+ &:hover {
205
+ background-color: var(--jt-thead-hover-background-color);
206
+ }
207
+ }
208
+ }
209
+
210
+ .sortBtn {
211
+ display: flex;
212
+ gap: var(--jt-sort-icon-gap);
213
+ align-items: center;
214
+ width: 100%;
215
+ height: 100%;
216
+ padding: var(--jt-sort-btn-padding-block) var(--jt-sort-btn-padding-inline);
217
+ font: inherit;
218
+ line-height: var(--jt-sort-btn-line-height);
219
+ color: inherit;
220
+ text-align: inherit;
221
+ cursor: pointer;
222
+ }
223
+
224
+ .sortTitle {
225
+ flex: 1 1 auto;
226
+ }
227
+
228
+ .sortIcon {
229
+ display: inline-flex;
230
+ flex: none;
231
+ width: var(--jt-sort-icon-size);
232
+ aspect-ratio: 1;
233
+ opacity: var(--jt-sort-icon-none-opacity);
234
+
235
+ svg {
236
+ width: 100%;
237
+ height: 100%;
238
+ fill: currentColor;
239
+ }
240
+
241
+ /* an active sort (aria-sort on the th) shows the icon at full opacity */
242
+ [aria-sort] & {
243
+ opacity: 1;
244
+ }
55
245
  }
56
246
 
57
247
  /* purgecss end ignore */
@@ -43,6 +43,201 @@ export default {
43
43
  $value: '20rem'
44
44
  }
45
45
  }
46
+ },
47
+
48
+ // sortable columns (thead)
49
+ thead: {
50
+ hover: {
51
+ background: {
52
+ color: {
53
+ $type: 'color',
54
+ $value: 'color-mix(in srgb, {table.thead.background.color} 90%, {accent})'
55
+ }
56
+ }
57
+ }
58
+ },
59
+
60
+ sort: {
61
+ // the sort button fills the whole th: same padding/line-height of minimo table cells
62
+ btn: {
63
+ padding: {
64
+ block: {
65
+ $type: 'dimension',
66
+ $value: '{table.cell.padding.block}'
67
+ },
68
+ inline: {
69
+ $type: 'dimension',
70
+ $value: '{table.cell.padding.inline}'
71
+ }
72
+ },
73
+ 'line-height': {
74
+ $type: 'number',
75
+ $value: '{table.cell.line-height}'
76
+ }
77
+ },
78
+ icon: {
79
+ size: {
80
+ $type: 'dimension',
81
+ $value: '1em'
82
+ },
83
+ gap: {
84
+ $type: 'dimension',
85
+ $value: '.4em'
86
+ },
87
+ // opacity of the icon when no sort is active
88
+ none: {
89
+ opacity: {
90
+ $type: 'number',
91
+ $value: '.4'
92
+ }
93
+ }
94
+ }
95
+ },
96
+
97
+ // boolean cells
98
+ bool: {
99
+ icon: {
100
+ size: {
101
+ $type: 'dimension',
102
+ $value: '1.1em'
103
+ }
104
+ },
105
+ true: {
106
+ color: {
107
+ $type: 'color',
108
+ $value: '{status.success.color}'
109
+ }
110
+ },
111
+ false: {
112
+ color: {
113
+ $type: 'color',
114
+ $value: '{status.danger.color}'
115
+ }
116
+ }
117
+ },
118
+
119
+ // opacity of the table while a server-side request is in progress
120
+ busy: {
121
+ opacity: {
122
+ $type: 'number',
123
+ $value: '.5'
124
+ }
125
+ },
126
+
127
+ // footer bar below the table (caption + pagination)
128
+ 'table-footer': {
129
+ padding: {
130
+ block: {
131
+ start: {
132
+ $type: 'dimension',
133
+ $value: '{size.xs}'
134
+ }
135
+ }
136
+ }
137
+ },
138
+
139
+ caption: {
140
+ font: {
141
+ size: {
142
+ $type: 'dimension',
143
+ $value: '{font.size.sm}'
144
+ }
145
+ },
146
+ color: {
147
+ $type: 'color',
148
+ $value: '{text.muted}'
149
+ }
150
+ },
151
+
152
+ pagination: {
153
+ border: {
154
+ width: {
155
+ $type: 'dimension',
156
+ $value: '1px'
157
+ },
158
+ color: {
159
+ $type: 'color',
160
+ $value: '{table.border.color}'
161
+ }
162
+ },
163
+ radius: {
164
+ $type: 'dimension',
165
+ $value: '{radius.xxs}'
166
+ },
167
+ font: {
168
+ size: {
169
+ $type: 'dimension',
170
+ $value: '{font.size.sm}'
171
+ }
172
+ },
173
+ 'line-height': {
174
+ $type: 'number',
175
+ $value: '{table.cell.line-height}'
176
+ },
177
+ btn: {
178
+ 'min-width': {
179
+ $type: 'dimension',
180
+ $value: '2.2em'
181
+ },
182
+ padding: {
183
+ block: {
184
+ $type: 'dimension',
185
+ $value: '{table.cell.padding.block}'
186
+ },
187
+ inline: {
188
+ $type: 'dimension',
189
+ $value: '{table.cell.padding.inline}'
190
+ }
191
+ }
192
+ },
193
+ icon: {
194
+ size: {
195
+ $type: 'dimension',
196
+ $value: '1em'
197
+ }
198
+ },
199
+ current: {
200
+ background: {
201
+ color: {
202
+ $type: 'color',
203
+ $value: '{table.thead.background.color}'
204
+ }
205
+ },
206
+ font: {
207
+ weight: {
208
+ $type: 'fontWeight',
209
+ $value: '{font.weight.semibold}'
210
+ }
211
+ }
212
+ },
213
+ hover: {
214
+ background: {
215
+ color: {
216
+ $type: 'color',
217
+ $value: '{table.body.tr.hover-bg-color}'
218
+ }
219
+ }
220
+ },
221
+ disabled: {
222
+ opacity: {
223
+ $type: 'number',
224
+ $value: '.5'
225
+ }
226
+ }
227
+ },
228
+
229
+ // "no rows" cell
230
+ empty: {
231
+ color: {
232
+ $type: 'color',
233
+ $value: '{text.muted}'
234
+ },
235
+ padding: {
236
+ block: {
237
+ $type: 'dimension',
238
+ $value: '{size.sm}'
239
+ }
240
+ }
46
241
  }
47
242
  }
48
243
  };