+
+
diff --git a/packages/components/src/components.scss b/packages/components/src/components.scss
new file mode 100644
index 0000000..5cae0db
--- /dev/null
+++ b/packages/components/src/components.scss
@@ -0,0 +1,8 @@
+.btn {
+ padding: var(--msp-spacing-1);
+}
+
+.btn-primary {
+ background-color: var(--msp--primary-bg);
+ color: var(--msp--primary-text);
+}
diff --git a/packages/components/tsconfig.json b/packages/components/tsconfig.json
new file mode 100644
index 0000000..2e82a45
--- /dev/null
+++ b/packages/components/tsconfig.json
@@ -0,0 +1,30 @@
+{
+ "compilerOptions": {
+ // Enable latest features
+ "lib": ["ESNext", "DOM"],
+ "target": "ESNext",
+ "module": "ESNext",
+ "moduleDetection": "force",
+ "jsx": "react-jsx",
+ "allowJs": true,
+
+ // Bundler mode
+ "moduleResolution": "bundler",
+ "allowImportingTsExtensions": true,
+ "verbatimModuleSyntax": true,
+ "noEmit": true,
+
+ // Best practices
+ "strict": true,
+ "skipLibCheck": true,
+ "noFallthroughCasesInSwitch": true,
+
+ // Some stricter flags (disabled by default)
+ "noUnusedLocals": false,
+ "noUnusedParameters": false,
+ "noPropertyAccessFromIndexSignature": false
+
+ // library configuration
+ // "baseUrl": "./src/"
+ }
+}
diff --git a/packages/core/_variables.scss b/packages/core/_variables.scss
new file mode 100644
index 0000000..a1850a7
--- /dev/null
+++ b/packages/core/_variables.scss
@@ -0,0 +1,83 @@
+@use "sass:color";
+
+/* Using catppuccin for now, make a theme switcher later */
+@use "./themes/catppuccin/catppuccin";
+
+@function getColor($color) {
+ $ctp-theme: map-get(catppuccin.$palette, "macchiato");
+ @return map-get($ctp-theme, $color);
+}
+
+/*
+* ╭───────────────────────────────────────────────────────────╮
+* │ Mini-Strap Design Tokens │
+* ╰───────────────────────────────────────────────────────────╯
+* */
+
+// ── Structure and convention ────────────────────────────────────────────
+
+/*
+*
+* */
+
+/* Taken from Tailwind: https://tailwindcss.com/docs/container#using-the-container */
+$screen-sizes: (
+ "sm": 640px,
+ "md": 768px,
+ "lg": 1024px,
+ "xl": 1280px,
+ "2xl": 1536px,
+);
+
+$spacings: (
+ 0 "--prj-spacing-0" 0,
+ 1 "--prj-spacing-1" 0.25rem,
+ 2 "--prj-spacing-2" 0.5rem,
+ 3 "--prj-spacing-3" 1rem,
+ 4 "--prj-spacing-4" 2rem,
+ 5 "--prj-spacing-5" 3rem
+);
+
+$border-radius: 0.5rem;
+
+// Native CSS Variables to allow overridings and usage in external stylesheets
+:root {
+ /* Variables prefixed with prj to avoid collisions */
+
+ /* Colors are inspired by Material Design: https://m2.material.io/design/color/the-color-system.html */
+ --prj-bg: #{getColor("mantle")};
+ --prj-bg-transparent: #{color.scale(getColor("mantle"), $alpha: -10%)};
+ --prj-shadow: #{getColor("crust")};
+ --prj-text: #{getColor("text")};
+
+ --prj-surface-1: #{getColor("base")};
+ --prj-surface-2: #{darken(getColor("surface0"), 2%)};
+ --prj-surface-3: #{getColor("surface1")};
+ --prj-surface-text: #{getColor("text")};
+
+ --prj-link-text: #{getColor("teal")};
+
+ --prj-accent-bg: #{getColor("teal")};
+ --prj-accent-text: #{getColor("base")};
+
+ --prj-primary: #{getColor("teal")};
+ --prj-primary-text: #{getColor("base")};
+
+ --prj-secondary: #{getColor("mauve")};
+ --prj-secondary-text: #{getColor("base")};
+
+ --prj-danger: #{getColor("red")};
+ --prj-danger-text: #{getColor("base")};
+
+ --prj-disabled: #{getColor("red")};
+ --prj-disabled-text: rgba(#{getColor("raw")}, 0.5);
+
+ --prj-input: #{getColor("text")};
+ --prj-input-text: #{getColor("base")};
+
+ @each $index, $variable, $value in $spacings {
+ #{$variable}: #{$value};
+ }
+
+ --prj-border-radius: #{$border-radius};
+}
diff --git a/packages/core/bun.lockb b/packages/core/bun.lockb
new file mode 100755
index 0000000..0c40387
Binary files /dev/null and b/packages/core/bun.lockb differ
diff --git a/packages/core/package.json b/packages/core/package.json
index dce323a..379bddc 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,7 +1,11 @@
{
- "name": "mini-strap-core",
+ "name": "@mini-strap/core",
+ "version": "0.0.1",
"module": "src/style.scss",
"type": "module",
+ "scripts": {
+ "ci:publish": "bun publish --production --frozen-lockfile --silent"
+ },
"devDependencies": {
"@types/bun": "latest"
},
@@ -9,4 +13,3 @@
"typescript": "^5.0.0"
}
}
-
diff --git a/packages/core/src/_colors.scss b/packages/core/src/_colors.scss
new file mode 100644
index 0000000..e69de29
diff --git a/packages/core/src/_mixins.scss b/packages/core/src/_mixins.scss
index e5abe23..a986741 100644
--- a/packages/core/src/_mixins.scss
+++ b/packages/core/src/_mixins.scss
@@ -15,3 +15,12 @@
}
}
}
+
+@mixin hover-darker() {
+ transition: filter 0.15s ease-in-out;
+ filter: brightness(1);
+
+ &:hover {
+ filter: brightness(0.9);
+ }
+}
diff --git a/packages/core/src/_reset.scss b/packages/core/src/_reset.scss
new file mode 100644
index 0000000..c4e42f8
--- /dev/null
+++ b/packages/core/src/_reset.scss
@@ -0,0 +1,187 @@
+/*
+ * ╭─────────────────────────────────────────────────────────────────╮
+ * │ Reset borrowed from https://github.com/kkrishguptaa/reseter.css │
+ * ╰─────────────────────────────────────────────────────────────────╯
+*/
+
+// ── Global ──────────────────────────────────────────────────────────────
+
+*,
+*::before,
+*::after {
+ box-sizing: inherit;
+ background-clip: inherit;
+ padding: 0;
+ margin: 0;
+}
+
+:where(:root) {
+ box-sizing: border-box;
+ background-clip: padding-box;
+ line-height: 1.5;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
+ Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
+}
+
+:where(main) {
+ display: block;
+}
+
+:where(h1) {
+ font-size: 2em;
+ margin: 0.67em 0;
+}
+
+:where(p + p) {
+ margin-top: 1rem;
+}
+
+// ── Forms ───────────────────────────────────────────────────────────────
+:where(button, input, optgroup, select, textarea) {
+ line-height: inherit;
+ border: 1px solid currentColor;
+}
+
+:where(button) {
+ overflow: visible;
+ text-transform: none;
+}
+
+:where(button, [type="button"], [type="reset"], [type="submit"]) {
+ -webkit-appearance: button;
+ padding: 1px 6px;
+ &:not(:disabled) {
+ cursor: pointer;
+ }
+}
+
+:where(input) {
+ overflow: visible;
+}
+
+:where(input, textarea) {
+ padding: 1px;
+}
+
+:where(fieldset) {
+ border: 1px solid currentColor;
+ margin: 0 2px;
+}
+
+:where(legend) {
+ color: inherit;
+ display: table;
+ max-width: 100%;
+ white-space: normal;
+}
+
+:where(progress) {
+ display: inline-block;
+ vertical-align: baseline;
+}
+
+:where(select) {
+ text-transform: none;
+}
+
+:where(textarea) {
+ overflow: auto;
+ vertical-align: top;
+}
+
+:where([type="search"]) {
+ -webkit-appearance: textfield;
+ outline-offset: -2px;
+}
+
+:where([type="color"]) {
+ background: inherit;
+}
+
+::-webkit-inner-spin-button,
+::-webkit-outer-spin-button {
+ height: auto;
+}
+
+::-webkit-input-placeholder {
+ color: inherit;
+ opacity: 0.5;
+}
+
+::-webkit-search-decoration,
+::-webkit-file-upload-button {
+ -webkit-appearance: button;
+ font: inherit;
+}
+
+::-moz-focus-inner {
+ border: 0;
+}
+
+:-moz-focusring {
+ outline: 1px dotted ButtonText;
+}
+
+:-moz-ui-invalid {
+ box-shadow: none;
+}
+
+// ── Text ────────────────────────────────────────────────────────────────
+
+:where(a) {
+ background-color: transparent;
+}
+
+:where(abbr[title]) {
+ text-decoration: underline dotted;
+}
+
+:where(code, kbd, samp, pre) {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+
+:where(sub, sup) {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+:where(sub) {
+ bottom: -0.25em;
+}
+
+:where(sup) {
+ top: -0.5em;
+}
+
+// ── Other ───────────────────────────────────────────────────────────────
+
+:where(a) {
+ background-color: transparent;
+}
+
+:where(abbr[title]) {
+ text-decoration: underline dotted;
+}
+
+:where(code, kbd, samp, pre) {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+
+:where(sub, sup) {
+ font-size: 75%;
+ line-height: 0;
+ position: relative;
+ vertical-align: baseline;
+}
+
+:where(sub) {
+ bottom: -0.25em;
+}
+
+:where(sup) {
+ top: -0.5em;
+}
diff --git a/packages/core/src/_tokens.scss b/packages/core/src/_tokens.scss
index 460d536..3d41eaa 100644
--- a/packages/core/src/_tokens.scss
+++ b/packages/core/src/_tokens.scss
@@ -1,4 +1,5 @@
@use "sass:color";
+@use "colors";
/* Using catppuccin for now, make a theme switcher later */
@use "../themes/catppuccin/catppuccin";
@@ -44,44 +45,61 @@ $spacings: (
$border-radius: 0.5rem;
+/* Colors are inspired by Material Design: https://m2.material.io/design/color/the-color-system.html */
+$msp-colors: (
+ "--msp-color-bg": #{getColor("mantle")},
+ "--msp-color-bg-transparent": #{color.scale(getColor("mantle"), $alpha: -10%)},
+ "--msp-color-bg-surface-1": #{getColor("base")},
+ "--msp-color-bg-surface-2": #{darken(getColor("surface0"), 2%)},
+ "--msp-color-bg-surface-3": #{getColor("surface1")},
+
+ "--msp-color-bg-accent": #{getColor("teal")},
+ "--msp-color-bg-primary": #{getColor("mauve")},
+ "--msp-color-bg-secondary": #{getColor("lavender")},
+ "--msp-color-bg-danger": #{getColor("red")},
+ "--msp-color-bg-disabled": #{color.scale(getColor("text"), $alpha: -10%)},
+ "--msp-color-bg-input": #{getColor("text")},
+ "--msp-color-bg-checkbox": #{getColor("teal")},
+ "--msp-color-bg-range": #{getColor("surface1")},
+ "--msp-color-bg-btn": #{getColor("teal")},
+ "--msp-color-bg-table": #{getColor("base")},
+
+ "--msp-color-text": #{getColor("text")},
+ "--msp-color-text-transparent": #{color.scale(getColor("text"), $alpha: -50%)},
+ "--msp-color-text-surface": #{getColor("text")},
+ "--msp-color-text-link": #{getColor("teal")},
+ "--msp-color-text-accent": #{getColor("base")},
+ "--msp-color-text-primary": #{getColor("base")},
+ "--msp-color-text-secondary": #{getColor("base")},
+ "--msp-color-text-danger": #{getColor("base")},
+ "--msp-color-text-disabled": #{color.scale(getColor("text"), $alpha: -30%)},
+ "--msp-color-text-input": #{getColor("base")},
+ "--msp-color-text-input-disabled": #{color.scale(
+ getColor("base"),
+ $alpha: -30%
+ )},
+ "--msp-color-text-checkbox": #{getColor("surface1")},
+ "--msp-color-text-range": #{getColor("teal")},
+ "--msp-color-text-btn": #{getColor("base")},
+ "--msp-color-text-table": #{getColor("text")},
+
+ "--msp-color-shadow": #{getColor("crust")},
+ "--msp-color-transparent": transparent,
+);
+
// Native CSS Variables to allow overridings and usage in external stylesheets
:root {
- /* Variables prefixed with prj to avoid collisions */
-
- /* Colors are inspired by Material Design: https://m2.material.io/design/color/the-color-system.html */
- --msp-bg: #{getColor("mantle")};
- --msp-bg-transparent: #{color.scale(getColor("mantle"), $alpha: -10%)};
- --msp-shadow: #{getColor("crust")};
- --msp-text: #{getColor("text")};
-
- --msp-surface-1: #{getColor("base")};
- --msp-surface-2: #{darken(getColor("surface0"), 2%)};
- --msp-surface-3: #{getColor("surface1")};
- --msp-surface-text: #{getColor("text")};
-
- --msp-link-text: #{getColor("teal")};
-
- --msp-accent-bg: #{getColor("teal")};
- --msp-accent-text: #{getColor("base")};
-
- --msp-primary: #{getColor("teal")};
- --msp-primary-text: #{getColor("base")};
-
- --msp-secondary: #{getColor("mauve")};
- --msp-secondary-text: #{getColor("base")};
-
- --msp-danger: #{getColor("red")};
- --msp-danger-text: #{getColor("base")};
-
- --msp-disabled: #{getColor("red")};
- --msp-disabled-text: rgba(#{getColor("raw")}, 0.5);
-
- --msp-input: #{getColor("text")};
- --msp-input-text: #{getColor("base")};
+ @each $variable, $value in $msp-colors {
+ #{$variable}: #{$value};
+ }
@each $index, $variable, $value in $spacings {
#{$variable}: #{$value};
}
- --msp-border-radius: #{$border-radius};
+ // ── Borders ─────────────────────────────────────────────────────────────
+ --msp-border-width: 1px;
+ --msp-border-color: var(--msp-color-text-transparent);
+ --msp-border-style: solid;
+ --msp-border-radius: 0.2rem;
}
diff --git a/packages/core/src/_utils.scss b/packages/core/src/_utils.scss
index 16045d5..82968ee 100644
--- a/packages/core/src/_utils.scss
+++ b/packages/core/src/_utils.scss
@@ -1,33 +1,33 @@
@use "./tokens" as *;
@use "./mixins";
-.position-fixed {
+.msp-position-fixed {
position: fixed;
left: 0;
top: 0;
z-index: 2;
}
-.position-sticky {
+.msp-position-sticky {
position: sticky;
left: 0;
top: 0;
z-index: 2;
}
-.d-none {
+.msp-d-none {
display: none;
}
-.d-block {
+.msp-d-block {
display: block;
}
-.d-flex {
+.msp-d-flex {
display: flex;
}
-.visually-hidden {
+.msp-visually-hidden {
height: 0;
width: 0;
position: absolute;
@@ -35,46 +35,46 @@
}
@include mixins.responsive using($breakpoint, $size) {
- .d-#{$breakpoint}-none {
+ .msp-d-#{$breakpoint}-none {
display: none;
}
- .d-#{$breakpoint}-block {
+ .msp-d-#{$breakpoint}-block {
display: block;
}
- .d-#{$breakpoint}-flex {
+ .msp-d-#{$breakpoint}-flex {
display: flex;
}
}
-.flex-eq > * {
+.msp-flex-eq > * {
flex: 100%;
}
-.flex-column {
+.msp-flex-column {
flex-direction: column !important;
}
-.flex-row {
+.msp-flex-row {
flex-direction: row !important;
}
@include mixins.responsive using($breakpoint, $size) {
- .flex-#{$breakpoint}-column {
+ .msp-flex-#{$breakpoint}-column {
flex-direction: column !important;
}
- .flex-#{$breakpoint}-row {
+ .msp-flex-#{$breakpoint}-row {
flex-direction: row !important;
}
}
-.hstack {
+.msp-hstack {
--prj-gap: var(--prj-spacing-3);
display: flex;
gap: var(--prj-gap);
align-items: center;
}
-.hstack-reverse {
+.msp-hstack-reverse {
--prj-gap: var(--prj-spacing-3);
display: flex;
gap: var(--prj-gap);
@@ -82,63 +82,63 @@
flex-direction: row-reverse;
}
-.vstack {
+.msp-vstack {
--prj-gap: var(--prj-spacing-3);
display: flex;
gap: var(--prj-gap);
flex-direction: column;
}
-.vstack-reverse {
+.msp-vstack-reverse {
--prj-gap: var(--prj-spacing-3);
display: flex;
flex-direction: column-reverse;
}
-.flex-grow {
+.msp-flex-grow {
flex-grow: 1;
}
-.flex-wrap {
+.msp-flex-wrap {
flex-wrap: wrap;
}
-.flex-nowrap {
+.msp-flex-nowrap {
flex-wrap: nowrap;
}
@include mixins.responsive using($breakpoint, $size) {
- .flex-#{$breakpoint}-wrap {
+ .msp-flex-#{$breakpoint}-wrap {
flex-wrap: wrap;
}
- .flex-#{$breakpoint}-nowrap {
+ .msp-flex-#{$breakpoint}-nowrap {
flex-wrap: nowrap;
}
}
-.flex-center {
+.msp-flex-center {
display: flex;
justify-content: center;
align-items: center;
}
-.justify-content-center {
+.msp-justify-content-center {
justify-content: center !important;
}
-.justify-content-between {
+.msp-justify-content-between {
justify-content: space-between !important;
}
-.justify-content-around {
+.msp-justify-content-around {
justify-content: space-around !important;
}
-.align-items-center {
+.msp-align-items-center {
align-items: center !important;
}
-.grid {
+.msp-grid {
--prj-gap: var(--prj-spacing-3);
--prj-columns: repeat(3, 1fr);
--prj-min-col-width: 150px;
@@ -152,81 +152,81 @@
}
@for $i from 1 through 12 {
- .grid-cols-#{$i} {
+ .msp-grid-cols-#{$i} {
@include grid-cols($i);
}
}
@include mixins.responsive-steps(1, 12) using ($breakpoint, $index) {
- .grid-#{$breakpoint}-cols-#{$index} {
+ .msp-grid-#{$breakpoint}-cols-#{$index} {
@include grid-cols($index);
}
}
-.list-unstyle {
+.msp-list-unstyle {
list-style: none;
}
-.text-justify {
+.msp-text-justify {
text-align: justify;
text-justify: inter-word;
}
-.text-start {
+.msp-text-start {
text-align: start;
}
-.text-center {
+.msp-text-center {
text-align: center;
}
-.text-end {
+.msp-text-end {
text-align: end;
}
-.align-start {
+.msp-align-start {
vertical-align: start;
}
-.align-center {
+.msp-align-center {
vertical-align: middle;
}
-.align-end {
+.msp-align-end {
vertical-align: end;
}
-.overflow-scroll {
+.msp-overflow-scroll {
overflow: scroll;
}
-.overflow-x-scroll {
+.msp-overflow-x-scroll {
overflow-x: scroll;
}
-.overflow-y-scroll {
+.msp-overflow-y-scroll {
overflow-y: scroll;
}
-.w-auto {
+.msp-w-auto {
width: auto;
}
-.h-auto {
+.msp-h-auto {
height: auto;
}
@for $i from 0 through 100 {
- .w-#{$i} {
+ .msp-w-#{$i} {
width: percentage(calc($i / 100));
}
- .h-#{$i} {
+ .msp-h-#{$i} {
height: percentage(calc($i / 100));
}
}
@include mixins.responsive-steps(0, 100) using ($breakpoint, $index) {
- .w-#{$breakpoint}-#{$index} {
+ .msp-w-#{$breakpoint}-#{$index} {
width: percentage(calc($index / 100));
}
- .h-#{$breakpoint}-#{$index} {
+ .msp-h-#{$breakpoint}-#{$index} {
height: percentage(calc($index / 100));
}
}
@@ -236,54 +236,54 @@
$name: "#{$breakpoint}-#{$name}";
}
- .m-#{$name} {
+ .msp-m-#{$name} {
margin: $value !important;
}
- .mx-#{$name} {
+ .msp-mx-#{$name} {
margin-left: $value !important;
margin-right: $value !important;
}
- .my-#{$name} {
+ .msp-my-#{$name} {
margin-top: $value !important;
margin-bottom: $value !important;
}
- .mt-#{$name} {
+ .msp-mt-#{$name} {
margin-top: $value !important;
}
- .mb-#{$name} {
+ .msp-mb-#{$name} {
margin-bottom: $value !important;
}
- .ml-#{$name} {
+ .msp-ml-#{$name} {
margin-left: $value !important;
}
- .mr-#{$name} {
+ .msp-mr-#{$name} {
margin-right: $value !important;
}
- .p-#{$name} {
+ .msp-p-#{$name} {
padding: $value !important;
}
- .px-#{$name} {
+ .msp-px-#{$name} {
padding-left: $value !important;
padding-right: $value !important;
}
- .py-#{$name} {
+ .msp-py-#{$name} {
padding-top: $value !important;
padding-bottom: $value !important;
}
- .pt-#{$name} {
+ .msp-pt-#{$name} {
padding-top: $value !important;
}
- .pb-#{$name} {
+ .msp-pb-#{$name} {
padding-bottom: $value !important;
}
- .pl-#{$name} {
+ .msp-pl-#{$name} {
padding-left: $value !important;
}
- .pr-#{$name} {
+ .msp-pr-#{$name} {
padding-right: $value !important;
}
- .gap-#{$name} {
+ .msp-gap-#{$name} {
--prj-gap: #{$value};
}
}
@@ -300,30 +300,30 @@
}
}
-.shadow-0 {
+.msp-shadow-0 {
box-shadow: none;
}
-.shadow-1 {
+.msp-shadow-1 {
box-shadow: 10px 10px 5px 0px var(--prj-shadow);
}
-.border-radius {
+.msp-border-radius {
border-radius: var(--prj-border-radius);
}
-.text-none {
+.msp-text-none {
text-transform: none;
}
-.text-capitalize {
+.msp-text-capitalize {
text-transform: capitalize;
}
-.text-uppercase {
+.msp-text-uppercase {
text-transform: uppercase;
}
-.text-uppercase {
+.msp-text-uppercase {
text-transform: uppercase;
}
-.text-lowercase {
+.msp-text-lowercase {
text-transform: lowercase;
}
diff --git a/packages/core/src/components/form.scss b/packages/core/src/components/form.scss
new file mode 100644
index 0000000..1ad5205
--- /dev/null
+++ b/packages/core/src/components/form.scss
@@ -0,0 +1,217 @@
+@use "../tokens" as *;
+@use "../mixins";
+@use "sass:color";
+@use "sass:string";
+
+fieldset:not(.msp-fieldset-border) {
+ min-width: 0;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+
+fieldset.msp-fieldset-border {
+ padding: var(--msp-spacing-2);
+ margin: 0;
+ border-radius: var(--msp-border-radius);
+ border: var(--msp-border-width) var(--msp-border-style) var(--msp-color-text);
+}
+
+label {
+ display: inline-block;
+ margin-bottom: var(--msp-spacing-1);
+}
+
+select,
+input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not(
+ [type="range"]
+ ) {
+ display: block;
+ border-radius: var(--msp-border-radius);
+ border: var(--msp-border-width) var(--msp-border-style)
+ var(--msp-border-color);
+ width: 100%;
+ background-color: var(--msp-color-bg-input);
+ color: var(--msp-color-text-input);
+
+ padding: var(--msp-spacing-1);
+ font-size: 0.8rem;
+}
+
+input[type="checkbox"] + label {
+ display: inline-block;
+ margin-bottom: initial;
+}
+
+input[type="checkbox"] {
+ float: left;
+ background-color: var(--msp-color-bg-input);
+
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+
+ border-radius: var(--msp-border-radius);
+ border: var(--msp-border-width) var(--msp-border-style)
+ var(--msp-border-bg-input);
+ background-color: var(--msp-color-bg-input);
+ background-image: var(--msp-form-check-bg-image);
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: contain;
+
+ $size: 0.75rem;
+
+ width: $size;
+ height: $size;
+
+ margin-top: 0.425rem;
+ margin-right: var(--msp-spacing-1);
+
+ &:checked {
+ background-color: var(--msp-color-bg-checkbox);
+ border-color: var(--msp-color-bg-checkbox);
+
+ $stroke-color: "%23#{string.slice(map-get($msp-colors, "--msp-color-text-checkbox"), 2, -1)}";
+ --msp-form-check-bg-image: url('data:image/svg+xml,');
+ }
+}
+
+input[type="radio"] {
+ float: left;
+ background-color: var(--msp-color-bg-input);
+
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+
+ border-radius: 50%;
+ border: var(--msp-border-width) var(--msp-border-style)
+ var(--msp-border-bg-input);
+ background-color: var(--msp-color-bg-input);
+ background-image: var(--msp-form-check-bg-image);
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: contain;
+
+ $size: 0.75rem;
+
+ width: $size;
+ height: $size;
+
+ margin-top: 0.425rem;
+ margin-right: var(--msp-spacing-1);
+
+ &:checked {
+ background-color: var(--msp-color-bg-checkbox);
+ border-color: var(--msp-color-bg-checkbox);
+
+ $fill-color: "%23#{string.slice(map-get($msp-colors, "--msp-color-text-checkbox"), 2, -1)}";
+ --msp-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='#{$fill-color}'/%3e%3c/svg%3e");
+ }
+}
+
+input[type="color"] {
+ display: block;
+ border-radius: var(--msp-border-radius);
+ border: var(--msp-border-width) var(--msp-border-style)
+ var(--msp-color-bg-input);
+ padding: var(--msp-spacing-1);
+ width: 3rem;
+ height: 2rem;
+
+ background-color: var(--msp-color-bg-input);
+
+ &::-moz-color-swatch {
+ padding: var(--msp-spacing-1);
+ border-radius: var(--msp-border-radius);
+ border: 0;
+ }
+}
+
+input[type="range"] {
+ background-color: transparent;
+
+ display: block;
+ width: 100%;
+ // color: var(--msp-color-text-input);
+
+ border-color: transparent;
+ &::-moz-range-thumb {
+ background-color: var(--msp-color-text-range);
+ width: 1rem;
+ height: 1rem;
+ border-radius: 50%;
+ border: 0;
+ }
+ &::-moz-range-track {
+ background-color: var(--msp-color-bg-range);
+ color: transparent;
+ border-color: transparent;
+ width: 100%;
+ height: 0.5rem;
+ border-radius: var(--msp-border-radius);
+ }
+}
+
+input:disabled::placeholder,
+input::placeholder,
+select:disabled,
+option:disabled {
+ opacity: 1;
+ color: var(--msp-color-text-input-disabled);
+}
+
+input:disabled {
+ background: var(--msp-color-bg-disabled);
+}
+
+.form-control[type="file"] {
+ &:not(:disabled):not([readonly]) {
+ cursor: pointer;
+ }
+
+ overflow: hidden;
+
+ @include mixins.hover-darker;
+
+ &.form-control::file-selector-button {
+ background-color: inherit;
+ padding-right: var(--msp-spacing-2);
+ margin-right: var(--msp-spacing-2);
+ pointer-events: none;
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
+ border-inline-end-width: var(--msp-border-width);
+ border-radius: 0;
+ }
+}
+
+.msp-form-text-help {
+ margin-top: var(--msp-spacing-1);
+ font-size: 0.875em;
+ color: var(--msp-color-text-disabled);
+}
+
+[type="submit"]:not(:disabled),
+button:not(:disabled) {
+ cursor: pointer;
+}
+
+button {
+ display: inline-block;
+ padding: var(--msp-spacing-1) var(--msp-spacing-2);
+ background: var(--msp-color-bg-btn);
+ font-size: 1rem;
+ color: var(--msp-color-text-btn);
+ text-align: center;
+ text-decoration: none;
+ vertical-align: middle;
+ cursor: pointer;
+ border: var(--msp-border-width) var(--msp-border-style)
+ var(--msp-color-bg-btn);
+ border-radius: var(--msp-border-radius);
+
+ @include mixins.hover-darker;
+}
diff --git a/packages/core/src/components/table.scss b/packages/core/src/components/table.scss
new file mode 100644
index 0000000..1f30872
--- /dev/null
+++ b/packages/core/src/components/table.scss
@@ -0,0 +1,37 @@
+table {
+ caption-side: bottom;
+ border-collapse: collapse;
+
+ width: 100%;
+
+ tbody,
+ td,
+ tfoot,
+ th,
+ thead,
+ tr {
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
+ }
+
+ thead {
+ vertical-align: bottom;
+ th {
+ text-align: start;
+ }
+ }
+
+ & > :not(caption) > * > * {
+ padding: var(--msp-spacing-2);
+ color: var(--msp-color-table-text);
+ background-color: var(--msp-color-bg-table);
+ border-bottom-width: var(--msp-border-width);
+ border-color: var(--msp-color-text-transparent);
+ box-shadow: inset 0 0 0 9999px
+ var(
+ --bs-table-bg-state,
+ var(--bs-table-bg-type, var(--bs-table-accent-bg))
+ );
+ }
+}
diff --git a/packages/core/src/style.scss b/packages/core/src/style.scss
index a1916b2..53f7103 100644
--- a/packages/core/src/style.scss
+++ b/packages/core/src/style.scss
@@ -1,14 +1,17 @@
+@use "./reset";
@use "./tokens.scss" as *;
@use "./utils.scss";
@use "./animations.scss";
@use "./mixins";
+@use "./components/form";
+@use "./components/table";
+
// SASS variables are imported without namespace, but try to always use native
// CSS variables when possible so they can be overrwritten by custom styles
-
html {
- background-color: var(--msp-bg);
- color: var(--msp-text);
+ background-color: var(--msp-color-bg);
+ color: var(--msp-color-text);
/* Update font size based on screen width, source: https://matthewjamestaylor.com/responsive-font-size */
font-size: calc(15px + 0.390625vw);
@@ -23,8 +26,8 @@ body > main {
section:not(.clean) {
/* outline: 1px solid var(--msp-accent-bg); */
padding: var(--msp-spacing-3);
- background-color: var(--msp-surface-1);
- box-shadow: 10px 10px 5px 0px var(--msp-shadow);
+ background-color: var(--msp-color-bg-surface-1);
+ box-shadow: 10px 10px 5px 0px var(--msp-color-shadow);
border-radius: var(--msp-border-radius);
}
@@ -85,7 +88,7 @@ p:last-child {
}
a {
- color: var(--msp-link-text);
+ color: var(--msp-color-text-link);
}
ul {
@@ -123,49 +126,3 @@ video.respect-height {
li:not(:last-child) {
margin-bottom: var(--msp-spacing-1);
}
-
-.btn {
- padding: var(--msp-spacing-1);
-}
-
-.btn-primary {
- background-color: var(--msp--primary-bg);
- color: var(--msp--primary-text);
-}
-
-/* Lightgallery iframe fix */
-.lg-has-iframe {
- position: absolute;
- top: 0;
- left: 0;
- .lg-object {
- width: 100% !important;
- height: 100% !important;
- }
-}
-
-.bg-image {
- background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
- var(--bg-image);
- background-position: center;
- background-size: cover;
- color: var(--msp-text);
-
- padding: var(--msp-spacing-3);
-
- .text {
- padding: var(--msp-spacing-2);
- background-color: var(--msp-bg-transparent);
-
- border-radius: var(--msp-border-radius);
- }
-}
-
-a {
- transition: text-shadow 0.2s;
- --anim-shadow-color: var(--msp-accent-bg);
-
- &:not(.clean):hover {
- text-shadow: 1px 1px 8px var(--anim-shadow-color);
- }
-}
diff --git a/packages/website/.gitignore b/packages/website/.gitignore
index a547bf3..b2d6de3 100644
--- a/packages/website/.gitignore
+++ b/packages/website/.gitignore
@@ -1,24 +1,20 @@
-# Logs
-logs
-*.log
+# Dependencies
+/node_modules
+
+# Production
+/build
+
+# Generated files
+.docusaurus
+.cache-loader
+
+# Misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
npm-debug.log*
yarn-debug.log*
yarn-error.log*
-pnpm-debug.log*
-lerna-debug.log*
-
-node_modules
-dist
-dist-ssr
-*.local
-
-# Editor directories and files
-.vscode/*
-!.vscode/extensions.json
-.idea
-.DS_Store
-*.suo
-*.ntvs*
-*.njsproj
-*.sln
-*.sw?
diff --git a/packages/website/README.md b/packages/website/README.md
new file mode 100644
index 0000000..0c6c2c2
--- /dev/null
+++ b/packages/website/README.md
@@ -0,0 +1,41 @@
+# Website
+
+This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
+
+### Installation
+
+```
+$ yarn
+```
+
+### Local Development
+
+```
+$ yarn start
+```
+
+This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
+
+### Build
+
+```
+$ yarn build
+```
+
+This command generates static content into the `build` directory and can be served using any static contents hosting service.
+
+### Deployment
+
+Using SSH:
+
+```
+$ USE_SSH=true yarn deploy
+```
+
+Not using SSH:
+
+```
+$ GIT_USER= yarn deploy
+```
+
+If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
diff --git a/packages/website/blog/2019-05-28-first-blog-post.md b/packages/website/blog/2019-05-28-first-blog-post.md
new file mode 100644
index 0000000..d3032ef
--- /dev/null
+++ b/packages/website/blog/2019-05-28-first-blog-post.md
@@ -0,0 +1,12 @@
+---
+slug: first-blog-post
+title: First Blog Post
+authors: [slorber, yangshun]
+tags: [hola, docusaurus]
+---
+
+Lorem ipsum dolor sit amet...
+
+
+
+...consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
diff --git a/packages/website/blog/2019-05-29-long-blog-post.md b/packages/website/blog/2019-05-29-long-blog-post.md
new file mode 100644
index 0000000..eb4435d
--- /dev/null
+++ b/packages/website/blog/2019-05-29-long-blog-post.md
@@ -0,0 +1,44 @@
+---
+slug: long-blog-post
+title: Long Blog Post
+authors: yangshun
+tags: [hello, docusaurus]
+---
+
+This is the summary of a very long blog post,
+
+Use a `` comment to limit blog post size in the list view.
+
+
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
+
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque elementum dignissim ultricies. Fusce rhoncus ipsum tempor eros aliquam consequat. Lorem ipsum dolor sit amet
diff --git a/packages/website/blog/2021-08-01-mdx-blog-post.mdx b/packages/website/blog/2021-08-01-mdx-blog-post.mdx
new file mode 100644
index 0000000..0c4b4a4
--- /dev/null
+++ b/packages/website/blog/2021-08-01-mdx-blog-post.mdx
@@ -0,0 +1,24 @@
+---
+slug: mdx-blog-post
+title: MDX Blog Post
+authors: [slorber]
+tags: [docusaurus]
+---
+
+Blog posts support [Docusaurus Markdown features](https://docusaurus.io/docs/markdown-features), such as [MDX](https://mdxjs.com/).
+
+:::tip
+
+Use the power of React to create interactive blog posts.
+
+:::
+
+{/* truncate */}
+
+For example, use JSX to create an interactive button:
+
+```js
+
+```
+
+
diff --git a/packages/website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg b/packages/website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg
new file mode 100644
index 0000000..11bda09
Binary files /dev/null and b/packages/website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg differ
diff --git a/packages/website/blog/2021-08-26-welcome/index.md b/packages/website/blog/2021-08-26-welcome/index.md
new file mode 100644
index 0000000..349ea07
--- /dev/null
+++ b/packages/website/blog/2021-08-26-welcome/index.md
@@ -0,0 +1,29 @@
+---
+slug: welcome
+title: Welcome
+authors: [slorber, yangshun]
+tags: [facebook, hello, docusaurus]
+---
+
+[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
+
+Here are a few tips you might find useful.
+
+
+
+Simply add Markdown files (or folders) to the `blog` directory.
+
+Regular blog authors can be added to `authors.yml`.
+
+The blog post date can be extracted from filenames, such as:
+
+- `2019-05-30-welcome.md`
+- `2019-05-30-welcome/index.md`
+
+A blog post folder can be convenient to co-locate blog post images:
+
+
+
+The blog supports tags as well!
+
+**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
diff --git a/packages/website/blog/authors.yml b/packages/website/blog/authors.yml
new file mode 100644
index 0000000..8bfa5c7
--- /dev/null
+++ b/packages/website/blog/authors.yml
@@ -0,0 +1,23 @@
+yangshun:
+ name: Yangshun Tay
+ title: Front End Engineer @ Facebook
+ url: https://github.com/yangshun
+ image_url: https://github.com/yangshun.png
+ page: true
+ socials:
+ x: yangshunz
+ github: yangshun
+
+slorber:
+ name: Sébastien Lorber
+ title: Docusaurus maintainer
+ url: https://sebastienlorber.com
+ image_url: https://github.com/slorber.png
+ page:
+ # customize the url of the author page at /blog/authors/
+ permalink: '/all-sebastien-lorber-articles'
+ socials:
+ x: sebastienlorber
+ linkedin: sebastienlorber
+ github: slorber
+ newsletter: https://thisweekinreact.com
diff --git a/packages/website/blog/tags.yml b/packages/website/blog/tags.yml
new file mode 100644
index 0000000..bfaa778
--- /dev/null
+++ b/packages/website/blog/tags.yml
@@ -0,0 +1,19 @@
+facebook:
+ label: Facebook
+ permalink: /facebook
+ description: Facebook tag description
+
+hello:
+ label: Hello
+ permalink: /hello
+ description: Hello tag description
+
+docusaurus:
+ label: Docusaurus
+ permalink: /docusaurus
+ description: Docusaurus tag description
+
+hola:
+ label: Hola
+ permalink: /hola
+ description: Hola tag description
diff --git a/packages/website/docs/intro.md b/packages/website/docs/intro.md
new file mode 100644
index 0000000..45e8604
--- /dev/null
+++ b/packages/website/docs/intro.md
@@ -0,0 +1,47 @@
+---
+sidebar_position: 1
+---
+
+# Tutorial Intro
+
+Let's discover **Docusaurus in less than 5 minutes**.
+
+## Getting Started
+
+Get started by **creating a new site**.
+
+Or **try Docusaurus immediately** with **[docusaurus.new](https://docusaurus.new)**.
+
+### What you'll need
+
+- [Node.js](https://nodejs.org/en/download/) version 18.0 or above:
+ - When installing Node.js, you are recommended to check all checkboxes related to dependencies.
+
+## Generate a new site
+
+Generate a new Docusaurus site using the **classic template**.
+
+The classic template will automatically be added to your project after you run the command:
+
+```bash
+npm init docusaurus@latest my-website classic
+```
+
+You can type this command into Command Prompt, Powershell, Terminal, or any other integrated terminal of your code editor.
+
+The command also installs all necessary dependencies you need to run Docusaurus.
+
+## Start your site
+
+Run the development server:
+
+```bash
+cd my-website
+npm run start
+```
+
+The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
+
+The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
+
+Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.
diff --git a/packages/website/docs/tutorial-basics/_category_.json b/packages/website/docs/tutorial-basics/_category_.json
new file mode 100644
index 0000000..2e6db55
--- /dev/null
+++ b/packages/website/docs/tutorial-basics/_category_.json
@@ -0,0 +1,8 @@
+{
+ "label": "Tutorial - Basics",
+ "position": 2,
+ "link": {
+ "type": "generated-index",
+ "description": "5 minutes to learn the most important Docusaurus concepts."
+ }
+}
diff --git a/packages/website/docs/tutorial-basics/congratulations.md b/packages/website/docs/tutorial-basics/congratulations.md
new file mode 100644
index 0000000..04771a0
--- /dev/null
+++ b/packages/website/docs/tutorial-basics/congratulations.md
@@ -0,0 +1,23 @@
+---
+sidebar_position: 6
+---
+
+# Congratulations!
+
+You have just learned the **basics of Docusaurus** and made some changes to the **initial template**.
+
+Docusaurus has **much more to offer**!
+
+Have **5 more minutes**? Take a look at **[versioning](../tutorial-extras/manage-docs-versions.md)** and **[i18n](../tutorial-extras/translate-your-site.md)**.
+
+Anything **unclear** or **buggy** in this tutorial? [Please report it!](https://github.com/facebook/docusaurus/discussions/4610)
+
+## What's next?
+
+- Read the [official documentation](https://docusaurus.io/)
+- Modify your site configuration with [`docusaurus.config.js`](https://docusaurus.io/docs/api/docusaurus-config)
+- Add navbar and footer items with [`themeConfig`](https://docusaurus.io/docs/api/themes/configuration)
+- Add a custom [Design and Layout](https://docusaurus.io/docs/styling-layout)
+- Add a [search bar](https://docusaurus.io/docs/search)
+- Find inspirations in the [Docusaurus showcase](https://docusaurus.io/showcase)
+- Get involved in the [Docusaurus Community](https://docusaurus.io/community/support)
diff --git a/packages/website/docs/tutorial-basics/create-a-blog-post.md b/packages/website/docs/tutorial-basics/create-a-blog-post.md
new file mode 100644
index 0000000..550ae17
--- /dev/null
+++ b/packages/website/docs/tutorial-basics/create-a-blog-post.md
@@ -0,0 +1,34 @@
+---
+sidebar_position: 3
+---
+
+# Create a Blog Post
+
+Docusaurus creates a **page for each blog post**, but also a **blog index page**, a **tag system**, an **RSS** feed...
+
+## Create your first Post
+
+Create a file at `blog/2021-02-28-greetings.md`:
+
+```md title="blog/2021-02-28-greetings.md"
+---
+slug: greetings
+title: Greetings!
+authors:
+ - name: Joel Marcey
+ title: Co-creator of Docusaurus 1
+ url: https://github.com/JoelMarcey
+ image_url: https://github.com/JoelMarcey.png
+ - name: Sébastien Lorber
+ title: Docusaurus maintainer
+ url: https://sebastienlorber.com
+ image_url: https://github.com/slorber.png
+tags: [greetings]
+---
+
+Congratulations, you have made your first post!
+
+Feel free to play around and edit this post as much as you like.
+```
+
+A new blog post is now available at [http://localhost:3000/blog/greetings](http://localhost:3000/blog/greetings).
diff --git a/packages/website/docs/tutorial-basics/create-a-document.md b/packages/website/docs/tutorial-basics/create-a-document.md
new file mode 100644
index 0000000..c22fe29
--- /dev/null
+++ b/packages/website/docs/tutorial-basics/create-a-document.md
@@ -0,0 +1,57 @@
+---
+sidebar_position: 2
+---
+
+# Create a Document
+
+Documents are **groups of pages** connected through:
+
+- a **sidebar**
+- **previous/next navigation**
+- **versioning**
+
+## Create your first Doc
+
+Create a Markdown file at `docs/hello.md`:
+
+```md title="docs/hello.md"
+# Hello
+
+This is my **first Docusaurus document**!
+```
+
+A new document is now available at [http://localhost:3000/docs/hello](http://localhost:3000/docs/hello).
+
+## Configure the Sidebar
+
+Docusaurus automatically **creates a sidebar** from the `docs` folder.
+
+Add metadata to customize the sidebar label and position:
+
+```md title="docs/hello.md" {1-4}
+---
+sidebar_label: 'Hi!'
+sidebar_position: 3
+---
+
+# Hello
+
+This is my **first Docusaurus document**!
+```
+
+It is also possible to create your sidebar explicitly in `sidebars.js`:
+
+```js title="sidebars.js"
+export default {
+ tutorialSidebar: [
+ 'intro',
+ // highlight-next-line
+ 'hello',
+ {
+ type: 'category',
+ label: 'Tutorial',
+ items: ['tutorial-basics/create-a-document'],
+ },
+ ],
+};
+```
diff --git a/packages/website/docs/tutorial-basics/create-a-page.md b/packages/website/docs/tutorial-basics/create-a-page.md
new file mode 100644
index 0000000..20e2ac3
--- /dev/null
+++ b/packages/website/docs/tutorial-basics/create-a-page.md
@@ -0,0 +1,43 @@
+---
+sidebar_position: 1
+---
+
+# Create a Page
+
+Add **Markdown or React** files to `src/pages` to create a **standalone page**:
+
+- `src/pages/index.js` → `localhost:3000/`
+- `src/pages/foo.md` → `localhost:3000/foo`
+- `src/pages/foo/bar.js` → `localhost:3000/foo/bar`
+
+## Create your first React Page
+
+Create a file at `src/pages/my-react-page.js`:
+
+```jsx title="src/pages/my-react-page.js"
+import React from 'react';
+import Layout from '@theme/Layout';
+
+export default function MyReactPage() {
+ return (
+
+
My React page
+
This is a React page
+
+ );
+}
+```
+
+A new page is now available at [http://localhost:3000/my-react-page](http://localhost:3000/my-react-page).
+
+## Create your first Markdown Page
+
+Create a file at `src/pages/my-markdown-page.md`:
+
+```mdx title="src/pages/my-markdown-page.md"
+# My Markdown page
+
+This is a Markdown page
+```
+
+A new page is now available at [http://localhost:3000/my-markdown-page](http://localhost:3000/my-markdown-page).
diff --git a/packages/website/docs/tutorial-basics/deploy-your-site.md b/packages/website/docs/tutorial-basics/deploy-your-site.md
new file mode 100644
index 0000000..1c50ee0
--- /dev/null
+++ b/packages/website/docs/tutorial-basics/deploy-your-site.md
@@ -0,0 +1,31 @@
+---
+sidebar_position: 5
+---
+
+# Deploy your site
+
+Docusaurus is a **static-site-generator** (also called **[Jamstack](https://jamstack.org/)**).
+
+It builds your site as simple **static HTML, JavaScript and CSS files**.
+
+## Build your site
+
+Build your site **for production**:
+
+```bash
+npm run build
+```
+
+The static files are generated in the `build` folder.
+
+## Deploy your site
+
+Test your production build locally:
+
+```bash
+npm run serve
+```
+
+The `build` folder is now served at [http://localhost:3000/](http://localhost:3000/).
+
+You can now deploy the `build` folder **almost anywhere** easily, **for free** or very small cost (read the **[Deployment Guide](https://docusaurus.io/docs/deployment)**).
diff --git a/packages/website/docs/tutorial-basics/markdown-features.mdx b/packages/website/docs/tutorial-basics/markdown-features.mdx
new file mode 100644
index 0000000..35e0082
--- /dev/null
+++ b/packages/website/docs/tutorial-basics/markdown-features.mdx
@@ -0,0 +1,152 @@
+---
+sidebar_position: 4
+---
+
+# Markdown Features
+
+Docusaurus supports **[Markdown](https://daringfireball.net/projects/markdown/syntax)** and a few **additional features**.
+
+## Front Matter
+
+Markdown documents have metadata at the top called [Front Matter](https://jekyllrb.com/docs/front-matter/):
+
+```text title="my-doc.md"
+// highlight-start
+---
+id: my-doc-id
+title: My document title
+description: My document description
+slug: /my-custom-url
+---
+// highlight-end
+
+## Markdown heading
+
+Markdown text with [links](./hello.md)
+```
+
+## Links
+
+Regular Markdown links are supported, using url paths or relative file paths.
+
+```md
+Let's see how to [Create a page](/create-a-page).
+```
+
+```md
+Let's see how to [Create a page](./create-a-page.md).
+```
+
+**Result:** Let's see how to [Create a page](./create-a-page.md).
+
+## Images
+
+Regular Markdown images are supported.
+
+You can use absolute paths to reference images in the static directory (`static/img/docusaurus.png`):
+
+```md
+
+```
+
+
+
+You can reference images relative to the current file as well. This is particularly useful to colocate images close to the Markdown files using them:
+
+```md
+
+```
+
+## Code Blocks
+
+Markdown code blocks are supported with Syntax highlighting.
+
+````md
+```jsx title="src/components/HelloDocusaurus.js"
+function HelloDocusaurus() {
+ return