@cmgfi/clear-ds 1.1.3 → 1.1.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.
package/README.md CHANGED
@@ -6,7 +6,7 @@ The UI foundation for CMG's internal loan origination platform. Built from scrat
6
6
 
7
7
  - **npm:** [`@cmgfi/clear-ds`](https://www.npmjs.com/package/@cmgfi/clear-ds)
8
8
  - **Storybook:** [clear-pimkxt5rp-cmgprojects.vercel.app](https://clear-pimkxt5rp-cmgprojects.vercel.app)
9
- - **Version:** 1.0.1
9
+ - **Version:** 1.1.3
10
10
  - **License:** UNLICENSED (CMG Financial internal)
11
11
 
12
12
  ---
@@ -78,14 +78,32 @@ import { Button, InputText, Modal, DataTable } from '@cmgfi/clear-ds';
78
78
 
79
79
  ### Buttons
80
80
 
81
- | Component | Description |
82
- |---|---|
83
- | `Button` | Primary action button. Variants: `primary`, `secondary`, `ghost`, `danger`. Sizes: `sm`, `md`, `lg`. |
84
- | `IconButton` | Square button containing a single PrimeIcon. |
85
- | `DropdownButton` | Button that opens a dropdown action menu. |
86
- | `SplitButton` | Combined primary action + dropdown trigger in one control. |
87
- | `LightningButton` | Quick-action button with a lightning icon affordance. |
88
- | `CloseButton` | Compact `×` dismiss button used inside overlays and alerts. |
81
+ All button components share a canonical three-size ramp:
82
+
83
+ | Size | Height | Font | Padding |
84
+ |------|--------|------|---------|
85
+ | `sm` | 24px | 10px | `4px 12px` |
86
+ | `md` | 36px | 12px | `8px 14px` (default) |
87
+ | `lg` | 40px | 15px | `10px 16px` |
88
+
89
+ Icon sizes are explicitly defined per button size using design tokens:
90
+
91
+ | Button size | Icon token | Value |
92
+ |-------------|------------|-------|
93
+ | `sm` | `--icon-size-md` | 14px |
94
+ | `md` | `--icon-size-lg` | 18px |
95
+ | `lg` | `--icon-size-lg` | 18px |
96
+
97
+ Pass any React node to icon props — PrimeIcons (`<i className="pi pi-*" />`) are the standard.
98
+
99
+ | Component | Props | Description |
100
+ |---|---|---|
101
+ | `Button` | `variant`, `size`, `leadingIcon`, `trailingIcon`, `badge` | Primary action button. Variants: `primary` (default), `secondary`, `ghost`, `danger`, `link`. Sizes: `sm`, `md` (default), `lg`. Optional leading/trailing PrimeIcon slots and a notification badge. |
102
+ | `IconButton` | `icon`, `size`, `variant` | Circular icon-only button. Sizes: `sm` (24×24px), `md` (36×36px, default), `lg` (40×40px). |
103
+ | `DropdownButton` | `label`, `items`, `size`, `variant`, `leadingIcon`, `disabled` | Button that opens a dropdown action menu. Chevron uses `pi pi-chevron-down`. Sizes: `sm`, `md` (default), `lg`. |
104
+ | `SplitButton` | `label`, `items`, `size`, `variant`, `leadingIcon`, `disabled` | Two joined pill buttons: main action (left) + dropdown trigger (right). `primary` — both halves dark teal. `secondary` — both halves light teal. Sizes: `sm`, `md` (default), `lg`. Chevron rotates 180° when open. |
105
+ | `LightningButton` | `items`, `size`, `variant`, `disabled` | Icon-only quick-action button with `pi pi-bolt` + `pi pi-chevron-down`. Variants: `basic`, `filled`. Sizes: `sm`, `md` (default), `lg`. |
106
+ | `CloseButton` | `size`, `disabled` | Circular `pi pi-times` dismiss button. Default size is `sm` (24×24px). Sizes: `sm` (default), `md` (36×36px), `lg` (40×40px). |
89
107
 
90
108
  ### Form Controls
91
109
 
@@ -98,7 +116,7 @@ import { Button, InputText, Modal, DataTable } from '@cmgfi/clear-ds';
98
116
  | `Select` | Single-select dropdown. |
99
117
  | `MultiSelect` | Multi-select dropdown with chip display and search. |
100
118
  | `ListBox` | Inline scrollable single or multi-select list. |
101
- | `SelectButton` | Segmented button group for mutually exclusive options. |
119
+ | `SelectButton` | Segmented button group for mutually exclusive options. Variants: `group` (joined toggles) and `options` (split button + dropdown). `size` prop (`sm`/`md`/`lg`). Each option accepts an optional `icon?: React.ReactNode` rendered before its label. |
102
120
  | `DatePicker` | Date input with calendar popover. |
103
121
  | `ToggleSwitch` | On/off toggle. |
104
122
  | `FileUpload` | Drag-and-drop file upload with type validation. |