@sikka/hawa 0.15.1-next → 0.15.2-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
@@ -876,6 +876,10 @@ input[type="number"]::-webkit-inner-spin-button,
876
876
  margin-left: 0.5rem;
877
877
  margin-right: 0.5rem;
878
878
  }
879
+ .hawa-mx-2\.5 {
880
+ margin-left: 0.625rem;
881
+ margin-right: 0.625rem;
882
+ }
879
883
  .hawa-mx-4 {
880
884
  margin-left: 1rem;
881
885
  margin-right: 1rem;
@@ -2575,6 +2579,9 @@ input[type="number"]::-webkit-inner-spin-button,
2575
2579
  --tw-text-opacity: 1;
2576
2580
  color: rgb(202 138 4 / var(--tw-text-opacity));
2577
2581
  }
2582
+ .hawa-line-through {
2583
+ text-decoration-line: line-through;
2584
+ }
2578
2585
  .hawa-underline-offset-4 {
2579
2586
  text-underline-offset: 4px;
2580
2587
  }
package/dist/index.d.mts CHANGED
@@ -53,9 +53,11 @@ type PricingCardTypes = {
53
53
  direction?: DirectionType;
54
54
  features: {
55
55
  included: boolean;
56
+ soon?: boolean;
56
57
  text: string;
57
58
  }[];
58
59
  price: number;
60
+ discount?: string;
59
61
  texts: {
60
62
  title: string;
61
63
  subtitle: string;
@@ -514,6 +516,7 @@ type AlertTypes = {
514
516
  persistent?: boolean;
515
517
  icon?: any;
516
518
  className?: any;
519
+ onAlertClosed?: any;
517
520
  };
518
521
  declare const Alert: React__default.FunctionComponent<AlertTypes>;
519
522
 
package/dist/index.d.ts CHANGED
@@ -53,9 +53,11 @@ type PricingCardTypes = {
53
53
  direction?: DirectionType;
54
54
  features: {
55
55
  included: boolean;
56
+ soon?: boolean;
56
57
  text: string;
57
58
  }[];
58
59
  price: number;
60
+ discount?: string;
59
61
  texts: {
60
62
  title: string;
61
63
  subtitle: string;
@@ -514,6 +516,7 @@ type AlertTypes = {
514
516
  persistent?: boolean;
515
517
  icon?: any;
516
518
  className?: any;
519
+ onAlertClosed?: any;
517
520
  };
518
521
  declare const Alert: React__default.FunctionComponent<AlertTypes>;
519
522
 
package/dist/index.js CHANGED
@@ -1005,7 +1005,6 @@ var AdCard = function(_param) {
1005
1005
  }, "Hide")));
1006
1006
  };
1007
1007
  // components/elements/cards/PricingCard.tsx
1008
- var import_clsx2 = __toESM(require("clsx"));
1009
1008
  var import_react4 = __toESM(require("react"));
1010
1009
  // components/elements/Button.tsx
1011
1010
  var React5 = __toESM(require("react"));
@@ -1200,8 +1199,12 @@ var PricingCard = function(_param) {
1200
1199
  };
1201
1200
  return /* @__PURE__ */ import_react4.default.createElement(Card, {
1202
1201
  dir: direction,
1203
- className: (0, import_clsx2.default)(currentPlan ? "hawa-border-primary dark:hawa-border-primary/70 hawa-border-2 " : "hawa-border", cardSizes[size], "hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 ")
1204
- }, /* @__PURE__ */ import_react4.default.createElement("h5", {
1202
+ className: cn(currentPlan ? "hawa-border-primary dark:hawa-border-primary/70 hawa-border-2 " : "hawa-border", cardSizes[size], "hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 ")
1203
+ }, props.discount && /* @__PURE__ */ import_react4.default.createElement(Chip, {
1204
+ label: props.discount,
1205
+ size: "large",
1206
+ color: "hyper"
1207
+ }), " ", /* @__PURE__ */ import_react4.default.createElement("h5", {
1205
1208
  className: "hawa-text-md 0 hawa-font-bold hawa-text-primary/70"
1206
1209
  }, props.texts.title), /* @__PURE__ */ import_react4.default.createElement("div", {
1207
1210
  className: " hawa-text-primary hawa-flex hawa-items-baseline"
@@ -1219,8 +1222,8 @@ var PricingCard = function(_param) {
1219
1222
  }, (_props_features = props.features) === null || _props_features === void 0 ? void 0 : _props_features.map(function(feature, o) {
1220
1223
  return /* @__PURE__ */ import_react4.default.createElement("li", {
1221
1224
  key: o,
1222
- className: "hawa-flex"
1223
- }, /* @__PURE__ */ import_react4.default.createElement("svg", {
1225
+ className: cn("hawa-flex", !feature.included && "hawa-line-through")
1226
+ }, feature.included ? /* @__PURE__ */ import_react4.default.createElement("svg", {
1224
1227
  "aria-label": "Check Icon",
1225
1228
  "aria-hidden": "true",
1226
1229
  className: "hawa-m-2 hawa-h-5 hawa-w-5 hawa-flex-shrink-0 hawa-text-primary",
@@ -1230,9 +1233,15 @@ var PricingCard = function(_param) {
1230
1233
  fillRule: "evenodd",
1231
1234
  d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
1232
1235
  clipRule: "evenodd"
1233
- })), /* @__PURE__ */ import_react4.default.createElement("span", {
1234
- className: "hawa-flex hawa-items-center hawa-text-center hawa-font-normal hawa-leading-tight hawa-text-primary/70 "
1235
- }, feature.text));
1236
+ })) : /* @__PURE__ */ import_react4.default.createElement("div", {
1237
+ className: "hawa-w-4 hawa-h-4 hawa-rounded-full hawa-bg-primary/10 hawa-m-2 hawa-mx-2.5"
1238
+ }), /* @__PURE__ */ import_react4.default.createElement("span", {
1239
+ className: "hawa-flex hawa-items-center hawa-flex-row hawa-gap-2 hawa-text-center hawa-font-normal hawa-leading-tight hawa-text-primary/70 "
1240
+ }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ import_react4.default.createElement(Chip, {
1241
+ label: "soon",
1242
+ color: "oceanic",
1243
+ size: "small"
1244
+ })));
1236
1245
  })), /* @__PURE__ */ import_react4.default.createElement(Button, {
1237
1246
  onClick: props.onPlanClicked,
1238
1247
  disabled: currentPlan,
@@ -3365,7 +3374,7 @@ var countries = [
3365
3374
  ];
3366
3375
  var countries_default = countries;
3367
3376
  // components/elements/Select.tsx
3368
- var import_clsx3 = __toESM(require("clsx"));
3377
+ var import_clsx2 = __toESM(require("clsx"));
3369
3378
  var import_react11 = __toESM(require("react"));
3370
3379
  var import_react_select = __toESM(require("react-select"));
3371
3380
  var import_creatable = __toESM(require("react-select/creatable"));
@@ -3495,7 +3504,7 @@ var Select = function(_param) {
3495
3504
  var children = param.children, innerProps = param.innerProps, innerRef = param.innerRef;
3496
3505
  return /* @__PURE__ */ import_react11.default.createElement("div", _object_spread({
3497
3506
  ref: innerRef,
3498
- className: (0, import_clsx3.default)("hawa-text-sm hawa-flex hawa-p-2 hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-text-gray-900 focus:hawa-border-blue-500 focus:hawa-ring-blue-500 dark:focus:hawa-ring-blue-500")
3507
+ className: (0, import_clsx2.default)("hawa-text-sm hawa-flex hawa-p-2 hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-text-gray-900 focus:hawa-border-blue-500 focus:hawa-ring-blue-500 dark:focus:hawa-ring-blue-500")
3499
3508
  }, innerProps), children);
3500
3509
  };
3501
3510
  var Option = function(param) {
@@ -4977,6 +4986,7 @@ var Alert = function(_param) {
4977
4986
  "aria-label": "Close",
4978
4987
  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"),
4979
4988
  onClick: function() {
4989
+ props.onAlertClosed();
4980
4990
  setClosed(true);
4981
4991
  setTimeout(function() {
4982
4992
  if (alertRef === null || alertRef === void 0 ? void 0 : alertRef.current) {
@@ -5047,7 +5057,7 @@ var DestroyableCard = function(_param) {
5047
5057
  // components/elements/FileDropzone.tsx
5048
5058
  var import_react23 = __toESM(require("react"));
5049
5059
  var import_react_dropzone = require("react-dropzone");
5050
- var import_clsx4 = __toESM(require("clsx"));
5060
+ var import_clsx3 = __toESM(require("clsx"));
5051
5061
  var FileDropzone = function(param) {
5052
5062
  var texts = param.texts, files = param.files, setFiles = param.setFiles, setDeletedFiles = param.setDeletedFiles, onAcceptedFiles = param.onAcceptedFiles, errorMessages = param.errorMessages, maxFiles = param.maxFiles, accept = param.accept, showPreview = param.showPreview, onDeleteFile = param.onDeleteFile, onClearFiles = param.onClearFiles, disclaimer = param.disclaimer, maxSize = param.maxSize, label = param.label, termsLink = param.termsLink, privacyLink = param.privacyLink;
5053
5063
  var _fileRejections__errors_, _fileRejections_;
@@ -5189,7 +5199,7 @@ var FileDropzone = function(param) {
5189
5199
  return /* @__PURE__ */ import_react23.default.createElement("div", null, label && /* @__PURE__ */ import_react23.default.createElement("div", {
5190
5200
  className: "hawa-mb-2 hawa-block hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300"
5191
5201
  }, label), /* @__PURE__ */ import_react23.default.createElement("div", {
5192
- className: (0, import_clsx4.default)("hawa-flex hawa-flex-col hawa-justify-center hawa-rounded hawa-border hawa-border-dashed hawa-p-6 hawa-transition-all ", isDragActive ? "hawa-bg-muted" : "hawa-bg-muted/20 hover:hawa-bg-muted/50 ")
5202
+ className: (0, import_clsx3.default)("hawa-flex hawa-flex-col hawa-justify-center hawa-rounded hawa-border hawa-border-dashed hawa-p-6 hawa-transition-all ", isDragActive ? "hawa-bg-muted" : "hawa-bg-muted/20 hover:hawa-bg-muted/50 ")
5193
5203
  }, /* @__PURE__ */ import_react23.default.createElement("div", _object_spread({}, getRootProps({})), /* @__PURE__ */ import_react23.default.createElement("p", _object_spread({}, getInputProps())), /* @__PURE__ */ import_react23.default.createElement("div", {
5194
5204
  className: "hawa-flex hawa-flex-col hawa-items-center hawa-justify-center hawa-gap-2 hawa-pt-4 hawa-text-center"
5195
5205
  }, /* @__PURE__ */ import_react23.default.createElement("svg", {
package/dist/index.mjs CHANGED
@@ -116,7 +116,6 @@ var AdCard = ({ orientation, ...props }) => {
116
116
  };
117
117
 
118
118
  // components/elements/cards/PricingCard.tsx
119
- import clsx2 from "clsx";
120
119
  import React7 from "react";
121
120
 
122
121
  // components/elements/Button.tsx
@@ -366,34 +365,47 @@ var PricingCard = ({
366
365
  Card,
367
366
  {
368
367
  dir: direction,
369
- className: clsx2(
368
+ className: cn(
370
369
  currentPlan ? "hawa-border-primary dark:hawa-border-primary/70 hawa-border-2 " : "hawa-border",
371
370
  cardSizes[size],
372
371
  "hawa-flex hawa-flex-col hawa-gap-4 hawa-rounded hawa-p-4 "
373
372
  )
374
373
  },
374
+ props.discount && /* @__PURE__ */ React7.createElement(Chip, { label: props.discount, size: "large", color: "hyper" }),
375
+ " ",
375
376
  /* @__PURE__ */ React7.createElement("h5", { className: "hawa-text-md 0 hawa-font-bold hawa-text-primary/70" }, props.texts.title),
376
377
  /* @__PURE__ */ React7.createElement("div", { className: " hawa-text-primary hawa-flex hawa-items-baseline" }, /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, props.price), /* @__PURE__ */ React7.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, props.texts.currencyText)), /* @__PURE__ */ React7.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-primary/70" }, "/ ", props.texts.cycleText)),
377
378
  /* @__PURE__ */ React7.createElement("h5", { className: "hawa-text-sm hawa-font-normal hawa-text-primary/70" }, props.texts.subtitle),
378
379
  props.features && /* @__PURE__ */ React7.createElement("ul", { role: "list", className: "hawa-space-y-0 " }, props.features?.map((feature, o) => {
379
- return /* @__PURE__ */ React7.createElement("li", { key: o, className: "hawa-flex" }, /* @__PURE__ */ React7.createElement(
380
- "svg",
380
+ return /* @__PURE__ */ React7.createElement(
381
+ "li",
381
382
  {
382
- "aria-label": "Check Icon",
383
- "aria-hidden": "true",
384
- className: "hawa-m-2 hawa-h-5 hawa-w-5 hawa-flex-shrink-0 hawa-text-primary",
385
- fill: "currentColor",
386
- viewBox: "0 0 20 20"
383
+ key: o,
384
+ className: cn(
385
+ "hawa-flex",
386
+ !feature.included && "hawa-line-through"
387
+ )
387
388
  },
388
- /* @__PURE__ */ React7.createElement(
389
- "path",
389
+ feature.included ? /* @__PURE__ */ React7.createElement(
390
+ "svg",
390
391
  {
391
- fillRule: "evenodd",
392
- d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
393
- clipRule: "evenodd"
394
- }
395
- )
396
- ), /* @__PURE__ */ React7.createElement("span", { className: "hawa-flex hawa-items-center hawa-text-center hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text));
392
+ "aria-label": "Check Icon",
393
+ "aria-hidden": "true",
394
+ className: "hawa-m-2 hawa-h-5 hawa-w-5 hawa-flex-shrink-0 hawa-text-primary",
395
+ fill: "currentColor",
396
+ viewBox: "0 0 20 20"
397
+ },
398
+ /* @__PURE__ */ React7.createElement(
399
+ "path",
400
+ {
401
+ fillRule: "evenodd",
402
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
403
+ clipRule: "evenodd"
404
+ }
405
+ )
406
+ ) : /* @__PURE__ */ React7.createElement("div", { className: "hawa-w-4 hawa-h-4 hawa-rounded-full hawa-bg-primary/10 hawa-m-2 hawa-mx-2.5" }),
407
+ /* @__PURE__ */ React7.createElement("span", { className: "hawa-flex hawa-items-center hawa-flex-row hawa-gap-2 hawa-text-center hawa-font-normal hawa-leading-tight hawa-text-primary/70 " }, feature.text, " ", feature.soon && feature.included && /* @__PURE__ */ React7.createElement(Chip, { label: "soon", color: "oceanic", size: "small" }))
408
+ );
397
409
  })),
398
410
  /* @__PURE__ */ React7.createElement(
399
411
  Button,
@@ -2632,7 +2644,7 @@ var countries = [
2632
2644
  var countries_default = countries;
2633
2645
 
2634
2646
  // components/elements/Select.tsx
2635
- import clsx3 from "clsx";
2647
+ import clsx2 from "clsx";
2636
2648
  import React16 from "react";
2637
2649
  import ReactSelect from "react-select";
2638
2650
  import CreatableSelect from "react-select/creatable";
@@ -2750,7 +2762,7 @@ var Select = ({ labelKey = "label", ...props }) => {
2750
2762
  "div",
2751
2763
  {
2752
2764
  ref: innerRef,
2753
- className: clsx3(
2765
+ className: clsx2(
2754
2766
  "hawa-text-sm hawa-flex hawa-p-2 hawa-w-full hawa-rounded hawa-border hawa-bg-background hawa-text-gray-900 focus:hawa-border-blue-500 focus:hawa-ring-blue-500 dark:focus:hawa-ring-blue-500"
2755
2767
  ),
2756
2768
  ...innerProps
@@ -4576,6 +4588,7 @@ var Alert = ({
4576
4588
  direction === "rtl" ? "hawa-left-2" : "hawa-right-2"
4577
4589
  ),
4578
4590
  onClick: () => {
4591
+ props.onAlertClosed();
4579
4592
  setClosed(true);
4580
4593
  setTimeout(() => {
4581
4594
  if (alertRef?.current) {
@@ -4684,7 +4697,7 @@ var DestroyableCard = ({
4684
4697
  // components/elements/FileDropzone.tsx
4685
4698
  import React38, { useEffect as useEffect11, useState as useState15 } from "react";
4686
4699
  import { useDropzone } from "react-dropzone";
4687
- import clsx4 from "clsx";
4700
+ import clsx3 from "clsx";
4688
4701
  var FileDropzone = ({
4689
4702
  texts,
4690
4703
  files,
@@ -4853,7 +4866,7 @@ var FileDropzone = ({
4853
4866
  return /* @__PURE__ */ React38.createElement("div", null, label && /* @__PURE__ */ React38.createElement("div", { className: "hawa-mb-2 hawa-block hawa-text-sm hawa-font-medium hawa-text-gray-900 dark:hawa-text-gray-300" }, label), /* @__PURE__ */ React38.createElement(
4854
4867
  "div",
4855
4868
  {
4856
- className: clsx4(
4869
+ className: clsx3(
4857
4870
  "hawa-flex hawa-flex-col hawa-justify-center hawa-rounded hawa-border hawa-border-dashed hawa-p-6 hawa-transition-all ",
4858
4871
  isDragActive ? "hawa-bg-muted" : "hawa-bg-muted/20 hover:hawa-bg-muted/50 "
4859
4872
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.15.1-next",
3
+ "version": "0.15.2-next",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {