diff --git a/docs/package.json b/docs/package.json index 4d784f3b1d..eebcae4db3 100644 --- a/docs/package.json +++ b/docs/package.json @@ -11,11 +11,11 @@ "lint": "next lint" }, "dependencies": { - "@heathmont/moon-base-tw": "workspace:^10.13.4", - "@heathmont/moon-cmdk-tw": "workspace:^10.13.4", - "@heathmont/moon-core-tw": "workspace:^10.13.4", + "@heathmont/moon-base-tw": "^10.13.5", + "@heathmont/moon-cmdk-tw": "^10.13.5", + "@heathmont/moon-core-tw": "^10.13.5", "@heathmont/moon-icons-tw": "9.28.6", - "@heathmont/moon-themes-tw": "workspace:^10.13.4", + "@heathmont/moon-themes-tw": "^10.13.5", "@types/node": "20.4.9", "@types/react": "18.2.19", "@types/react-dom": "18.2.7", diff --git a/next-docs/package.json b/next-docs/package.json index ca29a97946..a766a62e14 100644 --- a/next-docs/package.json +++ b/next-docs/package.json @@ -19,9 +19,9 @@ "@heathmont/moon-assets": "workspace:^10.7.1", "@heathmont/moon-charts": "workspace:^10.7.1", "@heathmont/moon-components": "workspace:^10.7.1", - "@heathmont/moon-cmdk-tw": "workspace:^10.13.4", + "@heathmont/moon-cmdk-tw": "^10.13.5", "@heathmont/moon-core": "workspace:^10.7.1", - "@heathmont/moon-core-tw": "workspace:^10.13.4", + "@heathmont/moon-core-tw": "^10.13.5", "@heathmont/moon-datepicker": "workspace:^10.7.1", "@heathmont/moon-draggabletable": "workspace:^10.7.1", "@heathmont/moon-icons": "workspace:^10.7.1", @@ -32,7 +32,7 @@ "@heathmont/moon-table": "workspace:^10.7.1", "@heathmont/moon-table-tw": "workspace:^10.13.4", "@heathmont/moon-themes": "workspace:^10.7.1", - "@heathmont/moon-themes-tw": "workspace:^10.13.4", + "@heathmont/moon-themes-tw": "^10.13.5", "@heathmont/moon-utils": "workspace:^10.7.1", "@heathmont/moon-icons-tw": "9.28.6", "@hookform/resolvers": "3.2.0", diff --git a/next-docs/styles/themes.css b/next-docs/styles/themes.css index 7f8100ca44..868f9f4dcb 100644 --- a/next-docs/styles/themes.css +++ b/next-docs/styles/themes.css @@ -1,15 +1,15 @@ -@import '@heathmont/moon-themes-tw/src/betadda.css'; -@import '@heathmont/moon-themes-tw/src/bitcasinoNew.css'; -@import '@heathmont/moon-themes-tw/src/bombayClub.css'; -@import '@heathmont/moon-themes-tw/src/comms.css'; -@import '@heathmont/moon-themes-tw/src/empire.css'; -@import '@heathmont/moon-themes-tw/src/hub88.css'; -@import '@heathmont/moon-themes-tw/src/lab.css'; -@import '@heathmont/moon-themes-tw/src/livecasino.css'; -@import '@heathmont/moon-themes-tw/src/moon.css'; -@import '@heathmont/moon-themes-tw/src/partners.css'; -@import '@heathmont/moon-themes-tw/src/sportsbet.css'; -@import '@heathmont/moon-themes-tw/src/tradeart.css'; -@import '@heathmont/moon-themes-tw/src/tradeartMiniBetting.css'; -@import '@heathmont/moon-themes-tw/src/travel.css'; -@import '@heathmont/moon-themes-tw/src/pay.css'; +@import '@heathmont/moon-themes-tw/lib/betadda.css'; +@import '@heathmont/moon-themes-tw/lib/bitcasinoNew.css'; +@import '@heathmont/moon-themes-tw/lib/bombayClub.css'; +@import '@heathmont/moon-themes-tw/lib/comms.css'; +@import '@heathmont/moon-themes-tw/lib/empire.css'; +@import '@heathmont/moon-themes-tw/lib/hub88.css'; +@import '@heathmont/moon-themes-tw/lib/lab.css'; +@import '@heathmont/moon-themes-tw/lib/livecasino.css'; +@import '@heathmont/moon-themes-tw/lib/moon.css'; +@import '@heathmont/moon-themes-tw/lib/partners.css'; +@import '@heathmont/moon-themes-tw/lib/sportsbet.css'; +@import '@heathmont/moon-themes-tw/lib/tradeart.css'; +@import '@heathmont/moon-themes-tw/lib/tradeartMiniBetting.css'; +@import '@heathmont/moon-themes-tw/lib/travel.css'; +@import '@heathmont/moon-themes-tw/lib/pay.css'; diff --git a/next-docs/tailwind.config.js b/next-docs/tailwind.config.js index c67f51eafd..37bc32d4fe 100644 --- a/next-docs/tailwind.config.js +++ b/next-docs/tailwind.config.js @@ -8,7 +8,7 @@ module.exports = { './node_modules/@heathmont/moon-table-tw/**/*.{js,ts,jsx,tsx}', ], presets: [ - require('@heathmont/moon-core-tw/src/private/presets/ds-moon-preset'), + require('@heathmont/moon-core-tw/lib/private/presets/ds-moon-preset'), ], theme: { extend: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 833e0b6fed..b8ccbb5c13 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -166,20 +166,20 @@ importers: docs: dependencies: '@heathmont/moon-base-tw': - specifier: workspace:^10.13.4 - version: link:../workspaces/base + specifier: ^10.13.5 + version: 10.13.5(react-dom@18.2.0)(react@18.2.0) '@heathmont/moon-cmdk-tw': - specifier: workspace:^10.13.4 - version: link:../workspaces/cmdk + specifier: ^10.13.5 + version: 10.13.5(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) '@heathmont/moon-core-tw': - specifier: workspace:^10.13.4 - version: link:../workspaces/core + specifier: ^10.13.5 + version: 10.13.5(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) '@heathmont/moon-icons-tw': specifier: 9.28.6 version: 9.28.6(react-dom@18.2.0)(react@18.2.0) '@heathmont/moon-themes-tw': - specifier: workspace:^10.13.4 - version: link:../workspaces/themes + specifier: ^10.13.5 + version: 10.13.5 '@types/node': specifier: 20.4.9 version: 20.4.9 @@ -238,8 +238,8 @@ importers: specifier: workspace:^10.7.1 version: link:../packages/charts '@heathmont/moon-cmdk-tw': - specifier: workspace:^10.13.4 - version: link:../workspaces/cmdk + specifier: ^10.13.5 + version: 10.13.5(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) '@heathmont/moon-components': specifier: workspace:^10.7.1 version: link:../packages/components @@ -247,8 +247,8 @@ importers: specifier: workspace:^10.7.1 version: link:../packages/core '@heathmont/moon-core-tw': - specifier: workspace:^10.13.4 - version: link:../workspaces/core + specifier: ^10.13.5 + version: 10.13.5(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) '@heathmont/moon-datepicker': specifier: workspace:^10.7.1 version: link:../packages/datepicker @@ -283,8 +283,8 @@ importers: specifier: workspace:^10.7.1 version: link:../packages/themes '@heathmont/moon-themes-tw': - specifier: workspace:^10.13.4 - version: link:../workspaces/themes + specifier: ^10.13.5 + version: 10.13.5 '@heathmont/moon-utils': specifier: workspace:^10.7.1 version: link:../packages/utils @@ -987,86 +987,11 @@ importers: specifier: 4.5.6 version: 4.5.6 - workspaces/base: - dependencies: - react: - specifier: '>= 18.2.0' - version: 18.2.0 - react-dom: - specifier: '>= 18.2.0' - version: 18.2.0(react@18.2.0) - tailwind-merge: - specifier: 1.14.0 - version: 1.14.0 - - workspaces/cmdk: - dependencies: - '@headlessui/react': - specifier: 1.7.16 - version: 1.7.16(react-dom@18.2.0)(react@18.2.0) - '@heathmont/moon-core-tw': - specifier: workspace:^10.13.4 - version: link:../core - cmdk: - specifier: 0.2.0 - version: 0.2.0(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) - react: - specifier: '>= 18.2.0' - version: 18.2.0 - react-dom: - specifier: '>= 18.2.0' - version: 18.2.0(react@18.2.0) - tailwind-merge: - specifier: 1.14.0 - version: 1.14.0 - tailwindcss-radix: - specifier: 2.8.0 - version: 2.8.0 - - workspaces/core: - dependencies: - '@headlessui/react': - specifier: 1.7.16 - version: 1.7.16(react-dom@18.2.0)(react@18.2.0) - '@popperjs/core': - specifier: 2.11.8 - version: 2.11.8 - '@radix-ui/react-accordion': - specifier: 1.1.2 - version: 1.1.2(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-toast': - specifier: 1.1.4 - version: 1.1.4(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) - '@radix-ui/react-tooltip': - specifier: 1.0.6 - version: 1.0.6(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) - react: - specifier: '>= 18.2.0' - version: 18.2.0 - react-dom: - specifier: '>= 18.2.0' - version: 18.2.0(react@18.2.0) - react-popper: - specifier: 2.3.0 - version: 2.3.0(@popperjs/core@2.11.8)(react-dom@18.2.0)(react@18.2.0) - scroll-into-view-if-needed: - specifier: 2.2.31 - version: 2.2.31 - smooth-scroll-into-view-if-needed: - specifier: 1.1.33 - version: 1.1.33 - tailwind-merge: - specifier: 1.14.0 - version: 1.14.0 - tailwindcss-radix: - specifier: 2.8.0 - version: 2.8.0 - workspaces/tables: dependencies: '@heathmont/moon-core-tw': - specifier: workspace:^10.13.4 - version: link:../core + specifier: ^10.13.5 + version: 10.13.5(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) react: specifier: 18.2.0 version: 18.2.0 @@ -1093,8 +1018,6 @@ importers: specifier: 1.8.5 version: 1.8.5 - workspaces/themes: {} - packages: /@aashutoshrathi/word-wrap@1.2.6: @@ -2612,6 +2535,7 @@ packages: /@emotion/memoize@0.7.4: resolution: {integrity: sha512-Ja/Vfqe3HpuzRsG1oBtWTHk2PGZ7GR+2Vz5iYGelAw8dx32K0y7PjVuxK6z1nMpZOqAFsRUPCkK1YjJ56qJlgw==} + requiresBuild: true dev: false optional: true @@ -2765,6 +2689,58 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@heathmont/moon-base-tw@10.13.5(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-pgZCYnjm9r4ri5cJSZ1aDXsij4FMNKPvMlwI0FK1Wiz0yFU8G9R0aQAZuE4nnuEZAy+EImbl/wbBEkYEOSaxzw==} + peerDependencies: + react: '>= 18.2.0' + react-dom: '>= 18.2.0' + dependencies: + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tailwind-merge: 1.14.0 + dev: false + + /@heathmont/moon-cmdk-tw@10.13.5(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-7zJ0VPvOmgc6Q/zjWucb/Ku4pu8jGZWgifJ3uHYQflpweimKjQJZzFziR9u23d4ZmuNytMuPYUdcQrKqCEbl2Q==} + peerDependencies: + react: '>= 18.2.0' + react-dom: '>= 18.2.0' + dependencies: + '@headlessui/react': 1.7.16(react-dom@18.2.0)(react@18.2.0) + '@heathmont/moon-core-tw': 10.13.5(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) + cmdk: 0.2.0(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + tailwind-merge: 1.14.0 + tailwindcss-radix: 2.8.0 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + dev: false + + /@heathmont/moon-core-tw@10.13.5(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-Amk/ERSrsWWsSsqWC6Qe9iEd8jtK5/domM7Uk9yqSVEJjPh9jSPPT5iOY/LWlk7rP/VcPoFIteOOfIs1ZpZqMQ==} + peerDependencies: + react: '>= 18.2.0' + react-dom: '>= 18.2.0' + dependencies: + '@headlessui/react': 1.7.16(react-dom@18.2.0)(react@18.2.0) + '@popperjs/core': 2.11.8 + '@radix-ui/react-accordion': 1.1.2(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-toast': 1.1.4(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-tooltip': 1.0.6(@types/react-dom@18.2.7)(@types/react@18.2.19)(react-dom@18.2.0)(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + react-popper: 2.3.0(@popperjs/core@2.11.8)(react-dom@18.2.0)(react@18.2.0) + scroll-into-view-if-needed: 2.2.31 + smooth-scroll-into-view-if-needed: 1.1.33 + tailwind-merge: 1.14.0 + tailwindcss-radix: 2.8.0 + transitivePeerDependencies: + - '@types/react' + - '@types/react-dom' + dev: false + /@heathmont/moon-icons-tw@9.28.6(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-cDA7WO4Z07Sfm0Mv+/fBFRBGIMJonGrutcaYRLr6zl6OSfiUOxlsMjRSSivYOb/45WxUjpnbGxTA1AZGhXBFRA==} peerDependencies: @@ -2775,6 +2751,10 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /@heathmont/moon-themes-tw@10.13.5: + resolution: {integrity: sha512-TER8BI1BdKbVd3VvWHUv62I3JPSorUfga9Rb8UhKZgTed0AmW/9hEieSZjPiz1cLCa2/jqFu3NFypoIoA2vHhw==} + dev: false + /@hookform/resolvers@3.2.0(react-hook-form@7.45.4): resolution: {integrity: sha512-skXQHhLxq0Sz2xDwCyv5dygBCtXJe1GmWwxDzfdtl0X6agD6qcyTG8HrZWkjJoy8AkiLARqYvSYJ8z7+Nwmi7w==} peerDependencies: @@ -8258,6 +8238,7 @@ packages: /iconv-lite@0.6.3: resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} engines: {node: '>=0.10.0'} + requiresBuild: true dependencies: safer-buffer: 2.1.2 dev: true @@ -11633,6 +11614,7 @@ packages: /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} + requiresBuild: true dev: true optional: true @@ -12437,6 +12419,7 @@ packages: /sax@1.3.0: resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} + requiresBuild: true dev: true optional: true @@ -14246,3 +14229,7 @@ packages: /zwitch@2.0.4: resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} dev: false + +settings: + autoInstallPeers: true + excludeLinksFromLockfile: false diff --git a/workspaces/base/CHANGELOG.md b/workspaces/base/CHANGELOG.md deleted file mode 100644 index 0e062b2059..0000000000 --- a/workspaces/base/CHANGELOG.md +++ /dev/null @@ -1,277 +0,0 @@ -# @heathmont/moon-base-tw - -## 10.13.4 - -### Patch Changes - -- Deploy 10.13.4 - -## 10.13.3 - -### Patch Changes - -- Deploy 10.13.3 - -## 10.13.2 - -### Patch Changes - -- Deploy - -## 10.13.1 - -### Patch Changes - -- Deploy 10.13.1 - -## 10.13.0 - -### Minor Changes - -- Deploy 10.13.0 - -## 10.12.2 - -### Patch Changes - -- Deploy 10.12.2 - -## 10.12.1 - -### Patch Changes - -- Deploy 10.12.1 - -## 10.12.0 - -### Minor Changes - -- Hub88 fixes - Search - -## 10.11.2 - -### Patch Changes - -- Deploy 10.11.2 - -## 10.11.1 - -### Patch Changes - -- Bump 10.11.1 - -## 10.11.0 - -### Minor Changes - -- Deploy 10.11.0 - -## 10.10.7 - -### Patch Changes - -- Deploy 10.10.7 - -## 10.10.6 - -### Patch Changes - -- Deploy 10.10.6 - -## 10.10.5 - -### Patch Changes - -- Deploy 10.10.5 - -## 10.10.4 - -### Patch Changes - -- Deploy 10.10.4 - -## 10.10.3 - -### Patch Changes - -- Deploy 10.10.3 - -## 10.10.2 - -### Patch Changes - -- Deploy 10.10.2 - -## 10.10.1 - -### Patch Changes - -- Deploy 10.10.1 - -## 10.10.0 - -### Minor Changes - -- Deploy 10.10.0 - -## 10.9.1 - -### Patch Changes - -- Deploy 10.9.1 - -## 10.9.0 - -### Minor Changes - -- Flip coku/gohan colours - -## 10.8.0 - -### Minor Changes - -- Deploy 10.8.0 - -## 10.7.9 - -### Patch Changes - -- Deploy 10.7.9 - -## 10.7.8 - -### Patch Changes - -- Deploy 10.7.8 - -## 10.7.7 - -### Patch Changes - -- Deploy 10.7.7 - -## 10.7.6 - -### Patch Changes - -- Deploy 10.7.6 - -## 10.7.5 - -### Patch Changes - -- Fix table with long data - -## 10.7.4 - -### Patch Changes - -- Bump version 10.7.4 - -## 10.7.3 - -### Patch Changes - -- Deploy 10.7.3 - -## 10.7.2 - -### Patch Changes - -- Deploy 10.7.2 - -## 10.7.1 - -### Patch Changes - -- Deploy 10.7.1 - -## 10.7.0 - -### Minor Changes - -- Deploy 10.7.1 - -## 10.6.3 - -### Patch Changes - -- Deploy 10.6.3 - -## 10.6.2 - -### Patch Changes - -- Deploy 10.6.2 - -## 10.6.1 - -### Patch Changes - -- Deploy - -## 10.6.0 - -### Minor Changes - -- Deploy 10.6.0 - -## 10.5.0 - -### Minor Changes - -- Bump version to 10.5.0 - -## 10.4.0 - -### Minor Changes - -- Deploy 10.4.0 - -## 10.3.2 - -### Patch Changes - -- Deploy 10.3.2 - -## 10.3.1 - -### Patch Changes - -- Fix docs - -## 10.3.0 - -### Minor Changes - -- Deploy 10.3.0 - -## 10.2.0 - -### Minor Changes - -- Deploy 10.2.0 - -## 10.1.1 - -### Patch Changes - -- Base updates - -## 10.1.0 - -### Minor Changes - -- Deploy - -## 10.0.1 - -### Patch Changes - -- Deploy v10.0.1 - -## 10.0.0 - -### Major Changes - -- Implement new Base package diff --git a/workspaces/base/package.json b/workspaces/base/package.json deleted file mode 100644 index d8d941f9fb..0000000000 --- a/workspaces/base/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "@heathmont/moon-base-tw", - "sideEffects": false, - "version": "10.13.4", - "files": [ - "lib" - ], - "type": "module", - "main": "lib/index.js", - "module": "lib/index.js", - "typings": "lib/index.d.ts", - "repository": "https://github.com/coingaming/moon-design", - "author": "Yolo Group", - "license": "MIT", - "scripts": { - "build": "pnpm run build:index && pnpm run build:code", - "build:index": "barrelsby --config ../../.config/barrelsby/barrelsby.json --directory src", - "build:code": "tsc --project tsconfig.esm.json", - "chokidar": "chokidar \"**/*.tsx\" \"**/*.ts\" -i \"lib/**/*.d.ts\" -c \"pnpm run build:code\" " - }, - "dependencies": { - "tailwind-merge": "1.14.0" - }, - "peerDependencies": { - "react": ">= 18.2.0", - "react-dom": ">= 18.2.0" - } -} diff --git a/workspaces/base/src/accordion/Accordion.tsx b/workspaces/base/src/accordion/Accordion.tsx deleted file mode 100644 index fc76856a5c..0000000000 --- a/workspaces/base/src/accordion/Accordion.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import React from 'react'; -import type AccordionProps from './private/type/AccordionProps'; -import type ContentProps from './private/type/ContentProps'; -import type SummaryProps from './private/type/SummaryProps'; -import getSize from './private/utils/getSize'; -import mergeClassnames from '../mergeClassnames/mergeClassnames'; - -const AccordionRoot = ({ - className, - children, - size, - disabled, - ...rest -}: AccordionProps) => ( -
- {children} -
-); - -const Summary = ({ className, children, ...rest }: SummaryProps) => ( - - {children} - -); - -const Content = ({ children, className, ...rest }: ContentProps) => ( -
- {children} -
-); - -const ContentOutside = ({ children, className, ...rest }: ContentProps) => ( -
- {children} -
-); - -const Accordion = Object.assign(AccordionRoot, { - Summary, - Content, - ContentOutside, -}); - -export default Accordion; diff --git a/workspaces/base/src/accordion/private/type/AccordionProps.ts b/workspaces/base/src/accordion/private/type/AccordionProps.ts deleted file mode 100644 index e1d172c7e0..0000000000 --- a/workspaces/base/src/accordion/private/type/AccordionProps.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type AccordionSizes from './AccordionSizes'; - -type AccordionProps = { - className?: string; - children?: React.ReactNode; - size?: AccordionSizes; - disabled?: boolean; -} & React.DetailedHTMLProps< - React.DetailsHTMLAttributes, - HTMLDetailsElement ->; - -export default AccordionProps; diff --git a/workspaces/base/src/accordion/private/type/AccordionSizes.ts b/workspaces/base/src/accordion/private/type/AccordionSizes.ts deleted file mode 100644 index fccfe38d7f..0000000000 --- a/workspaces/base/src/accordion/private/type/AccordionSizes.ts +++ /dev/null @@ -1,3 +0,0 @@ -type AccordionSizes = 'sm' | 'md' | 'lg' | 'xl'; - -export default AccordionSizes; diff --git a/workspaces/base/src/accordion/private/type/ContentProps.ts b/workspaces/base/src/accordion/private/type/ContentProps.ts deleted file mode 100644 index e1a5cfcf30..0000000000 --- a/workspaces/base/src/accordion/private/type/ContentProps.ts +++ /dev/null @@ -1,10 +0,0 @@ -type ContentProps = { - className?: string; - disabled?: boolean; - children?: React.ReactNode; -} & React.DetailedHTMLProps< - React.HTMLAttributes, - HTMLDivElement ->; - -export default ContentProps; diff --git a/workspaces/base/src/accordion/private/type/SummaryProps.ts b/workspaces/base/src/accordion/private/type/SummaryProps.ts deleted file mode 100644 index f0c47e6207..0000000000 --- a/workspaces/base/src/accordion/private/type/SummaryProps.ts +++ /dev/null @@ -1,7 +0,0 @@ -type SummaryProps = { - className?: string; - disabled?: boolean; - children?: React.ReactNode; -} & React.DetailedHTMLProps, HTMLElement>; - -export default SummaryProps; diff --git a/workspaces/base/src/accordion/private/utils/getSize.ts b/workspaces/base/src/accordion/private/utils/getSize.ts deleted file mode 100644 index c5c026f1a6..0000000000 --- a/workspaces/base/src/accordion/private/utils/getSize.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type AccordionSizes from '../type/AccordionSizes'; - -const getSize = (size?: AccordionSizes) => { - switch (size) { - case 'xl': - return '[&_summary_svg]:text-moon-24 [&_summary]:p-4 [&_.content-outside]:mt-4 text-moon-16'; - case 'lg': - return '[&_summary_svg]:text-moon-24 [&_summary]:p-3 [&_.content-outside]:mt-3 text-moon-14'; - case 'sm': - return '[&_summary_svg]:text-moon-16 [&_summary]:p-2 [&_.content-outside]:mt-2 text-moon-12'; - case 'md': - default: - return '[&_summary_svg]:text-moon-24 [&_summary]:p-2 [&_.content-outside]:mt-2 [&_summary]:ps-3 text-moon-14'; - } -}; - -export default getSize; diff --git a/workspaces/base/src/button/Button.tsx b/workspaces/base/src/button/Button.tsx deleted file mode 100644 index 33b87110d5..0000000000 --- a/workspaces/base/src/button/Button.tsx +++ /dev/null @@ -1,104 +0,0 @@ -import React from 'react'; -import type ButtonProps from './private/types/ButtonProps'; -import type ButtonVariants from './private/types/ButtonVariants'; -import AnimationContent from './private/utils/buttonAnimations/AnimationContent'; -import getButtonSize from './private/utils/buttonSizes/getButtonSize'; -import ButtonComponent from './styles/ButtonComponent'; -import Hover from './styles/Hover'; -import IconLeft from './styles/IconLeft'; -import IconRight from './styles/IconRight'; -import mergeClassnames from '../mergeClassnames/mergeClassnames'; - -export type Props = React.PropsWithChildren< - ButtonProps -> & - Omit, keyof ButtonProps>; - -const Button = ({ - children, - variant = 'fill', - size = 'md', - iconLeft, - iconRight, - fullWidth, - disabled, - animation, - as, - className, - ...rest -}: Props) => { - const hasAnimationContent = - animation === 'progress' || animation === 'success'; - if (!children) { - return ( - - - - - ); - } - return ( - - {hasAnimationContent ? ( - - ) : ( - <> - {iconLeft && ( - - )} - {children} - {iconRight && ( - - )} - - )} - - - ); -}; - -export default Button; diff --git a/workspaces/base/src/button/private/types/ButtonAnimations.ts b/workspaces/base/src/button/private/types/ButtonAnimations.ts deleted file mode 100644 index bcca4fb187..0000000000 --- a/workspaces/base/src/button/private/types/ButtonAnimations.ts +++ /dev/null @@ -1,3 +0,0 @@ -type ButtonAnimations = 'progress' | 'success' | 'error' | 'pulse' | boolean; - -export default ButtonAnimations; diff --git a/workspaces/base/src/button/private/types/ButtonProps.ts b/workspaces/base/src/button/private/types/ButtonProps.ts deleted file mode 100644 index 5e02d982f2..0000000000 --- a/workspaces/base/src/button/private/types/ButtonProps.ts +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import type ButtonSettingsProps from './ButtonSettingsProps'; - -type ButtonProps = { - as?: C; - fullWidth?: boolean; - customClassName?: string; -} & ButtonSettingsProps; - -type PolymorphicComponentProp = {}; - -export default ButtonProps; diff --git a/workspaces/base/src/button/private/types/ButtonSettingsProps.ts b/workspaces/base/src/button/private/types/ButtonSettingsProps.ts deleted file mode 100644 index 45b38bf7c8..0000000000 --- a/workspaces/base/src/button/private/types/ButtonSettingsProps.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type ButtonAnimations from './ButtonAnimations'; -import type ButtonSizes from './ButtonSizes'; -import type ButtonVariants from './ButtonVariants'; - -type ButtonSettingsProps = { - children?: React.ReactNode; - size?: ButtonSizes; - iconLeft?: JSX.Element; - iconRight?: JSX.Element; - animation?: ButtonAnimations; - disabled?: boolean; - variant?: ButtonVariants; - fullWidth?: boolean; -}; - -export default ButtonSettingsProps; diff --git a/workspaces/base/src/button/private/types/ButtonSizes.ts b/workspaces/base/src/button/private/types/ButtonSizes.ts deleted file mode 100644 index 9460f92e19..0000000000 --- a/workspaces/base/src/button/private/types/ButtonSizes.ts +++ /dev/null @@ -1,3 +0,0 @@ -type ButtonSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl'; - -export default ButtonSizes; diff --git a/workspaces/base/src/button/private/types/ButtonVariants.ts b/workspaces/base/src/button/private/types/ButtonVariants.ts deleted file mode 100644 index 06ca8b14c1..0000000000 --- a/workspaces/base/src/button/private/types/ButtonVariants.ts +++ /dev/null @@ -1,9 +0,0 @@ -type ButtonVariants = - | 'fill' - | 'outline' - | 'ghost' - | 'primary' - | 'secondary' - | 'tertiary'; - -export default ButtonVariants; diff --git a/workspaces/base/src/button/private/utils/buttonAnimations/AnimationContent.tsx b/workspaces/base/src/button/private/utils/buttonAnimations/AnimationContent.tsx deleted file mode 100644 index 862c4941c9..0000000000 --- a/workspaces/base/src/button/private/utils/buttonAnimations/AnimationContent.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import React from 'react'; -import Loader from '../../../../loader/Loader'; -import mergeClassnames from '../../../../mergeClassnames/mergeClassnames'; -import GenericCheckAlternative from '../../../../private/icons/GenericCheckAlternative'; -import IconLeft from '../../../styles/IconLeft'; -import IconRight from '../../../styles/IconRight'; -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; -import getIconSize from '../buttonSizes/getIconSize'; -import getLoaderSize from '../buttonSizes/getLoaderSize'; -import getLoaderColor from '../buttonStyles/getLoaderColor'; - -const AnimationContent = ({ - children, - iconLeft, - iconRight, - animation, - size, - fullWidth, - variant, -}: ButtonSettingsProps) => ( - - - {animation === 'progress' && ( - - )} - {animation === 'success' && ( - - )} - - - {iconLeft && ( - - )} - {children} - {iconRight && ( - - )} - - -); - -export default AnimationContent; diff --git a/workspaces/base/src/button/private/utils/buttonAnimations/getAnimation.ts b/workspaces/base/src/button/private/utils/buttonAnimations/getAnimation.ts deleted file mode 100644 index b6e45f93a3..0000000000 --- a/workspaces/base/src/button/private/utils/buttonAnimations/getAnimation.ts +++ /dev/null @@ -1,14 +0,0 @@ -import ButtonAnimations from '../../types/ButtonAnimations'; - -const getAnimation = (animation?: ButtonAnimations): string => { - switch (animation) { - case 'error': - return 'bg-chichi text-goten animate-[error_0.82s_cubic-bezier(0.36,0.07,0.19,0.97)_1_both] anim-error'; - case 'pulse': - return 'anim-pulse animate-[pulse2_1.5s_infinite]'; - default: - return ''; - } -}; - -export default getAnimation; diff --git a/workspaces/base/src/button/private/utils/buttonSizes/getButtonSize.ts b/workspaces/base/src/button/private/utils/buttonSizes/getButtonSize.ts deleted file mode 100644 index 7f7a97f000..0000000000 --- a/workspaces/base/src/button/private/utils/buttonSizes/getButtonSize.ts +++ /dev/null @@ -1,61 +0,0 @@ -import getLgPadding from './getLgPadding'; -import getMdPadding from './getMdPadding'; -import getSmPadding from './getSmPadding'; -import getXlPadding from './getXlPadding'; -import getXsPadding from './getXsPadding'; -import mergeClassnames from '../../../../mergeClassnames/mergeClassnames'; -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -const getButtonSize = ({ - size, - iconLeft, - iconRight, - fullWidth, -}: ButtonSettingsProps): string => { - if (size === 'xs') { - return mergeClassnames( - getXsPadding({ - iconLeft, - iconRight, - fullWidth, - }), - 'h-6 py-1 gap-1 text-moon-12 rounded-moon-i-xs' - ); - } - if (size === 'sm') { - return mergeClassnames( - getSmPadding({ - iconLeft, - iconRight, - fullWidth, - }), - 'h-8 py-1 gap-1 text-moon-14 rounded-moon-i-sm' - ); - } - if (size === 'lg') { - return mergeClassnames( - getLgPadding({ - iconLeft, - iconRight, - fullWidth, - }), - 'h-12 py-3 gap-2 text-moon-16 rounded-moon-i-sm' - ); - } - if (size === 'xl') { - return mergeClassnames( - getXlPadding({ - iconLeft, - iconRight, - fullWidth, - }), - 'h-14 py-4 gap-2 text-moon-16 rounded-moon-i-md' - ); - } - return mergeClassnames( - getMdPadding({ iconLeft, iconRight, fullWidth }), - 'h-10 py-2 gap-2 text-moon-14 rounded-moon-i-sm' - ); -}; - -export default getButtonSize; diff --git a/workspaces/base/src/button/private/utils/buttonSizes/getIconSize.ts b/workspaces/base/src/button/private/utils/buttonSizes/getIconSize.ts deleted file mode 100644 index 3d41f3699b..0000000000 --- a/workspaces/base/src/button/private/utils/buttonSizes/getIconSize.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type ButtonSizes from '../../types/ButtonSizes'; - -const getIconSize = (size?: ButtonSizes): string => { - if (size === 'xs') { - return 'text-moon-16'; - } - return 'text-moon-24'; -}; - -export default getIconSize; diff --git a/workspaces/base/src/button/private/utils/buttonSizes/getLgPadding.ts b/workspaces/base/src/button/private/utils/buttonSizes/getLgPadding.ts deleted file mode 100644 index 3f0cc8091c..0000000000 --- a/workspaces/base/src/button/private/utils/buttonSizes/getLgPadding.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -const getLgPadding = ({ - iconLeft, - iconRight, - fullWidth, -}: ButtonSettingsProps): string => { - if (fullWidth) { - return 'px-4'; - } - if (iconLeft) { - return 'ps-3 pe-4'; - } - if (iconRight) { - return 'ps-4 pe-3'; - } - return 'px-4'; -}; - -export default getLgPadding; diff --git a/workspaces/base/src/button/private/utils/buttonSizes/getLoaderSize.ts b/workspaces/base/src/button/private/utils/buttonSizes/getLoaderSize.ts deleted file mode 100644 index cd4c85883e..0000000000 --- a/workspaces/base/src/button/private/utils/buttonSizes/getLoaderSize.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type LoaderSize from '../../../../loader/private/types/LoaderSize'; -import type ButtonSizes from '../../types/ButtonSizes'; - -const getLoaderSize = (size?: ButtonSizes): LoaderSize => { - if (size === 'xs') { - return '2xs'; - } - return 'xs'; -}; - -export default getLoaderSize; diff --git a/workspaces/base/src/button/private/utils/buttonSizes/getMdPadding.ts b/workspaces/base/src/button/private/utils/buttonSizes/getMdPadding.ts deleted file mode 100644 index 13d72236ab..0000000000 --- a/workspaces/base/src/button/private/utils/buttonSizes/getMdPadding.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -const getMdPadding = ({ - iconLeft, - iconRight, - fullWidth, -}: ButtonSettingsProps): string => { - if (fullWidth) { - return 'px-4'; - } - if (iconLeft) { - return 'ps-2 pe-4'; - } - if (iconRight) { - return 'ps-4 pe-2'; - } - return 'px-4'; -}; - -export default getMdPadding; diff --git a/workspaces/base/src/button/private/utils/buttonSizes/getSmPadding.ts b/workspaces/base/src/button/private/utils/buttonSizes/getSmPadding.ts deleted file mode 100644 index 33e8714ff7..0000000000 --- a/workspaces/base/src/button/private/utils/buttonSizes/getSmPadding.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -const getSmPadding = ({ - iconLeft, - iconRight, - fullWidth, -}: ButtonSettingsProps): string => { - if (fullWidth) { - return 'px-3'; - } - if (iconLeft) { - return 'ps-1 pe-3'; - } - if (iconRight) { - return 'ps-3 pe-1'; - } - return 'px-3'; -}; - -export default getSmPadding; diff --git a/workspaces/base/src/button/private/utils/buttonSizes/getXlPadding.ts b/workspaces/base/src/button/private/utils/buttonSizes/getXlPadding.ts deleted file mode 100644 index f774cbe0bb..0000000000 --- a/workspaces/base/src/button/private/utils/buttonSizes/getXlPadding.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -const getXlPadding = ({ - iconLeft, - iconRight, - fullWidth, -}: ButtonSettingsProps): string => { - if (fullWidth) { - return 'px-6'; - } - if (iconLeft) { - return 'ps-4 pe-6'; - } - if (iconRight) { - return 'ps-6 pe-4'; - } - return 'px-6'; -}; - -export default getXlPadding; diff --git a/workspaces/base/src/button/private/utils/buttonSizes/getXsPadding.ts b/workspaces/base/src/button/private/utils/buttonSizes/getXsPadding.ts deleted file mode 100644 index 4432e2d4bf..0000000000 --- a/workspaces/base/src/button/private/utils/buttonSizes/getXsPadding.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -const getXsPadding = ({ - iconLeft, - iconRight, - fullWidth, -}: ButtonSettingsProps): string => { - if (fullWidth) { - return 'px-2'; - } - if (iconLeft) { - return 'ps-1 pe-2'; - } - if (iconRight) { - return 'ps-2 pe-1'; - } - return 'px-2'; -}; - -export default getXsPadding; diff --git a/workspaces/base/src/button/private/utils/buttonStyles/getButtonCommonStyles.ts b/workspaces/base/src/button/private/utils/buttonStyles/getButtonCommonStyles.ts deleted file mode 100644 index dfd3ebaee0..0000000000 --- a/workspaces/base/src/button/private/utils/buttonStyles/getButtonCommonStyles.ts +++ /dev/null @@ -1,16 +0,0 @@ -import mergeClassnames from '../../../../mergeClassnames/mergeClassnames'; -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -const getButtonCommonStyles = ( - disabled: ButtonSettingsProps['disabled'] -): string => - mergeClassnames( - 'relative z-0 flex justify-center items-center font-medium no-underline overflow-hidden', - 'whitespace-nowrap select-none transition duration-200', - disabled - ? 'opacity-60 cursor-not-allowed' - : 'active:scale-90 [&_+_span]:active:scale-90', - '[&_.hover]:hover:bg-heles' - ); - -export default getButtonCommonStyles; diff --git a/workspaces/base/src/button/private/utils/buttonStyles/getButtonVariants.ts b/workspaces/base/src/button/private/utils/buttonStyles/getButtonVariants.ts deleted file mode 100644 index e7ed6608e0..0000000000 --- a/workspaces/base/src/button/private/utils/buttonStyles/getButtonVariants.ts +++ /dev/null @@ -1,39 +0,0 @@ -import mergeClassnames from '../../../../mergeClassnames/mergeClassnames'; -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -const getButtonVariants = ({ - variant, - disabled, - animation, -}: Pick): string => { - if (variant === 'secondary' || variant === 'outline') { - return animation === 'error' - ? mergeClassnames( - 'text-chichi bg-transparent ring-inset ring-1 ring-chichi', - !disabled && 'hover:bg-chichi-10' - ) - : mergeClassnames( - 'text-bulma bg-transparent ring-inset ring-1 ring-trunks', - !disabled && 'hover:ring-bulma' - ); - } - if (variant === 'tertiary') { - return animation === 'error' ? 'text-goten bg-chichi' : 'text-goten bg-hit'; - } - if (variant === 'ghost') { - return animation === 'error' - ? mergeClassnames( - 'text-chichi bg-transparent', - !disabled && 'hover:bg-chichi-10' - ) - : mergeClassnames( - 'text-trunks bg-transparent', - !disabled && 'hover:text-bulma' - ); - } - return animation === 'error' - ? 'text-goten bg-chichi' - : 'text-goten bg-piccolo'; -}; - -export default getButtonVariants; diff --git a/workspaces/base/src/button/private/utils/buttonStyles/getIconHorizontalPosition.ts b/workspaces/base/src/button/private/utils/buttonStyles/getIconHorizontalPosition.ts deleted file mode 100644 index 4548cd2798..0000000000 --- a/workspaces/base/src/button/private/utils/buttonStyles/getIconHorizontalPosition.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type ButtonSettingsProps from '../../types/ButtonSettingsProps'; - -type Props = { iconElement?: JSX.Element } & ButtonSettingsProps; - -const getIconHorizontalPosition = ({ - iconRight, - iconLeft, - size, -}: Pick): string => { - if (iconRight) { - switch (size) { - case 'xs': - case 'sm': - return 'end-1'; - case 'lg': - return 'end-3'; - case 'xl': - return 'end-4'; - default: - return 'end-2'; - } - } - if (iconLeft) { - switch (size) { - case 'xs': - case 'sm': - return 'start-1'; - case 'lg': - return 'start-3'; - case 'xl': - return 'start-4'; - default: - return 'start-2'; - } - } - return ''; -}; - -export default getIconHorizontalPosition; diff --git a/workspaces/base/src/button/private/utils/buttonStyles/getLoaderColor.ts b/workspaces/base/src/button/private/utils/buttonStyles/getLoaderColor.ts deleted file mode 100644 index c7826486ec..0000000000 --- a/workspaces/base/src/button/private/utils/buttonStyles/getLoaderColor.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type ButtonVariants from '../../types/ButtonVariants'; - -const getLoaderColor = (variant?: ButtonVariants): string => { - switch (variant) { - case 'secondary': - case 'outline': - return 'border-bulma'; - case 'ghost': - return 'border-trunks'; - default: - return 'border-goten'; - } -}; - -export default getLoaderColor; diff --git a/workspaces/base/src/button/styles/ButtonComponent.tsx b/workspaces/base/src/button/styles/ButtonComponent.tsx deleted file mode 100644 index 606e96e3eb..0000000000 --- a/workspaces/base/src/button/styles/ButtonComponent.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import React from 'react'; -import mergeClassnames from '../../mergeClassnames/mergeClassnames'; -import type ButtonProps from '../private/types/ButtonProps'; -import getAnimation from '../private/utils/buttonAnimations/getAnimation'; -import getButtonSize from '../private/utils/buttonSizes/getButtonSize'; -import getButtonCommonStyles from '../private/utils/buttonStyles/getButtonCommonStyles'; -import getButtonVariants from '../private/utils/buttonStyles/getButtonVariants'; - -const ButtonComponent = ({ - variant, - size, - iconLeft, - iconRight, - fullWidth, - disabled, - animation, - as, - customClassName, - ...rest -}: ButtonProps) => { - const Component = as || 'button'; - return ( - - ); -}; - -export default ButtonComponent; diff --git a/workspaces/base/src/button/styles/Hover.tsx b/workspaces/base/src/button/styles/Hover.tsx deleted file mode 100644 index a47a6b79fd..0000000000 --- a/workspaces/base/src/button/styles/Hover.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import mergeClassnames from '../../mergeClassnames/mergeClassnames'; - -type HoverProps = { - className?: string; -}; -const Hover = ({ className }: HoverProps) => ( -