@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 +5 -0
- package/Components.es.js +6 -0
- package/Input.es.js +5 -0
- package/components/Button.d.ts +2 -0
- package/components/Input.d.ts +2 -0
- package/components/index.d.ts +2 -0
- package/icons/IconCalendar.d.ts +3 -0
- package/icons/IconChevronRight.d.ts +2 -0
- package/icons/IconCircleAlert.d.ts +2 -0
- package/icons/IconCircleCheck.d.ts +2 -0
- package/icons/IconCircleHelp.d.ts +2 -0
- package/icons/IconCircleInfo.d.ts +2 -0
- package/icons/IconEye.d.ts +2 -0
- package/icons/IconEyeClosed.d.ts +2 -0
- package/icons/IconX.d.ts +2 -0
- package/main.d.ts +1 -0
- package/package.json +48 -0
- package/scripts/prepublishCheck.js +14 -0
- package/stories/Button.stories.d.ts +8 -0
- package/styles/global/colors.d.ts +1 -0
- package/styles/global/components/button.d.ts +1 -0
- package/styles/global/globalStyles.d.ts +1 -0
- package/styles/theme/components/button.d.ts +1 -0
- package/styles/theme/components.d.ts +5 -0
- package/styles/theme/constants.d.ts +2 -0
- package/styles/theme/theme.d.ts +8 -0
- package/styles/theme/types.d.ts +19 -0
- package/styles/utilities/color.d.ts +69 -0
- package/utilities/validations.d.ts +2 -0
package/Button.es.js
ADDED
package/Components.es.js
ADDED
package/Input.es.js
ADDED
package/icons/IconX.d.ts
ADDED
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,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;
|