@abumble/design-system 0.0.14 → 0.0.16
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/shared/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../src/utils/utils.ts"],"sourcesContent":["import type { ClassValue } from 'clsx';\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: Array<ClassValue>) {\n\treturn twMerge(clsx(inputs))\n}\n\n/**\n * Returns a random integer between 0 and max, inclusive.\n * @param {number} max - The maximum possible number (inclusive).\n */\nexport function getRandomIntUpTo(max: number) {\n\t// We use (max + 1) to make 'max' inclusive after Math.floor()\n\treturn Math.floor(Math.random() * (max + 1));\n}\n\nexport function stringToBoolean(str: string | null): boolean {\n\tif (!str) return false;\n\treturn [\"true\", \"1\", \"yes\"].includes(str.trim().toLowerCase());\n}\n\nexport function booleanToString(bool: boolean | null): string {\n\tif (!bool) return false.toString();\n\treturn bool.toString();\n}\n\n"],"names":["cn","inputs","twMerge","clsx","getRandomIntUpTo","max","stringToBoolean","str","booleanToString","bool"],"mappings":";;AAIO,SAASA,KAAMC,GAA2B;AAChD,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC5B;AAMO,SAASG,EAAiBC,GAAa;AAE7C,SAAO,KAAK,MAAM,KAAK,OAAA,KAAYA,IAAM,EAAE;AAC5C;AAEO,SAASC,EAAgBC,
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/utils/utils.ts"],"sourcesContent":["import type { ClassValue } from 'clsx';\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: Array<ClassValue>) {\n\treturn twMerge(clsx(inputs))\n}\n\n/**\n * Returns a random integer between 0 and max, inclusive.\n * @param {number} max - The maximum possible number (inclusive).\n */\nexport function getRandomIntUpTo(max: number) {\n\t// We use (max + 1) to make 'max' inclusive after Math.floor()\n\treturn Math.floor(Math.random() * (max + 1));\n}\n\nexport function stringToBoolean(str: string | null | undefined): boolean {\n\tif (!str) return false;\n\treturn [\"true\", \"1\", \"yes\"].includes(str.trim().toLowerCase());\n}\n\nexport function booleanToString(bool: boolean | null | undefined): string {\n\tif (!bool) return false.toString();\n\treturn bool.toString();\n}\n\n"],"names":["cn","inputs","twMerge","clsx","getRandomIntUpTo","max","stringToBoolean","str","booleanToString","bool"],"mappings":";;AAIO,SAASA,KAAMC,GAA2B;AAChD,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC5B;AAMO,SAASG,EAAiBC,GAAa;AAE7C,SAAO,KAAK,MAAM,KAAK,OAAA,KAAYA,IAAM,EAAE;AAC5C;AAEO,SAASC,EAAgBC,GAAyC;AACxE,SAAKA,IACE,CAAC,QAAQ,KAAK,KAAK,EAAE,SAASA,EAAI,OAAO,aAAa,IAD5C;AAElB;AAEO,SAASC,EAAgBC,GAA0C;AACzE,SAAKA,IACEA,EAAK,SAAA,IADM;AAEnB;"}
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export declare function cn(...inputs: Array<ClassValue>): string;
|
|
|
5
5
|
* @param {number} max - The maximum possible number (inclusive).
|
|
6
6
|
*/
|
|
7
7
|
export declare function getRandomIntUpTo(max: number): number;
|
|
8
|
-
export declare function stringToBoolean(str: string | null): boolean;
|
|
9
|
-
export declare function booleanToString(bool: boolean | null): string;
|
|
8
|
+
export declare function stringToBoolean(str: string | null | undefined): boolean;
|
|
9
|
+
export declare function booleanToString(bool: boolean | null | undefined): string;
|
|
10
10
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,UAE9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,UAG3C;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIvC,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,KAAK,CAAC,UAAU,CAAC,UAE9C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,UAG3C;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAGvE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAGxE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abumble/design-system",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"src/styles.css"
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
"build:js": "vite build && tsc -p tsconfig.build.json --emitDeclarationOnly",
|
|
109
109
|
"build": "npm run clean && npm run build:js",
|
|
110
110
|
"clean": "rm -rf dist",
|
|
111
|
+
"prepublishOnly": "npm run build",
|
|
111
112
|
"publish:npm": "npm publish --access public",
|
|
112
113
|
"dev": "vite",
|
|
113
114
|
"storybook": "storybook dev -p 6006",
|