@mediaradar/design-components 0.8.0 → 0.8.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.
package/dist/index.d.cts CHANGED
@@ -165,6 +165,7 @@ declare function AdvertiserSearchPrompt({ label }: AdvertiserSearchPromptProps):
165
165
  * ```
166
166
  */
167
167
  interface CheckBoxProps {
168
+ /** Whether the box is checked. Controlled: the parent owns this value. */
168
169
  checked: boolean;
169
170
  /**
170
171
  * Some-but-not-all state for a "select all" checkbox -- shows a dash
@@ -172,9 +173,14 @@ interface CheckBoxProps {
172
173
  * plain boolean.
173
174
  */
174
175
  indeterminate?: boolean;
176
+ /**
177
+ * Called on click with no argument -- flip `checked` yourself. The click
178
+ * doesn't bubble, so a row that toggles on its own click won't fire twice.
179
+ */
175
180
  onChange: () => void;
176
181
  /** Accessible label -- required since the control carries no visible text of its own. */
177
182
  ariaLabel: string;
183
+ /** Blocks clicks, dims the box to 50% opacity, and cancels its hover preview. */
178
184
  disabled?: boolean;
179
185
  /** Forwarded as `data-testid`, for Playwright/test selectors. */
180
186
  testId?: string;
@@ -493,6 +499,8 @@ interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
493
499
  subtitle?: string;
494
500
  /** Trailing header content, e.g. a "View all" link. Ignored without `title`. */
495
501
  action?: ReactNode;
502
+ /** Card body. Rendered edge to edge without `title`; inside the standard padding with it. */
503
+ children?: ReactNode;
496
504
  }
497
505
  declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLElement>>;
498
506
 
@@ -1194,6 +1202,8 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantPr
1194
1202
  asChild?: boolean;
1195
1203
  /** Shows a spinner in place of the leading edge and disables the button. */
1196
1204
  loading?: boolean;
1205
+ /** Button label and/or icon. With `asChild`, the single element that receives the button styling. */
1206
+ children?: ReactNode;
1197
1207
  }
1198
1208
  /**
1199
1209
  * @pattern Button
@@ -1438,6 +1448,7 @@ interface WorkspaceAvatarProps {
1438
1448
  declare function WorkspaceAvatar({ name, size }: WorkspaceAvatarProps): react.JSX.Element;
1439
1449
 
1440
1450
  interface TagProps {
1451
+ /** The tag's text, e.g. "Digital". Keep it short: the chip doesn't wrap or truncate. */
1441
1452
  children: ReactNode;
1442
1453
  /** Extra classes merged onto the chip. */
1443
1454
  className?: string;
@@ -1599,13 +1610,17 @@ declare const SIZES: {
1599
1610
  };
1600
1611
  };
1601
1612
  interface ToggleProps {
1613
+ /** Whether the switch is on. Controlled: the parent owns this value. */
1602
1614
  checked: boolean;
1603
1615
  /** Receives the value being switched TO, not the current one. */
1604
1616
  onChange: (next: boolean) => void;
1605
1617
  /** Accessible name; the visible label lives in the row around it. */
1606
1618
  label: string;
1619
+ /** `md` for settings rows where the switch is the subject; `sm` for dense rows next to 13px text. */
1607
1620
  size?: keyof typeof SIZES;
1621
+ /** Blocks clicks and dims the switch to 50% opacity. */
1608
1622
  disabled?: boolean;
1623
+ /** Extra classes merged onto the track (the outer `<button>`). */
1609
1624
  className?: string;
1610
1625
  }
1611
1626
  /**
package/dist/index.d.ts CHANGED
@@ -165,6 +165,7 @@ declare function AdvertiserSearchPrompt({ label }: AdvertiserSearchPromptProps):
165
165
  * ```
166
166
  */
167
167
  interface CheckBoxProps {
168
+ /** Whether the box is checked. Controlled: the parent owns this value. */
168
169
  checked: boolean;
169
170
  /**
170
171
  * Some-but-not-all state for a "select all" checkbox -- shows a dash
@@ -172,9 +173,14 @@ interface CheckBoxProps {
172
173
  * plain boolean.
173
174
  */
174
175
  indeterminate?: boolean;
176
+ /**
177
+ * Called on click with no argument -- flip `checked` yourself. The click
178
+ * doesn't bubble, so a row that toggles on its own click won't fire twice.
179
+ */
175
180
  onChange: () => void;
176
181
  /** Accessible label -- required since the control carries no visible text of its own. */
177
182
  ariaLabel: string;
183
+ /** Blocks clicks, dims the box to 50% opacity, and cancels its hover preview. */
178
184
  disabled?: boolean;
179
185
  /** Forwarded as `data-testid`, for Playwright/test selectors. */
180
186
  testId?: string;
@@ -493,6 +499,8 @@ interface CardProps extends Omit<React.HTMLAttributes<HTMLElement>, "title"> {
493
499
  subtitle?: string;
494
500
  /** Trailing header content, e.g. a "View all" link. Ignored without `title`. */
495
501
  action?: ReactNode;
502
+ /** Card body. Rendered edge to edge without `title`; inside the standard padding with it. */
503
+ children?: ReactNode;
496
504
  }
497
505
  declare const Card: react.ForwardRefExoticComponent<CardProps & react.RefAttributes<HTMLElement>>;
498
506
 
@@ -1194,6 +1202,8 @@ interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantPr
1194
1202
  asChild?: boolean;
1195
1203
  /** Shows a spinner in place of the leading edge and disables the button. */
1196
1204
  loading?: boolean;
1205
+ /** Button label and/or icon. With `asChild`, the single element that receives the button styling. */
1206
+ children?: ReactNode;
1197
1207
  }
1198
1208
  /**
1199
1209
  * @pattern Button
@@ -1438,6 +1448,7 @@ interface WorkspaceAvatarProps {
1438
1448
  declare function WorkspaceAvatar({ name, size }: WorkspaceAvatarProps): react.JSX.Element;
1439
1449
 
1440
1450
  interface TagProps {
1451
+ /** The tag's text, e.g. "Digital". Keep it short: the chip doesn't wrap or truncate. */
1441
1452
  children: ReactNode;
1442
1453
  /** Extra classes merged onto the chip. */
1443
1454
  className?: string;
@@ -1599,13 +1610,17 @@ declare const SIZES: {
1599
1610
  };
1600
1611
  };
1601
1612
  interface ToggleProps {
1613
+ /** Whether the switch is on. Controlled: the parent owns this value. */
1602
1614
  checked: boolean;
1603
1615
  /** Receives the value being switched TO, not the current one. */
1604
1616
  onChange: (next: boolean) => void;
1605
1617
  /** Accessible name; the visible label lives in the row around it. */
1606
1618
  label: string;
1619
+ /** `md` for settings rows where the switch is the subject; `sm` for dense rows next to 13px text. */
1607
1620
  size?: keyof typeof SIZES;
1621
+ /** Blocks clicks and dims the switch to 50% opacity. */
1608
1622
  disabled?: boolean;
1623
+ /** Extra classes merged onto the track (the outer `<button>`). */
1609
1624
  className?: string;
1610
1625
  }
1611
1626
  /**