@design-system-rte/react 1.14.0 → 1.16.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/README.md +11 -1
- package/dist/components/dropdown/Dropdown.d.ts +12 -2
- package/dist/components/dynamicTab/dynamicTabItem/DynamicTabItem.d.ts +4 -1
- package/dist/components/dynamicTab/hooks/useDisplayTabItemElement.d.ts +2 -1
- package/dist/components/pagination/Pagination.d.ts +6 -0
- package/dist/components/select/Select.d.ts +2 -0
- package/dist/index.d.ts +2 -2
- package/dist/react-package.cjs +1 -1
- package/dist/react-package.js +4501 -4343
- package/dist/style.css +1 -1
- package/package.json +22 -5
- package/dist/components/dropdown/BaseDropdown.d.ts +0 -12
- package/dist/components/dynamicTab/dynamictab.utils.d.ts +0 -2
package/README.md
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
### Installation
|
|
1
|
+
### Installation
|
|
2
|
+
|
|
3
|
+
```bash
|
|
4
|
+
npm install @design-system-rte/react
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
`@design-system-rte/core` is installed automatically as a dependency. See the [root README](https://github.com/rte-france/design-system-rte#quick-install) for other packages.
|
|
8
|
+
|
|
9
|
+
### Setup
|
|
2
10
|
|
|
3
11
|
1. **Add Design System base styles:**
|
|
4
12
|
|
|
@@ -33,6 +41,8 @@
|
|
|
33
41
|
</body>
|
|
34
42
|
```
|
|
35
43
|
|
|
44
|
+
`data-theme` is required on each themed scope. When `data-mode` is omitted, the mode is inherited from an ancestor carrying `data-mode`. If no ancestor defines a mode, `light` is used as the default.
|
|
45
|
+
|
|
36
46
|
4. **Use Components:**
|
|
37
47
|
|
|
38
48
|
Implement the different components as documented in the [Storybook](https://opensource.rte-france.com/design-system-rte/?path=/docs/react_composants-button--docs) provided with the library.
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { DropdownProps as CoreDropdownProps } from '../../../../core/components/dropdown/dropdown.interface';
|
|
2
|
+
export type OverlayPriority = "low" | "high";
|
|
3
|
+
export interface DropdownProps extends CoreDropdownProps, React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
trigger: React.ReactNode;
|
|
5
|
+
header?: React.ReactNode;
|
|
6
|
+
footer?: React.ReactNode;
|
|
7
|
+
isList?: boolean;
|
|
8
|
+
hasMaxWidth?: boolean;
|
|
9
|
+
overlayLevel?: OverlayPriority;
|
|
10
|
+
maxHeight?: number | string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Dropdown: import('react').ForwardRefExoticComponent<DropdownProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
3
13
|
export default Dropdown;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { DynamicTabItemProps } from '../../../../../core';
|
|
1
|
+
import { DynamicTabItemProps as CoreDynamicTabItemProps } from '../../../../../core';
|
|
2
|
+
import { HTMLAttributes } from 'react';
|
|
3
|
+
interface DynamicTabItemProps extends CoreDynamicTabItemProps, Omit<HTMLAttributes<HTMLLIElement>, keyof CoreDynamicTabItemProps> {
|
|
4
|
+
}
|
|
2
5
|
declare const DynamicTabItem: ({ id, index, title, parentId, appearance, isActive, onClick, onClickClose, onChangeTabTitle, compactSpacing, isEditable, badgeContent, badgeCount, badgeIcon, badgeType, iconName, isClosable, updateIndicator, isHidden, setIsMoving: setIsMovingExternal, isMoving: isMovingExternal, }: DynamicTabItemProps) => import("react").JSX.Element;
|
|
3
6
|
export default DynamicTabItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
1
2
|
declare const useDisplayTabItemElement: ({ tabItem, isActive, hasBadgeContent, iconName, isClosable, }: {
|
|
2
|
-
tabItem:
|
|
3
|
+
tabItem: RefObject<HTMLLIElement>;
|
|
3
4
|
isActive: boolean;
|
|
4
5
|
hasBadgeContent: boolean;
|
|
5
6
|
iconName?: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { PaginationProps as CorePaginationProps } from '../../../../core';
|
|
2
|
+
interface PaginationProps extends CorePaginationProps, React.HTMLAttributes<HTMLElement> {
|
|
3
|
+
onPageChange?: (page: number) => void;
|
|
4
|
+
}
|
|
5
|
+
declare const Pagination: ({ appearance, activePage, totalPages, onPageChange, hasGoToFirst, hasGoToPrev, hasGoToNext, hasGoToLast, }: PaginationProps) => import("react").JSX.Element;
|
|
6
|
+
export default Pagination;
|
|
@@ -5,6 +5,7 @@ interface SingleSelectProps extends Omit<coreSelectProps, "value" | "onChange">
|
|
|
5
5
|
header?: React.ReactNode;
|
|
6
6
|
footer?: React.ReactNode;
|
|
7
7
|
onChange?: (value: string) => void;
|
|
8
|
+
body?: React.ReactNode;
|
|
8
9
|
}
|
|
9
10
|
interface MultiSelectProps extends Omit<coreSelectProps, "value" | "onChange"> {
|
|
10
11
|
multiple: true;
|
|
@@ -12,6 +13,7 @@ interface MultiSelectProps extends Omit<coreSelectProps, "value" | "onChange"> {
|
|
|
12
13
|
header?: React.ReactNode;
|
|
13
14
|
footer?: React.ReactNode;
|
|
14
15
|
onChange?: (value: string[]) => void;
|
|
16
|
+
body?: React.ReactNode;
|
|
15
17
|
}
|
|
16
18
|
export type SelectProps = SingleSelectProps | MultiSelectProps;
|
|
17
19
|
declare const Select: import('react').ForwardRefExoticComponent<SelectProps & import('react').RefAttributes<HTMLDivElement>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { default as IconButtonToggle } from './components/iconButtonToggle/IconB
|
|
|
21
21
|
import { default as Link } from './components/link/Link.tsx';
|
|
22
22
|
import { default as Loader } from './components/loader/Loader.tsx';
|
|
23
23
|
import { default as Modal } from './components/modal/Modal.tsx';
|
|
24
|
+
import { default as Pagination } from './components/pagination/Pagination.tsx';
|
|
24
25
|
import { default as DatePicker } from './components/pickers/datepicker/DatePicker.tsx';
|
|
25
26
|
import { default as DateRangePicker } from './components/pickers/daterangepicker/DateRangePicker.tsx';
|
|
26
27
|
import { default as TimePicker } from './components/pickers/timepicker/TimePicker.tsx';
|
|
@@ -43,6 +44,5 @@ import { default as Toast } from './components/toast/Toast.tsx';
|
|
|
43
44
|
import { default as ToastQueueProvider } from './components/toast/toastQueue/ToastQueueProvider.tsx';
|
|
44
45
|
import { default as Tooltip } from './components/tooltip/Tooltip.tsx';
|
|
45
46
|
import { default as Treeview } from './components/treeview/Treeview.tsx';
|
|
46
|
-
import { useNavigationLinkComponent } from './provider/NavigationContext.tsx';
|
|
47
47
|
import { default as NavigationProvider } from './provider/NavigationProvider.tsx';
|
|
48
|
-
export { Avatar, Accordion, Button, Grid, Checkbox, CheckboxGroup, Link, RadioButton, RadioButtonGroup, Icon, IconButton, IconButtonToggle, Loader, SplitButton, Tooltip, BaseTextInput as TextInput, Chip, Badge, Textarea, Divider, Drawer, Switch, SegmentedControl, Breadcrumbs, Banner, Popover, Modal, SideNav, Stepper, BaseSideNav, Card, Toast, ToastQueueProvider, Tag, Tab, TimePicker, Treeview, Searchbar, Select, FileUpload, DatePicker, Dropdown, DropdownItem, DateRangePicker, Header, NavigationProvider,
|
|
48
|
+
export { Avatar, Accordion, Button, Grid, Checkbox, CheckboxGroup, Link, RadioButton, RadioButtonGroup, Icon, IconButton, IconButtonToggle, Loader, SplitButton, Tooltip, BaseTextInput as TextInput, Chip, Badge, Textarea, Divider, Drawer, Switch, SegmentedControl, Breadcrumbs, Banner, Popover, Modal, SideNav, Stepper, BaseSideNav, Card, Toast, ToastQueueProvider, Tag, Tab, TimePicker, Treeview, Searchbar, Select, FileUpload, DatePicker, Dropdown, DropdownItem, DateRangePicker, Header, NavigationProvider, Pagination, };
|