@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
|
@@ -71,7 +71,7 @@ var Chip = ({
|
|
|
71
71
|
{
|
|
72
72
|
...restProps,
|
|
73
73
|
className: (0, import_clsx.default)(
|
|
74
|
-
`row w-fit px-2 py-1`,
|
|
74
|
+
`row w-fit px-2 py-1 font-semibold`,
|
|
75
75
|
colorMapping,
|
|
76
76
|
{
|
|
77
77
|
"rounded-md": variant === "normal",
|
|
@@ -94,7 +94,7 @@ var ChipList = ({
|
|
|
94
94
|
Chip,
|
|
95
95
|
{
|
|
96
96
|
...value,
|
|
97
|
-
color: value.color ?? "
|
|
97
|
+
color: value.color ?? "default",
|
|
98
98
|
variant: value.variant ?? "normal",
|
|
99
99
|
children: value.children
|
|
100
100
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layout-and-navigation/Chip.tsx"],"sourcesContent":["import type { HTMLProps, PropsWithChildren, ReactNode } from 'react'\nimport clsx from 'clsx'\n\nconst chipColors = ['default', 'dark', 'red', 'yellow', 'green', 'blue', 'pink'] as const\nexport type ChipColor = typeof chipColors[number]\n\ntype ChipVariant = 'normal' | 'fullyRounded'\n\nexport const ChipUtil = {\n colors: chipColors,\n}\n\nexport type ChipProps = HTMLProps<HTMLDivElement> & PropsWithChildren<{\n color?: ChipColor,\n variant?: ChipVariant,\n trailingIcon?: ReactNode,\n}>\n\n/**\n * A component for displaying a single chip\n */\nexport const Chip = ({\n children,\n trailingIcon,\n color = 'default',\n variant = 'normal',\n className = '',\n ...restProps\n }: ChipProps) => {\n const colorMapping: string = {\n default: 'text-tag-default-text bg-tag-default-background',\n dark: 'text-tag-dark-text bg-tag-dark-background',\n red: 'text-tag-red-text bg-tag-red-background',\n yellow: 'text-tag-yellow-text bg-tag-yellow-background',\n green: 'text-tag-green-text bg-tag-green-background',\n blue: 'text-tag-blue-text bg-tag-blue-background',\n pink: 'text-tag-pink-text bg-tag-pink-background',\n }[color]\n\n const colorMappingIcon: string = {\n default: 'text-tag-default-icon',\n dark: 'text-tag-dark-icon',\n red: 'text-tag-red-icon',\n yellow: 'text-tag-yellow-icon',\n green: 'text-tag-green-icon',\n blue: 'text-tag-blue-icon',\n pink: 'text-tag-pink-icon',\n }[color]\n\n return (\n <div\n {...restProps}\n className={clsx(\n `row w-fit px-2 py-1`,\n colorMapping,\n {\n 'rounded-md': variant === 'normal',\n 'rounded-full': variant === 'fullyRounded',\n },\n className\n )}\n >\n {children}\n {trailingIcon && (<span className={colorMappingIcon}>{trailingIcon}</span>)}\n </div>\n )\n}\n\nexport type ChipListProps = {\n list: ChipProps[],\n className?: string,\n}\n\n/**\n * A component for displaying a list of chips\n */\nexport const ChipList = ({\n list,\n className = ''\n }: ChipListProps) => {\n return (\n <div className={clsx('flex flex-wrap gap-x-2 gap-y-2', className)}>\n {list.map((value, index) => (\n <Chip\n key={index}\n {...value}\n color={value.color ?? '
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layout-and-navigation/Chip.tsx"],"sourcesContent":["import type { HTMLProps, PropsWithChildren, ReactNode } from 'react'\nimport clsx from 'clsx'\n\nconst chipColors = ['default', 'dark', 'red', 'yellow', 'green', 'blue', 'pink'] as const\nexport type ChipColor = typeof chipColors[number]\n\ntype ChipVariant = 'normal' | 'fullyRounded'\n\nexport const ChipUtil = {\n colors: chipColors,\n}\n\nexport type ChipProps = HTMLProps<HTMLDivElement> & PropsWithChildren<{\n color?: ChipColor,\n variant?: ChipVariant,\n trailingIcon?: ReactNode,\n}>\n\n/**\n * A component for displaying a single chip\n */\nexport const Chip = ({\n children,\n trailingIcon,\n color = 'default',\n variant = 'normal',\n className = '',\n ...restProps\n }: ChipProps) => {\n const colorMapping: string = {\n default: 'text-tag-default-text bg-tag-default-background',\n dark: 'text-tag-dark-text bg-tag-dark-background',\n red: 'text-tag-red-text bg-tag-red-background',\n yellow: 'text-tag-yellow-text bg-tag-yellow-background',\n green: 'text-tag-green-text bg-tag-green-background',\n blue: 'text-tag-blue-text bg-tag-blue-background',\n pink: 'text-tag-pink-text bg-tag-pink-background',\n }[color]\n\n const colorMappingIcon: string = {\n default: 'text-tag-default-icon',\n dark: 'text-tag-dark-icon',\n red: 'text-tag-red-icon',\n yellow: 'text-tag-yellow-icon',\n green: 'text-tag-green-icon',\n blue: 'text-tag-blue-icon',\n pink: 'text-tag-pink-icon',\n }[color]\n\n return (\n <div\n {...restProps}\n className={clsx(\n `row w-fit px-2 py-1 font-semibold`,\n colorMapping,\n {\n 'rounded-md': variant === 'normal',\n 'rounded-full': variant === 'fullyRounded',\n },\n className\n )}\n >\n {children}\n {trailingIcon && (<span className={colorMappingIcon}>{trailingIcon}</span>)}\n </div>\n )\n}\n\nexport type ChipListProps = {\n list: ChipProps[],\n className?: string,\n}\n\n/**\n * A component for displaying a list of chips\n */\nexport const ChipList = ({\n list,\n className = ''\n }: ChipListProps) => {\n return (\n <div className={clsx('flex flex-wrap gap-x-2 gap-y-2', className)}>\n {list.map((value, index) => (\n <Chip\n key={index}\n {...value}\n color={value.color ?? 'default'}\n variant={value.variant ?? 'normal'}\n >\n {value.children}\n </Chip>\n ))}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAiB;AAiDb;AA/CJ,IAAM,aAAa,CAAC,WAAW,QAAQ,OAAO,UAAU,SAAS,QAAQ,MAAM;AAKxE,IAAM,WAAW;AAAA,EACtB,QAAQ;AACV;AAWO,IAAM,OAAO,CAAC;AAAA,EACE;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,GAAG;AACL,MAAiB;AACpC,QAAM,eAAuB;AAAA,IAC3B,SAAS;AAAA,IACT,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EACR,EAAE,KAAK;AAEP,QAAM,mBAA2B;AAAA,IAC/B,SAAS;AAAA,IACT,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EACR,EAAE,KAAK;AAEP,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,YAAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,UACE,cAAc,YAAY;AAAA,UAC1B,gBAAgB,YAAY;AAAA,QAC9B;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,QACA,gBAAiB,4CAAC,UAAK,WAAW,kBAAmB,wBAAa;AAAA;AAAA;AAAA,EACrE;AAEJ;AAUO,IAAM,WAAW,CAAC;AAAA,EACE;AAAA,EACA,YAAY;AACd,MAAqB;AAC5C,SACE,4CAAC,SAAI,eAAW,YAAAA,SAAK,kCAAkC,SAAS,GAC7D,eAAK,IAAI,CAAC,OAAO,UAChB;AAAA,IAAC;AAAA;AAAA,MAEE,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS;AAAA,MACtB,SAAS,MAAM,WAAW;AAAA,MAEzB,gBAAM;AAAA;AAAA,IALF;AAAA,EAMP,CACD,GACH;AAEJ;","names":["clsx"]}
|
|
@@ -36,7 +36,7 @@ var Chip = ({
|
|
|
36
36
|
{
|
|
37
37
|
...restProps,
|
|
38
38
|
className: clsx(
|
|
39
|
-
`row w-fit px-2 py-1`,
|
|
39
|
+
`row w-fit px-2 py-1 font-semibold`,
|
|
40
40
|
colorMapping,
|
|
41
41
|
{
|
|
42
42
|
"rounded-md": variant === "normal",
|
|
@@ -59,7 +59,7 @@ var ChipList = ({
|
|
|
59
59
|
Chip,
|
|
60
60
|
{
|
|
61
61
|
...value,
|
|
62
|
-
color: value.color ?? "
|
|
62
|
+
color: value.color ?? "default",
|
|
63
63
|
variant: value.variant ?? "normal",
|
|
64
64
|
children: value.children
|
|
65
65
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layout-and-navigation/Chip.tsx"],"sourcesContent":["import type { HTMLProps, PropsWithChildren, ReactNode } from 'react'\nimport clsx from 'clsx'\n\nconst chipColors = ['default', 'dark', 'red', 'yellow', 'green', 'blue', 'pink'] as const\nexport type ChipColor = typeof chipColors[number]\n\ntype ChipVariant = 'normal' | 'fullyRounded'\n\nexport const ChipUtil = {\n colors: chipColors,\n}\n\nexport type ChipProps = HTMLProps<HTMLDivElement> & PropsWithChildren<{\n color?: ChipColor,\n variant?: ChipVariant,\n trailingIcon?: ReactNode,\n}>\n\n/**\n * A component for displaying a single chip\n */\nexport const Chip = ({\n children,\n trailingIcon,\n color = 'default',\n variant = 'normal',\n className = '',\n ...restProps\n }: ChipProps) => {\n const colorMapping: string = {\n default: 'text-tag-default-text bg-tag-default-background',\n dark: 'text-tag-dark-text bg-tag-dark-background',\n red: 'text-tag-red-text bg-tag-red-background',\n yellow: 'text-tag-yellow-text bg-tag-yellow-background',\n green: 'text-tag-green-text bg-tag-green-background',\n blue: 'text-tag-blue-text bg-tag-blue-background',\n pink: 'text-tag-pink-text bg-tag-pink-background',\n }[color]\n\n const colorMappingIcon: string = {\n default: 'text-tag-default-icon',\n dark: 'text-tag-dark-icon',\n red: 'text-tag-red-icon',\n yellow: 'text-tag-yellow-icon',\n green: 'text-tag-green-icon',\n blue: 'text-tag-blue-icon',\n pink: 'text-tag-pink-icon',\n }[color]\n\n return (\n <div\n {...restProps}\n className={clsx(\n `row w-fit px-2 py-1`,\n colorMapping,\n {\n 'rounded-md': variant === 'normal',\n 'rounded-full': variant === 'fullyRounded',\n },\n className\n )}\n >\n {children}\n {trailingIcon && (<span className={colorMappingIcon}>{trailingIcon}</span>)}\n </div>\n )\n}\n\nexport type ChipListProps = {\n list: ChipProps[],\n className?: string,\n}\n\n/**\n * A component for displaying a list of chips\n */\nexport const ChipList = ({\n list,\n className = ''\n }: ChipListProps) => {\n return (\n <div className={clsx('flex flex-wrap gap-x-2 gap-y-2', className)}>\n {list.map((value, index) => (\n <Chip\n key={index}\n {...value}\n color={value.color ?? '
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layout-and-navigation/Chip.tsx"],"sourcesContent":["import type { HTMLProps, PropsWithChildren, ReactNode } from 'react'\nimport clsx from 'clsx'\n\nconst chipColors = ['default', 'dark', 'red', 'yellow', 'green', 'blue', 'pink'] as const\nexport type ChipColor = typeof chipColors[number]\n\ntype ChipVariant = 'normal' | 'fullyRounded'\n\nexport const ChipUtil = {\n colors: chipColors,\n}\n\nexport type ChipProps = HTMLProps<HTMLDivElement> & PropsWithChildren<{\n color?: ChipColor,\n variant?: ChipVariant,\n trailingIcon?: ReactNode,\n}>\n\n/**\n * A component for displaying a single chip\n */\nexport const Chip = ({\n children,\n trailingIcon,\n color = 'default',\n variant = 'normal',\n className = '',\n ...restProps\n }: ChipProps) => {\n const colorMapping: string = {\n default: 'text-tag-default-text bg-tag-default-background',\n dark: 'text-tag-dark-text bg-tag-dark-background',\n red: 'text-tag-red-text bg-tag-red-background',\n yellow: 'text-tag-yellow-text bg-tag-yellow-background',\n green: 'text-tag-green-text bg-tag-green-background',\n blue: 'text-tag-blue-text bg-tag-blue-background',\n pink: 'text-tag-pink-text bg-tag-pink-background',\n }[color]\n\n const colorMappingIcon: string = {\n default: 'text-tag-default-icon',\n dark: 'text-tag-dark-icon',\n red: 'text-tag-red-icon',\n yellow: 'text-tag-yellow-icon',\n green: 'text-tag-green-icon',\n blue: 'text-tag-blue-icon',\n pink: 'text-tag-pink-icon',\n }[color]\n\n return (\n <div\n {...restProps}\n className={clsx(\n `row w-fit px-2 py-1 font-semibold`,\n colorMapping,\n {\n 'rounded-md': variant === 'normal',\n 'rounded-full': variant === 'fullyRounded',\n },\n className\n )}\n >\n {children}\n {trailingIcon && (<span className={colorMappingIcon}>{trailingIcon}</span>)}\n </div>\n )\n}\n\nexport type ChipListProps = {\n list: ChipProps[],\n className?: string,\n}\n\n/**\n * A component for displaying a list of chips\n */\nexport const ChipList = ({\n list,\n className = ''\n }: ChipListProps) => {\n return (\n <div className={clsx('flex flex-wrap gap-x-2 gap-y-2', className)}>\n {list.map((value, index) => (\n <Chip\n key={index}\n {...value}\n color={value.color ?? 'default'}\n variant={value.variant ?? 'normal'}\n >\n {value.children}\n </Chip>\n ))}\n </div>\n )\n}\n"],"mappings":";AACA,OAAO,UAAU;AAiDb,SAaoB,KAbpB;AA/CJ,IAAM,aAAa,CAAC,WAAW,QAAQ,OAAO,UAAU,SAAS,QAAQ,MAAM;AAKxE,IAAM,WAAW;AAAA,EACtB,QAAQ;AACV;AAWO,IAAM,OAAO,CAAC;AAAA,EACE;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,GAAG;AACL,MAAiB;AACpC,QAAM,eAAuB;AAAA,IAC3B,SAAS;AAAA,IACT,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EACR,EAAE,KAAK;AAEP,QAAM,mBAA2B;AAAA,IAC/B,SAAS;AAAA,IACT,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,EACR,EAAE,KAAK;AAEP,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,UACE,cAAc,YAAY;AAAA,UAC1B,gBAAgB,YAAY;AAAA,QAC9B;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,QACA,gBAAiB,oBAAC,UAAK,WAAW,kBAAmB,wBAAa;AAAA;AAAA;AAAA,EACrE;AAEJ;AAUO,IAAM,WAAW,CAAC;AAAA,EACE;AAAA,EACA,YAAY;AACd,MAAqB;AAC5C,SACE,oBAAC,SAAI,WAAW,KAAK,kCAAkC,SAAS,GAC7D,eAAK,IAAI,CAAC,OAAO,UAChB;AAAA,IAAC;AAAA;AAAA,MAEE,GAAG;AAAA,MACJ,OAAO,MAAM,SAAS;AAAA,MACtB,SAAS,MAAM,WAAW;AAAA,MAEzB,gBAAM;AAAA;AAAA,IALF;AAAA,EAMP,CACD,GACH;AAEJ;","names":[]}
|
|
@@ -2,17 +2,14 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type TileProps = {
|
|
5
|
-
title:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
description?: {
|
|
10
|
-
value: ReactNode;
|
|
11
|
-
className?: string;
|
|
12
|
-
};
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
titleClassName?: string;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
descriptionClassName?: string;
|
|
13
9
|
onClick?: () => void;
|
|
14
10
|
disabled?: boolean;
|
|
15
11
|
isSelected?: boolean;
|
|
12
|
+
isListItem?: boolean;
|
|
16
13
|
prefix?: ReactNode;
|
|
17
14
|
suffix?: ReactNode;
|
|
18
15
|
className?: string;
|
|
@@ -23,6 +20,8 @@ type TileProps = {
|
|
|
23
20
|
/**
|
|
24
21
|
* A component for creating a tile similar to the flutter ListTile
|
|
25
22
|
*/
|
|
26
|
-
declare const Tile: ({ title, description, onClick, isSelected, disabled, prefix, suffix, normalClassName, selectedClassName, disabledClassName, className }: TileProps) => react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare const Tile: ({ title, titleClassName, description, descriptionClassName, onClick, isSelected, disabled, prefix, suffix, normalClassName, selectedClassName, disabledClassName, className }: TileProps) => react_jsx_runtime.JSX.Element;
|
|
24
|
+
type ListTileProps = TileProps;
|
|
25
|
+
declare const ListTile: ({ ...props }: ListTileProps) => react_jsx_runtime.JSX.Element;
|
|
27
26
|
|
|
28
|
-
export { Tile, type TileProps };
|
|
27
|
+
export { ListTile, type ListTileProps, Tile, type TileProps };
|
|
@@ -2,17 +2,14 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
type TileProps = {
|
|
5
|
-
title:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
description?: {
|
|
10
|
-
value: ReactNode;
|
|
11
|
-
className?: string;
|
|
12
|
-
};
|
|
5
|
+
title: ReactNode;
|
|
6
|
+
titleClassName?: string;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
descriptionClassName?: string;
|
|
13
9
|
onClick?: () => void;
|
|
14
10
|
disabled?: boolean;
|
|
15
11
|
isSelected?: boolean;
|
|
12
|
+
isListItem?: boolean;
|
|
16
13
|
prefix?: ReactNode;
|
|
17
14
|
suffix?: ReactNode;
|
|
18
15
|
className?: string;
|
|
@@ -23,6 +20,8 @@ type TileProps = {
|
|
|
23
20
|
/**
|
|
24
21
|
* A component for creating a tile similar to the flutter ListTile
|
|
25
22
|
*/
|
|
26
|
-
declare const Tile: ({ title, description, onClick, isSelected, disabled, prefix, suffix, normalClassName, selectedClassName, disabledClassName, className }: TileProps) => react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare const Tile: ({ title, titleClassName, description, descriptionClassName, onClick, isSelected, disabled, prefix, suffix, normalClassName, selectedClassName, disabledClassName, className }: TileProps) => react_jsx_runtime.JSX.Element;
|
|
24
|
+
type ListTileProps = TileProps;
|
|
25
|
+
declare const ListTile: ({ ...props }: ListTileProps) => react_jsx_runtime.JSX.Element;
|
|
27
26
|
|
|
28
|
-
export { Tile, type TileProps };
|
|
27
|
+
export { ListTile, type ListTileProps, Tile, type TileProps };
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/layout-and-navigation/Tile.tsx
|
|
30
30
|
var Tile_exports = {};
|
|
31
31
|
__export(Tile_exports, {
|
|
32
|
+
ListTile: () => ListTile,
|
|
32
33
|
Tile: () => Tile
|
|
33
34
|
});
|
|
34
35
|
module.exports = __toCommonJS(Tile_exports);
|
|
@@ -37,14 +38,16 @@ var import_lucide_react = require("lucide-react");
|
|
|
37
38
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
39
|
var Tile = ({
|
|
39
40
|
title,
|
|
41
|
+
titleClassName,
|
|
40
42
|
description,
|
|
43
|
+
descriptionClassName,
|
|
41
44
|
onClick,
|
|
42
45
|
isSelected = false,
|
|
43
46
|
disabled = false,
|
|
44
47
|
prefix,
|
|
45
48
|
suffix,
|
|
46
49
|
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
47
|
-
selectedClassName = "
|
|
50
|
+
selectedClassName = "bg-primary/20",
|
|
48
51
|
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
49
52
|
className
|
|
50
53
|
}) => {
|
|
@@ -54,7 +57,7 @@ var Tile = ({
|
|
|
54
57
|
className: (0, import_clsx.default)(
|
|
55
58
|
"flex-row-2 w-full items-center",
|
|
56
59
|
{
|
|
57
|
-
[normalClassName]:
|
|
60
|
+
[normalClassName]: onClick && !disabled,
|
|
58
61
|
[selectedClassName]: isSelected && !disabled,
|
|
59
62
|
[disabledClassName]: disabled
|
|
60
63
|
},
|
|
@@ -64,16 +67,30 @@ var Tile = ({
|
|
|
64
67
|
children: [
|
|
65
68
|
prefix,
|
|
66
69
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-col-0 w-full", children: [
|
|
67
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("
|
|
68
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(titleClassName ?? "textstyle-title-normal"), children: title }),
|
|
71
|
+
!!description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_clsx.default)(descriptionClassName ?? "textstyle-description"), children: description })
|
|
69
72
|
] }),
|
|
70
73
|
suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { size: 24 }) : void 0)
|
|
71
74
|
]
|
|
72
75
|
}
|
|
73
76
|
);
|
|
74
77
|
};
|
|
78
|
+
var ListTile = ({
|
|
79
|
+
...props
|
|
80
|
+
}) => {
|
|
81
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
82
|
+
Tile,
|
|
83
|
+
{
|
|
84
|
+
...props,
|
|
85
|
+
titleClassName: props.titleClassName ?? "font-semibold",
|
|
86
|
+
className: (0, import_clsx.default)("px-2 py-1 rounded-md", props.className),
|
|
87
|
+
disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
};
|
|
75
91
|
// Annotate the CommonJS export names for ESM import in node:
|
|
76
92
|
0 && (module.exports = {
|
|
93
|
+
ListTile,
|
|
77
94
|
Tile
|
|
78
95
|
});
|
|
79
96
|
//# sourceMappingURL=Tile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layout-and-navigation/Tile.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { Check } from 'lucide-react'\n\nexport type TileProps = {\n title:
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layout-and-navigation/Tile.tsx"],"sourcesContent":["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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,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,EACX;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,oBAAoB;AAAA,EACpB;AACF,MAAiB;AACpC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW,YAAAA;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,eAAe,GAAG,WAAW,CAAC;AAAA,UAC/B,CAAC,iBAAiB,GAAG,cAAc,CAAC;AAAA,UACpC,CAAC,iBAAiB,GAAG;AAAA,QACvB;AAAA,QACA;AAAA,MACF;AAAA,MACA,SAAS,WAAW,SAAY;AAAA,MAE/B;AAAA;AAAA,QACD,6CAAC,SAAI,WAAU,qBACb;AAAA,sDAAC,UAAK,eAAW,YAAAA,SAAK,kBAAmB,wBAAyB,GAAI,iBAAM;AAAA,UAC3E,CAAC,CAAC,eACD,4CAAC,UAAK,eAAW,YAAAA,SAAK,wBAAwB,uBAAuB,GAAI,uBAAY;AAAA,WACzF;AAAA,QACC,WAAW,aAAc,4CAAC,6BAAM,MAAM,IAAG,IAAM;AAAA;AAAA;AAAA,EAClD;AAEJ;AAIO,IAAM,WAAW,CAAC;AAAA,EACvB,GAAG;AACL,MAAqB;AACnB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,gBAAgB,MAAM,kBAAkB;AAAA,MACxC,eAAW,YAAAA,SAAK,wBAAwB,MAAM,SAAS;AAAA,MACvD,mBAAmB,MAAM,qBAAqB;AAAA;AAAA,EAChD;AAEJ;","names":["clsx"]}
|
|
@@ -4,14 +4,16 @@ import { Check } from "lucide-react";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
var Tile = ({
|
|
6
6
|
title,
|
|
7
|
+
titleClassName,
|
|
7
8
|
description,
|
|
9
|
+
descriptionClassName,
|
|
8
10
|
onClick,
|
|
9
11
|
isSelected = false,
|
|
10
12
|
disabled = false,
|
|
11
13
|
prefix,
|
|
12
14
|
suffix,
|
|
13
15
|
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
14
|
-
selectedClassName = "
|
|
16
|
+
selectedClassName = "bg-primary/20",
|
|
15
17
|
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
16
18
|
className
|
|
17
19
|
}) => {
|
|
@@ -21,7 +23,7 @@ var Tile = ({
|
|
|
21
23
|
className: clsx(
|
|
22
24
|
"flex-row-2 w-full items-center",
|
|
23
25
|
{
|
|
24
|
-
[normalClassName]:
|
|
26
|
+
[normalClassName]: onClick && !disabled,
|
|
25
27
|
[selectedClassName]: isSelected && !disabled,
|
|
26
28
|
[disabledClassName]: disabled
|
|
27
29
|
},
|
|
@@ -31,15 +33,29 @@ var Tile = ({
|
|
|
31
33
|
children: [
|
|
32
34
|
prefix,
|
|
33
35
|
/* @__PURE__ */ jsxs("div", { className: "flex-col-0 w-full", children: [
|
|
34
|
-
/* @__PURE__ */ jsx("
|
|
35
|
-
!!description && /* @__PURE__ */ jsx("span", { className: clsx(
|
|
36
|
+
/* @__PURE__ */ jsx("span", { className: clsx(titleClassName ?? "textstyle-title-normal"), children: title }),
|
|
37
|
+
!!description && /* @__PURE__ */ jsx("span", { className: clsx(descriptionClassName ?? "textstyle-description"), children: description })
|
|
36
38
|
] }),
|
|
37
39
|
suffix ?? (isSelected ? /* @__PURE__ */ jsx(Check, { size: 24 }) : void 0)
|
|
38
40
|
]
|
|
39
41
|
}
|
|
40
42
|
);
|
|
41
43
|
};
|
|
44
|
+
var ListTile = ({
|
|
45
|
+
...props
|
|
46
|
+
}) => {
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
Tile,
|
|
49
|
+
{
|
|
50
|
+
...props,
|
|
51
|
+
titleClassName: props.titleClassName ?? "font-semibold",
|
|
52
|
+
className: clsx("px-2 py-1 rounded-md", props.className),
|
|
53
|
+
disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
};
|
|
42
57
|
export {
|
|
58
|
+
ListTile,
|
|
43
59
|
Tile
|
|
44
60
|
};
|
|
45
61
|
//# sourceMappingURL=Tile.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/layout-and-navigation/Tile.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport { Check } from 'lucide-react'\n\nexport type TileProps = {\n title:
|
|
1
|
+
{"version":3,"sources":["../../../src/components/layout-and-navigation/Tile.tsx"],"sourcesContent":["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"],"mappings":";AACA,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;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,UACE,CAAC,eAAe,GAAG,WAAW,CAAC;AAAA,UAC/B,CAAC,iBAAiB,GAAG,cAAc,CAAC;AAAA,UACpC,CAAC,iBAAiB,GAAG;AAAA,QACvB;AAAA,QACA;AAAA,MACF;AAAA,MACA,SAAS,WAAW,SAAY;AAAA,MAE/B;AAAA;AAAA,QACD,qBAAC,SAAI,WAAU,qBACb;AAAA,8BAAC,UAAK,WAAW,KAAK,kBAAmB,wBAAyB,GAAI,iBAAM;AAAA,UAC3E,CAAC,CAAC,eACD,oBAAC,UAAK,WAAW,KAAK,wBAAwB,uBAAuB,GAAI,uBAAY;AAAA,WACzF;AAAA,QACC,WAAW,aAAc,oBAAC,SAAM,MAAM,IAAG,IAAM;AAAA;AAAA;AAAA,EAClD;AAEJ;AAIO,IAAM,WAAW,CAAC;AAAA,EACvB,GAAG;AACL,MAAqB;AACnB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,gBAAgB,MAAM,kBAAkB;AAAA,MACxC,WAAW,KAAK,wBAAwB,MAAM,SAAS;AAAA,MACvD,mBAAmB,MAAM,qBAAqB;AAAA;AAAA,EAChD;AAEJ;","names":[]}
|
|
@@ -40,7 +40,7 @@ var LoadingAndErrorComponent = ({
|
|
|
40
40
|
hasError = false,
|
|
41
41
|
loadingComponent,
|
|
42
42
|
errorComponent,
|
|
43
|
-
minimumLoadingDuration,
|
|
43
|
+
minimumLoadingDuration = 200,
|
|
44
44
|
className
|
|
45
45
|
}) => {
|
|
46
46
|
const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react.useState)(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/loading-states/LoadingAndErrorComponent.tsx","../../../src/components/loading-states/LoadingContainer.tsx"],"sourcesContent":["import type { PropsWithChildren, ReactNode } from 'react'\nimport { useState } from 'react'\nimport { LoadingContainer } from './LoadingContainer'\nimport { clsx } from 'clsx'\n\nexport type LoadingAndErrorComponentProps = PropsWithChildren<{\n isLoading?: boolean,\n hasError?: boolean,\n loadingComponent?: ReactNode,\n errorComponent?: ReactNode,\n /**\n * in milliseconds\n */\n minimumLoadingDuration?: number,\n className?: string,\n}>\n\n/**\n * A Component that shows the Error and Loading animation, when appropriate and the children otherwise\n */\nexport const LoadingAndErrorComponent = ({\n children,\n isLoading = false,\n hasError = false,\n loadingComponent,\n errorComponent,\n minimumLoadingDuration,\n className\n }: LoadingAndErrorComponentProps) => {\n const [isInMinimumLoading, setIsInMinimumLoading] = useState(false)\n const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState(false)\n if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {\n setIsInMinimumLoading(true)\n setTimeout(() => {\n setIsInMinimumLoading(false)\n setHasUsedMinimumLoading(true)\n }, minimumLoadingDuration)\n }\n\n if (isLoading || (minimumLoadingDuration && isInMinimumLoading)) {\n return (loadingComponent ?? <LoadingContainer className={clsx(className)}/>)\n }\n if (hasError) {\n return (errorComponent ?? <LoadingContainer className={clsx('bg-negative', className)}/>)\n }\n return children\n}\n","import { clsx } from 'clsx'\n\nexport type LoadingComponentProps = {\n className?: string,\n}\n\nexport const LoadingContainer = ({ className }: LoadingComponentProps) => {\n return (\n <div className={clsx('relative overflow-hidden shimmer bg-disabled-background rounded-md', className)}/>\n )\n}"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAyB;;;ACDzB,kBAAqB;AAQjB;AAFG,IAAM,mBAAmB,CAAC,EAAE,UAAU,MAA6B;AACxE,SACE,4CAAC,SAAI,eAAW,kBAAK,sEAAsE,SAAS,GAAE;AAE1G;;;ADPA,IAAAA,eAAqB;AAqCW,IAAAC,sBAAA;AApBzB,IAAM,2BAA2B,CAAC;AAAA,EACE;AAAA,EACA,YAAY;AAAA,EACZ,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/loading-states/LoadingAndErrorComponent.tsx","../../../src/components/loading-states/LoadingContainer.tsx"],"sourcesContent":["import type { PropsWithChildren, ReactNode } from 'react'\nimport { useState } from 'react'\nimport { LoadingContainer } from './LoadingContainer'\nimport { clsx } from 'clsx'\n\nexport type LoadingAndErrorComponentProps = PropsWithChildren<{\n isLoading?: boolean,\n hasError?: boolean,\n loadingComponent?: ReactNode,\n errorComponent?: ReactNode,\n /**\n * in milliseconds\n */\n minimumLoadingDuration?: number,\n className?: string,\n}>\n\n/**\n * A Component that shows the Error and Loading animation, when appropriate and the children otherwise\n */\nexport const LoadingAndErrorComponent = ({\n children,\n isLoading = false,\n hasError = false,\n loadingComponent,\n errorComponent,\n minimumLoadingDuration = 200,\n className\n }: LoadingAndErrorComponentProps) => {\n const [isInMinimumLoading, setIsInMinimumLoading] = useState(false)\n const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState(false)\n if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {\n setIsInMinimumLoading(true)\n setTimeout(() => {\n setIsInMinimumLoading(false)\n setHasUsedMinimumLoading(true)\n }, minimumLoadingDuration)\n }\n\n if (isLoading || (minimumLoadingDuration && isInMinimumLoading)) {\n return (loadingComponent ?? <LoadingContainer className={clsx(className)}/>)\n }\n if (hasError) {\n return (errorComponent ?? <LoadingContainer className={clsx('bg-negative', className)}/>)\n }\n return children\n}\n","import { clsx } from 'clsx'\n\nexport type LoadingComponentProps = {\n className?: string,\n}\n\nexport const LoadingContainer = ({ className }: LoadingComponentProps) => {\n return (\n <div className={clsx('relative overflow-hidden shimmer bg-disabled-background rounded-md', className)}/>\n )\n}"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAyB;;;ACDzB,kBAAqB;AAQjB;AAFG,IAAM,mBAAmB,CAAC,EAAE,UAAU,MAA6B;AACxE,SACE,4CAAC,SAAI,eAAW,kBAAK,sEAAsE,SAAS,GAAE;AAE1G;;;ADPA,IAAAA,eAAqB;AAqCW,IAAAC,sBAAA;AApBzB,IAAM,2BAA2B,CAAC;AAAA,EACE;AAAA,EACA,YAAY;AAAA,EACZ,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,yBAAyB;AAAA,EACzB;AACF,MAAqC;AAC5E,QAAM,CAAC,oBAAoB,qBAAqB,QAAI,uBAAS,KAAK;AAClE,QAAM,CAAC,uBAAuB,wBAAwB,QAAI,uBAAS,KAAK;AACxE,MAAI,0BAA0B,CAAC,sBAAsB,CAAC,uBAAuB;AAC3E,0BAAsB,IAAI;AAC1B,eAAW,MAAM;AACf,4BAAsB,KAAK;AAC3B,+BAAyB,IAAI;AAAA,IAC/B,GAAG,sBAAsB;AAAA,EAC3B;AAEA,MAAI,aAAc,0BAA0B,oBAAqB;AAC/D,WAAQ,oBAAoB,6CAAC,oBAAiB,eAAW,mBAAK,SAAS,GAAE;AAAA,EAC3E;AACA,MAAI,UAAU;AACZ,WAAQ,kBAAkB,6CAAC,oBAAiB,eAAW,mBAAK,eAAe,SAAS,GAAE;AAAA,EACxF;AACA,SAAO;AACT;","names":["import_clsx","import_jsx_runtime"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/loading-states/LoadingAndErrorComponent.tsx","../../../src/components/loading-states/LoadingContainer.tsx"],"sourcesContent":["import type { PropsWithChildren, ReactNode } from 'react'\nimport { useState } from 'react'\nimport { LoadingContainer } from './LoadingContainer'\nimport { clsx } from 'clsx'\n\nexport type LoadingAndErrorComponentProps = PropsWithChildren<{\n isLoading?: boolean,\n hasError?: boolean,\n loadingComponent?: ReactNode,\n errorComponent?: ReactNode,\n /**\n * in milliseconds\n */\n minimumLoadingDuration?: number,\n className?: string,\n}>\n\n/**\n * A Component that shows the Error and Loading animation, when appropriate and the children otherwise\n */\nexport const LoadingAndErrorComponent = ({\n children,\n isLoading = false,\n hasError = false,\n loadingComponent,\n errorComponent,\n minimumLoadingDuration,\n className\n }: LoadingAndErrorComponentProps) => {\n const [isInMinimumLoading, setIsInMinimumLoading] = useState(false)\n const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState(false)\n if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {\n setIsInMinimumLoading(true)\n setTimeout(() => {\n setIsInMinimumLoading(false)\n setHasUsedMinimumLoading(true)\n }, minimumLoadingDuration)\n }\n\n if (isLoading || (minimumLoadingDuration && isInMinimumLoading)) {\n return (loadingComponent ?? <LoadingContainer className={clsx(className)}/>)\n }\n if (hasError) {\n return (errorComponent ?? <LoadingContainer className={clsx('bg-negative', className)}/>)\n }\n return children\n}\n","import { clsx } from 'clsx'\n\nexport type LoadingComponentProps = {\n className?: string,\n}\n\nexport const LoadingContainer = ({ className }: LoadingComponentProps) => {\n return (\n <div className={clsx('relative overflow-hidden shimmer bg-disabled-background rounded-md', className)}/>\n )\n}"],"mappings":";AACA,SAAS,gBAAgB;;;ACDzB,SAAS,YAAY;AAQjB;AAFG,IAAM,mBAAmB,CAAC,EAAE,UAAU,MAA6B;AACxE,SACE,oBAAC,SAAI,WAAW,KAAK,sEAAsE,SAAS,GAAE;AAE1G;;;ADPA,SAAS,QAAAA,aAAY;AAqCW,gBAAAC,YAAA;AApBzB,IAAM,2BAA2B,CAAC;AAAA,EACE;AAAA,EACA,YAAY;AAAA,EACZ,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,
|
|
1
|
+
{"version":3,"sources":["../../../src/components/loading-states/LoadingAndErrorComponent.tsx","../../../src/components/loading-states/LoadingContainer.tsx"],"sourcesContent":["import type { PropsWithChildren, ReactNode } from 'react'\nimport { useState } from 'react'\nimport { LoadingContainer } from './LoadingContainer'\nimport { clsx } from 'clsx'\n\nexport type LoadingAndErrorComponentProps = PropsWithChildren<{\n isLoading?: boolean,\n hasError?: boolean,\n loadingComponent?: ReactNode,\n errorComponent?: ReactNode,\n /**\n * in milliseconds\n */\n minimumLoadingDuration?: number,\n className?: string,\n}>\n\n/**\n * A Component that shows the Error and Loading animation, when appropriate and the children otherwise\n */\nexport const LoadingAndErrorComponent = ({\n children,\n isLoading = false,\n hasError = false,\n loadingComponent,\n errorComponent,\n minimumLoadingDuration = 200,\n className\n }: LoadingAndErrorComponentProps) => {\n const [isInMinimumLoading, setIsInMinimumLoading] = useState(false)\n const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState(false)\n if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {\n setIsInMinimumLoading(true)\n setTimeout(() => {\n setIsInMinimumLoading(false)\n setHasUsedMinimumLoading(true)\n }, minimumLoadingDuration)\n }\n\n if (isLoading || (minimumLoadingDuration && isInMinimumLoading)) {\n return (loadingComponent ?? <LoadingContainer className={clsx(className)}/>)\n }\n if (hasError) {\n return (errorComponent ?? <LoadingContainer className={clsx('bg-negative', className)}/>)\n }\n return children\n}\n","import { clsx } from 'clsx'\n\nexport type LoadingComponentProps = {\n className?: string,\n}\n\nexport const LoadingContainer = ({ className }: LoadingComponentProps) => {\n return (\n <div className={clsx('relative overflow-hidden shimmer bg-disabled-background rounded-md', className)}/>\n )\n}"],"mappings":";AACA,SAAS,gBAAgB;;;ACDzB,SAAS,YAAY;AAQjB;AAFG,IAAM,mBAAmB,CAAC,EAAE,UAAU,MAA6B;AACxE,SACE,oBAAC,SAAI,WAAW,KAAK,sEAAsE,SAAS,GAAE;AAE1G;;;ADPA,SAAS,QAAAA,aAAY;AAqCW,gBAAAC,YAAA;AApBzB,IAAM,2BAA2B,CAAC;AAAA,EACE;AAAA,EACA,YAAY;AAAA,EACZ,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,yBAAyB;AAAA,EACzB;AACF,MAAqC;AAC5E,QAAM,CAAC,oBAAoB,qBAAqB,IAAI,SAAS,KAAK;AAClE,QAAM,CAAC,uBAAuB,wBAAwB,IAAI,SAAS,KAAK;AACxE,MAAI,0BAA0B,CAAC,sBAAsB,CAAC,uBAAuB;AAC3E,0BAAsB,IAAI;AAC1B,eAAW,MAAM;AACf,4BAAsB,KAAK;AAC3B,+BAAyB,IAAI;AAAA,IAC/B,GAAG,sBAAsB;AAAA,EAC3B;AAEA,MAAI,aAAc,0BAA0B,oBAAqB;AAC/D,WAAQ,oBAAoB,gBAAAA,KAAC,oBAAiB,WAAWD,MAAK,SAAS,GAAE;AAAA,EAC3E;AACA,MAAI,UAAU;AACZ,WAAQ,kBAAkB,gBAAAC,KAAC,oBAAiB,WAAWD,MAAK,eAAe,SAAS,GAAE;AAAA,EACxF;AACA,SAAO;AACT;","names":["clsx","jsx"]}
|
|
@@ -149,14 +149,16 @@ var import_lucide_react = require("lucide-react");
|
|
|
149
149
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
150
150
|
var Tile = ({
|
|
151
151
|
title,
|
|
152
|
+
titleClassName,
|
|
152
153
|
description,
|
|
154
|
+
descriptionClassName,
|
|
153
155
|
onClick,
|
|
154
156
|
isSelected = false,
|
|
155
157
|
disabled = false,
|
|
156
158
|
prefix,
|
|
157
159
|
suffix,
|
|
158
160
|
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
159
|
-
selectedClassName = "
|
|
161
|
+
selectedClassName = "bg-primary/20",
|
|
160
162
|
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
161
163
|
className
|
|
162
164
|
}) => {
|
|
@@ -166,7 +168,7 @@ var Tile = ({
|
|
|
166
168
|
className: (0, import_clsx2.default)(
|
|
167
169
|
"flex-row-2 w-full items-center",
|
|
168
170
|
{
|
|
169
|
-
[normalClassName]:
|
|
171
|
+
[normalClassName]: onClick && !disabled,
|
|
170
172
|
[selectedClassName]: isSelected && !disabled,
|
|
171
173
|
[disabledClassName]: disabled
|
|
172
174
|
},
|
|
@@ -176,14 +178,27 @@ var Tile = ({
|
|
|
176
178
|
children: [
|
|
177
179
|
prefix,
|
|
178
180
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex-col-0 w-full", children: [
|
|
179
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("
|
|
180
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx2.default)(
|
|
181
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx2.default)(titleClassName ?? "textstyle-title-normal"), children: title }),
|
|
182
|
+
!!description && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_clsx2.default)(descriptionClassName ?? "textstyle-description"), children: description })
|
|
181
183
|
] }),
|
|
182
184
|
suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react.Check, { size: 24 }) : void 0)
|
|
183
185
|
]
|
|
184
186
|
}
|
|
185
187
|
);
|
|
186
188
|
};
|
|
189
|
+
var ListTile = ({
|
|
190
|
+
...props
|
|
191
|
+
}) => {
|
|
192
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
193
|
+
Tile,
|
|
194
|
+
{
|
|
195
|
+
...props,
|
|
196
|
+
titleClassName: props.titleClassName ?? "font-semibold",
|
|
197
|
+
className: (0, import_clsx2.default)("px-2 py-1 rounded-md", props.className),
|
|
198
|
+
disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
};
|
|
187
202
|
|
|
188
203
|
// src/components/layout-and-navigation/Expandable.tsx
|
|
189
204
|
var import_react3 = require("react");
|
|
@@ -1107,22 +1122,6 @@ var useSearch = ({
|
|
|
1107
1122
|
|
|
1108
1123
|
// src/components/user-action/Select.tsx
|
|
1109
1124
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1110
|
-
var SelectTile = ({
|
|
1111
|
-
className,
|
|
1112
|
-
disabledClassName,
|
|
1113
|
-
title,
|
|
1114
|
-
...restProps
|
|
1115
|
-
}) => {
|
|
1116
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1117
|
-
Tile,
|
|
1118
|
-
{
|
|
1119
|
-
...restProps,
|
|
1120
|
-
className: (0, import_clsx8.default)("px-2 py-1 rounded-md", className),
|
|
1121
|
-
disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
|
|
1122
|
-
title: { ...title, className: title.className ?? "font-semibold" }
|
|
1123
|
-
}
|
|
1124
|
-
);
|
|
1125
|
-
};
|
|
1126
1125
|
var Select = ({
|
|
1127
1126
|
value,
|
|
1128
1127
|
label,
|
|
@@ -1189,10 +1188,10 @@ var Select = ({
|
|
|
1189
1188
|
),
|
|
1190
1189
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
|
|
1191
1190
|
result.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1192
|
-
|
|
1191
|
+
ListTile,
|
|
1193
1192
|
{
|
|
1194
1193
|
isSelected: option === selectedOption,
|
|
1195
|
-
title:
|
|
1194
|
+
title: option.label,
|
|
1196
1195
|
onClick: () => {
|
|
1197
1196
|
onChange(option.value);
|
|
1198
1197
|
close();
|