@wallarm-org/design-system 1.8.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -21,9 +21,11 @@ export interface FilterInputChipProps extends Omit<HTMLAttributes<HTMLDivElement
|
|
|
21
21
|
/** When true, the chip cannot be edited or removed (dimmed appearance) */
|
|
22
22
|
disabled?: boolean;
|
|
23
23
|
/** Caps the applied value segment at this width (px), truncating with an
|
|
24
|
-
* ellipsis; lifts the chip's default max-width so it grows to fit
|
|
24
|
+
* ellipsis; lifts the chip's default max-width so it grows to fit. Defaults
|
|
25
|
+
* to 500; a paired chip caps its whole width there instead (AS-1064). */
|
|
25
26
|
valueMaxWidth?: number;
|
|
26
|
-
/**
|
|
27
|
+
/** Caret placement on value inline-edit: `'end'` (default) puts it at the
|
|
28
|
+
* tail — better for long values; pass explicitly to keep the API visible (AS-1064). */
|
|
27
29
|
caretMode?: 'end';
|
|
28
30
|
/** Second paired triplet (two-step fields). The paired attribute is fixed. */
|
|
29
31
|
pair?: FilterInputChipData['pair'];
|
|
@@ -9,7 +9,7 @@ import { FilterInputRemoveButton } from "./FilterInputRemoveButton.js";
|
|
|
9
9
|
import { PairSeparator } from "./PairSeparator.js";
|
|
10
10
|
import { Segment } from "./Segment.js";
|
|
11
11
|
import { SEGMENT_VARIANT } from "./segmentVariant.js";
|
|
12
|
-
const FilterInputChip = ({ ref, chipId, attribute, attributeDescription, operator, value, error = false, valueParts, valueSeparator, errorValueIndices, building = false, disabled = false, valueMaxWidth, caretMode, pair, onRemove, onSegmentClick, onPairSegmentClick, className, style, ...props })=>{
|
|
12
|
+
const FilterInputChip = ({ ref, chipId, attribute, attributeDescription, operator, value, error = false, valueParts, valueSeparator, errorValueIndices, building = false, disabled = false, valueMaxWidth = 500, caretMode = 'end', pair, onRemove, onSegmentClick, onPairSegmentClick, className, style, ...props })=>{
|
|
13
13
|
const interactive = !disabled;
|
|
14
14
|
const internalRef = useRef(null);
|
|
15
15
|
const editing = useEditingContext();
|
|
@@ -74,11 +74,14 @@ const FilterInputChip = ({ ref, chipId, attribute, attributeDescription, operato
|
|
|
74
74
|
interactive,
|
|
75
75
|
disabled,
|
|
76
76
|
building
|
|
77
|
-
}), pair ?
|
|
78
|
-
style:
|
|
77
|
+
}), pair ? void 0 : 'max-w-[320px]', className),
|
|
78
|
+
style: pair ? {
|
|
79
|
+
maxWidth: valueMaxWidth,
|
|
80
|
+
...style
|
|
81
|
+
} : {
|
|
79
82
|
maxWidth: 'none',
|
|
80
83
|
...style
|
|
81
|
-
}
|
|
84
|
+
},
|
|
82
85
|
"data-slot": "filter-input-condition-chip",
|
|
83
86
|
...building && {
|
|
84
87
|
'data-building': ''
|
|
@@ -144,6 +147,8 @@ const FilterInputChip = ({ ref, chipId, attribute, attributeDescription, operato
|
|
|
144
147
|
variant: SEGMENT_VARIANT.value,
|
|
145
148
|
className: pair.value ? 'min-w-0' : emptyValueHitTarget,
|
|
146
149
|
error: pairActiveSegment !== SEGMENT_VARIANT.value && (true === effectivePairError || effectivePairError === SEGMENT_VARIANT.value),
|
|
150
|
+
caretMode: caretMode,
|
|
151
|
+
valueMaxWidth: valueMaxWidth,
|
|
147
152
|
onClick: interactive ? (e)=>handlePairSegmentClick('value', e) : void 0,
|
|
148
153
|
...segmentEditProps(SEGMENT_VARIANT.value, 1),
|
|
149
154
|
children: pair.value ?? ''
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.
|
|
3
|
-
"generatedAt": "2026-08-
|
|
2
|
+
"version": "1.8.0",
|
|
3
|
+
"generatedAt": "2026-08-26T13:19:26.738Z",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"name": "Accordion",
|
|
@@ -30385,13 +30385,13 @@
|
|
|
30385
30385
|
"name": "valueMaxWidth",
|
|
30386
30386
|
"type": "number | undefined",
|
|
30387
30387
|
"required": false,
|
|
30388
|
-
"description": "Caps the applied value segment at this width (px), truncating with an\n ellipsis; lifts the chip's default max-width so it grows to fit (AS-1064)."
|
|
30388
|
+
"description": "Caps the applied value segment at this width (px), truncating with an\n ellipsis; lifts the chip's default max-width so it grows to fit. Defaults\n to 500; a paired chip caps its whole width there instead (AS-1064)."
|
|
30389
30389
|
},
|
|
30390
30390
|
{
|
|
30391
30391
|
"name": "caretMode",
|
|
30392
30392
|
"type": "\"end\" | undefined",
|
|
30393
30393
|
"required": false,
|
|
30394
|
-
"description": "`'end'`
|
|
30394
|
+
"description": "Caret placement on value inline-edit: `'end'` (default) puts it at the\n tail — better for long values; pass explicitly to keep the API visible (AS-1064)."
|
|
30395
30395
|
},
|
|
30396
30396
|
{
|
|
30397
30397
|
"name": "pair",
|