@sikka/hawa 0.15.4-next → 0.15.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.css CHANGED
@@ -822,6 +822,9 @@ input[type="number"]::-webkit-inner-spin-button,
822
822
  .hawa-isolate {
823
823
  isolation: isolate;
824
824
  }
825
+ .-hawa-z-10 {
826
+ z-index: -10;
827
+ }
825
828
  .hawa-z-0 {
826
829
  z-index: 0;
827
830
  }
package/dist/index.d.mts CHANGED
@@ -294,10 +294,13 @@ type ComboboxTypes<T> = {
294
294
  data: T[];
295
295
  width?: string;
296
296
  label?: string;
297
+ texts: {
298
+ noItems?: string;
299
+ placeholder?: string;
300
+ searchPlaceholder?: string;
301
+ };
297
302
  isLoading?: boolean;
298
303
  helperText?: string;
299
- placeholder?: string;
300
- searchPlaceholder?: string;
301
304
  popoverClassName?: string;
302
305
  /** This the same value as the one with the key valueKey */
303
306
  defaultValue?: string;
package/dist/index.d.ts CHANGED
@@ -294,10 +294,13 @@ type ComboboxTypes<T> = {
294
294
  data: T[];
295
295
  width?: string;
296
296
  label?: string;
297
+ texts: {
298
+ noItems?: string;
299
+ placeholder?: string;
300
+ searchPlaceholder?: string;
301
+ };
297
302
  isLoading?: boolean;
298
303
  helperText?: string;
299
- placeholder?: string;
300
- searchPlaceholder?: string;
301
304
  popoverClassName?: string;
302
305
  /** This the same value as the one with the key valueKey */
303
306
  defaultValue?: string;
package/dist/index.js CHANGED
@@ -4329,6 +4329,7 @@ var Combobox = function(_param) {
4329
4329
  "popoverClassName",
4330
4330
  "data"
4331
4331
  ]);
4332
+ var _props_texts, _props_texts1, _props_texts2;
4332
4333
  var _React28_useState = _sliced_to_array(React28.useState(false), 2), open = _React28_useState[0], setOpen = _React28_useState[1];
4333
4334
  var _React28_useState1 = _sliced_to_array(React28.useState(defaultValue), 2), value = _React28_useState1[0], setValue = _React28_useState1[1];
4334
4335
  var handleOpenChange = function(open2) {
@@ -4357,7 +4358,7 @@ var Combobox = function(_param) {
4357
4358
  className: cn("hawa-text-primary hawa-border hawa-h-10 hawa-py-2 hawa-justify-between hawa-w-full hawa-font-normal hawa-inline-flex hawa-items-center hawa-transition-all hawa-select-none hawa-rounded-md hawa-text-sm hawa-ring-offset-background focus-visible:hawa-outline-none focus-visible:hawa-ring-2 focus-visible:hawa-ring-ring focus-visible:hawa-ring-offset-2 disabled:hawa-pointer-events-none disabled:hawa-opacity-50", props.preview ? "hawa-px-0 hawa-rounded-none hawa-border-transparent hawa-cursor-default" : "hawa-px-3 hawa-bg-background ")
4358
4359
  }, value ? getProperty(data.find(function(item) {
4359
4360
  return item[valueKey] === value;
4360
- }) || {}, labelKey) : props.placeholder || "...", /* @__PURE__ */ React28.createElement("svg", {
4361
+ }) || {}, labelKey) : ((_props_texts = props.texts) === null || _props_texts === void 0 ? void 0 : _props_texts.placeholder) || "...", /* @__PURE__ */ React28.createElement("svg", {
4361
4362
  xmlns: "http://www.w3.org/2000/svg",
4362
4363
  className: cn("hawa-icon hawa-transition-all", !props.preview ? "hawa-opacity-100 hawa-visible" : "hawa-opacity-0 hawa-invisible"),
4363
4364
  "aria-label": "Chevron down icon",
@@ -4374,8 +4375,8 @@ var Combobox = function(_param) {
4374
4375
  }, props.helperText))), /* @__PURE__ */ React28.createElement(PopoverContent, {
4375
4376
  className: cn("popover-w-parent", props.helperText && "-hawa-mt-4")
4376
4377
  }, /* @__PURE__ */ React28.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React28.createElement(CommandInput, {
4377
- placeholder: props.searchPlaceholder
4378
- }), /* @__PURE__ */ React28.createElement(CommandEmpty, null, "No framework found."), /* @__PURE__ */ React28.createElement(CommandGroup, {
4378
+ placeholder: (_props_texts1 = props.texts) === null || _props_texts1 === void 0 ? void 0 : _props_texts1.searchPlaceholder
4379
+ }), /* @__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, {
4379
4380
  className: " hawa-max-h-[200px] hawa-overflow-y-auto"
4380
4381
  }, data.map(function(item) {
4381
4382
  return /* @__PURE__ */ React28.createElement(CommandItem, {
@@ -4990,7 +4991,9 @@ var Alert = function(_param) {
4990
4991
  "aria-label": "Close",
4991
4992
  className: cn("hawa-absolute hawa-top-2 hawa-inline-flex hawa-h-9 hawa-w-9 hawa-items-center hawa-justify-center hawa-rounded-inner hawa-p-1.5 hawa-transition-all hover:hawa-text-gray-900", closeButtonStyle[severity], direction === "rtl" ? "hawa-left-2" : "hawa-right-2"),
4992
4993
  onClick: function() {
4993
- props.onAlertClosed();
4994
+ if (props.onAlertClosed) {
4995
+ props.onAlertClosed();
4996
+ }
4994
4997
  setClosed(true);
4995
4998
  setTimeout(function() {
4996
4999
  if (alertRef === null || alertRef === void 0 ? void 0 : alertRef.current) {
@@ -7366,7 +7369,7 @@ var AppLayout = function(_param) {
7366
7369
  d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
7367
7370
  clipRule: "evenodd"
7368
7371
  })))) : null)), /* @__PURE__ */ import_react37.default.createElement("div", {
7369
- className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all",
7372
+ className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all -hawa-z-10",
7370
7373
  style: isRTL ? {
7371
7374
  height: "calc(100% - ".concat(props.topBar ? "56" : "0", "px)"),
7372
7375
  width: "calc(100% - ".concat(drawerSizeCondition, "px)"),
package/dist/index.mjs CHANGED
@@ -3844,7 +3844,7 @@ var Combobox = ({
3844
3844
  value ? getProperty(
3845
3845
  data.find((item) => item[valueKey] === value) || {},
3846
3846
  labelKey
3847
- ) : props.placeholder || "...",
3847
+ ) : props.texts?.placeholder || "...",
3848
3848
  /* @__PURE__ */ React28.createElement(
3849
3849
  "svg",
3850
3850
  {
@@ -3877,7 +3877,7 @@ var Combobox = ({
3877
3877
  {
3878
3878
  className: cn("popover-w-parent", props.helperText && "-hawa-mt-4")
3879
3879
  },
3880
- /* @__PURE__ */ React28.createElement(Command, null, !props.hideInput && /* @__PURE__ */ React28.createElement(CommandInput, { placeholder: props.searchPlaceholder }), /* @__PURE__ */ React28.createElement(CommandEmpty, null, "No framework found."), /* @__PURE__ */ React28.createElement(CommandGroup, { className: " hawa-max-h-[200px] hawa-overflow-y-auto" }, data.map((item) => /* @__PURE__ */ React28.createElement(
3880
+ /* @__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(
3881
3881
  CommandItem,
3882
3882
  {
3883
3883
  key: getProperty(item, valueKey),
@@ -4596,7 +4596,9 @@ var Alert = ({
4596
4596
  direction === "rtl" ? "hawa-left-2" : "hawa-right-2"
4597
4597
  ),
4598
4598
  onClick: () => {
4599
- props.onAlertClosed();
4599
+ if (props.onAlertClosed) {
4600
+ props.onAlertClosed();
4601
+ }
4600
4602
  setClosed(true);
4601
4603
  setTimeout(() => {
4602
4604
  if (alertRef?.current) {
@@ -7289,7 +7291,7 @@ var AppLayout = ({
7289
7291
  ), /* @__PURE__ */ React63.createElement(
7290
7292
  "div",
7291
7293
  {
7292
- className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all",
7294
+ className: "hawa-fixed hawa-overflow-y-auto hawa-transition-all -hawa-z-10",
7293
7295
  style: isRTL ? {
7294
7296
  height: `calc(100% - ${props.topBar ? "56" : "0"}px)`,
7295
7297
  width: `calc(100% - ${drawerSizeCondition}px)`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.15.4-next",
3
+ "version": "0.15.6-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {