@stokelp/ui 1.0.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/README.md +15 -0
- package/dist/components/accordion/Accordion.d.ts +20 -0
- package/dist/components/accordion/index.d.ts +1 -0
- package/dist/components/button/Button.d.ts +6 -0
- package/dist/components/button/index.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +8 -0
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/drawer/Drawer.d.ts +49 -0
- package/dist/components/drawer/index.d.ts +1 -0
- package/dist/components/form/FormControl.d.ts +10 -0
- package/dist/components/form/FormHelperText.d.ts +6 -0
- package/dist/components/form/FormLabel.d.ts +8 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/heading/Heading.d.ts +9 -0
- package/dist/components/heading/index.d.ts +1 -0
- package/dist/components/index.d.ts +9 -0
- package/dist/components/switch/Switch.d.ts +8 -0
- package/dist/components/switch/index.d.ts +1 -0
- package/dist/components/text/Text.d.ts +9 -0
- package/dist/components/text/index.d.ts +1 -0
- package/dist/components/textarea/Textarea.d.ts +10 -0
- package/dist/components/textarea/index.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/preset.d.ts +2 -0
- package/dist/style.css +1 -0
- package/dist/theme/breakpoints.d.ts +6 -0
- package/dist/theme/conditions.d.ts +19 -0
- package/dist/theme/containers.d.ts +14 -0
- package/dist/theme/keyframes.d.ts +2 -0
- package/dist/theme/recipes/accordion.d.ts +2 -0
- package/dist/theme/recipes/button.d.ts +2 -0
- package/dist/theme/recipes/checkbox.d.ts +2 -0
- package/dist/theme/recipes/drawer.d.ts +2 -0
- package/dist/theme/recipes/form/control.d.ts +2 -0
- package/dist/theme/recipes/form/helper-text.d.ts +2 -0
- package/dist/theme/recipes/form/label.d.ts +2 -0
- package/dist/theme/recipes/heading.d.ts +2 -0
- package/dist/theme/recipes/index.d.ts +16 -0
- package/dist/theme/recipes/switch.d.ts +2 -0
- package/dist/theme/recipes/text.d.ts +2 -0
- package/dist/theme/recipes/textarea.d.ts +2 -0
- package/dist/theme/semantic-tokens/colors.d.ts +226 -0
- package/dist/theme/semantic-tokens/index.d.ts +228 -0
- package/dist/theme/text-styles.d.ts +2 -0
- package/dist/theme/tokens/animations.d.ts +50 -0
- package/dist/theme/tokens/aspect-ratios.d.ts +20 -0
- package/dist/theme/tokens/blurs.d.ts +23 -0
- package/dist/theme/tokens/borders.d.ts +7 -0
- package/dist/theme/tokens/colors.d.ts +191 -0
- package/dist/theme/tokens/durations.d.ts +23 -0
- package/dist/theme/tokens/easings.d.ts +56 -0
- package/dist/theme/tokens/index.d.ts +774 -0
- package/dist/theme/tokens/radii.d.ts +65 -0
- package/dist/theme/tokens/shadows.d.ts +23 -0
- package/dist/theme/tokens/sizes.d.ts +86 -0
- package/dist/theme/tokens/spacing.d.ts +74 -0
- package/dist/theme/tokens/typography.d.ts +116 -0
- package/dist/theme/tokens/z-index.d.ts +38 -0
- package/dist/theme/utilities.d.ts +2 -0
- package/dist/ui.cjs +230 -0
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.js +25400 -0
- package/dist/ui.js.map +1 -0
- package/dist/utils/slots.d.ts +23 -0
- package/dist/utils/storybook.d.ts +20 -0
- package/package.json +74 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ComponentProps, type ElementType, type JSX } from 'react';
|
|
2
|
+
type GenericProps = Record<string, unknown>;
|
|
3
|
+
type StyleRecipe = {
|
|
4
|
+
(props?: GenericProps): Record<string, string>;
|
|
5
|
+
splitVariantProps: (props: GenericProps) => any;
|
|
6
|
+
};
|
|
7
|
+
type StyleSlot<R extends StyleRecipe> = keyof ReturnType<R>;
|
|
8
|
+
type StyleVariantProps<R extends StyleRecipe> = Parameters<R>[0];
|
|
9
|
+
type CombineProps<T, U> = Omit<T, keyof U> & U;
|
|
10
|
+
export interface ComponentVariants<T extends ElementType, R extends StyleRecipe> {
|
|
11
|
+
(props: CombineProps<ComponentProps<T>, StyleVariantProps<R>>): JSX.Element;
|
|
12
|
+
}
|
|
13
|
+
type Options = {
|
|
14
|
+
dataAttr?: boolean;
|
|
15
|
+
};
|
|
16
|
+
type WithOptions<Props extends GenericProps> = {
|
|
17
|
+
defaultProps?: Partial<Props>;
|
|
18
|
+
};
|
|
19
|
+
export declare const createStyleContext: <R extends StyleRecipe>(recipe: R, options?: Options) => {
|
|
20
|
+
withContext: <T extends ElementType>(Component: T, slot?: keyof ReturnType<R> | undefined, contextOptions?: WithOptions<ComponentProps<T>> | undefined) => T;
|
|
21
|
+
withProvider: <T_1 extends ElementType>(Component: T_1, slot?: keyof ReturnType<R> | undefined, providerOptions?: WithOptions<ComponentProps<T_1>> | undefined) => ComponentVariants<T_1, R>;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type StyleRecipe = {
|
|
2
|
+
variantMap: Record<string, unknown>;
|
|
3
|
+
variantKeys: string[];
|
|
4
|
+
};
|
|
5
|
+
type ControlOption = {
|
|
6
|
+
type: 'radio' | 'inline-radio' | 'select' | 'boolean';
|
|
7
|
+
};
|
|
8
|
+
export declare const generatePandaVariantsArgTypes: <R extends StyleRecipe>(recipe: R, options?: Partial<Record<keyof R["variantMap"], ControlOption>> | undefined) => Record<string, {
|
|
9
|
+
options: string[];
|
|
10
|
+
control: ControlOption;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const disableArgTypes: (types: string[]) => Record<string, {
|
|
13
|
+
table: {
|
|
14
|
+
disable: boolean;
|
|
15
|
+
};
|
|
16
|
+
control: {
|
|
17
|
+
disable: boolean;
|
|
18
|
+
};
|
|
19
|
+
}>;
|
|
20
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stokelp/ui",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Stokelp UI React",
|
|
5
|
+
"main": "dist/ui.cjs",
|
|
6
|
+
"module": "dist/ui.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"source": "./src/index.ts",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/ui.js"
|
|
21
|
+
},
|
|
22
|
+
"require": "./dist/ui.cjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"author": "Omar Jbara <omar.jbara2@gmail.com>",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/stokelp/ui.git"
|
|
29
|
+
},
|
|
30
|
+
"type": "module",
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prepare": "panda codegen",
|
|
33
|
+
"dev": "vite",
|
|
34
|
+
"panda:codegen": "panda codegen",
|
|
35
|
+
"panda:codegen:watch": "panda codegen --watch",
|
|
36
|
+
"panda:ship": "panda ship",
|
|
37
|
+
"panda:ship:watch": "panda ship --watch",
|
|
38
|
+
"build:vite": "vite build",
|
|
39
|
+
"build:vite:watch": "vite build --watch",
|
|
40
|
+
"build": "npm-run-all panda:codegen build:vite panda:ship",
|
|
41
|
+
"preview": "vite preview",
|
|
42
|
+
"typecheck": "tsc --noEmit --skipLibCheck --pretty",
|
|
43
|
+
"release": "pnpm run build && changeset publish",
|
|
44
|
+
"storybook": "storybook dev -p 6006",
|
|
45
|
+
"build-storybook": "storybook build",
|
|
46
|
+
"lint": "eslint --no-error-on-unmatched-pattern --cache --report-unused-disable-directives \"src/**/*.{js,ts,jsx,tsx}\"",
|
|
47
|
+
"lint:fix": "pnpm run lint --fix"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@pandacss/dev": "^0.37.2",
|
|
51
|
+
"react": "^18.2.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@chromatic-com/storybook": "^1.3.3",
|
|
55
|
+
"@stokelp/styled-system": "workspace:*",
|
|
56
|
+
"@storybook/addon-controls": "^8.0.9",
|
|
57
|
+
"@storybook/addon-essentials": "^8.0.9",
|
|
58
|
+
"@storybook/addon-interactions": "^8.0.9",
|
|
59
|
+
"@storybook/addon-links": "^8.0.9",
|
|
60
|
+
"@storybook/blocks": "^8.0.9",
|
|
61
|
+
"@storybook/react": "^8.0.9",
|
|
62
|
+
"@storybook/react-vite": "^8.0.9",
|
|
63
|
+
"@storybook/test": "^8.0.9",
|
|
64
|
+
"@types/react": "^18.2.45",
|
|
65
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
66
|
+
"prop-types": "^15.8.1",
|
|
67
|
+
"storybook": "^8.0.9",
|
|
68
|
+
"vite-plugin-dts": "^3.7.0",
|
|
69
|
+
"vite-tsconfig-paths": "^4.3.2"
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@ark-ui/react": "^2.2.3"
|
|
73
|
+
}
|
|
74
|
+
}
|