@douglasneuroinformatics/libui 3.8.7 → 3.9.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/dist/{chunk-CAWCERN4.js → chunk-IYOZHDZL.js} +10 -2
- package/dist/{chunk-CAWCERN4.js.map → chunk-IYOZHDZL.js.map} +1 -1
- package/dist/{chunk-GFIT4FAN.js → chunk-JTEI2ZYI.js} +2 -2
- package/dist/components.d.ts +61 -61
- package/dist/components.js +46 -10
- package/dist/components.js.map +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +2 -2
- package/dist/i18n.d.ts +2 -2
- package/dist/i18n.js +1 -1
- package/dist/{types-DTkK8l-q.d.ts → types-CU3FS63U.d.ts} +12 -4
- package/package.json +5 -7
- package/src/components/ArrowToggle/ArrowToggle.tsx +2 -2
- package/src/components/Breadcrumb/BreadcrumbLink.tsx +2 -2
- package/src/components/Breadcrumb/BreadcrumbRoot.tsx +2 -2
- package/src/components/Button/Button.tsx +6 -6
- package/src/components/Chart/ChartContainer.tsx +2 -2
- package/src/components/Chart/ChartLegendContent.tsx +5 -5
- package/src/components/Chart/ChartTooltipContent.tsx +8 -8
- package/src/components/ClientTable/ClientTable.spec.tsx +87 -0
- package/src/components/ClientTable/ClientTable.tsx +2 -1
- package/src/components/ClientTable/ClientTablePagination.tsx +28 -1
- package/src/components/ContextMenu/ContextMenuItem.tsx +2 -2
- package/src/components/ContextMenu/ContextMenuLabel.tsx +2 -2
- package/src/components/ContextMenu/ContextMenuSubTrigger.tsx +2 -2
- package/src/components/DropdownMenu/DropdownMenuContent.tsx +2 -2
- package/src/components/DropdownMenu/DropdownMenuItem.tsx +2 -2
- package/src/components/DropdownMenu/DropdownMenuLabel.tsx +2 -2
- package/src/components/DropdownMenu/DropdownMenuSubTrigger.tsx +2 -2
- package/src/components/Form/BaseRadioField.tsx +2 -2
- package/src/components/Form/Form.stories.tsx +0 -1
- package/src/components/Form/Form.tsx +0 -1
- package/src/components/Form/ScalarField.tsx +8 -8
- package/src/components/Form/SetField/SetFieldListbox.tsx +2 -2
- package/src/components/Form/SetField/SetFieldSelect.tsx +2 -2
- package/src/components/LineGraph/LineGraph.tsx +5 -2
- package/src/components/MenuBar/MenuBarItem.tsx +2 -2
- package/src/components/MenuBar/MenuBarLabel.tsx +2 -2
- package/src/components/MenuBar/MenuBarSubTrigger.tsx +2 -2
- package/src/components/Pagination/PaginationLink.tsx +4 -4
- package/src/components/Resizable/Resizable.tsx +2 -2
- package/src/components/Resizable/ResizableHandle.tsx +2 -2
- package/src/components/SearchBar/SearchBar.tsx +4 -4
- package/src/i18n/store.ts +1 -1
- package/src/i18n/translations/libui.json +8 -0
- package/src/i18n/types.ts +4 -4
- package/dist/douglasneuroinformatics-libui-3.8.7.tgz +0 -0
- /package/dist/{chunk-GFIT4FAN.js.map → chunk-JTEI2ZYI.js.map} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
|
|
3
3
|
// src/i18n/store.ts
|
|
4
|
-
import { createStore } from "zustand/vanilla";
|
|
5
4
|
import { subscribeWithSelector } from "zustand/middleware";
|
|
5
|
+
import { createStore } from "zustand/vanilla";
|
|
6
6
|
|
|
7
7
|
// src/i18n/translations/libui.json
|
|
8
8
|
var libui_default = {
|
|
@@ -150,6 +150,14 @@ var libui_default = {
|
|
|
150
150
|
previous: {
|
|
151
151
|
en: "Previous",
|
|
152
152
|
fr: "Pr\xE9c\xE9dent"
|
|
153
|
+
},
|
|
154
|
+
firstPage: {
|
|
155
|
+
en: "<< First",
|
|
156
|
+
fr: "<< Premi\xE8re"
|
|
157
|
+
},
|
|
158
|
+
lastPage: {
|
|
159
|
+
en: "Last >>",
|
|
160
|
+
fr: "Derni\xE8re >>"
|
|
153
161
|
}
|
|
154
162
|
},
|
|
155
163
|
searchBar: {
|
|
@@ -219,4 +227,4 @@ export {
|
|
|
219
227
|
translationStore,
|
|
220
228
|
i18n
|
|
221
229
|
};
|
|
222
|
-
//# sourceMappingURL=chunk-
|
|
230
|
+
//# sourceMappingURL=chunk-IYOZHDZL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/i18n/store.ts","../src/i18n/translations/libui.json","../src/i18n/internal.ts"],"sourcesContent":["import type { SetOptional } from 'type-fest';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/i18n/store.ts","../src/i18n/translations/libui.json","../src/i18n/internal.ts"],"sourcesContent":["import type { SetOptional } from 'type-fest';\nimport { subscribeWithSelector } from 'zustand/middleware';\nimport { createStore } from 'zustand/vanilla';\n\nimport libui from '@/i18n/translations/libui.json';\n\nimport { getTranslation } from './internal';\n\nimport type { Language, TranslateFunction, Translations } from './types';\n\ntype InitOptions = {\n defaultLanguage?: Language;\n fallbackLanguage?: Language;\n translations?: SetOptional<Translations, 'libui'>;\n};\n\ntype I18N = {\n init: (options?: InitOptions) => void;\n t: TranslateFunction;\n};\n\nexport type TranslationStore = {\n changeLanguage: (language: Language) => void;\n fallbackLanguage: Language;\n isInitialized: boolean;\n resolvedLanguage: Language;\n translations: Translations;\n};\n\nexport const translationStore = createStore(\n subscribeWithSelector<TranslationStore>((set) => ({\n changeLanguage(language) {\n set({ resolvedLanguage: language });\n },\n fallbackLanguage: 'en',\n isInitialized: false,\n resolvedLanguage: 'en',\n translations: { libui }\n }))\n);\n\nexport const i18n: I18N = {\n init: ({ defaultLanguage, fallbackLanguage, translations }: InitOptions = {}) => {\n const state = translationStore.getState();\n if (state.isInitialized) {\n console.error('Cannot reinitialize translations store');\n return;\n }\n translationStore.subscribe(\n (state) => state.resolvedLanguage,\n (resolvedLanguage) => {\n document.documentElement.lang = resolvedLanguage;\n }\n );\n translationStore.setState({\n fallbackLanguage: fallbackLanguage ?? state.fallbackLanguage,\n isInitialized: true,\n resolvedLanguage: defaultLanguage ?? state.resolvedLanguage,\n translations: {\n ...state.translations,\n ...translations\n }\n });\n },\n t: (target, ...args) => {\n const state = translationStore.getState();\n return getTranslation(target, state, ...args);\n }\n};\n","{\n \"days\": {\n \"friday\": {\n \"en\": \"Friday\",\n \"fr\": \"Vendredi\"\n },\n \"monday\": {\n \"en\": \"Monday\",\n \"fr\": \"Lundi\"\n },\n \"saturday\": {\n \"en\": \"Saturday\",\n \"fr\": \"Samedi\"\n },\n \"sunday\": {\n \"en\": \"Sunday\",\n \"fr\": \"Dimanche\"\n },\n \"thursday\": {\n \"en\": \"Thursday\",\n \"fr\": \"Jeudi\"\n },\n \"tuesday\": {\n \"en\": \"Tuesday\",\n \"fr\": \"Mardi\"\n },\n \"wednesday\": {\n \"en\": \"Wednesday\",\n \"fr\": \"Mercredi\"\n }\n },\n \"form\": {\n \"append\": {\n \"en\": \"Append\",\n \"fr\": \"Ajouter\"\n },\n \"radioLabels\": {\n \"false\": {\n \"en\": \"False\",\n \"fr\": \"Faux\"\n },\n \"true\": {\n \"en\": \"True\",\n \"fr\": \"Vrai\"\n }\n },\n \"remove\": {\n \"en\": \"Remove\",\n \"fr\": \"Supprimer\"\n },\n \"required\": {\n \"en\": \"This field is required\",\n \"fr\": \"Ce champ est obligatoire\"\n },\n \"reset\": {\n \"en\": \"Reset\",\n \"fr\": \"Réinitialiser\"\n },\n \"submit\": {\n \"en\": \"Submit\",\n \"fr\": \"Soumettre\"\n }\n },\n \"months\": {\n \"april\": {\n \"en\": \"April\",\n \"fr\": \"Avril\"\n },\n \"august\": {\n \"en\": \"August\",\n \"fr\": \"Août\"\n },\n \"december\": {\n \"en\": \"December\",\n \"fr\": \"Décembre\"\n },\n \"february\": {\n \"en\": \"February\",\n \"fr\": \"Février\"\n },\n \"january\": {\n \"en\": \"January\",\n \"fr\": \"Janvier\"\n },\n \"july\": {\n \"en\": \"July\",\n \"fr\": \"Juillet\"\n },\n \"june\": {\n \"en\": \"June\",\n \"fr\": \"Juin\"\n },\n \"march\": {\n \"en\": \"March\",\n \"fr\": \"Mars\"\n },\n \"may\": {\n \"en\": \"May\",\n \"fr\": \"Mai\"\n },\n \"november\": {\n \"en\": \"November\",\n \"fr\": \"Novembre\"\n },\n \"october\": {\n \"en\": \"October\",\n \"fr\": \"Octobre\"\n },\n \"september\": {\n \"en\": \"September\",\n \"fr\": \"Septembre\"\n }\n },\n \"notifications\": {\n \"types\": {\n \"error\": {\n \"en\": \"Error\",\n \"fr\": \"Erreur\"\n },\n \"info\": {\n \"en\": \"Info\",\n \"fr\": \"Attention\"\n },\n \"success\": {\n \"en\": \"Success\",\n \"fr\": \"Succès\"\n },\n \"warning\": {\n \"en\": \"Warning\",\n \"fr\": \"Avertissement\"\n }\n }\n },\n \"pagination\": {\n \"info\": {\n \"en\": \"Showing {{first}} to {{last}} of {{total}} results\",\n \"fr\": \"Affichage de {{first}} à {{last}} sur {{total}} résultats\"\n },\n \"next\": {\n \"en\": \"Next\",\n \"fr\": \"Suivant\"\n },\n \"previous\": {\n \"en\": \"Previous\",\n \"fr\": \"Précédent\"\n },\n \"firstPage\": {\n \"en\": \"<< First\",\n \"fr\": \"<< Première\"\n },\n \"lastPage\": {\n \"en\": \"Last >>\",\n \"fr\": \"Dernière >>\"\n }\n },\n \"searchBar\": {\n \"placeholder\": {\n \"en\": \"Search...\",\n \"fr\": \"Rechercher...\"\n }\n }\n}\n","import { format } from '@douglasneuroinformatics/libjs';\nimport { get } from 'lodash-es';\nimport type { Primitive } from 'type-fest';\n\nimport type { Language } from './types';\n\nexport function getTranslation(\n target: { [L in Language]?: string } | string,\n state: {\n fallbackLanguage: Language;\n resolvedLanguage: Language;\n translations: { [key: string]: any };\n },\n ...args: Exclude<Primitive, symbol>[]\n) {\n let value: { [key: string]: string };\n if (typeof target === 'string') {\n value = get(state.translations, target) as { [key: string]: string };\n } else {\n value = target;\n }\n return format((value[state.resolvedLanguage] ?? value[state.fallbackLanguage])!, ...args);\n}\n"],"mappings":";;;AACA,SAAS,6BAA6B;AACtC,SAAS,mBAAmB;;;ACF5B;AAAA,EACE,MAAQ;AAAA,IACN,QAAU;AAAA,MACR,IAAM;AAA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"./chunk-IYOZHDZL.js";
|
|
6
6
|
import {
|
|
7
7
|
isBrowser
|
|
8
8
|
} from "./chunk-VJSOLDCS.js";
|
|
@@ -367,4 +367,4 @@ export {
|
|
|
367
367
|
useTranslation,
|
|
368
368
|
useWindowSize
|
|
369
369
|
};
|
|
370
|
-
//# sourceMappingURL=chunk-
|
|
370
|
+
//# sourceMappingURL=chunk-JTEI2ZYI.js.map
|
package/dist/components.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { FormDataType, FormContent, PartialNullableFormDataType } from '@douglas
|
|
|
25
25
|
import { z } from 'zod';
|
|
26
26
|
import * as _radix_ui_react_hover_card from '@radix-ui/react-hover-card';
|
|
27
27
|
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
28
|
-
import { L as Language } from './types-
|
|
28
|
+
import { L as Language } from './types-CU3FS63U.js';
|
|
29
29
|
import * as _radix_ui_react_menubar from '@radix-ui/react-menubar';
|
|
30
30
|
import { MenubarMenuProps } from '@radix-ui/react-menubar';
|
|
31
31
|
import * as _radix_ui_react_popover from '@radix-ui/react-popover';
|
|
@@ -45,9 +45,9 @@ declare const Accordion: React$1.ForwardRefExoticComponent<(Omit<_radix_ui_react
|
|
|
45
45
|
Trigger: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_accordion.AccordionTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
type DropdownMenuContentProps = {
|
|
48
|
+
type DropdownMenuContentProps = React$1.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
|
|
49
49
|
widthFull?: boolean;
|
|
50
|
-
}
|
|
50
|
+
};
|
|
51
51
|
|
|
52
52
|
type ActionDropdownOptions = {
|
|
53
53
|
[key: string]: string;
|
|
@@ -93,14 +93,12 @@ declare const buttonVariants: (props?: ({
|
|
|
93
93
|
size?: "md" | "icon" | "lg" | "sm" | null | undefined;
|
|
94
94
|
variant?: "link" | "primary" | "danger" | "ghost" | "outline" | "secondary" | null | undefined;
|
|
95
95
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
96
|
-
type ButtonProps = Simplify<{
|
|
96
|
+
type ButtonProps = Simplify<React$1.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
|
|
97
97
|
asChild?: boolean;
|
|
98
98
|
/** @deprecated - use children */
|
|
99
99
|
label?: string;
|
|
100
|
-
}
|
|
100
|
+
}>;
|
|
101
101
|
declare const Button: React$1.ForwardRefExoticComponent<{
|
|
102
|
-
asChild?: boolean | undefined;
|
|
103
|
-
label?: string | undefined;
|
|
104
102
|
disabled?: boolean | undefined;
|
|
105
103
|
form?: string | undefined;
|
|
106
104
|
formAction?: string | React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS[keyof React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_EXPERIMENTAL_FORM_ACTIONS] | undefined;
|
|
@@ -379,9 +377,11 @@ declare const Button: React$1.ForwardRefExoticComponent<{
|
|
|
379
377
|
onTransitionEndCapture?: React$1.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
380
378
|
size?: "md" | "icon" | "lg" | "sm" | null | undefined;
|
|
381
379
|
variant?: "link" | "primary" | "danger" | "ghost" | "outline" | "secondary" | null | undefined;
|
|
380
|
+
asChild?: boolean | undefined;
|
|
381
|
+
label?: string | undefined;
|
|
382
382
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
383
383
|
|
|
384
|
-
type ArrowToggleProps = Simplify<{
|
|
384
|
+
type ArrowToggleProps = Simplify<React$1.HTMLAttributes<HTMLButtonElement> & {
|
|
385
385
|
/** Whether or not the arrow is currently toggled */
|
|
386
386
|
isToggled?: boolean;
|
|
387
387
|
/** The starting position of the arrow (i.e., which direction does it point to) */
|
|
@@ -391,13 +391,8 @@ type ArrowToggleProps = Simplify<{
|
|
|
391
391
|
size?: ButtonProps['size'];
|
|
392
392
|
/** The variant of button to use */
|
|
393
393
|
variant?: Extract<ButtonProps['variant'], 'ghost' | 'outline'>;
|
|
394
|
-
}
|
|
394
|
+
}>;
|
|
395
395
|
declare const ArrowToggle: React$1.ForwardRefExoticComponent<{
|
|
396
|
-
isToggled?: boolean | undefined;
|
|
397
|
-
position: "down" | "left" | "right" | "up";
|
|
398
|
-
rotation?: number | undefined;
|
|
399
|
-
size?: ButtonProps["size"];
|
|
400
|
-
variant?: Extract<ButtonProps["variant"], "ghost" | "outline"> | undefined;
|
|
401
396
|
defaultChecked?: boolean | undefined;
|
|
402
397
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
403
398
|
suppressContentEditableWarning?: boolean | undefined;
|
|
@@ -664,6 +659,11 @@ declare const ArrowToggle: React$1.ForwardRefExoticComponent<{
|
|
|
664
659
|
onAnimationIterationCapture?: React$1.AnimationEventHandler<HTMLButtonElement> | undefined;
|
|
665
660
|
onTransitionEnd?: React$1.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
666
661
|
onTransitionEndCapture?: React$1.TransitionEventHandler<HTMLButtonElement> | undefined;
|
|
662
|
+
isToggled?: boolean | undefined;
|
|
663
|
+
position: "down" | "left" | "right" | "up";
|
|
664
|
+
rotation?: number | undefined;
|
|
665
|
+
size?: ButtonProps["size"];
|
|
666
|
+
variant?: Extract<ButtonProps["variant"], "ghost" | "outline"> | undefined;
|
|
667
667
|
} & React$1.RefAttributes<HTMLButtonElement>>;
|
|
668
668
|
|
|
669
669
|
declare const Avatar: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_avatar.AvatarProps & React$1.RefAttributes<HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>> & {
|
|
@@ -677,14 +677,14 @@ declare const badgeVariants: (props?: ({
|
|
|
677
677
|
type BadgeProps = React$1.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants>;
|
|
678
678
|
declare const Badge: ({ className, variant, ...props }: BadgeProps) => react_jsx_runtime.JSX.Element;
|
|
679
679
|
|
|
680
|
-
declare const Breadcrumb: React$1.ForwardRefExoticComponent<{
|
|
680
|
+
declare const Breadcrumb: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & {
|
|
681
681
|
separator?: React.ReactNode;
|
|
682
|
-
} &
|
|
682
|
+
} & React$1.RefAttributes<HTMLElement>> & {
|
|
683
683
|
Ellipsis: ({ className, ...props }: React$1.ComponentProps<"span">) => react_jsx_runtime.JSX.Element;
|
|
684
684
|
Item: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React$1.RefAttributes<HTMLLIElement>>;
|
|
685
|
-
Link: React$1.ForwardRefExoticComponent<{
|
|
685
|
+
Link: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
686
686
|
asChild?: boolean;
|
|
687
|
-
} &
|
|
687
|
+
} & React$1.RefAttributes<HTMLAnchorElement>>;
|
|
688
688
|
List: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, "ref"> & React$1.RefAttributes<HTMLOListElement>>;
|
|
689
689
|
Page: React$1.ForwardRefExoticComponent<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
690
690
|
Separator: ({ children, className, ...props }: React$1.ComponentProps<"li">) => react_jsx_runtime.JSX.Element;
|
|
@@ -698,27 +698,21 @@ declare const Card: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTM
|
|
|
698
698
|
Title: ({ children, className, ...props }: React$1.HTMLAttributes<HTMLHeadingElement>) => react_jsx_runtime.JSX.Element;
|
|
699
699
|
};
|
|
700
700
|
|
|
701
|
-
declare const Chart: React$1.ForwardRefExoticComponent<Omit<{
|
|
701
|
+
declare const Chart: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
702
702
|
children: React.ComponentProps<typeof recharts.ResponsiveContainer>["children"];
|
|
703
703
|
config: ChartConfig;
|
|
704
|
-
}
|
|
704
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>> & {
|
|
705
705
|
Legend: typeof Legend;
|
|
706
|
-
LegendContent: React$1.ForwardRefExoticComponent<Omit<{
|
|
706
|
+
LegendContent: React$1.ForwardRefExoticComponent<Omit<Pick<recharts.LegendProps, "verticalAlign" | "payload"> & React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & {
|
|
707
707
|
hideIcon?: boolean;
|
|
708
708
|
nameKey?: string;
|
|
709
|
-
}
|
|
709
|
+
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
710
710
|
Style: ({ config, id }: {
|
|
711
711
|
config: ChartConfig;
|
|
712
712
|
id: string;
|
|
713
713
|
}) => react_jsx_runtime.JSX.Element | null;
|
|
714
714
|
Tooltip: typeof Tooltip$1;
|
|
715
|
-
TooltipContent: React$1.ForwardRefExoticComponent<Omit<{
|
|
716
|
-
hideIndicator?: boolean;
|
|
717
|
-
hideLabel?: boolean;
|
|
718
|
-
indicator?: "dashed" | "dot" | "line";
|
|
719
|
-
labelKey?: string;
|
|
720
|
-
nameKey?: string;
|
|
721
|
-
} & React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & recharts.DefaultTooltipContentProps<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType> & {
|
|
715
|
+
TooltipContent: React$1.ForwardRefExoticComponent<Omit<React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement> & recharts.DefaultTooltipContentProps<recharts_types_component_DefaultTooltipContent.ValueType, recharts_types_component_DefaultTooltipContent.NameType> & {
|
|
722
716
|
accessibilityLayer?: boolean;
|
|
723
717
|
active?: boolean | undefined;
|
|
724
718
|
includeHidden?: boolean | undefined;
|
|
@@ -740,6 +734,12 @@ declare const Chart: React$1.ForwardRefExoticComponent<Omit<{
|
|
|
740
734
|
useTranslate3d?: boolean;
|
|
741
735
|
viewBox?: recharts_types_util_types.CartesianViewBox;
|
|
742
736
|
wrapperStyle?: React$1.CSSProperties;
|
|
737
|
+
} & {
|
|
738
|
+
hideIndicator?: boolean;
|
|
739
|
+
hideLabel?: boolean;
|
|
740
|
+
indicator?: "dashed" | "dot" | "line";
|
|
741
|
+
labelKey?: string;
|
|
742
|
+
nameKey?: string;
|
|
743
743
|
}, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
744
744
|
};
|
|
745
745
|
|
|
@@ -1124,12 +1124,12 @@ declare const ContextMenu: React$1.FC<_radix_ui_react_context_menu.ContextMenuPr
|
|
|
1124
1124
|
CheckboxItem: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_context_menu.ContextMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1125
1125
|
Content: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_context_menu.ContextMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1126
1126
|
Group: React$1.ForwardRefExoticComponent<_radix_ui_react_context_menu.ContextMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1127
|
-
Item: React$1.ForwardRefExoticComponent<{
|
|
1127
|
+
Item: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_context_menu.ContextMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1128
1128
|
inset?: boolean;
|
|
1129
|
-
} &
|
|
1130
|
-
Label: React$1.ForwardRefExoticComponent<{
|
|
1129
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1130
|
+
Label: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_context_menu.ContextMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1131
1131
|
inset?: boolean;
|
|
1132
|
-
} &
|
|
1132
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1133
1133
|
Portal: React$1.FC<_radix_ui_react_context_menu.ContextMenuPortalProps>;
|
|
1134
1134
|
RadioGroup: React$1.ForwardRefExoticComponent<_radix_ui_react_context_menu.ContextMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1135
1135
|
RadioItem: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_context_menu.ContextMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1137,9 +1137,9 @@ declare const ContextMenu: React$1.FC<_radix_ui_react_context_menu.ContextMenuPr
|
|
|
1137
1137
|
Shortcut: ({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>) => react_jsx_runtime.JSX.Element;
|
|
1138
1138
|
Sub: React$1.FC<_radix_ui_react_context_menu.ContextMenuSubProps>;
|
|
1139
1139
|
SubContent: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_context_menu.ContextMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1140
|
-
SubTrigger: React$1.ForwardRefExoticComponent<{
|
|
1140
|
+
SubTrigger: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_context_menu.ContextMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1141
1141
|
inset?: boolean;
|
|
1142
|
-
} &
|
|
1142
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1143
1143
|
Trigger: React$1.ForwardRefExoticComponent<_radix_ui_react_context_menu.ContextMenuTriggerProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
1144
1144
|
};
|
|
1145
1145
|
|
|
@@ -1180,16 +1180,16 @@ declare const DropdownButton: React$1.ForwardRefExoticComponent<React$1.ButtonHT
|
|
|
1180
1180
|
|
|
1181
1181
|
declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps> & {
|
|
1182
1182
|
CheckboxItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1183
|
-
Content: React$1.ForwardRefExoticComponent<{
|
|
1183
|
+
Content: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1184
1184
|
widthFull?: boolean;
|
|
1185
|
-
} &
|
|
1185
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1186
1186
|
Group: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1187
|
-
Item: React$1.ForwardRefExoticComponent<{
|
|
1187
|
+
Item: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1188
1188
|
inset?: boolean;
|
|
1189
|
-
} &
|
|
1190
|
-
Label: React$1.ForwardRefExoticComponent<{
|
|
1189
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1190
|
+
Label: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1191
1191
|
inset?: boolean;
|
|
1192
|
-
} &
|
|
1192
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1193
1193
|
Portal: React$1.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
1194
1194
|
RadioGroup: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1195
1195
|
RadioItem: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1197,9 +1197,9 @@ declare const DropdownMenu: React$1.FC<DropdownMenuPrimitive.DropdownMenuProps>
|
|
|
1197
1197
|
Shortcut: ({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>) => react_jsx_runtime.JSX.Element;
|
|
1198
1198
|
Sub: React$1.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
1199
1199
|
SubContent: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1200
|
-
SubTrigger: React$1.ForwardRefExoticComponent<{
|
|
1200
|
+
SubTrigger: React$1.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1201
1201
|
inset?: boolean;
|
|
1202
|
-
} &
|
|
1202
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1203
1203
|
Trigger: React$1.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1204
1204
|
};
|
|
1205
1205
|
|
|
@@ -1290,11 +1290,11 @@ type LineGraphData = readonly {
|
|
|
1290
1290
|
type ExtractValidKeys<T extends LineGraphData, K> = Extract<ConditionalKeys<T[number], K>, string>;
|
|
1291
1291
|
type LineGraphLine<T extends LineGraphData = {
|
|
1292
1292
|
[key: string]: any;
|
|
1293
|
-
}[]> = {
|
|
1293
|
+
}[]> = Pick<LineProps, 'legendType' | 'stroke' | 'strokeDasharray' | 'strokeWidth' | 'type'> & {
|
|
1294
1294
|
err?: ExtractValidKeys<T, number>;
|
|
1295
1295
|
name: string;
|
|
1296
1296
|
val: ExtractValidKeys<T, number>;
|
|
1297
|
-
}
|
|
1297
|
+
};
|
|
1298
1298
|
declare function LineGraphComponent<const T extends LineGraphData>({ data, lines, xAxis }: {
|
|
1299
1299
|
/** An array of objects, where each object represents one point on the x-axis */
|
|
1300
1300
|
data: T;
|
|
@@ -1329,12 +1329,12 @@ declare const MenuBar: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_me
|
|
|
1329
1329
|
CheckboxItem: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_menubar.MenubarCheckboxItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1330
1330
|
Content: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_menubar.MenubarContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1331
1331
|
Group: React$1.ForwardRefExoticComponent<_radix_ui_react_menubar.MenubarGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
1332
|
-
Item: React$1.ForwardRefExoticComponent<{
|
|
1332
|
+
Item: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_menubar.MenubarItemProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1333
1333
|
inset?: boolean;
|
|
1334
|
-
} &
|
|
1335
|
-
Label: React$1.ForwardRefExoticComponent<{
|
|
1334
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1335
|
+
Label: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_menubar.MenubarLabelProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1336
1336
|
inset?: boolean;
|
|
1337
|
-
} &
|
|
1337
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1338
1338
|
Menu: React.ComponentType<MenubarMenuProps>;
|
|
1339
1339
|
Portal: React$1.FC<_radix_ui_react_menubar.MenubarPortalProps>;
|
|
1340
1340
|
RadioGroup: React$1.ForwardRefExoticComponent<_radix_ui_react_menubar.MenubarRadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1343,9 +1343,9 @@ declare const MenuBar: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_me
|
|
|
1343
1343
|
Shortcut: ({ className, ...props }: React$1.HTMLAttributes<HTMLSpanElement>) => react_jsx_runtime.JSX.Element;
|
|
1344
1344
|
Sub: React$1.FC<_radix_ui_react_menubar.MenubarSubProps>;
|
|
1345
1345
|
SubContent: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_menubar.MenubarSubContentProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
1346
|
-
SubTrigger: React$1.ForwardRefExoticComponent<{
|
|
1346
|
+
SubTrigger: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_menubar.MenubarSubTriggerProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
1347
1347
|
inset?: boolean;
|
|
1348
|
-
} &
|
|
1348
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
1349
1349
|
Trigger: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_menubar.MenubarTriggerProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1350
1350
|
};
|
|
1351
1351
|
|
|
@@ -1355,9 +1355,9 @@ type NotificationHubProps = {
|
|
|
1355
1355
|
};
|
|
1356
1356
|
declare const NotificationHub: ({ timeout }: NotificationHubProps) => react_jsx_runtime.JSX.Element;
|
|
1357
1357
|
|
|
1358
|
-
type PaginationLinkProps = Simplify<{
|
|
1358
|
+
type PaginationLinkProps = Simplify<Pick<ButtonProps, 'size'> & React$1.ComponentProps<'a'> & {
|
|
1359
1359
|
isActive?: boolean;
|
|
1360
|
-
}
|
|
1360
|
+
}>;
|
|
1361
1361
|
declare const PaginationLink: ({ children, className, isActive, size, ...props }: PaginationLinkProps) => react_jsx_runtime.JSX.Element;
|
|
1362
1362
|
|
|
1363
1363
|
declare const Pagination: (({ className, ...props }: React$1.ComponentProps<"nav">) => react_jsx_runtime.JSX.Element) & {
|
|
@@ -1398,20 +1398,20 @@ declare const RadioGroup: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimi
|
|
|
1398
1398
|
Item: React$1.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React$1.RefAttributes<HTMLButtonElement>, "ref"> & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1399
1399
|
};
|
|
1400
1400
|
|
|
1401
|
-
type ResizableHandleProps = {
|
|
1401
|
+
type ResizableHandleProps = React$1.ComponentProps<typeof PanelResizeHandle> & {
|
|
1402
1402
|
withHandle?: boolean;
|
|
1403
|
-
}
|
|
1403
|
+
};
|
|
1404
1404
|
|
|
1405
1405
|
type ResizablePanelGroupProps = React$1.ComponentProps<typeof PanelGroup>;
|
|
1406
1406
|
|
|
1407
1407
|
type ResizableRootType = React$1.FC<{
|
|
1408
1408
|
children: React$1.ReactNode;
|
|
1409
1409
|
}>;
|
|
1410
|
-
type ResizableType = {
|
|
1410
|
+
type ResizableType = ResizableRootType & {
|
|
1411
1411
|
Handle: React$1.FC<ResizableHandleProps>;
|
|
1412
1412
|
Panel: React$1.FC<PanelProps>;
|
|
1413
1413
|
PanelGroup: React$1.FC<ResizablePanelGroupProps>;
|
|
1414
|
-
}
|
|
1414
|
+
};
|
|
1415
1415
|
declare const Resizable: ResizableType;
|
|
1416
1416
|
|
|
1417
1417
|
declare const ScrollArea: React$1.ForwardRefExoticComponent<Omit<_radix_ui_react_scroll_area.ScrollAreaProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
@@ -1429,16 +1429,16 @@ type BaseSearchBarProps = {
|
|
|
1429
1429
|
/** Whether the input element should be readonly */
|
|
1430
1430
|
readOnly?: boolean;
|
|
1431
1431
|
};
|
|
1432
|
-
type ControlledSearchBarProps = {
|
|
1432
|
+
type ControlledSearchBarProps = BaseSearchBarProps & {
|
|
1433
1433
|
/** Event handler called when the value changes */
|
|
1434
1434
|
onValueChange: (value: string) => void;
|
|
1435
1435
|
/** The controlled value of the search bar, which should be used in conjunction with onValueChange */
|
|
1436
1436
|
value: string;
|
|
1437
|
-
}
|
|
1438
|
-
type UncontrolledSearchBarProps = {
|
|
1437
|
+
};
|
|
1438
|
+
type UncontrolledSearchBarProps = BaseSearchBarProps & {
|
|
1439
1439
|
onValueChange?: never;
|
|
1440
1440
|
value?: never;
|
|
1441
|
-
}
|
|
1441
|
+
};
|
|
1442
1442
|
type SearchBarProps = ControlledSearchBarProps | UncontrolledSearchBarProps;
|
|
1443
1443
|
declare const SearchBar: ({ className, onClick, onValueChange, placeholder, readOnly, value, ...props }: SearchBarProps) => react_jsx_runtime.JSX.Element;
|
|
1444
1444
|
|
package/dist/components.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
useNotificationsStore,
|
|
6
6
|
useTheme,
|
|
7
7
|
useTranslation
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-JTEI2ZYI.js";
|
|
9
|
+
import "./chunk-IYOZHDZL.js";
|
|
10
10
|
import {
|
|
11
11
|
cn
|
|
12
12
|
} from "./chunk-VJSOLDCS.js";
|
|
@@ -1051,11 +1051,32 @@ var ClientTablePagination = ({
|
|
|
1051
1051
|
}) => {
|
|
1052
1052
|
const { t } = useTranslation("libui");
|
|
1053
1053
|
return /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between py-3", children: [
|
|
1054
|
-
/* @__PURE__ */ jsx51("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx51(
|
|
1054
|
+
/* @__PURE__ */ jsx51("div", { className: "hidden sm:block", children: /* @__PURE__ */ jsx51(
|
|
1055
|
+
"p",
|
|
1056
|
+
{
|
|
1057
|
+
className: "text-sm font-medium text-muted-foreground",
|
|
1058
|
+
"data-testid": "page-numbers",
|
|
1059
|
+
children: `${firstEntry} - ${lastEntry} / ${totalEntries}`
|
|
1060
|
+
}
|
|
1061
|
+
) }),
|
|
1055
1062
|
/* @__PURE__ */ jsxs13("div", { className: "flex flex-1 justify-between gap-3 sm:justify-end", children: [
|
|
1056
1063
|
/* @__PURE__ */ jsx51(
|
|
1057
1064
|
Button,
|
|
1058
1065
|
{
|
|
1066
|
+
"data-testid": "first-page-button",
|
|
1067
|
+
disabled: currentPage === 1,
|
|
1068
|
+
type: "button",
|
|
1069
|
+
variant: "outline",
|
|
1070
|
+
onClick: () => {
|
|
1071
|
+
setCurrentPage(1);
|
|
1072
|
+
},
|
|
1073
|
+
children: t("pagination.firstPage")
|
|
1074
|
+
}
|
|
1075
|
+
),
|
|
1076
|
+
/* @__PURE__ */ jsx51(
|
|
1077
|
+
Button,
|
|
1078
|
+
{
|
|
1079
|
+
"data-testid": "previous-page-button",
|
|
1059
1080
|
disabled: currentPage === 1,
|
|
1060
1081
|
type: "button",
|
|
1061
1082
|
variant: "outline",
|
|
@@ -1068,6 +1089,7 @@ var ClientTablePagination = ({
|
|
|
1068
1089
|
/* @__PURE__ */ jsx51(
|
|
1069
1090
|
Button,
|
|
1070
1091
|
{
|
|
1092
|
+
"data-testid": "next-page-button",
|
|
1071
1093
|
disabled: currentPage === pageCount,
|
|
1072
1094
|
type: "button",
|
|
1073
1095
|
variant: "outline",
|
|
@@ -1076,6 +1098,19 @@ var ClientTablePagination = ({
|
|
|
1076
1098
|
},
|
|
1077
1099
|
children: t("pagination.next")
|
|
1078
1100
|
}
|
|
1101
|
+
),
|
|
1102
|
+
/* @__PURE__ */ jsx51(
|
|
1103
|
+
Button,
|
|
1104
|
+
{
|
|
1105
|
+
"data-testid": "last-page-button",
|
|
1106
|
+
disabled: currentPage === pageCount,
|
|
1107
|
+
type: "button",
|
|
1108
|
+
variant: "outline",
|
|
1109
|
+
onClick: () => {
|
|
1110
|
+
setCurrentPage(pageCount);
|
|
1111
|
+
},
|
|
1112
|
+
children: t("pagination.lastPage")
|
|
1113
|
+
}
|
|
1079
1114
|
)
|
|
1080
1115
|
] })
|
|
1081
1116
|
] });
|
|
@@ -1113,7 +1148,7 @@ var ClientTable = ({
|
|
|
1113
1148
|
const lastEntry = Math.min(firstEntry + entriesPerPage - 1, data.length);
|
|
1114
1149
|
const currentEntries = data.slice(firstEntry - 1, lastEntry);
|
|
1115
1150
|
const nRows = Math.max(currentEntries.length, minRows ?? -1);
|
|
1116
|
-
return /* @__PURE__ */ jsxs14("div", { className, ...props, children: [
|
|
1151
|
+
return /* @__PURE__ */ jsxs14("div", { className, ...props, "data-testid": "ClientTable", children: [
|
|
1117
1152
|
/* @__PURE__ */ jsx52("div", { className: "rounded-md border bg-card tracking-tight text-muted-foreground shadow-sm", children: /* @__PURE__ */ jsxs14(Table, { children: [
|
|
1118
1153
|
/* @__PURE__ */ jsx52(Table.Header, { children: /* @__PURE__ */ jsx52(Table.Row, { children: columns.map((column, i) => /* @__PURE__ */ jsx52(Table.Head, { className: "whitespace-nowrap text-foreground", children: columnDropdownOptions ? /* @__PURE__ */ jsxs14(DropdownMenu, { children: [
|
|
1119
1154
|
/* @__PURE__ */ jsxs14(DropdownMenu.Trigger, { className: "flex items-center justify-between gap-3", children: [
|
|
@@ -1125,6 +1160,7 @@ var ClientTable = ({
|
|
|
1125
1160
|
return /* @__PURE__ */ jsxs14(
|
|
1126
1161
|
DropdownMenu.Item,
|
|
1127
1162
|
{
|
|
1163
|
+
"data-testid": option.label + "-test-id",
|
|
1128
1164
|
onClick: () => {
|
|
1129
1165
|
option.onSelection(column);
|
|
1130
1166
|
},
|
|
@@ -3205,16 +3241,16 @@ var StringField = (props) => {
|
|
|
3205
3241
|
import { jsx as jsx132 } from "react/jsx-runtime";
|
|
3206
3242
|
var ScalarField = ({ field, ...props }) => {
|
|
3207
3243
|
switch (field.kind) {
|
|
3208
|
-
case "string":
|
|
3209
|
-
return /* @__PURE__ */ jsx132(StringField, { ...field, ...props });
|
|
3210
|
-
case "number":
|
|
3211
|
-
return /* @__PURE__ */ jsx132(NumberField, { ...field, ...props });
|
|
3212
|
-
case "date":
|
|
3213
|
-
return /* @__PURE__ */ jsx132(DateField, { ...field, ...props });
|
|
3214
3244
|
case "boolean":
|
|
3215
3245
|
return /* @__PURE__ */ jsx132(BooleanField, { ...field, ...props });
|
|
3246
|
+
case "date":
|
|
3247
|
+
return /* @__PURE__ */ jsx132(DateField, { ...field, ...props });
|
|
3248
|
+
case "number":
|
|
3249
|
+
return /* @__PURE__ */ jsx132(NumberField, { ...field, ...props });
|
|
3216
3250
|
case "set":
|
|
3217
3251
|
return /* @__PURE__ */ jsx132(SetField, { ...field, ...props });
|
|
3252
|
+
case "string":
|
|
3253
|
+
return /* @__PURE__ */ jsx132(StringField, { ...field, ...props });
|
|
3218
3254
|
default:
|
|
3219
3255
|
throw new Error(`Unexpected value for kind: ${Reflect.get(field, "kind")}`);
|
|
3220
3256
|
}
|