@unoff/ui 1.21.0 → 1.21.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 (112) hide show
  1. package/dist/assets/Card.css +1 -1
  2. package/dist/assets/Layout.css +1 -1
  3. package/dist/assets/MultipleSlider.css +1 -1
  4. package/dist/assets/Popin.css +1 -1
  5. package/dist/assets/SimpleSlider.css +1 -1
  6. package/dist/assets/styles/icons/icons.css +1 -1
  7. package/dist/assets/styles/icons/styles/figma.css +1 -1
  8. package/dist/components/actions/accordion/Accordion.d.ts.map +1 -1
  9. package/dist/components/actions/accordion/Accordion.js +6 -6
  10. package/dist/components/actions/accordion/Accordion.js.map +1 -1
  11. package/dist/components/actions/button/Button.d.ts.map +1 -1
  12. package/dist/components/actions/button/Button.figma.js +1 -1
  13. package/dist/components/actions/button/Button.js +87 -88
  14. package/dist/components/actions/button/Button.js.map +1 -1
  15. package/dist/components/actions/card/Card.d.ts.map +1 -1
  16. package/dist/components/actions/card/Card.js +1 -1
  17. package/dist/components/actions/card/Card.js.map +1 -1
  18. package/dist/components/actions/knob/Knob.js +1 -1
  19. package/dist/components/actions/knob/Knob.js.map +1 -1
  20. package/dist/components/actions/menu/Menu.js +4 -4
  21. package/dist/components/actions/menu/Menu.js.map +1 -1
  22. package/dist/components/assets/avatar/Avatar.js +6 -6
  23. package/dist/components/assets/avatar/Avatar.js.map +1 -1
  24. package/dist/components/assets/icon/Icon.figma.js +1 -1
  25. package/dist/components/assets/icon/Icon.js +6 -6
  26. package/dist/components/assets/icon/Icon.js.map +1 -1
  27. package/dist/components/assets/section-title/SectionTitle.js +1 -1
  28. package/dist/components/assets/section-title/SectionTitle.js.map +1 -1
  29. package/dist/components/assets/text/Text.js +1 -1
  30. package/dist/components/assets/text/Text.js.map +1 -1
  31. package/dist/components/dialogs/consent/Consent.js +1 -1
  32. package/dist/components/dialogs/consent/Consent.js.map +1 -1
  33. package/dist/components/dialogs/dialog/Dialog.d.ts.map +1 -1
  34. package/dist/components/dialogs/dialog/Dialog.js +4 -4
  35. package/dist/components/dialogs/dialog/Dialog.js.map +1 -1
  36. package/dist/components/dialogs/message/Message.js +1 -1
  37. package/dist/components/dialogs/message/Message.js.map +1 -1
  38. package/dist/components/dialogs/notification/Notification.js +4 -4
  39. package/dist/components/dialogs/notification/Notification.js.map +1 -1
  40. package/dist/components/dialogs/semantic-message/SemanticMessage.d.ts.map +1 -1
  41. package/dist/components/dialogs/semantic-message/SemanticMessage.js +1 -1
  42. package/dist/components/dialogs/semantic-message/SemanticMessage.js.map +1 -1
  43. package/dist/components/inputs/dropdown/Dropdown.figma.js +1 -1
  44. package/dist/components/inputs/dropdown/Dropdown.js +1 -1
  45. package/dist/components/inputs/dropdown/Dropdown.js.map +1 -1
  46. package/dist/components/inputs/dropzone/Dropzone.js +4 -4
  47. package/dist/components/inputs/dropzone/Dropzone.js.map +1 -1
  48. package/dist/components/inputs/input/Input.figma.js +1 -1
  49. package/dist/components/inputs/input/Input.js +1 -1
  50. package/dist/components/inputs/input/Input.js.map +1 -1
  51. package/dist/components/inputs/inputs-bar/InputsBar.js +4 -4
  52. package/dist/components/inputs/inputs-bar/InputsBar.js.map +1 -1
  53. package/dist/components/inputs/multiple-slider/MultipleSlider.d.ts +4 -4
  54. package/dist/components/inputs/multiple-slider/MultipleSlider.d.ts.map +1 -1
  55. package/dist/components/inputs/multiple-slider/MultipleSlider.js +174 -155
  56. package/dist/components/inputs/multiple-slider/MultipleSlider.js.map +1 -1
  57. package/dist/components/inputs/multiple-slider/actions/shiftLeftStop.d.ts +1 -1
  58. package/dist/components/inputs/multiple-slider/actions/shiftLeftStop.d.ts.map +1 -1
  59. package/dist/components/inputs/multiple-slider/actions/shiftRightStop.d.ts +1 -1
  60. package/dist/components/inputs/multiple-slider/actions/shiftRightStop.d.ts.map +1 -1
  61. package/dist/components/inputs/select/Select.js +1 -1
  62. package/dist/components/inputs/select/Select.js.map +1 -1
  63. package/dist/components/inputs/simple-slider/SimpleSlider.d.ts +1 -1
  64. package/dist/components/inputs/simple-slider/SimpleSlider.d.ts.map +1 -1
  65. package/dist/components/inputs/simple-slider/SimpleSlider.js +78 -69
  66. package/dist/components/inputs/simple-slider/SimpleSlider.js.map +1 -1
  67. package/dist/components/lists/actions-item/ActionsItem.js +1 -1
  68. package/dist/components/lists/actions-item/ActionsItem.js.map +1 -1
  69. package/dist/components/lists/actions-list/ActionsList.d.ts.map +1 -1
  70. package/dist/components/lists/actions-list/ActionsList.js +1 -1
  71. package/dist/components/lists/actions-list/ActionsList.js.map +1 -1
  72. package/dist/components/lists/color-item/ColorItem.js +1 -1
  73. package/dist/components/lists/color-item/ColorItem.js.map +1 -1
  74. package/dist/components/lists/draggable-item/DraggableItem.js +6 -6
  75. package/dist/components/lists/draggable-item/DraggableItem.js.map +1 -1
  76. package/dist/components/lists/keyboard-shortcut-item/KeyboardShortcutItem.js +1 -1
  77. package/dist/components/lists/keyboard-shortcut-item/KeyboardShortcutItem.js.map +1 -1
  78. package/dist/components/lists/sortable-list/SortableList.js.map +1 -1
  79. package/dist/components/lists/tabs/Tabs.d.ts.map +1 -1
  80. package/dist/components/lists/tabs/Tabs.figma.js +1 -1
  81. package/dist/components/lists/tabs/Tabs.js +1 -1
  82. package/dist/components/lists/tabs/Tabs.js.map +1 -1
  83. package/dist/components/slots/bar/Bar.js.map +1 -1
  84. package/dist/components/slots/draggable-window/DraggableWindow.d.ts.map +1 -1
  85. package/dist/components/slots/draggable-window/DraggableWindow.js +6 -6
  86. package/dist/components/slots/draggable-window/DraggableWindow.js.map +1 -1
  87. package/dist/components/slots/drawer/Drawer.js.map +1 -1
  88. package/dist/components/slots/form-item/FormItem.js +1 -1
  89. package/dist/components/slots/form-item/FormItem.js.map +1 -1
  90. package/dist/components/slots/layout/Layout.js.map +1 -1
  91. package/dist/components/slots/list/List.js +4 -4
  92. package/dist/components/slots/list/List.js.map +1 -1
  93. package/dist/components/slots/popin/Popin.js +1 -1
  94. package/dist/components/slots/popin/Popin.js.map +1 -1
  95. package/dist/components/slots/section/Section.js.map +1 -1
  96. package/dist/components/slots/simple-item/SimpleItem.js.map +1 -1
  97. package/dist/components/tags/chip/Chip.figma.js +1 -1
  98. package/dist/components/tags/chip/Chip.js +6 -6
  99. package/dist/components/tags/chip/Chip.js.map +1 -1
  100. package/dist/components/tags/color-chip/ColorChip.js.map +1 -1
  101. package/dist/components/tags/icon-chip/IconChip.d.ts.map +1 -1
  102. package/dist/components/tags/icon-chip/IconChip.js +4 -4
  103. package/dist/components/tags/icon-chip/IconChip.js.map +1 -1
  104. package/dist/components/tags/tooltip/Tooltip.js +1 -1
  105. package/dist/components/tags/tooltip/Tooltip.js.map +1 -1
  106. package/dist/do-classnames-DSDFCvzy.js.map +1 -1
  107. package/dist/do-map-2nhWP1KI.js.map +1 -1
  108. package/dist/index_react-BkjUklDQ.js +18392 -0
  109. package/dist/index_react-BkjUklDQ.js.map +1 -0
  110. package/package.json +3 -3
  111. package/dist/index_react-CmuCVQet.js +0 -13799
  112. package/dist/index_react-CmuCVQet.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"MultipleSlider.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/multiple-slider/MultipleSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAuB,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAMlE,OAAO,wBAAwB,CAAA;AAE/B,KAAK,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAA;AAEhE,UAAU,WAAW;IACnB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,YAAY,CAAA;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC7B;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAA;IAC1B;;OAEG;IACH,KAAK,EAAE;QACL,6BAA6B;QAC7B,IAAI,EAAE,KAAK,CA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K,CAAC,oBAAoB,CAAA;CACjE;AAED,UAAU,YAAY;IACpB,gBAAgB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IAChC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,YAAY,CAAC;IAC5E,MAAM,CAAC,YAAY;;;;;;;;;;;;;MAalB;gBAEW,KAAK,EAAE,WAAW;IAS9B,YAAY,WACF,MAAM,KAEV,gBAAgB,CAAC,gBAAgB,CAAC,GAClC,mBAAmB,CAAC,gBAAgB,CAAC,UAuB1C;IAGD,MAAM,MAAO,gBAAgB,CAAC,WAAW,CAAC,UAqDzC;IAED,OAAO,MACF,UAAU,UACL,WAAW,SACZ,WAAW,SACX,MAAM,WAAW,CAAC,QACnB,WAAW,SACV,MAAM,cACD,MAAM,UACV,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI,UA6DjC;IAED,SAAS,UACA,MAAM,WAAW,CAAC,QACnB,WAAW,UACT,CAAC,CAAC,EAAE,WAAW,KAAK,IAAI,UAqBjC;IAED,KAAK,MAAO,gBAAgB,CAAC,cAAc,CAAC,UAM3C;IAED,QAAQ,SAAU,WAAW,UAK5B;IAED,YAAY,SAAU,WAAW,UAAU,OAAO,UAAU,OAAO,UAiBlE;IAED,WAAW,SAAU,WAAW,UAAU,OAAO,UAAU,OAAO,UAiBjE;IAED,eAAe,SACP,MAAM,SACL,MAAM,SACN,MAAM,WAAW,CAAC,UAoC1B;IAED,SAAS,UAAW,MAAM,OAAO,WAAW,SAAS,MAAM,WAAW,CAAC,UAkCtE;IAGD,MAAM,4DAyBL;IAED,IAAI,gDA6DH;IAED,SAAS,gDAwER;IAGD,MAAM;CAWP"}
1
+ {"version":3,"file":"MultipleSlider.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/multiple-slider/MultipleSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM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YAAY,SAAU,WAAW,WAAW,OAAO,UAiBlD;IAED,WAAW,SAAU,WAAW,WAAW,OAAO,UAiBjD;IAED,eAAe,SACP,MAAM,SACL,MAAM,SACN,MAAM,WAAW,CAAC,UAoC1B;IAED,SAAS,UAAW,MAAM,OAAO,WAAW,SAAS,MAAM,WAAW,CAAC,UAkCtE;IAGD,MAAM,4DAyBL;IAED,IAAI,gDA6DH;IAED,SAAS,gDAwER;IAGD,MAAM;CAWP"}
@@ -1,19 +1,19 @@
1
1
  import '../../../assets/MultipleSlider.css';
2
- import { jsxs as S, jsx as m } from "react/jsx-runtime";
3
- import v from "react";
4
- import F from "../../tags/icon-chip/IconChip.js";
5
- import T from "../../tags/chip/Chip.js";
6
- import y from "../../actions/knob/Knob.js";
2
+ import { jsxs as I, jsx as g } from "react/jsx-runtime";
3
+ import T from "react";
7
4
  import { r as f } from "../../../do-map-2nhWP1KI.js";
8
- import { t as x } from "../../../do-classnames-DSDFCvzy.js";
9
- const E = (h, e, o, l = "LINEAR") => {
5
+ import { t as E } from "../../../do-classnames-DSDFCvzy.js";
6
+ import w from "../../tags/icon-chip/IconChip.js";
7
+ import D from "../../tags/chip/Chip.js";
8
+ import F from "../../actions/knob/Knob.js";
9
+ const M = (h, e, i, l = "LINEAR") => {
10
10
  let t = 1;
11
11
  const p = {};
12
12
  return h.map((r) => {
13
- p[r] = l !== "NONE" ? parseFloat(f(w(l, t), 0, 1, e, o).toFixed(1)) : r, t -= 1 / (h.length - 1), t < 0.01 && (t = 0);
13
+ p[r] = l !== "NONE" ? parseFloat(f(A(l, t), 0, 1, e, i).toFixed(1)) : r, t -= 1 / (h.length - 1), t < 0.01 && (t = 0);
14
14
  }), p;
15
- }, w = (h, e) => {
16
- var o;
15
+ }, A = (h, e) => {
16
+ var i;
17
17
  const l = {
18
18
  LINEAR: (t) => t,
19
19
  EASEIN_SINE: (t) => Math.pow(t, 1.2),
@@ -26,42 +26,42 @@ const E = (h, e, o, l = "LINEAR") => {
26
26
  EASEOUT_CUBIC: (t) => Math.sin(t * Math.PI / 2),
27
27
  EASEINOUT_CUBIC: (t) => -(Math.cos(Math.PI * t) - 1) / 2
28
28
  };
29
- return (o = l[h ?? "LINEAR"]) == null ? void 0 : o.call(l, e);
30
- }, D = (h, e, o, l, t, p) => {
31
- const r = [], a = o || l ? 0.1 : 1;
29
+ return (i = l[h ?? "LINEAR"]) == null ? void 0 : i.call(l, e);
30
+ }, _ = (h, e, i, l, t, p = 1) => {
31
+ const r = [], a = i ? p * 10 : p;
32
32
  Object.entries(h).sort((c, u) => c[1] - u[1]).forEach((c) => {
33
33
  r.push(c[0]);
34
34
  });
35
- const i = r.indexOf(
35
+ const n = r.indexOf(
36
36
  e.dataset.id
37
- ), n = h, s = n[r[i]];
38
- return s + a <= t ? n[r[i]] = t : s + a >= p ? n[r[i]] = p : n[r[i]] = n[r[i]] + a, {
39
- scale: n
37
+ ), o = h, s = o[r[n]];
38
+ return s + a <= l ? o[r[n]] = l : s + a >= t ? o[r[n]] = t : o[r[n]] = o[r[n]] + a, {
39
+ scale: o
40
40
  };
41
- }, A = (h, e, o, l, t, p) => {
42
- const r = [], a = o || l ? 0.1 : 1;
41
+ }, N = (h, e, i, l, t, p = 1) => {
42
+ const r = [], a = i ? p * 10 : p;
43
43
  Object.entries(h).sort((c, u) => c[1] - u[1]).forEach((c) => {
44
44
  r.push(c[0]);
45
45
  });
46
- const i = r.indexOf(
46
+ const n = r.indexOf(
47
47
  e.dataset.id
48
- ), n = h, s = n[r[i]];
49
- return s - a <= t ? n[r[i]] = t : s - a >= p ? n[r[i]] = p : n[r[i]] = n[r[i]] - a, {
50
- scale: n
48
+ ), o = h, s = o[r[n]];
49
+ return s - a <= l ? o[r[n]] = l : s - a >= t ? o[r[n]] = t : o[r[n]] = o[r[n]] - a, {
50
+ scale: o
51
51
  };
52
- }, _ = (h) => {
52
+ }, O = (h) => {
53
53
  const e = Math.floor(Math.abs(h)).toString().length;
54
54
  return Math.pow(10, e - 1);
55
- }, N = (h, e) => {
56
- const o = Object.entries(h).map(([a, i]) => ({
55
+ }, L = (h, e) => {
56
+ const i = Object.entries(h).map(([a, n]) => ({
57
57
  index: parseFloat(a),
58
- value: i
59
- })).filter((a) => a.index > 0), l = Math.min(...o.map((a) => a.index)), t = _(l), p = o.filter(
58
+ value: n
59
+ })).filter((a) => a.index > 0), l = Math.min(...i.map((a) => a.index)), t = O(l), p = i.filter(
60
60
  (a) => a.index !== parseFloat(e.dataset.id)
61
61
  ), r = p.reduce(
62
- (a, i, n) => {
63
- const s = Math.max(1, n + 1) * t;
64
- return a[s] = p[n].value, a;
62
+ (a, n, o) => {
63
+ const s = Math.max(1, o + 1) * t;
64
+ return a[s] = p[o].value, a;
65
65
  },
66
66
  {}
67
67
  );
@@ -71,32 +71,32 @@ const E = (h, e, o, l = "LINEAR") => {
71
71
  min: Math.min(...Object.values(r)),
72
72
  max: Math.max(...Object.values(r))
73
73
  };
74
- }, K = (h) => {
74
+ }, C = (h) => {
75
75
  const e = Math.floor(Math.abs(h)).toString().length;
76
76
  return Math.pow(10, e - 1);
77
- }, O = (h, e, o, l) => {
77
+ }, K = (h, e, i, l) => {
78
78
  const t = Object.entries(e).map(([s, c]) => ({
79
79
  index: Math.max(1, parseFloat(s)),
80
80
  value: c
81
- })).filter((s) => s.index > 0), p = K(Math.min(...t.map((s) => s.index))), r = t[0].value > t[t.length - 1].value, a = h.target, i = parseFloat(
82
- f(h.layerX, 0, a.offsetWidth, o, l).toFixed(1)
81
+ })).filter((s) => s.index > 0), p = C(Math.min(...t.map((s) => s.index))), r = t[0].value > t[t.length - 1].value, a = h.target, n = parseFloat(
82
+ f(h.layerX, 0, a.offsetWidth, i, l).toFixed(1)
83
83
  );
84
84
  t.push({
85
85
  index: Math.max(...t.map((s) => s.index)) + p,
86
- value: i
86
+ value: n
87
87
  }), t.sort((s, c) => r ? c.value - s.value : s.value - c.value);
88
- const n = t.reduce(
88
+ const o = t.reduce(
89
89
  (s, c, u) => (s[(u + 1) * p] = c.value, s),
90
90
  {}
91
91
  );
92
92
  return {
93
- scale: n,
94
- stops: Object.keys(n).map((s) => parseFloat(s)),
95
- min: Math.min(...Object.values(n)),
96
- max: Math.max(...Object.values(n))
93
+ scale: o,
94
+ stops: Object.keys(o).map((s) => parseFloat(s)),
95
+ min: Math.min(...Object.values(o)),
96
+ max: Math.max(...Object.values(o))
97
97
  };
98
98
  };
99
- class B extends v.Component {
99
+ class H extends T.Component {
100
100
  static defaultProps = {
101
101
  scale: {},
102
102
  stops: {
@@ -118,13 +118,13 @@ class B extends v.Component {
118
118
  };
119
119
  }
120
120
  // Handlers
121
- validHandler = (e, o) => {
122
- const { scale: l, onChange: t, range: p } = this.props, r = p.step || 0.1, a = l ?? {}, i = o.target;
123
- if (i.value !== "") {
124
- let n = parseFloat(i.value);
125
- n = Math.round(n / r) * r, n > parseFloat(i.max) ? n = parseFloat(i.max) : n < parseFloat(i.min) && (n = parseFloat(i.min));
121
+ validHandler = (e, i) => {
122
+ const { scale: l, onChange: t, range: p } = this.props, r = p.step || 0.1, a = l ?? {}, n = i.target;
123
+ if (n.value !== "") {
124
+ let o = parseFloat(n.value);
125
+ o = Math.round(o / r) * r, o > parseFloat(n.max) ? o = parseFloat(n.max) : o < parseFloat(n.min) && (o = parseFloat(n.min));
126
126
  const s = r.toString().split(".")[1]?.length || 0;
127
- a[e] = parseFloat(n.toFixed(s)), t("TYPED", {
127
+ a[e] = parseFloat(o.toFixed(s)), t("TYPED", {
128
128
  scale: a
129
129
  });
130
130
  }
@@ -132,52 +132,51 @@ class B extends v.Component {
132
132
  // Direct Actions
133
133
  onGrab = (e) => {
134
134
  e.stopPropagation();
135
- const o = e.currentTarget, l = o.parentElement, t = e.clientX - e.currentTarget.getBoundingClientRect().left - e.currentTarget.getBoundingClientRect().width / 2, p = l.offsetWidth, r = l.parentElement, a = Array.from(l.children);
135
+ const i = e.currentTarget, l = i.parentElement, t = e.clientX - e.currentTarget.getBoundingClientRect().left - e.currentTarget.getBoundingClientRect().width / 2, p = l.getBoundingClientRect(), r = p.width, a = l.parentElement, n = Array.from(l.children);
136
136
  this.setState({
137
- activeKnobId: o.dataset.id || null
137
+ activeKnobId: i.dataset.id || null
138
138
  });
139
- const i = (n) => {
140
- const { range: s, onChange: c } = this.props, u = {};
141
- a.forEach(
142
- (d) => u[d.dataset.id] = parseFloat(
139
+ const o = (s) => {
140
+ const { range: c, onChange: u } = this.props, d = {};
141
+ n.forEach(
142
+ (m) => d[m.dataset.id] = parseFloat(
143
143
  f(
144
- parseFloat(d.style.left.replace("%", "")),
144
+ parseFloat(m.style.left.replace("%", "")),
145
145
  0,
146
146
  100,
147
- s.min,
148
- s.max
147
+ c.min,
148
+ c.max
149
149
  ).toFixed(1)
150
150
  )
151
- ), c(n, {
152
- scale: u
151
+ ), u(s, {
152
+ scale: d
153
153
  });
154
154
  };
155
- o.style.zIndex = "2", document.onmousemove = (n) => this.onSlide(
156
- n,
157
- r,
158
- l,
155
+ i.style.zIndex = "2", document.onmousemove = (s) => this.onSlide(
156
+ s,
159
157
  a,
160
- o,
158
+ l,
159
+ n,
160
+ i,
161
161
  t,
162
+ r,
162
163
  p,
163
- (s) => i(s)
164
- ), document.onmouseup = () => this.onRelease(a, o, (n) => i(n));
164
+ (c) => o(c)
165
+ ), document.onmouseup = () => this.onRelease(n, i, (s) => o(s));
165
166
  };
166
- onSlide = (e, o, l, t, p, r, a, i) => {
167
- const { min: n, max: s, step: c = 0.1 } = this.props.range, u = parseFloat(
168
- window.getComputedStyle(o, null).getPropertyValue("padding-left")
169
- );
170
- let d = e.clientX - o.offsetLeft - u - r;
167
+ onSlide = (e, i, l, t, p, r, a, n, o) => {
168
+ const { min: s, max: c, step: u = 0.1 } = this.props.range;
169
+ let d = e.clientX - n.left - r;
171
170
  if (d <= 0 ? d = 0 : d >= a && (d = a), p === l.firstChild && e.shiftKey)
172
171
  return this.distributeStops(
173
172
  "MIN",
174
- parseFloat(f(d, 0, a, n, s).toFixed(1)),
173
+ parseFloat(f(d, 0, a, s, c).toFixed(1)),
175
174
  t
176
175
  );
177
176
  if (p === l.lastChild && e.shiftKey)
178
177
  return this.distributeStops(
179
178
  "MAX",
180
- parseFloat(f(d, 0, a, n, s).toFixed(1)),
179
+ parseFloat(f(d, 0, a, s, c).toFixed(1)),
181
180
  t
182
181
  );
183
182
  if (e.ctrlKey || e.metaKey)
@@ -185,72 +184,92 @@ class B extends v.Component {
185
184
  d = p.offsetLeft;
186
185
  else
187
186
  return this.linkStops(
188
- parseFloat(f(d, 0, a, n, s).toFixed(1)),
187
+ parseFloat(f(d, 0, a, s, c).toFixed(1)),
189
188
  p,
190
189
  t
191
190
  );
192
191
  e.ctrlKey === !1 && e.metaKey === !1 && e.shiftKey === !1 && this.setState({
193
192
  isTooltipDisplay: Array(t.length).fill(!1)
194
193
  });
195
- const g = f(d, 0, a, n, s), I = Math.round(g / c) * c, M = c.toString().split(".")[1]?.length || 0, b = f(I, n, s, 0, 100);
196
- p.style.left = b.toFixed(M) + "%", requestAnimationFrame(() => {
197
- p.focus();
198
- }), i("UPDATING"), document.body.style.cursor = "ew-resize";
194
+ const m = f(d, 0, a, s, c), y = Math.round(m / u) * u, S = u.toString().split(".")[1]?.length || 0;
195
+ if (u >= 1) {
196
+ const x = parseFloat(
197
+ f(
198
+ parseFloat(p.style.left.replace("%", "")),
199
+ 0,
200
+ 100,
201
+ s,
202
+ c
203
+ ).toFixed(S)
204
+ ), b = parseFloat(y.toFixed(S));
205
+ if (x !== b) {
206
+ const v = f(y, s, c, 0, 100);
207
+ p.style.left = v.toFixed(S) + "%", requestAnimationFrame(() => {
208
+ p.focus();
209
+ }), o("UPDATING");
210
+ }
211
+ } else {
212
+ const x = f(y, s, c, 0, 100);
213
+ p.style.left = x.toFixed(S) + "%", requestAnimationFrame(() => {
214
+ p.focus();
215
+ }), o("UPDATING");
216
+ }
217
+ document.body.style.cursor = "ew-resize";
199
218
  };
200
- onRelease = (e, o, l) => {
201
- document.onmousemove = null, document.onmouseup = null, o.onmouseup = null, o.style.zIndex = "1", this.setState({
219
+ onRelease = (e, i, l) => {
220
+ document.onmousemove = null, document.onmouseup = null, i.onmouseup = null, i.style.zIndex = "1", this.setState({
202
221
  activeKnobId: null
203
222
  }), requestAnimationFrame(() => {
204
- o.focus();
223
+ i.focus();
205
224
  }), this.setState({
206
225
  isTooltipDisplay: Array(e.length).fill(!1)
207
226
  }), l("RELEASED"), document.body.style.cursor = "";
208
227
  };
209
228
  onAdd = (e) => {
210
- const { scale: o, onChange: l } = this.props, { min: t, max: p } = this.props.range, r = O(e.nativeEvent, o, t, p);
229
+ const { scale: i, onChange: l } = this.props, { min: t, max: p } = this.props.range, r = K(e.nativeEvent, i, t, p);
211
230
  l("SHIFTED", r, "ADD_STOP");
212
231
  };
213
232
  onDelete = (e) => {
214
- const { scale: o, onChange: l } = this.props, t = N(o, e);
233
+ const { scale: i, onChange: l } = this.props, t = L(i, e);
215
234
  l("SHIFTED", t, "DELETE_STOP");
216
235
  };
217
- onShiftRight = (e, o, l) => {
218
- const { scale: t, onChange: p } = this.props, { min: r, max: a } = this.props.range, i = D(t, e, o, l, r, a);
219
- p("SHIFTED", i), requestAnimationFrame(() => {
220
- const n = e.closest(".multiple-slider__range");
221
- if (n) {
222
- const s = n.querySelector(
236
+ onShiftRight = (e, i) => {
237
+ const { scale: l, onChange: t } = this.props, { min: p, max: r, step: a = 1 } = this.props.range, n = _(l, e, i, p, r, a);
238
+ t("SHIFTED", n), requestAnimationFrame(() => {
239
+ const o = e.closest(".multiple-slider__range");
240
+ if (o) {
241
+ const s = o.querySelector(
223
242
  `[data-id="${e.dataset.id}"]`
224
243
  );
225
244
  s instanceof HTMLElement && s.focus();
226
245
  }
227
246
  });
228
247
  };
229
- onShiftLeft = (e, o, l) => {
230
- const { scale: t, onChange: p } = this.props, { min: r, max: a } = this.props.range, i = A(t, e, o, l, r, a);
231
- p("SHIFTED", i), requestAnimationFrame(() => {
232
- const n = e.closest(".multiple-slider__range");
233
- if (n) {
234
- const s = n.querySelector(
248
+ onShiftLeft = (e, i) => {
249
+ const { scale: l, onChange: t } = this.props, { min: p, max: r, step: a = 1 } = this.props.range, n = N(l, e, i, p, r, a);
250
+ t("SHIFTED", n), requestAnimationFrame(() => {
251
+ const o = e.closest(".multiple-slider__range");
252
+ if (o) {
253
+ const s = o.querySelector(
235
254
  `[data-id="${e.dataset.id}"]`
236
255
  );
237
256
  s instanceof HTMLElement && s.focus();
238
257
  }
239
258
  });
240
259
  };
241
- distributeStops = (e, o, l) => {
242
- const { scale: t, distributionEasing: p, onChange: r, range: a } = this.props, { min: i, max: n, step: s = 0.1 } = a, c = Math.round(o / s) * s, u = s.toString().split(".")[1]?.length || 0;
260
+ distributeStops = (e, i, l) => {
261
+ const { scale: t, distributionEasing: p, onChange: r, range: a } = this.props, { min: n, max: o, step: s = 0.1 } = a, c = Math.round(i / s) * s, u = s.toString().split(".")[1]?.length || 0;
243
262
  e === "MIN" ? r("UPDATING", {
244
- scale: E(
245
- Object.entries(t).sort((d, g) => g[1] - d[1]).map((d) => parseFloat(d[0])),
263
+ scale: M(
264
+ Object.entries(t).sort((d, m) => m[1] - d[1]).map((d) => parseFloat(d[0])),
246
265
  parseFloat(c.toFixed(u)),
247
- Math.max(...Object.values(t)) ?? n,
266
+ Math.max(...Object.values(t)) ?? o,
248
267
  p
249
268
  )
250
269
  }) : e === "MAX" && r("UPDATING", {
251
- scale: E(
252
- Object.entries(t).sort((d, g) => g[1] - d[1]).map((d) => parseFloat(d[0])),
253
- Math.min(...Object.values(t)) ?? i,
270
+ scale: M(
271
+ Object.entries(t).sort((d, m) => m[1] - d[1]).map((d) => parseFloat(d[0])),
272
+ Math.min(...Object.values(t)) ?? n,
254
273
  parseFloat(c.toFixed(u)),
255
274
  p
256
275
  )
@@ -258,28 +277,28 @@ class B extends v.Component {
258
277
  isTooltipDisplay: Array(l.length).fill(!0)
259
278
  }), document.body.style.cursor = "ew-resize";
260
279
  };
261
- linkStops = (e, o, l) => {
262
- const { scale: t, onChange: p, range: r } = this.props, { step: a = 0.1 } = r, i = t, n = Math.round(e / a) * a, s = a.toString().split(".")[1]?.length || 0;
263
- l.filter((c) => c !== o).forEach((c) => {
264
- const u = i[c.dataset.id] - i[o.dataset.id] + n, d = Math.round(u / a) * a;
265
- i[c.dataset.id] = parseFloat(
280
+ linkStops = (e, i, l) => {
281
+ const { scale: t, onChange: p, range: r } = this.props, { step: a = 0.1 } = r, n = t, o = Math.round(e / a) * a, s = a.toString().split(".")[1]?.length || 0;
282
+ l.filter((c) => c !== i).forEach((c) => {
283
+ const u = n[c.dataset.id] - n[i.dataset.id] + o, d = Math.round(u / a) * a;
284
+ n[c.dataset.id] = parseFloat(
266
285
  d.toFixed(s)
267
286
  );
268
- }), i[o.dataset.id] = parseFloat(
269
- n.toFixed(s)
287
+ }), n[i.dataset.id] = parseFloat(
288
+ o.toFixed(s)
270
289
  ), this.setState({
271
290
  isTooltipDisplay: this.state.isTooltipDisplay.fill(!0)
272
291
  }), p("UPDATING", {
273
- scale: i
292
+ scale: n
274
293
  }), document.body.style.cursor = "ew-resize";
275
294
  };
276
295
  // Templates
277
296
  Status = () => {
278
- const { warning: e, isBlocked: o, isNew: l } = this.props;
279
- if (e || o || l)
280
- return /* @__PURE__ */ S("div", { className: "multiple-slider__status", children: [
281
- e !== void 0 && /* @__PURE__ */ m(
282
- F,
297
+ const { warning: e, isBlocked: i, isNew: l } = this.props;
298
+ if (e || i || l)
299
+ return /* @__PURE__ */ I("div", { className: "multiple-slider__status", children: [
300
+ e !== void 0 && /* @__PURE__ */ g(
301
+ w,
283
302
  {
284
303
  iconType: "PICTO",
285
304
  iconName: "warning",
@@ -288,22 +307,22 @@ class B extends v.Component {
288
307
  type: e.type
289
308
  }
290
309
  ),
291
- (o || l) && /* @__PURE__ */ m(
292
- T,
310
+ (i || l) && /* @__PURE__ */ g(
311
+ D,
293
312
  {
294
313
  isSolo: !0,
295
- action: o ? this.props.onUnblock : void 0,
314
+ action: i ? this.props.onUnblock : void 0,
296
315
  children: l ? "New" : "Pro"
297
316
  }
298
317
  )
299
318
  ] });
300
319
  };
301
320
  Edit = () => {
302
- const { scale: e, range: o, colors: l, tips: t, isBlocked: p } = this.props, { isTooltipDisplay: r } = this.state;
303
- return /* @__PURE__ */ m(
321
+ const { scale: e, range: i, colors: l, tips: t, isBlocked: p } = this.props, { isTooltipDisplay: r } = this.state;
322
+ return /* @__PURE__ */ g(
304
323
  "div",
305
324
  {
306
- className: x([
325
+ className: E([
307
326
  "multiple-slider__range",
308
327
  p && "multiple-slider__range--blocked"
309
328
  ]),
@@ -311,30 +330,30 @@ class B extends v.Component {
311
330
  background: `linear-gradient(90deg, ${l.min}, ${l.max})`
312
331
  },
313
332
  role: "presentation",
314
- children: Object.entries(e).sort((a, i) => a[1] - i[1]).map((a, i, n) => /* @__PURE__ */ m(
315
- y,
333
+ children: Object.entries(e).sort((a, n) => a[1] - n[1]).map((a, n, o) => /* @__PURE__ */ g(
334
+ F,
316
335
  {
317
336
  id: a[0],
318
337
  shortId: a[0],
319
338
  value: a[1],
320
- offset: f(a[1], o.min, o.max, 0, 100),
321
- min: o.min.toString(),
322
- max: o.max.toString(),
323
- helper: i === 0 || i === n.length - 1 ? {
339
+ offset: f(a[1], i.min, i.max, 0, 100),
340
+ min: i.min.toString(),
341
+ max: i.max.toString(),
342
+ helper: n === 0 || n === o.length - 1 ? {
324
343
  label: t.minMax,
325
344
  type: "MULTI_LINE"
326
345
  } : void 0,
327
346
  canBeTyped: !0,
328
- isDisplayed: r[i],
347
+ isDisplayed: r[n],
329
348
  isBlocked: p,
330
349
  style: {
331
350
  pointerEvents: this.state.activeKnobId && this.state.activeKnobId !== a[0] || p ? "none" : "auto"
332
351
  },
333
352
  onShiftRight: (s) => {
334
- this.onShiftRight(s.target, s.metaKey, s.ctrlKey);
353
+ this.onShiftRight(s.target, s.shiftKey);
335
354
  },
336
355
  onShiftLeft: (s) => {
337
- this.onShiftLeft(s.target, s.metaKey, s.ctrlKey);
356
+ this.onShiftLeft(s.target, s.shiftKey);
338
357
  },
339
358
  onMouseDown: (s) => {
340
359
  this.onGrab(s), s.target.focus();
@@ -348,55 +367,55 @@ class B extends v.Component {
348
367
  );
349
368
  };
350
369
  FullyEdit = () => {
351
- const { scale: e, stops: o, range: l, colors: t, tips: p, isBlocked: r } = this.props, { isTooltipDisplay: a } = this.state;
352
- return /* @__PURE__ */ m(
370
+ const { scale: e, stops: i, range: l, colors: t, tips: p, isBlocked: r } = this.props, { isTooltipDisplay: a } = this.state;
371
+ return /* @__PURE__ */ g(
353
372
  "div",
354
373
  {
355
- className: x([
374
+ className: E([
356
375
  "multiple-slider__range",
357
- o.list.length < (o.max ?? 1 / 0) && !r && "multiple-slider__range--add",
358
- o.list.length === (o.max ?? 1 / 0) && "multiple-slider__range--not-allowed",
376
+ i.list.length < (i.max ?? 1 / 0) && !r && "multiple-slider__range--add",
377
+ i.list.length === (i.max ?? 1 / 0) && "multiple-slider__range--not-allowed",
359
378
  r && "multiple-slider__range--blocked"
360
379
  ]),
361
380
  style: {
362
381
  background: `linear-gradient(90deg, ${t.min}, ${t.max})`
363
382
  },
364
- onMouseDown: (i) => o.list.length < (o.max ?? 1 / 0) && this.onAdd(i),
365
- children: Object.entries(e).sort((i, n) => i[1] - n[1]).map((i, n, s) => /* @__PURE__ */ m(
366
- y,
383
+ onMouseDown: (n) => i.list.length < (i.max ?? 1 / 0) && this.onAdd(n),
384
+ children: Object.entries(e).sort((n, o) => n[1] - o[1]).map((n, o, s) => /* @__PURE__ */ g(
385
+ F,
367
386
  {
368
- id: i[0],
369
- shortId: i[0],
370
- value: i[1],
371
- offset: f(i[1], l.min, l.max, 0, 100),
387
+ id: n[0],
388
+ shortId: n[0],
389
+ value: n[1],
390
+ offset: f(n[1], l.min, l.max, 0, 100),
372
391
  min: l.min.toString(),
373
392
  max: l.max.toString(),
374
- helper: n === 0 || n === s.length - 1 ? {
393
+ helper: o === 0 || o === s.length - 1 ? {
375
394
  label: p.minMax,
376
395
  type: "MULTI_LINE"
377
396
  } : void 0,
378
397
  canBeTyped: !0,
379
- isDisplayed: a[n],
398
+ isDisplayed: a[o],
380
399
  isBlocked: r,
381
400
  style: {
382
- pointerEvents: this.state.activeKnobId && this.state.activeKnobId !== i[0] || r ? "none" : "auto"
401
+ pointerEvents: this.state.activeKnobId && this.state.activeKnobId !== n[0] || r ? "none" : "auto"
383
402
  },
384
403
  onShiftRight: (c) => {
385
- this.onShiftRight(c.target, c.metaKey, c.ctrlKey);
404
+ this.onShiftRight(c.target, c.shiftKey);
386
405
  },
387
406
  onShiftLeft: (c) => {
388
- this.onShiftLeft(c.target, c.metaKey, c.ctrlKey);
407
+ this.onShiftLeft(c.target, c.shiftKey);
389
408
  },
390
409
  onDelete: (c) => {
391
- o.list.length > (o.min ?? 1 / 0) && this.onDelete(c.target);
410
+ i.list.length > (i.min ?? 1 / 0) && this.onDelete(c.target);
392
411
  },
393
412
  onMouseDown: (c) => {
394
413
  this.onGrab(c), c.target.focus();
395
414
  },
396
415
  onValidStopValue: (c, u) => this.validHandler(c, u),
397
- "aria-valuenow": i[1]
416
+ "aria-valuenow": n[1]
398
417
  },
399
- i[0]
418
+ n[0]
400
419
  ))
401
420
  }
402
421
  );
@@ -404,14 +423,14 @@ class B extends v.Component {
404
423
  // Render
405
424
  render() {
406
425
  const { type: e } = this.props;
407
- return /* @__PURE__ */ S("div", { className: "multiple-slider", children: [
408
- e === "EDIT" && /* @__PURE__ */ m(this.Edit, {}),
409
- e === "FULLY_EDIT" && /* @__PURE__ */ m(this.FullyEdit, {}),
426
+ return /* @__PURE__ */ I("div", { className: "multiple-slider", children: [
427
+ e === "EDIT" && /* @__PURE__ */ g(this.Edit, {}),
428
+ e === "FULLY_EDIT" && /* @__PURE__ */ g(this.FullyEdit, {}),
410
429
  this.Status()
411
430
  ] });
412
431
  }
413
432
  }
414
433
  export {
415
- B as default
434
+ H as default
416
435
  };
417
436
  //# sourceMappingURL=MultipleSlider.js.map