@dhasdk/simple-ui 1.0.15 → 1.0.17
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 +22 -2
- package/index.css +1 -1
- package/index.js +16 -20
- package/index.mjs +1214 -1198
- package/lib/Breadcrumbs.d.ts +2 -0
- package/lib/Search.d.ts +2 -0
- package/lib/SideBarNav.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1325,15 +1325,20 @@ 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. |
|
|
1330
|
+
| classNameListOutput | **`string`** | Yes | see (2) below | alternate css classes to add/change styling of the output list or search results box. |
|
|
1328
1331
|
| iconLink | **`boolean`** | Yes | **`{false}`** | If set to true, a search icon is displayed that when clicked will expand into a wider Search component. |
|
|
1329
1332
|
| 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
|
-
| searchHint | **`string`** | Yes | **`"Search result"`** | Changes the default input element hint text |
|
|
1331
1333
|
| setSearchResults | **`(DataSearchResults) => return void`** | Yes |undefined | If the use case entails sending the user to a separate results page, provide a function here that takes those search and performs the desired action. See (2) below for the DataSearchResults definition. |
|
|
1332
1334
|
|
|
1333
1335
|
1. Default className
|
|
1334
1336
|
|
|
1335
1337
|
**`grow appearance-none h-8 md:h-[32px] lg:h-14 py-2 lg:ps-[19px] rounded-tl rounded-bl rounded-br-none rounded-tr-none lg:border border-[#07192d] font-['Arial'] bg-white text-[#333234] text-base lg:text-lg hover:border-[#5992fa] focus:border-[#5992fa] outline-hidden`**
|
|
1336
1338
|
|
|
1339
|
+
2. Default classNameListOutput
|
|
1340
|
+
|
|
1341
|
+
**`absolute w-[309px] md:w-[334px] lg:w-[293px] top-[calc(100%+4px)] -mt-1 pt-1 focus:outline-hidden z-10 ms overflow-hidden bg-white lg:shadow-[0px_4px_4px_0px_rgba(0,0,0,0.25)] border-[#6a686b] border-l border-b border-r lg:border-none`**
|
|
1337
1342
|
|
|
1338
1343
|
### Example Usage
|
|
1339
1344
|
|
|
@@ -1401,6 +1406,16 @@ The Search Results Interface
|
|
|
1401
1406
|
}
|
|
1402
1407
|
```
|
|
1403
1408
|
|
|
1409
|
+
Example **`classNameContainer`** and **`classNameInputContainer`** usage:
|
|
1410
|
+
|
|
1411
|
+
```jsx
|
|
1412
|
+
<Search
|
|
1413
|
+
searchableData={SearchableData}
|
|
1414
|
+
classNameContainer='w-full'
|
|
1415
|
+
classNameInputContainer="w-full md:w-full lg:w-full"
|
|
1416
|
+
/>
|
|
1417
|
+
```
|
|
1418
|
+
|
|
1404
1419
|
### Dependencies
|
|
1405
1420
|
|
|
1406
1421
|
**_none_**
|
|
@@ -1649,6 +1664,7 @@ Full list of props below
|
|
|
1649
1664
|
| Prop | Type | Optional | Default | Description |
|
|
1650
1665
|
| ----------- | -------- | -------- | -------- | ----------- |
|
|
1651
1666
|
| appName | string | No | undefined | The application name to dispilay |
|
|
1667
|
+
| 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
1668
|
| 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
1669
|
| clickOutsideCloses | boolean | Yes | **`false`** | clicking or tapping elsewhere on the application will close the SideBarNav |
|
|
1654
1670
|
| image | string | No | undefined | string path to the application logo to display |
|
|
@@ -1713,7 +1729,11 @@ const menuItems = [
|
|
|
1713
1729
|
clickOutsideCloses
|
|
1714
1730
|
menu
|
|
1715
1731
|
className='bg-slate-200 border border-slate-400 rounded-l-md h-full'
|
|
1716
|
-
|
|
1732
|
+
>
|
|
1733
|
+
<div className="my-4">
|
|
1734
|
+
<Search searchableData={SearchableData} />
|
|
1735
|
+
</div>
|
|
1736
|
+
</SideBarNav>
|
|
1717
1737
|
```
|
|
1718
1738
|
|
|
1719
1739
|
### Dependencies
|