@sikka/hawa 0.19.23-next → 0.19.24-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.js +62 -22
- package/dist/index.mjs +62 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -11115,7 +11115,13 @@ var import_react70 = __toESM(require("react"));
|
|
|
11115
11115
|
var ComparingPlans = (props) => {
|
|
11116
11116
|
const [currentCurrency, setCurrentCurrency] = (0, import_react70.useState)("sar");
|
|
11117
11117
|
const [currentCycle, setCurrentCycle] = (0, import_react70.useState)("monthly");
|
|
11118
|
-
const uniqueFeatures = Array.from(
|
|
11118
|
+
const uniqueFeatures = Array.from(
|
|
11119
|
+
new Set(
|
|
11120
|
+
props.plans.flatMap(
|
|
11121
|
+
(plan) => plan.features.map((feature) => feature.text)
|
|
11122
|
+
)
|
|
11123
|
+
)
|
|
11124
|
+
);
|
|
11119
11125
|
return /* @__PURE__ */ import_react70.default.createElement("div", { id: "detailed-pricing", className: "hawa-w-full hawa-overflow-x-auto" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between" }, /* @__PURE__ */ import_react70.default.createElement(
|
|
11120
11126
|
Radio,
|
|
11121
11127
|
{
|
|
@@ -11144,30 +11150,64 @@ var ComparingPlans = (props) => {
|
|
|
11144
11150
|
}
|
|
11145
11151
|
}
|
|
11146
11152
|
}
|
|
11147
|
-
)), /* @__PURE__ */ import_react70.default.createElement("div", { className: " hawa-overflow-hidden hawa-rounded" }, /* @__PURE__ */ import_react70.default.createElement(
|
|
11148
|
-
"
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11153
|
+
)), /* @__PURE__ */ import_react70.default.createElement("div", { className: " hawa-overflow-hidden hawa-rounded" }, /* @__PURE__ */ import_react70.default.createElement(
|
|
11154
|
+
"div",
|
|
11155
|
+
{
|
|
11156
|
+
className: cn(
|
|
11157
|
+
"hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border-b hawa-border-t hawa-p-4 hawa-text-sm hawa-font-medium",
|
|
11158
|
+
"hawa-border-gray-200 hawa-bg-gray-100 hawa-text-gray-900",
|
|
11159
|
+
"dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-white"
|
|
11160
|
+
)
|
|
11161
|
+
},
|
|
11162
|
+
/* @__PURE__ */ import_react70.default.createElement("div", { className: "hawa-flex hawa-items-center" }),
|
|
11163
|
+
props.plans.map((plan, i) => /* @__PURE__ */ import_react70.default.createElement("div", { key: i, className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ import_react70.default.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ import_react70.default.createElement("span", { className: "hawa-text-md hawa-font-bold hawa-text-gray-500 dark:hawa-text-gray-400" }, plan.texts.title), /* @__PURE__ */ import_react70.default.createElement("span", { className: "hawa-text-md hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400" }, plan.texts.subtitle)), /* @__PURE__ */ import_react70.default.createElement("div", { className: " hawa-flex hawa-items-baseline hawa-text-gray-900 dark:hawa-text-white" }, /* @__PURE__ */ import_react70.default.createElement(import_react70.default.Fragment, null, /* @__PURE__ */ import_react70.default.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, plan.price), /* @__PURE__ */ import_react70.default.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, plan.texts.currencyText)), /* @__PURE__ */ import_react70.default.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400" }, "/ ", plan.texts.cycleText))))
|
|
11164
|
+
), uniqueFeatures.map((featureText, featureIndex) => {
|
|
11152
11165
|
var _a, _b;
|
|
11153
|
-
return /* @__PURE__ */ import_react70.default.createElement(
|
|
11154
|
-
|
|
11155
|
-
return (_a2 = plan.features.find((feature) => feature.text === featureText)) == null ? void 0 : _a2.hint;
|
|
11156
|
-
})) == null ? void 0 : _a.features.find((feature) => feature.text === featureText)) == null ? void 0 : _b.hint }, /* @__PURE__ */ import_react70.default.createElement(
|
|
11157
|
-
"svg",
|
|
11166
|
+
return /* @__PURE__ */ import_react70.default.createElement(
|
|
11167
|
+
"div",
|
|
11158
11168
|
{
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
strokeWidth: "0",
|
|
11162
|
-
viewBox: "0 0 16 16",
|
|
11163
|
-
height: "1em",
|
|
11164
|
-
width: "1em"
|
|
11169
|
+
key: featureIndex,
|
|
11170
|
+
className: "hawa-grid hawa-grid-cols-1 md:hawa-grid-cols-[1fr_repeat(3,_minmax(0,_1fr))] hawa-gap-x-16 hawa-border-b hawa-border-gray-200 hawa-px-4 hawa-py-5 hawa-text-sm hawa-text-gray-700 dark:text-white dark:hawa-border-gray-700"
|
|
11165
11171
|
},
|
|
11166
|
-
/* @__PURE__ */ import_react70.default.createElement("
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11172
|
+
/* @__PURE__ */ import_react70.default.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-gray-500 dark:hawa-text-white" }, featureText, props.plans.some(
|
|
11173
|
+
(plan) => plan.features.some(
|
|
11174
|
+
(feature) => feature.text === featureText && feature.hint
|
|
11175
|
+
)
|
|
11176
|
+
) && /* @__PURE__ */ import_react70.default.createElement(
|
|
11177
|
+
Tooltip,
|
|
11178
|
+
{
|
|
11179
|
+
side: "right",
|
|
11180
|
+
content: (_b = (_a = props.plans.find(
|
|
11181
|
+
(plan) => {
|
|
11182
|
+
var _a2;
|
|
11183
|
+
return (_a2 = plan.features.find(
|
|
11184
|
+
(feature) => feature.text === featureText
|
|
11185
|
+
)) == null ? void 0 : _a2.hint;
|
|
11186
|
+
}
|
|
11187
|
+
)) == null ? void 0 : _a.features.find(
|
|
11188
|
+
(feature) => feature.text === featureText
|
|
11189
|
+
)) == null ? void 0 : _b.hint
|
|
11190
|
+
},
|
|
11191
|
+
/* @__PURE__ */ import_react70.default.createElement(
|
|
11192
|
+
"svg",
|
|
11193
|
+
{
|
|
11194
|
+
stroke: "currentColor",
|
|
11195
|
+
fill: "currentColor",
|
|
11196
|
+
strokeWidth: "0",
|
|
11197
|
+
viewBox: "0 0 16 16",
|
|
11198
|
+
height: "1em",
|
|
11199
|
+
width: "1em"
|
|
11200
|
+
},
|
|
11201
|
+
/* @__PURE__ */ import_react70.default.createElement("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z" })
|
|
11202
|
+
)
|
|
11203
|
+
)),
|
|
11204
|
+
props.plans.map((plan, planIndex) => {
|
|
11205
|
+
const feature = plan.features.find(
|
|
11206
|
+
(f) => f.text === featureText
|
|
11207
|
+
);
|
|
11208
|
+
return /* @__PURE__ */ import_react70.default.createElement("div", { key: planIndex, className: "hawa-text-center" }, (feature == null ? void 0 : feature.included) ? /* @__PURE__ */ import_react70.default.createElement(CheckMark, { className: "dark:hawa-text-white hawa-text-black" }) : /* @__PURE__ */ import_react70.default.createElement(UncheckMark, { className: "dark:hawa-text-white hawa-text-black" }));
|
|
11209
|
+
})
|
|
11210
|
+
);
|
|
11171
11211
|
})));
|
|
11172
11212
|
};
|
|
11173
11213
|
|
package/dist/index.mjs
CHANGED
|
@@ -10899,7 +10899,13 @@ import React96, { useState as useState36 } from "react";
|
|
|
10899
10899
|
var ComparingPlans = (props) => {
|
|
10900
10900
|
const [currentCurrency, setCurrentCurrency] = useState36("sar");
|
|
10901
10901
|
const [currentCycle, setCurrentCycle] = useState36("monthly");
|
|
10902
|
-
const uniqueFeatures = Array.from(
|
|
10902
|
+
const uniqueFeatures = Array.from(
|
|
10903
|
+
new Set(
|
|
10904
|
+
props.plans.flatMap(
|
|
10905
|
+
(plan) => plan.features.map((feature) => feature.text)
|
|
10906
|
+
)
|
|
10907
|
+
)
|
|
10908
|
+
);
|
|
10903
10909
|
return /* @__PURE__ */ React96.createElement("div", { id: "detailed-pricing", className: "hawa-w-full hawa-overflow-x-auto" }, /* @__PURE__ */ React96.createElement("div", { className: "hawa-mb-2 hawa-flex hawa-w-full hawa-justify-between" }, /* @__PURE__ */ React96.createElement(
|
|
10904
10910
|
Radio,
|
|
10905
10911
|
{
|
|
@@ -10928,30 +10934,64 @@ var ComparingPlans = (props) => {
|
|
|
10928
10934
|
}
|
|
10929
10935
|
}
|
|
10930
10936
|
}
|
|
10931
|
-
)), /* @__PURE__ */ React96.createElement("div", { className: " hawa-overflow-hidden hawa-rounded" }, /* @__PURE__ */ React96.createElement(
|
|
10932
|
-
"
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10937
|
+
)), /* @__PURE__ */ React96.createElement("div", { className: " hawa-overflow-hidden hawa-rounded" }, /* @__PURE__ */ React96.createElement(
|
|
10938
|
+
"div",
|
|
10939
|
+
{
|
|
10940
|
+
className: cn(
|
|
10941
|
+
"hawa-grid hawa-grid-cols-4 hawa-gap-x-2 hawa-border-b hawa-border-t hawa-p-4 hawa-text-sm hawa-font-medium",
|
|
10942
|
+
"hawa-border-gray-200 hawa-bg-gray-100 hawa-text-gray-900",
|
|
10943
|
+
"dark:hawa-border-gray-700 dark:hawa-bg-gray-800 dark:hawa-text-white"
|
|
10944
|
+
)
|
|
10945
|
+
},
|
|
10946
|
+
/* @__PURE__ */ React96.createElement("div", { className: "hawa-flex hawa-items-center" }),
|
|
10947
|
+
props.plans.map((plan, i) => /* @__PURE__ */ React96.createElement("div", { key: i, className: "hawa-flex hawa-flex-col hawa-gap-2" }, /* @__PURE__ */ React96.createElement("div", { className: "hawa-flex hawa-flex-col" }, /* @__PURE__ */ React96.createElement("span", { className: "hawa-text-md hawa-font-bold hawa-text-gray-500 dark:hawa-text-gray-400" }, plan.texts.title), /* @__PURE__ */ React96.createElement("span", { className: "hawa-text-md hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400" }, plan.texts.subtitle)), /* @__PURE__ */ React96.createElement("div", { className: " hawa-flex hawa-items-baseline hawa-text-gray-900 dark:hawa-text-white" }, /* @__PURE__ */ React96.createElement(React96.Fragment, null, /* @__PURE__ */ React96.createElement("span", { className: "hawa-text-5xl hawa-font-extrabold hawa-tracking-tight" }, plan.price), /* @__PURE__ */ React96.createElement("span", { className: "hawa-mx-1 hawa-text-sm hawa-font-semibold" }, plan.texts.currencyText)), /* @__PURE__ */ React96.createElement("span", { className: "hawa-ml-1 hawa-text-xl hawa-font-normal hawa-text-gray-500 dark:hawa-text-gray-400" }, "/ ", plan.texts.cycleText))))
|
|
10948
|
+
), uniqueFeatures.map((featureText, featureIndex) => {
|
|
10936
10949
|
var _a, _b;
|
|
10937
|
-
return /* @__PURE__ */ React96.createElement(
|
|
10938
|
-
|
|
10939
|
-
return (_a2 = plan.features.find((feature) => feature.text === featureText)) == null ? void 0 : _a2.hint;
|
|
10940
|
-
})) == null ? void 0 : _a.features.find((feature) => feature.text === featureText)) == null ? void 0 : _b.hint }, /* @__PURE__ */ React96.createElement(
|
|
10941
|
-
"svg",
|
|
10950
|
+
return /* @__PURE__ */ React96.createElement(
|
|
10951
|
+
"div",
|
|
10942
10952
|
{
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
strokeWidth: "0",
|
|
10946
|
-
viewBox: "0 0 16 16",
|
|
10947
|
-
height: "1em",
|
|
10948
|
-
width: "1em"
|
|
10953
|
+
key: featureIndex,
|
|
10954
|
+
className: "hawa-grid hawa-grid-cols-1 md:hawa-grid-cols-[1fr_repeat(3,_minmax(0,_1fr))] hawa-gap-x-16 hawa-border-b hawa-border-gray-200 hawa-px-4 hawa-py-5 hawa-text-sm hawa-text-gray-700 dark:text-white dark:hawa-border-gray-700"
|
|
10949
10955
|
},
|
|
10950
|
-
/* @__PURE__ */ React96.createElement("
|
|
10951
|
-
|
|
10952
|
-
|
|
10953
|
-
|
|
10954
|
-
|
|
10956
|
+
/* @__PURE__ */ React96.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-2 hawa-text-gray-500 dark:hawa-text-white" }, featureText, props.plans.some(
|
|
10957
|
+
(plan) => plan.features.some(
|
|
10958
|
+
(feature) => feature.text === featureText && feature.hint
|
|
10959
|
+
)
|
|
10960
|
+
) && /* @__PURE__ */ React96.createElement(
|
|
10961
|
+
Tooltip,
|
|
10962
|
+
{
|
|
10963
|
+
side: "right",
|
|
10964
|
+
content: (_b = (_a = props.plans.find(
|
|
10965
|
+
(plan) => {
|
|
10966
|
+
var _a2;
|
|
10967
|
+
return (_a2 = plan.features.find(
|
|
10968
|
+
(feature) => feature.text === featureText
|
|
10969
|
+
)) == null ? void 0 : _a2.hint;
|
|
10970
|
+
}
|
|
10971
|
+
)) == null ? void 0 : _a.features.find(
|
|
10972
|
+
(feature) => feature.text === featureText
|
|
10973
|
+
)) == null ? void 0 : _b.hint
|
|
10974
|
+
},
|
|
10975
|
+
/* @__PURE__ */ React96.createElement(
|
|
10976
|
+
"svg",
|
|
10977
|
+
{
|
|
10978
|
+
stroke: "currentColor",
|
|
10979
|
+
fill: "currentColor",
|
|
10980
|
+
strokeWidth: "0",
|
|
10981
|
+
viewBox: "0 0 16 16",
|
|
10982
|
+
height: "1em",
|
|
10983
|
+
width: "1em"
|
|
10984
|
+
},
|
|
10985
|
+
/* @__PURE__ */ React96.createElement("path", { d: "M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8 4a.905.905 0 0 0-.9.995l.35 3.507a.552.552 0 0 0 1.1 0l.35-3.507A.905.905 0 0 0 8 4zm.002 6a1 1 0 1 0 0 2 1 1 0 0 0 0-2z" })
|
|
10986
|
+
)
|
|
10987
|
+
)),
|
|
10988
|
+
props.plans.map((plan, planIndex) => {
|
|
10989
|
+
const feature = plan.features.find(
|
|
10990
|
+
(f) => f.text === featureText
|
|
10991
|
+
);
|
|
10992
|
+
return /* @__PURE__ */ React96.createElement("div", { key: planIndex, className: "hawa-text-center" }, (feature == null ? void 0 : feature.included) ? /* @__PURE__ */ React96.createElement(CheckMark, { className: "dark:hawa-text-white hawa-text-black" }) : /* @__PURE__ */ React96.createElement(UncheckMark, { className: "dark:hawa-text-white hawa-text-black" }));
|
|
10993
|
+
})
|
|
10994
|
+
);
|
|
10955
10995
|
})));
|
|
10956
10996
|
};
|
|
10957
10997
|
|