@fuf-stack/pixels 1.3.8 → 1.5.0
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/Button/index.cjs +2 -2
- package/dist/Button/index.d.cts +3 -4
- package/dist/Button/index.d.ts +3 -4
- package/dist/Button/index.js +1 -1
- package/dist/{Button-BOaEQrs9.d.cts → Button-nJ22qVMK.d.cts} +7 -3
- package/dist/{Button-BOaEQrs9.d.ts → Button-nJ22qVMK.d.ts} +7 -3
- package/dist/Json/index.cjs +3 -3
- package/dist/Json/index.js +2 -2
- package/dist/Progress/index.cjs +3 -3
- package/dist/Progress/index.js +2 -2
- package/dist/ProgressCircular/index.cjs +3 -3
- package/dist/ProgressCircular/index.js +2 -2
- package/dist/{chunk-GGXNWO3B.js → chunk-2C53JQ3R.js} +8 -4
- package/dist/chunk-2C53JQ3R.js.map +1 -0
- package/dist/{chunk-FPR33UFC.js → chunk-2NMIKTA5.js} +55 -46
- package/dist/chunk-2NMIKTA5.js.map +1 -0
- package/dist/{chunk-IZM2I62C.js → chunk-65LUKHJB.js} +2 -2
- package/dist/{chunk-SCVJ4C6F.cjs → chunk-BVZHFHLJ.cjs} +8 -4
- package/dist/chunk-BVZHFHLJ.cjs.map +1 -0
- package/dist/{chunk-ZFHOZRR2.cjs → chunk-FVQDVD3E.cjs} +55 -46
- package/dist/chunk-FVQDVD3E.cjs.map +1 -0
- package/dist/{chunk-VVAZOJQG.cjs → chunk-IBP3GUEA.cjs} +3 -3
- package/dist/{chunk-VVAZOJQG.cjs.map → chunk-IBP3GUEA.cjs.map} +1 -1
- package/dist/{chunk-PENUA26F.js → chunk-JIK5JCPT.js} +2 -2
- package/dist/{chunk-PICJQ5IH.cjs → chunk-N7J3ZGJG.cjs} +3 -3
- package/dist/{chunk-PICJQ5IH.cjs.map → chunk-N7J3ZGJG.cjs.map} +1 -1
- package/dist/{chunk-JZNGNJI5.js → chunk-NGN5JCSI.js} +2 -2
- package/dist/{chunk-WSVXM7H4.cjs → chunk-ZOSD26X7.cjs} +3 -3
- package/dist/{chunk-WSVXM7H4.cjs.map → chunk-ZOSD26X7.cjs.map} +1 -1
- package/dist/hooks/index.cjs +2 -2
- package/dist/hooks/index.d.cts +8 -1
- package/dist/hooks/index.d.ts +8 -1
- package/dist/hooks/index.js +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +5 -5
- package/package.json +11 -9
- package/dist/chunk-FPR33UFC.js.map +0 -1
- package/dist/chunk-GGXNWO3B.js.map +0 -1
- package/dist/chunk-SCVJ4C6F.cjs.map +0 -1
- package/dist/chunk-ZFHOZRR2.cjs.map +0 -1
- /package/dist/{chunk-IZM2I62C.js.map → chunk-65LUKHJB.js.map} +0 -0
- /package/dist/{chunk-PENUA26F.js.map → chunk-JIK5JCPT.js.map} +0 -0
- /package/dist/{chunk-JZNGNJI5.js.map → chunk-NGN5JCSI.js.map} +0 -0
package/dist/Button/index.cjs
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkFVQDVD3Ecjs = require('../chunk-FVQDVD3E.cjs');
|
|
6
6
|
require('../chunk-AHEA4IJV.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
exports.Button =
|
|
11
|
+
exports.Button = _chunkFVQDVD3Ecjs.Button_default; exports.buttonVariants = _chunkFVQDVD3Ecjs.buttonVariants; exports.default = _chunkFVQDVD3Ecjs.Button_default2;
|
|
12
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Button/index.d.cts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { B as Button } from '../Button-
|
|
2
|
-
export { a as ButtonProps, b as buttonVariants } from '../Button-
|
|
3
|
-
import 'react
|
|
1
|
+
import { B as Button } from '../Button-nJ22qVMK.cjs';
|
|
2
|
+
export { a as ButtonProps, b as buttonVariants } from '../Button-nJ22qVMK.cjs';
|
|
3
|
+
import 'react';
|
|
4
4
|
import 'tailwind-variants';
|
|
5
5
|
import '@fuf-stack/pixel-utils';
|
|
6
6
|
import '@heroui/button';
|
|
7
|
-
import 'react';
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
|
package/dist/Button/index.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { B as Button } from '../Button-
|
|
2
|
-
export { a as ButtonProps, b as buttonVariants } from '../Button-
|
|
3
|
-
import 'react
|
|
1
|
+
import { B as Button } from '../Button-nJ22qVMK.js';
|
|
2
|
+
export { a as ButtonProps, b as buttonVariants } from '../Button-nJ22qVMK.js';
|
|
3
|
+
import 'react';
|
|
4
4
|
import 'tailwind-variants';
|
|
5
5
|
import '@fuf-stack/pixel-utils';
|
|
6
6
|
import '@heroui/button';
|
|
7
|
-
import 'react';
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
|
package/dist/Button/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import * as tailwind_variants from 'tailwind-variants';
|
|
3
4
|
import { TVProps } from '@fuf-stack/pixel-utils';
|
|
4
5
|
import { ButtonProps as ButtonProps$1 } from '@heroui/button';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
6
|
|
|
7
7
|
declare const buttonVariants: tailwind_variants.TVReturnType<{
|
|
8
8
|
color: {
|
|
@@ -235,8 +235,12 @@ interface ButtonProps extends VariantProps {
|
|
|
235
235
|
loading?: boolean;
|
|
236
236
|
/** optional icon */
|
|
237
237
|
icon?: ReactNode;
|
|
238
|
+
/** blur event handler */
|
|
239
|
+
onBlur?: ButtonProps$1['onBlur'];
|
|
238
240
|
/** click event handler */
|
|
239
241
|
onClick?: ButtonProps$1['onPress'];
|
|
242
|
+
/** focus event handler */
|
|
243
|
+
onFocus?: ButtonProps$1['onFocus'];
|
|
240
244
|
/** border radius size */
|
|
241
245
|
radius?: VariantProps['radius'];
|
|
242
246
|
/** enable ripple animation effect on click */
|
|
@@ -253,6 +257,6 @@ interface ButtonProps extends VariantProps {
|
|
|
253
257
|
/**
|
|
254
258
|
* Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)
|
|
255
259
|
*/
|
|
256
|
-
declare const Button:
|
|
260
|
+
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
257
261
|
|
|
258
262
|
export { Button as B, type ButtonProps as a, buttonVariants as b };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import * as tailwind_variants from 'tailwind-variants';
|
|
3
4
|
import { TVProps } from '@fuf-stack/pixel-utils';
|
|
4
5
|
import { ButtonProps as ButtonProps$1 } from '@heroui/button';
|
|
5
|
-
import { ReactNode } from 'react';
|
|
6
6
|
|
|
7
7
|
declare const buttonVariants: tailwind_variants.TVReturnType<{
|
|
8
8
|
color: {
|
|
@@ -235,8 +235,12 @@ interface ButtonProps extends VariantProps {
|
|
|
235
235
|
loading?: boolean;
|
|
236
236
|
/** optional icon */
|
|
237
237
|
icon?: ReactNode;
|
|
238
|
+
/** blur event handler */
|
|
239
|
+
onBlur?: ButtonProps$1['onBlur'];
|
|
238
240
|
/** click event handler */
|
|
239
241
|
onClick?: ButtonProps$1['onPress'];
|
|
242
|
+
/** focus event handler */
|
|
243
|
+
onFocus?: ButtonProps$1['onFocus'];
|
|
240
244
|
/** border radius size */
|
|
241
245
|
radius?: VariantProps['radius'];
|
|
242
246
|
/** enable ripple animation effect on click */
|
|
@@ -253,6 +257,6 @@ interface ButtonProps extends VariantProps {
|
|
|
253
257
|
/**
|
|
254
258
|
* Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)
|
|
255
259
|
*/
|
|
256
|
-
declare const Button:
|
|
260
|
+
declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
257
261
|
|
|
258
262
|
export { Button as B, type ButtonProps as a, buttonVariants as b };
|
package/dist/Json/index.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
4
|
+
var _chunkIBP3GUEAcjs = require('../chunk-IBP3GUEA.cjs');
|
|
5
|
+
require('../chunk-FVQDVD3E.cjs');
|
|
6
6
|
require('../chunk-AHEA4IJV.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.Json =
|
|
10
|
+
exports.Json = _chunkIBP3GUEAcjs.Json_default; exports.default = _chunkIBP3GUEAcjs.Json_default2;
|
|
11
11
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Json/index.js
CHANGED
package/dist/Progress/index.cjs
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var _chunkZOSD26X7cjs = require('../chunk-ZOSD26X7.cjs');
|
|
6
|
+
require('../chunk-BVZHFHLJ.cjs');
|
|
7
7
|
require('../chunk-AHEA4IJV.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.Progress =
|
|
12
|
+
exports.Progress = _chunkZOSD26X7cjs.Progress_default; exports.default = _chunkZOSD26X7cjs.Progress_default2; exports.progressVariants = _chunkZOSD26X7cjs.progressVariants;
|
|
13
13
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Progress/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
Progress_default,
|
|
3
3
|
Progress_default2,
|
|
4
4
|
progressVariants
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-JIK5JCPT.js";
|
|
6
|
+
import "../chunk-2C53JQ3R.js";
|
|
7
7
|
import "../chunk-OAIRL2FN.js";
|
|
8
8
|
export {
|
|
9
9
|
Progress_default as Progress,
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('../chunk-
|
|
5
|
+
var _chunkN7J3ZGJGcjs = require('../chunk-N7J3ZGJG.cjs');
|
|
6
|
+
require('../chunk-BVZHFHLJ.cjs');
|
|
7
7
|
require('../chunk-AHEA4IJV.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
exports.ProgressCircular =
|
|
12
|
+
exports.ProgressCircular = _chunkN7J3ZGJGcjs.ProgressCircular_default; exports.default = _chunkN7J3ZGJGcjs.ProgressCircular_default2; exports.progressCircularVariants = _chunkN7J3ZGJGcjs.progressCircularVariants;
|
|
13
13
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
ProgressCircular_default,
|
|
3
3
|
ProgressCircular_default2,
|
|
4
4
|
progressCircularVariants
|
|
5
|
-
} from "../chunk-
|
|
6
|
-
import "../chunk-
|
|
5
|
+
} from "../chunk-NGN5JCSI.js";
|
|
6
|
+
import "../chunk-2C53JQ3R.js";
|
|
7
7
|
import "../chunk-OAIRL2FN.js";
|
|
8
8
|
export {
|
|
9
9
|
ProgressCircular_default as ProgressCircular,
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
// src/hooks/useDebounce.ts
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
|
-
var useDebounce = (value, delay) => {
|
|
3
|
+
var useDebounce = (value, delay, disabled = false) => {
|
|
4
4
|
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
5
5
|
useEffect(
|
|
6
6
|
() => {
|
|
7
|
+
if (disabled) {
|
|
8
|
+
setDebouncedValue(value);
|
|
9
|
+
return void 0;
|
|
10
|
+
}
|
|
7
11
|
const handler = setTimeout(() => {
|
|
8
12
|
setDebouncedValue(value);
|
|
9
13
|
}, delay);
|
|
@@ -11,8 +15,8 @@ var useDebounce = (value, delay) => {
|
|
|
11
15
|
clearTimeout(handler);
|
|
12
16
|
};
|
|
13
17
|
},
|
|
14
|
-
[value, delay]
|
|
15
|
-
// Only re-call effect if value or
|
|
18
|
+
[value, delay, disabled]
|
|
19
|
+
// Only re-call effect if value, delay, or disabled changes
|
|
16
20
|
);
|
|
17
21
|
return debouncedValue;
|
|
18
22
|
};
|
|
@@ -80,4 +84,4 @@ export {
|
|
|
80
84
|
useIsInitialRenderCycle,
|
|
81
85
|
useLocalStorage
|
|
82
86
|
};
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-2C53JQ3R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/useDebounce.ts","../src/hooks/useIsInitialRenderCycle.ts","../src/hooks/useLocalStorage.ts"],"sourcesContent":["/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useState } from 'react';\n\n/**\n * Hook that debounces a value\n * @param value - The value to debounce\n * @param delay - Delay in milliseconds\n * @param disabled - If true, returns the value immediately without debouncing\n * @returns The debounced value\n */\nexport const useDebounce = <Value>(\n value: Value,\n delay: number,\n disabled = false,\n) => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(\n () => {\n // If disabled, update immediately\n if (disabled) {\n setDebouncedValue(value);\n return undefined;\n }\n\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n },\n [value, delay, disabled], // Only re-call effect if value, delay, or disabled changes\n );\n\n return debouncedValue;\n};\n","/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useRef } from 'react';\n\n/**\n * A hook that returns true on initial render and false afterward.\n *\n * @returns {boolean} - True on initial render, false afterward\n */\nexport const useIsInitialRenderCycle = (): boolean => {\n // Use ref to avoid re-renders\n const isInitialRender = useRef(true);\n\n // Update ref after first render\n useEffect(() => {\n // Set to false after component mounts\n isInitialRender.current = false;\n\n // No cleanup needed for this effect\n }, []);\n\n return isInitialRender.current;\n};\n","/* eslint-disable import-x/prefer-default-export */\n\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport { useEffect, useState } from 'react';\n\nexport const useLocalStorage = <T>(\n key: string,\n initialValue: T | (() => T),\n): [T, Dispatch<SetStateAction<T>>] => {\n // Get from local storage then\n // parse stored json or return initialValue\n const readValue = () => {\n // Prevent build error \"window is undefined\" but keep keep working\n if (typeof window === 'undefined') {\n return initialValue;\n }\n\n try {\n const item = window.localStorage.getItem(key);\n return item ? JSON.parse(item) : initialValue;\n } catch (error) {\n console.warn(`Error reading localStorage key “${key}”:`, error);\n return initialValue;\n }\n };\n\n // State to store our value\n // Pass initial state function to useState so logic is only executed once\n const [storedValue, setStoredValue] = useState<T>(readValue);\n\n // Return a wrapped version of useState's setter function that ...\n // ... persists the new value to localStorage.\n const setValue: Dispatch<SetStateAction<T>> = (value) => {\n // Prevent build error \"window is undefined\" but keeps working\n if (typeof window === 'undefined') {\n console.warn(\n `Tried setting localStorage key “${key}” even though environment is not a client`,\n );\n }\n\n try {\n // Allow value to be a function so we have the same API as useState\n const newValue = value instanceof Function ? value(storedValue) : value;\n\n // Save to local storage\n window.localStorage.setItem(key, JSON.stringify(newValue));\n\n // Save state\n setStoredValue(newValue);\n\n // We dispatch a custom event so every useLocalStorage hook are notified\n window.dispatchEvent(new Event('local-storage'));\n } catch (error) {\n console.warn(`Error setting localStorage key “${key}”:`, error);\n }\n };\n\n useEffect(() => {\n setStoredValue(readValue());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n const handleStorageChange = () => {\n setStoredValue(readValue());\n };\n\n // this only works for other documents, not the current one\n window.addEventListener('storage', handleStorageChange);\n\n // this is a custom event, triggered in writeValueToLocalStorage\n window.addEventListener('local-storage', handleStorageChange);\n\n return () => {\n window.removeEventListener('storage', handleStorageChange);\n window.removeEventListener('local-storage', handleStorageChange);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return [storedValue, setValue];\n};\n"],"mappings":";AAEA,SAAS,WAAW,gBAAgB;AAS7B,IAAM,cAAc,CACzB,OACA,OACA,WAAW,UACR;AAEH,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,KAAK;AAE1D;AAAA,IACE,MAAM;AAEJ,UAAI,UAAU;AACZ,0BAAkB,KAAK;AACvB,eAAO;AAAA,MACT;AAGA,YAAM,UAAU,WAAW,MAAM;AAC/B,0BAAkB,KAAK;AAAA,MACzB,GAAG,KAAK;AAKR,aAAO,MAAM;AACX,qBAAa,OAAO;AAAA,MACtB;AAAA,IACF;AAAA,IACA,CAAC,OAAO,OAAO,QAAQ;AAAA;AAAA,EACzB;AAEA,SAAO;AACT;;;ACzCA,SAAS,aAAAA,YAAW,cAAc;AAO3B,IAAM,0BAA0B,MAAe;AAEpD,QAAM,kBAAkB,OAAO,IAAI;AAGnC,EAAAA,WAAU,MAAM;AAEd,oBAAgB,UAAU;AAAA,EAG5B,GAAG,CAAC,CAAC;AAEL,SAAO,gBAAgB;AACzB;;;AClBA,SAAS,aAAAC,YAAW,YAAAC,iBAAgB;AAE7B,IAAM,kBAAkB,CAC7B,KACA,iBACqC;AAGrC,QAAM,YAAY,MAAM;AAEtB,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AAEA,QAAI;AACF,YAAM,OAAO,OAAO,aAAa,QAAQ,GAAG;AAC5C,aAAO,OAAO,KAAK,MAAM,IAAI,IAAI;AAAA,IACnC,SAAS,OAAO;AACd,cAAQ,KAAK,wCAAmC,GAAG,WAAM,KAAK;AAC9D,aAAO;AAAA,IACT;AAAA,EACF;AAIA,QAAM,CAAC,aAAa,cAAc,IAAIA,UAAY,SAAS;AAI3D,QAAM,WAAwC,CAAC,UAAU;AAEvD,QAAI,OAAO,WAAW,aAAa;AACjC,cAAQ;AAAA,QACN,wCAAmC,GAAG;AAAA,MACxC;AAAA,IACF;AAEA,QAAI;AAEF,YAAM,WAAW,iBAAiB,WAAW,MAAM,WAAW,IAAI;AAGlE,aAAO,aAAa,QAAQ,KAAK,KAAK,UAAU,QAAQ,CAAC;AAGzD,qBAAe,QAAQ;AAGvB,aAAO,cAAc,IAAI,MAAM,eAAe,CAAC;AAAA,IACjD,SAAS,OAAO;AACd,cAAQ,KAAK,wCAAmC,GAAG,WAAM,KAAK;AAAA,IAChE;AAAA,EACF;AAEA,EAAAD,WAAU,MAAM;AACd,mBAAe,UAAU,CAAC;AAAA,EAE5B,GAAG,CAAC,CAAC;AAEL,EAAAA,WAAU,MAAM;AACd,UAAM,sBAAsB,MAAM;AAChC,qBAAe,UAAU,CAAC;AAAA,IAC5B;AAGA,WAAO,iBAAiB,WAAW,mBAAmB;AAGtD,WAAO,iBAAiB,iBAAiB,mBAAmB;AAE5D,WAAO,MAAM;AACX,aAAO,oBAAoB,WAAW,mBAAmB;AACzD,aAAO,oBAAoB,iBAAiB,mBAAmB;AAAA,IACjE;AAAA,EAEF,GAAG,CAAC,CAAC;AAEL,SAAO,CAAC,aAAa,QAAQ;AAC/B;","names":["useEffect","useEffect","useState"]}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-OAIRL2FN.js";
|
|
5
5
|
|
|
6
6
|
// src/Button/Button.tsx
|
|
7
|
+
import { forwardRef } from "react";
|
|
7
8
|
import { Button as HeroButton } from "@heroui/button";
|
|
8
9
|
import { button as heroButtonVariants } from "@heroui/theme";
|
|
9
10
|
import { tv } from "@fuf-stack/pixel-utils";
|
|
@@ -116,52 +117,60 @@ var buttonVariants = tv({
|
|
|
116
117
|
}
|
|
117
118
|
]
|
|
118
119
|
});
|
|
119
|
-
var Button = (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
variant,
|
|
143
|
-
isIconOnly: !!(icon && !children),
|
|
144
|
-
radius
|
|
145
|
-
});
|
|
146
|
-
return /* @__PURE__ */ jsxs2(
|
|
147
|
-
HeroButton,
|
|
148
|
-
{
|
|
149
|
-
"aria-label": ariaLabel,
|
|
150
|
-
className,
|
|
151
|
-
"data-testid": testId,
|
|
152
|
-
disableRipple: disableAnimation || !ripple,
|
|
120
|
+
var Button = forwardRef(
|
|
121
|
+
({
|
|
122
|
+
ariaLabel = void 0,
|
|
123
|
+
children = void 0,
|
|
124
|
+
className: _className = void 0,
|
|
125
|
+
color = "default",
|
|
126
|
+
disableAnimation = false,
|
|
127
|
+
disabled = false,
|
|
128
|
+
icon = void 0,
|
|
129
|
+
loading = false,
|
|
130
|
+
onBlur = void 0,
|
|
131
|
+
onClick = void 0,
|
|
132
|
+
onFocus = void 0,
|
|
133
|
+
radius = void 0,
|
|
134
|
+
ripple = false,
|
|
135
|
+
size = void 0,
|
|
136
|
+
testId = void 0,
|
|
137
|
+
type = void 0,
|
|
138
|
+
variant = "solid"
|
|
139
|
+
}, ref) => {
|
|
140
|
+
const className = buttonVariants({
|
|
141
|
+
className: _className,
|
|
142
|
+
disableAnimation,
|
|
153
143
|
isDisabled: disabled,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
144
|
+
color,
|
|
145
|
+
size,
|
|
146
|
+
variant,
|
|
147
|
+
isIconOnly: !!(icon && !children),
|
|
148
|
+
radius
|
|
149
|
+
});
|
|
150
|
+
return /* @__PURE__ */ jsxs2(
|
|
151
|
+
HeroButton,
|
|
152
|
+
{
|
|
153
|
+
ref,
|
|
154
|
+
"aria-label": ariaLabel,
|
|
155
|
+
className,
|
|
156
|
+
"data-testid": testId,
|
|
157
|
+
disableRipple: disableAnimation || !ripple,
|
|
158
|
+
isDisabled: disabled,
|
|
159
|
+
isLoading: loading,
|
|
160
|
+
onBlur,
|
|
161
|
+
onFocus,
|
|
162
|
+
onPress: onClick,
|
|
163
|
+
spinner: /* @__PURE__ */ jsx2(LoadingSpinner_default, {}),
|
|
164
|
+
type,
|
|
165
|
+
children: [
|
|
166
|
+
icon,
|
|
167
|
+
children
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
Button.displayName = "Button";
|
|
165
174
|
var Button_default = Button;
|
|
166
175
|
|
|
167
176
|
// src/Button/index.ts
|
|
@@ -172,4 +181,4 @@ export {
|
|
|
172
181
|
Button_default,
|
|
173
182
|
Button_default2
|
|
174
183
|
};
|
|
175
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-2NMIKTA5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Button/Button.tsx","../src/Button/subcomponents/LoadingSpinner.tsx","../src/Button/index.ts"],"sourcesContent":["import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n extend: heroButtonVariants,\n variants: {\n color: {\n ...heroButtonVariants.variants.color,\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/button.ts\n info: '',\n },\n variant: heroButtonVariants.variants.variant,\n size: heroButtonVariants.variants.size,\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'success',\n variant: 'shadow',\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'warning',\n variant: 'shadow',\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'shadow-info/40 bg-info text-info-foreground shadow-lg',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\ntype VariantProps = TVProps<typeof buttonVariants>;\n\n/* eslint-disable react/require-default-props -- not working with forwardRef */\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** content of the button */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the button */\n color?: VariantProps['color'];\n /** disables the button */\n disabled?: boolean;\n /** disables all animations */\n disableAnimation?: boolean;\n /** shows loading animation */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** blur event handler */\n onBlur?: HeroButtonProps['onBlur'];\n /** click event handler */\n onClick?: HeroButtonProps['onPress'];\n /** focus event handler */\n onFocus?: HeroButtonProps['onFocus'];\n /** border radius size */\n radius?: VariantProps['radius'];\n /** enable ripple animation effect on click */\n ripple?: boolean;\n /** size options */\n size?: VariantProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** HTML button type attribute */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** visual style variant */\n variant?: VariantProps['variant'];\n}\n/* eslint-enable react/require-default-props */\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n ariaLabel = undefined,\n children = undefined,\n className: _className = undefined,\n color = 'default',\n disableAnimation = false,\n disabled = false,\n icon = undefined,\n loading = false,\n onBlur = undefined,\n onClick = undefined,\n onFocus = undefined,\n radius = undefined,\n ripple = false,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n },\n ref,\n ) => {\n const className = buttonVariants({\n className: _className,\n disableAnimation,\n isDisabled: disabled,\n color,\n size,\n variant,\n isIconOnly: !!(icon && !children),\n radius,\n });\n\n return (\n <HeroButton\n ref={ref}\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n disableRipple={disableAnimation || !ripple}\n isDisabled={disabled}\n isLoading={loading}\n onBlur={onBlur}\n onFocus={onFocus}\n onPress={onClick}\n spinner={<LoadingSpinner />}\n type={type}\n >\n {icon}\n {children}\n </HeroButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://www.heroui.com//docs/components/button#loading\n * */\nconst LoadingSpinner = () => {\n return (\n <svg\n className=\"h-5 w-5 animate-spin text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default LoadingSpinner;\n","import Button, { buttonVariants } from './Button';\n\nexport type { ButtonProps } from './Button';\n\nexport { Button, buttonVariants };\n\nexport default Button;\n"],"mappings":";;;;;;AAIA,SAAS,kBAAkB;AAE3B,SAAS,UAAU,kBAAkB;AACrC,SAAS,UAAU,0BAA0B;AAE7C,SAAS,UAAU;;;ACHf,SAME,KANF;AAFJ,IAAM,iBAAiB,MAAM;AAC3B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,MAAK;AAAA,MACL,SAAQ;AAAA,MACR,OAAM;AAAA,MAEN;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,IAAG;AAAA,YACH,IAAG;AAAA,YACH,GAAE;AAAA,YACF,QAAO;AAAA,YACP,aAAY;AAAA;AAAA,QACd;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,GAAE;AAAA,YACF,MAAK;AAAA;AAAA,QACP;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,yBAAQ;;;ADwIT,SAWW,OAAAA,MAXX,QAAAC,aAAA;AAxJC,IAAM,iBAAiB,GAAG;AAAA,EAC/B,QAAQ;AAAA,EACR,UAAU;AAAA,IACR,OAAO,iCACF,mBAAmB,SAAS,QAD1B;AAAA;AAAA,MAGL,MAAM;AAAA,IACR;AAAA,IACA,SAAS,mBAAmB,SAAS;AAAA,IACrC,MAAM,mBAAmB,SAAS;AAAA,EACpC;AAAA,EACA,kBAAkB;AAAA;AAAA,IAEhB;AAAA,MACE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,OAAO;AAAA,IACT;AAAA;AAAA,IAEA;AAAA,MACE,OAAO;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cAAY;AAAA,QACZ;AAAA,QACA,eAAa;AAAA,QACb,eAAe,oBAAoB,CAAC;AAAA,QACpC,YAAY;AAAA,QACZ,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA,SAAS;AAAA,QACT,SAAS,gBAAAD,KAAC,0BAAe;AAAA,QACzB;AAAA,QAEC;AAAA;AAAA,UACA;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,OAAO,cAAc;AAErB,IAAO,iBAAQ;;;AEtLf,IAAOE,kBAAQ;","names":["jsx","jsxs","Button_default"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-2NMIKTA5.js";
|
|
4
4
|
import {
|
|
5
5
|
__async,
|
|
6
6
|
__commonJS,
|
|
@@ -2793,4 +2793,4 @@ export {
|
|
|
2793
2793
|
Json_default,
|
|
2794
2794
|
Json_default2
|
|
2795
2795
|
};
|
|
2796
|
-
//# sourceMappingURL=chunk-
|
|
2796
|
+
//# sourceMappingURL=chunk-65LUKHJB.js.map
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/hooks/useDebounce.ts
|
|
2
2
|
var _react = require('react');
|
|
3
|
-
var useDebounce = (value, delay) => {
|
|
3
|
+
var useDebounce = (value, delay, disabled = false) => {
|
|
4
4
|
const [debouncedValue, setDebouncedValue] = _react.useState.call(void 0, value);
|
|
5
5
|
_react.useEffect.call(void 0,
|
|
6
6
|
() => {
|
|
7
|
+
if (disabled) {
|
|
8
|
+
setDebouncedValue(value);
|
|
9
|
+
return void 0;
|
|
10
|
+
}
|
|
7
11
|
const handler = setTimeout(() => {
|
|
8
12
|
setDebouncedValue(value);
|
|
9
13
|
}, delay);
|
|
@@ -11,8 +15,8 @@ var useDebounce = (value, delay) => {
|
|
|
11
15
|
clearTimeout(handler);
|
|
12
16
|
};
|
|
13
17
|
},
|
|
14
|
-
[value, delay]
|
|
15
|
-
// Only re-call effect if value or
|
|
18
|
+
[value, delay, disabled]
|
|
19
|
+
// Only re-call effect if value, delay, or disabled changes
|
|
16
20
|
);
|
|
17
21
|
return debouncedValue;
|
|
18
22
|
};
|
|
@@ -80,4 +84,4 @@ var useLocalStorage = (key, initialValue) => {
|
|
|
80
84
|
|
|
81
85
|
|
|
82
86
|
exports.useDebounce = useDebounce; exports.useIsInitialRenderCycle = useIsInitialRenderCycle; exports.useLocalStorage = useLocalStorage;
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-BVZHFHLJ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-BVZHFHLJ.cjs","../src/hooks/useDebounce.ts","../src/hooks/useIsInitialRenderCycle.ts","../src/hooks/useLocalStorage.ts"],"names":["useEffect","useState"],"mappings":"AAAA;ACEA,8BAAoC;AAS7B,IAAM,YAAA,EAAc,CACzB,KAAA,EACA,KAAA,EACA,SAAA,EAAW,KAAA,EAAA,GACR;AAEH,EAAA,MAAM,CAAC,cAAA,EAAgB,iBAAiB,EAAA,EAAI,6BAAA,KAAc,CAAA;AAE1D,EAAA,8BAAA;AAAA,IACE,CAAA,EAAA,GAAM;AAEJ,MAAA,GAAA,CAAI,QAAA,EAAU;AACZ,QAAA,iBAAA,CAAkB,KAAK,CAAA;AACvB,QAAA,OAAO,KAAA,CAAA;AAAA,MACT;AAGA,MAAA,MAAM,QAAA,EAAU,UAAA,CAAW,CAAA,EAAA,GAAM;AAC/B,QAAA,iBAAA,CAAkB,KAAK,CAAA;AAAA,MACzB,CAAA,EAAG,KAAK,CAAA;AAKR,MAAA,OAAO,CAAA,EAAA,GAAM;AACX,QAAA,YAAA,CAAa,OAAO,CAAA;AAAA,MACtB,CAAA;AAAA,IACF,CAAA;AAAA,IACA,CAAC,KAAA,EAAO,KAAA,EAAO,QA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E;AACA;AACA;AACF,wIAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-BVZHFHLJ.cjs","sourcesContent":[null,"/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useState } from 'react';\n\n/**\n * Hook that debounces a value\n * @param value - The value to debounce\n * @param delay - Delay in milliseconds\n * @param disabled - If true, returns the value immediately without debouncing\n * @returns The debounced value\n */\nexport const useDebounce = <Value>(\n value: Value,\n delay: number,\n disabled = false,\n) => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState(value);\n\n useEffect(\n () => {\n // If disabled, update immediately\n if (disabled) {\n setDebouncedValue(value);\n return undefined;\n }\n\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n },\n [value, delay, disabled], // Only re-call effect if value, delay, or disabled changes\n );\n\n return debouncedValue;\n};\n","/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useRef } from 'react';\n\n/**\n * A hook that returns true on initial render and false afterward.\n *\n * @returns {boolean} - True on initial render, false afterward\n */\nexport const useIsInitialRenderCycle = (): boolean => {\n // Use ref to avoid re-renders\n const isInitialRender = useRef(true);\n\n // Update ref after first render\n useEffect(() => {\n // Set to false after component mounts\n isInitialRender.current = false;\n\n // No cleanup needed for this effect\n }, []);\n\n return isInitialRender.current;\n};\n","/* eslint-disable import-x/prefer-default-export */\n\nimport type { Dispatch, SetStateAction } from 'react';\n\nimport { useEffect, useState } from 'react';\n\nexport const useLocalStorage = <T>(\n key: string,\n initialValue: T | (() => T),\n): [T, Dispatch<SetStateAction<T>>] => {\n // Get from local storage then\n // parse stored json or return initialValue\n const readValue = () => {\n // Prevent build error \"window is undefined\" but keep keep working\n if (typeof window === 'undefined') {\n return initialValue;\n }\n\n try {\n const item = window.localStorage.getItem(key);\n return item ? JSON.parse(item) : initialValue;\n } catch (error) {\n console.warn(`Error reading localStorage key “${key}”:`, error);\n return initialValue;\n }\n };\n\n // State to store our value\n // Pass initial state function to useState so logic is only executed once\n const [storedValue, setStoredValue] = useState<T>(readValue);\n\n // Return a wrapped version of useState's setter function that ...\n // ... persists the new value to localStorage.\n const setValue: Dispatch<SetStateAction<T>> = (value) => {\n // Prevent build error \"window is undefined\" but keeps working\n if (typeof window === 'undefined') {\n console.warn(\n `Tried setting localStorage key “${key}” even though environment is not a client`,\n );\n }\n\n try {\n // Allow value to be a function so we have the same API as useState\n const newValue = value instanceof Function ? value(storedValue) : value;\n\n // Save to local storage\n window.localStorage.setItem(key, JSON.stringify(newValue));\n\n // Save state\n setStoredValue(newValue);\n\n // We dispatch a custom event so every useLocalStorage hook are notified\n window.dispatchEvent(new Event('local-storage'));\n } catch (error) {\n console.warn(`Error setting localStorage key “${key}”:`, error);\n }\n };\n\n useEffect(() => {\n setStoredValue(readValue());\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n useEffect(() => {\n const handleStorageChange = () => {\n setStoredValue(readValue());\n };\n\n // this only works for other documents, not the current one\n window.addEventListener('storage', handleStorageChange);\n\n // this is a custom event, triggered in writeValueToLocalStorage\n window.addEventListener('local-storage', handleStorageChange);\n\n return () => {\n window.removeEventListener('storage', handleStorageChange);\n window.removeEventListener('local-storage', handleStorageChange);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return [storedValue, setValue];\n};\n"]}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
var _chunkAHEA4IJVcjs = require('./chunk-AHEA4IJV.cjs');
|
|
5
5
|
|
|
6
6
|
// src/Button/Button.tsx
|
|
7
|
+
var _react = require('react');
|
|
7
8
|
var _button = require('@heroui/button');
|
|
8
9
|
var _theme = require('@heroui/theme');
|
|
9
10
|
var _pixelutils = require('@fuf-stack/pixel-utils');
|
|
@@ -116,52 +117,60 @@ var buttonVariants = _pixelutils.tv.call(void 0, {
|
|
|
116
117
|
}
|
|
117
118
|
]
|
|
118
119
|
});
|
|
119
|
-
var Button = (
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
variant,
|
|
143
|
-
isIconOnly: !!(icon && !children),
|
|
144
|
-
radius
|
|
145
|
-
});
|
|
146
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
147
|
-
_button.Button,
|
|
148
|
-
{
|
|
149
|
-
"aria-label": ariaLabel,
|
|
150
|
-
className,
|
|
151
|
-
"data-testid": testId,
|
|
152
|
-
disableRipple: disableAnimation || !ripple,
|
|
120
|
+
var Button = _react.forwardRef.call(void 0,
|
|
121
|
+
({
|
|
122
|
+
ariaLabel = void 0,
|
|
123
|
+
children = void 0,
|
|
124
|
+
className: _className = void 0,
|
|
125
|
+
color = "default",
|
|
126
|
+
disableAnimation = false,
|
|
127
|
+
disabled = false,
|
|
128
|
+
icon = void 0,
|
|
129
|
+
loading = false,
|
|
130
|
+
onBlur = void 0,
|
|
131
|
+
onClick = void 0,
|
|
132
|
+
onFocus = void 0,
|
|
133
|
+
radius = void 0,
|
|
134
|
+
ripple = false,
|
|
135
|
+
size = void 0,
|
|
136
|
+
testId = void 0,
|
|
137
|
+
type = void 0,
|
|
138
|
+
variant = "solid"
|
|
139
|
+
}, ref) => {
|
|
140
|
+
const className = buttonVariants({
|
|
141
|
+
className: _className,
|
|
142
|
+
disableAnimation,
|
|
153
143
|
isDisabled: disabled,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
144
|
+
color,
|
|
145
|
+
size,
|
|
146
|
+
variant,
|
|
147
|
+
isIconOnly: !!(icon && !children),
|
|
148
|
+
radius
|
|
149
|
+
});
|
|
150
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
151
|
+
_button.Button,
|
|
152
|
+
{
|
|
153
|
+
ref,
|
|
154
|
+
"aria-label": ariaLabel,
|
|
155
|
+
className,
|
|
156
|
+
"data-testid": testId,
|
|
157
|
+
disableRipple: disableAnimation || !ripple,
|
|
158
|
+
isDisabled: disabled,
|
|
159
|
+
isLoading: loading,
|
|
160
|
+
onBlur,
|
|
161
|
+
onFocus,
|
|
162
|
+
onPress: onClick,
|
|
163
|
+
spinner: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, LoadingSpinner_default, {}),
|
|
164
|
+
type,
|
|
165
|
+
children: [
|
|
166
|
+
icon,
|
|
167
|
+
children
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
);
|
|
173
|
+
Button.displayName = "Button";
|
|
165
174
|
var Button_default = Button;
|
|
166
175
|
|
|
167
176
|
// src/Button/index.ts
|
|
@@ -172,4 +181,4 @@ var Button_default2 = Button_default;
|
|
|
172
181
|
|
|
173
182
|
|
|
174
183
|
exports.buttonVariants = buttonVariants; exports.Button_default = Button_default; exports.Button_default2 = Button_default2;
|
|
175
|
-
//# sourceMappingURL=chunk-
|
|
184
|
+
//# sourceMappingURL=chunk-FVQDVD3E.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-FVQDVD3E.cjs","../src/Button/Button.tsx","../src/Button/subcomponents/LoadingSpinner.tsx","../src/Button/index.ts"],"names":["jsxs","jsx","Button_default"],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACDA,8BAA2B;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AA,QACT,OAAA,kBAASC,6BAAAA,sBAAC,EAAA,CAAA,CAAe,CAAA;AAAA,QACzB,IAAA;AAAA,QAEC,QAAA,EAAA;AAAA,UAAA,IAAA;AAAA,UACA;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,CAAA;AAAA,EAEJ;AACF,CAAA;AAEA,MAAA,CAAO,YAAA,EAAc,QAAA;AAErB,IAAO,eAAA,EAAQ,MAAA;ADdf;AACA;AGzKA,IAAOC,gBAAAA,EAAQ,cAAA;AH2Kf;AACA;AACE;AACA;AACA;AACF,4HAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-FVQDVD3E.cjs","sourcesContent":[null,"import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { forwardRef } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n extend: heroButtonVariants,\n variants: {\n color: {\n ...heroButtonVariants.variants.color,\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/button.ts\n info: '',\n },\n variant: heroButtonVariants.variants.variant,\n size: heroButtonVariants.variants.size,\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'success',\n variant: 'shadow',\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: 'solid',\n class: 'text-white',\n },\n {\n color: 'warning',\n variant: 'shadow',\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-info-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'shadow-info/40 bg-info text-info-foreground shadow-lg',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info/20 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\ntype VariantProps = TVProps<typeof buttonVariants>;\n\n/* eslint-disable react/require-default-props -- not working with forwardRef */\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** content of the button */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the button */\n color?: VariantProps['color'];\n /** disables the button */\n disabled?: boolean;\n /** disables all animations */\n disableAnimation?: boolean;\n /** shows loading animation */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** blur event handler */\n onBlur?: HeroButtonProps['onBlur'];\n /** click event handler */\n onClick?: HeroButtonProps['onPress'];\n /** focus event handler */\n onFocus?: HeroButtonProps['onFocus'];\n /** border radius size */\n radius?: VariantProps['radius'];\n /** enable ripple animation effect on click */\n ripple?: boolean;\n /** size options */\n size?: VariantProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** HTML button type attribute */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** visual style variant */\n variant?: VariantProps['variant'];\n}\n/* eslint-enable react/require-default-props */\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n ariaLabel = undefined,\n children = undefined,\n className: _className = undefined,\n color = 'default',\n disableAnimation = false,\n disabled = false,\n icon = undefined,\n loading = false,\n onBlur = undefined,\n onClick = undefined,\n onFocus = undefined,\n radius = undefined,\n ripple = false,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n },\n ref,\n ) => {\n const className = buttonVariants({\n className: _className,\n disableAnimation,\n isDisabled: disabled,\n color,\n size,\n variant,\n isIconOnly: !!(icon && !children),\n radius,\n });\n\n return (\n <HeroButton\n ref={ref}\n aria-label={ariaLabel}\n className={className}\n data-testid={testId}\n disableRipple={disableAnimation || !ripple}\n isDisabled={disabled}\n isLoading={loading}\n onBlur={onBlur}\n onFocus={onFocus}\n onPress={onClick}\n spinner={<LoadingSpinner />}\n type={type}\n >\n {icon}\n {children}\n </HeroButton>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://www.heroui.com//docs/components/button#loading\n * */\nconst LoadingSpinner = () => {\n return (\n <svg\n className=\"h-5 w-5 animate-spin text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n );\n};\n\nexport default LoadingSpinner;\n","import Button, { buttonVariants } from './Button';\n\nexport type { ButtonProps } from './Button';\n\nexport { Button, buttonVariants };\n\nexport default Button;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkFVQDVD3Ecjs = require('./chunk-FVQDVD3E.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -2666,7 +2666,7 @@ var ErrorRenderer = ({
|
|
|
2666
2666
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium", children: "Failed to parse JSON data" })
|
|
2667
2667
|
] }),
|
|
2668
2668
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
2669
|
-
|
|
2669
|
+
_chunkFVQDVD3Ecjs.Button_default,
|
|
2670
2670
|
{
|
|
2671
2671
|
"aria-controls": "error-details",
|
|
2672
2672
|
"aria-expanded": showDetails,
|
|
@@ -2793,4 +2793,4 @@ var Json_default2 = Json_default;
|
|
|
2793
2793
|
|
|
2794
2794
|
|
|
2795
2795
|
exports.Json_default = Json_default; exports.Json_default2 = Json_default2;
|
|
2796
|
-
//# sourceMappingURL=chunk-
|
|
2796
|
+
//# sourceMappingURL=chunk-IBP3GUEA.cjs.map
|