@dhasdk/simple-ui 1.0.66 → 1.0.68
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 +13 -8
- package/index.js +14 -14
- package/index.mjs +952 -951
- package/lib/RadioGroup.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,6 +53,10 @@ Tooltip
|
|
|
53
53
|
|
|
54
54
|
## Changelog
|
|
55
55
|
|
|
56
|
+
1.0.68 - added a **`classNameLabelText`** prop to **`RadioGroup`** that styles the text only portion of the radio item
|
|
57
|
+
|
|
58
|
+
1.0.67 - corrected RadioGroup documentation re id type inside **`RadioOption`**
|
|
59
|
+
|
|
56
60
|
1.0.66 - added **`inline`** prop to **`RadioGroup`**, allows for a flex-row layout of RadioGroup items as opposed to the default flex-column layout
|
|
57
61
|
|
|
58
62
|
1.0.65 - changed **label** on **`Input`** component to a **`ReactNode`** type. Also updated **aria-label**
|
|
@@ -1438,6 +1442,7 @@ Full list of props below
|
|
|
1438
1442
|
| classNameContainer | **`string`** | Yes | **`undefined`** | a group of alternate css classes that can be specified by the developer for use in the container (fieldset) element. |
|
|
1439
1443
|
| classNameInput | **`string`** | Yes | see below | a group of alternate css classes that can be specified by the developer for use in the input element of the component. |
|
|
1440
1444
|
| classNameLabel | **`string`** | Yes | see below | a group of alternate css classes that can be specified by the developer for use in the label element of the component. |
|
|
1445
|
+
| classNameLabelText | **`string`** | Yes | **`ml-1`** | a group of alternate css classes that can be specified by the developer for use in the text portion of label inside the component. |
|
|
1441
1446
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the fieldset element that wraps RadioGroup for testing purposes |
|
|
1442
1447
|
| inline | boolean | Yes | false | If **`true`**, the radio group is layed out in a flex-row instead of a flex-column. |
|
|
1443
1448
|
| method | (id: string, value: string) => void | Yes | undefined | A callback method that is called anytime a radio item is clicked on. The value **`method={(id, value) => console.log("id/value: " + id + "/" + value)}`** might print something like **id/value: 2/value-2** |
|
|
@@ -1469,9 +1474,9 @@ twMerge(
|
|
|
1469
1474
|
|
|
1470
1475
|
```ts
|
|
1471
1476
|
export type RadioOption = {
|
|
1477
|
+
id: string;
|
|
1472
1478
|
label: string;
|
|
1473
1479
|
value: string;
|
|
1474
|
-
id: string;
|
|
1475
1480
|
disabled?: boolean;
|
|
1476
1481
|
};
|
|
1477
1482
|
```
|
|
@@ -1484,12 +1489,12 @@ Basic RadioGroup
|
|
|
1484
1489
|
```jsx
|
|
1485
1490
|
const radioOptions: RadioOption[] = [
|
|
1486
1491
|
{
|
|
1487
|
-
id: 0,
|
|
1492
|
+
id: '0',
|
|
1488
1493
|
label: 'Option One',
|
|
1489
1494
|
value:'some-value'
|
|
1490
1495
|
},
|
|
1491
1496
|
{
|
|
1492
|
-
id: 1,
|
|
1497
|
+
id: '1',
|
|
1493
1498
|
label: 'Option Two',
|
|
1494
1499
|
value: 'some-value2'
|
|
1495
1500
|
}
|
|
@@ -1508,27 +1513,27 @@ RadioGroup w/ 5 options
|
|
|
1508
1513
|
|
|
1509
1514
|
const fiveRadioOptions: RadioOption[] = [
|
|
1510
1515
|
{
|
|
1511
|
-
id: 0,
|
|
1516
|
+
id: '0',
|
|
1512
1517
|
label: 'Option One',
|
|
1513
1518
|
value: 'some-value'
|
|
1514
1519
|
},
|
|
1515
1520
|
{
|
|
1516
|
-
id: 1,
|
|
1521
|
+
id: '1',
|
|
1517
1522
|
label: 'Option Two',
|
|
1518
1523
|
value: 'some-value2'
|
|
1519
1524
|
},
|
|
1520
1525
|
{
|
|
1521
|
-
id: 2,
|
|
1526
|
+
id: '2',
|
|
1522
1527
|
label: 'Option Three',
|
|
1523
1528
|
value: 'some-value3'
|
|
1524
1529
|
},
|
|
1525
1530
|
{
|
|
1526
|
-
id: 3,
|
|
1531
|
+
id: '3',
|
|
1527
1532
|
label: 'Option Four',
|
|
1528
1533
|
value: 'some-value4'
|
|
1529
1534
|
},
|
|
1530
1535
|
{
|
|
1531
|
-
id: 4,
|
|
1536
|
+
id: '4',
|
|
1532
1537
|
label: 'Option Five',
|
|
1533
1538
|
value: 'some-value5'
|
|
1534
1539
|
},
|