@next-degree/pickle-shared-js 0.3.27 → 0.4.31
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/app/layout.css +59 -2
- package/dist/app/layout.css.map +1 -1
- package/dist/app/page.cjs +464 -114
- package/dist/app/page.cjs.map +1 -1
- package/dist/app/page.js +442 -92
- package/dist/app/page.js.map +1 -1
- package/dist/components/demos/ComboboxDemo.cjs +91 -52
- package/dist/components/demos/ComboboxDemo.cjs.map +1 -1
- package/dist/components/demos/ComboboxDemo.js +84 -45
- package/dist/components/demos/ComboboxDemo.js.map +1 -1
- package/dist/components/demos/CounterDemo.cjs +270 -0
- package/dist/components/demos/CounterDemo.cjs.map +1 -0
- package/dist/components/demos/CounterDemo.d.cts +5 -0
- package/dist/components/demos/CounterDemo.d.ts +5 -0
- package/dist/components/demos/CounterDemo.js +238 -0
- package/dist/components/demos/CounterDemo.js.map +1 -0
- package/dist/components/demos/InputDemo.cjs +74 -35
- package/dist/components/demos/InputDemo.cjs.map +1 -1
- package/dist/components/demos/InputDemo.js +59 -30
- package/dist/components/demos/InputDemo.js.map +1 -1
- package/dist/components/demos/PlacesQueryInputDemo.cjs +341 -0
- package/dist/components/demos/PlacesQueryInputDemo.cjs.map +1 -0
- package/dist/components/demos/PlacesQueryInputDemo.d.cts +5 -0
- package/dist/components/demos/PlacesQueryInputDemo.d.ts +5 -0
- package/dist/components/demos/PlacesQueryInputDemo.js +309 -0
- package/dist/components/demos/PlacesQueryInputDemo.js.map +1 -0
- package/dist/components/demos/SelectDemo.cjs +83 -53
- package/dist/components/demos/SelectDemo.cjs.map +1 -1
- package/dist/components/demos/SelectDemo.js +73 -43
- package/dist/components/demos/SelectDemo.js.map +1 -1
- package/dist/components/demos/index.cjs +462 -112
- package/dist/components/demos/index.cjs.map +1 -1
- package/dist/components/demos/index.js +440 -90
- package/dist/components/demos/index.js.map +1 -1
- package/dist/components/primitives/command.d.cts +1 -1
- package/dist/components/primitives/command.d.ts +1 -1
- package/dist/components/primitives/tooltip.cjs +75 -0
- package/dist/components/primitives/tooltip.cjs.map +1 -0
- package/dist/components/primitives/tooltip.d.cts +9 -0
- package/dist/components/primitives/tooltip.d.ts +9 -0
- package/dist/components/primitives/tooltip.js +38 -0
- package/dist/components/primitives/tooltip.js.map +1 -0
- package/dist/components/ui/Combobox.cjs +78 -40
- package/dist/components/ui/Combobox.cjs.map +1 -1
- package/dist/components/ui/Combobox.d.cts +5 -2
- package/dist/components/ui/Combobox.d.ts +5 -2
- package/dist/components/ui/Combobox.js +71 -33
- package/dist/components/ui/Combobox.js.map +1 -1
- package/dist/components/ui/Counter.cjs +248 -0
- package/dist/components/ui/Counter.cjs.map +1 -0
- package/dist/components/ui/Counter.d.cts +28 -0
- package/dist/components/ui/Counter.d.ts +28 -0
- package/dist/components/ui/Counter.js +214 -0
- package/dist/components/ui/Counter.js.map +1 -0
- package/dist/components/ui/Input.cjs +67 -28
- package/dist/components/ui/Input.cjs.map +1 -1
- package/dist/components/ui/Input.d.cts +2 -1
- package/dist/components/ui/Input.d.ts +2 -1
- package/dist/components/ui/Input.js +54 -25
- package/dist/components/ui/Input.js.map +1 -1
- package/dist/components/ui/Label.cjs +54 -16
- package/dist/components/ui/Label.cjs.map +1 -1
- package/dist/components/ui/Label.d.cts +2 -1
- package/dist/components/ui/Label.d.ts +2 -1
- package/dist/components/ui/Label.js +44 -16
- package/dist/components/ui/Label.js.map +1 -1
- package/dist/components/ui/PlacesQueryInput.cjs +321 -0
- package/dist/components/ui/PlacesQueryInput.cjs.map +1 -0
- package/dist/components/ui/PlacesQueryInput.d.cts +18 -0
- package/dist/components/ui/PlacesQueryInput.d.ts +18 -0
- package/dist/components/ui/PlacesQueryInput.js +289 -0
- package/dist/components/ui/PlacesQueryInput.js.map +1 -0
- package/dist/components/ui/Select.cjs +75 -46
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.d.cts +3 -2
- package/dist/components/ui/Select.d.ts +3 -2
- package/dist/components/ui/Select.js +67 -38
- package/dist/components/ui/Select.js.map +1 -1
- package/dist/index.cjs +536 -230
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +510 -206
- package/dist/index.js.map +1 -1
- package/dist/lib/google.cjs +43 -0
- package/dist/lib/google.cjs.map +1 -0
- package/dist/lib/google.d.cts +5 -0
- package/dist/lib/google.d.ts +5 -0
- package/dist/lib/google.js +19 -0
- package/dist/lib/google.js.map +1 -0
- package/dist/styles/globals.css +59 -2
- package/dist/styles/globals.css.map +1 -1
- package/package.json +22 -21
package/dist/index.cjs
CHANGED
|
@@ -35,9 +35,11 @@ __export(index_exports, {
|
|
|
35
35
|
Checkbox: () => Checkbox_default,
|
|
36
36
|
Chip: () => Chip_default,
|
|
37
37
|
Combobox: () => Combobox,
|
|
38
|
+
Counter: () => Counter,
|
|
38
39
|
Input: () => Input_default,
|
|
39
40
|
Label: () => Label_default,
|
|
40
41
|
ListItem: () => ListItem_default,
|
|
42
|
+
PlacesQueryInput: () => PlacesQueryInput_default,
|
|
41
43
|
Select: () => Select_default,
|
|
42
44
|
cn: () => cn
|
|
43
45
|
});
|
|
@@ -45,7 +47,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
45
47
|
|
|
46
48
|
// src/components/ui/Select.tsx
|
|
47
49
|
var SelectPrimitive = __toESM(require("@radix-ui/react-select"), 1);
|
|
48
|
-
var
|
|
50
|
+
var import_lucide_react2 = require("lucide-react");
|
|
49
51
|
var import_react = require("react");
|
|
50
52
|
|
|
51
53
|
// src/lib/utils.ts
|
|
@@ -63,32 +65,60 @@ function ErrorMessage({ message, className, ...props }) {
|
|
|
63
65
|
}
|
|
64
66
|
var ErrorMessage_default = ErrorMessage;
|
|
65
67
|
|
|
66
|
-
// src/components/
|
|
68
|
+
// src/components/primitives/tooltip.tsx
|
|
69
|
+
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
70
|
+
var React = __toESM(require("react"), 1);
|
|
67
71
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
68
|
-
|
|
72
|
+
var TooltipProvider = TooltipPrimitive.Provider;
|
|
73
|
+
var Tooltip = TooltipPrimitive.Root;
|
|
74
|
+
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
75
|
+
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
76
|
+
TooltipPrimitive.Content,
|
|
77
|
+
{
|
|
78
|
+
ref,
|
|
79
|
+
sideOffset,
|
|
80
|
+
className: cn(
|
|
81
|
+
"z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md 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 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50",
|
|
82
|
+
className
|
|
83
|
+
),
|
|
84
|
+
...props
|
|
85
|
+
}
|
|
86
|
+
));
|
|
87
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
88
|
+
|
|
89
|
+
// src/components/ui/Label.tsx
|
|
90
|
+
var import_lucide_react = require("lucide-react");
|
|
91
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
92
|
+
function Label({ text, required, description, className, ...props }) {
|
|
69
93
|
if (!text) return null;
|
|
70
|
-
return /* @__PURE__ */ (0,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
94
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex w-full flex-row gap-1", children: [
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
96
|
+
"label",
|
|
97
|
+
{
|
|
98
|
+
className: cn(
|
|
99
|
+
"text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
100
|
+
className
|
|
101
|
+
),
|
|
102
|
+
...props,
|
|
103
|
+
children: [
|
|
104
|
+
text,
|
|
105
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-red-600", children: "\xA0*" })
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
!!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Tooltip, { children: [
|
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.InfoIcon, { className: "h-4 w-4" }) }),
|
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TooltipContent, { className: "max-w-48", children: description })
|
|
112
|
+
] }) })
|
|
113
|
+
] });
|
|
84
114
|
}
|
|
85
115
|
var Label_default = Label;
|
|
86
116
|
|
|
87
117
|
// src/components/ui/Chip.tsx
|
|
88
118
|
var import_cva = require("cva");
|
|
89
119
|
var import_tailwind_merge2 = require("tailwind-merge");
|
|
90
|
-
var
|
|
91
|
-
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ (0,
|
|
120
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
121
|
+
var Chip = ({ className, variant, size, ...props }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_tailwind_merge2.twMerge)(chipVariants({ variant, size, className })), ...props });
|
|
92
122
|
var chipVariants = (0, import_cva.cva)(["flex", "items-center", "rounded-3xl", "border", "w-fit"], {
|
|
93
123
|
variants: {
|
|
94
124
|
variant: {
|
|
@@ -112,9 +142,9 @@ var Chip_default = Chip;
|
|
|
112
142
|
|
|
113
143
|
// src/components/primitives/separator.tsx
|
|
114
144
|
var SeparatorPrimitive = __toESM(require("@radix-ui/react-separator"), 1);
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
var Separator =
|
|
145
|
+
var React2 = __toESM(require("react"), 1);
|
|
146
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
147
|
+
var Separator = React2.forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
118
148
|
SeparatorPrimitive.Root,
|
|
119
149
|
{
|
|
120
150
|
ref,
|
|
@@ -131,9 +161,9 @@ var Separator = React.forwardRef(({ className, orientation = "horizontal", decor
|
|
|
131
161
|
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
132
162
|
|
|
133
163
|
// src/components/ui/Select.tsx
|
|
134
|
-
var
|
|
164
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
135
165
|
var Select = (0, import_react.forwardRef)(
|
|
136
|
-
({ label, options, placeholder, multiselect, classNames, error, id, ...props }, ref) => {
|
|
166
|
+
({ label, options, placeholder, multiselect, description, classNames, error, id, ...props }, ref) => {
|
|
137
167
|
const { value, defaultValue, dir, className, onChange, ...rest } = props;
|
|
138
168
|
const [selected, setSelected] = (0, import_react.useState)([]);
|
|
139
169
|
const [open, setOpen] = (0, import_react.useState)(false);
|
|
@@ -163,23 +193,24 @@ var Select = (0, import_react.forwardRef)(
|
|
|
163
193
|
});
|
|
164
194
|
onChange?.(multiselect ? newSelected : newValue);
|
|
165
195
|
}
|
|
166
|
-
return /* @__PURE__ */ (0,
|
|
196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
167
197
|
"div",
|
|
168
198
|
{
|
|
169
|
-
className: cn("flex flex-col gap-1", className),
|
|
199
|
+
className: cn("flex w-full flex-col gap-1", className),
|
|
170
200
|
ref: containerRef,
|
|
171
201
|
"data-testid": `${(label ?? id)?.toLowerCase()}-select-element`,
|
|
172
202
|
children: [
|
|
173
|
-
/* @__PURE__ */ (0,
|
|
203
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
174
204
|
Label_default,
|
|
175
205
|
{
|
|
176
206
|
text: label,
|
|
177
207
|
htmlFor: props.name,
|
|
178
208
|
required: props.required,
|
|
209
|
+
description,
|
|
179
210
|
className: classNames?.label
|
|
180
211
|
}
|
|
181
212
|
),
|
|
182
|
-
/* @__PURE__ */ (0,
|
|
213
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
183
214
|
SelectPrimitive.Root,
|
|
184
215
|
{
|
|
185
216
|
open,
|
|
@@ -190,16 +221,16 @@ var Select = (0, import_react.forwardRef)(
|
|
|
190
221
|
dir: dir === "rtl" ? "rtl" : "ltr",
|
|
191
222
|
...rest,
|
|
192
223
|
children: [
|
|
193
|
-
/* @__PURE__ */ (0,
|
|
224
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
194
225
|
SelectPrimitive.Trigger,
|
|
195
226
|
{
|
|
196
227
|
ref,
|
|
197
228
|
className: cn(
|
|
198
|
-
"group flex h-11
|
|
229
|
+
"group flex h-11 w-full flex-row items-center justify-between gap-3 rounded-lg border px-4 py-3 text-sm font-normal focus:outline-purple-100 disabled:bg-grey-5 data-[placeholder]:text-grey-50 data-[placeholder]:disabled:text-grey-40",
|
|
199
230
|
classNames?.trigger
|
|
200
231
|
),
|
|
201
232
|
children: [
|
|
202
|
-
/* @__PURE__ */ (0,
|
|
233
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "truncate", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
203
234
|
SelectPrimitive.Value,
|
|
204
235
|
{
|
|
205
236
|
placeholder: placeholder ?? "Select an option",
|
|
@@ -207,8 +238,8 @@ var Select = (0, import_react.forwardRef)(
|
|
|
207
238
|
children: handleLabels()
|
|
208
239
|
}
|
|
209
240
|
) }),
|
|
210
|
-
/* @__PURE__ */ (0,
|
|
211
|
-
|
|
241
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
242
|
+
import_lucide_react2.ChevronDownIcon,
|
|
212
243
|
{
|
|
213
244
|
className: "transform text-black group-data-[state=open]:rotate-180",
|
|
214
245
|
size: "16"
|
|
@@ -217,7 +248,7 @@ var Select = (0, import_react.forwardRef)(
|
|
|
217
248
|
]
|
|
218
249
|
}
|
|
219
250
|
),
|
|
220
|
-
/* @__PURE__ */ (0,
|
|
251
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.Portal, { container: containerRef.current, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
221
252
|
SelectPrimitive.Content,
|
|
222
253
|
{
|
|
223
254
|
hideWhenDetached: true,
|
|
@@ -226,17 +257,17 @@ var Select = (0, import_react.forwardRef)(
|
|
|
226
257
|
sideOffset: 4,
|
|
227
258
|
onPointerDownOutside: toggleOpen,
|
|
228
259
|
onKeyDown: closeOnEscape,
|
|
229
|
-
children: /* @__PURE__ */ (0,
|
|
230
|
-
multiselect && !!chipLabels?.length && /* @__PURE__ */ (0,
|
|
260
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(SelectPrimitive.Viewport, { children: [
|
|
261
|
+
multiselect && !!chipLabels?.length && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
231
262
|
SelectPrimitive.Group,
|
|
232
263
|
{
|
|
233
264
|
className: "mb-2 flex flex-row flex-wrap gap-1 px-2",
|
|
234
265
|
"data-testid": "selected-labels",
|
|
235
266
|
children: chipLabels?.map(
|
|
236
|
-
(chip) => chip && /* @__PURE__ */ (0,
|
|
237
|
-
/* @__PURE__ */ (0,
|
|
238
|
-
/* @__PURE__ */ (0,
|
|
239
|
-
|
|
267
|
+
(chip) => chip && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Chip_default, { size: "small", variant: "primary", children: [
|
|
268
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: chip.title }),
|
|
269
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
270
|
+
import_lucide_react2.X,
|
|
240
271
|
{
|
|
241
272
|
size: 18,
|
|
242
273
|
"data-testid": `chip-remove-${chip.value}`,
|
|
@@ -248,8 +279,8 @@ var Select = (0, import_react.forwardRef)(
|
|
|
248
279
|
)
|
|
249
280
|
}
|
|
250
281
|
),
|
|
251
|
-
/* @__PURE__ */ (0,
|
|
252
|
-
options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ (0,
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Separator, {}),
|
|
283
|
+
options?.map(({ id: id2, title, value: value2 }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
253
284
|
SelectPrimitive.Item,
|
|
254
285
|
{
|
|
255
286
|
value: value2,
|
|
@@ -258,9 +289,9 @@ var Select = (0, import_react.forwardRef)(
|
|
|
258
289
|
onKeyDown: (e) => setValueOnEnter(e, value2),
|
|
259
290
|
onClick: () => handleChange(value2),
|
|
260
291
|
children: [
|
|
261
|
-
/* @__PURE__ */ (0,
|
|
262
|
-
/* @__PURE__ */ (0,
|
|
263
|
-
|
|
292
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectPrimitive.ItemText, { children: title }),
|
|
293
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
294
|
+
import_lucide_react2.CheckIcon,
|
|
264
295
|
{
|
|
265
296
|
className: "absolute inset-y-0 right-3 my-auto hidden w-6 text-purple-100 group-data-[state=checked]:block",
|
|
266
297
|
size: 16
|
|
@@ -276,7 +307,7 @@ var Select = (0, import_react.forwardRef)(
|
|
|
276
307
|
]
|
|
277
308
|
}
|
|
278
309
|
),
|
|
279
|
-
/* @__PURE__ */ (0,
|
|
310
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ErrorMessage_default, { message: error })
|
|
280
311
|
]
|
|
281
312
|
}
|
|
282
313
|
);
|
|
@@ -287,10 +318,10 @@ var Select_default = Select;
|
|
|
287
318
|
|
|
288
319
|
// src/components/ui/Checkbox.tsx
|
|
289
320
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"), 1);
|
|
290
|
-
var
|
|
321
|
+
var import_lucide_react3 = require("lucide-react");
|
|
291
322
|
var import_react2 = require("react");
|
|
292
|
-
var
|
|
293
|
-
var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
323
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
324
|
+
var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
294
325
|
CheckboxPrimitive.Root,
|
|
295
326
|
{
|
|
296
327
|
ref,
|
|
@@ -320,9 +351,9 @@ var CheckboxToggle = (0, import_react2.forwardRef)(({ className, ...props }, ref
|
|
|
320
351
|
className
|
|
321
352
|
),
|
|
322
353
|
...props,
|
|
323
|
-
children: /* @__PURE__ */ (0,
|
|
324
|
-
/* @__PURE__ */ (0,
|
|
325
|
-
/* @__PURE__ */ (0,
|
|
354
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(CheckboxPrimitive.Indicator, { className: "flex items-center justify-center text-current", children: [
|
|
355
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.Check, { className: "hidden h-4 w-4 group-data-[state=checked]:block" }),
|
|
356
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react3.Minus, { className: "hidden h-4 w-4 group-data-[state=indeterminate]:block" })
|
|
326
357
|
] })
|
|
327
358
|
}
|
|
328
359
|
));
|
|
@@ -332,9 +363,9 @@ var Checkbox = (0, import_react2.forwardRef)(
|
|
|
332
363
|
const { disabled } = props;
|
|
333
364
|
const id = props.id ?? `${props.name ?? props.value?.toString()}-checkbox`;
|
|
334
365
|
const labelClassName = disabled ? "text-grey-40 pointer-events-none" : "";
|
|
335
|
-
return /* @__PURE__ */ (0,
|
|
336
|
-
/* @__PURE__ */ (0,
|
|
337
|
-
/* @__PURE__ */ (0,
|
|
366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: cn("flex space-x-2", classNames?.wrapper), children: [
|
|
367
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(CheckboxToggle, { id, disabled, ref, ...props }),
|
|
368
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: id, className: cn(labelClassName, classNames?.label), children })
|
|
338
369
|
] });
|
|
339
370
|
}
|
|
340
371
|
);
|
|
@@ -342,9 +373,9 @@ Checkbox.displayName = "Checkbox";
|
|
|
342
373
|
var Checkbox_default = Checkbox;
|
|
343
374
|
|
|
344
375
|
// src/components/ui/ListItem.tsx
|
|
345
|
-
var import_lucide_react3 = require("lucide-react");
|
|
346
376
|
var import_lucide_react4 = require("lucide-react");
|
|
347
|
-
var
|
|
377
|
+
var import_lucide_react5 = require("lucide-react");
|
|
378
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
348
379
|
function ListItem({
|
|
349
380
|
icon,
|
|
350
381
|
hasCheckbox,
|
|
@@ -356,14 +387,14 @@ function ListItem({
|
|
|
356
387
|
...props
|
|
357
388
|
}) {
|
|
358
389
|
const getIconIfValid = (icon2) => {
|
|
359
|
-
if (icon2 in
|
|
360
|
-
const IconComponent =
|
|
361
|
-
return /* @__PURE__ */ (0,
|
|
390
|
+
if (icon2 in import_lucide_react5.icons) {
|
|
391
|
+
const IconComponent = import_lucide_react5.icons[icon2];
|
|
392
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconComponent, { size: 14 });
|
|
362
393
|
}
|
|
363
394
|
return null;
|
|
364
395
|
};
|
|
365
396
|
const optionIcon = icon ? getIconIfValid(icon) : void 0;
|
|
366
|
-
return /* @__PURE__ */ (0,
|
|
397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
367
398
|
"li",
|
|
368
399
|
{
|
|
369
400
|
className: cn(
|
|
@@ -373,14 +404,14 @@ function ListItem({
|
|
|
373
404
|
...props,
|
|
374
405
|
"data-state": isSelected ? "checked" : "unchecked",
|
|
375
406
|
children: [
|
|
376
|
-
optionIcon && /* @__PURE__ */ (0,
|
|
377
|
-
hasCheckbox && /* @__PURE__ */ (0,
|
|
378
|
-
/* @__PURE__ */ (0,
|
|
379
|
-
/* @__PURE__ */ (0,
|
|
380
|
-
/* @__PURE__ */ (0,
|
|
407
|
+
optionIcon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "mr-2", children: optionIcon }),
|
|
408
|
+
hasCheckbox && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Checkbox_default, { id: value, checked: isSelected, onClick: (e) => e.preventDefault() }),
|
|
409
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { children: [
|
|
410
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { children: title }),
|
|
411
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-xs text-grey-80", children: description })
|
|
381
412
|
] }),
|
|
382
|
-
/* @__PURE__ */ (0,
|
|
383
|
-
|
|
413
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
414
|
+
import_lucide_react4.CheckIcon,
|
|
384
415
|
{
|
|
385
416
|
className: "absolute inset-y-0 right-0 my-auto hidden w-6 text-green-100 group-data-[state=checked]:block",
|
|
386
417
|
size: 16
|
|
@@ -394,37 +425,38 @@ var ListItem_default = ListItem;
|
|
|
394
425
|
|
|
395
426
|
// src/components/ui/Input.tsx
|
|
396
427
|
var import_cva2 = require("cva");
|
|
397
|
-
var
|
|
428
|
+
var import_lucide_react6 = require("lucide-react");
|
|
398
429
|
var import_react3 = require("react");
|
|
399
|
-
var
|
|
430
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
400
431
|
var Input = (0, import_react3.forwardRef)(
|
|
401
|
-
({ label, error, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
|
|
432
|
+
({ label, error, description, theme, icon, onClear, value, onChange, classNames, ...props }, ref) => {
|
|
402
433
|
const handleClear = () => {
|
|
403
434
|
onChange?.({ target: { value: "" } });
|
|
404
435
|
onClear?.();
|
|
405
436
|
};
|
|
406
|
-
const IconComponent = icon &&
|
|
437
|
+
const IconComponent = icon && import_lucide_react6.icons[icon];
|
|
407
438
|
const placeholder = props.placeholder ?? (icon === "Search" ? "Search..." : "");
|
|
408
439
|
const hasIcon = !!icon;
|
|
409
440
|
const iconColor = theme === "dark" ? "text-white" : "text-grey-80";
|
|
410
|
-
return /* @__PURE__ */ (0,
|
|
411
|
-
label && /* @__PURE__ */ (0,
|
|
441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "group flex w-full flex-col gap-1", "data-testid": `input-wrapper-${props.id}`, children: [
|
|
442
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
412
443
|
Label_default,
|
|
413
444
|
{
|
|
414
445
|
text: label,
|
|
415
446
|
htmlFor: props.name,
|
|
416
447
|
required: props.required,
|
|
448
|
+
description,
|
|
417
449
|
className: classNames?.label
|
|
418
450
|
}
|
|
419
451
|
),
|
|
420
|
-
/* @__PURE__ */ (0,
|
|
421
|
-
IconComponent && /* @__PURE__ */ (0,
|
|
452
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "relative flex flex-row items-center", children: [
|
|
453
|
+
IconComponent && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
422
454
|
IconComponent,
|
|
423
455
|
{
|
|
424
456
|
className: `absolute left-3 h-4 w-4 ${iconColor} opacity-50 group-hover:opacity-100`
|
|
425
457
|
}
|
|
426
458
|
),
|
|
427
|
-
/* @__PURE__ */ (0,
|
|
459
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
428
460
|
"input",
|
|
429
461
|
{
|
|
430
462
|
className: cn(inputVariants({ theme, hasIcon })),
|
|
@@ -436,8 +468,8 @@ var Input = (0, import_react3.forwardRef)(
|
|
|
436
468
|
...props
|
|
437
469
|
}
|
|
438
470
|
),
|
|
439
|
-
hasIcon && value && /* @__PURE__ */ (0,
|
|
440
|
-
|
|
471
|
+
hasIcon && value && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
472
|
+
import_lucide_react6.X,
|
|
441
473
|
{
|
|
442
474
|
className: `absolute right-3 h-4 w-4 cursor-pointer ${iconColor}`,
|
|
443
475
|
onClick: handleClear,
|
|
@@ -445,7 +477,7 @@ var Input = (0, import_react3.forwardRef)(
|
|
|
445
477
|
}
|
|
446
478
|
)
|
|
447
479
|
] }),
|
|
448
|
-
/* @__PURE__ */ (0,
|
|
480
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ErrorMessage_default, { message: error })
|
|
449
481
|
] });
|
|
450
482
|
}
|
|
451
483
|
);
|
|
@@ -500,128 +532,14 @@ var inputVariants = (0, import_cva2.cva)(
|
|
|
500
532
|
);
|
|
501
533
|
var Input_default = Input;
|
|
502
534
|
|
|
503
|
-
// src/components/ui/Button.tsx
|
|
504
|
-
var import_react_slot = require("@radix-ui/react-slot");
|
|
505
|
-
var import_cva3 = require("cva");
|
|
506
|
-
var import_react4 = require("react");
|
|
507
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
508
|
-
var Button = (0, import_react4.forwardRef)(
|
|
509
|
-
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
510
|
-
const Component = asChild ? import_react_slot.Slot : "button";
|
|
511
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
512
|
-
Component,
|
|
513
|
-
{
|
|
514
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
515
|
-
ref,
|
|
516
|
-
...props
|
|
517
|
-
}
|
|
518
|
-
);
|
|
519
|
-
}
|
|
520
|
-
);
|
|
521
|
-
Button.displayName = "Button";
|
|
522
|
-
var buttonVariants = (0, import_cva3.cva)(
|
|
523
|
-
[
|
|
524
|
-
"flex",
|
|
525
|
-
"items-center",
|
|
526
|
-
"justify-center",
|
|
527
|
-
"gap-2",
|
|
528
|
-
"rounded-full",
|
|
529
|
-
"font-bold",
|
|
530
|
-
"outline-2",
|
|
531
|
-
"outline-offset-2",
|
|
532
|
-
"outline-dashed",
|
|
533
|
-
"outline-transparent"
|
|
534
|
-
],
|
|
535
|
-
{
|
|
536
|
-
variants: {
|
|
537
|
-
variant: {
|
|
538
|
-
neutral: [
|
|
539
|
-
"bg-black",
|
|
540
|
-
"text-white",
|
|
541
|
-
"hover:bg-grey-90",
|
|
542
|
-
"active:bg-grey-80",
|
|
543
|
-
"focus:outline-purple-100",
|
|
544
|
-
"disabled:text-grey-40",
|
|
545
|
-
"disabled:bg-grey-10"
|
|
546
|
-
],
|
|
547
|
-
primary: [
|
|
548
|
-
"bg-pickle-100",
|
|
549
|
-
"text-black",
|
|
550
|
-
"hover:bg-pickle-80",
|
|
551
|
-
"active:bg-pickle-60",
|
|
552
|
-
"focus:outline-purple-100",
|
|
553
|
-
"disabled:text-grey-40",
|
|
554
|
-
"disabled:bg-grey-10"
|
|
555
|
-
],
|
|
556
|
-
secondary: [
|
|
557
|
-
"bg-green-80",
|
|
558
|
-
"text-white",
|
|
559
|
-
"hover:bg-green-90",
|
|
560
|
-
"active:bg-green-100",
|
|
561
|
-
"focus:outline-pickle-100",
|
|
562
|
-
"disabled:text-grey-40",
|
|
563
|
-
"disabled:bg-grey-10"
|
|
564
|
-
],
|
|
565
|
-
transparent: [
|
|
566
|
-
"text-white",
|
|
567
|
-
"hover:bg-green-80",
|
|
568
|
-
"active:bg-green-100",
|
|
569
|
-
"focus:outline-pickle-100",
|
|
570
|
-
"disabled:text-grey-40"
|
|
571
|
-
],
|
|
572
|
-
link: [
|
|
573
|
-
"leading-tight",
|
|
574
|
-
"text-black",
|
|
575
|
-
"underline",
|
|
576
|
-
"hover:text-purple-100",
|
|
577
|
-
"focus:text-black",
|
|
578
|
-
"focus:outline-purple-100",
|
|
579
|
-
"active:text-purple-80"
|
|
580
|
-
]
|
|
581
|
-
},
|
|
582
|
-
size: {
|
|
583
|
-
small: ["h-10", "text-sm", "px-4", "py-2"],
|
|
584
|
-
medium: ["h-12", "text-base", "px-6", "py-3"],
|
|
585
|
-
large: ["h-14", "text-lg", "px-8", "py-4"]
|
|
586
|
-
}
|
|
587
|
-
},
|
|
588
|
-
defaultVariants: {
|
|
589
|
-
variant: "neutral",
|
|
590
|
-
size: "medium"
|
|
591
|
-
},
|
|
592
|
-
compoundVariants: [
|
|
593
|
-
{
|
|
594
|
-
variant: "link",
|
|
595
|
-
size: "small",
|
|
596
|
-
class: ["h-3", "text-xs", "p-0"]
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
variant: "link",
|
|
600
|
-
size: "medium",
|
|
601
|
-
class: ["h-4", "text-sm", "p-0"]
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
variant: "link",
|
|
605
|
-
size: "large",
|
|
606
|
-
class: ["h-6", "text-base", "p-0"]
|
|
607
|
-
}
|
|
608
|
-
]
|
|
609
|
-
}
|
|
610
|
-
);
|
|
611
|
-
|
|
612
|
-
// src/components/ui/Combobox.tsx
|
|
613
|
-
var import_react5 = require("react");
|
|
614
|
-
var import_lucide_react8 = require("lucide-react");
|
|
615
|
-
var import_cva5 = require("cva");
|
|
616
|
-
|
|
617
535
|
// src/components/primitives/command.tsx
|
|
618
536
|
var import_cmdk = require("cmdk");
|
|
619
|
-
var
|
|
537
|
+
var import_lucide_react8 = require("lucide-react");
|
|
620
538
|
var React4 = __toESM(require("react"), 1);
|
|
621
539
|
|
|
622
540
|
// src/components/primitives/dialog.tsx
|
|
623
541
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"), 1);
|
|
624
|
-
var
|
|
542
|
+
var import_lucide_react7 = require("lucide-react");
|
|
625
543
|
var React3 = __toESM(require("react"), 1);
|
|
626
544
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
627
545
|
var DialogPortal = DialogPrimitive.Portal;
|
|
@@ -651,7 +569,7 @@ var DialogContent = React3.forwardRef(({ className, children, ...props }, ref) =
|
|
|
651
569
|
children: [
|
|
652
570
|
children,
|
|
653
571
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400", children: [
|
|
654
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
572
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react7.X, { className: "h-4 w-4" }),
|
|
655
573
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "sr-only", children: "Close" })
|
|
656
574
|
] })
|
|
657
575
|
]
|
|
@@ -703,7 +621,7 @@ var Command = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
703
621
|
));
|
|
704
622
|
Command.displayName = import_cmdk.Command.displayName;
|
|
705
623
|
var CommandInput = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "m-1 flex items-center rounded-xl border px-3", "cmdk-input-wrapper": "", children: [
|
|
706
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
624
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react8.Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
707
625
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
708
626
|
import_cmdk.Command.Input,
|
|
709
627
|
{
|
|
@@ -772,13 +690,246 @@ var CommandShortcut = ({ className, ...props }) => {
|
|
|
772
690
|
};
|
|
773
691
|
CommandShortcut.displayName = "CommandShortcut";
|
|
774
692
|
|
|
693
|
+
// src/lib/google.ts
|
|
694
|
+
var import_google_maps_services_js = require("@googlemaps/google-maps-services-js");
|
|
695
|
+
var client = new import_google_maps_services_js.Client();
|
|
696
|
+
var autocomplete = async (input, key) => {
|
|
697
|
+
try {
|
|
698
|
+
const response = await client.placeAutocomplete({
|
|
699
|
+
params: { input, key, types: import_google_maps_services_js.PlaceAutocompleteType.address }
|
|
700
|
+
});
|
|
701
|
+
return response.data.predictions;
|
|
702
|
+
} catch (error) {
|
|
703
|
+
console.error(error);
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
|
|
707
|
+
// src/components/ui/PlacesQueryInput.tsx
|
|
708
|
+
var import_lucide_react9 = require("lucide-react");
|
|
709
|
+
var import_react4 = require("react");
|
|
710
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
711
|
+
function PlacesQueryInput({
|
|
712
|
+
apiKey,
|
|
713
|
+
selected,
|
|
714
|
+
onSelect,
|
|
715
|
+
className
|
|
716
|
+
}) {
|
|
717
|
+
const [predictions, setPredictions] = (0, import_react4.useState)(null);
|
|
718
|
+
const [input, setInput] = (0, import_react4.useState)(selected?.description ?? "");
|
|
719
|
+
const [isLoadingPredictions, setIsLoadingPredictions] = (0, import_react4.useState)(false);
|
|
720
|
+
const [shouldOpenUpward, setShouldOpenUpward] = (0, import_react4.useState)(false);
|
|
721
|
+
const timeoutRef = (0, import_react4.useRef)(null);
|
|
722
|
+
const inputRef = (0, import_react4.useRef)(null);
|
|
723
|
+
const debouncedAutocomplete = (0, import_react4.useCallback)((value) => {
|
|
724
|
+
if (timeoutRef.current) {
|
|
725
|
+
clearTimeout(timeoutRef.current);
|
|
726
|
+
}
|
|
727
|
+
timeoutRef.current = setTimeout(async () => {
|
|
728
|
+
if (value.length > 2) {
|
|
729
|
+
setIsLoadingPredictions(true);
|
|
730
|
+
const fetchedPredictions = await autocomplete(value, apiKey);
|
|
731
|
+
fetchedPredictions && setIsLoadingPredictions(false);
|
|
732
|
+
setPredictions(fetchedPredictions ?? []);
|
|
733
|
+
} else {
|
|
734
|
+
setPredictions(null);
|
|
735
|
+
}
|
|
736
|
+
}, 300);
|
|
737
|
+
}, []);
|
|
738
|
+
const handleInputChange = (value) => {
|
|
739
|
+
setInput(value);
|
|
740
|
+
debouncedAutocomplete(value);
|
|
741
|
+
};
|
|
742
|
+
const handleSelect = (prediction) => {
|
|
743
|
+
onSelect(prediction);
|
|
744
|
+
setPredictions(null);
|
|
745
|
+
setInput(prediction.description);
|
|
746
|
+
};
|
|
747
|
+
const handleClear = () => {
|
|
748
|
+
onSelect();
|
|
749
|
+
setPredictions(null);
|
|
750
|
+
setInput("");
|
|
751
|
+
};
|
|
752
|
+
const handleBlur = () => setTimeout(() => setPredictions(null), 200);
|
|
753
|
+
(0, import_react4.useEffect)(() => {
|
|
754
|
+
const checkDropdownPosition = () => {
|
|
755
|
+
if (inputRef.current) {
|
|
756
|
+
const rect = inputRef.current.getBoundingClientRect();
|
|
757
|
+
const windowHeight = window.innerHeight;
|
|
758
|
+
setShouldOpenUpward(rect.bottom + 200 > windowHeight);
|
|
759
|
+
}
|
|
760
|
+
};
|
|
761
|
+
checkDropdownPosition();
|
|
762
|
+
window.addEventListener("resize", checkDropdownPosition);
|
|
763
|
+
return () => window.removeEventListener("resize", checkDropdownPosition);
|
|
764
|
+
}, []);
|
|
765
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: cn("relative w-full", className), ref: inputRef, onBlur: handleBlur, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Command, { children: [
|
|
766
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "relative w-full", children: [
|
|
767
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
768
|
+
CommandInput,
|
|
769
|
+
{
|
|
770
|
+
placeholder: "Type an address to search...",
|
|
771
|
+
value: input,
|
|
772
|
+
onValueChange: handleInputChange,
|
|
773
|
+
className: "truncate pr-8"
|
|
774
|
+
}
|
|
775
|
+
),
|
|
776
|
+
isLoadingPredictions && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react9.LoaderCircle, { className: "absolute inset-y-0 right-2 my-auto flex h-8 w-8 animate-spin items-center justify-center rounded-full text-green-100" }),
|
|
777
|
+
input && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
778
|
+
"button",
|
|
779
|
+
{
|
|
780
|
+
type: "button",
|
|
781
|
+
className: "absolute inset-y-0 right-2 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
782
|
+
onClick: handleClear,
|
|
783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react9.CircleX, { className: "h-4 w-4 text-green-100" })
|
|
784
|
+
}
|
|
785
|
+
)
|
|
786
|
+
] }),
|
|
787
|
+
predictions && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
788
|
+
CommandList,
|
|
789
|
+
{
|
|
790
|
+
className: cn(
|
|
791
|
+
"absolute z-50 w-full rounded-md border bg-white shadow-lg",
|
|
792
|
+
shouldOpenUpward ? "bottom-full" : "top-full"
|
|
793
|
+
),
|
|
794
|
+
children: [
|
|
795
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CommandEmpty, { children: "No results" }),
|
|
796
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(CommandGroup, { children: predictions.map((prediction) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
797
|
+
CommandItem,
|
|
798
|
+
{
|
|
799
|
+
onSelect: () => handleSelect(prediction),
|
|
800
|
+
className: "truncate",
|
|
801
|
+
children: prediction.description
|
|
802
|
+
},
|
|
803
|
+
prediction.place_id
|
|
804
|
+
)) })
|
|
805
|
+
]
|
|
806
|
+
}
|
|
807
|
+
)
|
|
808
|
+
] }) });
|
|
809
|
+
}
|
|
810
|
+
var PlacesQueryInput_default = PlacesQueryInput;
|
|
811
|
+
|
|
812
|
+
// src/components/ui/Button.tsx
|
|
813
|
+
var import_react_slot = require("@radix-ui/react-slot");
|
|
814
|
+
var import_cva3 = require("cva");
|
|
815
|
+
var import_react5 = require("react");
|
|
816
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
817
|
+
var Button = (0, import_react5.forwardRef)(
|
|
818
|
+
({ className, variant, size, asChild = false, ...props }, ref) => {
|
|
819
|
+
const Component = asChild ? import_react_slot.Slot : "button";
|
|
820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
821
|
+
Component,
|
|
822
|
+
{
|
|
823
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
824
|
+
ref,
|
|
825
|
+
...props
|
|
826
|
+
}
|
|
827
|
+
);
|
|
828
|
+
}
|
|
829
|
+
);
|
|
830
|
+
Button.displayName = "Button";
|
|
831
|
+
var buttonVariants = (0, import_cva3.cva)(
|
|
832
|
+
[
|
|
833
|
+
"flex",
|
|
834
|
+
"items-center",
|
|
835
|
+
"justify-center",
|
|
836
|
+
"gap-2",
|
|
837
|
+
"rounded-full",
|
|
838
|
+
"font-bold",
|
|
839
|
+
"outline-2",
|
|
840
|
+
"outline-offset-2",
|
|
841
|
+
"outline-dashed",
|
|
842
|
+
"outline-transparent"
|
|
843
|
+
],
|
|
844
|
+
{
|
|
845
|
+
variants: {
|
|
846
|
+
variant: {
|
|
847
|
+
neutral: [
|
|
848
|
+
"bg-black",
|
|
849
|
+
"text-white",
|
|
850
|
+
"hover:bg-grey-90",
|
|
851
|
+
"active:bg-grey-80",
|
|
852
|
+
"focus:outline-purple-100",
|
|
853
|
+
"disabled:text-grey-40",
|
|
854
|
+
"disabled:bg-grey-10"
|
|
855
|
+
],
|
|
856
|
+
primary: [
|
|
857
|
+
"bg-pickle-100",
|
|
858
|
+
"text-black",
|
|
859
|
+
"hover:bg-pickle-80",
|
|
860
|
+
"active:bg-pickle-60",
|
|
861
|
+
"focus:outline-purple-100",
|
|
862
|
+
"disabled:text-grey-40",
|
|
863
|
+
"disabled:bg-grey-10"
|
|
864
|
+
],
|
|
865
|
+
secondary: [
|
|
866
|
+
"bg-green-80",
|
|
867
|
+
"text-white",
|
|
868
|
+
"hover:bg-green-90",
|
|
869
|
+
"active:bg-green-100",
|
|
870
|
+
"focus:outline-pickle-100",
|
|
871
|
+
"disabled:text-grey-40",
|
|
872
|
+
"disabled:bg-grey-10"
|
|
873
|
+
],
|
|
874
|
+
transparent: [
|
|
875
|
+
"text-white",
|
|
876
|
+
"hover:bg-green-80",
|
|
877
|
+
"active:bg-green-100",
|
|
878
|
+
"focus:outline-pickle-100",
|
|
879
|
+
"disabled:text-grey-40"
|
|
880
|
+
],
|
|
881
|
+
link: [
|
|
882
|
+
"leading-tight",
|
|
883
|
+
"text-black",
|
|
884
|
+
"underline",
|
|
885
|
+
"hover:text-purple-100",
|
|
886
|
+
"focus:text-black",
|
|
887
|
+
"focus:outline-purple-100",
|
|
888
|
+
"active:text-purple-80"
|
|
889
|
+
]
|
|
890
|
+
},
|
|
891
|
+
size: {
|
|
892
|
+
small: ["h-10", "text-sm", "px-4", "py-2"],
|
|
893
|
+
medium: ["h-12", "text-base", "px-6", "py-3"],
|
|
894
|
+
large: ["h-14", "text-lg", "px-8", "py-4"]
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
defaultVariants: {
|
|
898
|
+
variant: "neutral",
|
|
899
|
+
size: "medium"
|
|
900
|
+
},
|
|
901
|
+
compoundVariants: [
|
|
902
|
+
{
|
|
903
|
+
variant: "link",
|
|
904
|
+
size: "small",
|
|
905
|
+
class: ["h-3", "text-xs", "p-0"]
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
variant: "link",
|
|
909
|
+
size: "medium",
|
|
910
|
+
class: ["h-4", "text-sm", "p-0"]
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
variant: "link",
|
|
914
|
+
size: "large",
|
|
915
|
+
class: ["h-6", "text-base", "p-0"]
|
|
916
|
+
}
|
|
917
|
+
]
|
|
918
|
+
}
|
|
919
|
+
);
|
|
920
|
+
|
|
921
|
+
// src/components/ui/Combobox.tsx
|
|
922
|
+
var import_react6 = require("react");
|
|
923
|
+
var import_lucide_react10 = require("lucide-react");
|
|
924
|
+
var import_cva5 = require("cva");
|
|
925
|
+
|
|
775
926
|
// src/components/primitives/popover.tsx
|
|
776
|
-
var
|
|
927
|
+
var React6 = __toESM(require("react"), 1);
|
|
777
928
|
var PopoverPrimitive = __toESM(require("@radix-ui/react-popover"), 1);
|
|
778
|
-
var
|
|
929
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
779
930
|
var Popover = PopoverPrimitive.Root;
|
|
780
931
|
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
781
|
-
var PopoverContent =
|
|
932
|
+
var PopoverContent = React6.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(PopoverPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
782
933
|
PopoverPrimitive.Content,
|
|
783
934
|
{
|
|
784
935
|
ref,
|
|
@@ -795,7 +946,7 @@ PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
|
795
946
|
|
|
796
947
|
// src/components/ui/Badge.tsx
|
|
797
948
|
var import_cva4 = require("cva");
|
|
798
|
-
var
|
|
949
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
799
950
|
var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-semibold", {
|
|
800
951
|
variants: {
|
|
801
952
|
variant: {
|
|
@@ -809,12 +960,12 @@ var badgeVariants = (0, import_cva4.cva)("rounded-full px-2 py-0.5 text-xs font-
|
|
|
809
960
|
}
|
|
810
961
|
});
|
|
811
962
|
function Badge({ className, variant, ...props }) {
|
|
812
|
-
return /* @__PURE__ */ (0,
|
|
963
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: cn(badgeVariants({ variant }), className), ...props });
|
|
813
964
|
}
|
|
814
965
|
|
|
815
966
|
// src/components/ui/Combobox.tsx
|
|
816
|
-
var
|
|
817
|
-
var Combobox = (0,
|
|
967
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
968
|
+
var Combobox = (0, import_react6.forwardRef)((props, ref) => {
|
|
818
969
|
const {
|
|
819
970
|
id,
|
|
820
971
|
name,
|
|
@@ -822,6 +973,7 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
822
973
|
label,
|
|
823
974
|
options,
|
|
824
975
|
required,
|
|
976
|
+
description,
|
|
825
977
|
classNames,
|
|
826
978
|
multiselect,
|
|
827
979
|
placeholder,
|
|
@@ -832,16 +984,16 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
832
984
|
onChange: handleChange,
|
|
833
985
|
children: footer
|
|
834
986
|
} = props;
|
|
835
|
-
const [selected, setSelected] = (0,
|
|
836
|
-
const [open, setOpen] = (0,
|
|
837
|
-
const IconComponent = icon &&
|
|
987
|
+
const [selected, setSelected] = (0, import_react6.useState)([]);
|
|
988
|
+
const [open, setOpen] = (0, import_react6.useState)(false);
|
|
989
|
+
const IconComponent = icon && import_lucide_react10.icons[icon];
|
|
838
990
|
const hideSearchBox = options?.length <= 5;
|
|
839
991
|
const isDefault = variant === "default";
|
|
840
992
|
const isChip = variant === "chip";
|
|
841
993
|
const isEmpty = selected.length == 0;
|
|
842
994
|
const showChevron = isDefault ? isEmpty : true;
|
|
843
995
|
const close = () => setOpen(false);
|
|
844
|
-
(0,
|
|
996
|
+
(0, import_react6.useEffect)(() => {
|
|
845
997
|
const valueArray = multiselect ? value ?? [] : value ? [value] : [];
|
|
846
998
|
setSelected(
|
|
847
999
|
valueArray.map((v) => options.find((o) => o.value === v)).filter((v) => v !== void 0)
|
|
@@ -869,17 +1021,26 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
869
1021
|
const defaultLabel = !isEmpty ? selected.map((s) => s.title).join(", ") : placeholder;
|
|
870
1022
|
return isDefault ? defaultLabel : label;
|
|
871
1023
|
};
|
|
872
|
-
return /* @__PURE__ */ (0,
|
|
873
|
-
isDefault && /* @__PURE__ */ (0,
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("flex flex-col gap-1", className), children: [
|
|
1025
|
+
isDefault && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1026
|
+
Label_default,
|
|
1027
|
+
{
|
|
1028
|
+
text: label,
|
|
1029
|
+
htmlFor: name,
|
|
1030
|
+
required,
|
|
1031
|
+
description,
|
|
1032
|
+
className: classNames?.label
|
|
1033
|
+
}
|
|
1034
|
+
),
|
|
1035
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "relative flex", children: [
|
|
1036
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Popover, { open, onOpenChange: setOpen, children: [
|
|
1037
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
877
1038
|
PopoverTrigger,
|
|
878
1039
|
{
|
|
879
1040
|
asChild: true,
|
|
880
1041
|
disabled: options.length === 0,
|
|
881
1042
|
"data-testid": `${id ?? name}-combobox-trigger`,
|
|
882
|
-
children: /* @__PURE__ */ (0,
|
|
1043
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
883
1044
|
"div",
|
|
884
1045
|
{
|
|
885
1046
|
ref,
|
|
@@ -890,9 +1051,9 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
890
1051
|
),
|
|
891
1052
|
"aria-expanded": open,
|
|
892
1053
|
children: [
|
|
893
|
-
isDefault && IconComponent && /* @__PURE__ */ (0,
|
|
894
|
-
isChip && !isEmpty && /* @__PURE__ */ (0,
|
|
895
|
-
/* @__PURE__ */ (0,
|
|
1054
|
+
isDefault && IconComponent && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconComponent, { className: "h-4 w-4 shrink-0" }),
|
|
1055
|
+
isChip && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Badge, { variant: "purple", children: selected.length }),
|
|
1056
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
896
1057
|
"span",
|
|
897
1058
|
{
|
|
898
1059
|
className: cn(
|
|
@@ -902,8 +1063,8 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
902
1063
|
children: handleDisplayValue()
|
|
903
1064
|
}
|
|
904
1065
|
),
|
|
905
|
-
showChevron && /* @__PURE__ */ (0,
|
|
906
|
-
|
|
1066
|
+
showChevron && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1067
|
+
import_lucide_react10.ChevronDownIcon,
|
|
907
1068
|
{
|
|
908
1069
|
className: "shrink-0 transform group-data-[state=open]:rotate-180",
|
|
909
1070
|
size: "16"
|
|
@@ -914,7 +1075,7 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
914
1075
|
)
|
|
915
1076
|
}
|
|
916
1077
|
),
|
|
917
|
-
/* @__PURE__ */ (0,
|
|
1078
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
918
1079
|
PopoverContent,
|
|
919
1080
|
{
|
|
920
1081
|
className: cn(
|
|
@@ -925,16 +1086,16 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
925
1086
|
collisionPadding: 8,
|
|
926
1087
|
sideOffset: 4,
|
|
927
1088
|
align: "start",
|
|
928
|
-
children: /* @__PURE__ */ (0,
|
|
929
|
-
!hideSearchBox && /* @__PURE__ */ (0,
|
|
930
|
-
/* @__PURE__ */ (0,
|
|
931
|
-
/* @__PURE__ */ (0,
|
|
932
|
-
/* @__PURE__ */ (0,
|
|
1089
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Command, { children: [
|
|
1090
|
+
!hideSearchBox && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandInput, { placeholder: "Search..." }),
|
|
1091
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(CommandList, { children: [
|
|
1092
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandEmpty, { children: "No results" }),
|
|
1093
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CommandGroup, { children: options.map(({ id: id2, ...option }) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
933
1094
|
CommandItem,
|
|
934
1095
|
{
|
|
935
1096
|
value: option.title,
|
|
936
1097
|
onSelect: () => handleSelect(option.value),
|
|
937
|
-
children: /* @__PURE__ */ (0,
|
|
1098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
938
1099
|
ListItem_default,
|
|
939
1100
|
{
|
|
940
1101
|
className: cn(classNames?.items, "truncate py-1"),
|
|
@@ -947,19 +1108,19 @@ var Combobox = (0, import_react5.forwardRef)((props, ref) => {
|
|
|
947
1108
|
id2
|
|
948
1109
|
)) })
|
|
949
1110
|
] }),
|
|
950
|
-
!!footer && /* @__PURE__ */ (0,
|
|
1111
|
+
!!footer && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Separator, {}),
|
|
951
1112
|
footer && footer({ close })
|
|
952
1113
|
] })
|
|
953
1114
|
}
|
|
954
1115
|
)
|
|
955
1116
|
] }),
|
|
956
|
-
isDefault && !isEmpty && /* @__PURE__ */ (0,
|
|
1117
|
+
isDefault && !isEmpty && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
957
1118
|
"button",
|
|
958
1119
|
{
|
|
959
1120
|
type: "button",
|
|
960
1121
|
className: "absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
961
1122
|
onClick: handleClear,
|
|
962
|
-
children: /* @__PURE__ */ (0,
|
|
1123
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react10.CircleX, { className: "h-4 w-4 text-green-100" })
|
|
963
1124
|
}
|
|
964
1125
|
)
|
|
965
1126
|
] })
|
|
@@ -991,6 +1152,149 @@ var triggerVariants = (0, import_cva5.cva)(
|
|
|
991
1152
|
}
|
|
992
1153
|
}
|
|
993
1154
|
);
|
|
1155
|
+
|
|
1156
|
+
// src/components/ui/Counter.tsx
|
|
1157
|
+
var import_cva6 = require("cva");
|
|
1158
|
+
var import_lucide_react11 = require("lucide-react");
|
|
1159
|
+
var import_react7 = require("react");
|
|
1160
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1161
|
+
var Counter = (0, import_react7.forwardRef)(
|
|
1162
|
+
({ label, error, min, max, step = 1, description, theme, value, classNames, onChange, ...props }, ref) => {
|
|
1163
|
+
const [count, setCount] = (0, import_react7.useState)(0);
|
|
1164
|
+
(0, import_react7.useEffect)(() => {
|
|
1165
|
+
setCount(value ?? 0);
|
|
1166
|
+
}, [value]);
|
|
1167
|
+
const handleChange = (e) => {
|
|
1168
|
+
const newValue = parseInt(e.target.value.replace(/\D/g, ""), 10);
|
|
1169
|
+
if (isNaN(newValue)) return;
|
|
1170
|
+
if (min && newValue < min) {
|
|
1171
|
+
onChange?.(min);
|
|
1172
|
+
setCount(min);
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
if (max && newValue > max) {
|
|
1176
|
+
onChange?.(max);
|
|
1177
|
+
setCount(max);
|
|
1178
|
+
return;
|
|
1179
|
+
}
|
|
1180
|
+
onChange?.(newValue);
|
|
1181
|
+
setCount(newValue);
|
|
1182
|
+
};
|
|
1183
|
+
const decrement = () => {
|
|
1184
|
+
const proposedValue = count - step;
|
|
1185
|
+
const newValue = Math.max(min ?? -Infinity, proposedValue);
|
|
1186
|
+
onChange?.(newValue);
|
|
1187
|
+
setCount(newValue);
|
|
1188
|
+
};
|
|
1189
|
+
const increment = () => {
|
|
1190
|
+
const proposedValue = count + step;
|
|
1191
|
+
const newValue = Math.min(max ?? Infinity, proposedValue);
|
|
1192
|
+
onChange?.(newValue);
|
|
1193
|
+
setCount(newValue);
|
|
1194
|
+
};
|
|
1195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1196
|
+
"div",
|
|
1197
|
+
{
|
|
1198
|
+
className: cn("flex w-auto flex-col gap-1", classNames?.root),
|
|
1199
|
+
"data-testid": `counter-wrapper-${props.id}`,
|
|
1200
|
+
children: [
|
|
1201
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1202
|
+
Label_default,
|
|
1203
|
+
{
|
|
1204
|
+
text: label,
|
|
1205
|
+
htmlFor: props.name,
|
|
1206
|
+
required: props.required,
|
|
1207
|
+
description,
|
|
1208
|
+
className: classNames?.label
|
|
1209
|
+
}
|
|
1210
|
+
),
|
|
1211
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "relative flex w-[122px] flex-row items-center", children: [
|
|
1212
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1213
|
+
"button",
|
|
1214
|
+
{
|
|
1215
|
+
type: "button",
|
|
1216
|
+
className: "absolute inset-y-0 left-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
1217
|
+
onClick: decrement,
|
|
1218
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react11.Minus, { className: "h-4 w-4 text-green-100" })
|
|
1219
|
+
}
|
|
1220
|
+
),
|
|
1221
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1222
|
+
"input",
|
|
1223
|
+
{
|
|
1224
|
+
className: cn(counterVariants({ theme }), classNames?.input),
|
|
1225
|
+
ref,
|
|
1226
|
+
value: count,
|
|
1227
|
+
onChange: handleChange,
|
|
1228
|
+
"data-testid": `counter-element-${props.id}`,
|
|
1229
|
+
...props
|
|
1230
|
+
}
|
|
1231
|
+
),
|
|
1232
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1233
|
+
"button",
|
|
1234
|
+
{
|
|
1235
|
+
type: "button",
|
|
1236
|
+
className: "absolute inset-y-0 right-1 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
|
|
1237
|
+
onClick: increment,
|
|
1238
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react11.Plus, { className: "h-4 w-4 text-green-100" })
|
|
1239
|
+
}
|
|
1240
|
+
)
|
|
1241
|
+
] }),
|
|
1242
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ErrorMessage_default, { message: error })
|
|
1243
|
+
]
|
|
1244
|
+
}
|
|
1245
|
+
);
|
|
1246
|
+
}
|
|
1247
|
+
);
|
|
1248
|
+
Counter.displayName = "Counter";
|
|
1249
|
+
var counterVariants = (0, import_cva6.cva)(
|
|
1250
|
+
[
|
|
1251
|
+
"border-input",
|
|
1252
|
+
"placeholder:text-muted-foreground",
|
|
1253
|
+
"focus-visible:ring-ring",
|
|
1254
|
+
"inline-flex",
|
|
1255
|
+
"w-[122px]",
|
|
1256
|
+
"h-11",
|
|
1257
|
+
"items-center",
|
|
1258
|
+
"justify-start",
|
|
1259
|
+
"gap-3",
|
|
1260
|
+
"rounded-lg",
|
|
1261
|
+
"bg-transparent",
|
|
1262
|
+
"px-3",
|
|
1263
|
+
"pt-0.5",
|
|
1264
|
+
"text-sm",
|
|
1265
|
+
"text-center",
|
|
1266
|
+
"shadow-sm",
|
|
1267
|
+
"ring-grey-50",
|
|
1268
|
+
"transition-colors",
|
|
1269
|
+
"focus-visible:outline-none",
|
|
1270
|
+
"focus-visible:ring-1",
|
|
1271
|
+
"disabled:cursor-not-allowed",
|
|
1272
|
+
"disabled:opacity-50",
|
|
1273
|
+
"appearance-none",
|
|
1274
|
+
"[&::-webkit-search-cancel-button]:appearance-none",
|
|
1275
|
+
"[&::-webkit-search-decoration]:appearance-none",
|
|
1276
|
+
"[&::-webkit-search-results-button]:appearance-none",
|
|
1277
|
+
"[&::-webkit-search-results-decoration]:appearance-none",
|
|
1278
|
+
"[&::-ms-clear]:display-none",
|
|
1279
|
+
"[&::-ms-reveal]:display-none"
|
|
1280
|
+
],
|
|
1281
|
+
{
|
|
1282
|
+
variants: {
|
|
1283
|
+
theme: {
|
|
1284
|
+
light: "text-grey-80 border",
|
|
1285
|
+
dark: "text-white"
|
|
1286
|
+
},
|
|
1287
|
+
hasIcon: {
|
|
1288
|
+
false: "pl-3",
|
|
1289
|
+
true: "pl-8"
|
|
1290
|
+
}
|
|
1291
|
+
},
|
|
1292
|
+
defaultVariants: {
|
|
1293
|
+
theme: "light",
|
|
1294
|
+
hasIcon: false
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
994
1298
|
// Annotate the CommonJS export names for ESM import in node:
|
|
995
1299
|
0 && (module.exports = {
|
|
996
1300
|
Badge,
|
|
@@ -998,9 +1302,11 @@ var triggerVariants = (0, import_cva5.cva)(
|
|
|
998
1302
|
Checkbox,
|
|
999
1303
|
Chip,
|
|
1000
1304
|
Combobox,
|
|
1305
|
+
Counter,
|
|
1001
1306
|
Input,
|
|
1002
1307
|
Label,
|
|
1003
1308
|
ListItem,
|
|
1309
|
+
PlacesQueryInput,
|
|
1004
1310
|
Select,
|
|
1005
1311
|
cn
|
|
1006
1312
|
});
|