@sikka/hawa 0.10.9-next → 0.10.11-next

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/dist/index.d.mts CHANGED
@@ -322,6 +322,7 @@ declare const Chip: FC<TChipTypes>;
322
322
 
323
323
  declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & {
324
324
  hint?: React$1.ReactNode;
325
+ hintSide?: "top" | "right" | "bottom" | "left" | undefined;
325
326
  } & React$1.RefAttributes<HTMLLabelElement>>;
326
327
 
327
328
  type AlertTypes = {
@@ -558,6 +559,7 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
558
559
  /** The small red text under the input field to show validation or a hint. */
559
560
  helperText?: any;
560
561
  hint?: string;
562
+ hintSide?: "top" | "bottom" | "right" | "left";
561
563
  inputProps?: any;
562
564
  /** The icon inside the input field */
563
565
  icon?: any;
package/dist/index.d.ts CHANGED
@@ -322,6 +322,7 @@ declare const Chip: FC<TChipTypes>;
322
322
 
323
323
  declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> & {
324
324
  hint?: React$1.ReactNode;
325
+ hintSide?: "top" | "right" | "bottom" | "left" | undefined;
325
326
  } & React$1.RefAttributes<HTMLLabelElement>>;
326
327
 
327
328
  type AlertTypes = {
@@ -558,6 +559,7 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
558
559
  /** The small red text under the input field to show validation or a hint. */
559
560
  helperText?: any;
560
561
  hint?: string;
562
+ hintSide?: "top" | "bottom" | "right" | "left";
561
563
  inputProps?: any;
562
564
  /** The icon inside the input field */
563
565
  icon?: any;
package/dist/index.js CHANGED
@@ -2332,9 +2332,10 @@ var LabelPrimitive = __toESM(require("@radix-ui/react-label"));
2332
2332
  var import_class_variance_authority3 = require("class-variance-authority");
2333
2333
  var labelVariants = (0, import_class_variance_authority3.cva)("hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70");
2334
2334
  var Label2 = React23.forwardRef(function(_param, ref) /* @__PURE__ */ {
2335
- var className = _param.className, hint = _param.hint, props = _object_without_properties(_param, [
2335
+ var className = _param.className, hint = _param.hint, hintSide = _param.hintSide, props = _object_without_properties(_param, [
2336
2336
  "className",
2337
- "hint"
2337
+ "hint",
2338
+ "hintSide"
2338
2339
  ]);
2339
2340
  return React23.createElement("div", {
2340
2341
  className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center "
@@ -2343,7 +2344,7 @@ var Label2 = React23.forwardRef(function(_param, ref) /* @__PURE__ */ {
2343
2344
  className: cn(labelVariants(), className)
2344
2345
  }, props)), hint && /* @__PURE__ */ React23.createElement(Tooltip, {
2345
2346
  content: hint,
2346
- side: "right"
2347
+ side: hintSide
2347
2348
  }, /* @__PURE__ */ React23.createElement("svg", {
2348
2349
  xmlns: "http://www.w3.org/2000/svg",
2349
2350
  className: "hawa-w-[14px] hawa-h-[14px] hawa-cursor-help",
@@ -4965,7 +4966,8 @@ var Input = function(_param) {
4965
4966
  className: cn(defaultStyle, marginStyles[margin], widthStyles[width], props.containerClassName, "hawa-w-full hawa-gap-2")
4966
4967
  }, props.label && /* @__PURE__ */ import_react24.default.createElement(Label2, {
4967
4968
  htmlFor: props.id,
4968
- hint: props.hint
4969
+ hint: props.hint,
4970
+ hintSide: props.hintSide
4969
4971
  }, props.label), props.isLoading ? /* @__PURE__ */ import_react24.default.createElement(Skeleton, {
4970
4972
  className: "hawa-h-[40px] hawa-w-full"
4971
4973
  }) : /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("div", {
@@ -7251,7 +7253,6 @@ var RegisterForm = function(props) {
7251
7253
  var _formState_errors_username;
7252
7254
  var _field_value;
7253
7255
  return import_react38.default.createElement(Input, {
7254
- hint: "something something",
7255
7256
  width: "full",
7256
7257
  type: "text",
7257
7258
  autoComplete: "username",
package/dist/index.mjs CHANGED
@@ -1863,14 +1863,14 @@ import { cva as cva3 } from "class-variance-authority";
1863
1863
  var labelVariants = cva3(
1864
1864
  "hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70"
1865
1865
  );
1866
- var Label2 = React23.forwardRef(({ className, hint, ...props }, ref) => /* @__PURE__ */ React23.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center " }, /* @__PURE__ */ React23.createElement(
1866
+ var Label2 = React23.forwardRef(({ className, hint, hintSide, ...props }, ref) => /* @__PURE__ */ React23.createElement("div", { className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center " }, /* @__PURE__ */ React23.createElement(
1867
1867
  LabelPrimitive.Root,
1868
1868
  {
1869
1869
  ref,
1870
1870
  className: cn(labelVariants(), className),
1871
1871
  ...props
1872
1872
  }
1873
- ), hint && /* @__PURE__ */ React23.createElement(Tooltip, { content: hint, side: "right" }, /* @__PURE__ */ React23.createElement(
1873
+ ), hint && /* @__PURE__ */ React23.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React23.createElement(
1874
1874
  "svg",
1875
1875
  {
1876
1876
  xmlns: "http://www.w3.org/2000/svg",
@@ -4585,7 +4585,7 @@ var Input = ({
4585
4585
  "hawa-w-full hawa-gap-2"
4586
4586
  )
4587
4587
  },
4588
- props.label && /* @__PURE__ */ React36.createElement(Label2, { htmlFor: props.id, hint: props.hint }, props.label),
4588
+ props.label && /* @__PURE__ */ React36.createElement(Label2, { htmlFor: props.id, hint: props.hint, hintSide: props.hintSide }, props.label),
4589
4589
  props.isLoading ? /* @__PURE__ */ React36.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(
4590
4590
  "div",
4591
4591
  {
@@ -7085,7 +7085,6 @@ var RegisterForm = (props) => {
7085
7085
  render: ({ field }) => /* @__PURE__ */ React58.createElement(
7086
7086
  Input,
7087
7087
  {
7088
- hint: "something something",
7089
7088
  width: "full",
7090
7089
  type: "text",
7091
7090
  autoComplete: "username",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.10.9-next",
3
+ "version": "0.10.11-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {