@helpwave/hightide 0.1.22 → 0.1.23
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 +5 -0
- package/dist/components/branding/HelpwaveBadge.js +8 -5
- package/dist/components/branding/HelpwaveBadge.js.map +1 -1
- package/dist/components/branding/HelpwaveBadge.mjs +8 -5
- package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.js +2912 -33
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.mjs +2941 -33
- package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Tag.js +2912 -1
- package/dist/components/icons-and-geometry/Tag.js.map +1 -1
- package/dist/components/icons-and-geometry/Tag.mjs +2931 -1
- package/dist/components/icons-and-geometry/Tag.mjs.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.d.mts +2 -1
- package/dist/components/layout-and-navigation/BreadCrumb.d.ts +2 -1
- package/dist/components/layout-and-navigation/BreadCrumb.js +15 -11
- package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.mjs +15 -11
- package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Chip.js +2 -2
- package/dist/components/layout-and-navigation/Chip.js.map +1 -1
- package/dist/components/layout-and-navigation/Chip.mjs +2 -2
- package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Tile.d.mts +9 -10
- package/dist/components/layout-and-navigation/Tile.d.ts +9 -10
- package/dist/components/layout-and-navigation/Tile.js +21 -4
- package/dist/components/layout-and-navigation/Tile.js.map +1 -1
- package/dist/components/layout-and-navigation/Tile.mjs +20 -4
- package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.js +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +21 -22
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +21 -22
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +21 -22
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +21 -22
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +1 -1
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +1 -1
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +1 -1
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +1 -1
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +0 -1
- package/dist/components/properties/MultiSelectProperty.d.ts +0 -1
- package/dist/components/properties/MultiSelectProperty.js +745 -740
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +752 -747
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +1 -1
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +1 -1
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +1 -1
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +1 -1
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +0 -1
- package/dist/components/properties/SelectProperty.d.ts +0 -1
- package/dist/components/properties/SelectProperty.js +24 -25
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +24 -25
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +1 -1
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +1 -1
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +0 -1
- package/dist/components/user-action/MultiSelect.d.ts +0 -1
- package/dist/components/user-action/MultiSelect.js +617 -612
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +635 -630
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/ScrollPicker.js +1 -1
- package/dist/components/user-action/ScrollPicker.js.map +1 -1
- package/dist/components/user-action/ScrollPicker.mjs +1 -1
- package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
- package/dist/components/user-action/Select.d.mts +1 -4
- package/dist/components/user-action/Select.d.ts +1 -4
- package/dist/components/user-action/Select.js +21 -24
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +21 -23
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/css/globals.css +175 -179
- package/dist/css/uncompiled/globals.css +3 -3
- package/dist/css/uncompiled/textstyles.css +5 -5
- package/dist/css/uncompiled/theme/colors-basic.css +13 -5
- package/dist/css/uncompiled/theme/colors-component.css +56 -41
- package/dist/css/uncompiled/theme/colors-semantic.css +76 -83
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3158 -371
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3030 -243
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -40,14 +40,16 @@ var import_lucide_react = require("lucide-react");
|
|
|
40
40
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
41
|
var Tile = ({
|
|
42
42
|
title,
|
|
43
|
+
titleClassName,
|
|
43
44
|
description,
|
|
45
|
+
descriptionClassName,
|
|
44
46
|
onClick,
|
|
45
47
|
isSelected = false,
|
|
46
48
|
disabled = false,
|
|
47
49
|
prefix,
|
|
48
50
|
suffix,
|
|
49
51
|
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
50
|
-
selectedClassName = "
|
|
52
|
+
selectedClassName = "bg-primary/20",
|
|
51
53
|
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
52
54
|
className
|
|
53
55
|
}) => {
|
|
@@ -57,7 +59,7 @@ var Tile = ({
|
|
|
57
59
|
className: (0, import_clsx.default)(
|
|
58
60
|
"flex-row-2 w-full items-center",
|
|
59
61
|
{
|
|
60
|
-
[normalClassName]:
|
|
62
|
+
[normalClassName]: onClick && !disabled,
|
|
61
63
|
[selectedClassName]: isSelected && !disabled,
|
|
62
64
|
[disabledClassName]: disabled
|
|
63
65
|
},
|
|
@@ -67,8 +69,8 @@ var Tile = ({
|
|
|
67
69
|
children: [
|
|
68
70
|
prefix,
|
|
69
71
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-col-0 w-full", children: [
|
|
70
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
|
71
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(titleClassName ?? "textstyle-title-normal"), children: title }),
|
|
73
|
+
!!description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(descriptionClassName ?? "textstyle-description"), children: description })
|
|
72
74
|
] }),
|
|
73
75
|
suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { size: 24 }) : void 0)
|
|
74
76
|
]
|
|
@@ -160,7 +162,8 @@ var HelpwaveBadge = ({
|
|
|
160
162
|
Tile,
|
|
161
163
|
{
|
|
162
164
|
prefix: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Helpwave, { size: iconSize }),
|
|
163
|
-
title
|
|
165
|
+
title,
|
|
166
|
+
titleClassName: size === "small" ? "textstyle-title-lg text-base" : "textstyle-title-xl",
|
|
164
167
|
className: (0, import_clsx3.default)(
|
|
165
168
|
{
|
|
166
169
|
"px-2 py-1 rounded-md": size === "small",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/branding/HelpwaveBadge.tsx","../../../src/components/layout-and-navigation/Tile.tsx","../../../src/components/icons-and-geometry/Helpwave.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { Tile } from '../layout-and-navigation/Tile'\nimport { Helpwave } from '../icons-and-geometry/Helpwave'\n\ntype Size = 'small' | 'large'\n\nexport type HelpwaveBadgeProps = {\n size?: Size,\n title?: string,\n className?: string,\n}\n\n/**\n * A Badge with the helpwave logo and the helpwave name\n */\nexport const HelpwaveBadge = ({\n size = 'small',\n title = 'helpwave',\n className = ''\n }: HelpwaveBadgeProps) => {\n const iconSize: number = size === 'small' ? 24 : 64\n\n return (\n <Tile\n prefix={(<Helpwave size={iconSize}/>)}\n title={{
|
|
1
|
+
{"version":3,"sources":["../../../src/components/branding/HelpwaveBadge.tsx","../../../src/components/layout-and-navigation/Tile.tsx","../../../src/components/icons-and-geometry/Helpwave.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { Tile } from '../layout-and-navigation/Tile'\nimport { Helpwave } from '../icons-and-geometry/Helpwave'\n\ntype Size = 'small' | 'large'\n\nexport type HelpwaveBadgeProps = {\n size?: Size,\n title?: string,\n className?: string,\n}\n\n/**\n * A Badge with the helpwave logo and the helpwave name\n */\nexport const HelpwaveBadge = ({\n size = 'small',\n title = 'helpwave',\n className = ''\n }: HelpwaveBadgeProps) => {\n const iconSize: number = size === 'small' ? 24 : 64\n\n return (\n <Tile\n prefix={(<Helpwave size={iconSize}/>)}\n title={title}\n titleClassName={size === 'small' ? 'textstyle-title-lg text-base' : 'textstyle-title-xl'}\n className={clsx(\n {\n 'px-2 py-1 rounded-md': size === 'small',\n 'px-4 py-1 rounded-md': size === 'large',\n }, className\n )}\n />\n )\n}\n","import type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { Check } from 'lucide-react'\n\nexport type TileProps = {\n title: ReactNode,\n titleClassName?: string,\n description?: ReactNode,\n descriptionClassName?: string,\n onClick?: () => void,\n disabled?: boolean,\n isSelected?: boolean,\n isListItem?: boolean,\n prefix?: ReactNode,\n suffix?: ReactNode,\n className?: string,\n normalClassName?: string,\n selectedClassName?: string,\n disabledClassName?: string,\n}\n\n/**\n * A component for creating a tile similar to the flutter ListTile\n */\nexport const Tile = ({\n title,\n titleClassName,\n description,\n descriptionClassName,\n onClick,\n isSelected = false,\n disabled = false,\n prefix,\n suffix,\n normalClassName = 'hover:bg-primary/40 cursor-pointer',\n selectedClassName = 'bg-primary/20',\n disabledClassName = 'text-disabled-text bg-disabled-background cursor-not-allowed',\n className\n }: TileProps) => {\n return (\n <div\n className={clsx(\n 'flex-row-2 w-full items-center',\n {\n [normalClassName]: onClick && !disabled,\n [selectedClassName]: isSelected && !disabled,\n [disabledClassName]: disabled,\n },\n className\n )}\n onClick={disabled ? undefined : onClick}\n >\n {prefix}\n <div className=\"flex-col-0 w-full\">\n <span className={clsx(titleClassName ?? ('textstyle-title-normal'))}>{title}</span>\n {!!description &&\n <span className={clsx(descriptionClassName ?? 'textstyle-description')}>{description}</span>}\n </div>\n {suffix ?? (isSelected ? (<Check size={24}/>) : undefined)}\n </div>\n )\n}\n\nexport type ListTileProps = TileProps\n\nexport const ListTile = ({\n ...props\n}: ListTileProps) => {\n return (\n <Tile\n {...props}\n titleClassName={props.titleClassName ?? 'font-semibold'}\n className={clsx('px-2 py-1 rounded-md', props.className)}\n disabledClassName={props.disabledClassName ?? 'text-disabled-text cursor-not-allowed'}\n />\n )\n}\n","import type { SVGProps } from 'react'\nimport { clsx } from 'clsx'\n\nexport type HelpwaveProps = SVGProps<SVGSVGElement> & {\n color?: string,\n animate?: 'none' | 'loading' | 'pulse' | 'bounce',\n size?: number,\n}\n\n/**\n * The helpwave loading spinner based on the svg logo.\n */\nexport const Helpwave = ({\n color = 'currentColor',\n animate = 'none',\n size = 64,\n ...props\n }: HelpwaveProps) => {\n const isLoadingAnimation = animate === 'loading'\n let svgAnimationKey = ''\n\n if (animate === 'pulse') {\n svgAnimationKey = 'animate-pulse'\n } else if (animate === 'bounce') {\n svgAnimationKey = 'animate-bounce'\n }\n\n if (size < 0) {\n console.error('size cannot be less than 0')\n size = 64\n }\n\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 888 888\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeWidth={48}\n {...props}\n >\n <g className={clsx(svgAnimationKey)}>\n <path className={clsx({ 'animate-wave-big-left-up': isLoadingAnimation })}\n d=\"M144 543.235C144 423.259 232.164 326 340.92 326\" stroke={color} strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-big-right-down': isLoadingAnimation })}\n d=\"M537.84 544.104C429.084 544.104 340.92 446.844 340.92 326.869\" stroke={color} strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-small-left-up': isLoadingAnimation })}\n d=\"M462.223 518.035C462.223 432.133 525.348 362.495 603.217 362.495\" stroke={color}\n strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-small-right-down': isLoadingAnimation })}\n d=\"M745.001 519.773C666.696 519.773 603.218 450.136 603.218 364.233\" stroke={color}\n strokeDasharray=\"1000\"/>\n </g>\n </svg>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,eAAiB;;;ACCjB,kBAAiB;AACjB,0BAAsB;AAmDhB;AA7BC,IAAM,OAAO,CAAC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,WAAW;AAAA,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jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
var Tile = ({
|
|
9
9
|
title,
|
|
10
|
+
titleClassName,
|
|
10
11
|
description,
|
|
12
|
+
descriptionClassName,
|
|
11
13
|
onClick,
|
|
12
14
|
isSelected = false,
|
|
13
15
|
disabled = false,
|
|
14
16
|
prefix,
|
|
15
17
|
suffix,
|
|
16
18
|
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
17
|
-
selectedClassName = "
|
|
19
|
+
selectedClassName = "bg-primary/20",
|
|
18
20
|
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
19
21
|
className
|
|
20
22
|
}) => {
|
|
@@ -24,7 +26,7 @@ var Tile = ({
|
|
|
24
26
|
className: clsx(
|
|
25
27
|
"flex-row-2 w-full items-center",
|
|
26
28
|
{
|
|
27
|
-
[normalClassName]:
|
|
29
|
+
[normalClassName]: onClick && !disabled,
|
|
28
30
|
[selectedClassName]: isSelected && !disabled,
|
|
29
31
|
[disabledClassName]: disabled
|
|
30
32
|
},
|
|
@@ -34,8 +36,8 @@ var Tile = ({
|
|
|
34
36
|
children: [
|
|
35
37
|
prefix,
|
|
36
38
|
/* @__PURE__ */ jsxs("div", { className: "flex-col-0 w-full", children: [
|
|
37
|
-
/* @__PURE__ */ jsx("
|
|
38
|
-
!!description && /* @__PURE__ */ jsx("span", { className: clsx(
|
|
39
|
+
/* @__PURE__ */ jsx("span", { className: clsx(titleClassName ?? "textstyle-title-normal"), children: title }),
|
|
40
|
+
!!description && /* @__PURE__ */ jsx("span", { className: clsx(descriptionClassName ?? "textstyle-description"), children: description })
|
|
39
41
|
] }),
|
|
40
42
|
suffix ?? (isSelected ? /* @__PURE__ */ jsx(Check, { size: 24 }) : void 0)
|
|
41
43
|
]
|
|
@@ -127,7 +129,8 @@ var HelpwaveBadge = ({
|
|
|
127
129
|
Tile,
|
|
128
130
|
{
|
|
129
131
|
prefix: /* @__PURE__ */ jsx3(Helpwave, { size: iconSize }),
|
|
130
|
-
title
|
|
132
|
+
title,
|
|
133
|
+
titleClassName: size === "small" ? "textstyle-title-lg text-base" : "textstyle-title-xl",
|
|
131
134
|
className: clsx3(
|
|
132
135
|
{
|
|
133
136
|
"px-2 py-1 rounded-md": size === "small",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/branding/HelpwaveBadge.tsx","../../../src/components/layout-and-navigation/Tile.tsx","../../../src/components/icons-and-geometry/Helpwave.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { Tile } from '../layout-and-navigation/Tile'\nimport { Helpwave } from '../icons-and-geometry/Helpwave'\n\ntype Size = 'small' | 'large'\n\nexport type HelpwaveBadgeProps = {\n size?: Size,\n title?: string,\n className?: string,\n}\n\n/**\n * A Badge with the helpwave logo and the helpwave name\n */\nexport const HelpwaveBadge = ({\n size = 'small',\n title = 'helpwave',\n className = ''\n }: HelpwaveBadgeProps) => {\n const iconSize: number = size === 'small' ? 24 : 64\n\n return (\n <Tile\n prefix={(<Helpwave size={iconSize}/>)}\n title={{
|
|
1
|
+
{"version":3,"sources":["../../../src/components/branding/HelpwaveBadge.tsx","../../../src/components/layout-and-navigation/Tile.tsx","../../../src/components/icons-and-geometry/Helpwave.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport { Tile } from '../layout-and-navigation/Tile'\nimport { Helpwave } from '../icons-and-geometry/Helpwave'\n\ntype Size = 'small' | 'large'\n\nexport type HelpwaveBadgeProps = {\n size?: Size,\n title?: string,\n className?: string,\n}\n\n/**\n * A Badge with the helpwave logo and the helpwave name\n */\nexport const HelpwaveBadge = ({\n size = 'small',\n title = 'helpwave',\n className = ''\n }: HelpwaveBadgeProps) => {\n const iconSize: number = size === 'small' ? 24 : 64\n\n return (\n <Tile\n prefix={(<Helpwave size={iconSize}/>)}\n title={title}\n titleClassName={size === 'small' ? 'textstyle-title-lg text-base' : 'textstyle-title-xl'}\n className={clsx(\n {\n 'px-2 py-1 rounded-md': size === 'small',\n 'px-4 py-1 rounded-md': size === 'large',\n }, className\n )}\n />\n )\n}\n","import type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { Check } from 'lucide-react'\n\nexport type TileProps = {\n title: ReactNode,\n titleClassName?: string,\n description?: ReactNode,\n descriptionClassName?: string,\n onClick?: () => void,\n disabled?: boolean,\n isSelected?: boolean,\n isListItem?: boolean,\n prefix?: ReactNode,\n suffix?: ReactNode,\n className?: string,\n normalClassName?: string,\n selectedClassName?: string,\n disabledClassName?: string,\n}\n\n/**\n * A component for creating a tile similar to the flutter ListTile\n */\nexport const Tile = ({\n title,\n titleClassName,\n description,\n descriptionClassName,\n onClick,\n isSelected = false,\n disabled = false,\n prefix,\n suffix,\n normalClassName = 'hover:bg-primary/40 cursor-pointer',\n selectedClassName = 'bg-primary/20',\n disabledClassName = 'text-disabled-text bg-disabled-background cursor-not-allowed',\n className\n }: TileProps) => {\n return (\n <div\n className={clsx(\n 'flex-row-2 w-full items-center',\n {\n [normalClassName]: onClick && !disabled,\n [selectedClassName]: isSelected && !disabled,\n [disabledClassName]: disabled,\n },\n className\n )}\n onClick={disabled ? undefined : onClick}\n >\n {prefix}\n <div className=\"flex-col-0 w-full\">\n <span className={clsx(titleClassName ?? ('textstyle-title-normal'))}>{title}</span>\n {!!description &&\n <span className={clsx(descriptionClassName ?? 'textstyle-description')}>{description}</span>}\n </div>\n {suffix ?? (isSelected ? (<Check size={24}/>) : undefined)}\n </div>\n )\n}\n\nexport type ListTileProps = TileProps\n\nexport const ListTile = ({\n ...props\n}: ListTileProps) => {\n return (\n <Tile\n {...props}\n titleClassName={props.titleClassName ?? 'font-semibold'}\n className={clsx('px-2 py-1 rounded-md', props.className)}\n disabledClassName={props.disabledClassName ?? 'text-disabled-text cursor-not-allowed'}\n />\n )\n}\n","import type { SVGProps } from 'react'\nimport { clsx } from 'clsx'\n\nexport type HelpwaveProps = SVGProps<SVGSVGElement> & {\n color?: string,\n animate?: 'none' | 'loading' | 'pulse' | 'bounce',\n size?: number,\n}\n\n/**\n * The helpwave loading spinner based on the svg logo.\n */\nexport const Helpwave = ({\n color = 'currentColor',\n animate = 'none',\n size = 64,\n ...props\n }: HelpwaveProps) => {\n const isLoadingAnimation = animate === 'loading'\n let svgAnimationKey = ''\n\n if (animate === 'pulse') {\n svgAnimationKey = 'animate-pulse'\n } else if (animate === 'bounce') {\n svgAnimationKey = 'animate-bounce'\n }\n\n if (size < 0) {\n console.error('size cannot be less than 0')\n size = 64\n }\n\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 888 888\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeWidth={48}\n {...props}\n >\n <g className={clsx(svgAnimationKey)}>\n <path className={clsx({ 'animate-wave-big-left-up': isLoadingAnimation })}\n d=\"M144 543.235C144 423.259 232.164 326 340.92 326\" stroke={color} strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-big-right-down': isLoadingAnimation })}\n d=\"M537.84 544.104C429.084 544.104 340.92 446.844 340.92 326.869\" stroke={color} strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-small-left-up': isLoadingAnimation })}\n d=\"M462.223 518.035C462.223 432.133 525.348 362.495 603.217 362.495\" stroke={color}\n strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-small-right-down': isLoadingAnimation })}\n d=\"M745.001 519.773C666.696 519.773 603.218 450.136 603.218 364.233\" stroke={color}\n strokeDasharray=\"1000\"/>\n </g>\n </svg>\n )\n}\n"],"mappings":";AAAA,OAAOA,WAAU;;;ACCjB,OAAO,UAAU;AACjB,SAAS,aAAa;AAmDhB,SACE,KADF;AA7BC,IAAM,OAAO,CAAC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB;AACF,MAAiB;AACpC,SACE;AAAA,IAAC;AAAA;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