@fanvue/ui 0.1.0-alpha.3 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -8
- package/dist/cjs/components/Alert/Alert.cjs +72 -0
- package/dist/cjs/components/Alert/Alert.cjs.map +1 -0
- package/dist/cjs/components/Avatar/Avatar.cjs +162 -0
- package/dist/cjs/components/Avatar/Avatar.cjs.map +1 -0
- package/dist/cjs/components/Badge/Badge.cjs +99 -0
- package/dist/cjs/components/Badge/Badge.cjs.map +1 -0
- package/dist/cjs/components/Button/Button.cjs +172 -0
- package/dist/cjs/components/Button/Button.cjs.map +1 -0
- package/dist/cjs/components/Checkbox/Checkbox.cjs +157 -0
- package/dist/cjs/components/Checkbox/Checkbox.cjs.map +1 -0
- package/dist/cjs/components/Chip/Chip.cjs +92 -0
- package/dist/cjs/components/Chip/Chip.cjs.map +1 -0
- package/dist/cjs/components/Count/Count.cjs +56 -0
- package/dist/cjs/components/Count/Count.cjs.map +1 -0
- package/dist/cjs/components/DatePicker/DatePicker.cjs +133 -0
- package/dist/cjs/components/DatePicker/DatePicker.cjs.map +1 -0
- package/dist/cjs/components/Divider/Divider.cjs +69 -0
- package/dist/cjs/components/Divider/Divider.cjs.map +1 -0
- package/dist/cjs/components/IconButton/IconButton.cjs +92 -0
- package/dist/cjs/components/IconButton/IconButton.cjs.map +1 -0
- package/dist/cjs/components/Icons/ArrowRightIcon.cjs +47 -0
- package/dist/cjs/components/Icons/ArrowRightIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/ArrowUpRightIcon.cjs +47 -0
- package/dist/cjs/components/Icons/ArrowUpRightIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/CheckCircleIcon.cjs +47 -0
- package/dist/cjs/components/Icons/CheckCircleIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/CheckIcon.cjs +49 -0
- package/dist/cjs/components/Icons/CheckIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/ChevronLeftIcon.cjs +49 -0
- package/dist/cjs/components/Icons/ChevronLeftIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/ChevronRightIcon.cjs +49 -0
- package/dist/cjs/components/Icons/ChevronRightIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/CloseIcon.cjs +46 -0
- package/dist/cjs/components/Icons/CloseIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/CrossIcon.cjs +40 -0
- package/dist/cjs/components/Icons/CrossIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/CrownIcon.cjs +40 -0
- package/dist/cjs/components/Icons/CrownIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/ErrorCircleIcon.cjs +47 -0
- package/dist/cjs/components/Icons/ErrorCircleIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/ErrorIcon.cjs +30 -0
- package/dist/cjs/components/Icons/ErrorIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/FireIcon.cjs +47 -0
- package/dist/cjs/components/Icons/FireIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/HomeIcon.cjs +40 -0
- package/dist/cjs/components/Icons/HomeIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/InfoCircleIcon.cjs +47 -0
- package/dist/cjs/components/Icons/InfoCircleIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/InfoIcon.cjs +30 -0
- package/dist/cjs/components/Icons/InfoIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/MicrophoneIcon.cjs +55 -0
- package/dist/cjs/components/Icons/MicrophoneIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/MinusIcon.cjs +40 -0
- package/dist/cjs/components/Icons/MinusIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/PlusIcon.cjs +40 -0
- package/dist/cjs/components/Icons/PlusIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/SpinnerIcon.cjs +43 -0
- package/dist/cjs/components/Icons/SpinnerIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/StopIcon.cjs +46 -0
- package/dist/cjs/components/Icons/StopIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/SuccessIcon.cjs +30 -0
- package/dist/cjs/components/Icons/SuccessIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/VipBadgeIcon.cjs +97 -0
- package/dist/cjs/components/Icons/VipBadgeIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/WarningIcon.cjs +30 -0
- package/dist/cjs/components/Icons/WarningIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/WarningTriangleIcon.cjs +47 -0
- package/dist/cjs/components/Icons/WarningTriangleIcon.cjs.map +1 -0
- package/dist/cjs/components/Logo/Logo.cjs +182 -0
- package/dist/cjs/components/Logo/Logo.cjs.map +1 -0
- package/dist/cjs/components/Pagination/Pagination.cjs +144 -0
- package/dist/cjs/components/Pagination/Pagination.cjs.map +1 -0
- package/dist/cjs/components/Pill/Pill.cjs +69 -0
- package/dist/cjs/components/Pill/Pill.cjs.map +1 -0
- package/dist/cjs/components/ProgressBar/ProgressBar.cjs +112 -0
- package/dist/cjs/components/ProgressBar/ProgressBar.cjs.map +1 -0
- package/dist/cjs/components/Radio/Radio.cjs +74 -0
- package/dist/cjs/components/Radio/Radio.cjs.map +1 -0
- package/dist/cjs/components/RadioGroup/RadioGroup.cjs +30 -0
- package/dist/cjs/components/RadioGroup/RadioGroup.cjs.map +1 -0
- package/dist/cjs/components/Slider/Slider.cjs +96 -0
- package/dist/cjs/components/Slider/Slider.cjs.map +1 -0
- package/dist/cjs/components/Slider/SliderLayout.cjs +31 -0
- package/dist/cjs/components/Slider/SliderLayout.cjs.map +1 -0
- package/dist/cjs/components/Slider/SliderThumb.cjs +87 -0
- package/dist/cjs/components/Slider/SliderThumb.cjs.map +1 -0
- package/dist/cjs/components/Snackbar/Snackbar.cjs +215 -0
- package/dist/cjs/components/Snackbar/Snackbar.cjs.map +1 -0
- package/dist/cjs/components/Switch/Switch.cjs +57 -0
- package/dist/cjs/components/Switch/Switch.cjs.map +1 -0
- package/dist/cjs/components/SwitchField/SwitchField.cjs +103 -0
- package/dist/cjs/components/SwitchField/SwitchField.cjs.map +1 -0
- package/dist/cjs/components/SwitchToggle/SwitchToggle.cjs +110 -0
- package/dist/cjs/components/SwitchToggle/SwitchToggle.cjs.map +1 -0
- package/dist/cjs/components/Tabs/Tabs.cjs +24 -0
- package/dist/cjs/components/Tabs/Tabs.cjs.map +1 -0
- package/dist/cjs/components/Tabs/TabsContent.cjs +36 -0
- package/dist/cjs/components/Tabs/TabsContent.cjs.map +1 -0
- package/dist/cjs/components/Tabs/TabsList.cjs +42 -0
- package/dist/cjs/components/Tabs/TabsList.cjs.map +1 -0
- package/dist/cjs/components/Tabs/TabsTrigger.cjs +50 -0
- package/dist/cjs/components/Tabs/TabsTrigger.cjs.map +1 -0
- package/dist/cjs/components/Toast/Toast.cjs +128 -0
- package/dist/cjs/components/Toast/Toast.cjs.map +1 -0
- package/dist/cjs/index.cjs +111 -0
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/utils/cn.cjs +10 -0
- package/dist/cjs/utils/cn.cjs.map +1 -0
- package/dist/components/Alert/Alert.mjs +55 -0
- package/dist/components/Alert/Alert.mjs.map +1 -0
- package/dist/components/Avatar/Avatar.mjs +144 -0
- package/dist/components/Avatar/Avatar.mjs.map +1 -0
- package/dist/components/Badge/Badge.mjs +82 -0
- package/dist/components/Badge/Badge.mjs.map +1 -0
- package/dist/components/Button/Button.mjs +155 -0
- package/dist/components/Button/Button.mjs.map +1 -0
- package/dist/components/Checkbox/Checkbox.mjs +139 -0
- package/dist/components/Checkbox/Checkbox.mjs.map +1 -0
- package/dist/components/Chip/Chip.mjs +75 -0
- package/dist/components/Chip/Chip.mjs.map +1 -0
- package/dist/components/Count/Count.mjs +39 -0
- package/dist/components/Count/Count.mjs.map +1 -0
- package/dist/components/DatePicker/DatePicker.mjs +133 -0
- package/dist/components/DatePicker/DatePicker.mjs.map +1 -0
- package/dist/components/Divider/Divider.mjs +51 -0
- package/dist/components/Divider/Divider.mjs.map +1 -0
- package/dist/components/IconButton/IconButton.mjs +75 -0
- package/dist/components/IconButton/IconButton.mjs.map +1 -0
- package/dist/components/Icons/ArrowRightIcon.mjs +30 -0
- package/dist/components/Icons/ArrowRightIcon.mjs.map +1 -0
- package/dist/components/Icons/ArrowUpRightIcon.mjs +30 -0
- package/dist/components/Icons/ArrowUpRightIcon.mjs.map +1 -0
- package/dist/components/Icons/CheckCircleIcon.mjs +30 -0
- package/dist/components/Icons/CheckCircleIcon.mjs.map +1 -0
- package/dist/components/Icons/CheckIcon.mjs +32 -0
- package/dist/components/Icons/CheckIcon.mjs.map +1 -0
- package/dist/components/Icons/ChevronLeftIcon.mjs +32 -0
- package/dist/components/Icons/ChevronLeftIcon.mjs.map +1 -0
- package/dist/components/Icons/ChevronRightIcon.mjs +32 -0
- package/dist/components/Icons/ChevronRightIcon.mjs.map +1 -0
- package/dist/components/Icons/CloseIcon.mjs +29 -0
- package/dist/components/Icons/CloseIcon.mjs.map +1 -0
- package/dist/components/Icons/CrossIcon.mjs +23 -0
- package/dist/components/Icons/CrossIcon.mjs.map +1 -0
- package/dist/components/Icons/CrownIcon.mjs +23 -0
- package/dist/components/Icons/CrownIcon.mjs.map +1 -0
- package/dist/components/Icons/ErrorCircleIcon.mjs +30 -0
- package/dist/components/Icons/ErrorCircleIcon.mjs.map +1 -0
- package/dist/components/Icons/ErrorIcon.mjs +30 -0
- package/dist/components/Icons/ErrorIcon.mjs.map +1 -0
- package/dist/components/Icons/FireIcon.mjs +30 -0
- package/dist/components/Icons/FireIcon.mjs.map +1 -0
- package/dist/components/Icons/HomeIcon.mjs +23 -0
- package/dist/components/Icons/HomeIcon.mjs.map +1 -0
- package/dist/components/Icons/InfoCircleIcon.mjs +30 -0
- package/dist/components/Icons/InfoCircleIcon.mjs.map +1 -0
- package/dist/components/Icons/InfoIcon.mjs +30 -0
- package/dist/components/Icons/InfoIcon.mjs.map +1 -0
- package/dist/components/Icons/MicrophoneIcon.mjs +38 -0
- package/dist/components/Icons/MicrophoneIcon.mjs.map +1 -0
- package/dist/components/Icons/MinusIcon.mjs +23 -0
- package/dist/components/Icons/MinusIcon.mjs.map +1 -0
- package/dist/components/Icons/PlusIcon.mjs +23 -0
- package/dist/components/Icons/PlusIcon.mjs.map +1 -0
- package/dist/components/Icons/SpinnerIcon.mjs +26 -0
- package/dist/components/Icons/SpinnerIcon.mjs.map +1 -0
- package/dist/components/Icons/StopIcon.mjs +29 -0
- package/dist/components/Icons/StopIcon.mjs.map +1 -0
- package/dist/components/Icons/SuccessIcon.mjs +30 -0
- package/dist/components/Icons/SuccessIcon.mjs.map +1 -0
- package/dist/components/Icons/VipBadgeIcon.mjs +80 -0
- package/dist/components/Icons/VipBadgeIcon.mjs.map +1 -0
- package/dist/components/Icons/WarningIcon.mjs +30 -0
- package/dist/components/Icons/WarningIcon.mjs.map +1 -0
- package/dist/components/Icons/WarningTriangleIcon.mjs +30 -0
- package/dist/components/Icons/WarningTriangleIcon.mjs.map +1 -0
- package/dist/components/Logo/Logo.mjs +165 -0
- package/dist/components/Logo/Logo.mjs.map +1 -0
- package/dist/components/Pagination/Pagination.mjs +127 -0
- package/dist/components/Pagination/Pagination.mjs.map +1 -0
- package/dist/components/Pill/Pill.mjs +52 -0
- package/dist/components/Pill/Pill.mjs.map +1 -0
- package/dist/components/ProgressBar/ProgressBar.mjs +95 -0
- package/dist/components/ProgressBar/ProgressBar.mjs.map +1 -0
- package/dist/components/Radio/Radio.mjs +56 -0
- package/dist/components/Radio/Radio.mjs.map +1 -0
- package/dist/components/RadioGroup/RadioGroup.mjs +12 -0
- package/dist/components/RadioGroup/RadioGroup.mjs.map +1 -0
- package/dist/components/Slider/Slider.mjs +78 -0
- package/dist/components/Slider/Slider.mjs.map +1 -0
- package/dist/components/Slider/SliderLayout.mjs +31 -0
- package/dist/components/Slider/SliderLayout.mjs.map +1 -0
- package/dist/components/Slider/SliderThumb.mjs +69 -0
- package/dist/components/Slider/SliderThumb.mjs.map +1 -0
- package/dist/components/Snackbar/Snackbar.mjs +198 -0
- package/dist/components/Snackbar/Snackbar.mjs.map +1 -0
- package/dist/components/Switch/Switch.mjs +39 -0
- package/dist/components/Switch/Switch.mjs.map +1 -0
- package/dist/components/SwitchField/SwitchField.mjs +86 -0
- package/dist/components/SwitchField/SwitchField.mjs.map +1 -0
- package/dist/components/SwitchToggle/SwitchToggle.mjs +93 -0
- package/dist/components/SwitchToggle/SwitchToggle.mjs.map +1 -0
- package/dist/components/Tabs/Tabs.mjs +7 -0
- package/dist/components/Tabs/Tabs.mjs.map +1 -0
- package/dist/components/Tabs/TabsContent.mjs +18 -0
- package/dist/components/Tabs/TabsContent.mjs.map +1 -0
- package/dist/components/Tabs/TabsList.mjs +24 -0
- package/dist/components/Tabs/TabsList.mjs.map +1 -0
- package/dist/components/Tabs/TabsTrigger.mjs +32 -0
- package/dist/components/Tabs/TabsTrigger.mjs.map +1 -0
- package/dist/components/Toast/Toast.mjs +110 -0
- package/dist/components/Toast/Toast.mjs.map +1 -0
- package/dist/index.d.ts +41 -61
- package/dist/index.mjs +107 -10507
- package/dist/index.mjs.map +1 -1
- package/dist/styles/theme.css +1 -1
- package/dist/utils/cn.mjs +10 -0
- package/dist/utils/cn.mjs.map +1 -0
- package/package.json +15 -4
- package/dist/index.cjs +0 -2
- package/dist/index.cjs.map +0 -1
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef, useRef, useEffect } from "react";
|
|
4
|
+
import { DayPicker } from "react-day-picker";
|
|
5
|
+
import { cn } from "../../utils/cn.mjs";
|
|
6
|
+
import { Button } from "../Button/Button.mjs";
|
|
7
|
+
import { ChevronLeftIcon } from "../Icons/ChevronLeftIcon.mjs";
|
|
8
|
+
import { ChevronRightIcon } from "../Icons/ChevronRightIcon.mjs";
|
|
9
|
+
function Day({ day, modifiers, className, ...divProps }) {
|
|
10
|
+
const { range_start, range_end } = modifiers;
|
|
11
|
+
const isSingleDayRange = range_start && range_end;
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
className: cn(
|
|
16
|
+
className,
|
|
17
|
+
(range_start || range_end) && !isSingleDayRange && "from-50% from-transparent to-50%",
|
|
18
|
+
range_start && !isSingleDayRange && "bg-linear-to-r to-brand-green-50",
|
|
19
|
+
range_end && !isSingleDayRange && "bg-linear-to-l to-brand-green-50"
|
|
20
|
+
),
|
|
21
|
+
...divProps
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
function DayButton({ day, modifiers, className, ...buttonProps }) {
|
|
26
|
+
const ref = useRef(null);
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (modifiers.focused) ref.current?.focus();
|
|
29
|
+
}, [modifiers.focused]);
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
"button",
|
|
32
|
+
{
|
|
33
|
+
ref,
|
|
34
|
+
type: "button",
|
|
35
|
+
className: cn(
|
|
36
|
+
"relative z-10 inline-flex size-10 cursor-pointer items-center justify-center rounded-lg",
|
|
37
|
+
"typography-body-2-regular",
|
|
38
|
+
"transition-colors hover:bg-brand-green-50",
|
|
39
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-purple-500",
|
|
40
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
41
|
+
modifiers.today && !modifiers.selected && "border border-brand-green-500",
|
|
42
|
+
modifiers.selected && !modifiers.range_middle ? "bg-brand-green-500 text-body-black-solid-constant hover:bg-brand-green-500" : "text-body-100",
|
|
43
|
+
modifiers.range_middle && "rounded-none bg-transparent",
|
|
44
|
+
modifiers.outside && "pointer-events-none opacity-50"
|
|
45
|
+
),
|
|
46
|
+
...buttonProps
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
const DatePicker = forwardRef(
|
|
51
|
+
({
|
|
52
|
+
type = "single",
|
|
53
|
+
onApply,
|
|
54
|
+
onCancel,
|
|
55
|
+
cancelLabel = "Cancel",
|
|
56
|
+
applyLabel = "Apply",
|
|
57
|
+
showFooter = true,
|
|
58
|
+
className,
|
|
59
|
+
formatters,
|
|
60
|
+
...dayPickerProps
|
|
61
|
+
}, ref) => {
|
|
62
|
+
const numberOfMonths = type === "double" ? 2 : 1;
|
|
63
|
+
const isMulti = numberOfMonths > 1;
|
|
64
|
+
return /* @__PURE__ */ jsxs(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
ref,
|
|
68
|
+
className: cn(
|
|
69
|
+
"inline-flex flex-col rounded-2xl border border-neutral-200 bg-background-inverse-solid shadow-[0px_6px_12px_0px_rgba(0,0,0,0.1)] backdrop-blur-sm",
|
|
70
|
+
className
|
|
71
|
+
),
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ jsx(
|
|
74
|
+
DayPicker,
|
|
75
|
+
{
|
|
76
|
+
showOutsideDays: true,
|
|
77
|
+
numberOfMonths,
|
|
78
|
+
formatters: {
|
|
79
|
+
formatCaption: (date) => date.toLocaleDateString("en-US", { month: "short", year: "numeric" }),
|
|
80
|
+
...formatters
|
|
81
|
+
},
|
|
82
|
+
classNames: {
|
|
83
|
+
root: "w-full",
|
|
84
|
+
months: "relative flex",
|
|
85
|
+
month: "flex flex-1 flex-col",
|
|
86
|
+
month_caption: cn("flex items-center py-4", isMulti ? "justify-center px-2" : "px-5"),
|
|
87
|
+
caption_label: "typography-body-1-semibold text-body-100",
|
|
88
|
+
nav: cn(
|
|
89
|
+
"absolute top-4 z-20 flex",
|
|
90
|
+
isMulti ? "pointer-events-none inset-x-3 justify-between" : "right-3 gap-1"
|
|
91
|
+
),
|
|
92
|
+
button_previous: "pointer-events-auto inline-flex size-8 cursor-pointer items-center justify-center rounded-full text-body-100 transition-colors hover:bg-brand-green-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-purple-500 disabled:cursor-not-allowed disabled:opacity-50",
|
|
93
|
+
// !TODO https://linear.app/fanvue/issue/ENG-7301/swap-out-typography-tailwind-utility-classes
|
|
94
|
+
button_next: "pointer-events-auto inline-flex size-8 cursor-pointer items-center justify-center rounded-full text-body-100 transition-colors hover:bg-brand-green-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-purple-500 disabled:cursor-not-allowed disabled:opacity-50",
|
|
95
|
+
// !TODO https://linear.app/fanvue/issue/ENG-7301/swap-out-typography-tailwind-utility-classes
|
|
96
|
+
month_grid: cn("mb-4", isMulti ? "mx-2" : "mx-4"),
|
|
97
|
+
weekdays: "flex",
|
|
98
|
+
weekday: "flex h-[30px] w-10 flex-1 items-center justify-center typography-body-2-regular text-body-200",
|
|
99
|
+
week: "flex overflow-hidden rounded-lg",
|
|
100
|
+
day: "relative flex w-10 flex-1 items-center justify-center",
|
|
101
|
+
range_middle: "bg-brand-green-50",
|
|
102
|
+
hidden: "hidden"
|
|
103
|
+
},
|
|
104
|
+
components: {
|
|
105
|
+
/**
|
|
106
|
+
* !NOTE: We're unable to use semantic elements for the grid due to rdp, as such we've disabled the a11y lint rules for these elements in biome.json.
|
|
107
|
+
*/
|
|
108
|
+
Chevron: ({ orientation }) => orientation === "left" ? /* @__PURE__ */ jsx(ChevronLeftIcon, {}) : /* @__PURE__ */ jsx(ChevronRightIcon, {}),
|
|
109
|
+
MonthGrid: (props) => /* @__PURE__ */ jsx("div", { role: "grid", ...props }),
|
|
110
|
+
Weekdays: (props) => /* @__PURE__ */ jsx("div", { role: "row", ...props }),
|
|
111
|
+
Weekday: (props) => /* @__PURE__ */ jsx("div", { role: "columnheader", ...props }),
|
|
112
|
+
Weeks: (props) => /* @__PURE__ */ jsx("div", { role: "rowgroup", ...props }),
|
|
113
|
+
Week: ({ week, ...props }) => /* @__PURE__ */ jsx("div", { role: "row", ...props }),
|
|
114
|
+
Day,
|
|
115
|
+
DayButton
|
|
116
|
+
},
|
|
117
|
+
...dayPickerProps
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
showFooter && /* @__PURE__ */ jsxs("div", { className: "flex gap-4 px-5 pb-4", children: [
|
|
121
|
+
/* @__PURE__ */ jsx(Button, { variant: "secondary", size: "40", className: "flex-1", onClick: onCancel, children: cancelLabel }),
|
|
122
|
+
/* @__PURE__ */ jsx(Button, { variant: "primary", size: "40", className: "flex-1", onClick: onApply, children: applyLabel })
|
|
123
|
+
] })
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
DatePicker.displayName = "DatePicker";
|
|
130
|
+
export {
|
|
131
|
+
DatePicker
|
|
132
|
+
};
|
|
133
|
+
//# sourceMappingURL=DatePicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.mjs","sources":["../../../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["import { forwardRef, useEffect, useRef } from \"react\";\nimport {\n type ChevronProps,\n type DateRange,\n type DayButtonProps,\n DayPicker,\n type DayPickerProps,\n type DayProps,\n type MonthGridProps,\n type WeekdayProps,\n type WeekdaysProps,\n type WeekProps,\n type WeeksProps,\n} from \"react-day-picker\";\nimport { cn } from \"../../utils/cn\";\nimport type { OmitDistributed } from \"../../utils/types\";\nimport { Button } from \"../Button/Button\";\nimport { ChevronLeftIcon } from \"../Icons/ChevronLeftIcon\";\nimport { ChevronRightIcon } from \"../Icons/ChevronRightIcon\";\n\nexport type { DateRange }; // Needed by consumers when passing props\n\nexport type DatePickerType = \"single\" | \"double\";\n\nexport interface DatePickerOwnProps {\n /** Display one month or two side-by-side. @default \"single\" */\n type?: DatePickerType;\n /** Called when the Apply button is clicked. */\n onApply?: () => void;\n /** Called when the Cancel button is clicked. */\n onCancel?: () => void;\n /** Label for the cancel button. @default \"Cancel\" */\n cancelLabel?: string;\n /** Label for the apply button. @default \"Apply\" */\n applyLabel?: string;\n /** Whether to render cancel / apply footer buttons. @default true */\n showFooter?: boolean;\n /** Additional className for the outer container. */\n className?: string;\n}\n\nfunction Day({ day, modifiers, className, ...divProps }: DayProps) {\n const { range_start, range_end } = modifiers;\n const isSingleDayRange = range_start && range_end;\n\n return (\n <div\n className={cn(\n className,\n (range_start || range_end) && !isSingleDayRange && \"from-50% from-transparent to-50%\",\n range_start && !isSingleDayRange && \"bg-linear-to-r to-brand-green-50\",\n range_end && !isSingleDayRange && \"bg-linear-to-l to-brand-green-50\",\n )}\n {...divProps}\n />\n );\n}\n\nfunction DayButton({ day, modifiers, className, ...buttonProps }: DayButtonProps) {\n const ref = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (modifiers.focused) ref.current?.focus();\n }, [modifiers.focused]);\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={cn(\n \"relative z-10 inline-flex size-10 cursor-pointer items-center justify-center rounded-lg\",\n \"typography-body-2-regular\",\n \"transition-colors hover:bg-brand-green-50\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-purple-500\",\n \"disabled:cursor-not-allowed disabled:opacity-50\",\n modifiers.today && !modifiers.selected && \"border border-brand-green-500\",\n modifiers.selected && !modifiers.range_middle\n ? \"bg-brand-green-500 text-body-black-solid-constant hover:bg-brand-green-500\"\n : \"text-body-100\",\n modifiers.range_middle && \"rounded-none bg-transparent\",\n modifiers.outside && \"pointer-events-none opacity-50\",\n )}\n {...buttonProps}\n />\n );\n}\n\nexport type DatePickerProps = DatePickerOwnProps &\n OmitDistributed<DayPickerProps, \"numberOfMonths\">;\n\nexport const DatePicker = forwardRef<HTMLDivElement, DatePickerProps>(\n (\n {\n type = \"single\",\n onApply,\n onCancel,\n cancelLabel = \"Cancel\",\n applyLabel = \"Apply\",\n showFooter = true,\n className,\n formatters,\n ...dayPickerProps\n },\n ref,\n ) => {\n const numberOfMonths = type === \"double\" ? 2 : 1;\n const isMulti = numberOfMonths > 1;\n\n return (\n <div\n ref={ref}\n className={cn(\n \"inline-flex flex-col rounded-2xl border border-neutral-200 bg-background-inverse-solid shadow-[0px_6px_12px_0px_rgba(0,0,0,0.1)] backdrop-blur-sm\",\n className,\n )}\n >\n <DayPicker\n showOutsideDays\n numberOfMonths={numberOfMonths}\n formatters={{\n formatCaption: (date: Date) =>\n date.toLocaleDateString(\"en-US\", { month: \"short\", year: \"numeric\" }),\n ...formatters,\n }}\n classNames={{\n root: \"w-full\",\n months: \"relative flex\",\n month: \"flex flex-1 flex-col\",\n month_caption: cn(\"flex items-center py-4\", isMulti ? \"justify-center px-2\" : \"px-5\"),\n caption_label: \"typography-body-1-semibold text-body-100\",\n nav: cn(\n \"absolute top-4 z-20 flex\",\n isMulti ? \"pointer-events-none inset-x-3 justify-between\" : \"right-3 gap-1\",\n ),\n button_previous:\n \"pointer-events-auto inline-flex size-8 cursor-pointer items-center justify-center rounded-full text-body-100 transition-colors hover:bg-brand-green-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-purple-500 disabled:cursor-not-allowed disabled:opacity-50\", // !TODO https://linear.app/fanvue/issue/ENG-7301/swap-out-typography-tailwind-utility-classes\n button_next:\n \"pointer-events-auto inline-flex size-8 cursor-pointer items-center justify-center rounded-full text-body-100 transition-colors hover:bg-brand-green-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-purple-500 disabled:cursor-not-allowed disabled:opacity-50\", // !TODO https://linear.app/fanvue/issue/ENG-7301/swap-out-typography-tailwind-utility-classes\n month_grid: cn(\"mb-4\", isMulti ? \"mx-2\" : \"mx-4\"),\n weekdays: \"flex\",\n weekday:\n \"flex h-[30px] w-10 flex-1 items-center justify-center typography-body-2-regular text-body-200\",\n week: \"flex overflow-hidden rounded-lg\",\n day: \"relative flex w-10 flex-1 items-center justify-center\",\n range_middle: \"bg-brand-green-50\",\n hidden: \"hidden\",\n }}\n components={{\n /**\n * !NOTE: We're unable to use semantic elements for the grid due to rdp, as such we've disabled the a11y lint rules for these elements in biome.json.\n */\n Chevron: ({ orientation }: ChevronProps) =>\n orientation === \"left\" ? <ChevronLeftIcon /> : <ChevronRightIcon />,\n MonthGrid: (props: MonthGridProps) => <div role=\"grid\" {...props} />,\n Weekdays: (props: WeekdaysProps) => <div role=\"row\" {...props} />,\n Weekday: (props: WeekdayProps) => <div role=\"columnheader\" {...props} />,\n Weeks: (props: WeeksProps) => <div role=\"rowgroup\" {...props} />,\n Week: ({ week, ...props }: WeekProps) => <div role=\"row\" {...props} />,\n Day,\n DayButton,\n }}\n {...dayPickerProps}\n />\n\n {showFooter && (\n <div className=\"flex gap-4 px-5 pb-4\">\n <Button variant=\"secondary\" size=\"40\" className=\"flex-1\" onClick={onCancel}>\n {cancelLabel}\n </Button>\n <Button variant=\"primary\" size=\"40\" className=\"flex-1\" onClick={onApply}>\n {applyLabel}\n </Button>\n </div>\n )}\n </div>\n );\n },\n);\n\nDatePicker.displayName = \"DatePicker\";\n"],"names":[],"mappings":";;;;;;;;AAyCA,SAAS,IAAI,EAAE,KAAK,WAAW,WAAW,GAAG,YAAsB;AACjE,QAAM,EAAE,aAAa,UAAA,IAAc;AACnC,QAAM,mBAAmB,eAAe;AAExC,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,SACC,eAAe,cAAc,CAAC,oBAAoB;AAAA,QACnD,eAAe,CAAC,oBAAoB;AAAA,QACpC,aAAa,CAAC,oBAAoB;AAAA,MAAA;AAAA,MAEnC,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAAS,UAAU,EAAE,KAAK,WAAW,WAAW,GAAG,eAA+B;AAChF,QAAM,MAAM,OAA0B,IAAI;AAE1C,YAAU,MAAM;AACd,QAAI,UAAU,QAAS,KAAI,SAAS,MAAA;AAAA,EACtC,GAAG,CAAC,UAAU,OAAO,CAAC;AAEtB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,MAAK;AAAA,MACL,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,SAAS,CAAC,UAAU,YAAY;AAAA,QAC1C,UAAU,YAAY,CAAC,UAAU,eAC7B,+EACA;AAAA,QACJ,UAAU,gBAAgB;AAAA,QAC1B,UAAU,WAAW;AAAA,MAAA;AAAA,MAEtB,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;AAKO,MAAM,aAAa;AAAA,EACxB,CACE;AAAA,IACE,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA,cAAc;AAAA,IACd,aAAa;AAAA,IACb,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,iBAAiB,SAAS,WAAW,IAAI;AAC/C,UAAM,UAAU,iBAAiB;AAEjC,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,QAGF,UAAA;AAAA,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,iBAAe;AAAA,cACf;AAAA,cACA,YAAY;AAAA,gBACV,eAAe,CAAC,SACd,KAAK,mBAAmB,SAAS,EAAE,OAAO,SAAS,MAAM,WAAW;AAAA,gBACtE,GAAG;AAAA,cAAA;AAAA,cAEL,YAAY;AAAA,gBACV,MAAM;AAAA,gBACN,QAAQ;AAAA,gBACR,OAAO;AAAA,gBACP,eAAe,GAAG,0BAA0B,UAAU,wBAAwB,MAAM;AAAA,gBACpF,eAAe;AAAA,gBACf,KAAK;AAAA,kBACH;AAAA,kBACA,UAAU,kDAAkD;AAAA,gBAAA;AAAA,gBAE9D,iBACE;AAAA;AAAA,gBACF,aACE;AAAA;AAAA,gBACF,YAAY,GAAG,QAAQ,UAAU,SAAS,MAAM;AAAA,gBAChD,UAAU;AAAA,gBACV,SACE;AAAA,gBACF,MAAM;AAAA,gBACN,KAAK;AAAA,gBACL,cAAc;AAAA,gBACd,QAAQ;AAAA,cAAA;AAAA,cAEV,YAAY;AAAA;AAAA;AAAA;AAAA,gBAIV,SAAS,CAAC,EAAE,YAAA,MACV,gBAAgB,SAAS,oBAAC,iBAAA,CAAA,CAAgB,IAAK,oBAAC,kBAAA,CAAA,CAAiB;AAAA,gBACnE,WAAW,CAAC,UAA0B,oBAAC,SAAI,MAAK,QAAQ,GAAG,OAAO;AAAA,gBAClE,UAAU,CAAC,UAAyB,oBAAC,SAAI,MAAK,OAAO,GAAG,OAAO;AAAA,gBAC/D,SAAS,CAAC,UAAwB,oBAAC,SAAI,MAAK,gBAAgB,GAAG,OAAO;AAAA,gBACtE,OAAO,CAAC,UAAsB,oBAAC,SAAI,MAAK,YAAY,GAAG,OAAO;AAAA,gBAC9D,MAAM,CAAC,EAAE,MAAM,GAAG,MAAA,MAAuB,oBAAC,OAAA,EAAI,MAAK,OAAO,GAAG,MAAA,CAAO;AAAA,gBACpE;AAAA,gBACA;AAAA,cAAA;AAAA,cAED,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAGL,cACC,qBAAC,OAAA,EAAI,WAAU,wBACb,UAAA;AAAA,YAAA,oBAAC,QAAA,EAAO,SAAQ,aAAY,MAAK,MAAK,WAAU,UAAS,SAAS,UAC/D,UAAA,YAAA,CACH;AAAA,YACA,oBAAC,QAAA,EAAO,SAAQ,WAAU,MAAK,MAAK,WAAU,UAAS,SAAS,SAC7D,UAAA,WAAA,CACH;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,WAAW,cAAc;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "../../utils/cn.mjs";
|
|
6
|
+
const Divider = React.forwardRef(({ label, className, ...props }, ref) => {
|
|
7
|
+
if (label !== void 0) {
|
|
8
|
+
return /* @__PURE__ */ jsxs(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
ref,
|
|
12
|
+
className: cn(`my-2 flex w-full items-center justify-center gap-2`, className),
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
SeparatorPrimitive.Root,
|
|
16
|
+
{
|
|
17
|
+
decorative: true,
|
|
18
|
+
orientation: "horizontal",
|
|
19
|
+
className: "h-px flex-1 bg-neutral-200",
|
|
20
|
+
...props
|
|
21
|
+
}
|
|
22
|
+
),
|
|
23
|
+
/* @__PURE__ */ jsx("span", { className: "typography-body-2-regular shrink-0 text-body-100", children: label }),
|
|
24
|
+
/* @__PURE__ */ jsx(
|
|
25
|
+
SeparatorPrimitive.Root,
|
|
26
|
+
{
|
|
27
|
+
decorative: true,
|
|
28
|
+
orientation: "horizontal",
|
|
29
|
+
className: "h-px flex-1 bg-neutral-200"
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
return /* @__PURE__ */ jsx(
|
|
37
|
+
SeparatorPrimitive.Root,
|
|
38
|
+
{
|
|
39
|
+
ref,
|
|
40
|
+
decorative: true,
|
|
41
|
+
orientation: "horizontal",
|
|
42
|
+
className: cn(`mx-auto my-2 h-px w-full bg-neutral-200`, className),
|
|
43
|
+
...props
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
Divider.displayName = "Divider";
|
|
48
|
+
export {
|
|
49
|
+
Divider
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=Divider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.mjs","sources":["../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import * as SeparatorPrimitive from \"@radix-ui/react-separator\";\nimport * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\n\nexport type DividerOrientation = \"horizontal\" | \"vertical\";\nexport type DividerType = \"default\" | \"text\";\n\nexport interface DividerProps\n extends React.ComponentPropsWithoutRef<typeof SeparatorPrimitive.Root> {\n /** Custom label to display*/\n label?: string;\n}\n\nexport const Divider = React.forwardRef<\n React.ElementRef<typeof SeparatorPrimitive.Root>,\n DividerProps\n>(({ label, className, ...props }, ref) => {\n if (label !== undefined) {\n return (\n <div\n ref={ref}\n className={cn(`my-2 flex w-full items-center justify-center gap-2`, className)}\n >\n <SeparatorPrimitive.Root\n decorative\n orientation=\"horizontal\"\n className=\"h-px flex-1 bg-neutral-200\"\n {...props}\n />\n <span className=\"typography-body-2-regular shrink-0 text-body-100\">{label}</span>\n <SeparatorPrimitive.Root\n decorative\n orientation=\"horizontal\"\n className=\"h-px flex-1 bg-neutral-200\"\n />\n </div>\n );\n }\n\n return (\n <SeparatorPrimitive.Root\n ref={ref}\n decorative\n orientation=\"horizontal\"\n className={cn(`mx-auto my-2 h-px w-full bg-neutral-200`, className)}\n {...props}\n />\n );\n});\n\nDivider.displayName = \"Divider\";\n"],"names":[],"mappings":";;;;;AAaO,MAAM,UAAU,MAAM,WAG3B,CAAC,EAAE,OAAO,WAAW,GAAG,MAAA,GAAS,QAAQ;AACzC,MAAI,UAAU,QAAW;AACvB,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,WAAW,GAAG,sDAAsD,SAAS;AAAA,QAE7E,UAAA;AAAA,UAAA;AAAA,YAAC,mBAAmB;AAAA,YAAnB;AAAA,cACC,YAAU;AAAA,cACV,aAAY;AAAA,cACZ,WAAU;AAAA,cACT,GAAG;AAAA,YAAA;AAAA,UAAA;AAAA,UAEN,oBAAC,QAAA,EAAK,WAAU,oDAAoD,UAAA,OAAM;AAAA,UAC1E;AAAA,YAAC,mBAAmB;AAAA,YAAnB;AAAA,cACC,YAAU;AAAA,cACV,aAAY;AAAA,cACZ,WAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QACZ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AAEA,SACE;AAAA,IAAC,mBAAmB;AAAA,IAAnB;AAAA,MACC;AAAA,MACA,YAAU;AAAA,MACV,aAAY;AAAA,MACZ,WAAW,GAAG,2CAA2C,SAAS;AAAA,MACjE,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;AAED,QAAQ,cAAc;"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
import { Count } from "../Count/Count.mjs";
|
|
6
|
+
const iconButtonVariants = {
|
|
7
|
+
primary: "bg-neutral-400 text-body-300 hover:bg-hover-100 disabled:opacity-50 focus:shadow-focus-ring",
|
|
8
|
+
secondary: `bg-neutral-100 text-neutral-400 hover:bg-neutral-200 disabled:opacity-50 focus:focus:shadow-focus-ring`,
|
|
9
|
+
tertiary: `bg-transparent text-neutral-400 hover:bg-hover-300 disabled:opacity-50 focus:shadow-focus-ring active:bg-brand-green-50`,
|
|
10
|
+
brand: `bg-body-black-solid-constant text-brand-green-500 hover:bg-brand-green-500 hover:text-body-black-solid-constant disabled:opacity-50 focus:shadow-focus-ring`,
|
|
11
|
+
contrast: `bg-transparent text-body-white-solid-constant disabled:opacity-50 focus:shadow-focus-ring`,
|
|
12
|
+
messaging: `bg-body-black-solid-constant text-brand-green-500 hover:bg-brand-green-500 hover:text-body-black-solid-constant disabled:opacity-50 focus:shadow-focus-ring`,
|
|
13
|
+
navTray: `bg-transparent text-neutral-400 disabled:opacity-50 focus:shadow-focus-ring active:bg-brand-green-50`,
|
|
14
|
+
tertiaryDestructive: `bg-transparent text-error-500 hover:bg-hover-300 disabled:opacity-50 focus:shadow-focus-ring`,
|
|
15
|
+
stop: `bg-neutral-400 text-body-300 hover:bg-brand-green-500 hover:text-body-black-solid-constant`,
|
|
16
|
+
microphone: `bg-neutral-400 text-body-300 hover:bg-brand-green-500 hover:text-body-black-solid-constant`
|
|
17
|
+
};
|
|
18
|
+
const iconSizeVariants = {
|
|
19
|
+
24: "size-4",
|
|
20
|
+
32: "size-5",
|
|
21
|
+
40: "size-6",
|
|
22
|
+
52: "size-7",
|
|
23
|
+
72: "size-8"
|
|
24
|
+
};
|
|
25
|
+
const sizeVariants = {
|
|
26
|
+
24: "p-1",
|
|
27
|
+
32: "p-1.5",
|
|
28
|
+
40: "p-[10px]",
|
|
29
|
+
52: "p-2",
|
|
30
|
+
72: "p-4"
|
|
31
|
+
};
|
|
32
|
+
const IconButton = React.forwardRef(
|
|
33
|
+
({ className, variant = "primary", size = "40", icon, counterValue, disabled = false, ...props }, ref) => {
|
|
34
|
+
return /* @__PURE__ */ jsxs(
|
|
35
|
+
"button",
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
type: "button",
|
|
39
|
+
"data-testid": "icon-button",
|
|
40
|
+
disabled,
|
|
41
|
+
className: cn(
|
|
42
|
+
// Base styles
|
|
43
|
+
"relative inline-flex shrink-0 items-center justify-center focus-visible:outline-none",
|
|
44
|
+
"cursor-pointer rounded-full transition-all duration-150 ease-in-out disabled:cursor-default",
|
|
45
|
+
// Size variants
|
|
46
|
+
sizeVariants[size],
|
|
47
|
+
// Variant styles
|
|
48
|
+
iconButtonVariants[variant],
|
|
49
|
+
// Manual CSS overrides
|
|
50
|
+
className
|
|
51
|
+
),
|
|
52
|
+
...props,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ jsx(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
className: cn(
|
|
58
|
+
"flex shrink-0 items-center justify-center overflow-clip",
|
|
59
|
+
iconSizeVariants[size]
|
|
60
|
+
),
|
|
61
|
+
"aria-hidden": "true",
|
|
62
|
+
children: icon
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
counterValue !== void 0 && (variant === "tertiary" || variant === "navTray") && /* @__PURE__ */ jsx("div", { className: "absolute top-0 right-0", children: /* @__PURE__ */ jsx(Count, { value: counterValue }) })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
IconButton.displayName = "IconButton";
|
|
72
|
+
export {
|
|
73
|
+
IconButton
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=IconButton.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconButton.mjs","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Count } from \"../Count/Count\";\n\nconst iconButtonVariants = {\n primary:\n \"bg-neutral-400 text-body-300 hover:bg-hover-100 disabled:opacity-50 focus:shadow-focus-ring\",\n secondary: `bg-neutral-100 text-neutral-400 hover:bg-neutral-200 disabled:opacity-50 focus:focus:shadow-focus-ring`,\n tertiary: `bg-transparent text-neutral-400 hover:bg-hover-300 disabled:opacity-50 focus:shadow-focus-ring active:bg-brand-green-50`,\n brand: `bg-body-black-solid-constant text-brand-green-500 hover:bg-brand-green-500 hover:text-body-black-solid-constant disabled:opacity-50 focus:shadow-focus-ring`,\n contrast: `bg-transparent text-body-white-solid-constant disabled:opacity-50 focus:shadow-focus-ring`,\n messaging: `bg-body-black-solid-constant text-brand-green-500 hover:bg-brand-green-500 hover:text-body-black-solid-constant disabled:opacity-50 focus:shadow-focus-ring`,\n navTray: `bg-transparent text-neutral-400 disabled:opacity-50 focus:shadow-focus-ring active:bg-brand-green-50`,\n tertiaryDestructive: `bg-transparent text-error-500 hover:bg-hover-300 disabled:opacity-50 focus:shadow-focus-ring`,\n stop: `bg-neutral-400 text-body-300 hover:bg-brand-green-500 hover:text-body-black-solid-constant`,\n microphone: `bg-neutral-400 text-body-300 hover:bg-brand-green-500 hover:text-body-black-solid-constant`,\n};\n\nconst iconSizeVariants = {\n 24: \"size-4\",\n 32: \"size-5\",\n 40: \"size-6\",\n 52: \"size-7\",\n 72: \"size-8\",\n} as const;\n\nconst sizeVariants = {\n 24: \"p-1\",\n 32: \"p-1.5\",\n 40: \"p-[10px]\",\n 52: \"p-2\",\n 72: \"p-4\",\n} as const;\n\nexport type IconButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"brand\"\n | \"contrast\"\n | \"messaging\"\n | \"navTray\"\n | \"tertiaryDestructive\"\n | \"stop\"\n | \"microphone\";\n\nexport type IconButtonSize = \"24\" | \"32\" | \"40\" | \"52\" | \"72\";\n\nexport interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style variant of the icon button */\n variant?: IconButtonVariant;\n /** Size of the button */\n size?: IconButtonSize;\n /** Icon element to display */\n icon: React.ReactNode;\n /** Counter value to display */\n counterValue?: number;\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n { className, variant = \"primary\", size = \"40\", icon, counterValue, disabled = false, ...props },\n ref,\n ) => {\n return (\n <button\n ref={ref}\n type=\"button\"\n data-testid=\"icon-button\"\n disabled={disabled}\n className={cn(\n // Base styles\n \"relative inline-flex shrink-0 items-center justify-center focus-visible:outline-none\",\n \"cursor-pointer rounded-full transition-all duration-150 ease-in-out disabled:cursor-default\",\n // Size variants\n sizeVariants[size],\n // Variant styles\n iconButtonVariants[variant],\n // Manual CSS overrides\n className,\n )}\n {...props}\n >\n <span\n className={cn(\n \"flex shrink-0 items-center justify-center overflow-clip\",\n iconSizeVariants[size],\n )}\n aria-hidden=\"true\"\n >\n {icon}\n </span>\n\n {counterValue !== undefined && (variant === \"tertiary\" || variant === \"navTray\") && (\n <div className=\"absolute top-0 right-0\">\n <Count value={counterValue} />\n </div>\n )}\n </button>\n );\n },\n);\n\nIconButton.displayName = \"IconButton\";\n"],"names":[],"mappings":";;;;;AAIA,MAAM,qBAAqB;AAAA,EACzB,SACE;AAAA,EACF,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,UAAU;AAAA,EACV,WAAW;AAAA,EACX,SAAS;AAAA,EACT,qBAAqB;AAAA,EACrB,MAAM;AAAA,EACN,YAAY;AACd;AAEA,MAAM,mBAAmB;AAAA,EACvB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAEA,MAAM,eAAe;AAAA,EACnB,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AA2BO,MAAM,aAAa,MAAM;AAAA,EAC9B,CACE,EAAE,WAAW,UAAU,WAAW,OAAO,MAAM,MAAM,cAAc,WAAW,OAAO,GAAG,MAAA,GACxF,QACG;AACH,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,eAAY;AAAA,QACZ;AAAA,QACA,WAAW;AAAA;AAAA,UAET;AAAA,UACA;AAAA;AAAA,UAEA,aAAa,IAAI;AAAA;AAAA,UAEjB,mBAAmB,OAAO;AAAA;AAAA,UAE1B;AAAA,QAAA;AAAA,QAED,GAAG;AAAA,QAEJ,UAAA;AAAA,UAAA;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAW;AAAA,gBACT;AAAA,gBACA,iBAAiB,IAAI;AAAA,cAAA;AAAA,cAEvB,eAAY;AAAA,cAEX,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGF,iBAAiB,WAAc,YAAY,cAAc,YAAY,cACpE,oBAAC,OAAA,EAAI,WAAU,0BACb,UAAA,oBAAC,OAAA,EAAM,OAAO,cAAc,EAAA,CAC9B;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,WAAW,cAAc;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const ArrowRightIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
fillRule: "evenodd",
|
|
19
|
+
d: "M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z",
|
|
20
|
+
clipRule: "evenodd"
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
ArrowRightIcon.displayName = "ArrowRightIcon";
|
|
27
|
+
export {
|
|
28
|
+
ArrowRightIcon
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=ArrowRightIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowRightIcon.mjs","sources":["../../../src/components/Icons/ArrowRightIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const ArrowRightIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n className={cn(\"size-5\", className)}\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n d=\"M3 10a.75.75 0 0 1 .75-.75h10.638L10.23 5.29a.75.75 0 1 1 1.04-1.08l5.5 5.25a.75.75 0 0 1 0 1.08l-5.5 5.25a.75.75 0 1 1-1.04-1.08l4.158-3.96H3.75A.75.75 0 0 1 3 10Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n ),\n);\n\nArrowRightIcon.displayName = \"ArrowRightIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,iBAAiB,MAAM;AAAA,EAClC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,GAAE;AAAA,UACF,UAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX;AAAA,EAAA;AAGN;AAEA,eAAe,cAAc;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const ArrowUpRightIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
fillRule: "evenodd",
|
|
19
|
+
d: "M5.22 14.78a.75.75 0 0 0 1.06 0l7.22-7.22v5.69a.75.75 0 0 0 1.5 0v-7.5a.75.75 0 0 0-.75-.75h-7.5a.75.75 0 0 0 0 1.5h5.69l-7.22 7.22a.75.75 0 0 0 0 1.06Z",
|
|
20
|
+
clipRule: "evenodd"
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
ArrowUpRightIcon.displayName = "ArrowUpRightIcon";
|
|
27
|
+
export {
|
|
28
|
+
ArrowUpRightIcon
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=ArrowUpRightIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArrowUpRightIcon.mjs","sources":["../../../src/components/Icons/ArrowUpRightIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const ArrowUpRightIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n className={cn(\"size-5\", className)}\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n d=\"M5.22 14.78a.75.75 0 0 0 1.06 0l7.22-7.22v5.69a.75.75 0 0 0 1.5 0v-7.5a.75.75 0 0 0-.75-.75h-7.5a.75.75 0 0 0 0 1.5h5.69l-7.22 7.22a.75.75 0 0 0 0 1.06Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n ),\n);\n\nArrowUpRightIcon.displayName = \"ArrowUpRightIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,mBAAmB,MAAM;AAAA,EACpC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,GAAE;AAAA,UACF,UAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX;AAAA,EAAA;AAGN;AAEA,iBAAiB,cAAc;"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const CheckCircleIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
fillRule: "evenodd",
|
|
19
|
+
d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z",
|
|
20
|
+
clipRule: "evenodd"
|
|
21
|
+
}
|
|
22
|
+
)
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
CheckCircleIcon.displayName = "CheckCircleIcon";
|
|
27
|
+
export {
|
|
28
|
+
CheckCircleIcon
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=CheckCircleIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckCircleIcon.mjs","sources":["../../../src/components/Icons/CheckCircleIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const CheckCircleIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n className={cn(\"size-5\", className)}\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z\"\n clipRule=\"evenodd\"\n />\n </svg>\n ),\n);\n\nCheckCircleIcon.displayName = \"CheckCircleIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,kBAAkB,MAAM;AAAA,EACnC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,GAAE;AAAA,UACF,UAAS;AAAA,QAAA;AAAA,MAAA;AAAA,IACX;AAAA,EAAA;AAGN;AAEA,gBAAgB,cAAc;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const CheckIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 12 12",
|
|
11
|
+
fill: "none",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-3", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M10 3 4.5 8.5 2 6",
|
|
19
|
+
stroke: "currentColor",
|
|
20
|
+
strokeWidth: "2",
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round"
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
CheckIcon.displayName = "CheckIcon";
|
|
29
|
+
export {
|
|
30
|
+
CheckIcon
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=CheckIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CheckIcon.mjs","sources":["../../../src/components/Icons/CheckIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\n/** Small checkmark icon for use in checkbox/toggle components (12x12 viewBox) */\nexport const CheckIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 12 12\"\n fill=\"none\"\n aria-hidden=\"true\"\n className={cn(\"size-3\", className)}\n {...props}\n >\n <path\n d=\"M10 3 4.5 8.5 2 6\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n ),\n);\n\nCheckIcon.displayName = \"CheckIcon\";\n"],"names":[],"mappings":";;;;AAKO,MAAM,YAAY,MAAM;AAAA,EAC7B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA,UACZ,eAAc;AAAA,UACd,gBAAe;AAAA,QAAA;AAAA,MAAA;AAAA,IACjB;AAAA,EAAA;AAGN;AAEA,UAAU,cAAc;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const ChevronLeftIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "none",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M12.5 15L7.5 10L12.5 5",
|
|
19
|
+
stroke: "currentColor",
|
|
20
|
+
strokeWidth: "1.67",
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round"
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
ChevronLeftIcon.displayName = "ChevronLeftIcon";
|
|
29
|
+
export {
|
|
30
|
+
ChevronLeftIcon
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ChevronLeftIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronLeftIcon.mjs","sources":["../../../src/components/Icons/ChevronLeftIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const ChevronLeftIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n aria-hidden=\"true\"\n className={cn(\"size-5\", className)}\n {...props}\n >\n <path\n d=\"M12.5 15L7.5 10L12.5 5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.67\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n ),\n);\n\nChevronLeftIcon.displayName = \"ChevronLeftIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,kBAAkB,MAAM;AAAA,EACnC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA,UACZ,eAAc;AAAA,UACd,gBAAe;AAAA,QAAA;AAAA,MAAA;AAAA,IACjB;AAAA,EAAA;AAGN;AAEA,gBAAgB,cAAc;"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const ChevronRightIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "none",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M7.5 15L12.5 10L7.5 5",
|
|
19
|
+
stroke: "currentColor",
|
|
20
|
+
strokeWidth: "1.67",
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round"
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
ChevronRightIcon.displayName = "ChevronRightIcon";
|
|
29
|
+
export {
|
|
30
|
+
ChevronRightIcon
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ChevronRightIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronRightIcon.mjs","sources":["../../../src/components/Icons/ChevronRightIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const ChevronRightIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n aria-hidden=\"true\"\n className={cn(\"size-5\", className)}\n {...props}\n >\n <path\n d=\"M7.5 15L12.5 10L7.5 5\"\n stroke=\"currentColor\"\n strokeWidth=\"1.67\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n ),\n);\n\nChevronRightIcon.displayName = \"ChevronRightIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,mBAAmB,MAAM;AAAA,EACpC,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA,UACZ,eAAc;AAAA,UACd,gBAAe;AAAA,QAAA;AAAA,MAAA;AAAA,IACjB;AAAA,EAAA;AAGN;AAEA,iBAAiB,cAAc;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const CloseIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M11.2112 9.64811L15.9725 4.89795C16.181 4.68945 16.2981 4.40666 16.2981 4.11179C16.2981 3.81693 16.181 3.53414 15.9725 3.32564C15.764 3.11714 15.4812 3 15.1863 3C14.8915 3 14.6087 3.11714 14.4002 3.32564L9.65 8.08687L4.89984 3.32564C4.69134 3.11714 4.40855 3 4.11368 3C3.81882 3 3.53603 3.11714 3.32753 3.32564C3.11902 3.53414 3.00189 3.81693 3.00189 4.11179C3.00189 4.40666 3.11902 4.68945 3.32753 4.89795L8.08876 9.64811L3.32753 14.3983C3.22374 14.5012 3.14137 14.6237 3.08516 14.7586C3.02894 14.8935 3 15.0383 3 15.1844C3 15.3306 3.02894 15.4753 3.08516 15.6103C3.14137 15.7452 3.22374 15.8676 3.32753 15.9706C3.43046 16.0744 3.55293 16.1567 3.68786 16.213C3.82279 16.2692 3.96751 16.2981 4.11368 16.2981C4.25986 16.2981 4.40458 16.2692 4.53951 16.213C4.67444 16.1567 4.79691 16.0744 4.89984 15.9706L9.65 11.2094L14.4002 15.9706C14.5031 16.0744 14.6256 16.1567 14.7605 16.213C14.8954 16.2692 15.0401 16.2981 15.1863 16.2981C15.3325 16.2981 15.4772 16.2692 15.6121 16.213C15.7471 16.1567 15.8695 16.0744 15.9725 15.9706C16.0763 15.8676 16.1586 15.7452 16.2148 15.6103C16.2711 15.4753 16.3 15.3306 16.3 15.1844C16.3 15.0383 16.2711 14.8935 16.2148 14.7586C16.1586 14.6237 16.0763 14.5012 15.9725 14.3983L11.2112 9.64811Z",
|
|
19
|
+
fill: "currentColor"
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
CloseIcon.displayName = "CloseIcon";
|
|
26
|
+
export {
|
|
27
|
+
CloseIcon
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=CloseIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CloseIcon.mjs","sources":["../../../src/components/Icons/CloseIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const CloseIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n className={cn(\"size-5\", className)}\n {...props}\n >\n <path\n d=\"M11.2112 9.64811L15.9725 4.89795C16.181 4.68945 16.2981 4.40666 16.2981 4.11179C16.2981 3.81693 16.181 3.53414 15.9725 3.32564C15.764 3.11714 15.4812 3 15.1863 3C14.8915 3 14.6087 3.11714 14.4002 3.32564L9.65 8.08687L4.89984 3.32564C4.69134 3.11714 4.40855 3 4.11368 3C3.81882 3 3.53603 3.11714 3.32753 3.32564C3.11902 3.53414 3.00189 3.81693 3.00189 4.11179C3.00189 4.40666 3.11902 4.68945 3.32753 4.89795L8.08876 9.64811L3.32753 14.3983C3.22374 14.5012 3.14137 14.6237 3.08516 14.7586C3.02894 14.8935 3 15.0383 3 15.1844C3 15.3306 3.02894 15.4753 3.08516 15.6103C3.14137 15.7452 3.22374 15.8676 3.32753 15.9706C3.43046 16.0744 3.55293 16.1567 3.68786 16.213C3.82279 16.2692 3.96751 16.2981 4.11368 16.2981C4.25986 16.2981 4.40458 16.2692 4.53951 16.213C4.67444 16.1567 4.79691 16.0744 4.89984 15.9706L9.65 11.2094L14.4002 15.9706C14.5031 16.0744 14.6256 16.1567 14.7605 16.213C14.8954 16.2692 15.0401 16.2981 15.1863 16.2981C15.3325 16.2981 15.4772 16.2692 15.6121 16.213C15.7471 16.1567 15.8695 16.0744 15.9725 15.9706C16.0763 15.8676 16.1586 15.7452 16.2148 15.6103C16.2711 15.4753 16.3 15.3306 16.3 15.1844C16.3 15.0383 16.2711 14.8935 16.2148 14.7586C16.1586 14.6237 16.0763 14.5012 15.9725 14.3983L11.2112 9.64811Z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n);\n\nCloseIcon.displayName = \"CloseIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,YAAY,MAAM;AAAA,EAC7B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,GAAE;AAAA,UACF,MAAK;AAAA,QAAA;AAAA,MAAA;AAAA,IACP;AAAA,EAAA;AAGN;AAEA,UAAU,cAAc;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const CrossIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
CrossIcon.displayName = "CrossIcon";
|
|
20
|
+
export {
|
|
21
|
+
CrossIcon
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=CrossIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrossIcon.mjs","sources":["../../../src/components/Icons/CrossIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const CrossIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n className={cn(\"size-5\", className)}\n {...props}\n >\n <path d=\"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z\" />\n </svg>\n ),\n);\n\nCrossIcon.displayName = \"CrossIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,YAAY,MAAM;AAAA,EAC7B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA,oBAAC,QAAA,EAAK,GAAE,qLAAA,CAAqL;AAAA,IAAA;AAAA,EAAA;AAGnM;AAEA,UAAU,cAAc;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../../utils/cn.mjs";
|
|
5
|
+
const CrownIcon = React.forwardRef(
|
|
6
|
+
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7
|
+
"svg",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
viewBox: "0 0 20 20",
|
|
11
|
+
fill: "currentColor",
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
className: cn("size-5", className),
|
|
14
|
+
...props,
|
|
15
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3.848 13.913 2 3.91l5.081 4.548L10.315 3l3.234 5.457 5.081-4.548-1.848 10.004H3.848Zm12.934 2.729c0 .546-.37.91-.924.91H4.772c-.555 0-.924-.364-.924-.91v-.91h12.934v.91Z" })
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
CrownIcon.displayName = "CrownIcon";
|
|
20
|
+
export {
|
|
21
|
+
CrownIcon
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=CrownIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrownIcon.mjs","sources":["../../../src/components/Icons/CrownIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"@/utils/cn\";\nimport type { IconProps } from \"./types\";\n\nexport const CrownIcon = React.forwardRef<SVGSVGElement, IconProps>(\n ({ className, ...props }, ref) => (\n <svg\n ref={ref}\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n className={cn(\"size-5\", className)}\n {...props}\n >\n <path d=\"M3.848 13.913 2 3.91l5.081 4.548L10.315 3l3.234 5.457 5.081-4.548-1.848 10.004H3.848Zm12.934 2.729c0 .546-.37.91-.924.91H4.772c-.555 0-.924-.364-.924-.91v-.91h12.934v.91Z\" />\n </svg>\n ),\n);\n\nCrownIcon.displayName = \"CrownIcon\";\n"],"names":[],"mappings":";;;;AAIO,MAAM,YAAY,MAAM;AAAA,EAC7B,CAAC,EAAE,WAAW,GAAG,MAAA,GAAS,QACxB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,eAAY;AAAA,MACZ,WAAW,GAAG,UAAU,SAAS;AAAA,MAChC,GAAG;AAAA,MAEJ,UAAA,oBAAC,QAAA,EAAK,GAAE,6KAAA,CAA6K;AAAA,IAAA;AAAA,EAAA;AAG3L;AAEA,UAAU,cAAc;"}
|