@sikka/hawa 0.8.15-next → 0.8.17-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 +19 -10
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +11 -8
- package/dist/index.mjs +16 -8
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -431,18 +431,17 @@ video {
|
|
|
431
431
|
--muted-foreground: 240 5% 64.9%;
|
|
432
432
|
--accent: 240 3.7% 15.9%;
|
|
433
433
|
--accent-foreground: 0 0% 98%;
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
--success:
|
|
437
|
-
--
|
|
438
|
-
--info:
|
|
439
|
-
--
|
|
440
|
-
--warning:
|
|
441
|
-
|
|
442
|
-
|
|
434
|
+
|
|
435
|
+
--success: 106 70% 40%; /* A shade of green */
|
|
436
|
+
--success-foreground: 0 0% 100%; /* White */
|
|
437
|
+
--info: 200 100% 30%; /* A shade of blue */
|
|
438
|
+
--info-foreground: 0 0% 100%; /* White */
|
|
439
|
+
--warning: 45 100% 50%; /* A shade of yellow */
|
|
440
|
+
--warning-foreground: 0 0% 20%; /* Dark grey */
|
|
441
|
+
|
|
443
442
|
--destructive: 0 62.8% 30.6%;
|
|
444
443
|
--destructive-foreground: 0 85.7% 97.3%;
|
|
445
|
-
|
|
444
|
+
|
|
446
445
|
--border: 240 3.7% 15.9%;
|
|
447
446
|
--input: 240 3.7% 15.9%;
|
|
448
447
|
--ring: 240 4.9% 83.9%;
|
|
@@ -661,6 +660,16 @@ input[type="number"]::-webkit-inner-spin-button,
|
|
|
661
660
|
height: 1rem;
|
|
662
661
|
width: 1rem;
|
|
663
662
|
}
|
|
663
|
+
.helper-text {
|
|
664
|
+
font-size: 0.75rem;
|
|
665
|
+
line-height: 1rem;
|
|
666
|
+
--tw-text-opacity: 1;
|
|
667
|
+
color: rgb(220 38 38 / var(--tw-text-opacity));
|
|
668
|
+
}
|
|
669
|
+
:is([data-mode="dark"] .helper-text) {
|
|
670
|
+
--tw-text-opacity: 1;
|
|
671
|
+
color: rgb(239 68 68 / var(--tw-text-opacity));
|
|
672
|
+
}
|
|
664
673
|
.ddm-w-parent {
|
|
665
674
|
width: var(--radix-dropdown-menu-trigger-width);
|
|
666
675
|
}
|
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1772,7 +1772,7 @@ var Checkbox = function(_param) {
|
|
|
1772
1772
|
className: cn("hawa-cursor-pointer hawa-select-none hawa-text-sm hawa-text-muted-foreground", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-text-muted-foreground hawa-opacity-70")
|
|
1773
1773
|
}, sublabel), helperText && !checkboxProps.disabled && /* @__PURE__ */ React13.createElement("label", {
|
|
1774
1774
|
htmlFor: id,
|
|
1775
|
-
className: cn("hawa-select-none
|
|
1775
|
+
className: cn("hawa-select-none helper-text", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-opacity-70")
|
|
1776
1776
|
}, helperText)));
|
|
1777
1777
|
};
|
|
1778
1778
|
var CheckboxElement = React13.forwardRef(function(_param, ref) /* @__PURE__ */ {
|
|
@@ -2443,7 +2443,7 @@ var Textarea = React24.forwardRef(function(_param, ref) {
|
|
|
2443
2443
|
className: cn("hawa-flex hawa-min-h-[80px] hawa-w-full hawa-rounded-md hawa-border hawa-border-input hawa-bg-background hawa-px-3 hawa-py-2 hawa-text-sm hawa-ring-offset-background placeholder:hawa-text-muted-foreground focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-cursor-not-allowed disabled:hawa-opacity-50", className),
|
|
2444
2444
|
ref: ref
|
|
2445
2445
|
}, props)), props.helperText && /* @__PURE__ */ React24.createElement("p", {
|
|
2446
|
-
className: "
|
|
2446
|
+
className: "helper-text"
|
|
2447
2447
|
}, props.helperText));
|
|
2448
2448
|
});
|
|
2449
2449
|
Textarea.displayName = "Textarea";
|
|
@@ -4540,7 +4540,7 @@ var Select = function(props) {
|
|
|
4540
4540
|
return "hawa-text-foreground";
|
|
4541
4541
|
},
|
|
4542
4542
|
indicatorsContainer: function() {
|
|
4543
|
-
return cn("
|
|
4543
|
+
return cn("hawa-cursor-pointer hawa-text-muted-foreground", props.hideIndicator ? "hawa-invisible" : "hawa-px-1");
|
|
4544
4544
|
}
|
|
4545
4545
|
},
|
|
4546
4546
|
unstyled: true,
|
|
@@ -4555,12 +4555,15 @@ var Select = function(props) {
|
|
|
4555
4555
|
onChange: function(newValue, action) {
|
|
4556
4556
|
return props.onChange(newValue, action);
|
|
4557
4557
|
},
|
|
4558
|
-
components: {
|
|
4558
|
+
components: props.hideIndicator ? {
|
|
4559
4559
|
Option: Option,
|
|
4560
4560
|
Menu: Menu,
|
|
4561
4561
|
IndicatorsContainer: function() {
|
|
4562
4562
|
return null;
|
|
4563
4563
|
}
|
|
4564
|
+
} : {
|
|
4565
|
+
Option: Option,
|
|
4566
|
+
Menu: Menu
|
|
4564
4567
|
},
|
|
4565
4568
|
getOptionLabel: props.getOptionLabel
|
|
4566
4569
|
}) : /* @__PURE__ */ import_react18.default.createElement(import_creatable.default, {
|
|
@@ -4608,7 +4611,7 @@ var Select = function(props) {
|
|
|
4608
4611
|
return props.onInputChange(newValue, action);
|
|
4609
4612
|
}
|
|
4610
4613
|
}), props.helperText && /* @__PURE__ */ import_react18.default.createElement("p", {
|
|
4611
|
-
className: "
|
|
4614
|
+
className: "helper-text"
|
|
4612
4615
|
}, props.helperText));
|
|
4613
4616
|
};
|
|
4614
4617
|
// components/elements/PhoneInput.tsx
|
|
@@ -4910,7 +4913,7 @@ var Input = function(_param) {
|
|
|
4910
4913
|
})), props.iconInside && /* @__PURE__ */ import_react22.default.createElement("div", {
|
|
4911
4914
|
className: "hawa-absolute hawa-right-1 hawa-top-[41px] hawa--translate-y-1/2"
|
|
4912
4915
|
}, props.iconInside), props.helperText && /* @__PURE__ */ import_react22.default.createElement("p", {
|
|
4913
|
-
className: "hawa-mb-0 hawa-mt-0
|
|
4916
|
+
className: "hawa-mb-0 hawa-mt-0 helper-text"
|
|
4914
4917
|
}, props.helperText))));
|
|
4915
4918
|
};
|
|
4916
4919
|
// components/elements/DataTable.tsx
|
|
@@ -8133,13 +8136,13 @@ var FeedbackForm = function(props) {
|
|
|
8133
8136
|
control: control,
|
|
8134
8137
|
render: function(param) {
|
|
8135
8138
|
var field = param.field;
|
|
8136
|
-
var _formState_errors_requestType;
|
|
8139
|
+
var _formState_errors_requestType_message, _formState_errors_requestType;
|
|
8137
8140
|
return /* @__PURE__ */ import_react45.default.createElement(Select, _object_spread_props(_object_spread({}, field), {
|
|
8138
8141
|
onChange: function(option) {
|
|
8139
8142
|
return field.onChange(option.value);
|
|
8140
8143
|
},
|
|
8141
8144
|
options: props.requestTypes,
|
|
8142
|
-
helperText:
|
|
8145
|
+
helperText: (_formState_errors_requestType = formState.errors.requestType) === null || _formState_errors_requestType === void 0 ? void 0 : (_formState_errors_requestType_message = _formState_errors_requestType.message) === null || _formState_errors_requestType_message === void 0 ? void 0 : _formState_errors_requestType_message.toString()
|
|
8143
8146
|
}));
|
|
8144
8147
|
}
|
|
8145
8148
|
}), /* @__PURE__ */ import_react45.default.createElement(Label2, null, props.texts.description), /* @__PURE__ */ import_react45.default.createElement(import_react_hook_form7.Controller, {
|
package/dist/index.mjs
CHANGED
|
@@ -1207,7 +1207,7 @@ var Checkbox = ({
|
|
|
1207
1207
|
{
|
|
1208
1208
|
htmlFor: id,
|
|
1209
1209
|
className: cn(
|
|
1210
|
-
"hawa-select-none
|
|
1210
|
+
"hawa-select-none helper-text",
|
|
1211
1211
|
checkboxProps.disabled && "hawa-cursor-not-allowed hawa-opacity-70"
|
|
1212
1212
|
)
|
|
1213
1213
|
},
|
|
@@ -2012,7 +2012,7 @@ var Textarea = React24.forwardRef(
|
|
|
2012
2012
|
ref,
|
|
2013
2013
|
...props
|
|
2014
2014
|
}
|
|
2015
|
-
), props.helperText && /* @__PURE__ */ React24.createElement("p", { className: "
|
|
2015
|
+
), props.helperText && /* @__PURE__ */ React24.createElement("p", { className: "helper-text" }, props.helperText));
|
|
2016
2016
|
}
|
|
2017
2017
|
);
|
|
2018
2018
|
Textarea.displayName = "Textarea";
|
|
@@ -4191,8 +4191,8 @@ var Select = (props) => {
|
|
|
4191
4191
|
valueContainer: () => "hawa-text-foreground hawa-px-1 ",
|
|
4192
4192
|
singleValue: () => "hawa-text-foreground",
|
|
4193
4193
|
indicatorsContainer: () => cn(
|
|
4194
|
-
"
|
|
4195
|
-
props.hideIndicator
|
|
4194
|
+
"hawa-cursor-pointer hawa-text-muted-foreground",
|
|
4195
|
+
props.hideIndicator ? "hawa-invisible" : "hawa-px-1"
|
|
4196
4196
|
)
|
|
4197
4197
|
},
|
|
4198
4198
|
unstyled: true,
|
|
@@ -4205,7 +4205,15 @@ var Select = (props) => {
|
|
|
4205
4205
|
placeholder: props.placeholder,
|
|
4206
4206
|
autoFocus: true,
|
|
4207
4207
|
onChange: (newValue, action) => props.onChange(newValue, action),
|
|
4208
|
-
components:
|
|
4208
|
+
components: props.hideIndicator ? {
|
|
4209
|
+
Option,
|
|
4210
|
+
Menu,
|
|
4211
|
+
IndicatorsContainer: () => null
|
|
4212
|
+
// Set to null if phoneCode is true, otherwise undefined
|
|
4213
|
+
} : {
|
|
4214
|
+
Option,
|
|
4215
|
+
Menu
|
|
4216
|
+
},
|
|
4209
4217
|
getOptionLabel: props.getOptionLabel
|
|
4210
4218
|
}
|
|
4211
4219
|
)
|
|
@@ -4236,7 +4244,7 @@ var Select = (props) => {
|
|
|
4236
4244
|
onInputChange: (newValue, action) => props.onInputChange(newValue, action)
|
|
4237
4245
|
}
|
|
4238
4246
|
),
|
|
4239
|
-
props.helperText && /* @__PURE__ */ React29.createElement("p", { className: "
|
|
4247
|
+
props.helperText && /* @__PURE__ */ React29.createElement("p", { className: "helper-text" }, props.helperText)
|
|
4240
4248
|
);
|
|
4241
4249
|
};
|
|
4242
4250
|
|
|
@@ -4584,7 +4592,7 @@ var Input = ({
|
|
|
4584
4592
|
placeholder: props.placeholder,
|
|
4585
4593
|
disabled: preview
|
|
4586
4594
|
}
|
|
4587
|
-
)), props.iconInside && /* @__PURE__ */ React34.createElement("div", { className: "hawa-absolute hawa-right-1 hawa-top-[41px] hawa--translate-y-1/2" }, props.iconInside), props.helperText && /* @__PURE__ */ React34.createElement("p", { className: "hawa-mb-0 hawa-mt-0
|
|
4595
|
+
)), props.iconInside && /* @__PURE__ */ React34.createElement("div", { className: "hawa-absolute hawa-right-1 hawa-top-[41px] hawa--translate-y-1/2" }, props.iconInside), props.helperText && /* @__PURE__ */ React34.createElement("p", { className: "hawa-mb-0 hawa-mt-0 helper-text" }, props.helperText)))
|
|
4588
4596
|
);
|
|
4589
4597
|
};
|
|
4590
4598
|
|
|
@@ -8035,7 +8043,7 @@ var FeedbackForm = (props) => {
|
|
|
8035
8043
|
...field,
|
|
8036
8044
|
onChange: (option) => field.onChange(option.value),
|
|
8037
8045
|
options: props.requestTypes,
|
|
8038
|
-
helperText: formState.errors.requestType
|
|
8046
|
+
helperText: formState.errors.requestType?.message?.toString()
|
|
8039
8047
|
}
|
|
8040
8048
|
)
|
|
8041
8049
|
}
|