@cmgfi/clear-ds 1.2.5 → 1.3.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.
package/dist/index.d.ts CHANGED
@@ -96,8 +96,31 @@ export declare interface AUSChipProps {
96
96
  color: AUSChipColor;
97
97
  }
98
98
 
99
+ export declare const Badge: default_2.ForwardRefExoticComponent<BadgeProps & default_2.RefAttributes<HTMLSpanElement>>;
100
+
101
+ export declare interface BadgeProps extends Omit<default_2.HTMLAttributes<HTMLSpanElement>, 'children'> {
102
+ /**
103
+ * Value to display inside the badge. Omit to render as a dot indicator.
104
+ */
105
+ value?: string | number;
106
+ /**
107
+ * Severity variant controlling background and text color.
108
+ * @default 'secondary'
109
+ */
110
+ severity?: BadgeSeverity;
111
+ /**
112
+ * Size of the badge.
113
+ * @default 'normal'
114
+ */
115
+ size?: BadgeSize;
116
+ }
117
+
118
+ export declare type BadgeSeverity = 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'contrast';
119
+
99
120
  export declare type BadgeShape = 'square' | 'diamond' | 'circle';
100
121
 
122
+ export declare type BadgeSize = 'xs' | 'normal' | 'large';
123
+
101
124
  export declare function BannerAlert({ severity, title, detail, closable, onClose }: BannerAlertProps): JSX_2.Element;
102
125
 
103
126
  export declare namespace BannerAlert {
@@ -333,6 +356,15 @@ export declare interface CalendarProps {
333
356
  * <p>Click anywhere to open.</p>
334
357
  * </Card>
335
358
  * ```
359
+ * @example
360
+ *
361
+ * ```tsx
362
+ * // Dark stat tile — for a dark dashboard band. Compose the stat content.
363
+ * <Card tone="dark">
364
+ * <span className="label">Prospect</span>
365
+ * <span className="value">97,686</span>
366
+ * </Card>
367
+ * ```
336
368
  */
337
369
  export declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
338
370
 
@@ -348,6 +380,14 @@ export declare interface CardProps {
348
380
  footer?: React.ReactNode;
349
381
  /** Card body content. Accepts any ReactNode. */
350
382
  children?: React.ReactNode;
383
+ /**
384
+ * Surface tone.
385
+ * - `'light'` (default): white surface with navy text.
386
+ * - `'dark'`: dark navy surface with light text — for cards placed on a
387
+ * dark or saturated dashboard band. Built-in title/subtitle/content text
388
+ * colors flip to readable light values; compose your own content inside.
389
+ */
390
+ tone?: 'light' | 'dark';
351
391
  /**
352
392
  * Makes the entire card interactive — adds a pointer cursor and a subtle
353
393
  * shadow lift on hover. Pass a handler to opt into this mode.
@@ -2234,12 +2274,14 @@ export declare interface TabItem {
2234
2274
  * Tabs — Clear Design System
2235
2275
  *
2236
2276
  * Standard underline-style tab strip. Fully controlled — the parent owns
2237
- * which tab is active. Two variants:
2277
+ * which tab is active. Three variants:
2238
2278
  * - `'panel'` (default): renders the active tab's `content` below the strip.
2239
2279
  * Use for sub-section switching inside a page.
2240
2280
  * - `'nav'`: page-level navigation with larger padding/font; the active
2241
2281
  * tab's `content` is not rendered (each tab is a route/page). Renders
2242
2282
  * as `<nav>` for the right semantics.
2283
+ * - `'pills'`: pill-shaped segmented switcher on a dark/colored host surface.
2284
+ * Strip-only (no content panel); `count` renders as a red circular badge.
2243
2285
  *
2244
2286
  * @example
2245
2287
  *
@@ -2270,6 +2312,22 @@ export declare interface TabItem {
2270
2312
  * onChange={setPage}
2271
2313
  * />
2272
2314
  * ```
2315
+ * @example
2316
+ *
2317
+ * ```tsx
2318
+ * // Pills variant — segmented view switcher on a dark/colored band.
2319
+ * <Tabs
2320
+ * variant="pills"
2321
+ * tabs={[
2322
+ * { id: 'overview', label: 'Overview' },
2323
+ * { id: 'processing', label: 'To Processing' },
2324
+ * { id: 'closing', label: 'To Closing' },
2325
+ * { id: 'reminders', label: 'Reminders', count: 20 },
2326
+ * ]}
2327
+ * activeTab={view}
2328
+ * onChange={setView}
2329
+ * />
2330
+ * ```
2273
2331
  */
2274
2332
  export declare const Tabs: ForwardRefExoticComponent<TabsProps & RefAttributes<HTMLDivElement>>;
2275
2333
 
@@ -2286,40 +2344,16 @@ export declare interface TabsProps {
2286
2344
  * - `'nav'`: navigation-only strip with larger padding/font; the active
2287
2345
  * tab's `content` is **not** rendered (each tab represents a page or
2288
2346
  * route). Renders as `<nav>` for the right semantics.
2347
+ * - `'pills'`: pill-shaped segmented switcher on a dark/colored host
2348
+ * surface — translucent glass track, a solid light pill behind the active
2349
+ * segment, and `count` rendered as a red circular badge. Strip-only (no
2350
+ * content panel). Designed to sit on a saturated or dark background.
2289
2351
  */
2290
- variant?: 'panel' | 'nav';
2352
+ variant?: 'panel' | 'nav' | 'pills';
2291
2353
  className?: string;
2292
2354
  style?: React.CSSProperties;
2293
2355
  }
2294
2356
 
2295
- /**
2296
- * TextArea — Clear Design System
2297
- *
2298
- * A multi-line text input with label, helper text, character counter (when
2299
- * `maxLength` is set), and full state coverage: default, hover, focus, filled,
2300
- * invalid, and disabled. Supports optional auto-grow behaviour.
2301
- *
2302
- * @example
2303
- *
2304
- * ```tsx
2305
- * <TextArea label="Loan notes" placeholder="Enter notes…" rows={4} />
2306
- * ```
2307
- * @example
2308
- *
2309
- * ```tsx
2310
- * <TextArea label="Comments" maxLength={500} />
2311
- * ```
2312
- * @example
2313
- *
2314
- * ```tsx
2315
- * <TextArea label="Description" autoGrow />
2316
- * ```
2317
- * @example
2318
- *
2319
- * ```tsx
2320
- * <TextArea label="Notes" invalid helperText="This field is required." />
2321
- * ```
2322
- */
2323
2357
  export declare const TextArea: ForwardRefExoticComponent<TextAreaProps & RefAttributes<HTMLTextAreaElement>>;
2324
2358
 
2325
2359
  export declare interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'children'> {
@@ -2342,6 +2376,8 @@ export declare interface TextAreaProps extends Omit<React.TextareaHTMLAttributes
2342
2376
  autoGrow?: boolean;
2343
2377
  /** Controls where the character counter renders. 'inside' pins it to the bottom-right of the field; 'outside' (default) places it below the field in the bottom row. */
2344
2378
  counterPlacement?: 'inside' | 'outside';
2379
+ /** Icon rendered on the left side of the field, top-aligned. Pass `true` for the default pencil icon, or any React node for a custom icon. */
2380
+ leadingIcon?: React.ReactNode | boolean;
2345
2381
  }
2346
2382
 
2347
2383
  /**