@grandbazar/ui-baza 1.2.20 → 1.3.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.
package/dist/index.cjs CHANGED
@@ -63,7 +63,7 @@ const green = "_green_p5h5n_43";
63
63
  const neutral$3 = "_neutral_p5h5n_48";
64
64
  const lg$7 = "_lg_p5h5n_53";
65
65
  const md$a = "_md_p5h5n_60";
66
- const styles$w = {
66
+ const styles$x = {
67
67
  badge: badge,
68
68
  primary: primary$4,
69
69
  secondary: secondary$5,
@@ -79,13 +79,13 @@ const styles$w = {
79
79
  };
80
80
 
81
81
  function Badge({ children, className, size = "lg", color = "accent", mode = "primary", ...props }) {
82
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$w.badge, styles$w[size], styles$w[color], styles$w[mode], className), ...props, children });
82
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$x.badge, styles$x[size], styles$x[color], styles$x[mode], className), ...props, children });
83
83
  }
84
84
 
85
85
  const badgeTabsItem = "_badgeTabsItem_10lit_2";
86
86
  const primary$3 = "_primary_10lit_18";
87
87
  const secondary$4 = "_secondary_10lit_36";
88
- const styles$v = {
88
+ const styles$w = {
89
89
  badgeTabsItem: badgeTabsItem,
90
90
  primary: primary$3,
91
91
  secondary: secondary$4
@@ -98,7 +98,7 @@ function BadgeTabsItem({ className, children, isActive, mode = "primary", ...pro
98
98
  type: "button",
99
99
  role: "tab",
100
100
  "aria-selected": Boolean(isActive),
101
- className: classNames(styles$v.badgeTabsItem, styles$v[mode], className),
101
+ className: classNames(styles$w.badgeTabsItem, styles$w[mode], className),
102
102
  ...props,
103
103
  children
104
104
  }
@@ -106,12 +106,12 @@ function BadgeTabsItem({ className, children, isActive, mode = "primary", ...pro
106
106
  }
107
107
 
108
108
  const badgeTabsRoot = "_badgeTabsRoot_1qkat_2";
109
- const styles$u = {
109
+ const styles$v = {
110
110
  badgeTabsRoot: badgeTabsRoot
111
111
  };
112
112
 
113
113
  function BadgeTabsRoot({ className, children, ...props }) {
114
- return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "tablist", className: classNames(styles$u.badgeTabsRoot, className), ...props, children });
114
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "tablist", className: classNames(styles$v.badgeTabsRoot, className), ...props, children });
115
115
  }
116
116
 
117
117
  function BadgeTabs(props) {
@@ -957,6 +957,34 @@ function IconStop(props) {
957
957
  ) });
958
958
  }
959
959
 
960
+ function IconStore(props) {
961
+ return /* @__PURE__ */ jsxRuntime.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", ...props, children: /* @__PURE__ */ jsxRuntime.jsx(
962
+ "path",
963
+ {
964
+ d: "M22 10.3334C22 10.2726 21.993 10.2119 21.98 10.1526L20.897 5.2626C20.695 4.3344 20.181 3.5037 19.44 2.9097C18.699 2.3157 17.776 1.9946 16.827 2.0001H7.173C6.224 1.9953 5.302 2.3168 4.562 2.9108C3.822 3.5047 3.308 4.335 3.107 5.2626L2.02 10.1526C2.007 10.2119 2 10.2726 2 10.3334V11.1667C1.999 11.9781 2.296 12.7616 2.833 13.3692V17.8334C2.835 18.9381 3.274 19.9971 4.055 20.7782C4.836 21.5593 5.895 21.9987 7 22.0001H17C18.105 21.9987 19.164 21.5593 19.945 20.7782C20.726 19.9971 21.165 18.9381 21.167 17.8334V13.3692C21.704 12.7616 22.001 11.9781 22 11.1667V10.3334ZM3.667 10.4242L4.733 5.6242C4.854 5.0678 5.163 4.5697 5.607 4.2134C6.051 3.8571 6.604 3.6641 7.173 3.6667H7.833V6.1667C7.833 6.3878 7.921 6.5997 8.077 6.756C8.234 6.9123 8.446 7.0001 8.667 7.0001C8.888 7.0001 9.1 6.9123 9.256 6.756C9.412 6.5997 9.5 6.3878 9.5 6.1667V3.6667H14.5V6.1667C14.5 6.3878 14.588 6.5997 14.744 6.756C14.9 6.9123 15.112 7.0001 15.333 7.0001C15.554 7.0001 15.766 6.9123 15.923 6.756C16.079 6.5997 16.167 6.3878 16.167 6.1667V3.6667H16.827C17.396 3.6641 17.949 3.8571 18.393 4.2134C18.837 4.5697 19.146 5.0678 19.267 5.6242L20.333 10.4242V11.1667C20.333 11.6088 20.158 12.0327 19.845 12.3452C19.533 12.6578 19.109 12.8334 18.667 12.8334H17.833C17.391 12.8334 16.967 12.6578 16.655 12.3452C16.342 12.0327 16.167 11.6088 16.167 11.1667C16.167 10.9457 16.079 10.7338 15.923 10.5775C15.766 10.4212 15.554 10.3334 15.333 10.3334C15.112 10.3334 14.9 10.4212 14.744 10.5775C14.588 10.7338 14.5 10.9457 14.5 11.1667C14.5 11.6088 14.324 12.0327 14.012 12.3452C13.699 12.6578 13.275 12.8334 12.833 12.8334H11.167C10.725 12.8334 10.301 12.6578 9.988 12.3452C9.676 12.0327 9.5 11.6088 9.5 11.1667C9.5 10.9457 9.412 10.7338 9.256 10.5775C9.1 10.4212 8.888 10.3334 8.667 10.3334C8.446 10.3334 8.234 10.4212 8.077 10.5775C7.921 10.7338 7.833 10.9457 7.833 11.1667C7.833 11.6088 7.658 12.0327 7.345 12.3452C7.033 12.6578 6.609 12.8334 6.167 12.8334H5.333C4.891 12.8334 4.467 12.6578 4.155 12.3452C3.842 12.0327 3.667 11.6088 3.667 11.1667V10.4242ZM17 20.3334H7C6.337 20.3334 5.701 20.07 5.232 19.6012C4.763 19.1323 4.5 18.4964 4.5 17.8334V14.3942C4.772 14.4647 5.052 14.5003 5.333 14.5001H6.167C6.64 14.5003 7.108 14.3996 7.539 14.2046C7.97 14.0095 8.354 13.7248 8.667 13.3692C8.979 13.7248 9.363 14.0095 9.795 14.2046C10.226 14.3996 10.693 14.5003 11.167 14.5001H12.833C13.307 14.5003 13.774 14.3996 14.205 14.2046C14.637 14.0095 15.021 13.7248 15.333 13.3692C15.646 13.7248 16.03 14.0095 16.461 14.2046C16.892 14.3996 17.36 14.5003 17.833 14.5001H18.667C18.948 14.5003 19.228 14.4647 19.5 14.3942V17.8334C19.5 18.4964 19.237 19.1323 18.768 19.6012C18.299 20.07 17.663 20.3334 17 20.3334Z",
965
+ fill: "currentColor"
966
+ }
967
+ ) });
968
+ }
969
+ IconStore.Filled = function IconStoreFilled(props) {
970
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", ...props, children: [
971
+ /* @__PURE__ */ jsxRuntime.jsx(
972
+ "path",
973
+ {
974
+ d: "M17.833 16.1667C16.956 16.1663 16.093 15.9347 15.333 15.495C14.574 15.9347 13.711 16.1663 12.833 16.1667H11.167C10.288 16.1655 9.425 15.9302 8.667 15.485C7.909 15.9303 7.046 16.1656 6.167 16.1667H5.333C4.455 16.1664 3.592 15.9325 2.833 15.4892V19.5C2.833 20.163 3.097 20.7989 3.566 21.2678C4.035 21.7366 4.67 22 5.333 22H18.667C19.33 22 19.966 21.7366 20.435 21.2678C20.903 20.7989 21.167 20.163 21.167 19.5V15.49C20.408 15.9327 19.545 16.1662 18.667 16.1667H17.833Z",
975
+ fill: "currentColor"
976
+ }
977
+ ),
978
+ /* @__PURE__ */ jsxRuntime.jsx(
979
+ "path",
980
+ {
981
+ d: "M16.167 2V7H14.5V2H9.5V7H7.833V2H3.833L2.02 10.1525L2 11.1667C2 12.0507 2.351 12.8986 2.976 13.5237C3.601 14.1488 4.449 14.5 5.333 14.5H6.167C6.642 14.4985 7.111 14.3948 7.542 14.1961C7.973 13.9974 8.357 13.7083 8.667 13.3483C8.976 13.7083 9.36 13.9974 9.791 14.1961C10.223 14.3948 10.692 14.4985 11.167 14.5H12.833C13.307 14.5002 13.774 14.3995 14.205 14.2045C14.637 14.0095 15.021 13.7247 15.333 13.3692C15.646 13.7247 16.03 14.0095 16.461 14.2045C16.892 14.3995 17.36 14.5002 17.833 14.5H18.667C19.551 14.5 20.399 14.1488 21.024 13.5237C21.649 12.8986 22 12.0507 22 11.1667V10.3333L20.167 2H16.167Z",
982
+ fill: "currentColor"
983
+ }
984
+ )
985
+ ] });
986
+ };
987
+
960
988
  function IconSwitch(props) {
961
989
  return /* @__PURE__ */ jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", fill: "none", ...props, children: [
962
990
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -1040,7 +1068,7 @@ function IconXMarkCircle(props) {
1040
1068
  const breadcrumbs = "_breadcrumbs_1bfmb_2";
1041
1069
  const breadcrumbsItem = "_breadcrumbsItem_1bfmb_8";
1042
1070
  const defaultSeparator = "_defaultSeparator_1bfmb_14";
1043
- const styles$t = {
1071
+ const styles$u = {
1044
1072
  breadcrumbs: breadcrumbs,
1045
1073
  breadcrumbsItem: breadcrumbsItem,
1046
1074
  defaultSeparator: defaultSeparator
@@ -1089,7 +1117,7 @@ function Slot({
1089
1117
  }
1090
1118
 
1091
1119
  const breadcrumbItem = "_breadcrumbItem_cua4v_2";
1092
- const styles$s = {
1120
+ const styles$t = {
1093
1121
  breadcrumbItem: breadcrumbItem
1094
1122
  };
1095
1123
 
@@ -1100,7 +1128,7 @@ function BreadcrumbItem({ children, className, isActive, asChild, ...props }) {
1100
1128
  {
1101
1129
  "data-active": isActive,
1102
1130
  "data-disabled": props.disabled,
1103
- className: classNames(styles$s.breadcrumbItem, className),
1131
+ className: classNames(styles$t.breadcrumbItem, className),
1104
1132
  ...isActive && { "aria-current": "page" },
1105
1133
  ...!asChild && { type: "button" },
1106
1134
  ...props,
@@ -1112,13 +1140,13 @@ function BreadcrumbItem({ children, className, isActive, asChild, ...props }) {
1112
1140
  function Breadcrumbs({
1113
1141
  className,
1114
1142
  children,
1115
- separator = /* @__PURE__ */ jsxRuntime.jsx(IconChevron, { className: styles$t.defaultSeparator })
1143
+ separator = /* @__PURE__ */ jsxRuntime.jsx(IconChevron, { className: styles$u.defaultSeparator })
1116
1144
  }) {
1117
1145
  const childrenArray = Array.isArray(children) ? children : [children];
1118
1146
  const lastIndex = childrenArray.length - 1;
1119
- return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "breadcrumb", className, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: styles$t.breadcrumbs, children: childrenArray.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
1120
- /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles$t.breadcrumbsItem, children: item }),
1121
- index < lastIndex && /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles$t.breadcrumbsItem, "aria-hidden": "true", children: separator })
1147
+ return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "breadcrumb", className, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: styles$u.breadcrumbs, children: childrenArray.map((item, index) => /* @__PURE__ */ jsxRuntime.jsxs(React.Fragment, { children: [
1148
+ /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles$u.breadcrumbsItem, children: item }),
1149
+ index < lastIndex && /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles$u.breadcrumbsItem, "aria-hidden": "true", children: separator })
1122
1150
  ] }, index)) }) });
1123
1151
  }
1124
1152
  Breadcrumbs.Item = BreadcrumbItem;
@@ -1133,7 +1161,7 @@ const neutral$2 = "_neutral_1waqk_78";
1133
1161
  const lg$6 = "_lg_1waqk_145";
1134
1162
  const md$9 = "_md_1waqk_153";
1135
1163
  const sm$4 = "_sm_1waqk_161";
1136
- const styles$r = {
1164
+ const styles$s = {
1137
1165
  button: button,
1138
1166
  accent: accent$2,
1139
1167
  primary: primary$2,
@@ -1151,7 +1179,7 @@ const accent$1 = "_accent_o8iku_10";
1151
1179
  const neutral$1 = "_neutral_o8iku_22";
1152
1180
  const lg$5 = "_lg_o8iku_41";
1153
1181
  const md$8 = "_md_o8iku_46";
1154
- const styles$q = {
1182
+ const styles$r = {
1155
1183
  buttonFunction: buttonFunction,
1156
1184
  accent: accent$1,
1157
1185
  neutral: neutral$1,
@@ -1171,7 +1199,7 @@ function ButtonFunction({
1171
1199
  return /* @__PURE__ */ jsxRuntime.jsx(
1172
1200
  Component,
1173
1201
  {
1174
- className: classNames(styles$q.buttonFunction, styles$q[color], styles$q[size], className),
1202
+ className: classNames(styles$r.buttonFunction, styles$r[color], styles$r[size], className),
1175
1203
  ...props.disabled && { "data-disabled": true },
1176
1204
  ...!asChild && { type: "button" },
1177
1205
  ...props,
@@ -1193,7 +1221,7 @@ function Button({
1193
1221
  return /* @__PURE__ */ jsxRuntime.jsx(
1194
1222
  Component,
1195
1223
  {
1196
- className: classNames(styles$r.button, styles$r[color], styles$r[size], styles$r[mode], className),
1224
+ className: classNames(styles$s.button, styles$s[color], styles$s[size], styles$s[mode], className),
1197
1225
  ...!asChild && { type: "button" },
1198
1226
  ...props,
1199
1227
  children
@@ -1205,7 +1233,7 @@ Button.Function = ButtonFunction;
1205
1233
  const checkboxWrapper = "_checkboxWrapper_k1shg_2";
1206
1234
  const icon$2 = "_icon_k1shg_23";
1207
1235
  const checkbox = "_checkbox_k1shg_2";
1208
- const styles$p = {
1236
+ const styles$q = {
1209
1237
  checkboxWrapper: checkboxWrapper,
1210
1238
  icon: icon$2,
1211
1239
  checkbox: checkbox
@@ -1218,11 +1246,11 @@ function Checkbox({ className, label, indeterminate, ...props }) {
1218
1246
  {
1219
1247
  "data-disabled": `${Boolean(props.disabled)}`,
1220
1248
  "data-state": dataState,
1221
- className: classNames(styles$p.checkboxWrapper, className),
1249
+ className: classNames(styles$q.checkboxWrapper, className),
1222
1250
  children: [
1223
- dataState === "checked" && /* @__PURE__ */ jsxRuntime.jsx(IconCheck, { "data-disabled": `${Boolean(props.disabled)}`, className: styles$p.icon }),
1224
- dataState === "indeterminate" && /* @__PURE__ */ jsxRuntime.jsx(IconMinus, { "data-disabled": `${Boolean(props.disabled)}`, className: styles$p.icon }),
1225
- /* @__PURE__ */ jsxRuntime.jsx("input", { "data-state": dataState, type: "checkbox", className: styles$p.checkbox, ...props }),
1251
+ dataState === "checked" && /* @__PURE__ */ jsxRuntime.jsx(IconCheck, { "data-disabled": `${Boolean(props.disabled)}`, className: styles$q.icon }),
1252
+ dataState === "indeterminate" && /* @__PURE__ */ jsxRuntime.jsx(IconMinus, { "data-disabled": `${Boolean(props.disabled)}`, className: styles$q.icon }),
1253
+ /* @__PURE__ */ jsxRuntime.jsx("input", { "data-state": dataState, type: "checkbox", className: styles$q.checkbox, ...props }),
1226
1254
  label
1227
1255
  ]
1228
1256
  }
@@ -1230,7 +1258,7 @@ function Checkbox({ className, label, indeterminate, ...props }) {
1230
1258
  }
1231
1259
 
1232
1260
  const chip = "_chip_dj4kw_2";
1233
- const styles$o = {
1261
+ const styles$p = {
1234
1262
  chip: chip
1235
1263
  };
1236
1264
 
@@ -1238,7 +1266,7 @@ function Chip({ isSelected, children, className, disabled, ...props }) {
1238
1266
  return /* @__PURE__ */ jsxRuntime.jsx(
1239
1267
  "div",
1240
1268
  {
1241
- className: classNames(styles$o.chip, className),
1269
+ className: classNames(styles$p.chip, className),
1242
1270
  "data-selected": isSelected,
1243
1271
  "data-disabled": disabled,
1244
1272
  "aria-disabled": disabled,
@@ -1256,7 +1284,7 @@ const accent = "_accent_ww0fb_37";
1256
1284
  const neutral = "_neutral_ww0fb_42";
1257
1285
  const secondary$2 = "_secondary_ww0fb_47";
1258
1286
  const white = "_white_ww0fb_52";
1259
- const styles$n = {
1287
+ const styles$o = {
1260
1288
  root: root$1,
1261
1289
  lg: lg$4,
1262
1290
  md: md$7,
@@ -1268,7 +1296,7 @@ const styles$n = {
1268
1296
  };
1269
1297
 
1270
1298
  function Counter({ className, size = "lg", color = "red", ...props }) {
1271
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$n.root, styles$n[size], styles$n[color], className), ...props });
1299
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$o.root, styles$o[size], styles$o[color], className), ...props });
1272
1300
  }
1273
1301
 
1274
1302
  const LOCALE_FIRST_DAY_OF_WEEK = {
@@ -1278,7 +1306,7 @@ const LOCALE_FIRST_DAY_OF_WEEK = {
1278
1306
 
1279
1307
  const datePickerCellWrapper = "_datePickerCellWrapper_np1gx_2";
1280
1308
  const datePickerCell = "_datePickerCell_np1gx_2";
1281
- const styles$m = {
1309
+ const styles$n = {
1282
1310
  datePickerCellWrapper: datePickerCellWrapper,
1283
1311
  datePickerCell: datePickerCell,
1284
1312
  "radius-none": "_radius-none_np1gx_83",
@@ -1288,10 +1316,10 @@ const styles$m = {
1288
1316
  };
1289
1317
 
1290
1318
  function DatePickerCell({ children, className, state, isCurrent, radius = "both", ...props }) {
1291
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$m.datePickerCellWrapper, styles$m[`radius-${radius}`]), "data-state": state, children: /* @__PURE__ */ jsxRuntime.jsx(
1319
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$n.datePickerCellWrapper, styles$n[`radius-${radius}`]), "data-state": state, children: /* @__PURE__ */ jsxRuntime.jsx(
1292
1320
  "button",
1293
1321
  {
1294
- className: classNames(styles$m.datePickerCell, styles$m[`radius-${radius}`], className),
1322
+ className: classNames(styles$n.datePickerCell, styles$n[`radius-${radius}`], className),
1295
1323
  type: "button",
1296
1324
  role: "gridcell",
1297
1325
  "aria-selected": state === "selected",
@@ -1361,7 +1389,7 @@ function normalizeDateRange(firstDate, secondDate) {
1361
1389
  const datePickerField = "_datePickerField_1qk8s_2";
1362
1390
  const datePickerFieldCalendar = "_datePickerFieldCalendar_1qk8s_8";
1363
1391
  const datePickerFieldWeek = "_datePickerFieldWeek_1qk8s_14";
1364
- const styles$l = {
1392
+ const styles$m = {
1365
1393
  datePickerField: datePickerField,
1366
1394
  datePickerFieldCalendar: datePickerFieldCalendar,
1367
1395
  datePickerFieldWeek: datePickerFieldWeek
@@ -1376,9 +1404,9 @@ function DatePickerField({
1376
1404
  firstDayOfWeek = LOCALE_FIRST_DAY_OF_WEEK.ru
1377
1405
  }) {
1378
1406
  const weeks = React.useMemo(() => getCalendarGrid(month, year, firstDayOfWeek), [month, year, firstDayOfWeek]);
1379
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames(styles$l.datePickerField, className), role: "grid", children: [
1407
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames(styles$m.datePickerField, className), role: "grid", children: [
1380
1408
  renderWeekdays?.(),
1381
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$l.datePickerFieldCalendar, role: "rowgroup", children: weeks.map((week, weekIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$l.datePickerFieldWeek, role: "row", "aria-rowindex": weekIndex + 1, children: week.map((day, dayIndex) => /* @__PURE__ */ jsxRuntime.jsx(Slot, { role: "gridcell", "aria-colindex": dayIndex + 1, children: children(day) }, `${day.year}-${day.month}-${day.date}`)) }, weekIndex)) })
1409
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$m.datePickerFieldCalendar, role: "rowgroup", children: weeks.map((week, weekIndex) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$m.datePickerFieldWeek, role: "row", "aria-rowindex": weekIndex + 1, children: week.map((day, dayIndex) => /* @__PURE__ */ jsxRuntime.jsx(Slot, { role: "gridcell", "aria-colindex": dayIndex + 1, children: children(day) }, `${day.year}-${day.month}-${day.date}`)) }, weekIndex)) })
1382
1410
  ] });
1383
1411
  }
1384
1412
 
@@ -1419,13 +1447,13 @@ const I18N_MONTH_LABELS = {
1419
1447
 
1420
1448
  const datePickerWeekdays = "_datePickerWeekdays_p8tsm_2";
1421
1449
  const datePickerWeekday = "_datePickerWeekday_p8tsm_2";
1422
- const styles$k = {
1450
+ const styles$l = {
1423
1451
  datePickerWeekdays: datePickerWeekdays,
1424
1452
  datePickerWeekday: datePickerWeekday
1425
1453
  };
1426
1454
 
1427
1455
  function DatePickerWeekDays({ className, locale = "ru" }) {
1428
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$k.datePickerWeekdays, className), role: "row", children: I18N_WEEKDAY_LABELS[locale].map((label) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$k.datePickerWeekday, role: "columnheader", children: label }, label)) });
1456
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$l.datePickerWeekdays, className), role: "row", children: I18N_WEEKDAY_LABELS[locale].map((label) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$l.datePickerWeekday, role: "columnheader", children: label }, label)) });
1429
1457
  }
1430
1458
 
1431
1459
  function DatePicker() {
@@ -1661,21 +1689,21 @@ const DROPDOWN_PORTAL_SIDE_CONFIG = {
1661
1689
  };
1662
1690
 
1663
1691
  const dropdownContent = "_dropdownContent_12tkb_2";
1664
- const styles$j = {
1692
+ const styles$k = {
1665
1693
  dropdownContent: dropdownContent
1666
1694
  };
1667
1695
 
1668
1696
  function DropdownContent({ className, children, ...props }) {
1669
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$j.dropdownContent, className), ...props, children });
1697
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$k.dropdownContent, className), ...props, children });
1670
1698
  }
1671
1699
 
1672
1700
  const dropdownItem = "_dropdownItem_msc4i_2";
1673
- const styles$i = {
1701
+ const styles$j = {
1674
1702
  dropdownItem: dropdownItem
1675
1703
  };
1676
1704
 
1677
1705
  function DropdownItem({ className, children, disabled, ...props }) {
1678
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$i.dropdownItem, className), role: "menuitem", "data-disabled": disabled, ...props, children });
1706
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$j.dropdownItem, className), role: "menuitem", "data-disabled": disabled, ...props, children });
1679
1707
  }
1680
1708
 
1681
1709
  const CLICK_OUTSIDE_IGNORE_DATA_NAME = "data-clickoutside-ignore";
@@ -2103,7 +2131,7 @@ function useTriggerHandlersByEventTrigger() {
2103
2131
  }
2104
2132
 
2105
2133
  const dropdownPortal = "_dropdownPortal_p3tdk_2";
2106
- const styles$h = {
2134
+ const styles$i = {
2107
2135
  dropdownPortal: dropdownPortal
2108
2136
  };
2109
2137
 
@@ -2143,7 +2171,7 @@ function DropdownPortal({
2143
2171
  ...style
2144
2172
  },
2145
2173
  ref: portalRef,
2146
- className: classNames(styles$h.dropdownPortal, className),
2174
+ className: classNames(styles$i.dropdownPortal, className),
2147
2175
  ...handlersByTrigger[triggerEvent],
2148
2176
  ...isNested && { [CLICK_OUTSIDE_IGNORE_DATA_NAME]: "true" },
2149
2177
  children
@@ -2196,7 +2224,7 @@ const BOUNDARY_PAGES = 2;
2196
2224
  const paginationItem = "_paginationItem_1ll6p_2";
2197
2225
  const md$6 = "_md_1ll6p_46";
2198
2226
  const sm$3 = "_sm_1ll6p_60";
2199
- const styles$g = {
2227
+ const styles$h = {
2200
2228
  paginationItem: paginationItem,
2201
2229
  md: md$6,
2202
2230
  sm: sm$3
@@ -2208,7 +2236,7 @@ function PaginationItem({ className, children, size = "md", isCurrent, ...props
2208
2236
  {
2209
2237
  type: "button",
2210
2238
  ...isCurrent && { "aria-current": "page" },
2211
- className: classNames(styles$g.paginationItem, styles$g[size], className),
2239
+ className: classNames(styles$h.paginationItem, styles$h[size], className),
2212
2240
  ...props,
2213
2241
  children
2214
2242
  }
@@ -2245,7 +2273,7 @@ function getVisiblePages(totalPages, maxVisiblePagesWithEllipsis, currentPage) {
2245
2273
  const paginationRoot = "_paginationRoot_c5fwx_2";
2246
2274
  const paginationList = "_paginationList_c5fwx_7";
2247
2275
  const arrowLeft = "_arrowLeft_c5fwx_13";
2248
- const styles$f = {
2276
+ const styles$g = {
2249
2277
  paginationRoot: paginationRoot,
2250
2278
  paginationList: paginationList,
2251
2279
  arrowLeft: arrowLeft
@@ -2272,9 +2300,9 @@ function PaginationRoot({
2272
2300
  {
2273
2301
  "aria-label": "pagination navigation",
2274
2302
  role: "navigation",
2275
- className: classNames(styles$f.paginationRoot, className),
2303
+ className: classNames(styles$g.paginationRoot, className),
2276
2304
  ...props,
2277
- children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: styles$f.paginationList, children: [
2305
+ children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: styles$g.paginationList, children: [
2278
2306
  showArrows && /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
2279
2307
  PaginationItem$1,
2280
2308
  {
@@ -2282,7 +2310,7 @@ function PaginationRoot({
2282
2310
  onClick: () => onPageChange(currentPage - 1),
2283
2311
  disabled: isFirstPage,
2284
2312
  size,
2285
- children: /* @__PURE__ */ jsxRuntime.jsx(IconChevron$1, { className: styles$f.arrowLeft })
2313
+ children: /* @__PURE__ */ jsxRuntime.jsx(IconChevron$1, { className: styles$g.arrowLeft })
2286
2314
  }
2287
2315
  ) }),
2288
2316
  visiblePages.map((page, index) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: page === ELLIPSIS_SYMBOL ? /* @__PURE__ */ jsxRuntime.jsx(PaginationItem$1, { "aria-label": "More pages", disabled: true, size, children: /* @__PURE__ */ jsxRuntime.jsx(Ellipsis, {}) }) : /* @__PURE__ */ jsxRuntime.jsx(
@@ -2318,15 +2346,15 @@ Pagination.Item = PaginationItem;
2318
2346
  const root = "_root_33gbh_2";
2319
2347
  const segment = "_segment_33gbh_10";
2320
2348
  const flexGrow = "_flexGrow_33gbh_19";
2321
- const fill = "_fill_33gbh_23";
2349
+ const fill$1 = "_fill_33gbh_23";
2322
2350
  const trail = "_trail_33gbh_28";
2323
2351
  const sm$2 = "_sm_33gbh_32";
2324
2352
  const md$5 = "_md_33gbh_36";
2325
- const styles$e = {
2353
+ const styles$f = {
2326
2354
  root: root,
2327
2355
  segment: segment,
2328
2356
  flexGrow: flexGrow,
2329
- fill: fill,
2357
+ fill: fill$1,
2330
2358
  trail: trail,
2331
2359
  sm: sm$2,
2332
2360
  md: md$5
@@ -2343,7 +2371,7 @@ function ProgressBarLinear({
2343
2371
  return /* @__PURE__ */ jsxRuntime.jsxs(
2344
2372
  "div",
2345
2373
  {
2346
- className: classNames(styles$e.root, styles$e[size], className),
2374
+ className: classNames(styles$f.root, styles$f[size], className),
2347
2375
  role: "progressbar",
2348
2376
  "aria-valuenow": clampedPercent,
2349
2377
  "aria-valuemin": 0,
@@ -2355,14 +2383,14 @@ function ProgressBarLinear({
2355
2383
  (Boolean(clampedPercent) || showFillOnZero) && /* @__PURE__ */ jsxRuntime.jsx(
2356
2384
  "div",
2357
2385
  {
2358
- className: classNames(styles$e.segment, styles$e.fill),
2386
+ className: classNames(styles$f.segment, styles$f.fill),
2359
2387
  style: {
2360
2388
  "--clamped-percent": `${clampedPercent}%`
2361
2389
  },
2362
2390
  "aria-hidden": "true"
2363
2391
  }
2364
2392
  ),
2365
- clampedPercent < 100 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$e.segment, styles$e.flexGrow, styles$e.trail), "aria-hidden": "true" })
2393
+ clampedPercent < 100 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$f.segment, styles$f.flexGrow, styles$f.trail), "aria-hidden": "true" })
2366
2394
  ]
2367
2395
  }
2368
2396
  );
@@ -2382,7 +2410,7 @@ function ProgressBarSteps({
2382
2410
  return /* @__PURE__ */ jsxRuntime.jsx(
2383
2411
  "div",
2384
2412
  {
2385
- className: classNames(styles$e.segment, styles$e.flexGrow, isFilled ? styles$e.fill : styles$e.trail),
2413
+ className: classNames(styles$f.segment, styles$f.flexGrow, isFilled ? styles$f.fill : styles$f.trail),
2386
2414
  "aria-hidden": "true"
2387
2415
  },
2388
2416
  index
@@ -2391,7 +2419,7 @@ function ProgressBarSteps({
2391
2419
  return /* @__PURE__ */ jsxRuntime.jsx(
2392
2420
  "div",
2393
2421
  {
2394
- className: classNames(styles$e.root, styles$e[size], className),
2422
+ className: classNames(styles$f.root, styles$f[size], className),
2395
2423
  role: "progressbar",
2396
2424
  "aria-valuenow": clampedCurrent,
2397
2425
  "aria-valuemin": 0,
@@ -2411,14 +2439,14 @@ ProgressBar.Steps = ProgressBarSteps;
2411
2439
 
2412
2440
  const radioWrapper = "_radioWrapper_13xie_2";
2413
2441
  const radio = "_radio_13xie_2";
2414
- const styles$d = {
2442
+ const styles$e = {
2415
2443
  radioWrapper: radioWrapper,
2416
2444
  radio: radio
2417
2445
  };
2418
2446
 
2419
2447
  function RadioButton({ className, label, ...props }) {
2420
- return /* @__PURE__ */ jsxRuntime.jsxs("label", { "data-disabled": `${Boolean(props.disabled)}`, className: classNames(styles$d.radioWrapper, className), children: [
2421
- /* @__PURE__ */ jsxRuntime.jsx("input", { type: "radio", className: styles$d.radio, ...props }),
2448
+ return /* @__PURE__ */ jsxRuntime.jsxs("label", { "data-disabled": `${Boolean(props.disabled)}`, className: classNames(styles$e.radioWrapper, className), children: [
2449
+ /* @__PURE__ */ jsxRuntime.jsx("input", { type: "radio", className: styles$e.radio, ...props }),
2422
2450
  label
2423
2451
  ] });
2424
2452
  }
@@ -2429,7 +2457,7 @@ const textFieldAreaWrapper = "_textFieldAreaWrapper_pia91_2";
2429
2457
  const textFieldAreaLabel = "_textFieldAreaLabel_pia91_14";
2430
2458
  const textFieldAreaLabelSuffix = "_textFieldAreaLabelSuffix_pia91_24";
2431
2459
  const textFieldArea = "_textFieldArea_pia91_2";
2432
- const styles$c = {
2460
+ const styles$d = {
2433
2461
  textFieldAreaWrapper: textFieldAreaWrapper,
2434
2462
  textFieldAreaLabel: textFieldAreaLabel,
2435
2463
  textFieldAreaLabelSuffix: textFieldAreaLabelSuffix,
@@ -2450,14 +2478,14 @@ function TextFieldArea({
2450
2478
  "data-invalid": isInvalid,
2451
2479
  "aria-invalid": isInvalid,
2452
2480
  "data-element": "field",
2453
- className: classNames(styles$c.textFieldArea, className),
2481
+ className: classNames(styles$d.textFieldArea, className),
2454
2482
  placeholder,
2455
2483
  ...props
2456
2484
  }
2457
2485
  );
2458
- return floatingLabel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$c.textFieldAreaWrapper, children: [
2459
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: props.id, className: styles$c.textFieldAreaLabel, "data-element": "label", children: floatingLabel }),
2460
- floatingLabelSuffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$c.textFieldAreaLabelSuffix, "data-element": "label-suffix", children: floatingLabelSuffix }),
2486
+ return floatingLabel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$d.textFieldAreaWrapper, children: [
2487
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: props.id, className: styles$d.textFieldAreaLabel, "data-element": "label", children: floatingLabel }),
2488
+ floatingLabelSuffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$d.textFieldAreaLabelSuffix, "data-element": "label-suffix", children: floatingLabelSuffix }),
2461
2489
  textFieldArea
2462
2490
  ] }) : textFieldArea;
2463
2491
  }
@@ -2465,7 +2493,7 @@ function TextFieldArea({
2465
2493
  const textFieldInputWrapper = "_textFieldInputWrapper_1m8sa_2";
2466
2494
  const textFieldInputLabel = "_textFieldInputLabel_1m8sa_9";
2467
2495
  const textFieldInput = "_textFieldInput_1m8sa_2";
2468
- const styles$b = {
2496
+ const styles$c = {
2469
2497
  textFieldInputWrapper: textFieldInputWrapper,
2470
2498
  textFieldInputLabel: textFieldInputLabel,
2471
2499
  textFieldInput: textFieldInput
@@ -2484,37 +2512,37 @@ function TextFieldInput({
2484
2512
  "data-invalid": isInvalid,
2485
2513
  "aria-invalid": isInvalid,
2486
2514
  "data-element": "field",
2487
- className: classNames(styles$b.textFieldInput, className),
2515
+ className: classNames(styles$c.textFieldInput, className),
2488
2516
  placeholder,
2489
2517
  ...props
2490
2518
  }
2491
2519
  );
2492
- return floatingLabel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$b.textFieldInputWrapper, children: [
2493
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: props.id, className: styles$b.textFieldInputLabel, "data-element": "label", children: floatingLabel }),
2520
+ return floatingLabel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$c.textFieldInputWrapper, children: [
2521
+ /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: props.id, className: styles$c.textFieldInputLabel, "data-element": "label", children: floatingLabel }),
2494
2522
  textFieldInput
2495
2523
  ] }) : textFieldInput;
2496
2524
  }
2497
2525
 
2498
- const textFieldLabel = "_textFieldLabel_1l2ya_1";
2499
- const styles$a = {
2526
+ const textFieldLabel = "_textFieldLabel_1xy6x_2";
2527
+ const styles$b = {
2500
2528
  textFieldLabel: textFieldLabel
2501
2529
  };
2502
2530
 
2503
2531
  function TextFieldLabel({ className, children, isRequired, ...props }) {
2504
- return /* @__PURE__ */ jsxRuntime.jsx("label", { className: classNames(styles$a.textFieldLabel, className), "data-required": isRequired, ...props, children });
2532
+ return /* @__PURE__ */ jsxRuntime.jsx("label", { className: classNames(styles$b.textFieldLabel, className), "data-required": isRequired, ...props, children });
2505
2533
  }
2506
2534
 
2507
2535
  const textFieldRoot = "_textFieldRoot_cs7mv_2";
2508
2536
  const lg$3 = "_lg_cs7mv_38";
2509
2537
  const md$4 = "_md_cs7mv_70";
2510
- const styles$9 = {
2538
+ const styles$a = {
2511
2539
  textFieldRoot: textFieldRoot,
2512
2540
  lg: lg$3,
2513
2541
  md: md$4
2514
2542
  };
2515
2543
 
2516
2544
  function TextFieldRoot({ className, size = "lg", ...props }) {
2517
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$9.textFieldRoot, styles$9[size], className), ...props });
2545
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$a.textFieldRoot, styles$a[size], className), ...props });
2518
2546
  }
2519
2547
 
2520
2548
  function TextField() {
@@ -2529,7 +2557,7 @@ const custom = "_custom_gh87y_15";
2529
2557
  const icon$1 = "_icon_gh87y_25";
2530
2558
  const inputCustomWrapper = "_inputCustomWrapper_gh87y_34";
2531
2559
  const customButton = "_customButton_gh87y_49";
2532
- const styles$8 = {
2560
+ const styles$9 = {
2533
2561
  search: search,
2534
2562
  "default": "_default_gh87y_10",
2535
2563
  custom: custom,
@@ -2555,7 +2583,7 @@ function Search(props) {
2555
2583
  value && /* @__PURE__ */ jsxRuntime.jsx(
2556
2584
  IconXMark.Small,
2557
2585
  {
2558
- className: styles$8.icon,
2586
+ className: styles$9.icon,
2559
2587
  "aria-label": "clear search",
2560
2588
  role: "button",
2561
2589
  onClick: () => {
@@ -2569,13 +2597,13 @@ function Search(props) {
2569
2597
  }
2570
2598
  )
2571
2599
  ] });
2572
- return /* @__PURE__ */ jsxRuntime.jsxs(TextField.Root, { size: "md", className: classNames(styles$8.search, styles$8[mode], className), children: [
2600
+ return /* @__PURE__ */ jsxRuntime.jsxs(TextField.Root, { size: "md", className: classNames(styles$9.search, styles$9[mode], className), children: [
2573
2601
  mode === "default" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2574
- /* @__PURE__ */ jsxRuntime.jsx(IconSearch, { className: styles$8.icon, "data-element": "icon" }),
2602
+ /* @__PURE__ */ jsxRuntime.jsx(IconSearch, { className: styles$9.icon, "data-element": "icon" }),
2575
2603
  inputField
2576
2604
  ] }),
2577
2605
  mode === "custom" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2578
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$8.inputCustomWrapper, children: inputField }),
2606
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$9.inputCustomWrapper, children: inputField }),
2579
2607
  /* @__PURE__ */ jsxRuntime.jsx(
2580
2608
  "button",
2581
2609
  {
@@ -2583,11 +2611,11 @@ function Search(props) {
2583
2611
  type: "button",
2584
2612
  onClick: props.onSearch,
2585
2613
  "data-element": "custom-button",
2586
- className: styles$8.customButton,
2614
+ className: styles$9.customButton,
2587
2615
  style: {
2588
2616
  "--custom-button-width": `${props.buttonWidth ?? DEFAULT_CUSTOM_SEARCH_BUTTON_WIDTH}px`
2589
2617
  },
2590
- children: /* @__PURE__ */ jsxRuntime.jsx(IconSearch, { className: classNames(styles$8.icon), "data-element": "icon" })
2618
+ children: /* @__PURE__ */ jsxRuntime.jsx(IconSearch, { className: classNames(styles$9.icon), "data-element": "icon" })
2591
2619
  }
2592
2620
  )
2593
2621
  ] })
@@ -2613,7 +2641,7 @@ function useSegmentControlContext() {
2613
2641
  const segmentControlItem = "_segmentControlItem_178px_2";
2614
2642
  const lg$2 = "_lg_178px_23";
2615
2643
  const md$3 = "_md_178px_28";
2616
- const styles$7 = {
2644
+ const styles$8 = {
2617
2645
  segmentControlItem: segmentControlItem,
2618
2646
  lg: lg$2,
2619
2647
  md: md$3
@@ -2629,7 +2657,7 @@ function SegmentControlItem({ className, children, value, ...props }) {
2629
2657
  "aria-checked": value === activeValue,
2630
2658
  "data-state": value === activeValue ? "on" : "off",
2631
2659
  "data-value": value,
2632
- className: classNames(styles$7.segmentControlItem, styles$7[size], className),
2660
+ className: classNames(styles$8.segmentControlItem, styles$8[size], className),
2633
2661
  ...props,
2634
2662
  children
2635
2663
  }
@@ -2666,7 +2694,7 @@ const showAfterDelay = "_showAfterDelay_pulca_1";
2666
2694
  const lg$1 = "_lg_pulca_19";
2667
2695
  const md$2 = "_md_pulca_23";
2668
2696
  const indicator$1 = "_indicator_pulca_28";
2669
- const styles$6 = {
2697
+ const styles$7 = {
2670
2698
  segmentControlRoot: segmentControlRoot,
2671
2699
  showAfterDelay: showAfterDelay,
2672
2700
  lg: lg$1,
@@ -2681,11 +2709,11 @@ function SegmentControlRoot({ className, children, value, size = "md", ...props
2681
2709
  {
2682
2710
  ref: rootRef,
2683
2711
  role: "radiogroup",
2684
- className: classNames(styles$6.segmentControlRoot, styles$6[size], className),
2712
+ className: classNames(styles$7.segmentControlRoot, styles$7[size], className),
2685
2713
  ...props,
2686
2714
  children: [
2687
2715
  children,
2688
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$6.indicator, styles$6[size]), style: indicatorStyle })
2716
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$7.indicator, styles$7[size]), style: indicatorStyle })
2689
2717
  ]
2690
2718
  }
2691
2719
  ) });
@@ -2696,6 +2724,302 @@ function SegmentControl(props) {
2696
2724
  }
2697
2725
  SegmentControl.Item = SegmentControlItem;
2698
2726
 
2727
+ const SLIDER_DEFAULT_MIN = 0;
2728
+ const SLIDER_DEFAULT_MAX = 100;
2729
+ const SLIDER_DEFAULT_STEP = 1;
2730
+ const SLIDER_PAGE_STEP_MULTIPLIER = 10;
2731
+ const SLIDER_STEP_MULTIPLIER_BY_KEY = {
2732
+ ArrowRight: 1,
2733
+ ArrowUp: 1,
2734
+ ArrowLeft: -1,
2735
+ ArrowDown: -1,
2736
+ PageUp: SLIDER_PAGE_STEP_MULTIPLIER,
2737
+ PageDown: -SLIDER_PAGE_STEP_MULTIPLIER
2738
+ };
2739
+
2740
+ function getNearestHandleIndex(target, values) {
2741
+ let nearestIndex = 0;
2742
+ let nearestDistance = Number.POSITIVE_INFINITY;
2743
+ values.forEach((value, index) => {
2744
+ const distance = Math.abs(value - target);
2745
+ const isCloser = distance < nearestDistance;
2746
+ const isTieResolvedByDirection = distance === nearestDistance && target > value;
2747
+ if (isCloser || isTieResolvedByDirection) {
2748
+ nearestDistance = distance;
2749
+ nearestIndex = index;
2750
+ }
2751
+ });
2752
+ return nearestIndex;
2753
+ }
2754
+
2755
+ function getPercent(value, bounds) {
2756
+ const { min, max } = bounds;
2757
+ if (max <= min) {
2758
+ return 0;
2759
+ }
2760
+ return Math.min(Math.max((value - min) / (max - min) * 100, 0), 100);
2761
+ }
2762
+
2763
+ function getFractionLength(value) {
2764
+ return String(value).split(".")[1]?.length ?? 0;
2765
+ }
2766
+ function snapToStep(value, bounds) {
2767
+ const { min, max, step } = bounds;
2768
+ const clamped = Math.min(Math.max(value, min), max);
2769
+ if (step <= 0) {
2770
+ return clamped;
2771
+ }
2772
+ const snapped = min + Math.round((clamped - min) / step) * step;
2773
+ const precision = Math.max(getFractionLength(step), getFractionLength(min));
2774
+ return Number(Math.min(Math.max(snapped, min), max).toFixed(precision));
2775
+ }
2776
+
2777
+ function getValueFromPointer(params) {
2778
+ const { clientX, trackStart, trackWidth, min, max, step } = params;
2779
+ if (trackWidth <= 0) {
2780
+ return min;
2781
+ }
2782
+ const ratio = (clientX - trackStart) / trackWidth;
2783
+ return snapToStep(min + ratio * (max - min), { min, max, step });
2784
+ }
2785
+
2786
+ function normalizeMark(mark) {
2787
+ if (typeof mark === "number") {
2788
+ return { value: mark, label: mark };
2789
+ }
2790
+ return { value: mark.value, label: mark.label };
2791
+ }
2792
+
2793
+ function updateHandleValue(params) {
2794
+ const { values, index, next, min, max, step } = params;
2795
+ const lowerBound = values[index - 1] ?? min;
2796
+ const upperBound = values[index + 1] ?? max;
2797
+ const snapped = snapToStep(next, { min, max, step });
2798
+ const nextValues = [...values];
2799
+ nextValues[index] = Math.min(Math.max(snapped, lowerBound), upperBound);
2800
+ return nextValues;
2801
+ }
2802
+
2803
+ const slider = "_slider_vuele_2";
2804
+ const fill = "_fill_vuele_20";
2805
+ const rail = "_rail_vuele_26";
2806
+ const handle = "_handle_vuele_34";
2807
+ const mark = "_mark_vuele_39";
2808
+ const markDot = "_markDot_vuele_43";
2809
+ const track = "_track_vuele_56";
2810
+ const marks = "_marks_vuele_106";
2811
+ const styles$6 = {
2812
+ slider: slider,
2813
+ fill: fill,
2814
+ rail: rail,
2815
+ handle: handle,
2816
+ mark: mark,
2817
+ markDot: markDot,
2818
+ track: track,
2819
+ marks: marks
2820
+ };
2821
+
2822
+ function SliderMarks({ marks, min, max, activeFrom, activeTo }) {
2823
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$6.marks, children: marks.map(({ value, label }) => {
2824
+ const isActive = value >= activeFrom && value <= activeTo;
2825
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2826
+ "div",
2827
+ {
2828
+ "data-state": isActive ? "active" : "default",
2829
+ className: styles$6.mark,
2830
+ style: { insetInlineStart: `${getPercent(value, { min, max })}%` },
2831
+ children: [
2832
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$6.markDot }),
2833
+ label
2834
+ ]
2835
+ },
2836
+ value
2837
+ );
2838
+ }) });
2839
+ }
2840
+
2841
+ function SliderBase({
2842
+ values,
2843
+ onValuesChange,
2844
+ min = SLIDER_DEFAULT_MIN,
2845
+ max = SLIDER_DEFAULT_MAX,
2846
+ step = SLIDER_DEFAULT_STEP,
2847
+ marks,
2848
+ disabled,
2849
+ className,
2850
+ "aria-label": ariaLabel,
2851
+ "aria-labelledby": ariaLabelledBy,
2852
+ "aria-describedby": ariaDescribedBy,
2853
+ ...props
2854
+ }) {
2855
+ const railRef = React.useRef(null);
2856
+ const handleRefs = React.useRef([]);
2857
+ const dragRef = React.useRef(null);
2858
+ const normalizedMarks = React.useMemo(() => marks?.map(normalizeMark) ?? [], [marks]);
2859
+ const fillFrom = values.length > 1 ? values[0] ?? min : min;
2860
+ const fillTo = values.at(-1) ?? min;
2861
+ const toPercent = (value) => getPercent(value, { min, max });
2862
+ const resolveKeyValue = (key, current) => {
2863
+ const multiplier = SLIDER_STEP_MULTIPLIER_BY_KEY[key];
2864
+ if (multiplier !== void 0) {
2865
+ return current + step * multiplier;
2866
+ }
2867
+ if (key === "Home") {
2868
+ return min;
2869
+ }
2870
+ return key === "End" ? max : null;
2871
+ };
2872
+ const resolveValueText = (value) => {
2873
+ const { label } = normalizedMarks.find((mark) => mark.value === value) ?? {};
2874
+ const text = typeof label === "string" || typeof label === "number" ? String(label) : void 0;
2875
+ return text === String(value) ? void 0 : text;
2876
+ };
2877
+ const commit = (index, next) => {
2878
+ const nextValues = updateHandleValue({ values, index, next, min, max, step });
2879
+ if (nextValues[index] === values[index]) {
2880
+ return;
2881
+ }
2882
+ onValuesChange(nextValues);
2883
+ };
2884
+ const readPointerValue = (clientX) => {
2885
+ if (!railRef.current) {
2886
+ return null;
2887
+ }
2888
+ const rect = railRef.current.getBoundingClientRect();
2889
+ return getValueFromPointer({ clientX, trackStart: rect.left, trackWidth: rect.width, min, max, step });
2890
+ };
2891
+ const handleKeyDown = (event, index) => {
2892
+ const current = values[index];
2893
+ if (disabled || current === void 0) {
2894
+ return;
2895
+ }
2896
+ const next = resolveKeyValue(event.key, current);
2897
+ if (next === null) {
2898
+ return;
2899
+ }
2900
+ event.preventDefault();
2901
+ commit(index, next);
2902
+ };
2903
+ const handlePointerDown = (event) => {
2904
+ if (disabled || event.button !== 0 || !event.isPrimary) {
2905
+ return;
2906
+ }
2907
+ const grabbedIndex = handleRefs.current.findIndex((handle) => handle === event.target);
2908
+ if (grabbedIndex >= 0) {
2909
+ const isAmbiguousGrab = values.filter((value) => value === values[grabbedIndex]).length > 1;
2910
+ dragRef.current = { pointerId: event.pointerId, index: isAmbiguousGrab ? null : grabbedIndex };
2911
+ event.currentTarget.setPointerCapture(event.pointerId);
2912
+ return;
2913
+ }
2914
+ const pointerValue = readPointerValue(event.clientX);
2915
+ if (pointerValue === null) {
2916
+ return;
2917
+ }
2918
+ const nearestIndex = getNearestHandleIndex(pointerValue, values);
2919
+ dragRef.current = { pointerId: event.pointerId, index: nearestIndex };
2920
+ event.currentTarget.setPointerCapture(event.pointerId);
2921
+ handleRefs.current[nearestIndex]?.focus();
2922
+ commit(nearestIndex, pointerValue);
2923
+ };
2924
+ const handlePointerMove = (event) => {
2925
+ const drag = dragRef.current;
2926
+ if (!drag || drag.pointerId !== event.pointerId || disabled) {
2927
+ return;
2928
+ }
2929
+ const pointerValue = readPointerValue(event.clientX);
2930
+ if (pointerValue === null) {
2931
+ return;
2932
+ }
2933
+ const index = drag.index ?? getNearestHandleIndex(pointerValue, values);
2934
+ dragRef.current = { pointerId: drag.pointerId, index };
2935
+ handleRefs.current[index]?.focus();
2936
+ commit(index, pointerValue);
2937
+ };
2938
+ const stopDragging = (event) => {
2939
+ if (dragRef.current?.pointerId !== event.pointerId) {
2940
+ return;
2941
+ }
2942
+ dragRef.current = null;
2943
+ if (event.currentTarget.hasPointerCapture(event.pointerId)) {
2944
+ event.currentTarget.releasePointerCapture(event.pointerId);
2945
+ }
2946
+ };
2947
+ const handleLostPointerCapture = (event) => {
2948
+ if (dragRef.current?.pointerId === event.pointerId) {
2949
+ dragRef.current = null;
2950
+ }
2951
+ };
2952
+ return /* @__PURE__ */ jsxRuntime.jsx(
2953
+ "div",
2954
+ {
2955
+ className: classNames(styles$6.slider, className),
2956
+ "data-disabled": disabled,
2957
+ "data-marks": Boolean(marks?.length),
2958
+ ...props,
2959
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
2960
+ "div",
2961
+ {
2962
+ ref: railRef,
2963
+ className: styles$6.rail,
2964
+ onPointerDown: handlePointerDown,
2965
+ onPointerMove: handlePointerMove,
2966
+ onPointerUp: stopDragging,
2967
+ onPointerCancel: stopDragging,
2968
+ onLostPointerCapture: handleLostPointerCapture,
2969
+ children: [
2970
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$6.track }),
2971
+ /* @__PURE__ */ jsxRuntime.jsx(
2972
+ "div",
2973
+ {
2974
+ className: styles$6.fill,
2975
+ style: { insetInlineStart: `${toPercent(fillFrom)}%`, insetInlineEnd: `${100 - toPercent(fillTo)}%` }
2976
+ }
2977
+ ),
2978
+ normalizedMarks.length ? /* @__PURE__ */ jsxRuntime.jsx(SliderMarks, { marks: normalizedMarks, min, max, activeFrom: fillFrom, activeTo: fillTo }) : null,
2979
+ values.map((value, index) => /* @__PURE__ */ jsxRuntime.jsx(
2980
+ "div",
2981
+ {
2982
+ ref: (element) => {
2983
+ handleRefs.current[index] = element;
2984
+ },
2985
+ role: "slider",
2986
+ tabIndex: disabled ? -1 : 0,
2987
+ "aria-valuemin": min,
2988
+ "aria-valuemax": max,
2989
+ "aria-valuenow": value,
2990
+ "aria-valuetext": resolveValueText(value),
2991
+ "aria-label": ariaLabel,
2992
+ "aria-labelledby": ariaLabelledBy,
2993
+ "aria-describedby": ariaDescribedBy,
2994
+ "aria-disabled": disabled,
2995
+ "aria-orientation": "horizontal",
2996
+ className: styles$6.handle,
2997
+ style: { insetInlineStart: `${toPercent(value)}%` },
2998
+ onKeyDown: (event) => handleKeyDown(event, index)
2999
+ },
3000
+ index
3001
+ ))
3002
+ ]
3003
+ }
3004
+ )
3005
+ }
3006
+ );
3007
+ }
3008
+
3009
+ function SliderRange({ value, onChange, ...props }) {
3010
+ const handleValuesChange = (nextValues) => {
3011
+ const [from = value[0], to = value[1]] = nextValues;
3012
+ onChange([from, to]);
3013
+ };
3014
+ return /* @__PURE__ */ jsxRuntime.jsx(SliderBase, { values: value, onValuesChange: handleValuesChange, ...props });
3015
+ }
3016
+
3017
+ function Slider({ value, onChange, ...props }) {
3018
+ const handleValuesChange = ([next = value]) => onChange(next);
3019
+ return /* @__PURE__ */ jsxRuntime.jsx(SliderBase, { values: [value], onValuesChange: handleValuesChange, ...props });
3020
+ }
3021
+ Slider.Range = SliderRange;
3022
+
2699
3023
  const stepper = "_stepper_103n3_2";
2700
3024
  const sm$1 = "_sm_103n3_10";
2701
3025
  const md$1 = "_md_103n3_17";
@@ -3079,6 +3403,7 @@ exports.IconSort = IconSort;
3079
3403
  exports.IconStar = IconStar;
3080
3404
  exports.IconSticker = IconSticker;
3081
3405
  exports.IconStop = IconStop;
3406
+ exports.IconStore = IconStore;
3082
3407
  exports.IconSwitch = IconSwitch;
3083
3408
  exports.IconTrash = IconTrash;
3084
3409
  exports.IconXMark = IconXMark;
@@ -3089,6 +3414,7 @@ exports.ProgressBar = ProgressBar;
3089
3414
  exports.RadioButton = RadioButton;
3090
3415
  exports.Search = Search;
3091
3416
  exports.SegmentControl = SegmentControl;
3417
+ exports.Slider = Slider;
3092
3418
  exports.Stepper = Stepper;
3093
3419
  exports.Switch = Switch;
3094
3420
  exports.Tabs = Tabs;