@apify/ui-library 1.140.1 → 1.141.0
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/src/components/floating/menu.d.ts +7 -3
- package/dist/src/components/floating/menu.d.ts.map +1 -1
- package/dist/src/components/floating/menu.js +24 -17
- package/dist/src/components/floating/menu.js.map +1 -1
- package/dist/src/components/floating/menu_components.d.ts +16 -4
- package/dist/src/components/floating/menu_components.d.ts.map +1 -1
- package/dist/src/components/floating/menu_components.js +19 -1
- package/dist/src/components/floating/menu_components.js.map +1 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/index.js +1 -0
- package/dist/src/components/index.js.map +1 -1
- package/dist/src/components/radio_button/index.d.ts +2 -0
- package/dist/src/components/radio_button/index.d.ts.map +1 -0
- package/dist/src/components/radio_button/index.js +2 -0
- package/dist/src/components/radio_button/index.js.map +1 -0
- package/dist/src/components/radio_button/radio_button.d.ts +13 -0
- package/dist/src/components/radio_button/radio_button.d.ts.map +1 -0
- package/dist/src/components/radio_button/radio_button.js +15 -0
- package/dist/src/components/radio_button/radio_button.js.map +1 -0
- package/dist/src/components/radio_button/radio_button.style.d.ts +2 -0
- package/dist/src/components/radio_button/radio_button.style.d.ts.map +1 -0
- package/dist/src/components/radio_button/radio_button.style.js +47 -0
- package/dist/src/components/radio_button/radio_button.style.js.map +1 -0
- package/dist/src/components/table/index.d.ts +2 -2
- package/dist/src/components/table/index.d.ts.map +1 -1
- package/dist/src/components/table/index.js +1 -1
- package/dist/src/components/table/table.js +1 -1
- package/dist/src/components/table/{table_test_ids.d.ts → table.test_ids.d.ts} +1 -1
- package/dist/src/components/table/table.test_ids.d.ts.map +1 -0
- package/dist/src/components/table/table.test_ids.js +16 -0
- package/dist/src/components/table/table.test_ids.js.map +1 -0
- package/dist/src/components/table/{types.d.ts → table.types.d.ts} +1 -1
- package/dist/src/components/table/table.types.d.ts.map +1 -0
- package/dist/src/components/table/table.types.js +2 -0
- package/dist/src/components/table/table.types.js.map +1 -0
- package/dist/src/components/table/table_body.js +1 -1
- package/dist/src/components/table/table_cell.js +1 -1
- package/dist/src/components/table/table_empty_row.js +1 -1
- package/dist/src/components/table/table_error_row.js +1 -1
- package/dist/src/components/table/table_expansion_row.d.ts +1 -1
- package/dist/src/components/table/table_expansion_row.d.ts.map +1 -1
- package/dist/src/components/table/table_expansion_row.js +1 -1
- package/dist/src/components/table/table_foot.js +1 -1
- package/dist/src/components/table/table_head.js +1 -1
- package/dist/src/components/table/table_head_cell.js +1 -1
- package/dist/src/components/table/table_head_row.js +1 -1
- package/dist/src/components/table/table_loading_row.js +1 -1
- package/dist/src/components/table/table_row.d.ts +1 -1
- package/dist/src/components/table/table_row.d.ts.map +1 -1
- package/dist/src/components/table/table_row.js +1 -1
- package/dist/src/components/table/table_wrapper.d.ts +1 -1
- package/dist/src/components/table/table_wrapper.d.ts.map +1 -1
- package/dist/src/components/table/table_wrapper.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/src/components/floating/menu.tsx +48 -34
- package/src/components/floating/menu_components.tsx +51 -1
- package/src/components/index.ts +1 -0
- package/src/components/radio_button/index.ts +1 -0
- package/src/components/radio_button/radio_button.stories.tsx +57 -0
- package/src/components/radio_button/radio_button.style.ts +48 -0
- package/src/components/radio_button/radio_button.tsx +43 -0
- package/src/components/table/index.ts +2 -2
- package/src/components/table/table.stories.tsx +15 -12
- package/src/components/table/table.test_ids.ts +15 -0
- package/src/components/table/table.tsx +1 -1
- package/src/components/table/table_body.tsx +1 -1
- package/src/components/table/table_cell.tsx +1 -1
- package/src/components/table/table_empty_row.tsx +1 -1
- package/src/components/table/table_error_row.tsx +1 -1
- package/src/components/table/table_expansion_row.tsx +2 -2
- package/src/components/table/table_foot.tsx +1 -1
- package/src/components/table/table_head.tsx +1 -1
- package/src/components/table/table_head_cell.tsx +1 -1
- package/src/components/table/table_head_row.tsx +1 -1
- package/src/components/table/table_loading_row.tsx +1 -1
- package/src/components/table/table_row.tsx +2 -2
- package/src/components/table/table_wrapper.tsx +2 -2
- package/dist/src/components/table/table_test_ids.d.ts.map +0 -1
- package/dist/src/components/table/table_test_ids.js +0 -16
- package/dist/src/components/table/table_test_ids.js.map +0 -1
- package/dist/src/components/table/types.d.ts.map +0 -1
- package/dist/src/components/table/types.js +0 -2
- package/dist/src/components/table/types.js.map +0 -1
- package/src/components/table/table_test_ids.ts +0 -15
- /package/src/components/table/{types.ts → table.types.ts} +0 -0
|
@@ -15,12 +15,16 @@ export interface MenuOption {
|
|
|
15
15
|
export interface MenuProps<T = MenuOption> {
|
|
16
16
|
ariaLabel?: string;
|
|
17
17
|
options: T[];
|
|
18
|
-
value?: string;
|
|
18
|
+
value?: string | string[];
|
|
19
19
|
onSelect: (newValue: string, selectedBy: SelectActionType) => void;
|
|
20
20
|
onMenuOpen?: (isOpen: boolean) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Overrides default label, which is selected value || defaultLabel
|
|
23
|
+
*/
|
|
24
|
+
label?: string;
|
|
21
25
|
defaultLabel?: React.ReactNode;
|
|
22
26
|
closeOnSelect?: boolean;
|
|
23
|
-
renderOption?: (option: T) => React.ReactNode;
|
|
27
|
+
renderOption?: (option: T, isSelected: boolean) => React.ReactNode;
|
|
24
28
|
placement?: Placement;
|
|
25
29
|
components?: {
|
|
26
30
|
MenuBase?: React.ElementType;
|
|
@@ -32,6 +36,6 @@ export interface MenuProps<T = MenuOption> {
|
|
|
32
36
|
* This example is a Select taken from https://floating-ui.com/docs/react-examples
|
|
33
37
|
* It tries to mimic API of react-select as closely as possible
|
|
34
38
|
*/
|
|
35
|
-
export declare const Menu: <T extends MenuOption>({ ariaLabel, options, value, onSelect, onMenuOpen, closeOnSelect, defaultLabel, components, renderOption, className, placement, ...rest }: MenuProps<T> & BoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare const Menu: <T extends MenuOption>({ ariaLabel, options, value, onSelect, onMenuOpen, closeOnSelect, label, defaultLabel, components, renderOption, className, placement, ...rest }: MenuProps<T> & BoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
40
|
export {};
|
|
37
41
|
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/floating/menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,SAAS,EAOjB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAK/C,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF,KAAK,gBAAgB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAI7D,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,UAAU;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../../../src/components/floating/menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGH,KAAK,SAAS,EAOjB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAK/C,eAAO,MAAM,cAAc;;;;;CAK1B,CAAC;AAEF,KAAK,gBAAgB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAI7D,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,UAAU;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACnE,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;IACnE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE;QACT,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;QAC7B,IAAI,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;QACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;KAChC,CAAC;CACL;AAID;;;GAGG;AACH,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,UAAU,EAAE,kJAcxC,SAAS,CAAC,CAAC,CAAC,GAAG,QAAQ,4CAqIzB,CAAC"}
|
|
@@ -12,12 +12,12 @@ export const menuClassNames = {
|
|
|
12
12
|
LIST: 'menu-list',
|
|
13
13
|
ITEM: 'menu-item',
|
|
14
14
|
};
|
|
15
|
-
const defaultRenderOption = ({ label }) => _jsx(Text, { as: "span", children: label });
|
|
15
|
+
const defaultRenderOption = ({ label }, _isSelected) => _jsx(Text, { as: "span", children: label });
|
|
16
16
|
/**
|
|
17
17
|
* This example is a Select taken from https://floating-ui.com/docs/react-examples
|
|
18
18
|
* It tries to mimic API of react-select as closely as possible
|
|
19
19
|
*/
|
|
20
|
-
export const Menu = ({ ariaLabel, options, value, onSelect, onMenuOpen, closeOnSelect = true, defaultLabel, components, renderOption, className, placement, ...rest }) => {
|
|
20
|
+
export const Menu = ({ ariaLabel, options, value, onSelect, onMenuOpen, closeOnSelect = true, label, defaultLabel, components, renderOption, className, placement, ...rest }) => {
|
|
21
21
|
const [isOpen, setIsOpenState] = useState(false);
|
|
22
22
|
const setIsOpen = useCallback((newIsOpen) => {
|
|
23
23
|
setIsOpenState(newIsOpen);
|
|
@@ -31,9 +31,13 @@ export const Menu = ({ ariaLabel, options, value, onSelect, onMenuOpen, closeOnS
|
|
|
31
31
|
placement,
|
|
32
32
|
});
|
|
33
33
|
const selectedIndex = useMemo(() => {
|
|
34
|
+
if (Array.isArray(value))
|
|
35
|
+
return null;
|
|
34
36
|
const foundIndex = options.findIndex((option) => option.value === value);
|
|
35
37
|
return foundIndex < 0 ? null : foundIndex;
|
|
36
38
|
}, [options, value]);
|
|
39
|
+
const selectedValuesSet = useMemo(() => new Set(Array.isArray(value) ? value : []), [value]);
|
|
40
|
+
const isItemSelected = (index) => Array.isArray(value) ? selectedValuesSet.has(options[index].value) : index === selectedIndex;
|
|
37
41
|
const [activeIndex, setActiveIndex] = useState(null);
|
|
38
42
|
const handleSelect = (newIndex, selectedBy) => {
|
|
39
43
|
onSelect(options[newIndex].value, selectedBy);
|
|
@@ -73,20 +77,23 @@ export const Menu = ({ ariaLabel, options, value, onSelect, onMenuOpen, closeOnS
|
|
|
73
77
|
const MenuComponent = components?.Menu || ListMenuComponent;
|
|
74
78
|
const MenuItemComponent = components?.MenuItem || ListMenuItemComponent;
|
|
75
79
|
const effectiveRenderOption = renderOption || defaultRenderOption;
|
|
76
|
-
return (_jsxs(Box, { className: clsx(className, menuClassNames.WRAPPER), ...rest, children: [_jsx(MenuBaseComponent, { "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : 'select-label', "aria-autocomplete": "none", ref: refs.setReference, ...getReferenceProps(), className: menuClassNames.BASE, tabindex: "0", children: selectedIndex !== null ? options[selectedIndex].label : defaultLabel }), isOpen && (_jsx(FloatingPortal, { children: _jsx(FloatingFocusManager, { context: context, modal: false, children: _jsx(MenuComponent, { ref: refs.setFloating, style: floatingStyles, ...getFloatingProps(), className: menuClassNames.LIST, children: options.map((option, i) =>
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
80
|
+
return (_jsxs(Box, { className: clsx(className, menuClassNames.WRAPPER), ...rest, children: [_jsx(MenuBaseComponent, { "aria-label": ariaLabel, "aria-labelledby": ariaLabel ? undefined : 'select-label', "aria-autocomplete": "none", ref: refs.setReference, ...getReferenceProps(), className: menuClassNames.BASE, tabindex: "0", children: label ?? (selectedIndex !== null ? options[selectedIndex].label : defaultLabel) }), isOpen && (_jsx(FloatingPortal, { children: _jsx(FloatingFocusManager, { context: context, modal: false, children: _jsx(MenuComponent, { ref: refs.setFloating, style: floatingStyles, ...getFloatingProps(), className: menuClassNames.LIST, children: options.map((option, i) => {
|
|
81
|
+
const isSelected = isItemSelected(i);
|
|
82
|
+
return (_jsx(MenuItemComponent, { "$isSelected": isSelected, "$isActive": i === activeIndex, ref: (node) => {
|
|
83
|
+
listRef.current[i] = node;
|
|
84
|
+
}, role: "option", tabIndex: i === activeIndex ? 0 : -1, className: menuClassNames.ITEM, "aria-selected": isSelected && i === activeIndex, ...getItemProps({
|
|
85
|
+
onClick: () => handleSelect(i, 'click'), // Handles mouse click
|
|
86
|
+
onKeyDown: (event) => {
|
|
87
|
+
if (event.key === 'Enter') {
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
handleSelect(i, 'enter'); // Handles enter press
|
|
90
|
+
}
|
|
91
|
+
if (event.key === ' ' && !isTypingRef.current) {
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
handleSelect(i, 'space');
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
}), children: effectiveRenderOption(option, isSelected) }, option.value));
|
|
97
|
+
}) }) }) }))] }));
|
|
91
98
|
};
|
|
92
99
|
//# sourceMappingURL=menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../../src/components/floating/menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,oBAAoB,EACpB,cAAc,EAEd,QAAQ,EACR,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,OAAO,EACP,YAAY,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,GAAG,EAAiB,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE3G,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,WAAW;CACpB,CAAC;
|
|
1
|
+
{"version":3,"file":"menu.js","sourceRoot":"","sources":["../../../../src/components/floating/menu.tsx"],"names":[],"mappings":";AAAA,OAAO,EACH,oBAAoB,EACpB,cAAc,EAEd,QAAQ,EACR,UAAU,EACV,eAAe,EACf,iBAAiB,EACjB,OAAO,EACP,YAAY,GACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MA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C,YAAY,CAAC;oCACb,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,sBAAsB;oCAC/D,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE;wCACjB,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,EAAE,CAAC;4CACxB,KAAK,CAAC,cAAc,EAAE,CAAC;4CACvB,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,sBAAsB;wCACpD,CAAC;wCAED,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;4CAC5C,KAAK,CAAC,cAAc,EAAE,CAAC;4CACvB,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;wCAC7B,CAAC;oCACL,CAAC;iCACJ,CAAC,YAED,qBAAqB,CAAC,MAAM,EAAE,UAAU,CAAC,IAzBrC,MAAM,CAAC,KAAK,CA0BD,CACvB,CAAC;wBACN,CAAC,CAAC,GACU,GACG,GACV,CACpB,IACC,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type ReferenceType, type UseFloatingReturn } from '@floating-ui/react';
|
|
2
|
+
import type React from 'react';
|
|
2
3
|
import type { BoxProps } from '../box.js';
|
|
3
4
|
export type FloatingContext = Pick<UseFloatingReturn<ReferenceType>, 'context'>['context'];
|
|
4
5
|
/**
|
|
5
6
|
* Menu wrapper component
|
|
6
7
|
*/
|
|
7
|
-
export declare const ListMenuComponent: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<import("styled-components/dist/types.js").Substitute<import("styled-components/dist/types.js").Substitute<(BoxProps &
|
|
8
|
+
export declare const ListMenuComponent: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<import("styled-components/dist/types.js").Substitute<import("styled-components/dist/types.js").Substitute<(BoxProps & React.RefAttributes<HTMLElement>) & import("styled-components/dist/types.js").BaseObject, BoxProps & React.RefAttributes<HTMLElement>>, import("styled-components/dist/types.js").BaseObject>, import("styled-components/dist/types.js").BaseObject>> & string & Omit<React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLElement>>, keyof React.Component<any, {}, any>>;
|
|
8
9
|
interface SelectableListMenuItemProps {
|
|
9
10
|
$isActive?: boolean;
|
|
10
11
|
$isSelected?: boolean;
|
|
@@ -12,17 +13,28 @@ interface SelectableListMenuItemProps {
|
|
|
12
13
|
/**
|
|
13
14
|
* Menu item component
|
|
14
15
|
*/
|
|
15
|
-
export declare const ListMenuItemComponent: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<import("styled-components/dist/types.js").Substitute<import("styled-components/dist/types.js").Substitute<(BoxProps &
|
|
16
|
+
export declare const ListMenuItemComponent: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<import("styled-components/dist/types.js").Substitute<import("styled-components/dist/types.js").Substitute<(BoxProps & React.RefAttributes<HTMLElement>) & import("styled-components/dist/types.js").BaseObject, BoxProps & React.RefAttributes<HTMLElement>>, import("styled-components/dist/types.js").BaseObject>, SelectableListMenuItemProps>> & string & Omit<React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLElement>>, keyof React.Component<any, {}, any>>;
|
|
16
17
|
/**
|
|
17
18
|
* Menu base component WITHOUT dropdown icon
|
|
18
19
|
*/
|
|
19
|
-
export declare const PlainMenuBaseComponent: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<(BoxProps &
|
|
20
|
+
export declare const PlainMenuBaseComponent: import("styled-components/dist/types.js").IStyledComponentBase<"web", import("styled-components/dist/types.js").Substitute<(BoxProps & React.RefAttributes<HTMLElement>) & import("styled-components/dist/types.js").BaseObject, import("styled-components/dist/types.js").BaseObject>> & string & Omit<React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLElement>>, keyof React.Component<any, {}, any>>;
|
|
20
21
|
type DropdownMenuBaseComponentProps = {
|
|
21
22
|
children: React.ReactNode;
|
|
22
23
|
} & BoxProps;
|
|
23
24
|
/**
|
|
24
25
|
* Menu base component WITH dropdown icon
|
|
25
26
|
*/
|
|
26
|
-
export declare const DropdownMenuBaseComponent:
|
|
27
|
+
export declare const DropdownMenuBaseComponent: React.ForwardRefExoticComponent<DropdownMenuBaseComponentProps & React.RefAttributes<HTMLElement>>;
|
|
28
|
+
type DropdownMenuBaseComponentWithCountProps = {
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
onClear?: () => void;
|
|
31
|
+
selectedCount?: number;
|
|
32
|
+
} & BoxProps;
|
|
33
|
+
/**
|
|
34
|
+
* Menu base component WITH dropdown icon and a selected-count badge.
|
|
35
|
+
* Use this variant when the menu supports multi-select and you want to
|
|
36
|
+
* display how many items are selected.
|
|
37
|
+
*/
|
|
38
|
+
export declare const DropdownMenuBaseComponentWithCount: React.ForwardRefExoticComponent<DropdownMenuBaseComponentWithCountProps & React.RefAttributes<HTMLElement>>;
|
|
27
39
|
export {};
|
|
28
40
|
//# sourceMappingURL=menu_components.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu_components.d.ts","sourceRoot":"","sources":["../../../../src/components/floating/menu_components.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"menu_components.d.ts","sourceRoot":"","sources":["../../../../src/components/floating/menu_components.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAChF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG1C,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,iBAAiB,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC;AAE3F;;GAEG;AACH,eAAO,MAAM,iBAAiB,2mBAe7B,CAAC;AAEF,UAAU,2BAA2B;IACjC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,klBAoBjC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4ZAelC,CAAC;AAEF,KAAK,8BAA8B,GAAG;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B,GAAG,QAAQ,CAAC;AAEb;;GAEG;AACH,eAAO,MAAM,yBAAyB,oGASrC,CAAC;AAQF,KAAK,uCAAuC,GAAG;IAC3C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,GAAG,QAAQ,CAAC;AAEb;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,6GA6B9C,CAAC"}
|
|
@@ -2,8 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import {} from '@floating-ui/react';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
4
|
import styled, { css } from 'styled-components';
|
|
5
|
-
import { ChevronDownIcon } from '@apify/ui-icons';
|
|
5
|
+
import { ChevronDownIcon, CrossIcon } from '@apify/ui-icons';
|
|
6
6
|
import { theme } from '../../design_system/theme.js';
|
|
7
|
+
import { Badge } from '../badge.js';
|
|
7
8
|
import { Box } from '../box.js';
|
|
8
9
|
/**
|
|
9
10
|
* Menu wrapper component
|
|
@@ -71,4 +72,21 @@ export const PlainMenuBaseComponent = styled(Box) `
|
|
|
71
72
|
export const DropdownMenuBaseComponent = forwardRef(({ children, ...props }, ref) => {
|
|
72
73
|
return (_jsxs(PlainMenuBaseComponent, { ...props, ref: ref, children: [children, _jsx(ChevronDownIcon, { size: "16", color: theme.color.neutral.icon })] }));
|
|
73
74
|
});
|
|
75
|
+
const VerticalDivider = styled.div `
|
|
76
|
+
width: 1px;
|
|
77
|
+
align-self: stretch;
|
|
78
|
+
background: ${theme.color.neutral.separatorSubtle};
|
|
79
|
+
`;
|
|
80
|
+
/**
|
|
81
|
+
* Menu base component WITH dropdown icon and a selected-count badge.
|
|
82
|
+
* Use this variant when the menu supports multi-select and you want to
|
|
83
|
+
* display how many items are selected.
|
|
84
|
+
*/
|
|
85
|
+
export const DropdownMenuBaseComponentWithCount = forwardRef(({ children, onClear, selectedCount, ...props }, ref) => {
|
|
86
|
+
const showCount = onClear && selectedCount !== undefined;
|
|
87
|
+
return (_jsxs(PlainMenuBaseComponent, { ...props, ref: ref, children: [children, showCount && (_jsx(Badge, { variant: "primary_black", size: "extra_small", children: selectedCount })), showCount && _jsx(VerticalDivider, {}), onClear ? (_jsx(CrossIcon, { size: "16", color: theme.color.neutral.icon, onMouseDown: (e) => e.stopPropagation(), onClick: (e) => {
|
|
88
|
+
e.stopPropagation();
|
|
89
|
+
onClear();
|
|
90
|
+
} })) : (_jsx(ChevronDownIcon, { size: "16", color: theme.color.neutral.icon }))] }));
|
|
91
|
+
});
|
|
74
92
|
//# sourceMappingURL=menu_components.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu_components.js","sourceRoot":"","sources":["../../../../src/components/floating/menu_components.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA8C,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"menu_components.js","sourceRoot":"","sources":["../../../../src/components/floating/menu_components.tsx"],"names":[],"mappings":";AAAA,OAAO,EAA8C,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE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AAI,EACT,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAC/B,WAAW,EAAE,CAAC,CAAmB,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACzD,OAAO,EAAE,CAAC,CAAmB,EAAE,EAAE;oBAC7B,CAAC,CAAC,eAAe,EAAE,CAAC;oBACpB,OAAO,EAAE,CAAC;gBACd,CAAC,GACH,CACL,CAAC,CAAC,CAAC,CACA,KAAC,eAAe,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,GAAI,CACjE,IACoB,CAC5B,CAAC;AACN,CAAC,CACJ,CAAC"}
|
|
@@ -27,6 +27,7 @@ export * from './icon_button.js';
|
|
|
27
27
|
export * from './spinner.js';
|
|
28
28
|
export * from './store/index.js';
|
|
29
29
|
export * from './checkbox/index.js';
|
|
30
|
+
export * from './radio_button/index.js';
|
|
30
31
|
export * from './browser_window/index.js';
|
|
31
32
|
export * from './collapsible_card/index.js';
|
|
32
33
|
export * from './select/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cA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Ac,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
|
|
@@ -27,6 +27,7 @@ export * from './icon_button.js';
|
|
|
27
27
|
export * from './spinner.js';
|
|
28
28
|
export * from './store/index.js';
|
|
29
29
|
export * from './checkbox/index.js';
|
|
30
|
+
export * from './radio_button/index.js';
|
|
30
31
|
export * from './browser_window/index.js';
|
|
31
32
|
export * from './collapsible_card/index.js';
|
|
32
33
|
export * from './select/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC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C;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio_button/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/radio_button/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
2
|
+
import { type ComponentPropsWithoutRef, type FC } from 'react';
|
|
3
|
+
type RadioButtonBaseProps = Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, 'value'> & {
|
|
4
|
+
setValue: () => void;
|
|
5
|
+
error?: string;
|
|
6
|
+
readOnly?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export type RadioButtonPrimitiveProps = RadioButtonBaseProps & {
|
|
9
|
+
value: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const RadioButtonPrimitive: FC<RadioButtonPrimitiveProps>;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=radio_button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio_button.d.ts","sourceRoot":"","sources":["../../../../src/components/radio_button/radio_button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAe/D,KAAK,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,GAAG;IACnG,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,GAAG;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAElF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAiB9D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import {} from 'react';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
import { radioButtonStyle } from './radio_button.style.js';
|
|
7
|
+
const RADIO_VALUE = 'checked';
|
|
8
|
+
const StyledRoot = styled(RadioGroupPrimitive.Root) `
|
|
9
|
+
display: contents;
|
|
10
|
+
`;
|
|
11
|
+
const StyledRadioItem = styled(RadioGroupPrimitive.Item) `
|
|
12
|
+
${radioButtonStyle}
|
|
13
|
+
`;
|
|
14
|
+
export const RadioButtonPrimitive = ({ value, setValue, error, disabled, readOnly, className, ...rest }) => (_jsx(StyledRoot, { value: value ? RADIO_VALUE : '', onValueChange: () => setValue(), children: _jsx(StyledRadioItem, { value: RADIO_VALUE, disabled: disabled || readOnly, className: clsx(className, error && 'error', (disabled || readOnly) && 'disabled'), ...rest }) }));
|
|
15
|
+
//# sourceMappingURL=radio_button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio_button.js","sourceRoot":"","sources":["../../../../src/components/radio_button/radio_button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAA0C,MAAM,OAAO,CAAC;AAC/D,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,WAAW,GAAG,SAAS,CAAC;AAE9B,MAAM,UAAU,GAAG,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAA;;CAElD,CAAC;AAEF,MAAM,eAAe,GAAG,MAAM,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAA;MAClD,gBAAgB;CACrB,CAAC;AAUF,MAAM,CAAC,MAAM,oBAAoB,GAAkC,CAAC,EAChE,KAAK,EACL,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,GAAG,IAAI,EACV,EAAE,EAAE,CAAC,CACF,KAAC,UAAU,IAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC,QAAQ,EAAE,YACxE,KAAC,eAAe,IACZ,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,QAAQ,IAAI,QAAQ,EAC9B,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,IAAI,OAAO,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,IAAI,UAAU,CAAC,KAC9E,IAAI,GACV,GACO,CAChB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio_button.style.d.ts","sourceRoot":"","sources":["../../../../src/components/radio_button/radio_button.style.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,6CA2C5B,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { css } from 'styled-components';
|
|
2
|
+
import { theme } from '../../design_system/theme.js';
|
|
3
|
+
export const radioButtonStyle = css `
|
|
4
|
+
all: unset;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
border: 1px solid ${theme.color.neutral.border};
|
|
7
|
+
border-radius: 50%;
|
|
8
|
+
background-color: ${theme.color.neutral.background};
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
width: 16px;
|
|
13
|
+
height: 16px;
|
|
14
|
+
position: relative;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
|
|
17
|
+
&:hover,
|
|
18
|
+
&:focus {
|
|
19
|
+
border-color: ${theme.color.primary.action};
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.disabled {
|
|
24
|
+
background-color: ${theme.color.neutral.textDisabled};
|
|
25
|
+
border-color: ${theme.color.neutral.border};
|
|
26
|
+
cursor: not-allowed;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&.error {
|
|
30
|
+
border-color: ${theme.color.danger.action};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&[data-state='checked'] {
|
|
34
|
+
border-color: ${theme.color.primary.action};
|
|
35
|
+
border-width: 4px;
|
|
36
|
+
|
|
37
|
+
&.error {
|
|
38
|
+
border-color: ${theme.color.danger.action};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.disabled {
|
|
42
|
+
border-color: ${theme.color.neutral.border};
|
|
43
|
+
background-color: ${theme.color.neutral.textDisabled};
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
//# sourceMappingURL=radio_button.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio_button.style.js","sourceRoot":"","sources":["../../../../src/components/radio_button/radio_button.style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAErD,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;wBAGX,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;;wBAE1B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU;;;;;;;;;;;wBAW9B,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;;;;;4BAKtB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY;wBACpC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;;;;;wBAK1B,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM;;;;wBAIzB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;;;;4BAItB,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM;;;;4BAIzB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM;gCACtB,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY;;;CAG/D,CAAC"}
|
|
@@ -12,6 +12,6 @@ export { TableEmptyRow } from './table_empty_row.js';
|
|
|
12
12
|
export { TableLoadingRow } from './table_loading_row.js';
|
|
13
13
|
export { TableErrorRow } from './table_error_row.js';
|
|
14
14
|
export { tableClassNames } from './table.styled.js';
|
|
15
|
-
export { tableTestIds } from './
|
|
16
|
-
export type { HorizontallyScrollableTableWrapperProps, TableExpansion, TableRowProps } from './types.js';
|
|
15
|
+
export { tableTestIds } from './table.test_ids.js';
|
|
16
|
+
export type { HorizontallyScrollableTableWrapperProps, TableExpansion, TableRowProps } from './table.types.js';
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,E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C;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,uCAAuC,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -12,5 +12,5 @@ export { TableEmptyRow } from './table_empty_row.js';
|
|
|
12
12
|
export { TableLoadingRow } from './table_loading_row.js';
|
|
13
13
|
export { TableErrorRow } from './table_error_row.js';
|
|
14
14
|
export { tableClassNames } from './table.styled.js';
|
|
15
|
-
export { tableTestIds } from './
|
|
15
|
+
export { tableTestIds } from './table.test_ids.js';
|
|
16
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { StyledTable, tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const Table = ({ className, ...rest }) => (_jsx(StyledTable, { "data-test": tableTestIds.TABLE, className: clsx(tableClassNames.TABLE, className), ...rest }));
|
|
6
6
|
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.test_ids.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table.test_ids.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;CAcxB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const tableTestIds = {
|
|
2
|
+
TABLE: 'table',
|
|
3
|
+
HEAD: 'table-head',
|
|
4
|
+
HEAD_ROW: 'table-head-row',
|
|
5
|
+
HEAD_CELL: 'table-head-cell',
|
|
6
|
+
BODY: 'table-body',
|
|
7
|
+
ROW: 'table-row',
|
|
8
|
+
CELL: 'table-cell',
|
|
9
|
+
FOOT: 'table-foot',
|
|
10
|
+
WRAPPER: 'table-wrapper',
|
|
11
|
+
EMPTY_ROW: 'table-empty-row',
|
|
12
|
+
LOADING_ROW: 'table-loading-row',
|
|
13
|
+
ERROR_ROW: 'table-error-row',
|
|
14
|
+
EXPANSION_ROW: 'table-expansion-row',
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=table.test_ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.test_ids.js","sourceRoot":"","sources":["../../../../src/components/table/table.test_ids.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,gBAAgB;IAC1B,SAAS,EAAE,iBAAiB;IAC5B,IAAI,EAAE,YAAY;IAClB,GAAG,EAAE,WAAW;IAChB,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,eAAe;IACxB,SAAS,EAAE,iBAAiB;IAC5B,WAAW,EAAE,mBAAmB;IAChC,SAAS,EAAE,iBAAiB;IAC5B,aAAa,EAAE,qBAAqB;CACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.types.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,mBAAmB,CAAC,GAAG;IAC9D,6EAA6E;IAC7E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mGAAmG;IACnG,EAAE,CAAC,EAAE,EAAE,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,uCAAuC,GAAG;IAClD,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;CACvC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.types.js","sourceRoot":"","sources":["../../../../src/components/table/table.types.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const TableBody = ({ className, ...rest }) => (_jsx("tbody", { "data-test": tableTestIds.BODY, className: clsx(tableClassNames.BODY, className), ...rest }));
|
|
6
6
|
//# sourceMappingURL=table_body.js.map
|
|
@@ -4,7 +4,7 @@ import { useContext } from 'react';
|
|
|
4
4
|
import { Link } from '../link.js';
|
|
5
5
|
import { TableRowLinkContext } from './table.context.js';
|
|
6
6
|
import { tableClassNames } from './table.styled.js';
|
|
7
|
-
import { tableTestIds } from './
|
|
7
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
8
8
|
export const TableCell = ({ className, children, ...rest }) => {
|
|
9
9
|
const rowLink = useContext(TableRowLinkContext);
|
|
10
10
|
return (_jsxs("td", { "data-test": tableTestIds.CELL, className: clsx(tableClassNames.BODY_CELL, className), ...rest, children: [rowLink && _jsx(Link, { className: tableClassNames.CELL_OVERLAY_LINK, to: rowLink, tabIndex: -1, ariaHidden: true }), children] }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { tableClassNames } from './table.styled.js';
|
|
3
|
-
import { tableTestIds } from './
|
|
3
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
4
4
|
export const TableEmptyRow = ({ colSpan, children }) => (_jsx("tr", { "data-test": tableTestIds.EMPTY_ROW, className: tableClassNames.ROW_EMPTY, children: _jsx("td", { colSpan: colSpan, className: tableClassNames.ROW_EMPTY_CELL, children: children }) }));
|
|
5
5
|
//# sourceMappingURL=table_empty_row.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from '../text/index.js';
|
|
3
3
|
import { tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const TableErrorRow = ({ colSpan, children, error, }) => (_jsx("tr", { "data-test": tableTestIds.ERROR_ROW, className: tableClassNames.ROW_EMPTY, children: _jsx("td", { colSpan: colSpan, className: tableClassNames.ROW_EMPTY_CELL, children: children ?? _jsx(Text, { color: "error", children: error?.message ?? 'Failed to load data' }) }) }));
|
|
6
6
|
//# sourceMappingURL=table_error_row.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table_expansion_row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_expansion_row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"table_expansion_row.d.ts","sourceRoot":"","sources":["../../../../src/components/table/table_expansion_row.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,eAAO,MAAM,iBAAiB,EAAE,EAAE,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,EAAE,cAAc,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAUA,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const TableExpansionRow = ({ colSpan, children, expansion, itemId, className }) => {
|
|
6
6
|
if (!expansion.isExpanded(itemId))
|
|
7
7
|
return null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const TableFoot = ({ className, ...rest }) => (_jsx("tfoot", { "data-test": tableTestIds.FOOT, className: clsx(tableClassNames.FOOT, className), ...rest }));
|
|
6
6
|
//# sourceMappingURL=table_foot.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const TableHead = ({ className, ...rest }) => (_jsx("thead", { "data-test": tableTestIds.HEAD, className: clsx(tableClassNames.HEAD, className), ...rest }));
|
|
6
6
|
//# sourceMappingURL=table_head.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const TableHeadCell = ({ className, ...rest }) => (_jsx("th", { "data-test": tableTestIds.HEAD_CELL, className: clsx(tableClassNames.HEAD_CELL, className), ...rest }));
|
|
6
6
|
//# sourceMappingURL=table_head_cell.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const TableHeadRow = ({ className, ...rest }) => (_jsx("tr", { "data-test": tableTestIds.HEAD_ROW, className: clsx(tableClassNames.HEAD_ROW, className), ...rest }));
|
|
6
6
|
//# sourceMappingURL=table_head_row.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { InlineSpinner } from '../spinner.js';
|
|
3
3
|
import { tableClassNames } from './table.styled.js';
|
|
4
|
-
import { tableTestIds } from './
|
|
4
|
+
import { tableTestIds } from './table.test_ids.js';
|
|
5
5
|
export const TableLoadingRow = ({ colSpan, children }) => (_jsx("tr", { "data-test": tableTestIds.LOADING_ROW, className: tableClassNames.ROW_EMPTY, children: _jsx("td", { colSpan: colSpan, className: tableClassNames.ROW_EMPTY_CELL, children: children ?? _jsx(InlineSpinner, {}) }) }));
|
|
6
6
|
//# sourceMappingURL=table_loading_row.js.map
|