@sikka/hawa 0.10.8-next → 0.10.10-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.css +9 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +40 -5
- package/dist/index.mjs +19 -3
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -1072,6 +1072,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1072
1072
|
.hawa-h-\[130px\] {
|
|
1073
1073
|
height: 130px;
|
|
1074
1074
|
}
|
|
1075
|
+
.hawa-h-\[14px\] {
|
|
1076
|
+
height: 14px;
|
|
1077
|
+
}
|
|
1075
1078
|
.hawa-h-\[15px\] {
|
|
1076
1079
|
height: 15px;
|
|
1077
1080
|
}
|
|
@@ -1224,6 +1227,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1224
1227
|
.hawa-w-\[100px\] {
|
|
1225
1228
|
width: 100px;
|
|
1226
1229
|
}
|
|
1230
|
+
.hawa-w-\[14px\] {
|
|
1231
|
+
width: 14px;
|
|
1232
|
+
}
|
|
1227
1233
|
.hawa-w-\[16px\] {
|
|
1228
1234
|
width: 16px;
|
|
1229
1235
|
}
|
|
@@ -1438,6 +1444,9 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
1438
1444
|
.hawa-cursor-default {
|
|
1439
1445
|
cursor: default;
|
|
1440
1446
|
}
|
|
1447
|
+
.hawa-cursor-help {
|
|
1448
|
+
cursor: help;
|
|
1449
|
+
}
|
|
1441
1450
|
.hawa-cursor-not-allowed {
|
|
1442
1451
|
cursor: not-allowed;
|
|
1443
1452
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -320,7 +320,10 @@ type TChipTypes = {
|
|
|
320
320
|
};
|
|
321
321
|
declare const Chip: FC<TChipTypes>;
|
|
322
322
|
|
|
323
|
-
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> &
|
|
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
|
+
hint?: React$1.ReactNode;
|
|
325
|
+
hintSide?: "top" | "right" | "bottom" | "left" | undefined;
|
|
326
|
+
} & React$1.RefAttributes<HTMLLabelElement>>;
|
|
324
327
|
|
|
325
328
|
type AlertTypes = {
|
|
326
329
|
severity?: "info" | "warning" | "error" | "success" | "none";
|
|
@@ -555,6 +558,8 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
555
558
|
multiline?: boolean;
|
|
556
559
|
/** The small red text under the input field to show validation or a hint. */
|
|
557
560
|
helperText?: any;
|
|
561
|
+
hint?: string;
|
|
562
|
+
hintSide?: "top" | "bottom" | "right" | "left";
|
|
558
563
|
inputProps?: any;
|
|
559
564
|
/** The icon inside the input field */
|
|
560
565
|
icon?: any;
|
package/dist/index.d.ts
CHANGED
|
@@ -320,7 +320,10 @@ type TChipTypes = {
|
|
|
320
320
|
};
|
|
321
321
|
declare const Chip: FC<TChipTypes>;
|
|
322
322
|
|
|
323
|
-
declare const Label: React$1.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React$1.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: class_variance_authority_types.ClassProp | undefined) => string> &
|
|
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
|
+
hint?: React$1.ReactNode;
|
|
325
|
+
hintSide?: "top" | "right" | "bottom" | "left" | undefined;
|
|
326
|
+
} & React$1.RefAttributes<HTMLLabelElement>>;
|
|
324
327
|
|
|
325
328
|
type AlertTypes = {
|
|
326
329
|
severity?: "info" | "warning" | "error" | "success" | "none";
|
|
@@ -555,6 +558,8 @@ type TextFieldTypes = React__default.InputHTMLAttributes<HTMLInputElement> & {
|
|
|
555
558
|
multiline?: boolean;
|
|
556
559
|
/** The small red text under the input field to show validation or a hint. */
|
|
557
560
|
helperText?: any;
|
|
561
|
+
hint?: string;
|
|
562
|
+
hintSide?: "top" | "bottom" | "right" | "left";
|
|
558
563
|
inputProps?: any;
|
|
559
564
|
/** The icon inside the input field */
|
|
560
565
|
icon?: any;
|
package/dist/index.js
CHANGED
|
@@ -2332,13 +2332,43 @@ 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, props = _object_without_properties(_param, [
|
|
2336
|
-
"className"
|
|
2335
|
+
var className = _param.className, hint = _param.hint, hintSide = _param.hintSide, props = _object_without_properties(_param, [
|
|
2336
|
+
"className",
|
|
2337
|
+
"hint",
|
|
2338
|
+
"hintSide"
|
|
2337
2339
|
]);
|
|
2338
|
-
return React23.createElement(
|
|
2340
|
+
return React23.createElement("div", {
|
|
2341
|
+
className: "hawa-flex hawa-flex-row hawa-gap-2 hawa-items-center "
|
|
2342
|
+
}, /* @__PURE__ */ React23.createElement(LabelPrimitive.Root, _object_spread({
|
|
2339
2343
|
ref: ref,
|
|
2340
2344
|
className: cn(labelVariants(), className)
|
|
2341
|
-
}, props))
|
|
2345
|
+
}, props)), hint && /* @__PURE__ */ React23.createElement(Tooltip, {
|
|
2346
|
+
content: hint,
|
|
2347
|
+
side: hintSide
|
|
2348
|
+
}, /* @__PURE__ */ React23.createElement("svg", {
|
|
2349
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2350
|
+
className: "hawa-w-[14px] hawa-h-[14px] hawa-cursor-help",
|
|
2351
|
+
viewBox: "0 0 24 24",
|
|
2352
|
+
fill: "none",
|
|
2353
|
+
stroke: "currentColor",
|
|
2354
|
+
strokeWidth: "2",
|
|
2355
|
+
strokeLinecap: "round",
|
|
2356
|
+
strokeLinejoin: "round"
|
|
2357
|
+
}, /* @__PURE__ */ React23.createElement("circle", {
|
|
2358
|
+
cx: "12",
|
|
2359
|
+
cy: "12",
|
|
2360
|
+
r: "10"
|
|
2361
|
+
}), /* @__PURE__ */ React23.createElement("line", {
|
|
2362
|
+
x1: "12",
|
|
2363
|
+
x2: "12",
|
|
2364
|
+
y1: "8",
|
|
2365
|
+
y2: "12"
|
|
2366
|
+
}), /* @__PURE__ */ React23.createElement("line", {
|
|
2367
|
+
x1: "12",
|
|
2368
|
+
x2: "12.01",
|
|
2369
|
+
y1: "16",
|
|
2370
|
+
y2: "16"
|
|
2371
|
+
}))));
|
|
2342
2372
|
});
|
|
2343
2373
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
2344
2374
|
// components/elements/Alert.tsx
|
|
@@ -4934,7 +4964,11 @@ var Input = function(_param) {
|
|
|
4934
4964
|
var defaultInputStyle = "hawa-block hawa-w-full hawa-rounded hawa-border hawa-transition-all hawa-bg-background hawa-p-2 hawa-text-sm ";
|
|
4935
4965
|
return /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4936
4966
|
className: cn(defaultStyle, marginStyles[margin], widthStyles[width], props.containerClassName, "hawa-w-full hawa-gap-2")
|
|
4937
|
-
}, props.label && /* @__PURE__ */ import_react24.default.createElement(Label2,
|
|
4967
|
+
}, props.label && /* @__PURE__ */ import_react24.default.createElement(Label2, {
|
|
4968
|
+
htmlFor: props.id,
|
|
4969
|
+
hint: props.hint,
|
|
4970
|
+
hintSide: props.hintSide
|
|
4971
|
+
}, props.label), props.isLoading ? /* @__PURE__ */ import_react24.default.createElement(Skeleton, {
|
|
4938
4972
|
className: "hawa-h-[40px] hawa-w-full"
|
|
4939
4973
|
}) : /* @__PURE__ */ import_react24.default.createElement(import_react24.default.Fragment, null, /* @__PURE__ */ import_react24.default.createElement("div", {
|
|
4940
4974
|
className: cn("hawa-absolute hawa-top-[22px] hawa-h-[0.8px] hawa-w-full hawa-bg-gray-200 hawa-transition-all dark:hawa-bg-gray-800", preview ? "hawa-opacity-100" : "hawa-opacity-0")
|
|
@@ -7219,6 +7253,7 @@ var RegisterForm = function(props) {
|
|
|
7219
7253
|
var _formState_errors_username;
|
|
7220
7254
|
var _field_value;
|
|
7221
7255
|
return import_react38.default.createElement(Input, {
|
|
7256
|
+
hint: "something something",
|
|
7222
7257
|
width: "full",
|
|
7223
7258
|
type: "text",
|
|
7224
7259
|
autoComplete: "username",
|
package/dist/index.mjs
CHANGED
|
@@ -1863,14 +1863,29 @@ 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, ...props }, ref) => /* @__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
|
-
)
|
|
1873
|
+
), hint && /* @__PURE__ */ React23.createElement(Tooltip, { content: hint, side: hintSide }, /* @__PURE__ */ React23.createElement(
|
|
1874
|
+
"svg",
|
|
1875
|
+
{
|
|
1876
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1877
|
+
className: "hawa-w-[14px] hawa-h-[14px] hawa-cursor-help",
|
|
1878
|
+
viewBox: "0 0 24 24",
|
|
1879
|
+
fill: "none",
|
|
1880
|
+
stroke: "currentColor",
|
|
1881
|
+
strokeWidth: "2",
|
|
1882
|
+
strokeLinecap: "round",
|
|
1883
|
+
strokeLinejoin: "round"
|
|
1884
|
+
},
|
|
1885
|
+
/* @__PURE__ */ React23.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
|
1886
|
+
/* @__PURE__ */ React23.createElement("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
|
|
1887
|
+
/* @__PURE__ */ React23.createElement("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
|
|
1888
|
+
))));
|
|
1874
1889
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1875
1890
|
|
|
1876
1891
|
// components/elements/Alert.tsx
|
|
@@ -4570,7 +4585,7 @@ var Input = ({
|
|
|
4570
4585
|
"hawa-w-full hawa-gap-2"
|
|
4571
4586
|
)
|
|
4572
4587
|
},
|
|
4573
|
-
props.label && /* @__PURE__ */ React36.createElement(Label2,
|
|
4588
|
+
props.label && /* @__PURE__ */ React36.createElement(Label2, { htmlFor: props.id, hint: props.hint, hintSide: props.hintSide }, props.label),
|
|
4574
4589
|
props.isLoading ? /* @__PURE__ */ React36.createElement(Skeleton, { className: "hawa-h-[40px] hawa-w-full" }) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(
|
|
4575
4590
|
"div",
|
|
4576
4591
|
{
|
|
@@ -7070,6 +7085,7 @@ var RegisterForm = (props) => {
|
|
|
7070
7085
|
render: ({ field }) => /* @__PURE__ */ React58.createElement(
|
|
7071
7086
|
Input,
|
|
7072
7087
|
{
|
|
7088
|
+
hint: "something something",
|
|
7073
7089
|
width: "full",
|
|
7074
7090
|
type: "text",
|
|
7075
7091
|
autoComplete: "username",
|