├── .prettierignore ├── README.md ├── examples ├── gatsby │ ├── .npmrc │ ├── .gitignore │ ├── static │ │ └── favicon.ico │ ├── gatsby-browser.tsx │ ├── gatsby-config.ts │ ├── gatsby-ssr.tsx │ └── package.json ├── react │ ├── src │ │ ├── vite-env.d.ts │ │ ├── react-app-env.d.ts │ │ ├── App.tsx │ │ └── index.tsx │ ├── public │ │ └── favicon.ico │ ├── vite.config.ts │ ├── tsconfig.node.json │ ├── .gitignore │ ├── index.html │ ├── package.json │ └── tsconfig.json ├── expo │ ├── tsconfig.json │ ├── assets │ │ ├── icon.png │ │ ├── favicon.png │ │ ├── splash.png │ │ └── adaptive-icon.png │ ├── babel.config.js │ ├── .gitignore │ ├── index.js │ ├── package.json │ ├── App.tsx │ ├── app.json │ └── metro.config.js ├── next-app │ ├── public │ │ └── favicon.ico │ ├── src │ │ ├── public │ │ │ └── favicon.ico │ │ └── app │ │ │ └── layout.tsx │ ├── next.config.js │ ├── next-env.d.ts │ ├── package.json │ ├── .gitignore │ └── tsconfig.json └── next-pages │ ├── public │ └── favicon.ico │ ├── src │ ├── public │ │ └── favicon.ico │ └── pages │ │ ├── _document.tsx │ │ └── _app.tsx │ ├── next.config.js │ ├── next-env.d.ts │ ├── package.json │ ├── .gitignore │ └── tsconfig.json ├── .remarkignore ├── packages └── kitchn │ ├── src │ ├── logos │ │ ├── index.ts │ │ └── components │ │ │ └── index.ts │ ├── native │ │ ├── contexts │ │ │ ├── index.ts │ │ │ └── theme.tsx │ │ ├── hoc │ │ │ └── index.ts │ │ ├── hooks │ │ │ ├── index.ts │ │ │ └── use-theme.ts │ │ ├── types │ │ │ ├── theme.ts │ │ │ └── index.ts │ │ ├── components │ │ │ ├── index.ts │ │ │ ├── provider │ │ │ │ └── index.tsx │ │ │ └── icon │ │ │ │ └── index.tsx │ │ ├── index.ts │ │ ├── styled-components.ts │ │ └── themes │ │ │ ├── index.ts │ │ │ └── main.ts │ ├── utils │ │ ├── index.ts │ │ ├── get-id.ts │ │ ├── capitalize.ts │ │ ├── is-number.ts │ │ ├── is-browser.ts │ │ ├── is-mac.ts │ │ ├── is-string.ts │ │ ├── get-element-offset.ts │ │ ├── _collections.ts │ │ ├── is-development.ts │ │ ├── get-ctrl-keys-by-platform.ts │ │ ├── convert-rgb-to-rgba.ts │ │ ├── is-ref-target.ts │ │ ├── shorten-name.ts │ │ ├── _layout.ts │ │ ├── get-active-mod-map.ts │ │ ├── pick-child.ts │ │ ├── get-translate-by-placement.ts │ │ └── codes.ts │ ├── constants │ │ └── index.ts │ ├── next │ │ ├── index.ts │ │ ├── hoc │ │ │ └── with-kitchn-config.ts │ │ ├── document │ │ │ └── index.tsx │ │ └── registry │ │ │ └── index.tsx │ ├── contexts │ │ ├── index.ts │ │ ├── navigation-menu-item.tsx │ │ ├── combobox.tsx │ │ ├── navigation-menu.tsx │ │ └── toasts.tsx │ ├── hoc │ │ ├── index.ts │ │ ├── with-decorator │ │ │ ├── index.ts │ │ │ ├── background.ts │ │ │ ├── position.ts │ │ │ ├── margin.ts │ │ │ ├── padding.ts │ │ │ └── area.ts │ │ ├── with-box │ │ │ └── index.ts │ │ └── with-scale │ │ │ └── index.ts │ ├── types │ │ ├── window.ts │ │ └── index.ts │ ├── hooks │ │ ├── use-combobox.ts │ │ ├── use-theme.ts │ │ ├── use-previous.ts │ │ ├── use-click-anywhere.ts │ │ ├── use-modal.ts │ │ ├── use-checkbox.ts │ │ ├── use-resize.ts │ │ ├── use-navigation-menu.ts │ │ ├── use-navigation-menu-item.ts │ │ ├── use-ssr.ts │ │ ├── use-warning.ts │ │ ├── index.ts │ │ ├── use-breakpoint.ts │ │ ├── use-domobserver.ts │ │ ├── use-click-away.ts │ │ ├── use-current-state.ts │ │ ├── use-portal.ts │ │ ├── use-media-query.ts │ │ └── use-clipboard.ts │ ├── index.ts │ ├── components │ │ ├── global-style │ │ │ ├── index.ts │ │ │ ├── theme.ts │ │ │ └── main.ts │ │ ├── list │ │ │ ├── item │ │ │ │ └── index.tsx │ │ │ ├── ordered │ │ │ │ └── index.tsx │ │ │ └── unordered │ │ │ │ └── index.tsx │ │ ├── link │ │ │ └── fragment │ │ │ │ └── index.tsx │ │ ├── code │ │ │ ├── inline │ │ │ │ └── index.tsx │ │ │ └── index.tsx │ │ ├── combobox │ │ │ ├── empty │ │ │ │ └── index.tsx │ │ │ ├── searching │ │ │ │ └── index.tsx │ │ │ ├── dropdown │ │ │ │ └── index.tsx │ │ │ └── item │ │ │ │ └── index.tsx │ │ ├── image │ │ │ └── index.tsx │ │ ├── spacer │ │ │ └── index.tsx │ │ ├── spinner │ │ │ └── index.tsx │ │ ├── toast │ │ │ └── actions │ │ │ │ └── index.tsx │ │ ├── index.ts │ │ ├── navigation-menu │ │ │ └── item │ │ │ │ └── index.tsx │ │ ├── input │ │ │ ├── password │ │ │ │ └── index.tsx │ │ │ └── controlled │ │ │ │ └── index.tsx │ │ └── avatar │ │ │ └── group │ │ │ └── index.tsx │ ├── styled-components.ts │ └── themes │ │ ├── dark.ts │ │ ├── light.ts │ │ ├── tonightpass.ts │ │ └── main.ts │ ├── logos │ └── package.json │ ├── next │ ├── package.json │ ├── document │ │ └── package.json │ └── registry │ │ └── package.json │ ├── native │ └── package.json │ ├── fonts.css │ ├── tsconfig.json │ └── tsup.config.ts ├── .eslintignore ├── docs ├── public │ ├── favicon.ico │ ├── favicon-16x16.png │ ├── favicon-32x32.png │ ├── apple-touch-icon.png │ ├── android-chrome-192x192.png │ ├── android-chrome-512x512.png │ ├── static │ │ └── images │ │ │ └── showcases │ │ │ ├── screenshots │ │ │ ├── onruntime.com.png │ │ │ ├── tonightpass.com.png │ │ │ └── kitchn.tonightpass.com.png │ │ │ └── thumbnails │ │ │ └── onruntime.svg │ └── manifest.json ├── components │ ├── playground │ │ ├── index.ts │ │ ├── scope.ts │ │ ├── dynamic-live-server.tsx │ │ └── dynamic-live-client.tsx │ ├── script │ │ └── index.tsx │ ├── youtube-video │ │ └── index.tsx │ ├── landing │ │ ├── showcase │ │ │ ├── index.tsx │ │ │ └── list │ │ │ │ └── card │ │ │ │ └── index.tsx │ │ └── examples │ │ │ ├── progress │ │ │ └── index.tsx │ │ │ └── index.tsx │ ├── blog │ │ ├── list │ │ │ └── index.tsx │ │ └── featured │ │ │ └── index.tsx │ ├── brands │ │ └── showcase │ │ │ └── index.tsx │ └── showcase │ │ ├── featured │ │ └── index.tsx │ │ └── projects │ │ └── promoted-projects │ │ ├── card │ │ └── index.tsx │ │ └── index.tsx ├── pages │ ├── blog │ │ └── _meta.json │ ├── blog.mdx │ ├── showcase.mdx │ ├── docs │ │ ├── frameworks │ │ │ ├── _meta.json │ │ │ └── react-native.mdx │ │ ├── hooks.mdx │ │ ├── components.mdx │ │ ├── _meta.json │ │ ├── hooks │ │ │ ├── _meta.json │ │ │ ├── use-clickanywhere.mdx │ │ │ ├── use-warning.mdx │ │ │ ├── use-ssr.mdx │ │ │ ├── use-mediaquery.mdx │ │ │ ├── use-clickaway.mdx │ │ │ ├── use-checkbox.mdx │ │ │ └── use-resize.mdx │ │ ├── components │ │ │ ├── _meta.json │ │ │ ├── image.mdx │ │ │ ├── spacer.mdx │ │ │ ├── spinner.mdx │ │ │ └── badge.mdx │ │ ├── figma.mdx │ │ ├── frameworks.mdx │ │ └── acknowledgements.mdx │ ├── _document.tsx │ ├── _meta.json │ ├── _app.mdx │ └── index.mdx ├── next-env.d.ts ├── screens │ ├── blog │ │ └── index.tsx │ ├── showcase │ │ └── index.tsx │ └── landing │ │ └── index.tsx ├── types │ └── showcase.ts ├── .gitignore ├── tsconfig.json ├── package.json ├── next.config.js └── next-sitemap.config.js ├── pnpm-workspace.yaml ├── workshop ├── pages │ ├── _document.tsx │ ├── forced-theme.tsx │ ├── _app.tsx │ ├── calendar.tsx │ ├── image.tsx │ ├── spacer.tsx │ ├── badge.tsx │ ├── snippet.tsx │ ├── logos.tsx │ ├── toggle.tsx │ ├── avatar.tsx │ ├── textarea.tsx │ └── codesandbox.tsx ├── app │ ├── app-router │ │ └── page.tsx │ └── layout.tsx ├── next.config.js ├── next-env.d.ts ├── package.json ├── .gitignore └── tsconfig.json ├── .npmrc ├── babel.config.js ├── .gitignore ├── CONTRIBUTING.md ├── .eslintrc.json ├── CODEOWNERS ├── .husky ├── commit-msg ├── pre-commit ├── scripts │ ├── validate-branch-name.sh │ └── validate-commit-message.sh └── post-receive ├── .github ├── pull_request_template.md └── workflows │ ├── ci.yml │ └── release.yml ├── .changeset └── config.json ├── turbo.json ├── .size-limit.js ├── renovate.json └── LICENSE /.prettierignore: -------------------------------------------------------------------------------- 1 | *.mdx 2 | *.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ./packages/kitchn/README.md 2 | -------------------------------------------------------------------------------- /examples/gatsby/.npmrc: -------------------------------------------------------------------------------- 1 | legacy-peer-deps=true -------------------------------------------------------------------------------- /.remarkignore: -------------------------------------------------------------------------------- 1 | .changeset/*.md 2 | CHANGELOG.md -------------------------------------------------------------------------------- /packages/kitchn/src/logos/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./components"; 2 | -------------------------------------------------------------------------------- /packages/kitchn/src/native/contexts/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./theme"; 2 | -------------------------------------------------------------------------------- /packages/kitchn/src/native/hoc/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./with-scale"; 2 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | babel.config.js 3 | .changeset/*.md 4 | CHANGELOG.md -------------------------------------------------------------------------------- /examples/react/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/kitchn/src/native/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./use-theme"; 2 | -------------------------------------------------------------------------------- /examples/react/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /packages/kitchn/src/native/types/theme.ts: -------------------------------------------------------------------------------- 1 | export * from "../../types/theme"; 2 | -------------------------------------------------------------------------------- /examples/gatsby/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .cache/ 3 | public 4 | src/gatsby-types.d.ts 5 | -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/favicon.ico -------------------------------------------------------------------------------- /packages/kitchn/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./_collections"; 2 | export * from "./_layout"; 3 | -------------------------------------------------------------------------------- /examples/expo/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": {}, 3 | "extends": "expo/tsconfig.base" 4 | } 5 | -------------------------------------------------------------------------------- /packages/kitchn/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | export const PREFIX = "kc"; 2 | export const NAME = "Kitchn"; 3 | -------------------------------------------------------------------------------- /docs/public/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/favicon-16x16.png -------------------------------------------------------------------------------- /docs/public/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/favicon-32x32.png -------------------------------------------------------------------------------- /examples/expo/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/expo/assets/icon.png -------------------------------------------------------------------------------- /packages/kitchn/src/logos/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./kitchn"; 2 | export * from "./tonightpass"; 3 | -------------------------------------------------------------------------------- /packages/kitchn/src/next/index.ts: -------------------------------------------------------------------------------- 1 | export { default as withKitchnConfig } from "./hoc/with-kitchn-config"; 2 | -------------------------------------------------------------------------------- /docs/components/playground/index.ts: -------------------------------------------------------------------------------- 1 | import Playground from "./playground"; 2 | 3 | export default Playground; 4 | -------------------------------------------------------------------------------- /docs/public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/apple-touch-icon.png -------------------------------------------------------------------------------- /examples/expo/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/expo/assets/favicon.png -------------------------------------------------------------------------------- /examples/expo/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/expo/assets/splash.png -------------------------------------------------------------------------------- /examples/gatsby/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/gatsby/static/favicon.ico -------------------------------------------------------------------------------- /examples/react/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/react/public/favicon.ico -------------------------------------------------------------------------------- /examples/next-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/next-app/public/favicon.ico -------------------------------------------------------------------------------- /packages/kitchn/src/contexts/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./combobox"; 2 | export * from "./theme"; 3 | export * from "./toasts"; 4 | -------------------------------------------------------------------------------- /docs/public/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/android-chrome-192x192.png -------------------------------------------------------------------------------- /docs/public/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/android-chrome-512x512.png -------------------------------------------------------------------------------- /examples/expo/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/expo/assets/adaptive-icon.png -------------------------------------------------------------------------------- /examples/next-pages/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/next-pages/public/favicon.ico -------------------------------------------------------------------------------- /packages/kitchn/src/utils/get-id.ts: -------------------------------------------------------------------------------- 1 | export const getId = () => { 2 | return Math.random().toString(32).slice(2, 10); 3 | }; 4 | -------------------------------------------------------------------------------- /examples/next-app/src/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/next-app/src/public/favicon.ico -------------------------------------------------------------------------------- /examples/next-pages/src/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/examples/next-pages/src/public/favicon.ico -------------------------------------------------------------------------------- /packages/kitchn/src/hoc/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./with-box"; 2 | export * from "./with-decorator"; 3 | export * from "./with-scale"; 4 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - packages/* 3 | - examples/* 4 | - docs 5 | - workshop 6 | onlyBuiltDependencies: 7 | - sharp 8 | -------------------------------------------------------------------------------- /docs/pages/blog/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "*": { 3 | "theme": { 4 | "breadcrumb": true, 5 | "sidebar": false 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/kitchn/src/types/window.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | interface Window { 3 | next?: any; 4 | } 5 | } 6 | 7 | export type window = object; 8 | -------------------------------------------------------------------------------- /workshop/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { KitchnDocument } from "kitchn/next/document"; 2 | 3 | export default class Document extends KitchnDocument {} 4 | -------------------------------------------------------------------------------- /examples/next-pages/src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { KitchnDocument } from "kitchn/next"; 2 | 3 | export default class Document extends KitchnDocument {} 4 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | strict-peer-dependencies=false 2 | shell-emulator=true 3 | ignore-workspace-root-check=true 4 | auto-install-peers=true 5 | enable-pre-post-scripts=true 6 | -------------------------------------------------------------------------------- /examples/expo/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function (api) { 2 | api.cache(true); 3 | return { 4 | presets: ["babel-preset-expo"], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | "@babel/preset-env", 4 | "@babel/preset-react", 5 | "@babel/preset-typescript", 6 | ], 7 | }; 8 | -------------------------------------------------------------------------------- /workshop/app/app-router/page.tsx: -------------------------------------------------------------------------------- 1 | import { Button } from "kitchn"; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .DS_Store 3 | node_modules/ 4 | dist/ 5 | build/ 6 | yarn-error.log 7 | .pnpm-debug.log 8 | .idea/ 9 | .next/ 10 | .store/ 11 | .turbo 12 | -------------------------------------------------------------------------------- /packages/kitchn/logos/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "../dist/logos/index.cjs.js", 3 | "module": "../dist/logos/index.esm.js", 4 | "types": "../dist/logos/index.d.ts" 5 | } 6 | -------------------------------------------------------------------------------- /packages/kitchn/next/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "../dist/next/index.cjs.js", 3 | "module": "../dist/next/index.esm.js", 4 | "types": "../dist/next/index.d.ts" 5 | } 6 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | For information related to contributing to Kitchn, please see the [Contributing Guide](https://kitchn.tonightpass.com/docs/contributing). 4 | -------------------------------------------------------------------------------- /packages/kitchn/native/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "../dist/native/index.cjs.js", 3 | "module": "../dist/native/index.esm.js", 4 | "types": "../dist/native/index.d.ts" 5 | } 6 | -------------------------------------------------------------------------------- /docs/public/static/images/showcases/screenshots/onruntime.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/static/images/showcases/screenshots/onruntime.com.png -------------------------------------------------------------------------------- /docs/public/static/images/showcases/screenshots/tonightpass.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/static/images/showcases/screenshots/tonightpass.com.png -------------------------------------------------------------------------------- /workshop/next.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | const { withKitchnConfig } = require("kitchn/next"); 3 | 4 | module.exports = withKitchnConfig(); 5 | -------------------------------------------------------------------------------- /examples/next-app/next.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | const { withKitchnConfig } = require("kitchn/next"); 3 | 4 | module.exports = withKitchnConfig(); 5 | -------------------------------------------------------------------------------- /examples/next-pages/next.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-var-requires */ 2 | const { withKitchnConfig } = require("kitchn/next"); 3 | 4 | module.exports = withKitchnConfig(); 5 | -------------------------------------------------------------------------------- /workshop/pages/forced-theme.tsx: -------------------------------------------------------------------------------- 1 | const ForcedThemePage = () => { 2 | return
{"Forced theme"}
; 3 | }; 4 | ForcedThemePage.theme = "tonightpass"; 5 | export default ForcedThemePage; 6 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "env": { 4 | "browser": true, 5 | "node": true, 6 | "es2021": true 7 | }, 8 | "extends": [ 9 | "antoine" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /CODEOWNERS: -------------------------------------------------------------------------------- 1 | # Learn how to add code owners here: 2 | # https://help.github.com/en/articles/about-code-owners 3 | 4 | * @antoinekm @jerembdn @younesbessa 5 | 6 | **/pnpm-lock.yaml 7 | .github/ -------------------------------------------------------------------------------- /docs/public/static/images/showcases/screenshots/kitchn.tonightpass.com.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tonightpass/kitchn/HEAD/docs/public/static/images/showcases/screenshots/kitchn.tonightpass.com.png -------------------------------------------------------------------------------- /examples/expo/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | dist/ 4 | npm-debug.* 5 | *.jks 6 | *.p8 7 | *.p12 8 | *.key 9 | *.mobileprovision 10 | *.orig.* 11 | web-build/ 12 | 13 | # macOS 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /packages/kitchn/src/utils/capitalize.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Capitalize the first letter of a string. 3 | */ 4 | export const capitalize = (s: string): string => { 5 | return s.charAt(0).toUpperCase() + s.slice(1); 6 | }; 7 | -------------------------------------------------------------------------------- /packages/kitchn/next/document/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "../../dist/next/document/index.cjs.js", 3 | "module": "../../dist/next/document/index.esm.js", 4 | "types": "../../dist/next/document/index.d.ts" 5 | } 6 | -------------------------------------------------------------------------------- /packages/kitchn/next/registry/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "../../dist/next/registry/index.cjs.js", 3 | "module": "../../dist/next/registry/index.esm.js", 4 | "types": "../../dist/next/registry/index.d.ts" 5 | } 6 | -------------------------------------------------------------------------------- /examples/react/vite.config.ts: -------------------------------------------------------------------------------- 1 | import react from "@vitejs/plugin-react-swc"; 2 | import { defineConfig } from "vite"; 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }); 8 | -------------------------------------------------------------------------------- /packages/kitchn/src/native/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./button"; 2 | export * from "./container"; 3 | export * from "./icon"; 4 | export * from "./input"; 5 | export * from "./provider"; 6 | export * from "./text"; 7 | -------------------------------------------------------------------------------- /packages/kitchn/src/utils/is-number.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * isNumber is a utility function that checks if a value is a number. 3 | */ 4 | export const isNumber = (value: any): boolean => { 5 | return !isNaN(Number(value)); 6 | }; 7 | -------------------------------------------------------------------------------- /docs/pages/blog.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Blog: Latest Insights and Tutorials on Kitchn | The React UI Kit" 3 | description: The latest updates and releases 4 | type: posts 5 | --- 6 | 7 | import Blog from '@/screens/blog'; 8 | 9 | -------------------------------------------------------------------------------- /docs/pages/showcase.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Showcase: Highlight Projects Using Kitchn | The React UI Kit" 3 | description: A collection of projects built with kitchn. 4 | --- 5 | import Showcase from '@/screens/showcase'; 6 | 7 | -------------------------------------------------------------------------------- /packages/kitchn/src/utils/is-browser.ts: -------------------------------------------------------------------------------- 1 | export const isBrowser = (): boolean => { 2 | return Boolean( 3 | typeof window !== "undefined" && 4 | window.document && 5 | window.document.createElement, 6 | ); 7 | }; 8 | -------------------------------------------------------------------------------- /packages/kitchn/src/utils/is-mac.ts: -------------------------------------------------------------------------------- 1 | import { isBrowser } from "./is-browser"; 2 | 3 | export const isMac = (): boolean => { 4 | if (!isBrowser()) return false; 5 | return navigator.platform.toUpperCase().indexOf("MAC") >= 0; 6 | }; 7 | -------------------------------------------------------------------------------- /packages/kitchn/src/utils/is-string.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * isString is a utility function that checks if a value is a string. 3 | */ 4 | export const isString = (x: any) => { 5 | return Object.prototype.toString.call(x) === "[object String]"; 6 | }; 7 | -------------------------------------------------------------------------------- /docs/pages/docs/frameworks/_meta.json: -------------------------------------------------------------------------------- 1 | { 2 | "create-react-app": "Create React App", 3 | "react-native": "React Native", 4 | "nextjs-app": "Next.js (App Router)", 5 | "nextjs-pages": "Next.js (Pages Router)", 6 | "gatsby": "Gatsby" 7 | } 8 | -------------------------------------------------------------------------------- /examples/next-pages/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /examples/react/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "module": "ESNext", 5 | "moduleResolution": "Node", 6 | "allowSyntheticDefaultImports": true 7 | }, 8 | "include": ["vite.config.ts"] 9 | } 10 | -------------------------------------------------------------------------------- /packages/kitchn/src/hooks/use-combobox.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import { ComboboxConfig, ComboboxContext } from "../contexts"; 4 | 5 | export const useCombobox = (): ComboboxConfig => 6 | React.useContext(ComboboxContext); 7 | -------------------------------------------------------------------------------- /docs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /packages/kitchn/src/hoc/with-decorator/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./area"; 2 | export * from "./background"; 3 | export * from "./border"; 4 | export * from "./decorator"; 5 | export * from "./margin"; 6 | export * from "./padding"; 7 | export * from "./position"; 8 | -------------------------------------------------------------------------------- /packages/kitchn/src/hooks/use-theme.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import { ThemeContext } from "../contexts/theme"; 4 | 5 | export const useTheme = () => { 6 | const context = React.useContext(ThemeContext); 7 | 8 | return { ...context }; 9 | }; 10 | -------------------------------------------------------------------------------- /examples/next-app/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. 6 | -------------------------------------------------------------------------------- /packages/kitchn/src/native/hooks/use-theme.ts: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import { ThemeContext } from "../contexts/theme"; 4 | 5 | export const useTheme = () => { 6 | const context = React.useContext(ThemeContext); 7 | 8 | return { ...context }; 9 | }; 10 | -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | # 5 | # This hook is triggered before the commit message is created. 6 | # 7 | 8 | # Reference : https://docs.onruntime.com/contributing/commits 9 | bash $(dirname -- "$0")/scripts/validate-commit-message.sh "$1" -------------------------------------------------------------------------------- /packages/kitchn/src/utils/get-element-offset.ts: -------------------------------------------------------------------------------- 1 | export const getElementOffset = (el?: HTMLElement | null | undefined) => { 2 | if (!el) 3 | return { 4 | top: 0, 5 | left: 0, 6 | }; 7 | const { top, left } = el.getBoundingClientRect(); 8 | return { top, left }; 9 | }; 10 | -------------------------------------------------------------------------------- /examples/react/src/App.tsx: -------------------------------------------------------------------------------- 1 | import { KitchnProvider } from "kitchn"; 2 | 3 | import Template from "./Template"; 4 | 5 | import "kitchn/fonts.css"; 6 | 7 | export default function App() { 8 | return ( 9 | 10 |