@sikka/hawa 0.16.10-next → 0.16.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 +13 -14
- package/dist/index.d.ts +13 -14
- package/dist/index.js +2 -2
- package/dist/index.mjs +81 -79
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -269,32 +269,31 @@ type ColorPickerTypes = {
|
|
|
269
269
|
};
|
|
270
270
|
declare const ColorPicker: FC<ColorPickerTypes>;
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
isLoading?: boolean;
|
|
274
|
-
containerClassName?: string;
|
|
275
|
-
margin?: "none" | "normal" | "large";
|
|
276
|
-
width?: "small" | "
|
|
272
|
+
declare const Input: React__default.ForwardRefExoticComponent<React__default.InputHTMLAttributes<HTMLInputElement> & {
|
|
273
|
+
isLoading?: boolean | undefined;
|
|
274
|
+
containerClassName?: string | undefined;
|
|
275
|
+
margin?: "none" | "normal" | "large" | undefined;
|
|
276
|
+
width?: "small" | "full" | "normal" | "auto" | undefined;
|
|
277
277
|
/** The label of the input field */
|
|
278
278
|
label?: any;
|
|
279
|
-
hint?: string;
|
|
280
|
-
hintSide?: PositionType;
|
|
279
|
+
hint?: string | undefined;
|
|
280
|
+
hintSide?: PositionType | undefined;
|
|
281
281
|
/** If true, it will show a red asterisk next to the label*/
|
|
282
|
-
isRequired?: boolean;
|
|
282
|
+
isRequired?: boolean | undefined;
|
|
283
283
|
/** Disable/Enable multiple line text input field */
|
|
284
|
-
multiline?: boolean;
|
|
284
|
+
multiline?: boolean | undefined;
|
|
285
285
|
/** The small red text under the input field to show validation or a hint. */
|
|
286
286
|
helperText?: any;
|
|
287
|
-
forceHideHelperText?: boolean;
|
|
288
|
-
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement
|
|
287
|
+
forceHideHelperText?: boolean | undefined;
|
|
288
|
+
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
289
289
|
/** The icon inside the input field */
|
|
290
290
|
icon?: any;
|
|
291
291
|
/** Boolean to enable/disable editing the input field and using it as a text field */
|
|
292
|
-
preview?: boolean;
|
|
292
|
+
preview?: boolean | undefined;
|
|
293
293
|
iconInside?: React__default.ReactNode;
|
|
294
294
|
endIcon?: React__default.ReactNode;
|
|
295
295
|
startIcon?: React__default.ReactNode;
|
|
296
|
-
}
|
|
297
|
-
declare const Input: FC<TextFieldTypes>;
|
|
296
|
+
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
298
297
|
|
|
299
298
|
type ComboboxTypes<T> = {
|
|
300
299
|
labelKey?: keyof T;
|
package/dist/index.d.ts
CHANGED
|
@@ -269,32 +269,31 @@ type ColorPickerTypes = {
|
|
|
269
269
|
};
|
|
270
270
|
declare const ColorPicker: FC<ColorPickerTypes>;
|
|
271
271
|
|
|
272
|
-
|
|
273
|
-
isLoading?: boolean;
|
|
274
|
-
containerClassName?: string;
|
|
275
|
-
margin?: "none" | "normal" | "large";
|
|
276
|
-
width?: "small" | "
|
|
272
|
+
declare const Input: React__default.ForwardRefExoticComponent<React__default.InputHTMLAttributes<HTMLInputElement> & {
|
|
273
|
+
isLoading?: boolean | undefined;
|
|
274
|
+
containerClassName?: string | undefined;
|
|
275
|
+
margin?: "none" | "normal" | "large" | undefined;
|
|
276
|
+
width?: "small" | "full" | "normal" | "auto" | undefined;
|
|
277
277
|
/** The label of the input field */
|
|
278
278
|
label?: any;
|
|
279
|
-
hint?: string;
|
|
280
|
-
hintSide?: PositionType;
|
|
279
|
+
hint?: string | undefined;
|
|
280
|
+
hintSide?: PositionType | undefined;
|
|
281
281
|
/** If true, it will show a red asterisk next to the label*/
|
|
282
|
-
isRequired?: boolean;
|
|
282
|
+
isRequired?: boolean | undefined;
|
|
283
283
|
/** Disable/Enable multiple line text input field */
|
|
284
|
-
multiline?: boolean;
|
|
284
|
+
multiline?: boolean | undefined;
|
|
285
285
|
/** The small red text under the input field to show validation or a hint. */
|
|
286
286
|
helperText?: any;
|
|
287
|
-
forceHideHelperText?: boolean;
|
|
288
|
-
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement
|
|
287
|
+
forceHideHelperText?: boolean | undefined;
|
|
288
|
+
inputProps?: React__default.InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
289
289
|
/** The icon inside the input field */
|
|
290
290
|
icon?: any;
|
|
291
291
|
/** Boolean to enable/disable editing the input field and using it as a text field */
|
|
292
|
-
preview?: boolean;
|
|
292
|
+
preview?: boolean | undefined;
|
|
293
293
|
iconInside?: React__default.ReactNode;
|
|
294
294
|
endIcon?: React__default.ReactNode;
|
|
295
295
|
startIcon?: React__default.ReactNode;
|
|
296
|
-
}
|
|
297
|
-
declare const Input: FC<TextFieldTypes>;
|
|
296
|
+
} & React__default.RefAttributes<HTMLInputElement>>;
|
|
298
297
|
|
|
299
298
|
type ComboboxTypes<T> = {
|
|
300
299
|
labelKey?: keyof T;
|
package/dist/index.js
CHANGED
|
@@ -4066,7 +4066,7 @@ var ColorPicker = function(_param) {
|
|
|
4066
4066
|
};
|
|
4067
4067
|
// components/elements/Input.tsx
|
|
4068
4068
|
var import_react15 = __toESM(require("react"));
|
|
4069
|
-
var Input = function(_param) {
|
|
4069
|
+
var Input = (0, import_react15.forwardRef)(function(_param, ref) {
|
|
4070
4070
|
var _param_margin = _param.margin, margin = _param_margin === void 0 ? "none" : _param_margin, _param_width = _param.width, width = _param_width === void 0 ? "full" : _param_width, _param_preview = _param.preview, preview = _param_preview === void 0 ? false : _param_preview, _param_forceHideHelperText = _param.forceHideHelperText, forceHideHelperText = _param_forceHideHelperText === void 0 ? false : _param_forceHideHelperText, props = _object_without_properties(_param, [
|
|
4071
4071
|
"margin",
|
|
4072
4072
|
"width",
|
|
@@ -4123,7 +4123,7 @@ var Input = function(_param) {
|
|
|
4123
4123
|
})), !forceHideHelperText && /* @__PURE__ */ import_react15.default.createElement("p", {
|
|
4124
4124
|
className: cn("hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all hawa-text-start", props.helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0")
|
|
4125
4125
|
}, props.helperText))));
|
|
4126
|
-
};
|
|
4126
|
+
});
|
|
4127
4127
|
// components/elements/Combobox.tsx
|
|
4128
4128
|
var React28 = __toESM(require("react"));
|
|
4129
4129
|
var PopoverPrimitive2 = __toESM(require("@radix-ui/react-popover"));
|
package/dist/index.mjs
CHANGED
|
@@ -3442,90 +3442,92 @@ var ColorPicker = ({
|
|
|
3442
3442
|
};
|
|
3443
3443
|
|
|
3444
3444
|
// components/elements/Input.tsx
|
|
3445
|
-
import React24 from "react";
|
|
3446
|
-
var Input = (
|
|
3447
|
-
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
{
|
|
3469
|
-
className: cn(
|
|
3470
|
-
defaultStyle,
|
|
3471
|
-
marginStyles[margin],
|
|
3472
|
-
widthStyles[width],
|
|
3473
|
-
props.containerClassName,
|
|
3474
|
-
"hawa-w-full hawa-gap-2"
|
|
3475
|
-
)
|
|
3476
|
-
},
|
|
3477
|
-
props.label && /* @__PURE__ */ React24.createElement(
|
|
3478
|
-
Label2,
|
|
3479
|
-
{
|
|
3480
|
-
htmlFor: props.id,
|
|
3481
|
-
hint: props.hint,
|
|
3482
|
-
hintSide: props.hintSide,
|
|
3483
|
-
required: props.isRequired
|
|
3484
|
-
},
|
|
3485
|
-
props.label
|
|
3486
|
-
),
|
|
3487
|
-
props.isLoading ? /* @__PURE__ */ React24.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React24.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
|
|
3445
|
+
import React24, { forwardRef as forwardRef9 } from "react";
|
|
3446
|
+
var Input = forwardRef9(
|
|
3447
|
+
({
|
|
3448
|
+
margin = "none",
|
|
3449
|
+
width = "full",
|
|
3450
|
+
preview = false,
|
|
3451
|
+
forceHideHelperText = false,
|
|
3452
|
+
...props
|
|
3453
|
+
}, ref) => {
|
|
3454
|
+
let marginStyles = {
|
|
3455
|
+
none: "hawa-mb-0",
|
|
3456
|
+
normal: "hawa-mb-3",
|
|
3457
|
+
large: "hawa-mb-5"
|
|
3458
|
+
};
|
|
3459
|
+
let widthStyles = {
|
|
3460
|
+
small: "hawa-w-full hawa-max-w-2xs",
|
|
3461
|
+
normal: "hawa-w-1/2",
|
|
3462
|
+
full: "hawa-w-full",
|
|
3463
|
+
auto: ""
|
|
3464
|
+
};
|
|
3465
|
+
let defaultStyle = "hawa-flex hawa-max-h-fit hawa-h-fit hawa-relative hawa-flex-col hawa-justify-center hawa-gap-0";
|
|
3466
|
+
let defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-3 hawa-text-sm ";
|
|
3467
|
+
return /* @__PURE__ */ React24.createElement(
|
|
3488
3468
|
"div",
|
|
3489
3469
|
{
|
|
3490
3470
|
className: cn(
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
"input",
|
|
3497
|
-
{
|
|
3498
|
-
required: true,
|
|
3499
|
-
dir: props.dir,
|
|
3500
|
-
type: props.type,
|
|
3501
|
-
value: props.value,
|
|
3502
|
-
onChange: props.onChange,
|
|
3503
|
-
autoComplete: props.autoComplete,
|
|
3504
|
-
defaultValue: props.defaultValue,
|
|
3505
|
-
placeholder: props.placeholder,
|
|
3506
|
-
disabled: preview,
|
|
3507
|
-
style: { height: 40 },
|
|
3508
|
-
className: cn(
|
|
3509
|
-
defaultInputStyle,
|
|
3510
|
-
" dark:hawa-text-white focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0",
|
|
3511
|
-
props.endIcon && "hawa-pe-9",
|
|
3512
|
-
props.startIcon && "hawa-ps-9",
|
|
3513
|
-
preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
|
|
3514
|
-
props.inputProps?.className
|
|
3515
|
-
)
|
|
3516
|
-
}
|
|
3517
|
-
)), !forceHideHelperText && /* @__PURE__ */ React24.createElement(
|
|
3518
|
-
"p",
|
|
3519
|
-
{
|
|
3520
|
-
className: cn(
|
|
3521
|
-
"hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all hawa-text-start",
|
|
3522
|
-
props.helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0"
|
|
3471
|
+
defaultStyle,
|
|
3472
|
+
marginStyles[margin],
|
|
3473
|
+
widthStyles[width],
|
|
3474
|
+
props.containerClassName,
|
|
3475
|
+
"hawa-w-full hawa-gap-2"
|
|
3523
3476
|
)
|
|
3524
3477
|
},
|
|
3525
|
-
props.
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3478
|
+
props.label && /* @__PURE__ */ React24.createElement(
|
|
3479
|
+
Label2,
|
|
3480
|
+
{
|
|
3481
|
+
htmlFor: props.id,
|
|
3482
|
+
hint: props.hint,
|
|
3483
|
+
hintSide: props.hintSide,
|
|
3484
|
+
required: props.isRequired
|
|
3485
|
+
},
|
|
3486
|
+
props.label
|
|
3487
|
+
),
|
|
3488
|
+
props.isLoading ? /* @__PURE__ */ React24.createElement("div", { className: "hawa-pb-2" }, /* @__PURE__ */ React24.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" })) : /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(
|
|
3489
|
+
"div",
|
|
3490
|
+
{
|
|
3491
|
+
className: cn(
|
|
3492
|
+
"hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800",
|
|
3493
|
+
preview ? "hawa-opacity-100" : "hawa-opacity-0"
|
|
3494
|
+
)
|
|
3495
|
+
}
|
|
3496
|
+
), /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement("div", { className: cn("hawa-relative") }, props.startIcon && /* @__PURE__ */ React24.createElement("div", { className: "hawa-absolute hawa-start-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.startIcon), props.endIcon && /* @__PURE__ */ React24.createElement("div", { className: "hawa-absolute hawa-end-3 hawa-top-1/2 hawa--translate-y-1/2" }, props.endIcon), /* @__PURE__ */ React24.createElement(
|
|
3497
|
+
"input",
|
|
3498
|
+
{
|
|
3499
|
+
required: true,
|
|
3500
|
+
dir: props.dir,
|
|
3501
|
+
type: props.type,
|
|
3502
|
+
value: props.value,
|
|
3503
|
+
onChange: props.onChange,
|
|
3504
|
+
autoComplete: props.autoComplete,
|
|
3505
|
+
defaultValue: props.defaultValue,
|
|
3506
|
+
placeholder: props.placeholder,
|
|
3507
|
+
disabled: preview,
|
|
3508
|
+
style: { height: 40 },
|
|
3509
|
+
className: cn(
|
|
3510
|
+
defaultInputStyle,
|
|
3511
|
+
" dark:hawa-text-white focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-0",
|
|
3512
|
+
props.endIcon && "hawa-pe-9",
|
|
3513
|
+
props.startIcon && "hawa-ps-9",
|
|
3514
|
+
preview && "hawa-border-transparent hawa-bg-transparent hawa-px-0",
|
|
3515
|
+
props.inputProps?.className
|
|
3516
|
+
)
|
|
3517
|
+
}
|
|
3518
|
+
)), !forceHideHelperText && /* @__PURE__ */ React24.createElement(
|
|
3519
|
+
"p",
|
|
3520
|
+
{
|
|
3521
|
+
className: cn(
|
|
3522
|
+
"hawa-my-0 hawa-text-xs hawa-text-helper-color hawa-transition-all hawa-text-start",
|
|
3523
|
+
props.helperText ? "hawa-opacity-100 hawa-h-4" : "hawa-opacity-0 hawa-h-0"
|
|
3524
|
+
)
|
|
3525
|
+
},
|
|
3526
|
+
props.helperText
|
|
3527
|
+
)))
|
|
3528
|
+
);
|
|
3529
|
+
}
|
|
3530
|
+
);
|
|
3529
3531
|
|
|
3530
3532
|
// components/elements/Combobox.tsx
|
|
3531
3533
|
import * as React28 from "react";
|