Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐞fix(build): adjust components themes #714

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions packages/yoga/src/Theme/theme/componentThemes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import Accordion from '../../Accordion/Accordion.theme.js';
import ActionRequirement from '../../ActionRequirement/ActionRequirement.theme.js';
import AutoComplete from '../../AutoComplete/AutoComplete.theme.js';
import Avatar from '../../Avatar/Avatar.theme.js';
import Banner from '../../Banner/Banner.theme.js';
import BottomSheet from '../../BottomSheet/BottomSheet.theme.js';
import Button from '../../Button/Button.theme.js';
import Card from '../../Card/Card.theme.js';
import CardNative from '../../Card/Card.native.theme.js';
import CardWeb from '../../Card/Card.web.theme.js';
import Checkbox from '../../Checkbox/Checkbox.theme.js';
import CheckboxSwitch from '../../Checkbox/CheckboxSwitch.theme.js';
import Datepicker from '../../Datepicker/Datepicker.theme.js';
import Dialog from '../../Dialog/Dialog.theme.js';
import Divider from '../../Divider/Divider.theme.js';
import Drawer from '../../Drawer/Drawer.theme.js';
import Dropdown from '../../Dropdown/Dropdown.theme.js';
import Feedback from '../../Feedback/Feedback.theme.js';
import Grid from '../../Grid/Grid.theme.js';
import Header from '../../Header/Header.theme.js';
import Heading from '../../Heading/Heading.theme.js';
import Icon from '../../Icon/Icon.theme.js';
import Input from '../../Input/Input.theme.js';
import List from '../../List/List.theme.js';
import Menu from '../../Menu/Menu.theme.js';
import Popover from '../../Popover/Popover.theme.js';
import Progress from '../../Progress/Progress.theme.js';
import RadioGroup from '../../RadioGroup/RadioGroup.theme.js';
import Rating from '../../Rating/Rating.theme.js';
import Result from '../../Result/Result.theme.js';
import Skeleton from '../../Skeleton/Skeleton.theme.js';
import Slider from '../../Slider/Slider.theme.js';
import Snackbar from '../../Snackbar/Snackbar.theme.js';
import Spinner from '../../Spinner/Spinner.theme.js';
import Stepper from '../../Stepper/Stepper.theme.js';
import Tag from '../../Tag/Tag.theme.js';
import Text from '../../Text/Text.theme.js';
import TextArea from '../../TextArea/TextArea.theme.js';

const componentThemes = {
Accordion,
ActionRequirement,
AutoComplete,
Avatar,
Banner,
BottomSheet,
Button,
Card,
CardNative,
CardWeb,
Checkbox,
CheckboxSwitch,
Datepicker,
Dialog,
Divider,
Drawer,
Dropdown,
Feedback,
Grid,
Header,
Heading,
Icon,
Input,
List,
Menu,
Popover,
Progress,
RadioGroup,
Rating,
Result,
Skeleton,
Slider,
Snackbar,
Spinner,
Stepper,
Tag,
Text,
TextArea,
};

export default componentThemes;
4 changes: 2 additions & 2 deletions packages/yoga/src/Theme/theme/theme.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable prefer-destructuring */
import { merge } from '@gympass/yoga-common';
import * as componentThemes from '../../**/*.theme.js';
import componentThemes from './componentThemes';

const getComponentThemes = tokens => {
const { colors, baseFont, baseFontSize } = tokens;
const components = Object.entries(componentThemes).reduce(
(componentsStyles, [names, themed]) => {
const [, name] = names.toLowerCase().split('$');
const name = names.toLowerCase();

return {
...componentsStyles,
Expand Down
21 changes: 11 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2791,6 +2791,16 @@
tslib "~2.2.0"
value-or-promise "1.0.6"

"@gympass/[email protected]":
version "1.15.0"
resolved "https://registry.yarnpkg.com/@gympass/yoga-icons/-/yoga-icons-1.15.0.tgz#ee51f9dc665e208b79647d306d4f09ded6563ab9"
integrity sha512-FyXpowXCt7wYjKy03zrOP0rKxqQYjYi5+sl7uNu/pTT+UmW7Pk8R7ajweulV/I2Yw+o41Xi4YFahrzFDmT3zSg==

"@gympass/[email protected]":
version "0.5.1"
resolved "https://registry.yarnpkg.com/@gympass/yoga-illustrations/-/yoga-illustrations-0.5.1.tgz#c0c401075a6907581113c35e5e19a2cb2dc3d1b0"
integrity sha512-4ivshZtxky9I5csYiV1v/gCjafJmMpziD1JqJ05//0VpfHw2nOeTm7N3BzelqzMrKZjdcu5uOMCGokOpQ+A+aA==

"@hapi/[email protected]":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@hapi/address/-/address-2.1.4.tgz#5d67ed43f3fd41a69d4b9ff7b56e7c0d1d0a81e5"
Expand Down Expand Up @@ -12689,15 +12699,6 @@ [email protected], fs-extra@^8.1.0:
jsonfile "^4.0.0"
universalify "^0.1.0"

fs-extra@^11.1.1:
version "11.1.1"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d"
integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==
dependencies:
graceful-fs "^4.2.0"
jsonfile "^6.0.1"
universalify "^2.0.0"

fs-extra@^4.0.2:
version "4.0.3"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
Expand Down Expand Up @@ -21915,7 +21916,7 @@ [email protected]:
react-shallow-renderer "^16.15.0"
scheduler "^0.23.0"

[email protected], react@^18.2.0:
[email protected]:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
Expand Down
Loading