nurseitaly-components 0.0.1 → 0.0.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.
- package/dist/basic/ProfileDropdown/ProfileDropdown.d.ts +13 -0
- package/dist/basic/ProfileDropdown/ProfileDropdown.js +17 -0
- package/dist/basic/ProfileDropdown/index.d.ts +2 -0
- package/dist/basic/ProfileDropdown/index.js +2 -0
- package/dist/basic/ProfileDropdown/styles.scss +28 -0
- package/dist/basic/index.d.ts +2 -1
- package/dist/basic/index.js +2 -1
- package/package.json +1 -1
- package/dist/basic/Tabs/Tabs.d.ts +0 -17
- package/dist/basic/Tabs/Tabs.js +0 -9
- package/dist/basic/Tabs/index.d.ts +0 -2
- package/dist/basic/Tabs/index.js +0 -2
- package/dist/basic/Tabs/styles.scss +0 -51
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import './styles.scss';
|
|
2
|
+
export declare const ProfileColors: readonly ["white", "blue"];
|
|
3
|
+
type ProfileColors = (typeof ProfileColors)[number];
|
|
4
|
+
export type Props = {
|
|
5
|
+
src?: string;
|
|
6
|
+
className?: string;
|
|
7
|
+
color?: ProfileColors;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
title?: string;
|
|
10
|
+
onClick?: (b: boolean) => void;
|
|
11
|
+
};
|
|
12
|
+
export default function ProfileDropdown({ src, className, color, disabled, title, onClick, }: Props): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import Avatar from '../Avatar';
|
|
5
|
+
import Icon from '../Icon';
|
|
6
|
+
import './styles.scss';
|
|
7
|
+
export const ProfileColors = ['white', 'blue'];
|
|
8
|
+
export default function ProfileDropdown({ src, className, color = 'white', disabled = false, title, onClick, }) {
|
|
9
|
+
const [active, setActive] = useState(false);
|
|
10
|
+
const getClassNames = cx('ds-profile-dropdown', className, color, {
|
|
11
|
+
disabled: disabled,
|
|
12
|
+
});
|
|
13
|
+
return (_jsxs("div", { className: getClassNames, onClick: () => {
|
|
14
|
+
setActive(!active);
|
|
15
|
+
onClick && onClick(!active);
|
|
16
|
+
}, children: [_jsx(Avatar, { size: "small", src: src, title: title }), _jsx(Icon, { name: "arrow_drop_down", className: "arrow" })] }));
|
|
17
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
.ds-profile-dropdown {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
|
|
5
|
+
&.disabled {
|
|
6
|
+
> .arrow {
|
|
7
|
+
color: var(--icon-disabled) !important;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&.white {
|
|
12
|
+
> .arrow {
|
|
13
|
+
color: var(--icon-light-fixed);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.blue {
|
|
18
|
+
> .arrow {
|
|
19
|
+
color: var(--icon-accent);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&:hover.blue {
|
|
24
|
+
> .arrow {
|
|
25
|
+
color: var(--icon-accent-hover);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
package/dist/basic/index.d.ts
CHANGED
|
@@ -15,13 +15,14 @@ export { IconSizes } from './Icon/Icon';
|
|
|
15
15
|
export { ICON_SIZE_PX, iconSizeToPx } from './Icon/IconSizes';
|
|
16
16
|
export { default as IconButton } from './IconButton';
|
|
17
17
|
export { default as Pill } from './Pill';
|
|
18
|
+
export { default as ProfileDropdown } from './ProfileDropdown';
|
|
19
|
+
export { ProfileColors } from './ProfileDropdown/ProfileDropdown';
|
|
18
20
|
export { default as SelectField } from './SelectField';
|
|
19
21
|
export { default as AsyncSelectField } from './SelectField/AsyncSelectField';
|
|
20
22
|
export type { SelectItem } from './SelectField/SelectField';
|
|
21
23
|
export { default as SelectMultipleField } from './SelectField/SelectMultipleField';
|
|
22
24
|
export { default as Spinner } from './Spinner';
|
|
23
25
|
export { default as SwitchField } from './SwitchField';
|
|
24
|
-
export { default as Tabs } from './Tabs';
|
|
25
26
|
export { default as Tag } from './Tag';
|
|
26
27
|
export type { TagColors } from './Tag/Tag';
|
|
27
28
|
export { default as TextField } from './TextField';
|
package/dist/basic/index.js
CHANGED
|
@@ -14,12 +14,13 @@ export { IconSizes } from './Icon/Icon';
|
|
|
14
14
|
export { ICON_SIZE_PX, iconSizeToPx } from './Icon/IconSizes';
|
|
15
15
|
export { default as IconButton } from './IconButton';
|
|
16
16
|
export { default as Pill } from './Pill';
|
|
17
|
+
export { default as ProfileDropdown } from './ProfileDropdown';
|
|
18
|
+
export { ProfileColors } from './ProfileDropdown/ProfileDropdown';
|
|
17
19
|
export { default as SelectField } from './SelectField';
|
|
18
20
|
export { default as AsyncSelectField } from './SelectField/AsyncSelectField';
|
|
19
21
|
export { default as SelectMultipleField } from './SelectField/SelectMultipleField';
|
|
20
22
|
export { default as Spinner } from './Spinner';
|
|
21
23
|
export { default as SwitchField } from './SwitchField';
|
|
22
|
-
export { default as Tabs } from './Tabs';
|
|
23
24
|
export { default as Tag } from './Tag';
|
|
24
25
|
export { default as TextField } from './TextField';
|
|
25
26
|
export { default as Tooltip } from './Tooltip';
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import './styles.scss';
|
|
2
|
-
export type TabItem = {
|
|
3
|
-
label: string | React.ReactElement;
|
|
4
|
-
value: string;
|
|
5
|
-
active?: boolean;
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
};
|
|
8
|
-
export declare const TabsColors: readonly ["white", "blue"];
|
|
9
|
-
type TabsColors = (typeof TabsColors)[number];
|
|
10
|
-
export type Props = {
|
|
11
|
-
items: TabItem[];
|
|
12
|
-
onSelect: (value: TabItem) => void;
|
|
13
|
-
className?: string;
|
|
14
|
-
color?: TabsColors;
|
|
15
|
-
};
|
|
16
|
-
export default function Tabs({ className, items, onSelect, color, }: Props): import("react").JSX.Element;
|
|
17
|
-
export {};
|
package/dist/basic/Tabs/Tabs.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import cx from 'classnames';
|
|
3
|
-
import './styles.scss';
|
|
4
|
-
export const TabsColors = ['white', 'blue'];
|
|
5
|
-
export default function Tabs({ className, items, onSelect, color = 'white', }) {
|
|
6
|
-
const getClassNames = cx('ds-tabs', className, color);
|
|
7
|
-
const getClassNamesTab = (item) => cx('ds-tab', { disabled: item.disabled, active: item.active });
|
|
8
|
-
return (_jsx("div", { className: getClassNames, children: items.map((item, idx) => (_jsx("div", { className: getClassNamesTab(item), onClick: () => onSelect(item), children: item.label }, idx.valueOf()))) }));
|
|
9
|
-
}
|
package/dist/basic/Tabs/index.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
.ds-tabs {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-wrap: wrap;
|
|
4
|
-
gap: var(--spacing-200);
|
|
5
|
-
|
|
6
|
-
.ds-tab {
|
|
7
|
-
@include label-large-1;
|
|
8
|
-
display: flex;
|
|
9
|
-
align-items: center;
|
|
10
|
-
height: 48px;
|
|
11
|
-
cursor: pointer;
|
|
12
|
-
|
|
13
|
-
&.disabled {
|
|
14
|
-
font-weight: 400 !important;
|
|
15
|
-
color: var(--text-disabled) !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&.active {
|
|
19
|
-
@include label-large-2;
|
|
20
|
-
border-bottom: 2.5px solid var(--border-hover);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&:hover {
|
|
24
|
-
@include label-large-2;
|
|
25
|
-
color: var(--text-accent-hover);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.white {
|
|
30
|
-
.ds-tab {
|
|
31
|
-
color: var(--icon-light-fixed);
|
|
32
|
-
&.active {
|
|
33
|
-
border-bottom: 2.5px solid var(--border-subtle-4);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.blue {
|
|
39
|
-
.ds-tab {
|
|
40
|
-
color: var(--text-primary);
|
|
41
|
-
&.active {
|
|
42
|
-
border-bottom: 2.5px solid var(--border-hover);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&:hover,
|
|
46
|
-
&.active {
|
|
47
|
-
color: var(--icon-accent-hover);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|