@clicoh/orion-library 1.1.0-beta.6 → 1.1.0-beta.8
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/assets/css/base.css +18 -0
- package/dist/components/01-atoms/Badge/Badge.d.ts +14 -4
- package/dist/components/01-atoms/Badge/Badge.d.ts.map +1 -1
- package/dist/components/01-atoms/Badge/Badge.jsx +34 -4
- package/dist/components/01-atoms/Badge/Badge.jsx.map +1 -1
- package/dist/components/01-atoms/CountryFlag/CountryFlag.d.ts +30 -0
- package/dist/components/01-atoms/CountryFlag/CountryFlag.d.ts.map +1 -0
- package/dist/components/01-atoms/CountryFlag/CountryFlag.jsx +105 -0
- package/dist/components/01-atoms/CountryFlag/CountryFlag.jsx.map +1 -0
- package/dist/components/01-atoms/CountryFlag/index.d.ts +3 -0
- package/dist/components/01-atoms/CountryFlag/index.d.ts.map +1 -0
- package/dist/components/01-atoms/CountryFlag/index.js +2 -0
- package/dist/components/01-atoms/CountryFlag/index.js.map +1 -0
- package/dist/components/01-atoms/Input/Input.d.ts +3 -1
- package/dist/components/01-atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/01-atoms/Input/Input.jsx +5 -2
- package/dist/components/01-atoms/Input/Input.jsx.map +1 -1
- package/dist/components/01-atoms/Input/utils/border.d.ts +6 -1
- package/dist/components/01-atoms/Input/utils/border.d.ts.map +1 -1
- package/dist/components/01-atoms/Input/utils/border.js +13 -3
- package/dist/components/01-atoms/Input/utils/border.js.map +1 -1
- package/dist/components/01-atoms/MultiSelect/MultiSelect.d.ts +3 -1
- package/dist/components/01-atoms/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/01-atoms/MultiSelect/MultiSelect.jsx +17 -5
- package/dist/components/01-atoms/MultiSelect/MultiSelect.jsx.map +1 -1
- package/dist/components/01-atoms/Paragraph/Paragraph.d.ts +14 -4
- package/dist/components/01-atoms/Paragraph/Paragraph.d.ts.map +1 -1
- package/dist/components/01-atoms/Paragraph/Paragraph.jsx +30 -8
- package/dist/components/01-atoms/Paragraph/Paragraph.jsx.map +1 -1
- package/dist/components/01-atoms/Select/Select.d.ts +3 -1
- package/dist/components/01-atoms/Select/Select.d.ts.map +1 -1
- package/dist/components/01-atoms/Select/Select.jsx +10 -4
- package/dist/components/01-atoms/Select/Select.jsx.map +1 -1
- package/dist/components/01-atoms/index.d.ts +1 -0
- package/dist/components/01-atoms/index.d.ts.map +1 -1
- package/dist/components/01-atoms/index.js +1 -0
- package/dist/components/01-atoms/index.js.map +1 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.d.ts +3 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx +3 -2
- package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx.map +1 -1
- package/dist/components/02-molecules/BellNotifications/index.d.ts +1 -1
- package/dist/components/02-molecules/BellNotifications/index.d.ts.map +1 -1
- package/dist/components/02-molecules/Filter/Filter.d.ts +13 -50
- package/dist/components/02-molecules/Filter/Filter.d.ts.map +1 -1
- package/dist/components/02-molecules/Filter/Filter.jsx +156 -165
- package/dist/components/02-molecules/Filter/Filter.jsx.map +1 -1
- package/dist/components/02-molecules/Filter/index.d.ts +2 -0
- package/dist/components/02-molecules/Filter/index.d.ts.map +1 -1
- package/dist/components/02-molecules/Filter/index.js +2 -0
- package/dist/components/02-molecules/Filter/index.js.map +1 -1
- package/dist/components/02-molecules/Filter/types.d.ts +59 -0
- package/dist/components/02-molecules/Filter/types.d.ts.map +1 -0
- package/dist/components/02-molecules/Filter/types.js +2 -0
- package/dist/components/02-molecules/Filter/types.js.map +1 -0
- package/dist/components/02-molecules/Filter/utils/getFilterChips.d.ts +23 -0
- package/dist/components/02-molecules/Filter/utils/getFilterChips.d.ts.map +1 -0
- package/dist/components/02-molecules/Filter/utils/getFilterChips.js +47 -0
- package/dist/components/02-molecules/Filter/utils/getFilterChips.js.map +1 -0
- package/dist/components/02-molecules/FilterChips/FilterChips.d.ts +44 -0
- package/dist/components/02-molecules/FilterChips/FilterChips.d.ts.map +1 -0
- package/dist/components/02-molecules/FilterChips/FilterChips.jsx +60 -0
- package/dist/components/02-molecules/FilterChips/FilterChips.jsx.map +1 -0
- package/dist/components/02-molecules/FilterChips/index.d.ts +2 -0
- package/dist/components/02-molecules/FilterChips/index.d.ts.map +1 -0
- package/dist/components/02-molecules/FilterChips/index.js +2 -0
- package/dist/components/02-molecules/FilterChips/index.js.map +1 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts +60 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts.map +1 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx +144 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx.map +1 -0
- package/dist/components/02-molecules/ImageViewer/index.d.ts +2 -0
- package/dist/components/02-molecules/ImageViewer/index.d.ts.map +1 -0
- package/dist/components/02-molecules/ImageViewer/index.js +2 -0
- package/dist/components/02-molecules/ImageViewer/index.js.map +1 -0
- package/dist/components/02-molecules/SideNav/SideNav.d.ts +58 -0
- package/dist/components/02-molecules/SideNav/SideNav.d.ts.map +1 -0
- package/dist/components/02-molecules/SideNav/SideNav.jsx +53 -0
- package/dist/components/02-molecules/SideNav/SideNav.jsx.map +1 -0
- package/dist/components/02-molecules/SideNav/SideNavItem.d.ts +36 -0
- package/dist/components/02-molecules/SideNav/SideNavItem.d.ts.map +1 -0
- package/dist/components/02-molecules/SideNav/SideNavItem.jsx +38 -0
- package/dist/components/02-molecules/SideNav/SideNavItem.jsx.map +1 -0
- package/dist/components/02-molecules/SideNav/index.d.ts +3 -0
- package/dist/components/02-molecules/SideNav/index.d.ts.map +1 -0
- package/dist/components/02-molecules/SideNav/index.js +3 -0
- package/dist/components/02-molecules/SideNav/index.js.map +1 -0
- package/dist/components/02-molecules/Tab/TabItem.d.ts +4 -1
- package/dist/components/02-molecules/Tab/TabItem.d.ts.map +1 -1
- package/dist/components/02-molecules/Tab/TabItem.jsx +9 -2
- package/dist/components/02-molecules/Tab/TabItem.jsx.map +1 -1
- package/dist/components/02-molecules/Tab/TabList.d.ts +12 -2
- package/dist/components/02-molecules/Tab/TabList.d.ts.map +1 -1
- package/dist/components/02-molecules/Tab/TabList.jsx +40 -9
- package/dist/components/02-molecules/Tab/TabList.jsx.map +1 -1
- package/dist/components/02-molecules/Table/Table.d.ts.map +1 -1
- package/dist/components/02-molecules/Table/Table.jsx +6 -3
- package/dist/components/02-molecules/Table/Table.jsx.map +1 -1
- package/dist/components/02-molecules/index.d.ts +3 -0
- package/dist/components/02-molecules/index.d.ts.map +1 -1
- package/dist/components/02-molecules/index.js +3 -0
- package/dist/components/02-molecules/index.js.map +1 -1
- package/dist/components/03-organisms/AsideFilters/AsideFilters.jsx +1 -1
- package/dist/components/03-organisms/AsideFilters/AsideFilters.jsx.map +1 -1
- package/dist/components/03-organisms/DataTable/DataTable.d.ts +10 -1
- package/dist/components/03-organisms/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/03-organisms/DataTable/DataTable.jsx +16 -3
- package/dist/components/03-organisms/DataTable/DataTable.jsx.map +1 -1
- package/dist/components/03-organisms/Header/HeaderActions.d.ts.map +1 -1
- package/dist/components/03-organisms/Header/HeaderActions.jsx +13 -12
- package/dist/components/03-organisms/Header/HeaderActions.jsx.map +1 -1
- package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.d.ts +3 -1
- package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.d.ts.map +1 -1
- package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.jsx +3 -1
- package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.jsx.map +1 -1
- package/package.json +1 -1
- package/tailwind.config.ts +21 -0
|
@@ -1,23 +1,33 @@
|
|
|
1
1
|
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
type ParagraphProps = {
|
|
2
|
+
export type ParagraphProps = {
|
|
3
3
|
size?: ParagraphSize;
|
|
4
|
+
weight?: ParagraphWeight;
|
|
4
5
|
} & HTMLAttributes<HTMLParagraphElement>;
|
|
5
|
-
type ParagraphSize = 'subtitle-1' | 'subtitle-2' | 'body-1' | 'body-2' | 'chips';
|
|
6
|
+
export type ParagraphSize = 'subtitle-1' | 'subtitle-2' | 'body-1' | 'body-2' | 'chips';
|
|
7
|
+
export type ParagraphWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
6
8
|
/**
|
|
7
9
|
* Paragraph component for rendering text with different styles based on size.
|
|
8
10
|
*
|
|
11
|
+
* Each size carries its own weight; `weight` replaces it when a text needs more
|
|
12
|
+
* or less emphasis than its size implies. It resolves to a single font-weight
|
|
13
|
+
* class, so it cannot end up fighting the one from the size.
|
|
14
|
+
*
|
|
9
15
|
* @component
|
|
10
16
|
* @example
|
|
11
17
|
* // Example usage of Paragraph component
|
|
12
18
|
* <Paragraph size="body-1">This is a paragraph</Paragraph>
|
|
13
19
|
*
|
|
20
|
+
* @example
|
|
21
|
+
* // Body text with a bit more emphasis than the default
|
|
22
|
+
* <Paragraph size="body-1" weight="medium">7 d 18 h</Paragraph>
|
|
23
|
+
*
|
|
14
24
|
* @param {Object} props - The properties of the Paragraph component.
|
|
15
25
|
* @param {'subtitle-1' | 'subtitle-2' | 'body-1' | 'body-2' | 'chips'} [props.size='body-1'] - The size of the paragraph text.
|
|
26
|
+
* @param {'normal' | 'medium' | 'semibold' | 'bold'} [props.weight] - Overrides the weight that comes with the size.
|
|
16
27
|
* @param {ReactNode} props.children - The content to be displayed inside the paragraph.
|
|
17
28
|
* @param {HTMLAttributes<HTMLParagraphElement>} restProps - Additional properties for the paragraph element.
|
|
18
29
|
*
|
|
19
30
|
* @returns {ReactNode} The rendered Paragraph component.
|
|
20
31
|
*/
|
|
21
|
-
export declare function Paragraph({ size, children, ...restProps }: ParagraphProps): ReactNode;
|
|
22
|
-
export {};
|
|
32
|
+
export declare function Paragraph({ size, weight, children, ...restProps }: ParagraphProps): ReactNode;
|
|
23
33
|
//# sourceMappingURL=Paragraph.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../../../src/components/01-atoms/Paragraph/Paragraph.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,
|
|
1
|
+
{"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../../../../src/components/01-atoms/Paragraph/Paragraph.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,GAAG,cAAc,CAAC,oBAAoB,CAAC,CAAC;AAEzC,MAAM,MAAM,aAAa,GACrB,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,OAAO,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAyBxE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAe,EACf,MAAM,EACN,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,cAAc,GAAG,SAAS,CAW5B"}
|
|
@@ -1,28 +1,50 @@
|
|
|
1
1
|
import clsx from 'clsx';
|
|
2
|
-
const
|
|
3
|
-
'subtitle-1':
|
|
4
|
-
'subtitle-2':
|
|
5
|
-
'body-1':
|
|
6
|
-
'body-2':
|
|
7
|
-
chips:
|
|
2
|
+
const sizeMap = {
|
|
3
|
+
'subtitle-1': 'text-sm',
|
|
4
|
+
'subtitle-2': 'text-xs',
|
|
5
|
+
'body-1': 'text-sm',
|
|
6
|
+
'body-2': 'text-xs',
|
|
7
|
+
chips: 'text-xs',
|
|
8
|
+
};
|
|
9
|
+
const defaultWeightMap = {
|
|
10
|
+
'subtitle-1': 'semibold',
|
|
11
|
+
'subtitle-2': 'semibold',
|
|
12
|
+
'body-1': 'normal',
|
|
13
|
+
'body-2': 'normal',
|
|
14
|
+
chips: 'medium',
|
|
15
|
+
};
|
|
16
|
+
const weightMap = {
|
|
17
|
+
normal: 'font-normal',
|
|
18
|
+
medium: 'font-medium',
|
|
19
|
+
semibold: 'font-semibold',
|
|
20
|
+
bold: 'font-bold',
|
|
8
21
|
};
|
|
9
22
|
/**
|
|
10
23
|
* Paragraph component for rendering text with different styles based on size.
|
|
11
24
|
*
|
|
25
|
+
* Each size carries its own weight; `weight` replaces it when a text needs more
|
|
26
|
+
* or less emphasis than its size implies. It resolves to a single font-weight
|
|
27
|
+
* class, so it cannot end up fighting the one from the size.
|
|
28
|
+
*
|
|
12
29
|
* @component
|
|
13
30
|
* @example
|
|
14
31
|
* // Example usage of Paragraph component
|
|
15
32
|
* <Paragraph size="body-1">This is a paragraph</Paragraph>
|
|
16
33
|
*
|
|
34
|
+
* @example
|
|
35
|
+
* // Body text with a bit more emphasis than the default
|
|
36
|
+
* <Paragraph size="body-1" weight="medium">7 d 18 h</Paragraph>
|
|
37
|
+
*
|
|
17
38
|
* @param {Object} props - The properties of the Paragraph component.
|
|
18
39
|
* @param {'subtitle-1' | 'subtitle-2' | 'body-1' | 'body-2' | 'chips'} [props.size='body-1'] - The size of the paragraph text.
|
|
40
|
+
* @param {'normal' | 'medium' | 'semibold' | 'bold'} [props.weight] - Overrides the weight that comes with the size.
|
|
19
41
|
* @param {ReactNode} props.children - The content to be displayed inside the paragraph.
|
|
20
42
|
* @param {HTMLAttributes<HTMLParagraphElement>} restProps - Additional properties for the paragraph element.
|
|
21
43
|
*
|
|
22
44
|
* @returns {ReactNode} The rendered Paragraph component.
|
|
23
45
|
*/
|
|
24
|
-
export function Paragraph({ size = 'body-1', children, ...restProps }) {
|
|
25
|
-
const className = clsx(
|
|
46
|
+
export function Paragraph({ size = 'body-1', weight, children, ...restProps }) {
|
|
47
|
+
const className = clsx(sizeMap[size], weightMap[weight ?? defaultWeightMap[size]], restProps.className);
|
|
26
48
|
return (<p {...restProps} className={className}>
|
|
27
49
|
{children}
|
|
28
50
|
</p>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paragraph.jsx","sourceRoot":"","sources":["../../../../src/components/01-atoms/Paragraph/Paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Paragraph.jsx","sourceRoot":"","sources":["../../../../src/components/01-atoms/Paragraph/Paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAiBxB,MAAM,OAAO,GAAkC;IAC7C,YAAY,EAAE,SAAS;IACvB,YAAY,EAAE,SAAS;IACvB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF,MAAM,gBAAgB,GAA2C;IAC/D,YAAY,EAAE,UAAU;IACxB,YAAY,EAAE,UAAU;IACxB,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,QAAQ;IAClB,KAAK,EAAE,QAAQ;CAChB,CAAC;AAEF,MAAM,SAAS,GAAoC;IACjD,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,aAAa;IACrB,QAAQ,EAAE,eAAe;IACzB,IAAI,EAAE,WAAW;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,SAAS,CAAC,EACxB,IAAI,GAAG,QAAQ,EACf,MAAM,EACN,QAAQ,EACR,GAAG,SAAS,EACG;IACf,MAAM,SAAS,GAAG,IAAI,CACpB,OAAO,CAAC,IAAI,CAAC,EACb,SAAS,CAAC,MAAM,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC,EAC3C,SAAS,CAAC,SAAS,CACpB,CAAC;IACF,OAAO,CACL,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CACrC;MAAA,CAAC,QAAQ,CACX;IAAA,EAAE,CAAC,CAAC,CACL,CAAC;AACJ,CAAC"}
|
|
@@ -6,6 +6,7 @@ type SelectProps = {
|
|
|
6
6
|
readonly placeholder?: string;
|
|
7
7
|
readonly helperText?: string;
|
|
8
8
|
readonly error?: string;
|
|
9
|
+
readonly isMutedWhenEmpty?: boolean;
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
12
|
* Select component for rendering a dropdown with customizable options, labels, helper text, and error messages.
|
|
@@ -29,9 +30,10 @@ type SelectProps = {
|
|
|
29
30
|
* @param {string} [props.placeholder] - Optional placeholder text to display when no option is selected.
|
|
30
31
|
* @param {string} [props.helperText] - Optional helper text to be displayed below the select dropdown.
|
|
31
32
|
* @param {string} [props.error] - Optional error message to be displayed below the select dropdown.
|
|
33
|
+
* @param {boolean} [props.isMutedWhenEmpty] - Renders the border and label in gray while no option is selected.
|
|
32
34
|
*
|
|
33
35
|
* @returns {ReactNode} The rendered Select component.
|
|
34
36
|
*/
|
|
35
|
-
export declare function Select({ label, options, select, placeholder, helperText, error, }: SelectProps): ReactNode;
|
|
37
|
+
export declare function Select({ label, options, select, placeholder, helperText, error, isMutedWhenEmpty, }: SelectProps): ReactNode;
|
|
36
38
|
export {};
|
|
37
39
|
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/01-atoms/Select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,oBAAoB,EAE1B,MAAM,OAAO,CAAC;AAMf,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CACpB,iBAAiB,CACf,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,iBAAiB,CAClB,EACD,UAAU,CACX,CAAC;IACF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../../src/components/01-atoms/Select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,oBAAoB,EAE1B,MAAM,OAAO,CAAC;AAMf,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,MAAM,CAAC,CAAC;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,IAAI,CACpB,iBAAiB,CACf,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,iBAAiB,CAClB,EACD,UAAU,CACX,CAAC;IACF,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,MAAM,EACN,WAAW,EACX,UAAU,EACV,KAAK,EACL,gBAAgB,GACjB,EAAE,WAAW,GAAG,SAAS,CAqFzB"}
|
|
@@ -27,10 +27,11 @@ import { RenderErrorOrHelperText } from '../Input/utils/RenderErrorOrHelperText'
|
|
|
27
27
|
* @param {string} [props.placeholder] - Optional placeholder text to display when no option is selected.
|
|
28
28
|
* @param {string} [props.helperText] - Optional helper text to be displayed below the select dropdown.
|
|
29
29
|
* @param {string} [props.error] - Optional error message to be displayed below the select dropdown.
|
|
30
|
+
* @param {boolean} [props.isMutedWhenEmpty] - Renders the border and label in gray while no option is selected.
|
|
30
31
|
*
|
|
31
32
|
* @returns {ReactNode} The rendered Select component.
|
|
32
33
|
*/
|
|
33
|
-
export function Select({ label, options, select, placeholder, helperText, error, }) {
|
|
34
|
+
export function Select({ label, options, select, placeholder, helperText, error, isMutedWhenEmpty, }) {
|
|
34
35
|
const generatedId = useId();
|
|
35
36
|
const id = select?.id ?? generatedId;
|
|
36
37
|
const descriptionId = error || helperText ? `${id}-description` : undefined;
|
|
@@ -39,8 +40,11 @@ export function Select({ label, options, select, placeholder, helperText, error,
|
|
|
39
40
|
const selectProps = !select || !Object.hasOwn(select, 'value')
|
|
40
41
|
? { ...select, defaultValue: '' }
|
|
41
42
|
: select;
|
|
42
|
-
const
|
|
43
|
-
const
|
|
43
|
+
const isMuted = Boolean(isMutedWhenEmpty && !selectProps.value && !selectProps.defaultValue);
|
|
44
|
+
const selectClasses = clsx('peer disabled:text-gray-3 dark:disabled:text-gray-2 h-full w-full appearance-none rounded-full border border-none bg-transparent px-5 text-sm font-normal outline-0 transition-all', isMuted ? 'text-gray-2 dark:text-gray-2' : 'text-black dark:text-white', select?.className);
|
|
45
|
+
const { labelProps, legendClasses, fieldsetClasses } = generateBorder(error, {
|
|
46
|
+
isMuted,
|
|
47
|
+
});
|
|
44
48
|
labelProps.htmlFor = id;
|
|
45
49
|
return (<div className="w-full max-w-full">
|
|
46
50
|
<div className="relative h-9">
|
|
@@ -55,7 +59,9 @@ export function Select({ label, options, select, placeholder, helperText, error,
|
|
|
55
59
|
<label {...labelProps}>{label}</label>
|
|
56
60
|
<FaSortDown aria-hidden="true" className={clsx('peer-disabled:text-gray-3 dark:peer-disabled:text-gray-2 absolute top-2 right-4', error
|
|
57
61
|
? 'text-error dark:text-error-dark'
|
|
58
|
-
:
|
|
62
|
+
: isMuted
|
|
63
|
+
? 'text-gray-2 dark:text-gray-2'
|
|
64
|
+
: 'text-black dark:text-white')}/>
|
|
59
65
|
<fieldset className={fieldsetClasses}>
|
|
60
66
|
<legend className={legendClasses}>{label}</legend>
|
|
61
67
|
</fieldset>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.jsx","sourceRoot":"","sources":["../../../../src/components/01-atoms/Select/Select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,KAAK,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"Select.jsx","sourceRoot":"","sources":["../../../../src/components/01-atoms/Select/Select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,KAAK,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAkBjF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,KAAK,EACL,OAAO,EACP,MAAM,EACN,WAAW,EACX,UAAU,EACV,KAAK,EACL,gBA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AE,CAAC,CAAC,aAAa,CAAC,CAClB,QAAQ,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAC3B,UAAU,CAAC,CAAC,UAAU,CAAC,CACvB,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,SAAS,CAAC,MAAM,EAEpB;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/01-atoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/01-atoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/01-atoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/01-atoms/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC"}
|
|
@@ -13,6 +13,7 @@ type AutocompleteInput = {
|
|
|
13
13
|
helperText?: string;
|
|
14
14
|
error?: string;
|
|
15
15
|
value?: string;
|
|
16
|
+
isMutedWhenEmpty?: boolean;
|
|
16
17
|
toggleButtonLabel?: string;
|
|
17
18
|
noOptionsText?: string;
|
|
18
19
|
};
|
|
@@ -39,11 +40,12 @@ type AutocompleteInput = {
|
|
|
39
40
|
* @param {boolean} [props.disabled] - Whether the input is disabled.
|
|
40
41
|
* @param {string} props.label - The label text for the input field.
|
|
41
42
|
* @param {string} [props.helperText] - Helper text displayed below the input.
|
|
43
|
+
* @param {boolean} [props.isMutedWhenEmpty] - Renders the border and label in gray while the field has no value.
|
|
42
44
|
* @param {string} [props.error] - Error message displayed below the input.
|
|
43
45
|
* @param {string} [props.value=''] - The controlled value of the input.
|
|
44
46
|
*
|
|
45
47
|
* @returns {ReactNode} The rendered Autocomplete component.
|
|
46
48
|
*/
|
|
47
|
-
export declare function Autocomplete({ options, onSelect, onChange, onDebouncedChange, debounceDelay, onHandleKeyDown, disabled, label, helperText, error, value, toggleButtonLabel, noOptionsText, }: Readonly<AutocompleteInput>): ReactNode;
|
|
49
|
+
export declare function Autocomplete({ options, onSelect, onChange, onDebouncedChange, debounceDelay, onHandleKeyDown, disabled, label, helperText, error, value, isMutedWhenEmpty, toggleButtonLabel, noOptionsText, }: Readonly<AutocompleteInput>): ReactNode;
|
|
48
50
|
export {};
|
|
49
51
|
//# sourceMappingURL=Autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAI5C,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,CAClB,KAAK,EAAE,MAAM,KACV,IAAI,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,GAAG,UAAU,EAAE,CAAC,CAAC;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,UAAU,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAI5C,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,iBAAiB,CAAC,EAAE,CAClB,KAAK,EAAE,MAAM,KACV,IAAI,GAAG,UAAU,EAAE,GAAG,OAAO,CAAC,IAAI,GAAG,UAAU,EAAE,CAAC,CAAC;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,cAAc,EAAE,UAAU,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,aAAmB,EACnB,eAAe,EACf,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAK,EACL,KAAK,EACL,gBAAgB,EAChB,iBAAiB,EACjB,aAAiC,GAClC,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,SAAS,CA6RzC"}
|
|
@@ -27,12 +27,13 @@ import { debounce } from '../../../utils';
|
|
|
27
27
|
* @param {boolean} [props.disabled] - Whether the input is disabled.
|
|
28
28
|
* @param {string} props.label - The label text for the input field.
|
|
29
29
|
* @param {string} [props.helperText] - Helper text displayed below the input.
|
|
30
|
+
* @param {boolean} [props.isMutedWhenEmpty] - Renders the border and label in gray while the field has no value.
|
|
30
31
|
* @param {string} [props.error] - Error message displayed below the input.
|
|
31
32
|
* @param {string} [props.value=''] - The controlled value of the input.
|
|
32
33
|
*
|
|
33
34
|
* @returns {ReactNode} The rendered Autocomplete component.
|
|
34
35
|
*/
|
|
35
|
-
export function Autocomplete({ options, onSelect, onChange, onDebouncedChange, debounceDelay = 200, onHandleKeyDown, disabled, label, helperText, error, value, toggleButtonLabel, noOptionsText = 'No hay opciones', }) {
|
|
36
|
+
export function Autocomplete({ options, onSelect, onChange, onDebouncedChange, debounceDelay = 200, onHandleKeyDown, disabled, label, helperText, error, value, isMutedWhenEmpty, toggleButtonLabel, noOptionsText = 'No hay opciones', }) {
|
|
36
37
|
const [query, setQuery] = useState(value ?? '');
|
|
37
38
|
const [filteredOptions, setFilteredOptions] = useState([]);
|
|
38
39
|
const [isOpen, setIsOpen] = useState(false);
|
|
@@ -213,7 +214,7 @@ export function Autocomplete({ options, onSelect, onChange, onDebouncedChange, d
|
|
|
213
214
|
'aria-activedescendant': isOpen && activeIndex >= 0
|
|
214
215
|
? `${listboxId}-option-${activeIndex}`
|
|
215
216
|
: undefined,
|
|
216
|
-
}} iconR={handleIcon()} helperText={helperText} error={error}/>
|
|
217
|
+
}} iconR={handleIcon()} helperText={helperText} error={error} isMutedWhenEmpty={isMutedWhenEmpty}/>
|
|
217
218
|
{!!isOpen && (<ul id={listboxId} role="listbox" className="dark:bg-black-1 absolute z-40 flex max-h-28 w-full flex-col gap-y-1 overflow-y-auto rounded-md bg-white px-3 py-2 shadow-lg dark:text-white">
|
|
218
219
|
{filteredOptions?.length > 0 ? (filteredOptions.map((option, index) => (<li key={option.value} id={`${listboxId}-option-${index}`} role="option" aria-selected={activeIndex === index} className={clsx('hover:bg-gray-5 dark:hover:bg-gray-1 cursor-pointer rounded-sm px-1 py-0.5', activeIndex === index && 'bg-gray-5 dark:bg-gray-1')} onMouseEnter={() => setActiveIndex(index)} onMouseDown={(event) => event.preventDefault()} onClick={() => handleOptionClick(option)}>
|
|
219
220
|
{option.label}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Autocomplete.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,SAAS,EACT,KAAK,EACL,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAsB1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,iBAAiB,EACjB,aAAa,GAAG,GAAG,EACnB,eAAe,EACf,QAAQ,EACR,KAAK,EACL,UAAU,EACV,KAAK,EACL,KAAK,EACL,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,GAAG,iBAAiB,GACL;IAC5B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAS,KAAK,IAAI,EAAE,CAAC,CAAC;IACxD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAe,E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ACrC,SAAS,CAAC,CAAC,IAAI,CACb,4EAA4E,EAC5E,WAAW,KAAK,KAAK,IAAI,0BAA0B,CACpD,CAAC,CACF,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAC1C,WAAW,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,cAAc,EAAE,CAAC,CAC/C,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAEzC;gBAAA,CAAC,MAAM,CAAC,KAAK,CACf;cAAA,EAAE,EAAE,CAAC,CACN,CAAC,CACH,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CACnB,CAAC,EAAE,CACD,IAAI,CAAC,QAAQ,CACb,aAAa,CAAC,MAAM,CACpB,SAAS,CAAC,gCAAgC,CAE1C;cAAA,CAAC,aAAa,CAChB;YAAA,EAAE,EAAE,CAAC,CACN,CAAC,CAAC,CAAC,IAAI,CACV;QAAA,EAAE,EAAE,CAAC,CACN,CACH;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { BellNotification } from './BellNotification';
|
|
2
2
|
export { NotificationPanel } from './NotificationPanel';
|
|
3
|
-
export type { NotificationAction, NotificationActionType, NotificationItem } from './NotificationPanel';
|
|
3
|
+
export type { NotificationAction, NotificationActionType, NotificationItem, } from './NotificationPanel';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/BellNotifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/BellNotifications/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import {
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import type { TFilterInputs, TFilterValues } from './types';
|
|
3
3
|
type TFilterProps = {
|
|
4
4
|
getValuesFilter?: (data: Record<string, TFilterValues>) => void;
|
|
5
5
|
filtersEnabledText: string;
|
|
6
6
|
removeFilterLabel?: (filterLabel: string) => string;
|
|
7
|
+
/** Hide the applied filter chips when the consumer renders them outside the panel. */
|
|
8
|
+
showAppliedFilters?: boolean;
|
|
7
9
|
resetButton: {
|
|
8
10
|
text: string;
|
|
9
11
|
callback: () => void;
|
|
@@ -12,51 +14,7 @@ type TFilterProps = {
|
|
|
12
14
|
text: string;
|
|
13
15
|
callback: (data: Record<string, TFilterValues>) => void;
|
|
14
16
|
};
|
|
15
|
-
inputs:
|
|
16
|
-
title: string;
|
|
17
|
-
config: Array<TInputRegular | TInputRadio | TInputSelect | TInputMultiSelect | TInputAutocomplete>;
|
|
18
|
-
}>;
|
|
19
|
-
};
|
|
20
|
-
type TFilterValues = string | boolean | OptionType | OptionType[];
|
|
21
|
-
type TInputBase = {
|
|
22
|
-
label: string;
|
|
23
|
-
value?: TFilterValues;
|
|
24
|
-
minDate?: string;
|
|
25
|
-
maxDate?: string;
|
|
26
|
-
onDebouncedChange?: (query: string) => void | OptionType[] | Promise<void | OptionType[]>;
|
|
27
|
-
debounceDelay?: number;
|
|
28
|
-
toggleButtonLabel?: string;
|
|
29
|
-
noOptionsText?: string;
|
|
30
|
-
};
|
|
31
|
-
type TInputRegular = TInputBase & {
|
|
32
|
-
type: DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>['type'];
|
|
33
|
-
options?: never;
|
|
34
|
-
placeholder?: never;
|
|
35
|
-
};
|
|
36
|
-
type TInputRadio = TInputBase & {
|
|
37
|
-
type: 'radio';
|
|
38
|
-
options: Record<string, string>;
|
|
39
|
-
placeholder?: never;
|
|
40
|
-
};
|
|
41
|
-
type TInputSelect = TInputBase & {
|
|
42
|
-
type: 'select';
|
|
43
|
-
options: Record<string, string>;
|
|
44
|
-
placeholder?: string;
|
|
45
|
-
};
|
|
46
|
-
type TInputMultiSelect = TInputBase & {
|
|
47
|
-
type: 'multiselect';
|
|
48
|
-
options: OptionType[];
|
|
49
|
-
placeholder?: never;
|
|
50
|
-
};
|
|
51
|
-
type TInputAutocomplete = TInputBase & {
|
|
52
|
-
type: 'autocomplete';
|
|
53
|
-
options: OptionType[];
|
|
54
|
-
onSelect?: (selectedOption: OptionType | undefined, helpers: {
|
|
55
|
-
filterKey: string;
|
|
56
|
-
setFilter: (name: string, value: TFilterValues) => void;
|
|
57
|
-
filters: Record<string, TFilterValues>;
|
|
58
|
-
}) => void;
|
|
59
|
-
placeholder?: never;
|
|
17
|
+
inputs: TFilterInputs;
|
|
60
18
|
};
|
|
61
19
|
/**
|
|
62
20
|
* Filter component for managing a set of filters with various input types.
|
|
@@ -90,14 +48,19 @@ type TInputAutocomplete = TInputBase & {
|
|
|
90
48
|
* @param {string} props.submitButton.text - Text displayed on the submit button.
|
|
91
49
|
* @param {Function} props.submitButton.callback - Callback function triggered on submit.
|
|
92
50
|
* @param {Object} props.inputs - Configuration object for the filter inputs.
|
|
93
|
-
* @param {
|
|
51
|
+
* @param {string} [props.inputs.title] - Optional label rendered above the group controls.
|
|
52
|
+
* @param {string} [props.inputs.section] - Optional heading shared by consecutive groups.
|
|
53
|
+
* @param {1|2} [props.inputs.columns] - Number of columns used to lay out the group controls.
|
|
94
54
|
* @param {Array<Object>} props.inputs.config - Configuration for each input field.
|
|
95
55
|
* @param {string} [props.inputs.config.label] - Label for the input field.
|
|
96
|
-
* @param {string} [props.inputs.config.type] - The type of input field (text, select, radio, multiselect).
|
|
56
|
+
* @param {string} [props.inputs.config.type] - The type of input field (text, select, radio, multiselect, switch).
|
|
97
57
|
* @param {Object|Array} [props.inputs.config.options] - Options for select, radio, or multiselect fields.
|
|
98
58
|
* @param {string} [props.inputs.config.placeholder] - Placeholder text for the input field.
|
|
59
|
+
* @param {string} [props.inputs.config.helperText] - Helper text rendered below the input field.
|
|
60
|
+
* @param {string} [props.inputs.config.chipLabel] - Overrides the text of the applied filter chip.
|
|
61
|
+
* @param {boolean} [props.showAppliedFilters] - Renders the applied filter chips inside the panel. Defaults to true.
|
|
99
62
|
* @returns {ReactNode} The rendered Filter component.
|
|
100
63
|
*/
|
|
101
|
-
export declare function Filter({ filtersEnabledText, submitButton, resetButton, inputs, getValuesFilter, removeFilterLabel, }: TFilterProps): ReactNode;
|
|
64
|
+
export declare function Filter({ filtersEnabledText, submitButton, resetButton, inputs, getValuesFilter, removeFilterLabel, showAppliedFilters, }: TFilterProps): ReactNode;
|
|
102
65
|
export {};
|
|
103
66
|
//# sourceMappingURL=Filter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/Filter/Filter.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Filter.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/Filter/Filter.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAkB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAe5E,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5D,KAAK,YAAY,GAAG;IAClB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,IAAI,CAAC;IAChE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,MAAM,CAAC;IACpD,sFAAsF;IACtF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,WAAW,EAAE;QACX,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,IAAI,CAAC;KACtB,CAAC;IACF,YAAY,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,IAAI,CAAC;KACzD,CAAC;IACF,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAgB,MAAM,CAAC,EACrB,kBAAkB,EAClB,YAAY,EACZ,WAAW,EACX,MAAM,EACN,eAAe,EACf,iBAAiB,EACjB,kBAAyB,GAC1B,EAAE,YAAY,GAAG,SAAS,CAoY1B"}
|