@douglasneuroinformatics/libui 2.9.3 → 2.11.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/components/Accordion/Accordion.d.ts +0 -1
- package/dist/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +0 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialogFooter.d.ts.map +1 -1
- package/dist/components/AlertDialog/AlertDialogHeader.d.ts.map +1 -1
- package/dist/components/ArrowToggle/ArrowToggle.d.ts +12 -12
- package/dist/components/ArrowToggle/ArrowToggle.d.ts.map +1 -1
- package/dist/components/ArrowToggle/ArrowToggle.js +4 -4
- package/dist/components/Avatar/Avatar.d.ts +0 -1
- package/dist/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +3 -4
- package/dist/components/Breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbEllipsis.d.ts +1 -1
- package/dist/components/Breadcrumb/BreadcrumbEllipsis.d.ts.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbLink.d.ts +1 -1
- package/dist/components/Breadcrumb/BreadcrumbLink.d.ts.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbRoot.d.ts.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbSeparator.d.ts +1 -1
- package/dist/components/Breadcrumb/BreadcrumbSeparator.d.ts.map +1 -1
- package/dist/components/Button/Button.d.ts +12 -12
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Card/Card.d.ts.map +1 -1
- package/dist/components/ClientTable/ClientTable.d.ts.map +1 -1
- package/dist/components/Collapsible/Collapsible.d.ts +0 -1
- package/dist/components/Collapsible/Collapsible.d.ts.map +1 -1
- package/dist/components/Command/Command.d.ts +33 -33
- package/dist/components/Command/Command.d.ts.map +1 -1
- package/dist/components/Command/CommandEmpty.d.ts +2 -2
- package/dist/components/Command/CommandGroup.d.ts +4 -4
- package/dist/components/Command/CommandInput.d.ts +4 -4
- package/dist/components/Command/CommandItem.d.ts +7 -7
- package/dist/components/Command/CommandList.d.ts +3 -3
- package/dist/components/Command/CommandSeparator.d.ts +3 -3
- package/dist/components/Command/CommandShortcut.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenu.d.ts +3 -4
- package/dist/components/ContextMenu/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenuItem.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuLabel.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenuLabel.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuShortcut.d.ts.map +1 -1
- package/dist/components/ContextMenu/ContextMenuSubTrigger.d.ts +1 -1
- package/dist/components/ContextMenu/ContextMenuSubTrigger.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +1 -1
- package/dist/components/Dialog/Dialog.d.ts +0 -1
- package/dist/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog/DialogBody.d.ts.map +1 -1
- package/dist/components/Dialog/DialogFooter.d.ts.map +1 -1
- package/dist/components/Dialog/DialogHeader.d.ts.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/Drawer/DrawerContent.d.ts +1 -1
- package/dist/components/Drawer/DrawerFooter.d.ts.map +1 -1
- package/dist/components/Drawer/DrawerHeader.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +4 -5
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuContent.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenuContent.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuItem.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuLabel.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenuLabel.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuShortcut.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuSubTrigger.d.ts +1 -1
- package/dist/components/DropdownMenu/DropdownMenuSubTrigger.d.ts.map +1 -1
- package/dist/components/Form/BaseRadioField.d.ts +2 -1
- package/dist/components/Form/BaseRadioField.d.ts.map +1 -1
- package/dist/components/Form/BaseRadioField.js +3 -3
- package/dist/components/Form/BooleanField/BooleanFieldCheckbox.d.ts +1 -1
- package/dist/components/Form/BooleanField/BooleanFieldCheckbox.d.ts.map +1 -1
- package/dist/components/Form/BooleanField/BooleanFieldCheckbox.js +2 -2
- package/dist/components/Form/BooleanField/BooleanFieldRadio.d.ts +1 -1
- package/dist/components/Form/BooleanField/BooleanFieldRadio.d.ts.map +1 -1
- package/dist/components/Form/BooleanField/BooleanFieldRadio.js +4 -4
- package/dist/components/Form/DateField/DateField.d.ts +1 -1
- package/dist/components/Form/DateField/DateField.d.ts.map +1 -1
- package/dist/components/Form/DateField/DateField.js +2 -2
- package/dist/components/Form/DynamicField.d.ts.map +1 -1
- package/dist/components/Form/FieldGroup/FieldGroup.d.ts +2 -3
- package/dist/components/Form/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/dist/components/Form/FieldsComponent.d.ts.map +1 -1
- package/dist/components/Form/Form.d.ts +1 -1
- package/dist/components/Form/Form.d.ts.map +1 -1
- package/dist/components/Form/NumberField/NumberFieldInput.d.ts +1 -1
- package/dist/components/Form/NumberField/NumberFieldInput.d.ts.map +1 -1
- package/dist/components/Form/NumberField/NumberFieldInput.js +20 -7
- package/dist/components/Form/NumberField/NumberFieldRadio.d.ts +1 -1
- package/dist/components/Form/NumberField/NumberFieldRadio.d.ts.map +1 -1
- package/dist/components/Form/NumberField/NumberFieldRadio.js +3 -3
- package/dist/components/Form/NumberField/NumberFieldSelect.d.ts +1 -1
- package/dist/components/Form/NumberField/NumberFieldSelect.d.ts.map +1 -1
- package/dist/components/Form/NumberField/NumberFieldSelect.js +2 -2
- package/dist/components/Form/NumberField/NumberFieldSlider.d.ts +1 -1
- package/dist/components/Form/NumberField/NumberFieldSlider.d.ts.map +1 -1
- package/dist/components/Form/NumberField/NumberFieldSlider.js +2 -2
- package/dist/components/Form/NumberRecordField.d.ts +1 -1
- package/dist/components/Form/NumberRecordField.d.ts.map +1 -1
- package/dist/components/Form/NumberRecordField.js +2 -2
- package/dist/components/Form/RecordArrayField.d.ts +3 -2
- package/dist/components/Form/RecordArrayField.d.ts.map +1 -1
- package/dist/components/Form/RecordArrayField.js +7 -4
- package/dist/components/Form/SetField/SetField.d.ts.map +1 -1
- package/dist/components/Form/SetField/SetFieldListbox.d.ts +1 -1
- package/dist/components/Form/SetField/SetFieldListbox.d.ts.map +1 -1
- package/dist/components/Form/SetField/SetFieldListbox.js +2 -2
- package/dist/components/Form/SetField/SetFieldSelect.d.ts +1 -1
- package/dist/components/Form/SetField/SetFieldSelect.d.ts.map +1 -1
- package/dist/components/Form/SetField/SetFieldSelect.js +2 -2
- package/dist/components/Form/StaticField.d.ts.map +1 -1
- package/dist/components/Form/StringField/StringFieldInput.d.ts +1 -1
- package/dist/components/Form/StringField/StringFieldInput.d.ts.map +1 -1
- package/dist/components/Form/StringField/StringFieldInput.js +2 -2
- package/dist/components/Form/StringField/StringFieldPassword.d.ts +1 -1
- package/dist/components/Form/StringField/StringFieldPassword.d.ts.map +1 -1
- package/dist/components/Form/StringField/StringFieldPassword.js +3 -3
- package/dist/components/Form/StringField/StringFieldRadio.d.ts.map +1 -1
- package/dist/components/Form/StringField/StringFieldSelect.d.ts +1 -1
- package/dist/components/Form/StringField/StringFieldSelect.d.ts.map +1 -1
- package/dist/components/Form/StringField/StringFieldSelect.js +2 -2
- package/dist/components/Form/StringField/StringFieldTextArea.d.ts +1 -1
- package/dist/components/Form/StringField/StringFieldTextArea.d.ts.map +1 -1
- package/dist/components/Form/StringField/StringFieldTextArea.js +2 -2
- package/dist/components/Form/utils.d.ts +1 -1
- package/dist/components/Form/utils.d.ts.map +1 -1
- package/dist/components/HoverCard/HoverCard.d.ts +0 -1
- package/dist/components/HoverCard/HoverCard.d.ts.map +1 -1
- package/dist/components/Label/Label.d.ts.map +1 -1
- package/dist/components/LineGraph/LineGraph.d.ts.map +1 -1
- package/dist/components/ListboxDropdown/ListboxDropdown.d.ts.map +1 -1
- package/dist/components/MenuBar/MenuBar.d.ts +24 -26
- package/dist/components/MenuBar/MenuBar.d.ts.map +1 -1
- package/dist/components/MenuBar/MenuBarItem.d.ts +1 -1
- package/dist/components/MenuBar/MenuBarItem.d.ts.map +1 -1
- package/dist/components/MenuBar/MenuBarLabel.d.ts +1 -1
- package/dist/components/MenuBar/MenuBarLabel.d.ts.map +1 -1
- package/dist/components/MenuBar/MenuBarShortcut.d.ts.map +1 -1
- package/dist/components/MenuBar/MenuBarSubTrigger.d.ts +1 -1
- package/dist/components/MenuBar/MenuBarSubTrigger.d.ts.map +1 -1
- package/dist/components/NotificationHub/NotificationIcon.js +2 -2
- package/dist/components/Pagination/Pagination.d.ts +8 -843
- package/dist/components/Pagination/Pagination.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationContent.d.ts +1 -1
- package/dist/components/Pagination/PaginationContent.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationEllipsis.d.ts +1 -1
- package/dist/components/Pagination/PaginationEllipsis.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationItem.d.ts +1 -1
- package/dist/components/Pagination/PaginationItem.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationNext.d.ts.map +1 -1
- package/dist/components/Pagination/PaginationRoot.d.ts +1 -1
- package/dist/components/Pagination/PaginationRoot.d.ts.map +1 -1
- package/dist/components/Popover/Popover.d.ts +0 -1
- package/dist/components/Popover/Popover.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts +0 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Sheet/Sheet.d.ts +0 -1
- package/dist/components/Sheet/Sheet.d.ts.map +1 -1
- package/dist/components/Sheet/SheetBody.d.ts.map +1 -1
- package/dist/components/Sheet/SheetContent.d.ts.map +1 -1
- package/dist/components/Sheet/SheetFooter.d.ts.map +1 -1
- package/dist/components/Sheet/SheetHeader.d.ts.map +1 -1
- package/dist/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/SpinnerIcon/SpinnerIcon.d.ts.map +1 -1
- package/dist/components/StatisticCard/StatisticCard.d.ts +10 -0
- package/dist/components/StatisticCard/StatisticCard.d.ts.map +1 -0
- package/dist/components/StatisticCard/StatisticCard.js +16 -0
- package/dist/components/Table/Table.d.ts +0 -1
- package/dist/components/Table/Table.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts +0 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components.d.ts +1 -0
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +1 -0
- package/dist/douglasneuroinformatics-libui-2.11.0.tgz +0 -0
- package/dist/hooks/useTheme.d.ts +1 -1
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/i18n.d.ts.map +1 -1
- package/dist/testing/mocks.d.ts +1 -1
- package/package.json +65 -65
- package/src/components/ArrowToggle/ArrowToggle.tsx +4 -4
- package/src/components/Badge/Badge.tsx +1 -1
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +1 -1
- package/src/components/Form/BaseRadioField.tsx +8 -2
- package/src/components/Form/BooleanField/BooleanFieldCheckbox.tsx +10 -2
- package/src/components/Form/BooleanField/BooleanFieldRadio.tsx +17 -3
- package/src/components/Form/DateField/DateField.spec.tsx +2 -2
- package/src/components/Form/DateField/DateField.tsx +2 -2
- package/src/components/Form/Form.stories.tsx +42 -0
- package/src/components/Form/Form.test.tsx +1 -1
- package/src/components/Form/NumberField/NumberFieldInput.tsx +22 -7
- package/src/components/Form/NumberField/NumberFieldRadio.tsx +3 -2
- package/src/components/Form/NumberField/NumberFieldSelect.tsx +6 -1
- package/src/components/Form/NumberField/NumberFieldSlider.tsx +2 -1
- package/src/components/Form/NumberRecordField.tsx +2 -1
- package/src/components/Form/RecordArrayField.tsx +9 -5
- package/src/components/Form/SetField/SetFieldListbox.tsx +2 -1
- package/src/components/Form/SetField/SetFieldSelect.tsx +2 -1
- package/src/components/Form/StringField/StringFieldInput.tsx +2 -1
- package/src/components/Form/StringField/StringFieldPassword.tsx +4 -3
- package/src/components/Form/StringField/StringFieldSelect.tsx +6 -1
- package/src/components/Form/StringField/StringFieldTextArea.tsx +2 -1
- package/src/components/Label/Label.tsx +1 -1
- package/src/components/LineGraph/LineGraph.tsx +1 -2
- package/src/components/MenuBar/MenuBar.tsx +4 -1
- package/src/components/NotificationHub/NotificationIcon.tsx +2 -2
- package/src/components/Sheet/SheetContent.tsx +1 -1
- package/src/components/StatisticCard/StatisticCard.stories.tsx +18 -0
- package/src/components/StatisticCard/StatisticCard.tsx +34 -0
- package/src/components.ts +1 -0
- package/src/hooks/useDownload.test.ts +2 -1
- package/src/hooks/useTheme.ts +1 -1
- package/src/i18n.ts +1 -1
- package/dist/douglasneuroinformatics-libui-2.9.3.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,eAAO,MAAM,UAAU;;;;;;;CAOrB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const PaginationContent: ({ className, ...props }: React.ComponentProps<
|
|
2
|
+
export declare const PaginationContent: ({ className, ...props }: React.ComponentProps<"ul">) => React.JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PaginationContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationContent.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,iBAAiB,4BAA6B,
|
|
1
|
+
{"version":3,"file":"PaginationContent.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,iBAAiB,4BAA6B,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,sBAEpF,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const PaginationEllipsis: ({ className, ...props }: React.ComponentProps<
|
|
2
|
+
export declare const PaginationEllipsis: ({ className, ...props }: React.ComponentProps<"span">) => React.JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PaginationEllipsis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationEllipsis.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationEllipsis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,kBAAkB,4BAA6B,
|
|
1
|
+
{"version":3,"file":"PaginationEllipsis.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationEllipsis.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,eAAO,MAAM,kBAAkB,4BAA6B,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,sBAKvF,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const PaginationItem: ({ className, ...props }: React.ComponentProps<
|
|
2
|
+
export declare const PaginationItem: ({ className, ...props }: React.ComponentProps<"li">) => React.JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PaginationItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationItem.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,cAAc,4BAA6B,
|
|
1
|
+
{"version":3,"file":"PaginationItem.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,cAAc,4BAA6B,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,sBAEjF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationNext.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationNext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,cAAc,4BAA6B,
|
|
1
|
+
{"version":3,"file":"PaginationNext.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationNext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,cAAc,4BAA6B,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,sBAQlG,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const PaginationRoot: ({ className, ...props }: React.ComponentProps<
|
|
2
|
+
export declare const PaginationRoot: ({ className, ...props }: React.ComponentProps<"nav">) => React.JSX.Element;
|
|
3
3
|
//# sourceMappingURL=PaginationRoot.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,cAAc,4BAA6B,
|
|
1
|
+
{"version":3,"file":"PaginationRoot.d.ts","sourceRoot":"","sources":["../../../src/components/Pagination/PaginationRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,cAAc,4BAA6B,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,sBAOlF,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
2
1
|
export declare const Popover: import("react").FC<import("@radix-ui/react-popover").PopoverProps> & {
|
|
3
2
|
Content: import("react").ForwardRefExoticComponent<import("./PopoverContent.js").PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
3
|
Trigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-popover").PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO;;;CAGlB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
2
1
|
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
3
2
|
export declare const Select: import("react").FC<SelectPrimitive.SelectProps> & {
|
|
4
3
|
Content: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAU1D,eAAO,MAAM,MAAM;;;;;;;;;;CAUjB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
2
1
|
export declare const Sheet: import("react").FC<import("@radix-ui/react-dialog").DialogProps> & {
|
|
3
2
|
Body: ({ children, className, ...props }: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => import("react").JSX.Element;
|
|
4
3
|
Close: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Sheet.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/Sheet.tsx"],"names":[],"mappings":"AAUA,eAAO,MAAM,KAAK;;;;;;;;;;;;;CAWhB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetBody.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/SheetBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,SAAS,sCAInB,
|
|
1
|
+
{"version":3,"file":"SheetBody.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/SheetBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,SAAS,sCAInB,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,sBAM/E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetContent.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/SheetContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAS,OAAO,EAAmB,MAAM,wBAAwB,CAAC;AACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"SheetContent.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/SheetContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAS,OAAO,EAAmB,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,aAAa;;8EAiBzB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,OAAO,CAAC,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpH,eAAO,MAAM,YAAY;;sHAgBvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetFooter.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/SheetFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,WAAW,4BAA6B,
|
|
1
|
+
{"version":3,"file":"SheetFooter.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/SheetFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,WAAW,4BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,sBAExF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SheetHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/SheetHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,WAAW,4BAA6B,
|
|
1
|
+
{"version":3,"file":"SheetHeader.d.ts","sourceRoot":"","sources":["../../../src/components/Sheet/SheetHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,WAAW,4BAA6B,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,sBAExF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,OAAO,4BAA6B,
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/Spinner/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,OAAO,4BAA6B,SAAS,CAAC,cAAc,CAAC,sBAgBzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SpinnerIcon.d.ts","sourceRoot":"","sources":["../../../src/components/SpinnerIcon/SpinnerIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,WAAW,4BAA6B,
|
|
1
|
+
{"version":3,"file":"SpinnerIcon.d.ts","sourceRoot":"","sources":["../../../src/components/SpinnerIcon/SpinnerIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,eAAO,MAAM,WAAW,4BAA6B,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,sBAgBpF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type StatisticCardProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
icon?: JSX.Element;
|
|
5
|
+
label: string;
|
|
6
|
+
value: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const StatisticCard: ({ className, icon, label, value }: StatisticCardProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=StatisticCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatisticCard.d.ts","sourceRoot":"","sources":["../../../src/components/StatisticCard/StatisticCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAOzC,KAAK,kBAAkB,GAAG;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,aAAa,sCAAuC,kBAAkB,sBAmBlF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { motion, useSpring, useTransform } from 'framer-motion';
|
|
3
|
+
import { cn } from '../../utils.js';
|
|
4
|
+
import { Card } from '../Card/Card.js';
|
|
5
|
+
export const StatisticCard = ({ className, icon, label, value }) => {
|
|
6
|
+
const spring = useSpring(0, { bounce: 0 });
|
|
7
|
+
const rounded = useTransform(spring, (latest) => Math.floor(latest));
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
spring.set(value);
|
|
10
|
+
}, [spring, value]);
|
|
11
|
+
return (React.createElement(Card, { className: cn('flex w-full rounded-lg p-4', className) },
|
|
12
|
+
icon && React.createElement("div", { className: "mr-2 flex items-center justify-center text-4xl" }, icon),
|
|
13
|
+
React.createElement("div", { className: "w-full text-center" },
|
|
14
|
+
React.createElement(motion.h3, { className: "title-font text-2xl font-semibold text-slate-900 dark:text-slate-100 sm:text-3xl" }, rounded),
|
|
15
|
+
React.createElement("p", { className: "font-medium leading-relaxed" }, label))));
|
|
16
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
2
1
|
export declare const Table: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLTableElement> & import("react").RefAttributes<HTMLTableElement>> & {
|
|
3
2
|
Body: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
4
3
|
Caption: import("react").ForwardRefExoticComponent<import("react").HTMLAttributes<HTMLTableCaptionElement> & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Table.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.tsx"],"names":[],"mappings":"AASA,eAAO,MAAM,KAAK;;;;;;;;CAQhB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
2
1
|
export declare const Tabs: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
3
2
|
Content: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
3
|
List: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-tabs").TabsListProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,IAAI;;;;CAIf,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
2
1
|
export declare const Tooltip: (({ children, delayDuration, skipDelayDuration }: import("./TooltipRoot.js").TooltipRootProps) => import("react").JSX.Element) & {
|
|
3
2
|
Content: import("react").ForwardRefExoticComponent<import("./TooltipContent.js").TooltipContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
3
|
Trigger: import("react").ForwardRefExoticComponent<import("./TooltipTrigger.js").TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO;;;CAGlB,CAAC"}
|
package/dist/components.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export * from './components/Sheet/Sheet.js';
|
|
|
42
42
|
export * from './components/Slider/Slider.js';
|
|
43
43
|
export * from './components/Spinner/Spinner.js';
|
|
44
44
|
export * from './components/SpinnerIcon/SpinnerIcon.js';
|
|
45
|
+
export * from './components/StatisticCard/StatisticCard.js';
|
|
45
46
|
export * from './components/Switch/Switch.js';
|
|
46
47
|
export * from './components/Table/Table.js';
|
|
47
48
|
export * from './components/Tabs/Tabs.js';
|
package/dist/components.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,iDAAiD,CAAC;AAChE,cAAc,iCAAiC,CAAC;AAChD,cAAc,iDAAiD,CAAC;AAChE,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,qCAAqC,CAAC;AACpD,cAAc,iDAAiD,CAAC;AAChE,cAAc,iCAAiC,CAAC;AAChD,cAAc,iDAAiD,CAAC;AAChE,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,+BAA+B,CAAC;AAC9C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC"}
|
package/dist/components.js
CHANGED
|
@@ -42,6 +42,7 @@ export * from './components/Sheet/Sheet.js';
|
|
|
42
42
|
export * from './components/Slider/Slider.js';
|
|
43
43
|
export * from './components/Spinner/Spinner.js';
|
|
44
44
|
export * from './components/SpinnerIcon/SpinnerIcon.js';
|
|
45
|
+
export * from './components/StatisticCard/StatisticCard.js';
|
|
45
46
|
export * from './components/Switch/Switch.js';
|
|
46
47
|
export * from './components/Table/Table.js';
|
|
47
48
|
export * from './components/Tabs/Tabs.js';
|
|
Binary file
|
package/dist/hooks/useTheme.d.ts
CHANGED
|
@@ -15,5 +15,5 @@ declare const SYS_DARK_MEDIA_QUERY = "(prefers-color-scheme: dark)";
|
|
|
15
15
|
* cases where the theme is updated outside this hook
|
|
16
16
|
*/
|
|
17
17
|
declare function useTheme(): readonly [Theme, UpdateTheme];
|
|
18
|
-
export { DEFAULT_THEME, SYS_DARK_MEDIA_QUERY, THEME_ATTRIBUTE, THEME_KEY,
|
|
18
|
+
export { DEFAULT_THEME, SYS_DARK_MEDIA_QUERY, type Theme, THEME_ATTRIBUTE, THEME_KEY, useTheme };
|
|
19
19
|
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAE9B,KAAK,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAE1C,eAAe;AACf,QAAA,MAAM,aAAa,EAAE,KAAe,CAAC;AAErC,eAAe;AACf,QAAA,MAAM,eAAe,cAAc,CAAC;AAEpC,eAAe;AACf,QAAA,MAAM,SAAS,UAAU,CAAC;AAE1B,eAAe;AACf,QAAA,MAAM,oBAAoB,iCAAiC,CAAC;AAE5D;;;;;GAKG;AACH,iBAAS,QAAQ,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC,CA2CjD;AAED,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAIA,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAE9B,KAAK,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;AAE1C,eAAe;AACf,QAAA,MAAM,aAAa,EAAE,KAAe,CAAC;AAErC,eAAe;AACf,QAAA,MAAM,eAAe,cAAc,CAAC;AAEpC,eAAe;AACf,QAAA,MAAM,SAAS,UAAU,CAAC;AAE1B,eAAe;AACf,QAAA,MAAM,oBAAoB,iCAAiC,CAAC;AAE5D;;;;;GAKG;AACH,iBAAS,QAAQ,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC,CA2CjD;AAED,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,KAAK,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/i18n.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../src/i18n.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,KAAK,IAAI,IAAI,IAAI,EAAE,MAAM,SAAS,CAAC;AAI5D,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAItD,eAAO,MAAM,aAAa,uBAAwB,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,MAAM,MAAM,eAAe,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;CAAE,CAAC;AAE5E,MAAM,MAAM,kBAAkB,CAAC,CAAC,GAAG,WAAW,IAAI;KAC/C,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GACnD,CAAC,CAAC,CAAC,CAAC,SAAS;SAAG,CAAC,IAAI,QAAQ,GAAG,OAAO;KAAE,GACvC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACb,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1B,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AAEF,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM;;EActG;AAED,wBAAgB,0BAA0B,CAAC,CAAC,SAAS,eAAe,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ;;KAEtG;AAED,wBAAgB,eAAe,CAAC,CAAC,SAAS,eAAe,EAAE,YAAY,EAAE,CAAC;QAEhB,kBAAkB,CAAC,CAAC,CAAC;QACrB,kBAAkB,CAAC,CAAC,CAAC;EAE9E;AAED,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA6B,CAAC;AAEpD,QAAA,MAAM,IAAI,EASJ;IACJ,sBAAsB,CAAC,CAAyB,SAAf,eAAe,EAAE,YAAY,EAAE,CAAC,GAAG,IAAI,CAAC;CAC1E,GAAG,IAAI,CAAC;AAcT,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
package/dist/testing/mocks.d.ts
CHANGED
|
@@ -12,5 +12,5 @@ export declare const mockMatchMedia: (matches: ((query: string) => boolean) | bo
|
|
|
12
12
|
* mockStorage('localStorage')
|
|
13
13
|
* // Then use window.localStorage as usual (it will be mocked)
|
|
14
14
|
*/
|
|
15
|
-
export declare const mockStorage: (name:
|
|
15
|
+
export declare const mockStorage: (name: "localStorage" | "sessionStorage") => void;
|
|
16
16
|
//# sourceMappingURL=mocks.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douglasneuroinformatics/libui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.11.0",
|
|
5
5
|
"packageManager": "pnpm@9.3.0",
|
|
6
6
|
"description": "Generic UI components for DNP projects, built using React and Tailwind CSS",
|
|
7
7
|
"author": "Joshua Unrau",
|
|
@@ -64,94 +64,94 @@
|
|
|
64
64
|
"zod": "^3.23.6"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@douglasneuroinformatics/libjs": "^0.
|
|
68
|
-
"@douglasneuroinformatics/libui-form-types": "^0.
|
|
67
|
+
"@douglasneuroinformatics/libjs": "^0.6.0",
|
|
68
|
+
"@douglasneuroinformatics/libui-form-types": "^0.11.0",
|
|
69
69
|
"@headlessui/tailwindcss": "^0.2.1",
|
|
70
|
-
"@heroicons/react": "^2.1.
|
|
71
|
-
"@radix-ui/react-accordion": "^1.
|
|
72
|
-
"@radix-ui/react-alert-dialog": "^1.
|
|
73
|
-
"@radix-ui/react-avatar": "^1.0
|
|
74
|
-
"@radix-ui/react-checkbox": "^1.
|
|
75
|
-
"@radix-ui/react-collapsible": "^1.0
|
|
76
|
-
"@radix-ui/react-context-menu": "^2.1
|
|
77
|
-
"@radix-ui/react-dialog": "^1.
|
|
78
|
-
"@radix-ui/react-dropdown-menu": "^2.
|
|
79
|
-
"@radix-ui/react-hover-card": "^1.
|
|
80
|
-
"@radix-ui/react-label": "^2.0
|
|
81
|
-
"@radix-ui/react-menubar": "^1.
|
|
82
|
-
"@radix-ui/react-popover": "^1.
|
|
83
|
-
"@radix-ui/react-progress": "^1.0
|
|
84
|
-
"@radix-ui/react-radio-group": "^1.
|
|
85
|
-
"@radix-ui/react-scroll-area": "^1.0
|
|
86
|
-
"@radix-ui/react-select": "^2.
|
|
87
|
-
"@radix-ui/react-separator": "^1.0
|
|
88
|
-
"@radix-ui/react-slider": "^1.
|
|
89
|
-
"@radix-ui/react-slot": "^1.0
|
|
90
|
-
"@radix-ui/react-switch": "^1.0
|
|
91
|
-
"@radix-ui/react-tabs": "^1.0
|
|
92
|
-
"@radix-ui/react-tooltip": "^1.
|
|
70
|
+
"@heroicons/react": "^2.1.5",
|
|
71
|
+
"@radix-ui/react-accordion": "^1.2.0",
|
|
72
|
+
"@radix-ui/react-alert-dialog": "^1.1.1",
|
|
73
|
+
"@radix-ui/react-avatar": "^1.1.0",
|
|
74
|
+
"@radix-ui/react-checkbox": "^1.1.1",
|
|
75
|
+
"@radix-ui/react-collapsible": "^1.1.0",
|
|
76
|
+
"@radix-ui/react-context-menu": "^2.2.1",
|
|
77
|
+
"@radix-ui/react-dialog": "^1.1.1",
|
|
78
|
+
"@radix-ui/react-dropdown-menu": "^2.1.1",
|
|
79
|
+
"@radix-ui/react-hover-card": "^1.1.1",
|
|
80
|
+
"@radix-ui/react-label": "^2.1.0",
|
|
81
|
+
"@radix-ui/react-menubar": "^1.1.1",
|
|
82
|
+
"@radix-ui/react-popover": "^1.1.1",
|
|
83
|
+
"@radix-ui/react-progress": "^1.1.0",
|
|
84
|
+
"@radix-ui/react-radio-group": "^1.2.0",
|
|
85
|
+
"@radix-ui/react-scroll-area": "^1.1.0",
|
|
86
|
+
"@radix-ui/react-select": "^2.1.1",
|
|
87
|
+
"@radix-ui/react-separator": "^1.1.0",
|
|
88
|
+
"@radix-ui/react-slider": "^1.2.0",
|
|
89
|
+
"@radix-ui/react-slot": "^1.1.0",
|
|
90
|
+
"@radix-ui/react-switch": "^1.1.0",
|
|
91
|
+
"@radix-ui/react-tabs": "^1.1.0",
|
|
92
|
+
"@radix-ui/react-tooltip": "^1.1.2",
|
|
93
93
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
94
94
|
"class-variance-authority": "^0.7.0",
|
|
95
95
|
"clsx": "^2.1.1",
|
|
96
96
|
"cmdk": "^1.0.0",
|
|
97
|
-
"framer-motion": "^11.2
|
|
97
|
+
"framer-motion": "^11.5.2",
|
|
98
98
|
"i18next": "23.x",
|
|
99
99
|
"i18next-browser-languagedetector": "^8.0.0",
|
|
100
100
|
"lodash-es": "^4.17.21",
|
|
101
|
-
"lucide-react": "^0.
|
|
101
|
+
"lucide-react": "^0.438.0",
|
|
102
102
|
"react-error-boundary": "^4.0.13",
|
|
103
103
|
"react-i18next": "^14.1.2",
|
|
104
|
-
"react-resizable-panels": "^2.
|
|
104
|
+
"react-resizable-panels": "^2.1.2",
|
|
105
105
|
"recharts": "^2.12.7",
|
|
106
|
-
"tailwind-merge": "^2.
|
|
106
|
+
"tailwind-merge": "^2.5.2",
|
|
107
107
|
"tailwindcss-animate": "^1.0.7",
|
|
108
|
-
"ts-pattern": "^5.1
|
|
109
|
-
"type-fest": "^4.
|
|
108
|
+
"ts-pattern": "^5.3.1",
|
|
109
|
+
"type-fest": "^4.26.0",
|
|
110
110
|
"vaul": "^0.9.1",
|
|
111
|
-
"zustand": "^4.5.
|
|
111
|
+
"zustand": "^4.5.5"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@commitlint/cli": "^19.
|
|
115
|
-
"@commitlint/config-conventional": "^19.
|
|
116
|
-
"@douglasneuroinformatics/eslint-config": "^
|
|
114
|
+
"@commitlint/cli": "^19.4.1",
|
|
115
|
+
"@commitlint/config-conventional": "^19.4.1",
|
|
116
|
+
"@douglasneuroinformatics/eslint-config": "^5.1.2",
|
|
117
117
|
"@douglasneuroinformatics/prettier-config": "^0.0.1",
|
|
118
118
|
"@douglasneuroinformatics/semantic-release": "^0.0.1",
|
|
119
|
-
"@douglasneuroinformatics/tsconfig": "^1.0.
|
|
120
|
-
"@storybook/addon-essentials": "^8.
|
|
121
|
-
"@storybook/addon-interactions": "^8.
|
|
122
|
-
"@storybook/addon-links": "^8.
|
|
123
|
-
"@storybook/blocks": "^8.
|
|
124
|
-
"@storybook/components": "^8.
|
|
125
|
-
"@storybook/icons": "^1.2.
|
|
126
|
-
"@storybook/manager-api": "^8.
|
|
127
|
-
"@storybook/react": "^8.
|
|
128
|
-
"@storybook/react-vite": "^8.
|
|
129
|
-
"@storybook/theming": "^8.
|
|
130
|
-
"@testing-library/dom": "^10.
|
|
131
|
-
"@testing-library/jest-dom": "^6.
|
|
132
|
-
"@testing-library/react": "16.0.
|
|
119
|
+
"@douglasneuroinformatics/tsconfig": "^1.0.2",
|
|
120
|
+
"@storybook/addon-essentials": "^8.2.9",
|
|
121
|
+
"@storybook/addon-interactions": "^8.2.9",
|
|
122
|
+
"@storybook/addon-links": "^8.2.9",
|
|
123
|
+
"@storybook/blocks": "^8.2.9",
|
|
124
|
+
"@storybook/components": "^8.2.9",
|
|
125
|
+
"@storybook/icons": "^1.2.10",
|
|
126
|
+
"@storybook/manager-api": "^8.2.9",
|
|
127
|
+
"@storybook/react": "^8.2.9",
|
|
128
|
+
"@storybook/react-vite": "^8.2.9",
|
|
129
|
+
"@storybook/theming": "^8.2.9",
|
|
130
|
+
"@testing-library/dom": "^10.4.0",
|
|
131
|
+
"@testing-library/jest-dom": "^6.5.0",
|
|
132
|
+
"@testing-library/react": "16.0.1",
|
|
133
133
|
"@testing-library/user-event": "^14.5.2",
|
|
134
134
|
"@types/lodash-es": "^4.17.12",
|
|
135
135
|
"@types/node": "^20.14.2",
|
|
136
|
-
"@types/react": "^18.3.
|
|
136
|
+
"@types/react": "^18.3.5",
|
|
137
137
|
"@types/react-dom": "^18.3.0",
|
|
138
138
|
"@vitejs/plugin-react-swc": "^3.7.0",
|
|
139
|
-
"@vitest/coverage-v8": "^
|
|
140
|
-
"autoprefixer": "^10.4.
|
|
141
|
-
"eslint": "^
|
|
139
|
+
"@vitest/coverage-v8": "^2.0.5",
|
|
140
|
+
"autoprefixer": "^10.4.20",
|
|
141
|
+
"eslint": "^9.9.1",
|
|
142
142
|
"happy-dom": "^14.12.0",
|
|
143
|
-
"husky": "^9.
|
|
144
|
-
"jsdom": "
|
|
145
|
-
"postcss": "^8.4.
|
|
146
|
-
"prettier": "^3.3.
|
|
147
|
-
"prettier-plugin-tailwindcss": "^0.6.
|
|
143
|
+
"husky": "^9.1.5",
|
|
144
|
+
"jsdom": "25.0.0",
|
|
145
|
+
"postcss": "^8.4.45",
|
|
146
|
+
"prettier": "^3.3.3",
|
|
147
|
+
"prettier-plugin-tailwindcss": "^0.6.6",
|
|
148
148
|
"sort-json": "^2.0.1",
|
|
149
|
-
"storybook": "^8.
|
|
150
|
-
"storybook-react-i18next": "^3.1.
|
|
151
|
-
"tailwindcss": "^3.4.
|
|
152
|
-
"typescript": "~5.4
|
|
153
|
-
"vite": "5.
|
|
154
|
-
"vitest": "^
|
|
149
|
+
"storybook": "^8.2.9",
|
|
150
|
+
"storybook-react-i18next": "^3.1.7",
|
|
151
|
+
"tailwindcss": "^3.4.10",
|
|
152
|
+
"typescript": "~5.5.4",
|
|
153
|
+
"vite": "5.4.3",
|
|
154
|
+
"vitest": "^2.0.5"
|
|
155
155
|
},
|
|
156
156
|
"commitlint": {
|
|
157
157
|
"extends": [
|
|
@@ -31,14 +31,14 @@ export const ArrowToggle = React.forwardRef<HTMLButtonElement, ArrowToggleProps>
|
|
|
31
31
|
const computedRotation = useMemo(() => {
|
|
32
32
|
const toggleRotation = isToggled ? rotation : 0;
|
|
33
33
|
switch (position) {
|
|
34
|
-
case 'up':
|
|
35
|
-
return 0 + toggleRotation;
|
|
36
|
-
case 'right':
|
|
37
|
-
return 90 + toggleRotation;
|
|
38
34
|
case 'down':
|
|
39
35
|
return 180 + toggleRotation;
|
|
40
36
|
case 'left':
|
|
41
37
|
return 270 + toggleRotation;
|
|
38
|
+
case 'right':
|
|
39
|
+
return 90 + toggleRotation;
|
|
40
|
+
case 'up':
|
|
41
|
+
return 0 + toggleRotation;
|
|
42
42
|
}
|
|
43
43
|
}, [position, rotation, isToggled]);
|
|
44
44
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
3
|
import { Slot, Slottable } from '@radix-ui/react-slot';
|
|
4
|
-
import { type VariantProps
|
|
4
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
5
5
|
import type { Simplify } from 'type-fest';
|
|
6
6
|
|
|
7
7
|
import { cn } from '../../utils.js';
|
|
@@ -6,7 +6,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import { cn } from '../../utils.js';
|
|
7
7
|
import { ArrowToggle } from '../ArrowToggle/ArrowToggle.js';
|
|
8
8
|
import { Card } from '../Card/Card.js';
|
|
9
|
-
import {
|
|
9
|
+
import { Calendar, CALENDAR_ANIMATION_DURATION } from './Calendar.js';
|
|
10
10
|
import { YearSelector } from './YearSelector.js';
|
|
11
11
|
|
|
12
12
|
const MONTHS = [
|
|
@@ -24,6 +24,7 @@ const baseRadioFieldVariants = cva('flex', {
|
|
|
24
24
|
export type BaseRadioFieldProps<T extends string> = Simplify<
|
|
25
25
|
{
|
|
26
26
|
description?: string;
|
|
27
|
+
disabled?: boolean;
|
|
27
28
|
label: string;
|
|
28
29
|
options: { [K in T]: string };
|
|
29
30
|
orientation?: 'horizontal' | 'vertical';
|
|
@@ -32,6 +33,7 @@ export type BaseRadioFieldProps<T extends string> = Simplify<
|
|
|
32
33
|
|
|
33
34
|
export const BaseRadioField = <T extends string>({
|
|
34
35
|
description,
|
|
36
|
+
disabled,
|
|
35
37
|
error,
|
|
36
38
|
label,
|
|
37
39
|
name,
|
|
@@ -56,8 +58,12 @@ export const BaseRadioField = <T extends string>({
|
|
|
56
58
|
>
|
|
57
59
|
{Object.keys(options).map((option) => (
|
|
58
60
|
<div className="flex items-center gap-2" key={option}>
|
|
59
|
-
<RadioGroup.Item disabled={readOnly} id={`${name}-${option}`} value={option} />
|
|
60
|
-
<Label
|
|
61
|
+
<RadioGroup.Item disabled={disabled || readOnly} id={`${name}-${option}`} value={option} />
|
|
62
|
+
<Label
|
|
63
|
+
aria-disabled={disabled || readOnly}
|
|
64
|
+
className="font-normal text-muted-foreground"
|
|
65
|
+
htmlFor={`${name}-${option}`}
|
|
66
|
+
>
|
|
61
67
|
{options[option as T]}
|
|
62
68
|
</Label>
|
|
63
69
|
</div>
|
|
@@ -13,13 +13,21 @@ export type BooleanFieldCheckboxProps = Simplify<
|
|
|
13
13
|
BaseFieldComponentProps<boolean> & Omit<Extract<BooleanFormField, { variant: 'checkbox' }>, 'kind'>
|
|
14
14
|
>;
|
|
15
15
|
|
|
16
|
-
export const BooleanFieldCheckbox = ({
|
|
16
|
+
export const BooleanFieldCheckbox = ({
|
|
17
|
+
disabled,
|
|
18
|
+
error,
|
|
19
|
+
label,
|
|
20
|
+
name,
|
|
21
|
+
readOnly,
|
|
22
|
+
setValue,
|
|
23
|
+
value
|
|
24
|
+
}: BooleanFieldCheckboxProps) => {
|
|
17
25
|
return (
|
|
18
26
|
<FieldGroup>
|
|
19
27
|
<FieldGroup.Row>
|
|
20
28
|
<Checkbox
|
|
21
29
|
checked={value}
|
|
22
|
-
disabled={readOnly}
|
|
30
|
+
disabled={disabled || readOnly}
|
|
23
31
|
id={name}
|
|
24
32
|
name={name}
|
|
25
33
|
onCheckedChange={(value) => {
|
|
@@ -23,6 +23,7 @@ export type BooleanFieldRadioProps = Simplify<
|
|
|
23
23
|
>;
|
|
24
24
|
|
|
25
25
|
export const BooleanFieldRadio = ({
|
|
26
|
+
disabled,
|
|
26
27
|
error,
|
|
27
28
|
label,
|
|
28
29
|
name,
|
|
@@ -47,16 +48,29 @@ export const BooleanFieldRadio = ({
|
|
|
47
48
|
return (
|
|
48
49
|
<FieldGroup>
|
|
49
50
|
<Label>{label}</Label>
|
|
50
|
-
<RadioGroup
|
|
51
|
+
<RadioGroup
|
|
52
|
+
disabled={disabled || readOnly}
|
|
53
|
+
name={name}
|
|
54
|
+
value={stringifyBoolean(value)}
|
|
55
|
+
onValueChange={handleValueChange}
|
|
56
|
+
>
|
|
51
57
|
<FieldGroup.Row>
|
|
52
58
|
<RadioGroup.Item id={`${name}-true`} value="true" />
|
|
53
|
-
<Label
|
|
59
|
+
<Label
|
|
60
|
+
aria-disabled={disabled || readOnly}
|
|
61
|
+
className="font-normal text-muted-foreground"
|
|
62
|
+
htmlFor={`${name}-true`}
|
|
63
|
+
>
|
|
54
64
|
{options?.true ?? t('form.radioLabels.true')}
|
|
55
65
|
</Label>
|
|
56
66
|
</FieldGroup.Row>
|
|
57
67
|
<FieldGroup.Row>
|
|
58
68
|
<RadioGroup.Item id={`${name}-false`} value="false" />
|
|
59
|
-
<Label
|
|
69
|
+
<Label
|
|
70
|
+
aria-disabled={disabled || readOnly}
|
|
71
|
+
className="font-normal text-muted-foreground"
|
|
72
|
+
htmlFor={`${name}-false`}
|
|
73
|
+
>
|
|
60
74
|
{options?.false ?? t('form.radioLabels.false')}
|
|
61
75
|
</Label>
|
|
62
76
|
</FieldGroup.Row>
|
|
@@ -81,14 +81,14 @@ describe('DateField', () => {
|
|
|
81
81
|
await userEvent.click(getByText(datepicker, '1'));
|
|
82
82
|
expectedDate = new Date(new Date().setDate(1));
|
|
83
83
|
expectedDateString = toBasicISOString(expectedDate);
|
|
84
|
-
expect(toBasicISOString(setValue.mock.lastCall[0])).toBe(expectedDateString);
|
|
84
|
+
expect(toBasicISOString(setValue.mock.lastCall?.[0])).toBe(expectedDateString);
|
|
85
85
|
|
|
86
86
|
await userEvent.click(input);
|
|
87
87
|
datepicker = screen.getByTestId('datepicker');
|
|
88
88
|
await userEvent.click(getByText(datepicker, '2'));
|
|
89
89
|
expectedDate = new Date(new Date().setDate(2));
|
|
90
90
|
expectedDateString = toBasicISOString(expectedDate);
|
|
91
|
-
expect(toBasicISOString(setValue.mock.lastCall[0])).toBe(expectedDateString);
|
|
91
|
+
expect(toBasicISOString(setValue.mock.lastCall?.[0])).toBe(expectedDateString);
|
|
92
92
|
});
|
|
93
93
|
it('should render the value provided as a prop', () => {
|
|
94
94
|
const today = new Date();
|