athameui 0.0.6-c → 0.0.7
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/components/ButtonGroup/ButtonGroup.tsx +1 -0
- package/components/FormElements/FormInput.tsx +2 -0
- package/components/FormElements/FormInputLabel.tsx +1 -0
- package/components/Header/Header.tsx +1 -0
- package/components/Layout/Footer.tsx +1 -0
- package/components/Layout/Main.tsx +1 -0
- package/components/List/List.tsx +1 -0
- package/components/List/ListItem.tsx +1 -0
- package/components/Modal/Modal.tsx +1 -0
- package/components/Search/Search.tsx +4 -3
- package/dist/athameui.cjs +3 -2
- package/dist/athameui.cjs.map +1 -1
- package/dist/athameui.mjs +3 -2
- package/dist/athameui.mjs.map +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist/components/FormElements/FormInput.d.ts.map +1 -1
- package/dist/components/FormElements/FormInputLabel.d.ts.map +1 -1
- package/dist/components/Header/Header.d.ts.map +1 -1
- package/dist/components/Layout/Footer.d.ts.map +1 -1
- package/dist/components/Layout/Main.d.ts.map +1 -1
- package/dist/components/List/List.d.ts.map +1 -1
- package/dist/components/List/ListItem.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Search/Search.d.ts +2 -2
- package/dist/components/Search/Search.d.ts.map +1 -1
- package/package.json +1 -1
- package/components/Modals/Modal.tsx +0 -206
- package/dist/components/Modals/Modal.d.ts +0 -37
- package/dist/components/Modals/Modal.d.ts.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import React, { ReactNode, useRef, useLayoutEffect } from "react";
|
|
2
3
|
import { CSSObject } from "@emotion/react";
|
|
3
4
|
import { cx } from "../../utils/cx";
|
|
@@ -157,6 +158,7 @@ export const FormInput: React.FC<FormInputProps> = ({
|
|
|
157
158
|
className={labelClasses}
|
|
158
159
|
sx={{ label: sx?.label, required: sx?.required }}
|
|
159
160
|
labelPosition={labelPosition}
|
|
161
|
+
dark={dark}
|
|
160
162
|
/>
|
|
161
163
|
) : null;
|
|
162
164
|
|
package/components/List/List.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { FormInput } from "../FormElements";
|
|
3
4
|
import { Button } from "../Button";
|
|
@@ -24,7 +25,7 @@ type SearchProps = {
|
|
|
24
25
|
resultsLabel?: React.ReactNode;
|
|
25
26
|
searchLabel?: string;
|
|
26
27
|
searchRole?: string;
|
|
27
|
-
searchTerm?: string;
|
|
28
|
+
searchTerm?: string | number;
|
|
28
29
|
showResultsCount?: boolean;
|
|
29
30
|
showSearchButton?: boolean;
|
|
30
31
|
sx?: {
|
|
@@ -37,7 +38,7 @@ type SearchProps = {
|
|
|
37
38
|
testId?: string;
|
|
38
39
|
totalResultsCount?: string;
|
|
39
40
|
|
|
40
|
-
onSearch?: (searchTerm: string) => void;
|
|
41
|
+
onSearch?: (searchTerm: string | number | undefined) => void;
|
|
41
42
|
setSearchTerm: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
42
43
|
};
|
|
43
44
|
|
|
@@ -75,7 +76,7 @@ export const Search = ({
|
|
|
75
76
|
};
|
|
76
77
|
|
|
77
78
|
const onSearchHandler = () => {
|
|
78
|
-
onSearch?.(searchTerm
|
|
79
|
+
onSearch?.(searchTerm);
|
|
79
80
|
};
|
|
80
81
|
|
|
81
82
|
const hitEnter = (e: React.KeyboardEvent<HTMLInputElement>) => {
|
package/dist/athameui.cjs
CHANGED
|
@@ -2642,7 +2642,8 @@ const FormInput = ({
|
|
|
2642
2642
|
label: sx?.label,
|
|
2643
2643
|
required: sx?.required
|
|
2644
2644
|
},
|
|
2645
|
-
labelPosition: labelPosition
|
|
2645
|
+
labelPosition: labelPosition,
|
|
2646
|
+
dark: dark
|
|
2646
2647
|
}) : null;
|
|
2647
2648
|
const inputElement = type === "textarea" ? jsx("textarea", {
|
|
2648
2649
|
autoComplete: autoComplete,
|
|
@@ -2929,7 +2930,7 @@ const Search = ({
|
|
|
2929
2930
|
}
|
|
2930
2931
|
};
|
|
2931
2932
|
const onSearchHandler = () => {
|
|
2932
|
-
onSearch?.(searchTerm
|
|
2933
|
+
onSearch?.(searchTerm);
|
|
2933
2934
|
};
|
|
2934
2935
|
const hitEnter = e => {
|
|
2935
2936
|
if (e.key === "Enter") {
|