@cmgfi/clear-ds 1.1.3 → 1.1.4

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,24 @@ 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 slots use design token vars for sizing: `--icon-size-sm` (12px), `--icon-size-md` (14px), `--icon-size-lg` (18px). Pass any React node to icon props — PrimeIcons (`<i className="pi pi-*" />`) are the standard.
90
+
91
+ | Component | Props | Description |
92
+ |---|---|---|
93
+ | `Button` | `variant`, `size`, `leadingIcon`, `trailingIcon`, `badge` | Primary action button. Variants: `primary` (default), `secondary`, `ghost`, `danger`, `link`. Sizes: `sm`, `md`, `lg`. Optional leading/trailing PrimeIcon slots and a notification badge. |
94
+ | `IconButton` | `icon`, `size`, `variant` | Circular button containing a single PrimeIcon. Sizes: `sm` (24×24px), `md` (36×36px), `lg` (40×40px). |
95
+ | `DropdownButton` | `label`, `items`, `size`, `variant`, `leadingIcon`, `disabled` | Button that opens a dropdown action menu. Chevron uses `pi pi-chevron-down`. Sizes: `sm`, `md`, `lg`. |
96
+ | `SplitButton` | `label`, `items`, `size`, `variant`, `leadingIcon`, `disabled` | Two joined pill buttons: main action (left) + dropdown trigger (right). Variants: `primary`, `secondary`. Sizes: `sm`, `md`, `lg`. Chevron rotates 180° when open. |
97
+ | `LightningButton` | `label`, `size`, `variant`, `items`, `disabled` | Quick-action button with a `pi pi-bolt` affordance and a `pi pi-chevron-down` dropdown. Variants: `filled`, `basic`. Sizes: `sm`, `md`, `lg`. |
98
+ | `CloseButton` | `size`, `disabled` | Circular `pi pi-times` dismiss button used inside overlays and alerts. Sizes: `sm` (24×24px), `md` (36×36px), `lg` (40×40px). |
89
99
 
90
100
  ### Form Controls
91
101
 
@@ -98,7 +108,7 @@ import { Button, InputText, Modal, DataTable } from '@cmgfi/clear-ds';
98
108
  | `Select` | Single-select dropdown. |
99
109
  | `MultiSelect` | Multi-select dropdown with chip display and search. |
100
110
  | `ListBox` | Inline scrollable single or multi-select list. |
101
- | `SelectButton` | Segmented button group for mutually exclusive options. |
111
+ | `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
112
  | `DatePicker` | Date input with calendar popover. |
103
113
  | `ToggleSwitch` | On/off toggle. |
104
114
  | `FileUpload` | Drag-and-drop file upload with type validation. |