@sikka/hawa 0.48.0-next → 0.49.0-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/accordion/index.js +3 -28
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +3 -28
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/alert/index.js +53 -98
- package/dist/alert/index.js.map +1 -1
- package/dist/alert/index.mjs +53 -98
- package/dist/alert/index.mjs.map +1 -1
- package/dist/appLayout/index.d.mts +2 -0
- package/dist/appLayout/index.d.ts +2 -0
- package/dist/appLayout/index.js +263 -409
- package/dist/appLayout/index.js.map +1 -1
- package/dist/appLayout/index.mjs +263 -409
- package/dist/appLayout/index.mjs.map +1 -1
- package/dist/appMenubar/index.js +15 -20
- package/dist/appMenubar/index.js.map +1 -1
- package/dist/appMenubar/index.mjs +15 -20
- package/dist/appMenubar/index.mjs.map +1 -1
- package/dist/appTabs/index.js +28 -37
- package/dist/appTabs/index.js.map +1 -1
- package/dist/appTabs/index.mjs +28 -37
- package/dist/appTabs/index.mjs.map +1 -1
- package/dist/appTopbar/index.js +125 -173
- package/dist/appTopbar/index.js.map +1 -1
- package/dist/appTopbar/index.mjs +125 -173
- package/dist/appTopbar/index.mjs.map +1 -1
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar/index.mjs.map +1 -1
- package/dist/backToTop/index.js +50 -82
- package/dist/backToTop/index.js.map +1 -1
- package/dist/backToTop/index.mjs +50 -82
- package/dist/backToTop/index.mjs.map +1 -1
- package/dist/badge/index.d.mts +1 -1
- package/dist/badge/index.d.ts +1 -1
- package/dist/badge/index.js +2 -18
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +2 -18
- package/dist/badge/index.mjs.map +1 -1
- package/dist/blocks/auth/index.d.mts +1 -0
- package/dist/blocks/auth/index.d.ts +1 -0
- package/dist/blocks/auth/index.js +539 -792
- package/dist/blocks/auth/index.mjs +433 -604
- package/dist/blocks/feedback/index.js +214 -375
- package/dist/blocks/feedback/index.mjs +12 -25
- package/dist/blocks/index.d.mts +1 -0
- package/dist/blocks/index.d.ts +1 -0
- package/dist/blocks/index.js +940 -1445
- package/dist/blocks/index.mjs +469 -615
- package/dist/blocks/misc/index.js +136 -251
- package/dist/blocks/misc/index.mjs +29 -54
- package/dist/blocks/pricing/index.js +220 -397
- package/dist/blocks/pricing/index.mjs +63 -134
- package/dist/breadcrumb/index.js +1 -5
- package/dist/breadcrumb/index.js.map +1 -1
- package/dist/breadcrumb/index.mjs +1 -5
- package/dist/breadcrumb/index.mjs.map +1 -1
- package/dist/button/index.js +50 -82
- package/dist/button/index.js.map +1 -1
- package/dist/button/index.mjs +50 -82
- package/dist/button/index.mjs.map +1 -1
- package/dist/calendar/index.js +50 -82
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/index.mjs +50 -82
- package/dist/calendar/index.mjs.map +1 -1
- package/dist/card/index.js +7 -35
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +7 -35
- package/dist/card/index.mjs.map +1 -1
- package/dist/carousel/index.js +15 -27
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +15 -27
- package/dist/carousel/index.mjs.map +1 -1
- package/dist/checkbox/index.js +2 -13
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs +2 -13
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chip/index.js +2 -16
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/index.mjs +2 -16
- package/dist/chip/index.mjs.map +1 -1
- package/dist/{chunk-WUMDFBEK.mjs → chunk-3CHFVHTW.mjs} +43 -54
- package/dist/{chunk-2LUXOXAL.mjs → chunk-5SQBJRWE.mjs} +3 -9
- package/dist/{chunk-C2UOOH4X.mjs → chunk-B53SP2WZ.mjs} +3 -17
- package/dist/chunk-GHGWQVTM.mjs +150 -0
- package/dist/{chunk-5S5DR7KF.mjs → chunk-I23ONEDJ.mjs} +2 -10
- package/dist/{chunk-JFWD2ICY.mjs → chunk-JT7R3L5O.mjs} +54 -62
- package/dist/{chunk-6SJUUJOV.mjs → chunk-KDGJZPWK.mjs} +295 -574
- package/dist/{chunk-AWJSHOYU.mjs → chunk-KSJGXQTE.mjs} +1 -1
- package/dist/{chunk-NMW4GM4G.mjs → chunk-SE2JMXYG.mjs} +104 -144
- package/dist/{chunk-GBLWUEYN.mjs → chunk-ULRL4WI6.mjs} +176 -256
- package/dist/{chunk-IFWYR5W2.mjs → chunk-VUELRPUL.mjs} +57 -117
- package/dist/{chunk-WL7C2A5D.mjs → chunk-WQR4XZGL.mjs} +8 -15
- package/dist/codeBlock/index.js +50 -82
- package/dist/codeBlock/index.js.map +1 -1
- package/dist/codeBlock/index.mjs +50 -82
- package/dist/codeBlock/index.mjs.map +1 -1
- package/dist/colorPicker/index.js +21 -33
- package/dist/colorPicker/index.js.map +1 -1
- package/dist/colorPicker/index.mjs +22 -37
- package/dist/colorPicker/index.mjs.map +1 -1
- package/dist/combobox/index.d.mts +1 -1
- package/dist/combobox/index.d.ts +1 -1
- package/dist/combobox/index.js +141 -223
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +141 -223
- package/dist/combobox/index.mjs.map +1 -1
- package/dist/command/index.d.mts +1 -1
- package/dist/command/index.d.ts +1 -1
- package/dist/command/index.js +129 -212
- package/dist/command/index.js.map +1 -1
- package/dist/command/index.mjs +129 -212
- package/dist/command/index.mjs.map +1 -1
- package/dist/dataTable/index.js +254 -394
- package/dist/dataTable/index.js.map +1 -1
- package/dist/dataTable/index.mjs +254 -394
- package/dist/dataTable/index.mjs.map +1 -1
- package/dist/datePicker/index.js +64 -105
- package/dist/datePicker/index.js.map +1 -1
- package/dist/datePicker/index.mjs +64 -105
- package/dist/datePicker/index.mjs.map +1 -1
- package/dist/destroyableCard/index.js +8 -39
- package/dist/destroyableCard/index.js.map +1 -1
- package/dist/destroyableCard/index.mjs +8 -39
- package/dist/destroyableCard/index.mjs.map +1 -1
- package/dist/dialog/index.js +70 -122
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +70 -122
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/docsLayout/index.js +169 -358
- package/dist/docsLayout/index.js.map +1 -1
- package/dist/docsLayout/index.mjs +169 -358
- package/dist/docsLayout/index.mjs.map +1 -1
- package/dist/docsSidebar/index.js +9 -16
- package/dist/docsSidebar/index.js.map +1 -1
- package/dist/docsSidebar/index.mjs +9 -16
- package/dist/docsSidebar/index.mjs.map +1 -1
- package/dist/dropdownMenu/index.js +124 -164
- package/dist/dropdownMenu/index.js.map +1 -1
- package/dist/dropdownMenu/index.mjs +124 -164
- package/dist/dropdownMenu/index.mjs.map +1 -1
- package/dist/elements/index.d.mts +3 -3
- package/dist/elements/index.d.ts +3 -3
- package/dist/elements/index.js +841 -1505
- package/dist/elements/index.mjs +381 -718
- package/dist/fileDropzone/index.js +60 -159
- package/dist/fileDropzone/index.js.map +1 -1
- package/dist/fileDropzone/index.mjs +60 -159
- package/dist/fileDropzone/index.mjs.map +1 -1
- package/dist/glow/index.js +4 -16
- package/dist/glow/index.js.map +1 -1
- package/dist/glow/index.mjs +4 -16
- package/dist/glow/index.mjs.map +1 -1
- package/dist/hooks/index.d.mts +1 -5
- package/dist/hooks/index.d.ts +1 -5
- package/dist/hooks/index.js +11 -24
- package/dist/hooks/index.mjs +2 -2
- package/dist/{index-B0aJcA6d.d.ts → index-BgNycocQ.d.mts} +2 -2
- package/dist/{index-B0aJcA6d.d.mts → index-BgNycocQ.d.ts} +2 -2
- package/dist/index.css +1 -6
- package/dist/index.d.mts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +1549 -2512
- package/dist/index.mjs +1550 -2516
- package/dist/input/index.js +20 -29
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +20 -29
- package/dist/input/index.mjs.map +1 -1
- package/dist/interfaceSettings/index.js +122 -163
- package/dist/interfaceSettings/index.js.map +1 -1
- package/dist/interfaceSettings/index.mjs +122 -163
- package/dist/interfaceSettings/index.mjs.map +1 -1
- package/dist/label/index.js +19 -26
- package/dist/label/index.js.map +1 -1
- package/dist/label/index.mjs +19 -26
- package/dist/label/index.mjs.map +1 -1
- package/dist/layout/index.d.mts +2 -0
- package/dist/layout/index.d.ts +2 -0
- package/dist/layout/index.js +434 -790
- package/dist/layout/index.mjs +143 -243
- package/dist/loading/index.js +30 -53
- package/dist/loading/index.js.map +1 -1
- package/dist/loading/index.mjs +30 -53
- package/dist/loading/index.mjs.map +1 -1
- package/dist/logos/index.js +66 -191
- package/dist/logos/index.js.map +1 -1
- package/dist/logos/index.mjs +66 -191
- package/dist/logos/index.mjs.map +1 -1
- package/dist/navbar/index.js +1 -4
- package/dist/navbar/index.js.map +1 -1
- package/dist/navbar/index.mjs +1 -4
- package/dist/navbar/index.mjs.map +1 -1
- package/dist/navigationMenu/index.js +14 -22
- package/dist/navigationMenu/index.js.map +1 -1
- package/dist/navigationMenu/index.mjs +14 -22
- package/dist/navigationMenu/index.mjs.map +1 -1
- package/dist/pagination/index.js +1 -5
- package/dist/pagination/index.js.map +1 -1
- package/dist/pagination/index.mjs +1 -5
- package/dist/pagination/index.mjs.map +1 -1
- package/dist/passwordInput/index.js +36 -65
- package/dist/passwordInput/index.js.map +1 -1
- package/dist/passwordInput/index.mjs +36 -65
- package/dist/passwordInput/index.mjs.map +1 -1
- package/dist/phoneInput/index.js +20 -29
- package/dist/phoneInput/index.js.map +1 -1
- package/dist/phoneInput/index.mjs +20 -29
- package/dist/phoneInput/index.mjs.map +1 -1
- package/dist/pinInput/index.js +14 -16
- package/dist/pinInput/index.js.map +1 -1
- package/dist/pinInput/index.mjs +14 -16
- package/dist/pinInput/index.mjs.map +1 -1
- package/dist/popover/index.js +14 -24
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +14 -24
- package/dist/popover/index.mjs.map +1 -1
- package/dist/progress/index.js +19 -26
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/index.mjs +19 -26
- package/dist/progress/index.mjs.map +1 -1
- package/dist/progressCircle/index.js +67 -71
- package/dist/progressCircle/index.js.map +1 -1
- package/dist/progressCircle/index.mjs +67 -71
- package/dist/progressCircle/index.mjs.map +1 -1
- package/dist/radio/index.js +122 -163
- package/dist/radio/index.js.map +1 -1
- package/dist/radio/index.mjs +122 -163
- package/dist/radio/index.mjs.map +1 -1
- package/dist/scrollArea/index.js.map +1 -1
- package/dist/scrollArea/index.mjs.map +1 -1
- package/dist/scrollIndicator/index.js +1 -4
- package/dist/scrollIndicator/index.js.map +1 -1
- package/dist/scrollIndicator/index.mjs +1 -4
- package/dist/scrollIndicator/index.mjs.map +1 -1
- package/dist/select/index.js +20 -29
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +20 -29
- package/dist/select/index.mjs.map +1 -1
- package/dist/separator/index.js.map +1 -1
- package/dist/separator/index.mjs.map +1 -1
- package/dist/sheet/index.js +42 -53
- package/dist/sheet/index.js.map +1 -1
- package/dist/sheet/index.mjs +42 -53
- package/dist/sheet/index.mjs.map +1 -1
- package/dist/sidebar/index.js +66 -133
- package/dist/sidebar/index.js.map +1 -1
- package/dist/sidebar/index.mjs +66 -133
- package/dist/sidebar/index.mjs.map +1 -1
- package/dist/signature/index.js +19 -26
- package/dist/signature/index.js.map +1 -1
- package/dist/signature/index.mjs +19 -26
- package/dist/signature/index.mjs.map +1 -1
- package/dist/simpleTable/index.js +50 -81
- package/dist/simpleTable/index.js.map +1 -1
- package/dist/simpleTable/index.mjs +50 -81
- package/dist/simpleTable/index.mjs.map +1 -1
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs.map +1 -1
- package/dist/slider/index.js.map +1 -1
- package/dist/slider/index.mjs.map +1 -1
- package/dist/sonner/index.js.map +1 -1
- package/dist/sonner/index.mjs.map +1 -1
- package/dist/sortButton/index.js +50 -82
- package/dist/sortButton/index.js.map +1 -1
- package/dist/sortButton/index.mjs +50 -82
- package/dist/sortButton/index.mjs.map +1 -1
- package/dist/splitButton/index.js +214 -294
- package/dist/splitButton/index.js.map +1 -1
- package/dist/splitButton/index.mjs +214 -294
- package/dist/splitButton/index.mjs.map +1 -1
- package/dist/stats/index.js +7 -35
- package/dist/stats/index.js.map +1 -1
- package/dist/stats/index.mjs +7 -35
- package/dist/stats/index.mjs.map +1 -1
- package/dist/switch/index.js +24 -34
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/index.mjs +24 -34
- package/dist/switch/index.mjs.map +1 -1
- package/dist/table/index.js +27 -29
- package/dist/table/index.js.map +1 -1
- package/dist/table/index.mjs +27 -29
- package/dist/table/index.mjs.map +1 -1
- package/dist/tabs/index.js +54 -76
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +54 -76
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/textarea/index.js +21 -38
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +21 -38
- package/dist/textarea/index.mjs.map +1 -1
- package/dist/toast/index.js +2 -10
- package/dist/toast/index.js.map +1 -1
- package/dist/toast/index.mjs +2 -10
- package/dist/toast/index.mjs.map +1 -1
- package/dist/toaster/index.js +3 -16
- package/dist/toaster/index.js.map +1 -1
- package/dist/toaster/index.mjs +3 -16
- package/dist/toaster/index.mjs.map +1 -1
- package/dist/tooltip/index.js +19 -26
- package/dist/tooltip/index.js.map +1 -1
- package/dist/tooltip/index.mjs +19 -26
- package/dist/tooltip/index.mjs.map +1 -1
- package/package.json +12 -12
- package/dist/chunk-JP2N5WKD.mjs +0 -190
package/dist/pinInput/index.js
CHANGED
@@ -52,19 +52,19 @@ function cn(...inputs) {
|
|
52
52
|
// elements/pinInput/PinInput.tsx
|
53
53
|
var import_input_otp = require("input-otp");
|
54
54
|
|
55
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
55
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
56
56
|
var import_react2 = require("react");
|
57
57
|
|
58
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
58
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
59
59
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
60
60
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
61
61
|
return Boolean(className) && array.indexOf(className) === index;
|
62
62
|
}).join(" ");
|
63
63
|
|
64
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
64
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
65
65
|
var import_react = require("react");
|
66
66
|
|
67
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
67
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
68
68
|
var defaultAttributes = {
|
69
69
|
xmlns: "http://www.w3.org/2000/svg",
|
70
70
|
width: 24,
|
@@ -77,7 +77,7 @@ var defaultAttributes = {
|
|
77
77
|
strokeLinejoin: "round"
|
78
78
|
};
|
79
79
|
|
80
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
80
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
81
81
|
var Icon = (0, import_react.forwardRef)(
|
82
82
|
({
|
83
83
|
color = "currentColor",
|
@@ -109,7 +109,7 @@ var Icon = (0, import_react.forwardRef)(
|
|
109
109
|
}
|
110
110
|
);
|
111
111
|
|
112
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
112
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
113
113
|
var createLucideIcon = (iconName, iconNode) => {
|
114
114
|
const Component = (0, import_react2.forwardRef)(
|
115
115
|
({ className, ...props }, ref) => (0, import_react2.createElement)(Icon, {
|
@@ -123,16 +123,14 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
123
123
|
return Component;
|
124
124
|
};
|
125
125
|
|
126
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
126
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
127
127
|
var Dot = createLucideIcon("Dot", [
|
128
128
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
129
129
|
]);
|
130
130
|
|
131
131
|
// elements/helperText/HelperText.tsx
|
132
132
|
var import_react3 = __toESM(require("react"));
|
133
|
-
var HelperText = ({
|
134
|
-
helperText
|
135
|
-
}) => /* @__PURE__ */ import_react3.default.createElement(
|
133
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ import_react3.default.createElement(
|
136
134
|
"p",
|
137
135
|
{
|
138
136
|
className: cn(
|
@@ -206,7 +204,7 @@ var PinInput = ({ separatorPosition = 0, ...props }) => {
|
|
206
204
|
|
207
205
|
lucide-react/dist/esm/shared/src/utils.js:
|
208
206
|
(**
|
209
|
-
* @license lucide-react v0.
|
207
|
+
* @license lucide-react v0.435.0 - ISC
|
210
208
|
*
|
211
209
|
* This source code is licensed under the ISC license.
|
212
210
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -214,7 +212,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
214
212
|
|
215
213
|
lucide-react/dist/esm/defaultAttributes.js:
|
216
214
|
(**
|
217
|
-
* @license lucide-react v0.
|
215
|
+
* @license lucide-react v0.435.0 - ISC
|
218
216
|
*
|
219
217
|
* This source code is licensed under the ISC license.
|
220
218
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -222,7 +220,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
222
220
|
|
223
221
|
lucide-react/dist/esm/Icon.js:
|
224
222
|
(**
|
225
|
-
* @license lucide-react v0.
|
223
|
+
* @license lucide-react v0.435.0 - ISC
|
226
224
|
*
|
227
225
|
* This source code is licensed under the ISC license.
|
228
226
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -230,7 +228,7 @@ lucide-react/dist/esm/Icon.js:
|
|
230
228
|
|
231
229
|
lucide-react/dist/esm/createLucideIcon.js:
|
232
230
|
(**
|
233
|
-
* @license lucide-react v0.
|
231
|
+
* @license lucide-react v0.435.0 - ISC
|
234
232
|
*
|
235
233
|
* This source code is licensed under the ISC license.
|
236
234
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -238,7 +236,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
238
236
|
|
239
237
|
lucide-react/dist/esm/icons/dot.js:
|
240
238
|
(**
|
241
|
-
* @license lucide-react v0.
|
239
|
+
* @license lucide-react v0.435.0 - ISC
|
242
240
|
*
|
243
241
|
* This source code is licensed under the ISC license.
|
244
242
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -246,7 +244,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
246
244
|
|
247
245
|
lucide-react/dist/esm/lucide-react.js:
|
248
246
|
(**
|
249
|
-
* @license lucide-react v0.
|
247
|
+
* @license lucide-react v0.435.0 - ISC
|
250
248
|
*
|
251
249
|
* This source code is licensed under the ISC license.
|
252
250
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/pinInput/index.ts","../../elements/pinInput/PinInput.tsx","../../util/index.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/shared/src/utils.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/lucide-react/src/defaultAttributes.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/lucide-react/src/Icon.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/lucide-react/src/createLucideIcon.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/lucide-react/src/icons/dot.ts","../../elements/helperText/HelperText.tsx"],"sourcesContent":["export * from \"./PinInput\";\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { OTPInput, OTPInputContext, OTPInputProps } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { HelperText } from \"../helperText\";\n\nconst PinInputRoot = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"hawa-flex hawa-items-center hawa-gap-2 has-[:disabled]:hawa-opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:hawa-cursor-not-allowed\", className)}\n {...props}\n />\n));\nPinInputRoot.displayName = \"PinInputRoot\";\n\nconst PinInputGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"hawa-flex hawa-items-center\", className)} {...props} />\n));\nPinInputGroup.displayName = \"PinInputGroup\";\n\nconst PinInputSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const pinInputContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = pinInputContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"hawa-border-input hawa-relative hawa-flex hawa-h-10 hawa-w-10 hawa-items-center hawa-justify-center hawa-border-y hawa-border-r hawa-text-sm hawa-transition-all first:hawa-rounded-l-md first:hawa-border-l last:hawa-rounded-r-md\",\n isActive && \"hawa-ring-ring hawa-ring-offset-background hawa-z-10 hawa-ring-2\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"hawa-pointer-events-none hawa-absolute hawa-inset-0 hawa-flex hawa-items-center hawa-justify-center\">\n <div className=\"hawa-animate-caret-blink hawa-bg-foreground hawa-h-4 hawa-w-px hawa-duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nPinInputSlot.displayName = \"PinInputSlot\";\n\nconst PinInputSeperator = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nPinInputSeperator.displayName = \"PinInputSeperator\";\n\ntype PinInputProps = Omit<OTPInputProps, \"render\"> & {\n /*\n * The position of the separator in the pin input\n * @default 3\n */\n separatorPosition?: number;\n helperText?: any;\n};\n\nconst PinInput: React.FC<PinInputProps> = ({ separatorPosition = 0, ...props }) => {\n const maxLength = props.maxLength || 6; // Assuming a default maxLength of 6 if not provided\n const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);\n\n const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;\n const secondGroupLength = maxLength - firstGroupLength;\n\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\" dir=\"ltr\">\n <PinInputRoot {...props}>\n {firstGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full hawa-gap-2\">\n {[...Array(firstGroupLength)].map((_, index) => (\n <PinInputSlot key={index} index={index} className=\"hawa-w-full hawa-border\" />\n ))}\n </PinInputGroup>\n )}\n {separatorPosition > 0 && separatorPosition < props.maxLength && <PinInputSeperator />}\n {secondGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full hawa-gap-2\">\n {[...Array(secondGroupLength)].map((_, index) => (\n <PinInputSlot\n key={index + firstGroupLength}\n index={index + firstGroupLength}\n className=\"hawa-w-full hawa-border\"\n />\n ))}\n </PinInputGroup>\n )}\n </PinInputRoot>\n <HelperText helperText={props.helperText} />\n </div>\n );\n};\n\nexport { PinInput, PinInputRoot, PinInputGroup, PinInputSlot, PinInputSeperator };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return Boolean(className) && array.indexOf(className) === index;\n })\n .join(' ');\n","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) => {\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props,\n }),\n );\n\n Component.displayName = `${iconName}`;\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/dot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Dot = createLucideIcon('Dot', [\n ['circle', { cx: '12.1', cy: '12.1', r: '1', key: '18d7e5' }],\n]);\n\nexport default Dot;\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({\n helperText,\n}: {\n helperText?: string | React.ReactNode;\n}) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs\",\n helperText ? \"hawa-opacity-100 hawa-h-4\" : \"hawa-h-0 hawa-opacity-0\",\n )}\n >\n {helperText}\n </p>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;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C;AACD,aAAa,cAAc;AAE3B,IAAM,oBAA0B,kBAG9B,CAAC,EAAE,GAAG,MAAM,GAAG,QACf,qCAAC,SAAI,KAAU,MAAK,aAAa,GAAG,SAClC,qCAAC,SAAI,CACP,CACD;AACD,kBAAkB,cAAc;AAWhC,IAAM,WAAoC,CAAC,EAAE,oBAAoB,GAAG,GAAG,MAAM,MAAM;AACjF,QAAM,YAAY,MAAM,aAAa;AACrC,QAAM,2BAA2B,KAAK,IAAI,mBAAmB,SAAS;AAEtE,QAAM,mBAAmB,2BAA2B,IAAI,2BAA2B;AACnF,QAAM,oBAAoB,YAAY;AAEtC,SACE,qCAAC,SAAI,WAAU,sCAAqC,KAAI,SACtD,qCAAC,gBAAc,GAAG,SACf,mBAAmB,KAClB,qCAAC,iBAAc,WAAU,4BACtB,CAAC,GAAG,MAAM,gBAAgB,CAAC,EAAE,IAAI,CAAC,GAAG,UACpC,qCAAC,gBAAa,KAAK,OAAO,OAAc,WAAU,2BAA0B,CAC7E,CACH,GAED,oBAAoB,KAAK,oBAAoB,MAAM,aAAa,qCAAC,uBAAkB,GACnF,oBAAoB,KACnB,qCAAC,iBAAc,WAAU,4BACtB,CAAC,GAAG,MAAM,iBAAiB,CAAC,EAAE,IAAI,CAAC,GAAG,UACrC;AAAA,IAAC;AAAA;AAAA,MACC,KAAK,QAAQ;AAAA,MACb,OAAO,QAAQ;AAAA,MACf,WAAU;AAAA;AAAA,EACZ,CACD,CACH,CAEJ,GACA,qCAAC,cAAW,YAAY,MAAM,YAAY,CAC5C;AAEJ;","names":["React","import_react","React"]}
|
1
|
+
{"version":3,"sources":["../../elements/pinInput/index.ts","../../elements/pinInput/PinInput.tsx","../../util/index.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/shared/src/utils.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/src/defaultAttributes.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/src/Icon.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/src/createLucideIcon.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/src/icons/dot.ts","../../elements/helperText/HelperText.tsx"],"sourcesContent":["export * from \"./PinInput\";\n","import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { OTPInput, OTPInputContext, OTPInputProps } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { HelperText } from \"../helperText\";\n\nconst PinInputRoot = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"hawa-flex hawa-items-center hawa-gap-2 has-[:disabled]:hawa-opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:hawa-cursor-not-allowed\", className)}\n {...props}\n />\n));\nPinInputRoot.displayName = \"PinInputRoot\";\n\nconst PinInputGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"hawa-flex hawa-items-center\", className)} {...props} />\n));\nPinInputGroup.displayName = \"PinInputGroup\";\n\nconst PinInputSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const pinInputContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = pinInputContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"hawa-border-input hawa-relative hawa-flex hawa-h-10 hawa-w-10 hawa-items-center hawa-justify-center hawa-border-y hawa-border-r hawa-text-sm hawa-transition-all first:hawa-rounded-l-md first:hawa-border-l last:hawa-rounded-r-md\",\n isActive && \"hawa-ring-ring hawa-ring-offset-background hawa-z-10 hawa-ring-2\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"hawa-pointer-events-none hawa-absolute hawa-inset-0 hawa-flex hawa-items-center hawa-justify-center\">\n <div className=\"hawa-animate-caret-blink hawa-bg-foreground hawa-h-4 hawa-w-px hawa-duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nPinInputSlot.displayName = \"PinInputSlot\";\n\nconst PinInputSeperator = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nPinInputSeperator.displayName = \"PinInputSeperator\";\n\ntype PinInputProps = Omit<OTPInputProps, \"render\"> & {\n /*\n * The position of the separator in the pin input\n * @default 3\n */\n separatorPosition?: number;\n helperText?: any;\n};\n\nconst PinInput: React.FC<PinInputProps> = ({ separatorPosition = 0, ...props }) => {\n const maxLength = props.maxLength || 6; // Assuming a default maxLength of 6 if not provided\n const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);\n\n const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;\n const secondGroupLength = maxLength - firstGroupLength;\n\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\" dir=\"ltr\">\n <PinInputRoot {...props}>\n {firstGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full hawa-gap-2\">\n {[...Array(firstGroupLength)].map((_, index) => (\n <PinInputSlot key={index} index={index} className=\"hawa-w-full hawa-border\" />\n ))}\n </PinInputGroup>\n )}\n {separatorPosition > 0 && separatorPosition < props.maxLength && <PinInputSeperator />}\n {secondGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full hawa-gap-2\">\n {[...Array(secondGroupLength)].map((_, index) => (\n <PinInputSlot\n key={index + firstGroupLength}\n index={index + firstGroupLength}\n className=\"hawa-w-full hawa-border\"\n />\n ))}\n </PinInputGroup>\n )}\n </PinInputRoot>\n <HelperText helperText={props.helperText} />\n </div>\n );\n};\n\nexport { PinInput, PinInputRoot, PinInputGroup, PinInputSlot, PinInputSeperator };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(sanitizedHex);\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16),\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\"),\n },\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49,\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return Boolean(className) && array.indexOf(className) === index;\n })\n .join(' ');\n","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) => {\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props,\n }),\n );\n\n Component.displayName = `${iconName}`;\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/dot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Dot = createLucideIcon('Dot', [\n ['circle', { cx: '12.1', cy: '12.1', r: '1', key: '18d7e5' }],\n]);\n\nexport default Dot;\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({ helperText }: { helperText?: string | React.ReactNode }) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-helper-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AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,IACA,gBACC,qCAAC,SAAI,WAAU,yGACb,qCAAC,SAAI,WAAU,qFAAoF,CACrG;AAAA,EAEJ;AAEJ,CAAC;AACD,aAAa,cAAc;AAE3B,IAAM,oBAA0B,kBAG9B,CAAC,EAAE,GAAG,MAAM,GAAG,QACf,qCAAC,SAAI,KAAU,MAAK,aAAa,GAAG,SAClC,qCAAC,SAAI,CACP,CACD;AACD,kBAAkB,cAAc;AAWhC,IAAM,WAAoC,CAAC,EAAE,oBAAoB,GAAG,GAAG,MAAM,MAAM;AACjF,QAAM,YAAY,MAAM,aAAa;AACrC,QAAM,2BAA2B,KAAK,IAAI,mBAAmB,SAAS;AAEtE,QAAM,mBAAmB,2BAA2B,IAAI,2BAA2B;AACnF,QAAM,oBAAoB,YAAY;AAEtC,SACE,qCAAC,SAAI,WAAU,sCAAqC,KAAI,SACtD,qCAAC,gBAAc,GAAG,SACf,mBAAmB,KAClB,qCAAC,iBAAc,WAAU,4BACtB,CAAC,GAAG,MAAM,gBAAgB,CAAC,EAAE,IAAI,CAAC,GAAG,UACpC,qCAAC,gBAAa,KAAK,OAAO,OAAc,WAAU,2BAA0B,CAC7E,CACH,GAED,oBAAoB,KAAK,oBAAoB,MAAM,aAAa,qCAAC,uBAAkB,GACnF,oBAAoB,KACnB,qCAAC,iBAAc,WAAU,4BACtB,CAAC,GAAG,MAAM,iBAAiB,CAAC,EAAE,IAAI,CAAC,GAAG,UACrC;AAAA,IAAC;AAAA;AAAA,MACC,KAAK,QAAQ;AAAA,MACb,OAAO,QAAQ;AAAA,MACf,WAAU;AAAA;AAAA,EACZ,CACD,CACH,CAEJ,GACA,qCAAC,cAAW,YAAY,MAAM,YAAY,CAC5C;AAEJ;","names":["React","import_react","React"]}
|
package/dist/pinInput/index.mjs
CHANGED
@@ -13,19 +13,19 @@ function cn(...inputs) {
|
|
13
13
|
// elements/pinInput/PinInput.tsx
|
14
14
|
import { OTPInput, OTPInputContext } from "input-otp";
|
15
15
|
|
16
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
16
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
17
17
|
import { forwardRef as forwardRef2, createElement as createElement2 } from "react";
|
18
18
|
|
19
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
19
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/shared/src/utils.js
|
20
20
|
var toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
21
21
|
var mergeClasses = (...classes) => classes.filter((className, index, array) => {
|
22
22
|
return Boolean(className) && array.indexOf(className) === index;
|
23
23
|
}).join(" ");
|
24
24
|
|
25
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
25
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
26
26
|
import { forwardRef, createElement } from "react";
|
27
27
|
|
28
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
28
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/defaultAttributes.js
|
29
29
|
var defaultAttributes = {
|
30
30
|
xmlns: "http://www.w3.org/2000/svg",
|
31
31
|
width: 24,
|
@@ -38,7 +38,7 @@ var defaultAttributes = {
|
|
38
38
|
strokeLinejoin: "round"
|
39
39
|
};
|
40
40
|
|
41
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
41
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/Icon.js
|
42
42
|
var Icon = forwardRef(
|
43
43
|
({
|
44
44
|
color = "currentColor",
|
@@ -70,7 +70,7 @@ var Icon = forwardRef(
|
|
70
70
|
}
|
71
71
|
);
|
72
72
|
|
73
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
73
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/createLucideIcon.js
|
74
74
|
var createLucideIcon = (iconName, iconNode) => {
|
75
75
|
const Component = forwardRef2(
|
76
76
|
({ className, ...props }, ref) => createElement2(Icon, {
|
@@ -84,16 +84,14 @@ var createLucideIcon = (iconName, iconNode) => {
|
|
84
84
|
return Component;
|
85
85
|
};
|
86
86
|
|
87
|
-
// ../../node_modules/.pnpm/lucide-react@0.
|
87
|
+
// ../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/dot.js
|
88
88
|
var Dot = createLucideIcon("Dot", [
|
89
89
|
["circle", { cx: "12.1", cy: "12.1", r: "1", key: "18d7e5" }]
|
90
90
|
]);
|
91
91
|
|
92
92
|
// elements/helperText/HelperText.tsx
|
93
93
|
import React from "react";
|
94
|
-
var HelperText = ({
|
95
|
-
helperText
|
96
|
-
}) => /* @__PURE__ */ React.createElement(
|
94
|
+
var HelperText = ({ helperText }) => /* @__PURE__ */ React.createElement(
|
97
95
|
"p",
|
98
96
|
{
|
99
97
|
className: cn(
|
@@ -166,7 +164,7 @@ export {
|
|
166
164
|
|
167
165
|
lucide-react/dist/esm/shared/src/utils.js:
|
168
166
|
(**
|
169
|
-
* @license lucide-react v0.
|
167
|
+
* @license lucide-react v0.435.0 - ISC
|
170
168
|
*
|
171
169
|
* This source code is licensed under the ISC license.
|
172
170
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -174,7 +172,7 @@ lucide-react/dist/esm/shared/src/utils.js:
|
|
174
172
|
|
175
173
|
lucide-react/dist/esm/defaultAttributes.js:
|
176
174
|
(**
|
177
|
-
* @license lucide-react v0.
|
175
|
+
* @license lucide-react v0.435.0 - ISC
|
178
176
|
*
|
179
177
|
* This source code is licensed under the ISC license.
|
180
178
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -182,7 +180,7 @@ lucide-react/dist/esm/defaultAttributes.js:
|
|
182
180
|
|
183
181
|
lucide-react/dist/esm/Icon.js:
|
184
182
|
(**
|
185
|
-
* @license lucide-react v0.
|
183
|
+
* @license lucide-react v0.435.0 - ISC
|
186
184
|
*
|
187
185
|
* This source code is licensed under the ISC license.
|
188
186
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -190,7 +188,7 @@ lucide-react/dist/esm/Icon.js:
|
|
190
188
|
|
191
189
|
lucide-react/dist/esm/createLucideIcon.js:
|
192
190
|
(**
|
193
|
-
* @license lucide-react v0.
|
191
|
+
* @license lucide-react v0.435.0 - ISC
|
194
192
|
*
|
195
193
|
* This source code is licensed under the ISC license.
|
196
194
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -198,7 +196,7 @@ lucide-react/dist/esm/createLucideIcon.js:
|
|
198
196
|
|
199
197
|
lucide-react/dist/esm/icons/dot.js:
|
200
198
|
(**
|
201
|
-
* @license lucide-react v0.
|
199
|
+
* @license lucide-react v0.435.0 - ISC
|
202
200
|
*
|
203
201
|
* This source code is licensed under the ISC license.
|
204
202
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -206,7 +204,7 @@ lucide-react/dist/esm/icons/dot.js:
|
|
206
204
|
|
207
205
|
lucide-react/dist/esm/lucide-react.js:
|
208
206
|
(**
|
209
|
-
* @license lucide-react v0.
|
207
|
+
* @license lucide-react v0.435.0 - ISC
|
210
208
|
*
|
211
209
|
* This source code is licensed under the ISC license.
|
212
210
|
* See the LICENSE file in the root directory of this source tree.
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/pinInput/PinInput.tsx","../../util/index.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/shared/src/utils.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/lucide-react/src/defaultAttributes.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/lucide-react/src/Icon.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/lucide-react/src/createLucideIcon.ts","../../../../node_modules/.pnpm/lucide-react@0.427.0_react@18.3.1/node_modules/lucide-react/src/icons/dot.ts","../../elements/helperText/HelperText.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { OTPInput, OTPInputContext, OTPInputProps } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { HelperText } from \"../helperText\";\n\nconst PinInputRoot = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"hawa-flex hawa-items-center hawa-gap-2 has-[:disabled]:hawa-opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:hawa-cursor-not-allowed\", className)}\n {...props}\n />\n));\nPinInputRoot.displayName = \"PinInputRoot\";\n\nconst PinInputGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"hawa-flex hawa-items-center\", className)} {...props} />\n));\nPinInputGroup.displayName = \"PinInputGroup\";\n\nconst PinInputSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const pinInputContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = pinInputContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"hawa-border-input hawa-relative hawa-flex hawa-h-10 hawa-w-10 hawa-items-center hawa-justify-center hawa-border-y hawa-border-r hawa-text-sm hawa-transition-all first:hawa-rounded-l-md first:hawa-border-l last:hawa-rounded-r-md\",\n isActive && \"hawa-ring-ring hawa-ring-offset-background hawa-z-10 hawa-ring-2\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"hawa-pointer-events-none hawa-absolute hawa-inset-0 hawa-flex hawa-items-center hawa-justify-center\">\n <div className=\"hawa-animate-caret-blink hawa-bg-foreground hawa-h-4 hawa-w-px hawa-duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nPinInputSlot.displayName = \"PinInputSlot\";\n\nconst PinInputSeperator = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nPinInputSeperator.displayName = \"PinInputSeperator\";\n\ntype PinInputProps = Omit<OTPInputProps, \"render\"> & {\n /*\n * The position of the separator in the pin input\n * @default 3\n */\n separatorPosition?: number;\n helperText?: any;\n};\n\nconst PinInput: React.FC<PinInputProps> = ({ separatorPosition = 0, ...props }) => {\n const maxLength = props.maxLength || 6; // Assuming a default maxLength of 6 if not provided\n const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);\n\n const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;\n const secondGroupLength = maxLength - firstGroupLength;\n\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\" dir=\"ltr\">\n <PinInputRoot {...props}>\n {firstGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full hawa-gap-2\">\n {[...Array(firstGroupLength)].map((_, index) => (\n <PinInputSlot key={index} index={index} className=\"hawa-w-full hawa-border\" />\n ))}\n </PinInputGroup>\n )}\n {separatorPosition > 0 && separatorPosition < props.maxLength && <PinInputSeperator />}\n {secondGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full hawa-gap-2\">\n {[...Array(secondGroupLength)].map((_, index) => (\n <PinInputSlot\n key={index + firstGroupLength}\n index={index + firstGroupLength}\n className=\"hawa-w-full hawa-border\"\n />\n ))}\n </PinInputGroup>\n )}\n </PinInputRoot>\n <HelperText helperText={props.helperText} />\n </div>\n );\n};\n\nexport { PinInput, PinInputRoot, PinInputGroup, PinInputSlot, PinInputSeperator };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(\n sanitizedHex\n );\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16)\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\")\n }\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return Boolean(className) && array.indexOf(className) === index;\n })\n .join(' ');\n","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) => {\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props,\n }),\n );\n\n Component.displayName = `${iconName}`;\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/dot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Dot = createLucideIcon('Dot', [\n ['circle', { cx: '12.1', cy: '12.1', r: '1', key: '18d7e5' }],\n]);\n\nexport default Dot;\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({\n helperText,\n}: {\n helperText?: string | React.ReactNode;\n}) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs\",\n helperText ? \"hawa-opacity-100 hawa-h-4\" : \"h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D,aAAa,cAAc;AAE3B,IAAM,oBAA0B,kBAG9B,CAAC,EAAE,GAAG,MAAM,GAAG,QACf,qCAAC,SAAI,KAAU,MAAK,aAAa,GAAG,SAClC,qCAAC,SAAI,CACP,CACD;AACD,kBAAkB,cAAc;AAWhC,IAAM,WAAoC,CAAC,EAAE,oBAAoB,GAAG,GAAG,MAAM,MAAM;AACjF,QAAM,YAAY,MAAM,aAAa;AACrC,QAAM,2BAA2B,KAAK,IAAI,mBAAmB,SAAS;AAEtE,QAAM,mBAAmB,2BAA2B,IAAI,2BAA2B;AACnF,QAAM,oBAAoB,YAAY;AAEtC,SACE,qCAAC,SAAI,WAAU,sCAAqC,KAAI,SACtD,qCAAC,gBAAc,GAAG,SACf,mBAAmB,KAClB,qCAAC,iBAAc,WAAU,4BACtB,CAAC,GAAG,MAAM,gBAAgB,CAAC,EAAE,IAAI,CAAC,GAAG,UACpC,qCAAC,gBAAa,KAAK,OAAO,OAAc,WAAU,2BAA0B,CAC7E,CACH,GAED,oBAAoB,KAAK,oBAAoB,MAAM,aAAa,qCAAC,uBAAkB,GACnF,oBAAoB,KACnB,qCAAC,iBAAc,WAAU,4BACtB,CAAC,GAAG,MAAM,iBAAiB,CAAC,EAAE,IAAI,CAAC,GAAG,UACrC;AAAA,IAAC;AAAA;AAAA,MACC,KAAK,QAAQ;AAAA,MACb,OAAO,QAAQ;AAAA,MACf,WAAU;AAAA;AAAA,EACZ,CACD,CACH,CAEJ,GACA,qCAAC,cAAW,YAAY,MAAM,YAAY,CAC5C;AAEJ;","names":["React","forwardRef","createElement"]}
|
1
|
+
{"version":3,"sources":["../../elements/pinInput/PinInput.tsx","../../util/index.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/shared/src/utils.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/src/defaultAttributes.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/src/Icon.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/src/createLucideIcon.ts","../../../../node_modules/.pnpm/lucide-react@0.435.0_react@18.3.1/node_modules/lucide-react/src/icons/dot.ts","../../elements/helperText/HelperText.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@util/index\";\nimport { OTPInput, OTPInputContext, OTPInputProps } from \"input-otp\";\nimport { Dot } from \"lucide-react\";\n\nimport { HelperText } from \"../helperText\";\n\nconst PinInputRoot = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"hawa-flex hawa-items-center hawa-gap-2 has-[:disabled]:hawa-opacity-50\",\n containerClassName,\n )}\n className={cn(\"disabled:hawa-cursor-not-allowed\", className)}\n {...props}\n />\n));\nPinInputRoot.displayName = \"PinInputRoot\";\n\nconst PinInputGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"hawa-flex hawa-items-center\", className)} {...props} />\n));\nPinInputGroup.displayName = \"PinInputGroup\";\n\nconst PinInputSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const pinInputContext = React.useContext(OTPInputContext);\n const { char, hasFakeCaret, isActive } = pinInputContext.slots[index];\n\n return (\n <div\n ref={ref}\n className={cn(\n \"hawa-border-input hawa-relative hawa-flex hawa-h-10 hawa-w-10 hawa-items-center hawa-justify-center hawa-border-y hawa-border-r hawa-text-sm hawa-transition-all first:hawa-rounded-l-md first:hawa-border-l last:hawa-rounded-r-md\",\n isActive && \"hawa-ring-ring hawa-ring-offset-background hawa-z-10 hawa-ring-2\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"hawa-pointer-events-none hawa-absolute hawa-inset-0 hawa-flex hawa-items-center hawa-justify-center\">\n <div className=\"hawa-animate-caret-blink hawa-bg-foreground hawa-h-4 hawa-w-px hawa-duration-1000\" />\n </div>\n )}\n </div>\n );\n});\nPinInputSlot.displayName = \"PinInputSlot\";\n\nconst PinInputSeperator = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Dot />\n </div>\n));\nPinInputSeperator.displayName = \"PinInputSeperator\";\n\ntype PinInputProps = Omit<OTPInputProps, \"render\"> & {\n /*\n * The position of the separator in the pin input\n * @default 3\n */\n separatorPosition?: number;\n helperText?: any;\n};\n\nconst PinInput: React.FC<PinInputProps> = ({ separatorPosition = 0, ...props }) => {\n const maxLength = props.maxLength || 6; // Assuming a default maxLength of 6 if not provided\n const clampedSeparatorPosition = Math.min(separatorPosition, maxLength);\n\n const firstGroupLength = clampedSeparatorPosition > 0 ? clampedSeparatorPosition : 0;\n const secondGroupLength = maxLength - firstGroupLength;\n\n return (\n <div className=\"hawa-flex hawa-flex-col hawa-gap-2\" dir=\"ltr\">\n <PinInputRoot {...props}>\n {firstGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full hawa-gap-2\">\n {[...Array(firstGroupLength)].map((_, index) => (\n <PinInputSlot key={index} index={index} className=\"hawa-w-full hawa-border\" />\n ))}\n </PinInputGroup>\n )}\n {separatorPosition > 0 && separatorPosition < props.maxLength && <PinInputSeperator />}\n {secondGroupLength > 0 && (\n <PinInputGroup className=\"hawa-w-full hawa-gap-2\">\n {[...Array(secondGroupLength)].map((_, index) => (\n <PinInputSlot\n key={index + firstGroupLength}\n index={index + firstGroupLength}\n className=\"hawa-w-full hawa-border\"\n />\n ))}\n </PinInputGroup>\n )}\n </PinInputRoot>\n <HelperText helperText={props.helperText} />\n </div>\n );\n};\n\nexport { PinInput, PinInputRoot, PinInputGroup, PinInputSlot, PinInputSeperator };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(sanitizedHex);\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16),\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\"),\n },\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49,\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n","import { CamelToPascal } from './utility-types';\n\n/**\n * Converts string to kebab case\n *\n * @param {string} string\n * @returns {string} A kebabized string\n */\nexport const toKebabCase = (string: string) =>\n string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').toLowerCase();\n\n/**\n * Converts string to pascal case\n *\n * @param {string} string\n * @returns {string} A pascalized string\n */\nexport const toPascalCase = <T extends string>(string: T): CamelToPascal<T> => {\n const camelCase = string.replace(/^([A-Z])|[\\s-_]+(\\w)/g, (match, p1, p2) =>\n p2 ? p2.toUpperCase() : p1.toLowerCase(),\n );\n\n return (camelCase.charAt(0).toUpperCase() + camelCase.slice(1)) as CamelToPascal<T>;\n};\n\n/**\n * Merges classes into a single string\n *\n * @param {array} classes\n * @returns {string} A string of classes\n */\nexport const mergeClasses = <ClassType = string | undefined | null>(...classes: ClassType[]) =>\n classes\n .filter((className, index, array) => {\n return Boolean(className) && array.indexOf(className) === index;\n })\n .join(' ');\n","export default {\n xmlns: 'http://www.w3.org/2000/svg',\n width: 24,\n height: 24,\n viewBox: '0 0 24 24',\n fill: 'none',\n stroke: 'currentColor',\n strokeWidth: 2,\n strokeLinecap: 'round',\n strokeLinejoin: 'round',\n};\n","import { createElement, forwardRef } from 'react';\nimport defaultAttributes from './defaultAttributes';\nimport { IconNode, LucideProps } from './types';\nimport { mergeClasses } from '@lucide/shared';\n\ninterface IconComponentProps extends LucideProps {\n iconNode: IconNode;\n}\n\n/**\n * Lucide icon component\n *\n * @component Icon\n * @param {object} props\n * @param {string} props.color - The color of the icon\n * @param {number} props.size - The size of the icon\n * @param {number} props.strokeWidth - The stroke width of the icon\n * @param {boolean} props.absoluteStrokeWidth - Whether to use absolute stroke width\n * @param {string} props.className - The class name of the icon\n * @param {IconNode} props.children - The children of the icon\n * @param {IconNode} props.iconNode - The icon node of the icon\n *\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst Icon = forwardRef<SVGSVGElement, IconComponentProps>(\n (\n {\n color = 'currentColor',\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = '',\n children,\n iconNode,\n ...rest\n },\n ref,\n ) => {\n return createElement(\n 'svg',\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? (Number(strokeWidth) * 24) / Number(size) : strokeWidth,\n className: mergeClasses('lucide', className),\n ...rest,\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...(Array.isArray(children) ? children : [children]),\n ],\n );\n },\n);\n\nexport default Icon;\n","import { createElement, forwardRef } from 'react';\nimport { mergeClasses, toKebabCase } from '@lucide/shared';\nimport { IconNode, LucideProps } from './types';\nimport Icon from './Icon';\n\n/**\n * Create a Lucide icon component\n * @param {string} iconName\n * @param {array} iconNode\n * @returns {ForwardRefExoticComponent} LucideIcon\n */\nconst createLucideIcon = (iconName: string, iconNode: IconNode) => {\n const Component = forwardRef<SVGSVGElement, LucideProps>(({ className, ...props }, ref) =>\n createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(`lucide-${toKebabCase(iconName)}`, className),\n ...props,\n }),\n );\n\n Component.displayName = `${iconName}`;\n\n return Component;\n};\n\nexport default createLucideIcon;\n","import createLucideIcon from '../createLucideIcon';\n\n/**\n * @component @name Dot\n * @description Lucide SVG icon component, renders SVG Element with children.\n *\n * @preview  - https://lucide.dev/icons/dot\n * @see https://lucide.dev/guide/packages/lucide-react - Documentation\n *\n * @param {Object} props - Lucide icons props and any valid SVG attribute\n * @returns {JSX.Element} JSX Element\n *\n */\nconst Dot = createLucideIcon('Dot', [\n ['circle', { cx: '12.1', cy: '12.1', r: '1', key: '18d7e5' }],\n]);\n\nexport default Dot;\n","import React from \"react\";\n\nimport { cn } from \"@util/index\";\n\nexport const HelperText = ({ helperText }: { helperText?: string | React.ReactNode }) => (\n <p\n className={cn(\n \"hawa-my-0 hawa-text-start hawa-text-helper-color hawa-transition-all hawa-text-xs\",\n helperText ? \"haw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EJ;AAEJ,CAAC;AACD,aAAa,cAAc;AAE3B,IAAM,oBAA0B,kBAG9B,CAAC,EAAE,GAAG,MAAM,GAAG,QACf,qCAAC,SAAI,KAAU,MAAK,aAAa,GAAG,SAClC,qCAAC,SAAI,CACP,CACD;AACD,kBAAkB,cAAc;AAWhC,IAAM,WAAoC,CAAC,EAAE,oBAAoB,GAAG,GAAG,MAAM,MAAM;AACjF,QAAM,YAAY,MAAM,aAAa;AACrC,QAAM,2BAA2B,KAAK,IAAI,mBAAmB,SAAS;AAEtE,QAAM,mBAAmB,2BAA2B,IAAI,2BAA2B;AACnF,QAAM,oBAAoB,YAAY;AAEtC,SACE,qCAAC,SAAI,WAAU,sCAAqC,KAAI,SACtD,qCAAC,gBAAc,GAAG,SACf,mBAAmB,KAClB,qCAAC,iBAAc,WAAU,4BACtB,CAAC,GAAG,MAAM,gBAAgB,CAAC,EAAE,IAAI,CAAC,GAAG,UACpC,qCAAC,gBAAa,KAAK,OAAO,OAAc,WAAU,2BAA0B,CAC7E,CACH,GAED,oBAAoB,KAAK,oBAAoB,MAAM,aAAa,qCAAC,uBAAkB,GACnF,oBAAoB,KACnB,qCAAC,iBAAc,WAAU,4BACtB,CAAC,GAAG,MAAM,iBAAiB,CAAC,EAAE,IAAI,CAAC,GAAG,UACrC;AAAA,IAAC;AAAA;AAAA,MACC,KAAK,QAAQ;AAAA,MACb,OAAO,QAAQ;AAAA,MACf,WAAU;AAAA;AAAA,EACZ,CACD,CACH,CAEJ,GACA,qCAAC,cAAW,YAAY,MAAM,YAAY,CAC5C;AAEJ;","names":["React","forwardRef","createElement"]}
|
package/dist/popover/index.js
CHANGED
@@ -51,21 +51,19 @@ function cn(...inputs) {
|
|
51
51
|
}
|
52
52
|
|
53
53
|
// elements/popover/Popover.tsx
|
54
|
-
var PopoverContent = React.forwardRef(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
))
|
68
|
-
);
|
54
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React.createElement(
|
55
|
+
PopoverPrimitive.Content,
|
56
|
+
{
|
57
|
+
ref,
|
58
|
+
align,
|
59
|
+
sideOffset,
|
60
|
+
className: cn(
|
61
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-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",
|
62
|
+
className
|
63
|
+
),
|
64
|
+
...props
|
65
|
+
}
|
66
|
+
)));
|
69
67
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
70
68
|
var Popover = ({
|
71
69
|
trigger,
|
@@ -85,15 +83,7 @@ var Popover = ({
|
|
85
83
|
trigger: "var(--radix-popover-trigger-width)",
|
86
84
|
default: "auto"
|
87
85
|
};
|
88
|
-
return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(
|
89
|
-
PopoverPrimitive.Trigger,
|
90
|
-
{
|
91
|
-
className: "hawa-w-full",
|
92
|
-
disabled: disableTrigger,
|
93
|
-
...triggerProps
|
94
|
-
},
|
95
|
-
trigger
|
96
|
-
), /* @__PURE__ */ React.createElement(
|
86
|
+
return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(PopoverPrimitive.Trigger, { className: "hawa-w-full", disabled: disableTrigger, ...triggerProps }, trigger), /* @__PURE__ */ React.createElement(
|
97
87
|
PopoverContent,
|
98
88
|
{
|
99
89
|
side,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/popover/index.ts","../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Popover\";\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(
|
1
|
+
{"version":3,"sources":["../../elements/popover/index.ts","../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["export * from \"./Popover\";\n","import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(({ className, align = \"center\", sideOffset = 4, container, ...props }, ref) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-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\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps & React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger className=\"hawa-w-full\" disabled={disableTrigger} {...triggerProps}>\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width],\n maxWidth: \"var(--radix-popover-content-available-width)\",\n maxHeight: \"var(--radix-popover-content-available-height)\",\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverPortal = PopoverPrimitive.Portal;\nconst PopoverRoot = PopoverPrimitive.Root;\n\nexport { Popover, PopoverPortal, PopoverRoot, PopoverContent, PopoverTrigger };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(sanitizedHex);\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16),\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\"),\n },\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49,\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;AAEvB,uBAAkC;;;ACFlC,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADEA,IAAM,iBAAuB,iBAK3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,QACvE,oCAAkB,yBAAjB,EAAwB,aACvB;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACF,CACD;AACD,eAAe,cAA+B,yBAAQ;AAkBtD,IAAM,UAAsC,CAAC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,MAAI,cAAc;AAAA,IAChB,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAEA,SACE,oCAAkB,uBAAjB,EAAsB,MAAa,GAAG,SACrC,oCAAkB,0BAAjB,EAAyB,WAAU,eAAc,UAAU,gBAAiB,GAAG,gBAC7E,OACH,GACA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,OAAO,YAAY,KAAK;AAAA,QACxB,UAAU;AAAA,QACV,WAAW;AAAA,MACb;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,CACF;AAEJ;AAEA,IAAM,iBAAkC;AACxC,IAAM,gBAAiC;AACvC,IAAM,cAA+B;","names":[]}
|
package/dist/popover/index.mjs
CHANGED
@@ -12,21 +12,19 @@ function cn(...inputs) {
|
|
12
12
|
}
|
13
13
|
|
14
14
|
// elements/popover/Popover.tsx
|
15
|
-
var PopoverContent = React.forwardRef(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
))
|
29
|
-
);
|
15
|
+
var PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, container, ...props }, ref) => /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, { container }, /* @__PURE__ */ React.createElement(
|
16
|
+
PopoverPrimitive.Content,
|
17
|
+
{
|
18
|
+
ref,
|
19
|
+
align,
|
20
|
+
sideOffset,
|
21
|
+
className: cn(
|
22
|
+
"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-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",
|
23
|
+
className
|
24
|
+
),
|
25
|
+
...props
|
26
|
+
}
|
27
|
+
)));
|
30
28
|
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
31
29
|
var Popover = ({
|
32
30
|
trigger,
|
@@ -46,15 +44,7 @@ var Popover = ({
|
|
46
44
|
trigger: "var(--radix-popover-trigger-width)",
|
47
45
|
default: "auto"
|
48
46
|
};
|
49
|
-
return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(
|
50
|
-
PopoverPrimitive.Trigger,
|
51
|
-
{
|
52
|
-
className: "hawa-w-full",
|
53
|
-
disabled: disableTrigger,
|
54
|
-
...triggerProps
|
55
|
-
},
|
56
|
-
trigger
|
57
|
-
), /* @__PURE__ */ React.createElement(
|
47
|
+
return /* @__PURE__ */ React.createElement(PopoverPrimitive.Root, { open, ...props }, /* @__PURE__ */ React.createElement(PopoverPrimitive.Trigger, { className: "hawa-w-full", disabled: disableTrigger, ...triggerProps }, trigger), /* @__PURE__ */ React.createElement(
|
58
48
|
PopoverContent,
|
59
49
|
{
|
60
50
|
side,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(
|
1
|
+
{"version":3,"sources":["../../elements/popover/Popover.tsx","../../util/index.ts"],"sourcesContent":["import * as React from \"react\";\n\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport { cn } from \"@util/index\";\n\nimport { PositionType } from \"@_types/commonTypes\";\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> & {\n container?: HTMLElement | null;\n }\n>(({ className, align = \"center\", sideOffset = 4, container, ...props }, ref) => (\n <PopoverPrimitive.Portal container={container}>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"dark:dark-shadow hawa-z-50 hawa-rounded hawa-border hawa-bg-popover hawa-text-popover-foreground hawa-shadow-md hawa-outline-none data-[state=open]:hawa-animate-in data-[state=closed]:hawa-animate-out data-[state=closed]:hawa-fade-out-0 data-[state=open]:hawa-fade-in-0 data-[state=closed]:hawa-zoom-out-95 data-[state=open]:hawa-zoom-in-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\",\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\ninterface PopoverProps {\n side?: PositionType;\n align?: \"start\" | \"center\" | \"end\";\n trigger?: React.ReactNode;\n children: React.ReactNode;\n className?: string;\n sideOffset?: number;\n disableTrigger?: any;\n width?: \"trigger\" | \"default\";\n open?: boolean;\n contentProps?: PopoverPrimitive.PopoverContentProps;\n triggerProps?: PopoverPrimitive.PopoverTriggerProps;\n}\n\ntype HawaPopoverTypes = PopoverProps & React.ComponentProps<typeof PopoverPrimitive.Root>;\n\nconst Popover: React.FC<HawaPopoverTypes> = ({\n trigger,\n children,\n className,\n align = \"center\",\n side,\n sideOffset = 4,\n open,\n width = \"default\",\n disableTrigger,\n contentProps,\n triggerProps,\n ...props\n}) => {\n let widthStyles = {\n trigger: \"var(--radix-popover-trigger-width)\",\n default: \"auto\",\n };\n\n return (\n <PopoverPrimitive.Root open={open} {...props}>\n <PopoverPrimitive.Trigger className=\"hawa-w-full\" disabled={disableTrigger} {...triggerProps}>\n {trigger}\n </PopoverPrimitive.Trigger>\n <PopoverContent\n side={side}\n className={className}\n align={align}\n sideOffset={sideOffset}\n style={{\n width: widthStyles[width],\n maxWidth: \"var(--radix-popover-content-available-width)\",\n maxHeight: \"var(--radix-popover-content-available-height)\",\n }}\n {...contentProps}\n >\n {children}\n </PopoverContent>\n </PopoverPrimitive.Root>\n );\n};\n\nconst PopoverTrigger = PopoverPrimitive.Trigger;\nconst PopoverPortal = PopoverPrimitive.Portal;\nconst PopoverRoot = PopoverPrimitive.Root;\n\nexport { Popover, PopoverPortal, PopoverRoot, PopoverContent, PopoverTrigger };\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\ntype Palette = {\n name: string;\n colors: {\n [key: number]: string;\n };\n};\ntype Rgb = {\n r: number;\n g: number;\n b: number;\n};\nfunction hexToRgb(hex: string): Rgb | null {\n const sanitizedHex = hex.replaceAll(\"##\", \"#\");\n const colorParts = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(sanitizedHex);\n\n if (!colorParts) {\n return null;\n }\n\n const [, r, g, b] = colorParts;\n\n return {\n r: parseInt(r, 16),\n g: parseInt(g, 16),\n b: parseInt(b, 16),\n } as Rgb;\n}\n\nfunction rgbToHex(r: number, g: number, b: number): string {\n const toHex = (c: number) => `0${c.toString(16)}`.slice(-2);\n return `#${toHex(r)}${toHex(g)}${toHex(b)}`;\n}\n\nexport function getTextColor(color: string): \"#FFF\" | \"#333\" {\n const rgbColor = hexToRgb(color);\n\n if (!rgbColor) {\n return \"#333\";\n }\n\n const { r, g, b } = rgbColor;\n const luma = 0.2126 * r + 0.7152 * g + 0.0722 * b;\n\n return luma < 120 ? \"#FFF\" : \"#333\";\n}\n\nfunction lighten(hex: string, intensity: number): string {\n const color = hexToRgb(`#${hex}`);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r + (255 - color.r) * intensity);\n const g = Math.round(color.g + (255 - color.g) * intensity);\n const b = Math.round(color.b + (255 - color.b) * intensity);\n\n return rgbToHex(r, g, b);\n}\n\nfunction darken(hex: string, intensity: number): string {\n const color = hexToRgb(hex);\n\n if (!color) {\n return \"\";\n }\n\n const r = Math.round(color.r * intensity);\n const g = Math.round(color.g * intensity);\n const b = Math.round(color.b * intensity);\n\n return rgbToHex(r, g, b);\n}\nconst parseColor = (color: any) => {\n if (color.startsWith(\"#\")) {\n // Convert hex to RGB\n let r = parseInt(color.slice(1, 3), 16);\n let g = parseInt(color.slice(3, 5), 16);\n let b = parseInt(color.slice(5, 7), 16);\n return [r, g, b];\n } else if (color.startsWith(\"rgb\")) {\n // Extract RGB values from rgb() format\n return color.match(/\\d+/g).map(Number);\n }\n // Default to white if format is unrecognized\n return [255, 255, 255];\n};\nexport const calculateLuminance = (color: any) => {\n const [r, g, b] = parseColor(color)?.map((c: any) => {\n c /= 255;\n return c <= 0.03928 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n });\n return 0.2126 * r + 0.7152 * g + 0.0722 * b;\n};\n\nfunction getPallette(baseColor: string): Palette {\n const name = baseColor;\n\n const response: Palette = {\n name,\n colors: {\n 500: `#${baseColor}`.replace(\"##\", \"#\"),\n },\n };\n\n const intensityMap: {\n [key: number]: number;\n } = {\n 50: 0.95,\n 100: 0.9,\n 200: 0.75,\n 300: 0.6,\n 400: 0.3,\n 600: 0.9,\n 700: 0.75,\n 800: 0.6,\n 900: 0.49,\n };\n\n [50, 100, 200, 300, 400].forEach((level) => {\n response.colors[level] = lighten(baseColor, intensityMap[level]);\n });\n [600, 700, 800, 900].forEach((level) => {\n response.colors[level] = darken(baseColor, intensityMap[level]);\n });\n\n return response as Palette;\n}\n\nexport { getPallette };\n\n// const hexToRgb = (hex) => {\n// let d = hex?.split(\"#\")[1];\n// var aRgbHex = d?.match(/.{1,2}/g);\n// var aRgb = [\n// parseInt(aRgbHex[0], 16),\n// parseInt(aRgbHex[1], 16),\n// parseInt(aRgbHex[2], 16)\n// ];\n// return aRgb;\n// };\n// const getTextColor = (backColor) => {\n// let rgbArray = hexToRgb(backColor);\n// if (rgbArray[0] * 0.299 + rgbArray[1] * 0.587 + rgbArray[2] * 0.114 > 186) {\n// return \"#000000\";\n// } else {\n// return \"#ffffff\";\n// }\n// };\n// const replaceAt = function (string, index, replacement) {\n// // if (replacement == \"\" || replacement == \" \") {\n// // return (\n// // string.substring(0, index) +\n// // string.substring(index + replacement.length )\n// // );\n// // }\n// const replaced = string.substring(0, index) + replacement + string.substring(index + 1)\n// return replaced\n// };\n\n// export { hexToRgb, getTextColor, replaceAt };\n"],"mappings":";;;AAAA,YAAY,WAAW;AAEvB,YAAY,sBAAsB;;;ACFlC,SAAS,YAA6B;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADEA,IAAM,iBAAuB,iBAK3B,CAAC,EAAE,WAAW,QAAQ,UAAU,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,QACvE,oCAAkB,yBAAjB,EAAwB,aACvB;AAAA,EAAkB;AAAA,EAAjB;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACF,CACD;AACD,eAAe,cAA+B,yBAAQ;AAkBtD,IAAM,UAAsC,CAAC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,aAAa;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,MAAI,cAAc;AAAA,IAChB,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAEA,SACE,oCAAkB,uBAAjB,EAAsB,MAAa,GAAG,SACrC,oCAAkB,0BAAjB,EAAyB,WAAU,eAAc,UAAU,gBAAiB,GAAG,gBAC7E,OACH,GACA;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO;AAAA,QACL,OAAO,YAAY,KAAK;AAAA,QACxB,UAAU;AAAA,QACV,WAAW;AAAA,MACb;AAAA,MACC,GAAG;AAAA;AAAA,IAEH;AAAA,EACH,CACF;AAEJ;AAEA,IAAM,iBAAkC;AACxC,IAAM,gBAAiC;AACvC,IAAM,cAA+B;","names":[]}
|