ui-beyable 1.1.0-beta.2 → 1.1.0-beta.21

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.
Files changed (33) hide show
  1. package/lib/cjs/components/Btn/types.d.ts +11 -4
  2. package/lib/cjs/components/BtnGroup/BtnGroup.d.ts +19 -0
  3. package/lib/cjs/components/BtnSwitch/BtnSwitch.d.ts +25 -0
  4. package/lib/cjs/components/EmptyState/EmptyState.d.ts +1 -1
  5. package/lib/cjs/components/EmptyState/types.d.ts +2 -0
  6. package/lib/cjs/components/List/List.d.ts +3 -3
  7. package/lib/cjs/components/List/types.d.ts +23 -6
  8. package/lib/cjs/components/Listbox/Listbox.d.ts +5 -4
  9. package/lib/cjs/components/Listbox/types.d.ts +12 -2
  10. package/lib/cjs/components/Picto/Picto.d.ts +23 -3
  11. package/lib/cjs/components/Spinner/Spinner.d.ts +1 -3
  12. package/lib/cjs/components/Spinner/types.d.ts +5 -3
  13. package/lib/cjs/components/Stack/Stack.d.ts +5 -2
  14. package/lib/cjs/index.d.ts +5 -4
  15. package/lib/cjs/index.js +373 -113
  16. package/lib/cjs/index.js.map +1 -1
  17. package/lib/esm/components/Btn/types.d.ts +11 -4
  18. package/lib/esm/components/BtnGroup/BtnGroup.d.ts +19 -0
  19. package/lib/esm/components/BtnSwitch/BtnSwitch.d.ts +25 -0
  20. package/lib/esm/components/EmptyState/EmptyState.d.ts +1 -1
  21. package/lib/esm/components/EmptyState/types.d.ts +2 -0
  22. package/lib/esm/components/List/List.d.ts +3 -3
  23. package/lib/esm/components/List/types.d.ts +23 -6
  24. package/lib/esm/components/Listbox/Listbox.d.ts +5 -4
  25. package/lib/esm/components/Listbox/types.d.ts +12 -2
  26. package/lib/esm/components/Picto/Picto.d.ts +23 -3
  27. package/lib/esm/components/Spinner/Spinner.d.ts +1 -3
  28. package/lib/esm/components/Spinner/types.d.ts +5 -3
  29. package/lib/esm/components/Stack/Stack.d.ts +5 -2
  30. package/lib/esm/index.d.ts +5 -4
  31. package/lib/esm/index.js +372 -115
  32. package/lib/esm/index.js.map +1 -1
  33. package/package.json +1 -1
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
+ type sizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
3
+ type horizontalSizeType = 'xxs' | 'xs' | 's' | 'm' | 'l';
4
+ type fontSizeType = 's' | 'm' | 'l' | 'xl' | 'xxl';
2
5
  interface IBtn {
3
6
  children?: React.ReactNode;
4
7
  type?: "button" | "submit" | "reset" | undefined;
@@ -13,17 +16,21 @@ interface IBtn {
13
16
  style?: 'fill' | 'outline' | 'ghost' | 'ghost_outline' | 'reverse' | 'link';
14
17
  rounded?: boolean;
15
18
  disabled?: boolean;
19
+ readonly?: boolean;
16
20
  className?: string;
17
21
  strong?: boolean;
18
22
  light?: boolean;
19
23
  isActive?: boolean;
20
24
  isLoading?: boolean;
21
- size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
22
- horizontalSize?: 'xs' | 's' | 'm' | 'l';
23
- fontSize?: 'l' | 'm';
25
+ size?: sizeType;
26
+ horizontalSize?: horizontalSizeType;
27
+ fontSize?: fontSizeType;
24
28
  fullWidth?: boolean;
25
29
  fullHeight?: boolean;
30
+ hasMinWith?: boolean;
26
31
  icon?: string;
32
+ customIcon?: React.ReactElement;
33
+ lucideIcon?: React.ReactElement;
27
34
  iconPosition?: string;
28
35
  arrow?: boolean;
29
36
  tooltip?: string;
@@ -34,4 +41,4 @@ interface IBtnGroup {
34
41
  children?: React.ReactNode;
35
42
  gap?: 'm' | 'l' | 'xl' | 'none';
36
43
  }
37
- export { IBtn, IBtnGroup };
44
+ export { IBtn, IBtnGroup, sizeType as BtnSizeType, horizontalSizeType as BtnHorizontalSizeType, fontSizeType as BtnFontSizeType };
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { BtnSizeType, BtnHorizontalSizeType } from '../Btn/types';
3
+ type valueType = string | boolean | number;
4
+ interface BtnGroupProps {
5
+ value: valueType;
6
+ optionsList: Array<{
7
+ value: valueType;
8
+ label?: string;
9
+ icon?: string;
10
+ }>;
11
+ onChange: (value: valueType) => void;
12
+ appearance?: 'outline' | 'ghost';
13
+ className?: string;
14
+ size?: BtnSizeType;
15
+ btnHorizontalSize?: BtnHorizontalSizeType;
16
+ btnIsLight?: boolean;
17
+ }
18
+ declare const BtnGroup: React.FC<BtnGroupProps>;
19
+ export { BtnGroup, valueType as BtnGroupValueType };
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { BtnSizeType, BtnHorizontalSizeType } from '../Btn/types';
3
+ type valueType = string | boolean | number;
4
+ type optionType = {
5
+ value: valueType;
6
+ label?: string;
7
+ tooltip?: string;
8
+ tooltipHTML?: React.ReactNode;
9
+ icon?: string;
10
+ customIcon?: React.ReactElement;
11
+ lucideIcon?: React.ReactElement;
12
+ disabled?: boolean;
13
+ };
14
+ interface BtnSwitchProps {
15
+ value: valueType;
16
+ optionsList: Array<optionType>;
17
+ onChange: (value: valueType) => void;
18
+ appearance?: 'outline' | 'ghost';
19
+ className?: string;
20
+ size?: BtnSizeType;
21
+ btnHorizontalSize?: BtnHorizontalSizeType;
22
+ btnIsLight?: boolean;
23
+ }
24
+ declare const BtnSwitch: React.FC<BtnSwitchProps>;
25
+ export { BtnSwitch, valueType as BtnSwitchValueType };
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { IEmptyState } from './types';
3
- declare function EmptyState({ title, text, primaryAction, secondaryAction, imageUrl, imageWidth, icon, footer, card, cardTextSize, cardWidth, verticalSize, verticalAlign, textSize, titleIsBold, hasSpinner, hasBorder, width, }: IEmptyState): JSX.Element;
3
+ declare function EmptyState({ title, text, primaryAction, secondaryAction, imageUrl, imageWidth, icon, customIcon, lucideIcon, footer, card, cardTextSize, cardWidth, verticalSize, verticalAlign, textSize, titleIsBold, hasSpinner, hasBorder, width, }: IEmptyState): JSX.Element;
4
4
  export { EmptyState };
@@ -7,6 +7,8 @@ interface IEmptyState {
7
7
  imageUrl?: string;
8
8
  imageWidth?: number;
9
9
  icon?: string;
10
+ customIcon?: React.ReactElement;
11
+ lucideIcon?: React.ReactElement;
10
12
  footer?: React.ReactNode | string;
11
13
  card?: React.ReactNode | string;
12
14
  cardTextSize?: 'm' | 'l';
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  import { IList, IListItem } from './types';
3
- declare function List({ children, className, size, hasLastBorder, hasBorder, borderPosition, removeVerticalMargin }: IList): JSX.Element;
4
- declare function ListItem({ children, className, picto, pictoHasMargin, text, description, actions, onClick, value, hasArrow, textIsBold, textIsItalic }: IListItem): JSX.Element;
3
+ declare const List: React.ForwardRefExoticComponent<IList & React.RefAttributes<HTMLDivElement>>;
4
+ declare const ListItem: React.ForwardRefExoticComponent<IListItem & React.RefAttributes<HTMLDivElement>>;
5
5
  export { List, ListItem };
@@ -1,25 +1,42 @@
1
- import React from 'react';
1
+ import React, { CSSProperties } from 'react';
2
+ import { spaceType } from '../Tokens/Tokens';
3
+ interface ListStyleType extends CSSProperties {
4
+ '--positive-offset'?: string;
5
+ '--negative-offset'?: string;
6
+ '--border-offset'?: string;
7
+ }
2
8
  interface IList {
3
9
  children: React.ReactNode;
4
10
  className?: string;
5
- size?: string;
11
+ size?: 'xxs' | 'xs' | 's' | 'm' | 'l';
12
+ fontSize?: 'm' | 'l';
6
13
  hasLastBorder?: boolean;
7
14
  hasBorder?: boolean;
8
- borderPosition?: string;
9
15
  removeVerticalMargin?: boolean;
16
+ paddingInline?: spaceType | '';
17
+ style?: ListStyleType;
10
18
  }
11
19
  interface IListItem {
12
- children: React.ReactNode;
20
+ children?: React.ReactNode;
13
21
  className?: string;
14
22
  picto?: React.ReactNode;
15
- pictoHasMargin?: boolean;
16
23
  text?: any;
17
24
  description?: any;
18
25
  actions?: React.ReactNode;
19
- onClick?: any;
26
+ onClick?: (ev: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
27
+ onMouseEnter?: (ev: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
28
+ onMouseLeave?: (ev: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
20
29
  value?: any;
30
+ valueMaxWidth?: number;
31
+ valueMinWidth?: number;
21
32
  hasArrow?: boolean;
22
33
  textIsBold?: boolean;
23
34
  textIsItalic?: boolean;
35
+ textHasEllipsis?: boolean;
36
+ textBreakWord?: boolean;
37
+ isActive?: boolean;
38
+ isDragging?: boolean;
39
+ dragHandle?: React.ReactNode;
40
+ dragHandlePosition?: 'before' | 'after';
24
41
  }
25
42
  export { IList, IListItem };
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { IListbox, IListboxItem } from './types';
3
- declare function Listbox({ children, hasBorder, className }: IListbox): JSX.Element;
4
- declare function ListboxItem({ children, message, description, imageUrl, tooltip, tooltipHTML, onClick, onMouseEnter, href, target, rel, selected, hasSelectedIcon, hasCheckbox, disabled, size, className, icon, iconCustom, capitalize }: IListboxItem): JSX.Element;
2
+ import { IListbox, IListboxItem, IListboxGroupLabel } from './types';
3
+ declare function Listbox({ children, hasBorder, className, direction, appearance, groupLabel }: IListbox): JSX.Element;
4
+ declare function ListboxItem({ children, message, description, imageUrl, tooltip, tooltipHTML, onClick, onMouseEnter, href, target, rel, selected, hasSelectedColor, hasSelectedIcon, hasCheckbox, hasRadio, disabled, size, className, style, icon, customIcon, lucideIcon, capitalize }: IListboxItem): JSX.Element;
5
5
  declare function ListboxSep(): JSX.Element;
6
- export { Listbox, ListboxItem, ListboxSep };
6
+ declare function ListboxGroupLabel({ children }: IListboxGroupLabel): JSX.Element;
7
+ export { Listbox, ListboxItem, ListboxSep, ListboxGroupLabel };
@@ -3,6 +3,9 @@ interface IListbox {
3
3
  children: React.ReactNode;
4
4
  hasBorder?: boolean;
5
5
  className?: string;
6
+ direction?: 'column' | 'row';
7
+ appearance?: 'iconSelector';
8
+ groupLabel?: React.ReactNode | string;
6
9
  }
7
10
  interface IListboxItem {
8
11
  children?: React.ReactNode;
@@ -17,13 +20,20 @@ interface IListboxItem {
17
20
  target?: string;
18
21
  rel?: string;
19
22
  selected?: boolean;
23
+ hasSelectedColor?: boolean;
20
24
  hasSelectedIcon?: boolean;
21
25
  hasCheckbox?: boolean;
26
+ hasRadio?: boolean;
22
27
  disabled?: boolean;
23
28
  capitalize?: boolean;
24
29
  size?: 'm' | 'l' | 'xl';
25
30
  className?: string;
31
+ style?: React.CSSProperties;
26
32
  icon?: string;
27
- iconCustom?: React.ReactNode;
33
+ customIcon?: React.ReactElement;
34
+ lucideIcon?: React.ReactElement;
28
35
  }
29
- export { IListbox, IListboxItem };
36
+ interface IListboxGroupLabel {
37
+ children?: React.ReactNode;
38
+ }
39
+ export { IListbox, IListboxItem, IListboxGroupLabel };
@@ -1,4 +1,24 @@
1
- /// <reference types="react" />
2
- import { IPicto } from './types';
3
- declare function Picto({ icon, color, size }: IPicto): JSX.Element;
1
+ import React from 'react';
2
+ type colorType = 'dark_blue' | 'blue' | 'green' | 'apple_green' | 'yellow' | 'orange' | 'red' | 'pink' | 'purple' | 'turquoise';
3
+ type brightnessType = 'high' | 'low' | 'mix';
4
+ type sizeType = 'xxl' | 'xl' | 'l' | 'm' | 's' | 'xs' | 'xxs';
5
+ type shapeType = 'round' | 'square';
6
+ interface PictoType {
7
+ icon?: string;
8
+ color?: colorType;
9
+ brightness?: brightnessType;
10
+ size?: sizeType;
11
+ shape?: shapeType;
12
+ hasBorder?: boolean;
13
+ customIcon?: React.ReactElement;
14
+ lucideIcon?: React.ReactElement;
15
+ tooltip?: string;
16
+ tooltipHTML?: React.ReactNode;
17
+ href?: string;
18
+ target?: React.HTMLAttributeAnchorTarget;
19
+ rel?: string;
20
+ className?: string;
21
+ onClick?: (ev: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
22
+ }
23
+ declare function Picto({ icon, customIcon, lucideIcon, color, brightness, size, shape, hasBorder, tooltip, tooltipHTML, href, target, rel, className, onClick }: PictoType): JSX.Element;
4
24
  export { Picto };
@@ -1,6 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { ISpinner } from './types';
3
- declare function Spinner({ wheelSize, // xxs, xs, s, m, l
4
- display, // block | inline | overlay
5
- verticalSize, }: ISpinner): JSX.Element;
3
+ declare function Spinner({ size, wheelSize, display, verticalSize, className }: ISpinner): JSX.Element;
6
4
  export { Spinner };
@@ -1,6 +1,8 @@
1
1
  interface ISpinner {
2
- wheelSize?: string;
3
- display?: string;
4
- verticalSize?: string;
2
+ size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
3
+ wheelSize?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
4
+ display?: 'block' | 'inline' | 'overlay';
5
+ verticalSize?: 'xs' | 's' | 'm' | 'l' | 'xl';
6
+ className?: string;
5
7
  }
6
8
  export { ISpinner };
@@ -8,12 +8,15 @@ interface StackType {
8
8
  gap?: spaceType;
9
9
  shouldWrap?: boolean;
10
10
  alignInline?: alignInlineType;
11
+ flex?: flexType;
12
+ style?: React.CSSProperties;
11
13
  }
12
14
  interface StackRowType {
13
15
  children?: React.ReactNode;
14
16
  className?: string;
15
17
  flex?: flexType;
18
+ style?: React.CSSProperties;
16
19
  }
17
- declare function Stack({ children, className, gap, alignInline }: StackType): JSX.Element;
18
- declare function StackRow({ children, className, flex }: StackRowType): JSX.Element;
20
+ declare function Stack({ children, className, gap, alignInline, flex, style }: StackType): JSX.Element;
21
+ declare function StackRow({ children, className, flex, style }: StackRowType): JSX.Element;
19
22
  export { Stack, StackRow };
@@ -3,6 +3,7 @@ import { Article, ArticleFoldable } from './components/Article/Article';
3
3
  import { Box } from './components/Box/Box';
4
4
  import { Breadcrumb } from './components/Breadcrumb/Breadcrumb';
5
5
  import { Btn, BtnGroup } from './components/Btn/Btn';
6
+ import { BtnSwitch } from './components/BtnSwitch/BtnSwitch';
6
7
  import { Checkbox, Radio, Switch, CheckboxList } from './components/Checkbox/Checkbox';
7
8
  import Collapse from './components/Collapse/Collapse';
8
9
  import { Confirm } from './components/Confirm/Confirm';
@@ -13,7 +14,7 @@ import { EmptyState } from './components/EmptyState/EmptyState';
13
14
  import { Fieldset } from './components/Fieldset/Fieldset';
14
15
  import { Hr } from './components/Hr/Hr';
15
16
  import { IconBtn } from './components/IconBtn/IconBtn';
16
- import { Inline } from './components/Inline/Inline';
17
+ import { Inline, InlineColumn } from './components/Inline/Inline';
17
18
  import { KpiList, KpiItem } from './components/Kpi/Kpi';
18
19
  import { List, ListItem } from './components/List/List';
19
20
  import { Listbox, ListboxItem, ListboxSep } from './components/Listbox/Listbox';
@@ -23,7 +24,7 @@ import { Modal, ModalHeader, ModalBody, ModalFooter } from './components/Modal/M
23
24
  import { Panel, PanelClose, PanelHeader, PanelBody, PanelSection } from './components/Panel/Panel';
24
25
  import { Picto } from './components/Picto/Picto';
25
26
  import { Portal } from './components/Portal/Portal';
26
- import { Stack } from './components/Stack/Stack';
27
+ import { Stack, StackRow } from './components/Stack/Stack';
27
28
  import { Section } from './components/Section/Section';
28
29
  import { Select } from './components/Select/Select';
29
30
  import { Spinner } from './components/Spinner/Spinner';
@@ -31,5 +32,5 @@ import { TabBar, TabItem } from './components/Tabs/Tabs';
31
32
  import { Textfield, TextfieldIcon, SearchBar } from './components/Textfield/Textfield';
32
33
  declare const Theme: any;
33
34
  declare const Utils: any;
34
- export { Theme, Utils, AppRoot, AppHeader, AppLinkWrapper, AppLogo, Article, ArticleFoldable, Box, Breadcrumb, Btn, BtnGroup, Checkbox, CheckboxList, Collapse, // Not OK, use ArticleFoldable instead
35
- Confirm, Container, Dropdown, DropdownSection, EditorHeader, EmptyState, Fieldset, Hr, IconBtn, Inline, KpiList, KpiItem, List, ListItem, Listbox, ListboxItem, ListboxSep, Mask, Message, Modal, ModalHeader, ModalBody, ModalFooter, Panel, PanelClose, PanelHeader, PanelBody, PanelSection, Picto, Portal, Stack, Radio, SearchBar, Section, Select, Spinner, Switch, TabBar, TabItem, Textfield, TextfieldIcon, };
35
+ export { Theme, Utils, AppRoot, AppHeader, AppLinkWrapper, AppLogo, Article, ArticleFoldable, Box, Breadcrumb, Btn, BtnGroup, BtnSwitch, Checkbox, CheckboxList, Collapse, // Not OK, use ArticleFoldable instead
36
+ Confirm, Container, Dropdown, DropdownSection, EditorHeader, EmptyState, Fieldset, Hr, IconBtn, Inline, InlineColumn, KpiList, KpiItem, List, ListItem, Listbox, ListboxItem, ListboxSep, Mask, Message, Modal, ModalHeader, ModalBody, ModalFooter, Panel, PanelClose, PanelHeader, PanelBody, PanelSection, Picto, Portal, Stack, StackRow, Radio, SearchBar, Section, Select, Spinner, Switch, TabBar, TabItem, Textfield, TextfieldIcon, };