@sikka/hawa 0.10.4-next → 0.10.6-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
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { FC, ReactNode, ChangeEvent, InputHTMLAttributes, RefObject, PropsWithRef } from 'react';
2
+ import React__default, { FC, ReactNode, ChangeEvent, InputHTMLAttributes, RefObject } from 'react';
3
3
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantProps } from 'class-variance-authority';
@@ -544,7 +544,7 @@ type BackToTopTypes = {
544
544
  };
545
545
  declare const BackToTop: FC<BackToTopTypes>;
546
546
 
547
- type TextFieldTypes = {
547
+ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
548
548
  isLoading?: boolean;
549
549
  containerClassName?: string;
550
550
  margin?: "none" | "normal" | "large";
@@ -555,25 +555,11 @@ type TextFieldTypes = {
555
555
  multiline?: boolean;
556
556
  /** The small red text under the input field to show validation or a hint. */
557
557
  helperText?: any;
558
- /** The value of the input field */
559
- value?: any;
560
- props?: PropsWithRef<"input">;
561
- /** The type of input field. Same as the types of the HTML input element */
562
- type?: any;
563
- /** The placeholder of the input field */
564
- placeholder?: any;
565
- defaultValue?: any;
566
- name?: any;
567
558
  inputProps?: any;
568
- onChange?: any;
569
- ref?: any;
570
559
  /** The icon inside the input field */
571
560
  icon?: any;
572
561
  /** Boolean to enable/disable editing the input field and using it as a text field */
573
562
  preview?: boolean;
574
- autoComplete?: any;
575
- maxLength?: any;
576
- className?: any;
577
563
  iconInside?: React__default.ReactNode;
578
564
  };
579
565
  declare const Input: FC<TextFieldTypes>;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default, { FC, ReactNode, ChangeEvent, InputHTMLAttributes, RefObject, PropsWithRef } from 'react';
2
+ import React__default, { FC, ReactNode, ChangeEvent, InputHTMLAttributes, RefObject } from 'react';
3
3
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantProps } from 'class-variance-authority';
@@ -544,7 +544,7 @@ type BackToTopTypes = {
544
544
  };
545
545
  declare const BackToTop: FC<BackToTopTypes>;
546
546
 
547
- type TextFieldTypes = {
547
+ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
548
548
  isLoading?: boolean;
549
549
  containerClassName?: string;
550
550
  margin?: "none" | "normal" | "large";
@@ -555,25 +555,11 @@ type TextFieldTypes = {
555
555
  multiline?: boolean;
556
556
  /** The small red text under the input field to show validation or a hint. */
557
557
  helperText?: any;
558
- /** The value of the input field */
559
- value?: any;
560
- props?: PropsWithRef<"input">;
561
- /** The type of input field. Same as the types of the HTML input element */
562
- type?: any;
563
- /** The placeholder of the input field */
564
- placeholder?: any;
565
- defaultValue?: any;
566
- name?: any;
567
558
  inputProps?: any;
568
- onChange?: any;
569
- ref?: any;
570
559
  /** The icon inside the input field */
571
560
  icon?: any;
572
561
  /** Boolean to enable/disable editing the input field and using it as a text field */
573
562
  preview?: boolean;
574
- autoComplete?: any;
575
- maxLength?: any;
576
- className?: any;
577
563
  iconInside?: React__default.ReactNode;
578
564
  };
579
565
  declare const Input: FC<TextFieldTypes>;
package/dist/index.js CHANGED
@@ -4941,11 +4941,12 @@ var Input = function(_param) {
4941
4941
  className: "hawa-absolute hawa-left-3 hawa-top-1/2 hawa--translate-y-1/2"
4942
4942
  }, props.icon), /* @__PURE__ */ import_react24.default.createElement("input", {
4943
4943
  className: cn(defaultInputStyle, " dark:hawa-text-white", props.icon && "hawa-pl-10", "focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0", preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0", (_props_inputProps = props.inputProps) === null || _props_inputProps === void 0 ? void 0 : _props_inputProps.className),
4944
+ dir: props.dir,
4945
+ type: props.type,
4946
+ value: props.value,
4944
4947
  onChange: props.onChange,
4945
4948
  autoComplete: props.autoComplete,
4946
- value: props.value,
4947
4949
  defaultValue: props.defaultValue,
4948
- type: props.type,
4949
4950
  placeholder: props.placeholder,
4950
4951
  disabled: preview,
4951
4952
  style: {
package/dist/index.mjs CHANGED
@@ -4585,11 +4585,12 @@ var Input = ({
4585
4585
  preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
4586
4586
  props.inputProps?.className
4587
4587
  ),
4588
+ dir: props.dir,
4589
+ type: props.type,
4590
+ value: props.value,
4588
4591
  onChange: props.onChange,
4589
4592
  autoComplete: props.autoComplete,
4590
- value: props.value,
4591
4593
  defaultValue: props.defaultValue,
4592
- type: props.type,
4593
4594
  placeholder: props.placeholder,
4594
4595
  disabled: preview,
4595
4596
  style: { height: 40 }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.10.4-next",
3
+ "version": "0.10.6-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {
@@ -62,15 +62,15 @@
62
62
  "zod": "^3.22.3"
63
63
  },
64
64
  "devDependencies": {
65
+ "@storybook/testing-library": "^0.2.1",
66
+ "@storybook/addon-onboarding": "^1.0.8",
65
67
  "@storybook/addon-essentials": "^7.4.5",
66
68
  "@storybook/addon-interactions": "^7.4.5",
67
69
  "@storybook/addon-links": "^7.4.5",
68
- "@storybook/addon-onboarding": "^1.0.8",
69
70
  "@storybook/blocks": "^7.4.5",
70
71
  "@storybook/manager-api": "^7.4.5",
71
72
  "@storybook/nextjs": "^7.4.5",
72
73
  "@storybook/react": "^7.4.5",
73
- "@storybook/testing-library": "^0.2.1",
74
74
  "autoprefixer": "^10.4.16",
75
75
  "eslint-plugin-storybook": "^0.6.14",
76
76
  "lucide-react": "^0.279.0",