@loadsmart/loadsmart-ui 8.0.2 → 8.0.4

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.
@@ -3,7 +3,9 @@ import { StackProps } from '../Layout/Stack';
3
3
  import { DropZoneProps } from './types';
4
4
  import { StyledComponent } from 'styled-components';
5
5
  export declare const DragDropFileWrapper: StyledComponent<any, any, any, any>;
6
- export declare const DropZoneWrapper: StyledComponent<(props: StackProps) => React.JSX.Element, any, Pick<DropZoneProps, "disabled" | "error">, never>;
6
+ export declare const DropZoneWrapper: StyledComponent<(props: StackProps) => React.JSX.Element, any, Pick<DropZoneProps, "disabled"> & {
7
+ $error?: boolean;
8
+ }, never>;
7
9
  export declare const HiddenInput: StyledComponent<"input", any, {}, never>;
8
10
  export declare const UploadIcon: StyledComponent<any, any, any, any>;
9
11
  export declare const FileListUL: StyledComponent<(props: StackProps) => React.JSX.Element, any, {}, never>;
@@ -20,7 +20,7 @@ export interface DropdownProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onC
20
20
  expandDisabled?: boolean;
21
21
  onBlur?: (event?: MouseEvent | TouchEvent | KeyboardEvent) => void;
22
22
  }
23
- export interface GenericDropdownProps extends DropdownProps, useDropdownProps {
23
+ export interface GenericDropdownProps extends DropdownProps, Omit<useDropdownReturn, 'expand' | 'collapse'> {
24
24
  }
25
25
  export type DropdownTriggerProps = ButtonProps & {
26
26
  outlined?: boolean;
@@ -3,4 +3,4 @@ export { default as DropdownContext } from './Dropdown.context';
3
3
  export { default as DropdownTrigger, GenericDropdownTrigger } from './DropdownTrigger';
4
4
  export { DropdownMenu, DropdownMenuItem } from './DropdownMenu';
5
5
  export { default as useDropdown } from './useDropdown';
6
- export type { DropdownMenuItemProps, DropdownMenuProps, DropdownMenuSectionProps, DropdownProps, DropdownTriggerProps, GenericDropdownProps, useDropdownProps, } from './Dropdown.types';
6
+ export type { DropdownMenuItemProps, DropdownMenuProps, DropdownMenuSectionProps, DropdownProps, DropdownTriggerProps, GenericDropdownProps, useDropdownProps, useDropdownReturn, DropdownContextReturn, } from './Dropdown.types';
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- export interface LoadingDotsProps {
2
+ export interface LoadingDotsProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  readonly size?: number;
4
4
  readonly variant?: 'dark' | 'light';
5
5
  }
@@ -1,3 +1,3 @@
1
1
  export { default as Select } from './Select';
2
- export type { SelectProps, useSelectExternalReturn as useSelectReturn, SelectComponentsOptionProps as SelectOptionProps, SelectComponentsEmptyProps as SelectEmptyProps, Option as SelectOption, OnChange as SelectOnChange, OnCreate as SelectOnCreate, OnQueryChange as SelectOnQueryChange, } from './Select.types';
2
+ export type { SelectProps, useSelectExternalReturn as useSelectReturn, SelectComponentsOptionProps as SelectOptionProps, SelectComponentsEmptyProps as SelectEmptyProps, Option as SelectOption, OnChange as SelectOnChange, OnCreate as SelectOnCreate, OnQueryChange as SelectOnQueryChange, GenericOption, SelectableOption, SelectableOptionProps, CreatableProps, OptionKeyType, SelectValue, SelectAdapter, Adapters, SelectDatasource, Option, } from './Select.types';
3
3
  export { useSelectExternal as useSelect } from './useSelectExternal';
@@ -1,6 +1,18 @@
1
- import { default as React } from 'react';
1
+ import { PropsWithChildren, default as React } from 'react';
2
+ import { MenuExpandableProps } from './MenuExpandable';
3
+ import { MenuLinkProps } from './MenuLink';
4
+ import { StyledComponentBase, StyledComponent } from 'styled-components';
5
+ import { NonReactStatics } from 'hoist-non-react-statics';
2
6
  export interface MenuProps extends React.HTMLAttributes<HTMLDivElement> {
3
7
  readonly label?: string;
4
8
  }
5
- declare const _default: any;
9
+ declare function Menu({ label, children, ...props }: MenuProps): React.JSX.Element;
10
+ type MenuItemProps = {
11
+ readonly active?: boolean;
12
+ } & PropsWithChildren<MenuLinkProps & MenuExpandableProps>;
13
+ declare function MenuItem(props: MenuItemProps): React.JSX.Element;
14
+ declare const _default: string & StyledComponentBase<typeof Menu, any, {}, never> & NonReactStatics<typeof Menu, {}> & {
15
+ Item: typeof MenuItem;
16
+ SubItem: StyledComponent<({ url, ...props }: MenuLinkProps) => React.JSX.Element, any, {}, never>;
17
+ };
6
18
  export default _default;
@@ -6,7 +6,21 @@ export interface SideNavigationProps {
6
6
  declare function SideNavigation({ className, children }: SideNavigationProps): React.JSX.Element;
7
7
  declare namespace SideNavigation {
8
8
  var Logo: import("styled-components").StyledComponent<({ className, url, children }: import("./Logo/Logo").LogoProps) => React.JSX.Element, any, import("./Logo/Logo").LogoProps, never>;
9
- var Menu: any;
9
+ var Menu: string & import("styled-components").StyledComponentBase<({ label, children, ...props }: import("./Menu/Menu").MenuProps) => React.JSX.Element, any, {}, never> & import("hoist-non-react-statics").NonReactStatics<({ label, children, ...props }: import("./Menu/Menu").MenuProps) => React.JSX.Element, {}> & {
10
+ Item: (props: {
11
+ readonly active?: boolean;
12
+ } & React.HTMLAttributes<HTMLAnchorElement> & {
13
+ readonly label: string;
14
+ readonly leading?: ReactNode;
15
+ readonly trailing?: ReactNode;
16
+ readonly url?: string;
17
+ } & React.HTMLAttributes<HTMLDivElement> & {
18
+ readonly label: string;
19
+ } & {
20
+ children?: ReactNode | undefined;
21
+ }) => React.JSX.Element;
22
+ SubItem: import("styled-components").StyledComponent<({ url, ...props }: import("./Menu/MenuLink").MenuLinkProps) => React.JSX.Element, any, {}, never>;
23
+ };
10
24
  var Separator: typeof import("./Separator").Separator;
11
25
  var CloseButton: import("styled-components").StyledComponent<any, any, any, any>;
12
26
  }
@@ -1,10 +1,13 @@
1
1
  import { ChangeEvent, InputHTMLAttributes, default as React } from 'react';
2
2
  interface WithAdditionalProps {
3
- readonly active?: boolean;
3
+ readonly $active?: boolean;
4
4
  readonly onToggle?: (event: ChangeEvent<HTMLInputElement>) => void;
5
5
  readonly scale?: 'default' | 'large';
6
6
  }
7
- export interface SwitchProps extends InputHTMLAttributes<HTMLInputElement>, WithAdditionalProps {
7
+ interface SwitchInternalProps extends WithAdditionalProps {
8
+ readonly active?: boolean;
9
+ }
10
+ export interface SwitchProps extends InputHTMLAttributes<HTMLInputElement>, SwitchInternalProps {
8
11
  readonly className?: string;
9
12
  }
10
13
  declare function Switch({ active, className, disabled, name, onToggle, scale, ...others }: SwitchProps): React.JSX.Element;
@@ -1,2 +1,3 @@
1
1
  export { default as Table } from './Table';
2
- export type { TableProps, TableCellProps, TableRowProps, TableSectionProps } from './Table.types';
2
+ export type { TableProps, TableCellProps, TableRowProps, TableSectionProps, TableCaptionProps, TableSelectionProps, SelectionCellProps, ExpandableTableRowProps, } from './Table.types';
3
+ export type { TableSelectableRow, TableSelectionSelectable, TableSelectionConfig, TableSelectionCore, } from './Selection';
@@ -2,5 +2,5 @@ export interface WithDirectionProps {
2
2
  direction?: 'horizontal' | 'vertical';
3
3
  }
4
4
  export interface WithActiveProps {
5
- active?: boolean;
5
+ $active?: boolean;
6
6
  }
@@ -1,10 +1,11 @@
1
- import { PropsWithChildren } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { TypographyOptions, TypographyVariants } from '../../styles/typography';
3
3
  import { StyledComponent } from 'styled-components';
4
- export type TextProps = PropsWithChildren<{
5
- variant?: TypographyVariants;
6
- italic?: TypographyOptions['italic'];
7
- color?: TypographyOptions['color'];
8
- }>;
9
- declare const _default: StyledComponent<"span", any, TextProps, never>;
10
- export default _default;
4
+ export interface TextProps {
5
+ readonly variant?: TypographyVariants;
6
+ readonly italic?: TypographyOptions['italic'];
7
+ readonly color?: TypographyOptions['color'];
8
+ readonly children?: ReactNode;
9
+ }
10
+ declare const Text: StyledComponent<"span", any, TextProps, never>;
11
+ export default Text;
@@ -1,2 +1,2 @@
1
1
  export { default as ToggleGroup } from './ToggleGroup';
2
- export type { ToggleGroupProps, ToggleGroupOptionProps } from './ToggleGroup.types';
2
+ export type { ToggleGroupProps, ToggleGroupOptionProps, ToggleGroupType, ToggleGroupOptionValue, ToggleOption, SelectedToggleGroupOptions, } from './ToggleGroup.types';
@@ -1,2 +1,2 @@
1
1
  export { createSelectable } from './useSelectable';
2
- export type { Selectable, SelectableAdapter, SelectableKeyType, SelectableType, SelectableState, } from './useSelectable.types';
2
+ export type { Selectable, SelectableAdapter, SelectableKeyType, SelectableType, SelectableState, SelectableStrategy, SelectableAction, useSelectableReturn, useSelectableProps, } from './useSelectable.types';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ export type { Selectable, SelectableKeyType, SelectableAdapter, SelectableState, SelectableType, SelectableStrategy, SelectableAction, useSelectableReturn, useSelectableProps, } from './hooks/useSelectable';
2
+ export type { default as EventLike, EventLikeTarget } from './utils/types/EventLike';
1
3
  export { Button, BaseButton, SelectorButton, IconButton, Caret } from './components/Button';
2
4
  export { default as CloseButton } from './common/CloseButton';
3
5
  export { default as BackButton } from './common/BackButton';
@@ -15,9 +17,9 @@ export type { TextareaProps } from './components/Textarea';
15
17
  export { Link } from './components/Link';
16
18
  export type { LinkProps } from './components/Link';
17
19
  export { Breadcrumbs } from './components/Breadcrumbs';
18
- export type { BreadcrumbsProps } from './components/Breadcrumbs';
20
+ export type { BreadcrumbsProps, BreadcrumbProps } from './components/Breadcrumbs';
19
21
  export { ToggleGroup } from './components/ToggleGroup';
20
- export type { ToggleGroupProps, ToggleGroupOptionProps } from './components/ToggleGroup';
22
+ export type { ToggleGroupProps, ToggleGroupOptionProps, ToggleGroupType, ToggleGroupOptionValue, ToggleOption, SelectedToggleGroupOptions, } from './components/ToggleGroup';
21
23
  export { Tabs } from './components/Tabs';
22
24
  export type { TabsProps } from './components/Tabs';
23
25
  export { Section } from './components/Section';
@@ -48,26 +50,28 @@ export { Steps, useSteps } from './components/Steps';
48
50
  export type { Step, StepsProps, useStepsProps } from './components/Steps';
49
51
  export { Card } from './components/Card';
50
52
  export type { CardProps } from './components/Card';
53
+ export { Icon } from './components/Icon';
54
+ export type { IconProps as IconComponentProps } from './components/Icon';
51
55
  export { IconFactory } from './components/IconFactory';
52
56
  export type { IconProps, IconMapping } from './components/IconFactory';
53
57
  export { Popover, usePopover } from './components/Popover';
54
58
  export type { PopoverProps, PopoverAlign, PopoverPosition, PopoverFloatingProps, PopoverPlacement, PopoverReferenceProps, UsePopoverReturn, } from './components/Popover';
55
59
  export { Dropdown, useDropdown, DropdownContext } from './components/Dropdown';
56
- export type { DropdownProps, useDropdownProps } from './components/Dropdown';
60
+ export type { DropdownProps, useDropdownProps, useDropdownReturn, GenericDropdownProps, DropdownTriggerProps, DropdownMenuProps, DropdownMenuItemProps, DropdownMenuSectionProps, DropdownContextReturn, } from './components/Dropdown';
57
61
  export { Select, useSelect } from './components/Select';
58
- export type { SelectProps, useSelectReturn, SelectOptionProps, SelectEmptyProps, } from './components/Select';
62
+ export type { SelectProps, useSelectReturn, SelectOptionProps, SelectEmptyProps, GenericOption, Option, SelectableOption, SelectableOptionProps, CreatableProps, OptionKeyType, SelectValue, SelectAdapter, Adapters, SelectDatasource, } from './components/Select';
59
63
  export { SideNavigation, useSideNavigation } from './components/SideNavigation';
60
64
  export type { SideNavigationProps, useSideNavigationProps } from './components/SideNavigation';
61
65
  export { Drawer, useDrawer } from './components/Drawer';
62
66
  export type { DrawerProps, DrawerBodyProps, DrawerFooterProps, DrawerHeaderProps, } from './components/Drawer';
63
67
  export { Table } from './components/Table';
64
- export type { TableProps, TableCellProps, TableRowProps, TableSectionProps, } from './components/Table';
68
+ export type { TableProps, TableCellProps, TableRowProps, TableSectionProps, TableCaptionProps, TableSelectionProps, SelectionCellProps, ExpandableTableRowProps, TableSelectableRow, TableSelectionSelectable, TableSelectionConfig, TableSelectionCore, } from './components/Table';
65
69
  export { Text } from './components/Text';
66
70
  export type { TextProps } from './components/Text';
67
71
  export { TopNavigation } from './components/TopNavigation';
68
72
  export type { TopNavigationProps } from './components/TopNavigation';
69
73
  export { EmptyState } from './components/EmptyState';
70
- export type { EmptyStateProps } from './components/EmptyState';
74
+ export type { EmptyStateProps, EmptyStateCommonProps, EmptyStateWithIconProps, EmptyStateWithIllustrationProps, IllustrationProps, } from './components/EmptyState';
71
75
  export { Layout } from './components/Layout';
72
76
  export type { BoxProps } from './components/Layout/Box';
73
77
  export type { GroupProps } from './components/Layout/Group';
@@ -75,8 +79,9 @@ export type { SidebarProps } from './components/Layout/Sidebar';
75
79
  export type { StackProps } from './components/Layout/Stack';
76
80
  export type { SwitcherProps } from './components/Layout/Switcher';
77
81
  export type { GridProps } from './components/Layout/Grid';
82
+ export type { Spacing, JustifyValue, AlignValue } from './components/Layout/Layout.types';
78
83
  export { Calendar, DateHelper, DateFormatHelper } from './components/Calendar';
79
- export type { CalendarProps, CalendarDate, CalendarDateRange, CalendarConstraint, DateFormat, } from './components/Calendar';
84
+ export type { CalendarProps, CalendarDate, CalendarDateRange, CalendarConstraint, DateFormat, CalendarMonth, CalendarMonthAlias, useCalendarProps, GenericCalendarProps, } from './components/Calendar';
80
85
  export { DatePicker, DateRangePicker } from './components/DatePicker';
81
86
  export type { DatePickerProps, DateRangePickerProps } from './components/DatePicker';
82
87
  export { Spinner } from './components/Loaders';