@dhasdk/simple-ui 1.0.50 → 1.0.51
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 +7 -2
- package/index.css +1 -1
- package/index.js +19 -19
- package/index.mjs +1452 -1443
- package/lib/ExpandableText.d.ts +2 -1
- package/lib/Search.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.51 - **`Search`** added iconLinkHandler prop + updates to documentation, **`ExpandableText`** added a **`clickHandler`** prop
|
|
57
|
+
|
|
56
58
|
1.0.50 - fixes for **`Search`** results display on tailwindcss lg: breakpoint
|
|
57
59
|
|
|
58
60
|
1.0.49 - bug fix for **`Search`** layout
|
|
@@ -898,6 +900,7 @@ buttons.
|
|
|
898
900
|
| className | **`string`** | Yes | **`''`** | tailwind classes to style the component container with |
|
|
899
901
|
| classNameCollapseButton | **`string`** | Yes | **`ml-2 text-blue-600 underline hover:text-blue-800 focus:outline-none`** | tailwind classes to style the collapse button |
|
|
900
902
|
| classNameMoreButton | **`string`** | Yes | **`ml-2 text-blue-600 underline hover:text-blue-800 focus:outline-none`** | tailwind classes to style the more button |
|
|
903
|
+
| clickHandler | **`(expanded: boolean) => void`** | Yes | **`undefined`** | Takes a user-defined function that accepts a boolean value indicating whether the text is expanded or not (true or false). |
|
|
901
904
|
| collapseButton | **`boolean`** | Yes | **`false`** | to display a collapse button or not |
|
|
902
905
|
| collapseText | **`string`** | Yes | **`'collapse'`** | text label for 'collapse' button |
|
|
903
906
|
| initialChars | **`number`** | Yes | 40 | number of characters to display by default in collapsed state |
|
|
@@ -1436,9 +1439,10 @@ Full list of props below
|
|
|
1436
1439
|
| airaLabel | **`string`** | Yes | **`'Search'`** | The aria-label to assign to this Search component |
|
|
1437
1440
|
| className | **`string`** | Yes | see (1) below | alternate css classes to add/change styling of the input element. |
|
|
1438
1441
|
| classNameContainer | **`string`** | Yes | **`h-12 md:h-[50px] lg:h-14 flex items-center max-w-full relative`** | alternate css classes to add/change styling of the span tag that wraps the search component. |
|
|
1439
|
-
| classNameInputContainer | **`string`** | Yes | **`border-[#6a686b] w-[309px] md:w-[334px] lg:w-[350px] inline-flex bg-white items-center lg:bg-transparent`** | alternate css classes to add/change styling of the span tag that wraps the search component. |
|
|
1442
|
+
| classNameInputContainer | **`string`** | Yes | **`border-[#6a686b] w-[309px] md:w-[334px] lg:w-[350px] inline-flex bg-white items-center lg:bg-transparent pe-2`** | alternate css classes to add/change styling of the span tag that wraps the search component. |
|
|
1440
1443
|
| classNameListOutput | **`string`** | Yes | see (2) below | alternate css classes to add/change styling of the output list or search results box. |
|
|
1441
1444
|
| iconLink | **`boolean`** | Yes | **`{false}`** | If set to true, a search icon is displayed that when clicked will expand into a wider Search component. |
|
|
1445
|
+
| iconLinkHandler | **`() => void`** | Yes | **undefined** | If **iconLink** is true, this handler will fire when the user clicks the icon to expand the Search bar. This can be used in case the parent container should be notified the Search component is expanded. |
|
|
1442
1446
|
| 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. |
|
|
1443
1447
|
| 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. |
|
|
1444
1448
|
| variant | **`string`** | Yes | undefined | There is one non-default optional variant type, and that is 'rounded'. This variant type will cause the ends of the **`Search`** component to be full rounded in appearance. |
|
|
@@ -1449,7 +1453,8 @@ Full list of props below
|
|
|
1449
1453
|
|
|
1450
1454
|
2. Default classNameListOutput
|
|
1451
1455
|
|
|
1452
|
-
**`absolute w-[
|
|
1456
|
+
**`absolute w-[100%] lg:w-[calc(100%-56px)] top-[calc(100%+4px)] -mt-1 pt-1 focus:outline-hidden z-50 overflow-auto 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 lg:ms-[-4px]`**
|
|
1457
|
+
|
|
1453
1458
|
|
|
1454
1459
|
### Example Usage
|
|
1455
1460
|
|