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

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.
@@ -1,13 +1,14 @@
1
1
  /// <reference types="react" />
2
+ type stepType = number | string;
2
3
  interface BreadcrumbType {
3
4
  items: {
4
5
  index: number;
5
- step: number;
6
+ step: stepType;
6
7
  title: string;
7
8
  className?: string;
8
9
  }[];
9
- onClick?: (step: number) => void;
10
- activeStep?: number;
10
+ onClick?: (step: stepType) => void;
11
+ activeStep?: stepType;
11
12
  direction?: 'horizontal' | 'vertical';
12
13
  }
13
14
  declare function Breadcrumb({ items, onClick, activeStep, direction }: BreadcrumbType): JSX.Element;
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
+ type sizeType = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
3
+ type horizontalSizeType = '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;
@@ -18,11 +21,12 @@ interface IBtn {
18
21
  light?: boolean;
19
22
  isActive?: boolean;
20
23
  isLoading?: boolean;
21
- size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
22
- horizontalSize?: 'xs' | 's' | 'm' | 'l';
23
- fontSize?: 'l' | 'm';
24
+ size?: sizeType;
25
+ horizontalSize?: horizontalSizeType;
26
+ fontSize?: fontSizeType;
24
27
  fullWidth?: boolean;
25
28
  fullHeight?: boolean;
29
+ hasMinWith?: boolean;
26
30
  icon?: string;
27
31
  iconPosition?: string;
28
32
  arrow?: boolean;
@@ -34,4 +38,4 @@ interface IBtnGroup {
34
38
  children?: React.ReactNode;
35
39
  gap?: 'm' | 'l' | 'xl' | 'none';
36
40
  }
37
- export { IBtn, IBtnGroup };
41
+ 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,19 @@
1
+ import React from 'react';
2
+ import { BtnSizeType, BtnHorizontalSizeType } from '../Btn/types';
3
+ type valueType = string | boolean | number;
4
+ interface BtnSwitchProps {
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 BtnSwitch: React.FC<BtnSwitchProps>;
19
+ export { BtnSwitch, valueType as BtnSwitchValueType };
@@ -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';
@@ -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
+ export { Theme, Utils, AppRoot, AppHeader, AppLinkWrapper, AppLogo, Article, ArticleFoldable, Box, Breadcrumb, Btn, BtnGroup, BtnSwitch, Checkbox, CheckboxList, Collapse, // Not OK, use ArticleFoldable instead
35
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, };