Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
3874e5e
✨ add docs
antoinekm Nov 30, 2022
0b8d978
➕ add @types/node
antoinekm Nov 30, 2022
51d2173
➕ add urlcat
antoinekm Nov 30, 2022
1350c34
🎨 improve docs head
antoinekm Nov 30, 2022
a8ad86f
📝 update docs
antoinekm Nov 30, 2022
bc949a0
🔧 update eslint config
antoinekm Nov 30, 2022
2dd1e18
🔧 update monorepo structure
antoinekm Nov 30, 2022
4ea8a1f
🔧 update next config with kitchen
antoinekm Nov 30, 2022
255ac39
✨ add playground
antoinekm Nov 30, 2022
52eba83
✨ add kitchen to docs
antoinekm Nov 30, 2022
279dabc
📝 update docs
antoinekm Nov 30, 2022
f011f73
🎨 add pre and code reset into globalstyle
antoinekm Nov 30, 2022
1a03515
🎨 improve kitchen by exporting the strict necessary to work with them…
antoinekm Nov 30, 2022
05654b8
✏️ fix docs code spacings
antoinekm Nov 30, 2022
36005de
⬆️ upgrade nextra (thank you @shuding)
antoinekm Dec 5, 2022
cdf1d48
💄 update playground style
antoinekm Dec 5, 2022
3fb086f
⬆️ upgrade typescript
antoinekm Dec 5, 2022
68ba9c5
📝 update installation with tabs
antoinekm Dec 5, 2022
98fdcf1
📝 add badge documentation
antoinekm Dec 5, 2022
09163a4
📝 add badge documentation
antoinekm Dec 5, 2022
3830f77
📝 add text documentation
antoinekm Dec 5, 2022
4fa706f
💚 fix error related to the new use next seo props in the nextra config
antoinekm Dec 5, 2022
66eb5d6
➕ add react-icons
antoinekm Dec 6, 2022
3231fc6
🙈 add .prettierignore
antoinekm Dec 6, 2022
39acf1b
🎨 improve custom stylesheet
antoinekm Dec 6, 2022
a35bda6
🎨 improve playground editor with icons
antoinekm Dec 6, 2022
4e784df
✏️ fix playground typo
antoinekm Dec 6, 2022
17d6cd0
📝 add grid docs
antoinekm Dec 6, 2022
b464c97
⬆️ upgrade react-icons
antoinekm Dec 6, 2022
49d3b4b
💄 fix css rules into globalstyle
antoinekm Dec 6, 2022
dd3f7a7
🔧 add meta config to components to set priority pages
antoinekm Dec 6, 2022
0fe26c8
🔀 merge branch 'develop' into antoinekm/docs
antoinekm Dec 6, 2022
b65ca19
🎨 improve docs dynamic live with skeleton
antoinekm Dec 6, 2022
4308005
🔀 merge remote-tracking branch 'origin/develop' into antoinekm/docs
antoinekm Dec 7, 2022
0f97eb2
💄 update docs by using local fonts
antoinekm Dec 7, 2022
09aea4e
🔀 merge branch 'develop' into antoinekm/docs
antoinekm Dec 8, 2022
508ef1e
🩹 fix playground theme hook usage
antoinekm Dec 8, 2022
0f3a187
🩹 fix playground editor theme hook usage
antoinekm Dec 8, 2022
fbac6c4
🔧 add prefix to localstorage key
antoinekm Dec 8, 2022
fcfd679
🔧 add theme support
antoinekm Dec 8, 2022
09f6713
🏷️ update playground types
antoinekm Dec 8, 2022
d70d7fd
💄 update mono font from space to dm
antoinekm Dec 8, 2022
5c76623
🎨 improve export architecture
antoinekm Dec 8, 2022
b2b8f90
🩹 fix isnumber by exporting it by default
antoinekm Dec 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"rules": {
"react/jsx-filename-extension": [1, { "extensions": [".tsx", ".ts"] }],
"react/jsx-props-no-spreading": [0],
"react/no-unknown-property": ["error", { "ignore": ["jsx"] }],
"react/react-in-jsx-scope": "off",
"react/jsx-indent-props": ["error", 2],
"import/extensions": [0],
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.mdx
*.md
34 changes: 34 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
97 changes: 97 additions & 0 deletions docs/components/GlobalStyle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
import { createGlobalStyle } from "styled-components";

const GlobalStyle = createGlobalStyle`
*, *:before, *:after {
box-sizing: border-box;
}

a:hover {
filter: brightness(1) !important;
}

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
border: 0 solid ${({ theme }) => theme.colors.layout.dark}
}
`;

export default GlobalStyle;
135 changes: 135 additions & 0 deletions docs/components/Playground/code-theme.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
import { PrismTheme } from "prism-react-renderer";
import { DefaultTheme } from "@tonightpass/kitchen";

const makeCodeTheme = (theme: DefaultTheme): PrismTheme => ({
plain: {
backgroundColor: theme.colors.layout.darkest,
color: theme.colors.text.lightest,
fontWeight: "400",
fontStyle: "normal",
fontFamily: theme.family.monospace,
fontSize: ".875rem",
textRendering: "geometricPrecision",
},
styles: [
{
types: ["comment", "prolog", "doctype", "cdata"],
style: {
color: "#B362FF",
},
},
{
types: ["punctuation"],
style: {
color: "#FFFFFF",
},
},
{
types: ["namespace"],
style: {
opacity: 1,
},
},
{
types: ["tag", "operator"],
style: {
color: "#9EFFFF",
},
},
{
types: ["number"],
style: {
color: "#FF628C",
},
},
{
types: ["property", "function", "constant"],
style: {
color: "#FAD000",
},
},
{
types: ["tag-id", "selector", "atrule-id"],
style: {
color: "#eeebff",
},
},
{
types: ["attr-name"],
style: {
color: "#FAD000",
},
},
{
types: [
"boolean",
"entity",
"url",
"control",
"directive",
"unit",
"statement",
"regex",
"at-rule",
"placeholder",
"variable",
"imports",
"class-name",
"property-access",
],
style: {
color: "#9EFFFF",
},
},
{
types: ["string", "attr-value"],
style: {
color: "#A5FF90",
},
},
{
types: ["keyword"],
style: {
color: "#FF9D00",
},
},
{
types: ["deleted"],
style: {
textDecorationLine: "line-through",
},
},
{
types: ["language-javascript", "script"],
style: {
color: theme.colors.accent.success,
},
},
{
types: ["inserted"],
style: {
textDecorationLine: "underline",
},
},
{
types: ["italic"],
style: {
fontStyle: "italic",
},
},
{
types: ["important", "bold"],
style: {
fontWeight: "bold",
},
},
{
types: ["important"],
style: {
color: "#c4b9fe",
},
},
],
});

export default makeCodeTheme;
54 changes: 54 additions & 0 deletions docs/components/Playground/dynamic-live.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import { useTheme } from "@tonightpass/kitchen";
import React from "react";
import { LivePreview, LiveProvider, LiveError } from "react-live";
import makeCodeTheme from "./code-theme";
import Editor from "./editor";
import kitchenScope from "./scope";

export interface Props {
code: string;
scope: {
[key: string]: unknown;
};
}

const DynamicLive: React.FC<Props> = ({ code, scope }) => {
const { theme } = useTheme();
const codeTheme = makeCodeTheme(theme);
return (
<LiveProvider
code={code}
scope={{ ...scope, ...kitchenScope }}
theme={codeTheme}
>
<div className="wrapper">
<LivePreview />
<LiveError className="live-error" />
</div>
<Editor code={code} />
<style jsx>{`
.wrapper {
width: 100%;
padding: 20px;
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.wrapper > :global(div) {
width: 100%;
background-color: transparent;
}
.wrapper > :global(.live-error) {
padding: 10px 12px 0 12px;
margin-bottom: 0;
border: 2px ${theme.colors.accent.danger} dotted;
border-radius: 10px;
color: ${theme.colors.accent.danger};
font-size: 13px;
}
`}</style>
</LiveProvider>
);
};

export default DynamicLive;
Loading