@sikka/hawa 0.15.7-next → 0.15.8-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
@@ -270,21 +270,21 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
270
270
  width?: "small" | "normal" | "full" | "auto";
271
271
  /** The label of the input field */
272
272
  label?: any;
273
+ hint?: string;
274
+ hintSide?: PositionType;
275
+ /** If true, it will show a red asterisk next to the label*/
276
+ isRequired?: boolean;
273
277
  /** Disable/Enable multiple line text input field */
274
278
  multiline?: boolean;
275
279
  /** The small red text under the input field to show validation or a hint. */
276
280
  helperText?: any;
277
- hint?: string;
278
281
  forceHideHelperText?: boolean;
279
- hintSide?: PositionType;
280
282
  inputProps?: any;
281
283
  /** The icon inside the input field */
282
284
  icon?: any;
283
285
  /** Boolean to enable/disable editing the input field and using it as a text field */
284
286
  preview?: boolean;
285
287
  iconInside?: React__default.ReactNode;
286
- /** If true, it will show a red asterisk next to the label*/
287
- isRequired?: boolean;
288
288
  };
289
289
  declare const Input: FC<TextFieldTypes>;
290
290
 
@@ -293,7 +293,6 @@ type ComboboxTypes<T> = {
293
293
  valueKey?: keyof T;
294
294
  data: T[];
295
295
  width?: string;
296
- label?: string;
297
296
  texts: {
298
297
  noItems?: string;
299
298
  placeholder?: string;
@@ -306,6 +305,13 @@ type ComboboxTypes<T> = {
306
305
  defaultValue?: string;
307
306
  preview?: boolean;
308
307
  hideInput?: boolean;
308
+ id?: string;
309
+ /** The label of the input field */
310
+ label?: any;
311
+ hint?: string;
312
+ hintSide?: PositionType;
313
+ /** If true, it will show a red asterisk next to the label*/
314
+ isRequired?: boolean;
309
315
  onChange?: (e: any) => void;
310
316
  };
311
317
  declare const Combobox: React$1.FC<ComboboxTypes<any>>;
package/dist/index.d.ts CHANGED
@@ -270,21 +270,21 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
270
270
  width?: "small" | "normal" | "full" | "auto";
271
271
  /** The label of the input field */
272
272
  label?: any;
273
+ hint?: string;
274
+ hintSide?: PositionType;
275
+ /** If true, it will show a red asterisk next to the label*/
276
+ isRequired?: boolean;
273
277
  /** Disable/Enable multiple line text input field */
274
278
  multiline?: boolean;
275
279
  /** The small red text under the input field to show validation or a hint. */
276
280
  helperText?: any;
277
- hint?: string;
278
281
  forceHideHelperText?: boolean;
279
- hintSide?: PositionType;
280
282
  inputProps?: any;
281
283
  /** The icon inside the input field */
282
284
  icon?: any;
283
285
  /** Boolean to enable/disable editing the input field and using it as a text field */
284
286
  preview?: boolean;
285
287
  iconInside?: React__default.ReactNode;
286
- /** If true, it will show a red asterisk next to the label*/
287
- isRequired?: boolean;
288
288
  };
289
289
  declare const Input: FC<TextFieldTypes>;
290
290
 
@@ -293,7 +293,6 @@ type ComboboxTypes<T> = {
293
293
  valueKey?: keyof T;
294
294
  data: T[];
295
295
  width?: string;
296
- label?: string;
297
296
  texts: {
298
297
  noItems?: string;
299
298
  placeholder?: string;
@@ -306,6 +305,13 @@ type ComboboxTypes<T> = {
306
305
  defaultValue?: string;
307
306
  preview?: boolean;
308
307
  hideInput?: boolean;
308
+ id?: string;
309
+ /** The label of the input field */
310
+ label?: any;
311
+ hint?: string;
312
+ hintSide?: PositionType;
313
+ /** If true, it will show a red asterisk next to the label*/
314
+ isRequired?: boolean;
309
315
  onChange?: (e: any) => void;
310
316
  };
311
317
  declare const Combobox: React$1.FC<ComboboxTypes<any>>;
package/dist/index.js CHANGED
@@ -4347,7 +4347,12 @@ var Combobox = function(_param) {
4347
4347
  };
4348
4348
  return /* @__PURE__ */ React28.createElement("div", {
4349
4349
  className: cn("hawa-flex hawa-flex-col hawa-gap-2 hawa-relative hawa-h-fit", props.width === "fit" ? "hawa-w-fit" : "hawa-w-full")
4350
- }, props.label && /* @__PURE__ */ React28.createElement(Label2, null, props.label), /* @__PURE__ */ React28.createElement(PopoverPrimitive2.Root, {
4350
+ }, props.label && /* @__PURE__ */ React28.createElement(Label2, {
4351
+ htmlFor: props.id,
4352
+ hint: props.hint,
4353
+ hintSide: props.hintSide,
4354
+ required: props.isRequired
4355
+ }, props.label), " ", /* @__PURE__ */ React28.createElement(PopoverPrimitive2.Root, {
4351
4356
  open: open,
4352
4357
  onOpenChange: handleOpenChange
4353
4358
  }, /* @__PURE__ */ React28.createElement(PopoverTrigger, {
@@ -4385,7 +4390,7 @@ var Combobox = function(_param) {
4385
4390
  }, /* @__PURE__ */ React28.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React28.createElement(CommandInput, {
4386
4391
  placeholder: (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.searchPlaceholder
4387
4392
  }), /* @__PURE__ */ React28.createElement(CommandEmpty, null, ((_props_texts2 = props.texts) === null || _props_texts2 === void 0 ? void 0 : _props_texts2.noItems) || "No items found."), /* @__PURE__ */ React28.createElement(CommandGroup, {
4388
- className: " hawa-max-h-[200px] hawa-overflow-y-auto"
4393
+ className: "hawa-max-h-[200px] hawa-overflow-y-auto"
4389
4394
  }, data.map(function(item) {
4390
4395
  return /* @__PURE__ */ React28.createElement(CommandItem, {
4391
4396
  key: getProperty(item, valueKey),
package/dist/index.mjs CHANGED
@@ -3830,7 +3830,17 @@ var Combobox = ({
3830
3830
  props.width === "fit" ? "hawa-w-fit" : "hawa-w-full"
3831
3831
  )
3832
3832
  },
3833
- props.label && /* @__PURE__ */ React28.createElement(Label2, null, props.label),
3833
+ props.label && /* @__PURE__ */ React28.createElement(
3834
+ Label2,
3835
+ {
3836
+ htmlFor: props.id,
3837
+ hint: props.hint,
3838
+ hintSide: props.hintSide,
3839
+ required: props.isRequired
3840
+ },
3841
+ props.label
3842
+ ),
3843
+ " ",
3834
3844
  /* @__PURE__ */ React28.createElement(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange }, /* @__PURE__ */ React28.createElement(PopoverTrigger, { asChild: true }, props.isLoading ? /* @__PURE__ */ React28.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React28.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React28.createElement("div", { className: "hawa-flex hawa-flex-col hawa-gap-2 hawa-items-start " }, /* @__PURE__ */ React28.createElement(
3835
3845
  "div",
3836
3846
  {
@@ -3885,7 +3895,7 @@ var Combobox = ({
3885
3895
  {
3886
3896
  className: cn("popover-w-parent", props.helperText && "-hawa-mt-4")
3887
3897
  },
3888
- /* @__PURE__ */ React28.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React28.createElement(CommandInput, { placeholder: props.texts?.searchPlaceholder }), /* @__PURE__ */ React28.createElement(CommandEmpty, null, props.texts?.noItems || "No items found."), /* @__PURE__ */ React28.createElement(CommandGroup, { className: " hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item) => /* @__PURE__ */ React28.createElement(
3898
+ /* @__PURE__ */ React28.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React28.createElement(CommandInput, { placeholder: props.texts?.searchPlaceholder }), /* @__PURE__ */ React28.createElement(CommandEmpty, null, props.texts?.noItems || "No items found."), /* @__PURE__ */ React28.createElement(CommandGroup, { className: "hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item) => /* @__PURE__ */ React28.createElement(
3889
3899
  CommandItem,
3890
3900
  {
3891
3901
  key: getProperty(item, valueKey),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.15.7-next",
3
+ "version": "0.15.8-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {