@clubmed/trident-ui 2.0.0-beta.70 → 2.0.0-beta.74

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.
Files changed (83) hide show
  1. package/chunks/CriteriaParticipants.js +91 -91
  2. package/chunks/DateField.js +12 -12
  3. package/examples/accordion-demo.d.ts +1 -0
  4. package/examples/accordion-demo.js +79 -0
  5. package/examples/accordion-demo.js.map +1 -0
  6. package/examples/accordion-multiple-demo.d.ts +1 -0
  7. package/examples/accordion-multiple-demo.js +79 -0
  8. package/examples/accordion-multiple-demo.js.map +1 -0
  9. package/examples/accordion-trigger-wrapper-demo.d.ts +1 -0
  10. package/examples/accordion-trigger-wrapper-demo.js +80 -0
  11. package/examples/accordion-trigger-wrapper-demo.js.map +1 -0
  12. package/examples/avatar-demo.js +7 -7
  13. package/examples/card-list-demo.js +10 -10
  14. package/examples/card-no-border-demo.js +7 -7
  15. package/examples/chip-demo.js +4 -4
  16. package/examples/criteria-transports-b2b-demo.d.ts +1 -0
  17. package/examples/criteria-transports-b2b-demo.js +51 -0
  18. package/examples/criteria-transports-b2b-demo.js.map +1 -0
  19. package/examples/criteria-transports-b2c-demo.d.ts +1 -0
  20. package/examples/criteria-transports-b2c-demo.js +37 -0
  21. package/examples/criteria-transports-b2c-demo.js.map +1 -0
  22. package/examples/criteria-transports-data.d.ts +7 -0
  23. package/examples/criteria-transports-data.js +151 -0
  24. package/examples/criteria-transports-data.js.map +1 -0
  25. package/examples/criteria-transports-demo.d.ts +1 -0
  26. package/examples/criteria-transports-demo.js +34 -0
  27. package/examples/criteria-transports-demo.js.map +1 -0
  28. package/examples/criteria-transports-error-demo.d.ts +1 -0
  29. package/examples/criteria-transports-error-demo.js +29 -0
  30. package/examples/criteria-transports-error-demo.js.map +1 -0
  31. package/examples/filter-demo.js +5 -5
  32. package/examples/radio-select-demo.d.ts +1 -0
  33. package/examples/radio-select-demo.js +100 -0
  34. package/examples/radio-select-demo.js.map +1 -0
  35. package/package.json +1 -1
  36. package/ui/Accordion.d.ts +30 -0
  37. package/ui/Accordion.js +71 -0
  38. package/ui/Accordion.js.map +1 -0
  39. package/ui/AdvancedToast.js +15 -15
  40. package/ui/BasicToast.js +10 -10
  41. package/ui/Breadcrumb.js +6 -6
  42. package/ui/ChatButton.js +7 -7
  43. package/ui/ChatWindow.js +27 -27
  44. package/ui/ChatWindowCsatPrompt.js +13 -13
  45. package/ui/ChatWindowCsatThankYou.js +7 -7
  46. package/ui/Chip.js +4 -4
  47. package/ui/ChoiceExpander.js +16 -16
  48. package/ui/Dropdown.js +6 -6
  49. package/ui/Link.js +7 -7
  50. package/ui/PageNavigation.js +11 -11
  51. package/ui/Pagination.js +21 -21
  52. package/ui/SidebarLayout.js +35 -35
  53. package/ui/Tag.js +6 -6
  54. package/ui/buttons/ButtonContent.js +3 -3
  55. package/ui/criteria/CriteriaTransports.d.ts +72 -0
  56. package/ui/criteria/CriteriaTransports.js +224 -0
  57. package/ui/criteria/CriteriaTransports.js.map +1 -0
  58. package/ui/forms/CheckboxSelect.js +19 -19
  59. package/ui/forms/CheckboxSelect.js.map +1 -1
  60. package/ui/forms/Filter.js +9 -9
  61. package/ui/forms/FloatingLabelTextField.js +18 -18
  62. package/ui/forms/FormControlError.js +4 -4
  63. package/ui/forms/NumberField.d.ts +23 -23
  64. package/ui/forms/PhoneField.js +1 -1
  65. package/ui/forms/PhoneFieldFullInput.js +9 -9
  66. package/ui/forms/PhoneFieldSplitInput.js +14 -14
  67. package/ui/forms/RadioSelect.d.ts +31 -0
  68. package/ui/forms/RadioSelect.js +117 -0
  69. package/ui/forms/RadioSelect.js.map +1 -0
  70. package/ui/forms/Select.js +11 -11
  71. package/ui/forms/TextField.js +16 -16
  72. package/ui/forms/checkboxes/Checkbox.js +8 -8
  73. package/ui/forms/password/Password.js +13 -13
  74. package/ui/forms/password/ValidationMessage.js +5 -5
  75. package/ui/journey-card/FlightSegmentCard.js +21 -21
  76. package/ui/journey-card/ItineraryDetails.js +10 -10
  77. package/ui/journey-card/JourneyDetails.js +45 -45
  78. package/examples/criteria-transport-demo.d.ts +0 -1
  79. package/examples/criteria-transport-demo.js +0 -66
  80. package/examples/criteria-transport-demo.js.map +0 -1
  81. package/ui/criteria/CriteriaTransport.d.ts +0 -37
  82. package/ui/criteria/CriteriaTransport.js +0 -116
  83. package/ui/criteria/CriteriaTransport.js.map +0 -1
@@ -0,0 +1,79 @@
1
+ "use client";
2
+ import { Accordion as e } from "../ui/Accordion.js";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ //#region lib/examples/accordion-multiple-demo.tsx
5
+ var r = [
6
+ {
7
+ header: /* @__PURE__ */ n("span", {
8
+ className: "flex w-full items-center justify-between py-16 text-left font-semibold",
9
+ children: ["Outbound — Paris CDG → Bali DPS", /* @__PURE__ */ t("span", {
10
+ className: "ml-8 text-sm opacity-60 transition-transform in-[[aria-expanded='true']]:rotate-180",
11
+ children: "▾"
12
+ })]
13
+ }),
14
+ content: /* @__PURE__ */ n("ul", {
15
+ className: "space-y-8 pb-16 text-sm text-black/70",
16
+ children: [
17
+ /* @__PURE__ */ t("li", { children: "✈ CDG → DXB — 6 h 30 min — Emirates EK 76" }),
18
+ /* @__PURE__ */ t("li", { children: "✈ DXB → DPS — 8 h 05 min — Emirates EK 368" }),
19
+ /* @__PURE__ */ t("li", {
20
+ className: "font-medium text-black",
21
+ children: "Total travel time: 17 h 25 min (1 stop)"
22
+ })
23
+ ]
24
+ })
25
+ },
26
+ {
27
+ header: /* @__PURE__ */ n("span", {
28
+ className: "flex w-full items-center justify-between py-16 text-left font-semibold",
29
+ children: ["Return — Bali DPS → Paris CDG", /* @__PURE__ */ t("span", {
30
+ className: "ml-8 text-sm opacity-60 transition-transform in-[[aria-expanded='true']]:rotate-180",
31
+ children: "▾"
32
+ })]
33
+ }),
34
+ content: /* @__PURE__ */ n("ul", {
35
+ className: "space-y-8 pb-16 text-sm text-black/70",
36
+ children: [
37
+ /* @__PURE__ */ t("li", { children: "✈ DPS → SIN — 2 h 35 min — Singapore Airlines SQ 938" }),
38
+ /* @__PURE__ */ t("li", { children: "✈ SIN → CDG — 13 h 05 min — Singapore Airlines SQ 336" }),
39
+ /* @__PURE__ */ t("li", {
40
+ className: "font-medium text-black",
41
+ children: "Total travel time: 17 h 55 min (1 stop)"
42
+ })
43
+ ]
44
+ })
45
+ },
46
+ {
47
+ header: /* @__PURE__ */ n("span", {
48
+ className: "flex w-full items-center justify-between py-16 text-left font-semibold",
49
+ children: ["Baggage & fare conditions", /* @__PURE__ */ t("span", {
50
+ className: "ml-8 text-sm opacity-60 transition-transform in-[[aria-expanded='true']]:rotate-180",
51
+ children: "▾"
52
+ })]
53
+ }),
54
+ content: /* @__PURE__ */ n("ul", {
55
+ className: "space-y-8 pb-16 text-sm text-black/70",
56
+ children: [
57
+ /* @__PURE__ */ t("li", { children: "🧳 1 × 23 kg checked bag included per passenger" }),
58
+ /* @__PURE__ */ t("li", { children: "👜 1 × 7 kg carry-on included" }),
59
+ /* @__PURE__ */ t("li", { children: "🔄 Changes allowed with fee before departure" }),
60
+ /* @__PURE__ */ t("li", { children: "❌ Non-refundable after ticketing" })
61
+ ]
62
+ })
63
+ }
64
+ ];
65
+ function i() {
66
+ return /* @__PURE__ */ t("div", {
67
+ className: "w-full max-w-lg space-y-12",
68
+ children: /* @__PURE__ */ t(e, {
69
+ items: r,
70
+ allowMultiple: !0,
71
+ className: "divide-y divide-black/10 rounded-12 border border-black/10",
72
+ "aria-label": "Flight details"
73
+ })
74
+ });
75
+ }
76
+ //#endregion
77
+ export { i as default };
78
+
79
+ //# sourceMappingURL=accordion-multiple-demo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion-multiple-demo.js","names":[],"sources":["../../lib/examples/accordion-multiple-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Accordion } from '@/ui/Accordion';\n\nconst items = [\n {\n header: (\n <span className=\"flex w-full items-center justify-between py-16 text-left font-semibold\">\n Outbound — Paris CDG → Bali DPS\n <span className=\"ml-8 text-sm opacity-60 transition-transform in-[[aria-expanded='true']]:rotate-180\">\n ▾\n </span>\n </span>\n ),\n content: (\n <ul className=\"space-y-8 pb-16 text-sm text-black/70\">\n <li>✈ CDG → DXB — 6 h 30 min — Emirates EK 76</li>\n <li>✈ DXB → DPS — 8 h 05 min — Emirates EK 368</li>\n <li className=\"font-medium text-black\">Total travel time: 17 h 25 min (1 stop)</li>\n </ul>\n ),\n },\n {\n header: (\n <span className=\"flex w-full items-center justify-between py-16 text-left font-semibold\">\n Return — Bali DPS → Paris CDG\n <span className=\"ml-8 text-sm opacity-60 transition-transform in-[[aria-expanded='true']]:rotate-180\">\n ▾\n </span>\n </span>\n ),\n content: (\n <ul className=\"space-y-8 pb-16 text-sm text-black/70\">\n <li>✈ DPS → SIN — 2 h 35 min — Singapore Airlines SQ 938</li>\n <li>✈ SIN → CDG — 13 h 05 min — Singapore Airlines SQ 336</li>\n <li className=\"font-medium text-black\">Total travel time: 17 h 55 min (1 stop)</li>\n </ul>\n ),\n },\n {\n header: (\n <span className=\"flex w-full items-center justify-between py-16 text-left font-semibold\">\n Baggage & fare conditions\n <span className=\"ml-8 text-sm opacity-60 transition-transform in-[[aria-expanded='true']]:rotate-180\">\n ▾\n </span>\n </span>\n ),\n content: (\n <ul className=\"space-y-8 pb-16 text-sm text-black/70\">\n <li>🧳 1 × 23 kg checked bag included per passenger</li>\n <li>👜 1 × 7 kg carry-on included</li>\n <li>🔄 Changes allowed with fee before departure</li>\n <li>❌ Non-refundable after ticketing</li>\n </ul>\n ),\n },\n];\n\nexport default function AccordionMultipleDemo() {\n return (\n <div className=\"w-full max-w-lg space-y-12\">\n <Accordion\n items={items}\n allowMultiple\n className=\"divide-y divide-black/10 rounded-12 border border-black/10\"\n aria-label=\"Flight details\"\n />\n </div>\n );\n}\n"],"mappings":";;;;AAIA,IAAM,IAAQ;CACZ;EACE,QACE,kBAAC,QAAD;GAAM,WAAU;aAAhB,CAAyF,mCAEvF,kBAAC,QAAD;IAAM,WAAU;cAAsF;IAE/F,CAAA,CAAA;;EAGX,SACE,kBAAC,MAAD;GAAI,WAAU;aAAd;IACE,kBAAC,MAAD,EAAA,UAAI,6CAA8C,CAAA;IAClD,kBAAC,MAAD,EAAA,UAAI,8CAA+C,CAAA;IACnD,kBAAC,MAAD;KAAI,WAAU;eAAyB;KAA4C,CAAA;;;EAGxF;CACD;EACE,QACE,kBAAC,QAAD;GAAM,WAAU;aAAhB,CAAyF,iCAEvF,kBAAC,QAAD;IAAM,WAAU;cAAsF;IAE/F,CAAA,CAAA;;EAGX,SACE,kBAAC,MAAD;GAAI,WAAU;aAAd;IACE,kBAAC,MAAD,EAAA,UAAI,wDAAyD,CAAA;IAC7D,kBAAC,MAAD,EAAA,UAAI,yDAA0D,CAAA;IAC9D,kBAAC,MAAD;KAAI,WAAU;eAAyB;KAA4C,CAAA;;;EAGxF;CACD;EACE,QACE,kBAAC,QAAD;GAAM,WAAU;aAAhB,CAAyF,6BAEvF,kBAAC,QAAD;IAAM,WAAU;cAAsF;IAE/F,CAAA,CAAA;;EAGX,SACE,kBAAC,MAAD;GAAI,WAAU;aAAd;IACE,kBAAC,MAAD,EAAA,UAAI,mDAAoD,CAAA;IACxD,kBAAC,MAAD,EAAA,UAAI,iCAAkC,CAAA;IACtC,kBAAC,MAAD,EAAA,UAAI,gDAAiD,CAAA;IACrD,kBAAC,MAAD,EAAA,UAAI,oCAAqC,CAAA;;;;CAIhD;AAED,SAAwB,IAAwB;AAC9C,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACS;GACP,eAAA;GACA,WAAU;GACV,cAAW;GACX,CAAA;EACE,CAAA"}
@@ -0,0 +1 @@
1
+ export default function AccordionTriggerWrapperDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,80 @@
1
+ "use client";
2
+ import { Accordion as e } from "../ui/Accordion.js";
3
+ import "react";
4
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
5
+ //#region lib/examples/accordion-trigger-wrapper-demo.tsx
6
+ var r = [
7
+ {
8
+ id: "what-is-trident",
9
+ header: "What is Trident UI?",
10
+ content: /* @__PURE__ */ t("p", {
11
+ className: "pb-16 text-sm text-black/70",
12
+ children: "Trident UI is ClubMed's open-source component library built on React and Tailwind CSS. It provides accessible, composable primitives for building consistent product interfaces."
13
+ })
14
+ },
15
+ {
16
+ id: "how-to-install",
17
+ header: "How do I install it?",
18
+ content: /* @__PURE__ */ n("p", {
19
+ className: "pb-16 text-sm text-black/70",
20
+ children: [
21
+ "Run",
22
+ " ",
23
+ /* @__PURE__ */ t("code", {
24
+ className: "rounded bg-black/5 px-4 py-1 font-mono text-xs",
25
+ children: "npx shadcn@latest add https://develop.trident-ui.pro.clubmed/r/accordion.json"
26
+ }),
27
+ " ",
28
+ "to add the component to your project."
29
+ ]
30
+ })
31
+ },
32
+ {
33
+ id: "allow-multiple",
34
+ header: "Does it support multiple open panels?",
35
+ content: /* @__PURE__ */ n("p", {
36
+ className: "pb-16 text-sm text-black/70",
37
+ children: [
38
+ "Yes — pass",
39
+ " ",
40
+ /* @__PURE__ */ t("code", {
41
+ className: "rounded bg-black/5 px-4 py-1 font-mono text-xs",
42
+ children: "allowMultiple"
43
+ }),
44
+ " to let any number of panels be open at the same time."
45
+ ]
46
+ })
47
+ }
48
+ ];
49
+ function i(e) {
50
+ return /* @__PURE__ */ n("span", {
51
+ className: "flex w-full items-center justify-between py-16 text-left font-semibold",
52
+ children: [
53
+ "Tab Item: ",
54
+ e,
55
+ /* @__PURE__ */ t("span", {
56
+ className: "ml-8 text-sm opacity-60 transition-transform in-[[aria-expanded='true']]:rotate-180",
57
+ children: "▾"
58
+ })
59
+ ]
60
+ });
61
+ }
62
+ function a() {
63
+ return /* @__PURE__ */ n("div", {
64
+ className: "w-full max-w-lg space-y-12",
65
+ children: [
66
+ /* @__PURE__ */ n("div", { children: ["Trigger: ", /* @__PURE__ */ t("span", { children: "Header" })] }),
67
+ /* @__PURE__ */ n("div", { children: ["Wrapped trigger :", i("Header")] }),
68
+ /* @__PURE__ */ t(e, {
69
+ items: r,
70
+ triggerWrapper: i,
71
+ className: "divide-y divide-black/10 rounded-12 border border-black/10",
72
+ "aria-label": "FAQ"
73
+ })
74
+ ]
75
+ });
76
+ }
77
+ //#endregion
78
+ export { a as default };
79
+
80
+ //# sourceMappingURL=accordion-trigger-wrapper-demo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion-trigger-wrapper-demo.js","names":[],"sources":["../../lib/examples/accordion-trigger-wrapper-demo.tsx"],"sourcesContent":["'use client';\n\nimport { type ReactNode } from 'react';\n\nimport { Accordion } from '@/ui/Accordion';\n\nconst items = [\n {\n id: 'what-is-trident',\n header: 'What is Trident UI?',\n content: (\n <p className=\"pb-16 text-sm text-black/70\">\n Trident UI is ClubMed&apos;s open-source component library built on React and Tailwind CSS.\n It provides accessible, composable primitives for building consistent product interfaces.\n </p>\n ),\n },\n {\n id: 'how-to-install',\n header: 'How do I install it?',\n content: (\n <p className=\"pb-16 text-sm text-black/70\">\n Run{' '}\n <code className=\"rounded bg-black/5 px-4 py-1 font-mono text-xs\">\n npx shadcn@latest add https://develop.trident-ui.pro.clubmed/r/accordion.json\n </code>{' '}\n to add the component to your project.\n </p>\n ),\n },\n {\n id: 'allow-multiple',\n header: 'Does it support multiple open panels?',\n content: (\n <p className=\"pb-16 text-sm text-black/70\">\n Yes — pass{' '}\n <code className=\"rounded bg-black/5 px-4 py-1 font-mono text-xs\">allowMultiple</code> to let\n any number of panels be open at the same time.\n </p>\n ),\n },\n];\n\nfunction triggerWrapper(children: ReactNode) {\n return (\n <span className=\"flex w-full items-center justify-between py-16 text-left font-semibold\">\n Tab Item: {children}\n <span className=\"ml-8 text-sm opacity-60 transition-transform in-[[aria-expanded='true']]:rotate-180\">\n ▾\n </span>\n </span>\n );\n}\n\nexport default function AccordionTriggerWrapperDemo() {\n return (\n <div className=\"w-full max-w-lg space-y-12\">\n <div>\n Trigger: <span>Header</span>\n </div>\n <div>Wrapped trigger :{triggerWrapper('Header')}</div>\n <Accordion\n items={items}\n triggerWrapper={triggerWrapper}\n className=\"divide-y divide-black/10 rounded-12 border border-black/10\"\n aria-label=\"FAQ\"\n />\n </div>\n );\n}\n"],"mappings":";;;;;AAMA,IAAM,IAAQ;CACZ;EACE,IAAI;EACJ,QAAQ;EACR,SACE,kBAAC,KAAD;GAAG,WAAU;aAA8B;GAGvC,CAAA;EAEP;CACD;EACE,IAAI;EACJ,QAAQ;EACR,SACE,kBAAC,KAAD;GAAG,WAAU;aAAb;IAA2C;IACrC;IACJ,kBAAC,QAAD;KAAM,WAAU;eAAiD;KAE1D,CAAA;IAAC;IAAI;;;EAIjB;CACD;EACE,IAAI;EACJ,QAAQ;EACR,SACE,kBAAC,KAAD;GAAG,WAAU;aAAb;IAA2C;IAC9B;IACX,kBAAC,QAAD;KAAM,WAAU;eAAiD;KAAoB,CAAA;;;;;CAK5F;AAED,SAAS,EAAe,GAAqB;AAC3C,QACE,kBAAC,QAAD;EAAM,WAAU;YAAhB;GAAyF;GAC5E;GACX,kBAAC,QAAD;IAAM,WAAU;cAAsF;IAE/F,CAAA;;;;AAKb,SAAwB,IAA8B;AACpD,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,OAAD,EAAA,UAAA,CAAK,aACM,kBAAC,QAAD,EAAA,UAAM,UAAa,CAAA,CACxB,EAAA,CAAA;GACN,kBAAC,OAAD,EAAA,UAAA,CAAK,qBAAkB,EAAe,SAAS,CAAO,EAAA,CAAA;GACtD,kBAAC,GAAD;IACS;IACS;IAChB,WAAU;IACV,cAAW;IACX,CAAA"}
@@ -1,21 +1,21 @@
1
1
  "use client";
2
2
  import { Avatar as e } from "../ui/Avatar.js";
3
- import { Icon as t } from "@clubmed/trident-icons";
4
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
4
+ import { Icon as r } from "@clubmed/trident-icons";
5
5
  //#region lib/examples/avatar-demo.tsx
6
6
  function i() {
7
- return /* @__PURE__ */ r("div", { children: [
7
+ return /* @__PURE__ */ n("div", { children: [
8
8
  "Avatar using text:",
9
- /* @__PURE__ */ n(e, { alt: "John Doe" }),
9
+ /* @__PURE__ */ t(e, { alt: "John Doe" }),
10
10
  "Avatar using image:",
11
- /* @__PURE__ */ n(e, {
11
+ /* @__PURE__ */ t(e, {
12
12
  alt: "John Doe",
13
13
  src: "https://randomuser.me/api/portraits/men/75.jpg"
14
14
  }),
15
15
  "Avatar using icon:",
16
- /* @__PURE__ */ n(e, {
16
+ /* @__PURE__ */ t(e, {
17
17
  alt: "John Doe",
18
- children: /* @__PURE__ */ n(t, {
18
+ children: /* @__PURE__ */ t(r, {
19
19
  name: "PeopleSingle",
20
20
  width: "24px"
21
21
  })
@@ -1,33 +1,33 @@
1
1
  "use client";
2
2
  import { Card as e } from "../ui/cards/Card.js";
3
3
  import { Chip as t } from "../ui/Chip.js";
4
- import { Icon as n } from "@clubmed/trident-icons";
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { Icon as i } from "@clubmed/trident-icons";
6
6
  //#region lib/examples/card-list-demo.tsx
7
7
  function a() {
8
- return /* @__PURE__ */ i(e, {
8
+ return /* @__PURE__ */ r(e, {
9
9
  className: "p-20 w-full max-w-sm",
10
10
  children: [
11
- /* @__PURE__ */ r(t, {
11
+ /* @__PURE__ */ n(t, {
12
12
  theme: "solid",
13
13
  color: "lightSand",
14
14
  size: "size-48",
15
15
  className: "mb-12",
16
- children: /* @__PURE__ */ r(n, {
16
+ children: /* @__PURE__ */ n(i, {
17
17
  name: "Check",
18
18
  width: "24px"
19
19
  })
20
20
  }),
21
- /* @__PURE__ */ r("h3", {
21
+ /* @__PURE__ */ n("h3", {
22
22
  className: "text-18 font-bold mb-12",
23
23
  children: "What's Included"
24
24
  }),
25
- /* @__PURE__ */ i("ul", {
25
+ /* @__PURE__ */ r("ul", {
26
26
  className: "list-disc ps-12 text-14 space-y-4",
27
27
  children: [
28
- /* @__PURE__ */ r("li", { children: "All meals included" }),
29
- /* @__PURE__ */ r("li", { children: "Premium accommodation" }),
30
- /* @__PURE__ */ r("li", { children: "Activity pass" })
28
+ /* @__PURE__ */ n("li", { children: "All meals included" }),
29
+ /* @__PURE__ */ n("li", { children: "Premium accommodation" }),
30
+ /* @__PURE__ */ n("li", { children: "Activity pass" })
31
31
  ]
32
32
  })
33
33
  ]
@@ -1,28 +1,28 @@
1
1
  "use client";
2
2
  import { Card as e } from "../ui/cards/Card.js";
3
3
  import { Chip as t } from "../ui/Chip.js";
4
- import { Icon as n } from "@clubmed/trident-icons";
5
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { Icon as i } from "@clubmed/trident-icons";
6
6
  //#region lib/examples/card-no-border-demo.tsx
7
7
  function a() {
8
- return /* @__PURE__ */ i(e, {
8
+ return /* @__PURE__ */ r(e, {
9
9
  theme: "none",
10
10
  className: "p-24 w-full max-w-sm",
11
11
  children: [
12
- /* @__PURE__ */ r(t, {
12
+ /* @__PURE__ */ n(t, {
13
13
  theme: "solid",
14
14
  color: "lightSand",
15
15
  size: "size-48",
16
- children: /* @__PURE__ */ r(n, {
16
+ children: /* @__PURE__ */ n(i, {
17
17
  name: "Star",
18
18
  width: "24px"
19
19
  })
20
20
  }),
21
- /* @__PURE__ */ r("h3", {
21
+ /* @__PURE__ */ n("h3", {
22
22
  className: "text-18 font-bold mt-12 mb-8",
23
23
  children: "Premium Service"
24
24
  }),
25
- /* @__PURE__ */ r("p", {
25
+ /* @__PURE__ */ n("p", {
26
26
  className: "text-14 text-grey",
27
27
  children: "Experience luxury with our exclusive offerings."
28
28
  })
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
  import { Chip as e } from "../ui/Chip.js";
3
- import { Icon as t } from "@clubmed/trident-icons";
4
- import { jsx as n } from "react/jsx-runtime";
3
+ import { jsx as t } from "react/jsx-runtime";
4
+ import { Icon as n } from "@clubmed/trident-icons";
5
5
  //#region lib/examples/chip-demo.tsx
6
6
  function r() {
7
- return /* @__PURE__ */ n(e, {
7
+ return /* @__PURE__ */ t(e, {
8
8
  color: "sienna",
9
9
  size: "size-32",
10
10
  theme: "solid",
11
- children: /* @__PURE__ */ n(t, {
11
+ children: /* @__PURE__ */ t(n, {
12
12
  name: "Error",
13
13
  width: "16px"
14
14
  })
@@ -0,0 +1 @@
1
+ export default function CriteriaTransportsB2bDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,51 @@
1
+ "use client";
2
+ import { CriteriaTransports as e } from "../ui/criteria/CriteriaTransports.js";
3
+ import { transportSections as t } from "./criteria-transports-data.js";
4
+ import { useState as n } from "react";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ //#region lib/examples/criteria-transports-b2b-demo.tsx
7
+ var i = {
8
+ addTransportationFrom: "Add transportation from",
9
+ reset: "Reset",
10
+ apply: "Confirm"
11
+ };
12
+ function a() {
13
+ let [a, o] = n(!0), [s, c] = n("nyc"), [l, u] = n("round-trip"), [d, f] = n("All class"), [p, m] = n("");
14
+ return /* @__PURE__ */ r("div", {
15
+ className: "w-[380px] h-600",
16
+ children: /* @__PURE__ */ r(e, {
17
+ mode: "b2b",
18
+ labels: i,
19
+ title: "Transport",
20
+ enabled: a,
21
+ sections: t,
22
+ selectedId: s,
23
+ flightType: l,
24
+ flightTypeLabels: {
25
+ roundTrip: "Aller/retour",
26
+ oneWay: "Aller simple"
27
+ },
28
+ flightClass: d,
29
+ flightClassLabel: "Class",
30
+ flightClasses: [
31
+ "All class",
32
+ "Economy",
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
+ },
41
+ onReset: () => {
42
+ o(!1), c(null), m("");
43
+ },
44
+ onApply: () => {}
45
+ })
46
+ });
47
+ }
48
+ //#endregion
49
+ export { a as default };
50
+
51
+ //# sourceMappingURL=criteria-transports-b2b-demo.js.map
@@ -0,0 +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 { CriteriaTransportsAction } from '@/ui/criteria/CriteriaTransports';\nimport { transportSections } from './criteria-transports-data';\n\nconst labels = {\n addTransportationFrom: 'Add transportation from',\n reset: 'Reset',\n apply: 'Confirm',\n};\n\nexport default function CriteriaTransportsB2bDemo() {\n const [enabled, setEnabled] = useState(true);\n const [selectedId, setSelectedId] = useState<string | null>('nyc');\n const [flightType, setFlightType] = useState<'round-trip' | 'one-way'>('round-trip');\n const [flightClass, setFlightClass] = useState('All class');\n const [fromQuery, setFromQuery] = useState('');\n\n const handleChange = (action: CriteriaTransportsAction) => {\n if (action.type === 'enabled') setEnabled(action.payload);\n if (action.type === 'select') setSelectedId(action.payload);\n if (action.type === 'flightType') setFlightType(action.payload);\n if (action.type === 'flightClass') setFlightClass(action.payload);\n if (action.type === 'fromQuery') setFromQuery(action.payload);\n };\n\n return (\n <div className=\"w-[380px] h-600\">\n <CriteriaTransports\n mode=\"b2b\"\n labels={labels}\n title=\"Transport\"\n enabled={enabled}\n sections={transportSections}\n selectedId={selectedId}\n flightType={flightType}\n flightTypeLabels={{ roundTrip: 'Aller/retour', oneWay: 'Aller simple' }}\n flightClass={flightClass}\n flightClassLabel=\"Class\"\n flightClasses={['All class', 'Economy', 'Business', 'First']}\n fromQuery={fromQuery}\n fromQueryLabel=\"From\"\n onChange={handleChange}\n onReset={() => {\n setEnabled(false);\n setSelectedId(null);\n setFromQuery('');\n }}\n onApply={() => {}}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;AAOA,IAAM,IAAS;CACb,uBAAuB;CACvB,OAAO;CACP,OAAO;CACR;AAED,SAAwB,IAA4B;CAClD,IAAM,CAAC,GAAS,KAAc,EAAS,GAAK,EACtC,CAAC,GAAY,KAAiB,EAAwB,MAAM,EAC5D,CAAC,GAAY,KAAiB,EAAmC,aAAa,EAC9E,CAAC,GAAa,KAAkB,EAAS,YAAY,EACrD,CAAC,GAAW,KAAgB,EAAS,GAAG;AAU9C,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,MAAK;GACG;GACR,OAAM;GACG;GACT,UAAU;GACE;GACA;GACZ,kBAAkB;IAAE,WAAW;IAAgB,QAAQ;IAAgB;GAC1D;GACb,kBAAiB;GACjB,eAAe;IAAC;IAAa;IAAW;IAAY;IAAQ;GACjD;GACX,gBAAe;GACf,WAxBgB,MAAqC;AAKzD,IAJI,EAAO,SAAS,aAAW,EAAW,EAAO,QAAQ,EACrD,EAAO,SAAS,YAAU,EAAc,EAAO,QAAQ,EACvD,EAAO,SAAS,gBAAc,EAAc,EAAO,QAAQ,EAC3D,EAAO,SAAS,iBAAe,EAAe,EAAO,QAAQ,EAC7D,EAAO,SAAS,eAAa,EAAa,EAAO,QAAQ;;GAoBzD,eAAe;AAGb,IAFA,EAAW,GAAM,EACjB,EAAc,KAAK,EACnB,EAAa,GAAG;;GAElB,eAAe;GACf,CAAA;EACE,CAAA"}
@@ -0,0 +1 @@
1
+ export default function CriteriaTransportsB2cDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { CriteriaTransports as e } from "../ui/criteria/CriteriaTransports.js";
3
+ import { transportLabels as t, transportSections as n } from "./criteria-transports-data.js";
4
+ import { useState as r } from "react";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ //#region lib/examples/criteria-transports-b2c-demo.tsx
7
+ var a = {
8
+ icon: "PlaneDefault",
9
+ title: "Opt for Club Med transportation:",
10
+ description: "Assistance and support in case of unforeseen events. Comfort guaranteed from departure to arrival."
11
+ };
12
+ function o() {
13
+ let [o, s] = r(!1), [c, l] = r(null);
14
+ return /* @__PURE__ */ i("div", {
15
+ className: "w-[380px] h-600",
16
+ children: /* @__PURE__ */ i(e, {
17
+ mode: "b2c",
18
+ labels: t,
19
+ title: "Transport",
20
+ enabled: o,
21
+ sections: n,
22
+ selectedId: c,
23
+ promotionalCard: a,
24
+ onChange: (e) => {
25
+ e.type === "enabled" && s(e.payload), e.type === "select" && l(e.payload);
26
+ },
27
+ onReset: () => {
28
+ s(!1), l(null);
29
+ },
30
+ onApply: () => {}
31
+ })
32
+ });
33
+ }
34
+ //#endregion
35
+ export { o as default };
36
+
37
+ //# sourceMappingURL=criteria-transports-b2c-demo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"criteria-transports-b2c-demo.js","names":[],"sources":["../../lib/examples/criteria-transports-b2c-demo.tsx"],"sourcesContent":["'use client';\nimport { useState } from 'react';\n\nimport { CriteriaTransports } from '@/ui/criteria/CriteriaTransports';\nimport type { CriteriaTransportsAction } from '@/ui/criteria/CriteriaTransports';\nimport { transportLabels, transportSections } from './criteria-transports-data';\n\nconst promotionalCard = {\n icon: 'PlaneDefault',\n title: 'Opt for Club Med transportation:',\n description:\n 'Assistance and support in case of unforeseen events. Comfort guaranteed from departure to arrival.',\n};\n\nexport default function CriteriaTransportsB2cDemo() {\n const [enabled, setEnabled] = useState(false);\n const [selectedId, setSelectedId] = useState<string | null>(null);\n\n const handleChange = (action: CriteriaTransportsAction) => {\n if (action.type === 'enabled') setEnabled(action.payload);\n if (action.type === 'select') setSelectedId(action.payload);\n };\n\n return (\n <div className=\"w-[380px] h-600\">\n <CriteriaTransports\n mode=\"b2c\"\n labels={transportLabels}\n title=\"Transport\"\n enabled={enabled}\n sections={transportSections}\n selectedId={selectedId}\n promotionalCard={promotionalCard}\n onChange={handleChange}\n onReset={() => {\n setEnabled(false);\n setSelectedId(null);\n }}\n onApply={() => {}}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;AAOA,IAAM,IAAkB;CACtB,MAAM;CACN,OAAO;CACP,aACE;CACH;AAED,SAAwB,IAA4B;CAClD,IAAM,CAAC,GAAS,KAAc,EAAS,GAAM,EACvC,CAAC,GAAY,KAAiB,EAAwB,KAAK;AAOjE,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,MAAK;GACL,QAAQ;GACR,OAAM;GACG;GACT,UAAU;GACE;GACK;GACjB,WAfgB,MAAqC;AAEzD,IADI,EAAO,SAAS,aAAW,EAAW,EAAO,QAAQ,EACrD,EAAO,SAAS,YAAU,EAAc,EAAO,QAAQ;;GAcvD,eAAe;AAEb,IADA,EAAW,GAAM,EACjB,EAAc,KAAK;;GAErB,eAAe;GACf,CAAA;EACE,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { TransportSection } from '../ui/criteria/CriteriaTransports';
2
+ export declare const transportLabels: {
3
+ addTransportationFrom: string;
4
+ reset: string;
5
+ apply: string;
6
+ };
7
+ export declare const transportSections: TransportSection[];
@@ -0,0 +1,151 @@
1
+ //#region lib/examples/criteria-transports-data.ts
2
+ var e = {
3
+ addTransportationFrom: "Add transportation from",
4
+ reset: "Reset",
5
+ apply: "Continue"
6
+ }, t = [
7
+ {
8
+ title: "Top cities",
9
+ options: [
10
+ {
11
+ id: "bos",
12
+ label: "Boston Logan International (BOS)"
13
+ },
14
+ {
15
+ id: "nyc",
16
+ label: "New York all airports (NYC)"
17
+ },
18
+ {
19
+ id: "mia",
20
+ label: "Miami International (MIA)"
21
+ },
22
+ {
23
+ id: "lax",
24
+ label: "Los Angeles International (LAX)"
25
+ },
26
+ {
27
+ id: "ord",
28
+ label: "Chicago O'Hare International (ORD)"
29
+ },
30
+ {
31
+ id: "atl",
32
+ label: "Atlanta Hartsfield-Jackson (ATL)"
33
+ }
34
+ ]
35
+ },
36
+ {
37
+ title: "East Coast",
38
+ options: [
39
+ {
40
+ id: "jfk",
41
+ label: "New York John F. Kennedy (JFK)"
42
+ },
43
+ {
44
+ id: "ewr",
45
+ label: "Newark Liberty International (EWR)"
46
+ },
47
+ {
48
+ id: "phl",
49
+ label: "Philadelphia International (PHL)"
50
+ },
51
+ {
52
+ id: "dca",
53
+ label: "Washington Reagan National (DCA)"
54
+ },
55
+ {
56
+ id: "iad",
57
+ label: "Washington Dulles International (IAD)"
58
+ },
59
+ {
60
+ id: "bwi",
61
+ label: "Baltimore/Washington International (BWI)"
62
+ },
63
+ {
64
+ id: "rdu",
65
+ label: "Raleigh-Durham International (RDU)"
66
+ },
67
+ {
68
+ id: "clt",
69
+ label: "Charlotte Douglas International (CLT)"
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ title: "South & Midwest",
75
+ options: [
76
+ {
77
+ id: "msy",
78
+ label: "New Orleans Louis Armstrong (MSY)"
79
+ },
80
+ {
81
+ id: "hou",
82
+ label: "Houston William P. Hobby (HOU)"
83
+ },
84
+ {
85
+ id: "iah",
86
+ label: "Houston George Bush Intercontinental (IAH)"
87
+ },
88
+ {
89
+ id: "dfw",
90
+ label: "Dallas/Fort Worth International (DFW)"
91
+ },
92
+ {
93
+ id: "sat",
94
+ label: "San Antonio International (SAT)"
95
+ },
96
+ {
97
+ id: "mci",
98
+ label: "Kansas City International (MCI)"
99
+ },
100
+ {
101
+ id: "stl",
102
+ label: "St. Louis Lambert International (STL)"
103
+ },
104
+ {
105
+ id: "ind",
106
+ label: "Indianapolis International (IND)"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ title: "West Coast & Mountain",
112
+ options: [
113
+ {
114
+ id: "sfo",
115
+ label: "San Francisco International (SFO)"
116
+ },
117
+ {
118
+ id: "sea",
119
+ label: "Seattle-Tacoma International (SEA)"
120
+ },
121
+ {
122
+ id: "pdx",
123
+ label: "Portland International (PDX)"
124
+ },
125
+ {
126
+ id: "las",
127
+ label: "Las Vegas Harry Reid International (LAS)"
128
+ },
129
+ {
130
+ id: "phx",
131
+ label: "Phoenix Sky Harbor International (PHX)"
132
+ },
133
+ {
134
+ id: "den",
135
+ label: "Denver International (DEN)"
136
+ },
137
+ {
138
+ id: "slc",
139
+ label: "Salt Lake City International (SLC)"
140
+ },
141
+ {
142
+ id: "abq",
143
+ label: "Albuquerque International Sunport (ABQ)"
144
+ }
145
+ ]
146
+ }
147
+ ];
148
+ //#endregion
149
+ export { e as transportLabels, t as transportSections };
150
+
151
+ //# sourceMappingURL=criteria-transports-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"criteria-transports-data.js","names":[],"sources":["../../lib/examples/criteria-transports-data.ts"],"sourcesContent":["import type { TransportSection } from '@/ui/criteria/CriteriaTransports';\n\nexport const transportLabels = {\n addTransportationFrom: 'Add transportation from',\n reset: 'Reset',\n apply: 'Continue',\n};\n\nexport const transportSections: TransportSection[] = [\n {\n title: 'Top cities',\n options: [\n { id: 'bos', label: 'Boston Logan International (BOS)' },\n { id: 'nyc', label: 'New York all airports (NYC)' },\n { id: 'mia', label: 'Miami International (MIA)' },\n { id: 'lax', label: 'Los Angeles International (LAX)' },\n { id: 'ord', label: \"Chicago O'Hare International (ORD)\" },\n { id: 'atl', label: 'Atlanta Hartsfield-Jackson (ATL)' },\n ],\n },\n {\n title: 'East Coast',\n options: [\n { id: 'jfk', label: 'New York John F. Kennedy (JFK)' },\n { id: 'ewr', label: 'Newark Liberty International (EWR)' },\n { id: 'phl', label: 'Philadelphia International (PHL)' },\n { id: 'dca', label: 'Washington Reagan National (DCA)' },\n { id: 'iad', label: 'Washington Dulles International (IAD)' },\n { id: 'bwi', label: 'Baltimore/Washington International (BWI)' },\n { id: 'rdu', label: 'Raleigh-Durham International (RDU)' },\n { id: 'clt', label: 'Charlotte Douglas International (CLT)' },\n ],\n },\n {\n title: 'South & Midwest',\n options: [\n { id: 'msy', label: 'New Orleans Louis Armstrong (MSY)' },\n { id: 'hou', label: 'Houston William P. Hobby (HOU)' },\n { id: 'iah', label: 'Houston George Bush Intercontinental (IAH)' },\n { id: 'dfw', label: 'Dallas/Fort Worth International (DFW)' },\n { id: 'sat', label: 'San Antonio International (SAT)' },\n { id: 'mci', label: 'Kansas City International (MCI)' },\n { id: 'stl', label: 'St. Louis Lambert International (STL)' },\n { id: 'ind', label: 'Indianapolis International (IND)' },\n ],\n },\n {\n title: 'West Coast & Mountain',\n options: [\n { id: 'sfo', label: 'San Francisco International (SFO)' },\n { id: 'sea', label: 'Seattle-Tacoma International (SEA)' },\n { id: 'pdx', label: 'Portland International (PDX)' },\n { id: 'las', label: 'Las Vegas Harry Reid International (LAS)' },\n { id: 'phx', label: 'Phoenix Sky Harbor International (PHX)' },\n { id: 'den', label: 'Denver International (DEN)' },\n { id: 'slc', label: 'Salt Lake City International (SLC)' },\n { id: 'abq', label: 'Albuquerque International Sunport (ABQ)' },\n ],\n },\n];\n"],"mappings":";AAEA,IAAa,IAAkB;CAC7B,uBAAuB;CACvB,OAAO;CACP,OAAO;CACR,EAEY,IAAwC;CACnD;EACE,OAAO;EACP,SAAS;GACP;IAAE,IAAI;IAAO,OAAO;IAAoC;GACxD;IAAE,IAAI;IAAO,OAAO;IAA+B;GACnD;IAAE,IAAI;IAAO,OAAO;IAA6B;GACjD;IAAE,IAAI;IAAO,OAAO;IAAmC;GACvD;IAAE,IAAI;IAAO,OAAO;IAAsC;GAC1D;IAAE,IAAI;IAAO,OAAO;IAAoC;GACzD;EACF;CACD;EACE,OAAO;EACP,SAAS;GACP;IAAE,IAAI;IAAO,OAAO;IAAkC;GACtD;IAAE,IAAI;IAAO,OAAO;IAAsC;GAC1D;IAAE,IAAI;IAAO,OAAO;IAAoC;GACxD;IAAE,IAAI;IAAO,OAAO;IAAoC;GACxD;IAAE,IAAI;IAAO,OAAO;IAAyC;GAC7D;IAAE,IAAI;IAAO,OAAO;IAA4C;GAChE;IAAE,IAAI;IAAO,OAAO;IAAsC;GAC1D;IAAE,IAAI;IAAO,OAAO;IAAyC;GAC9D;EACF;CACD;EACE,OAAO;EACP,SAAS;GACP;IAAE,IAAI;IAAO,OAAO;IAAqC;GACzD;IAAE,IAAI;IAAO,OAAO;IAAkC;GACtD;IAAE,IAAI;IAAO,OAAO;IAA8C;GAClE;IAAE,IAAI;IAAO,OAAO;IAAyC;GAC7D;IAAE,IAAI;IAAO,OAAO;IAAmC;GACvD;IAAE,IAAI;IAAO,OAAO;IAAmC;GACvD;IAAE,IAAI;IAAO,OAAO;IAAyC;GAC7D;IAAE,IAAI;IAAO,OAAO;IAAoC;GACzD;EACF;CACD;EACE,OAAO;EACP,SAAS;GACP;IAAE,IAAI;IAAO,OAAO;IAAqC;GACzD;IAAE,IAAI;IAAO,OAAO;IAAsC;GAC1D;IAAE,IAAI;IAAO,OAAO;IAAgC;GACpD;IAAE,IAAI;IAAO,OAAO;IAA4C;GAChE;IAAE,IAAI;IAAO,OAAO;IAA0C;GAC9D;IAAE,IAAI;IAAO,OAAO;IAA8B;GAClD;IAAE,IAAI;IAAO,OAAO;IAAsC;GAC1D;IAAE,IAAI;IAAO,OAAO;IAA2C;GAChE;EACF;CACF"}
@@ -0,0 +1 @@
1
+ export default function CriteriaTransportsDemo(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { CriteriaTransports as e } from "../ui/criteria/CriteriaTransports.js";
3
+ import { transportLabels as t, transportSections as n } from "./criteria-transports-data.js";
4
+ import { useState as r } from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ //#region lib/examples/criteria-transports-demo.tsx
7
+ function o() {
8
+ let [o, s] = r(!1), [c, l] = r(null), u = (e) => {
9
+ e.type === "enabled" && s(e.payload), e.type === "select" && l(e.payload);
10
+ }, d = n.flatMap((e) => e.options);
11
+ return /* @__PURE__ */ a("div", {
12
+ className: "w-[380px] h-600 space-y-24",
13
+ children: [/* @__PURE__ */ i(e, {
14
+ mode: "b2c",
15
+ labels: t,
16
+ title: "Transport",
17
+ enabled: o,
18
+ sections: n,
19
+ selectedId: c,
20
+ onChange: u,
21
+ onReset: () => {
22
+ s(!1), l(null);
23
+ },
24
+ onApply: () => {}
25
+ }), c && /* @__PURE__ */ a("p", {
26
+ className: "text-b4",
27
+ children: ["Selected: ", d.find((e) => e.id === c)?.label]
28
+ })]
29
+ });
30
+ }
31
+ //#endregion
32
+ export { o as default };
33
+
34
+ //# sourceMappingURL=criteria-transports-demo.js.map
@@ -0,0 +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 { CriteriaTransportsAction } from '@/ui/criteria/CriteriaTransports';\nimport { transportLabels, transportSections } from './criteria-transports-data';\n\nexport default function CriteriaTransportsDemo() {\n const [enabled, setEnabled] = useState(false);\n const [selectedId, setSelectedId] = useState<string | null>(null);\n\n const handleChange = (action: CriteriaTransportsAction) => {\n if (action.type === 'enabled') setEnabled(action.payload);\n if (action.type === 'select') setSelectedId(action.payload);\n };\n\n const allOptions = transportSections.flatMap((s) => s.options);\n\n return (\n <div className=\"w-[380px] h-600 space-y-24\">\n <CriteriaTransports\n mode=\"b2c\"\n labels={transportLabels}\n title=\"Transport\"\n enabled={enabled}\n sections={transportSections}\n selectedId={selectedId}\n onChange={handleChange}\n onReset={() => {\n setEnabled(false);\n setSelectedId(null);\n }}\n onApply={() => {}}\n />\n {selectedId && (\n <p className=\"text-b4\">Selected: {allOptions.find((o) => o.id === selectedId)?.label}</p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AAOA,SAAwB,IAAyB;CAC/C,IAAM,CAAC,GAAS,KAAc,EAAS,GAAM,EACvC,CAAC,GAAY,KAAiB,EAAwB,KAAK,EAE3D,KAAgB,MAAqC;AAEzD,EADI,EAAO,SAAS,aAAW,EAAW,EAAO,QAAQ,EACrD,EAAO,SAAS,YAAU,EAAc,EAAO,QAAQ;IAGvD,IAAa,EAAkB,SAAS,MAAM,EAAE,QAAQ;AAE9D,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GACE,MAAK;GACL,QAAQ;GACR,OAAM;GACG;GACT,UAAU;GACE;GACZ,UAAU;GACV,eAAe;AAEb,IADA,EAAW,GAAM,EACjB,EAAc,KAAK;;GAErB,eAAe;GACf,CAAA,EACD,KACC,kBAAC,KAAD;GAAG,WAAU;aAAb,CAAuB,cAAW,EAAW,MAAM,MAAM,EAAE,OAAO,EAAW,EAAE,MAAA"}
@@ -0,0 +1 @@
1
+ export default function CriteriaTransportsErrorDemo(): import("react/jsx-runtime").JSX.Element;