@sikka/hawa 0.0.210 → 0.0.212

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sikka/hawa",
3
- "version": "0.0.210",
3
+ "version": "0.0.212",
4
4
  "description": "SaaS Oriented UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -1,5 +1,6 @@
1
1
  import React, { useState } from "react"
2
- import { HawaTabs } from "../../elements"
2
+ import { BsExclamationCircleFill } from "react-icons/bs"
3
+ import { HawaTabs, HawaTooltip } from "../../elements"
3
4
 
4
5
  const CheckMark = () => (
5
6
  <svg
@@ -37,7 +38,7 @@ type ComparingPlansTypes = {
37
38
  plans: [
38
39
  {
39
40
  direction: "rtl" | "ltr"
40
- features: [{ included: boolean; text: string }]
41
+ features: [{ included: boolean; text: string; description?: string }]
41
42
  price: number
42
43
  texts: {
43
44
  title: string
@@ -93,8 +94,8 @@ export const ComparingPlans: React.FunctionComponent<ComparingPlansTypes> = (
93
94
  }}
94
95
  />
95
96
  </div>
96
- <div className="min-w-max overflow-hidden">
97
- <div className="grid grid-cols-4 gap-x-16 border-t border-b border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white">
97
+ <div className=" overflow-hidden rounded">
98
+ <div className="grid grid-cols-4 gap-x-2 border-t border-b border-gray-200 bg-gray-100 p-4 text-sm font-medium text-gray-900 dark:border-gray-700 dark:bg-gray-800 dark:text-white">
98
99
  <div className="flex items-center"></div>
99
100
  {props.plans.map((plan: any) => (
100
101
  <div>
@@ -125,12 +126,16 @@ export const ComparingPlans: React.FunctionComponent<ComparingPlansTypes> = (
125
126
  return plan.features.map((feature) => {
126
127
  return (
127
128
  <div className="grid grid-cols-4 gap-x-16 border-b border-gray-200 py-5 px-4 text-sm text-gray-700 dark:border-gray-700">
128
- <div className="text-gray-500 dark:text-gray-400">
129
- {feature.text} (
130
- <a href="#" className="text-blue-600 hover:underline">
131
- view demo
132
- </a>
133
- )
129
+ <div className=" flex flex-row items-center gap-2 text-gray-500 dark:text-gray-400">
130
+ {feature.text}
131
+ {feature.description && (
132
+ <HawaTooltip
133
+ position="top-right"
134
+ content={feature.description}
135
+ >
136
+ <BsExclamationCircleFill />
137
+ </HawaTooltip>
138
+ )}
134
139
  </div>
135
140
  <UncheckMark />
136
141
  <CheckMark />
@@ -30,6 +30,7 @@ type PricingPlansTypes = {
30
30
  value: string
31
31
  }
32
32
  ]
33
+ onPlanClicked?: (e) => void
33
34
  onCycleChange?: (e) => void
34
35
  onCurrencyChange?: (e) => void
35
36
  direction?: "rtl" | "ltr"
@@ -67,6 +68,7 @@ export const PricingPlans: React.FunctionComponent<PricingPlansTypes> = (
67
68
  {props.plans.map((plan: any) => {
68
69
  return (
69
70
  <HawaPricingCard
71
+ onPlanClicked={() => props.onPlanClicked(plan)}
70
72
  {...plan}
71
73
  texts={{
72
74
  ...plan.texts,
@@ -16,6 +16,7 @@ type PricingCardTypes = {
16
16
  cycleText: string
17
17
  currencyText: string
18
18
  }
19
+ onPlanClicked?: () => void
19
20
  currentPlan?: boolean
20
21
  size: "small" | "medium" | "large"
21
22
  }
@@ -100,7 +101,12 @@ export const HawaPricingCard: React.FunctionComponent<PricingCardTypes> = ({
100
101
  >
101
102
  {props.texts.buttonText}
102
103
  </button> */}
103
- <HawaButton margins="none" disabled={currentPlan} width="full">
104
+ <HawaButton
105
+ onClick={props.onPlanClicked}
106
+ margins="none"
107
+ disabled={currentPlan}
108
+ width="full"
109
+ >
104
110
  {props.texts.buttonText}
105
111
  </HawaButton>
106
112
  </div>
@@ -25,7 +25,7 @@ export const HawaTooltip: React.FunctionComponent<THawaToolTip> = ({
25
25
  children,
26
26
  content,
27
27
  size = "normal",
28
- position,
28
+ position = "top-right",
29
29
  direction = "ltr",
30
30
  }) => {
31
31
  const [hovered, setHovered] = useState(false)
package/src/styles.css CHANGED
@@ -973,10 +973,6 @@ video {
973
973
  .min-w-full {
974
974
  min-width: 100%;
975
975
  }
976
- .min-w-max {
977
- min-width: -moz-max-content;
978
- min-width: max-content;
979
- }
980
976
  .min-w-min {
981
977
  min-width: -moz-min-content;
982
978
  min-width: min-content;
@@ -1145,6 +1141,10 @@ video {
1145
1141
  -moz-column-gap: 4rem;
1146
1142
  column-gap: 4rem;
1147
1143
  }
1144
+ .gap-x-2 {
1145
+ -moz-column-gap: 0.5rem;
1146
+ column-gap: 0.5rem;
1147
+ }
1148
1148
  .gap-x-3 {
1149
1149
  -moz-column-gap: 0.75rem;
1150
1150
  column-gap: 0.75rem;