@wireapp/react-ui-kit 9.53.0 → 9.54.1
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/Form/Select/BaseSelect/BaseSelect.styles.d.ts +46 -0
- package/lib/Form/Select/BaseSelect/BaseSelect.styles.d.ts.map +1 -0
- package/lib/Form/Select/BaseSelect/BaseSelect.styles.js +160 -0
- package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.d.ts +3 -0
- package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.d.ts.map +1 -0
- package/lib/Form/Select/BaseSelect/BaseSelectDropdownIndicator.js +29 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.d.ts +26 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.d.ts.map +1 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.js +44 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.d.ts +35 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.d.ts.map +1 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.stories.js +115 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.d.ts +18 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.d.ts.map +1 -0
- package/lib/Form/Select/ComboboxSelect/ComboboxSelect.styles.js +118 -0
- package/lib/Form/Select/Select.d.ts.map +1 -0
- package/lib/Form/{Select.js → Select/Select.js} +19 -13
- package/lib/Form/Select/Select.stories.d.ts +110 -0
- package/lib/Form/Select/Select.stories.d.ts.map +1 -0
- package/lib/Form/{Select.stories.js → Select/Select.stories.js} +8 -19
- package/lib/Form/Select/Select.styles.d.ts +14 -0
- package/lib/Form/Select/Select.styles.d.ts.map +1 -0
- package/lib/Form/Select/Select.styles.js +91 -0
- package/lib/Form/Select/SelectContainer/SelectContainer.d.ts +3 -0
- package/lib/Form/Select/SelectContainer/SelectContainer.d.ts.map +1 -0
- package/lib/Form/Select/SelectContainer/SelectContainer.js +28 -0
- package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.d.ts +4 -0
- package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.d.ts.map +1 -0
- package/lib/Form/Select/SelectIndicatorsContainer/SelectIndicatorsContainer.js +29 -0
- package/lib/Form/Select/SelectMenu/SelectMenu.d.ts +4 -0
- package/lib/Form/Select/SelectMenu/SelectMenu.d.ts.map +1 -0
- package/lib/Form/Select/SelectMenu/SelectMenu.js +13 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.d.ts +6 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.d.ts.map +1 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.js +39 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.styles.d.ts +5 -0
- package/lib/Form/Select/SelectMenuList/SelectMenuList.styles.d.ts.map +1 -0
- package/lib/Form/{SelectComponents.styles.js → Select/SelectMenuList/SelectMenuList.styles.js} +5 -5
- package/lib/Form/Select/SelectOption/SelectOption.d.ts +5 -0
- package/lib/Form/Select/SelectOption/SelectOption.d.ts.map +1 -0
- package/lib/Form/Select/SelectOption/SelectOption.js +53 -0
- package/lib/Form/Select/SelectValueContainer/SelectValueContainer.d.ts +4 -0
- package/lib/Form/Select/SelectValueContainer/SelectValueContainer.d.ts.map +1 -0
- package/lib/Form/Select/SelectValueContainer/SelectValueContainer.js +21 -0
- package/lib/Form/index.d.ts +2 -1
- package/lib/Form/index.d.ts.map +1 -1
- package/lib/Form/index.js +2 -1
- package/package.json +3 -3
- package/lib/Form/Select.d.ts.map +0 -1
- package/lib/Form/Select.stories.d.ts +0 -16
- package/lib/Form/Select.stories.d.ts.map +0 -1
- package/lib/Form/SelectComponents.d.ts +0 -16
- package/lib/Form/SelectComponents.d.ts.map +0 -1
- package/lib/Form/SelectComponents.js +0 -93
- package/lib/Form/SelectComponents.styles.d.ts +0 -5
- package/lib/Form/SelectComponents.styles.d.ts.map +0 -1
- package/lib/Form/SelectStyles.d.ts +0 -2802
- package/lib/Form/SelectStyles.d.ts.map +0 -1
- package/lib/Form/SelectStyles.js +0 -227
- /package/lib/Form/{Select.d.ts → Select/Select.d.ts} +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectValueContainer = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
+
const react_select_1 = require("react-select");
|
|
6
|
+
const SelectValueContainer = ({ children, ...restProps }) => ((0, jsx_runtime_1.jsxs)(react_select_1.components.ValueContainer, { ...restProps, children: [renderValue(children[0]), " ", children[1]] }));
|
|
7
|
+
exports.SelectValueContainer = SelectValueContainer;
|
|
8
|
+
const renderValue = (value) => {
|
|
9
|
+
if (Array.isArray(value)) {
|
|
10
|
+
const currentValue = (i) => value[i].props.children;
|
|
11
|
+
return ((0, jsx_runtime_1.jsx)("div", { css: {
|
|
12
|
+
whiteSpace: 'nowrap',
|
|
13
|
+
overflow: 'hidden',
|
|
14
|
+
textOverflow: 'ellipsis',
|
|
15
|
+
minWidth: 0,
|
|
16
|
+
paddingRight: 14,
|
|
17
|
+
gridArea: '1/1/2/3',
|
|
18
|
+
}, children: currentValue(0) }));
|
|
19
|
+
}
|
|
20
|
+
return value;
|
|
21
|
+
};
|
package/lib/Form/index.d.ts
CHANGED
|
@@ -11,7 +11,8 @@ export * from './InputBlock';
|
|
|
11
11
|
export * from './InputSubmitCombo';
|
|
12
12
|
export * from './RangeInput';
|
|
13
13
|
export * from './RoundIconButton';
|
|
14
|
-
export * from './Select';
|
|
14
|
+
export * from './Select/Select';
|
|
15
|
+
export * from './Select/ComboboxSelect/ComboboxSelect';
|
|
15
16
|
export * from './ShakeBox';
|
|
16
17
|
export * from './Switch';
|
|
17
18
|
export * from './TextArea';
|
package/lib/Form/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Form/index.ts"],"names":[],"mappings":"AAmBA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Form/index.ts"],"names":[],"mappings":"AAmBA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wCAAwC,CAAC;AACvD,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC"}
|
package/lib/Form/index.js
CHANGED
|
@@ -45,7 +45,8 @@ __exportStar(require("./InputBlock"), exports);
|
|
|
45
45
|
__exportStar(require("./InputSubmitCombo"), exports);
|
|
46
46
|
__exportStar(require("./RangeInput"), exports);
|
|
47
47
|
__exportStar(require("./RoundIconButton"), exports);
|
|
48
|
-
__exportStar(require("./Select"), exports);
|
|
48
|
+
__exportStar(require("./Select/Select"), exports);
|
|
49
|
+
__exportStar(require("./Select/ComboboxSelect/ComboboxSelect"), exports);
|
|
49
50
|
__exportStar(require("./ShakeBox"), exports);
|
|
50
51
|
__exportStar(require("./Switch"), exports);
|
|
51
52
|
__exportStar(require("./TextArea"), exports);
|
package/package.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@types/color": "3.0.6",
|
|
13
13
|
"color": "4.2.3",
|
|
14
14
|
"emotion-normalize": "11.0.1",
|
|
15
|
-
"react-select": "5.
|
|
15
|
+
"react-select": "5.10.1",
|
|
16
16
|
"react-transition-group": "4.4.5"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
@@ -78,6 +78,6 @@
|
|
|
78
78
|
"test:watch": "jest --watch",
|
|
79
79
|
"test:update": "jest --updateSnapshot"
|
|
80
80
|
},
|
|
81
|
-
"version": "9.
|
|
82
|
-
"gitHead": "
|
|
81
|
+
"version": "9.54.1",
|
|
82
|
+
"gitHead": "9a03e450b8c2608ec02c595d7b39fb5cfa260c74"
|
|
83
83
|
}
|
package/lib/Form/Select.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Form/Select.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,YAAY,EAAC,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAC,SAAS,EAAW,MAAM,gBAAgB,CAAC;AACnD,OAAoB,EAAC,SAAS,EAAe,MAAM,cAAc,CAAC;AAClE,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,iDAAiD,CAAC;AAkBvF,MAAM,MAAM,MAAM,GAAG;IACnB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,WAAW,WAAW,CAAC,OAAO,SAAS,OAAO,EAAE,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,CACnF,SAAQ,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,MAAM,GAAI,OAAO,SAAS,OAAO,UAAU,KAAK,SAAS,SAAS,CAAC,MAAM,CAAC,yOAmBpF,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,qDAuE7B,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { StoryObj } from '@storybook/react';
|
|
2
|
-
declare const meta: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: <IsMulti extends boolean = false, Group extends import("react-select").GroupBase<import("./Select").Option> = import("react-select").GroupBase<import("./Select").Option>>({ id, label, error, helperText, disabled, dataUieName, options, isMulti, wrapperCSS, menuCSS, selectControlCSS, selectContainerCSS, markInvalid, required, isSearchable, overlayMenu, menuListHeading, ...props }: import("./Select").SelectProps<IsMulti, Group>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
-
parameters: {
|
|
6
|
-
layout: string;
|
|
7
|
-
};
|
|
8
|
-
tags: string[];
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Default: Story;
|
|
13
|
-
export declare const WithLabel: Story;
|
|
14
|
-
export declare const Invalid: Story;
|
|
15
|
-
export declare const Disabled: Story;
|
|
16
|
-
//# sourceMappingURL=Select.stories.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../src/Form/Select.stories.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAO,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAWrD,QAAA,MAAM,IAAI;;;;;;;CAOqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/react';
|
|
2
|
-
import { ContainerProps, DropdownIndicatorProps, OptionProps, ValueContainerProps, IndicatorsContainerProps, MenuProps, GroupBase, OptionsOrGroups, MenuListProps } from 'react-select';
|
|
3
|
-
import { Option } from './Select';
|
|
4
|
-
export declare const SelectContainer: (props: ContainerProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare const isGroup: (options: OptionsOrGroups<Option, GroupBase<Option>>) => options is GroupBase<Option>[];
|
|
6
|
-
export declare const DropdownIndicator: (props: DropdownIndicatorProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
-
export declare const CustomOption: (dataUieName: string) => (props: OptionProps<Option>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
8
|
-
export declare const Menu: (dataUieName: string, css?: CSSObject) => (props: MenuProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const MenuList: {
|
|
10
|
-
(menuListHeading: string, dataUieName: string): (props: MenuListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const renderValue: (value: any) => any;
|
|
14
|
-
export declare const ValueContainer: ({ children, ...restProps }: ValueContainerProps<Option>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
-
export declare const IndicatorsContainer: ({ children, ...restProps }: IndicatorsContainerProps<Option>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
16
|
-
//# sourceMappingURL=SelectComponents.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectComponents.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAEL,cAAc,EACd,sBAAsB,EACtB,WAAW,EACX,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,SAAS,EACT,eAAe,EACf,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAShC,eAAO,MAAM,eAAe,UAAW,cAAc,qDAMpD,CAAC;AAEF,eAAO,MAAM,OAAO,YAAa,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,KAAG,OAAO,IAAI,SAAS,CAAC,MAAM,CAAC,EAEzG,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAW,sBAAsB,qDAS9D,CAAC;AAGF,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,WAAW,CAAC,MAAM,CAAC,qDAsD/E,CAAC;AAGF,eAAO,MAAM,IAAI,gBAAiB,MAAM,QAAQ,SAAS,aAAa,SAAS,qDAc9E,CAAC;AAGF,eAAO,MAAM,QAAQ;sBAAqB,MAAM,eAAe,MAAM,WAAa,aAAa;;CA0B9F,CAAC;AAGF,eAAO,MAAM,WAAW,qBAqBvB,CAAC;AAEF,eAAO,MAAM,cAAc,+BAA8B,mBAAmB,CAAC,MAAM,CAAC,qDAInF,CAAC;AAEF,eAAO,MAAM,mBAAmB,+BAA8B,wBAAwB,CAAC,MAAM,CAAC,qDAW7F,CAAC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IndicatorsContainer = exports.ValueContainer = exports.renderValue = exports.MenuList = exports.Menu = exports.CustomOption = exports.DropdownIndicator = exports.isGroup = exports.SelectContainer = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
5
|
-
const react_select_1 = require("react-select");
|
|
6
|
-
const SelectComponents_styles_1 = require("./SelectComponents.styles");
|
|
7
|
-
const Icon_1 = require("../Icon");
|
|
8
|
-
const ArrowDown_1 = require("../Icon/ArrowDown");
|
|
9
|
-
const enums_1 = require("../types/enums");
|
|
10
|
-
// SelectContainer
|
|
11
|
-
const SelectContainer = (props) => {
|
|
12
|
-
return ((0, jsx_runtime_1.jsx)(react_select_1.components.SelectContainer, { ...props, children: (0, jsx_runtime_1.jsx)("div", { tabIndex: enums_1.TabIndex.FOCUSABLE, children: props.children }) }));
|
|
13
|
-
};
|
|
14
|
-
exports.SelectContainer = SelectContainer;
|
|
15
|
-
const isGroup = (options) => {
|
|
16
|
-
return options?.length > 0 && 'options' in options[0];
|
|
17
|
-
};
|
|
18
|
-
exports.isGroup = isGroup;
|
|
19
|
-
const DropdownIndicator = (props) => {
|
|
20
|
-
const { menuIsOpen } = props.selectProps;
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(react_select_1.components.DropdownIndicator, { ...props, children: (0, jsx_runtime_1.jsx)(ArrowDown_1.ArrowDown, { css: { ...(menuIsOpen ? { transform: 'rotateX(180deg)', marginTop: 2 } : { marginTop: 4 }) } }) }));
|
|
22
|
-
};
|
|
23
|
-
exports.DropdownIndicator = DropdownIndicator;
|
|
24
|
-
// eslint-disable-next-line react/display-name
|
|
25
|
-
const CustomOption = (dataUieName) => (props) => {
|
|
26
|
-
const { children, data, isMulti, isSelected, options } = props;
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(react_select_1.components.Option, { ...props, children: (0, jsx_runtime_1.jsxs)("div", { css: {
|
|
28
|
-
...((isMulti || (0, exports.isGroup)(options)) && {
|
|
29
|
-
display: 'grid',
|
|
30
|
-
gridTemplateAreas: `"checkbox label"
|
|
31
|
-
". description"`,
|
|
32
|
-
gridTemplateColumns: '22px 1fr',
|
|
33
|
-
columnGap: (0, exports.isGroup)(options) ? '5px' : '10px',
|
|
34
|
-
}),
|
|
35
|
-
}, ...(dataUieName && {
|
|
36
|
-
'data-uie-name': `option-${dataUieName}`,
|
|
37
|
-
'data-uie-value': options.find(option => option.label === children)?.value,
|
|
38
|
-
'data-uie-selected': isSelected,
|
|
39
|
-
}), children: [isMulti && ((0, jsx_runtime_1.jsx)("input", { type: "checkbox", checked: isSelected, onChange: () => null, css: { gridArea: 'checkbox', width: 22, height: 22, cursor: 'pointer', placeSelf: 'center' } })), (0, exports.isGroup)(options) && (
|
|
40
|
-
//includes a checkmark character if it is selected and a group
|
|
41
|
-
(0, jsx_runtime_1.jsx)("div", { css: { width: 22, height: 22, cursor: 'pointer', placeSelf: 'center' }, children: isSelected ? (0, jsx_runtime_1.jsx)(Icon_1.CheckIcon, {}) : null })), (0, jsx_runtime_1.jsx)("div", { css: { gridArea: 'label', overflowWrap: 'break-word', overflow: 'hidden' }, children: children }), data && data.description && ((0, jsx_runtime_1.jsx)("p", { css: (theme) => ({
|
|
42
|
-
marginBottom: 0,
|
|
43
|
-
fontSize: theme.fontSizes.medium,
|
|
44
|
-
color: isSelected ? theme.Select.focusedDescriptionColor : theme.Input.labelColor,
|
|
45
|
-
gridArea: 'description',
|
|
46
|
-
}), children: data.description }))] }) }));
|
|
47
|
-
};
|
|
48
|
-
exports.CustomOption = CustomOption;
|
|
49
|
-
// eslint-disable-next-line react/display-name
|
|
50
|
-
const Menu = (dataUieName, css) => (props) => {
|
|
51
|
-
const { children } = props;
|
|
52
|
-
return ((0, jsx_runtime_1.jsx)(react_select_1.components.Menu, { ...props, css: css, children: (0, jsx_runtime_1.jsx)("div", { ...(dataUieName && {
|
|
53
|
-
'data-uie-name': `dropdown-${dataUieName}`,
|
|
54
|
-
}), children: children }) }));
|
|
55
|
-
};
|
|
56
|
-
exports.Menu = Menu;
|
|
57
|
-
// eslint-disable-next-line react/display-name
|
|
58
|
-
const MenuList = (menuListHeading, dataUieName) => (props) => {
|
|
59
|
-
const { selectProps, children } = props;
|
|
60
|
-
const handleClose = () => {
|
|
61
|
-
if (selectProps && selectProps.onMenuClose) {
|
|
62
|
-
selectProps.onMenuClose();
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
return ((0, jsx_runtime_1.jsx)(react_select_1.components.MenuList, { ...props, children: (0, jsx_runtime_1.jsxs)("div", { ...(dataUieName && {
|
|
66
|
-
'data-uie-name': `menu-list-${dataUieName}`,
|
|
67
|
-
}), children: [(0, jsx_runtime_1.jsxs)("div", { css: (theme) => (0, SelectComponents_styles_1.menuListHeadingContainerStyles)(theme), children: [menuListHeading, (0, jsx_runtime_1.jsx)("button", { onClick: handleClose, css: SelectComponents_styles_1.menuListCloseButtonStyles, "aria-label": `Close: ${menuListHeading}`, children: (0, jsx_runtime_1.jsx)(Icon_1.CloseIcon, { width: 16, height: 16 }) })] }), children] }) }));
|
|
68
|
-
};
|
|
69
|
-
exports.MenuList = MenuList;
|
|
70
|
-
exports.MenuList.displayName = 'MenuList';
|
|
71
|
-
const renderValue = value => {
|
|
72
|
-
if (Array.isArray(value)) {
|
|
73
|
-
const currentValue = (i) => value[i].props.children;
|
|
74
|
-
return ((0, jsx_runtime_1.jsx)("div", { css: {
|
|
75
|
-
whiteSpace: 'nowrap',
|
|
76
|
-
overflow: 'hidden',
|
|
77
|
-
textOverflow: 'ellipsis',
|
|
78
|
-
minWidth: 0,
|
|
79
|
-
paddingRight: 14,
|
|
80
|
-
gridArea: '1/1/2/3',
|
|
81
|
-
}, children: currentValue(0) }));
|
|
82
|
-
}
|
|
83
|
-
return value;
|
|
84
|
-
};
|
|
85
|
-
exports.renderValue = renderValue;
|
|
86
|
-
const ValueContainer = ({ children, ...restProps }) => ((0, jsx_runtime_1.jsxs)(react_select_1.components.ValueContainer, { ...restProps, children: [(0, exports.renderValue)(children[0]), " ", children[1]] }));
|
|
87
|
-
exports.ValueContainer = ValueContainer;
|
|
88
|
-
const IndicatorsContainer = ({ children, ...restProps }) => {
|
|
89
|
-
const value = restProps.getValue();
|
|
90
|
-
const displaySelectedOptionsCount = Array.isArray(value) && value.length > 1;
|
|
91
|
-
return ((0, jsx_runtime_1.jsxs)(react_select_1.components.IndicatorsContainer, { ...restProps, children: [displaySelectedOptionsCount && (0, jsx_runtime_1.jsxs)("div", { css: { fontWeight: 600 }, children: ["(+", value.length - 1, ")"] }), children] }));
|
|
92
|
-
};
|
|
93
|
-
exports.IndicatorsContainer = IndicatorsContainer;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { CSSObject } from '@emotion/react';
|
|
2
|
-
import { Theme } from '../Theme/Theme';
|
|
3
|
-
export declare const menuListHeadingContainerStyles: (theme: Theme) => CSSObject;
|
|
4
|
-
export declare const menuListCloseButtonStyles: CSSObject;
|
|
5
|
-
//# sourceMappingURL=SelectComponents.styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SelectComponents.styles.d.ts","sourceRoot":"","sources":["../../src/Form/SelectComponents.styles.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAC,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAErC,eAAO,MAAM,8BAA8B,UAAW,KAAK,KAAG,SAO5D,CAAC;AAEH,eAAO,MAAM,yBAAyB,EAAE,SAOvC,CAAC"}
|