nurseitaly-components 0.0.2 → 0.0.4

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.
@@ -23,7 +23,6 @@ export type { SelectItem } from './SelectField/SelectField';
23
23
  export { default as SelectMultipleField } from './SelectField/SelectMultipleField';
24
24
  export { default as Spinner } from './Spinner';
25
25
  export { default as SwitchField } from './SwitchField';
26
- export { default as Tabs } from './Tabs';
27
26
  export { default as Tag } from './Tag';
28
27
  export type { TagColors } from './Tag/Tag';
29
28
  export { default as TextField } from './TextField';
@@ -21,7 +21,6 @@ export { default as AsyncSelectField } from './SelectField/AsyncSelectField';
21
21
  export { default as SelectMultipleField } from './SelectField/SelectMultipleField';
22
22
  export { default as Spinner } from './Spinner';
23
23
  export { default as SwitchField } from './SwitchField';
24
- export { default as Tabs } from './Tabs';
25
24
  export { default as Tag } from './Tag';
26
25
  export { default as TextField } from './TextField';
27
26
  export { default as Tooltip } from './Tooltip';
@@ -2,7 +2,7 @@ export { default as CommonContext, CommonProvider } from './CommonContext';
2
2
  export { default as CookieStorage } from './CookieStorage';
3
3
  export { commonLocalization, commonResources, featureResources, mergeResources, } from './Localization';
4
4
  export { default as ProfileService } from './services/ProfileService';
5
- export { UserStatus } from './sessionTypes';
6
- export type { SessionState, User } from './sessionTypes';
5
+ export { loggedAction, messageAction, sessionActionTypes, sessionReducer, silentLoadingAction, toastLoadingAction, UserStatus, initialSessionState, } from './sessionTypes';
6
+ export type { SessionAction, SessionState, User } from './sessionTypes';
7
7
  export { useLoggedUtils } from './useLoggedUtils';
8
8
  export { getErrorMessageValue, useMessageUtils } from './useMessageUtils';
@@ -2,6 +2,6 @@ export { default as CommonContext, CommonProvider } from './CommonContext';
2
2
  export { default as CookieStorage } from './CookieStorage';
3
3
  export { commonLocalization, commonResources, featureResources, mergeResources, } from './Localization';
4
4
  export { default as ProfileService } from './services/ProfileService';
5
- export { UserStatus } from './sessionTypes';
5
+ export { loggedAction, messageAction, sessionActionTypes, sessionReducer, silentLoadingAction, toastLoadingAction, UserStatus, initialSessionState, } from './sessionTypes';
6
6
  export { useLoggedUtils } from './useLoggedUtils';
7
7
  export { getErrorMessageValue, useMessageUtils } from './useMessageUtils';
@@ -1,16 +1,15 @@
1
+ import { TFunction } from 'i18next';
1
2
  type MessageDispatcher = {
2
3
  key: string;
3
4
  ns?: string;
4
- /** Consumer `t` / `i18n.t` — kept loose across i18next major versions. */
5
- t: any;
5
+ t: TFunction;
6
6
  };
7
7
  type ErrorDispatcher = {
8
8
  err: any;
9
- /** Consumer `t` / `i18n.t` — kept loose across i18next major versions. */
10
- t?: any;
9
+ t?: TFunction;
11
10
  key?: string;
12
11
  };
13
- export declare const getErrorMessageValue: ({ err, t, key }: ErrorDispatcher) => any;
12
+ export declare const getErrorMessageValue: ({ err, t, key }: ErrorDispatcher) => string;
14
13
  export declare const useMessageUtils: () => {
15
14
  dispatchLoading: (val: boolean, text?: string) => void;
16
15
  dispatchError: ({ err, t, key }: ErrorDispatcher) => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nurseitaly-components",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -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 {};
@@ -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
- }
@@ -1,2 +0,0 @@
1
- import Tabs from './Tabs';
2
- export default Tabs;
@@ -1,2 +0,0 @@
1
- import Tabs from './Tabs';
2
- export default Tabs;
@@ -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
- }