ui-beyable 1.1.0-beta.3 → 1.1.0-beta.31

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 (45) hide show
  1. package/lib/cjs/components/Btn/types.d.ts +4 -1
  2. package/lib/cjs/components/BtnSwitch/BtnSwitch.d.ts +11 -5
  3. package/lib/cjs/components/Checkbox/Checkbox.d.ts +2 -2
  4. package/lib/cjs/components/Checkbox/types.d.ts +1 -0
  5. package/lib/cjs/components/EmptyState/EmptyState.d.ts +1 -1
  6. package/lib/cjs/components/EmptyState/types.d.ts +2 -0
  7. package/lib/cjs/components/IconBtn/types.d.ts +7 -3
  8. package/lib/cjs/components/List/List.d.ts +3 -3
  9. package/lib/cjs/components/List/types.d.ts +23 -6
  10. package/lib/cjs/components/Listbox/Listbox.d.ts +5 -4
  11. package/lib/cjs/components/Listbox/types.d.ts +12 -2
  12. package/lib/cjs/components/LogoLoader/LogoLoader.d.ts +7 -0
  13. package/lib/cjs/components/Picto/Picto.d.ts +23 -3
  14. package/lib/cjs/components/Spinner/Spinner.d.ts +1 -3
  15. package/lib/cjs/components/Spinner/types.d.ts +5 -3
  16. package/lib/cjs/components/SpinnerLogo/SpinnerLogo.d.ts +8 -0
  17. package/lib/cjs/components/Stack/Stack.d.ts +7 -2
  18. package/lib/cjs/components/Textfield/Textfield.d.ts +1 -1
  19. package/lib/cjs/components/Textfield/types.d.ts +1 -0
  20. package/lib/cjs/index.d.ts +4 -3
  21. package/lib/cjs/index.js +928 -609
  22. package/lib/cjs/index.js.map +1 -1
  23. package/lib/esm/components/Btn/types.d.ts +4 -1
  24. package/lib/esm/components/BtnSwitch/BtnSwitch.d.ts +11 -5
  25. package/lib/esm/components/Checkbox/Checkbox.d.ts +2 -2
  26. package/lib/esm/components/Checkbox/types.d.ts +1 -0
  27. package/lib/esm/components/EmptyState/EmptyState.d.ts +1 -1
  28. package/lib/esm/components/EmptyState/types.d.ts +2 -0
  29. package/lib/esm/components/IconBtn/types.d.ts +7 -3
  30. package/lib/esm/components/List/List.d.ts +3 -3
  31. package/lib/esm/components/List/types.d.ts +23 -6
  32. package/lib/esm/components/Listbox/Listbox.d.ts +5 -4
  33. package/lib/esm/components/Listbox/types.d.ts +12 -2
  34. package/lib/esm/components/LogoLoader/LogoLoader.d.ts +7 -0
  35. package/lib/esm/components/Picto/Picto.d.ts +23 -3
  36. package/lib/esm/components/Spinner/Spinner.d.ts +1 -3
  37. package/lib/esm/components/Spinner/types.d.ts +5 -3
  38. package/lib/esm/components/SpinnerLogo/SpinnerLogo.d.ts +8 -0
  39. package/lib/esm/components/Stack/Stack.d.ts +7 -2
  40. package/lib/esm/components/Textfield/Textfield.d.ts +1 -1
  41. package/lib/esm/components/Textfield/types.d.ts +1 -0
  42. package/lib/esm/index.d.ts +4 -3
  43. package/lib/esm/index.js +927 -611
  44. package/lib/esm/index.js.map +1 -1
  45. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  type sizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
3
- type horizontalSizeType = 'xs' | 's' | 'm' | 'l';
3
+ type horizontalSizeType = 'xxs' | 'xs' | 's' | 'm' | 'l';
4
4
  type fontSizeType = 's' | 'm' | 'l' | 'xl' | 'xxl';
5
5
  interface IBtn {
6
6
  children?: React.ReactNode;
@@ -16,6 +16,7 @@ interface IBtn {
16
16
  style?: 'fill' | 'outline' | 'ghost' | 'ghost_outline' | 'reverse' | 'link';
17
17
  rounded?: boolean;
18
18
  disabled?: boolean;
19
+ readonly?: boolean;
19
20
  className?: string;
20
21
  strong?: boolean;
21
22
  light?: boolean;
@@ -28,6 +29,8 @@ interface IBtn {
28
29
  fullHeight?: boolean;
29
30
  hasMinWith?: boolean;
30
31
  icon?: string;
32
+ customIcon?: React.ReactElement;
33
+ lucideIcon?: React.ReactElement;
31
34
  iconPosition?: string;
32
35
  arrow?: boolean;
33
36
  tooltip?: string;
@@ -1,13 +1,19 @@
1
1
  import React from 'react';
2
2
  import { BtnSizeType, BtnHorizontalSizeType } from '../Btn/types';
3
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
+ };
4
14
  interface BtnSwitchProps {
5
15
  value: valueType;
6
- optionsList: Array<{
7
- value: valueType;
8
- label?: string;
9
- icon?: string;
10
- }>;
16
+ optionsList: Array<optionType>;
11
17
  onChange: (value: valueType) => void;
12
18
  appearance?: 'outline' | 'ghost';
13
19
  className?: string;
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { ICheckbox, IRadio, ISwitch } from './types';
3
3
  import { IList } from '../List/types';
4
- declare function Checkbox({ children, type, label, description, tooltip, tooltipHTML, name, value, checked, forcedChecked, disabled, onChange, size, fullWidth }: ICheckbox): JSX.Element;
4
+ declare function Checkbox({ children, type, label, description, tooltip, tooltipHTML, name, value, checked, forcedChecked, disabled, onChange, size, fullWidth, className }: ICheckbox): JSX.Element;
5
5
  declare function Radio(props: IRadio): JSX.Element;
6
- declare function Switch({ children, label, name, value, checked, onChange, disabled, forcedChecked, position, size, align, verticalSize, noMargin }: ISwitch): JSX.Element;
6
+ declare function Switch({ children, label, name, value, checked, onChange, disabled, forcedChecked, position, size, align, verticalSize, noMargin, className }: ISwitch): JSX.Element;
7
7
  declare function CheckboxList(props: IList): JSX.Element;
8
8
  export { Checkbox, Radio, Switch, CheckboxList };
@@ -9,6 +9,7 @@ interface ICommon {
9
9
  forcedChecked?: boolean;
10
10
  disabled?: boolean;
11
11
  onChange?: any;
12
+ className?: string;
12
13
  }
13
14
  interface IRadio extends ICommon {
14
15
  size?: 's' | 'm' | 'l';
@@ -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,7 +1,11 @@
1
+ /// <reference types="react" />
2
+ type sizeType = 'xxl' | 'xl' | 'l' | 'm' | 's' | 'xs';
1
3
  interface IIconBtn {
2
- icon: string;
4
+ icon?: string;
5
+ customIcon?: React.ReactElement;
6
+ lucideIcon?: React.ReactElement;
3
7
  fixedWidth?: boolean;
4
- size?: string;
8
+ size?: sizeType;
5
9
  className?: string;
6
10
  theme?: string;
7
11
  hoverColor?: string;
@@ -16,4 +20,4 @@ interface IIconBtn {
16
20
  isActive?: boolean;
17
21
  rel?: string;
18
22
  }
19
- export { IIconBtn };
23
+ export { IIconBtn, sizeType };
@@ -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 };
@@ -0,0 +1,7 @@
1
+ interface LogoLoaderProps {
2
+ size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
3
+ className?: string;
4
+ }
5
+ declare const LogoLoader: ({ size, className }: LogoLoaderProps) => JSX.Element;
6
+ export default LogoLoader;
7
+ export { LogoLoader };
@@ -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 };
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface SpinnerLogoProps {
3
+ size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
4
+ className?: string;
5
+ }
6
+ declare const SpinnerLogo: ({ size, className }: SpinnerLogoProps) => JSX.Element;
7
+ export default SpinnerLogo;
8
+ export { SpinnerLogo };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { spaceType } from '../Tokens/Tokens';
3
3
  type alignInlineType = 'stretch' | 'start' | 'center' | 'end';
4
+ type justifyType = 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
4
5
  type flexType = 'none' | 'auto' | 'shrink' | 'grow';
5
6
  interface StackType {
6
7
  children?: React.ReactNode;
@@ -8,12 +9,16 @@ interface StackType {
8
9
  gap?: spaceType;
9
10
  shouldWrap?: boolean;
10
11
  alignInline?: alignInlineType;
12
+ justify?: justifyType;
13
+ flex?: flexType;
14
+ style?: React.CSSProperties;
11
15
  }
12
16
  interface StackRowType {
13
17
  children?: React.ReactNode;
14
18
  className?: string;
15
19
  flex?: flexType;
20
+ style?: React.CSSProperties;
16
21
  }
17
- declare function Stack({ children, className, gap, alignInline }: StackType): JSX.Element;
18
- declare function StackRow({ children, className, flex }: StackRowType): JSX.Element;
22
+ declare function Stack({ children, className, gap, alignInline, justify, flex, style }: StackType): JSX.Element;
23
+ declare function StackRow({ children, className, flex, style }: StackRowType): JSX.Element;
19
24
  export { Stack, StackRow };
@@ -2,7 +2,7 @@
2
2
  import { ITextfield, ITextfieldIcon } from './types';
3
3
  declare function Textfield({ value, name, type, placeholder, rows, // For textarea
4
4
  min, max, onChange, onEnter, onFocus, onBlur, disabled, readonly, clearable, selectOnFocus, autoFocus, autoComplete, forceFocus, spellCheck, autogrow, // Vertical for textarea, Horizontal for text
5
- label, labelTooltip, labelTooltipHTML, description, descriptionBottom, errorMessage, unit, append, prepend, icon, iconPosition, className, labelClassName, blockClassName, size, horizontalSize, color, style, doBtnHug, textAlign, fullWidth, width, // 'Full' || 'xl' || 'l' || 's' || 'xs' || 'xxs'
5
+ label, labelTooltip, labelTooltipHTML, description, descriptionBottom, errorMessage, unit, append, prepend, icon, iconPosition, className, labelClassName, blockClassName, size, horizontalSize, color, style, doBtnHug, hasEffect, textAlign, fullWidth, width, // 'Full' || 'xl' || 'l' || 's' || 'xs' || 'xxs'
6
6
  maxHeight, // For textarea autogrow
7
7
  maxWidth, }: ITextfield): JSX.Element;
8
8
  declare function TextfieldIcon({ icon, position }: ITextfieldIcon): JSX.Element;
@@ -20,6 +20,7 @@ interface ITextfield {
20
20
  forceFocus?: boolean;
21
21
  spellCheck?: boolean;
22
22
  autogrow?: boolean;
23
+ hasEffect?: boolean;
23
24
  label?: React.ReactNode | string;
24
25
  labelTooltip?: string;
25
26
  labelTooltipHTML?: any;
@@ -14,7 +14,7 @@ import { EmptyState } from './components/EmptyState/EmptyState';
14
14
  import { Fieldset } from './components/Fieldset/Fieldset';
15
15
  import { Hr } from './components/Hr/Hr';
16
16
  import { IconBtn } from './components/IconBtn/IconBtn';
17
- import { Inline } from './components/Inline/Inline';
17
+ import { Inline, InlineColumn } from './components/Inline/Inline';
18
18
  import { KpiList, KpiItem } from './components/Kpi/Kpi';
19
19
  import { List, ListItem } from './components/List/List';
20
20
  import { Listbox, ListboxItem, ListboxSep } from './components/Listbox/Listbox';
@@ -24,13 +24,14 @@ import { Modal, ModalHeader, ModalBody, ModalFooter } from './components/Modal/M
24
24
  import { Panel, PanelClose, PanelHeader, PanelBody, PanelSection } from './components/Panel/Panel';
25
25
  import { Picto } from './components/Picto/Picto';
26
26
  import { Portal } from './components/Portal/Portal';
27
- import { Stack } from './components/Stack/Stack';
27
+ import { Stack, StackRow } from './components/Stack/Stack';
28
28
  import { Section } from './components/Section/Section';
29
29
  import { Select } from './components/Select/Select';
30
30
  import { Spinner } from './components/Spinner/Spinner';
31
+ import { SpinnerLogo } from './components/SpinnerLogo/SpinnerLogo';
31
32
  import { TabBar, TabItem } from './components/Tabs/Tabs';
32
33
  import { Textfield, TextfieldIcon, SearchBar } from './components/Textfield/Textfield';
33
34
  declare const Theme: any;
34
35
  declare const Utils: any;
35
36
  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, 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, };
37
+ 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, SpinnerLogo, Switch, TabBar, TabItem, Textfield, TextfieldIcon, };