@elliemae/ds-form-combobox 3.70.0-next.4 → 3.70.0-next.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ComboBox.js +9 -1
- package/dist/cjs/ComboBox.js.map +2 -2
- package/dist/cjs/TruncatedTooltipText.js +4 -2
- package/dist/cjs/TruncatedTooltipText.js.map +2 -2
- package/dist/cjs/parts/DropdownIndicator.js +2 -2
- package/dist/cjs/parts/DropdownIndicator.js.map +2 -2
- package/dist/cjs/parts/LiveRegion.js +13 -1
- package/dist/cjs/parts/LiveRegion.js.map +2 -2
- package/dist/cjs/parts/Section.js +5 -6
- package/dist/cjs/parts/Section.js.map +2 -2
- package/dist/cjs/parts/container/Container.js +9 -13
- package/dist/cjs/parts/container/Container.js.map +2 -2
- package/dist/cjs/parts/controls/Controls.js +19 -9
- package/dist/cjs/parts/controls/Controls.js.map +2 -2
- package/dist/cjs/parts/controls/styled.js +18 -8
- package/dist/cjs/parts/controls/styled.js.map +2 -2
- package/dist/cjs/parts/controls-input/ControlsInput.js +14 -2
- package/dist/cjs/parts/controls-input/ControlsInput.js.map +2 -2
- package/dist/cjs/parts/controls-input/styled.js +23 -9
- package/dist/cjs/parts/controls-input/styled.js.map +2 -2
- package/dist/cjs/parts/menu-list/LoadingContainer.js +24 -1
- package/dist/cjs/parts/menu-list/LoadingContainer.js.map +2 -2
- package/dist/cjs/parts/menu-list/MenuList.js +3 -2
- package/dist/cjs/parts/menu-list/MenuList.js.map +2 -2
- package/dist/cjs/parts/menu-list/SkeletonContainer.js +20 -1
- package/dist/cjs/parts/menu-list/SkeletonContainer.js.map +2 -2
- package/dist/cjs/parts/menu-list/styled.js +7 -3
- package/dist/cjs/parts/menu-list/styled.js.map +2 -2
- package/dist/cjs/parts/menu-list/useItemRenderer.js +3 -3
- package/dist/cjs/parts/menu-list/useItemRenderer.js.map +2 -2
- package/dist/cjs/parts/multi-selected-values-container/RemovableSelectedValuePill.js +1 -0
- package/dist/cjs/parts/multi-selected-values-container/RemovableSelectedValuePill.js.map +2 -2
- package/dist/cjs/parts/styled.js +5 -1
- package/dist/cjs/parts/styled.js.map +2 -2
- package/dist/esm/ComboBox.js +10 -2
- package/dist/esm/ComboBox.js.map +2 -2
- package/dist/esm/TruncatedTooltipText.js +4 -2
- package/dist/esm/TruncatedTooltipText.js.map +2 -2
- package/dist/esm/parts/DropdownIndicator.js +3 -3
- package/dist/esm/parts/DropdownIndicator.js.map +2 -2
- package/dist/esm/parts/LiveRegion.js +13 -1
- package/dist/esm/parts/LiveRegion.js.map +2 -2
- package/dist/esm/parts/Section.js +5 -6
- package/dist/esm/parts/Section.js.map +2 -2
- package/dist/esm/parts/container/Container.js +9 -13
- package/dist/esm/parts/container/Container.js.map +2 -2
- package/dist/esm/parts/controls/Controls.js +19 -9
- package/dist/esm/parts/controls/Controls.js.map +2 -2
- package/dist/esm/parts/controls/styled.js +19 -9
- package/dist/esm/parts/controls/styled.js.map +2 -2
- package/dist/esm/parts/controls-input/ControlsInput.js +14 -2
- package/dist/esm/parts/controls-input/ControlsInput.js.map +2 -2
- package/dist/esm/parts/controls-input/styled.js +24 -10
- package/dist/esm/parts/controls-input/styled.js.map +2 -2
- package/dist/esm/parts/menu-list/LoadingContainer.js +24 -1
- package/dist/esm/parts/menu-list/LoadingContainer.js.map +2 -2
- package/dist/esm/parts/menu-list/MenuList.js +3 -2
- package/dist/esm/parts/menu-list/MenuList.js.map +2 -2
- package/dist/esm/parts/menu-list/SkeletonContainer.js +20 -1
- package/dist/esm/parts/menu-list/SkeletonContainer.js.map +2 -2
- package/dist/esm/parts/menu-list/styled.js +7 -3
- package/dist/esm/parts/menu-list/styled.js.map +2 -2
- package/dist/esm/parts/menu-list/useItemRenderer.js +3 -3
- package/dist/esm/parts/menu-list/useItemRenderer.js.map +2 -2
- package/dist/esm/parts/multi-selected-values-container/RemovableSelectedValuePill.js +1 -0
- package/dist/esm/parts/multi-selected-values-container/RemovableSelectedValuePill.js.map +2 -2
- package/dist/esm/parts/styled.js +5 -1
- package/dist/esm/parts/styled.js.map +2 -2
- package/dist/types/parts/LiveRegion.d.ts +21 -0
- package/dist/types/parts/controls/styled.d.ts +1 -1
- package/dist/types/parts/controls-input/styled.d.ts +4 -2
- package/dist/types/parts/menu-list/LoadingContainer.d.ts +3 -1
- package/dist/types/parts/menu-list/SkeletonContainer.d.ts +2 -1
- package/dist/types/parts/menu-list/styled.d.ts +20 -3
- package/package.json +15 -14
- package/dist/cjs/config/useClickOutside.js +0 -52
- package/dist/cjs/config/useClickOutside.js.map +0 -7
- package/dist/esm/config/useClickOutside.js +0 -22
- package/dist/esm/config/useClickOutside.js.map +0 -7
- package/dist/types/config/useClickOutside.d.ts +0 -1
- package/dist/types/tests/DSCombobox.a11y.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.api.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.creatable.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.data-testid.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.disabled.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.events.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.exports.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.force-focus-first-option-on-type.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.get-owner-props.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.keyboard.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.multi-select.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.onlyselectable.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.read-only.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.single-select.test.d.ts +0 -1
- package/dist/types/tests/DSCombobox.usemask.test.d.ts +0 -1
- package/dist/types/tests/utils.d.ts +0 -30
- package/dist/types/typescript-testing/slot-props.d.ts +0 -1
- package/dist/types/typescript-testing/typescript-combobox-multi-valid.d.ts +0 -1
- package/dist/types/typescript-testing/typescript-combobox-single-valid.d.ts +0 -1
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { styled } from "@elliemae/ds-system";
|
|
2
|
+
import { styled, css } from "@elliemae/ds-system";
|
|
3
|
+
import { DSTypography } from "@elliemae/ds-typography";
|
|
3
4
|
import { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from "../../constants/index.js";
|
|
5
|
+
const b2InputTypography = css`
|
|
6
|
+
font-size: 0.8125rem;
|
|
7
|
+
line-height: 1rem;
|
|
8
|
+
font-weight: 400;
|
|
9
|
+
@media (min-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
10
|
+
font-size: 1rem;
|
|
11
|
+
line-height: 1.2307692308rem;
|
|
12
|
+
}
|
|
13
|
+
`;
|
|
4
14
|
const StyleHiddenInput = styled("input")`
|
|
5
15
|
color: transparent;
|
|
6
16
|
position: absolute;
|
|
@@ -20,15 +30,14 @@ const StyledInput = styled("input", {
|
|
|
20
30
|
name: DSFormComboboxName,
|
|
21
31
|
slot: FORM_COMBOBOX_SLOTS.INPUT
|
|
22
32
|
})`
|
|
23
|
-
|
|
33
|
+
${b2InputTypography}
|
|
24
34
|
background: transparent;
|
|
25
|
-
font-size: 1rem;
|
|
26
35
|
border: none;
|
|
27
36
|
overflow: hidden;
|
|
28
37
|
padding: 0;
|
|
29
38
|
z-index: 2;
|
|
30
39
|
outline: none;
|
|
31
|
-
color: ${(props) => props.theme.colors.neutral[700]};
|
|
40
|
+
color: ${(props) => props.disabled ? props.theme.colors.neutral[600] : props.theme.colors.neutral[700]};
|
|
32
41
|
&:focus {
|
|
33
42
|
outline: none;
|
|
34
43
|
}
|
|
@@ -39,21 +48,18 @@ const StyledInput = styled("input", {
|
|
|
39
48
|
transition: none;
|
|
40
49
|
${({ applyAriaDisabled }) => applyAriaDisabled && `cursor: not-allowed; caret-color: transparent;`}
|
|
41
50
|
`;
|
|
42
|
-
const StyledInputPlaceHolder = styled(
|
|
51
|
+
const StyledInputPlaceHolder = styled(DSTypography, {
|
|
43
52
|
name: DSFormComboboxName,
|
|
44
53
|
slot: FORM_COMBOBOX_SLOTS.INPUT_PLACEHOLDER
|
|
45
54
|
})`
|
|
46
55
|
font-style: italic;
|
|
47
|
-
color: ${(props) => props.theme.colors.neutral[500]};
|
|
56
|
+
color: ${(props) => props.$nonInteractive ? props.theme.colors.neutral[600] : props.theme.colors.neutral[500]};
|
|
48
57
|
position: absolute;
|
|
49
58
|
display: flex;
|
|
50
59
|
align-items: center;
|
|
51
60
|
width: 100%;
|
|
52
61
|
user-select: none;
|
|
53
62
|
|
|
54
|
-
line-height: 1rem;
|
|
55
|
-
font-size: 1rem;
|
|
56
|
-
|
|
57
63
|
& span::after {
|
|
58
64
|
content: '';
|
|
59
65
|
padding: 1px;
|
|
@@ -61,6 +67,7 @@ const StyledInputPlaceHolder = styled("div", {
|
|
|
61
67
|
}
|
|
62
68
|
`;
|
|
63
69
|
const StyledInputWidthReference = styled.span`
|
|
70
|
+
${b2InputTypography}
|
|
64
71
|
visibility: hidden;
|
|
65
72
|
position: absolute;
|
|
66
73
|
top: -9999px;
|
|
@@ -73,7 +80,14 @@ const StyledInputWrapper = styled("div", {
|
|
|
73
80
|
position: relative;
|
|
74
81
|
align-items: center;
|
|
75
82
|
display: flex;
|
|
76
|
-
|
|
83
|
+
/** PUI-15490 — the spec's 5px vertical padding lives on the text line (this wrapper, always
|
|
84
|
+
* rendered) so the control height is constant and breathing room survives text resize.
|
|
85
|
+
* Mobile keeps the legacy 1.25px — no mobile spec exists (KNOWN_INTENTIONAL_DEVIATIONS §5).
|
|
86
|
+
* The 1px right padding is pre-existing (caret clipping). */
|
|
87
|
+
padding: 5px 1px 5px 0px;
|
|
88
|
+
@media (max-width: ${({ theme }) => theme.breakpoints.small}) {
|
|
89
|
+
padding: 1.25px 1px 1.25px 0px;
|
|
90
|
+
}
|
|
77
91
|
overflow: hidden;
|
|
78
92
|
`;
|
|
79
93
|
const StyledHiddenDiv = styled("div")`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/controls-input/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\n\nexport const StyleHiddenInput = styled('input')<{ isDisabled: boolean }>`\n color: transparent;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n border: none;\n outline: none;\n background: transparent;\n width: 100%;\n &:focus {\n outline: none;\n }\n ${({ isDisabled }) => isDisabled && `cursor: not-allowed;`}\n`;\n\nexport const StyledInput = styled('input', {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.INPUT,\n})<{ withoutCaret: boolean; applyAriaDisabled: boolean }>`\n
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled, css } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\n\n/**\n * b2 typography mirrored as raw CSS for the native `<input>` and its hidden\n * width-measuring twin (`StyledInputWidthReference`). Neither can be a `DSTypography`\n * component \u2014 an `<input>` takes no children, and the reference must match the input's\n * exact font metrics or the autosizing (measured off the reference) drifts. ds-typography\n * does not export its VARIANTS_CSS_MAP, so the b2 values are duplicated here \u2014 keep in\n * sync with `ds-typography` b2 (`parts/variants/body.ts`). Text containers that CAN hold\n * children (placeholder, selection) use `styled(DSTypography)` with `variant=\"b2\"` instead.\n */\nconst b2InputTypography = css`\n font-size: 0.8125rem;\n line-height: 1rem;\n font-weight: 400;\n @media (min-width: ${({ theme }) => theme.breakpoints.small}) {\n font-size: 1rem;\n line-height: 1.2307692308rem;\n }\n`;\n\nexport const StyleHiddenInput = styled('input')<{ isDisabled: boolean }>`\n color: transparent;\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n border: none;\n outline: none;\n background: transparent;\n width: 100%;\n &:focus {\n outline: none;\n }\n ${({ isDisabled }) => isDisabled && `cursor: not-allowed;`}\n`;\n\nexport const StyledInput = styled('input', {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.INPUT,\n})<{ withoutCaret: boolean; applyAriaDisabled: boolean }>`\n ${b2InputTypography}\n background: transparent;\n border: none;\n overflow: hidden;\n padding: 0;\n z-index: 2;\n outline: none;\n color: ${(props) => (props.disabled ? props.theme.colors.neutral[600] : props.theme.colors.neutral[700])};\n &:focus {\n outline: none;\n }\n ${({ withoutCaret }) => withoutCaret && 'caret-color: transparent;'}\n &::placeholder {\n color: transparent;\n }\n transition: none;\n ${({ applyAriaDisabled }) => applyAriaDisabled && `cursor: not-allowed; caret-color: transparent;`}\n`;\n\nexport const StyledInputPlaceHolder = styled(DSTypography, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.INPUT_PLACEHOLDER,\n})<{ $nonInteractive?: boolean }>`\n font-style: italic;\n color: ${(props) => (props.$nonInteractive ? props.theme.colors.neutral[600] : props.theme.colors.neutral[500])};\n position: absolute;\n display: flex;\n align-items: center;\n width: 100%;\n user-select: none;\n\n & span::after {\n content: '';\n padding: 1px;\n // solve italic font style clipping issue with overflow hidden.\n }\n`;\n\nexport const StyledInputWidthReference = styled.span`\n ${b2InputTypography}\n visibility: hidden;\n position: absolute;\n top: -9999px;\n z-index: 1;\n`;\n\nexport const StyledInputWrapper = styled('div', {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.INPUT_FIELD_WRAPPER,\n})`\n position: relative;\n align-items: center;\n display: flex;\n /** PUI-15490 \u2014 the spec's 5px vertical padding lives on the text line (this wrapper, always\n * rendered) so the control height is constant and breathing room survives text resize.\n * Mobile keeps the legacy 1.25px \u2014 no mobile spec exists (KNOWN_INTENTIONAL_DEVIATIONS \u00A75).\n * The 1px right padding is pre-existing (caret clipping). */\n padding: 5px 1px 5px 0px;\n @media (max-width: ${({ theme }) => theme.breakpoints.small}) {\n padding: 1.25px 1px 1.25px 0px;\n }\n overflow: hidden;\n`;\n\nexport const StyledHiddenDiv = styled('div')`\n display: none;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,QAAQ,WAAW;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB,2BAA2B;AAWxD,MAAM,oBAAoB;AAAA;AAAA;AAAA;AAAA,uBAIH,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAMtD,MAAM,mBAAmB,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAa1C,CAAC,EAAE,WAAW,MAAM,cAAc,sBAAsB;AAAA;AAGrD,MAAM,cAAc,OAAO,SAAS;AAAA,EACzC,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA,IACG,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAOV,CAAC,UAAW,MAAM,WAAW,MAAM,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAE;AAAA;AAAA;AAAA;AAAA,IAItG,CAAC,EAAE,aAAa,MAAM,gBAAgB,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA,IAKjE,CAAC,EAAE,kBAAkB,MAAM,qBAAqB,gDAAgD;AAAA;AAG7F,MAAM,yBAAyB,OAAO,cAAc;AAAA,EACzD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA,WAEU,CAAC,UAAW,MAAM,kBAAkB,MAAM,MAAM,OAAO,QAAQ,GAAG,IAAI,MAAM,MAAM,OAAO,QAAQ,GAAG,CAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAc1G,MAAM,4BAA4B,OAAO;AAAA,IAC5C,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAOd,MAAM,qBAAqB,OAAO,OAAO;AAAA,EAC9C,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBASsB,CAAC,EAAE,MAAM,MAAM,MAAM,YAAY,KAAK;AAAA;AAAA;AAAA;AAAA;AAMtD,MAAM,kBAAkB,OAAO,KAAK;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -15,7 +15,30 @@ const StyledDSCircularIndeterminateIndicator = styled(DSCircularIndeterminateInd
|
|
|
15
15
|
name: DSFormComboboxName,
|
|
16
16
|
slot: FORM_COMBOBOX_SLOTS.LOADING_INDICATOR
|
|
17
17
|
})``;
|
|
18
|
-
const LoadingContainer = ({
|
|
18
|
+
const LoadingContainer = ({
|
|
19
|
+
instanceUid,
|
|
20
|
+
isMulti,
|
|
21
|
+
getOwnerProps
|
|
22
|
+
}) => (
|
|
23
|
+
/**
|
|
24
|
+
* PUI-18034 — Carries listbox id+role+aria-busy so the input's aria-controls always
|
|
25
|
+
* resolves to a busy listbox here. Parallel listbox semantics tailored per state live
|
|
26
|
+
* on SkeletonContainer, StyledFastList and StyledNoResultsWrapper, but only one of those
|
|
27
|
+
* four ever renders at a time, so the canonical listbox id is never duplicated in the DOM.
|
|
28
|
+
*/
|
|
29
|
+
/* @__PURE__ */ jsx(
|
|
30
|
+
Wrapper,
|
|
31
|
+
{
|
|
32
|
+
id: `combo-listbox-${instanceUid}`,
|
|
33
|
+
role: "listbox",
|
|
34
|
+
"aria-busy": true,
|
|
35
|
+
"aria-label": "Loading options please wait",
|
|
36
|
+
"aria-multiselectable": isMulti,
|
|
37
|
+
getOwnerProps,
|
|
38
|
+
children: /* @__PURE__ */ jsx(StyledDSCircularIndeterminateIndicator, { size: "m", "aria-hidden": "true", getOwnerProps })
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
);
|
|
19
42
|
var LoadingContainer_default = LoadingContainer;
|
|
20
43
|
export {
|
|
21
44
|
LoadingContainer,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/menu-list/LoadingContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\n\nconst Wrapper = styled('div', {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.LOADING_WRAPPER,\n})`\n display: flex;\n justify-content: center;\n height: 56px;\n`;\nconst StyledDSCircularIndeterminateIndicator = styled(DSCircularIndeterminateIndicator, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.LOADING_INDICATOR,\n})``;\n\nconst LoadingContainer = ({
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSCircularIndeterminateIndicator } from '@elliemae/ds-circular-progress-indicator';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\n\nconst Wrapper = styled('div', {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.LOADING_WRAPPER,\n})`\n display: flex;\n justify-content: center;\n height: 56px;\n`;\nconst StyledDSCircularIndeterminateIndicator = styled(DSCircularIndeterminateIndicator, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.LOADING_INDICATOR,\n})``;\n\nconst LoadingContainer = ({\n instanceUid,\n isMulti,\n getOwnerProps,\n}: {\n instanceUid: string;\n isMulti: boolean;\n getOwnerProps: () => object;\n}) => (\n /**\n * PUI-18034 \u2014 Carries listbox id+role+aria-busy so the input's aria-controls always\n * resolves to a busy listbox here. Parallel listbox semantics tailored per state live\n * on SkeletonContainer, StyledFastList and StyledNoResultsWrapper, but only one of those\n * four ever renders at a time, so the canonical listbox id is never duplicated in the DOM.\n */\n <Wrapper\n id={`combo-listbox-${instanceUid}`}\n role=\"listbox\"\n aria-busy\n aria-label=\"Loading options please wait\"\n aria-multiselectable={isMulti}\n getOwnerProps={getOwnerProps}\n >\n {/**\n * PUI-18541 \u2014 the spinner exposes role=\"status\", which is a forbidden child of\n * role=\"listbox\" (aria-allowed-children, axe Critical) \u2014 a regression from the PUI-18034\n * rework. aria-hidden removes it from the accessibility tree so it no longer counts as a\n * listbox child; the listbox's own aria-busy + aria-label remains the single loading\n * announcement. Spinner stays purely visual.\n */}\n <StyledDSCircularIndeterminateIndicator size=\"m\" aria-hidden=\"true\" getOwnerProps={getOwnerProps} />\n </Wrapper>\n);\n\nexport { LoadingContainer };\nexport default LoadingContainer;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACgDnB;AA/CJ,SAAS,cAAc;AACvB,SAAS,wCAAwC;AACjD,SAAS,oBAAoB,2BAA2B;AAExD,MAAM,UAAU,OAAO,OAAO;AAAA,EAC5B,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAKD,MAAM,yCAAyC,OAAO,kCAAkC;AAAA,EACtF,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAED,MAAM,mBAAmB,CAAC;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAWE;AAAA,IAAC;AAAA;AAAA,MACC,IAAI,iBAAiB,WAAW;AAAA,MAChC,MAAK;AAAA,MACL,aAAS;AAAA,MACT,cAAW;AAAA,MACX,wBAAsB;AAAA,MACtB;AAAA,MASA,8BAAC,0CAAuC,MAAK,KAAI,eAAY,QAAO,eAA8B;AAAA;AAAA,EACpG;AAAA;AAIF,IAAO,2BAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -34,8 +34,9 @@ const ContentComp = () => {
|
|
|
34
34
|
} = useContext(ComboBoxContext);
|
|
35
35
|
const { getOwnerProps } = useOwnerProps(props);
|
|
36
36
|
const isMulti = Array.isArray(selectedValues);
|
|
37
|
-
if (isSkeleton)
|
|
38
|
-
|
|
37
|
+
if (isSkeleton)
|
|
38
|
+
return /* @__PURE__ */ jsx(SkeletonContainer, { instanceUid, isMulti, getOwnerProps });
|
|
39
|
+
if (isLoading) return /* @__PURE__ */ jsx(LoadingContainer, { instanceUid, isMulti, getOwnerProps });
|
|
39
40
|
const shouldShowNoResults = !onCreate && (filteredOptions?.length ?? 0) === 0;
|
|
40
41
|
if (shouldShowNoResults)
|
|
41
42
|
return /* @__PURE__ */ jsx(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/menu-list/MenuList.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSFastList } from '@elliemae/ds-fast-list';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { type SizingProps, styled } from '@elliemae/ds-system';\nimport React, { useCallback, useContext } from 'react';\nimport { ComboBoxContext } from '../../ComboBoxCTX.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\nimport { useOnElementResize } from '../../utils/useOnElementResize.js';\nimport { LoadingContainer } from './LoadingContainer.js';\nimport { SkeletonContainer } from './SkeletonContainer.js';\nimport { StyledListWrapper, StyledNoResultsWrapper } from './styled.js';\nimport { ItemRenderer } from './useItemRenderer.js';\n\nconst StyledFastList = styled(DSFastList, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.FAST_LIST,\n})``;\n\nconst StyledItemsWrapper = styled(Grid, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.MENU_ITEMS_WRAPPER,\n})<{\n maxHeight: SizingProps['maxHeight'];\n}>`\n max-height: ${({ maxHeight }) => `${String(maxHeight)}px`};\n`;\n\nconst estimatedSize = () => 32;\n\nconst ContentComp = () => {\n const {\n props,\n props: { isLoading, noOptionsMessage, menuMaxHeight, onCreate, isSkeleton, selectedValues },\n listRef,\n correctOptions: filteredOptions,\n instanceUid,\n } = useContext(ComboBoxContext);\n\n const { getOwnerProps } = useOwnerProps(props);\n const isMulti = Array.isArray(selectedValues);\n\n if (isSkeleton)
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSFastList } from '@elliemae/ds-fast-list';\nimport { Grid } from '@elliemae/ds-grid';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { type SizingProps, styled } from '@elliemae/ds-system';\nimport React, { useCallback, useContext } from 'react';\nimport { ComboBoxContext } from '../../ComboBoxCTX.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\nimport { useOnElementResize } from '../../utils/useOnElementResize.js';\nimport { LoadingContainer } from './LoadingContainer.js';\nimport { SkeletonContainer } from './SkeletonContainer.js';\nimport { StyledListWrapper, StyledNoResultsWrapper } from './styled.js';\nimport { ItemRenderer } from './useItemRenderer.js';\n\nconst StyledFastList = styled(DSFastList, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.FAST_LIST,\n})``;\n\nconst StyledItemsWrapper = styled(Grid, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.MENU_ITEMS_WRAPPER,\n})<{\n maxHeight: SizingProps['maxHeight'];\n}>`\n max-height: ${({ maxHeight }) => `${String(maxHeight)}px`};\n`;\n\nconst estimatedSize = () => 32;\n\nconst ContentComp = () => {\n const {\n props,\n props: { isLoading, noOptionsMessage, menuMaxHeight, onCreate, isSkeleton, selectedValues },\n listRef,\n correctOptions: filteredOptions,\n instanceUid,\n } = useContext(ComboBoxContext);\n\n const { getOwnerProps } = useOwnerProps(props);\n const isMulti = Array.isArray(selectedValues);\n\n if (isSkeleton)\n return <SkeletonContainer instanceUid={instanceUid} isMulti={isMulti} getOwnerProps={getOwnerProps} />;\n if (isLoading) return <LoadingContainer instanceUid={instanceUid} isMulti={isMulti} getOwnerProps={getOwnerProps} />;\n\n const shouldShowNoResults = !onCreate && (filteredOptions?.length ?? 0) === 0;\n if (shouldShowNoResults)\n return (\n <StyledNoResultsWrapper\n id={`combo-listbox-${instanceUid}`}\n // legacy data-testid \u2014 preserved for QA/consumer compatibility, breaking change if removed\n data-testid={ComboboxDataTestid.NO_MATCHES_FOUND}\n role=\"alert\"\n getOwnerProps={getOwnerProps}\n >\n {noOptionsMessage}\n </StyledNoResultsWrapper>\n );\n\n return (\n <StyledItemsWrapper maxHeight={menuMaxHeight} getOwnerProps={getOwnerProps}>\n <StyledFastList\n dsFastlistWrapperList={{\n role: 'listbox',\n 'aria-multiselectable': isMulti,\n 'data-testid': ComboboxDataTestid.LIST,\n 'aria-label': 'listbox',\n id: `combo-listbox-${instanceUid}`,\n }}\n dsFastlistItem={{ role: 'none' }}\n actionRef={listRef}\n count={filteredOptions.length}\n ItemRenderer={ItemRenderer}\n extraItemProps={{ itemList: filteredOptions }}\n getId={(index: number) => filteredOptions[index].dsId}\n estimateSize={estimatedSize}\n getOwnerProps={getOwnerProps}\n />\n </StyledItemsWrapper>\n );\n};\n\nexport const MenuList = (): JSX.Element => {\n const {\n props,\n props: { menuMinWidth, inline },\n controlsWrapperRef,\n wrapperListRef,\n } = useContext(ComboBoxContext);\n\n const { getOwnerProps } = useOwnerProps(props);\n const { width } = useOnElementResize(controlsWrapperRef);\n\n const preventLoseInputFocus: React.MouseEventHandler = useCallback((e) => {\n e.preventDefault();\n }, []);\n\n return (\n <StyledListWrapper\n innerRef={wrapperListRef}\n inline={inline}\n onMouseDown={preventLoseInputFocus}\n width={width}\n minWidth={menuMinWidth}\n getOwnerProps={getOwnerProps}\n >\n <ContentComp />\n </StyledListWrapper>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;AC2CZ;AA3CX,SAAS,kBAAkB;AAC3B,SAAS,YAAY;AACrB,SAAS,qBAAqB;AAC9B,SAA2B,cAAc;AACzC,SAAgB,aAAa,kBAAkB;AAC/C,SAAS,uBAAuB;AAChC,SAAS,0BAA0B;AACnC,SAAS,oBAAoB,2BAA2B;AACxD,SAAS,0BAA0B;AACnC,SAAS,wBAAwB;AACjC,SAAS,yBAAyB;AAClC,SAAS,mBAAmB,8BAA8B;AAC1D,SAAS,oBAAoB;AAE7B,MAAM,iBAAiB,OAAO,YAAY;AAAA,EACxC,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAED,MAAM,qBAAqB,OAAO,MAAM;AAAA,EACtC,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA,gBAGe,CAAC,EAAE,UAAU,MAAM,GAAG,OAAO,SAAS,CAAC,IAAI;AAAA;AAG3D,MAAM,gBAAgB,MAAM;AAE5B,MAAM,cAAc,MAAM;AACxB,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,WAAW,kBAAkB,eAAe,UAAU,YAAY,eAAe;AAAA,IAC1F;AAAA,IACA,gBAAgB;AAAA,IAChB;AAAA,EACF,IAAI,WAAW,eAAe;AAE9B,QAAM,EAAE,cAAc,IAAI,cAAc,KAAK;AAC7C,QAAM,UAAU,MAAM,QAAQ,cAAc;AAE5C,MAAI;A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AAAA,EACf;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -11,10 +11,29 @@ const StyledSkeletonMenuItem = styled(SkeletonMenuItem, {
|
|
|
11
11
|
})``;
|
|
12
12
|
const SkeletonContainer = ({
|
|
13
13
|
instanceUid,
|
|
14
|
+
isMulti,
|
|
14
15
|
getOwnerProps
|
|
15
16
|
}) => {
|
|
16
17
|
const SKELETON_AMOUNT = [0, 1, 2, 3, 4];
|
|
17
|
-
return
|
|
18
|
+
return (
|
|
19
|
+
/**
|
|
20
|
+
* PUI-18034 — Carries listbox id+role+aria-busy so the input's aria-controls always
|
|
21
|
+
* resolves to a busy listbox here. Parallel listbox semantics tailored per state live
|
|
22
|
+
* on LoadingContainer, StyledFastList and StyledNoResultsWrapper, but only one of those
|
|
23
|
+
* four ever renders at a time, so the canonical listbox id is never duplicated in the DOM.
|
|
24
|
+
*/
|
|
25
|
+
/* @__PURE__ */ jsx(
|
|
26
|
+
Grid,
|
|
27
|
+
{
|
|
28
|
+
id: `combo-listbox-${instanceUid}`,
|
|
29
|
+
role: "listbox",
|
|
30
|
+
"aria-busy": true,
|
|
31
|
+
"aria-label": "Loading options please wait",
|
|
32
|
+
"aria-multiselectable": isMulti,
|
|
33
|
+
children: SKELETON_AMOUNT.map((n, index) => /* @__PURE__ */ jsx(StyledSkeletonMenuItem, { dsId: index.toString(), role: "presentation", getOwnerProps }, n))
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
);
|
|
18
37
|
};
|
|
19
38
|
export {
|
|
20
39
|
SkeletonContainer
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/menu-list/SkeletonContainer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SkeletonMenuItem } from '@elliemae/ds-menu-items';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\n\nimport { FORM_COMBOBOX_SLOTS, DSFormComboboxName } from '../../constants/index.js';\n\nconst StyledSkeletonMenuItem = styled(SkeletonMenuItem, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.SKELETON_MENU_ITEM,\n preserveLegacyDataTestId: true,\n})``;\n\nexport const SkeletonContainer = ({\n instanceUid,\n getOwnerProps,\n}: {\n instanceUid: string;\n getOwnerProps: () => object;\n}): JSX.Element => {\n const SKELETON_AMOUNT = [0, 1, 2, 3, 4] as const;\n\n return (\n <Grid
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { SkeletonMenuItem } from '@elliemae/ds-menu-items';\nimport { Grid } from '@elliemae/ds-grid';\nimport { styled } from '@elliemae/ds-system';\n\nimport { FORM_COMBOBOX_SLOTS, DSFormComboboxName } from '../../constants/index.js';\n\nconst StyledSkeletonMenuItem = styled(SkeletonMenuItem, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.SKELETON_MENU_ITEM,\n preserveLegacyDataTestId: true,\n})``;\n\nexport const SkeletonContainer = ({\n instanceUid,\n isMulti,\n getOwnerProps,\n}: {\n instanceUid: string;\n isMulti: boolean;\n getOwnerProps: () => object;\n}): JSX.Element => {\n const SKELETON_AMOUNT = [0, 1, 2, 3, 4] as const;\n\n return (\n /**\n * PUI-18034 \u2014 Carries listbox id+role+aria-busy so the input's aria-controls always\n * resolves to a busy listbox here. Parallel listbox semantics tailored per state live\n * on LoadingContainer, StyledFastList and StyledNoResultsWrapper, but only one of those\n * four ever renders at a time, so the canonical listbox id is never duplicated in the DOM.\n */\n <Grid\n id={`combo-listbox-${instanceUid}`}\n role=\"listbox\"\n aria-busy\n aria-label=\"Loading options please wait\"\n aria-multiselectable={isMulti}\n >\n {SKELETON_AMOUNT.map((n, index) => (\n <StyledSkeletonMenuItem key={n} dsId={index.toString()} role=\"presentation\" getOwnerProps={getOwnerProps} />\n ))}\n </Grid>\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACuCf;AAtCR,SAAS,wBAAwB;AACjC,SAAS,YAAY;AACrB,SAAS,cAAc;AAEvB,SAAS,qBAAqB,0BAA0B;AAExD,MAAM,yBAAyB,OAAO,kBAAkB;AAAA,EACtD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;AAEM,MAAM,oBAAoB,CAAC;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AACF,MAImB;AACjB,QAAM,kBAAkB,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC;AAEtC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOE;AAAA,MAAC;AAAA;AAAA,QACC,IAAI,iBAAiB,WAAW;AAAA,QAChC,MAAK;AAAA,QACL,aAAS;AAAA,QACT,cAAW;AAAA,QACX,wBAAsB;AAAA,QAErB,0BAAgB,IAAI,CAAC,GAAG,UACvB,oBAAC,0BAA+B,MAAM,MAAM,SAAS,GAAG,MAAK,gBAAe,iBAA/C,CAA6E,CAC3G;AAAA;AAAA,IACH;AAAA;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { styled } from "@elliemae/ds-system";
|
|
3
3
|
import { Grid } from "@elliemae/ds-grid";
|
|
4
|
+
import { DSTypography } from "@elliemae/ds-typography";
|
|
4
5
|
import { SingleMenuItem, MultiMenuItem } from "@elliemae/ds-menu-items";
|
|
5
6
|
import { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from "../../constants/index.js";
|
|
6
7
|
const StyledListWrapper = styled(Grid, {
|
|
@@ -12,14 +13,15 @@ const StyledListWrapper = styled(Grid, {
|
|
|
12
13
|
background-color: #ffffff;
|
|
13
14
|
z-index: 100;
|
|
14
15
|
`;
|
|
15
|
-
const StyledCreatableLabel = styled(
|
|
16
|
+
const StyledCreatableLabel = styled(DSTypography, {
|
|
16
17
|
name: DSFormComboboxName,
|
|
17
18
|
slot: FORM_COMBOBOX_SLOTS.CREATABLE_LABEL
|
|
18
19
|
})`
|
|
19
20
|
font-weight: bold;
|
|
20
21
|
font-style: italic;
|
|
22
|
+
text-transform: uppercase;
|
|
21
23
|
`;
|
|
22
|
-
const StyledCreatableValue = styled(
|
|
24
|
+
const StyledCreatableValue = styled(DSTypography, {
|
|
23
25
|
name: DSFormComboboxName,
|
|
24
26
|
slot: FORM_COMBOBOX_SLOTS.CREATABLE_VALUE
|
|
25
27
|
})`
|
|
@@ -35,7 +37,9 @@ const StyledSingleMenuItem = styled(SingleMenuItem, {
|
|
|
35
37
|
name: DSFormComboboxName,
|
|
36
38
|
slot: FORM_COMBOBOX_SLOTS.SINGLE_MENU_ITEM,
|
|
37
39
|
preserveLegacyDataTestId: true
|
|
38
|
-
})
|
|
40
|
+
})`
|
|
41
|
+
${({ theme, disabled, applyAriaDisabled, readOnly }) => !disabled && !applyAriaDisabled && !readOnly && `color: ${theme.colors.neutral[700]};`}
|
|
42
|
+
`;
|
|
39
43
|
const StyledMultiMenuItem = styled(MultiMenuItem, {
|
|
40
44
|
name: DSFormComboboxName,
|
|
41
45
|
slot: FORM_COMBOBOX_SLOTS.MULTI_MENU_ITEM,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/menu-list/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { SingleMenuItem, MultiMenuItem } from '@elliemae/ds-menu-items';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\n\ninterface StyledListWrapperT {\n minWidth: SizingProps['minWidth'];\n maxHeight?: SizingProps['maxHeight'];\n width: number | string;\n inline?: boolean;\n}\nexport const StyledListWrapper = styled(Grid, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.LIST_WRAPPER,\n})<StyledListWrapperT>`\n min-width: ${({ inline, minWidth }) => (inline ? '100%' : `${String(minWidth)}px`)};\n width: ${({ width }) => `${width}px`};\n background-color: #ffffff;\n z-index: 100;\n`;\n\nexport const StyledCreatableLabel = styled(
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAEvB,SAAS,YAAY;AACrB,SAAS,gBAAgB,qBAAqB;AAC9C,SAAS,oBAAoB,2BAA2B;AAQjD,MAAM,oBAAoB,OAAO,MAAM;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA,eACc,CAAC,EAAE,QAAQ,SAAS,MAAO,SAAS,SAAS,GAAG,OAAO,QAAQ,CAAC,IAAK;AAAA,WACzE,CAAC,EAAE,MAAM,MAAM,GAAG,KAAK,IAAI;AAAA;AAAA;AAAA;AAK/B,MAAM,uBAAuB,OAAO,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\nimport type { SizingProps } from '@elliemae/ds-system';\nimport { Grid } from '@elliemae/ds-grid';\nimport { DSTypography } from '@elliemae/ds-typography';\nimport { SingleMenuItem, MultiMenuItem } from '@elliemae/ds-menu-items';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../../constants/index.js';\n\ninterface StyledListWrapperT {\n minWidth: SizingProps['minWidth'];\n maxHeight?: SizingProps['maxHeight'];\n width: number | string;\n inline?: boolean;\n}\nexport const StyledListWrapper = styled(Grid, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.LIST_WRAPPER,\n})<StyledListWrapperT>`\n min-width: ${({ inline, minWidth }) => (inline ? '100%' : `${String(minWidth)}px`)};\n width: ${({ width }) => `${width}px`};\n background-color: #ffffff;\n z-index: 100;\n`;\n\nexport const StyledCreatableLabel = styled(DSTypography, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.CREATABLE_LABEL,\n})`\n font-weight: bold;\n font-style: italic;\n text-transform: uppercase;\n`;\n\nexport const StyledCreatableValue = styled(DSTypography, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.CREATABLE_VALUE,\n})`\n word-break: break-all;\n`;\n\nexport const StyledNoResultsWrapper = styled('div', {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.NO_MATCHES_FOUND,\n})`\n padding: 14px;\n`;\n\ntype IdleLabelColorProps = {\n disabled?: boolean;\n applyAriaDisabled?: boolean;\n readOnly?: boolean;\n};\n\n/**\n * Combobox-specific idle color override for single menu item labels.\n *\n * The decision to render the idle label as neutral-700 is a combobox-level call\n * (team consistency with multi, which lands at neutral-700 via the checkbox spec),\n * not a generic menu-item rule. It lives here so other consumers of ds-menu-items\n * are not forced into a color opinion they did not ask for.\n *\n * Muted states (disabled / aria-disabled / readOnly) intentionally fall through\n * so disabledOption() in ds-menu-items-commons keeps owning neutral-500 and the\n * neutral-600 hover variant.\n */\nexport const StyledSingleMenuItem = styled(SingleMenuItem, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.SINGLE_MENU_ITEM,\n preserveLegacyDataTestId: true,\n})<IdleLabelColorProps>`\n ${({ theme, disabled, applyAriaDisabled, readOnly }) =>\n !disabled && !applyAriaDisabled && !readOnly && `color: ${theme.colors.neutral[700]};`}\n`;\n\nexport const StyledMultiMenuItem = styled(MultiMenuItem, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.MULTI_MENU_ITEM,\n preserveLegacyDataTestId: true,\n})``;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAEvB,SAAS,YAAY;AACrB,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB,qBAAqB;AAC9C,SAAS,oBAAoB,2BAA2B;AAQjD,MAAM,oBAAoB,OAAO,MAAM;AAAA,EAC5C,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA,eACc,CAAC,EAAE,QAAQ,SAAS,MAAO,SAAS,SAAS,GAAG,OAAO,QAAQ,CAAC,IAAK;AAAA,WACzE,CAAC,EAAE,MAAM,MAAM,GAAG,KAAK,IAAI;AAAA;AAAA;AAAA;AAK/B,MAAM,uBAAuB,OAAO,cAAc;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA;AAAA;AAAA;AAMM,MAAM,uBAAuB,OAAO,cAAc;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA;AAIM,MAAM,yBAAyB,OAAO,OAAO;AAAA,EAClD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA;AAsBM,MAAM,uBAAuB,OAAO,gBAAgB;AAAA,EACzD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;AAAA,IACG,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,MAChD,CAAC,YAAY,CAAC,qBAAqB,CAAC,YAAY,UAAU,MAAM,OAAO,QAAQ,GAAG,CAAC,GAAG;AAAA;AAGnF,MAAM,sBAAsB,OAAO,eAAe;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -123,9 +123,9 @@ const ItemRenderer = ({ index, extraItemProps }) => {
|
|
|
123
123
|
dataTestid: ComboboxDataTestid.OPTION,
|
|
124
124
|
isActive: dsId === focusOptionIdx,
|
|
125
125
|
...generalProps,
|
|
126
|
-
render: ({ label: labelCreatable }) => /* @__PURE__ */ jsxs(Grid, {
|
|
127
|
-
/* @__PURE__ */ jsx(StyledCreatableLabel, { getOwnerProps, children: "Add:" }),
|
|
128
|
-
/* @__PURE__ */ jsx(StyledCreatableValue, { getOwnerProps, children: `"${labelCreatable}"` })
|
|
126
|
+
render: ({ label: labelCreatable }) => /* @__PURE__ */ jsxs(Grid, { py: "8px", cols: ["min-content", "auto"], gutter: "xxs", alignItems: "center", children: [
|
|
127
|
+
/* @__PURE__ */ jsx(StyledCreatableLabel, { variant: "b2", component: "span", getOwnerProps, children: "Add:" }),
|
|
128
|
+
/* @__PURE__ */ jsx(StyledCreatableValue, { variant: "b2", component: "span", getOwnerProps, children: `"${labelCreatable}"` })
|
|
129
129
|
] }),
|
|
130
130
|
label: option.label,
|
|
131
131
|
onClick: handleOnCreateClick,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/menu-list/useItemRenderer.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Separator } from '@elliemae/ds-menu-items';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { Section } from '../Section.js';\nimport { ComboBoxContext } from '../../ComboBoxCTX.js';\nimport { StyledCreatableLabel, StyledCreatableValue, StyledSingleMenuItem, StyledMultiMenuItem } from './styled.js';\nimport { isSelected, getSuggestedValueOnChange } from '../../utils/listHelper.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { MENU_OPTION_TYPES, INTERNAL_MENU_OPTION_TYPES } from '../../constants.js';\n\ninterface ItemRendererT {\n extraItemProps?: {\n itemList?: DSComboboxT.OptionTypes[];\n };\n index: number;\n}\n\nexport const ItemRenderer = ({ index, extraItemProps }: ItemRendererT): React.ReactElement | null => {\n const {\n props,\n props: { onCreate, onChange, isNonClearable, selectedValues, onFilter, allOptions, readOnly },\n setMenuState,\n inputValue,\n focusOptionIdx,\n setInputValue,\n optionsPerSection,\n } = useContext(ComboBoxContext);\n\n const { getOwnerProps } = useOwnerProps(props);\n const getOwnerPropsArguments = useCallback(\n () => ({\n index,\n }),\n [index],\n );\n\n const option = extraItemProps?.itemList?.[index];\n\n const multiple = Array.isArray(selectedValues);\n const CBItem: React.ComponentType<React.ComponentProps<typeof StyledSingleMenuItem>> = multiple\n ? StyledMultiMenuItem\n : StyledSingleMenuItem;\n\n const handleOnCreateClick = useCallback(() => {\n if (inputValue && onCreate) {\n onCreate(inputValue);\n setInputValue('');\n if (onFilter) onFilter(allOptions, inputValue);\n }\n }, [onFilter, onCreate, inputValue, allOptions, setInputValue]);\n\n const handleClick = useCallback(\n (currentOption: DSComboboxT.OptionTypes, e: React.MouseEvent) => {\n if (readOnly) return;\n if (currentOption.type === MENU_OPTION_TYPES.OPTION) {\n if (!currentOption.disabled) {\n if (onFilter) onFilter(allOptions, inputValue);\n setInputValue('');\n if (!multiple) {\n setMenuState(false, 'selectOption', e);\n }\n (onChange as (v: DSComboboxT.SelectedOptionsT, ...args: unknown[]) => void)(\n getSuggestedValueOnChange(currentOption, selectedValues, isNonClearable),\n currentOption,\n e,\n );\n }\n }\n // prevent for loosing focus on input control\n e.stopPropagation();\n e.preventDefault();\n },\n [onFilter, selectedValues, allOptions, onChange, setMenuState, multiple],\n );\n\n // prevent blur from controls input\n const handleOnMouseDown = useCallback((e: React.MouseEvent<HTMLLIElement>) => {\n e.preventDefault();\n }, []);\n\n return useMemo(() => {\n if (option) {\n const { dsId, type, disabled, applyAriaDisabled, readOnly: itemReadOnly, ...rest } = option;\n const generalProps = {\n // 'aria-setsize': `${allOptions.length}`,\n // 'aria-posinset': `${vItem.index + 1}`,\n key: `${dsId}`,\n dsId: dsId.toString(),\n ...rest,\n };\n if (option.type === MENU_OPTION_TYPES.SECTION) {\n return (\n <Section\n label={option.label}\n {...generalProps}\n options={option.options}\n handleClick={handleClick}\n focusOptionIdx={focusOptionIdx}\n handleOnMouseDown={handleOnMouseDown}\n selectedValues={selectedValues}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n }\n if (type === MENU_OPTION_TYPES.SEPARATOR) {\n return <Separator {...generalProps} render={undefined} />;\n }\n if (option.type === MENU_OPTION_TYPES.OPTION) {\n return (\n <CBItem\n {...generalProps}\n value={option.value}\n label={option.label}\n dataTestid={ComboboxDataTestid.OPTION}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled || itemReadOnly}\n onClick={(e: React.MouseEvent) => {\n if (applyAriaDisabled) return;\n handleClick(option, e);\n }}\n onMouseDown={handleOnMouseDown}\n isActive={dsId === focusOptionIdx}\n tabIndex={-1}\n isSelected={isSelected(selectedValues, option)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n }\n if (type === INTERNAL_MENU_OPTION_TYPES.CREATABLE) {\n return (\n <StyledSingleMenuItem\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n dataTestid={ComboboxDataTestid.OPTION}\n isActive={dsId === focusOptionIdx}\n {...generalProps}\n render={({ label: labelCreatable }: { label?: string }) => (\n <Grid
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACiGb,cA+CI,YA/CJ;AA9FV,SAAgB,SAAS,YAAY,mBAAmB;AACxD,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,sBAAsB,sBAAsB,sBAAsB,2BAA2B;AACtG,SAAS,YAAY,iCAAiC;AACtD,SAAS,0BAA0B;AAEnC,SAAS,mBAAmB,kCAAkC;AASvD,MAAM,eAAe,CA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|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-statements */\n/* eslint-disable complexity */\n/* eslint-disable react-hooks/exhaustive-deps */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Separator } from '@elliemae/ds-menu-items';\nimport { useOwnerProps } from '@elliemae/ds-props-helpers';\nimport { Section } from '../Section.js';\nimport { ComboBoxContext } from '../../ComboBoxCTX.js';\nimport { StyledCreatableLabel, StyledCreatableValue, StyledSingleMenuItem, StyledMultiMenuItem } from './styled.js';\nimport { isSelected, getSuggestedValueOnChange } from '../../utils/listHelper.js';\nimport { ComboboxDataTestid } from '../../ComboboxDataTestids.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { MENU_OPTION_TYPES, INTERNAL_MENU_OPTION_TYPES } from '../../constants.js';\n\ninterface ItemRendererT {\n extraItemProps?: {\n itemList?: DSComboboxT.OptionTypes[];\n };\n index: number;\n}\n\nexport const ItemRenderer = ({ index, extraItemProps }: ItemRendererT): React.ReactElement | null => {\n const {\n props,\n props: { onCreate, onChange, isNonClearable, selectedValues, onFilter, allOptions, readOnly },\n setMenuState,\n inputValue,\n focusOptionIdx,\n setInputValue,\n optionsPerSection,\n } = useContext(ComboBoxContext);\n\n const { getOwnerProps } = useOwnerProps(props);\n const getOwnerPropsArguments = useCallback(\n () => ({\n index,\n }),\n [index],\n );\n\n const option = extraItemProps?.itemList?.[index];\n\n const multiple = Array.isArray(selectedValues);\n const CBItem: React.ComponentType<React.ComponentProps<typeof StyledSingleMenuItem>> = multiple\n ? StyledMultiMenuItem\n : StyledSingleMenuItem;\n\n const handleOnCreateClick = useCallback(() => {\n if (inputValue && onCreate) {\n onCreate(inputValue);\n setInputValue('');\n if (onFilter) onFilter(allOptions, inputValue);\n }\n }, [onFilter, onCreate, inputValue, allOptions, setInputValue]);\n\n const handleClick = useCallback(\n (currentOption: DSComboboxT.OptionTypes, e: React.MouseEvent) => {\n if (readOnly) return;\n if (currentOption.type === MENU_OPTION_TYPES.OPTION) {\n if (!currentOption.disabled) {\n if (onFilter) onFilter(allOptions, inputValue);\n setInputValue('');\n if (!multiple) {\n setMenuState(false, 'selectOption', e);\n }\n (onChange as (v: DSComboboxT.SelectedOptionsT, ...args: unknown[]) => void)(\n getSuggestedValueOnChange(currentOption, selectedValues, isNonClearable),\n currentOption,\n e,\n );\n }\n }\n // prevent for loosing focus on input control\n e.stopPropagation();\n e.preventDefault();\n },\n [onFilter, selectedValues, allOptions, onChange, setMenuState, multiple],\n );\n\n // prevent blur from controls input\n const handleOnMouseDown = useCallback((e: React.MouseEvent<HTMLLIElement>) => {\n e.preventDefault();\n }, []);\n\n return useMemo(() => {\n if (option) {\n const { dsId, type, disabled, applyAriaDisabled, readOnly: itemReadOnly, ...rest } = option;\n const generalProps = {\n // 'aria-setsize': `${allOptions.length}`,\n // 'aria-posinset': `${vItem.index + 1}`,\n key: `${dsId}`,\n dsId: dsId.toString(),\n ...rest,\n };\n if (option.type === MENU_OPTION_TYPES.SECTION) {\n return (\n <Section\n label={option.label}\n {...generalProps}\n options={option.options}\n handleClick={handleClick}\n focusOptionIdx={focusOptionIdx}\n handleOnMouseDown={handleOnMouseDown}\n selectedValues={selectedValues}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n }\n if (type === MENU_OPTION_TYPES.SEPARATOR) {\n return <Separator {...generalProps} render={undefined} />;\n }\n if (option.type === MENU_OPTION_TYPES.OPTION) {\n return (\n <CBItem\n {...generalProps}\n value={option.value}\n label={option.label}\n dataTestid={ComboboxDataTestid.OPTION}\n disabled={disabled}\n applyAriaDisabled={applyAriaDisabled || itemReadOnly}\n onClick={(e: React.MouseEvent) => {\n if (applyAriaDisabled) return;\n handleClick(option, e);\n }}\n onMouseDown={handleOnMouseDown}\n isActive={dsId === focusOptionIdx}\n tabIndex={-1}\n isSelected={isSelected(selectedValues, option)}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n />\n );\n }\n if (type === INTERNAL_MENU_OPTION_TYPES.CREATABLE) {\n return (\n <StyledSingleMenuItem\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n dataTestid={ComboboxDataTestid.OPTION}\n isActive={dsId === focusOptionIdx}\n {...generalProps}\n render={({ label: labelCreatable }: { label?: string }) => (\n <Grid py=\"8px\" cols={['min-content', 'auto']} gutter=\"xxs\" alignItems=\"center\">\n <StyledCreatableLabel variant=\"b2\" component=\"span\" getOwnerProps={getOwnerProps}>\n Add:\n </StyledCreatableLabel>\n <StyledCreatableValue variant=\"b2\" component=\"span\" getOwnerProps={getOwnerProps}>\n {`\"${labelCreatable}\"`}\n </StyledCreatableValue>\n </Grid>\n )}\n label={option.label}\n onClick={handleOnCreateClick}\n tabIndex={-1}\n />\n );\n }\n return null;\n }\n return null;\n }, [optionsPerSection, focusOptionIdx, selectedValues, allOptions, onCreate, inputValue, readOnly]);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiGb,cA+CI,YA/CJ;AA9FV,SAAgB,SAAS,YAAY,mBAAmB;AACxD,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAC9B,SAAS,eAAe;AACxB,SAAS,uBAAuB;AAChC,SAAS,sBAAsB,sBAAsB,sBAAsB,2BAA2B;AACtG,SAAS,YAAY,iCAAiC;AACtD,SAAS,0BAA0B;AAEnC,SAAS,mBAAmB,kCAAkC;AASvD,MAAM,eAAe,CAAC,EAAE,OAAO,eAAe,MAAgD;AACnG,QAAM;AAAA,IACJ;AAAA,IACA,OAAO,EAAE,UAAU,UAAU,gBAAgB,gBAAgB,UAAU,YAAY,SAAS;AAAA,IAC5F;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,WAAW,eAAe;AAE9B,QAAM,EAAE,cAAc,IAAI,cAAc,KAAK;AAC7C,QAAM,yBAAy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AAA,QACZ;AAAA,MAEJ;AACA,aAAO;AAAA,IACT;AACA,WAAO;AAAA,EACT,GAAG,CAAC,mBAAmB,gBAAgB,gBAAgB,YAAY,UAAU,YAAY,QAAQ,CAAC;AACpG;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/parts/multi-selected-values-container/RemovableSelectedValuePill.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { getSuggestedValueOnChange } from '../../utils/listHelper.js';\nimport { StyledDSPillV2 } from '../styled.js';\n\nexport const RemovableSelectedValuePill: React.ComponentType<{\n pill: DSComboboxT.ItemOption;\n applyAriaDisabled?: boolean;\n trailingComma?: boolean;\n ownerProps?: {\n getOwnerProps: () => object;\n getOwnerPropsArguments: () => object;\n };\n}> = (props) => {\n const { pill, trailingComma, ownerProps } = props;\n const {\n props: {\n onChange,\n isNonClearable,\n disabled,\n selectedValues,\n applyAriaDisabled: applyAriaDisabledToContainer,\n readOnly,\n },\n internalRef,\n } = useContext(ComboBoxContext);\n\n const type = React.useMemo(() => {\n if (disabled || isNonClearable) return 'value';\n if (applyAriaDisabledToContainer || readOnly) return 'labelOnly';\n return 'removable';\n }, [disabled, isNonClearable, applyAriaDisabledToContainer, readOnly]);\n /**\n * WORKAROUND: Manual className management\n *\n * StyledDSPillV2 is a styled-component wrapping DSPillV2.\n * When using the slot system (ownerProps), the internal component's className\n * is overridden by the styled-component's generated className, causing\n * DSPillV2's variant-specific classes to be lost.\n *\n * These classes are required for correct styling of different pill types:\n * - ds-pill-wrapper-removable: Interactive pills with remove button\n * - ds-pill-wrapper-label: Read-only pills (aria-disabled state)\n * - ds-pill-wrapper-value: Non-interactive pills (disabled/non-clearable)\n *\n * TODO: Fix in ds-system's generateClassName to preserve inner component classNames\n * when styled(InnerComponent) is used. Current implementation overwrites className\n * instead of merging it.\n *\n * Or instead of defining the className manually, trust on the ones generated by styled-components and remove the manual ones from DSPillV2,\n * but this would require a refactor in ds-pills-v2 to have a slot definition per variant.\n *\n *\n * Related: packages/agregators/ds-system/src/styled/generated-attributes/generateAttributes.ts\n */\n const className = React.useMemo(() => {\n if (type === 'removable') return 'ds-pill-wrapper ds-pill-wrapper-removable';\n if (type === 'labelOnly') return 'ds-pill-wrapper ds-pill-wrapper-label';\n return 'ds-pill-wrapper ds-pill-wrapper-value';\n }, [type]);\n\n return (\n <StyledDSPillV2\n size=\"s\"\n key={pill.value}\n label={pill.label}\n disabled={disabled || pill.disabled}\n type={type}\n className={className}\n applyAriaDisabled={applyAriaDisabledToContainer || pill.applyAriaDisabled}\n readOnly={readOnly}\n trailingComma={trailingComma}\n tabIndex={-1}\n labelTruncated\n onRemove={(e: React.KeyboardEvent | React.MouseEvent) => {\n if (readOnly) return;\n // preventing the menu to be opened\n e.stopPropagation();\n (onChange as (v: DSComboboxT.SelectedOptionsT, ...args: unknown[]) => void)(\n getSuggestedValueOnChange(pill, selectedValues),\n pill,\n e,\n );\n internalRef.current?.focus();\n }}\n {...ownerProps}\n />\n );\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;AC+DnB;AA/DJ,OAAOA,UAAS,kBAAkB;AAClC,OAAO,qBAAqB;AAE5B,SAAS,iCAAiC;AAC1C,SAAS,sBAAsB;AAExB,MAAM,6BAQR,CAAC,UAAU;AACd,QAAM,EAAE,MAAM,eAAe,WAAW,IAAI;AAC5C,QAAM;AAAA,IACJ,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,mBAAmB;AAAA,MACnB;AAAA,IACF;AAAA,IACA;AAAA,EACF,IAAI,WAAW,eAAe;AAE9B,QAAM,OAAOA,OAAM,QAAQ,MAAM;AAC/B,QAAI,YAAY,eAAgB,QAAO;AACvC,QAAI,gCAAgC,SAAU,QAAO;AACrD,WAAO;AAAA,EACT,GAAG,CAAC,UAAU,gBAAgB,8BAA8B,QAAQ,CAAC;AAwBrE,QAAM,YAAYA,OAAM,QAAQ,MAAM;AACpC,QAAI,SAAS,YAAa,QAAO;AACjC,QAAI,SAAS,YAAa,QAAO;AACjC,WAAO;AAAA,EACT,GAAG,CAAC,IAAI,CAAC;AAET,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MAEL,OAAO,KAAK;AAAA,MACZ,UAAU,YAAY,KAAK;AAAA,MAC3B;AAAA,MACA;AAAA,MACA,mBAAmB,gCAAgC,KAAK;AAAA,MACxD;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,gBAAc;AAAA,MACd,UAAU,CAAC,MAA8C;AACvD,YAAI,SAAU;AAEd,UAAE,gBAAgB;AAClB,QAAC;AAAA,UACC,0BAA0B,MAAM,cAAc;AAAA,UAC9C;AAAA,UACA;AAAA,QACF;AACA,oBAAY,SAAS,MAAM;AAAA,MAC7B;AAAA,MACC,GAAG;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useContext } from 'react';\nimport ComboBoxContext from '../../ComboBoxCTX.js';\nimport type { DSComboboxT } from '../../react-desc-prop-types.js';\nimport { getSuggestedValueOnChange } from '../../utils/listHelper.js';\nimport { StyledDSPillV2 } from '../styled.js';\n\nexport const RemovableSelectedValuePill: React.ComponentType<{\n pill: DSComboboxT.ItemOption;\n applyAriaDisabled?: boolean;\n trailingComma?: boolean;\n ownerProps?: {\n getOwnerProps: () => object;\n getOwnerPropsArguments: () => object;\n };\n}> = (props) => {\n const { pill, trailingComma, ownerProps } = props;\n const {\n props: {\n onChange,\n isNonClearable,\n disabled,\n selectedValues,\n applyAriaDisabled: applyAriaDisabledToContainer,\n readOnly,\n },\n internalRef,\n } = useContext(ComboBoxContext);\n\n const type = React.useMemo(() => {\n if (disabled || isNonClearable) return 'value';\n if (applyAriaDisabledToContainer || readOnly) return 'labelOnly';\n return 'removable';\n }, [disabled, isNonClearable, applyAriaDisabledToContainer, readOnly]);\n /**\n * WORKAROUND: Manual className management\n *\n * StyledDSPillV2 is a styled-component wrapping DSPillV2.\n * When using the slot system (ownerProps), the internal component's className\n * is overridden by the styled-component's generated className, causing\n * DSPillV2's variant-specific classes to be lost.\n *\n * These classes are required for correct styling of different pill types:\n * - ds-pill-wrapper-removable: Interactive pills with remove button\n * - ds-pill-wrapper-label: Read-only pills (aria-disabled state)\n * - ds-pill-wrapper-value: Non-interactive pills (disabled/non-clearable)\n *\n * TODO: Fix in ds-system's generateClassName to preserve inner component classNames\n * when styled(InnerComponent) is used. Current implementation overwrites className\n * instead of merging it.\n *\n * Or instead of defining the className manually, trust on the ones generated by styled-components and remove the manual ones from DSPillV2,\n * but this would require a refactor in ds-pills-v2 to have a slot definition per variant.\n *\n *\n * Related: packages/agregators/ds-system/src/styled/generated-attributes/generateAttributes.ts\n */\n const className = React.useMemo(() => {\n if (type === 'removable') return 'ds-pill-wrapper ds-pill-wrapper-removable';\n if (type === 'labelOnly') return 'ds-pill-wrapper ds-pill-wrapper-label';\n return 'ds-pill-wrapper ds-pill-wrapper-value';\n }, [type]);\n\n return (\n <StyledDSPillV2\n size=\"s\"\n key={pill.value}\n label={pill.label}\n disabled={disabled || pill.disabled}\n type={type}\n className={className}\n applyAriaDisabled={applyAriaDisabledToContainer || pill.applyAriaDisabled}\n readOnly={readOnly}\n trailingComma={trailingComma}\n tabIndex={-1}\n labelTruncated\n disableTruncationTooltip\n onRemove={(e: React.KeyboardEvent | React.MouseEvent) => {\n if (readOnly) return;\n // preventing the menu to be opened\n e.stopPropagation();\n (onChange as (v: DSComboboxT.SelectedOptionsT, ...args: unknown[]) => void)(\n getSuggestedValueOnChange(pill, selectedValues),\n pill,\n e,\n );\n internalRef.current?.focus();\n }}\n {...ownerProps}\n />\n );\n};\n"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styled.js
CHANGED
|
@@ -25,7 +25,11 @@ const StyledDSPillV2 = styled(DSPillV2, {
|
|
|
25
25
|
return theme.colors.brand[250];
|
|
26
26
|
}};
|
|
27
27
|
|
|
28
|
-
color: ${({ theme, disabled, applyAriaDisabled, readOnly }) =>
|
|
28
|
+
color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => {
|
|
29
|
+
if (disabled) return theme.colors.neutral["600"];
|
|
30
|
+
if (applyAriaDisabled || readOnly) return theme.colors.neutral["700"];
|
|
31
|
+
return theme.colors.brand["800"];
|
|
32
|
+
}};
|
|
29
33
|
`;
|
|
30
34
|
const StyledDSPillGroupV2 = styled(DSPillGroupV2, {
|
|
31
35
|
name: DSFormComboboxName,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/styled.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSPillV2, DSPillGroupV2 } from '@elliemae/ds-pills-v2';\nimport { styled } from '@elliemae/ds-system';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../constants/index.js';\nexport const StyledA11yNotVisible = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n border: 0;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n`;\n\n/**\n * Combobox-specific pill styling with stateful behavior\n *\n * DSPillV2 is stateless by design, but Combobox requires pills to visually\n * reflect container state (disabled/aria-disabled/readOnly). This wrapper\n * applies context-aware colors based on Combobox's interaction state.\n *\n * These styles were previously part of the Pills component but have been\n * moved here as Pills were refactored to be stateless. Combobox maintains\n * this stateful behavior as a specific use case requirement.\n */\nexport const StyledDSPillV2 = styled(DSPillV2, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.PILL,\n preserveLegacyDataTestId: true,\n})`\n background-color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => {\n if (disabled) return theme.colors.neutral['080'];\n if (applyAriaDisabled || readOnly) return theme.colors.neutral['050'];\n return theme.colors.brand[250];\n }};\n\n color: ${({ theme, disabled, applyAriaDisabled, readOnly })
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,UAAU,qBAAqB;AACxC,SAAS,cAAc;AACvB,SAAS,oBAAoB,2BAA2B;AACjD,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpC,MAAM,iBAAiB,OAAO,UAAU;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,oBAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;AAAA,sBACqB,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,MAAM;AACxE,MAAI,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AAC/C,MAAI,qBAAqB,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AACpE,SAAO,MAAM,OAAO,MAAM,GAAG;AAC/B,CAAC;AAAA;AAAA,WAEQ,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { DSPillV2, DSPillGroupV2 } from '@elliemae/ds-pills-v2';\nimport { styled } from '@elliemae/ds-system';\nimport { DSFormComboboxName, FORM_COMBOBOX_SLOTS } from '../constants/index.js';\nexport const StyledA11yNotVisible = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n border: 0;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n`;\n\n/**\n * Combobox-specific pill styling with stateful behavior\n *\n * DSPillV2 is stateless by design, but Combobox requires pills to visually\n * reflect container state (disabled/aria-disabled/readOnly). This wrapper\n * applies context-aware colors based on Combobox's interaction state.\n *\n * These styles were previously part of the Pills component but have been\n * moved here as Pills were refactored to be stateless. Combobox maintains\n * this stateful behavior as a specific use case requirement.\n */\nexport const StyledDSPillV2 = styled(DSPillV2, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.PILL,\n preserveLegacyDataTestId: true,\n})`\n background-color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => {\n if (disabled) return theme.colors.neutral['080'];\n if (applyAriaDisabled || readOnly) return theme.colors.neutral['050'];\n return theme.colors.brand[250];\n }};\n\n color: ${({ theme, disabled, applyAriaDisabled, readOnly }) => {\n if (disabled) return theme.colors.neutral['600'];\n if (applyAriaDisabled || readOnly) return theme.colors.neutral['700'];\n return theme.colors.brand['800'];\n }};\n`;\n\n/*\n * PUI-17945: https://jira.elliemae.io/browse/PUI-17945\n * By new Pills designs, pills should wrap to new lines when there is not enough horizontal space,\n * but for Combobox we want to keep them in one line and show a \"+X\" pill when there are more selected values than the max pills to show,\n * so we are changing its display property to grid instead of flex.\n */\n\nexport const StyledDSPillGroupV2 = styled(DSPillGroupV2, {\n name: DSFormComboboxName,\n slot: FORM_COMBOBOX_SLOTS.PILL_GROUP,\n})`\n display: grid;\n`;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,UAAU,qBAAqB;AACxC,SAAS,cAAc;AACvB,SAAS,oBAAoB,2BAA2B;AACjD,MAAM,uBAAuB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpC,MAAM,iBAAiB,OAAO,UAAU;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,oBAAoB;AAAA,EAC1B,0BAA0B;AAC5B,CAAC;AAAA,sBACqB,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,MAAM;AACxE,MAAI,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AAC/C,MAAI,qBAAqB,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AACpE,SAAO,MAAM,OAAO,MAAM,GAAG;AAC/B,CAAC;AAAA;AAAA,WAEQ,CAAC,EAAE,OAAO,UAAU,mBAAmB,SAAS,MAAM;AAC7D,MAAI,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AAC/C,MAAI,qBAAqB,SAAU,QAAO,MAAM,OAAO,QAAQ,KAAK;AACpE,SAAO,MAAM,OAAO,MAAM,KAAK;AACjC,CAAC;AAAA;AAUI,MAAM,sBAAsB,OAAO,eAAe;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,oBAAoB;AAC5B,CAAC;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const LiveRegion: () => JSX.Element;
|
|
3
|
+
/**
|
|
4
|
+
* PUI-18034 — Previously used in ComboBox.tsx for the "Loading options please wait"
|
|
5
|
+
* announcement; replaced by aria-busy + aria-label on Loading/Skeleton containers (which
|
|
6
|
+
* carry the listbox role during async states) plus a polite ResultCountStatus for the
|
|
7
|
+
* post-load count. No internal callers remain and not re-exported from index.tsx —
|
|
8
|
+
* evaluate removing.
|
|
9
|
+
*/
|
|
3
10
|
export declare const Announcer: React.MemoExoticComponent<({ message }: {
|
|
4
11
|
message: string;
|
|
5
12
|
}) => import("react/jsx-runtime.js").JSX.Element>;
|
|
13
|
+
/**
|
|
14
|
+
* PUI-18034 — Polite live region for post-load result count. Replaces the previous
|
|
15
|
+
* assertive Announcer that raced with the SR's aria-expanded announcement.
|
|
16
|
+
*
|
|
17
|
+
* WCAG 2.2 SC 4.1.3 Status Messages — announce changes without shifting focus.
|
|
18
|
+
* WAI-ARIA APG combobox: https://www.w3.org/WAI/ARIA/apg/patterns/combobox/
|
|
19
|
+
* WCAG: https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html
|
|
20
|
+
*/
|
|
21
|
+
export declare const ResultCountStatus: React.MemoExoticComponent<({ menuOpen, isLoading, isSkeleton, resultCount, }: {
|
|
22
|
+
menuOpen: boolean;
|
|
23
|
+
isLoading: boolean;
|
|
24
|
+
isSkeleton: boolean;
|
|
25
|
+
resultCount: number;
|
|
26
|
+
}) => import("react/jsx-runtime.js").JSX.Element>;
|
|
@@ -12,7 +12,7 @@ export declare const StyledSingleSelectWraper: import("styled-components").Style
|
|
|
12
12
|
applyAriaDisabled: boolean;
|
|
13
13
|
readOnly: boolean;
|
|
14
14
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
15
|
-
export declare const StyledSelection: import("styled-components").StyledComponent<"
|
|
15
|
+
export declare const StyledSelection: import("styled-components").StyledComponent<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>>, never>;
|
|
16
16
|
export declare const StyledHeaderActionsWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
17
17
|
export declare const StyleDropdownIndicator: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
18
18
|
export declare const StyleHeaderActionsSeparator: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, Partial<StyledControlsWrapperT> & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
|
|
@@ -5,7 +5,9 @@ export declare const StyledInput: import("styled-components").StyledComponent<"i
|
|
|
5
5
|
withoutCaret: boolean;
|
|
6
6
|
applyAriaDisabled: boolean;
|
|
7
7
|
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"input">, never>;
|
|
8
|
-
export declare const StyledInputPlaceHolder: import("styled-components").StyledComponent<
|
|
9
|
-
|
|
8
|
+
export declare const StyledInputPlaceHolder: import("styled-components").StyledComponent<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>, import("@elliemae/ds-system").Theme, {
|
|
9
|
+
$nonInteractive?: boolean;
|
|
10
|
+
} & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>>, never>;
|
|
11
|
+
export declare const StyledInputWidthReference: import("styled-components").StyledComponent<"span", import("@elliemae/ds-system").Theme, import("styled-components").ThemeProps<import("@xstyled/system").Theme> & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"span">, never>;
|
|
10
12
|
export declare const StyledInputWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
11
13
|
export declare const StyledHiddenDiv: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
declare const LoadingContainer: ({ getOwnerProps }: {
|
|
1
|
+
declare const LoadingContainer: ({ instanceUid, isMulti, getOwnerProps, }: {
|
|
2
|
+
instanceUid: string;
|
|
3
|
+
isMulti: boolean;
|
|
2
4
|
getOwnerProps: () => object;
|
|
3
5
|
}) => import("react/jsx-runtime.js").JSX.Element;
|
|
4
6
|
export { LoadingContainer };
|
|
@@ -6,9 +6,26 @@ interface StyledListWrapperT {
|
|
|
6
6
|
inline?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const StyledListWrapper: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>, import("@elliemae/ds-system").Theme, StyledListWrapperT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ForwardRefExoticComponent<import("@elliemae/ds-grid").DSGridT.Props & import("react").RefAttributes<HTMLDivElement>>>, never>;
|
|
9
|
-
export declare const StyledCreatableLabel: import("styled-components").StyledComponent<"
|
|
10
|
-
export declare const StyledCreatableValue: import("styled-components").StyledComponent<"
|
|
9
|
+
export declare const StyledCreatableLabel: import("styled-components").StyledComponent<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>>, never>;
|
|
10
|
+
export declare const StyledCreatableValue: import("styled-components").StyledComponent<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").FC<import("@elliemae/ds-typography").DSTypographyT.Props>>, never>;
|
|
11
11
|
export declare const StyledNoResultsWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
12
|
-
|
|
12
|
+
type IdleLabelColorProps = {
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
applyAriaDisabled?: boolean;
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Combobox-specific idle color override for single menu item labels.
|
|
19
|
+
*
|
|
20
|
+
* The decision to render the idle label as neutral-700 is a combobox-level call
|
|
21
|
+
* (team consistency with multi, which lands at neutral-700 via the checkbox spec),
|
|
22
|
+
* not a generic menu-item rule. It lives here so other consumers of ds-menu-items
|
|
23
|
+
* are not forced into a color opinion they did not ask for.
|
|
24
|
+
*
|
|
25
|
+
* Muted states (disabled / aria-disabled / readOnly) intentionally fall through
|
|
26
|
+
* so disabledOption() in ds-menu-items-commons keeps owning neutral-500 and the
|
|
27
|
+
* neutral-600 hover variant.
|
|
28
|
+
*/
|
|
29
|
+
export declare const StyledSingleMenuItem: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-menu-items").DSMenuItemsSingleT.Props>, import("@elliemae/ds-system").Theme, IdleLabelColorProps & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-menu-items").DSMenuItemsSingleT.Props>>, never>;
|
|
13
30
|
export declare const StyledMultiMenuItem: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-menu-items").DSMenuItemsMultiT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-menu-items").DSMenuItemsMultiT.Props>>, never>;
|
|
14
31
|
export {};
|