@veevarts/design-system 1.17.0-alpha.4 → 1.17.0-alpha.6

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.
@@ -1,7 +1,21 @@
1
1
  import { default as React } from 'react';
2
+ /**
3
+ * The uppercase field label, standalone — for a control this component does
4
+ * not cover (a checkbox group, a read-only preview) that should still be
5
+ * captioned like every other admin field. `suffix` is the lighter tail:
6
+ * "· optional", "· auto-generated, immutable".
7
+ */
8
+ export declare const AdminFieldLabel: React.FC<{
9
+ children: React.ReactNode;
10
+ suffix?: React.ReactNode;
11
+ className?: string;
12
+ 'data-testid'?: string;
13
+ }>;
2
14
  interface AdminTextFieldBase {
3
15
  /** Uppercase label above the control. Omit only when an adjacent element already names it. */
4
16
  label?: React.ReactNode;
17
+ /** Lighter annotation after the label (e.g. `· optional`). Ignored without a label. */
18
+ labelSuffix?: React.ReactNode;
5
19
  value: string;
6
20
  placeholder?: string;
7
21
  disabled?: boolean;
@@ -1,3 +1,3 @@
1
- export { AdminTextField } from './AdminTextField';
1
+ export { AdminFieldLabel, AdminTextField } from './AdminTextField';
2
2
  export type { AdminTextFieldProps } from './AdminTextField';
3
- export { adminFieldErrorClass, adminFieldHintClass, adminFieldLabelClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './styles';
3
+ export { adminFieldErrorClass, adminFieldHintClass, adminFieldLabelClass, adminFieldLabelSuffixClass, adminInputClass, adminInputReadOnlyClass, adminInputWrapperClass, } from './styles';
@@ -16,6 +16,12 @@
16
16
  */
17
17
  /** Uppercase label above a control — HeroUI's `label` slot. */
18
18
  export declare const adminFieldLabelClass = "text-[11px] font-semibold uppercase tracking-[.04em] text-acct-muted mb-1.5";
19
+ /**
20
+ * The lighter tail of a label — "· optional", "· auto-generated, immutable".
21
+ * Undoes the label's uppercase/tracking/weight so the annotation reads as an
22
+ * aside, not as part of the field's name.
23
+ */
24
+ export declare const adminFieldLabelSuffixClass = "font-normal normal-case tracking-normal";
19
25
  /**
20
26
  * The 38px box — HeroUI's `inputWrapper` slot, which carries the border and
21
27
  * background (the `input` slot is the bare field).
@@ -2,8 +2,10 @@ import { default as React } from 'react';
2
2
  export interface AdminToolbarProps {
3
3
  searchValue: string;
4
4
  onSearchChange: (value: string) => void;
5
- /** Placeholder AND the hidden label, so the field is named even once filled. */
5
+ /** The field's accessible name — say what it searches, not how. */
6
6
  searchLabel: string;
7
+ /** Visible hint. Falls back to the label when the two would say the same thing. */
8
+ searchPlaceholder?: string;
7
9
  /** Leading glyph inside the search box. */
8
10
  searchIcon?: React.ReactNode;
9
11
  /** Filters, sort pickers, a toggle — laid out after the search box. */
@@ -1,6 +1,6 @@
1
1
  import { JSX } from 'react';
2
2
  import { EmptyStateProps, ErrorStateProps, FeedbackStateProps, LoadingStateProps, SuccessStateProps } from './type';
3
- export declare function FeedbackState({ variant, title, titleAs: TitleElement, description, icon, actions, role, ariaLive, iconSize, className, classNames, 'data-testid': dataTestId, }: FeedbackStateProps): JSX.Element;
3
+ export declare function FeedbackState({ variant, surface, title, titleAs: TitleElement, description, icon, actions, role, ariaLive, iconSize, className, classNames, 'data-testid': dataTestId, }: FeedbackStateProps): JSX.Element;
4
4
  export declare namespace FeedbackState {
5
5
  var displayName: string;
6
6
  }
@@ -1,5 +1,18 @@
1
1
  import { AriaRole, ReactNode } from 'react';
2
2
  export type FeedbackStateVariant = 'empty' | 'error' | 'success' | 'loading';
3
+ /**
4
+ * Where the state is rendered, which is a different question from what it says.
5
+ *
6
+ * `card` is the inline block: a dashed outline that marks off a region of a
7
+ * denser page. `panel` is the whole content area of an admin card that has
8
+ * nothing to show — no outline (the card already draws one), a larger icon tile
9
+ * and heavier title, sized so the state does not read as a small notice
10
+ * stranded in a big empty box.
11
+ *
12
+ * The `panel` measurements are the back-office mockups', which is why they are
13
+ * pinned rather than rounded to the nearest scale step.
14
+ */
15
+ export type FeedbackStateSurface = 'card' | 'panel';
3
16
  export interface FeedbackStateClassNames {
4
17
  base?: string;
5
18
  iconWrapper?: string;
@@ -12,6 +25,8 @@ export interface FeedbackStateClassNames {
12
25
  export interface FeedbackStateProps {
13
26
  /** Visual tone and default accessibility role. */
14
27
  variant?: FeedbackStateVariant;
28
+ /** Inline block (default) or the full content area of an admin card. */
29
+ surface?: FeedbackStateSurface;
15
30
  /** Main state message. */
16
31
  title: ReactNode;
17
32
  /** Semantic element used for the title. Defaults to a paragraph for inline states. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "1.17.0-alpha.4",
4
+ "version": "1.17.0-alpha.6",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",