gbs-add-block 0.0.80 → 0.0.82
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
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# GBS Building Blocks 2.0 (v0.0.
|
|
1
|
+
# GBS Building Blocks 2.0 (v0.0.82)
|
|
2
2
|
|
|
3
3
|
Latest and upgraded version of GBS building blocks with headless UI and removed dependencies.
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@ Latest and upgraded version of GBS building blocks with headless UI and removed
|
|
|
6
6
|
|
|
7
7
|
For detailed documentation on usage and props, Please visit: [Building Block Documentation v2.0](https://blackmax-designs.gitbook.io/building-block-v2.0)
|
|
8
8
|
|
|
9
|
-
## What's New 🎉 (Ver 0.0.
|
|
9
|
+
## What's New 🎉 (Ver 0.0.82)
|
|
10
10
|
|
|
11
11
|
- Updated for bug fixes.
|
|
12
12
|
- New Component Card & SideBar Added
|
package/package.json
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import React, { useState, useRef } from "react";
|
|
9
9
|
import { twMerge } from "tailwind-merge";
|
|
10
10
|
import Icon from "../icon/Icon";
|
|
11
|
-
import { eye } from "../icon/iconPaths";
|
|
11
|
+
import { eye, search } from "../icon/iconPaths";
|
|
12
12
|
import type { InputProps } from "./types";
|
|
13
13
|
import { iconClass, inputStyles, primary } from "../globalStyle";
|
|
14
14
|
|
|
@@ -96,6 +96,11 @@ export const Input = ({
|
|
|
96
96
|
props.type === "password" && showPassword ? "text" : props.type
|
|
97
97
|
}
|
|
98
98
|
/>
|
|
99
|
+
{props.type === "search" && (
|
|
100
|
+
<div className="absolute inset-y-0 right-2 flex items-center">
|
|
101
|
+
<Icon elements={search} svgClass={iconClass["grey-common"]} />
|
|
102
|
+
</div>
|
|
103
|
+
)}
|
|
99
104
|
{props.type === "password" && (
|
|
100
105
|
<button
|
|
101
106
|
type="button"
|
|
@@ -18,7 +18,7 @@ const defaultClasses = {
|
|
|
18
18
|
modalTitle:
|
|
19
19
|
"p-4 text-lg leading-6 font-medium text-gray-900 flex justify-between items-center",
|
|
20
20
|
closeButton:
|
|
21
|
-
"p-2 hover:bg-gray-100 rounded-full transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-gray-300",
|
|
21
|
+
"absolute top-2 right-2 p-2 hover:bg-gray-100 rounded-full transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-gray-300",
|
|
22
22
|
closeIcon: "h-5 w-5 stroke-gray-500 fill-none",
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -38,6 +38,7 @@ export const Modal = memo(
|
|
|
38
38
|
titleId = "modal-title",
|
|
39
39
|
closeButtonContent,
|
|
40
40
|
animationDuration = 200,
|
|
41
|
+
showTitle = true,
|
|
41
42
|
}: ModalProps) => {
|
|
42
43
|
const modalRef = useRef<HTMLDivElement>(null);
|
|
43
44
|
const previousActiveElement = useRef<HTMLElement | null>(null);
|
|
@@ -114,7 +115,7 @@ export const Modal = memo(
|
|
|
114
115
|
tabIndex={-1}
|
|
115
116
|
>
|
|
116
117
|
<div className={twMerge(modalTitleClass, classModalTitle)}>
|
|
117
|
-
<h2 id={titleId}>{modalTitle}</h2>
|
|
118
|
+
{showTitle && <h2 id={titleId}>{modalTitle}</h2>}
|
|
118
119
|
{showCloseButton && (
|
|
119
120
|
<button
|
|
120
121
|
onClick={handleClose}
|
|
@@ -128,7 +129,7 @@ export const Modal = memo(
|
|
|
128
129
|
</button>
|
|
129
130
|
)}
|
|
130
131
|
</div>
|
|
131
|
-
<hr className="border-gray-200" />
|
|
132
|
+
{showTitle && <hr className="border-gray-200" />}
|
|
132
133
|
<div className="p-4">{children}</div>
|
|
133
134
|
</div>
|
|
134
135
|
</div>
|