@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.
@@ -1,36 +1,37 @@
1
- import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
- import { c as x } from "../../chunks/clsx.js";
3
- const f = ({
4
- id: r,
5
- description: t,
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: l,
8
- className: s,
9
- children: o,
10
- hideRequiredStar: m = !l,
11
- ...n
12
- }) => /* @__PURE__ */ c(
7
+ required: t,
8
+ className: a,
9
+ children: r,
10
+ hideRequiredStar: o = !t,
11
+ ...c
12
+ }) => /* @__PURE__ */ i(
13
13
  "label",
14
14
  {
15
- ...n,
16
- htmlFor: r,
17
- className: x(
15
+ ...c,
16
+ htmlFor: s,
17
+ className: m(
18
18
  "text-b3 font-semibold text-black flex",
19
19
  {
20
- "flex-wrap items-center ps-20": e === "horizontal",
21
- "flex-col items-start": e === "vertical"
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
- s
24
+ a
24
25
  ),
25
26
  "data-name": "InputLabel",
26
27
  children: [
27
- o,
28
- l && !m && /* @__PURE__ */ a("span", { children: "*" }),
29
- t && /* @__PURE__ */ a("span", { className: "ms-12 text-b4 text-grey font-normal", children: t })
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
- f as FormLabel
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 ps-20': layout === 'horizontal',\n 'flex-col items-start': layout === '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,gCAAgCP,MAAW;AAAA,QAC3C,wBAAwBA,MAAW;AAAA,MAAA;AAAA,MAErCE;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;"}
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;
@@ -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: string;
5
+ closeLabel?: string;
5
6
  onClose: ClosePopinCallback;
6
7
  }
7
8
  export interface PopinProps {
8
- title: ReactNode;
9
- closeLabel: string;
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>>;