@dhasdk/simple-ui 1.0.65 → 1.0.66
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 +15 -2
- package/index.css +1 -1
- package/index.js +17 -17
- package/index.mjs +1115 -1109
- package/lib/RadioGroup.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,6 +53,8 @@ Tooltip
|
|
|
53
53
|
|
|
54
54
|
## Changelog
|
|
55
55
|
|
|
56
|
+
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
|
+
|
|
56
58
|
1.0.65 - changed **label** on **`Input`** component to a **`ReactNode`** type. Also updated **aria-label**
|
|
57
59
|
handling logic to compensate (dev can enter **aria-label** manually, if not present and label is of
|
|
58
60
|
type string, will use **label** as the **aria-label**).
|
|
@@ -1437,6 +1439,7 @@ Full list of props below
|
|
|
1437
1439
|
| 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. |
|
|
1438
1440
|
| 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. |
|
|
1439
1441
|
| dataTestId | string | Yes | undefined | A **'data-testid'** value that is applied to the fieldset element that wraps RadioGroup for testing purposes |
|
|
1442
|
+
| inline | boolean | Yes | false | If **`true`**, the radio group is layed out in a flex-row instead of a flex-column. |
|
|
1440
1443
|
| 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** |
|
|
1441
1444
|
| options | **`string`** | No | | Array of RadioOption objects that define the options available for selection. |
|
|
1442
1445
|
| selectedId | **`string`** | Yes | | A string value matching one of the passed in **`id`** values in the options array. This **`selectedId`** will be pre-selected. |
|
|
@@ -1445,11 +1448,21 @@ Full list of props below
|
|
|
1445
1448
|
|
|
1446
1449
|
- label:
|
|
1447
1450
|
|
|
1448
|
-
|
|
1451
|
+
```tsx
|
|
1452
|
+
twMerge(
|
|
1453
|
+
"flex items-center gap-1 cursor-pointer",
|
|
1454
|
+
inline ? "mr-4 mb-1" : "mb-2",
|
|
1455
|
+
disabled ? "opacity-50 cursor-not-allowed" : "",
|
|
1456
|
+
classNameLabel
|
|
1457
|
+
)
|
|
1458
|
+
```
|
|
1449
1459
|
|
|
1450
1460
|
- input:
|
|
1451
1461
|
|
|
1452
|
-
|
|
1462
|
+
```tsx
|
|
1463
|
+
appearance-none w-4 h-4 rounded-[50%] border border-black bg-clip-content
|
|
1464
|
+
checked:bg-black checked:p-[2.5px] checked:border-black
|
|
1465
|
+
```
|
|
1453
1466
|
|
|
1454
1467
|
|
|
1455
1468
|
2. Options interface
|