@stamcat/craftsman 0.0.23-alpha.1

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/Button.es.js ADDED
@@ -0,0 +1,5 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ const r = (t) => /* @__PURE__ */ o("button", { ...t });
3
+ export {
4
+ r as Button
5
+ };
@@ -0,0 +1,6 @@
1
+ import { Button as r } from "./Button.es.js";
2
+ import { Input as e } from "./Input.es.js";
3
+ export {
4
+ r as Button,
5
+ e as Input
6
+ };
package/Input.es.js ADDED
@@ -0,0 +1,5 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ const n = (t) => /* @__PURE__ */ o("input", { ...t });
3
+ export {
4
+ n as Input
5
+ };
@@ -0,0 +1,2 @@
1
+ export type ButtonProps = React.ComponentProps<"button">;
2
+ export declare const Button: React.FC<ButtonProps>;
@@ -0,0 +1,2 @@
1
+ export type InputProps = React.ComponentProps<"input">;
2
+ export declare const Input: React.FC<InputProps>;
@@ -0,0 +1,2 @@
1
+ export { Button } from './Button';
2
+ export { Input } from './Input';
@@ -0,0 +1,3 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconCalendar(props: Readonly<React.SVGProps<SVGSVGElement>>): React.JSX.Element;
3
+ export default IconCalendar;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconChevronRight(props: Readonly<React.SVGProps<SVGSVGElement>>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconCircleAlert(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconCircleCheck(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconCircleHelp(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconCircleInfo(props: React.SVGProps<SVGSVGElement>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconEye(props: Readonly<React.SVGProps<SVGSVGElement>>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconEyeClosed(props: Readonly<React.SVGProps<SVGSVGElement>>): React.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare function IconX(props: Readonly<React.SVGProps<SVGSVGElement>>): React.JSX.Element;
package/main.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@stamcat/craftsman",
3
+ "version": "0.0.23-alpha.1",
4
+ "type": "module",
5
+ "description": "A powerful, lightweight framework for design systems",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/Stamcat/craftsman.git"
9
+ },
10
+ "keywords": [
11
+ "design system",
12
+ "reusable components"
13
+ ],
14
+ "author": "Devin Marra",
15
+ "license": "MIT",
16
+ "bugs": {
17
+ "url": "https://github.com/Stamcat/craftsman/issues"
18
+ },
19
+ "types": "index.d.ts",
20
+ "main": "index.js",
21
+ "homepage": "https://github.com/Stamcat/craftsman#readme",
22
+ "scripts": {
23
+ "prepublishOnly": "node ./scripts/prepublishCheck.js"
24
+ },
25
+ "dependencies": {
26
+ "@emotion/react": "11.14.0",
27
+ "@emotion/styled": "11.14.1",
28
+ "dompurify": "3.2.6",
29
+ "emotion": "11.0.0",
30
+ "react": "19.1.1",
31
+ "react-date-picker": "12.0.1",
32
+ "react-datetime-picker": "7.0.1",
33
+ "react-dom": "19.1.1",
34
+ "react-international-phone": "4.6.0",
35
+ "zod": "4.1.9"
36
+ },
37
+ "devDependencies": {},
38
+ "exports": {
39
+ "./Button": {
40
+ "types": "./Button.d.ts",
41
+ "default": "./Button.es.js"
42
+ },
43
+ "./Input": {
44
+ "types": "./Input.d.ts",
45
+ "default": "./Input.es.js"
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync } from "fs";
3
+ import { join } from "path";
4
+
5
+ const { version } = JSON.parse(readFileSync(join(process.cwd(), "package.json"), "utf-8"));
6
+ const isPreRelease = /-(alpha|beta)\./.test(version);
7
+
8
+ if (!isPreRelease && !process.env.CI) {
9
+ console.error(
10
+ "\x1b[31mERROR: Full releases can only be published from CI. " +
11
+ "Use an alpha or beta pre-release for local publishing (e.g. npm run release:alpha).\x1b[0m"
12
+ );
13
+ process.exit(1);
14
+ }
@@ -0,0 +1,8 @@
1
+ import { Meta, StoryObj } from '@storybook/react-vite';
2
+ import { Button } from '../components/Button';
3
+ declare const meta: Meta<typeof Button>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Default: Story;
7
+ export declare const Disabled: Story;
8
+ export declare const AsSubmit: Story;
@@ -0,0 +1 @@
1
+ export declare const colors: import('@emotion/utils').SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const button: import('@emotion/utils').SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const globalStyles: import('@emotion/utils').SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const button: import('@emotion/utils').SerializedStyles;
@@ -0,0 +1,5 @@
1
+ import * as exportedComponents from "../../components";
2
+ type ExportedComponentName = keyof typeof exportedComponents & string;
3
+ export type RegisteredComponentName = Uncapitalize<ExportedComponentName>;
4
+ export declare const componentSelectors: Record<RegisteredComponentName, string>;
5
+ export {};
@@ -0,0 +1,2 @@
1
+ import { Theme } from './types';
2
+ export declare const defaultAppTheme: Theme;
@@ -0,0 +1,8 @@
1
+ import { SerializedStyles } from '@emotion/react';
2
+ import { default as React } from 'react';
3
+ import { Theme, ThemeProviderProps } from './types';
4
+ export declare function CraftsmanThemeProvider({ theme, children }: ThemeProviderProps): React.ReactElement<{
5
+ theme: Theme;
6
+ children?: React.ReactNode;
7
+ }, string | React.JSXElementConstructor<any>>;
8
+ export declare function themeBuilder(theme: Theme): SerializedStyles;
@@ -0,0 +1,19 @@
1
+ import { CSSObject, SerializedStyles } from '@emotion/react';
2
+ import { ColorKey } from '../utilities/color';
3
+ import { componentSelectors } from './components';
4
+ export type ColorVariableName = `--${ColorKey}`;
5
+ export type RegisteredComponent = keyof typeof componentSelectors;
6
+ export type ComponentThemeOverrides = {
7
+ [K in RegisteredComponent]?: CSSObject | SerializedStyles;
8
+ };
9
+ export type Colors = Partial<Record<ColorVariableName, string>>;
10
+ export type Theme = {
11
+ colors?: Colors;
12
+ root?: CSSObject | SerializedStyles;
13
+ components?: ComponentThemeOverrides;
14
+ };
15
+ export type ThemeProviderProps = {
16
+ theme: Theme;
17
+ children: React.ReactNode;
18
+ };
19
+ export type AppTheme = Record<string, Theme>;
@@ -0,0 +1,69 @@
1
+ export type ColorType = "rgba" | "hex";
2
+ export declare const colors: {
3
+ white: string;
4
+ black: string;
5
+ transparent: string;
6
+ grey50: string;
7
+ grey100: string;
8
+ grey200: string;
9
+ grey300: string;
10
+ grey400: string;
11
+ grey500: string;
12
+ grey600: string;
13
+ grey700: string;
14
+ grey800: string;
15
+ grey900: string;
16
+ blue50: string;
17
+ blue100: string;
18
+ blue200: string;
19
+ blue300: string;
20
+ blue400: string;
21
+ blue500: string;
22
+ blue600: string;
23
+ blue700: string;
24
+ blue800: string;
25
+ blue900: string;
26
+ green50: string;
27
+ green100: string;
28
+ green200: string;
29
+ green300: string;
30
+ green400: string;
31
+ green500: string;
32
+ green600: string;
33
+ green700: string;
34
+ green800: string;
35
+ green900: string;
36
+ yellow50: string;
37
+ yellow100: string;
38
+ yellow200: string;
39
+ yellow300: string;
40
+ yellow400: string;
41
+ yellow500: string;
42
+ yellow600: string;
43
+ yellow700: string;
44
+ yellow800: string;
45
+ yellow900: string;
46
+ red50: string;
47
+ red100: string;
48
+ red200: string;
49
+ red300: string;
50
+ red400: string;
51
+ red500: string;
52
+ red600: string;
53
+ red700: string;
54
+ red800: string;
55
+ red900: string;
56
+ purple50: string;
57
+ purple100: string;
58
+ purple200: string;
59
+ purple300: string;
60
+ purple400: string;
61
+ purple500: string;
62
+ purple600: string;
63
+ purple700: string;
64
+ purple800: string;
65
+ purple900: string;
66
+ };
67
+ export type ColorKey = keyof typeof colors;
68
+ export declare function hexToRgba(hex: string, alpha?: number): string;
69
+ export declare const color: (name: ColorKey, type?: ColorType, alpha?: number) => string;
@@ -0,0 +1,2 @@
1
+ export declare function isEmpty(value: unknown): boolean;
2
+ export declare function validateEmail(value: string): boolean;