@wallarm-org/design-system 0.31.0 → 0.31.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,13 @@ export interface AttributeProps extends HTMLAttributes<HTMLDivElement>, Testable
5
5
  ref?: Ref<HTMLDivElement>;
6
6
  /** Show skeleton placeholders instead of children */
7
7
  loading?: boolean;
8
+ /**
9
+ * When true, `AttributeValue` renders the em-dash placeholder instead of its
10
+ * children, and any `AttributeEmptyDescription` inside the tree renders
11
+ * (it returns `null` otherwise). Ignored while `loading` is true (skeleton
12
+ * wins).
13
+ */
14
+ isEmpty?: boolean;
8
15
  /**
9
16
  * Layout direction of the label and value.
10
17
  * - `vertical` (default): label above value
@@ -1,22 +1,27 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../utils/cn.js";
3
3
  import { TestIdProvider } from "../../utils/testId.js";
4
+ import { AttributeEmptyProvider } from "./AttributeEmptyContext.js";
4
5
  import { AttributeLoading } from "./AttributeLoading.js";
5
6
  import { AttributeOrientationProvider } from "./AttributeOrientationContext.js";
6
- const Attribute = ({ ref, loading = false, orientation = 'vertical', children, className, 'data-testid': testId, ...props })=>{
7
+ const Attribute = ({ ref, loading = false, isEmpty = false, orientation = 'vertical', children, className, 'data-testid': testId, ...props })=>{
7
8
  const isHorizontal = 'horizontal' === orientation;
8
9
  return /*#__PURE__*/ jsx(TestIdProvider, {
9
10
  value: testId,
10
11
  children: /*#__PURE__*/ jsx(AttributeOrientationProvider, {
11
12
  value: orientation,
12
- children: /*#__PURE__*/ jsx("div", {
13
- ...props,
14
- ref: ref,
15
- "data-testid": testId,
16
- "data-slot": "attribute",
17
- "data-orientation": orientation,
18
- className: cn(isHorizontal ? 'flex flex-row items-start gap-4' : 'flex flex-col', className),
19
- children: loading ? /*#__PURE__*/ jsx(AttributeLoading, {}) : children
13
+ children: /*#__PURE__*/ jsx(AttributeEmptyProvider, {
14
+ value: isEmpty,
15
+ children: /*#__PURE__*/ jsx("div", {
16
+ ...props,
17
+ ref: ref,
18
+ "data-testid": testId,
19
+ "data-slot": "attribute",
20
+ "data-orientation": orientation,
21
+ "data-empty": !loading && isEmpty ? '' : void 0,
22
+ className: cn(isHorizontal ? 'flex flex-row items-start gap-4' : 'flex flex-col', className),
23
+ children: loading ? /*#__PURE__*/ jsx(AttributeLoading, {}) : children
24
+ })
20
25
  })
21
26
  })
22
27
  });
@@ -0,0 +1,7 @@
1
+ export declare const AttributeEmptyProvider: import("react").Provider<boolean>;
2
+ /**
3
+ * Read whether the surrounding `Attribute` was rendered with `isEmpty`.
4
+ * Consumed by `AttributeValue` (forces the em-dash placeholder) and
5
+ * `AttributeEmptyDescription` (renders only when true).
6
+ */
7
+ export declare const useAttributeEmpty: () => boolean;
@@ -0,0 +1,5 @@
1
+ import { createContext, useContext } from "react";
2
+ const AttributeEmptyContext = createContext(false);
3
+ const AttributeEmptyProvider = AttributeEmptyContext.Provider;
4
+ const useAttributeEmpty = ()=>useContext(AttributeEmptyContext);
5
+ export { AttributeEmptyProvider, useAttributeEmpty };
@@ -0,0 +1,25 @@
1
+ import type { FC, HTMLAttributes, ReactNode, Ref } from 'react';
2
+ export interface AttributeEmptyDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
3
+ ref?: Ref<HTMLParagraphElement>;
4
+ children?: ReactNode;
5
+ }
6
+ /**
7
+ * Description shown only while the surrounding `Attribute` is in the
8
+ * `isEmpty` state. Renders `null` otherwise. Internally a thin conditional
9
+ * wrapper around `AttributeLabelDescription` — same layout, same styling,
10
+ * just gated by `isEmpty`.
11
+ *
12
+ * Typically placed inside `<AttributeLabel>`; works anywhere inside an
13
+ * `<Attribute>` since the visibility comes from context.
14
+ *
15
+ * ```tsx
16
+ * <Attribute isEmpty>
17
+ * <AttributeLabel>
18
+ * Owner
19
+ * <AttributeEmptyDescription>Not yet assigned</AttributeEmptyDescription>
20
+ * </AttributeLabel>
21
+ * <AttributeValue />
22
+ * </Attribute>
23
+ * ```
24
+ */
25
+ export declare const AttributeEmptyDescription: FC<AttributeEmptyDescriptionProps>;
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useAttributeEmpty } from "./AttributeEmptyContext.js";
3
+ import { AttributeLabelDescription } from "./AttributeLabelDescription.js";
4
+ const AttributeEmptyDescription = ({ ref, children, ...props })=>{
5
+ const isEmpty = useAttributeEmpty();
6
+ if (!isEmpty) return null;
7
+ return /*#__PURE__*/ jsx(AttributeLabelDescription, {
8
+ ...props,
9
+ ref: ref,
10
+ children: children
11
+ });
12
+ };
13
+ AttributeEmptyDescription.displayName = "AttributeEmptyDescription";
14
+ export { AttributeEmptyDescription };
@@ -3,21 +3,23 @@ import { Children } from "react";
3
3
  import { cn } from "../../utils/cn.js";
4
4
  import { useTestId } from "../../utils/testId.js";
5
5
  import { Text } from "../Text/index.js";
6
+ import { useAttributeEmpty } from "./AttributeEmptyContext.js";
6
7
  import { useAttributeOrientation } from "./AttributeOrientationContext.js";
7
- function isEmpty(children) {
8
- return null == children || false === children || 0 === Children.count(children);
9
- }
8
+ const isEmptyChildren = (children)=>null == children || false === children || 0 === Children.count(children);
10
9
  const AttributeValue = ({ ref, children, className, ...props })=>{
11
10
  const testId = useTestId('value');
12
11
  const orientation = useAttributeOrientation();
12
+ const isEmptyAttribute = useAttributeEmpty();
13
13
  const isHorizontal = 'horizontal' === orientation;
14
+ const hasEmptyChildren = isEmptyChildren(children);
15
+ const showPlaceholder = isEmptyAttribute || hasEmptyChildren;
14
16
  return /*#__PURE__*/ jsx("div", {
15
17
  ...props,
16
18
  ref: ref,
17
19
  "data-testid": testId,
18
20
  "data-slot": "attribute-value",
19
21
  className: cn('flex items-center', isHorizontal ? 'flex-1 min-w-0 py-4 truncate' : 'pt-4 min-h-[28px]', className),
20
- children: isEmpty(children) ? /*#__PURE__*/ jsx(Text, {
22
+ children: showPlaceholder ? /*#__PURE__*/ jsx(Text, {
21
23
  size: "sm",
22
24
  color: "secondary",
23
25
  children: "—"
@@ -3,6 +3,8 @@ export { AttributeActions, type AttributeActionsProps } from './AttributeActions
3
3
  export { AttributeActionsContent, type AttributeActionsContentProps, } from './AttributeActionsContent';
4
4
  export { AttributeActionsItem, type AttributeActionsItemProps } from './AttributeActionsItem';
5
5
  export { AttributeActionsTarget, type AttributeActionsTargetProps } from './AttributeActionsTarget';
6
+ export { useAttributeEmpty } from './AttributeEmptyContext';
7
+ export { AttributeEmptyDescription, type AttributeEmptyDescriptionProps, } from './AttributeEmptyDescription';
6
8
  export { AttributeLabel, type AttributeLabelProps } from './AttributeLabel';
7
9
  export { AttributeLabelDescription, type AttributeLabelDescriptionProps, } from './AttributeLabelDescription';
8
10
  export { AttributeLabelInfo, type AttributeLabelInfoProps } from './AttributeLabelInfo';
@@ -3,8 +3,10 @@ import { AttributeActions } from "./AttributeActions.js";
3
3
  import { AttributeActionsContent } from "./AttributeActionsContent.js";
4
4
  import { AttributeActionsItem } from "./AttributeActionsItem.js";
5
5
  import { AttributeActionsTarget } from "./AttributeActionsTarget.js";
6
+ import { useAttributeEmpty } from "./AttributeEmptyContext.js";
7
+ import { AttributeEmptyDescription } from "./AttributeEmptyDescription.js";
6
8
  import { AttributeLabel } from "./AttributeLabel.js";
7
9
  import { AttributeLabelDescription } from "./AttributeLabelDescription.js";
8
10
  import { AttributeLabelInfo } from "./AttributeLabelInfo.js";
9
11
  import { AttributeValue } from "./AttributeValue.js";
10
- export { Attribute, AttributeActions, AttributeActionsContent, AttributeActionsItem, AttributeActionsTarget, AttributeLabel, AttributeLabelDescription, AttributeLabelInfo, AttributeValue };
12
+ export { Attribute, AttributeActions, AttributeActionsContent, AttributeActionsItem, AttributeActionsTarget, AttributeEmptyDescription, AttributeLabel, AttributeLabelDescription, AttributeLabelInfo, AttributeValue, useAttributeEmpty };
@@ -1,5 +1,5 @@
1
1
  export { FilterInput, type FilterInputProps } from './FilterInput';
2
2
  export { FilterInputChip, type FilterInputChipProps } from './FilterInputField';
3
3
  export { FilterInputFieldMenu, type FilterInputFieldMenuProps, FilterInputOperatorMenu, type FilterInputOperatorMenuProps, FilterInputValueMenu, type FilterInputValueMenuProps, type ValueOption, } from './FilterInputMenu';
4
- export { applyFieldValueTransforms, createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator, type FilterParseError, isFilterParseError, parseExpression, serializeExpression, } from './lib';
4
+ export { applyFieldValueTransforms, createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator, type FilterParseError, getKnownFieldSerializer, isFilterParseError, parseExpression, serializeExpression, } from './lib';
5
5
  export type { Condition, ExprNode, FieldMetadata, FieldType, FieldValueOption, FilterInputChipData, FilterInputChipVariant, FilterOperator, Group, } from './types';
@@ -1,5 +1,5 @@
1
1
  import { FilterInput } from "./FilterInput.js";
2
2
  import { FilterInputChip } from "./FilterInputField/index.js";
3
3
  import { FilterInputFieldMenu, FilterInputOperatorMenu, FilterInputValueMenu } from "./FilterInputMenu/index.js";
4
- import { applyFieldValueTransforms, createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator, isFilterParseError, parseExpression, serializeExpression } from "./lib/index.js";
5
- export { FilterInput, FilterInputChip, FilterInputFieldMenu, FilterInputOperatorMenu, FilterInputValueMenu, applyFieldValueTransforms, createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator, isFilterParseError, parseExpression, serializeExpression };
4
+ import { applyFieldValueTransforms, createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator, getKnownFieldSerializer, isFilterParseError, parseExpression, serializeExpression } from "./lib/index.js";
5
+ export { FilterInput, FilterInputChip, FilterInputFieldMenu, FilterInputOperatorMenu, FilterInputValueMenu, applyFieldValueTransforms, createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator, getKnownFieldSerializer, isFilterParseError, parseExpression, serializeExpression };
@@ -3,19 +3,32 @@ import type { FieldMetadata } from '../types';
3
3
  * Decorate `fields` in place with design-system helpers for known field names.
4
4
  * `FilterInput` calls this on the `fields` prop before rendering.
5
5
  *
6
- * Reserved names and what they auto-attach (unless the consumer already
7
- * provided a value for that slot):
6
+ * Reserved names and what the design system owns:
8
7
  *
9
- * | `name` | Attaches |
8
+ * | `name` | DS owns |
10
9
  * | ------------- | ------------------------------------------------------------------------------------------ |
11
10
  * | `status_code` | HTTP status code: `acceptChar`, `normalize`, `getSuggestions`, `validate`, `serializeValue` |
12
11
  *
13
- * Consumer-supplied callbacks always win over the auto-wired ones. If the
14
- * backend uses a different name (e.g. `http_status_code`), the helpers are
15
- * NOT applied the consumer must either rename the field to match or wire
16
- * the factories (`createStatusCode*`) manually.
12
+ * For reserved names, DS-supplied callbacks **override** any consumer-supplied
13
+ * value for the same slot. This is intentional: the field semantics (mask
14
+ * range `1XX..5XX`, accepted characters, backend form) are fixed by the
15
+ * design system. Consumer-supplied `options`/`getSuggestions` would otherwise
16
+ * fight the canonical mask UX.
17
+ *
18
+ * If the backend uses a different name (e.g. `http_status_code`), the helpers
19
+ * are NOT applied — the consumer must either rename the field to match or
20
+ * wire the factories (`createStatusCode*`) manually.
17
21
  *
18
22
  * The returned array has **reference-stable identity** when no field matches,
19
23
  * so downstream `useMemo` that depends on it does not invalidate unnecessarily.
20
24
  */
21
25
  export declare const applyKnownFieldHelpers: (fields: FieldMetadata[]) => FieldMetadata[];
26
+ /**
27
+ * Look up the backend-form serializer for a reserved field name. Returns
28
+ * `undefined` for unknown names. Useful for consumers that hold their own
29
+ * expression shape (not DS `ExprNode`) but need to apply the same backend
30
+ * transform that the FilterInput's `serializeValue` slot would produce — so
31
+ * they can drive the lookup off the field name without hard-coding which
32
+ * names are reserved.
33
+ */
34
+ export declare const getKnownFieldSerializer: (fieldName: string) => NonNullable<FieldMetadata["serializeValue"]> | undefined;
@@ -17,13 +17,14 @@ const applyKnownFieldHelpers = (fields)=>{
17
17
  changed = true;
18
18
  return {
19
19
  ...field,
20
- acceptChar: field.acceptChar ?? helpers.acceptChar,
21
- normalize: field.normalize ?? helpers.normalize,
22
- getSuggestions: field.getSuggestions ?? helpers.getSuggestions,
23
- validate: field.validate ?? helpers.validate,
24
- serializeValue: field.serializeValue ?? helpers.serializeValue
20
+ acceptChar: helpers.acceptChar,
21
+ normalize: helpers.normalize,
22
+ getSuggestions: helpers.getSuggestions,
23
+ validate: helpers.validate,
24
+ serializeValue: helpers.serializeValue
25
25
  };
26
26
  });
27
27
  return changed ? out : fields;
28
28
  };
29
- export { applyKnownFieldHelpers };
29
+ const getKnownFieldSerializer = (fieldName)=>KNOWN_FIELD_HELPERS[fieldName]?.().serializeValue;
30
+ export { applyKnownFieldHelpers, getKnownFieldSerializer };
@@ -2,7 +2,7 @@ export type { DatePreset } from '../FilterInputMenu/FilterInputDateValueMenu/con
2
2
  export { DATE_PRESETS, formatDateForChip, getDateDisplayLabel, isDatePreset, } from '../FilterInputMenu/FilterInputDateValueMenu/constants';
3
3
  export { applyAcceptChar } from './applyAcceptChar';
4
4
  export { applyFieldValueTransforms } from './applyFieldValueTransforms';
5
- export { applyKnownFieldHelpers } from './applyKnownFieldHelpers';
5
+ export { applyKnownFieldHelpers, getKnownFieldSerializer } from './applyKnownFieldHelpers';
6
6
  export { chipIdToConditionIndex, findChipSplitIndex } from './conditions';
7
7
  export { CONNECTOR_ID_PATTERN, NO_VALUE_OPERATORS, OPERATOR_LABELS, OPERATOR_LABELS_BY_TYPE, OPERATOR_SYMBOLS, OPERATORS_BY_TYPE, QUERY_BAR_SELECTOR, VARIANT_LABELS, } from './constants';
8
8
  export { buildContainerAnchoredRect, isMenuRelated } from './dom';
@@ -1,7 +1,7 @@
1
1
  import { DATE_PRESETS, formatDateForChip, getDateDisplayLabel, isDatePreset } from "../FilterInputMenu/FilterInputDateValueMenu/constants.js";
2
2
  import { applyAcceptChar } from "./applyAcceptChar.js";
3
3
  import { applyFieldValueTransforms } from "./applyFieldValueTransforms.js";
4
- import { applyKnownFieldHelpers } from "./applyKnownFieldHelpers.js";
4
+ import { applyKnownFieldHelpers, getKnownFieldSerializer } from "./applyKnownFieldHelpers.js";
5
5
  import { chipIdToConditionIndex, findChipSplitIndex } from "./conditions.js";
6
6
  import { CONNECTOR_ID_PATTERN, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, OPERATOR_LABELS, OPERATOR_LABELS_BY_TYPE, OPERATOR_SYMBOLS, QUERY_BAR_SELECTOR, VARIANT_LABELS } from "./constants.js";
7
7
  import { buildContainerAnchoredRect, isMenuRelated } from "./dom.js";
@@ -12,4 +12,4 @@ import { getOperatorFromLabel, getOperatorLabel, isBetweenOperator, isMultiSelec
12
12
  import { isFilterParseError, parseExpression } from "./parseExpression/index.js";
13
13
  import { serializeExpression } from "./serializeExpression.js";
14
14
  import { createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator } from "./statusCode/index.js";
15
- export { CONNECTOR_ID_PATTERN, DATE_PRESETS, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, OPERATOR_LABELS, OPERATOR_LABELS_BY_TYPE, OPERATOR_SYMBOLS, QUERY_BAR_SELECTOR, VARIANT_LABELS, applyAcceptChar, applyFieldValueTransforms, applyKnownFieldHelpers, buildContainerAnchoredRect, chipIdToConditionIndex, createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator, filterAndSort, findChipSplitIndex, findOptionByValue, formatDateForChip, getCurrentValueTokenText, getDateDisplayLabel, getFieldValues, getOperatorFromLabel, getOperatorLabel, getValueFilterText, hasFieldValues, hasStaticAllowlist, isBetweenOperator, isDatePreset, isFilterParseError, isMenuRelated, isMultiSelectOperator, isNoValueOperator, parseExpression, serializeExpression };
15
+ export { CONNECTOR_ID_PATTERN, DATE_PRESETS, NO_VALUE_OPERATORS, OPERATORS_BY_TYPE, OPERATOR_LABELS, OPERATOR_LABELS_BY_TYPE, OPERATOR_SYMBOLS, QUERY_BAR_SELECTOR, VARIANT_LABELS, applyAcceptChar, applyFieldValueTransforms, applyKnownFieldHelpers, buildContainerAnchoredRect, chipIdToConditionIndex, createStatusCodeInputFilter, createStatusCodeNormalizer, createStatusCodeSerializer, createStatusCodeSuggestions, createStatusCodeValidator, filterAndSort, findChipSplitIndex, findOptionByValue, formatDateForChip, getCurrentValueTokenText, getDateDisplayLabel, getFieldValues, getKnownFieldSerializer, getOperatorFromLabel, getOperatorLabel, getValueFilterText, hasFieldValues, hasStaticAllowlist, isBetweenOperator, isDatePreset, isFilterParseError, isMenuRelated, isMultiSelectOperator, isNoValueOperator, parseExpression, serializeExpression };
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.30.0",
3
- "generatedAt": "2026-04-28T07:50:53.965Z",
2
+ "version": "0.31.0",
3
+ "generatedAt": "2026-04-28T11:05:33.411Z",
4
4
  "components": [
5
5
  {
6
6
  "name": "Alert",
@@ -2073,6 +2073,13 @@
2073
2073
  "description": "Show skeleton placeholders instead of children",
2074
2074
  "defaultValue": "false"
2075
2075
  },
2076
+ {
2077
+ "name": "isEmpty",
2078
+ "type": "boolean | undefined",
2079
+ "required": false,
2080
+ "description": "When true, `AttributeValue` renders the em-dash placeholder instead of its\nchildren, and any `AttributeEmptyDescription` inside the tree renders\n(it returns `null` otherwise). Ignored while `loading` is true (skeleton\nwins).",
2081
+ "defaultValue": "false"
2082
+ },
2076
2083
  {
2077
2084
  "name": "orientation",
2078
2085
  "type": "AttributeOrientation | undefined",
@@ -3238,6 +3245,281 @@
3238
3245
  }
3239
3246
  ]
3240
3247
  },
3248
+ {
3249
+ "name": "AttributeEmptyDescription",
3250
+ "props": [
3251
+ {
3252
+ "name": "defaultChecked",
3253
+ "type": "boolean | undefined",
3254
+ "required": false
3255
+ },
3256
+ {
3257
+ "name": "defaultValue",
3258
+ "type": "string | number | readonly string[] | undefined",
3259
+ "required": false
3260
+ },
3261
+ {
3262
+ "name": "suppressContentEditableWarning",
3263
+ "type": "boolean | undefined",
3264
+ "required": false
3265
+ },
3266
+ {
3267
+ "name": "suppressHydrationWarning",
3268
+ "type": "boolean | undefined",
3269
+ "required": false
3270
+ },
3271
+ {
3272
+ "name": "accessKey",
3273
+ "type": "string | undefined",
3274
+ "required": false
3275
+ },
3276
+ {
3277
+ "name": "autoCapitalize",
3278
+ "type": "\"off\" | \"none\" | \"on\" | \"sentences\" | \"words\" | \"characters\" | (string & {}) | undefined",
3279
+ "required": false
3280
+ },
3281
+ {
3282
+ "name": "autoFocus",
3283
+ "type": "boolean | undefined",
3284
+ "required": false
3285
+ },
3286
+ {
3287
+ "name": "contentEditable",
3288
+ "type": "Booleanish | \"inherit\" | \"plaintext-only\" | undefined",
3289
+ "required": false
3290
+ },
3291
+ {
3292
+ "name": "contextMenu",
3293
+ "type": "string | undefined",
3294
+ "required": false
3295
+ },
3296
+ {
3297
+ "name": "dir",
3298
+ "type": "string | undefined",
3299
+ "required": false
3300
+ },
3301
+ {
3302
+ "name": "draggable",
3303
+ "type": "Booleanish | undefined",
3304
+ "required": false
3305
+ },
3306
+ {
3307
+ "name": "enterKeyHint",
3308
+ "type": "\"enter\" | \"done\" | \"go\" | \"next\" | \"previous\" | \"search\" | \"send\" | undefined",
3309
+ "required": false
3310
+ },
3311
+ {
3312
+ "name": "hidden",
3313
+ "type": "boolean | undefined",
3314
+ "required": false
3315
+ },
3316
+ {
3317
+ "name": "id",
3318
+ "type": "string | undefined",
3319
+ "required": false
3320
+ },
3321
+ {
3322
+ "name": "lang",
3323
+ "type": "string | undefined",
3324
+ "required": false
3325
+ },
3326
+ {
3327
+ "name": "nonce",
3328
+ "type": "string | undefined",
3329
+ "required": false
3330
+ },
3331
+ {
3332
+ "name": "slot",
3333
+ "type": "string | undefined",
3334
+ "required": false
3335
+ },
3336
+ {
3337
+ "name": "spellCheck",
3338
+ "type": "Booleanish | undefined",
3339
+ "required": false
3340
+ },
3341
+ {
3342
+ "name": "tabIndex",
3343
+ "type": "number | undefined",
3344
+ "required": false
3345
+ },
3346
+ {
3347
+ "name": "title",
3348
+ "type": "string | undefined",
3349
+ "required": false
3350
+ },
3351
+ {
3352
+ "name": "translate",
3353
+ "type": "\"yes\" | \"no\" | undefined",
3354
+ "required": false
3355
+ },
3356
+ {
3357
+ "name": "radioGroup",
3358
+ "type": "string | undefined",
3359
+ "required": false
3360
+ },
3361
+ {
3362
+ "name": "role",
3363
+ "type": "AriaRole | undefined",
3364
+ "required": false
3365
+ },
3366
+ {
3367
+ "name": "about",
3368
+ "type": "string | undefined",
3369
+ "required": false
3370
+ },
3371
+ {
3372
+ "name": "content",
3373
+ "type": "string | undefined",
3374
+ "required": false
3375
+ },
3376
+ {
3377
+ "name": "datatype",
3378
+ "type": "string | undefined",
3379
+ "required": false
3380
+ },
3381
+ {
3382
+ "name": "inlist",
3383
+ "type": "any",
3384
+ "required": false
3385
+ },
3386
+ {
3387
+ "name": "prefix",
3388
+ "type": "string | undefined",
3389
+ "required": false
3390
+ },
3391
+ {
3392
+ "name": "property",
3393
+ "type": "string | undefined",
3394
+ "required": false
3395
+ },
3396
+ {
3397
+ "name": "rel",
3398
+ "type": "string | undefined",
3399
+ "required": false
3400
+ },
3401
+ {
3402
+ "name": "resource",
3403
+ "type": "string | undefined",
3404
+ "required": false
3405
+ },
3406
+ {
3407
+ "name": "rev",
3408
+ "type": "string | undefined",
3409
+ "required": false
3410
+ },
3411
+ {
3412
+ "name": "typeof",
3413
+ "type": "string | undefined",
3414
+ "required": false
3415
+ },
3416
+ {
3417
+ "name": "vocab",
3418
+ "type": "string | undefined",
3419
+ "required": false
3420
+ },
3421
+ {
3422
+ "name": "autoCorrect",
3423
+ "type": "string | undefined",
3424
+ "required": false
3425
+ },
3426
+ {
3427
+ "name": "autoSave",
3428
+ "type": "string | undefined",
3429
+ "required": false
3430
+ },
3431
+ {
3432
+ "name": "color",
3433
+ "type": "string | undefined",
3434
+ "required": false
3435
+ },
3436
+ {
3437
+ "name": "itemProp",
3438
+ "type": "string | undefined",
3439
+ "required": false
3440
+ },
3441
+ {
3442
+ "name": "itemScope",
3443
+ "type": "boolean | undefined",
3444
+ "required": false
3445
+ },
3446
+ {
3447
+ "name": "itemType",
3448
+ "type": "string | undefined",
3449
+ "required": false
3450
+ },
3451
+ {
3452
+ "name": "itemID",
3453
+ "type": "string | undefined",
3454
+ "required": false
3455
+ },
3456
+ {
3457
+ "name": "itemRef",
3458
+ "type": "string | undefined",
3459
+ "required": false
3460
+ },
3461
+ {
3462
+ "name": "results",
3463
+ "type": "number | undefined",
3464
+ "required": false
3465
+ },
3466
+ {
3467
+ "name": "security",
3468
+ "type": "string | undefined",
3469
+ "required": false
3470
+ },
3471
+ {
3472
+ "name": "unselectable",
3473
+ "type": "\"off\" | \"on\" | undefined",
3474
+ "required": false
3475
+ },
3476
+ {
3477
+ "name": "popover",
3478
+ "type": "\"\" | \"auto\" | \"manual\" | \"hint\" | undefined",
3479
+ "required": false
3480
+ },
3481
+ {
3482
+ "name": "popoverTargetAction",
3483
+ "type": "\"toggle\" | \"show\" | \"hide\" | undefined",
3484
+ "required": false
3485
+ },
3486
+ {
3487
+ "name": "popoverTarget",
3488
+ "type": "string | undefined",
3489
+ "required": false
3490
+ },
3491
+ {
3492
+ "name": "inert",
3493
+ "type": "boolean | undefined",
3494
+ "required": false,
3495
+ "description": "@see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert"
3496
+ },
3497
+ {
3498
+ "name": "inputMode",
3499
+ "type": "\"none\" | \"search\" | \"text\" | \"tel\" | \"url\" | \"email\" | \"numeric\" | \"decimal\" | undefined",
3500
+ "required": false,
3501
+ "description": "Hints at the type of data that might be entered by the user while editing the element or its contents"
3502
+ },
3503
+ {
3504
+ "name": "is",
3505
+ "type": "string | undefined",
3506
+ "required": false,
3507
+ "description": "Specify that a standard HTML element should behave like a defined custom built-in element"
3508
+ },
3509
+ {
3510
+ "name": "exportparts",
3511
+ "type": "string | undefined",
3512
+ "required": false,
3513
+ "description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts}"
3514
+ },
3515
+ {
3516
+ "name": "part",
3517
+ "type": "string | undefined",
3518
+ "required": false,
3519
+ "description": "@see {@link https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part}"
3520
+ }
3521
+ ]
3522
+ },
3241
3523
  {
3242
3524
  "name": "AttributeLabel",
3243
3525
  "props": [
@@ -4369,7 +4651,8 @@
4369
4651
  },
4370
4652
  {
4371
4653
  "name": "Empty",
4372
- "code": "() => (\n <div className='w-[400px]'>\n <Attribute>\n <AttributeLabel>\n Region\n <AttributeLabelDescription>Not yet assigned</AttributeLabelDescription>\n </AttributeLabel>\n <AttributeValue />\n </Attribute>\n </div>\n)"
4654
+ "code": "() => (\n <div className='w-[400px] flex flex-col gap-16'>\n <Attribute>\n <AttributeLabel>\n Region\n <AttributeLabelDescription>Manual composition</AttributeLabelDescription>\n </AttributeLabel>\n <AttributeValue />\n </Attribute>\n\n <Attribute isEmpty>\n <AttributeLabel>Region</AttributeLabel>\n <AttributeValue>\n <Text size='sm'>This text is replaced by the em-dash placeholder</Text>\n </AttributeValue>\n </Attribute>\n\n <Attribute isEmpty>\n <AttributeLabel>\n Owner\n <AttributeEmptyDescription>Not yet assigned</AttributeEmptyDescription>\n </AttributeLabel>\n <AttributeValue />\n </Attribute>\n\n <Attribute isEmpty>\n <AttributeLabel>\n SSO provider\n <AttributeEmptyDescription>\n Not connected —{' '}\n <Link href='#' size='md'>\n set up integration\n </Link>\n </AttributeEmptyDescription>\n </AttributeLabel>\n <AttributeValue />\n </Attribute>\n </div>\n)",
4655
+ "description": "All empty-state variants in vertical orientation:\n 1. Manual composition — `AttributeLabelDescription` always visible, value\n composed by the consumer (no `isEmpty` flag).\n 2. `isEmpty` alone — value becomes em-dash, `AttributeValue` children are\n ignored, label stays bare.\n 3. `isEmpty` + `<AttributeEmptyDescription>` — description renders only\n while `isEmpty` is true; outside that state it returns null.\n 4. Same as (3), with `ReactNode` content (text + link) inside the\n description."
4373
4656
  },
4374
4657
  {
4375
4658
  "name": "Loading",
@@ -4427,6 +4710,11 @@
4427
4710
  "name": "HorizontalLoading",
4428
4711
  "code": "() => (\n <div className='w-[400px] flex flex-col gap-8'>\n <Attribute orientation='horizontal' loading>\n <AttributeLabel>Created at</AttributeLabel>\n <AttributeValue />\n </Attribute>\n <Attribute orientation='horizontal' loading>\n <AttributeLabel>Status</AttributeLabel>\n <AttributeValue />\n </Attribute>\n </div>\n)"
4429
4712
  },
4713
+ {
4714
+ "name": "HorizontalEmpty",
4715
+ "code": "() => (\n <div className='w-[400px] flex flex-col gap-8'>\n <Attribute orientation='horizontal'>\n <AttributeLabel width={160}>\n Region\n <AttributeLabelDescription>Manual composition</AttributeLabelDescription>\n </AttributeLabel>\n <AttributeValue />\n </Attribute>\n\n <Attribute orientation='horizontal' isEmpty>\n <AttributeLabel width={160}>Region</AttributeLabel>\n <AttributeValue>\n <Text size='sm'>This text is replaced by the em-dash placeholder</Text>\n </AttributeValue>\n </Attribute>\n\n <Attribute orientation='horizontal' isEmpty>\n <AttributeLabel width={160}>\n Owner\n <AttributeEmptyDescription>Not yet assigned</AttributeEmptyDescription>\n </AttributeLabel>\n <AttributeValue />\n </Attribute>\n\n <Attribute orientation='horizontal' isEmpty>\n <AttributeLabel width={160}>\n SSO provider\n <AttributeEmptyDescription>\n Not connected —{' '}\n <Link href='#' size='md'>\n set up integration\n </Link>\n </AttributeEmptyDescription>\n </AttributeLabel>\n <AttributeValue />\n </Attribute>\n </div>\n)",
4716
+ "description": "All empty-state variants in horizontal orientation. Same four cases as\n`Empty`, just with `orientation='horizontal'` and `AttributeLabel width=160`\nto leave room for descriptions (DS clamp: 100..256px)."
4717
+ },
4430
4718
  {
4431
4719
  "name": "HorizontalWithActions",
4432
4720
  "code": "() => (\n <div className='w-[400px] flex flex-col gap-8'>\n <Attribute orientation='horizontal'>\n <AttributeLabel>Source IP</AttributeLabel>\n <AttributeValue>\n <AttributeActions data-testid='attribute-horizontal-with-actions'>\n <AttributeActionsTarget>\n <Text size='sm'>142.198.167.52</Text>\n </AttributeActionsTarget>\n <AttributeActionsContent>\n <AttributeActionsItem\n onSelect={() => {\n /* story mock */\n }}\n >\n <Filter />\n Investigate by this value\n </AttributeActionsItem>\n <AttributeActionsItem\n onSelect={() => {\n /* story mock */\n }}\n >\n <Copy />\n Copy value\n </AttributeActionsItem>\n </AttributeActionsContent>\n </AttributeActions>\n </AttributeValue>\n </Attribute>\n\n <Attribute orientation='horizontal'>\n <AttributeLabel>Status</AttributeLabel>\n <AttributeValue>\n <AttributeActions>\n <AttributeActionsTarget>\n <Badge color='red' variant='dotted'>\n Blocked\n </Badge>\n </AttributeActionsTarget>\n <AttributeActionsContent>\n <AttributeActionsItem\n onSelect={() => {\n /* story mock */\n }}\n >\n <Filter />\n Investigate by this value\n </AttributeActionsItem>\n <AttributeActionsItem\n onSelect={() => {\n /* story mock */\n }}\n >\n <Copy />\n Copy value\n </AttributeActionsItem>\n </AttributeActionsContent>\n </AttributeActions>\n </AttributeValue>\n </Attribute>\n </div>\n)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wallarm-org/design-system",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "description": "Core design system library with React components and Storybook documentation",
5
5
  "publishConfig": {
6
6
  "access": "public",