@grandbazar/ui-baza 1.2.13 → 1.2.15
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 +212 -131
- package/dist/index.d.ts +32 -0
- package/dist/index.js +212 -132
- package/dist/style.css +108 -31
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,8 +52,8 @@ function omit(object, ...keys) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
const badge = "_badge_p5h5n_2";
|
|
55
|
-
const primary$
|
|
56
|
-
const secondary$
|
|
55
|
+
const primary$4 = "_primary_p5h5n_9";
|
|
56
|
+
const secondary$5 = "_secondary_p5h5n_13";
|
|
57
57
|
const accent$3 = "_accent_p5h5n_18";
|
|
58
58
|
const violet = "_violet_p5h5n_23";
|
|
59
59
|
const pink = "_pink_p5h5n_28";
|
|
@@ -62,11 +62,11 @@ const orange = "_orange_p5h5n_38";
|
|
|
62
62
|
const green = "_green_p5h5n_43";
|
|
63
63
|
const neutral$3 = "_neutral_p5h5n_48";
|
|
64
64
|
const lg$6 = "_lg_p5h5n_53";
|
|
65
|
-
const md$
|
|
66
|
-
const styles$
|
|
65
|
+
const md$a = "_md_p5h5n_60";
|
|
66
|
+
const styles$w = {
|
|
67
67
|
badge: badge,
|
|
68
|
-
primary: primary$
|
|
69
|
-
secondary: secondary$
|
|
68
|
+
primary: primary$4,
|
|
69
|
+
secondary: secondary$5,
|
|
70
70
|
accent: accent$3,
|
|
71
71
|
violet: violet,
|
|
72
72
|
pink: pink,
|
|
@@ -75,20 +75,20 @@ const styles$v = {
|
|
|
75
75
|
green: green,
|
|
76
76
|
neutral: neutral$3,
|
|
77
77
|
lg: lg$6,
|
|
78
|
-
md: md$
|
|
78
|
+
md: md$a
|
|
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$
|
|
82
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$w.badge, styles$w[size], styles$w[color], styles$w[mode], className), ...props, children });
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
const badgeTabsItem = "_badgeTabsItem_10lit_2";
|
|
86
|
-
const primary$
|
|
87
|
-
const secondary$
|
|
88
|
-
const styles$
|
|
86
|
+
const primary$3 = "_primary_10lit_18";
|
|
87
|
+
const secondary$4 = "_secondary_10lit_36";
|
|
88
|
+
const styles$v = {
|
|
89
89
|
badgeTabsItem: badgeTabsItem,
|
|
90
|
-
primary: primary$
|
|
91
|
-
secondary: secondary$
|
|
90
|
+
primary: primary$3,
|
|
91
|
+
secondary: secondary$4
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
function BadgeTabsItem({ className, children, isActive, mode = "primary", ...props }) {
|
|
@@ -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$
|
|
101
|
+
className: classNames(styles$v.badgeTabsItem, styles$v[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$
|
|
109
|
+
const styles$u = {
|
|
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$
|
|
114
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { role: "tablist", className: classNames(styles$u.badgeTabsRoot, className), ...props, children });
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function BadgeTabs(props) {
|
|
@@ -1016,7 +1016,7 @@ function IconXMarkCircle(props) {
|
|
|
1016
1016
|
const breadcrumbs = "_breadcrumbs_1bfmb_2";
|
|
1017
1017
|
const breadcrumbsItem = "_breadcrumbsItem_1bfmb_8";
|
|
1018
1018
|
const defaultSeparator = "_defaultSeparator_1bfmb_14";
|
|
1019
|
-
const styles$
|
|
1019
|
+
const styles$t = {
|
|
1020
1020
|
breadcrumbs: breadcrumbs,
|
|
1021
1021
|
breadcrumbsItem: breadcrumbsItem,
|
|
1022
1022
|
defaultSeparator: defaultSeparator
|
|
@@ -1065,7 +1065,7 @@ function Slot({
|
|
|
1065
1065
|
}
|
|
1066
1066
|
|
|
1067
1067
|
const breadcrumbItem = "_breadcrumbItem_cua4v_2";
|
|
1068
|
-
const styles$
|
|
1068
|
+
const styles$s = {
|
|
1069
1069
|
breadcrumbItem: breadcrumbItem
|
|
1070
1070
|
};
|
|
1071
1071
|
|
|
@@ -1076,7 +1076,7 @@ function BreadcrumbItem({ children, className, isActive, asChild, ...props }) {
|
|
|
1076
1076
|
{
|
|
1077
1077
|
"data-active": isActive,
|
|
1078
1078
|
"data-disabled": props.disabled,
|
|
1079
|
-
className: classNames(styles$
|
|
1079
|
+
className: classNames(styles$s.breadcrumbItem, className),
|
|
1080
1080
|
...isActive && { "aria-current": "page" },
|
|
1081
1081
|
...!asChild && { type: "button" },
|
|
1082
1082
|
...props,
|
|
@@ -1088,51 +1088,51 @@ function BreadcrumbItem({ children, className, isActive, asChild, ...props }) {
|
|
|
1088
1088
|
function Breadcrumbs({
|
|
1089
1089
|
className,
|
|
1090
1090
|
children,
|
|
1091
|
-
separator = /* @__PURE__ */ jsxRuntime.jsx(IconChevron, { className: styles$
|
|
1091
|
+
separator = /* @__PURE__ */ jsxRuntime.jsx(IconChevron, { className: styles$t.defaultSeparator })
|
|
1092
1092
|
}) {
|
|
1093
1093
|
const childrenArray = Array.isArray(children) ? children : [children];
|
|
1094
1094
|
const lastIndex = childrenArray.length - 1;
|
|
1095
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "breadcrumb", className, children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: styles$
|
|
1096
|
-
/* @__PURE__ */ jsxRuntime.jsx("li", { className: styles$
|
|
1097
|
-
index < lastIndex && /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles$
|
|
1095
|
+
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: [
|
|
1096
|
+
/* @__PURE__ */ jsxRuntime.jsx("li", { className: styles$t.breadcrumbsItem, children: item }),
|
|
1097
|
+
index < lastIndex && /* @__PURE__ */ jsxRuntime.jsx("li", { className: styles$t.breadcrumbsItem, "aria-hidden": "true", children: separator })
|
|
1098
1098
|
] }, index)) }) });
|
|
1099
1099
|
}
|
|
1100
1100
|
Breadcrumbs.Item = BreadcrumbItem;
|
|
1101
1101
|
|
|
1102
|
-
const button = "
|
|
1103
|
-
const accent$2 = "
|
|
1104
|
-
const primary$
|
|
1105
|
-
const secondary$
|
|
1106
|
-
const tertiary = "
|
|
1107
|
-
const line = "
|
|
1108
|
-
const neutral$2 = "
|
|
1109
|
-
const lg$5 = "
|
|
1110
|
-
const md$
|
|
1111
|
-
const sm$
|
|
1112
|
-
const styles$
|
|
1102
|
+
const button = "_button_17gao_2";
|
|
1103
|
+
const accent$2 = "_accent_17gao_11";
|
|
1104
|
+
const primary$2 = "_primary_17gao_12";
|
|
1105
|
+
const secondary$3 = "_secondary_17gao_30";
|
|
1106
|
+
const tertiary = "_tertiary_17gao_48";
|
|
1107
|
+
const line = "_line_17gao_49";
|
|
1108
|
+
const neutral$2 = "_neutral_17gao_78";
|
|
1109
|
+
const lg$5 = "_lg_17gao_145";
|
|
1110
|
+
const md$9 = "_md_17gao_153";
|
|
1111
|
+
const sm$4 = "_sm_17gao_161";
|
|
1112
|
+
const styles$r = {
|
|
1113
1113
|
button: button,
|
|
1114
1114
|
accent: accent$2,
|
|
1115
|
-
primary: primary$
|
|
1116
|
-
secondary: secondary$
|
|
1115
|
+
primary: primary$2,
|
|
1116
|
+
secondary: secondary$3,
|
|
1117
1117
|
tertiary: tertiary,
|
|
1118
1118
|
line: line,
|
|
1119
1119
|
neutral: neutral$2,
|
|
1120
1120
|
lg: lg$5,
|
|
1121
|
-
md: md$
|
|
1122
|
-
sm: sm$
|
|
1121
|
+
md: md$9,
|
|
1122
|
+
sm: sm$4
|
|
1123
1123
|
};
|
|
1124
1124
|
|
|
1125
1125
|
const buttonFunction = "_buttonFunction_o8iku_2";
|
|
1126
1126
|
const accent$1 = "_accent_o8iku_10";
|
|
1127
1127
|
const neutral$1 = "_neutral_o8iku_22";
|
|
1128
1128
|
const lg$4 = "_lg_o8iku_41";
|
|
1129
|
-
const md$
|
|
1130
|
-
const styles$
|
|
1129
|
+
const md$8 = "_md_o8iku_46";
|
|
1130
|
+
const styles$q = {
|
|
1131
1131
|
buttonFunction: buttonFunction,
|
|
1132
1132
|
accent: accent$1,
|
|
1133
1133
|
neutral: neutral$1,
|
|
1134
1134
|
lg: lg$4,
|
|
1135
|
-
md: md$
|
|
1135
|
+
md: md$8
|
|
1136
1136
|
};
|
|
1137
1137
|
|
|
1138
1138
|
function ButtonFunction({
|
|
@@ -1147,7 +1147,7 @@ function ButtonFunction({
|
|
|
1147
1147
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1148
1148
|
Component,
|
|
1149
1149
|
{
|
|
1150
|
-
className: classNames(styles$
|
|
1150
|
+
className: classNames(styles$q.buttonFunction, styles$q[color], styles$q[size], className),
|
|
1151
1151
|
...props.disabled && { "data-disabled": true },
|
|
1152
1152
|
...!asChild && { type: "button" },
|
|
1153
1153
|
...props,
|
|
@@ -1169,7 +1169,7 @@ function Button({
|
|
|
1169
1169
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1170
1170
|
Component,
|
|
1171
1171
|
{
|
|
1172
|
-
className: classNames(styles$
|
|
1172
|
+
className: classNames(styles$r.button, styles$r[color], styles$r[size], styles$r[mode], className),
|
|
1173
1173
|
...!asChild && { type: "button" },
|
|
1174
1174
|
...props,
|
|
1175
1175
|
children
|
|
@@ -1181,7 +1181,7 @@ Button.Function = ButtonFunction;
|
|
|
1181
1181
|
const checkboxWrapper = "_checkboxWrapper_k1shg_2";
|
|
1182
1182
|
const icon$2 = "_icon_k1shg_23";
|
|
1183
1183
|
const checkbox = "_checkbox_k1shg_2";
|
|
1184
|
-
const styles$
|
|
1184
|
+
const styles$p = {
|
|
1185
1185
|
checkboxWrapper: checkboxWrapper,
|
|
1186
1186
|
icon: icon$2,
|
|
1187
1187
|
checkbox: checkbox
|
|
@@ -1194,11 +1194,11 @@ function Checkbox({ className, label, indeterminate, ...props }) {
|
|
|
1194
1194
|
{
|
|
1195
1195
|
"data-disabled": `${Boolean(props.disabled)}`,
|
|
1196
1196
|
"data-state": dataState,
|
|
1197
|
-
className: classNames(styles$
|
|
1197
|
+
className: classNames(styles$p.checkboxWrapper, className),
|
|
1198
1198
|
children: [
|
|
1199
|
-
dataState === "checked" && /* @__PURE__ */ jsxRuntime.jsx(IconCheck, { "data-disabled": `${Boolean(props.disabled)}`, className: styles$
|
|
1200
|
-
dataState === "indeterminate" && /* @__PURE__ */ jsxRuntime.jsx(IconMinus, { "data-disabled": `${Boolean(props.disabled)}`, className: styles$
|
|
1201
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { "data-state": dataState, type: "checkbox", className: styles$
|
|
1199
|
+
dataState === "checked" && /* @__PURE__ */ jsxRuntime.jsx(IconCheck, { "data-disabled": `${Boolean(props.disabled)}`, className: styles$p.icon }),
|
|
1200
|
+
dataState === "indeterminate" && /* @__PURE__ */ jsxRuntime.jsx(IconMinus, { "data-disabled": `${Boolean(props.disabled)}`, className: styles$p.icon }),
|
|
1201
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { "data-state": dataState, type: "checkbox", className: styles$p.checkbox, ...props }),
|
|
1202
1202
|
label
|
|
1203
1203
|
]
|
|
1204
1204
|
}
|
|
@@ -1206,7 +1206,7 @@ function Checkbox({ className, label, indeterminate, ...props }) {
|
|
|
1206
1206
|
}
|
|
1207
1207
|
|
|
1208
1208
|
const chip = "_chip_dj4kw_2";
|
|
1209
|
-
const styles$
|
|
1209
|
+
const styles$o = {
|
|
1210
1210
|
chip: chip
|
|
1211
1211
|
};
|
|
1212
1212
|
|
|
@@ -1214,7 +1214,7 @@ function Chip({ isSelected, children, className, disabled, ...props }) {
|
|
|
1214
1214
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1215
1215
|
"div",
|
|
1216
1216
|
{
|
|
1217
|
-
className: classNames(styles$
|
|
1217
|
+
className: classNames(styles$o.chip, className),
|
|
1218
1218
|
"data-selected": isSelected,
|
|
1219
1219
|
"data-disabled": disabled,
|
|
1220
1220
|
"aria-disabled": disabled,
|
|
@@ -1226,25 +1226,25 @@ function Chip({ isSelected, children, className, disabled, ...props }) {
|
|
|
1226
1226
|
|
|
1227
1227
|
const root$1 = "_root_ww0fb_2";
|
|
1228
1228
|
const lg$3 = "_lg_ww0fb_16";
|
|
1229
|
-
const md$
|
|
1229
|
+
const md$7 = "_md_ww0fb_24";
|
|
1230
1230
|
const red = "_red_ww0fb_32";
|
|
1231
1231
|
const accent = "_accent_ww0fb_37";
|
|
1232
1232
|
const neutral = "_neutral_ww0fb_42";
|
|
1233
|
-
const secondary$
|
|
1233
|
+
const secondary$2 = "_secondary_ww0fb_47";
|
|
1234
1234
|
const white = "_white_ww0fb_52";
|
|
1235
|
-
const styles$
|
|
1235
|
+
const styles$n = {
|
|
1236
1236
|
root: root$1,
|
|
1237
1237
|
lg: lg$3,
|
|
1238
|
-
md: md$
|
|
1238
|
+
md: md$7,
|
|
1239
1239
|
red: red,
|
|
1240
1240
|
accent: accent,
|
|
1241
1241
|
neutral: neutral,
|
|
1242
|
-
secondary: secondary$
|
|
1242
|
+
secondary: secondary$2,
|
|
1243
1243
|
white: white
|
|
1244
1244
|
};
|
|
1245
1245
|
|
|
1246
1246
|
function Counter({ className, size = "lg", color = "red", ...props }) {
|
|
1247
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$
|
|
1247
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$n.root, styles$n[size], styles$n[color], className), ...props });
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
1250
|
const LOCALE_FIRST_DAY_OF_WEEK = {
|
|
@@ -1254,7 +1254,7 @@ const LOCALE_FIRST_DAY_OF_WEEK = {
|
|
|
1254
1254
|
|
|
1255
1255
|
const datePickerCellWrapper = "_datePickerCellWrapper_np1gx_2";
|
|
1256
1256
|
const datePickerCell = "_datePickerCell_np1gx_2";
|
|
1257
|
-
const styles$
|
|
1257
|
+
const styles$m = {
|
|
1258
1258
|
datePickerCellWrapper: datePickerCellWrapper,
|
|
1259
1259
|
datePickerCell: datePickerCell,
|
|
1260
1260
|
"radius-none": "_radius-none_np1gx_83",
|
|
@@ -1264,10 +1264,10 @@ const styles$l = {
|
|
|
1264
1264
|
};
|
|
1265
1265
|
|
|
1266
1266
|
function DatePickerCell({ children, className, state, isCurrent, radius = "both", ...props }) {
|
|
1267
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$
|
|
1267
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$m.datePickerCellWrapper, styles$m[`radius-${radius}`]), "data-state": state, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1268
1268
|
"button",
|
|
1269
1269
|
{
|
|
1270
|
-
className: classNames(styles$
|
|
1270
|
+
className: classNames(styles$m.datePickerCell, styles$m[`radius-${radius}`], className),
|
|
1271
1271
|
type: "button",
|
|
1272
1272
|
role: "gridcell",
|
|
1273
1273
|
"aria-selected": state === "selected",
|
|
@@ -1337,7 +1337,7 @@ function normalizeDateRange(firstDate, secondDate) {
|
|
|
1337
1337
|
const datePickerField = "_datePickerField_1qk8s_2";
|
|
1338
1338
|
const datePickerFieldCalendar = "_datePickerFieldCalendar_1qk8s_8";
|
|
1339
1339
|
const datePickerFieldWeek = "_datePickerFieldWeek_1qk8s_14";
|
|
1340
|
-
const styles$
|
|
1340
|
+
const styles$l = {
|
|
1341
1341
|
datePickerField: datePickerField,
|
|
1342
1342
|
datePickerFieldCalendar: datePickerFieldCalendar,
|
|
1343
1343
|
datePickerFieldWeek: datePickerFieldWeek
|
|
@@ -1352,9 +1352,9 @@ function DatePickerField({
|
|
|
1352
1352
|
firstDayOfWeek = LOCALE_FIRST_DAY_OF_WEEK.ru
|
|
1353
1353
|
}) {
|
|
1354
1354
|
const weeks = React.useMemo(() => getCalendarGrid(month, year, firstDayOfWeek), [month, year, firstDayOfWeek]);
|
|
1355
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames(styles$
|
|
1355
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames(styles$l.datePickerField, className), role: "grid", children: [
|
|
1356
1356
|
renderWeekdays?.(),
|
|
1357
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$
|
|
1357
|
+
/* @__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)) })
|
|
1358
1358
|
] });
|
|
1359
1359
|
}
|
|
1360
1360
|
|
|
@@ -1395,13 +1395,13 @@ const I18N_MONTH_LABELS = {
|
|
|
1395
1395
|
|
|
1396
1396
|
const datePickerWeekdays = "_datePickerWeekdays_p8tsm_2";
|
|
1397
1397
|
const datePickerWeekday = "_datePickerWeekday_p8tsm_2";
|
|
1398
|
-
const styles$
|
|
1398
|
+
const styles$k = {
|
|
1399
1399
|
datePickerWeekdays: datePickerWeekdays,
|
|
1400
1400
|
datePickerWeekday: datePickerWeekday
|
|
1401
1401
|
};
|
|
1402
1402
|
|
|
1403
1403
|
function DatePickerWeekDays({ className, locale = "ru" }) {
|
|
1404
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$
|
|
1404
|
+
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)) });
|
|
1405
1405
|
}
|
|
1406
1406
|
|
|
1407
1407
|
function DatePicker() {
|
|
@@ -1637,21 +1637,21 @@ const DROPDOWN_PORTAL_SIDE_CONFIG = {
|
|
|
1637
1637
|
};
|
|
1638
1638
|
|
|
1639
1639
|
const dropdownContent = "_dropdownContent_12tkb_2";
|
|
1640
|
-
const styles$
|
|
1640
|
+
const styles$j = {
|
|
1641
1641
|
dropdownContent: dropdownContent
|
|
1642
1642
|
};
|
|
1643
1643
|
|
|
1644
1644
|
function DropdownContent({ className, children, ...props }) {
|
|
1645
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$
|
|
1645
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$j.dropdownContent, className), ...props, children });
|
|
1646
1646
|
}
|
|
1647
1647
|
|
|
1648
1648
|
const dropdownItem = "_dropdownItem_msc4i_2";
|
|
1649
|
-
const styles$
|
|
1649
|
+
const styles$i = {
|
|
1650
1650
|
dropdownItem: dropdownItem
|
|
1651
1651
|
};
|
|
1652
1652
|
|
|
1653
1653
|
function DropdownItem({ className, children, disabled, ...props }) {
|
|
1654
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$
|
|
1654
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$i.dropdownItem, className), role: "menuitem", "data-disabled": disabled, ...props, children });
|
|
1655
1655
|
}
|
|
1656
1656
|
|
|
1657
1657
|
const CLICK_OUTSIDE_IGNORE_DATA_NAME = "data-clickoutside-ignore";
|
|
@@ -2079,7 +2079,7 @@ function useTriggerHandlersByEventTrigger() {
|
|
|
2079
2079
|
}
|
|
2080
2080
|
|
|
2081
2081
|
const dropdownPortal = "_dropdownPortal_p3tdk_2";
|
|
2082
|
-
const styles$
|
|
2082
|
+
const styles$h = {
|
|
2083
2083
|
dropdownPortal: dropdownPortal
|
|
2084
2084
|
};
|
|
2085
2085
|
|
|
@@ -2119,7 +2119,7 @@ function DropdownPortal({
|
|
|
2119
2119
|
...style
|
|
2120
2120
|
},
|
|
2121
2121
|
ref: portalRef,
|
|
2122
|
-
className: classNames(styles$
|
|
2122
|
+
className: classNames(styles$h.dropdownPortal, className),
|
|
2123
2123
|
...handlersByTrigger[triggerEvent],
|
|
2124
2124
|
...isNested && { [CLICK_OUTSIDE_IGNORE_DATA_NAME]: "true" },
|
|
2125
2125
|
children
|
|
@@ -2170,12 +2170,12 @@ const SIDE_OFFSET = 3;
|
|
|
2170
2170
|
const BOUNDARY_PAGES = 2;
|
|
2171
2171
|
|
|
2172
2172
|
const paginationItem = "_paginationItem_1ll6p_2";
|
|
2173
|
-
const md$
|
|
2174
|
-
const sm$
|
|
2175
|
-
const styles$
|
|
2173
|
+
const md$6 = "_md_1ll6p_46";
|
|
2174
|
+
const sm$3 = "_sm_1ll6p_60";
|
|
2175
|
+
const styles$g = {
|
|
2176
2176
|
paginationItem: paginationItem,
|
|
2177
|
-
md: md$
|
|
2178
|
-
sm: sm$
|
|
2177
|
+
md: md$6,
|
|
2178
|
+
sm: sm$3
|
|
2179
2179
|
};
|
|
2180
2180
|
|
|
2181
2181
|
function PaginationItem({ className, children, size = "md", isCurrent, ...props }) {
|
|
@@ -2184,7 +2184,7 @@ function PaginationItem({ className, children, size = "md", isCurrent, ...props
|
|
|
2184
2184
|
{
|
|
2185
2185
|
type: "button",
|
|
2186
2186
|
...isCurrent && { "aria-current": "page" },
|
|
2187
|
-
className: classNames(styles$
|
|
2187
|
+
className: classNames(styles$g.paginationItem, styles$g[size], className),
|
|
2188
2188
|
...props,
|
|
2189
2189
|
children
|
|
2190
2190
|
}
|
|
@@ -2221,7 +2221,7 @@ function getVisiblePages(totalPages, maxVisiblePagesWithEllipsis, currentPage) {
|
|
|
2221
2221
|
const paginationRoot = "_paginationRoot_c5fwx_2";
|
|
2222
2222
|
const paginationList = "_paginationList_c5fwx_7";
|
|
2223
2223
|
const arrowLeft = "_arrowLeft_c5fwx_13";
|
|
2224
|
-
const styles$
|
|
2224
|
+
const styles$f = {
|
|
2225
2225
|
paginationRoot: paginationRoot,
|
|
2226
2226
|
paginationList: paginationList,
|
|
2227
2227
|
arrowLeft: arrowLeft
|
|
@@ -2248,9 +2248,9 @@ function PaginationRoot({
|
|
|
2248
2248
|
{
|
|
2249
2249
|
"aria-label": "pagination navigation",
|
|
2250
2250
|
role: "navigation",
|
|
2251
|
-
className: classNames(styles$
|
|
2251
|
+
className: classNames(styles$f.paginationRoot, className),
|
|
2252
2252
|
...props,
|
|
2253
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: styles$
|
|
2253
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: styles$f.paginationList, children: [
|
|
2254
2254
|
showArrows && /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2255
2255
|
PaginationItem$1,
|
|
2256
2256
|
{
|
|
@@ -2258,7 +2258,7 @@ function PaginationRoot({
|
|
|
2258
2258
|
onClick: () => onPageChange(currentPage - 1),
|
|
2259
2259
|
disabled: isFirstPage,
|
|
2260
2260
|
size,
|
|
2261
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(IconChevron$1, { className: styles$
|
|
2261
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconChevron$1, { className: styles$f.arrowLeft })
|
|
2262
2262
|
}
|
|
2263
2263
|
) }),
|
|
2264
2264
|
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(
|
|
@@ -2296,16 +2296,16 @@ const segment = "_segment_33gbh_10";
|
|
|
2296
2296
|
const flexGrow = "_flexGrow_33gbh_19";
|
|
2297
2297
|
const fill = "_fill_33gbh_23";
|
|
2298
2298
|
const trail = "_trail_33gbh_28";
|
|
2299
|
-
const sm$
|
|
2300
|
-
const md$
|
|
2301
|
-
const styles$
|
|
2299
|
+
const sm$2 = "_sm_33gbh_32";
|
|
2300
|
+
const md$5 = "_md_33gbh_36";
|
|
2301
|
+
const styles$e = {
|
|
2302
2302
|
root: root,
|
|
2303
2303
|
segment: segment,
|
|
2304
2304
|
flexGrow: flexGrow,
|
|
2305
2305
|
fill: fill,
|
|
2306
2306
|
trail: trail,
|
|
2307
|
-
sm: sm$
|
|
2308
|
-
md: md$
|
|
2307
|
+
sm: sm$2,
|
|
2308
|
+
md: md$5
|
|
2309
2309
|
};
|
|
2310
2310
|
|
|
2311
2311
|
function ProgressBarLinear({
|
|
@@ -2319,7 +2319,7 @@ function ProgressBarLinear({
|
|
|
2319
2319
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2320
2320
|
"div",
|
|
2321
2321
|
{
|
|
2322
|
-
className: classNames(styles$
|
|
2322
|
+
className: classNames(styles$e.root, styles$e[size], className),
|
|
2323
2323
|
role: "progressbar",
|
|
2324
2324
|
"aria-valuenow": clampedPercent,
|
|
2325
2325
|
"aria-valuemin": 0,
|
|
@@ -2331,14 +2331,14 @@ function ProgressBarLinear({
|
|
|
2331
2331
|
(Boolean(clampedPercent) || showFillOnZero) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2332
2332
|
"div",
|
|
2333
2333
|
{
|
|
2334
|
-
className: classNames(styles$
|
|
2334
|
+
className: classNames(styles$e.segment, styles$e.fill),
|
|
2335
2335
|
style: {
|
|
2336
2336
|
"--clamped-percent": `${clampedPercent}%`
|
|
2337
2337
|
},
|
|
2338
2338
|
"aria-hidden": "true"
|
|
2339
2339
|
}
|
|
2340
2340
|
),
|
|
2341
|
-
clampedPercent < 100 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$
|
|
2341
|
+
clampedPercent < 100 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$e.segment, styles$e.flexGrow, styles$e.trail), "aria-hidden": "true" })
|
|
2342
2342
|
]
|
|
2343
2343
|
}
|
|
2344
2344
|
);
|
|
@@ -2358,7 +2358,7 @@ function ProgressBarSteps({
|
|
|
2358
2358
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2359
2359
|
"div",
|
|
2360
2360
|
{
|
|
2361
|
-
className: classNames(styles$
|
|
2361
|
+
className: classNames(styles$e.segment, styles$e.flexGrow, isFilled ? styles$e.fill : styles$e.trail),
|
|
2362
2362
|
"aria-hidden": "true"
|
|
2363
2363
|
},
|
|
2364
2364
|
index
|
|
@@ -2367,7 +2367,7 @@ function ProgressBarSteps({
|
|
|
2367
2367
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2368
2368
|
"div",
|
|
2369
2369
|
{
|
|
2370
|
-
className: classNames(styles$
|
|
2370
|
+
className: classNames(styles$e.root, styles$e[size], className),
|
|
2371
2371
|
role: "progressbar",
|
|
2372
2372
|
"aria-valuenow": clampedCurrent,
|
|
2373
2373
|
"aria-valuemin": 0,
|
|
@@ -2387,25 +2387,25 @@ ProgressBar.Steps = ProgressBarSteps;
|
|
|
2387
2387
|
|
|
2388
2388
|
const radioWrapper = "_radioWrapper_13xie_2";
|
|
2389
2389
|
const radio = "_radio_13xie_2";
|
|
2390
|
-
const styles$
|
|
2390
|
+
const styles$d = {
|
|
2391
2391
|
radioWrapper: radioWrapper,
|
|
2392
2392
|
radio: radio
|
|
2393
2393
|
};
|
|
2394
2394
|
|
|
2395
2395
|
function RadioButton({ className, label, ...props }) {
|
|
2396
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("label", { "data-disabled": `${Boolean(props.disabled)}`, className: classNames(styles$
|
|
2397
|
-
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "radio", className: styles$
|
|
2396
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { "data-disabled": `${Boolean(props.disabled)}`, className: classNames(styles$d.radioWrapper, className), children: [
|
|
2397
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "radio", className: styles$d.radio, ...props }),
|
|
2398
2398
|
label
|
|
2399
2399
|
] });
|
|
2400
2400
|
}
|
|
2401
2401
|
|
|
2402
2402
|
const DEFAULT_CUSTOM_SEARCH_BUTTON_WIDTH = 64;
|
|
2403
2403
|
|
|
2404
|
-
const textFieldAreaWrapper = "
|
|
2405
|
-
const textFieldAreaLabel = "
|
|
2406
|
-
const textFieldAreaLabelSuffix = "
|
|
2407
|
-
const textFieldArea = "
|
|
2408
|
-
const styles$
|
|
2404
|
+
const textFieldAreaWrapper = "_textFieldAreaWrapper_pia91_2";
|
|
2405
|
+
const textFieldAreaLabel = "_textFieldAreaLabel_pia91_14";
|
|
2406
|
+
const textFieldAreaLabelSuffix = "_textFieldAreaLabelSuffix_pia91_24";
|
|
2407
|
+
const textFieldArea = "_textFieldArea_pia91_2";
|
|
2408
|
+
const styles$c = {
|
|
2409
2409
|
textFieldAreaWrapper: textFieldAreaWrapper,
|
|
2410
2410
|
textFieldAreaLabel: textFieldAreaLabel,
|
|
2411
2411
|
textFieldAreaLabelSuffix: textFieldAreaLabelSuffix,
|
|
@@ -2426,22 +2426,22 @@ function TextFieldArea({
|
|
|
2426
2426
|
"data-invalid": isInvalid,
|
|
2427
2427
|
"aria-invalid": isInvalid,
|
|
2428
2428
|
"data-element": "field",
|
|
2429
|
-
className: classNames(styles$
|
|
2429
|
+
className: classNames(styles$c.textFieldArea, className),
|
|
2430
2430
|
placeholder,
|
|
2431
2431
|
...props
|
|
2432
2432
|
}
|
|
2433
2433
|
);
|
|
2434
|
-
return floatingLabel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$
|
|
2435
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: props.id, className: styles$
|
|
2436
|
-
floatingLabelSuffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$
|
|
2434
|
+
return floatingLabel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$c.textFieldAreaWrapper, children: [
|
|
2435
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: props.id, className: styles$c.textFieldAreaLabel, "data-element": "label", children: floatingLabel }),
|
|
2436
|
+
floatingLabelSuffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$c.textFieldAreaLabelSuffix, "data-element": "label-suffix", children: floatingLabelSuffix }),
|
|
2437
2437
|
textFieldArea
|
|
2438
2438
|
] }) : textFieldArea;
|
|
2439
2439
|
}
|
|
2440
2440
|
|
|
2441
|
-
const textFieldInputWrapper = "
|
|
2442
|
-
const textFieldInputLabel = "
|
|
2443
|
-
const textFieldInput = "
|
|
2444
|
-
const styles$
|
|
2441
|
+
const textFieldInputWrapper = "_textFieldInputWrapper_1m8sa_2";
|
|
2442
|
+
const textFieldInputLabel = "_textFieldInputLabel_1m8sa_9";
|
|
2443
|
+
const textFieldInput = "_textFieldInput_1m8sa_2";
|
|
2444
|
+
const styles$b = {
|
|
2445
2445
|
textFieldInputWrapper: textFieldInputWrapper,
|
|
2446
2446
|
textFieldInputLabel: textFieldInputLabel,
|
|
2447
2447
|
textFieldInput: textFieldInput
|
|
@@ -2460,37 +2460,37 @@ function TextFieldInput({
|
|
|
2460
2460
|
"data-invalid": isInvalid,
|
|
2461
2461
|
"aria-invalid": isInvalid,
|
|
2462
2462
|
"data-element": "field",
|
|
2463
|
-
className: classNames(styles$
|
|
2463
|
+
className: classNames(styles$b.textFieldInput, className),
|
|
2464
2464
|
placeholder,
|
|
2465
2465
|
...props
|
|
2466
2466
|
}
|
|
2467
2467
|
);
|
|
2468
|
-
return floatingLabel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$
|
|
2469
|
-
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: props.id, className: styles$
|
|
2468
|
+
return floatingLabel ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles$b.textFieldInputWrapper, children: [
|
|
2469
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: props.id, className: styles$b.textFieldInputLabel, "data-element": "label", children: floatingLabel }),
|
|
2470
2470
|
textFieldInput
|
|
2471
2471
|
] }) : textFieldInput;
|
|
2472
2472
|
}
|
|
2473
2473
|
|
|
2474
2474
|
const textFieldLabel = "_textFieldLabel_1l2ya_1";
|
|
2475
|
-
const styles$
|
|
2475
|
+
const styles$a = {
|
|
2476
2476
|
textFieldLabel: textFieldLabel
|
|
2477
2477
|
};
|
|
2478
2478
|
|
|
2479
2479
|
function TextFieldLabel({ className, children, isRequired, ...props }) {
|
|
2480
|
-
return /* @__PURE__ */ jsxRuntime.jsx("label", { className: classNames(styles$
|
|
2480
|
+
return /* @__PURE__ */ jsxRuntime.jsx("label", { className: classNames(styles$a.textFieldLabel, className), "data-required": isRequired, ...props, children });
|
|
2481
2481
|
}
|
|
2482
2482
|
|
|
2483
2483
|
const textFieldRoot = "_textFieldRoot_cs7mv_2";
|
|
2484
2484
|
const lg$2 = "_lg_cs7mv_38";
|
|
2485
|
-
const md$
|
|
2486
|
-
const styles$
|
|
2485
|
+
const md$4 = "_md_cs7mv_70";
|
|
2486
|
+
const styles$9 = {
|
|
2487
2487
|
textFieldRoot: textFieldRoot,
|
|
2488
2488
|
lg: lg$2,
|
|
2489
|
-
md: md$
|
|
2489
|
+
md: md$4
|
|
2490
2490
|
};
|
|
2491
2491
|
|
|
2492
2492
|
function TextFieldRoot({ className, size = "lg", ...props }) {
|
|
2493
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$
|
|
2493
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$9.textFieldRoot, styles$9[size], className), ...props });
|
|
2494
2494
|
}
|
|
2495
2495
|
|
|
2496
2496
|
function TextField() {
|
|
@@ -2505,7 +2505,7 @@ const custom = "_custom_gh87y_15";
|
|
|
2505
2505
|
const icon$1 = "_icon_gh87y_25";
|
|
2506
2506
|
const inputCustomWrapper = "_inputCustomWrapper_gh87y_34";
|
|
2507
2507
|
const customButton = "_customButton_gh87y_49";
|
|
2508
|
-
const styles$
|
|
2508
|
+
const styles$8 = {
|
|
2509
2509
|
search: search,
|
|
2510
2510
|
"default": "_default_gh87y_10",
|
|
2511
2511
|
custom: custom,
|
|
@@ -2531,7 +2531,7 @@ function Search(props) {
|
|
|
2531
2531
|
value && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2532
2532
|
IconXMark.Small,
|
|
2533
2533
|
{
|
|
2534
|
-
className: styles$
|
|
2534
|
+
className: styles$8.icon,
|
|
2535
2535
|
"aria-label": "clear search",
|
|
2536
2536
|
role: "button",
|
|
2537
2537
|
onClick: () => {
|
|
@@ -2545,13 +2545,13 @@ function Search(props) {
|
|
|
2545
2545
|
}
|
|
2546
2546
|
)
|
|
2547
2547
|
] });
|
|
2548
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(TextField.Root, { size: "md", className: classNames(styles$
|
|
2548
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(TextField.Root, { size: "md", className: classNames(styles$8.search, styles$8[mode], className), children: [
|
|
2549
2549
|
mode === "default" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2550
|
-
/* @__PURE__ */ jsxRuntime.jsx(IconSearch, { className: styles$
|
|
2550
|
+
/* @__PURE__ */ jsxRuntime.jsx(IconSearch, { className: styles$8.icon, "data-element": "icon" }),
|
|
2551
2551
|
inputField
|
|
2552
2552
|
] }),
|
|
2553
2553
|
mode === "custom" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2554
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$
|
|
2554
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$8.inputCustomWrapper, children: inputField }),
|
|
2555
2555
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2556
2556
|
"button",
|
|
2557
2557
|
{
|
|
@@ -2559,11 +2559,11 @@ function Search(props) {
|
|
|
2559
2559
|
type: "button",
|
|
2560
2560
|
onClick: props.onSearch,
|
|
2561
2561
|
"data-element": "custom-button",
|
|
2562
|
-
className: styles$
|
|
2562
|
+
className: styles$8.customButton,
|
|
2563
2563
|
style: {
|
|
2564
2564
|
"--custom-button-width": `${props.buttonWidth ?? DEFAULT_CUSTOM_SEARCH_BUTTON_WIDTH}px`
|
|
2565
2565
|
},
|
|
2566
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(IconSearch, { className: classNames(styles$
|
|
2566
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconSearch, { className: classNames(styles$8.icon), "data-element": "icon" })
|
|
2567
2567
|
}
|
|
2568
2568
|
)
|
|
2569
2569
|
] })
|
|
@@ -2588,11 +2588,11 @@ function useSegmentControlContext() {
|
|
|
2588
2588
|
|
|
2589
2589
|
const segmentControlItem = "_segmentControlItem_178px_2";
|
|
2590
2590
|
const lg$1 = "_lg_178px_23";
|
|
2591
|
-
const md$
|
|
2592
|
-
const styles$
|
|
2591
|
+
const md$3 = "_md_178px_28";
|
|
2592
|
+
const styles$7 = {
|
|
2593
2593
|
segmentControlItem: segmentControlItem,
|
|
2594
2594
|
lg: lg$1,
|
|
2595
|
-
md: md$
|
|
2595
|
+
md: md$3
|
|
2596
2596
|
};
|
|
2597
2597
|
|
|
2598
2598
|
function SegmentControlItem({ className, children, value, ...props }) {
|
|
@@ -2605,7 +2605,7 @@ function SegmentControlItem({ className, children, value, ...props }) {
|
|
|
2605
2605
|
"aria-checked": value === activeValue,
|
|
2606
2606
|
"data-state": value === activeValue ? "on" : "off",
|
|
2607
2607
|
"data-value": value,
|
|
2608
|
-
className: classNames(styles$
|
|
2608
|
+
className: classNames(styles$7.segmentControlItem, styles$7[size], className),
|
|
2609
2609
|
...props,
|
|
2610
2610
|
children
|
|
2611
2611
|
}
|
|
@@ -2640,13 +2640,13 @@ function useActiveSegment(value) {
|
|
|
2640
2640
|
const segmentControlRoot = "_segmentControlRoot_pulca_8";
|
|
2641
2641
|
const showAfterDelay = "_showAfterDelay_pulca_1";
|
|
2642
2642
|
const lg = "_lg_pulca_19";
|
|
2643
|
-
const md$
|
|
2643
|
+
const md$2 = "_md_pulca_23";
|
|
2644
2644
|
const indicator$1 = "_indicator_pulca_28";
|
|
2645
|
-
const styles$
|
|
2645
|
+
const styles$6 = {
|
|
2646
2646
|
segmentControlRoot: segmentControlRoot,
|
|
2647
2647
|
showAfterDelay: showAfterDelay,
|
|
2648
2648
|
lg: lg,
|
|
2649
|
-
md: md$
|
|
2649
|
+
md: md$2,
|
|
2650
2650
|
indicator: indicator$1
|
|
2651
2651
|
};
|
|
2652
2652
|
|
|
@@ -2657,11 +2657,11 @@ function SegmentControlRoot({ className, children, value, size = "md", ...props
|
|
|
2657
2657
|
{
|
|
2658
2658
|
ref: rootRef,
|
|
2659
2659
|
role: "radiogroup",
|
|
2660
|
-
className: classNames(styles$
|
|
2660
|
+
className: classNames(styles$6.segmentControlRoot, styles$6[size], className),
|
|
2661
2661
|
...props,
|
|
2662
2662
|
children: [
|
|
2663
2663
|
children,
|
|
2664
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$
|
|
2664
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$6.indicator, styles$6[size]), style: indicatorStyle })
|
|
2665
2665
|
]
|
|
2666
2666
|
}
|
|
2667
2667
|
) });
|
|
@@ -2672,6 +2672,86 @@ function SegmentControl(props) {
|
|
|
2672
2672
|
}
|
|
2673
2673
|
SegmentControl.Item = SegmentControlItem;
|
|
2674
2674
|
|
|
2675
|
+
const stepper = "_stepper_1bwaa_2";
|
|
2676
|
+
const sm$1 = "_sm_1bwaa_10";
|
|
2677
|
+
const md$1 = "_md_1bwaa_17";
|
|
2678
|
+
const primary$1 = "_primary_1bwaa_24";
|
|
2679
|
+
const secondary$1 = "_secondary_1bwaa_34";
|
|
2680
|
+
const value = "_value_1bwaa_43";
|
|
2681
|
+
const styles$5 = {
|
|
2682
|
+
stepper: stepper,
|
|
2683
|
+
sm: sm$1,
|
|
2684
|
+
md: md$1,
|
|
2685
|
+
primary: primary$1,
|
|
2686
|
+
secondary: secondary$1,
|
|
2687
|
+
value: value
|
|
2688
|
+
};
|
|
2689
|
+
|
|
2690
|
+
function Stepper({
|
|
2691
|
+
value,
|
|
2692
|
+
onChange,
|
|
2693
|
+
min,
|
|
2694
|
+
max,
|
|
2695
|
+
step = 1,
|
|
2696
|
+
size = "md",
|
|
2697
|
+
mode = "primary",
|
|
2698
|
+
disabled,
|
|
2699
|
+
className,
|
|
2700
|
+
...props
|
|
2701
|
+
}) {
|
|
2702
|
+
const buttonColor = mode === "primary" ? "accent" : "neutral";
|
|
2703
|
+
const buttonMode = mode === "primary" ? "primary" : "tertiary";
|
|
2704
|
+
const handleStep = (direction) => {
|
|
2705
|
+
let next = value + direction * step;
|
|
2706
|
+
if (min != null) {
|
|
2707
|
+
next = Math.max(next, min);
|
|
2708
|
+
}
|
|
2709
|
+
if (max != null) {
|
|
2710
|
+
next = Math.min(next, max);
|
|
2711
|
+
}
|
|
2712
|
+
if (next !== value) {
|
|
2713
|
+
onChange(next);
|
|
2714
|
+
}
|
|
2715
|
+
};
|
|
2716
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2717
|
+
"div",
|
|
2718
|
+
{
|
|
2719
|
+
role: "group",
|
|
2720
|
+
"aria-label": "Stepper",
|
|
2721
|
+
className: classNames(styles$5.stepper, styles$5[size], styles$5[mode], className),
|
|
2722
|
+
"data-disabled": disabled,
|
|
2723
|
+
...props,
|
|
2724
|
+
children: [
|
|
2725
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2726
|
+
Button,
|
|
2727
|
+
{
|
|
2728
|
+
color: buttonColor,
|
|
2729
|
+
mode: buttonMode,
|
|
2730
|
+
size,
|
|
2731
|
+
"aria-label": "Decrease value",
|
|
2732
|
+
disabled: disabled || min != null && value <= min,
|
|
2733
|
+
onClick: () => handleStep(-1),
|
|
2734
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconMinus, {})
|
|
2735
|
+
}
|
|
2736
|
+
),
|
|
2737
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: styles$5.value, "aria-live": "polite", children: value }),
|
|
2738
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2739
|
+
Button,
|
|
2740
|
+
{
|
|
2741
|
+
color: buttonColor,
|
|
2742
|
+
mode: buttonMode,
|
|
2743
|
+
size,
|
|
2744
|
+
"aria-label": "Increase value",
|
|
2745
|
+
disabled: disabled || max != null && value >= max,
|
|
2746
|
+
onClick: () => handleStep(1),
|
|
2747
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(IconPlus, {})
|
|
2748
|
+
}
|
|
2749
|
+
)
|
|
2750
|
+
]
|
|
2751
|
+
}
|
|
2752
|
+
);
|
|
2753
|
+
}
|
|
2754
|
+
|
|
2675
2755
|
const switchWrapper = "_switchWrapper_1yukb_2";
|
|
2676
2756
|
const icon = "_icon_1yukb_25";
|
|
2677
2757
|
const styles$4 = {
|
|
@@ -2982,6 +3062,7 @@ exports.ProgressBar = ProgressBar;
|
|
|
2982
3062
|
exports.RadioButton = RadioButton;
|
|
2983
3063
|
exports.Search = Search;
|
|
2984
3064
|
exports.SegmentControl = SegmentControl;
|
|
3065
|
+
exports.Stepper = Stepper;
|
|
2985
3066
|
exports.Switch = Switch;
|
|
2986
3067
|
exports.Tabs = Tabs;
|
|
2987
3068
|
exports.Tag = Tag;
|