@dhasdk/simple-ui 1.0.15 → 1.0.16
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 +18 -1
- package/index.css +1 -1
- package/index.js +17 -17
- package/index.mjs +1085 -1058
- package/lib/Breadcrumbs.d.ts +2 -0
- package/lib/Search.d.ts +1 -0
- package/lib/SideBarNav.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1325,6 +1325,8 @@ Full list of props below
|
|
|
1325
1325
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1326
1326
|
| airaLabel | **`string`** | Yes | **`'Search'`** | The aria-label to assign to this Search component |
|
|
1327
1327
|
| className | **`string`** | Yes | see (1) below | alternate css classes to add/change styling of the div that wraps the input element. |
|
|
1328
|
+
| classNameContainer | **`string`** | Yes | **`h-12 md:h-[50px] lg:h-14 flex items-center relative`** | alternate css classes to add/change styling of the span tag that wraps the search component. |
|
|
1329
|
+
| classNameInputContainer | **`string`** | Yes | **`border-[#6a686b] w-[309px] md:w-[334px] lg:w-[350px] inline-flex bg-white items-center`** | alternate css classes to add/change styling of the span tag that wraps the search component. |
|
|
1328
1330
|
| iconLink | **`boolean`** | Yes | **`{false}`** | If set to true, a search icon is displayed that when clicked will expand into a wider Search component. |
|
|
1329
1331
|
| searchableData | **`SearchDataItem[]`** | No | undefined | The data that the search component uses as its data source. This data must conform to the SearchDataItem interface. An example data file is shown above. |
|
|
1330
1332
|
| searchHint | **`string`** | Yes | **`"Search result"`** | Changes the default input element hint text |
|
|
@@ -1401,6 +1403,16 @@ The Search Results Interface
|
|
|
1401
1403
|
}
|
|
1402
1404
|
```
|
|
1403
1405
|
|
|
1406
|
+
Example **`classNameContainer`** and **`classNameInputContainer`** usage:
|
|
1407
|
+
|
|
1408
|
+
```jsx
|
|
1409
|
+
<Search
|
|
1410
|
+
searchableData={SearchableData}
|
|
1411
|
+
classNameContainer='w-full'
|
|
1412
|
+
classNameInputContainer="w-full md:w-full lg:w-full"
|
|
1413
|
+
/>
|
|
1414
|
+
```
|
|
1415
|
+
|
|
1404
1416
|
### Dependencies
|
|
1405
1417
|
|
|
1406
1418
|
**_none_**
|
|
@@ -1649,6 +1661,7 @@ Full list of props below
|
|
|
1649
1661
|
| Prop | Type | Optional | Default | Description |
|
|
1650
1662
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1651
1663
|
| appName | string | No | undefined | The application name to dispilay |
|
|
1664
|
+
| children | ReactNode | Yes | undefined | This prop takes in any children and displays them between the horizontal rule and the list of menu items. It is intended for to allow developers to add a Search component. See usage example above. |
|
|
1652
1665
|
| className | string | Yes | (1) below | a group of alternate css classes that can be specified by the developer and applied to the outer **`div`** element. |
|
|
1653
1666
|
| clickOutsideCloses | boolean | Yes | **`false`** | clicking or tapping elsewhere on the application will close the SideBarNav |
|
|
1654
1667
|
| image | string | No | undefined | string path to the application logo to display |
|
|
@@ -1713,7 +1726,11 @@ const menuItems = [
|
|
|
1713
1726
|
clickOutsideCloses
|
|
1714
1727
|
menu
|
|
1715
1728
|
className='bg-slate-200 border border-slate-400 rounded-l-md h-full'
|
|
1716
|
-
|
|
1729
|
+
>
|
|
1730
|
+
<div className="my-4">
|
|
1731
|
+
<Search searchableData={SearchableData} />
|
|
1732
|
+
</div>
|
|
1733
|
+
</SideBarNav>
|
|
1717
1734
|
```
|
|
1718
1735
|
|
|
1719
1736
|
### Dependencies
|