@dododog/ui 0.13.1 → 0.14.1
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/README.md +3 -3
- package/dist/{chunk-SZ3SV4SJ.mjs → chunk-4DHZ6MIL.mjs} +1 -1
- package/dist/{chunk-77WKG2D7.js → chunk-5UNG2O64.js} +38 -8
- package/dist/{chunk-C4RZBOKH.js → chunk-EQPT6VZF.js} +1 -1
- package/dist/{chunk-NBDPT3XQ.js → chunk-HH4X2JYO.js} +94 -15
- package/dist/{chunk-GRG4USTC.mjs → chunk-JWOV5H6G.mjs} +38 -8
- package/dist/chunk-N5ZNXNCO.mjs +178 -0
- package/dist/components/Footer/index.js +2 -2
- package/dist/components/Footer/index.mjs +1 -1
- package/dist/components/Input/index.js +3 -3
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Modal/index.d.mts +12 -0
- package/dist/components/Modal/index.d.ts +12 -0
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/Modal/index.mjs +1 -1
- package/dist/index.d.mts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +152 -126
- package/dist/index.mjs +54 -28
- package/dist/tailwind-preset.d.mts +2 -2
- package/dist/tailwind-preset.d.ts +2 -2
- package/dist/tailwind-preset.js +2 -2
- package/dist/tailwind-preset.mjs +2 -2
- package/package.json +14 -14
- package/dist/chunk-74B2EGKT.mjs +0 -99
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
export { Tag, tagVariants } from './chunk-WOG6V7OW.mjs';
|
|
1
2
|
export { Textarea, textareaVariants } from './chunk-ZZ4EWC53.mjs';
|
|
2
3
|
export { Toast, toastVariants } from './chunk-YVTUUNAX.mjs';
|
|
3
4
|
export { Toggle } from './chunk-2AB5ZHY5.mjs';
|
|
4
5
|
export { Tooltip } from './chunk-2MJTZ6RR.mjs';
|
|
5
|
-
export { Tag, tagVariants } from './chunk-WOG6V7OW.mjs';
|
|
6
6
|
export { TripHeroCard } from './chunk-LO2XNMZO.mjs';
|
|
7
7
|
export { VerticalMarquee } from './chunk-JP5ZR2HI.mjs';
|
|
8
|
+
export { Spinner, spinnerVariants } from './chunk-NCSFXSOZ.mjs';
|
|
8
9
|
export { StatCard } from './chunk-O2W7NR33.mjs';
|
|
9
10
|
export { StatTile } from './chunk-ZEPXWD6U.mjs';
|
|
10
11
|
export { StatusBadge, statusBadgeVariants } from './chunk-FZ7UNXSC.mjs';
|
|
@@ -12,68 +13,67 @@ export { StayListRow } from './chunk-IVCQVBOT.mjs';
|
|
|
12
13
|
export { Stepper } from './chunk-2ASKBL63.mjs';
|
|
13
14
|
export { Switch, switchThumbVariants, switchTrackVariants } from './chunk-DMCMWOBJ.mjs';
|
|
14
15
|
export { Tabs } from './chunk-VOZPGXQD.mjs';
|
|
15
|
-
export {
|
|
16
|
+
export { SearchLoadingChecklist } from './chunk-SRYZ4N7T.mjs';
|
|
16
17
|
export { SearchWidget } from './chunk-DUT3ABEI.mjs';
|
|
17
18
|
export { SegmentedControl } from './chunk-36Y7UU32.mjs';
|
|
18
|
-
export { RoomTypeCard, RoomTypeCardSkeleton } from './chunk-IGBEBAPY.mjs';
|
|
19
|
-
export { Skeleton, SkeletonCircle, SkeletonImage, SkeletonText } from './chunk-PAHSQMXV.mjs';
|
|
20
19
|
export { Select, selectVariants } from './chunk-333YD5QI.mjs';
|
|
20
|
+
export { SectionHeader } from './chunk-DM76AK4A.mjs';
|
|
21
21
|
export { Sidebar } from './chunk-MPL35D5G.mjs';
|
|
22
22
|
export { SignInCallout, signInCalloutVariants } from './chunk-Z3KRMKHP.mjs';
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
23
|
+
export { Pagination } from './chunk-XQVODPHL.mjs';
|
|
24
|
+
export { PriceDisplay } from './chunk-REXLQTNE.mjs';
|
|
25
25
|
export { ProgressBar, progressBarVariants, progressFillVariants } from './chunk-UGYMWWKT.mjs';
|
|
26
|
+
export { RadioGroup } from './chunk-F2BUMJYW.mjs';
|
|
26
27
|
export { PromoBanner, promoBannerVariants } from './chunk-FNDR3WOZ.mjs';
|
|
27
28
|
export { Rating } from './chunk-SGDC4IVX.mjs';
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
29
|
+
export { RoomTypeCard, RoomTypeCardSkeleton } from './chunk-IGBEBAPY.mjs';
|
|
30
|
+
export { Skeleton, SkeletonCircle, SkeletonImage, SkeletonText } from './chunk-PAHSQMXV.mjs';
|
|
30
31
|
export { SearchBar } from './chunk-KQK7LFWM.mjs';
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export { Input, inputVariants } from './chunk-GRG4USTC.mjs';
|
|
32
|
+
export { ImpactCard } from './chunk-IKQYFSBW.mjs';
|
|
33
|
+
export { Input, inputVariants } from './chunk-JWOV5H6G.mjs';
|
|
34
34
|
export { Lightbox } from './chunk-GBWVIY3C.mjs';
|
|
35
35
|
export { LinkCard } from './chunk-UYDZKAGZ.mjs';
|
|
36
36
|
export { LoadingOverlay } from './chunk-WVEJS2J2.mjs';
|
|
37
37
|
export { MegaMenu } from './chunk-EUEM2D5M.mjs';
|
|
38
|
-
export {
|
|
39
|
-
export { Modal } from './chunk-
|
|
38
|
+
export { MobileMenu } from './chunk-R4DC7XPP.mjs';
|
|
39
|
+
export { Modal } from './chunk-N5ZNXNCO.mjs';
|
|
40
40
|
export { FloatingDock } from './chunk-P2SGBTKS.mjs';
|
|
41
|
-
export { Footer } from './chunk-
|
|
41
|
+
export { Footer } from './chunk-4DHZ6MIL.mjs';
|
|
42
42
|
export { GuestPicker } from './chunk-EJ7LDW7E.mjs';
|
|
43
43
|
export { Header } from './chunk-PPDKQ3FF.mjs';
|
|
44
|
-
export { IconBadge, iconBadgeVariants } from './chunk-I4WCNTNP.mjs';
|
|
45
44
|
export { HotelCard } from './chunk-XSSRFA5O.mjs';
|
|
45
|
+
export { IconBadge, iconBadgeVariants } from './chunk-I4WCNTNP.mjs';
|
|
46
46
|
export { ImageGallery } from './chunk-QU6ZRLKO.mjs';
|
|
47
|
-
export {
|
|
48
|
-
|
|
47
|
+
export { ImageWithFallback } from './chunk-BUXVK2HE.mjs';
|
|
48
|
+
export { DogCard } from './chunk-4A3AQ66D.mjs';
|
|
49
49
|
export { Drawer } from './chunk-ZLF7IL3Y.mjs';
|
|
50
50
|
export { DropdownMenu } from './chunk-Q7BKR6O7.mjs';
|
|
51
|
-
export { DualRangeSlider } from './chunk-ERL3WXNY.mjs';
|
|
52
51
|
export { EmptyState } from './chunk-OCUHCDAQ.mjs';
|
|
52
|
+
export { DualRangeSlider } from './chunk-ERL3WXNY.mjs';
|
|
53
53
|
export { ErrorBoundary } from './chunk-5257MWFI.mjs';
|
|
54
|
-
export { FilterAccordion } from './chunk-VQVRKRSM.mjs';
|
|
55
54
|
export { FilterPill } from './chunk-YKBASX5A.mjs';
|
|
56
|
-
export {
|
|
55
|
+
export { FilterAccordion } from './chunk-VQVRKRSM.mjs';
|
|
57
56
|
export { CardList } from './chunk-RJWHPHHX.mjs';
|
|
57
|
+
export { Carousel } from './chunk-OOPP4ES2.mjs';
|
|
58
58
|
export { Checkbox } from './chunk-EEIPCJQ2.mjs';
|
|
59
|
-
export { DatePickerInput, DateRangePicker } from './chunk-FL3GD5FJ.mjs';
|
|
60
59
|
export { Counter } from './chunk-LRNSVRUN.mjs';
|
|
60
|
+
export { DatePickerInput, DateRangePicker } from './chunk-FL3GD5FJ.mjs';
|
|
61
61
|
export { DetailList } from './chunk-N6THLJIG.mjs';
|
|
62
|
+
import './chunk-OZULAGYL.mjs';
|
|
62
63
|
export { Divider } from './chunk-E4B6LXK7.mjs';
|
|
63
|
-
export { DogCard } from './chunk-4A3AQ66D.mjs';
|
|
64
64
|
export { Autocomplete, autocompleteInputVariants } from './chunk-B47HQHX3.mjs';
|
|
65
|
-
export { Badge, badgeVariants } from './chunk-XZU2SISM.mjs';
|
|
66
|
-
export { Banner, bannerVariants } from './chunk-LFIZX2S6.mjs';
|
|
67
65
|
export { Avatar } from './chunk-2POGTS27.mjs';
|
|
66
|
+
export { Badge, badgeVariants } from './chunk-XZU2SISM.mjs';
|
|
68
67
|
export { BottomNavBar } from './chunk-UQRQZLMQ.mjs';
|
|
69
|
-
export {
|
|
68
|
+
export { Banner, bannerVariants } from './chunk-LFIZX2S6.mjs';
|
|
70
69
|
export { Breadcrumb, breadcrumbVariants } from './chunk-UKCH6RYL.mjs';
|
|
70
|
+
export { Button, buttonVariants } from './chunk-4U5MNA3B.mjs';
|
|
71
71
|
export { Card, CardContent, CardDescription, CardImage, CardTitle, cardImageVariants, cardVariants } from './chunk-V5J2XLPD.mjs';
|
|
72
72
|
export { Accordion } from './chunk-NZ7GF6RF.mjs';
|
|
73
73
|
export { ActiveStayCard } from './chunk-CRQ4XOCC.mjs';
|
|
74
74
|
export { DOG_AVATAR_COLORS, DogAvatar, DogAvatarStack, dogAvatarColor } from './chunk-AGNY5DBW.mjs';
|
|
75
|
-
export { AnchorTabs } from './chunk-M2H6QUAL.mjs';
|
|
76
75
|
export { Alert } from './chunk-BQWVWK74.mjs';
|
|
76
|
+
export { AnchorTabs } from './chunk-M2H6QUAL.mjs';
|
|
77
77
|
import { cn } from './chunk-IMKLN273.mjs';
|
|
78
78
|
export { cn } from './chunk-IMKLN273.mjs';
|
|
79
79
|
import * as React from 'react';
|
|
@@ -321,6 +321,11 @@ function DogFriendlyPanel({
|
|
|
321
321
|
function CheckIcon2({ className }) {
|
|
322
322
|
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", className, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" }) });
|
|
323
323
|
}
|
|
324
|
+
function ChevronDownIcon({ className }) {
|
|
325
|
+
return /* @__PURE__ */ jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "m6 9 6 6 6-6" }) });
|
|
326
|
+
}
|
|
327
|
+
var DEFAULT_INITIAL_VISIBLE = 8;
|
|
328
|
+
var DEFAULT_REVIEWS_STEP = 8;
|
|
324
329
|
function formatScore(score) {
|
|
325
330
|
return score.toFixed(1).replace(".", ",");
|
|
326
331
|
}
|
|
@@ -336,14 +341,21 @@ function ReviewSummary({
|
|
|
336
341
|
sources,
|
|
337
342
|
subScores,
|
|
338
343
|
reviews,
|
|
344
|
+
initialVisibleReviews = DEFAULT_INITIAL_VISIBLE,
|
|
345
|
+
reviewsStep = DEFAULT_REVIEWS_STEP,
|
|
346
|
+
moreReviewsLabel = "Voir plus d'avis",
|
|
339
347
|
onSeeAll,
|
|
340
348
|
seeAllLabel,
|
|
341
349
|
emptyLabel = "Peu d'avis v\xE9rifi\xE9s pour le moment",
|
|
342
350
|
className,
|
|
343
351
|
...props
|
|
344
352
|
}) {
|
|
345
|
-
const
|
|
353
|
+
const totalReviews = reviews?.length ?? 0;
|
|
354
|
+
const hasReviews = totalReviews > 0;
|
|
346
355
|
const isEmpty = score == null && !hasReviews;
|
|
356
|
+
const [visibleCount, setVisibleCount] = React.useState(initialVisibleReviews);
|
|
357
|
+
const visibleReviews = reviews ? reviews.slice(0, visibleCount) : [];
|
|
358
|
+
const hasMoreReviews = visibleCount < totalReviews;
|
|
347
359
|
return /* @__PURE__ */ jsxs(
|
|
348
360
|
"section",
|
|
349
361
|
{
|
|
@@ -380,7 +392,7 @@ function ReviewSummary({
|
|
|
380
392
|
},
|
|
381
393
|
sub.label
|
|
382
394
|
)) }) : null,
|
|
383
|
-
hasReviews ? /* @__PURE__ */ jsx("ul", { className: "-mx-4 flex gap-3 overflow-x-auto px-4 pb-1 [scrollbar-width:none] md:mx-0 md:px-0 [&::-webkit-scrollbar]:hidden", children:
|
|
395
|
+
hasReviews ? /* @__PURE__ */ jsx("ul", { className: "-mx-4 flex gap-3 overflow-x-auto px-4 pb-1 [scrollbar-width:none] md:mx-0 md:px-0 [&::-webkit-scrollbar]:hidden", children: visibleReviews.map((review, index) => /* @__PURE__ */ jsxs(
|
|
384
396
|
"li",
|
|
385
397
|
{
|
|
386
398
|
className: "flex w-[280px] shrink-0 flex-col rounded-2xl border border-sand-dark bg-white p-4",
|
|
@@ -417,6 +429,20 @@ function ReviewSummary({
|
|
|
417
429
|
},
|
|
418
430
|
`${review.author}-${index}`
|
|
419
431
|
)) }) : null,
|
|
432
|
+
hasMoreReviews ? /* @__PURE__ */ jsxs(
|
|
433
|
+
"button",
|
|
434
|
+
{
|
|
435
|
+
type: "button",
|
|
436
|
+
onClick: () => setVisibleCount(
|
|
437
|
+
(current) => Math.min(current + reviewsStep, totalReviews)
|
|
438
|
+
),
|
|
439
|
+
className: "mt-4 inline-flex w-full items-center justify-center gap-1.5 rounded-full border-[1.5px] border-primary bg-transparent px-4 py-3 text-sm font-semibold text-primary transition-colors hover:bg-primary hover:text-white",
|
|
440
|
+
children: [
|
|
441
|
+
moreReviewsLabel,
|
|
442
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-4 w-4" })
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
) : null,
|
|
420
446
|
onSeeAll ? /* @__PURE__ */ jsx(
|
|
421
447
|
"button",
|
|
422
448
|
{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { F as FontSizeValue } from './typography-BUlhEnfy.mjs';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
3
|
+
declare const toutoutripPreset: {
|
|
4
4
|
theme: {
|
|
5
5
|
extend: {
|
|
6
6
|
colors: {
|
|
@@ -167,4 +167,4 @@ declare const dododogPreset: {
|
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
-
export {
|
|
170
|
+
export { toutoutripPreset };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { F as FontSizeValue } from './typography-BUlhEnfy.js';
|
|
2
2
|
|
|
3
|
-
declare const
|
|
3
|
+
declare const toutoutripPreset: {
|
|
4
4
|
theme: {
|
|
5
5
|
extend: {
|
|
6
6
|
colors: {
|
|
@@ -167,4 +167,4 @@ declare const dododogPreset: {
|
|
|
167
167
|
};
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
-
export {
|
|
170
|
+
export { toutoutripPreset };
|
package/dist/tailwind-preset.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var chunk2XH74PQR_js = require('./chunk-2XH74PQR.js');
|
|
4
4
|
|
|
5
5
|
// src/tailwind-preset.ts
|
|
6
|
-
var
|
|
6
|
+
var toutoutripPreset = {
|
|
7
7
|
theme: {
|
|
8
8
|
extend: {
|
|
9
9
|
colors: chunk2XH74PQR_js.colors,
|
|
@@ -16,4 +16,4 @@ var dododogPreset = {
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
exports.
|
|
19
|
+
exports.toutoutripPreset = toutoutripPreset;
|
package/dist/tailwind-preset.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { animation, keyframes, boxShadow, fontSize, fontFamily, colors } from './chunk-7JYJ7ICL.mjs';
|
|
2
2
|
|
|
3
3
|
// src/tailwind-preset.ts
|
|
4
|
-
var
|
|
4
|
+
var toutoutripPreset = {
|
|
5
5
|
theme: {
|
|
6
6
|
extend: {
|
|
7
7
|
colors,
|
|
@@ -14,4 +14,4 @@ var dododogPreset = {
|
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { toutoutripPreset };
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dododog/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "React UI component library for
|
|
3
|
+
"version": "0.14.1",
|
|
4
|
+
"description": "React UI component library for ToutouTrip — pet-friendly travel platform",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"homepage": "https://storybook.
|
|
7
|
+
"homepage": "https://storybook.toutoutrip.com",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"react",
|
|
10
10
|
"ui",
|
|
11
11
|
"components",
|
|
12
12
|
"tailwindcss",
|
|
13
13
|
"design-system",
|
|
14
|
-
"
|
|
14
|
+
"toutoutrip"
|
|
15
15
|
],
|
|
16
16
|
"files": [
|
|
17
17
|
"dist",
|
|
@@ -417,25 +417,19 @@
|
|
|
417
417
|
"main": "./dist/index.js",
|
|
418
418
|
"module": "./dist/index.mjs",
|
|
419
419
|
"types": "./dist/index.d.ts",
|
|
420
|
-
"scripts": {
|
|
421
|
-
"build": "NODE_OPTIONS='--max-old-space-size=8192' tsup",
|
|
422
|
-
"dev": "tsup --watch",
|
|
423
|
-
"lint": "eslint . --max-warnings 0",
|
|
424
|
-
"clean": "rm -rf .turbo node_modules dist"
|
|
425
|
-
},
|
|
426
420
|
"peerDependencies": {
|
|
427
421
|
"react": ">=18",
|
|
428
422
|
"tailwindcss": ">=3"
|
|
429
423
|
},
|
|
430
424
|
"devDependencies": {
|
|
431
|
-
"@dododog/eslint-config": "workspace:*",
|
|
432
|
-
"@dododog/typescript-config": "workspace:*",
|
|
433
425
|
"@types/react": "^18.2.61",
|
|
434
426
|
"@types/react-dom": "^18.2.19",
|
|
435
427
|
"eslint": "^8.57.0",
|
|
436
428
|
"react": "^18.2.0",
|
|
437
429
|
"tsup": "^8.0.2",
|
|
438
|
-
"typescript": "5.5.4"
|
|
430
|
+
"typescript": "5.5.4",
|
|
431
|
+
"@toutoutrip/eslint-config": "0.0.0",
|
|
432
|
+
"@toutoutrip/typescript-config": "0.0.0"
|
|
439
433
|
},
|
|
440
434
|
"publishConfig": {
|
|
441
435
|
"access": "public"
|
|
@@ -445,5 +439,11 @@
|
|
|
445
439
|
"class-variance-authority": "^0.7.1",
|
|
446
440
|
"clsx": "^2.1.1",
|
|
447
441
|
"tailwind-merge": "^2.6.1"
|
|
442
|
+
},
|
|
443
|
+
"scripts": {
|
|
444
|
+
"build": "NODE_OPTIONS='--max-old-space-size=8192' tsup",
|
|
445
|
+
"dev": "tsup --watch",
|
|
446
|
+
"lint": "eslint . --max-warnings 0",
|
|
447
|
+
"clean": "rm -rf .turbo node_modules dist"
|
|
448
448
|
}
|
|
449
|
-
}
|
|
449
|
+
}
|
package/dist/chunk-74B2EGKT.mjs
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { cn } from './chunk-IMKLN273.mjs';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
var Modal = React.forwardRef(
|
|
6
|
-
({ isOpen, onClose, children, title, className }, ref) => {
|
|
7
|
-
const contentRef = React.useRef(null);
|
|
8
|
-
React.useEffect(() => {
|
|
9
|
-
if (!isOpen) return;
|
|
10
|
-
const handleKeyDown = (e) => {
|
|
11
|
-
if (e.key === "Escape") onClose();
|
|
12
|
-
};
|
|
13
|
-
document.addEventListener("keydown", handleKeyDown);
|
|
14
|
-
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
15
|
-
}, [isOpen, onClose]);
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
if (!isOpen) return;
|
|
18
|
-
const prev = document.body.style.overflow;
|
|
19
|
-
document.body.style.overflow = "hidden";
|
|
20
|
-
return () => {
|
|
21
|
-
document.body.style.overflow = prev;
|
|
22
|
-
};
|
|
23
|
-
}, [isOpen]);
|
|
24
|
-
React.useEffect(() => {
|
|
25
|
-
if (!isOpen || !contentRef.current) return;
|
|
26
|
-
const focusable = contentRef.current.querySelectorAll(
|
|
27
|
-
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
28
|
-
);
|
|
29
|
-
if (focusable.length > 0) focusable[0].focus();
|
|
30
|
-
}, [isOpen]);
|
|
31
|
-
if (!isOpen) return null;
|
|
32
|
-
return /* @__PURE__ */ jsxs(
|
|
33
|
-
"div",
|
|
34
|
-
{
|
|
35
|
-
ref,
|
|
36
|
-
className: "fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
37
|
-
role: "dialog",
|
|
38
|
-
"aria-modal": "true",
|
|
39
|
-
"aria-label": title,
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsx(
|
|
42
|
-
"div",
|
|
43
|
-
{
|
|
44
|
-
className: "absolute inset-0 bg-black/50",
|
|
45
|
-
onClick: onClose,
|
|
46
|
-
"aria-hidden": "true"
|
|
47
|
-
}
|
|
48
|
-
),
|
|
49
|
-
/* @__PURE__ */ jsxs(
|
|
50
|
-
"div",
|
|
51
|
-
{
|
|
52
|
-
ref: contentRef,
|
|
53
|
-
className: cn(
|
|
54
|
-
"relative bg-white rounded-2xl shadow-xl max-w-md w-full max-h-[90vh] overflow-auto",
|
|
55
|
-
className
|
|
56
|
-
),
|
|
57
|
-
children: [
|
|
58
|
-
title && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 pt-6 pb-2", children: [
|
|
59
|
-
/* @__PURE__ */ jsx("h2", { className: "text-lg font-heading font-semibold text-primary", children: title }),
|
|
60
|
-
/* @__PURE__ */ jsx(
|
|
61
|
-
"button",
|
|
62
|
-
{
|
|
63
|
-
type: "button",
|
|
64
|
-
onClick: onClose,
|
|
65
|
-
className: "text-text-muted hover:text-primary transition-colors",
|
|
66
|
-
"aria-label": "Fermer",
|
|
67
|
-
children: /* @__PURE__ */ jsxs(
|
|
68
|
-
"svg",
|
|
69
|
-
{
|
|
70
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
71
|
-
width: "20",
|
|
72
|
-
height: "20",
|
|
73
|
-
viewBox: "0 0 24 24",
|
|
74
|
-
fill: "none",
|
|
75
|
-
stroke: "currentColor",
|
|
76
|
-
strokeWidth: "2",
|
|
77
|
-
strokeLinecap: "round",
|
|
78
|
-
strokeLinejoin: "round",
|
|
79
|
-
children: [
|
|
80
|
-
/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }),
|
|
81
|
-
/* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
)
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
] }),
|
|
88
|
-
/* @__PURE__ */ jsx("div", { className: cn(title ? "px-6 pb-6" : "p-6"), children })
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
)
|
|
92
|
-
]
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
Modal.displayName = "Modal";
|
|
98
|
-
|
|
99
|
-
export { Modal };
|