Skip to content
This repository has been archived by the owner on Nov 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #16 from medusajs/feat/more-components
Browse files Browse the repository at this point in the history
feat(ui): Add more components
  • Loading branch information
kasperkristensen authored Jul 12, 2023
2 parents d06cb24 + 60d08fb commit b204ec4
Show file tree
Hide file tree
Showing 67 changed files with 1,805 additions and 1,101 deletions.
3 changes: 0 additions & 3 deletions apps/www/.eslintrc.json

This file was deleted.

35 changes: 0 additions & 35 deletions apps/www/.gitignore

This file was deleted.

34 changes: 0 additions & 34 deletions apps/www/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions apps/www/next.config.js

This file was deleted.

30 changes: 0 additions & 30 deletions apps/www/package.json

This file was deleted.

6 changes: 0 additions & 6 deletions apps/www/postcss.config.js

This file was deleted.

1 change: 0 additions & 1 deletion apps/www/public/next.svg

This file was deleted.

1 change: 0 additions & 1 deletion apps/www/public/vercel.svg

This file was deleted.

32 changes: 0 additions & 32 deletions apps/www/src/app/client-wrapper.tsx

This file was deleted.

Binary file removed apps/www/src/app/favicon.ico
Binary file not shown.
3 changes: 0 additions & 3 deletions apps/www/src/app/globals.css

This file was deleted.

21 changes: 0 additions & 21 deletions apps/www/src/app/layout.tsx

This file was deleted.

9 changes: 0 additions & 9 deletions apps/www/src/app/page.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions apps/www/tailwind.config.js

This file was deleted.

28 changes: 0 additions & 28 deletions apps/www/tsconfig.json

This file was deleted.

16 changes: 0 additions & 16 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,22 @@ module.exports = function (api) {
assumptions: {
setPublicClassFields: true,
privateFieldsAsProperties: true,
// nothing accesses `document.all`:
noDocumentAll: true,
// nothing relies on class constructors invoked without `new` throwing:
noClassCalls: true,
// nothing should be relying on tagged template strings being frozen:
mutableTemplateObject: true,
// nothing is relying on Function.prototype.length:
ignoreFunctionLength: true,
// nothing is relying on mutable re-exported bindings:
constantReexports: true,
// don't bother marking Module records non-enumerable:
enumerableModuleMeta: true,
// nothing uses [[Symbol.toPrimitive]]:
// (see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toPrimitive)
ignoreToPrimitiveHint: true,
// nothing relies on spread copying Symbol keys: ({...{ [Symbol()]: 1 }})
objectRestNoSymbols: true,
// nothing relies on `new (() => {})` throwing:
noNewArrows: true,
// transpile object spread to assignment instead of defineProperty():
setSpreadProperties: true,
// nothing should be using custom iterator protocol:
skipForOfIteratorClosing: true,
// nothing inherits from a constructor function with explicit return value:
superIsCallableConstructor: true,
// nothing relies on CJS-transpiled namespace imports having all properties prior to module execution completing:
noIncompleteNsImportDetection: true,
},
babelrcRoots: [
".",
// Note: The following projects use rootMode: 'upward' to inherit
// and merge with this root level config.
"./packages/ui",
"./packages/ui-preset",
"./packages/icons",
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "medusa-ui",
"private": true,
"scripts": {
"test": "turbo run test",
Expand All @@ -23,15 +24,14 @@
"@medusajs/eslint-config-ui": "*",
"@medusajs/toolbox": "*",
"babel-loader": "^9.1.2",
"eslint": "^7.32.0",
"eslint": "^8.44.0",
"prettier": "^2.5.1",
"prettier-plugin-tailwindcss": "^0.3.0",
"turbo": "latest"
"turbo": "latest",
"typescript": "^5.1.6"
},
"name": "medusa-ui",
"packageManager": "[email protected]",
"workspaces": [
"apps/*",
"packages/*",
"tools/*",
"configs/*"
Expand Down
11 changes: 10 additions & 1 deletion packages/ui-preset/src/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { fontFamily } from "tailwindcss/defaultTheme"
import plugin from "tailwindcss/plugin"
import { theme } from "./theme/extension/theme"
import { colors } from "./theme/tokens/colors"
Expand Down Expand Up @@ -38,6 +39,14 @@ export default plugin(
}
},
{
theme: theme,
theme: {
extend: {
...theme.extend,
fontFamily: {
sans: ["Inter", ...fontFamily.sans],
mono: ["Roboto Mono", ...fontFamily.mono],
},
},
},
}
)
3 changes: 2 additions & 1 deletion packages/ui-preset/src/theme/extension/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@ export const theme = {
"elevation-tooltip": "var(--elevation-tooltip)",
"elevation-card-hover": "var(--elevation-card-hover)",
"elevation-card-rest": "var(--elevation-card-rest)",
"details-contrast-on-bg-interactive": "var(--details-contrast-on-bg-interactive)"
"details-contrast-on-bg-interactive": "var(--details-contrast-on-bg-interactive)",
"borders-error": "var(--borders-error)"
}
}
}
3 changes: 2 additions & 1 deletion packages/ui-preset/src/theme/tokens/effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const effects = {
"--elevation-tooltip": "0px 0px 0px 1px rgba(3, 7, 18, 0.08), 0px 4px 8px 0px rgba(3, 7, 18, 0.08)",
"--elevation-card-hover": "0px 0px 0px 1px rgba(3, 7, 18, 0.08), 0px 1px 2px -1px rgba(3, 7, 18, 0.08), 0px 2px 8px 0px rgba(3, 7, 18, 0.1)",
"--elevation-card-rest": "0px 0px 0px 1px rgba(3, 7, 18, 0.08), 0px 1px 2px -1px rgba(3, 7, 18, 0.08), 0px 2px 4px 0px rgba(3, 7, 18, 0.04)",
"--details-contrast-on-bg-interactive": "0px 1px 2px 0px rgba(30, 58, 138, 0.6)"
"--details-contrast-on-bg-interactive": "0px 1px 2px 0px rgba(30, 58, 138, 0.6)",
"--borders-error": "0px 0px 0px 3px rgba(225, 29, 72, 0.15)"
}
}
4 changes: 3 additions & 1 deletion packages/ui-preset/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { defineConfig } from "tsup"
import path from "path"

export default defineConfig({
entry: ["./src/index.ts"],
entry: ["src/index.ts"],
format: ["cjs", "esm"],
tsconfig: path.resolve(__dirname, "tsconfig.json"),
dts: true,
clean: true,
})
2 changes: 1 addition & 1 deletion packages/ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
module.exports = {
extends: ["@medusajs/eslint-config-ui"],
parserOptions: {
project: "./tsconfig.json",
project: "tsconfig.json",
},
}
7 changes: 4 additions & 3 deletions packages/ui/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import type { StorybookConfig } from "@storybook/react-vite";
import type { StorybookConfig } from "@storybook/react-vite"
const config: StorybookConfig = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-docs",
],
framework: {
name: "@storybook/react-vite",
Expand All @@ -13,5 +14,5 @@ const config: StorybookConfig = {
docs: {
autodocs: "tag",
},
};
export default config;
}
export default config
Loading

0 comments on commit b204ec4

Please sign in to comment.