@jsswift/ui 1.0.54 → 2.0.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 (39) 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 +549 -549
  7. package/dist/css/responsive.css +3225 -3225
  8. package/dist/css/ui-components.css +2902 -2930
  9. package/dist/css/ui-light.css +3853 -3881
  10. package/dist/css/ui-light.min.css +1 -1
  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 +2 -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/animation.css +36 -36
  35. package/src/css/base.css +374 -374
  36. package/src/css/docs.css +54 -54
  37. package/src/css/fonts-nunito.css +2 -2
  38. package/src/css/responsive.css +3225 -3225
  39. package/src/css/ui-components.css +2902 -2930
@@ -4,7 +4,7 @@
4
4
  const isRadio = type === "radio";
5
5
  const isToggle = options.appearance === "toggle";
6
6
  const supportsStandby = !isRadio;
7
- const id = props.id || (`cms-${type}-` + Math.random().toString(36).slice(2));
7
+ const id = props.id || (`jss-${type}-` + Math.random().toString(36).slice(2));
8
8
  const model = resolveModel(
9
9
  props.model,
10
10
  options.modelName || (isRadio ? "UI.Radio:model" : "UI.Checkbox:model")
@@ -21,12 +21,12 @@
21
21
  inputProps.type = type;
22
22
  inputProps.id = id;
23
23
  if (isRadio && props.name != null) inputProps.name = props.name;
24
- inputProps.class = uiClass([`cms-${type}`, "cms-choice-input", props.inputClass]);
24
+ inputProps.class = uiClass([`jss-${type}`, "jss-choice-input", props.inputClass]);
25
25
  const input = _.input(inputProps);
26
26
 
27
27
  const labelNodes = renderSlotToArray(slots, "label", {}, props.label);
28
28
  const labelContent = labelNodes.length ? labelNodes : renderSlotToArray(slots, "default", {}, children);
29
- const shortcodeHint = uiCreateShortcodeHint(props, { className: "cms-shortcode cms-choice-shortcode" });
29
+ const shortcodeHint = uiCreateShortcodeHint(props, { className: "jss-shortcode jss-choice-shortcode" });
30
30
  const finalLabelContent = shortcodeHint ? [...labelContent, shortcodeHint] : labelContent;
31
31
 
32
32
  const wrapProps = JSswift.omit(props, [
@@ -39,13 +39,13 @@
39
39
  "shortcode", "shortcut", "hotkey", "showShortcode", "showShortcut"
40
40
  ]);
41
41
  wrapProps.class = uiClass([
42
- "cms-clear-set",
43
- "cms-singularity-check",
44
- "cms-choice-wrap",
45
- `cms-${type}-wrap`,
46
- uiWhen(isToggle, "cms-toggle-wrap"),
47
- uiWhen(isToggle && isRadio, "cms-toggle-radio-wrap"),
48
- uiWhen(isToggle && !isRadio, "cms-toggle-checkbox-wrap"),
42
+ "jss-clear-set",
43
+ "jss-singularity-check",
44
+ "jss-choice-wrap",
45
+ `jss-${type}-wrap`,
46
+ uiWhen(isToggle, "jss-toggle-wrap"),
47
+ uiWhen(isToggle && isRadio, "jss-toggle-radio-wrap"),
48
+ uiWhen(isToggle && !isRadio, "jss-toggle-checkbox-wrap"),
49
49
  uiWhen(props.dense, "dense"),
50
50
  props.class
51
51
  ]);
@@ -53,19 +53,19 @@
53
53
 
54
54
  const sizeValue = uiUnwrap(props.size);
55
55
  if (sizeValue != null && !(typeof sizeValue === "string" && JSswift.uiSizes?.includes(sizeValue))) {
56
- wrapProps.style["--cms-choice-size"] = toCssSize(sizeValue);
56
+ wrapProps.style["--jss-choice-size"] = toCssSize(sizeValue);
57
57
  }
58
58
 
59
59
  const marker = _.span({
60
60
  class: uiClass([
61
- "cms-choice-mark",
62
- isRadio ? "cms-choice-radio-mark" : "cms-choice-checkbox-mark",
63
- uiWhen(isToggle, "cms-toggle-mark")
61
+ "jss-choice-mark",
62
+ isRadio ? "jss-choice-radio-mark" : "jss-choice-checkbox-mark",
63
+ uiWhen(isToggle, "jss-toggle-mark")
64
64
  ])
65
65
  });
66
- const indicatorHost = isToggle ? _.span({ class: "cms-toggle-thumb" }) : marker;
66
+ const indicatorHost = isToggle ? _.span({ class: "jss-toggle-thumb" }) : marker;
67
67
  if (isToggle) marker.appendChild(indicatorHost);
68
- const labelNode = finalLabelContent.length ? _.span({ class: "cms-choice-label" }, ...finalLabelContent) : null;
68
+ const labelNode = finalLabelContent.length ? _.span({ class: "jss-choice-label" }, ...finalLabelContent) : null;
69
69
 
70
70
  const wrap = _.label(
71
71
  wrapProps,
@@ -132,7 +132,7 @@
132
132
 
133
133
  if (isToggle) {
134
134
  if (state == null) {
135
- indicatorHost.style.transform = "translateX(calc((var(--cms-toggle-width) - var(--cms-toggle-thumb-size) - 1px) / 2))";
135
+ indicatorHost.style.transform = "translateX(calc((var(--jss-toggle-width) - var(--jss-toggle-thumb-size) - 1px) / 2))";
136
136
  } else {
137
137
  indicatorHost.style.removeProperty("transform");
138
138
  }
@@ -249,26 +249,26 @@
249
249
  "selectionColor", "trackColor", "thumbColor", "inputClass", "readonly", "size"
250
250
  ]);
251
251
  inputProps.type = "range";
252
- inputProps.class = uiClass(["cms-slider-input", props.inputClass]);
252
+ inputProps.class = uiClass(["jss-slider-input", props.inputClass]);
253
253
  const input = _.input(inputProps);
254
254
 
255
255
  const sliderStyle = { ...(props.style || {}) };
256
256
  const sizeValue = uiUnwrap(props.size);
257
257
  if (sizeValue != null) {
258
258
  const sliderSize = (typeof sizeValue === "string" && JSswift.uiSizes?.includes(sizeValue))
259
- ? `var(--cms-size-${sizeValue})`
259
+ ? `var(--jss-size-${sizeValue})`
260
260
  : toCssSize(sizeValue);
261
- sliderStyle["--cms-slider-size"] = sliderSize;
262
- sliderStyle["--cms-slider-track-size"] = `max(4px, calc(${sliderSize} / 4))`;
263
- sliderStyle["--cms-slider-box-height"] = `calc(${sliderSize} * 1.5)`;
264
- sliderStyle["--cms-slider-marker-size"] = `max(6px, calc(${sliderSize} / 3))`;
261
+ sliderStyle["--jss-slider-size"] = sliderSize;
262
+ sliderStyle["--jss-slider-track-size"] = `max(4px, calc(${sliderSize} / 4))`;
263
+ sliderStyle["--jss-slider-box-height"] = `calc(${sliderSize} * 1.5)`;
264
+ sliderStyle["--jss-slider-marker-size"] = `max(6px, calc(${sliderSize} / 3))`;
265
265
  }
266
266
 
267
267
  const wrap = _.label({
268
268
  class: uiClass([
269
- "cms-clear-set",
270
- "cms-singularity-check",
271
- "cms-slider-wrap",
269
+ "jss-clear-set",
270
+ "jss-singularity-check",
271
+ "jss-slider-wrap",
272
272
  uiWhen(props.dense, "dense"),
273
273
  props.class
274
274
  ]),
@@ -277,69 +277,69 @@
277
277
  setPropertyProps(wrap, props);
278
278
 
279
279
  const header = _.div({
280
- class: "cms-slider-header"
280
+ class: "jss-slider-header"
281
281
  });
282
282
  const labelHost = _.span({
283
- class: "cms-slider-label"
283
+ class: "jss-slider-label"
284
284
  });
285
285
  const valueHost = _.span({
286
- class: "cms-slider-value"
286
+ class: "jss-slider-value"
287
287
  });
288
288
  header.append(labelHost, valueHost);
289
289
 
290
290
  const body = _.div({
291
- class: "cms-slider-body"
291
+ class: "jss-slider-body"
292
292
  });
293
293
  const startIconHost = _.span({
294
- class: "cms-slider-icon cms-slider-icon-left"
294
+ class: "jss-slider-icon jss-slider-icon-left"
295
295
  });
296
296
  const startLabelHost = _.span({
297
- class: "cms-slider-edge-label cms-slider-edge-label-left"
297
+ class: "jss-slider-edge-label jss-slider-edge-label-left"
298
298
  });
299
299
  const main = _.div({
300
- class: "cms-slider-main"
300
+ class: "jss-slider-main"
301
301
  });
302
302
  const sliderBox = _.div({
303
- class: "cms-slider-box",
303
+ class: "jss-slider-box",
304
304
  style: {
305
- minHeight: "var(--cms-slider-box-height, 36px)"
305
+ minHeight: "var(--jss-slider-box-height, 36px)"
306
306
  }
307
307
  });
308
308
  const rail = _.span({
309
- class: "cms-slider-rail",
309
+ class: "jss-slider-rail",
310
310
  style: {
311
- height: "var(--cms-slider-track-size, 6px)"
311
+ height: "var(--jss-slider-track-size, 6px)"
312
312
  }
313
313
  });
314
314
  const selection = _.span({
315
- class: "cms-slider-selection",
315
+ class: "jss-slider-selection",
316
316
  style: {
317
- height: "var(--cms-slider-track-size, 6px)"
317
+ height: "var(--jss-slider-track-size, 6px)"
318
318
  }
319
319
  });
320
320
  const thumb = _.span({
321
- class: "cms-slider-thumb",
321
+ class: "jss-slider-thumb",
322
322
  style: {
323
- width: "var(--cms-slider-size, 24px)",
324
- height: "var(--cms-slider-size, 24px)"
323
+ width: "var(--jss-slider-size, 24px)",
324
+ height: "var(--jss-slider-size, 24px)"
325
325
  }
326
326
  });
327
327
  const thumbIconHost = _.span({
328
- class: "cms-slider-thumb-icon"
328
+ class: "jss-slider-thumb-icon"
329
329
  });
330
330
  const thumbLabelHost = _.span({
331
- class: "cms-slider-thumb-label"
331
+ class: "jss-slider-thumb-label"
332
332
  });
333
333
  thumb.append(thumbLabelHost, thumbIconHost);
334
334
 
335
335
  const markersHost = _.div({
336
- class: "cms-slider-markers"
336
+ class: "jss-slider-markers"
337
337
  });
338
338
  const endLabelHost = _.span({
339
- class: "cms-slider-edge-label cms-slider-edge-label-right"
339
+ class: "jss-slider-edge-label jss-slider-edge-label-right"
340
340
  });
341
341
  const endIconHost = _.span({
342
- class: "cms-slider-icon cms-slider-icon-right"
342
+ class: "jss-slider-icon jss-slider-icon-right"
343
343
  });
344
344
 
345
345
  sliderBox.append(rail, selection, thumb, input);
@@ -485,10 +485,10 @@
485
485
  const active = uiUnwrap(props.reverse) ? getValue() <= marker.value : getValue() >= marker.value;
486
486
  const item = _.button({
487
487
  type: "button",
488
- class: uiClass(["cms-slider-marker", marker.className, uiWhen(() => active, "active")]),
488
+ class: uiClass(["jss-slider-marker", marker.className, uiWhen(() => active, "active")]),
489
489
  style: {
490
490
  left: `${ratio * 100}%`,
491
- color: active ? (uiUnwrap(props.color) || "var(--cms-primary)") : "var(--cms-muted)",
491
+ color: active ? (uiUnwrap(props.color) || "var(--jss-primary)") : "var(--jss-muted)",
492
492
  cursor: (uiUnwrap(props.disabled) || uiUnwrap(props.readonly)) ? "default" : "pointer"
493
493
  },
494
494
  disabled: !!uiUnwrap(props.disabled) || !!uiUnwrap(props.readonly),
@@ -513,11 +513,11 @@
513
513
  : JSswift.ui.slot(marker.icon, { ...markerCtx, as: "marker" });
514
514
  }
515
515
  const markerTick = _.span({
516
- class: "cms-slider-marker-tick",
516
+ class: "jss-slider-marker-tick",
517
517
  style: {
518
- width: "var(--cms-slider-marker-size, 8px)",
519
- height: "var(--cms-slider-marker-size, 8px)",
520
- background: active ? (uiUnwrap(props.color) || "var(--cms-primary)") : "var(--cms-border-color)"
518
+ width: "var(--jss-slider-marker-size, 8px)",
519
+ height: "var(--jss-slider-marker-size, 8px)",
520
+ background: active ? (uiUnwrap(props.color) || "var(--jss-primary)") : "var(--jss-border-color)"
521
521
  }
522
522
  });
523
523
  const markerNodes = markerNode == null
@@ -529,7 +529,7 @@
529
529
  markerNodes.forEach((node) => item.appendChild(node));
530
530
  if (labelNodes.length) {
531
531
  item.appendChild(_.span({
532
- class: "cms-slider-marker-label"
532
+ class: "jss-slider-marker-label"
533
533
  }, ...labelNodes));
534
534
  }
535
535
  markersHost.appendChild(item);
@@ -593,8 +593,8 @@
593
593
  const step = getStep();
594
594
  const ratio = ratioFromValue(value);
595
595
  const percent = `${ratio * 100}%`;
596
- const color = uiUnwrap(props.color) || uiUnwrap(props.selectionColor) || "var(--cms-primary)";
597
- const trackColor = uiUnwrap(props.trackColor) || "var(--cms-border-color)";
596
+ const color = uiUnwrap(props.color) || uiUnwrap(props.selectionColor) || "var(--jss-primary)";
597
+ const trackColor = uiUnwrap(props.trackColor) || "var(--jss-border-color)";
598
598
  const thumbColor = uiUnwrap(props.thumbColor) || color;
599
599
  const readonly = !!uiUnwrap(props.readonly);
600
600
  const disabled = !!uiUnwrap(props.disabled);
@@ -659,7 +659,7 @@
659
659
 
660
660
  if (props.withQItem || props.qitem || props.item === true) {
661
661
  const item = UI.Item({
662
- class: uiClass(["cms-slider-item", props.itemClass]),
662
+ class: uiClass(["jss-slider-item", props.itemClass]),
663
663
  style: props.itemStyle
664
664
  }, wrap);
665
665
  item._input = input;
@@ -679,7 +679,7 @@
679
679
  const slots = props.slots || {};
680
680
  const boundValue = props.model || ((uiIsSignal(props.value) || uiIsRod(props.value)) ? props.value : null);
681
681
  const model = resolveModel(boundValue, "UI.Rating:model");
682
- const id = props.id || (`cms-rating-` + Math.random().toString(36).slice(2));
682
+ const id = props.id || (`jss-rating-` + Math.random().toString(36).slice(2));
683
683
  const inputProps = JSswift.omit(props, [
684
684
  "model", "value", "max", "class", "style", "dense", "readonly", "disabled", "clearable",
685
685
  "half", "allowHalf", "noDimming", "label", "slots", "onChange", "onInput", "onHover",
@@ -691,7 +691,7 @@
691
691
  inputProps.type = "hidden";
692
692
  inputProps.id = id;
693
693
  if (props.name != null) inputProps.name = props.name;
694
- inputProps.class = uiClass(["cms-rating-input", "cms-choice-input", props.inputClass]);
694
+ inputProps.class = uiClass(["jss-rating-input", "jss-choice-input", props.inputClass]);
695
695
  const input = _.input(inputProps);
696
696
 
697
697
  const wrapProps = JSswift.omit(props, [
@@ -703,26 +703,26 @@
703
703
  "hoverColor", "size", "gap", "tabindex", "tabIndex", "inputClass"
704
704
  ]);
705
705
  wrapProps.class = uiClass([
706
- "cms-clear-set",
707
- "cms-singularity-check",
708
- "cms-choice-wrap",
709
- "cms-rating",
710
- "cms-rating-wrap",
706
+ "jss-clear-set",
707
+ "jss-singularity-check",
708
+ "jss-choice-wrap",
709
+ "jss-rating",
710
+ "jss-rating-wrap",
711
711
  uiWhen(props.dense, "dense"),
712
712
  props.class
713
713
  ]);
714
714
  wrapProps.style = { ...(props.style || {}) };
715
715
  const sizeValue = uiUnwrap(props.size);
716
716
  if (sizeValue != null && !(typeof sizeValue === "string" && JSswift.uiSizes?.includes(sizeValue))) {
717
- wrapProps.style["--cms-rating-size"] = toCssSize(sizeValue);
717
+ wrapProps.style["--jss-rating-size"] = toCssSize(sizeValue);
718
718
  }
719
719
  const gapValue = uiUnwrap(props.gap);
720
720
  if (gapValue != null) {
721
- wrapProps.style["--cms-rating-gap"] = toCssSize(gapValue);
721
+ wrapProps.style["--jss-rating-gap"] = toCssSize(gapValue);
722
722
  }
723
723
 
724
724
  const control = _.span({
725
- class: "cms-rating-control",
725
+ class: "jss-rating-control",
726
726
  onMouseleave: (e) => {
727
727
  if (hoverValue == null) return;
728
728
  hoverValue = null;
@@ -766,7 +766,7 @@
766
766
  setRatingValue(next, e, { emit: true });
767
767
  }
768
768
  });
769
- const labelHost = _.span({ class: "cms-choice-label cms-rating-label" });
769
+ const labelHost = _.span({ class: "jss-choice-label jss-rating-label" });
770
770
  const wrap = _.label(wrapProps, input, control, labelHost);
771
771
  setPropertyProps(wrap, props);
772
772
 
@@ -827,10 +827,10 @@
827
827
  return "empty";
828
828
  };
829
829
  const getStateColor = (state, hovered) => {
830
- const selectedColor = uiUnwrap(props.colorSelected ?? props.activeColor ?? props.color ?? props.textColor) || "var(--cms-warning, #f0b429)";
830
+ const selectedColor = uiUnwrap(props.colorSelected ?? props.activeColor ?? props.color ?? props.textColor) || "var(--jss-warning, #f0b429)";
831
831
  const halfColor = uiUnwrap(props.colorHalf ?? props.halfColor ?? props.colorSelected ?? props.activeColor ?? props.color ?? props.textColor) || selectedColor;
832
832
  const hoveredColor = uiUnwrap(props.colorHovered ?? props.hoverColor ?? props.colorSelected ?? props.activeColor ?? props.color ?? props.textColor) || selectedColor;
833
- const inactiveColor = uiUnwrap(props.colorInactive ?? props.colorOff ?? props.color) || "var(--cms-muted)";
833
+ const inactiveColor = uiUnwrap(props.colorInactive ?? props.colorOff ?? props.color) || "var(--jss-muted)";
834
834
  if (hovered) return hoveredColor;
835
835
  if (state === "full") return selectedColor;
836
836
  if (state === "half") return halfColor;
@@ -873,9 +873,9 @@
873
873
  items = [];
874
874
  clearHost(control);
875
875
  for (let index = 1; index <= max; index++) {
876
- const iconHost = _.span({ class: "cms-rating-item-icon" });
876
+ const iconHost = _.span({ class: "jss-rating-item-icon" });
877
877
  const item = _.span({
878
- class: "cms-rating-item",
878
+ class: "jss-rating-item",
879
879
  role: "radio",
880
880
  tabIndex: -1,
881
881
  onMousemove: (e) => {
@@ -952,7 +952,7 @@
952
952
  setValue: (next) => setRatingValue(next, null, { emit: false })
953
953
  };
954
954
  item.className = uiClassStatic([
955
- "cms-rating-item",
955
+ "jss-rating-item",
956
956
  `is-${state}`,
957
957
  uiWhen(hovered, "is-hovered")
958
958
  ]);
@@ -1179,7 +1179,7 @@
1179
1179
  };
1180
1180
  const section = _.div({
1181
1181
  class: uiClass([
1182
- "cms-time-section",
1182
+ "jss-time-section",
1183
1183
  uiWhen(embedded, "is-embedded"),
1184
1184
  uiWhen(withSeconds, "has-seconds"),
1185
1185
  className
@@ -1187,7 +1187,7 @@
1187
1187
  });
1188
1188
  const shortcutList = uiUnwrap(shortcuts) || [];
1189
1189
  if (Array.isArray(shortcutList) && shortcutList.length) {
1190
- const shortcutWrap = _.div({ class: "cms-time-shortcuts" });
1190
+ const shortcutWrap = _.div({ class: "jss-time-shortcuts" });
1191
1191
  shortcutList.forEach((item, index) => {
1192
1192
  if (!item) return;
1193
1193
  const rawValue = typeof item.value === "function"
@@ -1204,17 +1204,17 @@
1204
1204
  const labelNode = renderNamedSlot("shortcut", ctx, item.label ?? item.text ?? ctx.displayValue);
1205
1205
  shortcutWrap.appendChild(_.button({
1206
1206
  type: "button",
1207
- class: uiClass(["cms-time-shortcut", uiWhen(!!selectedParts && uiCompareTimeValue(normalizedValue, selectedParts) === 0, "is-selected")]),
1207
+ class: uiClass(["jss-time-shortcut", uiWhen(!!selectedParts && uiCompareTimeValue(normalizedValue, selectedParts) === 0, "is-selected")]),
1208
1208
  disabled: disabled || readonly,
1209
1209
  onClick: () => onSelect?.(normalizedValue, { shortcut: item, index })
1210
1210
  }, ...renderSlotToArray(null, "default", ctx, labelNode)));
1211
1211
  });
1212
1212
  if (shortcutWrap.childNodes.length) section.appendChild(shortcutWrap);
1213
1213
  }
1214
- const columns = _.div({ class: "cms-time-columns" });
1214
+ const columns = _.div({ class: "jss-time-columns" });
1215
1215
  const createColumn = (title, part, values) => {
1216
- const column = _.div({ class: "cms-time-column", "data-time-part": part });
1217
- const optionsWrap = _.div({ class: "cms-time-options" });
1216
+ const column = _.div({ class: "jss-time-column", "data-time-part": part });
1217
+ const optionsWrap = _.div({ class: "jss-time-options" });
1218
1218
  values.forEach((optionValue) => {
1219
1219
  const requested = makeRequestedValue(part, optionValue);
1220
1220
  const normalized = uiConstrainTimeParts(requested, { withSeconds, min: props.min, max: props.max });
@@ -1233,12 +1233,12 @@
1233
1233
  const pointNodes = selected ? renderPointNodes(ctx) : [];
1234
1234
  optionsWrap.appendChild(_.button({
1235
1235
  type: "button",
1236
- class: uiClass(["cms-time-option", uiWhen(selected, "is-selected"), uiWhen(optionDisabled, "is-disabled")]),
1236
+ class: uiClass(["jss-time-option", uiWhen(selected, "is-selected"), uiWhen(optionDisabled, "is-disabled")]),
1237
1237
  disabled: optionDisabled,
1238
1238
  onClick: () => onSelect?.(normalized, { part, optionValue })
1239
1239
  },
1240
- _.span({ class: "cms-time-option-label" }, ...renderSlotToArray(null, "default", ctx, optionNode)),
1241
- pointNodes.length ? _.span({ class: "cms-time-option-point" }, ...pointNodes) : null
1240
+ _.span({ class: "jss-time-option-label" }, ...renderSlotToArray(null, "default", ctx, optionNode)),
1241
+ pointNodes.length ? _.span({ class: "jss-time-option-point" }, ...pointNodes) : null
1242
1242
  ));
1243
1243
  });
1244
1244
  column.appendChild(optionsWrap);
@@ -1256,7 +1256,7 @@
1256
1256
  const uiCaptureTimeColumnScrollState = (root) => {
1257
1257
  if (!root) return null;
1258
1258
  const state = {};
1259
- root.querySelectorAll(".cms-time-column").forEach((column, index) => {
1259
+ root.querySelectorAll(".jss-time-column").forEach((column, index) => {
1260
1260
  const key = column.getAttribute("data-time-part") || String(index);
1261
1261
  state[key] = column.scrollTop;
1262
1262
  });
@@ -1267,11 +1267,11 @@
1267
1267
  if (!root) return;
1268
1268
  const scrollState = options.scrollState || null;
1269
1269
  const behavior = options.behavior ?? "smooth";
1270
- root.querySelectorAll(".cms-time-column").forEach((column, index) => {
1270
+ root.querySelectorAll(".jss-time-column").forEach((column, index) => {
1271
1271
  const key = column.getAttribute("data-time-part") || String(index);
1272
1272
  const previousTop = scrollState && Number.isFinite(scrollState[key]) ? scrollState[key] : null;
1273
1273
  if (previousTop != null) column.scrollTop = previousTop;
1274
- const selectedOption = column.querySelector(".cms-time-option.is-selected");
1274
+ const selectedOption = column.querySelector(".jss-time-option.is-selected");
1275
1275
  if (!selectedOption) return;
1276
1276
  const maxTop = Math.max(0, column.scrollHeight - column.clientHeight);
1277
1277
  const targetTop = selectedOption.offsetTop - ((column.clientHeight - selectedOption.offsetHeight) / 2);
@@ -1294,7 +1294,7 @@
1294
1294
  const slots = props.slots || {};
1295
1295
  const sizeValue = uiComputed(props.size, () => {
1296
1296
  const value = String(uiUnwrap(props.size) || "").toLowerCase();
1297
- return ["xs", "sm", "md", "lg", "xl"].includes(value) ? `cms-size-${value}` : "";
1297
+ return ["xs", "sm", "md", "lg", "xl"].includes(value) ? `jss-size-${value}` : "";
1298
1298
  });
1299
1299
  const requestedMode = String(
1300
1300
  uiUnwrap(
@@ -1712,7 +1712,7 @@
1712
1712
  : (mode === "multiple" ? "Seleziona date" : "Seleziona data"));
1713
1713
 
1714
1714
  const displayInput = isCalendar ? null : _.input({
1715
- class: uiClass(["cms-input", "cms-date-display", sizeValue, uiWhen(props.manualInput, "is-manual"), props.inputClass]),
1715
+ class: uiClass(["jss-input", "jss-date-display", sizeValue, uiWhen(props.manualInput, "is-manual"), props.inputClass]),
1716
1716
  type: "text",
1717
1717
  autocomplete: "off",
1718
1718
  placeholder: hasFloatingLabel ? "" : (props.placeholder ?? defaultPlaceholder),
@@ -1721,7 +1721,7 @@
1721
1721
  value: formatDisplayValue(localValue, localTimeValue)
1722
1722
  });
1723
1723
  const hiddenHost = _.div({ style: { display: "contents" } });
1724
- const controlNode = isCalendar ? null : _.div({ class: "cms-date-control", style: { display: "contents" } }, displayInput, hiddenHost);
1724
+ const controlNode = isCalendar ? null : _.div({ class: "jss-date-control", style: { display: "contents" } }, displayInput, hiddenHost);
1725
1725
 
1726
1726
  const field = isCalendar ? null : UI.FormField({
1727
1727
  ...fieldProps,
@@ -2054,14 +2054,14 @@
2054
2054
  const start = new Date(year, month, 1);
2055
2055
  const offset = (start.getDay() - getFirstDayOfWeek() + 7) % 7;
2056
2056
  const gridStart = new Date(year, month, 1 - offset);
2057
- const monthBox = _.div({ class: "cms-date-month" });
2058
- monthBox.appendChild(_.div({ class: "cms-date-month-title" }, monthLabelFormatter.format(start)));
2057
+ const monthBox = _.div({ class: "jss-date-month" });
2058
+ monthBox.appendChild(_.div({ class: "jss-date-month-title" }, monthLabelFormatter.format(start)));
2059
2059
 
2060
- const weekdays = _.div({ class: "cms-date-weekdays" });
2061
- titleDates.forEach((label) => weekdays.appendChild(_.div({ class: "cms-date-weekday" }, label)));
2060
+ const weekdays = _.div({ class: "jss-date-weekdays" });
2061
+ titleDates.forEach((label) => weekdays.appendChild(_.div({ class: "jss-date-weekday" }, label)));
2062
2062
  monthBox.appendChild(weekdays);
2063
2063
 
2064
- const grid = _.div({ class: "cms-date-grid" });
2064
+ const grid = _.div({ class: "jss-date-grid" });
2065
2065
  for (let index = 0; index < 42; index += 1) {
2066
2066
  const date = new Date(gridStart.getFullYear(), gridStart.getMonth(), gridStart.getDate() + index);
2067
2067
  const iso = toIsoDate(date);
@@ -2088,7 +2088,7 @@
2088
2088
  const dayBtn = _.button({
2089
2089
  type: "button",
2090
2090
  class: uiClass([
2091
- "cms-date-day",
2091
+ "jss-date-day",
2092
2092
  uiWhen(!inMonth, "is-outside"),
2093
2093
  uiWhen(selected, "is-selected"),
2094
2094
  uiWhen(inRange, "is-in-range"),
@@ -2116,8 +2116,8 @@
2116
2116
  onMouseEnter: () => updateRangeHover(iso),
2117
2117
  onFocus: () => updateRangeHover(iso, { render: false })
2118
2118
  },
2119
- _.span({ class: "cms-date-day-label" }, ...labelNodes),
2120
- pointNodes.length ? _.span({ class: "cms-date-day-point" }, ...pointNodes) : null
2119
+ _.span({ class: "jss-date-day-label" }, ...labelNodes),
2120
+ pointNodes.length ? _.span({ class: "jss-date-day-point" }, ...pointNodes) : null
2121
2121
  );
2122
2122
  grid.appendChild(dayBtn);
2123
2123
  }
@@ -2151,7 +2151,7 @@
2151
2151
  const yearStart = Number(uiUnwrap(props.yearStart ?? (min ? fromIsoDate(min)?.getFullYear() : null) ?? inferredYearStart));
2152
2152
  const yearEnd = Number(uiUnwrap(props.yearEnd ?? (max ? fromIsoDate(max)?.getFullYear() : null) ?? inferredYearEnd));
2153
2153
  const monthSelect = _.select({
2154
- class: "cms-date-select",
2154
+ class: "jss-date-select",
2155
2155
  value: String(viewMonth.getMonth()),
2156
2156
  onChange: (event) => {
2157
2157
  viewMonth = new Date(viewMonth.getFullYear(), Number(event.currentTarget.value), 1);
@@ -2162,7 +2162,7 @@
2162
2162
  ...Array.from({ length: 12 }, (_, index) => uiOptionNode({ value: String(index) }, new Intl.DateTimeFormat(locale, { month: "long" }).format(new Date(2024, index, 1))))
2163
2163
  );
2164
2164
  const yearSelect = _.select({
2165
- class: "cms-date-select cms-date-select-year",
2165
+ class: "jss-date-select jss-date-select-year",
2166
2166
  value: String(viewMonth.getFullYear()),
2167
2167
  onChange: (event) => {
2168
2168
  viewMonth = new Date(Number(event.currentTarget.value), viewMonth.getMonth(), 1);
@@ -2176,20 +2176,20 @@
2176
2176
  })
2177
2177
  );
2178
2178
 
2179
- const header = _.div({ class: "cms-date-header" },
2179
+ const header = _.div({ class: "jss-date-header" },
2180
2180
  _.button({
2181
2181
  type: "button",
2182
- class: "cms-date-nav",
2182
+ class: "jss-date-nav",
2183
2183
  onClick: () => {
2184
2184
  viewMonth = shiftMonths(viewMonth, -1);
2185
2185
  props.onNavigate?.({ month: viewMonth.getMonth() + 1, year: viewMonth.getFullYear() });
2186
2186
  renderPanel();
2187
2187
  }
2188
2188
  }, UI.Icon({ name: "chevron_left", size: 16 })),
2189
- _.div({ class: "cms-date-header-center" }, monthSelect, yearSelect),
2189
+ _.div({ class: "jss-date-header-center" }, monthSelect, yearSelect),
2190
2190
  _.button({
2191
2191
  type: "button",
2192
- class: "cms-date-nav",
2192
+ class: "jss-date-nav",
2193
2193
  onClick: () => {
2194
2194
  viewMonth = shiftMonths(viewMonth, 1);
2195
2195
  props.onNavigate?.({ month: viewMonth.getMonth() + 1, year: viewMonth.getFullYear() });
@@ -2198,7 +2198,7 @@
2198
2198
  }, UI.Icon({ name: "chevron_right", size: 16 }))
2199
2199
  );
2200
2200
 
2201
- const shortcuts = _.div({ class: "cms-date-shortcuts" });
2201
+ const shortcuts = _.div({ class: "jss-date-shortcuts" });
2202
2202
  const shortcutList = uiUnwrap(props.shortcuts ?? props.presets) || [];
2203
2203
  shortcutList.forEach((item, index) => {
2204
2204
  if (!item) return;
@@ -2206,17 +2206,17 @@
2206
2206
  const label = item.label ?? item.text ?? `Preset ${index + 1}`;
2207
2207
  shortcuts.appendChild(_.button({
2208
2208
  type: "button",
2209
- class: "cms-date-shortcut",
2209
+ class: "jss-date-shortcut",
2210
2210
  onClick: () => setWorkingOrCommit(rawValue, null, { preserveTime: isTimeEnabled(), timeValue: getCurrentTimeValue() })
2211
2211
  }, label));
2212
2212
  });
2213
2213
 
2214
- const months = _.div({ class: "cms-date-months" });
2214
+ const months = _.div({ class: "jss-date-months" });
2215
2215
  for (let index = 0; index < getMonthsToShow(); index += 1) {
2216
2216
  months.appendChild(renderMonth(shiftMonths(viewMonth, index), index));
2217
2217
  }
2218
2218
  const footerDisplayValue = formatDisplayValue(pickerValue, getCurrentTimeValue());
2219
- const footerValue = _.div({ class: "cms-date-value" },
2219
+ const footerValue = _.div({ class: "jss-date-value" },
2220
2220
  ...renderSlotToArray(
2221
2221
  slots,
2222
2222
  "value",
@@ -2224,10 +2224,10 @@
2224
2224
  footerDisplayValue || renderSlotToArray(slots, "default", {}, children)
2225
2225
  )
2226
2226
  );
2227
- const headerTime = _.div({ class: "cms-time-header" });
2228
- const columnsTime = _.div({ class: "cms-time-columns-2" },
2229
- _.div({ class: "cms-time-column-title" }, uiUnwrap(props.hoursLabel) || "Ore"),
2230
- _.div({ class: "cms-time-column-title" }, uiUnwrap(props.minutesLabel) || "Min")
2227
+ const headerTime = _.div({ class: "jss-time-header" });
2228
+ const columnsTime = _.div({ class: "jss-time-columns-2" },
2229
+ _.div({ class: "jss-time-column-title" }, uiUnwrap(props.hoursLabel) || "Ore"),
2230
+ _.div({ class: "jss-time-column-title" }, uiUnwrap(props.minutesLabel) || "Min")
2231
2231
  );
2232
2232
  headerTime.appendChild(columnsTime);
2233
2233
  const bodyTime = isTimeEnabled()
@@ -2258,30 +2258,30 @@
2258
2258
  }
2259
2259
  })
2260
2260
  : null;
2261
- const footerInfo = _.div({ class: "cms-date-footer-info" },
2261
+ const footerInfo = _.div({ class: "jss-date-footer-info" },
2262
2262
  footerValue
2263
2263
  );
2264
2264
 
2265
- const footer = _.div({ class: uiClass(["cms-date-footer", uiWhen(isTimeEnabled(), "has-time")]) },
2265
+ const footer = _.div({ class: uiClass(["jss-date-footer", uiWhen(isTimeEnabled(), "has-time")]) },
2266
2266
  footerInfo,
2267
- _.div({ class: "cms-date-actions" },
2268
- _.button({ type: "button", class: "cms-date-action", onClick: jumpToToday }, uiUnwrap(props.todayLabel) || "Oggi"),
2267
+ _.div({ class: "jss-date-actions" },
2268
+ _.button({ type: "button", class: "jss-date-action", onClick: jumpToToday }, uiUnwrap(props.todayLabel) || "Oggi"),
2269
2269
  uiUnwrap(props.clearable) !== false
2270
- ? _.button({ type: "button", class: "cms-date-action", onClick: clearValue }, uiUnwrap(props.clearLabel) || "Reset")
2270
+ ? _.button({ type: "button", class: "jss-date-action", onClick: clearValue }, uiUnwrap(props.clearLabel) || "Reset")
2271
2271
  : null,
2272
2272
  uiUnwrap(props.confirm)
2273
- ? _.button({ type: "button", class: "cms-date-action is-primary", onClick: applyWorkingValue }, uiUnwrap(props.applyLabel) || "Applica")
2273
+ ? _.button({ type: "button", class: "jss-date-action is-primary", onClick: applyWorkingValue }, uiUnwrap(props.applyLabel) || "Applica")
2274
2274
  : null
2275
2275
  )
2276
2276
  );
2277
2277
 
2278
- const footerTimer = _.div(_.button({ type: "button", class: "cms-date-action cms-w-lg", onClick: jumpToNow }, uiUnwrap(props.nowLabel) || "Ora"));
2278
+ const footerTimer = _.div(_.button({ type: "button", class: "jss-date-action jss-w-lg", onClick: jumpToNow }, uiUnwrap(props.nowLabel) || "Ora"));
2279
2279
 
2280
- const contentTimer = isTimeEnabled() ? _.div({ class: "cms-date-time" }, headerTime, bodyTime, footerTimer) : null;
2280
+ const contentTimer = isTimeEnabled() ? _.div({ class: "jss-date-time" }, headerTime, bodyTime, footerTimer) : null;
2281
2281
 
2282
2282
  panelRoot.replaceChildren(
2283
2283
  _.div({
2284
- class: "cms-date-panel-root",
2284
+ class: "jss-date-panel-root",
2285
2285
  onKeydown: (event) => {
2286
2286
  if (event.key === "Escape") {
2287
2287
  event.preventDefault();
@@ -2292,7 +2292,7 @@
2292
2292
  },
2293
2293
  header,
2294
2294
  shortcutList.length ? shortcuts : null,
2295
- _.div({ class: 'cms-data-time' }, months, contentTimer),
2295
+ _.div({ class: 'jss-data-time' }, months, contentTimer),
2296
2296
  footer
2297
2297
  )
2298
2298
  );
@@ -2308,7 +2308,7 @@
2308
2308
  entry = JSswift.overlay.open(({ close }) => {
2309
2309
  const fallback = (mode === "range" || mode === "range-multiple") ? 2 : 1;
2310
2310
  const raw = Number(uiUnwrap(props.monthsToShow) ?? fallback);
2311
- panelRoot = _.div({ class: uiClassStatic(["cms-date-panel", uiUnwrap(sizeValue), uiWhen(raw > 1, "multi-month"), props.panelClass]) });
2311
+ panelRoot = _.div({ class: uiClassStatic(["jss-date-panel", uiUnwrap(sizeValue), uiWhen(raw > 1, "multi-month"), props.panelClass]) });
2312
2312
  renderPanel();
2313
2313
  return panelRoot;
2314
2314
  }, {
@@ -2324,7 +2324,7 @@
2324
2324
  closeOnBackdrop: false,
2325
2325
  closeOnEsc: true,
2326
2326
  autoFocus: false,
2327
- className: uiClassStatic(["cms-date-overlay", props.panelClass, uiWhen(isTimeEnabled(), "has-time")]),
2327
+ className: uiClassStatic(["jss-date-overlay", props.panelClass, uiWhen(isTimeEnabled(), "has-time")]),
2328
2328
  onClose: () => {
2329
2329
  entry = null;
2330
2330
  panelRoot = null;
@@ -2352,8 +2352,8 @@
2352
2352
  const raw = Number(uiUnwrap(props.monthsToShow) ?? fallback);
2353
2353
  panelRoot = _.div({
2354
2354
  class: uiClassStatic([
2355
- "cms-date-panel",
2356
- "cms-date-calendar",
2355
+ "jss-date-panel",
2356
+ "jss-date-calendar",
2357
2357
  uiUnwrap(sizeValue),
2358
2358
  uiWhen(raw > 1, "multi-month"),
2359
2359
  props.panelClass,
@@ -2476,7 +2476,7 @@
2476
2476
  const slots = props.slots || {};
2477
2477
  const sizeValue = uiComputed(props.size, () => {
2478
2478
  const value = String(uiUnwrap(props.size) || "").toLowerCase();
2479
- return ["xs", "sm", "md", "lg", "xl"].includes(value) ? `cms-size-${value}` : "";
2479
+ return ["xs", "sm", "md", "lg", "xl"].includes(value) ? `jss-size-${value}` : "";
2480
2480
  });
2481
2481
  const getTimeOptions = () => {
2482
2482
  const detectedTime = uiExportTimeValue(
@@ -2518,7 +2518,7 @@
2518
2518
  const hasFloatingLabel = fieldProps.label != null || JSswift.ui.getSlot(slots, "label") != null;
2519
2519
 
2520
2520
  const displayInput = _.input({
2521
- class: uiClass(["cms-input", "cms-time-display", sizeValue, uiWhen(props.manualInput, "is-manual"), props.inputClass]),
2521
+ class: uiClass(["jss-input", "jss-time-display", sizeValue, uiWhen(props.manualInput, "is-manual"), props.inputClass]),
2522
2522
  type: "text",
2523
2523
  autocomplete: "off",
2524
2524
  placeholder: hasFloatingLabel ? "" : (props.placeholder ?? "Seleziona orario"),
@@ -2528,7 +2528,7 @@
2528
2528
  });
2529
2529
  displayInput.setAttribute("aria-haspopup", "dialog");
2530
2530
  const hiddenHost = _.div({ style: { display: "contents" } });
2531
- const controlNode = _.div({ class: "cms-time-control", style: { display: "contents" } }, displayInput, hiddenHost);
2531
+ const controlNode = _.div({ class: "jss-time-control", style: { display: "contents" } }, displayInput, hiddenHost);
2532
2532
 
2533
2533
  const field = UI.FormField({
2534
2534
  ...fieldProps,
@@ -2604,14 +2604,14 @@
2604
2604
  if (!panelRoot) return;
2605
2605
  const currentValue = getCurrentValue();
2606
2606
  const footerDisplayValue = formatDisplayValue(currentValue);
2607
- const header = _.div({ class: "cms-time-header" });
2608
- const columns = _.div({ class: "cms-time-columns" },
2609
- _.div({ class: "cms-time-column-title" }, uiUnwrap(props.hoursLabel) || "Ore"),
2610
- _.div({ class: "cms-time-column-title" }, uiUnwrap(props.minutesLabel) || "Min")
2607
+ const header = _.div({ class: "jss-time-header" });
2608
+ const columns = _.div({ class: "jss-time-columns" },
2609
+ _.div({ class: "jss-time-column-title" }, uiUnwrap(props.hoursLabel) || "Ore"),
2610
+ _.div({ class: "jss-time-column-title" }, uiUnwrap(props.minutesLabel) || "Min")
2611
2611
  );
2612
2612
  const withSeconds = getTimeOptions().withSeconds;
2613
2613
  if (withSeconds) {
2614
- columns.appendChild(_.div({ class: "cms-time-column-title" }, uiUnwrap(props.secondsLabel) || "Sec"));
2614
+ columns.appendChild(_.div({ class: "jss-time-column-title" }, uiUnwrap(props.secondsLabel) || "Sec"));
2615
2615
  }
2616
2616
  header.appendChild(columns);
2617
2617
  const body = uiCreateTimePickerSection({
@@ -2639,8 +2639,8 @@
2639
2639
  if (shouldCloseOnSelect(meta)) closePanel();
2640
2640
  }
2641
2641
  });
2642
- const footer = _.div({ class: "cms-time-footer" },
2643
- _.div({ class: "cms-time-value" },
2642
+ const footer = _.div({ class: "jss-time-footer" },
2643
+ _.div({ class: "jss-time-value" },
2644
2644
  ...renderSlotToArray(
2645
2645
  slots,
2646
2646
  "value",
@@ -2648,18 +2648,18 @@
2648
2648
  footerDisplayValue || renderSlotToArray(slots, "default", {}, children)
2649
2649
  )
2650
2650
  ),
2651
- _.div({ class: "cms-time-actions" },
2652
- _.button({ type: "button", class: "cms-time-action", onClick: jumpToNow }, uiUnwrap(props.nowLabel) || "Ora"),
2651
+ _.div({ class: "jss-time-actions" },
2652
+ _.button({ type: "button", class: "jss-time-action", onClick: jumpToNow }, uiUnwrap(props.nowLabel) || "Ora"),
2653
2653
  uiUnwrap(props.clearable) !== false
2654
- ? _.button({ type: "button", class: "cms-time-action", onClick: () => setTimeState(null, null, { commit: !uiUnwrap(props.confirm) }) }, uiUnwrap(props.clearLabel) || "Reset")
2654
+ ? _.button({ type: "button", class: "jss-time-action", onClick: () => setTimeState(null, null, { commit: !uiUnwrap(props.confirm) }) }, uiUnwrap(props.clearLabel) || "Reset")
2655
2655
  : null,
2656
2656
  uiUnwrap(props.confirm)
2657
- ? _.button({ type: "button", class: "cms-time-action is-primary", onClick: applyWorkingValue }, uiUnwrap(props.applyLabel) || "Applica")
2657
+ ? _.button({ type: "button", class: "jss-time-action is-primary", onClick: applyWorkingValue }, uiUnwrap(props.applyLabel) || "Applica")
2658
2658
  : null
2659
2659
  )
2660
2660
  );
2661
2661
  panelRoot.replaceChildren(_.div({
2662
- class: "cms-time-panel-root",
2662
+ class: "jss-time-panel-root",
2663
2663
  onKeydown: (event) => {
2664
2664
  if (event.key === "Escape") {
2665
2665
  event.preventDefault();
@@ -2673,7 +2673,7 @@
2673
2673
  if (entry || uiUnwrap(props.disabled) || uiUnwrap(props.readonly)) return entry;
2674
2674
  workingValue = uiCloneTimeParts(localValue);
2675
2675
  entry = JSswift.overlay.open(() => {
2676
- panelRoot = _.div({ class: uiClassStatic(["cms-time-panel", uiUnwrap(sizeValue), props.panelClass]) });
2676
+ panelRoot = _.div({ class: uiClassStatic(["jss-time-panel", uiUnwrap(sizeValue), props.panelClass]) });
2677
2677
  renderPanel();
2678
2678
  return panelRoot;
2679
2679
  }, {
@@ -2689,7 +2689,7 @@
2689
2689
  closeOnBackdrop: false,
2690
2690
  closeOnEsc: true,
2691
2691
  autoFocus: false,
2692
- className: uiClassStatic(["cms-time-overlay", props.panelClass]),
2692
+ className: uiClassStatic(["jss-time-overlay", props.panelClass]),
2693
2693
  onClose: () => {
2694
2694
  entry = null;
2695
2695
  panelRoot = null;