@elliemae/ds-form-combobox 3.80.0-next.69 → 3.80.0-next.72
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/TruncatedText.js +11 -7
- package/dist/cjs/TruncatedText.js.map +2 -2
- package/dist/cjs/parts/multi-selected-values-container/RemovableSelectedValuePill.js +0 -6
- package/dist/cjs/parts/multi-selected-values-container/RemovableSelectedValuePill.js.map +2 -2
- package/dist/cjs/parts/styled.js.map +2 -2
- package/dist/esm/TruncatedText.js +11 -7
- package/dist/esm/TruncatedText.js.map +2 -2
- package/dist/esm/parts/multi-selected-values-container/RemovableSelectedValuePill.js +0 -6
- package/dist/esm/parts/multi-selected-values-container/RemovableSelectedValuePill.js.map +2 -2
- package/dist/esm/parts/styled.js.map +2 -2
- package/dist/types/TruncatedText.d.ts +2 -1
- package/dist/types/parts/styled.d.ts +5 -0
- package/package.json +15 -15
|
@@ -35,13 +35,17 @@ module.exports = __toCommonJS(TruncatedText_exports);
|
|
|
35
35
|
var React = __toESM(require("react"));
|
|
36
36
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
37
|
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
var import_ds_typography = require("@elliemae/ds-typography");
|
|
39
|
+
const TruncatedSpan = (0, import_ds_system.styled)(import_ds_typography.DSTypography)`
|
|
40
|
+
&& {
|
|
41
|
+
font-family: inherit;
|
|
42
|
+
font-size: inherit;
|
|
43
|
+
font-weight: inherit;
|
|
44
|
+
font-style: inherit;
|
|
45
|
+
line-height: inherit;
|
|
46
|
+
color: inherit;
|
|
47
|
+
}
|
|
44
48
|
`;
|
|
45
|
-
const TruncatedText = ({ value = "" }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TruncatedSpan, { children: value });
|
|
49
|
+
const TruncatedText = ({ value = "" }) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TruncatedSpan, { variant: "b2", component: "span", truncateWithEllipsis: true, children: value });
|
|
46
50
|
var TruncatedText_default = TruncatedText;
|
|
47
51
|
//# sourceMappingURL=TruncatedText.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/TruncatedText.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled } from '@elliemae/ds-system';\n\nconst TruncatedSpan = styled
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import React from 'react';\nimport { styled } from '@elliemae/ds-system';\nimport { DSTypography } from '@elliemae/ds-typography';\n\n/**\n * PUI-18953: the value renders through DSTypography, `b2` like the slots around it (`dsComboboxSelection` for the\n * single-select value, `dsComboboxInputPlaceholder` for the placeholder). `truncateWithEllipsis` applies the same five\n * declarations this span had before (ellipsis, nowrap, overflow hidden, inline-block, max-width 100%), so it is still a\n * single `<span>` and the placeholder's `& span::after` italic-clipping fix still matches only this one.\n *\n * The font is inherited from the slot around it rather than taken from b2 itself: that slot is already b2 and carries\n * the italic placeholder and the state colors, and inheriting keeps the theme's `styleOverrides` for those slots\n * reaching the text. `&&` (0-2-0) beats DSTypography's own single class whatever the injection order. Longhands, one\n * per property b2 sets (plus font-style and color, which the slots set).\n *\n * No name/slot: the injection point is the slot around it (KNOWN_INTENTIONAL_DEVIATIONS.md #4).\n */\nconst TruncatedSpan = styled(DSTypography)`\n && {\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n line-height: inherit;\n color: inherit;\n }\n`;\n\ninterface TruncatedTextProps {\n value?: string;\n}\n\n/**\n * PUI-18660: this used to render its own hand-rolled hover tooltip on truncation.\n * That internal tooltip was removed \u2014 truncation is visual-only here. Consumers who\n * need the full value on hover/focus (e.g. readOnly/aria-disabled states where the\n * menu can't be opened) wrap the combobox in DSTooltipV3 themselves; see the\n * \"WithTooltip\" examples in ds-form-single-combobox / ds-form-multi-combobox.\n */\nconst TruncatedText = ({ value = '' }: TruncatedTextProps) => (\n <TruncatedSpan variant=\"b2\" component=\"span\" truncateWithEllipsis>\n {value}\n </TruncatedSpan>\n);\n\nexport { TruncatedText };\nexport default TruncatedText;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADwCrB;AAvCF,uBAAuB;AACvB,2BAA6B;AAe7B,MAAM,oBAAgB,yBAAO,iCAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBzC,MAAM,gBAAgB,CAAC,EAAE,QAAQ,GAAG,MAClC,4CAAC,iBAAc,SAAQ,MAAK,WAAU,QAAO,sBAAoB,MAC9D,iBACH;AAIF,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -55,11 +55,6 @@ const RemovableSelectedValuePill = (props) => {
|
|
|
55
55
|
if (applyAriaDisabledToContainer || readOnly) return "labelOnly";
|
|
56
56
|
return "removable";
|
|
57
57
|
}, [disabled, isNonClearable, applyAriaDisabledToContainer, readOnly]);
|
|
58
|
-
const className = import_react.default.useMemo(() => {
|
|
59
|
-
if (type === "removable") return "ds-pill-wrapper ds-pill-wrapper-removable";
|
|
60
|
-
if (type === "labelOnly") return "ds-pill-wrapper ds-pill-wrapper-label";
|
|
61
|
-
return "ds-pill-wrapper ds-pill-wrapper-value";
|
|
62
|
-
}, [type]);
|
|
63
58
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64
59
|
import_styled.StyledDSPillV2,
|
|
65
60
|
{
|
|
@@ -67,7 +62,6 @@ const RemovableSelectedValuePill = (props) => {
|
|
|
67
62
|
label: pill.label,
|
|
68
63
|
disabled: disabled || pill.disabled,
|
|
69
64
|
type,
|
|
70
|
-
className,
|
|
71
65
|
applyAriaDisabled: applyAriaDisabledToContainer || pill.applyAriaDisabled,
|
|
72
66
|
readOnly,
|
|
73
67
|
trailingComma,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/parts/multi-selected-values-container/RemovableSelectedValuePill.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["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 // PUI-18744: no className here. DSPillV2 sets its own variant classNames (ds-pill-wrapper-removable / -label /\n // -value) and merges them with the className StyledDSPillV2 passes down; it used to overwrite them, which is why\n // this component rebuilt them by hand.\n return (\n <StyledDSPillV2\n size=\"s\"\n key={pill.value}\n label={pill.label}\n disabled={disabled || pill.disabled}\n type={type}\n applyAriaDisabled={applyAriaDisabledToContainer || pill.applyAriaDisabled}\n readOnly={readOnly}\n trailingComma={trailingComma}\n tabIndex={-1}\n labelTruncated\n /**\n * PUI-18660: intentionally unconditional for every pill type (removable/labelOnly/value),\n * not a bug. The pill never shows its own hover tooltip on truncation here \u2014 consumers who\n * need the full value in readOnly/aria-disabled states (where the menu can't be opened)\n * are expected to wrap the combobox itself in DSTooltipV3. See the Heads Up entry in the\n * v27.1 Incoming Changes release notes and the \"WithTooltip\" example in ds-form-multi-combobox.\n */\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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsCnB;AAtCJ,mBAAkC;AAClC,yBAA4B;AAE5B,wBAA0C;AAC1C,oBAA+B;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,QAAI,yBAAW,mBAAAA,OAAe;AAE9B,QAAM,OAAO,aAAAC,QAAM,QAAQ,MAAM;AAC/B,QAAI,YAAY,eAAgB,QAAO;AACvC,QAAI,gCAAgC,SAAU,QAAO;AACrD,WAAO;AAAA,EACT,GAAG,CAAC,UAAU,gBAAgB,8BAA8B,QAAQ,CAAC;AAKrE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MAEL,OAAO,KAAK;AAAA,MACZ,UAAU,YAAY,KAAK;AAAA,MAC3B;AAAA,MACA,mBAAmB,gCAAgC,KAAK;AAAA,MACxD;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,gBAAc;AAAA,MAQd,0BAAwB;AAAA,MACxB,UAAU,CAAC,MAA8C;AACvD,YAAI,SAAU;AAEd,UAAE,gBAAgB;AAClB,QAAC;AAAA,cACC,6CAA0B,MAAM,cAAc;AAAA,UAC9C;AAAA,UACA;AAAA,QACF;AACA,oBAAY,SAAS,MAAM;AAAA,MAC7B;AAAA,MACC,GAAG;AAAA;AAAA,IA5BC,KAAK;AAAA,EA6BZ;AAEJ;",
|
|
6
6
|
"names": ["ComboBoxContext", "React"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/parts/styled.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAwC;AACxC,uBAAuB;AACvB,uBAAwD;AACjD,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
4
|
+
"sourcesContent": ["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 *\n * PUI-18744: kept here on purpose, not moved into DSPillV2. Moving them would change every standalone pill\n * with disabled / applyAriaDisabled / readOnly (the Pills docs state readOnly does not change how a pill looks),\n * and whether the combobox pills keep or align these colors is UX's call in PUI-18754.\n * See KNOWN_INTENTIONAL_DEVIATIONS.md #7.\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", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,yBAAwC;AACxC,uBAAuB;AACvB,uBAAwD;AACjD,MAAM,uBAAuB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BpC,MAAM,qBAAiB,yBAAO,6BAAU;AAAA,EAC7C,MAAM;AAAA,EACN,MAAM,qCAAoB;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,0BAAsB,yBAAO,kCAAe;AAAA,EACvD,MAAM;AAAA,EACN,MAAM,qCAAoB;AAC5B,CAAC;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { styled } from "@elliemae/ds-system";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
import { DSTypography } from "@elliemae/ds-typography";
|
|
5
|
+
const TruncatedSpan = styled(DSTypography)`
|
|
6
|
+
&& {
|
|
7
|
+
font-family: inherit;
|
|
8
|
+
font-size: inherit;
|
|
9
|
+
font-weight: inherit;
|
|
10
|
+
font-style: inherit;
|
|
11
|
+
line-height: inherit;
|
|
12
|
+
color: inherit;
|
|
13
|
+
}
|
|
10
14
|
`;
|
|
11
|
-
const TruncatedText = ({ value = "" }) => /* @__PURE__ */ jsx(TruncatedSpan, { children: value });
|
|
15
|
+
const TruncatedText = ({ value = "" }) => /* @__PURE__ */ jsx(TruncatedSpan, { variant: "b2", component: "span", truncateWithEllipsis: true, children: value });
|
|
12
16
|
var TruncatedText_default = TruncatedText;
|
|
13
17
|
export {
|
|
14
18
|
TruncatedText,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/TruncatedText.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\n\nconst TruncatedSpan = styled
|
|
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 { DSTypography } from '@elliemae/ds-typography';\n\n/**\n * PUI-18953: the value renders through DSTypography, `b2` like the slots around it (`dsComboboxSelection` for the\n * single-select value, `dsComboboxInputPlaceholder` for the placeholder). `truncateWithEllipsis` applies the same five\n * declarations this span had before (ellipsis, nowrap, overflow hidden, inline-block, max-width 100%), so it is still a\n * single `<span>` and the placeholder's `& span::after` italic-clipping fix still matches only this one.\n *\n * The font is inherited from the slot around it rather than taken from b2 itself: that slot is already b2 and carries\n * the italic placeholder and the state colors, and inheriting keeps the theme's `styleOverrides` for those slots\n * reaching the text. `&&` (0-2-0) beats DSTypography's own single class whatever the injection order. Longhands, one\n * per property b2 sets (plus font-style and color, which the slots set).\n *\n * No name/slot: the injection point is the slot around it (KNOWN_INTENTIONAL_DEVIATIONS.md #4).\n */\nconst TruncatedSpan = styled(DSTypography)`\n && {\n font-family: inherit;\n font-size: inherit;\n font-weight: inherit;\n font-style: inherit;\n line-height: inherit;\n color: inherit;\n }\n`;\n\ninterface TruncatedTextProps {\n value?: string;\n}\n\n/**\n * PUI-18660: this used to render its own hand-rolled hover tooltip on truncation.\n * That internal tooltip was removed \u2014 truncation is visual-only here. Consumers who\n * need the full value on hover/focus (e.g. readOnly/aria-disabled states where the\n * menu can't be opened) wrap the combobox in DSTooltipV3 themselves; see the\n * \"WithTooltip\" examples in ds-form-single-combobox / ds-form-multi-combobox.\n */\nconst TruncatedText = ({ value = '' }: TruncatedTextProps) => (\n <TruncatedSpan variant=\"b2\" component=\"span\" truncateWithEllipsis>\n {value}\n </TruncatedSpan>\n);\n\nexport { TruncatedText };\nexport default TruncatedText;\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACwCrB;AAvCF,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAe7B,MAAM,gBAAgB,OAAO,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBzC,MAAM,gBAAgB,CAAC,EAAE,QAAQ,GAAG,MAClC,oBAAC,iBAAc,SAAQ,MAAK,WAAU,QAAO,sBAAoB,MAC9D,iBACH;AAIF,IAAO,wBAAQ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,11 +22,6 @@ const RemovableSelectedValuePill = (props) => {
|
|
|
22
22
|
if (applyAriaDisabledToContainer || readOnly) return "labelOnly";
|
|
23
23
|
return "removable";
|
|
24
24
|
}, [disabled, isNonClearable, applyAriaDisabledToContainer, readOnly]);
|
|
25
|
-
const className = React2.useMemo(() => {
|
|
26
|
-
if (type === "removable") return "ds-pill-wrapper ds-pill-wrapper-removable";
|
|
27
|
-
if (type === "labelOnly") return "ds-pill-wrapper ds-pill-wrapper-label";
|
|
28
|
-
return "ds-pill-wrapper ds-pill-wrapper-value";
|
|
29
|
-
}, [type]);
|
|
30
25
|
return /* @__PURE__ */ jsx(
|
|
31
26
|
StyledDSPillV2,
|
|
32
27
|
{
|
|
@@ -34,7 +29,6 @@ const RemovableSelectedValuePill = (props) => {
|
|
|
34
29
|
label: pill.label,
|
|
35
30
|
disabled: disabled || pill.disabled,
|
|
36
31
|
type,
|
|
37
|
-
className,
|
|
38
32
|
applyAriaDisabled: applyAriaDisabledToContainer || pill.applyAriaDisabled,
|
|
39
33
|
readOnly,
|
|
40
34
|
trailingComma,
|
|
@@ -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
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
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 // PUI-18744: no className here. DSPillV2 sets its own variant classNames (ds-pill-wrapper-removable / -label /\n // -value) and merges them with the className StyledDSPillV2 passes down; it used to overwrite them, which is why\n // this component rebuilt them by hand.\n return (\n <StyledDSPillV2\n size=\"s\"\n key={pill.value}\n label={pill.label}\n disabled={disabled || pill.disabled}\n type={type}\n applyAriaDisabled={applyAriaDisabledToContainer || pill.applyAriaDisabled}\n readOnly={readOnly}\n trailingComma={trailingComma}\n tabIndex={-1}\n labelTruncated\n /**\n * PUI-18660: intentionally unconditional for every pill type (removable/labelOnly/value),\n * not a bug. The pill never shows its own hover tooltip on truncation here \u2014 consumers who\n * need the full value in readOnly/aria-disabled states (where the menu can't be opened)\n * are expected to wrap the combobox itself in DSTooltipV3. See the Heads Up entry in the\n * v27.1 Incoming Changes release notes and the \"WithTooltip\" example in ds-form-multi-combobox.\n */\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"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsCnB;AAtCJ,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;AAKrE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MAEL,OAAO,KAAK;AAAA,MACZ,UAAU,YAAY,KAAK;AAAA,MAC3B;AAAA,MACA,mBAAmB,gCAAgC,KAAK;AAAA,MACxD;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MACV,gBAAc;AAAA,MAQd,0BAAwB;AAAA,MACxB,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,IA5BC,KAAK;AAAA,EA6BZ;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -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 }) => {\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;
|
|
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 *\n * PUI-18744: kept here on purpose, not moved into DSPillV2. Moving them would change every standalone pill\n * with disabled / applyAriaDisabled / readOnly (the Pills docs state readOnly does not change how a pill looks),\n * and whether the combobox pills keep or align these colors is UX's call in PUI-18754.\n * See KNOWN_INTENTIONAL_DEVIATIONS.md #7.\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;AA6BpC,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,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface TruncatedTextProps {
|
|
2
3
|
value?: string;
|
|
3
4
|
}
|
|
@@ -8,6 +9,6 @@ interface TruncatedTextProps {
|
|
|
8
9
|
* menu can't be opened) wrap the combobox in DSTooltipV3 themselves; see the
|
|
9
10
|
* "WithTooltip" examples in ds-form-single-combobox / ds-form-multi-combobox.
|
|
10
11
|
*/
|
|
11
|
-
declare const TruncatedText: ({ value }: TruncatedTextProps) =>
|
|
12
|
+
declare const TruncatedText: ({ value }: TruncatedTextProps) => React.JSX.Element;
|
|
12
13
|
export { TruncatedText };
|
|
13
14
|
export default TruncatedText;
|
|
@@ -9,6 +9,11 @@ export declare const StyledA11yNotVisible: import("styled-components").StyledCom
|
|
|
9
9
|
* These styles were previously part of the Pills component but have been
|
|
10
10
|
* moved here as Pills were refactored to be stateless. Combobox maintains
|
|
11
11
|
* this stateful behavior as a specific use case requirement.
|
|
12
|
+
*
|
|
13
|
+
* PUI-18744: kept here on purpose, not moved into DSPillV2. Moving them would change every standalone pill
|
|
14
|
+
* with disabled / applyAriaDisabled / readOnly (the Pills docs state readOnly does not change how a pill looks),
|
|
15
|
+
* and whether the combobox pills keep or align these colors is UX's call in PUI-18754.
|
|
16
|
+
* See KNOWN_INTENTIONAL_DEVIATIONS.md #7.
|
|
12
17
|
*/
|
|
13
18
|
export declare const StyledDSPillV2: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-pills-v2").DSPillT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-pills-v2").DSPillT.Props>>, never>;
|
|
14
19
|
export declare const StyledDSPillGroupV2: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-pills-v2/dist/types/parts/DSPillGroup/react-desc-prop-types.js").DSPillGroupT.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-pills-v2/dist/types/parts/DSPillGroup/react-desc-prop-types.js").DSPillGroupT.Props>>, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-combobox",
|
|
3
|
-
"version": "3.80.0-next.
|
|
3
|
+
"version": "3.80.0-next.72",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Combobox",
|
|
6
6
|
"files": [
|
|
@@ -36,23 +36,23 @@
|
|
|
36
36
|
"indent": 4
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@elliemae/ds-button-v2": "3.80.0-next.
|
|
40
|
-
"@elliemae/ds-circular-progress-indicator": "3.80.0-next.
|
|
41
|
-
"@elliemae/ds-fast-list": "3.80.0-next.
|
|
42
|
-
"@elliemae/ds-floating-context": "3.80.0-next.
|
|
43
|
-
"@elliemae/ds-grid": "3.80.0-next.
|
|
44
|
-
"@elliemae/ds-icons": "3.80.0-next.
|
|
45
|
-
"@elliemae/ds-menu-items": "3.80.0-next.
|
|
46
|
-
"@elliemae/ds-pills-v2": "3.80.0-next.
|
|
47
|
-
"@elliemae/ds-props-helpers": "3.80.0-next.
|
|
48
|
-
"@elliemae/ds-system": "3.80.0-next.
|
|
49
|
-
"@elliemae/ds-typography": "3.80.0-next.
|
|
39
|
+
"@elliemae/ds-button-v2": "3.80.0-next.72",
|
|
40
|
+
"@elliemae/ds-circular-progress-indicator": "3.80.0-next.72",
|
|
41
|
+
"@elliemae/ds-fast-list": "3.80.0-next.72",
|
|
42
|
+
"@elliemae/ds-floating-context": "3.80.0-next.72",
|
|
43
|
+
"@elliemae/ds-grid": "3.80.0-next.72",
|
|
44
|
+
"@elliemae/ds-icons": "3.80.0-next.72",
|
|
45
|
+
"@elliemae/ds-menu-items": "3.80.0-next.72",
|
|
46
|
+
"@elliemae/ds-pills-v2": "3.80.0-next.72",
|
|
47
|
+
"@elliemae/ds-props-helpers": "3.80.0-next.72",
|
|
48
|
+
"@elliemae/ds-system": "3.80.0-next.72",
|
|
49
|
+
"@elliemae/ds-typography": "3.80.0-next.72",
|
|
50
50
|
"uid": "^2.0.2"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@elliemae/ds-form-helpers-mask-hooks": "3.80.0-next.
|
|
54
|
-
"@elliemae/ds-monorepo-devops": "3.80.0-next.
|
|
55
|
-
"@elliemae/ds-test-utils": "3.80.0-next.
|
|
53
|
+
"@elliemae/ds-form-helpers-mask-hooks": "3.80.0-next.72",
|
|
54
|
+
"@elliemae/ds-monorepo-devops": "3.80.0-next.72",
|
|
55
|
+
"@elliemae/ds-test-utils": "3.80.0-next.72",
|
|
56
56
|
"@elliemae/pui-theme": "~2.13.0",
|
|
57
57
|
"jest": "^30.0.0",
|
|
58
58
|
"styled-components": "~5.3.11",
|