@sikka/hawa 0.26.19-next → 0.26.20
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/accordion/index.js +10 -12
- package/dist/accordion/index.mjs +8 -8
- package/dist/alert/index.js +8 -7
- package/dist/alert/index.mjs +7 -6
- package/dist/appLayout/index.js +13 -12
- package/dist/appLayout/index.mjs +12 -11
- package/dist/appMenubar/index.js +4 -4
- package/dist/appMenubar/index.mjs +2 -2
- package/dist/appStores/index.js +2 -2
- package/dist/appStores/index.mjs +1 -1
- package/dist/appTabs/index.js +4 -4
- package/dist/appTabs/index.mjs +2 -2
- package/dist/appTopbar/index.js +6 -6
- package/dist/appTopbar/index.mjs +4 -4
- package/dist/avatar/index.js +5 -5
- package/dist/avatar/index.mjs +4 -4
- package/dist/backToTop/index.js +8 -7
- package/dist/backToTop/index.mjs +7 -6
- package/dist/badge/index.js +4 -4
- package/dist/badge/index.mjs +2 -2
- package/dist/blocks/auth/index.js +38 -37
- package/dist/blocks/auth/index.mjs +24 -24
- package/dist/blocks/feedback/index.js +27 -26
- package/dist/blocks/feedback/index.mjs +11 -11
- package/dist/blocks/index.js +77 -76
- package/dist/blocks/index.mjs +34 -34
- package/dist/blocks/misc/index.js +31 -30
- package/dist/blocks/misc/index.mjs +14 -14
- package/dist/blocks/pricing/index.js +123 -122
- package/dist/blocks/pricing/index.mjs +18 -18
- package/dist/breadcrumb/index.js +2 -2
- package/dist/breadcrumb/index.mjs +1 -1
- package/dist/button/index.js +6 -5
- package/dist/button/index.mjs +5 -4
- package/dist/card/index.js +4 -4
- package/dist/card/index.mjs +2 -2
- package/dist/carousel/index.d.mts +1 -1
- package/dist/carousel/index.d.ts +1 -1
- package/dist/carousel/index.js +9 -18
- package/dist/carousel/index.mjs +7 -16
- package/dist/checkbox/index.js +4 -4
- package/dist/checkbox/index.mjs +2 -2
- package/dist/chip/index.js +4 -4
- package/dist/chip/index.mjs +2 -2
- package/dist/{chunk-343SRWR4.mjs → chunk-3GBITBPL.mjs} +2 -2
- package/dist/{chunk-TTKRRN7S.mjs → chunk-4IOG44R3.mjs} +2 -2
- package/dist/{chunk-3N6JJKMN.mjs → chunk-65TG6EVD.mjs} +5 -4
- package/dist/{chunk-LT3VHLAG.mjs → chunk-APZM24KK.mjs} +2 -2
- package/dist/{chunk-FYH74ZRQ.mjs → chunk-AREFDTXK.mjs} +9 -8
- package/dist/{chunk-FNVYY7ND.mjs → chunk-D22AALLE.mjs} +1 -1
- package/dist/{chunk-OD5WIQGQ.mjs → chunk-FDKCMEMD.mjs} +2 -2
- package/dist/{chunk-KNHT2UBG.mjs → chunk-KMCIHW76.mjs} +2 -2
- package/dist/{chunk-M2ZS3EDT.mjs → chunk-OAXF3RCQ.mjs} +2 -2
- package/dist/chunk-OTGCLEKC.mjs +62 -0
- package/dist/{chunk-OE23TTPS.mjs → chunk-POIP5U4M.mjs} +3 -3
- package/dist/{chunk-EYUG3GRC.mjs → chunk-SJ2Z6ZOG.mjs} +4 -4
- package/dist/{chunk-WRZFWCOQ.mjs → chunk-TGZRVRLP.mjs} +4 -4
- package/dist/{chunk-TE3BKEXL.mjs → chunk-TWNGV3RE.mjs} +1 -1
- package/dist/{chunk-ATUSR6VI.mjs → chunk-U3TZWNDZ.mjs} +4 -4
- package/dist/{chunk-W77KCP35.mjs → chunk-VQQ6MUX5.mjs} +2 -2
- package/dist/{chunk-SUS6O2PO.mjs → chunk-WPSUV4AD.mjs} +21 -21
- package/dist/{chunk-3KMBSNM3.mjs → chunk-Z5SL5QTQ.mjs} +11 -10
- package/dist/{chunk-ZCZ3WARS.mjs → chunk-ZS3FB3PO.mjs} +1 -1
- package/dist/codeBlock/index.js +153 -2454
- package/dist/codeBlock/index.mjs +129 -2393
- package/dist/collapsible/index.js +2 -2
- package/dist/collapsible/index.mjs +1 -1
- package/dist/colorPicker/index.js +7 -7
- package/dist/colorPicker/index.mjs +126 -2
- package/dist/combobox/index.js +193 -193
- package/dist/combobox/index.mjs +8 -8
- package/dist/command/index.js +5 -5
- package/dist/command/index.mjs +1 -1
- package/dist/copyrights/index.js +2 -2
- package/dist/copyrights/index.mjs +1 -1
- package/dist/count/index.js +2 -2
- package/dist/count/index.mjs +1 -1
- package/dist/dataTable/index.js +16 -15
- package/dist/dataTable/index.mjs +15 -14
- package/dist/destroyableCard/index.js +6 -8
- package/dist/destroyableCard/index.mjs +4 -4
- package/dist/dialog/index.js +4 -4
- package/dist/dialog/index.mjs +2 -2
- package/dist/docsLayout/index.js +12 -11
- package/dist/docsLayout/index.mjs +11 -10
- package/dist/docsSidebar/index.js +4 -4
- package/dist/docsSidebar/index.mjs +2 -2
- package/dist/dropdownMenu/index.js +4 -4
- package/dist/dropdownMenu/index.mjs +2 -2
- package/dist/elements/index.d.mts +1 -1
- package/dist/elements/index.d.ts +1 -1
- package/dist/elements/index.js +155 -163
- package/dist/elements/index.mjs +47 -56
- package/dist/fileDropzone/index.js +10 -9
- package/dist/fileDropzone/index.mjs +9 -8
- package/dist/fileUploader/index.js +2 -2
- package/dist/fileUploader/index.mjs +1 -1
- package/dist/glow/index.js +2 -2
- package/dist/glow/index.mjs +1 -1
- package/dist/hooks/index.d.mts +7 -7
- package/dist/hooks/index.d.ts +7 -7
- package/dist/hooks/index.js +16 -16
- package/dist/hooks/index.mjs +14 -14
- package/dist/index.css +0 -465
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +213 -221
- package/dist/index.mjs +212 -220
- package/dist/input/index.js +8 -8
- package/dist/input/index.mjs +4 -4
- package/dist/interfaceSettings/index.js +9 -9
- package/dist/interfaceSettings/index.mjs +4 -4
- package/dist/label/index.js +5 -5
- package/dist/label/index.mjs +4 -4
- package/dist/layout/index.d.mts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +31 -30
- package/dist/layout/index.mjs +16 -16
- package/dist/loading/index.js +4 -4
- package/dist/loading/index.mjs +2 -2
- package/dist/logos/index.js +2 -2
- package/dist/logos/index.mjs +1 -1
- package/dist/navbar/index.js +5 -5
- package/dist/navbar/index.mjs +4 -4
- package/dist/navigationMenu/index.js +4 -4
- package/dist/navigationMenu/index.mjs +2 -2
- package/dist/pagination/index.js +4 -4
- package/dist/pagination/index.mjs +2 -2
- package/dist/passwordInput/index.js +15 -15
- package/dist/passwordInput/index.mjs +13 -13
- package/dist/phoneInput/index.js +11 -11
- package/dist/phoneInput/index.mjs +10 -10
- package/dist/pinInput/index.js +4 -4
- package/dist/pinInput/index.mjs +2 -2
- package/dist/popover/index.js +4 -4
- package/dist/popover/index.mjs +2 -2
- package/dist/progress/index.js +4 -4
- package/dist/progress/index.mjs +2 -2
- package/dist/progressCircle/index.js +4 -4
- package/dist/progressCircle/index.mjs +2 -2
- package/dist/radio/index.js +7 -7
- package/dist/radio/index.mjs +6 -6
- package/dist/scrollArea/index.js +4 -4
- package/dist/scrollArea/index.mjs +2 -2
- package/dist/scrollIndicator/index.js +2 -2
- package/dist/scrollIndicator/index.mjs +1 -1
- package/dist/select/index.js +8 -8
- package/dist/select/index.mjs +7 -7
- package/dist/separator/index.js +4 -4
- package/dist/separator/index.mjs +2 -2
- package/dist/sheet/index.js +4 -4
- package/dist/sheet/index.mjs +2 -2
- package/dist/sidebar/index.js +6 -6
- package/dist/sidebar/index.mjs +4 -4
- package/dist/signature/index.js +8 -8
- package/dist/signature/index.mjs +6 -6
- package/dist/simpleTable/index.js +6 -6
- package/dist/simpleTable/index.mjs +5 -5
- package/dist/skeleton/index.js +4 -4
- package/dist/skeleton/index.mjs +2 -2
- package/dist/slider/index.js +4 -4
- package/dist/slider/index.mjs +2 -2
- package/dist/sortButton/index.js +8 -7
- package/dist/sortButton/index.mjs +2 -2
- package/dist/splitButton/index.js +9 -8
- package/dist/splitButton/index.mjs +4 -4
- package/dist/stats/index.js +7 -7
- package/dist/stats/index.mjs +6 -6
- package/dist/stopPropagationWrapper/index.js +2 -2
- package/dist/stopPropagationWrapper/index.mjs +1 -1
- package/dist/switch/index.js +4 -4
- package/dist/switch/index.mjs +2 -2
- package/dist/table/index.js +4 -4
- package/dist/table/index.mjs +2 -2
- package/dist/tabs/index.js +5 -5
- package/dist/tabs/index.mjs +4 -4
- package/dist/textarea/index.js +7 -7
- package/dist/textarea/index.mjs +6 -6
- package/dist/toast/index.js +4 -4
- package/dist/toast/index.mjs +2 -2
- package/dist/toaster/index.js +6 -6
- package/dist/toaster/index.mjs +5 -5
- package/dist/tooltip/index.js +4 -4
- package/dist/tooltip/index.mjs +3 -3
- package/dist/types/index.js +1 -1
- package/package.json +16 -42
- package/README.md +0 -107
- package/dist/chunk-S36W2LDN.mjs +0 -189
package/dist/toaster/index.mjs
CHANGED
@@ -5,15 +5,15 @@ import {
|
|
5
5
|
ToastProvider,
|
6
6
|
ToastTitle,
|
7
7
|
ToastViewport
|
8
|
-
} from "../chunk-
|
8
|
+
} from "../chunk-KMCIHW76.mjs";
|
9
9
|
import {
|
10
10
|
cn
|
11
|
-
} from "../chunk-
|
11
|
+
} from "../chunk-TWNGV3RE.mjs";
|
12
12
|
|
13
|
-
//
|
13
|
+
// elements/toaster/Toaster.tsx
|
14
14
|
import React2 from "react";
|
15
15
|
|
16
|
-
//
|
16
|
+
// hooks/useToast.ts
|
17
17
|
import * as React from "react";
|
18
18
|
var TOAST_LIMIT = 5;
|
19
19
|
var TOAST_REMOVE_DELAY = 1e5;
|
@@ -127,7 +127,7 @@ function useToast() {
|
|
127
127
|
};
|
128
128
|
}
|
129
129
|
|
130
|
-
//
|
130
|
+
// elements/toaster/Toaster.tsx
|
131
131
|
function Toaster(props) {
|
132
132
|
const { toasts } = useToast();
|
133
133
|
let isRTL = props.direction === "rtl";
|
package/dist/tooltip/index.js
CHANGED
@@ -27,25 +27,25 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
29
|
|
30
|
-
//
|
30
|
+
// elements/tooltip/index.ts
|
31
31
|
var tooltip_exports = {};
|
32
32
|
__export(tooltip_exports, {
|
33
33
|
Tooltip: () => Tooltip
|
34
34
|
});
|
35
35
|
module.exports = __toCommonJS(tooltip_exports);
|
36
36
|
|
37
|
-
//
|
37
|
+
// elements/tooltip/Tooltip.tsx
|
38
38
|
var import_react = __toESM(require("react"));
|
39
39
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"));
|
40
40
|
|
41
|
-
//
|
41
|
+
// util/index.ts
|
42
42
|
var import_clsx = require("clsx");
|
43
43
|
var import_tailwind_merge = require("tailwind-merge");
|
44
44
|
function cn(...inputs) {
|
45
45
|
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
46
46
|
}
|
47
47
|
|
48
|
-
//
|
48
|
+
// elements/tooltip/Tooltip.tsx
|
49
49
|
var TooltipContent = import_react.default.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ import_react.default.createElement(
|
50
50
|
TooltipPrimitive.Content,
|
51
51
|
{
|
package/dist/tooltip/index.mjs
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
//
|
1
|
+
// elements/tooltip/Tooltip.tsx
|
2
2
|
import React from "react";
|
3
3
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
4
4
|
|
5
|
-
//
|
5
|
+
// util/index.ts
|
6
6
|
import { clsx } from "clsx";
|
7
7
|
import { twMerge } from "tailwind-merge";
|
8
8
|
function cn(...inputs) {
|
9
9
|
return twMerge(clsx(inputs));
|
10
10
|
}
|
11
11
|
|
12
|
-
//
|
12
|
+
// elements/tooltip/Tooltip.tsx
|
13
13
|
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
14
14
|
TooltipPrimitive.Content,
|
15
15
|
{
|
package/dist/types/index.js
CHANGED
@@ -13,6 +13,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
13
13
|
};
|
14
14
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
15
15
|
|
16
|
-
//
|
16
|
+
// types/index.ts
|
17
17
|
var types_exports = {};
|
18
18
|
module.exports = __toCommonJS(types_exports);
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sikka/hawa",
|
3
|
-
"version": "0.26.
|
3
|
+
"version": "0.26.20",
|
4
4
|
"description": "Modern UI Kit made with Tailwind",
|
5
5
|
"author": {
|
6
6
|
"name": "Sikka Software",
|
@@ -44,23 +44,6 @@
|
|
44
44
|
"files": [
|
45
45
|
"dist/**"
|
46
46
|
],
|
47
|
-
"scripts": {
|
48
|
-
"dev": "next dev",
|
49
|
-
"build": "next build",
|
50
|
-
"start": "next start -p 3032",
|
51
|
-
"lint": "next lint",
|
52
|
-
"check": "tsc --noEmit",
|
53
|
-
"test": "jest",
|
54
|
-
"storybook": "storybook dev -p 6006",
|
55
|
-
"build-storybook": "storybook build",
|
56
|
-
"prebuild": "node pre-build.js",
|
57
|
-
"build-lib": "npm run prebuild && node build-library.js",
|
58
|
-
"build-lib-old": "tsup --dts",
|
59
|
-
"build-css": "postcss styles/globals.css -o dist/index.css",
|
60
|
-
"prepub": "npm run build-lib && npm run build-css",
|
61
|
-
"pub": "npm publish --tag next",
|
62
|
-
"chromatic": "npx chromatic --project-token=chpt_9c33d11ef14064f --output-dir ./storybook-static"
|
63
|
-
},
|
64
47
|
"dependencies": {
|
65
48
|
"@hookform/resolvers": "^3.3.3",
|
66
49
|
"@radix-ui/react-accordion": "^1.1.2",
|
@@ -79,9 +62,7 @@
|
|
79
62
|
"@radix-ui/react-toast": "^1.1.5",
|
80
63
|
"@radix-ui/react-tooltip": "^1.0.7",
|
81
64
|
"@tanstack/react-table": "^8.11.2",
|
82
|
-
"@
|
83
|
-
"@types/react": "^18.2.46",
|
84
|
-
"@types/react-dom": "^18.2.18",
|
65
|
+
"@tanstack/table-core": "^8.11.2",
|
85
66
|
"class-variance-authority": "^0.7.0",
|
86
67
|
"clsx": "^2.1.0",
|
87
68
|
"cmdk": "^0.2.0",
|
@@ -90,8 +71,6 @@
|
|
90
71
|
"eslint": "^8.56.0",
|
91
72
|
"eslint-config-next": "^14.0.4",
|
92
73
|
"libphonenumber-js": "^1.10.53",
|
93
|
-
"next": "^14.0.4",
|
94
|
-
"next-themes": "^0.2.1",
|
95
74
|
"prism-react-renderer": "^2.3.1",
|
96
75
|
"react": "18.2.0",
|
97
76
|
"react-dom": "18.2.0",
|
@@ -107,37 +86,32 @@
|
|
107
86
|
"devDependencies": {
|
108
87
|
"@babel/preset-react": "^7.23.3",
|
109
88
|
"@sikka/alam": "^0.0.4",
|
110
|
-
"@storybook/addon-essentials": "^7.6.6",
|
111
|
-
"@storybook/addon-interactions": "^7.6.6",
|
112
|
-
"@storybook/addon-links": "^7.6.6",
|
113
|
-
"@storybook/addon-mdx-gfm": "^7.6.6",
|
114
|
-
"@storybook/blocks": "^7.6.6",
|
115
|
-
"@storybook/manager-api": "^7.6.6",
|
116
|
-
"@storybook/nextjs": "^7.6.6",
|
117
|
-
"@storybook/react": "^7.6.6",
|
118
|
-
"@storybook/testing-library": "^0.2.2",
|
119
|
-
"@storybook/theming": "^7.6.6",
|
120
89
|
"@testing-library/jest-dom": "^6.1.6",
|
121
90
|
"@testing-library/react": "^14.1.2",
|
122
|
-
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
|
123
91
|
"@types/jest": "^29.5.11",
|
92
|
+
"@types/react": "^18.2.46",
|
93
|
+
"@types/react-dom": "^18.2.18",
|
124
94
|
"autoprefixer": "^10.4.16",
|
125
|
-
"
|
95
|
+
"embla-carousel": "8.0.0-rc18",
|
126
96
|
"jest": "^29.7.0",
|
127
97
|
"jest-environment-jsdom": "^29.7.0",
|
128
98
|
"lucide-react": "^0.303.0",
|
129
99
|
"postcss": "^8.4.32",
|
130
100
|
"postcss-cli": "^11.0.0",
|
131
101
|
"postcss-import": "^15.1.0",
|
132
|
-
"prettier": "^3.1.1",
|
133
|
-
"prettier-plugin-tailwindcss": "^0.5.10",
|
134
|
-
"recharts": "^2.10.3",
|
135
|
-
"storybook": "^7.6.6",
|
136
|
-
"storybook-dark-mode": "^3.0.3",
|
137
102
|
"tailwindcss": "^3.4.0",
|
138
103
|
"tailwindcss-animate": "^1.0.7",
|
139
104
|
"tsconfig-paths-webpack-plugin": "^4.1.0",
|
140
|
-
"tsup": "^8.0.1"
|
141
|
-
|
105
|
+
"tsup": "^8.0.1"
|
106
|
+
},
|
107
|
+
"scripts": {
|
108
|
+
"check": "tsc --noEmit",
|
109
|
+
"test": "jest",
|
110
|
+
"prebuild": "node ./util/pre-build.js",
|
111
|
+
"build-lib": "npm run prebuild && node ./util/build-library.js",
|
112
|
+
"build-lib-old": "tsup --dts",
|
113
|
+
"build-css": "postcss styles.css -o dist/index.css",
|
114
|
+
"prepub": "npm run build-lib && npm run build-css",
|
115
|
+
"pub": "npm publish --tag next"
|
142
116
|
}
|
143
117
|
}
|
package/README.md
DELETED
@@ -1,107 +0,0 @@
|
|
1
|
-
<p align="center">
|
2
|
-
<img src="https://res.cloudinary.com/dt8onsdfl/image/upload/v1694478376/hawa-logo-white-bg.jpg" alt="Hawa | هواء" />
|
3
|
-
</p>
|
4
|
-
|
5
|
-
<p align="center">
|
6
|
-
<a href="https://hawa.style/docs">Documentation</a> -
|
7
|
-
<a href="https://github.com/sikka-software/Hawa/blob/main/CHANGELOG.md">Changelog</a>
|
8
|
-
<!-- <a href="https://hawa.style/roadmap">Roadmap</a> -->
|
9
|
-
</p>
|
10
|
-
|
11
|
-
<p align="center">
|
12
|
-
<a href="https://www.npmjs.com/package/@sikka/hawa">
|
13
|
-
<img src="https://img.shields.io/npm/v/@sikka/hawa.svg?style=flat&colorA=000000&colorB=1082c3" alt="npm"/>
|
14
|
-
</a>
|
15
|
-
<!-- <a href="https://www.npmjs.com/package/@sikka/hawa">
|
16
|
-
<img src="https://img.shields.io/npm/v/@sikka/hawa/beta.svg?style=flat&colorA=000000&colorB=ea7637" alt="@beta tag"/>
|
17
|
-
</a> -->
|
18
|
-
<a href="https://www.npmjs.com/package/@sikka/hawa">
|
19
|
-
<img src="https://img.shields.io/npm/v/@sikka/hawa/next.svg?style=flat&colorA=000000&colorB=ea7637" alt="@next tag"/>
|
20
|
-
</a>
|
21
|
-
<a href="https://www.npmjs.com/package/@sikka/hawa">
|
22
|
-
<img src="https://img.shields.io/npm/dt/@sikka/hawa.svg?style=flat&colorA=000000&colorB=000000" alt="npm"/>
|
23
|
-
</a>
|
24
|
-
<br />
|
25
|
-
<a href="https://github.com/sikka-software/Hawa/actions/workflows/hawa-main.yml">
|
26
|
-
<img src="https://github.com/sikka-software/Hawa/actions/workflows/hawa-main.yml/badge.svg" alt="@next tag"/>
|
27
|
-
</a>
|
28
|
-
<a href="https://github.com/sikka-software/Hawa/actions/workflows/hawa-beta.yml">
|
29
|
-
<img src="https://github.com/sikka-software/Hawa/actions/workflows/hawa-beta.yml/badge.svg" alt="@next tag"/>
|
30
|
-
</a>
|
31
|
-
</p>
|
32
|
-
|
33
|
-
---
|
34
|
-
|
35
|
-
<p style="font-size: 40px; font-weight: 500" align="center">Hawa | هــواء</p>
|
36
|
-
<p align="center">Opinionated UI Kit for web apps and websites built with TailwindCSS</p>
|
37
|
-
|
38
|
-
---
|
39
|
-
|
40
|
-
### Tools used
|
41
|
-
|
42
|
-
- Styling: [Tailwind](https://tailwindcss.com/)
|
43
|
-
- Headless UI: [Radix-UI](https://www.radix-ui.com/)
|
44
|
-
- Forms: [react-hook-form](https://react-hook-form.com/)
|
45
|
-
- Tables: [@tanstack/react-table](https://tanstack.com/table/v8)
|
46
|
-
- Form Validation: [zod](https://zod.dev/)
|
47
|
-
- Phone Validation: [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js)
|
48
|
-
- Carousel: [embla-carousel-react](https://www.embla-carousel.com/)
|
49
|
-
- Combobox: [cmdk](https://github.com/pacocoursey/cmdk)
|
50
|
-
|
51
|
-
## Install
|
52
|
-
|
53
|
-
**Note:** Current npm tags 👇
|
54
|
-
|
55
|
-
`@beta` is archived.
|
56
|
-
|
57
|
-
`@next` only points to pre-releases.
|
58
|
-
|
59
|
-
`@latest` for the latest stable release.
|
60
|
-
|
61
|
-
```bash
|
62
|
-
npm install @sikka/hawa
|
63
|
-
```
|
64
|
-
|
65
|
-
</br>
|
66
|
-
|
67
|
-
# Contributing
|
68
|
-
|
69
|
-
To contribute, clone this github repository and run the development server
|
70
|
-
|
71
|
-
```js
|
72
|
-
// To preview the components
|
73
|
-
npm run storybook
|
74
|
-
// To run the landing pages
|
75
|
-
npm run dev
|
76
|
-
```
|
77
|
-
|
78
|
-
To build the library to /dist
|
79
|
-
|
80
|
-
```
|
81
|
-
npm run build-lib
|
82
|
-
```
|
83
|
-
|
84
|
-
To generate /dist/index.css
|
85
|
-
|
86
|
-
```
|
87
|
-
npm run build-css
|
88
|
-
```
|
89
|
-
|
90
|
-
</br>
|
91
|
-
|
92
|
-

|
93
|
-
|
94
|
-
## License
|
95
|
-
|
96
|
-
MIT © [SIKKA SOFTWARE](https://sikka.sa)
|
97
|
-
|
98
|
-
<!--start: logo-->
|
99
|
-
<p align="center">
|
100
|
-
<a href="https://sikka.io">
|
101
|
-
<img width="44" alt="Sikka" src="https://i.postimg.cc/8cK4tnKQ/sikka-symbol-black.png">
|
102
|
-
</a>
|
103
|
-
</p>
|
104
|
-
<p align="center">
|
105
|
-
<sub>An open source project by <a href="https://sikka.io">Sikka</a></sub>
|
106
|
-
</p>
|
107
|
-
<!--end: logo-->
|
package/dist/chunk-S36W2LDN.mjs
DELETED
@@ -1,189 +0,0 @@
|
|
1
|
-
// components/elements/colorPicker/ColorPicker.tsx
|
2
|
-
import React3, {
|
3
|
-
useState,
|
4
|
-
useEffect
|
5
|
-
} from "react";
|
6
|
-
|
7
|
-
// components/util.ts
|
8
|
-
import { clsx } from "clsx";
|
9
|
-
import { twMerge } from "tailwind-merge";
|
10
|
-
function cn(...inputs) {
|
11
|
-
return twMerge(clsx(inputs));
|
12
|
-
}
|
13
|
-
|
14
|
-
// components/elements/label/Label.tsx
|
15
|
-
import * as React2 from "react";
|
16
|
-
|
17
|
-
// components/elements/tooltip/Tooltip.tsx
|
18
|
-
import React from "react";
|
19
|
-
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
20
|
-
var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(
|
21
|
-
TooltipPrimitive.Content,
|
22
|
-
{
|
23
|
-
ref,
|
24
|
-
sideOffset,
|
25
|
-
className: cn(
|
26
|
-
"hawa-z-50 hawa-overflow-hidden hawa-rounded-md hawa-border hawa-bg-popover hawa-px-3 hawa-py-1.5 hawa-text-sm hawa-text-popover-foreground hawa-shadow-md hawa-animate-in hawa-fade-in-0 hawa-zoom-in-95 data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=closed]:hawa-zoom-out-95 data-[side=bottom]:hawa-slide-in-from-top-2 data-[side=left]:hawa-slide-in-from-right-2 data-[side=right]:hawa-slide-in-from-left-2 data-[side=top]:hawa-slide-in-from-bottom-2",
|
27
|
-
className
|
28
|
-
),
|
29
|
-
...props
|
30
|
-
}
|
31
|
-
));
|
32
|
-
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
33
|
-
var TooltipArrow = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(TooltipPrimitive.Arrow, { ref, className: cn(className), ...props }));
|
34
|
-
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
35
|
-
var Tooltip = ({
|
36
|
-
side,
|
37
|
-
open,
|
38
|
-
content,
|
39
|
-
children,
|
40
|
-
defaultOpen,
|
41
|
-
onOpenChange,
|
42
|
-
triggerProps,
|
43
|
-
contentProps,
|
44
|
-
providerProps,
|
45
|
-
delayDuration = 300,
|
46
|
-
...props
|
47
|
-
}) => {
|
48
|
-
return /* @__PURE__ */ React.createElement(
|
49
|
-
TooltipPrimitive.TooltipProvider,
|
50
|
-
{
|
51
|
-
delayDuration,
|
52
|
-
...providerProps
|
53
|
-
},
|
54
|
-
/* @__PURE__ */ React.createElement(
|
55
|
-
TooltipPrimitive.Root,
|
56
|
-
{
|
57
|
-
open,
|
58
|
-
defaultOpen,
|
59
|
-
onOpenChange,
|
60
|
-
...props
|
61
|
-
},
|
62
|
-
/* @__PURE__ */ React.createElement(TooltipPrimitive.Trigger, { ...triggerProps }, children),
|
63
|
-
/* @__PURE__ */ React.createElement(TooltipContent, { side, align: "center", ...contentProps }, content)
|
64
|
-
)
|
65
|
-
);
|
66
|
-
};
|
67
|
-
|
68
|
-
// components/elements/label/Label.tsx
|
69
|
-
var Label = React2.forwardRef(({ className, hint, hintSide, required, children, ...props }, ref) => /* @__PURE__ */ React2.createElement("div", { className: "hawa-flex hawa-flex-row hawa-items-center hawa-gap-1 hawa-transition-all" }, /* @__PURE__ */ React2.createElement(
|
70
|
-
"label",
|
71
|
-
{
|
72
|
-
ref,
|
73
|
-
className: cn(
|
74
|
-
"hawa-text-sm hawa-font-medium hawa-leading-none peer-disabled:hawa-cursor-not-allowed peer-disabled:hawa-opacity-70",
|
75
|
-
className
|
76
|
-
),
|
77
|
-
...props
|
78
|
-
},
|
79
|
-
children,
|
80
|
-
required && /* @__PURE__ */ React2.createElement("span", { className: "hawa-mx-0.5 hawa-text-red-500" }, "*")
|
81
|
-
), hint && /* @__PURE__ */ React2.createElement(
|
82
|
-
Tooltip,
|
83
|
-
{
|
84
|
-
content: hint,
|
85
|
-
side: hintSide,
|
86
|
-
triggerProps: {
|
87
|
-
tabIndex: -1,
|
88
|
-
onClick: (event) => event.preventDefault()
|
89
|
-
}
|
90
|
-
},
|
91
|
-
/* @__PURE__ */ React2.createElement("div", null, /* @__PURE__ */ React2.createElement(
|
92
|
-
"svg",
|
93
|
-
{
|
94
|
-
xmlns: "http://www.w3.org/2000/svg",
|
95
|
-
className: "hawa-h-[14px] hawa-w-[14px] hawa-cursor-help",
|
96
|
-
viewBox: "0 0 24 24",
|
97
|
-
fill: "none",
|
98
|
-
stroke: "currentColor",
|
99
|
-
strokeWidth: "2",
|
100
|
-
strokeLinecap: "round",
|
101
|
-
strokeLinejoin: "round"
|
102
|
-
},
|
103
|
-
/* @__PURE__ */ React2.createElement("circle", { cx: "12", cy: "12", r: "10" }),
|
104
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
105
|
-
/* @__PURE__ */ React2.createElement("path", { d: "M12 17h.01" })
|
106
|
-
))
|
107
|
-
)));
|
108
|
-
Label.displayName = "Label";
|
109
|
-
|
110
|
-
// components/elements/colorPicker/ColorPicker.tsx
|
111
|
-
var ColorPicker = ({
|
112
|
-
containerProps,
|
113
|
-
colorPickerProps,
|
114
|
-
textInputProps,
|
115
|
-
labelProps,
|
116
|
-
...props
|
117
|
-
}) => {
|
118
|
-
const [selectedColor, setSelectedColor] = useState(props.color);
|
119
|
-
useEffect(() => {
|
120
|
-
if (selectedColor && selectedColor[0] !== "#") {
|
121
|
-
setSelectedColor(`#${selectedColor}`);
|
122
|
-
}
|
123
|
-
}, [selectedColor]);
|
124
|
-
const handleTextInputChange = (e) => {
|
125
|
-
const inputElement = e.target;
|
126
|
-
let inputColor = inputElement.value;
|
127
|
-
if (inputColor[0] !== "#") {
|
128
|
-
inputColor = `#${inputColor}`;
|
129
|
-
}
|
130
|
-
const sanitizedInput = inputColor.replace(/[^a-fA-F0-9#]/g, "");
|
131
|
-
setSelectedColor(sanitizedInput);
|
132
|
-
if (props.handleChange) {
|
133
|
-
props.handleChange(e);
|
134
|
-
}
|
135
|
-
};
|
136
|
-
return /* @__PURE__ */ React3.createElement("div", { className: "hawa-flex hawa-w-full hawa-flex-col hawa-gap-2" }, props.label && /* @__PURE__ */ React3.createElement(Label, { ...labelProps }, props.label), /* @__PURE__ */ React3.createElement("div", { dir: "ltr", className: "hawa-flex hawa-w-full hawa-flex-row" }, /* @__PURE__ */ React3.createElement(
|
137
|
-
"div",
|
138
|
-
{
|
139
|
-
style: { height: 40, backgroundColor: selectedColor },
|
140
|
-
className: "hawa-rounded-bl-lg hawa-rounded-tl-lg hawa-border"
|
141
|
-
},
|
142
|
-
/* @__PURE__ */ React3.createElement(
|
143
|
-
"input",
|
144
|
-
{
|
145
|
-
type: "color",
|
146
|
-
value: selectedColor,
|
147
|
-
onChange: (e) => {
|
148
|
-
setSelectedColor(e.target.value);
|
149
|
-
if (props.handleChange) {
|
150
|
-
props.handleChange(e);
|
151
|
-
}
|
152
|
-
},
|
153
|
-
className: cn(
|
154
|
-
"hawa-mt-0 hawa-h-[38px] hawa-opacity-0",
|
155
|
-
props.colorPickerClassNames
|
156
|
-
),
|
157
|
-
...colorPickerProps
|
158
|
-
}
|
159
|
-
)
|
160
|
-
), /* @__PURE__ */ React3.createElement("div", { className: "hawa-relative hawa-flex hawa-max-h-fit hawa-w-full hawa-flex-col hawa-justify-center hawa-gap-0" }, /* @__PURE__ */ React3.createElement(
|
161
|
-
"input",
|
162
|
-
{
|
163
|
-
maxLength: 7,
|
164
|
-
type: "text",
|
165
|
-
onInput: handleTextInputChange,
|
166
|
-
value: selectedColor,
|
167
|
-
className: cn(
|
168
|
-
"hawa-block hawa-h-[40px] hawa-w-24 hawa-rounded hawa-rounded-l-none hawa-border hawa-border-l-0 hawa-border-l-transparent hawa-bg-background hawa-p-2 hawa-text-sm hawa-transition-all"
|
169
|
-
),
|
170
|
-
...textInputProps
|
171
|
-
}
|
172
|
-
))), /* @__PURE__ */ React3.createElement(
|
173
|
-
"p",
|
174
|
-
{
|
175
|
-
className: cn(
|
176
|
-
"hawa-my-0 hawa-text-start hawa-text-xs hawa-text-helper-color hawa-transition-all",
|
177
|
-
props.helperText ? "hawa-h-4 hawa-opacity-100" : "hawa-h-0 hawa-opacity-0"
|
178
|
-
)
|
179
|
-
},
|
180
|
-
props.helperText
|
181
|
-
));
|
182
|
-
};
|
183
|
-
|
184
|
-
export {
|
185
|
-
cn,
|
186
|
-
Tooltip,
|
187
|
-
Label,
|
188
|
-
ColorPicker
|
189
|
-
};
|