@clubmed/trident-ui 2.0.0-beta.74 → 2.0.0-beta.76
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/examples/chapters-demo.d.ts +1 -0
- package/examples/chapters-demo.js +46 -0
- package/examples/chapters-demo.js.map +1 -0
- package/examples/criteria-transports-b2b-demo.d.ts +1 -1
- package/examples/criteria-transports-b2b-demo.js +100 -33
- package/examples/criteria-transports-b2b-demo.js.map +1 -1
- package/examples/criteria-transports-demo.js +209 -20
- package/examples/criteria-transports-demo.js.map +1 -1
- package/examples/promises-demo.d.ts +1 -0
- package/examples/promises-demo.js +50 -0
- package/examples/promises-demo.js.map +1 -0
- package/examples/sparkle-wrapper-demo.d.ts +1 -0
- package/examples/sparkle-wrapper-demo.js +34 -0
- package/examples/sparkle-wrapper-demo.js.map +1 -0
- package/package.json +1 -1
- package/styles/animate.css +19 -0
- package/styles/theme.css +1 -0
- package/ui/Chapters/Chapter.d.ts +7 -0
- package/ui/Chapters/Chapter.js +36 -0
- package/ui/Chapters/Chapter.js.map +1 -0
- package/ui/Chapters/ChapterTitle.d.ts +14 -0
- package/ui/Chapters/ChapterTitle.js +35 -0
- package/ui/Chapters/ChapterTitle.js.map +1 -0
- package/ui/Chapters/Chapters.d.ts +15 -0
- package/ui/Chapters/Chapters.js +42 -0
- package/ui/Chapters/Chapters.js.map +1 -0
- package/ui/Chapters/Chapters.themes.d.ts +9 -0
- package/ui/Chapters/Chapters.themes.js +65 -0
- package/ui/Chapters/Chapters.themes.js.map +1 -0
- package/ui/Chapters/ChaptersSummary.d.ts +17 -0
- package/ui/Chapters/ChaptersSummary.js +29 -0
- package/ui/Chapters/ChaptersSummary.js.map +1 -0
- package/ui/ElasticHeight.js +1 -0
- package/ui/ElasticHeight.js.map +1 -1
- package/ui/Promises/Promises.d.ts +26 -0
- package/ui/Promises/Promises.js +42 -0
- package/ui/Promises/Promises.js.map +1 -0
- package/ui/Promises/PromisesMedia.d.ts +12 -0
- package/ui/Promises/PromisesMedia.js +64 -0
- package/ui/Promises/PromisesMedia.js.map +1 -0
- package/ui/Promises/PromisesMenu.d.ts +11 -0
- package/ui/Promises/PromisesMenu.js +154 -0
- package/ui/Promises/PromisesMenu.js.map +1 -0
- package/ui/SparkleWrapper.d.ts +5 -0
- package/ui/SparkleWrapper.js +56 -0
- package/ui/SparkleWrapper.js.map +1 -0
- package/ui/criteria/CriteriaTransports.d.ts +36 -55
- package/ui/criteria/CriteriaTransports.js +256 -206
- package/ui/criteria/CriteriaTransports.js.map +1 -1
- package/ui/forms/NumberField.d.ts +23 -23
- package/examples/criteria-transports-b2c-demo.d.ts +0 -1
- package/examples/criteria-transports-b2c-demo.js +0 -37
- package/examples/criteria-transports-b2c-demo.js.map +0 -1
- package/examples/criteria-transports-data.d.ts +0 -7
- package/examples/criteria-transports-data.js +0 -151
- package/examples/criteria-transports-data.js.map +0 -1
- package/examples/criteria-transports-error-demo.d.ts +0 -1
- package/examples/criteria-transports-error-demo.js +0 -29
- package/examples/criteria-transports-error-demo.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChaptersDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Chapters as e } from "../ui/Chapters/Chapters.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/examples/chapters-demo.tsx
|
|
5
|
+
function n() {
|
|
6
|
+
return /* @__PURE__ */ t(e, {
|
|
7
|
+
chapters: [
|
|
8
|
+
{
|
|
9
|
+
title: "All-inclusive experience",
|
|
10
|
+
content: /* @__PURE__ */ t("div", {
|
|
11
|
+
className: "min-h-screen p-40",
|
|
12
|
+
children: /* @__PURE__ */ t("p", {
|
|
13
|
+
className: "text-body max-w-prose",
|
|
14
|
+
children: "From sunrise yoga to late-night entertainment, every moment is included. Fine dining, premium beverages, world-class facilities — yours without a second thought."
|
|
15
|
+
})
|
|
16
|
+
})
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
title: "Sports & activities",
|
|
20
|
+
content: /* @__PURE__ */ t("div", {
|
|
21
|
+
className: "min-h-screen p-40",
|
|
22
|
+
children: /* @__PURE__ */ t("p", {
|
|
23
|
+
className: "text-body max-w-prose",
|
|
24
|
+
children: "Surf, dive, sail, climb — over 60 land and water sports await you. Our certified instructors guide guests of all levels, from first-timers to seasoned athletes."
|
|
25
|
+
})
|
|
26
|
+
})
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: "Kids clubs",
|
|
30
|
+
content: /* @__PURE__ */ t("div", {
|
|
31
|
+
className: "min-h-screen p-40",
|
|
32
|
+
children: /* @__PURE__ */ t("p", {
|
|
33
|
+
className: "text-body max-w-prose",
|
|
34
|
+
children: "Dedicated clubs for every age from 4 months to 17 years. Supervised activities, creative workshops, and adventure programmes tailored to each stage of childhood."
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
theme: "coreRange",
|
|
40
|
+
className: "w-full"
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { n as default };
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=chapters-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chapters-demo.js","names":[],"sources":["../../lib/examples/chapters-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Chapters } from '@/ui/Chapters/Chapters';\n\nexport default function ChaptersDemo() {\n return (\n <Chapters\n chapters={[\n {\n title: 'All-inclusive experience',\n content: (\n <div className=\"min-h-screen p-40\">\n <p className=\"text-body max-w-prose\">\n From sunrise yoga to late-night entertainment, every moment is included. Fine\n dining, premium beverages, world-class facilities — yours without a second thought.\n </p>\n </div>\n ),\n },\n {\n title: 'Sports & activities',\n content: (\n <div className=\"min-h-screen p-40\">\n <p className=\"text-body max-w-prose\">\n Surf, dive, sail, climb — over 60 land and water sports await you. Our certified\n instructors guide guests of all levels, from first-timers to seasoned athletes.\n </p>\n </div>\n ),\n },\n {\n title: 'Kids clubs',\n content: (\n <div className=\"min-h-screen p-40\">\n <p className=\"text-body max-w-prose\">\n Dedicated clubs for every age from 4 months to 17 years. Supervised activities,\n creative workshops, and adventure programmes tailored to each stage of childhood.\n </p>\n </div>\n ),\n },\n ]}\n theme=\"coreRange\"\n className=\"w-full\"\n />\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAAe;AACrC,QACE,kBAAC,GAAD;EACE,UAAU;GACR;IACE,OAAO;IACP,SACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,KAAD;MAAG,WAAU;gBAAwB;MAGjC,CAAA;KACA,CAAA;IAET;GACD;IACE,OAAO;IACP,SACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,KAAD;MAAG,WAAU;gBAAwB;MAGjC,CAAA;KACA,CAAA;IAET;GACD;IACE,OAAO;IACP,SACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,KAAD;MAAG,WAAU;gBAAwB;MAGjC,CAAA;KACA,CAAA;;GAGX;EACD,OAAM;EACN,WAAU;EACV,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function
|
|
1
|
+
export default function CriteriaTransportsB2BDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,51 +1,118 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { CriteriaTransports as e } from "../ui/criteria/CriteriaTransports.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
5
|
//#region lib/examples/criteria-transports-b2b-demo.tsx
|
|
7
6
|
var i = {
|
|
8
|
-
|
|
7
|
+
toggleLabel: "Add transportation from",
|
|
8
|
+
topCitiesLabel: "Top cities",
|
|
9
|
+
otherCitiesLabel: "Other cities",
|
|
10
|
+
clubMedTransportTitle: "Opt for Club Med transportation:",
|
|
11
|
+
clubMedTransportDescription: "Assistance and support in case of unforeseen events. Comfort guaranteed from departure to arrival.",
|
|
9
12
|
reset: "Reset",
|
|
10
13
|
apply: "Confirm"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
}, a = {
|
|
15
|
+
roundTripLabel: "Round trip",
|
|
16
|
+
oneWayLabel: "One way",
|
|
17
|
+
cabinClassLabel: "Class",
|
|
18
|
+
departureDateLabel: "From"
|
|
19
|
+
}, o = [
|
|
20
|
+
{
|
|
21
|
+
value: "all",
|
|
22
|
+
label: "All classes"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
value: "economy",
|
|
26
|
+
label: "Economy"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
value: "business",
|
|
30
|
+
label: "Business"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
value: "first",
|
|
34
|
+
label: "First class"
|
|
35
|
+
}
|
|
36
|
+
], s = [
|
|
37
|
+
{
|
|
38
|
+
code: "BOS",
|
|
39
|
+
name: "Boston Logan International (BOS)"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
code: "NYC",
|
|
43
|
+
name: "New York all airports (NYC)"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
code: "MIA",
|
|
47
|
+
name: "Miami International (MIA)"
|
|
48
|
+
}
|
|
49
|
+
], c = [
|
|
50
|
+
{
|
|
51
|
+
code: "ABQ",
|
|
52
|
+
name: "Albuquerque (ABQ)"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
code: "ANC",
|
|
56
|
+
name: "Anchorage International (ANC)"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
code: "ATL",
|
|
60
|
+
name: "Atlanta Hartsfield-Jackson (ATL)"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
code: "AUS",
|
|
64
|
+
name: "Austin-Bergstrom International (AUS)"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
code: "DEN",
|
|
68
|
+
name: "Denver International (DEN)"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
code: "LAX",
|
|
72
|
+
name: "Los Angeles International (LAX)"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
code: "SEA",
|
|
76
|
+
name: "Seattle-Tacoma International (SEA)"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
code: "SFO",
|
|
80
|
+
name: "San Francisco International (SFO)"
|
|
81
|
+
}
|
|
82
|
+
];
|
|
83
|
+
function l() {
|
|
84
|
+
let [l, u] = t(!1), [d, f] = t(null), [p, m] = t("roundtrip"), [h, g] = t(void 0), [_, v] = t("");
|
|
14
85
|
return /* @__PURE__ */ r("div", {
|
|
15
|
-
className: "w-[380px]
|
|
16
|
-
children: /* @__PURE__ */
|
|
86
|
+
className: "w-[380px] space-y-24",
|
|
87
|
+
children: [/* @__PURE__ */ n(e, {
|
|
17
88
|
mode: "b2b",
|
|
18
89
|
labels: i,
|
|
90
|
+
b2bLabels: a,
|
|
19
91
|
title: "Transport",
|
|
20
|
-
enabled:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"Business",
|
|
34
|
-
"First"
|
|
35
|
-
],
|
|
36
|
-
fromQuery: p,
|
|
37
|
-
fromQueryLabel: "From",
|
|
38
|
-
onChange: (e) => {
|
|
39
|
-
e.type === "enabled" && o(e.payload), e.type === "select" && c(e.payload), e.type === "flightType" && u(e.payload), e.type === "flightClass" && f(e.payload), e.type === "fromQuery" && m(e.payload);
|
|
40
|
-
},
|
|
92
|
+
enabled: l,
|
|
93
|
+
topCities: s,
|
|
94
|
+
otherCities: c,
|
|
95
|
+
selectedAirportCode: d,
|
|
96
|
+
flightType: p,
|
|
97
|
+
cabinClass: h,
|
|
98
|
+
cabinClassOptions: o,
|
|
99
|
+
departureQuery: _,
|
|
100
|
+
onToggle: u,
|
|
101
|
+
onSelect: f,
|
|
102
|
+
onFlightTypeChange: m,
|
|
103
|
+
onCabinClassChange: (e, t) => g(t),
|
|
104
|
+
onDepartureQueryChange: (e, t) => v(t),
|
|
41
105
|
onReset: () => {
|
|
42
|
-
|
|
106
|
+
u(!1), f(null), m("roundtrip"), g(void 0), v("");
|
|
43
107
|
},
|
|
44
108
|
onApply: () => {}
|
|
45
|
-
})
|
|
109
|
+
}), d && /* @__PURE__ */ r("p", {
|
|
110
|
+
className: "text-b4",
|
|
111
|
+
children: ["Selected: ", /* @__PURE__ */ n("strong", { children: d })]
|
|
112
|
+
})]
|
|
46
113
|
});
|
|
47
114
|
}
|
|
48
115
|
//#endregion
|
|
49
|
-
export {
|
|
116
|
+
export { l as default };
|
|
50
117
|
|
|
51
118
|
//# sourceMappingURL=criteria-transports-b2b-demo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"criteria-transports-b2b-demo.js","names":[],"sources":["../../lib/examples/criteria-transports-b2b-demo.tsx"],"sourcesContent":["'use client';\nimport { useState } from 'react';\n\nimport { CriteriaTransports } from '@/ui/criteria/CriteriaTransports';\nimport type {
|
|
1
|
+
{"version":3,"file":"criteria-transports-b2b-demo.js","names":[],"sources":["../../lib/examples/criteria-transports-b2b-demo.tsx"],"sourcesContent":["'use client';\nimport { useState } from 'react';\n\nimport { CriteriaTransports } from '@/ui/criteria/CriteriaTransports';\nimport type {\n CriteriaTransportsProps,\n CriteriaTransportsB2BLabels,\n} from '@/ui/criteria/CriteriaTransports';\nimport type { RadioSelectOption } from '@/ui/forms/RadioSelect';\n\nconst labels: CriteriaTransportsProps['labels'] = {\n toggleLabel: 'Add transportation from',\n topCitiesLabel: 'Top cities',\n otherCitiesLabel: 'Other cities',\n clubMedTransportTitle: 'Opt for Club Med transportation:',\n clubMedTransportDescription:\n 'Assistance and support in case of unforeseen events. Comfort guaranteed from departure to arrival.',\n reset: 'Reset',\n apply: 'Confirm',\n};\n\nconst b2bLabels: CriteriaTransportsB2BLabels = {\n roundTripLabel: 'Round trip',\n oneWayLabel: 'One way',\n cabinClassLabel: 'Class',\n departureDateLabel: 'From',\n};\n\nconst cabinClassOptions: RadioSelectOption<string>[] = [\n { value: 'all', label: 'All classes' },\n { value: 'economy', label: 'Economy' },\n { value: 'business', label: 'Business' },\n { value: 'first', label: 'First class' },\n];\n\nconst topCities = [\n { code: 'BOS', name: 'Boston Logan International (BOS)' },\n { code: 'NYC', name: 'New York all airports (NYC)' },\n { code: 'MIA', name: 'Miami International (MIA)' },\n];\n\nconst otherCities = [\n { code: 'ABQ', name: 'Albuquerque (ABQ)' },\n { code: 'ANC', name: 'Anchorage International (ANC)' },\n { code: 'ATL', name: 'Atlanta Hartsfield-Jackson (ATL)' },\n { code: 'AUS', name: 'Austin-Bergstrom International (AUS)' },\n { code: 'DEN', name: 'Denver International (DEN)' },\n { code: 'LAX', name: 'Los Angeles International (LAX)' },\n { code: 'SEA', name: 'Seattle-Tacoma International (SEA)' },\n { code: 'SFO', name: 'San Francisco International (SFO)' },\n];\n\nexport default function CriteriaTransportsB2BDemo() {\n const [enabled, setEnabled] = useState(false);\n const [selected, setSelected] = useState<string | null>(null);\n const [flightType, setFlightType] = useState<'roundtrip' | 'oneway'>('roundtrip');\n const [cabinClass, setCabinClass] = useState<string | undefined>(undefined);\n const [departureQuery, setDepartureQuery] = useState('');\n\n return (\n <div className=\"w-[380px] space-y-24\">\n <CriteriaTransports\n mode=\"b2b\"\n labels={labels}\n b2bLabels={b2bLabels}\n title=\"Transport\"\n enabled={enabled}\n topCities={topCities}\n otherCities={otherCities}\n selectedAirportCode={selected}\n flightType={flightType}\n cabinClass={cabinClass}\n cabinClassOptions={cabinClassOptions}\n departureQuery={departureQuery}\n onToggle={setEnabled}\n onSelect={setSelected}\n onFlightTypeChange={setFlightType}\n onCabinClassChange={(_event, value) => setCabinClass(value)}\n onDepartureQueryChange={(_event, value) => setDepartureQuery(value)}\n onReset={() => {\n setEnabled(false);\n setSelected(null);\n setFlightType('roundtrip');\n setCabinClass(undefined);\n setDepartureQuery('');\n }}\n onApply={() => {}}\n />\n {selected && (\n <p className=\"text-b4\">\n Selected: <strong>{selected}</strong>\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;AAUA,IAAM,IAA4C;CAChD,aAAa;CACb,gBAAgB;CAChB,kBAAkB;CAClB,uBAAuB;CACvB,6BACE;CACF,OAAO;CACP,OAAO;CACR,EAEK,IAAyC;CAC7C,gBAAgB;CAChB,aAAa;CACb,iBAAiB;CACjB,oBAAoB;CACrB,EAEK,IAAiD;CACrD;EAAE,OAAO;EAAO,OAAO;EAAe;CACtC;EAAE,OAAO;EAAW,OAAO;EAAW;CACtC;EAAE,OAAO;EAAY,OAAO;EAAY;CACxC;EAAE,OAAO;EAAS,OAAO;;CAC1B,EAEK,IAAY;CAChB;EAAE,MAAM;EAAO,MAAM;EAAoC;CACzD;EAAE,MAAM;EAAO,MAAM;EAA+B;CACpD;EAAE,MAAM;EAAO,MAAM;;CACtB,EAEK,IAAc;CAClB;EAAE,MAAM;EAAO,MAAM;EAAqB;CAC1C;EAAE,MAAM;EAAO,MAAM;EAAiC;CACtD;EAAE,MAAM;EAAO,MAAM;EAAoC;CACzD;EAAE,MAAM;EAAO,MAAM;EAAwC;CAC7D;EAAE,MAAM;EAAO,MAAM;EAA8B;CACnD;EAAE,MAAM;EAAO,MAAM;EAAmC;CACxD;EAAE,MAAM;EAAO,MAAM;EAAsC;CAC3D;EAAE,MAAM;EAAO,MAAM;;CACtB;AAED,SAAwB,IAA4B;CAClD,IAAM,CAAC,GAAS,KAAc,EAAS,GAAM,EACvC,CAAC,GAAU,KAAe,EAAwB,KAAK,EACvD,CAAC,GAAY,KAAiB,EAAiC,YAAY,EAC3E,CAAC,GAAY,KAAiB,EAA6B,KAAA,EAAU,EACrE,CAAC,GAAgB,KAAqB,EAAS,GAAG;AAExD,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GACE,MAAK;GACG;GACG;GACX,OAAM;GACG;GACE;GACE;GACb,qBAAqB;GACT;GACA;GACO;GACH;GAChB,UAAU;GACV,UAAU;GACV,oBAAoB;GACpB,qBAAqB,GAAQ,MAAU,EAAc,EAAM;GAC3D,yBAAyB,GAAQ,MAAU,EAAkB,EAAM;GACnE,eAAe;AAKb,IAJA,EAAW,GAAM,EACjB,EAAY,KAAK,EACjB,EAAc,YAAY,EAC1B,EAAc,KAAA,EAAU,EACxB,EAAkB,GAAG;;GAEvB,eAAe;GACf,CAAA,EACD,KACC,kBAAC,KAAD;GAAG,WAAU;aAAb,CAAuB,cACX,kBAAC,UAAD,EAAA,UAAS,GAAkB,CAAA,CAAA"}
|
|
@@ -1,34 +1,223 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { CriteriaTransports as e } from "../ui/criteria/CriteriaTransports.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
5
|
//#region lib/examples/criteria-transports-demo.tsx
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
var i = {
|
|
7
|
+
toggleLabel: "Add transportation from",
|
|
8
|
+
topCitiesLabel: "Top cities",
|
|
9
|
+
otherCitiesLabel: "Other cities",
|
|
10
|
+
clubMedTransportTitle: "Opt for Club Med transportation:",
|
|
11
|
+
clubMedTransportDescription: "Assistance and support in case of unforeseen events. Comfort guaranteed from departure to arrival.",
|
|
12
|
+
reset: "Reset",
|
|
13
|
+
apply: "Continue"
|
|
14
|
+
}, a = [
|
|
15
|
+
{
|
|
16
|
+
code: "BOS",
|
|
17
|
+
name: "Boston Logan International (BOS)"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
code: "NYC",
|
|
21
|
+
name: "New York all airports (NYC)"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
code: "MIA",
|
|
25
|
+
name: "Miami International (MIA)"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
code: "LAX",
|
|
29
|
+
name: "Los Angeles International (LAX)"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
code: "SFO",
|
|
33
|
+
name: "San Francisco International (SFO)"
|
|
34
|
+
}
|
|
35
|
+
], o = [
|
|
36
|
+
{
|
|
37
|
+
code: "ABQ",
|
|
38
|
+
name: "Albuquerque (ABQ)"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
code: "ANC",
|
|
42
|
+
name: "Anchorage International (ANC)"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
code: "ATL",
|
|
46
|
+
name: "Atlanta Hartsfield-Jackson (ATL)"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
code: "AUS",
|
|
50
|
+
name: "Austin-Bergstrom International (AUS)"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
code: "BNA",
|
|
54
|
+
name: "Nashville International (BNA)"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
code: "BUF",
|
|
58
|
+
name: "Buffalo Niagara International (BUF)"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
code: "CLT",
|
|
62
|
+
name: "Charlotte Douglas International (CLT)"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
code: "CMH",
|
|
66
|
+
name: "John Glenn Columbus International (CMH)"
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
code: "DAL",
|
|
70
|
+
name: "Dallas Love Field (DAL)"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
code: "DEN",
|
|
74
|
+
name: "Denver International (DEN)"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
code: "DTW",
|
|
78
|
+
name: "Detroit Metropolitan Wayne County (DTW)"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
code: "HNL",
|
|
82
|
+
name: "Daniel K. Inouye International (HNL)"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
code: "IAD",
|
|
86
|
+
name: "Washington Dulles International (IAD)"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
code: "IND",
|
|
90
|
+
name: "Indianapolis International (IND)"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
code: "JAX",
|
|
94
|
+
name: "Jacksonville International (JAX)"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
code: "LAS",
|
|
98
|
+
name: "Harry Reid International (LAS)"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
code: "MCI",
|
|
102
|
+
name: "Kansas City International (MCI)"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
code: "MCO",
|
|
106
|
+
name: "Orlando International (MCO)"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
code: "MDW",
|
|
110
|
+
name: "Chicago Midway International (MDW)"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
code: "MEM",
|
|
114
|
+
name: "Memphis International (MEM)"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
code: "MSP",
|
|
118
|
+
name: "Minneapolis-Saint Paul International (MSP)"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
code: "MSY",
|
|
122
|
+
name: "Louis Armstrong New Orleans International (MSY)"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
code: "OAK",
|
|
126
|
+
name: "Oakland Metropolitan International (OAK)"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
code: "ORD",
|
|
130
|
+
name: "Chicago O'Hare International (ORD)"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
code: "PHL",
|
|
134
|
+
name: "Philadelphia International (PHL)"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
code: "PHX",
|
|
138
|
+
name: "Phoenix Sky Harbor International (PHX)"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
code: "PIT",
|
|
142
|
+
name: "Pittsburgh International (PIT)"
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
code: "PDX",
|
|
146
|
+
name: "Portland International (PDX)"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
code: "RDU",
|
|
150
|
+
name: "Raleigh-Durham International (RDU)"
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
code: "RSW",
|
|
154
|
+
name: "Southwest Florida International (RSW)"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
code: "SAN",
|
|
158
|
+
name: "San Diego International (SAN)"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
code: "SAT",
|
|
162
|
+
name: "San Antonio International (SAT)"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
code: "SEA",
|
|
166
|
+
name: "Seattle-Tacoma International (SEA)"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
code: "SJC",
|
|
170
|
+
name: "Norman Y. Mineta San José International (SJC)"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
code: "SLC",
|
|
174
|
+
name: "Salt Lake City International (SLC)"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
code: "SMF",
|
|
178
|
+
name: "Sacramento International (SMF)"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
code: "SNA",
|
|
182
|
+
name: "John Wayne Airport Orange County (SNA)"
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
code: "STL",
|
|
186
|
+
name: "St. Louis Lambert International (STL)"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
code: "TPA",
|
|
190
|
+
name: "Tampa International (TPA)"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
code: "TUL",
|
|
194
|
+
name: "Tulsa International (TUL)"
|
|
195
|
+
}
|
|
196
|
+
];
|
|
197
|
+
function s() {
|
|
198
|
+
let [s, c] = t(!1), [l, u] = t(null);
|
|
199
|
+
return /* @__PURE__ */ r("div", {
|
|
200
|
+
className: "w-[380px] space-y-24",
|
|
201
|
+
children: [/* @__PURE__ */ n(e, {
|
|
202
|
+
labels: i,
|
|
16
203
|
title: "Transport",
|
|
17
|
-
enabled:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
204
|
+
enabled: s,
|
|
205
|
+
topCities: a,
|
|
206
|
+
otherCities: o,
|
|
207
|
+
selectedAirportCode: l,
|
|
208
|
+
onToggle: c,
|
|
209
|
+
onSelect: u,
|
|
21
210
|
onReset: () => {
|
|
22
|
-
|
|
211
|
+
c(!1), u(null);
|
|
23
212
|
},
|
|
24
213
|
onApply: () => {}
|
|
25
|
-
}),
|
|
214
|
+
}), l && /* @__PURE__ */ r("p", {
|
|
26
215
|
className: "text-b4",
|
|
27
|
-
children: ["Selected: ",
|
|
216
|
+
children: ["Selected: ", /* @__PURE__ */ n("strong", { children: l })]
|
|
28
217
|
})]
|
|
29
218
|
});
|
|
30
219
|
}
|
|
31
220
|
//#endregion
|
|
32
|
-
export {
|
|
221
|
+
export { s as default };
|
|
33
222
|
|
|
34
223
|
//# sourceMappingURL=criteria-transports-demo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"criteria-transports-demo.js","names":[],"sources":["../../lib/examples/criteria-transports-demo.tsx"],"sourcesContent":["'use client';\nimport { useState } from 'react';\n\nimport { CriteriaTransports } from '@/ui/criteria/CriteriaTransports';\nimport type {
|
|
1
|
+
{"version":3,"file":"criteria-transports-demo.js","names":[],"sources":["../../lib/examples/criteria-transports-demo.tsx"],"sourcesContent":["'use client';\nimport { useState } from 'react';\n\nimport { CriteriaTransports } from '@/ui/criteria/CriteriaTransports';\nimport type { CriteriaTransportsProps } from '@/ui/criteria/CriteriaTransports';\n\nconst labels: CriteriaTransportsProps['labels'] = {\n toggleLabel: 'Add transportation from',\n topCitiesLabel: 'Top cities',\n otherCitiesLabel: 'Other cities',\n clubMedTransportTitle: 'Opt for Club Med transportation:',\n clubMedTransportDescription:\n 'Assistance and support in case of unforeseen events. Comfort guaranteed from departure to arrival.',\n reset: 'Reset',\n apply: 'Continue',\n};\n\nconst topCities = [\n { code: 'BOS', name: 'Boston Logan International (BOS)' },\n { code: 'NYC', name: 'New York all airports (NYC)' },\n { code: 'MIA', name: 'Miami International (MIA)' },\n { code: 'LAX', name: 'Los Angeles International (LAX)' },\n { code: 'SFO', name: 'San Francisco International (SFO)' },\n];\n\nconst otherCities = [\n { code: 'ABQ', name: 'Albuquerque (ABQ)' },\n { code: 'ANC', name: 'Anchorage International (ANC)' },\n { code: 'ATL', name: 'Atlanta Hartsfield-Jackson (ATL)' },\n { code: 'AUS', name: 'Austin-Bergstrom International (AUS)' },\n { code: 'BNA', name: 'Nashville International (BNA)' },\n { code: 'BUF', name: 'Buffalo Niagara International (BUF)' },\n { code: 'CLT', name: 'Charlotte Douglas International (CLT)' },\n { code: 'CMH', name: 'John Glenn Columbus International (CMH)' },\n { code: 'DAL', name: 'Dallas Love Field (DAL)' },\n { code: 'DEN', name: 'Denver International (DEN)' },\n { code: 'DTW', name: 'Detroit Metropolitan Wayne County (DTW)' },\n { code: 'HNL', name: 'Daniel K. Inouye International (HNL)' },\n { code: 'IAD', name: 'Washington Dulles International (IAD)' },\n { code: 'IND', name: 'Indianapolis International (IND)' },\n { code: 'JAX', name: 'Jacksonville International (JAX)' },\n { code: 'LAS', name: 'Harry Reid International (LAS)' },\n { code: 'MCI', name: 'Kansas City International (MCI)' },\n { code: 'MCO', name: 'Orlando International (MCO)' },\n { code: 'MDW', name: 'Chicago Midway International (MDW)' },\n { code: 'MEM', name: 'Memphis International (MEM)' },\n { code: 'MSP', name: 'Minneapolis-Saint Paul International (MSP)' },\n { code: 'MSY', name: 'Louis Armstrong New Orleans International (MSY)' },\n { code: 'OAK', name: 'Oakland Metropolitan International (OAK)' },\n { code: 'ORD', name: \"Chicago O'Hare International (ORD)\" },\n { code: 'PHL', name: 'Philadelphia International (PHL)' },\n { code: 'PHX', name: 'Phoenix Sky Harbor International (PHX)' },\n { code: 'PIT', name: 'Pittsburgh International (PIT)' },\n { code: 'PDX', name: 'Portland International (PDX)' },\n { code: 'RDU', name: 'Raleigh-Durham International (RDU)' },\n { code: 'RSW', name: 'Southwest Florida International (RSW)' },\n { code: 'SAN', name: 'San Diego International (SAN)' },\n { code: 'SAT', name: 'San Antonio International (SAT)' },\n { code: 'SEA', name: 'Seattle-Tacoma International (SEA)' },\n { code: 'SJC', name: 'Norman Y. Mineta San José International (SJC)' },\n { code: 'SLC', name: 'Salt Lake City International (SLC)' },\n { code: 'SMF', name: 'Sacramento International (SMF)' },\n { code: 'SNA', name: 'John Wayne Airport Orange County (SNA)' },\n { code: 'STL', name: 'St. Louis Lambert International (STL)' },\n { code: 'TPA', name: 'Tampa International (TPA)' },\n { code: 'TUL', name: 'Tulsa International (TUL)' },\n];\n\nexport default function CriteriaTransportsDemo() {\n const [enabled, setEnabled] = useState(false);\n const [selected, setSelected] = useState<string | null>(null);\n\n return (\n <div className=\"w-[380px] space-y-24\">\n <CriteriaTransports\n labels={labels}\n title=\"Transport\"\n enabled={enabled}\n topCities={topCities}\n otherCities={otherCities}\n selectedAirportCode={selected}\n onToggle={setEnabled}\n onSelect={setSelected}\n onReset={() => {\n setEnabled(false);\n setSelected(null);\n }}\n onApply={() => {}}\n />\n {selected && (\n <p className=\"text-b4\">\n Selected: <strong>{selected}</strong>\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;AAMA,IAAM,IAA4C;CAChD,aAAa;CACb,gBAAgB;CAChB,kBAAkB;CAClB,uBAAuB;CACvB,6BACE;CACF,OAAO;CACP,OAAO;CACR,EAEK,IAAY;CAChB;EAAE,MAAM;EAAO,MAAM;EAAoC;CACzD;EAAE,MAAM;EAAO,MAAM;EAA+B;CACpD;EAAE,MAAM;EAAO,MAAM;EAA6B;CAClD;EAAE,MAAM;EAAO,MAAM;EAAmC;CACxD;EAAE,MAAM;EAAO,MAAM;;CACtB,EAEK,IAAc;CAClB;EAAE,MAAM;EAAO,MAAM;EAAqB;CAC1C;EAAE,MAAM;EAAO,MAAM;EAAiC;CACtD;EAAE,MAAM;EAAO,MAAM;EAAoC;CACzD;EAAE,MAAM;EAAO,MAAM;EAAwC;CAC7D;EAAE,MAAM;EAAO,MAAM;EAAiC;CACtD;EAAE,MAAM;EAAO,MAAM;EAAuC;CAC5D;EAAE,MAAM;EAAO,MAAM;EAAyC;CAC9D;EAAE,MAAM;EAAO,MAAM;EAA2C;CAChE;EAAE,MAAM;EAAO,MAAM;EAA2B;CAChD;EAAE,MAAM;EAAO,MAAM;EAA8B;CACnD;EAAE,MAAM;EAAO,MAAM;EAA2C;CAChE;EAAE,MAAM;EAAO,MAAM;EAAwC;CAC7D;EAAE,MAAM;EAAO,MAAM;EAAyC;CAC9D;EAAE,MAAM;EAAO,MAAM;EAAoC;CACzD;EAAE,MAAM;EAAO,MAAM;EAAoC;CACzD;EAAE,MAAM;EAAO,MAAM;EAAkC;CACvD;EAAE,MAAM;EAAO,MAAM;EAAmC;CACxD;EAAE,MAAM;EAAO,MAAM;EAA+B;CACpD;EAAE,MAAM;EAAO,MAAM;EAAsC;CAC3D;EAAE,MAAM;EAAO,MAAM;EAA+B;CACpD;EAAE,MAAM;EAAO,MAAM;EAA8C;CACnE;EAAE,MAAM;EAAO,MAAM;EAAmD;CACxE;EAAE,MAAM;EAAO,MAAM;EAA4C;CACjE;EAAE,MAAM;EAAO,MAAM;EAAsC;CAC3D;EAAE,MAAM;EAAO,MAAM;EAAoC;CACzD;EAAE,MAAM;EAAO,MAAM;EAA0C;CAC/D;EAAE,MAAM;EAAO,MAAM;EAAkC;CACvD;EAAE,MAAM;EAAO,MAAM;EAAgC;CACrD;EAAE,MAAM;EAAO,MAAM;EAAsC;CAC3D;EAAE,MAAM;EAAO,MAAM;EAAyC;CAC9D;EAAE,MAAM;EAAO,MAAM;EAAiC;CACtD;EAAE,MAAM;EAAO,MAAM;EAAmC;CACxD;EAAE,MAAM;EAAO,MAAM;EAAsC;CAC3D;EAAE,MAAM;EAAO,MAAM;EAAiD;CACtE;EAAE,MAAM;EAAO,MAAM;EAAsC;CAC3D;EAAE,MAAM;EAAO,MAAM;EAAkC;CACvD;EAAE,MAAM;EAAO,MAAM;EAA0C;CAC/D;EAAE,MAAM;EAAO,MAAM;EAAyC;CAC9D;EAAE,MAAM;EAAO,MAAM;EAA6B;CAClD;EAAE,MAAM;EAAO,MAAM;;CACtB;AAED,SAAwB,IAAyB;CAC/C,IAAM,CAAC,GAAS,KAAc,EAAS,GAAM,EACvC,CAAC,GAAU,KAAe,EAAwB,KAAK;AAE7D,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GACU;GACR,OAAM;GACG;GACE;GACE;GACb,qBAAqB;GACrB,UAAU;GACV,UAAU;GACV,eAAe;AAEb,IADA,EAAW,GAAM,EACjB,EAAY,KAAK;;GAEnB,eAAe;GACf,CAAA,EACD,KACC,kBAAC,KAAD;GAAG,WAAU;aAAb,CAAuB,cACX,kBAAC,UAAD,EAAA,UAAS,GAAkB,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function PromisesDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Promises as e } from "../ui/Promises/Promises.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/examples/promises-demo.tsx
|
|
5
|
+
function n() {
|
|
6
|
+
return /* @__PURE__ */ t(e, {
|
|
7
|
+
className: "min-h-500 w-full",
|
|
8
|
+
items: [
|
|
9
|
+
{
|
|
10
|
+
title: "The most beautiful destinations",
|
|
11
|
+
href: "#",
|
|
12
|
+
image: {
|
|
13
|
+
src: "https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400",
|
|
14
|
+
alt: "Beautiful beach destination"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: "Kids club starting from 4 months",
|
|
19
|
+
href: "#",
|
|
20
|
+
image: {
|
|
21
|
+
src: "https://images.unsplash.com/photo-1529156069898-49953e39b3ac?w=400",
|
|
22
|
+
alt: "Kids playing at the club"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
title: "The best restaurants on the coast",
|
|
27
|
+
href: "#",
|
|
28
|
+
image: {
|
|
29
|
+
src: "https://images.unsplash.com/photo-1414235077428-338989a2e8c0?w=400",
|
|
30
|
+
alt: "Fine dining restaurant"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
labels: {
|
|
35
|
+
anchor: { continue: "Discover" },
|
|
36
|
+
layer: {
|
|
37
|
+
close: "Close menu",
|
|
38
|
+
open: "Open menu"
|
|
39
|
+
},
|
|
40
|
+
scroller: {
|
|
41
|
+
previous: "Previous",
|
|
42
|
+
next: "Next"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { n as default };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=promises-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promises-demo.js","names":[],"sources":["../../lib/examples/promises-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Promises } from '@/ui/Promises/Promises';\n\nexport default function PromisesDemo() {\n return (\n <Promises\n className=\"min-h-500 w-full\"\n items={[\n {\n title: 'The most beautiful destinations',\n href: '#',\n image: {\n src: 'https://images.unsplash.com/photo-1507525428034-b723cf961d3e?w=400',\n alt: 'Beautiful beach destination',\n },\n },\n {\n title: 'Kids club starting from 4 months',\n href: '#',\n image: {\n src: 'https://images.unsplash.com/photo-1529156069898-49953e39b3ac?w=400',\n alt: 'Kids playing at the club',\n },\n },\n {\n title: 'The best restaurants on the coast',\n href: '#',\n image: {\n src: 'https://images.unsplash.com/photo-1414235077428-338989a2e8c0?w=400',\n alt: 'Fine dining restaurant',\n },\n },\n ]}\n labels={{\n anchor: { continue: 'Discover' },\n layer: { close: 'Close menu', open: 'Open menu' },\n scroller: { previous: 'Previous', next: 'Next' },\n }}\n />\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAAe;AACrC,QACE,kBAAC,GAAD;EACE,WAAU;EACV,OAAO;GACL;IACE,OAAO;IACP,MAAM;IACN,OAAO;KACL,KAAK;KACL,KAAK;;IAER;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;KACL,KAAK;KACL,KAAK;;IAER;GACD;IACE,OAAO;IACP,MAAM;IACN,OAAO;KACL,KAAK;KACL,KAAK;;;GAGV;EACD,QAAQ;GACN,QAAQ,EAAE,UAAU,YAAY;GAChC,OAAO;IAAE,OAAO;IAAc,MAAM;IAAa;GACjD,UAAU;IAAE,UAAU;IAAY,MAAM;;;EAE1C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SparkleWrapperDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { SparkleWrapper as e } from "../ui/SparkleWrapper.js";
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/examples/sparkle-wrapper-demo.tsx
|
|
6
|
+
function i() {
|
|
7
|
+
let [i, a] = t(0);
|
|
8
|
+
return /* @__PURE__ */ r("div", {
|
|
9
|
+
className: "flex flex-col items-center gap-48 p-48",
|
|
10
|
+
children: [
|
|
11
|
+
/* @__PURE__ */ n(e, {
|
|
12
|
+
count: 3,
|
|
13
|
+
children: /* @__PURE__ */ n("div", {
|
|
14
|
+
className: "bg-saffron text-black font-bold px-20 py-12 rounded-pill text-b3",
|
|
15
|
+
children: "✨ New feature"
|
|
16
|
+
})
|
|
17
|
+
}, i),
|
|
18
|
+
/* @__PURE__ */ n(e, { children: /* @__PURE__ */ n("span", {
|
|
19
|
+
className: "text-h4 font-bold",
|
|
20
|
+
children: "🎉 Congratulations!"
|
|
21
|
+
}) }, `b-${i}`),
|
|
22
|
+
/* @__PURE__ */ n("button", {
|
|
23
|
+
type: "button",
|
|
24
|
+
onClick: () => a((e) => e + 1),
|
|
25
|
+
className: "px-20 py-10 rounded-pill border-2 border-black font-semibold text-b3 hover:bg-black hover:text-white transition-colors cursor-pointer",
|
|
26
|
+
children: "Replay animation"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { i as default };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=sparkle-wrapper-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sparkle-wrapper-demo.js","names":[],"sources":["../../lib/examples/sparkle-wrapper-demo.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { SparkleWrapper } from '@/ui/SparkleWrapper';\n\nexport default function SparkleWrapperDemo() {\n const [key, setKey] = useState(0);\n\n return (\n <div className=\"flex flex-col items-center gap-48 p-48\">\n <SparkleWrapper count={3} key={key}>\n <div className=\"bg-saffron text-black font-bold px-20 py-12 rounded-pill text-b3\">\n ✨ New feature\n </div>\n </SparkleWrapper>\n\n <SparkleWrapper key={`b-${key}`}>\n <span className=\"text-h4 font-bold\">🎉 Congratulations!</span>\n </SparkleWrapper>\n\n <button\n type=\"button\"\n onClick={() => setKey((k) => k + 1)}\n className=\"px-20 py-10 rounded-pill border-2 border-black font-semibold text-b3 hover:bg-black hover:text-white transition-colors cursor-pointer\"\n >\n Replay animation\n </button>\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,SAAwB,IAAqB;CAC3C,IAAM,CAAC,GAAK,KAAU,EAAS,EAAE;AAEjC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD;IAAgB,OAAO;cACrB,kBAAC,OAAD;KAAK,WAAU;eAAmE;KAE5E,CAAA;IACS,EAJc,EAId;GAEjB,kBAAC,GAAD,EAAA,UACE,kBAAC,QAAD;IAAM,WAAU;cAAoB;IAA0B,CAAA,EAC/C,EAFI,KAAK,IAET;GAEjB,kBAAC,UAAD;IACE,MAAK;IACL,eAAe,GAAQ,MAAM,IAAI,EAAE;IACnC,WAAU;cACX;IAEQ,CAAA"}
|
package/package.json
CHANGED
package/styles/animate.css
CHANGED
|
@@ -299,3 +299,22 @@
|
|
|
299
299
|
transform: translateX(0px);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
+
|
|
303
|
+
@keyframes sparkle-fly {
|
|
304
|
+
0% {
|
|
305
|
+
opacity: 1;
|
|
306
|
+
transform: translate(
|
|
307
|
+
calc(-50% + var(--sparkle-start-x, 0px)),
|
|
308
|
+
calc(-50% + var(--sparkle-start-y, 0px))
|
|
309
|
+
)
|
|
310
|
+
scale(1);
|
|
311
|
+
}
|
|
312
|
+
100% {
|
|
313
|
+
opacity: 0;
|
|
314
|
+
transform: translate(
|
|
315
|
+
calc(-50% + var(--sparkle-end-x, 0px)),
|
|
316
|
+
calc(-50% + var(--sparkle-end-y, 0px))
|
|
317
|
+
)
|
|
318
|
+
scale(0);
|
|
319
|
+
}
|
|
320
|
+
}
|
package/styles/theme.css
CHANGED
|
@@ -174,4 +174,5 @@
|
|
|
174
174
|
--animate-zoom-in: zoom-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards; /* NOT IN DCX */
|
|
175
175
|
--animate-zoom-out: zoom-out 180ms cubic-bezier(0.4, 0, 1, 1) forwards; /* NOT IN DCX */
|
|
176
176
|
--animate-wiggle: wiggle 0.75s ease-in-out;
|
|
177
|
+
--animate-sparkle-fly: sparkle-fly 900ms ease-out both;
|
|
177
178
|
}
|