@clubmed/trident-ui 2.0.0-beta.4 → 2.0.0-beta.40
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/chunks/Carousel.context.js +1548 -0
- package/chunks/Carousel.context.js.map +1 -0
- package/chunks/ChatMessage.js +14395 -0
- package/chunks/ChatMessage.js.map +1 -0
- package/chunks/DateField.js +177 -63
- package/chunks/DateField.js.map +1 -1
- package/chunks/Tooltip.js +4461 -0
- package/chunks/Tooltip.js.map +1 -0
- package/chunks/chunk.js +11 -4
- package/chunks/client.js +18953 -0
- package/chunks/client.js.map +1 -0
- package/examples/button-demo.js +2 -2
- package/examples/button-demo.js.map +1 -1
- package/examples/chat-input-demo.d.ts +1 -0
- package/examples/chat-input-demo.js +21 -0
- package/examples/chat-input-demo.js.map +1 -0
- package/examples/chat-message-demo.d.ts +1 -0
- package/examples/chat-message-demo.js +20 -0
- package/examples/chat-message-demo.js.map +1 -0
- package/examples/chat-typing-indicator-demo.d.ts +1 -0
- package/examples/chat-typing-indicator-demo.js +14 -0
- package/examples/chat-typing-indicator-demo.js.map +1 -0
- package/examples/chat-window-demo.d.ts +1 -0
- package/examples/chat-window-demo.js +45 -0
- package/examples/chat-window-demo.js.map +1 -0
- package/examples/checkbox-demo.js +16 -20
- package/examples/checkbox-demo.js.map +1 -1
- package/examples/checkbox-select-demo.d.ts +1 -0
- package/examples/checkbox-select-demo.js +101 -0
- package/examples/checkbox-select-demo.js.map +1 -0
- package/examples/checkboxes-demo.js +6 -6
- package/examples/checkboxes-demo.js.map +1 -1
- package/examples/checkboxes-with-form-control-demo.js +4 -4
- package/examples/choice-expander-demo.js +4 -67
- package/examples/choice-expander-demo.js.map +1 -1
- package/examples/dropdown-demo.js +9 -1
- package/examples/dropdown-demo.js.map +1 -1
- package/examples/elastic-height-demo.js +2 -1
- package/examples/elastic-height-demo.js.map +1 -1
- package/examples/frame-demo.d.ts +1 -0
- package/examples/frame-demo.js +36 -0
- package/examples/frame-demo.js.map +1 -0
- package/examples/frame-horizontal-demo.d.ts +1 -0
- package/examples/frame-horizontal-demo.js +44 -0
- package/examples/frame-horizontal-demo.js.map +1 -0
- package/examples/frame-no-image-demo.d.ts +1 -0
- package/examples/frame-no-image-demo.js +47 -0
- package/examples/frame-no-image-demo.js.map +1 -0
- package/examples/frame-vertical-demo.d.ts +1 -0
- package/examples/frame-vertical-demo.js +44 -0
- package/examples/frame-vertical-demo.js.map +1 -0
- package/examples/frame-with-tag-demo.d.ts +1 -0
- package/examples/frame-with-tag-demo.js +48 -0
- package/examples/frame-with-tag-demo.js.map +1 -0
- package/examples/scrollbar-demo.d.ts +1 -0
- package/examples/scrollbar-demo.js +40 -0
- package/examples/scrollbar-demo.js.map +1 -0
- package/examples/slider-frame-demo.d.ts +1 -0
- package/examples/slider-frame-demo.js +38 -0
- package/examples/slider-frame-demo.js.map +1 -0
- package/examples/slider-frame-with-button-demo.d.ts +1 -0
- package/examples/slider-frame-with-button-demo.js +46 -0
- package/examples/slider-frame-with-button-demo.js.map +1 -0
- package/examples/slider-frame-with-tag-demo.d.ts +1 -0
- package/examples/slider-frame-with-tag-demo.js +50 -0
- package/examples/slider-frame-with-tag-demo.js.map +1 -0
- package/examples/switch-demo.js +1 -1
- package/examples/switch-demo.js.map +1 -1
- package/examples/tooltip-demo.d.ts +1 -0
- package/examples/tooltip-demo.js +103 -0
- package/examples/tooltip-demo.js.map +1 -0
- package/package.json +10 -3
- package/styles/animate.css +19 -19
- package/styles/components.css +82 -0
- package/styles/theme.css +23 -18
- package/styles/ui/button.css +19 -25
- package/styles/ui/chat-button.css +68 -1
- package/styles/ui/controls.css +9 -63
- package/styles/ui/range.css +1 -1
- package/styles/variants.css +0 -2
- package/ui/AdvancedToast.js +11 -11
- package/ui/AdvancedToast.js.map +1 -1
- package/ui/BasicToast.js +1 -1
- package/ui/BasicToast.js.map +1 -1
- package/ui/Breadcrumb.d.ts +2 -2
- package/ui/Breadcrumb.js +31 -35
- package/ui/Breadcrumb.js.map +1 -1
- package/ui/ChatButton.js +1 -1
- package/ui/ChatButton.js.map +1 -1
- package/ui/ChatInput.d.ts +10 -0
- package/ui/ChatInput.js +149 -0
- package/ui/ChatInput.js.map +1 -0
- package/ui/ChatMessage.d.ts +6 -0
- package/ui/ChatMessage.js +2 -0
- package/ui/ChatTypingIndicator.d.ts +2 -0
- package/ui/ChatTypingIndicator.js +30 -0
- package/ui/ChatTypingIndicator.js.map +1 -0
- package/ui/ChatWindow.d.ts +21 -0
- package/ui/ChatWindow.js +108 -0
- package/ui/ChatWindow.js.map +1 -0
- package/ui/ChoiceExpander.js +1 -1
- package/ui/ChoiceExpander.js.map +1 -1
- package/ui/Dropdown.d.ts +20 -3
- package/ui/Dropdown.js +57 -23
- package/ui/Dropdown.js.map +1 -1
- package/ui/ElasticHeight.d.ts +0 -1
- package/ui/ElasticHeight.js +14 -23
- package/ui/ElasticHeight.js.map +1 -1
- package/ui/Loader.d.ts +5 -4
- package/ui/Loader.js +11 -10
- package/ui/Loader.js.map +1 -1
- package/ui/Popin.js +2 -2
- package/ui/Popin.js.map +1 -1
- package/ui/Scrollbar.d.ts +14 -0
- package/ui/Scrollbar.js +68 -0
- package/ui/Scrollbar.js.map +1 -0
- package/ui/SidebarLayout.d.ts +3 -1
- package/ui/SidebarLayout.js +32 -24
- package/ui/SidebarLayout.js.map +1 -1
- package/ui/Tooltip.d.ts +8 -0
- package/ui/Tooltip.js +2 -0
- package/ui/arrows/Arrows.d.ts +1 -0
- package/ui/arrows/Arrows.js +19 -17
- package/ui/arrows/Arrows.js.map +1 -1
- package/ui/buttons/Button.type.d.ts +1 -1
- package/ui/buttons/Button.type.js.map +1 -1
- package/ui/carousel/Carousel.context.d.ts +27 -0
- package/ui/carousel/Carousel.context.js +2 -0
- package/ui/carousel/Carousel.d.ts +3 -0
- package/ui/carousel/Carousel.js +12 -0
- package/ui/carousel/Carousel.js.map +1 -0
- package/ui/carousel/CarouselBody.d.ts +6 -0
- package/ui/carousel/CarouselBody.js +21 -0
- package/ui/carousel/CarouselBody.js.map +1 -0
- package/ui/carousel/CarouselItem.d.ts +6 -0
- package/ui/carousel/CarouselItem.js +21 -0
- package/ui/carousel/CarouselItem.js.map +1 -0
- package/ui/carousel/CarouselNext.d.ts +8 -0
- package/ui/carousel/CarouselNext.js +23 -0
- package/ui/carousel/CarouselNext.js.map +1 -0
- package/ui/carousel/CarouselPrevious.d.ts +8 -0
- package/ui/carousel/CarouselPrevious.js +23 -0
- package/ui/carousel/CarouselPrevious.js.map +1 -0
- package/ui/contexts/TridentUIConfig.js +1 -1
- package/ui/forms/CheckboxSelect.d.ts +31 -0
- package/ui/forms/CheckboxSelect.js +119 -0
- package/ui/forms/CheckboxSelect.js.map +1 -0
- package/ui/forms/Filter.d.ts +8 -4
- package/ui/forms/Filter.js +23 -45
- package/ui/forms/Filter.js.map +1 -1
- package/ui/forms/FormControl.js +6 -6
- package/ui/forms/NumberField.d.ts +10 -10
- package/ui/forms/NumberField.js +8 -8
- package/ui/forms/PhoneField.d.ts +5 -10
- package/ui/forms/PhoneField.js +29 -211
- package/ui/forms/PhoneField.js.map +1 -1
- package/ui/forms/PhoneFieldFullInput.d.ts +16 -0
- package/ui/forms/PhoneFieldFullInput.js +116 -0
- package/ui/forms/PhoneFieldFullInput.js.map +1 -0
- package/ui/forms/PhoneFieldSplitInput.d.ts +19 -0
- package/ui/forms/PhoneFieldSplitInput.js +159 -0
- package/ui/forms/PhoneFieldSplitInput.js.map +1 -0
- package/ui/forms/Select.js +4 -4
- package/ui/forms/Switch.d.ts +3 -3
- package/ui/forms/Switch.js +51 -34
- package/ui/forms/Switch.js.map +1 -1
- package/ui/forms/TextField.js +4 -4
- package/ui/forms/TextField.js.map +1 -1
- package/ui/forms/checkboxes/Checkbox.d.ts +10 -12
- package/ui/forms/checkboxes/Checkbox.js +38 -55
- package/ui/forms/checkboxes/Checkbox.js.map +1 -1
- package/ui/forms/checkboxes/Checkboxes.js +2 -2
- package/ui/forms/checkboxes/Checkboxes.js.map +1 -1
- package/ui/forms/password/Password.js +4 -4
- package/ui/frame/Frame.d.ts +8 -0
- package/ui/frame/Frame.js +16 -0
- package/ui/frame/Frame.js.map +1 -0
- package/ui/frame/FrameLabelsWrapper.d.ts +5 -0
- package/ui/frame/FrameLabelsWrapper.js +12 -0
- package/ui/frame/FrameLabelsWrapper.js.map +1 -0
- package/ui/frame/FrameTitle.d.ts +7 -0
- package/ui/frame/FrameTitle.js +25 -0
- package/ui/frame/FrameTitle.js.map +1 -0
- package/ui/frame/FrameWrapper.d.ts +6 -0
- package/ui/frame/FrameWrapper.js +14 -0
- package/ui/frame/FrameWrapper.js.map +1 -0
- package/ui/frame/SliderFrame.d.ts +14 -0
- package/ui/frame/SliderFrame.js +50 -0
- package/ui/frame/SliderFrame.js.map +1 -0
- package/ui/helpers/colors/colors.d.ts +4 -0
- package/ui/helpers/colors/colors.js +6 -1
- package/ui/helpers/colors/colors.js.map +1 -1
- package/ui/helpers/phone/defaultPrefixes.js +28 -28
- package/ui/helpers/phone/defaultPrefixes.js.map +1 -1
- package/ui/helpers/phone/formatters.d.ts +11 -0
- package/ui/helpers/phone/formatters.js +32 -1
- package/ui/helpers/phone/formatters.js.map +1 -1
- package/ui/helpers/phone/index.d.ts +1 -1
- package/ui/helpers/phone/index.js +3 -3
- package/ui/hooks/useValue.js +1 -1
- package/ui/hooks/useValue.js.map +1 -1
- package/ui/tabs/Tabs.js +1 -1
- package/ui/tabs/Tabs.js.map +1 -1
- package/ui/Breadcrumb.themes.d.ts +0 -8
- package/ui/Breadcrumb.themes.js +0 -16
- package/ui/Breadcrumb.themes.js.map +0 -1
package/examples/button-demo.js
CHANGED
|
@@ -14,7 +14,7 @@ function r() {
|
|
|
14
14
|
"Secondary",
|
|
15
15
|
/* @__PURE__ */ t(e, {
|
|
16
16
|
color: "saffron",
|
|
17
|
-
size: "
|
|
17
|
+
size: "secondary",
|
|
18
18
|
theme: "solid",
|
|
19
19
|
variant: "pill",
|
|
20
20
|
children: "Click me"
|
|
@@ -22,7 +22,7 @@ function r() {
|
|
|
22
22
|
"Tertiary",
|
|
23
23
|
/* @__PURE__ */ t(e, {
|
|
24
24
|
color: "saffron",
|
|
25
|
-
size: "
|
|
25
|
+
size: "tertiary",
|
|
26
26
|
theme: "solid",
|
|
27
27
|
variant: "pill",
|
|
28
28
|
children: "Click me"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button-demo.js","names":[],"sources":["../../lib/examples/button-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Button } from '@/ui/buttons/Button';\n\nexport default function ButtonDemo() {\n return (\n <div>\n Primary\n <Button color=\"saffron\" theme=\"solid\" variant=\"pill\">\n Click me\n </Button>\n Secondary\n <Button color=\"saffron\" size=\"
|
|
1
|
+
{"version":3,"file":"button-demo.js","names":[],"sources":["../../lib/examples/button-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Button } from '@/ui/buttons/Button';\n\nexport default function ButtonDemo() {\n return (\n <div>\n Primary\n <Button color=\"saffron\" theme=\"solid\" variant=\"pill\">\n Click me\n </Button>\n Secondary\n <Button color=\"saffron\" size=\"secondary\" theme=\"solid\" variant=\"pill\">\n Click me\n </Button>\n Tertiary\n <Button color=\"saffron\" size=\"tertiary\" theme=\"solid\" variant=\"pill\">\n Click me\n </Button>\n </div>\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAAa;AACnC,QACE,kBAAC,OAAD,EAAA,UAAA;EAAK;EAEH,kBAAC,GAAD;GAAQ,OAAM;GAAU,OAAM;GAAQ,SAAQ;aAAO;GAE5C,CAAA;;EAET,kBAAC,GAAD;GAAQ,OAAM;GAAU,MAAK;GAAY,OAAM;GAAQ,SAAQ;aAAO;GAE7D,CAAA;;EAET,kBAAC,GAAD;GAAQ,OAAM;GAAU,MAAK;GAAW,OAAM;GAAQ,SAAQ;aAAO;GAE5D,CAAA;EACL,EAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatInputDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ChatInput as e } from "../ui/ChatInput.js";
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/examples/chat-input-demo.tsx
|
|
6
|
+
function r() {
|
|
7
|
+
let [r, i] = t("");
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: "w-[380px]",
|
|
10
|
+
children: /* @__PURE__ */ n(e, {
|
|
11
|
+
value: r,
|
|
12
|
+
onValueChange: i,
|
|
13
|
+
onSubmit: () => i(""),
|
|
14
|
+
onAudioClick: () => {}
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as default };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=chat-input-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-input-demo.js","names":[],"sources":["../../lib/examples/chat-input-demo.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { ChatInput } from '@/ui/ChatInput';\n\nexport default function ChatInputDemo() {\n const [value, setValue] = useState('');\n\n return (\n <div className=\"w-[380px]\">\n <ChatInput\n value={value}\n onValueChange={setValue}\n onSubmit={() => setValue('')}\n onAudioClick={() => {}}\n />\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,SAAwB,IAAgB;CACtC,IAAM,CAAC,GAAO,KAAY,EAAS,GAAG;AAEtC,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACS;GACP,eAAe;GACf,gBAAgB,EAAS,GAAG;GAC5B,oBAAoB;GACpB,CAAA;EACE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatMessageDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as e } from "../chunks/ChatMessage.js";
|
|
3
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/examples/chat-message-demo.tsx
|
|
5
|
+
function r() {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
className: "w-[380px] flex flex-col gap-4",
|
|
8
|
+
children: [/* @__PURE__ */ t(e, {
|
|
9
|
+
sender: "assistant",
|
|
10
|
+
children: "Hi. Ask me anything about Club Med. I'm here to help you find the right information quickly."
|
|
11
|
+
}), /* @__PURE__ */ t(e, {
|
|
12
|
+
sender: "user",
|
|
13
|
+
children: "My son is 14 years old, and I would like to find activities for him during our stay. What do you suggest?"
|
|
14
|
+
})]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as default };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=chat-message-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message-demo.js","names":[],"sources":["../../lib/examples/chat-message-demo.tsx"],"sourcesContent":["'use client';\n\nimport { ChatMessage } from '@/ui/ChatMessage';\n\nexport default function ChatMessageDemo() {\n return (\n <div className=\"w-[380px] flex flex-col gap-4\">\n <ChatMessage sender=\"assistant\">\n Hi. Ask me anything about Club Med. I'm here to help you find the right information\n quickly.\n </ChatMessage>\n <ChatMessage sender=\"user\">\n My son is 14 years old, and I would like to find activities for him during our stay. What do\n you suggest?\n </ChatMessage>\n </div>\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAAkB;AACxC,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GAAa,QAAO;aAAY;GAGlB,CAAA,EACd,kBAAC,GAAD;GAAa,QAAO;aAAO;GAGb,CAAA,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatTypingIndicatorDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ChatTypingIndicator as e } from "../ui/ChatTypingIndicator.js";
|
|
3
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
+
//#region lib/examples/chat-typing-indicator-demo.tsx
|
|
5
|
+
function n() {
|
|
6
|
+
return /* @__PURE__ */ t("div", {
|
|
7
|
+
className: "flex flex-col gap-4 p-8",
|
|
8
|
+
children: /* @__PURE__ */ t(e, {})
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as default };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=chat-typing-indicator-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-typing-indicator-demo.js","names":[],"sources":["../../lib/examples/chat-typing-indicator-demo.tsx"],"sourcesContent":["'use client';\n\nimport { ChatTypingIndicator } from '@/ui/ChatTypingIndicator';\n\nexport default function ChatTypingIndicatorDemo() {\n return (\n <div className=\"flex flex-col gap-4 p-8\">\n <ChatTypingIndicator />\n </div>\n );\n}\n"],"mappings":";;;;AAIA,SAAwB,IAA0B;AAChD,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAuB,CAAA;EACnB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ChatWindowDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { ChatWindow as e } from "../ui/ChatWindow.js";
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/examples/chat-window-demo.tsx
|
|
6
|
+
function r() {
|
|
7
|
+
let [r, i] = t([{
|
|
8
|
+
id: "1",
|
|
9
|
+
sender: "assistant",
|
|
10
|
+
content: "Hi. Ask me anything about Club Med. I'm here to help you find the right information quickly."
|
|
11
|
+
}, {
|
|
12
|
+
id: "2",
|
|
13
|
+
sender: "user",
|
|
14
|
+
content: "My son is 14 years old, and I would like to find activities for him during our stay."
|
|
15
|
+
}]), [a, o] = t(""), [s, c] = t(!1);
|
|
16
|
+
function l() {
|
|
17
|
+
if (!a.trim()) return;
|
|
18
|
+
let e = {
|
|
19
|
+
id: Date.now().toString(),
|
|
20
|
+
sender: "user",
|
|
21
|
+
content: a
|
|
22
|
+
};
|
|
23
|
+
i((t) => [...t, e]), o(""), c(!0), setTimeout(() => {
|
|
24
|
+
c(!1), i((e) => [...e, {
|
|
25
|
+
id: (Date.now() + 1).toString(),
|
|
26
|
+
sender: "assistant",
|
|
27
|
+
content: "Let me look into that for you…"
|
|
28
|
+
}]);
|
|
29
|
+
}, 2e3);
|
|
30
|
+
}
|
|
31
|
+
return /* @__PURE__ */ n(e, {
|
|
32
|
+
messages: r,
|
|
33
|
+
inputValue: a,
|
|
34
|
+
isTyping: s,
|
|
35
|
+
onInputChange: o,
|
|
36
|
+
onSubmit: l,
|
|
37
|
+
onClose: () => {},
|
|
38
|
+
onAudioClick: () => {},
|
|
39
|
+
className: "w-380 h-660"
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { r as default };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=chat-window-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-window-demo.js","names":[],"sources":["../../lib/examples/chat-window-demo.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { ChatWindow } from '@/ui/ChatWindow';\nimport type { ChatWindowMessage } from '@/ui/ChatWindow';\n\nexport default function ChatWindowDemo() {\n const [messages, setMessages] = useState<ChatWindowMessage[]>([\n {\n id: '1',\n sender: 'assistant',\n content:\n \"Hi. Ask me anything about Club Med. I'm here to help you find the right information quickly.\",\n },\n {\n id: '2',\n sender: 'user',\n content:\n 'My son is 14 years old, and I would like to find activities for him during our stay.',\n },\n ]);\n const [inputValue, setInputValue] = useState('');\n const [isTyping, setIsTyping] = useState(false);\n\n function handleSubmit() {\n if (!inputValue.trim()) return;\n const userMsg: ChatWindowMessage = {\n id: Date.now().toString(),\n sender: 'user',\n content: inputValue,\n };\n setMessages((prev) => [...prev, userMsg]);\n setInputValue('');\n setIsTyping(true);\n setTimeout(() => {\n setIsTyping(false);\n setMessages((prev) => [\n ...prev,\n {\n id: (Date.now() + 1).toString(),\n sender: 'assistant',\n content: 'Let me look into that for you…',\n },\n ]);\n }, 2000);\n }\n\n return (\n <ChatWindow\n messages={messages}\n inputValue={inputValue}\n isTyping={isTyping}\n onInputChange={setInputValue}\n onSubmit={handleSubmit}\n onClose={() => {}}\n onAudioClick={() => {}}\n className=\"w-380 h-660\"\n />\n );\n}\n"],"mappings":";;;;;AAMA,SAAwB,IAAiB;CACvC,IAAM,CAAC,GAAU,KAAe,EAA8B,CAC5D;EACE,IAAI;EACJ,QAAQ;EACR,SACE;EACH,EACD;EACE,IAAI;EACJ,QAAQ;EACR,SACE;EACH,CACF,CAAC,EACI,CAAC,GAAY,KAAiB,EAAS,GAAG,EAC1C,CAAC,GAAU,KAAe,EAAS,GAAM;CAE/C,SAAS,IAAe;AACtB,MAAI,CAAC,EAAW,MAAM,CAAE;EACxB,IAAM,IAA6B;GACjC,IAAI,KAAK,KAAK,CAAC,UAAU;GACzB,QAAQ;GACR,SAAS;GACV;AAID,EAHA,GAAa,MAAS,CAAC,GAAG,GAAM,EAAQ,CAAC,EACzC,EAAc,GAAG,EACjB,EAAY,GAAK,EACjB,iBAAiB;AAEf,GADA,EAAY,GAAM,EAClB,GAAa,MAAS,CACpB,GAAG,GACH;IACE,KAAK,KAAK,KAAK,GAAG,GAAG,UAAU;IAC/B,QAAQ;IACR,SAAS;IACV,CACF,CAAC;KACD,IAAK;;AAGV,QACE,kBAAC,GAAD;EACY;EACE;EACF;EACV,eAAe;EACf,UAAU;EACV,eAAe;EACf,oBAAoB;EACpB,WAAU;EACV,CAAA"}
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Checkbox as e } from "../ui/forms/checkboxes/Checkbox.js";
|
|
3
3
|
import { useState as t } from "react";
|
|
4
|
-
import { jsx as n
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/examples/checkbox-demo.tsx
|
|
6
|
-
function
|
|
7
|
-
let [
|
|
8
|
-
return /* @__PURE__ */
|
|
6
|
+
function r() {
|
|
7
|
+
let [r, i] = t(!1), [a, o] = t("This field is required");
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
9
|
className: "space-y-4",
|
|
10
|
-
children:
|
|
11
|
-
name: "
|
|
12
|
-
value: "
|
|
13
|
-
checked:
|
|
14
|
-
onChange: (e) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
validationStatus: "error",
|
|
22
|
-
errorMessage: "This is an error",
|
|
23
|
-
children: "Checkbox with error"
|
|
24
|
-
})]
|
|
10
|
+
children: /* @__PURE__ */ n(e, {
|
|
11
|
+
name: "terms",
|
|
12
|
+
value: "accepted",
|
|
13
|
+
checked: r,
|
|
14
|
+
onChange: (e) => {
|
|
15
|
+
i(e.target.checked), o(e.target.checked ? "" : "This field is required");
|
|
16
|
+
},
|
|
17
|
+
validationStatus: a ? "error" : "default",
|
|
18
|
+
errorMessage: a,
|
|
19
|
+
children: "I agree to the terms and conditions"
|
|
20
|
+
})
|
|
25
21
|
});
|
|
26
22
|
}
|
|
27
23
|
//#endregion
|
|
28
|
-
export {
|
|
24
|
+
export { r as default };
|
|
29
25
|
|
|
30
26
|
//# sourceMappingURL=checkbox-demo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox-demo.js","names":[],"sources":["../../lib/examples/checkbox-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkbox } from '@/ui/forms/checkboxes/Checkbox';\nimport { useState } from 'react';\n\nexport default function CheckboxDemo() {\n const [
|
|
1
|
+
{"version":3,"file":"checkbox-demo.js","names":[],"sources":["../../lib/examples/checkbox-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkbox } from '@/ui/forms/checkboxes/Checkbox';\nimport { useState } from 'react';\n\nexport default function CheckboxDemo() {\n const [checked, setChecked] = useState(false);\n const [error, setError] = useState('This field is required');\n\n return (\n <div className=\"space-y-4\">\n <Checkbox\n name=\"terms\"\n value=\"accepted\"\n checked={checked}\n onChange={(e) => {\n setChecked(e.target.checked);\n setError(e.target.checked ? '' : 'This field is required');\n }}\n validationStatus={error ? 'error' : 'default'}\n errorMessage={error}\n >\n I agree to the terms and conditions\n </Checkbox>\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,SAAwB,IAAe;CACrC,IAAM,CAAC,GAAS,KAAc,EAAS,GAAM,EACvC,CAAC,GAAO,KAAY,EAAS,yBAAyB;AAE5D,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD;GACE,MAAK;GACL,OAAM;GACG;GACT,WAAW,MAAM;AAEf,IADA,EAAW,EAAE,OAAO,QAAQ,EAC5B,EAAS,EAAE,OAAO,UAAU,KAAK,yBAAyB;;GAE5D,kBAAkB,IAAQ,UAAU;GACpC,cAAc;aACf;GAEU,CAAA;EACP,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CheckboxSelectDemo(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CheckboxSelect as e } from "../ui/forms/CheckboxSelect.js";
|
|
3
|
+
import { useState as t } from "react";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region lib/examples/checkbox-select-demo.tsx
|
|
6
|
+
var i = [
|
|
7
|
+
{
|
|
8
|
+
value: "open",
|
|
9
|
+
label: "Open"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
value: "fixed",
|
|
13
|
+
label: "Fixed"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
value: "in-progress",
|
|
17
|
+
label: "In Progress"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
value: "closed",
|
|
21
|
+
label: "Closed"
|
|
22
|
+
}
|
|
23
|
+
];
|
|
24
|
+
function a() {
|
|
25
|
+
let [a, o] = t(["open"]), [s, c] = t([]);
|
|
26
|
+
return /* @__PURE__ */ r("div", {
|
|
27
|
+
className: "space-y-24",
|
|
28
|
+
style: { minWidth: 300 },
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ n(e, {
|
|
31
|
+
label: "Status",
|
|
32
|
+
placeholder: "Select statuses...",
|
|
33
|
+
options: i,
|
|
34
|
+
value: a,
|
|
35
|
+
onChange: (e, t) => o(t)
|
|
36
|
+
}),
|
|
37
|
+
/* @__PURE__ */ n(e, {
|
|
38
|
+
label: "Category",
|
|
39
|
+
placeholder: "Select categories...",
|
|
40
|
+
groups: [{
|
|
41
|
+
label: "Travel",
|
|
42
|
+
options: [{
|
|
43
|
+
value: "flight",
|
|
44
|
+
label: "Flight"
|
|
45
|
+
}, {
|
|
46
|
+
value: "hotel",
|
|
47
|
+
label: "Hotel"
|
|
48
|
+
}]
|
|
49
|
+
}, {
|
|
50
|
+
label: "Activities",
|
|
51
|
+
options: [
|
|
52
|
+
{
|
|
53
|
+
value: "ski",
|
|
54
|
+
label: "Ski"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
value: "golf",
|
|
58
|
+
label: "Golf"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
value: "spa",
|
|
62
|
+
label: "Spa"
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}],
|
|
66
|
+
value: s,
|
|
67
|
+
onChange: (e, t) => c(t),
|
|
68
|
+
renderValue: (e) => `${e.length} selected`
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ n(e, {
|
|
71
|
+
label: "Priority",
|
|
72
|
+
options: [
|
|
73
|
+
{
|
|
74
|
+
value: "high",
|
|
75
|
+
label: "High"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
value: "medium",
|
|
79
|
+
label: "Medium"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
value: "low",
|
|
83
|
+
label: "Low"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
validationStatus: "error",
|
|
87
|
+
errorMessage: "Please select at least one priority"
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ n(e, {
|
|
90
|
+
label: "Tags",
|
|
91
|
+
options: i,
|
|
92
|
+
value: ["open"],
|
|
93
|
+
disabled: !0
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
//#endregion
|
|
99
|
+
export { a as default };
|
|
100
|
+
|
|
101
|
+
//# sourceMappingURL=checkbox-select-demo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox-select-demo.js","names":[],"sources":["../../lib/examples/checkbox-select-demo.tsx"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { CheckboxSelect } from '@/ui/forms/CheckboxSelect';\n\nconst statusOptions = [\n { value: 'open', label: 'Open' },\n { value: 'fixed', label: 'Fixed' },\n { value: 'in-progress', label: 'In Progress' },\n { value: 'closed', label: 'Closed' },\n];\n\nexport default function CheckboxSelectDemo() {\n const [status, setStatus] = useState<string[]>(['open']);\n const [categories, setCategories] = useState<string[]>([]);\n\n return (\n <div className=\"space-y-24\" style={{ minWidth: 300 }}>\n <CheckboxSelect\n label=\"Status\"\n placeholder=\"Select statuses...\"\n options={statusOptions}\n value={status}\n onChange={(_, v) => setStatus(v)}\n />\n\n <CheckboxSelect\n label=\"Category\"\n placeholder=\"Select categories...\"\n groups={[\n {\n label: 'Travel',\n options: [\n { value: 'flight', label: 'Flight' },\n { value: 'hotel', label: 'Hotel' },\n ],\n },\n {\n label: 'Activities',\n options: [\n { value: 'ski', label: 'Ski' },\n { value: 'golf', label: 'Golf' },\n { value: 'spa', label: 'Spa' },\n ],\n },\n ]}\n value={categories}\n onChange={(_, v) => setCategories(v)}\n renderValue={(vals) => `${vals.length} selected`}\n />\n\n <CheckboxSelect\n label=\"Priority\"\n options={[\n { value: 'high', label: 'High' },\n { value: 'medium', label: 'Medium' },\n { value: 'low', label: 'Low' },\n ]}\n validationStatus=\"error\"\n errorMessage=\"Please select at least one priority\"\n />\n\n <CheckboxSelect label=\"Tags\" options={statusOptions} value={['open']} disabled />\n </div>\n );\n}\n"],"mappings":";;;;;AAKA,IAAM,IAAgB;CACpB;EAAE,OAAO;EAAQ,OAAO;EAAQ;CAChC;EAAE,OAAO;EAAS,OAAO;EAAS;CAClC;EAAE,OAAO;EAAe,OAAO;EAAe;CAC9C;EAAE,OAAO;EAAU,OAAO;;CAC3B;AAED,SAAwB,IAAqB;CAC3C,IAAM,CAAC,GAAQ,KAAa,EAAmB,CAAC,OAAO,CAAC,EAClD,CAAC,GAAY,KAAiB,EAAmB,EAAE,CAAC;AAE1D,QACE,kBAAC,OAAD;EAAK,WAAU;EAAa,OAAO,EAAE,UAAU,KAAK;YAApD;GACE,kBAAC,GAAD;IACE,OAAM;IACN,aAAY;IACZ,SAAS;IACT,OAAO;IACP,WAAW,GAAG,MAAM,EAAU,EAAA;IAC9B,CAAA;GAEF,kBAAC,GAAD;IACE,OAAM;IACN,aAAY;IACZ,QAAQ,CACN;KACE,OAAO;KACP,SAAS,CACP;MAAE,OAAO;MAAU,OAAO;MAAU,EACpC;MAAE,OAAO;MAAS,OAAO;MAAS,CAAA;KAErC,EACD;KACE,OAAO;KACP,SAAS;MACP;OAAE,OAAO;OAAO,OAAO;OAAO;MAC9B;OAAE,OAAO;OAAQ,OAAO;OAAQ;MAChC;OAAE,OAAO;OAAO,OAAO;;;KAE1B,CACF;IACD,OAAO;IACP,WAAW,GAAG,MAAM,EAAc,EAAE;IACpC,cAAc,MAAS,GAAG,EAAK,OAAO;IACtC,CAAA;GAEF,kBAAC,GAAD;IACE,OAAM;IACN,SAAS;KACP;MAAE,OAAO;MAAQ,OAAO;MAAQ;KAChC;MAAE,OAAO;MAAU,OAAO;MAAU;KACpC;MAAE,OAAO;MAAO,OAAO;;KACxB;IACD,kBAAiB;IACjB,cAAa;IACb,CAAA;GAEF,kBAAC,GAAD;IAAgB,OAAM;IAAO,SAAS;IAAe,OAAO,CAAC,OAAO;IAAE,UAAA;IAAW,CAAA"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Checkboxes as e } from "../ui/forms/checkboxes/Checkboxes.js";
|
|
3
|
+
import { Filter as t } from "../ui/forms/Filter.js";
|
|
4
4
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
5
|
//#region lib/examples/checkboxes-demo.tsx
|
|
6
6
|
function i() {
|
|
7
|
-
return /* @__PURE__ */ r(
|
|
7
|
+
return /* @__PURE__ */ r(e, {
|
|
8
8
|
name: "options",
|
|
9
9
|
children: [
|
|
10
|
-
/* @__PURE__ */ n(
|
|
10
|
+
/* @__PURE__ */ n(t, {
|
|
11
11
|
value: "option1",
|
|
12
12
|
children: "Option 1"
|
|
13
13
|
}),
|
|
14
|
-
/* @__PURE__ */ n(
|
|
14
|
+
/* @__PURE__ */ n(t, {
|
|
15
15
|
value: "option2",
|
|
16
16
|
children: "Option 2"
|
|
17
17
|
}),
|
|
18
|
-
/* @__PURE__ */ n(
|
|
18
|
+
/* @__PURE__ */ n(t, {
|
|
19
19
|
value: "option3",
|
|
20
20
|
children: "Option 3"
|
|
21
21
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkboxes-demo.js","names":[],"sources":["../../lib/examples/checkboxes-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkboxes } from '@/ui/forms/checkboxes/Checkboxes';\nimport {
|
|
1
|
+
{"version":3,"file":"checkboxes-demo.js","names":[],"sources":["../../lib/examples/checkboxes-demo.tsx"],"sourcesContent":["'use client';\n\nimport { Checkboxes } from '@/ui/forms/checkboxes/Checkboxes';\nimport { Filter } from '@/ui/forms/Filter';\n\nexport default function CheckboxesDemo() {\n return (\n <Checkboxes name=\"options\">\n <Filter value=\"option1\">Option 1</Filter>\n <Filter value=\"option2\">Option 2</Filter>\n <Filter value=\"option3\">Option 3</Filter>\n </Checkboxes>\n );\n}\n"],"mappings":";;;;;AAKA,SAAwB,IAAiB;AACvC,QACE,kBAAC,GAAD;EAAY,MAAK;YAAjB;GACE,kBAAC,GAAD;IAAQ,OAAM;cAAU;IAAiB,CAAA;GACzC,kBAAC,GAAD;IAAQ,OAAM;cAAU;IAAiB,CAAA;GACzC,kBAAC,GAAD;IAAQ,OAAM;cAAU;IAAiB,CAAA"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Checkbox as e } from "../ui/forms/checkboxes/Checkbox.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { FormControl as t } from "../ui/forms/FormControl.js";
|
|
4
|
+
import { Checkboxes as n } from "../ui/forms/checkboxes/Checkboxes.js";
|
|
5
5
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
//#region lib/examples/checkboxes-with-form-control-demo.tsx
|
|
7
7
|
function a() {
|
|
8
|
-
return /* @__PURE__ */ r(
|
|
8
|
+
return /* @__PURE__ */ r(t, {
|
|
9
9
|
label: "Select options",
|
|
10
10
|
description: "Choose one or more options",
|
|
11
|
-
children: /* @__PURE__ */ i(
|
|
11
|
+
children: /* @__PURE__ */ i(n, {
|
|
12
12
|
name: "options",
|
|
13
13
|
"aria-labelledby": "options-label",
|
|
14
14
|
children: [
|