@planetaexo/design-system 0.4.17 → 0.4.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +15 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2216,7 +2216,9 @@ function AdventureSection({
|
|
|
2216
2216
|
onAddContactAsTraveller,
|
|
2217
2217
|
onEditTraveller,
|
|
2218
2218
|
onRemoveTraveller,
|
|
2219
|
-
onAddSuggestedTraveller
|
|
2219
|
+
onAddSuggestedTraveller,
|
|
2220
|
+
onAddTraveller,
|
|
2221
|
+
onUnassignFromAdventure
|
|
2220
2222
|
}) {
|
|
2221
2223
|
var _a, _b, _c;
|
|
2222
2224
|
const [detailsOpen, setDetailsOpen] = React22__namespace.useState(false);
|
|
@@ -2370,7 +2372,7 @@ function AdventureSection({
|
|
|
2370
2372
|
"button",
|
|
2371
2373
|
{
|
|
2372
2374
|
type: "button",
|
|
2373
|
-
onClick: () => setAddModalOpen(true),
|
|
2375
|
+
onClick: () => onAddTraveller ? onAddTraveller(adventure.id) : setAddModalOpen(true),
|
|
2374
2376
|
className: "flex items-center gap-1.5 rounded-full border border-border px-3 py-1.5 text-xs font-ui text-primary hover:border-primary hover:bg-primary/5 transition-colors",
|
|
2375
2377
|
children: [
|
|
2376
2378
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlusIcon, { className: "w-3 h-3" }),
|
|
@@ -2453,12 +2455,12 @@ function AdventureSection({
|
|
|
2453
2455
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2Icon, { className: "w-3.5 h-3.5" })
|
|
2454
2456
|
}
|
|
2455
2457
|
),
|
|
2456
|
-
onRemoveTraveller && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2458
|
+
(onUnassignFromAdventure || onRemoveTraveller) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2457
2459
|
"button",
|
|
2458
2460
|
{
|
|
2459
2461
|
type: "button",
|
|
2460
|
-
onClick: () => onRemoveTraveller(adventure.id, t.id),
|
|
2461
|
-
className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-
|
|
2462
|
+
onClick: () => onUnassignFromAdventure ? onUnassignFromAdventure(adventure.id, t.id) : onRemoveTraveller(adventure.id, t.id),
|
|
2463
|
+
className: "flex h-8 w-8 sm:h-7 sm:w-7 items-center justify-center rounded-lg text-muted-foreground hover:text-amber-500 hover:bg-amber-500/10 transition-colors",
|
|
2462
2464
|
"aria-label": `Remove ${t.firstName} from adventure`,
|
|
2463
2465
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserMinusIcon, { className: "w-3.5 h-3.5" })
|
|
2464
2466
|
}
|
|
@@ -2740,6 +2742,8 @@ function BookingDetails({
|
|
|
2740
2742
|
onEditTraveller,
|
|
2741
2743
|
onRemoveTraveller,
|
|
2742
2744
|
onAddSuggestedTraveller,
|
|
2745
|
+
onAddTraveller,
|
|
2746
|
+
onUnassignFromAdventure,
|
|
2743
2747
|
onPayBalance,
|
|
2744
2748
|
onCancelRequest,
|
|
2745
2749
|
className
|
|
@@ -2821,7 +2825,9 @@ function BookingDetails({
|
|
|
2821
2825
|
onAddContactAsTraveller,
|
|
2822
2826
|
onEditTraveller,
|
|
2823
2827
|
onRemoveTraveller,
|
|
2824
|
-
onAddSuggestedTraveller
|
|
2828
|
+
onAddSuggestedTraveller,
|
|
2829
|
+
onAddTraveller,
|
|
2830
|
+
onUnassignFromAdventure
|
|
2825
2831
|
},
|
|
2826
2832
|
adventure.id
|
|
2827
2833
|
))
|
|
@@ -5085,11 +5091,10 @@ var OTPCodeInput = ({
|
|
|
5085
5091
|
e.preventDefault();
|
|
5086
5092
|
}
|
|
5087
5093
|
};
|
|
5088
|
-
const handlePaste = (e) => {
|
|
5094
|
+
const handlePaste = (e, startIndex) => {
|
|
5089
5095
|
e.preventDefault();
|
|
5090
5096
|
const pasted = e.clipboardData.getData("text").replace(/\D/g, "").slice(0, length);
|
|
5091
5097
|
if (!pasted) return;
|
|
5092
|
-
const startIndex = focusedIndexRef.current;
|
|
5093
5098
|
const newDigits = [...digits];
|
|
5094
5099
|
for (let i = 0; i < pasted.length && startIndex + i < length; i++) {
|
|
5095
5100
|
newDigits[startIndex + i] = pasted[i];
|
|
@@ -5119,7 +5124,6 @@ var OTPCodeInput = ({
|
|
|
5119
5124
|
),
|
|
5120
5125
|
role: "group",
|
|
5121
5126
|
"aria-label": label,
|
|
5122
|
-
onPaste: handlePaste,
|
|
5123
5127
|
children: digits.map((digit, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5124
5128
|
"input",
|
|
5125
5129
|
{
|
|
@@ -5130,13 +5134,14 @@ var OTPCodeInput = ({
|
|
|
5130
5134
|
type: "text",
|
|
5131
5135
|
inputMode: "numeric",
|
|
5132
5136
|
pattern: "\\d*",
|
|
5133
|
-
maxLength:
|
|
5137
|
+
maxLength: 1,
|
|
5134
5138
|
value: digit,
|
|
5135
5139
|
autoComplete: index === 0 ? "one-time-code" : "off",
|
|
5136
5140
|
"aria-label": `${label} d\xEDgito ${index + 1} de ${length}`,
|
|
5137
5141
|
disabled,
|
|
5138
5142
|
onChange: (e) => handleChange(index, e.target.value),
|
|
5139
5143
|
onKeyDown: (e) => handleKeyDown(index, e),
|
|
5144
|
+
onPaste: (e) => handlePaste(e, index),
|
|
5140
5145
|
onFocus: (e) => {
|
|
5141
5146
|
focusedIndexRef.current = index;
|
|
5142
5147
|
e.target.select();
|