diff --git a/.storybook/index.css b/.storybook/index.css deleted file mode 100644 index b5c61c9..0000000 --- a/.storybook/index.css +++ /dev/null @@ -1,3 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; diff --git a/.storybook/preview.js b/.storybook/preview.js index c596833..6ec6fc3 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,4 +1,4 @@ -import './index.css' +import '../src/index.css' export const parameters = { actions: { argTypesRegex: '^on[A-Z].*' }, diff --git a/package.json b/package.json index b957989..21c58e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fave-ui", - "version": "0.1.28", + "version": "0.1.29", "description": "React UI KiT by Fave", "author": "Fave", "license": "MIT", diff --git a/rollup.config.js b/rollup.config.js index 94600d1..663f9cc 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -53,9 +53,11 @@ const devConfig = { }, extensions: ['.css'], minimize: true, - inject: { - insertAt: 'bottom' - } + extract: true + // need to keep this + // inject: { + // insertAt: 'bottom' + // } }), typescript(), resolve(), @@ -71,12 +73,12 @@ const devConfig = { const prodConfig = { ...devConfig, - plugins: [...devConfig.plugins, terser()] -}; + plugins: [...devConfig.plugins, terser()] +} export default [ // UMD Development devConfig, - // UMD Production - prodConfig + // UMD Production + prodConfig ] diff --git a/src/Affix/style.css b/src/Affix/style.css index 11ce7b9..e69de29 100644 --- a/src/Affix/style.css +++ b/src/Affix/style.css @@ -1,2 +0,0 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/affix/style/index.css'; \ No newline at end of file diff --git a/src/Alert/style.css b/src/Alert/style.css index b6dd554..d26b58d 100644 --- a/src/Alert/style.css +++ b/src/Alert/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/alert/style/index.css'; - .ant-alert { @apply border-none; @apply rounded-lg; diff --git a/src/AutoComplete/style.css b/src/AutoComplete/style.css index 403e7c6..b604931 100644 --- a/src/AutoComplete/style.css +++ b/src/AutoComplete/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/auto-complete/style/index.css'; - @import '../Select/style.css'; .ant-select-auto-complete { diff --git a/src/Avatar/style.css b/src/Avatar/style.css index cedc478..d032070 100644 --- a/src/Avatar/style.css +++ b/src/Avatar/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/avatar/style/index.css'; - .ant-avatar { /* hardcoded to inline-block inside ant design's source code */ @apply flex !important; diff --git a/src/AvatarGroup/style.css b/src/AvatarGroup/style.css index 0a3a70d..e69de29 100644 --- a/src/AvatarGroup/style.css +++ b/src/AvatarGroup/style.css @@ -1 +0,0 @@ -@import 'antd/lib/avatar/style/index.css'; diff --git a/src/BackTop/style.css b/src/BackTop/style.css index 4449993..7438f29 100644 --- a/src/BackTop/style.css +++ b/src/BackTop/style.css @@ -1,16 +1,12 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/back-top/style/index.css'; +.ant-back-top { + button { + @apply bg-slate-700; + @apply outline-transparent !important; + @apply hover:bg-slate-700 hover:opacity-75; -.ant-back-top{ - button{ - - @apply bg-slate-700; - @apply outline-transparent !important; - @apply hover:bg-slate-700 hover:opacity-75; - - svg{ - @apply text-white; - @apply hover:text-white; - } + svg { + @apply text-white; + @apply hover:text-white; } -} \ No newline at end of file + } +} diff --git a/src/Badge/style.css b/src/Badge/style.css index 42d34e0..f4a3e2b 100644 --- a/src/Badge/style.css +++ b/src/Badge/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/badge/style/index.css'; - .ant-badge { sup { @apply top-[15%] right-[15%]; diff --git a/src/Breadcrumb/style.css b/src/Breadcrumb/style.css index cecae9c..bd5d7b9 100644 --- a/src/Breadcrumb/style.css +++ b/src/Breadcrumb/style.css @@ -1,8 +1,5 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/breadcrumb/style/index.css'; - -@import '../Menu/style.css'; -@import '../Dropdown/style.css'; +/* @import '../Menu/style.css'; +@import '../Dropdown/style.css'; */ .ant-breadcrumb { li a { diff --git a/src/Button/style.css b/src/Button/style.css index eabb4c7..07781fa 100644 --- a/src/Button/style.css +++ b/src/Button/style.css @@ -1,8 +1,4 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/button/style/index.css'; - .ant-btn { - @apply rounded-lg font-inter h-auto; @apply inline-flex items-center justify-center border-none; @apply focus:border-transparent focus:outline-none; @@ -73,8 +69,8 @@ @apply text-primary; } - &.ant-btn-lg{ - min-height:40px; + &.ant-btn-lg { + min-height: 40px; } } diff --git a/src/Card/style.css b/src/Card/style.css index 71b5b4f..46f7dec 100644 --- a/src/Card/style.css +++ b/src/Card/style.css @@ -1,7 +1,4 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/card/style/index.css'; -@import '../Tabs/style.css'; -@import 'antd/lib/grid/style/index.css'; +/* @import '../Tabs/style.css'; */ .ant-card { @apply rounded-lg; @@ -24,7 +21,7 @@ } } &-body { - @apply font-inter text-sm text-neutral-700 ; + @apply font-inter text-sm text-neutral-700; @apply py-0 px-4; } &-body > div > p:first-child { @@ -78,7 +75,7 @@ @apply px-2 min-h-0; .ant-card-head-wrapper > { .ant-card-head-title { - @apply font-inter font-semibold text-xs text-neutral-700 ; + @apply font-inter font-semibold text-xs text-neutral-700; @apply pt-2 pb-1 pr-1.5; } .ant-card-extra { @@ -87,7 +84,7 @@ } } .ant-card-body { - @apply font-inter text-xs text-neutral-700 ; + @apply font-inter text-xs text-neutral-700; @apply py-0 px-2; } .ant-card-body > div > p { @@ -108,13 +105,12 @@ @apply pb-2 pt-2 text-sm !important; } - .ant-tabs-tab + .ant-tabs-tab{ + .ant-tabs-tab + .ant-tabs-tab { @apply ml-6; } } } - .with-button { .ant-card-head { &-wrapper > { @@ -135,15 +131,15 @@ } } -.with-meta-extra{ - .ant-card-body{ +.with-meta-extra { + .ant-card-body { @apply flex; - svg{ + svg { @apply cursor-pointer; } } - .ant-card-meta{ + .ant-card-meta { @apply w-full; } } diff --git a/src/Checkbox/style.css b/src/Checkbox/style.css index 6b8be78..685c542 100644 --- a/src/Checkbox/style.css +++ b/src/Checkbox/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/checkbox/style/index.css'; - .ant-checkbox { &:hover { .ant-checkbox-inner { diff --git a/src/Collapse/style.css b/src/Collapse/style.css index 6e83db8..069785c 100644 --- a/src/Collapse/style.css +++ b/src/Collapse/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/collapse/style/index.css'; - .ant-collapse { @apply font-inter; @apply border-none; diff --git a/src/Comment/style.css b/src/Comment/style.css index 8d5f1bd..c8ed085 100644 --- a/src/Comment/style.css +++ b/src/Comment/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/comment/style/index.css'; - .ant-comment { @apply font-inter; diff --git a/src/DatePicker/style.css b/src/DatePicker/style.css index 16f8b79..4a4b32e 100644 --- a/src/DatePicker/style.css +++ b/src/DatePicker/style.css @@ -1,7 +1,5 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/date-picker/style/index.css'; @import '../Empty/style.css'; -@import "../TimePicker/style.css"; +@import '../TimePicker/style.css'; @import '../variables.css'; .ant-picker { @@ -123,34 +121,32 @@ } /* Ratate the Caret Down Icon when Picker is Focused */ - &.ui-open{ - .ant-picker-suffix{ - @apply transform rotate-180 transition ease-linear; - } + &.ui-open { + .ant-picker-suffix { + @apply transform rotate-180 transition ease-linear; + } } - .ant-picker-suffix{ - @apply transition ease-linear; + .ant-picker-suffix { + @apply transition ease-linear; } } - /* Quater Picker Disabled Styling */ -.ant-picker-quarter-panel{ +.ant-picker-quarter-panel { .ant-picker-cell-disabled::before { @apply bg-transparent; } - - .ant-picker-cell-disabled{ - .ant-picker-cell-inner{ + + .ant-picker-cell-disabled { + .ant-picker-cell-inner { @apply bg-neutral-100 text-neutral-700; } } } -.ant-picker.ant-picker-disabled{ +.ant-picker.ant-picker-disabled { @apply border-transparent; - } .ant-form-item-has-error { diff --git a/src/Descriptions/style.css b/src/Descriptions/style.css index 5770924..76a767b 100644 --- a/src/Descriptions/style.css +++ b/src/Descriptions/style.css @@ -1,34 +1,29 @@ -@import "antd/lib/style/default.css"; -@import 'antd/lib/descriptions/style/index.css'; +.ant-descriptions { + &-header { + @apply mb-4; + } -.ant-descriptions{ + &-title { + @apply font-inter text-base font-bold text-neutral-700; + } - &-header{ - @apply mb-4; - } - - &-title{ - @apply font-inter text-base font-bold text-neutral-700; - } - - &-item{ - - @apply font-inter font-normal; + &-item { + @apply font-inter font-normal; - &-label{ - @apply text-xs text-neutral-400; - } - - &-content{ - @apply text-sm text-neutral-700; - } + &-label { + @apply text-xs text-neutral-400; } - &-row > th{ - @apply pb-1; + &-content { + @apply text-sm text-neutral-700; } + } - &-row > td{ - @apply pb-6; - } -} \ No newline at end of file + &-row > th { + @apply pb-1; + } + + &-row > td { + @apply pb-6; + } +} diff --git a/src/Divider/style.css b/src/Divider/style.css index 2bd5035..e69de29 100644 --- a/src/Divider/style.css +++ b/src/Divider/style.css @@ -1,2 +0,0 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/divider/style/index.css'; diff --git a/src/Drawer/style.css b/src/Drawer/style.css index 3ff3c1b..bec1d21 100644 --- a/src/Drawer/style.css +++ b/src/Drawer/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/drawer/style/index.css'; - .ant-drawer { &.ant-drawer-right, &.ant-drawer-left { diff --git a/src/Dropdown/style.css b/src/Dropdown/style.css index f0512e0..e9f8033 100644 --- a/src/Dropdown/style.css +++ b/src/Dropdown/style.css @@ -1,64 +1,62 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/dropdown/style/index.css'; -@import '../Button/style.css'; +/* @import '../Button/style.css'; */ -.ant-dropdown{ +.ant-dropdown { + &-menu { + @apply rounded-lg py-2; - &-menu{ - @apply rounded-lg py-2; - - &-item{ - @apply font-inter text-sm text-neutral-700; - @apply mx-2 p-2 rounded; - @apply hover:bg-neutral-100; - } + &-item { + @apply font-inter text-sm text-neutral-700; + @apply mx-2 p-2 rounded; + @apply hover:bg-neutral-100; + } - &-item-group-title{ - @apply font-inter text-sm text-neutral-700; - @apply mx-2 p-2 rounded; - } + &-item-group-title { + @apply font-inter text-sm text-neutral-700; + @apply mx-2 p-2 rounded; + } - &-submenu-title{ - @apply font-inter text-neutral-700; - @apply hover:bg-neutral-100; - @apply mx-2 p-2 rounded; - } + &-submenu-title { + @apply font-inter text-neutral-700; + @apply hover:bg-neutral-100; + @apply mx-2 p-2 rounded; + } - &-submenu-expand-icon{ - @apply right-4 !important; + &-submenu-expand-icon { + @apply right-4 !important; - .anticon{ - @apply align-middle; - } - .anticon > svg{ - @apply h-4 w-4 text-transparent; - background-image: var(--ic-caret-right-16-n700); - } - } + .anticon { + @apply align-middle; + } + .anticon > svg { + @apply h-4 w-4 text-transparent; + background-image: var(--ic-caret-right-16-n700); + } + } - &-submenu-popup ul{ - @apply ml-3 !important; - } + &-submenu-popup ul { + @apply ml-3 !important; + } - &-item-divider{ - @apply mx-2 my-0 bg-neutral-300; - } + &-item-divider { + @apply mx-2 my-0 bg-neutral-300; + } - &-item-selected, &submenu-title-selected { - @apply bg-transparent text-neutral-700 font-semibold; - } + &-item-selected, + &submenu-title-selected { + @apply bg-transparent text-neutral-700 font-semibold; + } - &-submenu-selected &-submenu-title { - @apply text-neutral-700 font-semibold; - } + &-submenu-selected &-submenu-title { + @apply text-neutral-700 font-semibold; + } - &-item-selected::after{ - @apply h-4 pl-1; - content:var(--ic-check-16-n700); - } + &-item-selected::after { + @apply h-4 pl-1; + content: var(--ic-check-16-n700); + } - &-item-disabled{ - @apply text-neutral-300; - } + &-item-disabled { + @apply text-neutral-300; } -} \ No newline at end of file + } +} diff --git a/src/Empty/style.css b/src/Empty/style.css index eb885af..5436be8 100644 --- a/src/Empty/style.css +++ b/src/Empty/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/empty/style/index.css'; - .ant-empty { @apply h-full; @apply flex flex-col justify-center items-center; diff --git a/src/Form/style.css b/src/Form/style.css index b717723..8769a11 100644 --- a/src/Form/style.css +++ b/src/Form/style.css @@ -1,53 +1,46 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/form/style/index.css'; -@import 'antd/lib/grid/style/index.css'; -@import '../Tooltip/style.css'; +.ant-form { + &-item { + &-label { + @apply pb-2 mb-0 leading-none; -.ant-form{ + label { + @apply text-xs font-inter text-neutral-500 leading-4; + @apply h-auto; - &-item { - &-label { - @apply pb-2 mb-0 leading-none; - - label { - @apply text-xs font-inter text-neutral-500 leading-4; - @apply h-auto; - - &:after { - content: normal; - } - } - } - - &-explain { - .ant-form-item-explain-error { - @apply text-xs font-inter leading-4 text-red-600; - @apply pt-1; - } - } - - &-with-help { - .ant-form-item-explain { - @apply min-h-0; - } - } - - &-extra { - @apply text-xs font-inter leading-4 text-neutral-500; - @apply pt-1 min-h-0; - } - - &-has-error { - .ant-select-selector, - .ant-input { - @apply border-red-600 !important; - @apply shadow-none !important; - } - - .ant-input { - @apply text-red-600 !important; - } + &:after { + content: normal; } + } + } + + &-explain { + .ant-form-item-explain-error { + @apply text-xs font-inter leading-4 text-red-600; + @apply pt-1; + } + } + + &-with-help { + .ant-form-item-explain { + @apply min-h-0; + } + } + + &-extra { + @apply text-xs font-inter leading-4 text-neutral-500; + @apply pt-1 min-h-0; + } + + &-has-error { + .ant-select-selector, + .ant-input { + @apply border-red-600 !important; + @apply shadow-none !important; + } + + .ant-input { + @apply text-red-600 !important; + } } - -} \ No newline at end of file + } +} diff --git a/src/Image/style.css b/src/Image/style.css index 10a8c50..355b4ca 100644 --- a/src/Image/style.css +++ b/src/Image/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/image/style/index.css'; - .ant-image { &.ant-image-error { @apply bg-neutral-300; diff --git a/src/Input/style.css b/src/Input/style.css index 03a4c2e..495696c 100644 --- a/src/Input/style.css +++ b/src/Input/style.css @@ -1,8 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/input/style/index.css'; -@import '../Button/style.css'; -@import '../variables.css'; - .ant-form { &-item-label { @apply mb-0 leading-none !important; diff --git a/src/InputNumber/style.css b/src/InputNumber/style.css index 36e004a..0a965a6 100644 --- a/src/InputNumber/style.css +++ b/src/InputNumber/style.css @@ -1,87 +1,74 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/input-number/style/index.css'; - -.ant-input-number{ - - @apply font-inter text-sm font-normal text-neutral-700 rounded-lg bg-white; - @apply hover:bg-white; - - .ant-input-number-input{ - @apply px-4 py-1 h-10; - @apply border-[1px] border-transparent border-solid rounded-lg; - @apply hover:border-neutral-300; - @apply focus:border-neutral-300; - } - - /* Disabled Styling */ - &.ant-input-number-disabled{ - @apply bg-neutral-100 text-neutral-400; - - .ant-input-number-input{ - @apply border-none; - @apply hover:border-none; - @apply focus:border-none; - } +.ant-input-number { + @apply font-inter text-sm font-normal text-neutral-700 rounded-lg bg-white; + @apply hover:bg-white; + + .ant-input-number-input { + @apply px-4 py-1 h-10; + @apply border-[1px] border-transparent border-solid rounded-lg; + @apply hover:border-neutral-300; + @apply focus:border-neutral-300; + } + + /* Disabled Styling */ + &.ant-input-number-disabled { + @apply bg-neutral-100 text-neutral-400; + + .ant-input-number-input { + @apply border-none; + @apply hover:border-none; + @apply focus:border-none; } + } } /* Input Number witg Currency Prefix */ -.ant-input-number-affix-wrapper.ant-input-number-affix-wrapper-borderless{ - @apply border-transparent; +.ant-input-number-affix-wrapper.ant-input-number-affix-wrapper-borderless { + @apply border-transparent; } -.ant-input-number-affix-wrapper{ - - @apply font-inter text-sm font-normal text-neutral-700 rounded-lg bg-white; - @apply hover:bg-white hover:border-neutral-300 border-[1px] border-solid !important; - @apply focus:bg-white focus:text-neutral-300; +.ant-input-number-affix-wrapper { + @apply font-inter text-sm font-normal text-neutral-700 rounded-lg bg-white; + @apply hover:bg-white hover:border-neutral-300 border-[1px] border-solid !important; + @apply focus:bg-white focus:text-neutral-300; - .ant-input-number-prefix{ - @apply text-neutral-400 leading-5 pr-1 mr-0; - } - - .ant-input-number-input{ - @apply hover:border-transparent focus:border-transparent; - } + .ant-input-number-prefix { + @apply text-neutral-400 leading-5 pr-1 mr-0; + } - /* Disabled Styling */ - &.ant-input-number-affix-wrapper-disabled{ - - @apply bg-neutral-100 text-neutral-400; - @apply hover:bg-neutral-100 hover:border-transparent !important; - - } + .ant-input-number-input { + @apply hover:border-transparent focus:border-transparent; + } + /* Disabled Styling */ + &.ant-input-number-affix-wrapper-disabled { + @apply bg-neutral-100 text-neutral-400; + @apply hover:bg-neutral-100 hover:border-transparent !important; + } } .ant-form-item-has-error { - - input{ - @apply text-red-600; + input { + @apply text-red-600; + } + + .ant-input-number-input { + @apply border-[1px] border-red-600; + @apply hover:border-red-600; + @apply focus:border-red-600; + } + + .ant-input-number-affix-wrapper { + @apply text-red-600 border-red-600; + @apply hover:border-red-600 !important; + @apply focus:text-red-600; + + .ant-input-number-prefix { + @apply text-red-600; } - .ant-input-number-input{ - @apply border-[1px] border-red-600; - @apply hover:border-red-600; - @apply focus:border-red-600; - } - - .ant-input-number-affix-wrapper{ - - @apply text-red-600 border-red-600; - @apply hover:border-red-600 !important; - @apply focus:text-red-600; - - .ant-input-number-prefix{ - @apply text-red-600; - } - - .ant-input-number-input{ - @apply border-transparent; - @apply hover:border-transparent focus:border-transparent; - } - + .ant-input-number-input { + @apply border-transparent; + @apply hover:border-transparent focus:border-transparent; } + } } - - diff --git a/src/Layout/style.css b/src/Layout/style.css index aa48bb9..d3effec 100644 --- a/src/Layout/style.css +++ b/src/Layout/style.css @@ -1,7 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/layout/style/index.css'; -@import '../Menu/style.css'; - .ant-layout { background-color: #f0ebee; @apply font-inter; diff --git a/src/List/style.css b/src/List/style.css index 634f4c5..7ae29ed 100644 --- a/src/List/style.css +++ b/src/List/style.css @@ -1,10 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/list/style/index.css'; -@import '../Empty/style.css'; -@import 'antd/lib/spin/style/index.css'; -@import '../Pagination/style.css'; -@import 'antd/lib/grid/style/index.css'; - .ant-list { /* for both lists */ .ant-list-header, diff --git a/src/Mentions/style.css b/src/Mentions/style.css index c8b27c4..09017bc 100644 --- a/src/Mentions/style.css +++ b/src/Mentions/style.css @@ -1,35 +1,30 @@ -@import 'antd/lib/mentions/style/index.css'; - -@import '../Empty/style.css'; -@import '../Spin/style.css'; - -.ant-mentions{ - @apply font-inter rounded-lg text-sm outline-none; - @apply hover:border-neutral-300 hover:outline-none hover:shadow-none; - @apply focus:border-neutral-300; - - &-focused{ - @apply border-neutral-300 shadow-none; - } - - textarea{ - @apply py-2.5; - } - - &-dropdown{ - @apply rounded-lg mt-5 p-2; - } - - &-dropdown-menu{ - @apply rounded-lg; - } - - &-dropdown-menu-item{ - @apply font-inter text-sm font-normal text-neutral-700 px-2 py-2 rounded; - } - - &-dropdown-menu-item:first-child, &-dropdown-menu-item:last-child { - @apply rounded; - } - -} \ No newline at end of file +.ant-mentions { + @apply font-inter rounded-lg text-sm outline-none; + @apply hover:border-neutral-300 hover:outline-none hover:shadow-none; + @apply focus:border-neutral-300; + + &-focused { + @apply border-neutral-300 shadow-none; + } + + textarea { + @apply py-2.5; + } + + &-dropdown { + @apply rounded-lg mt-5 p-2; + } + + &-dropdown-menu { + @apply rounded-lg; + } + + &-dropdown-menu-item { + @apply font-inter text-sm font-normal text-neutral-700 px-2 py-2 rounded; + } + + &-dropdown-menu-item:first-child, + &-dropdown-menu-item:last-child { + @apply rounded; + } +} diff --git a/src/Menu/style.css b/src/Menu/style.css index 9eadc86..9286516 100644 --- a/src/Menu/style.css +++ b/src/Menu/style.css @@ -1,7 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/menu/style/index.css'; -@import '../Tooltip/style.css'; - .ant-menu { &.ant-menu-sub { &.ant-menu-vertical:not(.ant-menu-inline) { diff --git a/src/Message/style.css b/src/Message/style.css index a09a23c..08b5c45 100644 --- a/src/Message/style.css +++ b/src/Message/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/message/style/index.css'; - .ant-message { @apply font-inter; diff --git a/src/Modal/style.css b/src/Modal/style.css index 44e1f58..7edc6b8 100644 --- a/src/Modal/style.css +++ b/src/Modal/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/modal/style/index.css'; @import '../Button/style.css'; .ant-modal { diff --git a/src/Notification/style.css b/src/Notification/style.css index d0b016f..60bc2af 100644 --- a/src/Notification/style.css +++ b/src/Notification/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/notification/style/index.css'; - .ant-notification { .ant-notification-notice { @apply rounded-lg; diff --git a/src/PageHeader/style.css b/src/PageHeader/style.css index 8bd885b..0d0487a 100644 --- a/src/PageHeader/style.css +++ b/src/PageHeader/style.css @@ -1,58 +1,53 @@ -@import 'antd/lib/page-header/style/index.css'; -@import '../Breadcrumb/style.css'; -@import '../Avatar/style.css'; +.ant-page-header { + @apply font-inter p-0; -.ant-page-header{ - - @apply font-inter p-0; + .ui-page-header { + @apply flex flex-col; - .ui-page-header{ - @apply flex flex-col; - - &-title{ - @apply text-slate-700 text-xl font-bold mb-1; - } - - &-subtitle{ - @apply text-neutral-400 text-sm font-normal; - } + &-title { + @apply text-slate-700 text-xl font-bold mb-1; } - &-heading-left{ - @apply my-0; - .ant-page-header-back{ - @apply flex; - } + &-subtitle { + @apply text-neutral-400 text-sm font-normal; } + } - &-heading-title{ - @apply text-slate-700 text-xl font-bold mr-0; + &-heading-left { + @apply my-0; + .ant-page-header-back { + @apply flex; } + } - &-heading-sub-title{ - @apply text-neutral-400 text-sm font-normal; - } + &-heading-title { + @apply text-slate-700 text-xl font-bold mr-0; + } - &-back{ - &-button{ - @apply w-10 h-10 rounded-full ; - @apply flex bg-white !important; + &-heading-sub-title { + @apply text-neutral-400 text-sm font-normal; + } - svg{ - @apply justify-center self-center w-full; - } + &-back { + &-button { + @apply w-10 h-10 rounded-full; + @apply flex bg-white !important; - button{ - @apply text-slate-700 hover:text-slate-700; - } - } - } + svg { + @apply justify-center self-center w-full; + } - .ant-breadcrumb + &-heading { - @apply mt-4; + button { + @apply text-slate-700 hover:text-slate-700; + } } + } - .ant-breadcrumb span:last-child{ - @apply text-slate-700; - } -} \ No newline at end of file + .ant-breadcrumb + &-heading { + @apply mt-4; + } + + .ant-breadcrumb span:last-child { + @apply text-slate-700; + } +} diff --git a/src/Pagination/style.css b/src/Pagination/style.css index ca8cfd2..84a29d2 100644 --- a/src/Pagination/style.css +++ b/src/Pagination/style.css @@ -1,7 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/pagination/style/index.css'; -@import '../Select/style.css'; - .ant-pagination { &-item { @apply font-inter text-neutral-500 text-base rounded-full bg-transparent border-none; diff --git a/src/Popconfirm/style.css b/src/Popconfirm/style.css index 151d555..15a6b64 100644 --- a/src/Popconfirm/style.css +++ b/src/Popconfirm/style.css @@ -1,8 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import '../Popover/style.css'; -@import '../Button/style.css'; -@import 'antd/lib/popconfirm/style/index.css'; - .ant-popconfirm { .ant-popover-content { @apply w-72; diff --git a/src/Popover/style.css b/src/Popover/style.css index 65b683d..3d4d3aa 100644 --- a/src/Popover/style.css +++ b/src/Popover/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/popover/style/index.css'; - .ant-popover { &-content { @apply w-40; @@ -11,33 +8,32 @@ @apply font-inter text-slate-700 text-xs; } - &-inner-content{ - @apply p-2; + &-inner-content { + @apply p-2; - button{ - @apply mr-0; - } + button { + @apply mr-0; } + } &-inner-content > div > p { @apply pb-2; } - &-inner-content > div > p:last-child{ + &-inner-content > div > p:last-child { @apply pb-0; } - + &-inner-content > div > p { @apply mb-0; } - &-inner-content > div > button{ + &-inner-content > div > button { @apply mt-0 !important; } - &-title{ + &-title { @apply font-semibold min-w-0; @apply flex justify-center items-center; } - } diff --git a/src/Progress/style.css b/src/Progress/style.css index 5e1ea00..d279bdf 100644 --- a/src/Progress/style.css +++ b/src/Progress/style.css @@ -1,6 +1,3 @@ -@import '../variables.css'; -@import 'antd/lib/progress/style/index.css'; - .ant-progress { @apply font-inter; } diff --git a/src/Radio/style.css b/src/Radio/style.css index 38c26cf..f63f678 100644 --- a/src/Radio/style.css +++ b/src/Radio/style.css @@ -1,7 +1,3 @@ - -@import 'antd/lib/style/default.css'; -@import 'antd/lib/radio/style/index.css'; - .ant-radio { &:hover { .ant-radio-inner { diff --git a/src/Result/style.css b/src/Result/style.css index 53ba3c7..c2e915b 100644 --- a/src/Result/style.css +++ b/src/Result/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/result/style/index.css'; - .ant-result { @apply font-inter m-auto px-0 flex flex-col items-center; diff --git a/src/Select/style.css b/src/Select/style.css index b32f917..83c2af0 100644 --- a/src/Select/style.css +++ b/src/Select/style.css @@ -1,6 +1,4 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/select/style/index.css'; -@import '../Empty/style.css'; +/* @import '../Empty/style.css'; */ .ant-select { @apply font-inter bg-white rounded-lg flex; diff --git a/src/Skeleton/style.css b/src/Skeleton/style.css index 127ee07..e69de29 100644 --- a/src/Skeleton/style.css +++ b/src/Skeleton/style.css @@ -1,2 +0,0 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/skeleton/style/index.css'; diff --git a/src/Spin/style.css b/src/Spin/style.css index 2551935..e69de29 100644 --- a/src/Spin/style.css +++ b/src/Spin/style.css @@ -1,2 +0,0 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/spin/style/index.css'; diff --git a/src/Steps/style.css b/src/Steps/style.css index 9aa6dd8..acf1929 100644 --- a/src/Steps/style.css +++ b/src/Steps/style.css @@ -1,9 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/steps/style/index.css'; -@import '../Progress/style.css'; - -@import '../variables.css'; - /* custom line indicator for navigation */ .ant-steps-navigation { & .ant-steps-item:before { diff --git a/src/Table/style.css b/src/Table/style.css index 7b09f12..28f300f 100644 --- a/src/Table/style.css +++ b/src/Table/style.css @@ -1,16 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/table/style/index.css'; -@import '../Button/style.css'; -@import '../Empty/style.css'; -@import '../Radio/style.css'; -@import '../Checkbox/style.css'; -@import '../Dropdown/style.css'; -@import 'antd/lib/spin/style/index.css'; -@import '../Pagination/style.css'; -@import '../Tooltip/style.css'; -@import '../Input/style.css'; -@import '../Tree/style.css'; - .ant-table-wrapper { .ant-table { @apply font-inter; diff --git a/src/Tabs/style.css b/src/Tabs/style.css index f325412..4c9813d 100644 --- a/src/Tabs/style.css +++ b/src/Tabs/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/tabs/style/index.css'; - .ant-tabs { &-nav { @apply font-inter text-sm; diff --git a/src/Tag/style.css b/src/Tag/style.css index 0c1dc97..3e63960 100644 --- a/src/Tag/style.css +++ b/src/Tag/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/tag/style/index.css'; - .ant-tag { @apply px-2 py-1 border-0 rounded-md text-sm font-inter; @apply inline-flex items-center; diff --git a/src/TimePicker/style.css b/src/TimePicker/style.css index 405569d..01d4285 100644 --- a/src/TimePicker/style.css +++ b/src/TimePicker/style.css @@ -1,120 +1,113 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/time-picker/style/index.css'; -@import '../DatePicker/style.css'; - -.ant-picker{ - &-time-panel{ - - @apply font-inter text-sm font-normal; - @apply pt-0 !important; - - &-cell{ - @apply w-8 h-6; - } - - &-cell-selected{ - .ant-picker-time-panel-cell-inner{ - @apply bg-slate-700 rounded-lg text-white !important; - } - } - - &-column{ - @apply w-8 mr-1.5; - - li{ - @apply mb-1; - } - } - - &-column:not(:first-child) { - @apply border-none; - } - - &-cell-inner{ - @apply text-center ; - @apply pl-0 h-6 leading-6 text-neutral-700 !important; - @apply hover:bg-neutral-100 hover:rounded-lg !important; - } - } - - &-content{ - @apply p-4; +.ant-picker { + &-time-panel { + @apply font-inter text-sm font-normal; + @apply pt-0 !important; - ::-webkit-scrollbar { - @apply w-0 bg-transparent; - } + &-cell { + @apply w-8 h-6; } - &-ranges{ - @apply p-4 pt-3 leading-6; + &-cell-selected { + .ant-picker-time-panel-cell-inner { + @apply bg-slate-700 rounded-lg text-white !important; + } } - /* If Ok Button is the only child */ - &-ranges > &-ok:first-child{ - @apply ml-0 w-full text-center; - } + &-column { + @apply w-8 mr-1.5; - &-range-separator { - @apply px-4 text-slate-300; + li { + @apply mb-1; + } } - &-range > .ant-picker-active-bar { - @apply bg-neutral-700 h-[1px]; + &-column:not(:first-child) { + @apply border-none; } - &-now a{ - @apply font-inter text-primary text-xs font-semibold align-middle; - @apply px-3 py-1; - @apply hover:text-primary hover:opacity-70; + &-cell-inner { + @apply text-center; + @apply pl-0 h-6 leading-6 text-neutral-700 !important; + @apply hover:bg-neutral-100 hover:rounded-lg !important; } + } - &-ok{ - @apply leading-4 ml-0; - } - &-ok button{ - @apply mr-0 leading-3; - } - - &-ok button > span{ - @apply text-[0px] contents; - } + &-content { + @apply p-4; - &-ok .ant-btn-primary[disabled] span{ - @apply text-neutral-300; + ::-webkit-scrollbar { + @apply w-0 bg-transparent; } - + } - /* Change "Ok" text to "Done" */ - &-ok button > span:after{ - content:"Done"; - @apply text-xs leading-4; - } + &-ranges { + @apply p-4 pt-3 leading-6; + } - /* Ratate the Caret Down Icon when Picker is Focused */ - &.ui-open{ - .ant-picker-suffix{ - @apply transform rotate-180 transition ease-linear; - } - } + /* If Ok Button is the only child */ + &-ranges > &-ok:first-child { + @apply ml-0 w-full text-center; + } + + &-range-separator { + @apply px-4 text-slate-300; + } + + &-range > .ant-picker-active-bar { + @apply bg-neutral-700 h-[1px]; + } - .ant-picker-suffix{ - @apply transition ease-linear; + &-now a { + @apply font-inter text-primary text-xs font-semibold align-middle; + @apply px-3 py-1; + @apply hover:text-primary hover:opacity-70; + } + + &-ok { + @apply leading-4 ml-0; + } + &-ok button { + @apply mr-0 leading-3; + } + + &-ok button > span { + @apply text-[0px] contents; + } + + &-ok .ant-btn-primary[disabled] span { + @apply text-neutral-300; + } + + /* Change "Ok" text to "Done" */ + &-ok button > span:after { + content: 'Done'; + @apply text-xs leading-4; + } + + /* Ratate the Caret Down Icon when Picker is Focused */ + &.ui-open { + .ant-picker-suffix { + @apply transform rotate-180 transition ease-linear; } + } + .ant-picker-suffix { + @apply transition ease-linear; + } } -.ant-picker.-has-no-done{ - .ant-picker-now{ - @apply w-full text-center; - } +.ant-picker.-has-no-done { + .ant-picker-now { + @apply w-full text-center; + } - .ant-picker-ok{ - @apply hidden; - } + .ant-picker-ok { + @apply hidden; + } } -.ant-picker.ant-picker-status-error{ - .ant-picker-range-separator { - @apply text-red-600; - } -} \ No newline at end of file +.ant-picker.ant-picker-status-error { + .ant-picker-range-separator { + @apply text-red-600; + } +} diff --git a/src/Timeline/style.css b/src/Timeline/style.css index 02b9b01..ffcf4a6 100644 --- a/src/Timeline/style.css +++ b/src/Timeline/style.css @@ -1,5 +1,3 @@ -@import 'antd/lib/timeline/style/index.css'; - .ant-timeline { .ant-timeline-item { @apply pb-2.5; diff --git a/src/Tooltip/style.css b/src/Tooltip/style.css index 455388f..28d3490 100644 --- a/src/Tooltip/style.css +++ b/src/Tooltip/style.css @@ -1,13 +1,10 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/tooltip/style/index.css'; - -.ant-tooltip{ +.ant-tooltip { &-inner { @apply bg-white font-inter text-xs text-neutral-700 font-normal; @apply rounded px-3 py-2 shadow-sm; } - - &-arrow-content::before{ + + &-arrow-content::before { background: white; } } diff --git a/src/Tree/style.css b/src/Tree/style.css index 5ce876c..50bf208 100644 --- a/src/Tree/style.css +++ b/src/Tree/style.css @@ -1,6 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/tree/style/index.css'; - .ant-tree { .ant-tree-treenode { @apply items-center; diff --git a/src/TreeSelect/style.css b/src/TreeSelect/style.css index 3bd0b29..7ff52ab 100644 --- a/src/TreeSelect/style.css +++ b/src/TreeSelect/style.css @@ -1,8 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/tree-select/style/index.css'; -@import '../Select/style.css'; -@import '../Empty/style.css'; - .ant-tree-select-dropdown { @apply shadow-md; diff --git a/src/Upload/style.css b/src/Upload/style.css index 0c42796..0b8a3d3 100644 --- a/src/Upload/style.css +++ b/src/Upload/style.css @@ -1,11 +1,3 @@ -@import 'antd/lib/style/default.css'; -@import 'antd/lib/upload/style/index.css'; -@import '../Button/style.css'; -@import '../Progress/style.css'; -@import '../Tooltip/style.css'; - -@import '../variables.css'; - .ant-upload-list-picture-card-container { @apply bg-white rounded-lg; } diff --git a/src/assets/style/form-item.css b/src/assets/style/form-item.css index 5017e78..baa76b7 100644 --- a/src/assets/style/form-item.css +++ b/src/assets/style/form-item.css @@ -1,5 +1,3 @@ -@import 'antd/lib/form/style/index.css'; - .ant-form-item { &-label { @apply pb-2 mb-0 leading-none; diff --git a/src/index.css b/src/index.css new file mode 100644 index 0000000..4b53ff2 --- /dev/null +++ b/src/index.css @@ -0,0 +1,2 @@ +@import 'antd/dist/antd.css'; +@import './variables.css'; diff --git a/src/index.tsx b/src/index.tsx index d4ea5c2..c569222 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,3 +1,4 @@ +import './index.css' export { default as List, ListItem, @@ -140,4 +141,4 @@ export { default as BackTop, BackTopProps } from './BackTop' export { default as Affix, AffixProps } from './Affix' export { default as Mentions, MentionOption, MentionsProps, OptionProps } from './Mentions' export { default as InputNumber, InputNumberProps } from './InputNumber' -export { default as Form, FormItem, FormProps, FormItemProps, } from './Form' +export { default as Form, FormItem, FormProps, FormItemProps } from './Form'