@sikka/hawa 0.1.28 → 0.1.30

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.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "SaaS Oriented UI Kit",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.es.js",
@@ -1,4 +1,4 @@
1
- import React, { useState, FC } from "react"
1
+ import React, { useState, FC, useRef, useEffect } from "react"
2
2
  import clsx from "clsx"
3
3
 
4
4
  type RadioTypes = {
@@ -34,10 +34,22 @@ export const HawaRadio: FC<RadioTypes> = ({
34
34
  default: "max-w-fit",
35
35
  full: "w-full",
36
36
  }
37
+ const [parentDirection, setParentDirection] = useState(null)
38
+ const ref = useRef(null)
39
+
40
+ useEffect(() => {
41
+ if (ref.current && ref.current.parentNode) {
42
+ const dir = window.getComputedStyle(ref.current.parentNode).direction
43
+ setParentDirection(dir)
44
+ }
45
+ console.log("how many times")
46
+ })
47
+
37
48
  switch (design) {
38
49
  case "tabs":
39
50
  return (
40
51
  <ul
52
+ ref={ref}
41
53
  className={clsx(
42
54
  props.options?.length > 2
43
55
  ? "flex-wrap xs:max-w-full xs:flex-nowrap"
@@ -57,7 +69,11 @@ export const HawaRadio: FC<RadioTypes> = ({
57
69
  className={clsx(
58
70
  "w-full cursor-pointer",
59
71
  orientation === "horizontal" &&
72
+ parentDirection === "ltr" &&
60
73
  "rounded-none first:rounded-l last:rounded-r",
74
+ orientation === "horizontal" &&
75
+ parentDirection === "rtl" &&
76
+ "rounded-none first:rounded-r last:rounded-l",
61
77
  orientation === "vertical" &&
62
78
  "rounded-none first:rounded-t last:rounded-b",
63
79
 
@@ -52,7 +52,7 @@ const TabsList = React.forwardRef<
52
52
  <TabsPrimitive.List
53
53
  ref={ref}
54
54
  className={cn(
55
- "flex w-fit flex-wrap items-center justify-start gap-1 rounded bg-muted p-1 text-muted-foreground ",
55
+ "flex w-fit flex-wrap items-center justify-start gap-1 rounded border bg-muted p-1 text-muted-foreground ",
56
56
  orientation === "horizontal" ? "flex-col" : "flex-row",
57
57
  className
58
58
  )}
package/src/styles.css CHANGED
@@ -887,6 +887,9 @@ video {
887
887
  .mb-5 {
888
888
  margin-bottom: 1.25rem;
889
889
  }
890
+ .mb-6 {
891
+ margin-bottom: 1.5rem;
892
+ }
890
893
  .ml-0 {
891
894
  margin-left: 0px;
892
895
  }
@@ -959,6 +962,9 @@ video {
959
962
  .mt-1\.5 {
960
963
  margin-top: 0.375rem;
961
964
  }
965
+ .mt-10 {
966
+ margin-top: 2.5rem;
967
+ }
962
968
  .mt-14 {
963
969
  margin-top: 3.5rem;
964
970
  }
@@ -2908,6 +2914,10 @@ body {
2908
2914
  border-top-left-radius: var(--radius);
2909
2915
  border-bottom-left-radius: var(--radius);
2910
2916
  }
2917
+ .first\:rounded-r:first-child {
2918
+ border-top-right-radius: var(--radius);
2919
+ border-bottom-right-radius: var(--radius);
2920
+ }
2911
2921
  .first\:rounded-t:first-child {
2912
2922
  border-top-left-radius: var(--radius);
2913
2923
  border-top-right-radius: var(--radius);
@@ -2916,6 +2926,10 @@ body {
2916
2926
  border-bottom-right-radius: var(--radius);
2917
2927
  border-bottom-left-radius: var(--radius);
2918
2928
  }
2929
+ .last\:rounded-l:last-child {
2930
+ border-top-left-radius: var(--radius);
2931
+ border-bottom-left-radius: var(--radius);
2932
+ }
2919
2933
  .last\:rounded-r:last-child {
2920
2934
  border-top-right-radius: var(--radius);
2921
2935
  border-bottom-right-radius: var(--radius);
@@ -38,5 +38,10 @@
38
38
  "termsText": "الشروط والأحكام",
39
39
  "termsRequiredText": "يجب الموافقة على الشروط والأحكام للإستمرار",
40
40
  "existingUserText": "لديك حساب؟",
41
- "refCode": "رمز الإحالة"
41
+ "refCode": "رمز الإحالة",
42
+ "account": "الحساب",
43
+ "password": "كلمة المرور",
44
+ "settings": "الإعدادات",
45
+ "display": "المظهر",
46
+ "option": "خيار"
42
47
  }
@@ -37,5 +37,10 @@
37
37
  "termsText": "terms & conditions",
38
38
  "termsRequiredText": "you must accept the terms & conditions",
39
39
  "existingUserText": "Existing User?",
40
- "refCode": "Referral Code"
40
+ "refCode": "Referral Code",
41
+ "account": "Account",
42
+ "password": "Password",
43
+ "settings": "Settings",
44
+ "display": "Display",
45
+ "option": "Option"
41
46
  }