@pega/cosmos-react-core 2.0.0-rc.5 → 2.0.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/lib/components/ComboBox/ComboBox.types.d.ts +2 -0
- package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.d.ts +1 -0
- package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
- package/lib/components/ComboBox/ComboBoxInput.js +2 -2
- package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js +14 -3
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +3 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts.map +1 -1
- package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.js.map +1 -1
- package/lib/components/Configuration/Configuration.js +1 -1
- package/lib/components/Configuration/Configuration.js.map +1 -1
- package/lib/components/IconPicker/IconPicker.d.ts +13 -0
- package/lib/components/IconPicker/IconPicker.d.ts.map +1 -0
- package/lib/components/IconPicker/IconPicker.js +105 -0
- package/lib/components/IconPicker/IconPicker.js.map +1 -0
- package/lib/components/IconPicker/index.d.ts +3 -0
- package/lib/components/IconPicker/index.d.ts.map +1 -0
- package/lib/components/IconPicker/index.js +2 -0
- package/lib/components/IconPicker/index.js.map +1 -0
- package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
- package/lib/components/Menu/FlyoutMenuList.js +1 -1
- package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
- package/lib/components/Menu/MenuList.d.ts.map +1 -1
- package/lib/components/Menu/MenuList.js +1 -1
- package/lib/components/Menu/MenuList.js.map +1 -1
- package/lib/components/MetaList/MetaList.js +1 -1
- package/lib/components/MetaList/MetaList.js.map +1 -1
- package/lib/hooks/useItemIntersection.d.ts +3 -2
- package/lib/hooks/useItemIntersection.d.ts.map +1 -1
- package/lib/hooks/useItemIntersection.js +12 -11
- package/lib/hooks/useItemIntersection.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -70,5 +70,7 @@ export default interface ComboBoxProps extends NoChildrenProp {
|
|
|
70
70
|
actions?: ReactNode;
|
|
71
71
|
/** Menu related props. @see MenuProps */
|
|
72
72
|
menu?: MenuProps;
|
|
73
|
+
/** A visual which represents the selected item. */
|
|
74
|
+
visual?: ReactNode;
|
|
73
75
|
}
|
|
74
76
|
//# sourceMappingURL=ComboBox.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.types.d.ts","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBox.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE9D,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,CAAC,OAAO,WAAW,aAAc,SAAQ,cAAc;IAC3D;;;OAGG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC5B,2DAA2D;IAC3D,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC,uCAAuC;IACvC,WAAW,CAAC,EAAE,gBAAgB,C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AAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAC;IAClC,wDAAwD;IACxD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,yCAAyC;IACzC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,mDAAmD;IACnD,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.types.js","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBox.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ChangeEvent, ReactNode } from 'react';\n\nimport type { NoChildrenProp } from '../../types';\nimport { FormControlProps } from '../FormControl';\nimport { MenuItemProps, MenuProps } from '../Menu/Menu.types';\n\nexport interface Selected {\n id: string;\n text: string;\n}\n\nexport default interface ComboBoxProps extends NoChildrenProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the component non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Placeholder text */\n placeholder?: FormControlProps['placeholder'];\n /**\n * Whether it is single selection or multi selection combobox.\n * @default 'single-select'\n */\n mode?: 'single-select' | 'multi-select';\n /** Currently selected option, single for single-select, an array for multi-select. */\n selected?: {\n items?: Selected | Selected[];\n onRemove?: (id: MenuItemProps['id'], index: number) => void;\n onNew?: (text: string) => void;\n };\n /** Value of the combobox filtering input. */\n value?: FormControlProps['value'];\n /** Callback fired when the filtering input value changes. */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Callback fired when the ComboBox input gains focus. */\n onFocus?: (selected?: Selected | Selected[]) => void;\n /**\n * Callback fired when the ComboBox looses focus within its containing element.\n * This is not specific to the input element.\n * Note, behavior will be enhanced in an upcoming release and the input will be the only focusable element.\n */\n onBlur?: (selected?: Selected | Selected[]) => void;\n /** Automatically focuses the input on render. */\n autoFocus?: boolean;\n /**\n * Fired when the user clicks on the dropdown icon to initiate opening the menu.\n * If you want to offer default menu items without an input value, pass this function.\n * This function can be an appropriate time to fetch menu item data.\n * Remember to set the loading prop to true when when fetching data for an empty list.\n *\n * @param open value defining whether the click opens or closes the menu\n */\n onDropdownButtonClick?: (open: boolean) => void;\n /** Fired when user clicks on the Combobox input. */\n onClick?: (e: MouseEvent) => void;\n /** Action Buttons that will render within the input. */\n actions?: ReactNode;\n /** Menu related props. @see MenuProps */\n menu?: MenuProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ComboBox.types.js","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBox.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ChangeEvent, ReactNode } from 'react';\n\nimport type { NoChildrenProp } from '../../types';\nimport { FormControlProps } from '../FormControl';\nimport { MenuItemProps, MenuProps } from '../Menu/Menu.types';\n\nexport interface Selected {\n id: string;\n text: string;\n}\n\nexport default interface ComboBoxProps extends NoChildrenProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the component non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Placeholder text */\n placeholder?: FormControlProps['placeholder'];\n /**\n * Whether it is single selection or multi selection combobox.\n * @default 'single-select'\n */\n mode?: 'single-select' | 'multi-select';\n /** Currently selected option, single for single-select, an array for multi-select. */\n selected?: {\n items?: Selected | Selected[];\n onRemove?: (id: MenuItemProps['id'], index: number) => void;\n onNew?: (text: string) => void;\n };\n /** Value of the combobox filtering input. */\n value?: FormControlProps['value'];\n /** Callback fired when the filtering input value changes. */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Callback fired when the ComboBox input gains focus. */\n onFocus?: (selected?: Selected | Selected[]) => void;\n /**\n * Callback fired when the ComboBox looses focus within its containing element.\n * This is not specific to the input element.\n * Note, behavior will be enhanced in an upcoming release and the input will be the only focusable element.\n */\n onBlur?: (selected?: Selected | Selected[]) => void;\n /** Automatically focuses the input on render. */\n autoFocus?: boolean;\n /**\n * Fired when the user clicks on the dropdown icon to initiate opening the menu.\n * If you want to offer default menu items without an input value, pass this function.\n * This function can be an appropriate time to fetch menu item data.\n * Remember to set the loading prop to true when when fetching data for an empty list.\n *\n * @param open value defining whether the click opens or closes the menu\n */\n onDropdownButtonClick?: (open: boolean) => void;\n /** Fired when user clicks on the Combobox input. */\n onClick?: (e: MouseEvent) => void;\n /** Action Buttons that will render within the input. */\n actions?: ReactNode;\n /** Menu related props. @see MenuProps */\n menu?: MenuProps;\n /** A visual which represents the selected item. */\n visual?: ReactNode;\n}\n"]}
|
|
@@ -6,6 +6,7 @@ interface ComboBoxInputProps extends BaseProps {
|
|
|
6
6
|
mode?: 'multi-select' | 'single-select';
|
|
7
7
|
selected?: Selected | Selected[];
|
|
8
8
|
value?: ComboBoxProps['value'];
|
|
9
|
+
visual?: ComboBoxProps['visual'];
|
|
9
10
|
onRemove?: (id: MenuItemProps['id'], index: number) => void;
|
|
10
11
|
}
|
|
11
12
|
declare const ComboBoxInput: FunctionComponent<ComboBoxInputProps & ForwardProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBoxInput.d.ts","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBoxInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,OAAO,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE3D,UAAU,kBAAmB,SAAQ,SAAS;IAC5C,IAAI,CAAC,EAAE,cAAc,GAAG,eAAe,CAAC;IACxC,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAC;IACjC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7D;AAED,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"ComboBoxInput.d.ts","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBoxInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAInD,OAAO,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE3D,UAAU,kBAAmB,SAAQ,SAAS;IAC5C,IAAI,CAAC,EAAE,cAAc,GAAG,eAAe,CAAC;IACxC,QAAQ,CAAC,EAAE,QAAQ,GAAG,QAAQ,EAAE,CAAC;IACjC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7D;AAED,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC,kBAAkB,GAAG,YAAY,CAwBvE,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -3,11 +3,11 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import SingleSelectInput from './SingleSelectInput/SingleSelectInput';
|
|
4
4
|
import MultiSelectInput from './MultiSelectInput/MultiSelectInput';
|
|
5
5
|
const ComboBoxInput = forwardRef((props, ref) => {
|
|
6
|
-
const { value, mode, selected, onRemove, ...restProps } = props;
|
|
6
|
+
const { value, mode, selected, visual, onRemove, ...restProps } = props;
|
|
7
7
|
return mode === 'multi-select' ? (_jsx(MultiSelectInput, { selected: selected, value: value, ...{
|
|
8
8
|
ref,
|
|
9
9
|
onRemove
|
|
10
|
-
}, ...restProps }, void 0)) : (_jsx(SingleSelectInput, { ref: ref, selected: selected, value: value, ...restProps }, void 0));
|
|
10
|
+
}, ...restProps }, void 0)) : (_jsx(SingleSelectInput, { ref: ref, selected: selected, value: value, visual: visual, ...restProps }, void 0));
|
|
11
11
|
});
|
|
12
12
|
export default ComboBoxInput;
|
|
13
13
|
//# sourceMappingURL=ComboBoxInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBoxInput.js","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBoxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAK5E,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,gBAAgB,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"ComboBoxInput.js","sourceRoot":"","sources":["../../../src/components/ComboBox/ComboBoxInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAK5E,OAAO,iBAAiB,MAAM,uCAAuC,CAAC;AACtE,OAAO,gBAAgB,MAAM,qCAAqC,CAAC;AAWnE,MAAM,aAAa,GAAyD,UAAU,CACpF,CAAC,KAA0C,EAAE,GAA0B,EAAE,EAAE;IACzE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAExE,OAAO,IAAI,KAAK,cAAc,CAAC,CAAC,CAAC,CAC/B,KAAC,gBAAgB,IACf,QAAQ,EAAE,QAAsB,EAChC,KAAK,EAAE,KAAK,KACR;YACF,GAAG;YACH,QAAQ;SACT,KACG,SAAS,WACb,CACH,CAAC,CAAC,CAAC,CACF,KAAC,iBAAiB,IAChB,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,QAAoB,EAC9B,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,KACV,SAAS,WACb,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,aAAa,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, Ref, PropsWithoutRef } from 'react';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport { MenuItemProps } from '../Menu/Menu.types';\n\nimport SingleSelectInput from './SingleSelectInput/SingleSelectInput';\nimport MultiSelectInput from './MultiSelectInput/MultiSelectInput';\nimport ComboBoxProps, { Selected } from './ComboBox.types';\n\ninterface ComboBoxInputProps extends BaseProps {\n mode?: 'multi-select' | 'single-select';\n selected?: Selected | Selected[];\n value?: ComboBoxProps['value'];\n visual?: ComboBoxProps['visual'];\n onRemove?: (id: MenuItemProps['id'], index: number) => void;\n}\n\nconst ComboBoxInput: FunctionComponent<ComboBoxInputProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<ComboBoxInputProps>, ref: Ref<HTMLInputElement>) => {\n const { value, mode, selected, visual, onRemove, ...restProps } = props;\n\n return mode === 'multi-select' ? (\n <MultiSelectInput\n selected={selected as Selected[]}\n value={value}\n {...{\n ref,\n onRemove\n }}\n {...restProps}\n />\n ) : (\n <SingleSelectInput\n ref={ref}\n selected={selected as Selected}\n value={value}\n visual={visual}\n {...restProps}\n />\n );\n }\n);\n\nexport default ComboBoxInput;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelectInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ComboBox/SingleSelectInput/SingleSelectInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAwB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SingleSelectInput.d.ts","sourceRoot":"","sources":["../../../../src/components/ComboBox/SingleSelectInput/SingleSelectInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,iBAAiB,EAAwB,MAAM,OAAO,CAAC;AAM5E,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAE/D,eAAO,MAAM,uBAAuB,yGAA8B,CAAC;AAuBnE,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAuC/E,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,17 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import styled from 'styled-components';
|
|
3
|
+
import styled, { css } from 'styled-components';
|
|
4
|
+
import { defaultThemeProp } from '../../../theme';
|
|
4
5
|
import { StyledFormControl } from '../../FormControl';
|
|
5
6
|
import Flex from '../../Flex';
|
|
6
7
|
import { StyledSelectInput } from '../ComboBox.styles';
|
|
7
8
|
export const StyledSingleSelectInput = styled(StyledSelectInput) ``;
|
|
9
|
+
const StyledVisualContainer = styled.span(props => {
|
|
10
|
+
const { theme: { base, components: { 'form-control': formControl, input: { height } } } } = props;
|
|
11
|
+
return css `
|
|
12
|
+
border-inline-end: ${formControl['border-width']} solid ${formControl['border-color']};
|
|
13
|
+
min-width: calc(${height} - ${formControl['border-width']});
|
|
14
|
+
padding: 0 calc(0.5 * ${base.spacing});
|
|
15
|
+
height: calc(${height} - 2 * ${formControl['border-width']});
|
|
16
|
+
`;
|
|
17
|
+
});
|
|
18
|
+
StyledVisualContainer.defaultProps = defaultThemeProp;
|
|
8
19
|
const SingleSelectInput = forwardRef((props, ref) => {
|
|
9
|
-
const { value, readOnly, disabled, status, actions, onChange, selected, ...restProps } = props;
|
|
20
|
+
const { value, readOnly, disabled, status, actions, onChange, selected, visual, ...restProps } = props;
|
|
10
21
|
return (_jsxs(Flex, { as: StyledSingleSelectInput, forwardedAs: StyledFormControl, container: { alignItems: 'center', wrap: 'nowrap' }, ...{
|
|
11
22
|
disabled,
|
|
12
23
|
status,
|
|
13
24
|
readOnly
|
|
14
|
-
}, children: [_jsx("input", { ...{
|
|
25
|
+
}, children: [visual && (_jsx(Flex, { container: { justify: 'center', alignItems: 'center' }, as: StyledVisualContainer, children: visual }, void 0)), _jsx("input", { ...{
|
|
15
26
|
ref,
|
|
16
27
|
disabled,
|
|
17
28
|
status,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelectInput.js","sourceRoot":"","sources":["../../../../src/components/ComboBox/SingleSelectInput/SingleSelectInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAC5E,OAAO,MAAM,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SingleSelectInput.js","sourceRoot":"","sources":["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EAAE,uBAAuB,EAC3B,WAAW,EAAE,iBAAiB,EAC9B,SAAS,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAC/C;YACF,QAAQ;YACR,MAAM;YACN,QAAQ;SACT,aAEA,MAAM,IAAI,CACT,KAAC,IAAI,IAAC,SAAS,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,qBAAqB,YACpF,MAAM,WACF,CACR,EACD,mBACM;oBACF,GAAG;oBACH,QAAQ;oBACR,MAAM;oBACN,QAAQ;iBACT,EACD,KAAK,EAAE,KAAK,IAAI,QAAQ,EAAE,IAAI,IAAI,EAAE;gBACpC,0CAA0C;gBAC1C,QAAQ,EAAE,QAAQ,IAAI,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,EAChC,QAAQ,EAAE,QAAQ,IAAI,CAAC,QAAQ,EAC/B,YAAY,EAAC,KAAK,KACd,SAAS,WACb,EACD,OAAO,YACH,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { defaultThemeProp } from '../../../theme';\nimport { StyledFormControl } from '../../FormControl';\nimport Flex from '../../Flex';\nimport { ForwardProps } from '../../../types';\nimport { StyledSelectInput } from '../ComboBox.styles';\n\nimport SingleSelectInputProps from './SingleSelectInput.types';\n\nexport const StyledSingleSelectInput = styled(StyledSelectInput)``;\n\nconst StyledVisualContainer = styled.span(props => {\n const {\n theme: {\n base,\n components: {\n 'form-control': formControl,\n input: { height }\n }\n }\n } = props;\n\n return css`\n border-inline-end: ${formControl['border-width']} solid ${formControl['border-color']};\n min-width: calc(${height} - ${formControl['border-width']});\n padding: 0 calc(0.5 * ${base.spacing});\n height: calc(${height} - 2 * ${formControl['border-width']});\n `;\n});\n\nStyledVisualContainer.defaultProps = defaultThemeProp;\n\nconst SingleSelectInput: FunctionComponent<SingleSelectInputProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<SingleSelectInputProps>, ref: Ref<HTMLInputElement>) => {\n const { value, readOnly, disabled, status, actions, onChange, selected, visual, ...restProps } =\n props;\n\n return (\n <Flex\n as={StyledSingleSelectInput}\n forwardedAs={StyledFormControl}\n container={{ alignItems: 'center', wrap: 'nowrap' }}\n {...{\n disabled,\n status,\n readOnly\n }}\n >\n {visual && (\n <Flex container={{ justify: 'center', alignItems: 'center' }} as={StyledVisualContainer}>\n {visual}\n </Flex>\n )}\n <input\n {...{\n ref,\n disabled,\n status,\n readOnly\n }}\n value={value || selected?.text || ''}\n // no-op avoids react uncontrolled warning\n onChange={onChange || (() => {})}\n readOnly={readOnly || !onChange}\n autoComplete='off'\n {...restProps}\n />\n {actions}\n </Flex>\n );\n }\n);\n\nexport default SingleSelectInput;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent, KeyboardEvent, ReactNode } from 'react';
|
|
2
2
|
import { FormControlProps } from '../../FormControl';
|
|
3
|
-
import { Selected } from '../ComboBox.types';
|
|
3
|
+
import ComboBoxProps, { Selected } from '../ComboBox.types';
|
|
4
4
|
export default interface SingleSelectInputProps {
|
|
5
5
|
/** List of items to be represented as pills. */
|
|
6
6
|
selected?: Selected;
|
|
@@ -22,5 +22,7 @@ export default interface SingleSelectInputProps {
|
|
|
22
22
|
placeholder?: string;
|
|
23
23
|
/** Additional actions related to the input. */
|
|
24
24
|
actions?: ReactNode;
|
|
25
|
+
/** A visual to render a preview for the selected item */
|
|
26
|
+
visual?: ComboBoxProps['visual'];
|
|
25
27
|
}
|
|
26
28
|
//# sourceMappingURL=SingleSelectInput.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelectInput.types.d.ts","sourceRoot":"","sources":["../../../../src/components/ComboBox/SingleSelectInput/SingleSelectInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SingleSelectInput.types.d.ts","sourceRoot":"","sources":["../../../../src/components/ComboBox/SingleSelectInput/SingleSelectInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,aAAa,EAAE,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,CAAC,OAAO,WAAW,sBAAsB;IAC7C,gDAAgD;IAChD,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,wDAAwD;IACxD,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACtD,yDAAyD;IACzD,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD,qFAAqF;IACrF,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxC,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxC,oDAAoD;IACpD,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,yDAAyD;IACzD,MAAM,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC;CAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleSelectInput.types.js","sourceRoot":"","sources":["../../../../src/components/ComboBox/SingleSelectInput/SingleSelectInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ChangeEvent, KeyboardEvent, ReactNode } from 'react';\n\nimport { FormControlProps } from '../../FormControl';\nimport { Selected } from '../ComboBox.types';\n\nexport default interface SingleSelectInputProps {\n /** List of items to be represented as pills. */\n selected?: Selected;\n /** Input value */\n value?: string;\n /** Callback invoked when user accepts custom value by pressing enter. */\n onNew?: (text: string) => void;\n /** Callback fired when internal input value changes. */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Callback fired on every key stroke on input field. */\n onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Placeholder visible on empty input. */\n placeholder?: string;\n /** Additional actions related to the input. */\n actions?: ReactNode;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"SingleSelectInput.types.js","sourceRoot":"","sources":["../../../../src/components/ComboBox/SingleSelectInput/SingleSelectInput.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ChangeEvent, KeyboardEvent, ReactNode } from 'react';\n\nimport { FormControlProps } from '../../FormControl';\nimport ComboBoxProps, { Selected } from '../ComboBox.types';\n\nexport default interface SingleSelectInputProps {\n /** List of items to be represented as pills. */\n selected?: Selected;\n /** Input value */\n value?: string;\n /** Callback invoked when user accepts custom value by pressing enter. */\n onNew?: (text: string) => void;\n /** Callback fired when internal input value changes. */\n onChange?: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Callback fired on every key stroke on input field. */\n onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Placeholder visible on empty input. */\n placeholder?: string;\n /** Additional actions related to the input. */\n actions?: ReactNode;\n /** A visual to render a preview for the selected item */\n visual?: ComboBoxProps['visual'];\n}\n"]}
|
|
@@ -25,7 +25,7 @@ if (windowIsAvailable) {
|
|
|
25
25
|
if (!window[metaKey]) {
|
|
26
26
|
window[metaKey] = [];
|
|
27
27
|
}
|
|
28
|
-
window[metaKey].push({ version: '2.0.0
|
|
28
|
+
window[metaKey].push({ version: '2.0.0' });
|
|
29
29
|
}
|
|
30
30
|
const Configuration = ({ context = ConfigurationContext, children, locale, direction, translations: customTranslations, theme, disableDefaultFontLoading, styleSheetTarget, portalTarget, overrideMap, renderNativeControls }) => {
|
|
31
31
|
const ctx = useContext(context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Configuration.js","sourceRoot":"","sources":["../../../src/components/Configuration/Configuration.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,EAIV,OAAO,EACP,QAAQ,EACR,SAAS,EAEV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAGjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,qBAAqB,EAGrB,kBAAkB,EAClB,SAAS,IAAI,iBAAiB,EAC/B,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AA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IACF,OAAO,CACL,KAAC,oBAAoB,CAAC,QAAQ,IAC5B,KAAK,EAAE;YACL,MAAM,EAAE,MAAM,IAAI,GAAG,CAAC,MAAM;YAC5B,SAAS,EAAE,SAAS,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC;YAC1F,YAAY;YACZ,YAAY;YACZ,CAAC,cAAc,CAAC,EAAE,IAAI;YACtB,gBAAgB,EAAE,gBAAgB,IAAI,GAAG,CAAC,gBAAgB;YAC1D,YAAY,EAAE,YAAY,IAAI,GAAG,CAAC,YAAY;YAC9C,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,WAAW,EAAE,GAAG,WAAW,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW;YACnF,oBAAoB,EAAE,oBAAoB,IAAI,GAAG,CAAC,oBAAoB;SACvE,YAED,KAAC,aAAa,IAAC,KAAK,EAAE,YAAY,CAAC,KAAK,YAAG,eAAe,WAAiB,WAC7C,CACjC,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC;AAE1C,eAAe,aAAa,CAAC","sourcesContent":["import {\n createContext,\n useContext,\n FunctionComponent,\n ComponentType,\n ReactNode,\n useMemo,\n useState,\n useEffect,\n Context\n} from 'react';\nimport { createPortal } from 'react-dom';\nimport { ThemeProvider, StyleSheetManager } from 'styled-components';\n\nimport { GlobalStyle } from '../../styles';\nimport {\n ThemeMachine,\n BaseThemeMachine,\n DefaultSettableTheme,\n DefaultThemeDefinition\n} from '../../theme';\nimport {\n createTranslationPack,\n Translation,\n TranslationPack,\n DefaultTranslation,\n direction as directionOfLocale\n} from '../../i18n';\nimport { FileInputProps } from '../File';\nimport { windowIsAvailable, navigatorIsAvailable, documentIsAvailable } from '../../utils';\n\nexport interface ConfigurationProps {\n /**\n * Any components or nodes that should be impacted by the settings applied by this Configuration component.\n */\n children: ReactNode;\n /**\n * Context to read previous configuration values from.\n */\n context?: Context<ConfigurationContextValue>;\n /**\n * User locale as defined in [BCP-47](https://www.techonthenet.com/js/language_tags.php).\n */\n locale?: string;\n /**\n * Override rendering direction of the document. Direction will be based on the locale if now provided.\n */\n direction?: 'ltr' | 'rtl';\n /**\n * Object with (partial) translations.\n */\n translations?: Translation;\n /**\n * Theme object used to override any or all Cosmos theme properties.\n */\n theme?: DefaultSettableTheme;\n /**\n * Disables loading Open Sans from Google Fonts. Only takes effect on the root configuration.\n */\n disableDefaultFontLoading?: boolean;\n /**\n * Target element for loading styles related to `styled-components`.\n */\n styleSheetTarget?: HTMLElement;\n /**\n * Target element for rendering a `ReactDOM` portal.\n */\n portalTarget?: Element;\n /**\n * Override map to replace Cosmos components.\n */\n overrideMap?: {\n FileInput?: ComponentType<FileInputProps>;\n };\n /**\n * Use native HTML5 controls for inputs instead of rich ones.\n * @default false\n */\n renderNativeControls?: boolean;\n}\n\nconst initializedKey = Symbol.for('@pega/cosmos-react-core.configuration.initialized');\n\nexport interface ConfigurationContextValue {\n [initializedKey]: boolean;\n locale: string;\n direction: ConfigurationProps['direction'];\n translations: TranslationPack;\n themeMachine: ThemeMachine<DefaultThemeDefinition>;\n styleSheetTarget?: HTMLElement;\n portalTarget?: Element;\n overrideMap: NonNullable<ConfigurationProps['overrideMap']>;\n renderNativeControls: boolean;\n}\n\nconst defaultProps: Partial<ConfigurationProps> = {};\nconst defaultLocale = navigatorIsAvailable ? navigator.language : 'en';\n\nexport const ConfigurationContext = createContext<ConfigurationContextValue>({\n [initializedKey]: false,\n locale: defaultLocale,\n direction: directionOfLocale(defaultLocale),\n translations: DefaultTranslation,\n themeMachine: BaseThemeMachine,\n styleSheetTarget: documentIsAvailable ? document.head : undefined,\n portalTarget: documentIsAvailable ? document.body : undefined,\n overrideMap: {},\n renderNativeControls: false\n});\n\nconst metaKey = Symbol.for('@pega/cosmos-react-core.metadata');\n\ninterface CosmosMetadata {\n version: string;\n}\n\ndeclare global {\n interface Window {\n [metaKey]: CosmosMetadata[];\n }\n}\n\nif (windowIsAvailable) {\n if (!window[metaKey]) {\n window[metaKey] = [];\n }\n\n window[metaKey].push({ version: '2.0.0' });\n}\n\nconst Configuration: FunctionComponent<ConfigurationProps> = ({\n context = ConfigurationContext,\n children,\n locale,\n direction,\n translations: customTranslations,\n theme,\n disableDefaultFontLoading,\n styleSheetTarget,\n portalTarget,\n overrideMap,\n renderNativeControls\n}: ConfigurationProps) => {\n const ctx = useContext(context);\n const themeMachine = theme\n ? new ThemeMachine<DefaultThemeDefinition>({ theme, parent: ctx.themeMachine })\n : ctx.themeMachine;\n const translations = useMemo(\n () => createTranslationPack({ ...ctx.translations, ...customTranslations }),\n [ctx.translations, customTranslations]\n );\n\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n const wrappedChildren = ctx[initializedKey] ? (\n children\n ) : (\n <StyleSheetManager disableVendorPrefixes target={styleSheetTarget ?? ctx.styleSheetTarget}>\n <>\n {!disableDefaultFontLoading &&\n mounted &&\n documentIsAvailable &&\n createPortal(\n <link\n rel='stylesheet'\n href='https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,600;0,700;1,400;1,600;1,700&display=swap'\n />,\n document.head\n )}\n <GlobalStyle />\n {children}\n </>\n </StyleSheetManager>\n );\n return (\n <ConfigurationContext.Provider\n value={{\n locale: locale ?? ctx.locale,\n direction: direction ?? (locale !== undefined ? directionOfLocale(locale) : ctx.direction),\n translations,\n themeMachine,\n [initializedKey]: true,\n styleSheetTarget: styleSheetTarget ?? ctx.styleSheetTarget,\n portalTarget: portalTarget ?? ctx.portalTarget,\n overrideMap: overrideMap ? { ...ctx.overrideMap, ...overrideMap } : ctx.overrideMap,\n renderNativeControls: renderNativeControls ?? ctx.renderNativeControls\n }}\n >\n <ThemeProvider theme={themeMachine.theme}>{wrappedChildren}</ThemeProvider>\n </ConfigurationContext.Provider>\n );\n};\n\nConfiguration.defaultProps = defaultProps;\n\nexport default Configuration;\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FunctionComponent } from 'react';
|
|
2
|
+
import { ForwardProps } from '../../types';
|
|
3
|
+
import { ComboBoxProps } from '../ComboBox';
|
|
4
|
+
import { MenuProps } from '../Menu';
|
|
5
|
+
export interface IconPickerProps extends Pick<ComboBoxProps, 'id' | 'label' | 'labelHidden' | 'required' | 'disabled' | 'readOnly' | 'name' | 'status' | 'info' | 'placeholder' | 'autoFocus'>, Pick<MenuProps, 'scrollAt'> {
|
|
6
|
+
/** Default selection for the input. */
|
|
7
|
+
defaultSelection: string;
|
|
8
|
+
/** Callback fired when user chooses icon from the list of icons. */
|
|
9
|
+
onSelect?: (iconName: string) => void;
|
|
10
|
+
}
|
|
11
|
+
declare const IconPicker: FunctionComponent<IconPickerProps & ForwardProps>;
|
|
12
|
+
export default IconPicker;
|
|
13
|
+
//# sourceMappingURL=IconPicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconPicker.d.ts","sourceRoot":"","sources":["../../../src/components/IconPicker/IconPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EASlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAiB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EAAe,SAAS,EAAiB,MAAM,SAAS,CAAC;AAIhE,MAAM,WAAW,eACf,SAAQ,IAAI,CACR,aAAa,EACX,IAAI,GACJ,OAAO,GACP,aAAa,GACb,UAAU,GACV,UAAU,GACV,UAAU,GACV,MAAM,GACN,QAAQ,GACR,MAAM,GACN,aAAa,GACb,WAAW,CACd,EACD,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC7B,uCAAuC;IACvC,gBAAgB,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAoBD,QAAA,MAAM,UAAU,EAAE,iBAAiB,CAAC,eAAe,GAAG,YAAY,CAkHjE,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState, useCallback, useRef, useEffect } from 'react';
|
|
3
|
+
import ComboBox from '../ComboBox';
|
|
4
|
+
import icons from '../Icon/iconNames';
|
|
5
|
+
import Icon from '../Icon';
|
|
6
|
+
import { menuHelpers } from '../Menu';
|
|
7
|
+
import { useI18n } from '../../hooks';
|
|
8
|
+
import { createStringMatcher } from '../../utils';
|
|
9
|
+
const getFilteredItems = (iconList, filterValue) => {
|
|
10
|
+
if (!filterValue)
|
|
11
|
+
return iconList;
|
|
12
|
+
const regExp = createStringMatcher(filterValue);
|
|
13
|
+
return iconList.filter(({ primary }) => regExp.test(primary));
|
|
14
|
+
};
|
|
15
|
+
const iconList = icons.map(icon => {
|
|
16
|
+
return {
|
|
17
|
+
id: icon,
|
|
18
|
+
primary: icon,
|
|
19
|
+
visual: _jsx(Icon, { name: icon }, void 0),
|
|
20
|
+
selected: false
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
const pageSize = 20;
|
|
24
|
+
const IconPicker = forwardRef((props, ref) => {
|
|
25
|
+
const { defaultSelection, scrollAt, onSelect, ...restProps } = props;
|
|
26
|
+
const [items, setItems] = useState(() => iconList.slice(0, pageSize));
|
|
27
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
28
|
+
const [hasMore, setHasMore] = useState(true);
|
|
29
|
+
const [selectedIcon, setSelectedIcon] = useState(defaultSelection ?? '');
|
|
30
|
+
const [filterValue, setFilterValue] = useState('');
|
|
31
|
+
const t = useI18n();
|
|
32
|
+
const loadMoreTimeoutId = useRef();
|
|
33
|
+
const resetItems = useCallback(() => {
|
|
34
|
+
const filteredItems = getFilteredItems(iconList, filterValue);
|
|
35
|
+
setItems(menuHelpers.selectItem(filteredItems.slice(0, pageSize), selectedIcon, 'single-select'));
|
|
36
|
+
setHasMore(filteredItems.length > pageSize);
|
|
37
|
+
}, [filterValue, selectedIcon]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
resetItems();
|
|
40
|
+
}, [filterValue, selectedIcon]);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
return () => {
|
|
43
|
+
if (loadMoreTimeoutId.current)
|
|
44
|
+
clearTimeout(loadMoreTimeoutId.current);
|
|
45
|
+
};
|
|
46
|
+
}, []);
|
|
47
|
+
const loadMore = useCallback(() => {
|
|
48
|
+
if (!isLoading) {
|
|
49
|
+
setIsLoading(true);
|
|
50
|
+
if (loadMoreTimeoutId.current)
|
|
51
|
+
clearTimeout(loadMoreTimeoutId.current);
|
|
52
|
+
loadMoreTimeoutId.current = setTimeout(() => {
|
|
53
|
+
setIsLoading(false);
|
|
54
|
+
setItems(prevItems => {
|
|
55
|
+
const newItems = menuHelpers.mapTree(getFilteredItems(iconList, filterValue).slice(prevItems.length, prevItems.length + pageSize), item => ({
|
|
56
|
+
...item,
|
|
57
|
+
selected: item.items ? undefined : selectedIcon === item.id
|
|
58
|
+
}));
|
|
59
|
+
if (newItems.length === 0)
|
|
60
|
+
setHasMore(false);
|
|
61
|
+
return menuHelpers.appendTo(prevItems, newItems);
|
|
62
|
+
});
|
|
63
|
+
}, 500);
|
|
64
|
+
}
|
|
65
|
+
}, [filterValue, isLoading]);
|
|
66
|
+
const selectItem = useCallback((iconName) => {
|
|
67
|
+
setSelectedIcon(iconName);
|
|
68
|
+
setFilterValue('');
|
|
69
|
+
onSelect?.(iconName);
|
|
70
|
+
}, [onSelect]);
|
|
71
|
+
const clearSelection = useCallback(() => {
|
|
72
|
+
setSelectedIcon('');
|
|
73
|
+
setItems(cur => menuHelpers.mapTree(cur, item => {
|
|
74
|
+
return {
|
|
75
|
+
...item,
|
|
76
|
+
selected: false
|
|
77
|
+
};
|
|
78
|
+
}));
|
|
79
|
+
}, []);
|
|
80
|
+
return (_jsx(ComboBox, { ...restProps, ref: ref, selected: selectedIcon
|
|
81
|
+
? {
|
|
82
|
+
items: {
|
|
83
|
+
id: selectedIcon,
|
|
84
|
+
text: selectedIcon
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
: undefined, value: filterValue, onChange: (e) => {
|
|
88
|
+
if (!e.target.value)
|
|
89
|
+
clearSelection();
|
|
90
|
+
setFilterValue(e.target.value);
|
|
91
|
+
}, onBlur: () => {
|
|
92
|
+
resetItems();
|
|
93
|
+
setFilterValue('');
|
|
94
|
+
}, menu: {
|
|
95
|
+
items,
|
|
96
|
+
onItemClick: selectItem,
|
|
97
|
+
scrollAt,
|
|
98
|
+
accent: filterValue ? createStringMatcher(filterValue) : undefined,
|
|
99
|
+
emptyText: t('no_items'),
|
|
100
|
+
loading: isLoading,
|
|
101
|
+
loadMore: hasMore ? loadMore : undefined
|
|
102
|
+
}, visual: selectedIcon ? _jsx(Icon, { name: selectedIcon }, void 0) : _jsx(_Fragment, {}, void 0) }, void 0));
|
|
103
|
+
});
|
|
104
|
+
export default IconPicker;
|
|
105
|
+
//# sourceMappingURL=IconPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconPicker.js","sourceRoot":"","sources":["../../../src/components/IconPicker/IconPicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,WAAW,EACX,MAAM,EAEN,SAAS,EAGV,MAAM,OAAO,CAAC;AAGf,OAAO,QAA2B,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,WAAW,EAA4B,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,mBAAm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EAAE,YAAY;oBAChB,IAAI,EAAE,YAAY;iBACnB;aACF;YACH,CAAC,CAAC,SAAS,EAEf,KAAK,EAAE,WAAW,EAClB,QAAQ,EAAE,CAAC,CAAgC,EAAE,EAAE;YAC7C,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK;gBAAE,cAAc,EAAE,CAAC;YACtC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,EACD,MAAM,EAAE,GAAG,EAAE;YACX,UAAU,EAAE,CAAC;YACb,cAAc,CAAC,EAAE,CAAC,CAAC;QACrB,CAAC,EACD,IAAI,EAAE;YACJ,KAAK;YACL,WAAW,EAAE,UAAU;YACvB,QAAQ;YACR,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;YAClE,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC;YACxB,OAAO,EAAE,SAAS;YAClB,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SACzC,EACD,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,YAAY,WAAI,CAAC,CAAC,CAAC,2BAAK,WAC3D,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import {\n FunctionComponent,\n forwardRef,\n useState,\n useCallback,\n useRef,\n ChangeEvent,\n useEffect,\n PropsWithoutRef,\n Ref\n} from 'react';\n\nimport { ForwardProps } from '../../types';\nimport ComboBox, { ComboBoxProps } from '../ComboBox';\nimport icons from '../Icon/iconNames';\nimport Icon from '../Icon';\nimport { menuHelpers, MenuProps, MenuItemProps } from '../Menu';\nimport { useI18n } from '../../hooks';\nimport { createStringMatcher } from '../../utils';\n\nexport interface IconPickerProps\n extends Pick<\n ComboBoxProps,\n | 'id'\n | 'label'\n | 'labelHidden'\n | 'required'\n | 'disabled'\n | 'readOnly'\n | 'name'\n | 'status'\n | 'info'\n | 'placeholder'\n | 'autoFocus'\n >,\n Pick<MenuProps, 'scrollAt'> {\n /** Default selection for the input. */\n defaultSelection: string;\n /** Callback fired when user chooses icon from the list of icons. */\n onSelect?: (iconName: string) => void;\n}\n\nconst getFilteredItems = (iconList: MenuItemProps[], filterValue: string) => {\n if (!filterValue) return iconList;\n\n const regExp = createStringMatcher(filterValue);\n return iconList.filter(({ primary }) => regExp.test(primary));\n};\n\nconst iconList: MenuItemProps[] = icons.map(icon => {\n return {\n id: icon,\n primary: icon,\n visual: <Icon name={icon} />,\n selected: false\n };\n});\n\nconst pageSize = 20;\n\nconst IconPicker: FunctionComponent<IconPickerProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<IconPickerProps>, ref: Ref<HTMLInputElement>) => {\n const { defaultSelection, scrollAt, onSelect, ...restProps } = props;\n\n const [items, setItems] = useState<MenuProps['items']>(() => iconList.slice(0, pageSize));\n\n const [isLoading, setIsLoading] = useState(false);\n const [hasMore, setHasMore] = useState(true);\n const [selectedIcon, setSelectedIcon] = useState(defaultSelection ?? '');\n const [filterValue, setFilterValue] = useState('');\n const t = useI18n();\n const loadMoreTimeoutId = useRef<ReturnType<typeof setTimeout>>();\n\n const resetItems = useCallback(() => {\n const filteredItems = getFilteredItems(iconList, filterValue);\n setItems(\n menuHelpers.selectItem(filteredItems.slice(0, pageSize), selectedIcon, 'single-select')\n );\n setHasMore(filteredItems.length > pageSize);\n }, [filterValue, selectedIcon]);\n\n useEffect(() => {\n resetItems();\n }, [filterValue, selectedIcon]);\n\n useEffect(() => {\n return () => {\n if (loadMoreTimeoutId.current) clearTimeout(loadMoreTimeoutId.current);\n };\n }, []);\n\n const loadMore = useCallback(() => {\n if (!isLoading) {\n setIsLoading(true);\n if (loadMoreTimeoutId.current) clearTimeout(loadMoreTimeoutId.current);\n loadMoreTimeoutId.current = setTimeout(() => {\n setIsLoading(false);\n setItems(prevItems => {\n const newItems = menuHelpers.mapTree(\n getFilteredItems(iconList, filterValue).slice(\n prevItems.length,\n prevItems.length + pageSize\n ),\n item => ({\n ...item,\n selected: item.items ? undefined : selectedIcon === item.id\n })\n );\n\n if (newItems.length === 0) setHasMore(false);\n\n return menuHelpers.appendTo(prevItems, newItems);\n });\n }, 500);\n }\n }, [filterValue, isLoading]);\n\n const selectItem = useCallback(\n (iconName: string) => {\n setSelectedIcon(iconName);\n setFilterValue('');\n onSelect?.(iconName);\n },\n [onSelect]\n );\n\n const clearSelection = useCallback(() => {\n setSelectedIcon('');\n setItems(cur =>\n menuHelpers.mapTree(cur, item => {\n return {\n ...item,\n selected: false\n };\n })\n );\n }, []);\n\n return (\n <ComboBox\n {...restProps}\n ref={ref}\n selected={\n selectedIcon\n ? {\n items: {\n id: selectedIcon,\n text: selectedIcon\n }\n }\n : undefined\n }\n value={filterValue}\n onChange={(e: ChangeEvent<HTMLInputElement>) => {\n if (!e.target.value) clearSelection();\n setFilterValue(e.target.value);\n }}\n onBlur={() => {\n resetItems();\n setFilterValue('');\n }}\n menu={{\n items,\n onItemClick: selectItem,\n scrollAt,\n accent: filterValue ? createStringMatcher(filterValue) : undefined,\n emptyText: t('no_items'),\n loading: isLoading,\n loadMore: hasMore ? loadMore : undefined\n }}\n visual={selectedIcon ? <Icon name={selectedIcon} /> : <></>}\n />\n );\n }\n);\n\nexport default IconPicker;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/IconPicker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export { default } from './IconPicker';\nexport { IconPickerProps } from './IconPicker';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlyoutMenuList.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/FlyoutMenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAUlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAM3C,OAAO,EAAE,aAAa,EAAuB,MAAM,cAAc,CAAC;AAQlE,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"FlyoutMenuList.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/FlyoutMenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAUlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAM3C,OAAO,EAAE,aAAa,EAAuB,MAAM,cAAc,CAAC;AAQlE,QAAA,MAAM,cAAc,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,CAoInE,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -20,7 +20,7 @@ const FlyoutMenuList = forwardRef(({ items, parent }, ref) => {
|
|
|
20
20
|
const { componentId, loadMore, loading, scrollAt, emptyText, onItemExpand, pushFlyoutId, flyOutActiveIdStack } = useContext(MenuContext);
|
|
21
21
|
useItemIntersection(ulRef, items.length - 1, () => {
|
|
22
22
|
loadMore?.(parent?.item?.id);
|
|
23
|
-
});
|
|
23
|
+
}, ':scope > li');
|
|
24
24
|
useAfterInitialEffect(() => {
|
|
25
25
|
if (expandedItem) {
|
|
26
26
|
setExpandedItem(items.find(item => item.id === expandedItem.id)); // FIXME
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlyoutMenuList.js","sourceRoot":"","sources":["../../../src/components/Menu/FlyoutMenuList.tsx"],"names":[],"mapp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;SACxE;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,MAAM,oBAAoB,GAAG,WAAW,CAAC,GAAG,EAAE;QAC5C,IAAI,YAAY,EAAE;YAChB,eAAe,CAAC,SAAS,CAAC,CAAC;SAC5B;IACH,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,CACL,8BACE,KAAC,6BAA6B,IAC5B,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,oBAAoB,gCACF,WAAW,yBAClB,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,WAAW,YAElD,IAAI,WACyB,EAE/B,YAAY,IAAI,OAAO,CAAC,OAAO,IAAI,CAClC,KAAC,OAAO,IAAC,MAAM,EAAE,cAAc,CAAC,OAAO,EAAE,IAAI,QAAC,QAAQ,EAAC,OAAO,EAAC,SAAS,EAAC,aAAa,YACpF,KAAC,cAAc,IACb,KAAK,EAAE,YAAY,CAAC,KAAK,EACzB,MAAM,EAAE;wBACN,EAAE,EAAE,OAAO,CAAC,OAAO;wBACnB,IAAI,EAAE,YAAY;wBAClB,YAAY,EAAE,KAAK;wBACnB,eAAe;wBACf,cAAc;qBACf,WACD,WACM,CACX,YACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n MutableRefObject,\n PropsWithoutRef,\n useContext,\n useEffect,\n useRef,\n useState,\n useMemo,\n useCallback,\n useLayoutEffect\n} from 'react';\n\nimport { ForwardProps } from '../../types';\nimport { useAfterInitialEffect, useConsolidatedRef, useItemIntersection } from '../../hooks';\nimport Progress from '../Progress';\nimport EmptyState from '../EmptyState';\nimport Popover from '../Popover';\n\nimport { MenuListProps, ParentMenuItemProps } from './Menu.types';\nimport MenuContext from './Menu.context';\nimport MenuItem from './MenuItem';\nimport { StyledLoadingItem, StyledMenuList, StyledFlyoutMenuListContainer } from './Menu.styles';\nimport { resizeRootEl } from './NavItemsList';\nimport helpers from './helpers';\nimport MenuGroup from './MenuGroup';\n\nconst FlyoutMenuList: FunctionComponent<MenuListProps & ForwardProps> = forwardRef(\n ({ items, parent }: PropsWithoutRef<MenuListProps>, ref: MenuListProps['ref']) => {\n const selfRef = useConsolidatedRef(ref);\n const ulRef = useRef<HTMLUListElement>(null);\n const menuListWrapperRef: MutableRefObject<HTMLElement | null> = useRef(null);\n const returnFocusRef: MutableRefObject<HTMLButtonElement | null> = useRef(null);\n const [expandedItem, setExpandedItem] = useState<ParentMenuItemProps>();\n const {\n componentId,\n loadMore,\n loading,\n scrollAt,\n emptyText,\n onItemExpand,\n pushFlyoutId,\n flyOutActiveIdStack\n } = useContext(MenuContext);\n\n useItemIntersection(\n ulRef,\n items.length - 1,\n () => {\n loadMore?.(parent?.item?.id);\n },\n ':scope > li'\n );\n\n useAfterInitialEffect(() => {\n if (expandedItem) {\n setExpandedItem(items.find(item => item.id === expandedItem.id) as ParentMenuItemProps); // FIXME\n }\n }, [expandedItem, items]);\n\n useEffect(() => {\n const hasExpanded = items.some(item => {\n return flyOutActiveIdStack.includes(item.id);\n });\n\n if (!hasExpanded) {\n returnFocusRef.current = null;\n setExpandedItem(undefined);\n }\n }, [flyOutActiveIdStack]);\n\n const listContent = useMemo(() => {\n if (items.length) {\n return items.map(item => {\n return helpers.isItem(item) ? (\n <MenuItem\n {...item}\n key={item.id}\n aria-haspopup={!!item.items}\n aria-expanded={item.id === expandedItem?.id}\n onExpand={(id, e) => {\n if (item.items) {\n returnFocusRef.current = e.currentTarget as HTMLButtonElement;\n setExpandedItem(item as ParentMenuItemProps); // FIXME\n item?.onExpand?.(id, e);\n onItemExpand?.(id, e);\n pushFlyoutId(item.id || componentId);\n } else {\n returnFocusRef.current = null;\n setExpandedItem(undefined);\n }\n }}\n />\n ) : (\n <MenuGroup {...item} key={item.id} />\n );\n });\n }\n\n if (!loading) {\n return <EmptyState message={emptyText} forwardedAs='li' />;\n }\n\n return null;\n }, [items, loading, emptyText, expandedItem]);\n\n const list = (\n <StyledMenuList ref={ulRef}>\n {listContent}\n {loading && !expandedItem && (\n <StyledLoadingItem>\n <Progress placement='local' />\n </StyledLoadingItem>\n )}\n </StyledMenuList>\n );\n\n useLayoutEffect(() => {\n setExpandedItem(undefined);\n if (selfRef.current) {\n menuListWrapperRef.current = selfRef.current.parentElement;\n resizeRootEl(selfRef.current, selfRef.current, items.length, scrollAt);\n }\n }, [items]);\n\n const handleMenuListScroll = useCallback(() => {\n if (expandedItem) {\n setExpandedItem(undefined);\n }\n }, [expandedItem]);\n\n return (\n <>\n <StyledFlyoutMenuListContainer\n ref={selfRef}\n onScroll={handleMenuListScroll}\n data-flyout-menu-parent-id={componentId}\n data-flyout-menu-id={parent?.item.id || componentId}\n >\n {list}\n </StyledFlyoutMenuListContainer>\n\n {expandedItem && selfRef.current && (\n <Popover target={returnFocusRef.current} show strategy='fixed' placement='right-start'>\n <FlyoutMenuList\n items={expandedItem.items}\n parent={{\n el: selfRef.current,\n item: expandedItem,\n siblingItems: items,\n setExpandedItem,\n returnFocusRef\n }}\n />\n </Popover>\n )}\n </>\n );\n }\n);\n\nexport default FlyoutMenuList;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAYlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAW3C,OAAO,KAAK,EAEV,aAAa,EAGd,MAAM,cAAc,CAAC;AAsBtB,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"MenuList.d.ts","sourceRoot":"","sources":["../../../src/components/Menu/MenuList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAYlB,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAW3C,OAAO,KAAK,EAEV,aAAa,EAGd,MAAM,cAAc,CAAC;AAsBtB,QAAA,MAAM,QAAQ,EAAE,iBAAiB,CAAC,aAAa,GAAG,YAAY,CAuM7D,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -31,7 +31,7 @@ const MenuList = forwardRef(({ items, parent }, ref) => {
|
|
|
31
31
|
useItemIntersection(ulRef, items.length - 1, () => {
|
|
32
32
|
if (!loading)
|
|
33
33
|
loadMore?.(parent?.item?.id);
|
|
34
|
-
});
|
|
34
|
+
}, ':scope > li');
|
|
35
35
|
useLayoutEffect(() => {
|
|
36
36
|
if (!selfRef.current || expandedItem)
|
|
37
37
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../../src/components/Menu/MenuList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EAIV,UAAU,EACV,SAAS,EACT,eAAe,EACf,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EAEZ,MAAM,OAAO,CAAC;AAGf,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,UAAU,MAAM,eAAe,CAAC;AAQvC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,eAAe,EAChB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,M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C,OAAO,EAC1B,MAAM,CAAC,YAAY,CAAC,MAAM,EAC1B,QAAQ,CACT,CAAC;qBACH;oBAED,IAAI,OAAO,CAAC,OAAO,EAAE;wBACnB,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;qBACrC;gBACH,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;oBACjB,IAAI,MAAM,EAAE;wBACV,YAAY,EAAE,KAAK,EAAE,CAAC;wBAEtB,MAAM,SAAS,GAAG,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC;wBAChD,MAAM,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;wBAElC,IAAI,SAAS,EAAE;4BACb,gBAAgB,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;yBAC5C;wBAED,cAAc,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;wBACjC,uBAAuB,EAAE,CAAC;qBAC3B;gBACH,CAAC,aAEA,MAAM,IAAI,CACT,KAAC,cAAc,IACb,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,EACzB,OAAO,EAAE,GAAG,EAAE;4BACZ,OAAO,CAAC,KAAK,CAAC,CAAC;wBACjB,CAAC,WACD,CACH,EAEA,IAAI,YACE,EAER,YAAY,IAAI,OAAO,CAAC,OAAO,IAAI,CAClC,KAAC,QAAQ,IACP,KAAK,EAAE,YAAY,CAAC,KAAK,EACzB,MAAM,EAAE;oBACN,EAAE,EAAE,OAAO,CAAC,OAAO;oBACnB,IAAI,EAAE,YAAY;oBAClB,YAAY,EAAE,KAAK;oBACnB,eAAe;oBACf,cAAc;iBACf,WACD,CACH,YACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n MutableRefObject,\n PropsWithoutRef,\n useContext,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n useMemo,\n Fragment,\n useCallback,\n MouseEvent\n} from 'react';\n\nimport { ForwardProps } from '../../types';\nimport Drawer from '../Drawer';\nimport {\n useAfterInitialEffect,\n useConsolidatedRef,\n useItemIntersection,\n useDirection\n} from '../../hooks';\nimport Progress from '../Progress';\nimport EmptyState from '../EmptyState';\n\nimport type {\n AcceptedMouseEventElement,\n MenuListProps,\n ParentMenuItemProps,\n MenuItemProps\n} from './Menu.types';\nimport MenuContext from './Menu.context';\nimport MenuListHeader from './MenuListHeader';\nimport MenuItem from './MenuItem';\nimport helpers from './helpers';\nimport {\n StyledLoadingItem,\n StyledMenuList,\n StyledMenuListContainer,\n StyledSeparator\n} from './Menu.styles';\nimport { resizeRootEl } from './NavItemsList';\nimport MenuGroup from './MenuGroup';\n\nconst setParentDisabled = (fieldset: HTMLFieldSetElement, bool: boolean) => {\n fieldset.disabled = bool;\n const legendButton = fieldset.querySelector<HTMLButtonElement>('legend button');\n if (legendButton) {\n legendButton.disabled = bool;\n }\n};\n\nconst MenuList: FunctionComponent<MenuListProps & ForwardProps> = forwardRef(\n ({ items, parent }: PropsWithoutRef<MenuListProps>, ref: MenuListProps['ref']) => {\n const menuListWrapperRef: MutableRefObject<HTMLElement | null> = useRef(null);\n const selfRef = useConsolidatedRef(ref);\n const ulRef = useRef<HTMLUListElement>(null);\n const returnFocusRef: MutableRefObject<HTMLButtonElement | null> = useRef(null);\n const [open, setOpen] = useState(!parent);\n const [expandedItem, setExpandedItem] = useState<ParentMenuItemProps>();\n const {\n scrollAt,\n loadMore,\n loading,\n emptyText,\n currentItemId,\n onItemExpand,\n focusControl,\n updateActiveDescendants,\n setFocusReturnEl,\n onItemCollapse\n } = useContext(MenuContext);\n const { end } = useDirection();\n\n useItemIntersection(ulRef, items.length - 1, () => {\n if (!loading) loadMore?.(parent?.item?.id);\n });\n\n useLayoutEffect(() => {\n if (!selfRef.current || expandedItem) return;\n menuListWrapperRef.current = selfRef.current.parentElement;\n resizeRootEl(\n selfRef.current,\n menuListWrapperRef.current as HTMLElement,\n items.length,\n scrollAt\n );\n });\n\n useEffect(() => {\n if (parent) setOpen(true);\n }, []);\n\n useAfterInitialEffect(() => {\n if (expandedItem) {\n setExpandedItem(items.find(item => item.id === expandedItem.id) as ParentMenuItemProps); // FIXME\n }\n }, [expandedItem, items]);\n\n useAfterInitialEffect(() => {\n if (currentItemId) {\n // if there is ancestor item of the controlled item, set it to expanded.\n const ancestor = items.find(\n item => item.items?.length && helpers.getItem(item.items, currentItemId) !== undefined\n );\n\n if (ancestor) {\n setExpandedItem(ancestor as ParentMenuItemProps);\n updateActiveDescendants({ preventScroll: true });\n }\n }\n }, [currentItemId, items, parent]);\n\n const onExpandCallback = useCallback(\n (id: MenuItemProps['id'], e: MouseEvent<AcceptedMouseEventElement>) => {\n const item = helpers.getItem(items, id);\n returnFocusRef.current = e.currentTarget as HTMLButtonElement;\n setExpandedItem(item as ParentMenuItemProps); // FIXME\n item?.onExpand?.(id, e);\n onItemExpand?.(id, e);\n updateActiveDescendants({ preventScroll: true });\n },\n [items]\n );\n\n const listContent = useMemo(() => {\n if (items.length) {\n return items.map((item, index) => {\n return helpers.isItem(item) ? (\n <MenuItem\n {...item}\n key={item.id}\n onExpand={item.items ? onExpandCallback : undefined}\n />\n ) : (\n <Fragment key={item.id}>\n <MenuGroup {...item} />\n {items[index + 1] && helpers.isItem(items[index + 1]) && (\n <StyledSeparator role='separator' />\n )}\n </Fragment>\n );\n });\n }\n\n if (!loading) {\n return <EmptyState message={emptyText} forwardedAs='li' />;\n }\n\n return null;\n }, [items, loading, emptyText]);\n\n const list = (\n <StyledMenuList ref={ulRef} role='menu'>\n {listContent}\n {loading && !expandedItem && (\n <StyledLoadingItem>\n <Progress placement='local' />\n </StyledLoadingItem>\n )}\n </StyledMenuList>\n );\n\n return (\n <>\n <Drawer\n aria-hidden={!!expandedItem}\n as={StyledMenuListContainer}\n ref={selfRef}\n open={open}\n style={{ opacity: expandedItem ? 0 : 1 }}\n disabled={!!expandedItem}\n placement={end}\n onBeforeOpen={() => {\n if (parent) {\n parent.el.style.opacity = '0';\n }\n\n if (selfRef.current) {\n selfRef.current.style.opacity = '1';\n }\n }}\n onAfterOpen={() => {\n if (parent) {\n setParentDisabled(parent.el, true);\n }\n }}\n onBeforeClose={() => {\n if (parent && menuListWrapperRef.current) {\n setParentDisabled(parent.el, false);\n parent.el.style.opacity = '1';\n resizeRootEl(\n parent.el,\n menuListWrapperRef.current,\n parent.siblingItems.length,\n scrollAt\n );\n }\n\n if (selfRef.current) {\n selfRef.current.style.opacity = '0';\n }\n }}\n onAfterClose={() => {\n if (parent) {\n focusControl?.focus();\n\n const expandBtn = parent.returnFocusRef.current;\n parent.setExpandedItem(undefined);\n\n if (expandBtn) {\n setFocusReturnEl(expandBtn?.closest('li'));\n }\n\n onItemCollapse?.(parent.item.id);\n updateActiveDescendants();\n }\n }}\n >\n {parent && (\n <MenuListHeader\n text={parent.item.primary}\n onClick={() => {\n setOpen(false);\n }}\n />\n )}\n\n {list}\n </Drawer>\n\n {expandedItem && selfRef.current && (\n <MenuList\n items={expandedItem.items}\n parent={{\n el: selfRef.current,\n item: expandedItem,\n siblingItems: items,\n setExpandedItem,\n returnFocusRef\n }}\n />\n )}\n </>\n );\n }\n);\n\nexport default MenuList;\n"]}
|
|
1
|
+
{"version":3,"file":"MenuList.js","sourceRoot":"","sources":["../../../src/components/Menu/MenuList.tsx"],"names":[],"mappings":";;AAAA,OAAO,EACL,UAAU,EAIV,UAAU,EACV,SAAS,EACT,eAAe,EACf,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EAEZ,MAAM,OAAO,CAAC;AAGf,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,UAAU,MAAM,eAAe,CAAC;AAQvC,OAAO,WAAW,MAAM,gBA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E;oBACN,EAAE,EAAE,OAAO,CAAC,OAAO;oBACnB,IAAI,EAAE,YAAY;oBAClB,YAAY,EAAE,KAAK;oBACnB,eAAe;oBACf,cAAc;iBACf,WACD,CACH,YACA,CACJ,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import {\n forwardRef,\n FunctionComponent,\n MutableRefObject,\n PropsWithoutRef,\n useContext,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n useMemo,\n Fragment,\n useCallback,\n MouseEvent\n} from 'react';\n\nimport { ForwardProps } from '../../types';\nimport Drawer from '../Drawer';\nimport {\n useAfterInitialEffect,\n useConsolidatedRef,\n useItemIntersection,\n useDirection\n} from '../../hooks';\nimport Progress from '../Progress';\nimport EmptyState from '../EmptyState';\n\nimport type {\n AcceptedMouseEventElement,\n MenuListProps,\n ParentMenuItemProps,\n MenuItemProps\n} from './Menu.types';\nimport MenuContext from './Menu.context';\nimport MenuListHeader from './MenuListHeader';\nimport MenuItem from './MenuItem';\nimport helpers from './helpers';\nimport {\n StyledLoadingItem,\n StyledMenuList,\n StyledMenuListContainer,\n StyledSeparator\n} from './Menu.styles';\nimport { resizeRootEl } from './NavItemsList';\nimport MenuGroup from './MenuGroup';\n\nconst setParentDisabled = (fieldset: HTMLFieldSetElement, bool: boolean) => {\n fieldset.disabled = bool;\n const legendButton = fieldset.querySelector<HTMLButtonElement>('legend button');\n if (legendButton) {\n legendButton.disabled = bool;\n }\n};\n\nconst MenuList: FunctionComponent<MenuListProps & ForwardProps> = forwardRef(\n ({ items, parent }: PropsWithoutRef<MenuListProps>, ref: MenuListProps['ref']) => {\n const menuListWrapperRef: MutableRefObject<HTMLElement | null> = useRef(null);\n const selfRef = useConsolidatedRef(ref);\n const ulRef = useRef<HTMLUListElement>(null);\n const returnFocusRef: MutableRefObject<HTMLButtonElement | null> = useRef(null);\n const [open, setOpen] = useState(!parent);\n const [expandedItem, setExpandedItem] = useState<ParentMenuItemProps>();\n const {\n scrollAt,\n loadMore,\n loading,\n emptyText,\n currentItemId,\n onItemExpand,\n focusControl,\n updateActiveDescendants,\n setFocusReturnEl,\n onItemCollapse\n } = useContext(MenuContext);\n const { end } = useDirection();\n\n useItemIntersection(\n ulRef,\n items.length - 1,\n () => {\n if (!loading) loadMore?.(parent?.item?.id);\n },\n ':scope > li'\n );\n\n useLayoutEffect(() => {\n if (!selfRef.current || expandedItem) return;\n menuListWrapperRef.current = selfRef.current.parentElement;\n resizeRootEl(\n selfRef.current,\n menuListWrapperRef.current as HTMLElement,\n items.length,\n scrollAt\n );\n });\n\n useEffect(() => {\n if (parent) setOpen(true);\n }, []);\n\n useAfterInitialEffect(() => {\n if (expandedItem) {\n setExpandedItem(items.find(item => item.id === expandedItem.id) as ParentMenuItemProps); // FIXME\n }\n }, [expandedItem, items]);\n\n useAfterInitialEffect(() => {\n if (currentItemId) {\n // if there is ancestor item of the controlled item, set it to expanded.\n const ancestor = items.find(\n item => item.items?.length && helpers.getItem(item.items, currentItemId) !== undefined\n );\n\n if (ancestor) {\n setExpandedItem(ancestor as ParentMenuItemProps);\n updateActiveDescendants({ preventScroll: true });\n }\n }\n }, [currentItemId, items, parent]);\n\n const onExpandCallback = useCallback(\n (id: MenuItemProps['id'], e: MouseEvent<AcceptedMouseEventElement>) => {\n const item = helpers.getItem(items, id);\n returnFocusRef.current = e.currentTarget as HTMLButtonElement;\n setExpandedItem(item as ParentMenuItemProps); // FIXME\n item?.onExpand?.(id, e);\n onItemExpand?.(id, e);\n updateActiveDescendants({ preventScroll: true });\n },\n [items]\n );\n\n const listContent = useMemo(() => {\n if (items.length) {\n return items.map((item, index) => {\n return helpers.isItem(item) ? (\n <MenuItem\n {...item}\n key={item.id}\n onExpand={item.items ? onExpandCallback : undefined}\n />\n ) : (\n <Fragment key={item.id}>\n <MenuGroup {...item} />\n {items[index + 1] && helpers.isItem(items[index + 1]) && (\n <StyledSeparator role='separator' />\n )}\n </Fragment>\n );\n });\n }\n\n if (!loading) {\n return <EmptyState message={emptyText} forwardedAs='li' />;\n }\n\n return null;\n }, [items, loading, emptyText]);\n\n const list = (\n <StyledMenuList ref={ulRef} role='menu'>\n {listContent}\n {loading && !expandedItem && (\n <StyledLoadingItem>\n <Progress placement='local' />\n </StyledLoadingItem>\n )}\n </StyledMenuList>\n );\n\n return (\n <>\n <Drawer\n aria-hidden={!!expandedItem}\n as={StyledMenuListContainer}\n ref={selfRef}\n open={open}\n style={{ opacity: expandedItem ? 0 : 1 }}\n disabled={!!expandedItem}\n placement={end}\n onBeforeOpen={() => {\n if (parent) {\n parent.el.style.opacity = '0';\n }\n\n if (selfRef.current) {\n selfRef.current.style.opacity = '1';\n }\n }}\n onAfterOpen={() => {\n if (parent) {\n setParentDisabled(parent.el, true);\n }\n }}\n onBeforeClose={() => {\n if (parent && menuListWrapperRef.current) {\n setParentDisabled(parent.el, false);\n parent.el.style.opacity = '1';\n resizeRootEl(\n parent.el,\n menuListWrapperRef.current,\n parent.siblingItems.length,\n scrollAt\n );\n }\n\n if (selfRef.current) {\n selfRef.current.style.opacity = '0';\n }\n }}\n onAfterClose={() => {\n if (parent) {\n focusControl?.focus();\n\n const expandBtn = parent.returnFocusRef.current;\n parent.setExpandedItem(undefined);\n\n if (expandBtn) {\n setFocusReturnEl(expandBtn?.closest('li'));\n }\n\n onItemCollapse?.(parent.item.id);\n updateActiveDescendants();\n }\n }}\n >\n {parent && (\n <MenuListHeader\n text={parent.item.primary}\n onClick={() => {\n setOpen(false);\n }}\n />\n )}\n\n {list}\n </Drawer>\n\n {expandedItem && selfRef.current && (\n <MenuList\n items={expandedItem.items}\n parent={{\n el: selfRef.current,\n item: expandedItem,\n siblingItems: items,\n setExpandedItem,\n returnFocusRef\n }}\n />\n )}\n </>\n );\n }\n);\n\nexport default MenuList;\n"]}
|
|
@@ -34,7 +34,7 @@ export const StyledMetaListItem = styled.li(({ wrapItems }) => {
|
|
|
34
34
|
});
|
|
35
35
|
const MetaList = forwardRef((props, ref) => {
|
|
36
36
|
const { items, wrapItems = true, ...restProps } = props;
|
|
37
|
-
return (_jsx(Flex, { as: StyledMetaList, container: {
|
|
37
|
+
return (_jsx(Flex, { as: StyledMetaList, container: { colGap: 0.5, alignItems: 'center', wrap: wrapItems ? 'wrap' : 'nowrap' }, wrapItems: wrapItems, ref: ref, ...restProps, children: items.flatMap((item, i, arr) => item
|
|
38
38
|
? [
|
|
39
39
|
_jsx(Text, { as: StyledMetaListItem, variant: 'secondary', wrapItems: wrapItems, children: item }, `${i + 0}`)
|
|
40
40
|
].concat(i !== arr.length - 1
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetaList.js","sourceRoot":"","sources":["../../../src/components/MetaList/MetaList.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsD,UAAU,EAAE,MAAM,OAAO,CAAC;AACvF,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAe3B,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAyB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IAChF,OAAO,GAAG,CAAA;;;;MAIN,CAAC,SAAS;QACZ,GAAG,CAAA;;KAEF;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,EAAE,CAAyB,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;IACpF,OAAO,GAAG,CAAA;;;;MAIN,SAAS;QACX,GAAG,CAAA;;KAEF;;MAEC,CAAC,SAAS;QACZ,GAAG,CAAA;;;;KAIF;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoD,UAAU,CAC1E,CAAC,KAAqC,EAAE,GAAyB,EAAE,EAAE;IACnE,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,EAAE,GAAG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AG,EAAE,GAAG,KACJ,SAAS,YAEZ,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,CAC9B,IAAI;YACF,CAAC,CAAC;gBACE,KAAC,IAAI,IACH,EAAE,EAAE,kBAAkB,EAEtB,OAAO,EAAC,WAAW,EACnB,SAAS,EAAE,SAAS,YAEnB,IAAI,IAJA,GAAG,CAAC,GAAG,CAAC,EAAE,CAKV;aACR,CAAC,MAAM,CACN,CAAC,KAAK,GAAG,CAAC,MAAM,GAAG,CAAC;gBAClB,CAAC,CAAC;oBACE,KAAC,IAAI,IACH,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAC,WAAW,EAEhB,OAAO,EAAC,WAAW,wBADd,GAAG,CAAC,GAAG,CAAC,MAAM,CAId;iBACR;gBACH,CAAC,CAAC,EAAE,CACP;YACH,CAAC,CAAC,EAAE,CACP,WACI,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { FunctionComponent, ReactNode, Ref, PropsWithoutRef, forwardRef } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Text from '../Text';\nimport Flex from '../Flex';\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\n\nexport interface MetaListProps extends BaseProps, NoChildrenProp {\n /** Array of nodes or text to be rendered in the list. */\n items: ReactNode[];\n /**\n * If true, MetaList items that extend past the MetaList's container will wrap to a new line.\n * @default true\n */\n wrapItems?: boolean;\n /** Ref for the wrapping element. */\n ref?: Ref<HTMLUListElement>;\n}\n\nexport const StyledMetaList = styled.ul<{ wrapItems: boolean }>(({ wrapItems }) => {\n return css`\n list-style: none;\n overflow: hidden;\n\n ${!wrapItems &&\n css`\n white-space: nowrap;\n `}\n `;\n});\n\nexport const StyledMetaListItem = styled.li<{ wrapItems: boolean }>(({ wrapItems }) => {\n return css`\n min-width: 0;\n display: inline-block;\n\n ${wrapItems &&\n css`\n overflow-wrap: break-word;\n `}\n\n ${!wrapItems &&\n css`\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n `}\n `;\n});\n\nconst MetaList: FunctionComponent<MetaListProps & ForwardProps> = forwardRef(\n (props: PropsWithoutRef<MetaListProps>, ref: MetaListProps['ref']) => {\n const { items, wrapItems = true, ...restProps } = props;\n return (\n <Flex\n as={StyledMetaList}\n container={{ colGap: 0.5, alignItems: 'center', wrap: wrapItems ? 'wrap' : 'nowrap' }}\n wrapItems={wrapItems}\n ref={ref}\n {...restProps}\n >\n {items.flatMap((item, i, arr) =>\n item\n ? [\n <Text\n as={StyledMetaListItem}\n key={`${i + 0}`}\n variant='secondary'\n wrapItems={wrapItems}\n >\n {item}\n </Text>\n ].concat(\n i !== arr.length - 1\n ? [\n <Text\n as={StyledMetaListItem}\n role='separator'\n key={`${i + 0}-sep`}\n variant='secondary'\n >\n •\n </Text>\n ]\n : []\n )\n : []\n )}\n </Flex>\n );\n }\n);\n\nexport default MetaList;\n"]}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { RefObject } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* @example useItemIntersection(listRef,offset,() => { do_some_thing; });
|
|
4
|
-
* @param
|
|
4
|
+
* @param containerRef The ref of the List.
|
|
5
5
|
* @param offset Index of the list item which needs to be observed.
|
|
6
6
|
* @param cb Callback that needs to be fired on intersect
|
|
7
|
+
* @param itemSelector Selector used to get the node list of items
|
|
7
8
|
* @returns void.
|
|
8
9
|
*/
|
|
9
|
-
declare const useItemIntersection: (
|
|
10
|
+
declare const useItemIntersection: (containerRef: RefObject<HTMLElement>, offset: number, cb: () => void, itemSelector: string) => void;
|
|
10
11
|
export default useItemIntersection;
|
|
11
12
|
//# sourceMappingURL=useItemIntersection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useItemIntersection.d.ts","sourceRoot":"","sources":["../../src/hooks/useItemIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"useItemIntersection.d.ts","sourceRoot":"","sources":["../../src/hooks/useItemIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAE7C;;;;;;;GAOG;AAEH,QAAA,MAAM,mBAAmB,iBACT,UAAU,WAAW,CAAC,UAC5B,MAAM,MACV,MAAM,IAAI,gBACA,MAAM,SA6BrB,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,36 +1,37 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* @example useItemIntersection(listRef,offset,() => { do_some_thing; });
|
|
4
|
-
* @param
|
|
4
|
+
* @param containerRef The ref of the List.
|
|
5
5
|
* @param offset Index of the list item which needs to be observed.
|
|
6
6
|
* @param cb Callback that needs to be fired on intersect
|
|
7
|
+
* @param itemSelector Selector used to get the node list of items
|
|
7
8
|
* @returns void.
|
|
8
9
|
*/
|
|
9
|
-
const useItemIntersection = (
|
|
10
|
+
const useItemIntersection = (containerRef, offset, cb, itemSelector) => {
|
|
10
11
|
useEffect(() => {
|
|
11
|
-
if (
|
|
12
|
-
let
|
|
12
|
+
if (containerRef.current) {
|
|
13
|
+
let item = null;
|
|
13
14
|
if (offset > 0) {
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
|
|
15
|
+
const items = containerRef.current.querySelectorAll(itemSelector);
|
|
16
|
+
if (items.length > offset) {
|
|
17
|
+
item = items[offset];
|
|
17
18
|
}
|
|
18
19
|
}
|
|
19
|
-
if (
|
|
20
|
+
if (item) {
|
|
20
21
|
const intersectionObserver = new IntersectionObserver((entries) => {
|
|
21
22
|
if (entries[0].isIntersecting) {
|
|
22
23
|
cb();
|
|
23
24
|
}
|
|
24
25
|
}, {
|
|
25
|
-
root:
|
|
26
|
+
root: containerRef.current
|
|
26
27
|
});
|
|
27
|
-
intersectionObserver.observe(
|
|
28
|
+
intersectionObserver.observe(item);
|
|
28
29
|
return () => {
|
|
29
30
|
intersectionObserver.disconnect();
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
}, [cb,
|
|
34
|
+
}, [cb, containerRef.current, offset]);
|
|
34
35
|
};
|
|
35
36
|
export default useItemIntersection;
|
|
36
37
|
//# sourceMappingURL=useItemIntersection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useItemIntersection.js","sourceRoot":"","sources":["../../src/hooks/useItemIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C
|
|
1
|
+
{"version":3,"file":"useItemIntersection.js","sourceRoot":"","sources":["../../src/hooks/useItemIntersection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C;;;;;;;GAOG;AAEH,MAAM,mBAAmB,GAAG,CAC1B,YAAoC,EACpC,MAAc,EACd,EAAc,EACd,YAAoB,EACpB,EAAE;IACF,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,YAAY,CAAC,OAAO,EAAE;YACxB,IAAI,IAAI,GAAuB,IAAI,CAAC;YACpC,IAAI,MAAM,GAAG,CAAC,EAAE;gBACd,MAAM,KAAK,GAA4B,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;gBAC3F,IAAI,KAAK,CAAC,MAAM,GAAG,MAAM,EAAE;oBACzB,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;iBACtB;aACF;YACD,IAAI,IAAI,EAAE;gBACR,MAAM,oBAAoB,GAAG,IAAI,oBAAoB,CACnD,CAAC,OAAoC,EAAE,EAAE;oBACvC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE;wBAC7B,EAAE,EAAE,CAAC;qBACN;gBACH,CAAC,EACD;oBACE,IAAI,EAAE,YAAY,CAAC,OAAO;iBAC3B,CACF,CAAC;gBACF,oBAAoB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACnC,OAAO,GAAG,EAAE;oBACV,oBAAoB,CAAC,UAAU,EAAE,CAAC;gBACpC,CAAC,CAAC;aACH;SACF;IACH,CAAC,EAAE,CAAC,EAAE,EAAE,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC","sourcesContent":["import { RefObject, useEffect } from 'react';\n\n/**\n * @example useItemIntersection(listRef,offset,() => { do_some_thing; });\n * @param containerRef The ref of the List.\n * @param offset Index of the list item which needs to be observed.\n * @param cb Callback that needs to be fired on intersect\n * @param itemSelector Selector used to get the node list of items\n * @returns void.\n */\n\nconst useItemIntersection = (\n containerRef: RefObject<HTMLElement>,\n offset: number,\n cb: () => void,\n itemSelector: string\n) => {\n useEffect(() => {\n if (containerRef.current) {\n let item: HTMLElement | null = null;\n if (offset > 0) {\n const items: NodeListOf<HTMLElement> = containerRef.current.querySelectorAll(itemSelector);\n if (items.length > offset) {\n item = items[offset];\n }\n }\n if (item) {\n const intersectionObserver = new IntersectionObserver(\n (entries: IntersectionObserverEntry[]) => {\n if (entries[0].isIntersecting) {\n cb();\n }\n },\n {\n root: containerRef.current\n }\n );\n intersectionObserver.observe(item);\n return () => {\n intersectionObserver.disconnect();\n };\n }\n }\n }, [cb, containerRef.current, offset]);\n};\n\nexport default useItemIntersection;\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -55,6 +55,8 @@ export { default as Grid } from './components/Grid';
|
|
|
55
55
|
export * from './components/Grid';
|
|
56
56
|
export { default as Icon } from './components/Icon';
|
|
57
57
|
export * from './components/Icon';
|
|
58
|
+
export { default as IconPicker } from './components/IconPicker';
|
|
59
|
+
export * from './components/IconPicker';
|
|
58
60
|
export { default as Image } from './components/Image';
|
|
59
61
|
export * from './components/Image';
|
|
60
62
|
export { default as Input } from './components/Input';
|
package/lib/index.d.ts.map
CH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CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -56,6 +56,8 @@ export { default as Grid } from './components/Grid';
|
|
|
56
56
|
export * from './components/Grid';
|
|
57
57
|
export { default as Icon } from './components/Icon';
|
|
58
58
|
export * from './components/Icon';
|
|
59
|
+
export { default as IconPicker } from './components/IconPicker';
|
|
60
|
+
export * from './components/IconPicker';
|
|
59
61
|
export { default as Image } from './components/Image';
|
|
60
62
|
export * from './components/Image';
|
|
61
63
|
export { default as Input } from './components/Input';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,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C;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as Actions } from './components/Actions';\nexport * from './components/Actions';\nexport { default as AppShell } from './components/AppShell';\nexport * from './components/AppShell';\nexport { default as Avatar } from './components/Avatar';\nexport * from './components/Avatar';\nexport { default as Backdrop } from './components/Backdrop';\nexport * from './components/Backdrop';\nexport * from './components/Badges';\nexport { default as Banner } from './components/Banner';\nexport * from './components/Banner';\nexport * from './components/Boolean';\nexport { default as Breadcrumbs } from './components/Breadcrumbs';\nexport * from './components/Breadcrumbs';\nexport { default as Button } from './components/Button';\nexport * from './components/Button';\nexport { default as Card } from './components/Card';\nexport * from './components/Card';\nexport { default as Checkbox } from './components/Checkbox';\nexport * from './components/Checkbox';\nexport { default as CheckboxGroup } from './components/CheckboxGroup';\nexport { default as ColorPicker } from './components/ColorPicker';\nexport * from './components/ColorPicker';\nexport { default as ComboBox } from './components/ComboBox';\nexport * from './components/ComboBox';\nexport { default as Configuration } from './components/Configuration';\nexport * from './components/Configuration';\nexport * from './components/Currency';\nexport * from './components/DateTime';\nexport { default as Drawer } from './components/Drawer';\nexport * from './components/Drawer';\nexport * from './components/Email';\nexport { default as EmojiPicker } from './components/EmojiPicker';\nexport * from './components/EmojiPicker';\nexport { default as EmptyState } from './components/EmptyState';\nexport * from './components/EmptyState';\nexport { default as ErrorState } from './components/ErrorState';\nexport * from './components/ErrorState';\nexport { default as ExpandCollapse } from './components/ExpandCollapse';\nexport * from './components/ExpandCollapse';\nexport { default as FieldGroup } from './components/FieldGroup';\nexport * from './components/FieldGroup';\nexport { default as FieldValueList } from './components/FieldValueList';\nexport * from './components/FieldValueList';\nexport * from './components/File';\nexport { default as Flex } from './components/Flex';\nexport * from './components/Flex';\nexport { default as Form } from './components/Form';\nexport * from './components/Form';\nexport { default as FormControl } from './components/FormControl';\nexport * from './components/FormControl';\nexport { default as FormField } from './components/FormField';\nexport * from './components/FormField';\nexport { default as Grid } from './components/Grid';\nexport * from './components/Grid';\nexport { default as Icon } from './components/Icon';\nexport * from './components/Icon';\nexport { default as Image } from './components/Image';\nexport * from './components/Image';\nexport { default as Input } from './components/Input';\nexport * from './components/Input';\nexport { default as Label } from './components/Label';\nexport * from './components/Label';\nexport { default as Lightbox } from './components/Lightbox';\nexport * from './components/Lightbox';\nexport { default as Link } from './components/Link';\nexport * from './components/Link';\nexport * from './components/List';\nexport * from './components/Location';\nexport { default as Menu } from './components/Menu';\nexport * from './components/Menu';\nexport { default as MenuButton } from './components/MenuButton';\nexport * from './components/MenuButton';\nexport { default as MetaList } from './components/MetaList';\nexport * from './components/MetaList';\nexport { default as Modal } from './components/Modal';\nexport * from './components/Modal';\nexport { default as MultiStep } from './components/MultiStep';\nexport * from './components/MultiStep';\nexport * from './components/Number';\nexport * from './components/PageTemplates';\nexport { default as Pagination } from './components/Pagination';\nexport * from './components/Pagination';\nexport * from './components/Paragraph';\nexport * from './components/Phone';\nexport { default as Popover } from './components/Popover';\nexport * from './components/Popover';\nexport { default as Progress } from './components/Progress';\nexport * from './components/Progress';\nexport { default as RadioButton } from './components/RadioButton';\nexport * from './components/RadioButton';\nexport { default as RadioButtonGroup } from './components/RadioButtonGroup';\nexport { default as RadioCheck } from './components/RadioCheck';\nexport * from './components/RadioCheck';\nexport { default as RadioCheckGroup } from './components/RadioCheckGroup';\nexport * from './components/RadioCheckGroup';\nexport { default as Rating } from './components/Rating';\nexport * from './components/Rating';\nexport { default as SearchInput } from './components/SearchInput';\nexport * from './components/SearchInput';\nexport { default as Select } from './components/Select';\nexport * from './components/Select';\nexport { default as Sentiment } from './components/Sentiment';\nexport * from './components/Sentiment';\nexport * from './components/Skeleton';\nexport { default as Slider } from './components/Slider';\nexport * from './components/Slider';\nexport { default as SummaryItem } from './components/SummaryItem';\nexport * from './components/SummaryItem';\nexport { default as SummaryList } from './components/SummaryList';\nexport * from './components/SummaryList';\nexport { default as Switch } from './components/Switch';\nexport * from './components/Switch';\nexport { default as Table } from './components/Table';\nexport * from './components/Table';\nexport { default as Tabs } from './components/Tabs';\nexport * from './components/Tabs';\nexport { default as Text } from './components/Text';\nexport * from './components/Text';\nexport { default as TextArea } from './components/TextArea';\nexport * from './components/TextArea';\nexport { default as Toaster } from './components/Toaster';\nexport * from './components/Toaster';\nexport { default as Tooltip } from './components/Tooltip';\nexport * from './components/Tooltip';\nexport { default as Tree } from './components/Tree';\nexport * from './components/Tree';\nexport * from './components/URL';\nexport { default as VisuallyHiddenText } from './components/VisuallyHiddenText';\nexport * from './hooks';\nexport * from './i18n';\nexport * from './styles';\nexport * from './theme';\nexport * from './types';\nexport * from './utils';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,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M,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC1D,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAChF,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC","sourcesContent":["// This file is autogenerated. Any changes will be overwritten.\nexport { default as Actions } from './components/Actions';\nexport * from './components/Actions';\nexport { default as AppShell } from './components/AppShell';\nexport * from './components/AppShell';\nexport { default as Avatar } from './components/Avatar';\nexport * from './components/Avatar';\nexport { default as Backdrop } from './components/Backdrop';\nexport * from './components/Backdrop';\nexport * from './components/Badges';\nexport { default as Banner } from './components/Banner';\nexport * from './components/Banner';\nexport * from './components/Boolean';\nexport { default as Breadcrumbs } from './components/Breadcrumbs';\nexport * from './components/Breadcrumbs';\nexport { default as Button } from './components/Button';\nexport * from './components/Button';\nexport { default as Card } from './components/Card';\nexport * from './components/Card';\nexport { default as Checkbox } from './components/Checkbox';\nexport * from './components/Checkbox';\nexport { default as CheckboxGroup } from './components/CheckboxGroup';\nexport { default as ColorPicker } from './components/ColorPicker';\nexport * from './components/ColorPicker';\nexport { default as ComboBox } from './components/ComboBox';\nexport * from './components/ComboBox';\nexport { default as Configuration } from './components/Configuration';\nexport * from './components/Configuration';\nexport * from './components/Currency';\nexport * from './components/DateTime';\nexport { default as Drawer } from './components/Drawer';\nexport * from './components/Drawer';\nexport * from './components/Email';\nexport { default as EmojiPicker } from './components/EmojiPicker';\nexport * from './components/EmojiPicker';\nexport { default as EmptyState } from './components/EmptyState';\nexport * from './components/EmptyState';\nexport { default as ErrorState } from './components/ErrorState';\nexport * from './components/ErrorState';\nexport { default as ExpandCollapse } from './components/ExpandCollapse';\nexport * from './components/ExpandCollapse';\nexport { default as FieldGroup } from './components/FieldGroup';\nexport * from './components/FieldGroup';\nexport { default as FieldValueList } from './components/FieldValueList';\nexport * from './components/FieldValueList';\nexport * from './components/File';\nexport { default as Flex } from './components/Flex';\nexport * from './components/Flex';\nexport { default as Form } from './components/Form';\nexport * from './components/Form';\nexport { default as FormControl } from './components/FormControl';\nexport * from './components/FormControl';\nexport { default as FormField } from './components/FormField';\nexport * from './components/FormField';\nexport { default as Grid } from './components/Grid';\nexport * from './components/Grid';\nexport { default as Icon } from './components/Icon';\nexport * from './components/Icon';\nexport { default as IconPicker } from './components/IconPicker';\nexport * from './components/IconPicker';\nexport { default as Image } from './components/Image';\nexport * from './components/Image';\nexport { default as Input } from './components/Input';\nexport * from './components/Input';\nexport { default as Label } from './components/Label';\nexport * from './components/Label';\nexport { default as Lightbox } from './components/Lightbox';\nexport * from './components/Lightbox';\nexport { default as Link } from './components/Link';\nexport * from './components/Link';\nexport * from './components/List';\nexport * from './components/Location';\nexport { default as Menu } from './components/Menu';\nexport * from './components/Menu';\nexport { default as MenuButton } from './components/MenuButton';\nexport * from './components/MenuButton';\nexport { default as MetaList } from './components/MetaList';\nexport * from './components/MetaList';\nexport { default as Modal } from './components/Modal';\nexport * from './components/Modal';\nexport { default as MultiStep } from './components/MultiStep';\nexport * from './components/MultiStep';\nexport * from './components/Number';\nexport * from './components/PageTemplates';\nexport { default as Pagination } from './components/Pagination';\nexport * from './components/Pagination';\nexport * from './components/Paragraph';\nexport * from './components/Phone';\nexport { default as Popover } from './components/Popover';\nexport * from './components/Popover';\nexport { default as Progress } from './components/Progress';\nexport * from './components/Progress';\nexport { default as RadioButton } from './components/RadioButton';\nexport * from './components/RadioButton';\nexport { default as RadioButtonGroup } from './components/RadioButtonGroup';\nexport { default as RadioCheck } from './components/RadioCheck';\nexport * from './components/RadioCheck';\nexport { default as RadioCheckGroup } from './components/RadioCheckGroup';\nexport * from './components/RadioCheckGroup';\nexport { default as Rating } from './components/Rating';\nexport * from './components/Rating';\nexport { default as SearchInput } from './components/SearchInput';\nexport * from './components/SearchInput';\nexport { default as Select } from './components/Select';\nexport * from './components/Select';\nexport { default as Sentiment } from './components/Sentiment';\nexport * from './components/Sentiment';\nexport * from './components/Skeleton';\nexport { default as Slider } from './components/Slider';\nexport * from './components/Slider';\nexport { default as SummaryItem } from './components/SummaryItem';\nexport * from './components/SummaryItem';\nexport { default as SummaryList } from './components/SummaryList';\nexport * from './components/SummaryList';\nexport { default as Switch } from './components/Switch';\nexport * from './components/Switch';\nexport { default as Table } from './components/Table';\nexport * from './components/Table';\nexport { default as Tabs } from './components/Tabs';\nexport * from './components/Tabs';\nexport { default as Text } from './components/Text';\nexport * from './components/Text';\nexport { default as TextArea } from './components/TextArea';\nexport * from './components/TextArea';\nexport { default as Toaster } from './components/Toaster';\nexport * from './components/Toaster';\nexport { default as Tooltip } from './components/Tooltip';\nexport * from './components/Tooltip';\nexport { default as Tree } from './components/Tree';\nexport * from './components/Tree';\nexport * from './components/URL';\nexport { default as VisuallyHiddenText } from './components/VisuallyHiddenText';\nexport * from './hooks';\nexport * from './i18n';\nexport * from './styles';\nexport * from './theme';\nexport * from './types';\nexport * from './utils';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pega/cosmos-react-core",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Cosmos is a visual design system and UI component collection. Its goal is to empower application developers in their pursuit to create engaging and rewarding user experiences.",
|
|
5
5
|
"author": "Pegasystems",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|