Skip to content

Commit

Permalink
[DPCP-65] Oneiros: Morpheus: Add Oneiros to Morpheus (#15)
Browse files Browse the repository at this point in the history
* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus

* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus

* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus

* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep

* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep

* ar(fix) [cherry-pick] date range colors

* ar(fix) [cherry-pick] date range colors

* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep

* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep

* ar(fix) [DPCP-65]: Adding Oneiros to Morpheus: let's house keep
  • Loading branch information
angeloreale authored Aug 14, 2024
1 parent 056da3c commit ca30564
Show file tree
Hide file tree
Showing 7 changed files with 178 additions and 43 deletions.
59 changes: 57 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.0.1",
"description": "DreamPip's Design System Component Library.",
"type": "module",
"main": "dist/index.cjs.js",
"module": "dist/index.es.js",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.es.js",
"types": "dist/index.d.ts",
"repository": "https://github.com/dreampipcom/oneiros",
"files": [
Expand All @@ -15,8 +15,8 @@
"lint:icons": "eslint . --ext .ts,.tsx --ignore-path .gitignore --fix",
"format": "prettier --write --parser typescript '**/*.{ts,tsx}' --ignore-path .ignoreicons",
"lint": "eslint . --ext .ts,.tsx --ignore-path .ignoreicons --fix",
"build": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build",
"build:watch": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --watch",
"build": "tsc -p tsconfig-cjs.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --mode cjs && tsc -p tsconfig.json && vite build --emptyOutDir=false --mode es",
"build:watch": "tsc -p tsconfig.json && cp ./tailwind.config.ts ./public/ && tsc -p tsconfig-dist.json && vite build --watch --mode es",
"test": "vitest run",
"test-watch": "vitest",
"test:ui": "vitest --ui",
Expand Down Expand Up @@ -81,12 +81,12 @@
"jsdom": "24.0.0",
"lodash": "4.17.21",
"mapbox-gl": "^3.5.2",
"moment": "^2.30.1",
"postcss": "8.4.38",
"prettier": "3.2.5",
"react-map-gl": "^7.1.7",
"storybook": "^8.1.11",
"vite": "5.2.9",
"vite-plugin-commonjs": "^0.10.1",
"vite-plugin-dts": "3.8.3",
"vite-plugin-eslint": "^1.8.1",
"vite-tsconfig-paths": "4.3.2",
Expand All @@ -95,6 +95,7 @@
"peerDependencies": {
"clsx": "2.1.0",
"lazysizes": "^5.3.2",
"moment": "^2.30.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "3.4.4",
Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions src/atoms/12_DateRange/DateRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,18 @@ export const HDateRange = function ({
md:[&_.base-Popper-root]:!top-a5
md:[&_.base-Popper-root]:!mt-0
[&_.MuiPickersToolbarText-root.Mui-selected]:text-soft-light
[&_.MuiPickersToolbarText-root.Mui-selected]:text-primary-light
dark:[&_.MuiPickersToolbarText-root.Mui-selected]:text-soft-light
dark:!text-body-dark
[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-soft-light
hover:[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-soft-light
focus:[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-soft-light
[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-primary-light
hover:[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-primary-light
focus:[&_.MuiDateRangePickerDay-day.Mui-selected]:bg-primary-light
[&_.MuiButton-colorPrimary]:!text-secondary-light
[&_.MuiDateRangePickerDay-rangeIntervalDayHighlight]:!bg-soft-bg
hover:[&_.MuiDateRangePickerDay-day]:!bg-soft-light
[&_.MuiDateRangePickerDay-rangeIntervalDayHighlight]:!bg-secondary-light
hover:[&_.MuiDateRangePickerDay-day]:!bg-primary-light
`]: true,
},
];
Expand Down
23 changes: 23 additions & 0 deletions tsconfig-cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"target": "ES5",
"useDefineForClassFields": true,
"lib": ["DOM", "DOM.Iterable"],
"module": "commonjs",
"skipLibCheck": true,
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"noEmit": true,
"esModuleInterop": true,
"jsx": "react-jsx",
"noUnusedLocals": false,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"declaration": true,
"outDir": "dist/cjs"
},
"include": ["src"],
"exclude": [
"src/**/__docs__","src/**/__test__",
]
}
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
"declaration": true,
"outDir": "dist/esm"
},
"include": ["src"],
"exclude": [
Expand Down
115 changes: 85 additions & 30 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,37 +1,92 @@
/// <reference types='vitest' />
import commonjs from 'vite-plugin-commonjs';
import eslint from 'vite-plugin-eslint';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import dts from 'vite-plugin-dts';
import { peerDependencies } from './package.json';

export default defineConfig((env) => ({
build: {
lib: {
entry: './src/index.ts',
name: 'vite-react-ts-button',
fileName: (format) => `index.${format}.js`,
formats: ['cjs', 'es'],
},
rollupOptions: {
external: [...Object.keys(peerDependencies), 'react/jsx-runtime'],
},
sourcemap: true,
emptyOutDir: true,
},
plugins: [
dts({
insertTypesEntry: true,
}),
react({ fastRefresh: false }),
env.mode !== 'test' &&
eslint({
exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'],
}),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './setupTests.ts',
},
}));
export default defineConfig((env) => {
return env.mode != 'cjs'
? {
// es-module
build: {
outDir: './dist/esm',
lib: {
entry: './src/index.ts',
name: 'oneiros-esm',
fileName: (format) => `index.es.js`,
formats: ['es'],
},
rollupOptions: {
external: [
...Object.keys(peerDependencies),
'react/jsx-runtime',
'moment',
],
},
sourcemap: true,
emptyOutDir: false,
},
plugins: [
dts({
insertTypesEntry: true,
tsconfigPath: './tsconfig.json',
}),
react({ fastRefresh: false }),
env.mode !== 'test' &&
eslint({
exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'],
}),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './setupTests.ts',
},
}
: {
build: {
// cjs
outDir: './dist/cjs',
lib: {
entry: './src/index.ts',
name: 'oneiros-cjs',
fileName: (format) => `index.cjs`,
formats: ['cjs'],
},
rollupOptions: {
external: [
...Object.keys(peerDependencies),
'react/jsx-runtime',
'moment',
],
onwarn(warning, defaultHandler) {
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
return;
}
defaultHandler(warning);
},
},
sourcemap: true,
emptyOutDir: false,
},
plugins: [
dts({
insertTypesEntry: true,
tsconfigPath: './tsconfig-cjs.json',
}),
commonjs(),
// react({ fastRefresh: false }),
env.mode !== 'test' &&
eslint({
exclude: ['/virtual:/**', 'node_modules/**', '/sb-preview/**'],
}),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './setupTests.ts',
},
};
});

0 comments on commit ca30564

Please sign in to comment.