colibri-ui 0.7.80 → 0.7.81

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.
@@ -16,7 +16,7 @@
16
16
  transition-timing-function: ease;
17
17
  }
18
18
  .inner_active {
19
- background: rgb(237, 237, 237);
19
+ background: var(--palette-bg-1);
20
20
  }
21
21
  .inner_inactive {
22
22
  background: var(--palette-white);
@@ -43,15 +43,18 @@
43
43
  }
44
44
  .inner[data-size=s] {
45
45
  border-radius: 32px;
46
- height: 32px;
46
+ font-size: 15px;
47
+ line-height: 32px;
47
48
  }
48
49
  .inner[data-size=m] {
49
50
  border-radius: 36px;
50
- height: 36px;
51
+ font-size: 16px;
52
+ line-height: 36px;
51
53
  }
52
54
  .inner[data-size=l] {
53
55
  border-radius: 44px;
54
- height: 44px;
56
+ font-size: 18px;
57
+ line-height: 44px;
55
58
  }
56
59
 
57
60
  .content {
package/Chip/index.d.ts CHANGED
@@ -1,14 +1,4 @@
1
- import React from "react";
2
- import type { FC, ReactNode } from "react";
3
- type Size = "s" | "m" | "l";
4
- type Props = {
5
- size?: Size;
6
- testID?: string;
7
- isActive?: boolean;
8
- iconOnRight?: React.ReactNode;
9
- onClick?: () => void;
10
- onIconOnRightClick?: () => void;
11
- children?: ReactNode;
12
- };
1
+ import type { Props } from "./index.props";
2
+ import type { FC } from "react";
13
3
  declare const Chip: FC<Props>;
14
4
  export default Chip;
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from "react";
2
+ type Size = "s" | "m" | "l";
3
+ export type Props = {
4
+ size?: Size;
5
+ testID?: string;
6
+ isActive?: boolean;
7
+ iconOnRight?: React.ReactNode;
8
+ onClick?: () => void;
9
+ onIconOnRightClick?: () => void;
10
+ children?: ReactNode;
11
+ };
12
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { FC } from "react";
2
+ import type { TabProps } from "./Tab.props";
3
+ declare const Tab: FC<TabProps>;
4
+ export default Tab;
@@ -0,0 +1,61 @@
1
+ .tab {
2
+ cursor: pointer;
3
+ display: inline-block;
4
+ margin-left: 16px;
5
+ padding: 0 20px;
6
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
7
+ transition-duration: 0.3s;
8
+ transition-property: background, box-shadow, transform;
9
+ transition-timing-function: ease;
10
+ user-select: none;
11
+ white-space: nowrap;
12
+ }
13
+ .tab[data-size=s] {
14
+ border-radius: 32px;
15
+ font-size: 15px;
16
+ line-height: 32px;
17
+ }
18
+ .tab[data-size=m] {
19
+ border-radius: 36px;
20
+ font-size: 16px;
21
+ line-height: 36px;
22
+ }
23
+ .tab[data-size=l] {
24
+ border-radius: 44px;
25
+ font-size: 18px;
26
+ line-height: 44px;
27
+ }
28
+ .tab_active {
29
+ background: var(--palette-bg-1);
30
+ }
31
+ .tab_inactive {
32
+ background: var(--palette-white);
33
+ box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
34
+ }
35
+ .tab_inactive:hover {
36
+ box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
37
+ }
38
+ .tab_inactive:active {
39
+ background: rgba(0, 0, 0, 0.02);
40
+ box-shadow: rgba(193, 193, 193, 0.4) 0 1px 3px;
41
+ outline: 0;
42
+ transition-duration: 0.15s;
43
+ }
44
+ @media (hover: none) {
45
+ .tab_inactive:hover {
46
+ box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
47
+ }
48
+ .tab_inactive:active {
49
+ box-shadow: rgba(193, 193, 193, 0.4) 0 1px 3px;
50
+ }
51
+ }
52
+ .tab_first {
53
+ margin-left: 0;
54
+ }
55
+ .tab_disabled {
56
+ background: #f7f8f9;
57
+ box-shadow: none;
58
+ color: var(--palette-bg-3);
59
+ cursor: not-allowed;
60
+ pointer-events: none;
61
+ }
@@ -0,0 +1,16 @@
1
+ import type { Size } from "../index.props";
2
+ import type { KeyboardEventHandler, MouseEventHandler, ReactNode, RefObject } from "react";
3
+ export type TabProps = {
4
+ id?: string;
5
+ active?: boolean;
6
+ disabled?: boolean;
7
+ first?: boolean;
8
+ content?: ReactNode;
9
+ onClick?: MouseEventHandler<HTMLLIElement>;
10
+ innerRef?: RefObject<HTMLLIElement>;
11
+ className?: string;
12
+ role?: string;
13
+ tabIndex?: number;
14
+ onKeyDown?: KeyboardEventHandler<HTMLElement>;
15
+ size?: Size;
16
+ };
@@ -0,0 +1,4 @@
1
+ .root {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { TabsMenuProps } from "./index.props";
2
+ import type { FC } from "react";
3
+ declare const TabsMenu: FC<TabsMenuProps>;
4
+ export default TabsMenu;
@@ -0,0 +1,12 @@
1
+ import type { RefObject } from "react";
2
+ import type { TabProps } from "./Tab/Tab.props";
3
+ export type Size = "s" | "m" | "l";
4
+ export type TabsMenuProps = {
5
+ activeTab?: string;
6
+ onChange?: (tabId: string) => void;
7
+ tabs: TabProps[];
8
+ tabsRefs?: RefObject<HTMLLIElement>[];
9
+ innerRef?: RefObject<HTMLUListElement>;
10
+ className?: string;
11
+ size?: Size;
12
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "../esm/TabsMenu/index.js",
4
+ "main": "./index.js",
5
+ "types": "./index.d.ts"
6
+ }
@@ -16,7 +16,7 @@
16
16
  transition-timing-function: ease;
17
17
  }
18
18
  .inner_active {
19
- background: rgb(237, 237, 237);
19
+ background: var(--palette-bg-1);
20
20
  }
21
21
  .inner_inactive {
22
22
  background: var(--palette-white);
@@ -43,15 +43,18 @@
43
43
  }
44
44
  .inner[data-size=s] {
45
45
  border-radius: 32px;
46
- height: 32px;
46
+ font-size: 15px;
47
+ line-height: 32px;
47
48
  }
48
49
  .inner[data-size=m] {
49
50
  border-radius: 36px;
50
- height: 36px;
51
+ font-size: 16px;
52
+ line-height: 36px;
51
53
  }
52
54
  .inner[data-size=l] {
53
55
  border-radius: 44px;
54
- height: 44px;
56
+ font-size: 18px;
57
+ line-height: 44px;
55
58
  }
56
59
 
57
60
  .content {
@@ -1,14 +1,4 @@
1
- import React from "react";
2
- import type { FC, ReactNode } from "react";
3
- type Size = "s" | "m" | "l";
4
- type Props = {
5
- size?: Size;
6
- testID?: string;
7
- isActive?: boolean;
8
- iconOnRight?: React.ReactNode;
9
- onClick?: () => void;
10
- onIconOnRightClick?: () => void;
11
- children?: ReactNode;
12
- };
1
+ import type { Props } from "./index.props";
2
+ import type { FC } from "react";
13
3
  declare const Chip: FC<Props>;
14
4
  export default Chip;
@@ -0,0 +1,12 @@
1
+ import type { ReactNode } from "react";
2
+ type Size = "s" | "m" | "l";
3
+ export type Props = {
4
+ size?: Size;
5
+ testID?: string;
6
+ isActive?: boolean;
7
+ iconOnRight?: React.ReactNode;
8
+ onClick?: () => void;
9
+ onIconOnRightClick?: () => void;
10
+ children?: ReactNode;
11
+ };
12
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { FC } from "react";
2
+ import type { TabProps } from "./Tab.props";
3
+ declare const Tab: FC<TabProps>;
4
+ export default Tab;
@@ -0,0 +1,61 @@
1
+ .tab {
2
+ cursor: pointer;
3
+ display: inline-block;
4
+ margin-left: 16px;
5
+ padding: 0 20px;
6
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
7
+ transition-duration: 0.3s;
8
+ transition-property: background, box-shadow, transform;
9
+ transition-timing-function: ease;
10
+ user-select: none;
11
+ white-space: nowrap;
12
+ }
13
+ .tab[data-size=s] {
14
+ border-radius: 32px;
15
+ font-size: 15px;
16
+ line-height: 32px;
17
+ }
18
+ .tab[data-size=m] {
19
+ border-radius: 36px;
20
+ font-size: 16px;
21
+ line-height: 36px;
22
+ }
23
+ .tab[data-size=l] {
24
+ border-radius: 44px;
25
+ font-size: 18px;
26
+ line-height: 44px;
27
+ }
28
+ .tab_active {
29
+ background: var(--palette-bg-1);
30
+ }
31
+ .tab_inactive {
32
+ background: var(--palette-white);
33
+ box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
34
+ }
35
+ .tab_inactive:hover {
36
+ box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
37
+ }
38
+ .tab_inactive:active {
39
+ background: rgba(0, 0, 0, 0.02);
40
+ box-shadow: rgba(193, 193, 193, 0.4) 0 1px 3px;
41
+ outline: 0;
42
+ transition-duration: 0.15s;
43
+ }
44
+ @media (hover: none) {
45
+ .tab_inactive:hover {
46
+ box-shadow: rgba(193, 193, 193, 0.4) 0 5px 20px;
47
+ }
48
+ .tab_inactive:active {
49
+ box-shadow: rgba(193, 193, 193, 0.4) 0 1px 3px;
50
+ }
51
+ }
52
+ .tab_first {
53
+ margin-left: 0;
54
+ }
55
+ .tab_disabled {
56
+ background: #f7f8f9;
57
+ box-shadow: none;
58
+ color: var(--palette-bg-3);
59
+ cursor: not-allowed;
60
+ pointer-events: none;
61
+ }
@@ -0,0 +1,16 @@
1
+ import type { Size } from "../index.props";
2
+ import type { KeyboardEventHandler, MouseEventHandler, ReactNode, RefObject } from "react";
3
+ export type TabProps = {
4
+ id?: string;
5
+ active?: boolean;
6
+ disabled?: boolean;
7
+ first?: boolean;
8
+ content?: ReactNode;
9
+ onClick?: MouseEventHandler<HTMLLIElement>;
10
+ innerRef?: RefObject<HTMLLIElement>;
11
+ className?: string;
12
+ role?: string;
13
+ tabIndex?: number;
14
+ onKeyDown?: KeyboardEventHandler<HTMLElement>;
15
+ size?: Size;
16
+ };
@@ -0,0 +1,4 @@
1
+ .root {
2
+ margin: 0;
3
+ padding: 0;
4
+ }
@@ -0,0 +1,4 @@
1
+ import type { TabsMenuProps } from "./index.props";
2
+ import type { FC } from "react";
3
+ declare const TabsMenu: FC<TabsMenuProps>;
4
+ export default TabsMenu;
@@ -0,0 +1,12 @@
1
+ import type { RefObject } from "react";
2
+ import type { TabProps } from "./Tab/Tab.props";
3
+ export type Size = "s" | "m" | "l";
4
+ export type TabsMenuProps = {
5
+ activeTab?: string;
6
+ onChange?: (tabId: string) => void;
7
+ tabs: TabProps[];
8
+ tabsRefs?: RefObject<HTMLLIElement>[];
9
+ innerRef?: RefObject<HTMLUListElement>;
10
+ className?: string;
11
+ size?: Size;
12
+ };
@@ -0,0 +1,4 @@
1
+ export type Keys = Record<string, string> & Record<KeyboardKeys, string>;
2
+ export type KeyboardKeys = "BACKSPACE" | "TAB" | "ENTER" | "CAPS_LOCK" | "ESC" | "SPACE" | "PAGE_UP" | "PAGE_DOWN" | "END" | "HOME" | "LEFT" | "UP" | "RIGHT" | "DOWN" | "INSERT" | "DELETE" | string;
3
+ export declare const Keys: Keys;
4
+ export declare function isKey(eventKey: string, keys: Array<KeyboardKeys | string>): boolean;
@@ -0,0 +1,4 @@
1
+ export type Keys = Record<string, string> & Record<KeyboardKeys, string>;
2
+ export type KeyboardKeys = "BACKSPACE" | "TAB" | "ENTER" | "CAPS_LOCK" | "ESC" | "SPACE" | "PAGE_UP" | "PAGE_DOWN" | "END" | "HOME" | "LEFT" | "UP" | "RIGHT" | "DOWN" | "INSERT" | "DELETE" | string;
3
+ export declare const Keys: Keys;
4
+ export declare function isKey(eventKey: string, keys: Array<KeyboardKeys | string>): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "colibri-ui",
3
- "version": "0.7.80",
3
+ "version": "0.7.81",
4
4
  "description": "React UI components library",
5
5
  "main": "index.js",
6
6
  "scripts": {},