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

chore: prepare malty for OSS #1041

Merged
merged 4 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
node-version: '20.11.0'
registry-url: https://npm.pkg.github.com/
scope: '@carlsberggbs'
scope: '@carlsberg'

- name: Configure Git
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
node-version: '20.11.0'
registry-url: https://npm.pkg.github.com/
scope: '@carlsberggbs'
scope: '@carlsberg'

- name: Set npm registry and authentication
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/visual-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
node-version: 20.11.0
registry-url: https://npm.pkg.github.com/
scope: '@carlsberggbs'
scope: '@carlsberg'

- name: Set npm registry and authentication
run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > .npmrc
Expand Down
4 changes: 2 additions & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MaltyThemeProvider } from '@carlsberggbs/malty.theme.malty-theme-provider';
import { defaultTheme, NewMaltyThemeProvider } from '@carlsberggbs/malty.theme.new-malty-theme-provider';
import { MaltyThemeProvider } from '@carlsberg/malty.theme.malty-theme-provider';
import { defaultTheme, NewMaltyThemeProvider } from '@carlsberg/malty.theme.new-malty-theme-provider';
import { Controls, Description, DocsContainer, Primary, Stories, Subtitle, Title } from '@storybook/addon-docs';
import React from 'react';
import styled from 'styled-components';
Expand Down
894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.3.1.cjs
3 changes: 1 addition & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* @CarlsbergGBS/malty-maintainers
* @CarlsbergGBS/malty-contributors
- @carlsberg/maintainers
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This project uses Lerna to manage the monorepo packages and GitHub Packages to p
Clone the repo

```sh
git clone https://github.com/CarlsbergGBS/cx-component-library
git clone https://github.com/carlsberg/malty
```

Install packages
Expand Down Expand Up @@ -62,7 +62,7 @@ Alternatively you can add the `--watch` flag for continued refresh and testing,

```typescript
import React from 'react';
import { Component, ComponentProps } from '@carlsberggbs/malty.atoms.component';
import { Component, ComponentProps } from '@carlsberg/malty.atoms.component';

export const component = ({ children }: ComponentProps) => {
const renderComponent = () => <Component>{childen}</Component>;
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Floater.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { buildSnapshotName, visit } from '@/cypress/support/utils';
import { FloaterColor } from '@carlsberggbs/malty.atoms.floater';
import { FloaterColor } from '@carlsberg/malty.atoms.floater';

const dataTestId = 'floater';

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Headline.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { buildSnapshotName, visit } from '@/cypress/support/utils';
import { HeadlineAlign, HeadlineColor } from '@carlsberggbs/malty.atoms.headline';
import { HeadlineAlign, HeadlineColor } from '@carlsberg/malty.atoms.headline';

const dataTestId = 'headline';

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ProgressBar.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { buildSnapshotName, visit } from '@/cypress/support/utils';
import { ProgressBarSize } from '@carlsberggbs/malty.atoms.progress-bar';
import { ProgressBarSize } from '@carlsberg/malty.atoms.progress-bar';

const dataTestId = 'progress-bar';

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/ProgressCircle.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { buildSnapshotName, visit } from '@/cypress/support/utils';
import { ForegroundCircleColor } from '@carlsberggbs/malty.atoms.progress-circle';
import { ForegroundCircleColor } from '@carlsberg/malty.atoms.progress-circle';

const dataTestId = 'progress-circle';

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"npmClient": "yarn",
"command": {
"publish": {
"registry": "https://npm.pkg.github.com/@carlsberggbs",
"registry": "https://npm.pkg.github.com/",
"conventionalCommits": true,
"changelog": false
},
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/BaseIcon/BaseIcon.helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalTheme as defaultTheme } from '@carlsberggbs/malty.theme.malty-theme-provider';
import { globalTheme as defaultTheme } from '@carlsberg/malty.theme.malty-theme-provider';
import { useContext } from 'react';
import { ThemeContext } from 'styled-components';
import { IconColor } from './BaseIcon.types';
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/BaseIcon/BaseIcon.styled.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { space } from '@carlsberggbs/malty.utils.space';
import { space } from '@carlsberg/malty.utils.space';
import styled, { css } from 'styled-components';
import { StyledBaseIconProps } from './BaseIcon.types';

Expand Down
4 changes: 2 additions & 2 deletions malty/atoms/BaseIcon/BaseIcon.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CarlsbergFilled } from '@carlsberggbs/malty.icons.carlsberg-filled';
import { render } from '@carlsberggbs/malty.utils.test';
import { CarlsbergFilled } from '@carlsberg/malty.icons.carlsberg-filled';
import { render } from '@carlsberg/malty.utils.test';
import { screen } from '@testing-library/react';
import React from 'react';
import { BaseIcon, CloneIcon } from './BaseIcon';
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/BaseIcon/BaseIcon.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpaceProps } from '@carlsberggbs/malty.utils.space';
import { SpaceProps } from '@carlsberg/malty.utils.space';
import { ReactElement } from 'react';

interface BaseIconSVGProps {
Expand Down
14 changes: 7 additions & 7 deletions malty/atoms/BaseIcon/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@carlsberggbs/malty.atoms.base-icon",
"name": "@carlsberg/malty.atoms.base-icon",
"version": "0.0.3",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/esm/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/CarlsbergGBS/cx-component-library.git"
"url": "https://github.com/carlsberg/malty.git"
},
"publishConfig": {
"@carlsberggbs": "https://npm.pkg.github.com"
"access": "public"
},
"scripts": {
"build": "yarn build:esm && yarn build:cjs",
Expand All @@ -18,15 +18,15 @@
"test": "jest"
},
"dependencies": {
"@carlsberggbs/malty.theme.malty-theme-provider": "^0.0.44",
"@carlsberggbs/malty.utils.space": "^0.0.3",
"@carlsberg/malty.theme.malty-theme-provider": "^0.0.44",
"@carlsberg/malty.utils.space": "^0.0.3",
"core-js": "^3.0.0",
"styled-components": "^5.3.6"
},
"devDependencies": {
"@babel/runtime": "^7.12.18",
"@carlsberggbs/malty.icons.carlsberg-filled": "^0.1.1",
"@carlsberggbs/malty.utils.test": "^0.0.19",
"@carlsberg/malty.icons.carlsberg-filled": "^0.1.1",
"@carlsberg/malty.utils.test": "^0.0.19",
"@testing-library/react": "^12.1.5",
"@types/jest": "^26.0.0",
"@types/node": "12.20.4",
Expand Down
6 changes: 3 additions & 3 deletions malty/atoms/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { allIconsStoryOptions } from '@carlsberggbs/malty.utils.all-icons';
import { generateStorybookSpacing } from '@carlsberggbs/malty.utils.space';
import { allIconsStoryOptions } from '@carlsberg/malty.utils.all-icons';
import { generateStorybookSpacing } from '@carlsberg/malty.utils.space';
import { Meta, StoryObj } from '@storybook/react';
import { ButtonProps, ButtonSize } from '.';
import { Button } from './Button';
Expand All @@ -10,7 +10,7 @@ const meta: Meta<ButtonProps> = {
component: Button,
parameters: {
importObject: 'Button',
importPath: '@carlsberggbs/malty.atoms.button'
importPath: '@carlsberg/malty.atoms.button'
},
argTypes: {
text: {
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Button/Button.styled.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable no-nested-ternary */
import { space } from '@carlsberggbs/malty.utils.space';
import { space } from '@carlsberg/malty.utils.space';
import styled, { css, keyframes } from 'styled-components';
import { ButtonColor, ButtonIconPosition, ButtonSize, StyledButtonProps } from './Button.types';

Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Button/Button.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { render } from '@carlsberggbs/malty.utils.test';
import { render } from '@carlsberg/malty.utils.test';
import { fireEvent, screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
Expand Down
6 changes: 3 additions & 3 deletions malty/atoms/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CloneIcon, IconColor, IconSize } from '@carlsberggbs/malty.atoms.base-icon';
import { Loading, LoadingColor, LoadingStatus } from '@carlsberggbs/malty.molecules.loading';
import { globalTheme as defaultTheme } from '@carlsberggbs/malty.theme.malty-theme-provider';
import { CloneIcon, IconColor, IconSize } from '@carlsberg/malty.atoms.base-icon';
import { Loading, LoadingColor, LoadingStatus } from '@carlsberg/malty.molecules.loading';
import { globalTheme as defaultTheme } from '@carlsberg/malty.theme.malty-theme-provider';
import React, { useContext } from 'react';
import { ThemeContext } from 'styled-components';
import { ButtonProps, ButtonSize } from '.';
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Button/Button.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpaceProps } from '@carlsberggbs/malty.utils.space';
import { SpaceProps } from '@carlsberg/malty.utils.space';
import React, { ReactElement } from 'react';

export interface ButtonProps extends Omit<React.HTMLAttributes<HTMLButtonElement>, 'style'>, SpaceProps {
Expand Down
18 changes: 9 additions & 9 deletions malty/atoms/Button/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@carlsberggbs/malty.atoms.button",
"name": "@carlsberg/malty.atoms.button",
"version": "0.1.4",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/esm/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/CarlsbergGBS/cx-component-library.git"
"url": "https://github.com/carlsberg/malty.git"
},
"publishConfig": {
"@carlsberggbs": "https://npm.pkg.github.com"
"access": "public"
},
"scripts": {
"build": "yarn build:esm && yarn build:cjs",
Expand All @@ -18,17 +18,17 @@
"test": "jest"
},
"dependencies": {
"@carlsberggbs/malty.atoms.base-icon": "^0.0.3",
"@carlsberggbs/malty.molecules.loading": "^0.0.84",
"@carlsberggbs/malty.theme.malty-theme-provider": "^0.0.44",
"@carlsberggbs/malty.utils.space": "^0.0.3",
"@carlsberg/malty.atoms.base-icon": "^0.0.3",
"@carlsberg/malty.molecules.loading": "^0.0.84",
"@carlsberg/malty.theme.malty-theme-provider": "^0.0.44",
"@carlsberg/malty.utils.space": "^0.0.3",
"core-js": "3.0.0",
"styled-components": "^5.3.6"
},
"devDependencies": {
"@babel/core": "^7.12.18",
"@carlsberggbs/malty.utils.all-icons": "^0.0.3",
"@carlsberggbs/malty.utils.test": "^0.0.19",
"@carlsberg/malty.utils.all-icons": "^0.0.3",
"@carlsberg/malty.utils.test": "^0.0.19",
"@storybook/react": "^7.4.1",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^13.5.0",
Expand Down
10 changes: 5 additions & 5 deletions malty/atoms/Card/Card.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Headline, HeadlineStyle } from '@carlsberggbs/malty.atoms.headline';
import { Image } from '@carlsberggbs/malty.atoms.image';
import { Text, TextStyle } from '@carlsberggbs/malty.atoms.text';
import { generateStorybookSpacing } from '@carlsberggbs/malty.utils.space';
import { Headline, HeadlineStyle } from '@carlsberg/malty.atoms.headline';
import { Image } from '@carlsberg/malty.atoms.image';
import { Text, TextStyle } from '@carlsberg/malty.atoms.text';
import { generateStorybookSpacing } from '@carlsberg/malty.utils.space';
import { Meta, StoryObj } from '@storybook/react';
import React from 'react';
import { Card } from './Card';
Expand All @@ -12,7 +12,7 @@ const meta: Meta<CardProps> = {
component: Card,
parameters: {
importObject: 'Card',
importPath: '@carlsberggbs/malty.atoms.card'
importPath: '@carlsberg/malty.atoms.card'
},
argTypes: {
cardStyle: {
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Card/Card.styled.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { space } from '@carlsberggbs/malty.utils.space';
import { space } from '@carlsberg/malty.utils.space';
import styled, { css } from 'styled-components';
import { CardOrientation, CardStyle, StyledCardContainerProps } from './Card.types';

Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Card/Card.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { render } from '@carlsberggbs/malty.utils.test';
import { render } from '@carlsberg/malty.utils.test';
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React from 'react';
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { globalTheme as defaultTheme } from '@carlsberggbs/malty.theme.malty-theme-provider';
import { globalTheme as defaultTheme } from '@carlsberg/malty.theme.malty-theme-provider';
import React, { useContext } from 'react';
import { ThemeContext } from 'styled-components';
import { StyledCardBody, StyledCardContainer, StyledCardHero } from './Card.styled';
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Card/Card.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpaceProps } from '@carlsberggbs/malty.utils.space';
import { SpaceProps } from '@carlsberg/malty.utils.space';

export interface CardProps extends SpaceProps {
cardStyle?: CardStyle;
Expand Down
18 changes: 9 additions & 9 deletions malty/atoms/Card/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@carlsberggbs/malty.atoms.card",
"name": "@carlsberg/malty.atoms.card",
"version": "0.1.4",
"main": "./lib/cjs/index.js",
"module": "./lib/esm/index.js",
"types": "./lib/esm/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/CarlsbergGBS/cx-component-library.git"
"url": "https://github.com/carlsberg/malty.git"
},
"publishConfig": {
"@carlsberggbs": "https://npm.pkg.github.com"
"access": "public"
},
"scripts": {
"build": "yarn build:esm && yarn build:cjs",
Expand All @@ -18,17 +18,17 @@
"test": "jest"
},
"dependencies": {
"@carlsberggbs/malty.theme.malty-theme-provider": "^0.0.44",
"@carlsberggbs/malty.utils.space": "^0.0.3",
"@carlsberg/malty.theme.malty-theme-provider": "^0.0.44",
"@carlsberg/malty.utils.space": "^0.0.3",
"core-js": "^3.0.0",
"styled-components": "^5.3.6"
},
"devDependencies": {
"@babel/runtime": "^7.12.18",
"@carlsberggbs/malty.atoms.headline": "^0.0.60",
"@carlsberggbs/malty.atoms.image": "^0.1.4",
"@carlsberggbs/malty.atoms.text": "^0.0.70",
"@carlsberggbs/malty.utils.test": "^0.0.19",
"@carlsberg/malty.atoms.headline": "^0.0.60",
"@carlsberg/malty.atoms.image": "^0.1.4",
"@carlsberg/malty.atoms.text": "^0.0.70",
"@carlsberg/malty.utils.test": "^0.0.19",
"@storybook/react": "^7.4.1",
"@testing-library/react": "^12.1.5",
"@testing-library/user-event": "^13.5.0",
Expand Down
4 changes: 2 additions & 2 deletions malty/atoms/Checkbox/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { generateStorybookSpacing } from '@carlsberggbs/malty.utils.space';
import { generateStorybookSpacing } from '@carlsberg/malty.utils.space';
import { Meta, StoryObj } from '@storybook/react';
import React, { useEffect, useState } from 'react';
import { Checkbox } from './Checkbox';
Expand All @@ -20,7 +20,7 @@ const meta: Meta<CheckboxProps> = {
render: (args) => <ControlledCheckbox {...args} />,
parameters: {
importObject: 'Checkbox',
importPath: '@carlsberggbs/malty.atoms.checkbox'
importPath: '@carlsberg/malty.atoms.checkbox'
},
argTypes: {
value: {
Expand Down
4 changes: 2 additions & 2 deletions malty/atoms/Checkbox/Checkbox.styled.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Text } from '@carlsberggbs/malty.atoms.text';
import { space } from '@carlsberggbs/malty.utils.space';
import { Text } from '@carlsberg/malty.atoms.text';
import { space } from '@carlsberg/malty.utils.space';
import styled, { css } from 'styled-components';
import { StyledCheckboxContainerProps } from './Checkbox.types';

Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Checkbox/Checkbox.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { render } from '@carlsberggbs/malty.utils.test';
import { render } from '@carlsberg/malty.utils.test';
import { screen } from '@testing-library/react';
import userEvent from '@testing-library/user-event';
import React, { useState } from 'react';
Expand Down
14 changes: 7 additions & 7 deletions malty/atoms/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { IconColor } from '@carlsberggbs/malty.atoms.base-icon';
import { TextColor, TextStyle } from '@carlsberggbs/malty.atoms.text';
import { CheckboxCheck } from '@carlsberggbs/malty.icons.checkbox-check';
import { CheckboxCheckAlternate } from '@carlsberggbs/malty.icons.checkbox-check-alternate';
import { CheckboxEmpty } from '@carlsberggbs/malty.icons.checkbox-empty';
import { globalTheme as defaultTheme } from '@carlsberggbs/malty.theme.malty-theme-provider';
import { isolateSpaceProps } from '@carlsberggbs/malty.utils.space';
import { IconColor } from '@carlsberg/malty.atoms.base-icon';
import { TextColor, TextStyle } from '@carlsberg/malty.atoms.text';
import { CheckboxCheck } from '@carlsberg/malty.icons.checkbox-check';
import { CheckboxCheckAlternate } from '@carlsberg/malty.icons.checkbox-check-alternate';
import { CheckboxEmpty } from '@carlsberg/malty.icons.checkbox-empty';
import { globalTheme as defaultTheme } from '@carlsberg/malty.theme.malty-theme-provider';
import { isolateSpaceProps } from '@carlsberg/malty.utils.space';
import React, { useContext } from 'react';
import { ThemeContext } from 'styled-components';
import {
Expand Down
2 changes: 1 addition & 1 deletion malty/atoms/Checkbox/Checkbox.types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SpaceProps } from '@carlsberggbs/malty.utils.space';
import { SpaceProps } from '@carlsberg/malty.utils.space';

export interface CheckboxProps extends React.HTMLAttributes<HTMLInputElement>, SpaceProps {
value?: string | number;
Expand Down
Loading
Loading