@k3-tech/react-kit 0.0.59 → 0.0.61
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.js +978 -851
- package/dist/kit/builder/data-table/components/DataTable.d.ts +7 -1
- package/dist/kit/builder/data-table/components/DataTable.d.ts.map +1 -1
- package/dist/kit/builder/form/components/FormBuilderField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/ArrayField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/CheckboxField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DateField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DatePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DateRangePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DateTimePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/DateTimeRangePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/FileField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/MonthPickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/MonthRangePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/NumberField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/RadioField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/SelectField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/SwitchField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/TextField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/TextareaField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/TimePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/components/fields/TimeRangePickerField.d.ts.map +1 -1
- package/dist/kit/builder/form/types.d.ts +6 -1
- package/dist/kit/builder/form/types.d.ts.map +1 -1
- package/dist/kit/components/autocomplete/Autocomplete.d.ts +2 -1
- package/dist/kit/components/autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/kit/components/fileuploader/FileUploader.d.ts +1 -1
- package/dist/kit/components/fileuploader/FileUploader.d.ts.map +1 -1
- package/dist/kit/components/fileuploader/types.d.ts +1 -0
- package/dist/kit/components/fileuploader/types.d.ts.map +1 -1
- package/dist/kit/components/info-tooltip/InfoTooltip.d.ts +6 -0
- package/dist/kit/components/info-tooltip/InfoTooltip.d.ts.map +1 -0
- package/dist/kit/themes/clean-slate.css +6 -2
- package/dist/kit/themes/default.css +6 -2
- package/dist/kit/themes/minimal-modern.css +6 -2
- package/dist/kit/themes/spotify.css +6 -2
- package/package.json +1 -1
- package/src/kit/builder/data-table/components/DataTable.tsx +110 -97
- package/src/kit/builder/form/components/FormBuilderField.tsx +17 -2
- package/src/kit/builder/form/components/fields/ArrayField.tsx +1 -0
- package/src/kit/builder/form/components/fields/CheckboxField.tsx +21 -8
- package/src/kit/builder/form/components/fields/DateField.tsx +1 -0
- package/src/kit/builder/form/components/fields/DatePickerField.tsx +1 -0
- package/src/kit/builder/form/components/fields/DateRangePickerField.tsx +3 -2
- package/src/kit/builder/form/components/fields/DateTimePickerField.tsx +1 -0
- package/src/kit/builder/form/components/fields/DateTimeRangePickerField.tsx +1 -0
- package/src/kit/builder/form/components/fields/FileField.tsx +1 -0
- package/src/kit/builder/form/components/fields/MonthPickerField.tsx +1 -0
- package/src/kit/builder/form/components/fields/MonthRangePickerField.tsx +1 -0
- package/src/kit/builder/form/components/fields/NumberField.tsx +70 -2
- package/src/kit/builder/form/components/fields/RadioField.tsx +1 -0
- package/src/kit/builder/form/components/fields/SelectField.tsx +1 -0
- package/src/kit/builder/form/components/fields/SwitchField.tsx +11 -0
- package/src/kit/builder/form/components/fields/TextField.tsx +1 -0
- package/src/kit/builder/form/components/fields/TextareaField.tsx +2 -1
- package/src/kit/builder/form/components/fields/TimePickerField.tsx +1 -0
- package/src/kit/builder/form/components/fields/TimeRangePickerField.tsx +1 -0
- package/src/kit/builder/form/types.ts +6 -1
- package/src/kit/components/autocomplete/Autocomplete.tsx +6 -3
- package/src/kit/components/fileuploader/FileUploader.tsx +2 -0
- package/src/kit/components/fileuploader/types.ts +2 -0
- package/src/kit/components/info-tooltip/InfoTooltip.tsx +18 -0
package/dist/index.js
CHANGED
|
@@ -4040,215 +4040,215 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
4040
4040
|
* This source code is licensed under the ISC license.
|
|
4041
4041
|
* See the LICENSE file in the root directory of this source tree.
|
|
4042
4042
|
*/
|
|
4043
|
-
const __iconNode$
|
|
4043
|
+
const __iconNode$K = [
|
|
4044
4044
|
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
4045
4045
|
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
4046
4046
|
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
4047
4047
|
];
|
|
4048
|
-
const Archive = createLucideIcon("archive", __iconNode$
|
|
4048
|
+
const Archive = createLucideIcon("archive", __iconNode$K);
|
|
4049
4049
|
/**
|
|
4050
4050
|
* @license lucide-react v0.540.0 - ISC
|
|
4051
4051
|
*
|
|
4052
4052
|
* This source code is licensed under the ISC license.
|
|
4053
4053
|
* See the LICENSE file in the root directory of this source tree.
|
|
4054
4054
|
*/
|
|
4055
|
-
const __iconNode$
|
|
4055
|
+
const __iconNode$J = [
|
|
4056
4056
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
4057
4057
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
4058
4058
|
];
|
|
4059
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
4059
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$J);
|
|
4060
4060
|
/**
|
|
4061
4061
|
* @license lucide-react v0.540.0 - ISC
|
|
4062
4062
|
*
|
|
4063
4063
|
* This source code is licensed under the ISC license.
|
|
4064
4064
|
* See the LICENSE file in the root directory of this source tree.
|
|
4065
4065
|
*/
|
|
4066
|
-
const __iconNode$
|
|
4066
|
+
const __iconNode$I = [
|
|
4067
4067
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
4068
4068
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
4069
4069
|
];
|
|
4070
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$
|
|
4070
|
+
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$I);
|
|
4071
4071
|
/**
|
|
4072
4072
|
* @license lucide-react v0.540.0 - ISC
|
|
4073
4073
|
*
|
|
4074
4074
|
* This source code is licensed under the ISC license.
|
|
4075
4075
|
* See the LICENSE file in the root directory of this source tree.
|
|
4076
4076
|
*/
|
|
4077
|
-
const __iconNode$
|
|
4077
|
+
const __iconNode$H = [
|
|
4078
4078
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
4079
4079
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
4080
4080
|
];
|
|
4081
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
4081
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$H);
|
|
4082
4082
|
/**
|
|
4083
4083
|
* @license lucide-react v0.540.0 - ISC
|
|
4084
4084
|
*
|
|
4085
4085
|
* This source code is licensed under the ISC license.
|
|
4086
4086
|
* See the LICENSE file in the root directory of this source tree.
|
|
4087
4087
|
*/
|
|
4088
|
-
const __iconNode$
|
|
4088
|
+
const __iconNode$G = [
|
|
4089
4089
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
4090
4090
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
4091
4091
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
4092
4092
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
4093
4093
|
];
|
|
4094
|
-
const Calendar$1 = createLucideIcon("calendar", __iconNode$
|
|
4094
|
+
const Calendar$1 = createLucideIcon("calendar", __iconNode$G);
|
|
4095
4095
|
/**
|
|
4096
4096
|
* @license lucide-react v0.540.0 - ISC
|
|
4097
4097
|
*
|
|
4098
4098
|
* This source code is licensed under the ISC license.
|
|
4099
4099
|
* See the LICENSE file in the root directory of this source tree.
|
|
4100
4100
|
*/
|
|
4101
|
-
const __iconNode$
|
|
4102
|
-
const Check = createLucideIcon("check", __iconNode$
|
|
4101
|
+
const __iconNode$F = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
4102
|
+
const Check = createLucideIcon("check", __iconNode$F);
|
|
4103
4103
|
/**
|
|
4104
4104
|
* @license lucide-react v0.540.0 - ISC
|
|
4105
4105
|
*
|
|
4106
4106
|
* This source code is licensed under the ISC license.
|
|
4107
4107
|
* See the LICENSE file in the root directory of this source tree.
|
|
4108
4108
|
*/
|
|
4109
|
-
const __iconNode$
|
|
4110
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
4109
|
+
const __iconNode$E = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
4110
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$E);
|
|
4111
4111
|
/**
|
|
4112
4112
|
* @license lucide-react v0.540.0 - ISC
|
|
4113
4113
|
*
|
|
4114
4114
|
* This source code is licensed under the ISC license.
|
|
4115
4115
|
* See the LICENSE file in the root directory of this source tree.
|
|
4116
4116
|
*/
|
|
4117
|
-
const __iconNode$
|
|
4118
|
-
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$
|
|
4117
|
+
const __iconNode$D = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
|
|
4118
|
+
const ChevronLeft = createLucideIcon("chevron-left", __iconNode$D);
|
|
4119
4119
|
/**
|
|
4120
4120
|
* @license lucide-react v0.540.0 - ISC
|
|
4121
4121
|
*
|
|
4122
4122
|
* This source code is licensed under the ISC license.
|
|
4123
4123
|
* See the LICENSE file in the root directory of this source tree.
|
|
4124
4124
|
*/
|
|
4125
|
-
const __iconNode$
|
|
4126
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
4125
|
+
const __iconNode$C = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
4126
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$C);
|
|
4127
4127
|
/**
|
|
4128
4128
|
* @license lucide-react v0.540.0 - ISC
|
|
4129
4129
|
*
|
|
4130
4130
|
* This source code is licensed under the ISC license.
|
|
4131
4131
|
* See the LICENSE file in the root directory of this source tree.
|
|
4132
4132
|
*/
|
|
4133
|
-
const __iconNode$
|
|
4134
|
-
const ChevronUp = createLucideIcon("chevron-up", __iconNode$
|
|
4133
|
+
const __iconNode$B = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
4134
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$B);
|
|
4135
4135
|
/**
|
|
4136
4136
|
* @license lucide-react v0.540.0 - ISC
|
|
4137
4137
|
*
|
|
4138
4138
|
* This source code is licensed under the ISC license.
|
|
4139
4139
|
* See the LICENSE file in the root directory of this source tree.
|
|
4140
4140
|
*/
|
|
4141
|
-
const __iconNode$
|
|
4141
|
+
const __iconNode$A = [
|
|
4142
4142
|
["path", { d: "m11 17-5-5 5-5", key: "13zhaf" }],
|
|
4143
4143
|
["path", { d: "m18 17-5-5 5-5", key: "h8a8et" }]
|
|
4144
4144
|
];
|
|
4145
|
-
const ChevronsLeft = createLucideIcon("chevrons-left", __iconNode$
|
|
4145
|
+
const ChevronsLeft = createLucideIcon("chevrons-left", __iconNode$A);
|
|
4146
4146
|
/**
|
|
4147
4147
|
* @license lucide-react v0.540.0 - ISC
|
|
4148
4148
|
*
|
|
4149
4149
|
* This source code is licensed under the ISC license.
|
|
4150
4150
|
* See the LICENSE file in the root directory of this source tree.
|
|
4151
4151
|
*/
|
|
4152
|
-
const __iconNode$
|
|
4152
|
+
const __iconNode$z = [
|
|
4153
4153
|
["path", { d: "m6 17 5-5-5-5", key: "xnjwq" }],
|
|
4154
4154
|
["path", { d: "m13 17 5-5-5-5", key: "17xmmf" }]
|
|
4155
4155
|
];
|
|
4156
|
-
const ChevronsRight = createLucideIcon("chevrons-right", __iconNode$
|
|
4156
|
+
const ChevronsRight = createLucideIcon("chevrons-right", __iconNode$z);
|
|
4157
4157
|
/**
|
|
4158
4158
|
* @license lucide-react v0.540.0 - ISC
|
|
4159
4159
|
*
|
|
4160
4160
|
* This source code is licensed under the ISC license.
|
|
4161
4161
|
* See the LICENSE file in the root directory of this source tree.
|
|
4162
4162
|
*/
|
|
4163
|
-
const __iconNode$
|
|
4163
|
+
const __iconNode$y = [
|
|
4164
4164
|
["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
|
|
4165
4165
|
["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
|
|
4166
4166
|
];
|
|
4167
|
-
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$
|
|
4167
|
+
const ChevronsUpDown = createLucideIcon("chevrons-up-down", __iconNode$y);
|
|
4168
4168
|
/**
|
|
4169
4169
|
* @license lucide-react v0.540.0 - ISC
|
|
4170
4170
|
*
|
|
4171
4171
|
* This source code is licensed under the ISC license.
|
|
4172
4172
|
* See the LICENSE file in the root directory of this source tree.
|
|
4173
4173
|
*/
|
|
4174
|
-
const __iconNode$
|
|
4174
|
+
const __iconNode$x = [
|
|
4175
4175
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
4176
4176
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
4177
4177
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
4178
4178
|
];
|
|
4179
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
4179
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$x);
|
|
4180
4180
|
/**
|
|
4181
4181
|
* @license lucide-react v0.540.0 - ISC
|
|
4182
4182
|
*
|
|
4183
4183
|
* This source code is licensed under the ISC license.
|
|
4184
4184
|
* See the LICENSE file in the root directory of this source tree.
|
|
4185
4185
|
*/
|
|
4186
|
-
const __iconNode$
|
|
4186
|
+
const __iconNode$w = [
|
|
4187
4187
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
4188
4188
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
4189
4189
|
];
|
|
4190
|
-
const CircleCheck = createLucideIcon("circle-check", __iconNode$
|
|
4190
|
+
const CircleCheck = createLucideIcon("circle-check", __iconNode$w);
|
|
4191
4191
|
/**
|
|
4192
4192
|
* @license lucide-react v0.540.0 - ISC
|
|
4193
4193
|
*
|
|
4194
4194
|
* This source code is licensed under the ISC license.
|
|
4195
4195
|
* See the LICENSE file in the root directory of this source tree.
|
|
4196
4196
|
*/
|
|
4197
|
-
const __iconNode$
|
|
4197
|
+
const __iconNode$v = [
|
|
4198
4198
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
4199
4199
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
4200
4200
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
4201
4201
|
];
|
|
4202
|
-
const CircleX = createLucideIcon("circle-x", __iconNode$
|
|
4202
|
+
const CircleX = createLucideIcon("circle-x", __iconNode$v);
|
|
4203
4203
|
/**
|
|
4204
4204
|
* @license lucide-react v0.540.0 - ISC
|
|
4205
4205
|
*
|
|
4206
4206
|
* This source code is licensed under the ISC license.
|
|
4207
4207
|
* See the LICENSE file in the root directory of this source tree.
|
|
4208
4208
|
*/
|
|
4209
|
-
const __iconNode$
|
|
4210
|
-
const Circle = createLucideIcon("circle", __iconNode$
|
|
4209
|
+
const __iconNode$u = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]];
|
|
4210
|
+
const Circle = createLucideIcon("circle", __iconNode$u);
|
|
4211
4211
|
/**
|
|
4212
4212
|
* @license lucide-react v0.540.0 - ISC
|
|
4213
4213
|
*
|
|
4214
4214
|
* This source code is licensed under the ISC license.
|
|
4215
4215
|
* See the LICENSE file in the root directory of this source tree.
|
|
4216
4216
|
*/
|
|
4217
|
-
const __iconNode$
|
|
4217
|
+
const __iconNode$t = [
|
|
4218
4218
|
["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
|
|
4219
4219
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
|
|
4220
4220
|
];
|
|
4221
|
-
const Clock = createLucideIcon("clock", __iconNode$
|
|
4221
|
+
const Clock = createLucideIcon("clock", __iconNode$t);
|
|
4222
4222
|
/**
|
|
4223
4223
|
* @license lucide-react v0.540.0 - ISC
|
|
4224
4224
|
*
|
|
4225
4225
|
* This source code is licensed under the ISC license.
|
|
4226
4226
|
* See the LICENSE file in the root directory of this source tree.
|
|
4227
4227
|
*/
|
|
4228
|
-
const __iconNode$
|
|
4228
|
+
const __iconNode$s = [
|
|
4229
4229
|
["path", { d: "M12 13v8", key: "1l5pq0" }],
|
|
4230
4230
|
["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
|
|
4231
4231
|
["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
|
|
4232
4232
|
];
|
|
4233
|
-
const CloudUpload = createLucideIcon("cloud-upload", __iconNode$
|
|
4233
|
+
const CloudUpload = createLucideIcon("cloud-upload", __iconNode$s);
|
|
4234
4234
|
/**
|
|
4235
4235
|
* @license lucide-react v0.540.0 - ISC
|
|
4236
4236
|
*
|
|
4237
4237
|
* This source code is licensed under the ISC license.
|
|
4238
4238
|
* See the LICENSE file in the root directory of this source tree.
|
|
4239
4239
|
*/
|
|
4240
|
-
const __iconNode$
|
|
4240
|
+
const __iconNode$r = [
|
|
4241
4241
|
["path", { d: "M20 4v7a4 4 0 0 1-4 4H4", key: "6o5b7l" }],
|
|
4242
4242
|
["path", { d: "m9 10-5 5 5 5", key: "1kshq7" }]
|
|
4243
4243
|
];
|
|
4244
|
-
const CornerDownLeft = createLucideIcon("corner-down-left", __iconNode$
|
|
4244
|
+
const CornerDownLeft = createLucideIcon("corner-down-left", __iconNode$r);
|
|
4245
4245
|
/**
|
|
4246
4246
|
* @license lucide-react v0.540.0 - ISC
|
|
4247
4247
|
*
|
|
4248
4248
|
* This source code is licensed under the ISC license.
|
|
4249
4249
|
* See the LICENSE file in the root directory of this source tree.
|
|
4250
4250
|
*/
|
|
4251
|
-
const __iconNode$
|
|
4251
|
+
const __iconNode$q = [
|
|
4252
4252
|
[
|
|
4253
4253
|
"path",
|
|
4254
4254
|
{
|
|
@@ -4259,38 +4259,38 @@ const __iconNode$p = [
|
|
|
4259
4259
|
["path", { d: "m12 9 6 6", key: "anjzzh" }],
|
|
4260
4260
|
["path", { d: "m18 9-6 6", key: "1fp51s" }]
|
|
4261
4261
|
];
|
|
4262
|
-
const Delete = createLucideIcon("delete", __iconNode$
|
|
4262
|
+
const Delete = createLucideIcon("delete", __iconNode$q);
|
|
4263
4263
|
/**
|
|
4264
4264
|
* @license lucide-react v0.540.0 - ISC
|
|
4265
4265
|
*
|
|
4266
4266
|
* This source code is licensed under the ISC license.
|
|
4267
4267
|
* See the LICENSE file in the root directory of this source tree.
|
|
4268
4268
|
*/
|
|
4269
|
-
const __iconNode$
|
|
4269
|
+
const __iconNode$p = [
|
|
4270
4270
|
["path", { d: "M12 15V3", key: "m9g1x1" }],
|
|
4271
4271
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
4272
4272
|
["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
|
|
4273
4273
|
];
|
|
4274
|
-
const Download = createLucideIcon("download", __iconNode$
|
|
4274
|
+
const Download = createLucideIcon("download", __iconNode$p);
|
|
4275
4275
|
/**
|
|
4276
4276
|
* @license lucide-react v0.540.0 - ISC
|
|
4277
4277
|
*
|
|
4278
4278
|
* This source code is licensed under the ISC license.
|
|
4279
4279
|
* See the LICENSE file in the root directory of this source tree.
|
|
4280
4280
|
*/
|
|
4281
|
-
const __iconNode$
|
|
4281
|
+
const __iconNode$o = [
|
|
4282
4282
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
4283
4283
|
["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
|
|
4284
4284
|
["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
|
|
4285
4285
|
];
|
|
4286
|
-
const Ellipsis = createLucideIcon("ellipsis", __iconNode$
|
|
4286
|
+
const Ellipsis = createLucideIcon("ellipsis", __iconNode$o);
|
|
4287
4287
|
/**
|
|
4288
4288
|
* @license lucide-react v0.540.0 - ISC
|
|
4289
4289
|
*
|
|
4290
4290
|
* This source code is licensed under the ISC license.
|
|
4291
4291
|
* See the LICENSE file in the root directory of this source tree.
|
|
4292
4292
|
*/
|
|
4293
|
-
const __iconNode$
|
|
4293
|
+
const __iconNode$n = [
|
|
4294
4294
|
[
|
|
4295
4295
|
"path",
|
|
4296
4296
|
{
|
|
@@ -4308,52 +4308,52 @@ const __iconNode$m = [
|
|
|
4308
4308
|
],
|
|
4309
4309
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
4310
4310
|
];
|
|
4311
|
-
const EyeOff = createLucideIcon("eye-off", __iconNode$
|
|
4311
|
+
const EyeOff = createLucideIcon("eye-off", __iconNode$n);
|
|
4312
4312
|
/**
|
|
4313
4313
|
* @license lucide-react v0.540.0 - ISC
|
|
4314
4314
|
*
|
|
4315
4315
|
* This source code is licensed under the ISC license.
|
|
4316
4316
|
* See the LICENSE file in the root directory of this source tree.
|
|
4317
4317
|
*/
|
|
4318
|
-
const __iconNode$
|
|
4318
|
+
const __iconNode$m = [
|
|
4319
4319
|
["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
|
|
4320
4320
|
["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }],
|
|
4321
4321
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
4322
4322
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z", key: "1mlx9k" }]
|
|
4323
4323
|
];
|
|
4324
|
-
const FileCode = createLucideIcon("file-code", __iconNode$
|
|
4324
|
+
const FileCode = createLucideIcon("file-code", __iconNode$m);
|
|
4325
4325
|
/**
|
|
4326
4326
|
* @license lucide-react v0.540.0 - ISC
|
|
4327
4327
|
*
|
|
4328
4328
|
* This source code is licensed under the ISC license.
|
|
4329
4329
|
* See the LICENSE file in the root directory of this source tree.
|
|
4330
4330
|
*/
|
|
4331
|
-
const __iconNode$
|
|
4331
|
+
const __iconNode$l = [
|
|
4332
4332
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
4333
4333
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
4334
4334
|
["path", { d: "M10 9H8", key: "b1mrlr" }],
|
|
4335
4335
|
["path", { d: "M16 13H8", key: "t4e002" }],
|
|
4336
4336
|
["path", { d: "M16 17H8", key: "z1uh3a" }]
|
|
4337
4337
|
];
|
|
4338
|
-
const FileText = createLucideIcon("file-text", __iconNode$
|
|
4338
|
+
const FileText = createLucideIcon("file-text", __iconNode$l);
|
|
4339
4339
|
/**
|
|
4340
4340
|
* @license lucide-react v0.540.0 - ISC
|
|
4341
4341
|
*
|
|
4342
4342
|
* This source code is licensed under the ISC license.
|
|
4343
4343
|
* See the LICENSE file in the root directory of this source tree.
|
|
4344
4344
|
*/
|
|
4345
|
-
const __iconNode$
|
|
4345
|
+
const __iconNode$k = [
|
|
4346
4346
|
["path", { d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z", key: "1rqfz7" }],
|
|
4347
4347
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }]
|
|
4348
4348
|
];
|
|
4349
|
-
const File$1 = createLucideIcon("file", __iconNode$
|
|
4349
|
+
const File$1 = createLucideIcon("file", __iconNode$k);
|
|
4350
4350
|
/**
|
|
4351
4351
|
* @license lucide-react v0.540.0 - ISC
|
|
4352
4352
|
*
|
|
4353
4353
|
* This source code is licensed under the ISC license.
|
|
4354
4354
|
* See the LICENSE file in the root directory of this source tree.
|
|
4355
4355
|
*/
|
|
4356
|
-
const __iconNode$
|
|
4356
|
+
const __iconNode$j = [
|
|
4357
4357
|
["circle", { cx: "9", cy: "12", r: "1", key: "1vctgf" }],
|
|
4358
4358
|
["circle", { cx: "9", cy: "5", r: "1", key: "hp0tcf" }],
|
|
4359
4359
|
["circle", { cx: "9", cy: "19", r: "1", key: "fkjjf6" }],
|
|
@@ -4361,19 +4361,31 @@ const __iconNode$i = [
|
|
|
4361
4361
|
["circle", { cx: "15", cy: "5", r: "1", key: "19l28e" }],
|
|
4362
4362
|
["circle", { cx: "15", cy: "19", r: "1", key: "f4zoj3" }]
|
|
4363
4363
|
];
|
|
4364
|
-
const GripVertical = createLucideIcon("grip-vertical", __iconNode$
|
|
4364
|
+
const GripVertical = createLucideIcon("grip-vertical", __iconNode$j);
|
|
4365
4365
|
/**
|
|
4366
4366
|
* @license lucide-react v0.540.0 - ISC
|
|
4367
4367
|
*
|
|
4368
4368
|
* This source code is licensed under the ISC license.
|
|
4369
4369
|
* See the LICENSE file in the root directory of this source tree.
|
|
4370
4370
|
*/
|
|
4371
|
-
const __iconNode$
|
|
4371
|
+
const __iconNode$i = [
|
|
4372
4372
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
4373
4373
|
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
4374
4374
|
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
4375
4375
|
];
|
|
4376
|
-
const Image$2 = createLucideIcon("image", __iconNode$
|
|
4376
|
+
const Image$2 = createLucideIcon("image", __iconNode$i);
|
|
4377
|
+
/**
|
|
4378
|
+
* @license lucide-react v0.540.0 - ISC
|
|
4379
|
+
*
|
|
4380
|
+
* This source code is licensed under the ISC license.
|
|
4381
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
4382
|
+
*/
|
|
4383
|
+
const __iconNode$h = [
|
|
4384
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
4385
|
+
["path", { d: "M12 16v-4", key: "1dtifu" }],
|
|
4386
|
+
["path", { d: "M12 8h.01", key: "e9boi3" }]
|
|
4387
|
+
];
|
|
4388
|
+
const Info = createLucideIcon("info", __iconNode$h);
|
|
4377
4389
|
/**
|
|
4378
4390
|
* @license lucide-react v0.540.0 - ISC
|
|
4379
4391
|
*
|
|
@@ -23564,6 +23576,7 @@ function Autocomplete({
|
|
|
23564
23576
|
defaultValue,
|
|
23565
23577
|
allowCustomValue = false,
|
|
23566
23578
|
clearable = true,
|
|
23579
|
+
dataTestID,
|
|
23567
23580
|
initialSelectedOptions,
|
|
23568
23581
|
loadSelected
|
|
23569
23582
|
}, ref) {
|
|
@@ -23889,7 +23902,7 @@ function Autocomplete({
|
|
|
23889
23902
|
{
|
|
23890
23903
|
inert: disabled,
|
|
23891
23904
|
className: cn$1(
|
|
23892
|
-
"flex min-h-
|
|
23905
|
+
"flex min-h-9 items-center gap-2 rounded-md border border-border bg-background px-3 py-2 text-sm",
|
|
23893
23906
|
"ring-offset-background",
|
|
23894
23907
|
"focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
23895
23908
|
disabled && "cursor-not-allowed opacity-50",
|
|
@@ -23938,6 +23951,7 @@ function Autocomplete({
|
|
|
23938
23951
|
}
|
|
23939
23952
|
}
|
|
23940
23953
|
}),
|
|
23954
|
+
"data-testid": dataTestID,
|
|
23941
23955
|
className: cn$1(
|
|
23942
23956
|
"flex-1 bg-transparent outline-none placeholder:text-muted-foreground",
|
|
23943
23957
|
width ? "w-full" : "min-w-[120px]"
|
|
@@ -24116,7 +24130,8 @@ function TextField({
|
|
|
24116
24130
|
placeholder: field.placeholder,
|
|
24117
24131
|
type,
|
|
24118
24132
|
value: value || "",
|
|
24119
|
-
onChange: (e2) => onChange(e2.target.value)
|
|
24133
|
+
onChange: (e2) => onChange(e2.target.value),
|
|
24134
|
+
"data-testid": field.dataTestID
|
|
24120
24135
|
}
|
|
24121
24136
|
);
|
|
24122
24137
|
}
|
|
@@ -24126,15 +24141,64 @@ function NumberField({
|
|
|
24126
24141
|
onChange,
|
|
24127
24142
|
className
|
|
24128
24143
|
}) {
|
|
24144
|
+
const innerValue = value;
|
|
24145
|
+
const [displayValue, setDisplayValue] = useState(
|
|
24146
|
+
(Number(innerValue) || "").toLocaleString("id-ID")
|
|
24147
|
+
);
|
|
24148
|
+
if (field.numberMode === "currency") {
|
|
24149
|
+
const parseAndFormatIDRInput = (input) => {
|
|
24150
|
+
const cleaned = input.replace(/[^\d.,]/g, "");
|
|
24151
|
+
if (!cleaned) {
|
|
24152
|
+
return { display: "", numeric: 0 };
|
|
24153
|
+
}
|
|
24154
|
+
const hasDecimalSeparator = cleaned.includes(",");
|
|
24155
|
+
const sepIndex = cleaned.lastIndexOf(",");
|
|
24156
|
+
const rawInteger = hasDecimalSeparator ? cleaned.slice(0, Math.max(0, sepIndex)) : cleaned;
|
|
24157
|
+
const rawFraction = hasDecimalSeparator ? cleaned.slice(sepIndex + 1) : "";
|
|
24158
|
+
const integerDigits = rawInteger.replace(/\D/g, "");
|
|
24159
|
+
const fractionDigits = rawFraction.replace(/\D/g, "");
|
|
24160
|
+
const safeInteger = integerDigits || "0";
|
|
24161
|
+
const groupedInteger = Number(safeInteger).toLocaleString("id-ID");
|
|
24162
|
+
const display = hasDecimalSeparator ? `${groupedInteger},${fractionDigits}` : groupedInteger;
|
|
24163
|
+
const numeric = Number(
|
|
24164
|
+
fractionDigits ? `${safeInteger}.${fractionDigits}` : safeInteger
|
|
24165
|
+
);
|
|
24166
|
+
return {
|
|
24167
|
+
display,
|
|
24168
|
+
numeric: Number.isFinite(numeric) ? numeric : 0
|
|
24169
|
+
};
|
|
24170
|
+
};
|
|
24171
|
+
const handleInputChange = (e2) => {
|
|
24172
|
+
const { display, numeric } = parseAndFormatIDRInput(
|
|
24173
|
+
e2.currentTarget.value
|
|
24174
|
+
);
|
|
24175
|
+
setDisplayValue(display);
|
|
24176
|
+
onChange(numeric);
|
|
24177
|
+
};
|
|
24178
|
+
return /* @__PURE__ */ jsx(
|
|
24179
|
+
Input,
|
|
24180
|
+
{
|
|
24181
|
+
type: "text",
|
|
24182
|
+
inputMode: "decimal",
|
|
24183
|
+
value: displayValue,
|
|
24184
|
+
onChange: handleInputChange,
|
|
24185
|
+
className: "min-w-[120px] text-right bg-background text-foreground",
|
|
24186
|
+
"data-testid": field.dataTestID
|
|
24187
|
+
}
|
|
24188
|
+
);
|
|
24189
|
+
}
|
|
24129
24190
|
return /* @__PURE__ */ jsx(
|
|
24130
24191
|
Input,
|
|
24131
24192
|
{
|
|
24193
|
+
"data-testid": field.dataTestID,
|
|
24132
24194
|
className,
|
|
24133
24195
|
disabled: field.disabled || field.readOnly,
|
|
24134
24196
|
placeholder: field.placeholder,
|
|
24135
24197
|
type: "number",
|
|
24136
|
-
value:
|
|
24137
|
-
onChange: (e2) => onChange(
|
|
24198
|
+
value: innerValue ?? "",
|
|
24199
|
+
onChange: (e2) => onChange(
|
|
24200
|
+
typeof e2.currentTarget.valueAsNumber === "number" ? e2.currentTarget.valueAsNumber : null
|
|
24201
|
+
)
|
|
24138
24202
|
}
|
|
24139
24203
|
);
|
|
24140
24204
|
}
|
|
@@ -24165,7 +24229,8 @@ function TextareaField({
|
|
|
24165
24229
|
placeholder: field.placeholder,
|
|
24166
24230
|
value: value || "",
|
|
24167
24231
|
onChange: (e2) => onChange(e2.target.value),
|
|
24168
|
-
rows: 4
|
|
24232
|
+
rows: field.rows || 4,
|
|
24233
|
+
"data-testid": field.dataTestID
|
|
24169
24234
|
}
|
|
24170
24235
|
);
|
|
24171
24236
|
}
|
|
@@ -25515,6 +25580,7 @@ function SelectField({
|
|
|
25515
25580
|
value: toUiValue(value),
|
|
25516
25581
|
onValueChange: (val) => onChange(fromUiValue(val)),
|
|
25517
25582
|
disabled: field.disabled || field.readOnly,
|
|
25583
|
+
"data-testid": field.dataTestID,
|
|
25518
25584
|
children: [
|
|
25519
25585
|
/* @__PURE__ */ jsx(SelectTrigger, { className, children: /* @__PURE__ */ jsx(SelectValue, { placeholder: field.placeholder }) }),
|
|
25520
25586
|
/* @__PURE__ */ jsx(SelectContent, { children: (_a2 = field.options) == null ? void 0 : _a2.map((option) => /* @__PURE__ */ jsx(
|
|
@@ -25529,162 +25595,701 @@ function SelectField({
|
|
|
25529
25595
|
}
|
|
25530
25596
|
);
|
|
25531
25597
|
}
|
|
25532
|
-
|
|
25533
|
-
|
|
25534
|
-
|
|
25535
|
-
|
|
25536
|
-
|
|
25537
|
-
|
|
25538
|
-
|
|
25539
|
-
|
|
25540
|
-
|
|
25541
|
-
|
|
25542
|
-
|
|
25543
|
-
|
|
25544
|
-
|
|
25545
|
-
|
|
25546
|
-
|
|
25547
|
-
|
|
25548
|
-
|
|
25549
|
-
|
|
25550
|
-
|
|
25551
|
-
|
|
25552
|
-
|
|
25553
|
-
|
|
25554
|
-
|
|
25555
|
-
|
|
25556
|
-
|
|
25557
|
-
|
|
25558
|
-
|
|
25559
|
-
|
|
25560
|
-
|
|
25561
|
-
|
|
25562
|
-
|
|
25563
|
-
|
|
25564
|
-
|
|
25565
|
-
|
|
25566
|
-
|
|
25567
|
-
|
|
25568
|
-
|
|
25598
|
+
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
25599
|
+
createPopperScope
|
|
25600
|
+
]);
|
|
25601
|
+
var usePopperScope$2 = createPopperScope();
|
|
25602
|
+
var PROVIDER_NAME = "TooltipProvider";
|
|
25603
|
+
var DEFAULT_DELAY_DURATION = 700;
|
|
25604
|
+
var TOOLTIP_OPEN = "tooltip.open";
|
|
25605
|
+
var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);
|
|
25606
|
+
var TooltipProvider$1 = (props2) => {
|
|
25607
|
+
const {
|
|
25608
|
+
__scopeTooltip,
|
|
25609
|
+
delayDuration = DEFAULT_DELAY_DURATION,
|
|
25610
|
+
skipDelayDuration = 300,
|
|
25611
|
+
disableHoverableContent = false,
|
|
25612
|
+
children
|
|
25613
|
+
} = props2;
|
|
25614
|
+
const isOpenDelayedRef = React.useRef(true);
|
|
25615
|
+
const isPointerInTransitRef = React.useRef(false);
|
|
25616
|
+
const skipDelayTimerRef = React.useRef(0);
|
|
25617
|
+
React.useEffect(() => {
|
|
25618
|
+
const skipDelayTimer = skipDelayTimerRef.current;
|
|
25619
|
+
return () => window.clearTimeout(skipDelayTimer);
|
|
25620
|
+
}, []);
|
|
25621
|
+
return /* @__PURE__ */ jsx(
|
|
25622
|
+
TooltipProviderContextProvider,
|
|
25623
|
+
{
|
|
25624
|
+
scope: __scopeTooltip,
|
|
25625
|
+
isOpenDelayedRef,
|
|
25626
|
+
delayDuration,
|
|
25627
|
+
onOpen: React.useCallback(() => {
|
|
25628
|
+
window.clearTimeout(skipDelayTimerRef.current);
|
|
25629
|
+
isOpenDelayedRef.current = false;
|
|
25630
|
+
}, []),
|
|
25631
|
+
onClose: React.useCallback(() => {
|
|
25632
|
+
window.clearTimeout(skipDelayTimerRef.current);
|
|
25633
|
+
skipDelayTimerRef.current = window.setTimeout(
|
|
25634
|
+
() => isOpenDelayedRef.current = true,
|
|
25635
|
+
skipDelayDuration
|
|
25636
|
+
);
|
|
25637
|
+
}, [skipDelayDuration]),
|
|
25638
|
+
isPointerInTransitRef,
|
|
25639
|
+
onPointerInTransitChange: React.useCallback((inTransit) => {
|
|
25640
|
+
isPointerInTransitRef.current = inTransit;
|
|
25641
|
+
}, []),
|
|
25642
|
+
disableHoverableContent,
|
|
25643
|
+
children
|
|
25644
|
+
}
|
|
25645
|
+
);
|
|
25646
|
+
};
|
|
25647
|
+
TooltipProvider$1.displayName = PROVIDER_NAME;
|
|
25648
|
+
var TOOLTIP_NAME = "Tooltip";
|
|
25649
|
+
var [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME);
|
|
25650
|
+
var Tooltip$2 = (props2) => {
|
|
25651
|
+
const {
|
|
25652
|
+
__scopeTooltip,
|
|
25653
|
+
children,
|
|
25654
|
+
open: openProp,
|
|
25655
|
+
defaultOpen,
|
|
25656
|
+
onOpenChange,
|
|
25657
|
+
disableHoverableContent: disableHoverableContentProp,
|
|
25658
|
+
delayDuration: delayDurationProp
|
|
25659
|
+
} = props2;
|
|
25660
|
+
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props2.__scopeTooltip);
|
|
25661
|
+
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
25662
|
+
const [trigger, setTrigger] = React.useState(null);
|
|
25663
|
+
const contentId = useId$1();
|
|
25664
|
+
const openTimerRef = React.useRef(0);
|
|
25665
|
+
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
|
25666
|
+
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
|
25667
|
+
const wasOpenDelayedRef = React.useRef(false);
|
|
25668
|
+
const [open, setOpen] = useControllableState$1({
|
|
25669
|
+
prop: openProp,
|
|
25670
|
+
defaultProp: defaultOpen ?? false,
|
|
25671
|
+
onChange: (open2) => {
|
|
25672
|
+
if (open2) {
|
|
25673
|
+
providerContext.onOpen();
|
|
25674
|
+
document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));
|
|
25675
|
+
} else {
|
|
25676
|
+
providerContext.onClose();
|
|
25569
25677
|
}
|
|
25570
|
-
|
|
25571
|
-
|
|
25572
|
-
|
|
25573
|
-
|
|
25574
|
-
|
|
25575
|
-
|
|
25576
|
-
|
|
25577
|
-
|
|
25578
|
-
|
|
25579
|
-
|
|
25580
|
-
|
|
25678
|
+
onOpenChange == null ? void 0 : onOpenChange(open2);
|
|
25679
|
+
},
|
|
25680
|
+
caller: TOOLTIP_NAME
|
|
25681
|
+
});
|
|
25682
|
+
const stateAttribute = React.useMemo(() => {
|
|
25683
|
+
return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
|
|
25684
|
+
}, [open]);
|
|
25685
|
+
const handleOpen = React.useCallback(() => {
|
|
25686
|
+
window.clearTimeout(openTimerRef.current);
|
|
25687
|
+
openTimerRef.current = 0;
|
|
25688
|
+
wasOpenDelayedRef.current = false;
|
|
25689
|
+
setOpen(true);
|
|
25690
|
+
}, [setOpen]);
|
|
25691
|
+
const handleClose = React.useCallback(() => {
|
|
25692
|
+
window.clearTimeout(openTimerRef.current);
|
|
25693
|
+
openTimerRef.current = 0;
|
|
25694
|
+
setOpen(false);
|
|
25695
|
+
}, [setOpen]);
|
|
25696
|
+
const handleDelayedOpen = React.useCallback(() => {
|
|
25697
|
+
window.clearTimeout(openTimerRef.current);
|
|
25698
|
+
openTimerRef.current = window.setTimeout(() => {
|
|
25699
|
+
wasOpenDelayedRef.current = true;
|
|
25700
|
+
setOpen(true);
|
|
25701
|
+
openTimerRef.current = 0;
|
|
25702
|
+
}, delayDuration);
|
|
25703
|
+
}, [delayDuration, setOpen]);
|
|
25704
|
+
React.useEffect(() => {
|
|
25705
|
+
return () => {
|
|
25706
|
+
if (openTimerRef.current) {
|
|
25707
|
+
window.clearTimeout(openTimerRef.current);
|
|
25708
|
+
openTimerRef.current = 0;
|
|
25581
25709
|
}
|
|
25582
|
-
|
|
25583
|
-
|
|
25584
|
-
|
|
25710
|
+
};
|
|
25711
|
+
}, []);
|
|
25712
|
+
return /* @__PURE__ */ jsx(Root2$9, { ...popperScope, children: /* @__PURE__ */ jsx(
|
|
25713
|
+
TooltipContextProvider,
|
|
25714
|
+
{
|
|
25715
|
+
scope: __scopeTooltip,
|
|
25716
|
+
contentId,
|
|
25717
|
+
open,
|
|
25718
|
+
stateAttribute,
|
|
25719
|
+
trigger,
|
|
25720
|
+
onTriggerChange: setTrigger,
|
|
25721
|
+
onTriggerEnter: React.useCallback(() => {
|
|
25722
|
+
if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();
|
|
25723
|
+
else handleOpen();
|
|
25724
|
+
}, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]),
|
|
25725
|
+
onTriggerLeave: React.useCallback(() => {
|
|
25726
|
+
if (disableHoverableContent) {
|
|
25727
|
+
handleClose();
|
|
25728
|
+
} else {
|
|
25729
|
+
window.clearTimeout(openTimerRef.current);
|
|
25730
|
+
openTimerRef.current = 0;
|
|
25731
|
+
}
|
|
25732
|
+
}, [handleClose, disableHoverableContent]),
|
|
25733
|
+
onOpen: handleOpen,
|
|
25734
|
+
onClose: handleClose,
|
|
25735
|
+
disableHoverableContent,
|
|
25736
|
+
children
|
|
25737
|
+
}
|
|
25738
|
+
) });
|
|
25739
|
+
};
|
|
25740
|
+
Tooltip$2.displayName = TOOLTIP_NAME;
|
|
25741
|
+
var TRIGGER_NAME$7 = "TooltipTrigger";
|
|
25742
|
+
var TooltipTrigger$1 = React.forwardRef(
|
|
25743
|
+
(props2, forwardedRef) => {
|
|
25744
|
+
const { __scopeTooltip, ...triggerProps } = props2;
|
|
25745
|
+
const context = useTooltipContext(TRIGGER_NAME$7, __scopeTooltip);
|
|
25746
|
+
const providerContext = useTooltipProviderContext(TRIGGER_NAME$7, __scopeTooltip);
|
|
25747
|
+
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
25748
|
+
const ref = React.useRef(null);
|
|
25749
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref, context.onTriggerChange);
|
|
25750
|
+
const isPointerDownRef = React.useRef(false);
|
|
25751
|
+
const hasPointerMoveOpenedRef = React.useRef(false);
|
|
25752
|
+
const handlePointerUp2 = React.useCallback(() => isPointerDownRef.current = false, []);
|
|
25753
|
+
React.useEffect(() => {
|
|
25754
|
+
return () => document.removeEventListener("pointerup", handlePointerUp2);
|
|
25755
|
+
}, [handlePointerUp2]);
|
|
25756
|
+
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
25757
|
+
Primitive.button,
|
|
25585
25758
|
{
|
|
25586
|
-
|
|
25587
|
-
|
|
25588
|
-
|
|
25589
|
-
|
|
25590
|
-
|
|
25591
|
-
|
|
25759
|
+
"aria-describedby": context.open ? context.contentId : void 0,
|
|
25760
|
+
"data-state": context.stateAttribute,
|
|
25761
|
+
...triggerProps,
|
|
25762
|
+
ref: composedRefs,
|
|
25763
|
+
onPointerMove: composeEventHandlers$1(props2.onPointerMove, (event) => {
|
|
25764
|
+
if (event.pointerType === "touch") return;
|
|
25765
|
+
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
|
|
25766
|
+
context.onTriggerEnter();
|
|
25767
|
+
hasPointerMoveOpenedRef.current = true;
|
|
25768
|
+
}
|
|
25769
|
+
}),
|
|
25770
|
+
onPointerLeave: composeEventHandlers$1(props2.onPointerLeave, () => {
|
|
25771
|
+
context.onTriggerLeave();
|
|
25772
|
+
hasPointerMoveOpenedRef.current = false;
|
|
25773
|
+
}),
|
|
25774
|
+
onPointerDown: composeEventHandlers$1(props2.onPointerDown, () => {
|
|
25775
|
+
if (context.open) {
|
|
25776
|
+
context.onClose();
|
|
25777
|
+
}
|
|
25778
|
+
isPointerDownRef.current = true;
|
|
25779
|
+
document.addEventListener("pointerup", handlePointerUp2, { once: true });
|
|
25780
|
+
}),
|
|
25781
|
+
onFocus: composeEventHandlers$1(props2.onFocus, () => {
|
|
25782
|
+
if (!isPointerDownRef.current) context.onOpen();
|
|
25783
|
+
}),
|
|
25784
|
+
onBlur: composeEventHandlers$1(props2.onBlur, context.onClose),
|
|
25785
|
+
onClick: composeEventHandlers$1(props2.onClick, context.onClose)
|
|
25592
25786
|
}
|
|
25593
|
-
)
|
|
25594
|
-
|
|
25595
|
-
|
|
25596
|
-
|
|
25597
|
-
var
|
|
25598
|
-
var [
|
|
25599
|
-
|
|
25787
|
+
) });
|
|
25788
|
+
}
|
|
25789
|
+
);
|
|
25790
|
+
TooltipTrigger$1.displayName = TRIGGER_NAME$7;
|
|
25791
|
+
var PORTAL_NAME$7 = "TooltipPortal";
|
|
25792
|
+
var [PortalProvider$3, usePortalContext$3] = createTooltipContext(PORTAL_NAME$7, {
|
|
25793
|
+
forceMount: void 0
|
|
25794
|
+
});
|
|
25795
|
+
var TooltipPortal = (props2) => {
|
|
25796
|
+
const { __scopeTooltip, forceMount, children, container } = props2;
|
|
25797
|
+
const context = useTooltipContext(PORTAL_NAME$7, __scopeTooltip);
|
|
25798
|
+
return /* @__PURE__ */ jsx(PortalProvider$3, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$7, { asChild: true, container, children }) }) });
|
|
25799
|
+
};
|
|
25800
|
+
TooltipPortal.displayName = PORTAL_NAME$7;
|
|
25801
|
+
var CONTENT_NAME$8 = "TooltipContent";
|
|
25802
|
+
var TooltipContent$1 = React.forwardRef(
|
|
25600
25803
|
(props2, forwardedRef) => {
|
|
25601
|
-
const
|
|
25602
|
-
|
|
25603
|
-
|
|
25604
|
-
|
|
25605
|
-
defaultChecked,
|
|
25606
|
-
required: required2,
|
|
25607
|
-
disabled,
|
|
25608
|
-
value = "on",
|
|
25609
|
-
onCheckedChange,
|
|
25610
|
-
form,
|
|
25611
|
-
...switchProps
|
|
25612
|
-
} = props2;
|
|
25613
|
-
const [button, setButton] = React.useState(null);
|
|
25614
|
-
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setButton(node));
|
|
25615
|
-
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
|
25616
|
-
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
25617
|
-
const [checked, setChecked] = useControllableState$1({
|
|
25618
|
-
prop: checkedProp,
|
|
25619
|
-
defaultProp: defaultChecked ?? false,
|
|
25620
|
-
onChange: onCheckedChange,
|
|
25621
|
-
caller: SWITCH_NAME
|
|
25622
|
-
});
|
|
25623
|
-
return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
|
|
25624
|
-
/* @__PURE__ */ jsx(
|
|
25625
|
-
Primitive.button,
|
|
25626
|
-
{
|
|
25627
|
-
type: "button",
|
|
25628
|
-
role: "switch",
|
|
25629
|
-
"aria-checked": checked,
|
|
25630
|
-
"aria-required": required2,
|
|
25631
|
-
"data-state": getState$2(checked),
|
|
25632
|
-
"data-disabled": disabled ? "" : void 0,
|
|
25633
|
-
disabled,
|
|
25634
|
-
value,
|
|
25635
|
-
...switchProps,
|
|
25636
|
-
ref: composedRefs,
|
|
25637
|
-
onClick: composeEventHandlers$1(props2.onClick, (event) => {
|
|
25638
|
-
setChecked((prevChecked) => !prevChecked);
|
|
25639
|
-
if (isFormControl) {
|
|
25640
|
-
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
25641
|
-
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
25642
|
-
}
|
|
25643
|
-
})
|
|
25644
|
-
}
|
|
25645
|
-
),
|
|
25646
|
-
isFormControl && /* @__PURE__ */ jsx(
|
|
25647
|
-
SwitchBubbleInput,
|
|
25648
|
-
{
|
|
25649
|
-
control: button,
|
|
25650
|
-
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
25651
|
-
name,
|
|
25652
|
-
value,
|
|
25653
|
-
checked,
|
|
25654
|
-
required: required2,
|
|
25655
|
-
disabled,
|
|
25656
|
-
form,
|
|
25657
|
-
style: { transform: "translateX(-100%)" }
|
|
25658
|
-
}
|
|
25659
|
-
)
|
|
25660
|
-
] });
|
|
25804
|
+
const portalContext = usePortalContext$3(CONTENT_NAME$8, props2.__scopeTooltip);
|
|
25805
|
+
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props2;
|
|
25806
|
+
const context = useTooltipContext(CONTENT_NAME$8, props2.__scopeTooltip);
|
|
25807
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
|
25661
25808
|
}
|
|
25662
25809
|
);
|
|
25663
|
-
|
|
25664
|
-
|
|
25665
|
-
|
|
25810
|
+
var TooltipContentHoverable = React.forwardRef((props2, forwardedRef) => {
|
|
25811
|
+
const context = useTooltipContext(CONTENT_NAME$8, props2.__scopeTooltip);
|
|
25812
|
+
const providerContext = useTooltipProviderContext(CONTENT_NAME$8, props2.__scopeTooltip);
|
|
25813
|
+
const ref = React.useRef(null);
|
|
25814
|
+
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
25815
|
+
const [pointerGraceArea, setPointerGraceArea] = React.useState(null);
|
|
25816
|
+
const { trigger, onClose } = context;
|
|
25817
|
+
const content = ref.current;
|
|
25818
|
+
const { onPointerInTransitChange } = providerContext;
|
|
25819
|
+
const handleRemoveGraceArea = React.useCallback(() => {
|
|
25820
|
+
setPointerGraceArea(null);
|
|
25821
|
+
onPointerInTransitChange(false);
|
|
25822
|
+
}, [onPointerInTransitChange]);
|
|
25823
|
+
const handleCreateGraceArea = React.useCallback(
|
|
25824
|
+
(event, hoverTarget) => {
|
|
25825
|
+
const currentTarget = event.currentTarget;
|
|
25826
|
+
const exitPoint = { x: event.clientX, y: event.clientY };
|
|
25827
|
+
const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());
|
|
25828
|
+
const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);
|
|
25829
|
+
const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());
|
|
25830
|
+
const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);
|
|
25831
|
+
setPointerGraceArea(graceArea);
|
|
25832
|
+
onPointerInTransitChange(true);
|
|
25833
|
+
},
|
|
25834
|
+
[onPointerInTransitChange]
|
|
25835
|
+
);
|
|
25836
|
+
React.useEffect(() => {
|
|
25837
|
+
return () => handleRemoveGraceArea();
|
|
25838
|
+
}, [handleRemoveGraceArea]);
|
|
25839
|
+
React.useEffect(() => {
|
|
25840
|
+
if (trigger && content) {
|
|
25841
|
+
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
|
25842
|
+
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
25843
|
+
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
25844
|
+
content.addEventListener("pointerleave", handleContentLeave);
|
|
25845
|
+
return () => {
|
|
25846
|
+
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
|
25847
|
+
content.removeEventListener("pointerleave", handleContentLeave);
|
|
25848
|
+
};
|
|
25849
|
+
}
|
|
25850
|
+
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
25851
|
+
React.useEffect(() => {
|
|
25852
|
+
if (pointerGraceArea) {
|
|
25853
|
+
const handleTrackPointerGrace = (event) => {
|
|
25854
|
+
const target = event.target;
|
|
25855
|
+
const pointerPosition = { x: event.clientX, y: event.clientY };
|
|
25856
|
+
const hasEnteredTarget = (trigger == null ? void 0 : trigger.contains(target)) || (content == null ? void 0 : content.contains(target));
|
|
25857
|
+
const isPointerOutsideGraceArea = !isPointInPolygon$1(pointerPosition, pointerGraceArea);
|
|
25858
|
+
if (hasEnteredTarget) {
|
|
25859
|
+
handleRemoveGraceArea();
|
|
25860
|
+
} else if (isPointerOutsideGraceArea) {
|
|
25861
|
+
handleRemoveGraceArea();
|
|
25862
|
+
onClose();
|
|
25863
|
+
}
|
|
25864
|
+
};
|
|
25865
|
+
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
25866
|
+
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
25867
|
+
}
|
|
25868
|
+
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
25869
|
+
return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props2, ref: composedRefs });
|
|
25870
|
+
});
|
|
25871
|
+
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
25872
|
+
var Slottable$1 = /* @__PURE__ */ createSlottable("TooltipContent");
|
|
25873
|
+
var TooltipContentImpl = React.forwardRef(
|
|
25666
25874
|
(props2, forwardedRef) => {
|
|
25667
|
-
const {
|
|
25668
|
-
|
|
25875
|
+
const {
|
|
25876
|
+
__scopeTooltip,
|
|
25877
|
+
children,
|
|
25878
|
+
"aria-label": ariaLabel,
|
|
25879
|
+
onEscapeKeyDown,
|
|
25880
|
+
onPointerDownOutside,
|
|
25881
|
+
...contentProps
|
|
25882
|
+
} = props2;
|
|
25883
|
+
const context = useTooltipContext(CONTENT_NAME$8, __scopeTooltip);
|
|
25884
|
+
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
25885
|
+
const { onClose } = context;
|
|
25886
|
+
React.useEffect(() => {
|
|
25887
|
+
document.addEventListener(TOOLTIP_OPEN, onClose);
|
|
25888
|
+
return () => document.removeEventListener(TOOLTIP_OPEN, onClose);
|
|
25889
|
+
}, [onClose]);
|
|
25890
|
+
React.useEffect(() => {
|
|
25891
|
+
if (context.trigger) {
|
|
25892
|
+
const handleScroll2 = (event) => {
|
|
25893
|
+
const target = event.target;
|
|
25894
|
+
if (target == null ? void 0 : target.contains(context.trigger)) onClose();
|
|
25895
|
+
};
|
|
25896
|
+
window.addEventListener("scroll", handleScroll2, { capture: true });
|
|
25897
|
+
return () => window.removeEventListener("scroll", handleScroll2, { capture: true });
|
|
25898
|
+
}
|
|
25899
|
+
}, [context.trigger, onClose]);
|
|
25669
25900
|
return /* @__PURE__ */ jsx(
|
|
25670
|
-
|
|
25901
|
+
DismissableLayer,
|
|
25671
25902
|
{
|
|
25672
|
-
|
|
25673
|
-
|
|
25674
|
-
|
|
25675
|
-
|
|
25903
|
+
asChild: true,
|
|
25904
|
+
disableOutsidePointerEvents: false,
|
|
25905
|
+
onEscapeKeyDown,
|
|
25906
|
+
onPointerDownOutside,
|
|
25907
|
+
onFocusOutside: (event) => event.preventDefault(),
|
|
25908
|
+
onDismiss: onClose,
|
|
25909
|
+
children: /* @__PURE__ */ jsxs(
|
|
25910
|
+
Content$3,
|
|
25911
|
+
{
|
|
25912
|
+
"data-state": context.stateAttribute,
|
|
25913
|
+
...popperScope,
|
|
25914
|
+
...contentProps,
|
|
25915
|
+
ref: forwardedRef,
|
|
25916
|
+
style: {
|
|
25917
|
+
...contentProps.style,
|
|
25918
|
+
// re-namespace exposed content custom properties
|
|
25919
|
+
...{
|
|
25920
|
+
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
25921
|
+
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
25922
|
+
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
25923
|
+
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
25924
|
+
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
25925
|
+
}
|
|
25926
|
+
},
|
|
25927
|
+
children: [
|
|
25928
|
+
/* @__PURE__ */ jsx(Slottable$1, { children }),
|
|
25929
|
+
/* @__PURE__ */ jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx(Root$a, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
25930
|
+
]
|
|
25931
|
+
}
|
|
25932
|
+
)
|
|
25676
25933
|
}
|
|
25677
25934
|
);
|
|
25678
25935
|
}
|
|
25679
25936
|
);
|
|
25680
|
-
|
|
25681
|
-
var
|
|
25682
|
-
var
|
|
25683
|
-
({
|
|
25684
|
-
|
|
25685
|
-
|
|
25686
|
-
|
|
25687
|
-
|
|
25937
|
+
TooltipContent$1.displayName = CONTENT_NAME$8;
|
|
25938
|
+
var ARROW_NAME$5 = "TooltipArrow";
|
|
25939
|
+
var TooltipArrow = React.forwardRef(
|
|
25940
|
+
(props2, forwardedRef) => {
|
|
25941
|
+
const { __scopeTooltip, ...arrowProps } = props2;
|
|
25942
|
+
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
25943
|
+
const visuallyHiddenContentContext = useVisuallyHiddenContentContext(
|
|
25944
|
+
ARROW_NAME$5,
|
|
25945
|
+
__scopeTooltip
|
|
25946
|
+
);
|
|
25947
|
+
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
25948
|
+
}
|
|
25949
|
+
);
|
|
25950
|
+
TooltipArrow.displayName = ARROW_NAME$5;
|
|
25951
|
+
function getExitSideFromRect(point, rect) {
|
|
25952
|
+
const top = Math.abs(rect.top - point.y);
|
|
25953
|
+
const bottom = Math.abs(rect.bottom - point.y);
|
|
25954
|
+
const right = Math.abs(rect.right - point.x);
|
|
25955
|
+
const left = Math.abs(rect.left - point.x);
|
|
25956
|
+
switch (Math.min(top, bottom, right, left)) {
|
|
25957
|
+
case left:
|
|
25958
|
+
return "left";
|
|
25959
|
+
case right:
|
|
25960
|
+
return "right";
|
|
25961
|
+
case top:
|
|
25962
|
+
return "top";
|
|
25963
|
+
case bottom:
|
|
25964
|
+
return "bottom";
|
|
25965
|
+
default:
|
|
25966
|
+
throw new Error("unreachable");
|
|
25967
|
+
}
|
|
25968
|
+
}
|
|
25969
|
+
function getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
|
|
25970
|
+
const paddedExitPoints = [];
|
|
25971
|
+
switch (exitSide) {
|
|
25972
|
+
case "top":
|
|
25973
|
+
paddedExitPoints.push(
|
|
25974
|
+
{ x: exitPoint.x - padding, y: exitPoint.y + padding },
|
|
25975
|
+
{ x: exitPoint.x + padding, y: exitPoint.y + padding }
|
|
25976
|
+
);
|
|
25977
|
+
break;
|
|
25978
|
+
case "bottom":
|
|
25979
|
+
paddedExitPoints.push(
|
|
25980
|
+
{ x: exitPoint.x - padding, y: exitPoint.y - padding },
|
|
25981
|
+
{ x: exitPoint.x + padding, y: exitPoint.y - padding }
|
|
25982
|
+
);
|
|
25983
|
+
break;
|
|
25984
|
+
case "left":
|
|
25985
|
+
paddedExitPoints.push(
|
|
25986
|
+
{ x: exitPoint.x + padding, y: exitPoint.y - padding },
|
|
25987
|
+
{ x: exitPoint.x + padding, y: exitPoint.y + padding }
|
|
25988
|
+
);
|
|
25989
|
+
break;
|
|
25990
|
+
case "right":
|
|
25991
|
+
paddedExitPoints.push(
|
|
25992
|
+
{ x: exitPoint.x - padding, y: exitPoint.y - padding },
|
|
25993
|
+
{ x: exitPoint.x - padding, y: exitPoint.y + padding }
|
|
25994
|
+
);
|
|
25995
|
+
break;
|
|
25996
|
+
}
|
|
25997
|
+
return paddedExitPoints;
|
|
25998
|
+
}
|
|
25999
|
+
function getPointsFromRect(rect) {
|
|
26000
|
+
const { top, right, bottom, left } = rect;
|
|
26001
|
+
return [
|
|
26002
|
+
{ x: left, y: top },
|
|
26003
|
+
{ x: right, y: top },
|
|
26004
|
+
{ x: right, y: bottom },
|
|
26005
|
+
{ x: left, y: bottom }
|
|
26006
|
+
];
|
|
26007
|
+
}
|
|
26008
|
+
function isPointInPolygon$1(point, polygon) {
|
|
26009
|
+
const { x: x2, y } = point;
|
|
26010
|
+
let inside = false;
|
|
26011
|
+
for (let i2 = 0, j = polygon.length - 1; i2 < polygon.length; j = i2++) {
|
|
26012
|
+
const ii = polygon[i2];
|
|
26013
|
+
const jj = polygon[j];
|
|
26014
|
+
const xi = ii.x;
|
|
26015
|
+
const yi = ii.y;
|
|
26016
|
+
const xj = jj.x;
|
|
26017
|
+
const yj = jj.y;
|
|
26018
|
+
const intersect = yi > y !== yj > y && x2 < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
26019
|
+
if (intersect) inside = !inside;
|
|
26020
|
+
}
|
|
26021
|
+
return inside;
|
|
26022
|
+
}
|
|
26023
|
+
function getHull(points) {
|
|
26024
|
+
const newPoints = points.slice();
|
|
26025
|
+
newPoints.sort((a2, b2) => {
|
|
26026
|
+
if (a2.x < b2.x) return -1;
|
|
26027
|
+
else if (a2.x > b2.x) return 1;
|
|
26028
|
+
else if (a2.y < b2.y) return -1;
|
|
26029
|
+
else if (a2.y > b2.y) return 1;
|
|
26030
|
+
else return 0;
|
|
26031
|
+
});
|
|
26032
|
+
return getHullPresorted(newPoints);
|
|
26033
|
+
}
|
|
26034
|
+
function getHullPresorted(points) {
|
|
26035
|
+
if (points.length <= 1) return points.slice();
|
|
26036
|
+
const upperHull = [];
|
|
26037
|
+
for (let i2 = 0; i2 < points.length; i2++) {
|
|
26038
|
+
const p2 = points[i2];
|
|
26039
|
+
while (upperHull.length >= 2) {
|
|
26040
|
+
const q = upperHull[upperHull.length - 1];
|
|
26041
|
+
const r2 = upperHull[upperHull.length - 2];
|
|
26042
|
+
if ((q.x - r2.x) * (p2.y - r2.y) >= (q.y - r2.y) * (p2.x - r2.x)) upperHull.pop();
|
|
26043
|
+
else break;
|
|
26044
|
+
}
|
|
26045
|
+
upperHull.push(p2);
|
|
26046
|
+
}
|
|
26047
|
+
upperHull.pop();
|
|
26048
|
+
const lowerHull = [];
|
|
26049
|
+
for (let i2 = points.length - 1; i2 >= 0; i2--) {
|
|
26050
|
+
const p2 = points[i2];
|
|
26051
|
+
while (lowerHull.length >= 2) {
|
|
26052
|
+
const q = lowerHull[lowerHull.length - 1];
|
|
26053
|
+
const r2 = lowerHull[lowerHull.length - 2];
|
|
26054
|
+
if ((q.x - r2.x) * (p2.y - r2.y) >= (q.y - r2.y) * (p2.x - r2.x)) lowerHull.pop();
|
|
26055
|
+
else break;
|
|
26056
|
+
}
|
|
26057
|
+
lowerHull.push(p2);
|
|
26058
|
+
}
|
|
26059
|
+
lowerHull.pop();
|
|
26060
|
+
if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) {
|
|
26061
|
+
return upperHull;
|
|
26062
|
+
} else {
|
|
26063
|
+
return upperHull.concat(lowerHull);
|
|
26064
|
+
}
|
|
26065
|
+
}
|
|
26066
|
+
var Provider = TooltipProvider$1;
|
|
26067
|
+
var Root3$2 = Tooltip$2;
|
|
26068
|
+
var Trigger$6 = TooltipTrigger$1;
|
|
26069
|
+
var Portal$4 = TooltipPortal;
|
|
26070
|
+
var Content2$6 = TooltipContent$1;
|
|
26071
|
+
var Arrow2$1 = TooltipArrow;
|
|
26072
|
+
function TooltipProvider({
|
|
26073
|
+
delayDuration = 0,
|
|
26074
|
+
...props2
|
|
26075
|
+
}) {
|
|
26076
|
+
return /* @__PURE__ */ jsx(
|
|
26077
|
+
Provider,
|
|
26078
|
+
{
|
|
26079
|
+
"data-slot": "tooltip-provider",
|
|
26080
|
+
delayDuration,
|
|
26081
|
+
...props2
|
|
26082
|
+
}
|
|
26083
|
+
);
|
|
26084
|
+
}
|
|
26085
|
+
function Tooltip$1({
|
|
26086
|
+
...props2
|
|
26087
|
+
}) {
|
|
26088
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(Root3$2, { "data-slot": "tooltip", ...props2 }) });
|
|
26089
|
+
}
|
|
26090
|
+
function TooltipTrigger({
|
|
26091
|
+
...props2
|
|
26092
|
+
}) {
|
|
26093
|
+
return /* @__PURE__ */ jsx(Trigger$6, { "data-slot": "tooltip-trigger", ...props2 });
|
|
26094
|
+
}
|
|
26095
|
+
function TooltipContent({
|
|
26096
|
+
className,
|
|
26097
|
+
sideOffset = 0,
|
|
26098
|
+
children,
|
|
26099
|
+
...props2
|
|
26100
|
+
}) {
|
|
26101
|
+
return /* @__PURE__ */ jsx(Portal$4, { children: /* @__PURE__ */ jsxs(
|
|
26102
|
+
Content2$6,
|
|
26103
|
+
{
|
|
26104
|
+
"data-slot": "tooltip-content",
|
|
26105
|
+
sideOffset,
|
|
26106
|
+
className: cn$1(
|
|
26107
|
+
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
26108
|
+
className
|
|
26109
|
+
),
|
|
26110
|
+
...props2,
|
|
26111
|
+
children: [
|
|
26112
|
+
children,
|
|
26113
|
+
/* @__PURE__ */ jsx(Arrow2$1, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
26114
|
+
]
|
|
26115
|
+
}
|
|
26116
|
+
) });
|
|
26117
|
+
}
|
|
26118
|
+
function InfoTooltip({ iconSize, content }) {
|
|
26119
|
+
return /* @__PURE__ */ jsxs(Tooltip$1, { children: [
|
|
26120
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { children: /* @__PURE__ */ jsx(Info, { size: iconSize }) }),
|
|
26121
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: content })
|
|
26122
|
+
] });
|
|
26123
|
+
}
|
|
26124
|
+
function CheckboxField({
|
|
26125
|
+
field,
|
|
26126
|
+
fieldPath,
|
|
26127
|
+
value,
|
|
26128
|
+
onChange,
|
|
26129
|
+
className
|
|
26130
|
+
}) {
|
|
26131
|
+
const placement = field.labelPlacement ?? "inline";
|
|
26132
|
+
if (placement === "stacked") {
|
|
26133
|
+
const labelId = `${fieldPath}-label`;
|
|
26134
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
26135
|
+
/* @__PURE__ */ jsxs(Label$2, { id: labelId, className: "text-sm font-medium", children: [
|
|
26136
|
+
field.label,
|
|
26137
|
+
field.required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" }),
|
|
26138
|
+
field.infoTooltip && /* @__PURE__ */ jsx(
|
|
26139
|
+
InfoTooltip,
|
|
26140
|
+
{
|
|
26141
|
+
iconSize: field.infoTooltipIconSize,
|
|
26142
|
+
content: field.infoTooltip
|
|
26143
|
+
}
|
|
26144
|
+
)
|
|
26145
|
+
] }),
|
|
26146
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-4", children: [
|
|
26147
|
+
/* @__PURE__ */ jsx(
|
|
26148
|
+
Checkbox,
|
|
26149
|
+
{
|
|
26150
|
+
"aria-labelledby": labelId,
|
|
26151
|
+
id: fieldPath,
|
|
26152
|
+
checked: value || false,
|
|
26153
|
+
onCheckedChange: onChange,
|
|
26154
|
+
disabled: field.disabled || field.readOnly,
|
|
26155
|
+
className: cn$1(className),
|
|
26156
|
+
"data-testid": field.dataTestID
|
|
26157
|
+
}
|
|
26158
|
+
),
|
|
26159
|
+
field.subLabel
|
|
26160
|
+
] })
|
|
26161
|
+
] });
|
|
26162
|
+
}
|
|
26163
|
+
if (placement === "hidden") {
|
|
26164
|
+
return /* @__PURE__ */ jsx(
|
|
26165
|
+
Checkbox,
|
|
26166
|
+
{
|
|
26167
|
+
id: fieldPath,
|
|
26168
|
+
checked: value || false,
|
|
26169
|
+
onCheckedChange: onChange,
|
|
26170
|
+
disabled: field.disabled,
|
|
26171
|
+
className: cn$1(className),
|
|
26172
|
+
"data-testid": field.dataTestID
|
|
26173
|
+
}
|
|
26174
|
+
);
|
|
26175
|
+
}
|
|
26176
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
26177
|
+
/* @__PURE__ */ jsx(
|
|
26178
|
+
Checkbox,
|
|
26179
|
+
{
|
|
26180
|
+
id: fieldPath,
|
|
26181
|
+
checked: value || false,
|
|
26182
|
+
onCheckedChange: onChange,
|
|
26183
|
+
disabled: field.disabled,
|
|
26184
|
+
className: cn$1(className),
|
|
26185
|
+
"data-testid": field.dataTestID
|
|
26186
|
+
}
|
|
26187
|
+
),
|
|
26188
|
+
/* @__PURE__ */ jsxs(
|
|
26189
|
+
Label$2,
|
|
26190
|
+
{
|
|
26191
|
+
htmlFor: fieldPath,
|
|
26192
|
+
className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
26193
|
+
children: [
|
|
26194
|
+
field.label,
|
|
26195
|
+
field.required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
26196
|
+
]
|
|
26197
|
+
}
|
|
26198
|
+
)
|
|
26199
|
+
] });
|
|
26200
|
+
}
|
|
26201
|
+
var SWITCH_NAME = "Switch";
|
|
26202
|
+
var [createSwitchContext] = createContextScope(SWITCH_NAME);
|
|
26203
|
+
var [SwitchProvider, useSwitchContext] = createSwitchContext(SWITCH_NAME);
|
|
26204
|
+
var Switch$1 = React.forwardRef(
|
|
26205
|
+
(props2, forwardedRef) => {
|
|
26206
|
+
const {
|
|
26207
|
+
__scopeSwitch,
|
|
26208
|
+
name,
|
|
26209
|
+
checked: checkedProp,
|
|
26210
|
+
defaultChecked,
|
|
26211
|
+
required: required2,
|
|
26212
|
+
disabled,
|
|
26213
|
+
value = "on",
|
|
26214
|
+
onCheckedChange,
|
|
26215
|
+
form,
|
|
26216
|
+
...switchProps
|
|
26217
|
+
} = props2;
|
|
26218
|
+
const [button, setButton] = React.useState(null);
|
|
26219
|
+
const composedRefs = useComposedRefs$1(forwardedRef, (node) => setButton(node));
|
|
26220
|
+
const hasConsumerStoppedPropagationRef = React.useRef(false);
|
|
26221
|
+
const isFormControl = button ? form || !!button.closest("form") : true;
|
|
26222
|
+
const [checked, setChecked] = useControllableState$1({
|
|
26223
|
+
prop: checkedProp,
|
|
26224
|
+
defaultProp: defaultChecked ?? false,
|
|
26225
|
+
onChange: onCheckedChange,
|
|
26226
|
+
caller: SWITCH_NAME
|
|
26227
|
+
});
|
|
26228
|
+
return /* @__PURE__ */ jsxs(SwitchProvider, { scope: __scopeSwitch, checked, disabled, children: [
|
|
26229
|
+
/* @__PURE__ */ jsx(
|
|
26230
|
+
Primitive.button,
|
|
26231
|
+
{
|
|
26232
|
+
type: "button",
|
|
26233
|
+
role: "switch",
|
|
26234
|
+
"aria-checked": checked,
|
|
26235
|
+
"aria-required": required2,
|
|
26236
|
+
"data-state": getState$2(checked),
|
|
26237
|
+
"data-disabled": disabled ? "" : void 0,
|
|
26238
|
+
disabled,
|
|
26239
|
+
value,
|
|
26240
|
+
...switchProps,
|
|
26241
|
+
ref: composedRefs,
|
|
26242
|
+
onClick: composeEventHandlers$1(props2.onClick, (event) => {
|
|
26243
|
+
setChecked((prevChecked) => !prevChecked);
|
|
26244
|
+
if (isFormControl) {
|
|
26245
|
+
hasConsumerStoppedPropagationRef.current = event.isPropagationStopped();
|
|
26246
|
+
if (!hasConsumerStoppedPropagationRef.current) event.stopPropagation();
|
|
26247
|
+
}
|
|
26248
|
+
})
|
|
26249
|
+
}
|
|
26250
|
+
),
|
|
26251
|
+
isFormControl && /* @__PURE__ */ jsx(
|
|
26252
|
+
SwitchBubbleInput,
|
|
26253
|
+
{
|
|
26254
|
+
control: button,
|
|
26255
|
+
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
26256
|
+
name,
|
|
26257
|
+
value,
|
|
26258
|
+
checked,
|
|
26259
|
+
required: required2,
|
|
26260
|
+
disabled,
|
|
26261
|
+
form,
|
|
26262
|
+
style: { transform: "translateX(-100%)" }
|
|
26263
|
+
}
|
|
26264
|
+
)
|
|
26265
|
+
] });
|
|
26266
|
+
}
|
|
26267
|
+
);
|
|
26268
|
+
Switch$1.displayName = SWITCH_NAME;
|
|
26269
|
+
var THUMB_NAME$2 = "SwitchThumb";
|
|
26270
|
+
var SwitchThumb = React.forwardRef(
|
|
26271
|
+
(props2, forwardedRef) => {
|
|
26272
|
+
const { __scopeSwitch, ...thumbProps } = props2;
|
|
26273
|
+
const context = useSwitchContext(THUMB_NAME$2, __scopeSwitch);
|
|
26274
|
+
return /* @__PURE__ */ jsx(
|
|
26275
|
+
Primitive.span,
|
|
26276
|
+
{
|
|
26277
|
+
"data-state": getState$2(context.checked),
|
|
26278
|
+
"data-disabled": context.disabled ? "" : void 0,
|
|
26279
|
+
...thumbProps,
|
|
26280
|
+
ref: forwardedRef
|
|
26281
|
+
}
|
|
26282
|
+
);
|
|
26283
|
+
}
|
|
26284
|
+
);
|
|
26285
|
+
SwitchThumb.displayName = THUMB_NAME$2;
|
|
26286
|
+
var BUBBLE_INPUT_NAME$2 = "SwitchBubbleInput";
|
|
26287
|
+
var SwitchBubbleInput = React.forwardRef(
|
|
26288
|
+
({
|
|
26289
|
+
__scopeSwitch,
|
|
26290
|
+
control,
|
|
26291
|
+
checked,
|
|
26292
|
+
bubbles = true,
|
|
25688
26293
|
...props2
|
|
25689
26294
|
}, forwardedRef) => {
|
|
25690
26295
|
const ref = React.useRef(null);
|
|
@@ -25771,7 +26376,14 @@ function SwitchField({
|
|
|
25771
26376
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
25772
26377
|
/* @__PURE__ */ jsxs(Label$2, { id: labelId, className: "text-sm font-medium", children: [
|
|
25773
26378
|
field.label,
|
|
25774
|
-
field.required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
26379
|
+
field.required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" }),
|
|
26380
|
+
field.infoTooltip && /* @__PURE__ */ jsx(
|
|
26381
|
+
InfoTooltip,
|
|
26382
|
+
{
|
|
26383
|
+
iconSize: field.infoTooltipIconSize,
|
|
26384
|
+
content: field.infoTooltip
|
|
26385
|
+
}
|
|
26386
|
+
)
|
|
25775
26387
|
] }),
|
|
25776
26388
|
/* @__PURE__ */ jsx(
|
|
25777
26389
|
Switch,
|
|
@@ -25781,9 +26393,11 @@ function SwitchField({
|
|
|
25781
26393
|
checked: value || false,
|
|
25782
26394
|
onCheckedChange: onChange,
|
|
25783
26395
|
disabled: field.disabled || field.readOnly,
|
|
25784
|
-
className: cn$1(className)
|
|
26396
|
+
className: cn$1(className),
|
|
26397
|
+
"data-testid": field.dataTestID
|
|
25785
26398
|
}
|
|
25786
|
-
)
|
|
26399
|
+
),
|
|
26400
|
+
field.subLabel
|
|
25787
26401
|
] });
|
|
25788
26402
|
}
|
|
25789
26403
|
if (placement === "hidden") {
|
|
@@ -25794,7 +26408,8 @@ function SwitchField({
|
|
|
25794
26408
|
checked: value || false,
|
|
25795
26409
|
onCheckedChange: onChange,
|
|
25796
26410
|
disabled: field.disabled,
|
|
25797
|
-
className: cn$1(className)
|
|
26411
|
+
className: cn$1(className),
|
|
26412
|
+
"data-testid": field.dataTestID
|
|
25798
26413
|
}
|
|
25799
26414
|
);
|
|
25800
26415
|
}
|
|
@@ -25806,7 +26421,8 @@ function SwitchField({
|
|
|
25806
26421
|
checked: value || false,
|
|
25807
26422
|
onCheckedChange: onChange,
|
|
25808
26423
|
disabled: field.disabled,
|
|
25809
|
-
className: cn$1(className)
|
|
26424
|
+
className: cn$1(className),
|
|
26425
|
+
"data-testid": field.dataTestID
|
|
25810
26426
|
}
|
|
25811
26427
|
),
|
|
25812
26428
|
/* @__PURE__ */ jsxs(
|
|
@@ -26149,6 +26765,7 @@ function RadioField({
|
|
|
26149
26765
|
onValueChange: (val) => onChange(fromUiValue(val)),
|
|
26150
26766
|
disabled: field.disabled || field.readOnly,
|
|
26151
26767
|
className,
|
|
26768
|
+
"data-testid": field.dataTestID,
|
|
26152
26769
|
children: (_a2 = field.options) == null ? void 0 : _a2.map((option) => /* @__PURE__ */ jsxs(
|
|
26153
26770
|
"div",
|
|
26154
26771
|
{
|
|
@@ -26207,7 +26824,8 @@ function DateField({
|
|
|
26207
26824
|
defaultValue: parseDateValueForInput(value),
|
|
26208
26825
|
min: parseDateValueForInput(minDate),
|
|
26209
26826
|
max: parseDateValueForInput(maxDate),
|
|
26210
|
-
onChange: (e2) => onChange(e2.target.value ? new Date(e2.target.value) : null)
|
|
26827
|
+
onChange: (e2) => onChange(e2.target.value ? new Date(e2.target.value) : null),
|
|
26828
|
+
"data-testid": field.dataTestID
|
|
26211
26829
|
}
|
|
26212
26830
|
);
|
|
26213
26831
|
}
|
|
@@ -30348,7 +30966,8 @@ function DatePickerField({
|
|
|
30348
30966
|
disabledDates: field.disabledDates,
|
|
30349
30967
|
format: field.dateFormat,
|
|
30350
30968
|
placeholder: field.placeholder,
|
|
30351
|
-
buttonVariant: "outline"
|
|
30969
|
+
buttonVariant: "outline",
|
|
30970
|
+
"data-testid": field.dataTestID
|
|
30352
30971
|
}
|
|
30353
30972
|
);
|
|
30354
30973
|
}
|
|
@@ -30809,7 +31428,8 @@ function DateRangePickerField({
|
|
|
30809
31428
|
popoverSide: field.popoverSide,
|
|
30810
31429
|
showFooter: field.showFooter,
|
|
30811
31430
|
cancelLabel: field.cancelLabel,
|
|
30812
|
-
applyLabel: field.applyLabel
|
|
31431
|
+
applyLabel: field.applyLabel,
|
|
31432
|
+
"data-testid": field.dataTestID
|
|
30813
31433
|
}
|
|
30814
31434
|
);
|
|
30815
31435
|
}
|
|
@@ -31071,7 +31691,8 @@ function MonthPickerField({
|
|
|
31071
31691
|
),
|
|
31072
31692
|
showFooter: true,
|
|
31073
31693
|
clearLabel: field.cancelLabel,
|
|
31074
|
-
closeLabel: field.applyLabel
|
|
31694
|
+
closeLabel: field.applyLabel,
|
|
31695
|
+
"data-testid": field.dataTestID
|
|
31075
31696
|
}
|
|
31076
31697
|
);
|
|
31077
31698
|
}
|
|
@@ -31496,7 +32117,8 @@ function MonthRangePickerField({
|
|
|
31496
32117
|
popoverSide: field.popoverSide,
|
|
31497
32118
|
showFooter: true,
|
|
31498
32119
|
cancelLabel: field.cancelLabel,
|
|
31499
|
-
applyLabel: field.applyLabel
|
|
32120
|
+
applyLabel: field.applyLabel,
|
|
32121
|
+
"data-testid": field.dataTestID
|
|
31500
32122
|
}
|
|
31501
32123
|
);
|
|
31502
32124
|
}
|
|
@@ -31752,7 +32374,8 @@ function TimePickerField({
|
|
|
31752
32374
|
secondStep: field.secondStep ?? 5,
|
|
31753
32375
|
showFooter: field.showFooter,
|
|
31754
32376
|
cancelLabel: field.cancelLabel,
|
|
31755
|
-
applyLabel: field.applyLabel
|
|
32377
|
+
applyLabel: field.applyLabel,
|
|
32378
|
+
"data-testid": field.dataTestID
|
|
31756
32379
|
}
|
|
31757
32380
|
);
|
|
31758
32381
|
}
|
|
@@ -32050,7 +32673,8 @@ function TimeRangePickerField({
|
|
|
32050
32673
|
secondStep: field.secondStep ?? 5,
|
|
32051
32674
|
showFooter: field.showFooter,
|
|
32052
32675
|
cancelLabel: field.cancelLabel,
|
|
32053
|
-
applyLabel: field.applyLabel
|
|
32676
|
+
applyLabel: field.applyLabel,
|
|
32677
|
+
"data-testid": field.dataTestID
|
|
32054
32678
|
}
|
|
32055
32679
|
);
|
|
32056
32680
|
}
|
|
@@ -32409,7 +33033,8 @@ function DateTimePickerField({
|
|
|
32409
33033
|
secondStep: field.secondStep ?? 5,
|
|
32410
33034
|
showFooter: field.showFooter,
|
|
32411
33035
|
cancelLabel: field.cancelLabel,
|
|
32412
|
-
applyLabel: field.applyLabel
|
|
33036
|
+
applyLabel: field.applyLabel,
|
|
33037
|
+
"data-testid": field.dataTestID
|
|
32413
33038
|
}
|
|
32414
33039
|
);
|
|
32415
33040
|
}
|
|
@@ -32992,7 +33617,8 @@ function DateTimeRangePickerField({
|
|
|
32992
33617
|
secondStep: field.secondStep ?? 5,
|
|
32993
33618
|
showFooter: field.showFooter,
|
|
32994
33619
|
cancelLabel: field.cancelLabel,
|
|
32995
|
-
applyLabel: field.applyLabel
|
|
33620
|
+
applyLabel: field.applyLabel,
|
|
33621
|
+
"data-testid": field.dataTestID
|
|
32996
33622
|
}
|
|
32997
33623
|
);
|
|
32998
33624
|
}
|
|
@@ -35416,11 +36042,11 @@ var Dialog$1 = (props2) => {
|
|
|
35416
36042
|
);
|
|
35417
36043
|
};
|
|
35418
36044
|
Dialog$1.displayName = DIALOG_NAME;
|
|
35419
|
-
var TRIGGER_NAME$
|
|
36045
|
+
var TRIGGER_NAME$6 = "DialogTrigger";
|
|
35420
36046
|
var DialogTrigger$1 = React.forwardRef(
|
|
35421
36047
|
(props2, forwardedRef) => {
|
|
35422
36048
|
const { __scopeDialog, ...triggerProps } = props2;
|
|
35423
|
-
const context = useDialogContext(TRIGGER_NAME$
|
|
36049
|
+
const context = useDialogContext(TRIGGER_NAME$6, __scopeDialog);
|
|
35424
36050
|
const composedTriggerRef = useComposedRefs$1(forwardedRef, context.triggerRef);
|
|
35425
36051
|
return /* @__PURE__ */ jsx(
|
|
35426
36052
|
Primitive.button,
|
|
@@ -35437,21 +36063,21 @@ var DialogTrigger$1 = React.forwardRef(
|
|
|
35437
36063
|
);
|
|
35438
36064
|
}
|
|
35439
36065
|
);
|
|
35440
|
-
DialogTrigger$1.displayName = TRIGGER_NAME$
|
|
35441
|
-
var PORTAL_NAME$
|
|
35442
|
-
var [PortalProvider$
|
|
36066
|
+
DialogTrigger$1.displayName = TRIGGER_NAME$6;
|
|
36067
|
+
var PORTAL_NAME$6 = "DialogPortal";
|
|
36068
|
+
var [PortalProvider$2, usePortalContext$2] = createDialogContext(PORTAL_NAME$6, {
|
|
35443
36069
|
forceMount: void 0
|
|
35444
36070
|
});
|
|
35445
36071
|
var DialogPortal$1 = (props2) => {
|
|
35446
36072
|
const { __scopeDialog, forceMount, children, container } = props2;
|
|
35447
|
-
const context = useDialogContext(PORTAL_NAME$
|
|
35448
|
-
return /* @__PURE__ */ jsx(PortalProvider$
|
|
36073
|
+
const context = useDialogContext(PORTAL_NAME$6, __scopeDialog);
|
|
36074
|
+
return /* @__PURE__ */ jsx(PortalProvider$2, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$7, { asChild: true, container, children: child }) })) });
|
|
35449
36075
|
};
|
|
35450
|
-
DialogPortal$1.displayName = PORTAL_NAME$
|
|
36076
|
+
DialogPortal$1.displayName = PORTAL_NAME$6;
|
|
35451
36077
|
var OVERLAY_NAME$1 = "DialogOverlay";
|
|
35452
36078
|
var DialogOverlay$1 = React.forwardRef(
|
|
35453
36079
|
(props2, forwardedRef) => {
|
|
35454
|
-
const portalContext = usePortalContext$
|
|
36080
|
+
const portalContext = usePortalContext$2(OVERLAY_NAME$1, props2.__scopeDialog);
|
|
35455
36081
|
const { forceMount = portalContext.forceMount, ...overlayProps } = props2;
|
|
35456
36082
|
const context = useDialogContext(OVERLAY_NAME$1, props2.__scopeDialog);
|
|
35457
36083
|
return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
@@ -35478,19 +36104,19 @@ var DialogOverlayImpl = React.forwardRef(
|
|
|
35478
36104
|
);
|
|
35479
36105
|
}
|
|
35480
36106
|
);
|
|
35481
|
-
var CONTENT_NAME$
|
|
36107
|
+
var CONTENT_NAME$7 = "DialogContent";
|
|
35482
36108
|
var DialogContent$1 = React.forwardRef(
|
|
35483
36109
|
(props2, forwardedRef) => {
|
|
35484
|
-
const portalContext = usePortalContext$
|
|
36110
|
+
const portalContext = usePortalContext$2(CONTENT_NAME$7, props2.__scopeDialog);
|
|
35485
36111
|
const { forceMount = portalContext.forceMount, ...contentProps } = props2;
|
|
35486
|
-
const context = useDialogContext(CONTENT_NAME$
|
|
36112
|
+
const context = useDialogContext(CONTENT_NAME$7, props2.__scopeDialog);
|
|
35487
36113
|
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
35488
36114
|
}
|
|
35489
36115
|
);
|
|
35490
|
-
DialogContent$1.displayName = CONTENT_NAME$
|
|
36116
|
+
DialogContent$1.displayName = CONTENT_NAME$7;
|
|
35491
36117
|
var DialogContentModal = React.forwardRef(
|
|
35492
36118
|
(props2, forwardedRef) => {
|
|
35493
|
-
const context = useDialogContext(CONTENT_NAME$
|
|
36119
|
+
const context = useDialogContext(CONTENT_NAME$7, props2.__scopeDialog);
|
|
35494
36120
|
const contentRef = React.useRef(null);
|
|
35495
36121
|
const composedRefs = useComposedRefs$1(forwardedRef, context.contentRef, contentRef);
|
|
35496
36122
|
React.useEffect(() => {
|
|
@@ -35525,7 +36151,7 @@ var DialogContentModal = React.forwardRef(
|
|
|
35525
36151
|
);
|
|
35526
36152
|
var DialogContentNonModal = React.forwardRef(
|
|
35527
36153
|
(props2, forwardedRef) => {
|
|
35528
|
-
const context = useDialogContext(CONTENT_NAME$
|
|
36154
|
+
const context = useDialogContext(CONTENT_NAME$7, props2.__scopeDialog);
|
|
35529
36155
|
const hasInteractedOutsideRef = React.useRef(false);
|
|
35530
36156
|
const hasPointerDownOutsideRef = React.useRef(false);
|
|
35531
36157
|
return /* @__PURE__ */ jsx(
|
|
@@ -35568,7 +36194,7 @@ var DialogContentNonModal = React.forwardRef(
|
|
|
35568
36194
|
var DialogContentImpl = React.forwardRef(
|
|
35569
36195
|
(props2, forwardedRef) => {
|
|
35570
36196
|
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props2;
|
|
35571
|
-
const context = useDialogContext(CONTENT_NAME$
|
|
36197
|
+
const context = useDialogContext(CONTENT_NAME$7, __scopeDialog);
|
|
35572
36198
|
const contentRef = React.useRef(null);
|
|
35573
36199
|
const composedRefs = useComposedRefs$1(forwardedRef, contentRef);
|
|
35574
36200
|
useFocusGuards();
|
|
@@ -35643,7 +36269,7 @@ function getState(open) {
|
|
|
35643
36269
|
}
|
|
35644
36270
|
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
35645
36271
|
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
35646
|
-
contentName: CONTENT_NAME$
|
|
36272
|
+
contentName: CONTENT_NAME$7,
|
|
35647
36273
|
titleName: TITLE_NAME$1,
|
|
35648
36274
|
docsSlug: "dialog"
|
|
35649
36275
|
});
|
|
@@ -35677,8 +36303,8 @@ var DescriptionWarning$1 = ({ contentRef, descriptionId }) => {
|
|
|
35677
36303
|
return null;
|
|
35678
36304
|
};
|
|
35679
36305
|
var Root$7 = Dialog$1;
|
|
35680
|
-
var Trigger$
|
|
35681
|
-
var Portal$
|
|
36306
|
+
var Trigger$5 = DialogTrigger$1;
|
|
36307
|
+
var Portal$3 = DialogPortal$1;
|
|
35682
36308
|
var Overlay$1 = DialogOverlay$1;
|
|
35683
36309
|
var Content$2 = DialogContent$1;
|
|
35684
36310
|
var Title = DialogTitle$1;
|
|
@@ -35692,12 +36318,12 @@ function Dialog({
|
|
|
35692
36318
|
function DialogTrigger({
|
|
35693
36319
|
...props2
|
|
35694
36320
|
}) {
|
|
35695
|
-
return /* @__PURE__ */ jsx(Trigger$
|
|
36321
|
+
return /* @__PURE__ */ jsx(Trigger$5, { "data-slot": "dialog-trigger", ...props2 });
|
|
35696
36322
|
}
|
|
35697
36323
|
function DialogPortal({
|
|
35698
36324
|
...props2
|
|
35699
36325
|
}) {
|
|
35700
|
-
return /* @__PURE__ */ jsx(Portal$
|
|
36326
|
+
return /* @__PURE__ */ jsx(Portal$3, { "data-slot": "dialog-portal", ...props2 });
|
|
35701
36327
|
}
|
|
35702
36328
|
function DialogClose({
|
|
35703
36329
|
...props2
|
|
@@ -35915,526 +36541,6 @@ function Progress({
|
|
|
35915
36541
|
}
|
|
35916
36542
|
);
|
|
35917
36543
|
}
|
|
35918
|
-
var [createTooltipContext] = createContextScope("Tooltip", [
|
|
35919
|
-
createPopperScope
|
|
35920
|
-
]);
|
|
35921
|
-
var usePopperScope$2 = createPopperScope();
|
|
35922
|
-
var PROVIDER_NAME = "TooltipProvider";
|
|
35923
|
-
var DEFAULT_DELAY_DURATION = 700;
|
|
35924
|
-
var TOOLTIP_OPEN = "tooltip.open";
|
|
35925
|
-
var [TooltipProviderContextProvider, useTooltipProviderContext] = createTooltipContext(PROVIDER_NAME);
|
|
35926
|
-
var TooltipProvider$1 = (props2) => {
|
|
35927
|
-
const {
|
|
35928
|
-
__scopeTooltip,
|
|
35929
|
-
delayDuration = DEFAULT_DELAY_DURATION,
|
|
35930
|
-
skipDelayDuration = 300,
|
|
35931
|
-
disableHoverableContent = false,
|
|
35932
|
-
children
|
|
35933
|
-
} = props2;
|
|
35934
|
-
const isOpenDelayedRef = React.useRef(true);
|
|
35935
|
-
const isPointerInTransitRef = React.useRef(false);
|
|
35936
|
-
const skipDelayTimerRef = React.useRef(0);
|
|
35937
|
-
React.useEffect(() => {
|
|
35938
|
-
const skipDelayTimer = skipDelayTimerRef.current;
|
|
35939
|
-
return () => window.clearTimeout(skipDelayTimer);
|
|
35940
|
-
}, []);
|
|
35941
|
-
return /* @__PURE__ */ jsx(
|
|
35942
|
-
TooltipProviderContextProvider,
|
|
35943
|
-
{
|
|
35944
|
-
scope: __scopeTooltip,
|
|
35945
|
-
isOpenDelayedRef,
|
|
35946
|
-
delayDuration,
|
|
35947
|
-
onOpen: React.useCallback(() => {
|
|
35948
|
-
window.clearTimeout(skipDelayTimerRef.current);
|
|
35949
|
-
isOpenDelayedRef.current = false;
|
|
35950
|
-
}, []),
|
|
35951
|
-
onClose: React.useCallback(() => {
|
|
35952
|
-
window.clearTimeout(skipDelayTimerRef.current);
|
|
35953
|
-
skipDelayTimerRef.current = window.setTimeout(
|
|
35954
|
-
() => isOpenDelayedRef.current = true,
|
|
35955
|
-
skipDelayDuration
|
|
35956
|
-
);
|
|
35957
|
-
}, [skipDelayDuration]),
|
|
35958
|
-
isPointerInTransitRef,
|
|
35959
|
-
onPointerInTransitChange: React.useCallback((inTransit) => {
|
|
35960
|
-
isPointerInTransitRef.current = inTransit;
|
|
35961
|
-
}, []),
|
|
35962
|
-
disableHoverableContent,
|
|
35963
|
-
children
|
|
35964
|
-
}
|
|
35965
|
-
);
|
|
35966
|
-
};
|
|
35967
|
-
TooltipProvider$1.displayName = PROVIDER_NAME;
|
|
35968
|
-
var TOOLTIP_NAME = "Tooltip";
|
|
35969
|
-
var [TooltipContextProvider, useTooltipContext] = createTooltipContext(TOOLTIP_NAME);
|
|
35970
|
-
var Tooltip$2 = (props2) => {
|
|
35971
|
-
const {
|
|
35972
|
-
__scopeTooltip,
|
|
35973
|
-
children,
|
|
35974
|
-
open: openProp,
|
|
35975
|
-
defaultOpen,
|
|
35976
|
-
onOpenChange,
|
|
35977
|
-
disableHoverableContent: disableHoverableContentProp,
|
|
35978
|
-
delayDuration: delayDurationProp
|
|
35979
|
-
} = props2;
|
|
35980
|
-
const providerContext = useTooltipProviderContext(TOOLTIP_NAME, props2.__scopeTooltip);
|
|
35981
|
-
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
35982
|
-
const [trigger, setTrigger] = React.useState(null);
|
|
35983
|
-
const contentId = useId$1();
|
|
35984
|
-
const openTimerRef = React.useRef(0);
|
|
35985
|
-
const disableHoverableContent = disableHoverableContentProp ?? providerContext.disableHoverableContent;
|
|
35986
|
-
const delayDuration = delayDurationProp ?? providerContext.delayDuration;
|
|
35987
|
-
const wasOpenDelayedRef = React.useRef(false);
|
|
35988
|
-
const [open, setOpen] = useControllableState$1({
|
|
35989
|
-
prop: openProp,
|
|
35990
|
-
defaultProp: defaultOpen ?? false,
|
|
35991
|
-
onChange: (open2) => {
|
|
35992
|
-
if (open2) {
|
|
35993
|
-
providerContext.onOpen();
|
|
35994
|
-
document.dispatchEvent(new CustomEvent(TOOLTIP_OPEN));
|
|
35995
|
-
} else {
|
|
35996
|
-
providerContext.onClose();
|
|
35997
|
-
}
|
|
35998
|
-
onOpenChange == null ? void 0 : onOpenChange(open2);
|
|
35999
|
-
},
|
|
36000
|
-
caller: TOOLTIP_NAME
|
|
36001
|
-
});
|
|
36002
|
-
const stateAttribute = React.useMemo(() => {
|
|
36003
|
-
return open ? wasOpenDelayedRef.current ? "delayed-open" : "instant-open" : "closed";
|
|
36004
|
-
}, [open]);
|
|
36005
|
-
const handleOpen = React.useCallback(() => {
|
|
36006
|
-
window.clearTimeout(openTimerRef.current);
|
|
36007
|
-
openTimerRef.current = 0;
|
|
36008
|
-
wasOpenDelayedRef.current = false;
|
|
36009
|
-
setOpen(true);
|
|
36010
|
-
}, [setOpen]);
|
|
36011
|
-
const handleClose = React.useCallback(() => {
|
|
36012
|
-
window.clearTimeout(openTimerRef.current);
|
|
36013
|
-
openTimerRef.current = 0;
|
|
36014
|
-
setOpen(false);
|
|
36015
|
-
}, [setOpen]);
|
|
36016
|
-
const handleDelayedOpen = React.useCallback(() => {
|
|
36017
|
-
window.clearTimeout(openTimerRef.current);
|
|
36018
|
-
openTimerRef.current = window.setTimeout(() => {
|
|
36019
|
-
wasOpenDelayedRef.current = true;
|
|
36020
|
-
setOpen(true);
|
|
36021
|
-
openTimerRef.current = 0;
|
|
36022
|
-
}, delayDuration);
|
|
36023
|
-
}, [delayDuration, setOpen]);
|
|
36024
|
-
React.useEffect(() => {
|
|
36025
|
-
return () => {
|
|
36026
|
-
if (openTimerRef.current) {
|
|
36027
|
-
window.clearTimeout(openTimerRef.current);
|
|
36028
|
-
openTimerRef.current = 0;
|
|
36029
|
-
}
|
|
36030
|
-
};
|
|
36031
|
-
}, []);
|
|
36032
|
-
return /* @__PURE__ */ jsx(Root2$9, { ...popperScope, children: /* @__PURE__ */ jsx(
|
|
36033
|
-
TooltipContextProvider,
|
|
36034
|
-
{
|
|
36035
|
-
scope: __scopeTooltip,
|
|
36036
|
-
contentId,
|
|
36037
|
-
open,
|
|
36038
|
-
stateAttribute,
|
|
36039
|
-
trigger,
|
|
36040
|
-
onTriggerChange: setTrigger,
|
|
36041
|
-
onTriggerEnter: React.useCallback(() => {
|
|
36042
|
-
if (providerContext.isOpenDelayedRef.current) handleDelayedOpen();
|
|
36043
|
-
else handleOpen();
|
|
36044
|
-
}, [providerContext.isOpenDelayedRef, handleDelayedOpen, handleOpen]),
|
|
36045
|
-
onTriggerLeave: React.useCallback(() => {
|
|
36046
|
-
if (disableHoverableContent) {
|
|
36047
|
-
handleClose();
|
|
36048
|
-
} else {
|
|
36049
|
-
window.clearTimeout(openTimerRef.current);
|
|
36050
|
-
openTimerRef.current = 0;
|
|
36051
|
-
}
|
|
36052
|
-
}, [handleClose, disableHoverableContent]),
|
|
36053
|
-
onOpen: handleOpen,
|
|
36054
|
-
onClose: handleClose,
|
|
36055
|
-
disableHoverableContent,
|
|
36056
|
-
children
|
|
36057
|
-
}
|
|
36058
|
-
) });
|
|
36059
|
-
};
|
|
36060
|
-
Tooltip$2.displayName = TOOLTIP_NAME;
|
|
36061
|
-
var TRIGGER_NAME$6 = "TooltipTrigger";
|
|
36062
|
-
var TooltipTrigger$1 = React.forwardRef(
|
|
36063
|
-
(props2, forwardedRef) => {
|
|
36064
|
-
const { __scopeTooltip, ...triggerProps } = props2;
|
|
36065
|
-
const context = useTooltipContext(TRIGGER_NAME$6, __scopeTooltip);
|
|
36066
|
-
const providerContext = useTooltipProviderContext(TRIGGER_NAME$6, __scopeTooltip);
|
|
36067
|
-
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
36068
|
-
const ref = React.useRef(null);
|
|
36069
|
-
const composedRefs = useComposedRefs$1(forwardedRef, ref, context.onTriggerChange);
|
|
36070
|
-
const isPointerDownRef = React.useRef(false);
|
|
36071
|
-
const hasPointerMoveOpenedRef = React.useRef(false);
|
|
36072
|
-
const handlePointerUp2 = React.useCallback(() => isPointerDownRef.current = false, []);
|
|
36073
|
-
React.useEffect(() => {
|
|
36074
|
-
return () => document.removeEventListener("pointerup", handlePointerUp2);
|
|
36075
|
-
}, [handlePointerUp2]);
|
|
36076
|
-
return /* @__PURE__ */ jsx(Anchor, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
36077
|
-
Primitive.button,
|
|
36078
|
-
{
|
|
36079
|
-
"aria-describedby": context.open ? context.contentId : void 0,
|
|
36080
|
-
"data-state": context.stateAttribute,
|
|
36081
|
-
...triggerProps,
|
|
36082
|
-
ref: composedRefs,
|
|
36083
|
-
onPointerMove: composeEventHandlers$1(props2.onPointerMove, (event) => {
|
|
36084
|
-
if (event.pointerType === "touch") return;
|
|
36085
|
-
if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {
|
|
36086
|
-
context.onTriggerEnter();
|
|
36087
|
-
hasPointerMoveOpenedRef.current = true;
|
|
36088
|
-
}
|
|
36089
|
-
}),
|
|
36090
|
-
onPointerLeave: composeEventHandlers$1(props2.onPointerLeave, () => {
|
|
36091
|
-
context.onTriggerLeave();
|
|
36092
|
-
hasPointerMoveOpenedRef.current = false;
|
|
36093
|
-
}),
|
|
36094
|
-
onPointerDown: composeEventHandlers$1(props2.onPointerDown, () => {
|
|
36095
|
-
if (context.open) {
|
|
36096
|
-
context.onClose();
|
|
36097
|
-
}
|
|
36098
|
-
isPointerDownRef.current = true;
|
|
36099
|
-
document.addEventListener("pointerup", handlePointerUp2, { once: true });
|
|
36100
|
-
}),
|
|
36101
|
-
onFocus: composeEventHandlers$1(props2.onFocus, () => {
|
|
36102
|
-
if (!isPointerDownRef.current) context.onOpen();
|
|
36103
|
-
}),
|
|
36104
|
-
onBlur: composeEventHandlers$1(props2.onBlur, context.onClose),
|
|
36105
|
-
onClick: composeEventHandlers$1(props2.onClick, context.onClose)
|
|
36106
|
-
}
|
|
36107
|
-
) });
|
|
36108
|
-
}
|
|
36109
|
-
);
|
|
36110
|
-
TooltipTrigger$1.displayName = TRIGGER_NAME$6;
|
|
36111
|
-
var PORTAL_NAME$6 = "TooltipPortal";
|
|
36112
|
-
var [PortalProvider$2, usePortalContext$2] = createTooltipContext(PORTAL_NAME$6, {
|
|
36113
|
-
forceMount: void 0
|
|
36114
|
-
});
|
|
36115
|
-
var TooltipPortal = (props2) => {
|
|
36116
|
-
const { __scopeTooltip, forceMount, children, container } = props2;
|
|
36117
|
-
const context = useTooltipContext(PORTAL_NAME$6, __scopeTooltip);
|
|
36118
|
-
return /* @__PURE__ */ jsx(PortalProvider$2, { scope: __scopeTooltip, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$7, { asChild: true, container, children }) }) });
|
|
36119
|
-
};
|
|
36120
|
-
TooltipPortal.displayName = PORTAL_NAME$6;
|
|
36121
|
-
var CONTENT_NAME$7 = "TooltipContent";
|
|
36122
|
-
var TooltipContent$1 = React.forwardRef(
|
|
36123
|
-
(props2, forwardedRef) => {
|
|
36124
|
-
const portalContext = usePortalContext$2(CONTENT_NAME$7, props2.__scopeTooltip);
|
|
36125
|
-
const { forceMount = portalContext.forceMount, side = "top", ...contentProps } = props2;
|
|
36126
|
-
const context = useTooltipContext(CONTENT_NAME$7, props2.__scopeTooltip);
|
|
36127
|
-
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.disableHoverableContent ? /* @__PURE__ */ jsx(TooltipContentImpl, { side, ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(TooltipContentHoverable, { side, ...contentProps, ref: forwardedRef }) });
|
|
36128
|
-
}
|
|
36129
|
-
);
|
|
36130
|
-
var TooltipContentHoverable = React.forwardRef((props2, forwardedRef) => {
|
|
36131
|
-
const context = useTooltipContext(CONTENT_NAME$7, props2.__scopeTooltip);
|
|
36132
|
-
const providerContext = useTooltipProviderContext(CONTENT_NAME$7, props2.__scopeTooltip);
|
|
36133
|
-
const ref = React.useRef(null);
|
|
36134
|
-
const composedRefs = useComposedRefs$1(forwardedRef, ref);
|
|
36135
|
-
const [pointerGraceArea, setPointerGraceArea] = React.useState(null);
|
|
36136
|
-
const { trigger, onClose } = context;
|
|
36137
|
-
const content = ref.current;
|
|
36138
|
-
const { onPointerInTransitChange } = providerContext;
|
|
36139
|
-
const handleRemoveGraceArea = React.useCallback(() => {
|
|
36140
|
-
setPointerGraceArea(null);
|
|
36141
|
-
onPointerInTransitChange(false);
|
|
36142
|
-
}, [onPointerInTransitChange]);
|
|
36143
|
-
const handleCreateGraceArea = React.useCallback(
|
|
36144
|
-
(event, hoverTarget) => {
|
|
36145
|
-
const currentTarget = event.currentTarget;
|
|
36146
|
-
const exitPoint = { x: event.clientX, y: event.clientY };
|
|
36147
|
-
const exitSide = getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());
|
|
36148
|
-
const paddedExitPoints = getPaddedExitPoints(exitPoint, exitSide);
|
|
36149
|
-
const hoverTargetPoints = getPointsFromRect(hoverTarget.getBoundingClientRect());
|
|
36150
|
-
const graceArea = getHull([...paddedExitPoints, ...hoverTargetPoints]);
|
|
36151
|
-
setPointerGraceArea(graceArea);
|
|
36152
|
-
onPointerInTransitChange(true);
|
|
36153
|
-
},
|
|
36154
|
-
[onPointerInTransitChange]
|
|
36155
|
-
);
|
|
36156
|
-
React.useEffect(() => {
|
|
36157
|
-
return () => handleRemoveGraceArea();
|
|
36158
|
-
}, [handleRemoveGraceArea]);
|
|
36159
|
-
React.useEffect(() => {
|
|
36160
|
-
if (trigger && content) {
|
|
36161
|
-
const handleTriggerLeave = (event) => handleCreateGraceArea(event, content);
|
|
36162
|
-
const handleContentLeave = (event) => handleCreateGraceArea(event, trigger);
|
|
36163
|
-
trigger.addEventListener("pointerleave", handleTriggerLeave);
|
|
36164
|
-
content.addEventListener("pointerleave", handleContentLeave);
|
|
36165
|
-
return () => {
|
|
36166
|
-
trigger.removeEventListener("pointerleave", handleTriggerLeave);
|
|
36167
|
-
content.removeEventListener("pointerleave", handleContentLeave);
|
|
36168
|
-
};
|
|
36169
|
-
}
|
|
36170
|
-
}, [trigger, content, handleCreateGraceArea, handleRemoveGraceArea]);
|
|
36171
|
-
React.useEffect(() => {
|
|
36172
|
-
if (pointerGraceArea) {
|
|
36173
|
-
const handleTrackPointerGrace = (event) => {
|
|
36174
|
-
const target = event.target;
|
|
36175
|
-
const pointerPosition = { x: event.clientX, y: event.clientY };
|
|
36176
|
-
const hasEnteredTarget = (trigger == null ? void 0 : trigger.contains(target)) || (content == null ? void 0 : content.contains(target));
|
|
36177
|
-
const isPointerOutsideGraceArea = !isPointInPolygon$1(pointerPosition, pointerGraceArea);
|
|
36178
|
-
if (hasEnteredTarget) {
|
|
36179
|
-
handleRemoveGraceArea();
|
|
36180
|
-
} else if (isPointerOutsideGraceArea) {
|
|
36181
|
-
handleRemoveGraceArea();
|
|
36182
|
-
onClose();
|
|
36183
|
-
}
|
|
36184
|
-
};
|
|
36185
|
-
document.addEventListener("pointermove", handleTrackPointerGrace);
|
|
36186
|
-
return () => document.removeEventListener("pointermove", handleTrackPointerGrace);
|
|
36187
|
-
}
|
|
36188
|
-
}, [trigger, content, pointerGraceArea, onClose, handleRemoveGraceArea]);
|
|
36189
|
-
return /* @__PURE__ */ jsx(TooltipContentImpl, { ...props2, ref: composedRefs });
|
|
36190
|
-
});
|
|
36191
|
-
var [VisuallyHiddenContentContextProvider, useVisuallyHiddenContentContext] = createTooltipContext(TOOLTIP_NAME, { isInside: false });
|
|
36192
|
-
var Slottable$1 = /* @__PURE__ */ createSlottable("TooltipContent");
|
|
36193
|
-
var TooltipContentImpl = React.forwardRef(
|
|
36194
|
-
(props2, forwardedRef) => {
|
|
36195
|
-
const {
|
|
36196
|
-
__scopeTooltip,
|
|
36197
|
-
children,
|
|
36198
|
-
"aria-label": ariaLabel,
|
|
36199
|
-
onEscapeKeyDown,
|
|
36200
|
-
onPointerDownOutside,
|
|
36201
|
-
...contentProps
|
|
36202
|
-
} = props2;
|
|
36203
|
-
const context = useTooltipContext(CONTENT_NAME$7, __scopeTooltip);
|
|
36204
|
-
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
36205
|
-
const { onClose } = context;
|
|
36206
|
-
React.useEffect(() => {
|
|
36207
|
-
document.addEventListener(TOOLTIP_OPEN, onClose);
|
|
36208
|
-
return () => document.removeEventListener(TOOLTIP_OPEN, onClose);
|
|
36209
|
-
}, [onClose]);
|
|
36210
|
-
React.useEffect(() => {
|
|
36211
|
-
if (context.trigger) {
|
|
36212
|
-
const handleScroll2 = (event) => {
|
|
36213
|
-
const target = event.target;
|
|
36214
|
-
if (target == null ? void 0 : target.contains(context.trigger)) onClose();
|
|
36215
|
-
};
|
|
36216
|
-
window.addEventListener("scroll", handleScroll2, { capture: true });
|
|
36217
|
-
return () => window.removeEventListener("scroll", handleScroll2, { capture: true });
|
|
36218
|
-
}
|
|
36219
|
-
}, [context.trigger, onClose]);
|
|
36220
|
-
return /* @__PURE__ */ jsx(
|
|
36221
|
-
DismissableLayer,
|
|
36222
|
-
{
|
|
36223
|
-
asChild: true,
|
|
36224
|
-
disableOutsidePointerEvents: false,
|
|
36225
|
-
onEscapeKeyDown,
|
|
36226
|
-
onPointerDownOutside,
|
|
36227
|
-
onFocusOutside: (event) => event.preventDefault(),
|
|
36228
|
-
onDismiss: onClose,
|
|
36229
|
-
children: /* @__PURE__ */ jsxs(
|
|
36230
|
-
Content$3,
|
|
36231
|
-
{
|
|
36232
|
-
"data-state": context.stateAttribute,
|
|
36233
|
-
...popperScope,
|
|
36234
|
-
...contentProps,
|
|
36235
|
-
ref: forwardedRef,
|
|
36236
|
-
style: {
|
|
36237
|
-
...contentProps.style,
|
|
36238
|
-
// re-namespace exposed content custom properties
|
|
36239
|
-
...{
|
|
36240
|
-
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
36241
|
-
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
36242
|
-
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
36243
|
-
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
36244
|
-
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
36245
|
-
}
|
|
36246
|
-
},
|
|
36247
|
-
children: [
|
|
36248
|
-
/* @__PURE__ */ jsx(Slottable$1, { children }),
|
|
36249
|
-
/* @__PURE__ */ jsx(VisuallyHiddenContentContextProvider, { scope: __scopeTooltip, isInside: true, children: /* @__PURE__ */ jsx(Root$a, { id: context.contentId, role: "tooltip", children: ariaLabel || children }) })
|
|
36250
|
-
]
|
|
36251
|
-
}
|
|
36252
|
-
)
|
|
36253
|
-
}
|
|
36254
|
-
);
|
|
36255
|
-
}
|
|
36256
|
-
);
|
|
36257
|
-
TooltipContent$1.displayName = CONTENT_NAME$7;
|
|
36258
|
-
var ARROW_NAME$5 = "TooltipArrow";
|
|
36259
|
-
var TooltipArrow = React.forwardRef(
|
|
36260
|
-
(props2, forwardedRef) => {
|
|
36261
|
-
const { __scopeTooltip, ...arrowProps } = props2;
|
|
36262
|
-
const popperScope = usePopperScope$2(__scopeTooltip);
|
|
36263
|
-
const visuallyHiddenContentContext = useVisuallyHiddenContentContext(
|
|
36264
|
-
ARROW_NAME$5,
|
|
36265
|
-
__scopeTooltip
|
|
36266
|
-
);
|
|
36267
|
-
return visuallyHiddenContentContext.isInside ? null : /* @__PURE__ */ jsx(Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });
|
|
36268
|
-
}
|
|
36269
|
-
);
|
|
36270
|
-
TooltipArrow.displayName = ARROW_NAME$5;
|
|
36271
|
-
function getExitSideFromRect(point, rect) {
|
|
36272
|
-
const top = Math.abs(rect.top - point.y);
|
|
36273
|
-
const bottom = Math.abs(rect.bottom - point.y);
|
|
36274
|
-
const right = Math.abs(rect.right - point.x);
|
|
36275
|
-
const left = Math.abs(rect.left - point.x);
|
|
36276
|
-
switch (Math.min(top, bottom, right, left)) {
|
|
36277
|
-
case left:
|
|
36278
|
-
return "left";
|
|
36279
|
-
case right:
|
|
36280
|
-
return "right";
|
|
36281
|
-
case top:
|
|
36282
|
-
return "top";
|
|
36283
|
-
case bottom:
|
|
36284
|
-
return "bottom";
|
|
36285
|
-
default:
|
|
36286
|
-
throw new Error("unreachable");
|
|
36287
|
-
}
|
|
36288
|
-
}
|
|
36289
|
-
function getPaddedExitPoints(exitPoint, exitSide, padding = 5) {
|
|
36290
|
-
const paddedExitPoints = [];
|
|
36291
|
-
switch (exitSide) {
|
|
36292
|
-
case "top":
|
|
36293
|
-
paddedExitPoints.push(
|
|
36294
|
-
{ x: exitPoint.x - padding, y: exitPoint.y + padding },
|
|
36295
|
-
{ x: exitPoint.x + padding, y: exitPoint.y + padding }
|
|
36296
|
-
);
|
|
36297
|
-
break;
|
|
36298
|
-
case "bottom":
|
|
36299
|
-
paddedExitPoints.push(
|
|
36300
|
-
{ x: exitPoint.x - padding, y: exitPoint.y - padding },
|
|
36301
|
-
{ x: exitPoint.x + padding, y: exitPoint.y - padding }
|
|
36302
|
-
);
|
|
36303
|
-
break;
|
|
36304
|
-
case "left":
|
|
36305
|
-
paddedExitPoints.push(
|
|
36306
|
-
{ x: exitPoint.x + padding, y: exitPoint.y - padding },
|
|
36307
|
-
{ x: exitPoint.x + padding, y: exitPoint.y + padding }
|
|
36308
|
-
);
|
|
36309
|
-
break;
|
|
36310
|
-
case "right":
|
|
36311
|
-
paddedExitPoints.push(
|
|
36312
|
-
{ x: exitPoint.x - padding, y: exitPoint.y - padding },
|
|
36313
|
-
{ x: exitPoint.x - padding, y: exitPoint.y + padding }
|
|
36314
|
-
);
|
|
36315
|
-
break;
|
|
36316
|
-
}
|
|
36317
|
-
return paddedExitPoints;
|
|
36318
|
-
}
|
|
36319
|
-
function getPointsFromRect(rect) {
|
|
36320
|
-
const { top, right, bottom, left } = rect;
|
|
36321
|
-
return [
|
|
36322
|
-
{ x: left, y: top },
|
|
36323
|
-
{ x: right, y: top },
|
|
36324
|
-
{ x: right, y: bottom },
|
|
36325
|
-
{ x: left, y: bottom }
|
|
36326
|
-
];
|
|
36327
|
-
}
|
|
36328
|
-
function isPointInPolygon$1(point, polygon) {
|
|
36329
|
-
const { x: x2, y } = point;
|
|
36330
|
-
let inside = false;
|
|
36331
|
-
for (let i2 = 0, j = polygon.length - 1; i2 < polygon.length; j = i2++) {
|
|
36332
|
-
const ii = polygon[i2];
|
|
36333
|
-
const jj = polygon[j];
|
|
36334
|
-
const xi = ii.x;
|
|
36335
|
-
const yi = ii.y;
|
|
36336
|
-
const xj = jj.x;
|
|
36337
|
-
const yj = jj.y;
|
|
36338
|
-
const intersect = yi > y !== yj > y && x2 < (xj - xi) * (y - yi) / (yj - yi) + xi;
|
|
36339
|
-
if (intersect) inside = !inside;
|
|
36340
|
-
}
|
|
36341
|
-
return inside;
|
|
36342
|
-
}
|
|
36343
|
-
function getHull(points) {
|
|
36344
|
-
const newPoints = points.slice();
|
|
36345
|
-
newPoints.sort((a2, b2) => {
|
|
36346
|
-
if (a2.x < b2.x) return -1;
|
|
36347
|
-
else if (a2.x > b2.x) return 1;
|
|
36348
|
-
else if (a2.y < b2.y) return -1;
|
|
36349
|
-
else if (a2.y > b2.y) return 1;
|
|
36350
|
-
else return 0;
|
|
36351
|
-
});
|
|
36352
|
-
return getHullPresorted(newPoints);
|
|
36353
|
-
}
|
|
36354
|
-
function getHullPresorted(points) {
|
|
36355
|
-
if (points.length <= 1) return points.slice();
|
|
36356
|
-
const upperHull = [];
|
|
36357
|
-
for (let i2 = 0; i2 < points.length; i2++) {
|
|
36358
|
-
const p2 = points[i2];
|
|
36359
|
-
while (upperHull.length >= 2) {
|
|
36360
|
-
const q = upperHull[upperHull.length - 1];
|
|
36361
|
-
const r2 = upperHull[upperHull.length - 2];
|
|
36362
|
-
if ((q.x - r2.x) * (p2.y - r2.y) >= (q.y - r2.y) * (p2.x - r2.x)) upperHull.pop();
|
|
36363
|
-
else break;
|
|
36364
|
-
}
|
|
36365
|
-
upperHull.push(p2);
|
|
36366
|
-
}
|
|
36367
|
-
upperHull.pop();
|
|
36368
|
-
const lowerHull = [];
|
|
36369
|
-
for (let i2 = points.length - 1; i2 >= 0; i2--) {
|
|
36370
|
-
const p2 = points[i2];
|
|
36371
|
-
while (lowerHull.length >= 2) {
|
|
36372
|
-
const q = lowerHull[lowerHull.length - 1];
|
|
36373
|
-
const r2 = lowerHull[lowerHull.length - 2];
|
|
36374
|
-
if ((q.x - r2.x) * (p2.y - r2.y) >= (q.y - r2.y) * (p2.x - r2.x)) lowerHull.pop();
|
|
36375
|
-
else break;
|
|
36376
|
-
}
|
|
36377
|
-
lowerHull.push(p2);
|
|
36378
|
-
}
|
|
36379
|
-
lowerHull.pop();
|
|
36380
|
-
if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) {
|
|
36381
|
-
return upperHull;
|
|
36382
|
-
} else {
|
|
36383
|
-
return upperHull.concat(lowerHull);
|
|
36384
|
-
}
|
|
36385
|
-
}
|
|
36386
|
-
var Provider = TooltipProvider$1;
|
|
36387
|
-
var Root3$2 = Tooltip$2;
|
|
36388
|
-
var Trigger$5 = TooltipTrigger$1;
|
|
36389
|
-
var Portal$3 = TooltipPortal;
|
|
36390
|
-
var Content2$6 = TooltipContent$1;
|
|
36391
|
-
var Arrow2$1 = TooltipArrow;
|
|
36392
|
-
function TooltipProvider({
|
|
36393
|
-
delayDuration = 0,
|
|
36394
|
-
...props2
|
|
36395
|
-
}) {
|
|
36396
|
-
return /* @__PURE__ */ jsx(
|
|
36397
|
-
Provider,
|
|
36398
|
-
{
|
|
36399
|
-
"data-slot": "tooltip-provider",
|
|
36400
|
-
delayDuration,
|
|
36401
|
-
...props2
|
|
36402
|
-
}
|
|
36403
|
-
);
|
|
36404
|
-
}
|
|
36405
|
-
function Tooltip$1({
|
|
36406
|
-
...props2
|
|
36407
|
-
}) {
|
|
36408
|
-
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(Root3$2, { "data-slot": "tooltip", ...props2 }) });
|
|
36409
|
-
}
|
|
36410
|
-
function TooltipTrigger({
|
|
36411
|
-
...props2
|
|
36412
|
-
}) {
|
|
36413
|
-
return /* @__PURE__ */ jsx(Trigger$5, { "data-slot": "tooltip-trigger", ...props2 });
|
|
36414
|
-
}
|
|
36415
|
-
function TooltipContent({
|
|
36416
|
-
className,
|
|
36417
|
-
sideOffset = 0,
|
|
36418
|
-
children,
|
|
36419
|
-
...props2
|
|
36420
|
-
}) {
|
|
36421
|
-
return /* @__PURE__ */ jsx(Portal$3, { children: /* @__PURE__ */ jsxs(
|
|
36422
|
-
Content2$6,
|
|
36423
|
-
{
|
|
36424
|
-
"data-slot": "tooltip-content",
|
|
36425
|
-
sideOffset,
|
|
36426
|
-
className: cn$1(
|
|
36427
|
-
"bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",
|
|
36428
|
-
className
|
|
36429
|
-
),
|
|
36430
|
-
...props2,
|
|
36431
|
-
children: [
|
|
36432
|
-
children,
|
|
36433
|
-
/* @__PURE__ */ jsx(Arrow2$1, { className: "bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })
|
|
36434
|
-
]
|
|
36435
|
-
}
|
|
36436
|
-
) });
|
|
36437
|
-
}
|
|
36438
36544
|
let backgroundRemovalLoader = null;
|
|
36439
36545
|
function createFileLike(blob, fileName, lastModified, type = blob.type) {
|
|
36440
36546
|
try {
|
|
@@ -36752,7 +36858,8 @@ function FileUploader({
|
|
|
36752
36858
|
withDownload = true,
|
|
36753
36859
|
withImagePreview = false,
|
|
36754
36860
|
placeholder = "Drag and drop files here, or click to select",
|
|
36755
|
-
className
|
|
36861
|
+
className,
|
|
36862
|
+
dataTestID
|
|
36756
36863
|
}) {
|
|
36757
36864
|
const isControlled = value !== void 0;
|
|
36758
36865
|
const [files, setFiles] = useState(() => defaultValue ?? []);
|
|
@@ -37195,6 +37302,7 @@ function FileUploader({
|
|
|
37195
37302
|
/* @__PURE__ */ jsx(
|
|
37196
37303
|
"input",
|
|
37197
37304
|
{
|
|
37305
|
+
"data-testid": dataTestID,
|
|
37198
37306
|
...getInputProps({
|
|
37199
37307
|
onClick: (e2) => {
|
|
37200
37308
|
e2.target.value = "";
|
|
@@ -37336,7 +37444,8 @@ function FileField({
|
|
|
37336
37444
|
onUploadError: field.fileOnUploadError,
|
|
37337
37445
|
onRemove: field.fileOnRemove,
|
|
37338
37446
|
onRetry: field.fileOnRetry,
|
|
37339
|
-
onRetryAll: field.fileOnRetryAll
|
|
37447
|
+
onRetryAll: field.fileOnRetryAll,
|
|
37448
|
+
dataTestID: field.dataTestID
|
|
37340
37449
|
}
|
|
37341
37450
|
);
|
|
37342
37451
|
}
|
|
@@ -37573,7 +37682,8 @@ function ArrayField({
|
|
|
37573
37682
|
onChange(newArray);
|
|
37574
37683
|
},
|
|
37575
37684
|
placeholder: `Item ${index2 + 1}`,
|
|
37576
|
-
disabled: field.disabled
|
|
37685
|
+
disabled: field.disabled,
|
|
37686
|
+
"data-testid": field.dataTestID
|
|
37577
37687
|
}
|
|
37578
37688
|
) })
|
|
37579
37689
|
] }, item.id)) })
|
|
@@ -37951,7 +38061,14 @@ function FormBuilderField({
|
|
|
37951
38061
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
37952
38062
|
/* @__PURE__ */ jsxs(Label$2, { htmlFor: fieldPath, className: "text-sm font-medium", children: [
|
|
37953
38063
|
field.label,
|
|
37954
|
-
field.required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
38064
|
+
field.required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" }),
|
|
38065
|
+
field.infoTooltip && /* @__PURE__ */ jsx(
|
|
38066
|
+
InfoTooltip,
|
|
38067
|
+
{
|
|
38068
|
+
iconSize: field.infoTooltipIconSize,
|
|
38069
|
+
content: field.infoTooltip
|
|
38070
|
+
}
|
|
38071
|
+
)
|
|
37955
38072
|
] }),
|
|
37956
38073
|
renderField()
|
|
37957
38074
|
] }),
|
|
@@ -37979,7 +38096,14 @@ function FormBuilderField({
|
|
|
37979
38096
|
children: [
|
|
37980
38097
|
/* @__PURE__ */ jsxs(Label$2, { htmlFor: fieldPath, className: "text-sm font-medium", children: [
|
|
37981
38098
|
field.label,
|
|
37982
|
-
field.required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" })
|
|
38099
|
+
field.required && /* @__PURE__ */ jsx("span", { className: "text-destructive ml-1", children: "*" }),
|
|
38100
|
+
field.infoTooltip && /* @__PURE__ */ jsx(
|
|
38101
|
+
InfoTooltip,
|
|
38102
|
+
{
|
|
38103
|
+
iconSize: field.infoTooltipIconSize,
|
|
38104
|
+
content: field.infoTooltip
|
|
38105
|
+
}
|
|
38106
|
+
)
|
|
37983
38107
|
] }),
|
|
37984
38108
|
renderField(),
|
|
37985
38109
|
field.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: field.description }),
|
|
@@ -40120,7 +40244,8 @@ function DataTable({
|
|
|
40120
40244
|
onRowClick,
|
|
40121
40245
|
filterWrapper,
|
|
40122
40246
|
filterTitle,
|
|
40123
|
-
filterShowActionsSeparator
|
|
40247
|
+
filterShowActionsSeparator,
|
|
40248
|
+
CustomHeaderComponent
|
|
40124
40249
|
}) {
|
|
40125
40250
|
var _a2;
|
|
40126
40251
|
const [rowSelection, setRowSelection] = React.useState({});
|
|
@@ -40303,86 +40428,88 @@ function DataTable({
|
|
|
40303
40428
|
const effectiveFilterWrapper = filterWrapper ?? "accordion";
|
|
40304
40429
|
const effectiveFilterTitle = filterTitle ?? "Filters";
|
|
40305
40430
|
return /* @__PURE__ */ jsxs("div", { className: cn$1("space-y-3", className), children: [
|
|
40306
|
-
|
|
40307
|
-
|
|
40308
|
-
|
|
40309
|
-
|
|
40310
|
-
|
|
40311
|
-
|
|
40312
|
-
|
|
40313
|
-
|
|
40314
|
-
/* @__PURE__ */
|
|
40315
|
-
|
|
40316
|
-
|
|
40431
|
+
CustomHeaderComponent ? CustomHeaderComponent() : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
40432
|
+
(formFilters == null ? void 0 : formFilters.length) ? effectiveFilterWrapper === "accordion" ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-border", children: /* @__PURE__ */ jsx(
|
|
40433
|
+
Accordion,
|
|
40434
|
+
{
|
|
40435
|
+
type: "single",
|
|
40436
|
+
collapsible: true,
|
|
40437
|
+
className: "w-full",
|
|
40438
|
+
defaultValue: "filters",
|
|
40439
|
+
children: /* @__PURE__ */ jsxs(AccordionItem, { value: "filters", children: [
|
|
40440
|
+
/* @__PURE__ */ jsx(AccordionTrigger, { className: "px-4 py-3 border-b border-border text-md", children: effectiveFilterTitle }),
|
|
40441
|
+
/* @__PURE__ */ jsx(AccordionContent, { className: "px-4 pb-4 pt-5", children: /* @__PURE__ */ jsx(
|
|
40442
|
+
FormBuilder,
|
|
40443
|
+
{
|
|
40444
|
+
sections: formFilters,
|
|
40445
|
+
defaultValues: formFilterValues,
|
|
40446
|
+
onSubmit: (data2) => onFormFilterChange == null ? void 0 : onFormFilterChange(data2),
|
|
40447
|
+
onReset: () => onFormFilterChange == null ? void 0 : onFormFilterChange({}),
|
|
40448
|
+
showActions: true,
|
|
40449
|
+
submitLabel: "Apply",
|
|
40450
|
+
resetLabel: "Clear",
|
|
40451
|
+
showActionsSeparator: filterShowActionsSeparator
|
|
40452
|
+
},
|
|
40453
|
+
JSON.stringify(formFilterValues ?? {})
|
|
40454
|
+
) })
|
|
40455
|
+
] })
|
|
40456
|
+
}
|
|
40457
|
+
) }) : effectiveFilterWrapper === "card" ? /* @__PURE__ */ jsx("div", { className: "rounded-md border border-border p-4", children: /* @__PURE__ */ jsx(
|
|
40458
|
+
FormBuilder,
|
|
40459
|
+
{
|
|
40460
|
+
sections: formFilters,
|
|
40461
|
+
defaultValues: formFilterValues,
|
|
40462
|
+
onSubmit: (data2) => onFormFilterChange == null ? void 0 : onFormFilterChange(data2),
|
|
40463
|
+
onReset: () => onFormFilterChange == null ? void 0 : onFormFilterChange({}),
|
|
40464
|
+
showActions: true,
|
|
40465
|
+
submitLabel: "Apply",
|
|
40466
|
+
resetLabel: "Clear",
|
|
40467
|
+
showActionsSeparator: filterShowActionsSeparator
|
|
40468
|
+
},
|
|
40469
|
+
JSON.stringify(formFilterValues ?? {})
|
|
40470
|
+
) }) : /* @__PURE__ */ jsx(
|
|
40471
|
+
FormBuilder,
|
|
40472
|
+
{
|
|
40473
|
+
sections: formFilters,
|
|
40474
|
+
defaultValues: formFilterValues,
|
|
40475
|
+
onSubmit: (data2) => onFormFilterChange == null ? void 0 : onFormFilterChange(data2),
|
|
40476
|
+
onReset: () => onFormFilterChange == null ? void 0 : onFormFilterChange({}),
|
|
40477
|
+
showActions: true,
|
|
40478
|
+
submitLabel: "Apply",
|
|
40479
|
+
resetLabel: "Clear",
|
|
40480
|
+
showActionsSeparator: filterShowActionsSeparator
|
|
40481
|
+
},
|
|
40482
|
+
JSON.stringify(formFilterValues ?? {})
|
|
40483
|
+
) : null,
|
|
40484
|
+
(safeActions.length || showStandardActions || selectable && table.getSelectedRowModel().rows.length > 0 && safeBatchActions.length) && /* @__PURE__ */ jsx("div", { className: "rounded-md p-2 mt-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
40485
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: selectable && table.getSelectedRowModel().rows.length > 0 && safeBatchActions.map((a2) => renderBatchButton(a2, a2.key)) }),
|
|
40486
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40487
|
+
showStandardActions && onRefresh && /* @__PURE__ */ jsxs(
|
|
40488
|
+
Button$1,
|
|
40317
40489
|
{
|
|
40318
|
-
|
|
40319
|
-
|
|
40320
|
-
|
|
40321
|
-
|
|
40322
|
-
|
|
40323
|
-
|
|
40324
|
-
|
|
40325
|
-
|
|
40326
|
-
|
|
40327
|
-
|
|
40328
|
-
|
|
40490
|
+
variant: "outline",
|
|
40491
|
+
size: "sm",
|
|
40492
|
+
onClick: handleRefresh,
|
|
40493
|
+
disabled: loading,
|
|
40494
|
+
className: "h-8",
|
|
40495
|
+
title: "Refresh",
|
|
40496
|
+
children: [
|
|
40497
|
+
/* @__PURE__ */ jsx(
|
|
40498
|
+
RefreshCw,
|
|
40499
|
+
{
|
|
40500
|
+
className: cn$1("h-4 w-4", loading && "animate-spin")
|
|
40501
|
+
}
|
|
40502
|
+
),
|
|
40503
|
+
" ",
|
|
40504
|
+
"Refresh"
|
|
40505
|
+
]
|
|
40506
|
+
}
|
|
40507
|
+
),
|
|
40508
|
+
isColumnVisibilityEnabled ? /* @__PURE__ */ jsx(DataTableViewOptions, { table }) : null,
|
|
40509
|
+
safeActions.map((a2) => renderActionButton(a2, a2.key))
|
|
40329
40510
|
] })
|
|
40330
|
-
}
|
|
40331
|
-
|
|
40332
|
-
FormBuilder,
|
|
40333
|
-
{
|
|
40334
|
-
sections: formFilters,
|
|
40335
|
-
defaultValues: formFilterValues,
|
|
40336
|
-
onSubmit: (data2) => onFormFilterChange == null ? void 0 : onFormFilterChange(data2),
|
|
40337
|
-
onReset: () => onFormFilterChange == null ? void 0 : onFormFilterChange({}),
|
|
40338
|
-
showActions: true,
|
|
40339
|
-
submitLabel: "Apply",
|
|
40340
|
-
resetLabel: "Clear",
|
|
40341
|
-
showActionsSeparator: filterShowActionsSeparator
|
|
40342
|
-
},
|
|
40343
|
-
JSON.stringify(formFilterValues ?? {})
|
|
40344
|
-
) }) : /* @__PURE__ */ jsx(
|
|
40345
|
-
FormBuilder,
|
|
40346
|
-
{
|
|
40347
|
-
sections: formFilters,
|
|
40348
|
-
defaultValues: formFilterValues,
|
|
40349
|
-
onSubmit: (data2) => onFormFilterChange == null ? void 0 : onFormFilterChange(data2),
|
|
40350
|
-
onReset: () => onFormFilterChange == null ? void 0 : onFormFilterChange({}),
|
|
40351
|
-
showActions: true,
|
|
40352
|
-
submitLabel: "Apply",
|
|
40353
|
-
resetLabel: "Clear",
|
|
40354
|
-
showActionsSeparator: filterShowActionsSeparator
|
|
40355
|
-
},
|
|
40356
|
-
JSON.stringify(formFilterValues ?? {})
|
|
40357
|
-
) : null,
|
|
40358
|
-
(safeActions.length || showStandardActions || selectable && table.getSelectedRowModel().rows.length > 0 && safeBatchActions.length) && /* @__PURE__ */ jsx("div", { className: "rounded-md p-2 mt-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
40359
|
-
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: selectable && table.getSelectedRowModel().rows.length > 0 && safeBatchActions.map((a2) => renderBatchButton(a2, a2.key)) }),
|
|
40360
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
40361
|
-
showStandardActions && onRefresh && /* @__PURE__ */ jsxs(
|
|
40362
|
-
Button$1,
|
|
40363
|
-
{
|
|
40364
|
-
variant: "outline",
|
|
40365
|
-
size: "sm",
|
|
40366
|
-
onClick: handleRefresh,
|
|
40367
|
-
disabled: loading,
|
|
40368
|
-
className: "h-8",
|
|
40369
|
-
title: "Refresh",
|
|
40370
|
-
children: [
|
|
40371
|
-
/* @__PURE__ */ jsx(
|
|
40372
|
-
RefreshCw,
|
|
40373
|
-
{
|
|
40374
|
-
className: cn$1("h-4 w-4", loading && "animate-spin")
|
|
40375
|
-
}
|
|
40376
|
-
),
|
|
40377
|
-
" ",
|
|
40378
|
-
"Refresh"
|
|
40379
|
-
]
|
|
40380
|
-
}
|
|
40381
|
-
),
|
|
40382
|
-
isColumnVisibilityEnabled ? /* @__PURE__ */ jsx(DataTableViewOptions, { table }) : null,
|
|
40383
|
-
safeActions.map((a2) => renderActionButton(a2, a2.key))
|
|
40384
|
-
] })
|
|
40385
|
-
] }) }),
|
|
40511
|
+
] }) })
|
|
40512
|
+
] }),
|
|
40386
40513
|
/* @__PURE__ */ jsxs(
|
|
40387
40514
|
"div",
|
|
40388
40515
|
{
|
|
@@ -45980,7 +46107,7 @@ var AlertDialogTrigger$1 = React.forwardRef(
|
|
|
45980
46107
|
(props2, forwardedRef) => {
|
|
45981
46108
|
const { __scopeAlertDialog, ...triggerProps } = props2;
|
|
45982
46109
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
45983
|
-
return /* @__PURE__ */ jsx(Trigger$
|
|
46110
|
+
return /* @__PURE__ */ jsx(Trigger$5, { ...dialogScope, ...triggerProps, ref: forwardedRef });
|
|
45984
46111
|
}
|
|
45985
46112
|
);
|
|
45986
46113
|
AlertDialogTrigger$1.displayName = TRIGGER_NAME$4;
|
|
@@ -45988,7 +46115,7 @@ var PORTAL_NAME$3 = "AlertDialogPortal";
|
|
|
45988
46115
|
var AlertDialogPortal$1 = (props2) => {
|
|
45989
46116
|
const { __scopeAlertDialog, ...portalProps } = props2;
|
|
45990
46117
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
45991
|
-
return /* @__PURE__ */ jsx(Portal$
|
|
46118
|
+
return /* @__PURE__ */ jsx(Portal$3, { ...dialogScope, ...portalProps });
|
|
45992
46119
|
};
|
|
45993
46120
|
AlertDialogPortal$1.displayName = PORTAL_NAME$3;
|
|
45994
46121
|
var OVERLAY_NAME = "AlertDialogOverlay";
|
|
@@ -47742,7 +47869,7 @@ function Sheet({ ...props2 }) {
|
|
|
47742
47869
|
function SheetTrigger({
|
|
47743
47870
|
...props2
|
|
47744
47871
|
}) {
|
|
47745
|
-
return /* @__PURE__ */ jsx(Trigger$
|
|
47872
|
+
return /* @__PURE__ */ jsx(Trigger$5, { "data-slot": "sheet-trigger", ...props2 });
|
|
47746
47873
|
}
|
|
47747
47874
|
function SheetClose({
|
|
47748
47875
|
...props2
|
|
@@ -47752,7 +47879,7 @@ function SheetClose({
|
|
|
47752
47879
|
function SheetPortal({
|
|
47753
47880
|
...props2
|
|
47754
47881
|
}) {
|
|
47755
|
-
return /* @__PURE__ */ jsx(Portal$
|
|
47882
|
+
return /* @__PURE__ */ jsx(Portal$3, { "data-slot": "sheet-portal", ...props2 });
|
|
47756
47883
|
}
|
|
47757
47884
|
function SheetOverlay({
|
|
47758
47885
|
className,
|
|
@@ -58455,7 +58582,7 @@ var N = '[cmdk-group=""]', Y$1 = '[cmdk-group-items=""]', be = '[cmdk-group-head
|
|
|
58455
58582
|
}, []), React.createElement(Primitive.div, { ref: composeRefs$2(d, o2), ...c2, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b2.listId }, B(r2, (m2) => React.createElement("div", { ref: composeRefs$2(f, b2.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
58456
58583
|
}), xe = React.forwardRef((r2, o2) => {
|
|
58457
58584
|
let { open: n2, onOpenChange: u2, overlayClassName: c2, contentClassName: d, container: f, ...p2 } = r2;
|
|
58458
|
-
return React.createElement(Root$7, { open: n2, onOpenChange: u2 }, React.createElement(Portal$
|
|
58585
|
+
return React.createElement(Root$7, { open: n2, onOpenChange: u2 }, React.createElement(Portal$3, { container: f }, React.createElement(Overlay$1, { "cmdk-overlay": "", className: c2 }), React.createElement(Content$2, { "aria-label": r2.label, "cmdk-dialog": "", className: d }, React.createElement(me, { ref: o2, ...p2 }))));
|
|
58459
58586
|
}), Ie = React.forwardRef((r2, o2) => P((u2) => u2.filtered.count === 0) ? React.createElement(Primitive.div, { ref: o2, ...r2, "cmdk-empty": "", role: "presentation" }) : null), Pe = React.forwardRef((r2, o2) => {
|
|
58460
58587
|
let { progress: n2, children: u2, label: c2 = "Loading...", ...d } = r2;
|
|
58461
58588
|
return React.createElement(Primitive.div, { ref: o2, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n2, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c2 }, B(r2, (f) => React.createElement("div", { "aria-hidden": true }, f)));
|
|
@@ -60605,7 +60732,7 @@ Handle.displayName = "Drawer.Handle";
|
|
|
60605
60732
|
function Portal$1(props2) {
|
|
60606
60733
|
const context = useDrawerContext();
|
|
60607
60734
|
const { container = context.container, ...portalProps } = props2;
|
|
60608
|
-
return /* @__PURE__ */ React__default.createElement(Portal$
|
|
60735
|
+
return /* @__PURE__ */ React__default.createElement(Portal$3, {
|
|
60609
60736
|
container,
|
|
60610
60737
|
...portalProps
|
|
60611
60738
|
});
|
|
@@ -60614,7 +60741,7 @@ const Drawer$1 = {
|
|
|
60614
60741
|
Root: Root$3,
|
|
60615
60742
|
Content: Content$1,
|
|
60616
60743
|
Overlay,
|
|
60617
|
-
Trigger: Trigger$
|
|
60744
|
+
Trigger: Trigger$5,
|
|
60618
60745
|
Portal: Portal$1,
|
|
60619
60746
|
Close,
|
|
60620
60747
|
Title,
|