@sikka/hawa 0.10.6-next → 0.10.8-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
@@ -412,11 +412,14 @@ video {
412
412
  --error-foreground: 0 0% 98%;
413
413
  --border: 240 5.9% 90%;
414
414
  --input: 240 5.9% 90%;
415
+ --helper-text: 0 72% 51%;
415
416
  --ring: 240 5% 64.9%;
416
417
  --radius: 0.5rem;
417
418
  --radius-inner: calc(var(--radius) - calc(var(--radius) / 3));
418
419
  }
419
420
  .dark {
421
+ --helper-text: 0 84% 60%;
422
+ /* --helper-text: 61 97% 45%; */
420
423
  --background: 240 10% 3.9%;
421
424
  --foreground: 0 0% 98%;
422
425
  --card: 0 0% 2%;
@@ -660,16 +663,6 @@ input[type="number"]::-webkit-inner-spin-button,
660
663
  height: 1rem;
661
664
  width: 1rem;
662
665
  }
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
- }
673
666
  .ddm-w-parent {
674
667
  width: var(--radix-dropdown-menu-trigger-width);
675
668
  }
@@ -883,6 +876,10 @@ input[type="number"]::-webkit-inner-spin-button,
883
876
  margin-left: 1rem;
884
877
  margin-right: 1rem;
885
878
  }
879
+ .hawa-my-0 {
880
+ margin-top: 0px;
881
+ margin-bottom: 0px;
882
+ }
886
883
  .hawa-my-1 {
887
884
  margin-top: 0.25rem;
888
885
  margin-bottom: 0.25rem;
@@ -2362,6 +2359,9 @@ input[type="number"]::-webkit-inner-spin-button,
2362
2359
  --tw-text-opacity: 1;
2363
2360
  color: rgb(21 128 61 / var(--tw-text-opacity));
2364
2361
  }
2362
+ .hawa-text-helper-color {
2363
+ color: hsl(var(--helper-text));
2364
+ }
2365
2365
  .hawa-text-info-foreground {
2366
2366
  --tw-text-opacity: 1;
2367
2367
  color: hsl(var(--info-foreground) / var(--tw-text-opacity));
@@ -2412,10 +2412,6 @@ input[type="number"]::-webkit-inner-spin-button,
2412
2412
  --tw-text-opacity: 1;
2413
2413
  color: rgb(239 68 68 / var(--tw-text-opacity));
2414
2414
  }
2415
- .hawa-text-red-600 {
2416
- --tw-text-opacity: 1;
2417
- color: rgb(220 38 38 / var(--tw-text-opacity));
2418
- }
2419
2415
  .hawa-text-red-700 {
2420
2416
  --tw-text-opacity: 1;
2421
2417
  color: rgb(185 28 28 / var(--tw-text-opacity));
@@ -3391,10 +3387,6 @@ body {
3391
3387
  :is([data-mode="dark"] .dark\:hawa-text-muted-foreground) {
3392
3388
  color: hsl(var(--muted-foreground));
3393
3389
  }
3394
- :is([data-mode="dark"] .dark\:hawa-text-red-500) {
3395
- --tw-text-opacity: 1;
3396
- color: rgb(239 68 68 / var(--tw-text-opacity));
3397
- }
3398
3390
  :is([data-mode="dark"] .dark\:hawa-text-red-800) {
3399
3391
  --tw-text-opacity: 1;
3400
3392
  color: rgb(153 27 27 / var(--tw-text-opacity));
@@ -3452,9 +3444,26 @@ body {
3452
3444
  max-width: 100%;
3453
3445
  }
3454
3446
 
3447
+ .xs\:hawa-flex-row {
3448
+ flex-direction: row;
3449
+ }
3450
+
3455
3451
  .xs\:hawa-flex-nowrap {
3456
3452
  flex-wrap: nowrap;
3457
3453
  }
3454
+
3455
+ .xs\:hawa-p-6 {
3456
+ padding: 1.5rem;
3457
+ }
3458
+
3459
+ .xs\:hawa-px-2 {
3460
+ padding-left: 0.5rem;
3461
+ padding-right: 0.5rem;
3462
+ }
3463
+
3464
+ .xs\:hawa-pb-2 {
3465
+ padding-bottom: 0.5rem;
3466
+ }
3458
3467
  }
3459
3468
  @media (min-width: 640px) {
3460
3469
 
package/dist/index.js CHANGED
@@ -1396,7 +1396,7 @@ var ItemCard = function(_param) {
1396
1396
  "cardImage",
1397
1397
  "orientation"
1398
1398
  ]);
1399
- var defaultStyle = "hawa-block hawa-rounded hawa-border hawa-border-gray-200 hawa-bg-white hawa-shadow-sm hover:hawa-shadow-lg hawa-transition-all dark:hawa-border-gray-700 dark:hawa-bg-gray-800 ";
1399
+ var defaultStyle = "hawa-block hawa-rounded hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm hawa-transition-all";
1400
1400
  var orientationStyles = {
1401
1401
  vertical: "hawa-max-w-sm",
1402
1402
  horizontal: "hawa-flex hawa-flex-row hawa-w-full"
@@ -1422,7 +1422,7 @@ var ItemCard = function(_param) {
1422
1422
  openActionHeader
1423
1423
  ]);
1424
1424
  return /* @__PURE__ */ import_react6.default.createElement("div", _object_spread({
1425
- className: (0, import_clsx5.default)(defaultStyle, orientationStyles[orientation]),
1425
+ className: (0, import_clsx5.default)(defaultStyle, props.onCardClick && " hover:hawa-shadow-lg hawa-cursor-pointer", orientationStyles[orientation]),
1426
1426
  onClick: function(e) {
1427
1427
  e.stopPropagation();
1428
1428
  if (props.onCardClick) {
@@ -1441,30 +1441,33 @@ var ItemCard = function(_param) {
1441
1441
  onClick: clickableImageAction,
1442
1442
  className: "hawa-flex hawa-flex-row hawa-gap-2"
1443
1443
  }, clickableImageActionIcon, clickableImageActionText))), /* @__PURE__ */ import_react6.default.createElement("div", {
1444
- className: "hawa-relative hawa-w-full hawa-p-6"
1444
+ className: "hawa-relative hawa-w-full hawa-p-4 xs:hawa-p-6 xs:hawa-pb-2 xs:hawa-px-2"
1445
1445
  }, headerActions && /* @__PURE__ */ import_react6.default.createElement("div", {
1446
- className: "hawa-max-h- hawa-bg-red hawa-absolute hawa-right-0 hawa-top-0 hawa-flex hawa-justify-end hawa-pr-3 hawa-pt-3"
1446
+ className: "hawa-absolute hawa-right-0 hawa-top-0 hawa-flex hawa-justify-end hawa-pr-3 hawa-pt-3"
1447
1447
  }, /* @__PURE__ */ import_react6.default.createElement(DropdownMenu, {
1448
1448
  items: headerActions,
1449
- trigger: /* @__PURE__ */ import_react6.default.createElement("div", {
1450
- className: (0, import_clsx5.default)(headerActionsButtonStyle),
1449
+ trigger: /* @__PURE__ */ import_react6.default.createElement(Button, {
1450
+ variant: "ghost",
1451
+ size: "smallIcon",
1451
1452
  onClick: handleOpenActionHeader
1452
1453
  }, /* @__PURE__ */ import_react6.default.createElement("span", {
1453
1454
  className: "hawa-sr-only"
1454
1455
  }, "Open dropdown"), /* @__PURE__ */ import_react6.default.createElement("svg", {
1455
- className: "hawa-h-6 hawa-w-6",
1456
+ className: "hawa-h-5 hawa-w-5",
1456
1457
  "aria-hidden": "true",
1457
1458
  fill: "currentColor",
1458
1459
  viewBox: "0 0 20 20"
1459
1460
  }, /* @__PURE__ */ import_react6.default.createElement("path", {
1460
1461
  d: "M10 6a2 2 0 110-4 2 2 0 010 4zM10 12a2 2 0 110-4 2 2 0 010 4zM10 18a2 2 0 110-4 2 2 0 010 4z"
1461
1462
  })))
1462
- })), header && /* @__PURE__ */ import_react6.default.createElement("h5", {
1463
- className: "hawa-mb-2 hawa-text-2xl hawa-font-bold hawa-tracking-tight hawa-text-gray-900 dark:hawa-text-white"
1463
+ })), /* @__PURE__ */ import_react6.default.createElement("div", {
1464
+ className: " hawa-mx-2"
1465
+ }, header && /* @__PURE__ */ import_react6.default.createElement("h5", {
1466
+ className: "hawa-mb-2 hawa-text-2xl hawa-font-bold hawa-tracking-tight "
1464
1467
  }, header), content && /* @__PURE__ */ import_react6.default.createElement("span", {
1465
- className: "hawa-w-full hawa-font-normal hawa-text-gray-700 dark:hawa-text-gray-400"
1466
- }, content), actions || counts ? /* @__PURE__ */ import_react6.default.createElement("div", {
1467
- className: (0, import_clsx5.default)("hawa-mt-3 hawa-flex hawa-items-center hawa-rounded-b-lg dark:hawa-text-white ", actions && counts ? "hawa-justify-between" : "hawa-justify-end")
1468
+ className: "hawa-w-full hawa-font-normal "
1469
+ }, content)), actions || counts ? /* @__PURE__ */ import_react6.default.createElement("div", {
1470
+ className: (0, import_clsx5.default)("hawa-mt-3 hawa-flex hawa-flex-col xs:hawa-flex-row hawa-items-center hawa-rounded-b-lg dark:hawa-text-white ", actions && counts ? "hawa-justify-between" : "hawa-justify-end")
1468
1471
  }, counts, /* @__PURE__ */ import_react6.default.createElement(StopPropagationWrapper, null, actions)) : null));
1469
1472
  };
1470
1473
  // components/elements/cards/LandingCard.tsx
@@ -1815,7 +1818,7 @@ var Checkbox = function(_param) {
1815
1818
  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")
1816
1819
  }, sublabel), helperText && !checkboxProps.disabled && /* @__PURE__ */ React15.createElement("label", {
1817
1820
  htmlFor: id,
1818
- className: cn("hawa-select-none helper-text", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-opacity-70")
1821
+ className: cn("hawa-select-none hawa-text-xs hawa-text-helper-color", checkboxProps.disabled && "hawa-cursor-not-allowed hawa-opacity-70")
1819
1822
  }, helperText)));
1820
1823
  };
1821
1824
  var CheckboxElement = React15.forwardRef(function(_param, ref) /* @__PURE__ */ {
@@ -2486,7 +2489,7 @@ var Textarea = React26.forwardRef(function(_param, ref) {
2486
2489
  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),
2487
2490
  ref: ref
2488
2491
  }, props)), props.helperText && /* @__PURE__ */ React26.createElement("p", {
2489
- className: "helper-text"
2492
+ className: "hawa-text-xs hawa-text-helper-color"
2490
2493
  }, props.helperText));
2491
2494
  });
2492
2495
  Textarea.displayName = "Textarea";
@@ -2617,7 +2620,7 @@ var PinInput = function(_param) {
2617
2620
  }
2618
2621
  }, props));
2619
2622
  })), props.helperText && /* @__PURE__ */ import_react18.default.createElement("p", {
2620
- className: "hawa-mb-0 hawa-mt-0 hawa-text-xs hawa-text-red-600 dark:hawa-text-red-500"
2623
+ className: "hawa-my-0 hawa-text-xs hawa-text-helper-color"
2621
2624
  }, props.helperText));
2622
2625
  };
2623
2626
  // components/elements/FileDropzone.tsx
@@ -4652,7 +4655,7 @@ var Select = function(_param) {
4652
4655
  return props.onInputChange(newValue, action);
4653
4656
  }
4654
4657
  }), props.helperText && /* @__PURE__ */ import_react20.default.createElement("p", {
4655
- className: "helper-text"
4658
+ className: "hawa-text-xs hawa-text-helper-color"
4656
4659
  }, props.helperText));
4657
4660
  };
4658
4661
  // components/elements/PhoneInput.tsx
@@ -4702,7 +4705,7 @@ var PhoneInput = function(props) {
4702
4705
  type: "tel",
4703
4706
  placeholder: "531045453"
4704
4707
  }))), props.helperText && /* @__PURE__ */ import_react21.default.createElement("p", {
4705
- className: "hawa-mt-0 hawa-text-xs hawa-text-red-600 dark:hawa-text-red-500"
4708
+ className: "hawa-my-0 hawa-text-xs hawa-text-helper-color"
4706
4709
  }, props.helperText));
4707
4710
  };
4708
4711
  {}// components/elements/AppStores.tsx
@@ -4955,7 +4958,7 @@ var Input = function(_param) {
4955
4958
  })), props.iconInside && /* @__PURE__ */ import_react24.default.createElement("div", {
4956
4959
  className: "hawa-absolute hawa-right-1 hawa-top-[41px] hawa--translate-y-1/2"
4957
4960
  }, props.iconInside), props.helperText && /* @__PURE__ */ import_react24.default.createElement("p", {
4958
- className: "hawa-mb-0 hawa-mt-0 hawa-text-xs hawa-text-red-600 dark:hawa-text-red-500"
4961
+ className: "hawa-my-0 hawa-text-xs hawa-text-helper-color"
4959
4962
  }, props.helperText))));
4960
4963
  };
4961
4964
  // components/elements/DataTable.tsx
@@ -6055,7 +6058,7 @@ var Combobox = function(_param) {
6055
6058
  points: "20 6 9 17 4 12"
6056
6059
  })), getProperty(item, labelKey));
6057
6060
  }))))), props.helperText && /* @__PURE__ */ React47.createElement("p", {
6058
- className: "helper-text"
6061
+ className: "hawa-text-xs hawa-text-helper-color"
6059
6062
  }, props.helperText));
6060
6063
  };
6061
6064
  // components/elements/Count.tsx
package/dist/index.mjs CHANGED
@@ -742,7 +742,7 @@ var ItemCard = ({
742
742
  orientation = "vertical",
743
743
  ...props
744
744
  }) => {
745
- let defaultStyle = "hawa-block hawa-rounded hawa-border hawa-border-gray-200 hawa-bg-white hawa-shadow-sm hover:hawa-shadow-lg hawa-transition-all dark:hawa-border-gray-700 dark:hawa-bg-gray-800 ";
745
+ let defaultStyle = "hawa-block hawa-rounded hawa-border hawa-bg-card hawa-text-card-foreground hawa-shadow-sm hawa-transition-all";
746
746
  let orientationStyles = {
747
747
  vertical: "hawa-max-w-sm",
748
748
  horizontal: "hawa-flex hawa-flex-row hawa-w-full"
@@ -772,7 +772,11 @@ var ItemCard = ({
772
772
  return /* @__PURE__ */ React9.createElement(
773
773
  "div",
774
774
  {
775
- className: clsx5(defaultStyle, orientationStyles[orientation]),
775
+ className: clsx5(
776
+ defaultStyle,
777
+ props.onCardClick && " hover:hawa-shadow-lg hawa-cursor-pointer",
778
+ orientationStyles[orientation]
779
+ ),
776
780
  onClick: (e) => {
777
781
  e.stopPropagation();
778
782
  if (props.onCardClick) {
@@ -800,21 +804,22 @@ var ItemCard = ({
800
804
  clickableImageActionIcon,
801
805
  clickableImageActionText
802
806
  ))),
803
- /* @__PURE__ */ React9.createElement("div", { className: "hawa-relative hawa-w-full hawa-p-6" }, headerActions && /* @__PURE__ */ React9.createElement("div", { className: "hawa-max-h- hawa-bg-red hawa-absolute hawa-right-0 hawa-top-0 hawa-flex hawa-justify-end hawa-pr-3 hawa-pt-3" }, /* @__PURE__ */ React9.createElement(
807
+ /* @__PURE__ */ React9.createElement("div", { className: "hawa-relative hawa-w-full hawa-p-4 xs:hawa-p-6 xs:hawa-pb-2 xs:hawa-px-2" }, headerActions && /* @__PURE__ */ React9.createElement("div", { className: "hawa-absolute hawa-right-0 hawa-top-0 hawa-flex hawa-justify-end hawa-pr-3 hawa-pt-3" }, /* @__PURE__ */ React9.createElement(
804
808
  DropdownMenu,
805
809
  {
806
810
  items: headerActions,
807
811
  trigger: /* @__PURE__ */ React9.createElement(
808
- "div",
812
+ Button,
809
813
  {
810
- className: clsx5(headerActionsButtonStyle),
814
+ variant: "ghost",
815
+ size: "smallIcon",
811
816
  onClick: handleOpenActionHeader
812
817
  },
813
818
  /* @__PURE__ */ React9.createElement("span", { className: "hawa-sr-only" }, "Open dropdown"),
814
819
  /* @__PURE__ */ React9.createElement(
815
820
  "svg",
816
821
  {
817
- className: "hawa-h-6 hawa-w-6",
822
+ className: "hawa-h-5 hawa-w-5",
818
823
  "aria-hidden": "true",
819
824
  fill: "currentColor",
820
825
  viewBox: "0 0 20 20"
@@ -823,11 +828,11 @@ var ItemCard = ({
823
828
  )
824
829
  )
825
830
  }
826
- )), header && /* @__PURE__ */ React9.createElement("h5", { className: "hawa-mb-2 hawa-text-2xl hawa-font-bold hawa-tracking-tight hawa-text-gray-900 dark:hawa-text-white" }, header), content && /* @__PURE__ */ React9.createElement("span", { className: "hawa-w-full hawa-font-normal hawa-text-gray-700 dark:hawa-text-gray-400" }, content), actions || counts ? /* @__PURE__ */ React9.createElement(
831
+ )), /* @__PURE__ */ React9.createElement("div", { className: " hawa-mx-2" }, header && /* @__PURE__ */ React9.createElement("h5", { className: "hawa-mb-2 hawa-text-2xl hawa-font-bold hawa-tracking-tight " }, header), content && /* @__PURE__ */ React9.createElement("span", { className: "hawa-w-full hawa-font-normal " }, content)), actions || counts ? /* @__PURE__ */ React9.createElement(
827
832
  "div",
828
833
  {
829
834
  className: clsx5(
830
- "hawa-mt-3 hawa-flex hawa-items-center hawa-rounded-b-lg dark:hawa-text-white ",
835
+ "hawa-mt-3 hawa-flex hawa-flex-col xs:hawa-flex-row hawa-items-center hawa-rounded-b-lg dark:hawa-text-white ",
831
836
  actions && counts ? "hawa-justify-between" : "hawa-justify-end"
832
837
  )
833
838
  },
@@ -1240,7 +1245,7 @@ var Checkbox = ({
1240
1245
  {
1241
1246
  htmlFor: id,
1242
1247
  className: cn(
1243
- "hawa-select-none helper-text",
1248
+ "hawa-select-none hawa-text-xs hawa-text-helper-color",
1244
1249
  checkboxProps.disabled && "hawa-cursor-not-allowed hawa-opacity-70"
1245
1250
  )
1246
1251
  },
@@ -2045,7 +2050,7 @@ var Textarea = React26.forwardRef(
2045
2050
  ref,
2046
2051
  ...props
2047
2052
  }
2048
- ), props.helperText && /* @__PURE__ */ React26.createElement("p", { className: "helper-text" }, props.helperText));
2053
+ ), props.helperText && /* @__PURE__ */ React26.createElement("p", { className: "hawa-text-xs hawa-text-helper-color" }, props.helperText));
2049
2054
  }
2050
2055
  );
2051
2056
  Textarea.displayName = "Textarea";
@@ -2200,7 +2205,7 @@ var PinInput = ({
2200
2205
  ...props
2201
2206
  }
2202
2207
  ))
2203
- ), props.helperText && /* @__PURE__ */ React29.createElement("p", { className: "hawa-mb-0 hawa-mt-0 hawa-text-xs hawa-text-red-600 dark:hawa-text-red-500" }, props.helperText));
2208
+ ), props.helperText && /* @__PURE__ */ React29.createElement("p", { className: "hawa-my-0 hawa-text-xs hawa-text-helper-color" }, props.helperText));
2204
2209
  };
2205
2210
 
2206
2211
  // components/elements/FileDropzone.tsx
@@ -4252,7 +4257,7 @@ var Select = ({ labelKey = "label", ...props }) => {
4252
4257
  onInputChange: (newValue, action) => props.onInputChange(newValue, action)
4253
4258
  }
4254
4259
  ),
4255
- props.helperText && /* @__PURE__ */ React31.createElement("p", { className: "helper-text" }, props.helperText)
4260
+ props.helperText && /* @__PURE__ */ React31.createElement("p", { className: "hawa-text-xs hawa-text-helper-color" }, props.helperText)
4256
4261
  );
4257
4262
  };
4258
4263
 
@@ -4302,7 +4307,7 @@ var PhoneInput = (props) => {
4302
4307
  type: "tel",
4303
4308
  placeholder: "531045453"
4304
4309
  }
4305
- ))), props.helperText && /* @__PURE__ */ React32.createElement("p", { className: "hawa-mt-0 hawa-text-xs hawa-text-red-600 dark:hawa-text-red-500" }, props.helperText));
4310
+ ))), props.helperText && /* @__PURE__ */ React32.createElement("p", { className: "hawa-my-0 hawa-text-xs hawa-text-helper-color" }, props.helperText));
4306
4311
  };
4307
4312
  {
4308
4313
  }
@@ -4595,7 +4600,7 @@ var Input = ({
4595
4600
  disabled: preview,
4596
4601
  style: { height: 40 }
4597
4602
  }
4598
- )), props.iconInside && /* @__PURE__ */ React36.createElement("div", { className: "hawa-absolute hawa-right-1 hawa-top-[41px] hawa--translate-y-1/2" }, props.iconInside), props.helperText && /* @__PURE__ */ React36.createElement("p", { className: "hawa-mb-0 hawa-mt-0 hawa-text-xs hawa-text-red-600 dark:hawa-text-red-500" }, props.helperText)))
4603
+ )), props.iconInside && /* @__PURE__ */ React36.createElement("div", { className: "hawa-absolute hawa-right-1 hawa-top-[41px] hawa--translate-y-1/2" }, props.iconInside), props.helperText && /* @__PURE__ */ React36.createElement("p", { className: "hawa-my-0 hawa-text-xs hawa-text-helper-color" }, props.helperText)))
4599
4604
  );
4600
4605
  };
4601
4606
 
@@ -5751,7 +5756,7 @@ var Combobox = ({
5751
5756
  ),
5752
5757
  getProperty(item, labelKey)
5753
5758
  )))))),
5754
- props.helperText && /* @__PURE__ */ React47.createElement("p", { className: "helper-text" }, props.helperText)
5759
+ props.helperText && /* @__PURE__ */ React47.createElement("p", { className: "hawa-text-xs hawa-text-helper-color" }, props.helperText)
5755
5760
  );
5756
5761
  };
5757
5762
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.10.6-next",
3
+ "version": "0.10.8-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {