@wallarm-org/design-system 0.77.4 → 0.77.5

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.
@@ -10,8 +10,10 @@ export declare const segmentContainer = "flex flex-col justify-center overflow-h
10
10
  /** Hit target for an empty required value: a small full-height box so the value
11
11
  * is clickable and the trailing × can't sit on top of it (AS-1192). */
12
12
  export declare const emptyValueHitTarget = "min-w-[4px] self-stretch";
13
- /** Min width for the value edit input so an empty freeform value stays clickable. */
14
- export declare const editingValueMinWidth = "min-w-[3.5rem]";
13
+ /** The value edit input hugs its content (measured width + WIDTH_OFFSET). `min-w-0`
14
+ * drops the flex/intrinsic min-width so a short value like "f" isn't forced into a
15
+ * wide box; an empty value falls back to the sizer's MIN_INPUT_WIDTH floor. */
16
+ export declare const editingValueMinWidth = "min-w-0";
15
17
  /** Segment text styles by variant */
16
18
  export declare const segmentTextVariants: (props?: ({
17
19
  variant?: "value" | "operator" | "attribute" | null | undefined;
@@ -36,7 +36,7 @@ const chipVariants = cva(`h-22 group/chip relative flex items-center justify-cen
36
36
  });
37
37
  const segmentContainer = 'flex flex-col justify-center overflow-hidden leading-none';
38
38
  const emptyValueHitTarget = 'min-w-[4px] self-stretch';
39
- const editingValueMinWidth = 'min-w-[3.5rem]';
39
+ const editingValueMinWidth = 'min-w-0';
40
40
  const segmentTextVariants = cva('truncate text-sm', {
41
41
  variants: {
42
42
  variant: {
@@ -1,9 +1,11 @@
1
1
  /** Minimum input width in px */
2
2
  export declare const MIN_INPUT_WIDTH = 4;
3
- /** Maximum input width in px caps the content-sized input so a long value
4
- * can't grow it past the chip; beyond this it scrolls content natively. */
3
+ /** Maximum measured content width in px before the edit input stops growing
4
+ * (the rendered width is this + WIDTH_OFFSET); caps a long value so it can't
5
+ * grow past the chip, beyond which it scrolls content natively. */
5
6
  export declare const MAX_INPUT_WIDTH = 280;
6
- /** Extra pixels added to measured width to prevent text clipping */
7
- export declare const WIDTH_OFFSET = 1;
7
+ /** Extra pixels added to measured width: caret room so the edit input sits at
8
+ * the entered text width + 4px (prevents clipping and the caret hugging the edge). */
9
+ export declare const WIDTH_OFFSET = 4;
8
10
  /** Approximate width of a single character in px (text-sm fallback) */
9
11
  export declare const CHAR_WIDTH_PX = 8;
@@ -1,5 +1,5 @@
1
1
  const MIN_INPUT_WIDTH = 4;
2
2
  const MAX_INPUT_WIDTH = 280;
3
- const WIDTH_OFFSET = 1;
3
+ const WIDTH_OFFSET = 4;
4
4
  const CHAR_WIDTH_PX = 8;
5
5
  export { CHAR_WIDTH_PX, MAX_INPUT_WIDTH, MIN_INPUT_WIDTH, WIDTH_OFFSET };
@@ -1,4 +1,5 @@
1
1
  import { useCallback } from "react";
2
+ import { flushSync } from "react-dom";
2
3
  import { SEGMENT_VARIANT } from "../../../FilterInputField/FilterInputChip/index.js";
3
4
  import { OPERATOR_SYMBOLS, chipIdToConditionIndex, getFieldOperators, getOperatorFromLabel, isNoValueOperator, isOperatorAllowedForField, isValueShapeCompatible } from "../../../lib/index.js";
4
5
  const useOperatorFlow = ({ editing, selectedField, selectedOperator, insertIndex, upsertCondition, conditionsRef, resetState, setSelectedOperator, setMenuState, setBuildingMultiValue, setInputText, buildingSide, buildingBase, setBuildingBase, setBuildingSide })=>{
@@ -49,6 +50,14 @@ const useOperatorFlow = ({ editing, selectedField, selectedOperator, insertIndex
49
50
  setSegmentFilterText('');
50
51
  }
51
52
  }
53
+ if (!editingChipId) {
54
+ flushSync(()=>{
55
+ setSelectedOperator(operator);
56
+ setInputText('');
57
+ });
58
+ setMenuState('value');
59
+ return;
60
+ }
52
61
  setSelectedOperator(operator);
53
62
  setInputText('');
54
63
  setMenuState('value');
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.77.3",
3
- "generatedAt": "2026-07-22T07:11:53.777Z",
2
+ "version": "0.77.4",
3
+ "generatedAt": "2026-07-22T15:52:25.806Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Accordion",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "0.77.4",
3
+ "version": "0.77.5",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",