@jsswift/ui 1.0.53 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/css/animation.css +36 -36
  2. package/dist/css/base.css +374 -374
  3. package/dist/css/docs.css +54 -54
  4. package/dist/css/fonts-nunito.css +2 -2
  5. package/dist/css/min-ui.css +1 -1
  6. package/dist/css/responsive-base.css +557 -0
  7. package/dist/css/responsive.css +3225 -3225
  8. package/dist/css/ui-components.css +2902 -2930
  9. package/dist/css/ui-light.css +9908 -0
  10. package/dist/css/ui-light.min.css +1 -0
  11. package/dist/css/ui.css +6530 -6558
  12. package/dist/css/ui.min.css +1 -1
  13. package/dist/min-ui.js +12 -12
  14. package/dist/ui.js +4354 -9379
  15. package/dist/ui.min.js +12 -12
  16. package/package.json +4 -2
  17. package/src/00-bootstrap.js +305 -305
  18. package/src/01-foundation-helpers.js +328 -325
  19. package/src/10-primitives-layout.js +242 -242
  20. package/src/20-display-content.js +76 -76
  21. package/src/21-list-content.js +21 -21
  22. package/src/22-banner-content.js +376 -376
  23. package/src/23-tooltip.js +9 -9
  24. package/src/31-form-advanced.js +141 -141
  25. package/src/40-navigation.js +81 -81
  26. package/src/41-tab-panel.js +37 -37
  27. package/src/50-feedback.js +52 -52
  28. package/src/51-feedback-service.js +166 -166
  29. package/src/60-shell-app.js +1082 -1082
  30. package/src/61-form-service.js +5 -5
  31. package/src/70-dialog.js +34 -34
  32. package/src/71-menu-overlays.js +73 -73
  33. package/src/80-data.js +38 -38
  34. package/src/css/README.md +2 -0
  35. package/src/css/animation.css +36 -36
  36. package/src/css/base.css +374 -374
  37. package/src/css/docs.css +54 -54
  38. package/src/css/fonts-nunito.css +2 -2
  39. package/src/css/responsive.css +3225 -3225
  40. package/src/css/ui-components.css +2902 -2930
package/src/80-data.js CHANGED
@@ -63,20 +63,20 @@
63
63
  "toolbar", "toolbarStart", "toolbarEnd", "caption", "footer", "status", "rowClass", "rowAttrs",
64
64
  "minTableWidth", "hideHeader", "hideFooter", "hideStatus", "slots", "body"
65
65
  ]);
66
- wrapProps.class = uiClass(["cms-table-card", props.class, props.cardClass]);
66
+ wrapProps.class = uiClass(["jss-table-card", props.class, props.cardClass]);
67
67
  if (props.dense != null) wrapProps.dense = props.dense;
68
68
 
69
- const shell = _.div({ class: "cms-table-shell" });
69
+ const shell = _.div({ class: "jss-table-shell" });
70
70
  const leadNodes = renderSlotToArray(slots, "default", {}, children);
71
- if (leadNodes.length) shell.appendChild(_.div({ class: "cms-table-lead" }, ...leadNodes));
71
+ if (leadNodes.length) shell.appendChild(_.div({ class: "jss-table-lead" }, ...leadNodes));
72
72
 
73
73
  const toolbarStartNodes = renderSlotToArray(slots, "toolbarStart", {}, props.toolbarStart);
74
74
  const toolbarNodes = renderSlotToArray(slots, "toolbar", {}, props.toolbar);
75
75
  const toolbarEndNodes = renderSlotToArray(slots, "toolbarEnd", {}, props.toolbarEnd);
76
76
 
77
- const toolbar = _.div({ class: "cms-table-toolbar" });
78
- const toolbarMain = _.div({ class: "cms-table-toolbar-main" });
79
- const toolbarSide = _.div({ class: "cms-table-toolbar-side" });
77
+ const toolbar = _.div({ class: "jss-table-toolbar" });
78
+ const toolbarMain = _.div({ class: "jss-table-toolbar-main" });
79
+ const toolbarSide = _.div({ class: "jss-table-toolbar-side" });
80
80
  toolbarStartNodes.forEach((node) => toolbarMain.appendChild(node));
81
81
  toolbarNodes.forEach((node) => toolbarMain.appendChild(node));
82
82
 
@@ -86,13 +86,13 @@
86
86
  } else if (searchable) {
87
87
  searchInput = _.input({
88
88
  type: "search",
89
- class: "cms-input",
89
+ class: "jss-input",
90
90
  placeholder: typeof props.searchable === "string" ? props.searchable : (props.searchPlaceholder || "Cerca nella tabella"),
91
91
  value: String(getQuery() || "")
92
92
  });
93
93
  searchInput.addEventListener("input", () => setQuery(searchInput.value));
94
94
  const clearSearch = UI.Btn({
95
- class: "cms-table-search-clear",
95
+ class: "jss-table-search-clear",
96
96
  outline: true,
97
97
  onClick: () => {
98
98
  if (searchInput) searchInput.value = "";
@@ -100,8 +100,8 @@
100
100
  }
101
101
  }, "Reset");
102
102
  toolbarSide.appendChild(
103
- _.div({ class: "cms-singularity cms-table-search" },
104
- _.span({ class: "cms-table-search-icon", "aria-hidden": "true" }, "⌕"),
103
+ _.div({ class: "jss-singularity jss-table-search" },
104
+ _.span({ class: "jss-table-search-icon", "aria-hidden": "true" }, "⌕"),
105
105
  searchInput,
106
106
  clearSearch
107
107
  )
@@ -114,11 +114,11 @@
114
114
  shell.appendChild(toolbar);
115
115
  }
116
116
 
117
- const statusSummary = _.div({ class: "cms-singularity cms-table-chip" }, "");
118
- const statusFilter = _.div({ class: "cms-singularity cms-table-chip" }, "");
119
- const statusSort = _.div({ class: "cms-singularity cms-table-chip" }, "");
117
+ const statusSummary = _.div({ class: "jss-singularity jss-table-chip" }, "");
118
+ const statusFilter = _.div({ class: "jss-singularity jss-table-chip" }, "");
119
+ const statusSort = _.div({ class: "jss-singularity jss-table-chip" }, "");
120
120
  const statusExtraNodes = renderSlotToArray(slots, "status", {}, props.status);
121
- const status = _.div({ class: "cms-table-status" },
121
+ const status = _.div({ class: "jss-table-status" },
122
122
  statusSummary,
123
123
  statusFilter,
124
124
  statusSort,
@@ -127,14 +127,14 @@
127
127
  if (props.hideStatus !== true) shell.appendChild(status);
128
128
 
129
129
  const captionNodes = renderSlotToArray(slots, "caption", {}, props.caption);
130
- if (captionNodes.length) shell.appendChild(_.div({ class: "cms-table-caption" }, ...captionNodes));
130
+ if (captionNodes.length) shell.appendChild(_.div({ class: "jss-table-caption" }, ...captionNodes));
131
131
 
132
132
  const thead = _.thead();
133
133
  const tbody = _.tbody();
134
134
  const hasActions = !!props.actions || !!slots.actions;
135
135
 
136
136
  const tableClass = uiClass([
137
- "cms-table",
137
+ "jss-table",
138
138
  uiWhen(props.dense, "dense"),
139
139
  uiWhen(props.striped, "striped"),
140
140
  uiWhen(props.hover !== false, "hover"),
@@ -144,35 +144,35 @@
144
144
  const tableStyle = {
145
145
  ...(props.tableStyle || {})
146
146
  };
147
- if (props.minTableWidth != null) tableStyle["--cms-table-min-width"] = toCssSize(props.minTableWidth);
147
+ if (props.minTableWidth != null) tableStyle["--jss-table-min-width"] = toCssSize(props.minTableWidth);
148
148
  const table = _.table({ class: tableClass, style: tableStyle }, thead, tbody);
149
- const wrapTable = _.div({ class: "cms-singularity cms-table-wrap" }, table);
149
+ const wrapTable = _.div({ class: "jss-singularity jss-table-wrap" }, table);
150
150
  shell.appendChild(wrapTable);
151
151
 
152
- const pagerInfo = _.div({ class: "cms-singularity cms-table-chip" }, "");
153
- const pagerMeta = _.div({ class: "cms-singularity cms-table-chip" }, "");
152
+ const pagerInfo = _.div({ class: "jss-singularity jss-table-chip" }, "");
153
+ const pagerMeta = _.div({ class: "jss-singularity jss-table-chip" }, "");
154
154
  const btnPrev = UI.Btn({ outline: true, onClick: () => setPage(Math.max(1, getPage() - 1)) }, "‹");
155
155
  const btnNext = UI.Btn({ outline: true, onClick: () => setPage(getPage() + 1) }, "›");
156
- const pageChip = _.div({ class: "cms-singularity cms-table-chip" }, "");
157
- const sizeSelect = _.select({ class: "cms-input cms-table-size-select" },
156
+ const pageChip = _.div({ class: "jss-singularity jss-table-chip" }, "");
157
+ const sizeSelect = _.select({ class: "jss-input jss-table-size-select" },
158
158
  ...pageSizes.map((size) => uiOptionNode({ value: String(size) }, String(size)))
159
159
  );
160
160
  sizeSelect.value = String(getPageSize());
161
161
  sizeSelect.addEventListener("change", () => setPageSize(sizeSelect.value));
162
162
  const footerExtraNodes = renderSlotToArray(slots, "footer", {}, props.footer);
163
163
 
164
- const footer = _.div({ class: "cms-table-foot" },
165
- _.div({ class: "cms-table-foot-main" },
164
+ const footer = _.div({ class: "jss-table-foot" },
165
+ _.div({ class: "jss-table-foot-main" },
166
166
  pagerInfo,
167
167
  pagerMeta,
168
- _.label({ class: "cms-table-size" },
168
+ _.label({ class: "jss-table-size" },
169
169
  _.span("Righe"),
170
170
  sizeSelect
171
171
  )
172
172
  ),
173
- _.div({ class: "cms-table-foot-extra" },
173
+ _.div({ class: "jss-table-foot-extra" },
174
174
  ...footerExtraNodes,
175
- _.div({ class: "cms-table-pager" },
175
+ _.div({ class: "jss-table-pager" },
176
176
  btnPrev,
177
177
  pageChip,
178
178
  btnNext
@@ -208,9 +208,9 @@
208
208
  const isActive = !!currentSort && (currentSort.key === sortKey || currentSort.key === col?.key);
209
209
  const th = _.th({
210
210
  class: uiClass([
211
- "cms-table-head-cell",
211
+ "jss-table-head-cell",
212
212
  uiWhen(col?.nowrap, "is-nowrap"),
213
- uiWhen(isSortable, "cms-table-sortable"),
213
+ uiWhen(isSortable, "jss-table-sortable"),
214
214
  uiWhen(isActive, "is-sorted"),
215
215
  col?.headerClass
216
216
  ]),
@@ -221,11 +221,11 @@
221
221
  th.appendChild(
222
222
  _.button({
223
223
  type: "button",
224
- class: "cms-table-head-button",
224
+ class: "jss-table-head-button",
225
225
  onClick: () => toggleSort(col, colIndex)
226
226
  },
227
- _.span({ class: "cms-table-head-label" }, ...headerNodes),
228
- _.span({ class: "cms-table-head-arrow", "aria-hidden": "true" },
227
+ _.span({ class: "jss-table-head-label" }, ...headerNodes),
228
+ _.span({ class: "jss-table-head-arrow", "aria-hidden": "true" },
229
229
  isActive ? (currentSort.dir === "asc" ? "↑" : "↓") : "↕"
230
230
  )
231
231
  )
@@ -239,7 +239,7 @@
239
239
  if (hasActions) {
240
240
  const actionsHeaderNodes = renderSlotToArray(slots, "actionsHeader", {}, props.actionsLabel || "Azioni");
241
241
  row.appendChild(
242
- _.th({ class: "cms-table-head-cell cms-table-head-actions", style: { textAlign: "right" } }, ...actionsHeaderNodes)
242
+ _.th({ class: "jss-table-head-cell jss-table-head-actions", style: { textAlign: "right" } }, ...actionsHeaderNodes)
243
243
  );
244
244
  }
245
245
  thead.appendChild(row);
@@ -251,7 +251,7 @@
251
251
  const colSpan = String(columns.length + (hasActions ? 1 : 0));
252
252
  tbody.appendChild(
253
253
  _.tr(
254
- _.td({ colSpan, class: "cms-table-state" }, ...nodes)
254
+ _.td({ colSpan, class: "jss-table-state" }, ...nodes)
255
255
  )
256
256
  );
257
257
  };
@@ -354,7 +354,7 @@
354
354
  const tr = _.tr({
355
355
  ...rowAttrs,
356
356
  class: uiClass([
357
- "cms-table-row",
357
+ "jss-table-row",
358
358
  rowClass,
359
359
  rowAttrs.class,
360
360
  uiWhen(isInteractiveRow, "is-clickable")
@@ -396,7 +396,7 @@
396
396
  if (col?.maxWidth != null) tdStyle.maxWidth = toCssSize(col.maxWidth);
397
397
  const cellClass = typeof col?.cellClass === "function" ? col.cellClass(row, cellCtx) : (col?.cellClass || col?.class);
398
398
  const td = _.td({
399
- class: uiClass(["cms-table-cell", cellClass, uiWhen(col?.nowrap, "is-nowrap")]),
399
+ class: uiClass(["jss-table-cell", cellClass, uiWhen(col?.nowrap, "is-nowrap")]),
400
400
  style: tdStyle
401
401
  });
402
402
 
@@ -419,8 +419,8 @@
419
419
  let actionNodes = renderSlotToArray(slots, "actions", actionCtx, actionRaw);
420
420
  if (!actionNodes.length) actionNodes = renderSlotToArray(null, "default", actionCtx, actionRaw);
421
421
  tr.appendChild(
422
- _.td({ class: "cms-table-cell cms-table-cell-actions", style: { textAlign: "right" } },
423
- _.div({ class: "cms-table-actions" }, ...actionNodes)
422
+ _.td({ class: "jss-table-cell jss-table-cell-actions", style: { textAlign: "right" } },
423
+ _.div({ class: "jss-table-actions" }, ...actionNodes)
424
424
  )
425
425
  );
426
426
  }
package/src/css/README.md CHANGED
@@ -15,3 +15,5 @@ Generated outputs:
15
15
  - `pages/_jsswift-fe/css/min-ui.css`
16
16
  - `pages/_jsswift-fe/css/ui.min.css`
17
17
 
18
+
19
+ `ui.css` remains the full compatible bundle. `ui-light.css` and `ui-light.min.css` omit breakpoint utilities but retain base tokens, component/mobile styles and unprefixed utilities generated by `cms-dev/make-responsive-css.mjs --base-only`. Add `responsive.css` after the light bundle for breakpoint props. All props remain available in JavaScript.
@@ -1,52 +1,52 @@
1
1
  :root {
2
- --cms-anim-dur: 500ms;
3
- --cms-anim-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
4
- --cms-anim-distance: 12px;
5
- --cms-anim-scale: 0.98;
6
- --cms-anim-in: cms-fade-in;
7
- --cms-anim-out: cms-fade-out;
2
+ --jss-anim-dur: 500ms;
3
+ --jss-anim-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
4
+ --jss-anim-distance: 12px;
5
+ --jss-anim-scale: 0.98;
6
+ --jss-anim-in: jss-fade-in;
7
+ --jss-anim-out: jss-fade-out;
8
8
  }
9
9
 
10
- .cms-animate {
11
- animation-duration: var(--cms-anim-dur);
12
- animation-timing-function: var(--cms-anim-ease);
10
+ .jss-animate {
11
+ animation-duration: var(--jss-anim-dur);
12
+ animation-timing-function: var(--jss-anim-ease);
13
13
  animation-fill-mode: both;
14
14
  will-change: opacity, transform;
15
15
  }
16
16
 
17
- .cms-animate.in {
18
- animation-name: var(--cms-anim-in);
17
+ .jss-animate.in {
18
+ animation-name: var(--jss-anim-in);
19
19
  }
20
20
 
21
- .cms-animate.out {
22
- animation-name: var(--cms-anim-out);
21
+ .jss-animate.out {
22
+ animation-name: var(--jss-anim-out);
23
23
  }
24
24
 
25
- .cms-animate.fade.in {
26
- animation-name: cms-fade-in;
25
+ .jss-animate.fade.in {
26
+ animation-name: jss-fade-in;
27
27
  }
28
28
 
29
- .cms-animate.fade.out {
30
- animation-name: cms-fade-out;
29
+ .jss-animate.fade.out {
30
+ animation-name: jss-fade-out;
31
31
  }
32
32
 
33
- .cms-animate.slide.in {
34
- animation-name: cms-slide-in;
33
+ .jss-animate.slide.in {
34
+ animation-name: jss-slide-in;
35
35
  }
36
36
 
37
- .cms-animate.slide.out {
38
- animation-name: cms-slide-out;
37
+ .jss-animate.slide.out {
38
+ animation-name: jss-slide-out;
39
39
  }
40
40
 
41
- .cms-animate.scale.in {
42
- animation-name: cms-scale-in;
41
+ .jss-animate.scale.in {
42
+ animation-name: jss-scale-in;
43
43
  }
44
44
 
45
- .cms-animate.scale.out {
46
- animation-name: cms-scale-out;
45
+ .jss-animate.scale.out {
46
+ animation-name: jss-scale-out;
47
47
  }
48
48
 
49
- @keyframes cms-fade-in {
49
+ @keyframes jss-fade-in {
50
50
  from {
51
51
  opacity: 0;
52
52
  }
@@ -56,7 +56,7 @@
56
56
  }
57
57
  }
58
58
 
59
- @keyframes cms-fade-out {
59
+ @keyframes jss-fade-out {
60
60
  from {
61
61
  opacity: 1;
62
62
  }
@@ -66,10 +66,10 @@
66
66
  }
67
67
  }
68
68
 
69
- @keyframes cms-slide-in {
69
+ @keyframes jss-slide-in {
70
70
  from {
71
71
  opacity: 0;
72
- transform: translateY(var(--cms-anim-distance));
72
+ transform: translateY(var(--jss-anim-distance));
73
73
  }
74
74
 
75
75
  to {
@@ -78,7 +78,7 @@
78
78
  }
79
79
  }
80
80
 
81
- @keyframes cms-slide-out {
81
+ @keyframes jss-slide-out {
82
82
  from {
83
83
  opacity: 1;
84
84
  transform: translateY(0);
@@ -86,14 +86,14 @@
86
86
 
87
87
  to {
88
88
  opacity: 0;
89
- transform: translateY(var(--cms-anim-distance));
89
+ transform: translateY(var(--jss-anim-distance));
90
90
  }
91
91
  }
92
92
 
93
- @keyframes cms-scale-in {
93
+ @keyframes jss-scale-in {
94
94
  from {
95
95
  opacity: 0;
96
- transform: scale(var(--cms-anim-scale));
96
+ transform: scale(var(--jss-anim-scale));
97
97
  }
98
98
 
99
99
  to {
@@ -102,7 +102,7 @@
102
102
  }
103
103
  }
104
104
 
105
- @keyframes cms-scale-out {
105
+ @keyframes jss-scale-out {
106
106
  from {
107
107
  opacity: 1;
108
108
  transform: scale(1);
@@ -110,12 +110,12 @@
110
110
 
111
111
  to {
112
112
  opacity: 0;
113
- transform: scale(var(--cms-anim-scale));
113
+ transform: scale(var(--jss-anim-scale));
114
114
  }
115
115
  }
116
116
 
117
117
  @media (prefers-reduced-motion: reduce) {
118
- .cms-animate {
118
+ .jss-animate {
119
119
  animation-duration: 1ms;
120
120
  }
121
121
  }