@clubmed/trident-ui 1.5.1-beta.1 → 1.6.0-beta.1
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/CHANGELOG.md +8 -0
- package/assets/trident-ui.css +1 -1
- package/hooks/useSlots.d.ts +39 -0
- package/hooks/useSlots.js +23 -0
- package/hooks/useSlots.js.map +1 -0
- package/molecules/Backdrop.d.ts +7 -3
- package/molecules/Backdrop.js +102 -35
- package/molecules/Backdrop.js.map +1 -1
- package/molecules/Forms/Filter.d.ts +2 -7
- package/molecules/Forms/Filter.js +58 -46
- package/molecules/Forms/Filter.js.map +1 -1
- package/molecules/Forms/FormLabel.d.ts +1 -1
- package/molecules/Forms/FormLabel.js +22 -21
- package/molecules/Forms/FormLabel.js.map +1 -1
- package/molecules/Forms/NumberField.d.ts +1 -1
- package/molecules/Popin.d.ts +9 -3
- package/molecules/Popin.js +2802 -34
- package/molecules/Popin.js.map +1 -1
- package/molecules/Portal/Portal.d.ts +11 -0
- package/molecules/Portal/Portal.js +31 -0
- package/molecules/Portal/Portal.js.map +1 -0
- package/package.json +13 -10
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as
|
|
3
|
-
const
|
|
4
|
-
id:
|
|
5
|
-
description:
|
|
1
|
+
import { jsxs as i, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { c as m } from "../../chunks/clsx.js";
|
|
3
|
+
const p = ({
|
|
4
|
+
id: s,
|
|
5
|
+
description: l,
|
|
6
6
|
layout: e = "horizontal",
|
|
7
|
-
required:
|
|
8
|
-
className:
|
|
9
|
-
children:
|
|
10
|
-
hideRequiredStar:
|
|
11
|
-
...
|
|
12
|
-
}) => /* @__PURE__ */
|
|
7
|
+
required: t,
|
|
8
|
+
className: a,
|
|
9
|
+
children: r,
|
|
10
|
+
hideRequiredStar: o = !t,
|
|
11
|
+
...c
|
|
12
|
+
}) => /* @__PURE__ */ i(
|
|
13
13
|
"label",
|
|
14
14
|
{
|
|
15
|
-
...
|
|
16
|
-
htmlFor:
|
|
17
|
-
className:
|
|
15
|
+
...c,
|
|
16
|
+
htmlFor: s,
|
|
17
|
+
className: m(
|
|
18
18
|
"text-b3 font-semibold text-black flex",
|
|
19
19
|
{
|
|
20
|
-
"
|
|
21
|
-
"flex-
|
|
20
|
+
"ps-20": e.includes("horizontal") && !e.includes("no-padding"),
|
|
21
|
+
"flex-wrap items-center": e.includes("horizontal"),
|
|
22
|
+
"flex-col items-start": e.includes("vertical")
|
|
22
23
|
},
|
|
23
|
-
|
|
24
|
+
a
|
|
24
25
|
),
|
|
25
26
|
"data-name": "InputLabel",
|
|
26
27
|
children: [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
r,
|
|
29
|
+
t && !o && /* @__PURE__ */ n("span", { children: "*" }),
|
|
30
|
+
l && /* @__PURE__ */ n("span", { className: "ms-12 text-b4 text-grey font-normal", children: l })
|
|
30
31
|
]
|
|
31
32
|
}
|
|
32
33
|
);
|
|
33
34
|
export {
|
|
34
|
-
|
|
35
|
+
p as FormLabel
|
|
35
36
|
};
|
|
36
37
|
//# sourceMappingURL=FormLabel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLabel.js","sources":["../../../lib/molecules/Forms/FormLabel.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { LabelHTMLAttributes } from 'react';\n\nexport interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {\n description?: string;\n layout?: 'horizontal' | 'vertical';\n required?: boolean;\n hideRequiredStar?: boolean;\n}\n\nexport const FormLabel = ({\n id,\n description,\n layout = 'horizontal',\n required,\n className,\n children,\n hideRequiredStar = !required,\n ...rest\n}: FormLabelProps) => {\n return (\n <label\n {...rest}\n htmlFor={id}\n className={clsx(\n 'text-b3 font-semibold text-black flex',\n {\n 'flex-wrap items-center
|
|
1
|
+
{"version":3,"file":"FormLabel.js","sources":["../../../lib/molecules/Forms/FormLabel.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport type { LabelHTMLAttributes } from 'react';\n\nexport interface FormLabelProps extends LabelHTMLAttributes<HTMLLabelElement> {\n description?: string;\n layout?: 'horizontal' | `horizontal-${string}` | 'vertical';\n required?: boolean;\n hideRequiredStar?: boolean;\n}\n\nexport const FormLabel = ({\n id,\n description,\n layout = 'horizontal',\n required,\n className,\n children,\n hideRequiredStar = !required,\n ...rest\n}: FormLabelProps) => {\n return (\n <label\n {...rest}\n htmlFor={id}\n className={clsx(\n 'text-b3 font-semibold text-black flex',\n {\n 'ps-20': layout.includes('horizontal') && !layout.includes('no-padding'),\n 'flex-wrap items-center': layout.includes('horizontal'),\n 'flex-col items-start': layout.includes('vertical'),\n },\n className,\n )}\n data-name=\"InputLabel\"\n >\n {children}\n {required && !hideRequiredStar && <span>*</span>}\n {description && <span className=\"ms-12 text-b4 text-grey font-normal\">{description}</span>}\n </label>\n );\n};\n"],"names":["FormLabel","id","description","layout","required","className","children","hideRequiredStar","rest","jsxs","clsx","jsx"],"mappings":";;AAUO,MAAMA,IAAY,CAAC;AAAA,EACxB,IAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,kBAAAC,IAAmB,CAACH;AAAA,EACpB,GAAGI;AACL,MAEI,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACE,GAAGD;AAAA,IACJ,SAASP;AAAA,IACT,WAAWS;AAAA,MACT;AAAA,MACA;AAAA,QACE,SAASP,EAAO,SAAS,YAAY,KAAK,CAACA,EAAO,SAAS,YAAY;AAAA,QACvE,0BAA0BA,EAAO,SAAS,YAAY;AAAA,QACtD,wBAAwBA,EAAO,SAAS,UAAU;AAAA,MAAA;AAAA,MAEpDE;AAAA,IAAA;AAAA,IAEF,aAAU;AAAA,IAET,UAAA;AAAA,MAAAC;AAAA,MACAF,KAAY,CAACG,KAAoB,gBAAAI,EAAC,UAAK,UAAA,KAAC;AAAA,MACxCT,KAAe,gBAAAS,EAAC,QAAA,EAAK,WAAU,uCAAuC,UAAAT,EAAA,CAAY;AAAA,IAAA;AAAA,EAAA;AAAA;"}
|
|
@@ -299,7 +299,7 @@ export declare function useNumberField(props: NumberFieldProps): {
|
|
|
299
299
|
formMethod?: string | undefined | undefined;
|
|
300
300
|
formNoValidate?: boolean | undefined | undefined;
|
|
301
301
|
formTarget?: string | undefined | undefined;
|
|
302
|
-
layout?: "horizontal" | "vertical" | undefined;
|
|
302
|
+
layout?: "horizontal" | `horizontal-${string}` | "vertical" | undefined;
|
|
303
303
|
multiple?: boolean | undefined | undefined;
|
|
304
304
|
autoComplete?: import('react').HTMLInputAutoCompleteAttribute | undefined;
|
|
305
305
|
accept?: string | undefined | undefined;
|
package/molecules/Popin.d.ts
CHANGED
|
@@ -1,16 +1,22 @@
|
|
|
1
1
|
import { FunctionComponent, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import { BackdropProps } from './Backdrop';
|
|
2
3
|
export type ClosePopinCallback = () => void;
|
|
3
4
|
export interface PopinFooterProps {
|
|
4
|
-
closeLabel
|
|
5
|
+
closeLabel?: string;
|
|
5
6
|
onClose: ClosePopinCallback;
|
|
6
7
|
}
|
|
7
8
|
export interface PopinProps {
|
|
8
|
-
title
|
|
9
|
-
closeLabel
|
|
9
|
+
title?: ReactNode;
|
|
10
|
+
closeLabel?: string;
|
|
10
11
|
onClose: ClosePopinCallback;
|
|
11
12
|
isVisible: boolean;
|
|
12
13
|
className?: string;
|
|
14
|
+
bodyClassName?: string;
|
|
13
15
|
showCloseButton?: boolean;
|
|
16
|
+
target?: BackdropProps['target'];
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated use popinFooter slot instead
|
|
19
|
+
*/
|
|
14
20
|
Footer?: FunctionComponent<PopinFooterProps> | false;
|
|
15
21
|
}
|
|
16
22
|
export declare const Popin: FunctionComponent<PropsWithChildren<PopinProps>>;
|