From 0e43a96e7f68a51448654193fcd80cb4dea3e359 Mon Sep 17 00:00:00 2001 From: Dmytro Kireiev Date: Mon, 11 Sep 2023 17:01:02 +0300 Subject: [PATCH 1/6] feat: add pay.io theme [MDS-670] (#2363) --- next-docs/components/themes/useThemes.tsx | 5 ++ next-docs/styles/themes.css | 1 + workspaces/themes/src/index.ts | 1 + workspaces/themes/src/pay.css | 80 +++++++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 workspaces/themes/src/pay.css diff --git a/next-docs/components/themes/useThemes.tsx b/next-docs/components/themes/useThemes.tsx index 2ce3e71e0d..dab1fd44e0 100644 --- a/next-docs/components/themes/useThemes.tsx +++ b/next-docs/components/themes/useThemes.tsx @@ -21,6 +21,7 @@ type Themes = { tradeart: ColorModes; tradeartMiniBetting: ColorModes; travel: ColorModes; + pay: ColorModes; }; export const themes: Themes = { @@ -80,6 +81,10 @@ export const themes: Themes = { dark: 'theme-travel-light', light: 'theme-travel-light', }, + pay: { + dark: 'theme-pay-light', + light: 'theme-pay-light', + }, }; export type Brand = keyof Themes; diff --git a/next-docs/styles/themes.css b/next-docs/styles/themes.css index 985ff6d965..7f8100ca44 100644 --- a/next-docs/styles/themes.css +++ b/next-docs/styles/themes.css @@ -12,3 +12,4 @@ @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'; diff --git a/workspaces/themes/src/index.ts b/workspaces/themes/src/index.ts index cceb515564..411d1930cf 100644 --- a/workspaces/themes/src/index.ts +++ b/workspaces/themes/src/index.ts @@ -13,3 +13,4 @@ import './bombayClub.css'; import './hub88.css'; import './travel.css'; import './comms.css'; +import './pay.css'; diff --git a/workspaces/themes/src/pay.css b/workspaces/themes/src/pay.css new file mode 100644 index 0000000000..06208c4526 --- /dev/null +++ b/workspaces/themes/src/pay.css @@ -0,0 +1,80 @@ +:root.theme-pay-light, +.theme-pay-light { + --piccolo: 76 73 234; /* #4c49ea */ + --hit: 234 235 235; /* #eaebeb */ + --beerus: 218 218 222; /* #dadade */ + --gohan: 244 245 246; /* #f4f5f6 */ + --goten: 255 255 255; /* #ffffff */ + --goku: 255 255 255; /* #ffffff */ + --bulma: 27 20 20; /* #1b1414 */ + --trunks: 178 177 185; /* #b2b1b9 */ + --popo: 0 0 0; /* #000000 */ + --jiren: 76 73 234 / 0.12; /* #4c49ea */ + --heles: 58 57 72 / 0.12; /* #3a3948 */ + --zeno: 25 30 37 / 0.4; /* #191e25 */ + + /* support-colors */ + --krillin: 255 179 25; /* #ff9800 */ + --krillin-60: 255 179 25 / 0.56; /* #ff9800 */ + --krillin-10: 255 179 25 / 0.08; /* #ff9800 */ + + --chichi: 255 78 100; /* #ff4e64 */ + --chichi-60: 255 78 100 / 0.56; /* #ff4e64 */ + --chichi-10: 255 78 100 / 0.08; /* #ff4e64 */ + + --roshi: 46 125 50; /* #2e7d32 */ + --roshi-60: 46 125 50 / 0.56; /* #2e7d32 */ + --roshi-10: 46 125 50 / 0.08; /* #2e7d32 */ + + --dodoria: 211 48 48; /* #d33030 */ + --dodoria-60: 211 48 48 / 0.56; /* #d33030 */ + --dodoria-10: 211 48 48 / 0.08; /* #d33030 */ + + --cell: 149 241 213; /* #95f1d5 */ + --cell-60: 149 241 213 / 0.56; /* #95f1d5 */ + --cell-10: 149 241 213 / 0.08; /* #95f1d5 */ + + --raditz: 179 128 74; /* #b3804a */ + --raditz-60: 179 128 74 / 0.56; /* #b3804a */ + --raditz-10: 179 128 74 / 0.08; /* #b3804a */ + + --whis: 52 72 240; /* #3448f0 */ + --whis-60: 52 72 240 / 0.56; /* #3448f0 */ + --whis-10: 52 72 240 / 0.08; /* #3448f0 */ + + --frieza: 92 51 207; /* #5c33cf */ + --frieza-60: 92 51 207 / 0.56; /* #5c33cf */ + --frieza-10: 92 51 207 / 0.08; /* #5c33cf */ + + --nappa: 114 85 80; /* #725550 */ + --nappa-60: 114 85 80 / 0.56; /* #725550 */ + --nappa-10: 114 85 80 / 0.08; /* #725550 */ + + /* border-radius */ + --radius-i-xs: 0.25rem; /* 4px */ + --radius-i-sm: 0.5rem; /* 8px */ + --radius-i-md: 0.75rem; /* 12px */ + --radius-s-xs: 0.25rem; /* 4px */ + --radius-s-sm: 0.5rem; /* 8px */ + --radius-s-md: 0.75rem; /* 12px */ + --radius-s-lg: 1rem; /* 16px */ + + /* border-width */ + --border-width: 0.0625rem; /* 1px */ + --border-i-width: 0.125rem; /* 2px */ + + /* opacity */ + --opacity-moon: 0.6; + + /* fonts */ + --averta: 'Averta Std'; + --dm-sans: 'DM Sans'; + + /* box-shadow */ + --shadow-xs: 0 4px 12px -6px rgb(0 0 0 / 0.06); + --shadow-sm: 0 6px 6px -6px rgb(0 0 0 / 0.16), 0 0 1px rgb(0 0 0 / 0.4); + --shadow-md: 0 12px 12px -6px rgb(0 0 0 / 0.16), 0 0 1px rgb(0 0 0 / 0.4); + --shadow-lg: 0 8px 24px -6px rgb(0 0 0 / 0.16), 0 0 1px rgb(0 0 0 / 0.4); + --shadow-xl: 0 32px 32px -8px rgb(0 0 0 / 0.08), + 0 0 32px -8px rgb(0 0 0 / 0.12), 0 0 1px rgb(0 0 0 / 0.2); +} From 49b026722bac8e208aed71c87d97ee9a5535ff62 Mon Sep 17 00:00:00 2001 From: Dmytro Kireiev Date: Tue, 12 Sep 2023 12:30:50 +0300 Subject: [PATCH 2/6] feat: remove color props from CircularProgress [MDS-521] (#2364) * feat: remove color props from CircularProgress [MDS-521] * fix: remove inProgress from CircularProgress page [MDS-521] --- .../pages/components/circularProgress.tsx | 16 +- .../examples/circularProgress/Colors.tsx | 7 +- .../__snapshots__/index.test.tsx.snap | 468 ++++++++---------- .../src/circularProgress/CircularProgress.tsx | 35 +- .../circularProgress/private/types/Props.ts | 7 +- .../circularProgress/private/utils/getSize.ts | 14 +- 6 files changed, 241 insertions(+), 306 deletions(-) diff --git a/next-docs/pages/components/circularProgress.tsx b/next-docs/pages/components/circularProgress.tsx index 04bc1c1655..d51bd49d0d 100644 --- a/next-docs/pages/components/circularProgress.tsx +++ b/next-docs/pages/components/circularProgress.tsx @@ -1,6 +1,7 @@ import { ReactNode } from 'react'; import Preview from '../../components/codePreview/Preview'; import ComponentPageDescription from '../../components/ComponentPageDescription'; +import type { ComponentNames } from '../../components/getComponent'; import Layout from '../../components/Layout'; import PropsTable from '../../components/PropsTable'; import Colors from '../../public/examples/circularProgress/Colors'; @@ -8,7 +9,6 @@ import Default from '../../public/examples/circularProgress/Default'; import Sizes from '../../public/examples/circularProgress/Sizes'; import Values from '../../public/examples/circularProgress/Values'; import useComponent from '../../utils/useComponent'; -import type { ComponentNames } from '../../components/getComponent'; const COMPONENT_NAME: ComponentNames = 'CircularProgress'; @@ -19,7 +19,6 @@ const PageCircularProgress = () => { @@ -49,18 +48,11 @@ const PageCircularProgress = () => { title="Progress props" data={[ { - name: 'bgColor', - type: 'string', - required: false, - default: 'stroke-trunks/[.24]', - description: 'Background colour', - }, - { - name: 'progressColor', + name: 'className', type: 'string', required: false, - default: 'stroke-piccolo', - description: 'Progress bar colour', + default: '-', + description: 'Tailwind classes for custom styles.', }, { name: 'size', diff --git a/next-docs/public/examples/circularProgress/Colors.tsx b/next-docs/public/examples/circularProgress/Colors.tsx index 2292363630..bb2e6329ed 100644 --- a/next-docs/public/examples/circularProgress/Colors.tsx +++ b/next-docs/public/examples/circularProgress/Colors.tsx @@ -2,13 +2,12 @@ import { CircularProgress } from '@heathmont/moon-core-tw'; const Example = () => ( <> - + - + ); diff --git a/next-docs/public/examples/circularProgress/__tests__/__snapshots__/index.test.tsx.snap b/next-docs/public/examples/circularProgress/__tests__/__snapshots__/index.test.tsx.snap index 8844f3932a..8275cceb77 100644 --- a/next-docs/public/examples/circularProgress/__tests__/__snapshots__/index.test.tsx.snap +++ b/next-docs/public/examples/circularProgress/__tests__/__snapshots__/index.test.tsx.snap @@ -12,13 +12,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" - font-size="2.5rem" + class="w-10 h-10 [&_.background]:stroke-cell" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -115,13 +112,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" - font-size="2.5rem" + class="w-10 h-10 [&_.background]:stroke-cell" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -275,13 +269,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" - font-size="2.5rem" + class="w-10 h-10" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -314,13 +307,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" - font-size="2.5rem" + class="w-10 h-10" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -410,13 +402,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" - font-size="1rem" + class="w-4 h-4" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -577,13 +564,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" - font-size="1rem" + class="w-4 h-4" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -801,13 +783,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="25" - font-size="2.5rem" + class="w-10 h-10" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -936,13 +914,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="25" - font-size="2.5rem" + class="w-10 h-10" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -1125,13 +1099,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" - font-size="2.5rem" + class="w-10 h-10 [&_.background]:stroke-cell" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -1224,13 +1195,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" - font-size="2.5rem" + class="w-10 h-10 [&_.background]:stroke-cell" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > , @@ -1380,13 +1348,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" - font-size="2.5rem" + class="w-10 h-10" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -1415,13 +1382,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="0" - font-size="2.5rem" + class="w-10 h-10" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > , @@ -1507,13 +1473,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" - font-size="1rem" + class="w-4 h-4" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -1670,13 +1631,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="75" - font-size="1rem" + class="w-4 h-4" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > , @@ -1890,13 +1846,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="25" - font-size="2.5rem" + class="w-10 h-10" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > @@ -2021,13 +1973,12 @@ Object { aria-valuemax="100" aria-valuemin="0" aria-valuenow="25" - font-size="2.5rem" + class="w-10 h-10" role="progressbar" - style="width: 1em; height: 1em; vertical-align: middle;" viewBox="0 0 100 100" > , diff --git a/workspaces/core/src/circularProgress/CircularProgress.tsx b/workspaces/core/src/circularProgress/CircularProgress.tsx index 4cba4e8272..6169cb81e3 100644 --- a/workspaces/core/src/circularProgress/CircularProgress.tsx +++ b/workspaces/core/src/circularProgress/CircularProgress.tsx @@ -1,48 +1,43 @@ import React from 'react'; -import mergeClassnames from '../mergeClassnames/mergeClassnames'; import Path from './private/Path'; +import type Props from './private/types/Props'; import getPathRatio from './private/utils/getPathRatio'; import getSize from './private/utils/getSize'; -import type Props from './private/types/Props'; +import mergeClassnames from '../mergeClassnames/mergeClassnames'; const CircularProgress = ({ value = 0, size = 'md', - bgColor = 'stroke-trunks/[.24]', - progressColor = 'stroke-piccolo', + bgColor, // deprecated + progressColor, // deprecated + className, }: Props) => { - const VIEWBOX_WIDTH = 100; - const VIEWBOX_HEIGHT = 100; - const PATH_RADIUS = (VIEWBOX_HEIGHT - 8) / 2; + const PATH_RADIUS = 46; const pathRatio = getPathRatio(value); return ( diff --git a/workspaces/core/src/circularProgress/private/types/Props.ts b/workspaces/core/src/circularProgress/private/types/Props.ts index c27c5cadaa..e8ae805380 100644 --- a/workspaces/core/src/circularProgress/private/types/Props.ts +++ b/workspaces/core/src/circularProgress/private/types/Props.ts @@ -1,10 +1,11 @@ import type Sizes from './Sizes'; -type Props = { +type Props = React.HTMLAttributes & { size?: Sizes; value?: number; - bgColor?: string; - progressColor?: string; + bgColor?: string; // deprecated + progressColor?: string; // deprecated + className?: string; }; export default Props; diff --git a/workspaces/core/src/circularProgress/private/utils/getSize.ts b/workspaces/core/src/circularProgress/private/utils/getSize.ts index 1bd15a5f5a..e9b1c11cec 100644 --- a/workspaces/core/src/circularProgress/private/utils/getSize.ts +++ b/workspaces/core/src/circularProgress/private/utils/getSize.ts @@ -1,19 +1,19 @@ import type Sizes from '../types/Sizes'; -const getCircularSize = (size: Sizes) => { +const getSize = (size?: Sizes) => { switch (size) { case '2xs': - return '1rem'; + return 'w-4 h-4'; case 'xs': - return '1.5rem'; + return 'w-6 h-6'; case 'sm': - return '2rem'; + return 'w-8 h-8'; case 'lg': - return '3rem'; + return 'w-12 h-12'; case 'md': default: - return '2.5rem'; + return 'w-10 h-10'; } }; -export default getCircularSize; +export default getSize; From 0bd510ba2d7912a5bde55b452d660d04d90acf0e Mon Sep 17 00:00:00 2001 From: Dmytro Kireiev Date: Tue, 12 Sep 2023 15:34:24 +0300 Subject: [PATCH 3/6] feat: add multiline Button example [MDS-624] (#2365) --- next-docs/pages/components/button.tsx | 9 +- .../public/examples/button/Multiline.tsx | 14 ++ .../__snapshots__/index.test.tsx.snap | 226 ++++++++++++++++++ .../examples/button/__tests__/index.test.tsx | 9 + 4 files changed, 257 insertions(+), 1 deletion(-) create mode 100644 next-docs/public/examples/button/Multiline.tsx diff --git a/next-docs/pages/components/button.tsx b/next-docs/pages/components/button.tsx index 76c5a9e3e5..866459d8c3 100644 --- a/next-docs/pages/components/button.tsx +++ b/next-docs/pages/components/button.tsx @@ -1,6 +1,7 @@ import { ReactNode } from 'react'; import Preview from '../../components/codePreview/Preview'; import ComponentPageDescription from '../../components/ComponentPageDescription'; +import type { ComponentNames } from '../../components/getComponent'; import Layout from '../../components/Layout'; import PropsTable from '../../components/PropsTable'; import Animations from '../../public/examples/button/Animations'; @@ -9,10 +10,10 @@ import Default from '../../public/examples/button/Default'; import Disabled from '../../public/examples/button/Disabled'; import FullWidth from '../../public/examples/button/FullWidth'; import Icons from '../../public/examples/button/Icons'; +import Multiline from '../../public/examples/button/Multiline'; import Sizes from '../../public/examples/button/Sizes'; import Variants from '../../public/examples/button/Variants'; import useComponent from '../../utils/useComponent'; -import type { ComponentNames } from '../../components/getComponent'; const COMPONENT_NAME: ComponentNames = 'Button'; @@ -79,6 +80,12 @@ const PageButton = () => { preview={} code={examples ? examples.Animations : 'Loading'} /> + } + code={examples ? examples.Multiline : 'Loading'} + /> ( + +); + +export default Example; diff --git a/next-docs/public/examples/button/__tests__/__snapshots__/index.test.tsx.snap b/next-docs/public/examples/button/__tests__/__snapshots__/index.test.tsx.snap index 144faf38a6..cca5d255e0 100644 --- a/next-docs/public/examples/button/__tests__/__snapshots__/index.test.tsx.snap +++ b/next-docs/public/examples/button/__tests__/__snapshots__/index.test.tsx.snap @@ -868,6 +868,123 @@ Object { } `; +exports[`Button in RTL renders Multiline 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+
+ +
+
+ , + "container":
+
+ +
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + exports[`Button in RTL renders Sizes 1`] = ` Object { "asFragment": [Function], @@ -2190,6 +2307,115 @@ Object { } `; +exports[`Button renders Multiline 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+ +
+ , + "container":
+ +
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; + exports[`Button renders Sizes 1`] = ` Object { "asFragment": [Function], diff --git a/next-docs/public/examples/button/__tests__/index.test.tsx b/next-docs/public/examples/button/__tests__/index.test.tsx index ce0395c444..35cc68c347 100644 --- a/next-docs/public/examples/button/__tests__/index.test.tsx +++ b/next-docs/public/examples/button/__tests__/index.test.tsx @@ -11,6 +11,7 @@ import FullWidth from '../FullWidth'; import Disabled from '../Disabled'; import Animations from '../Animations'; import AsLink from '../AsLink'; +import Multiline from '../Multiline'; const withRtl = (component: JSX.Element) =>
{component}
; @@ -48,6 +49,10 @@ describe('Button', () => { const tree = render(); expect(tree).toMatchSnapshot(); }); + it('renders Multiline', () => { + const tree = render(); + expect(tree).toMatchSnapshot(); + }); }); describe('Button in RTL', () => { @@ -84,4 +89,8 @@ describe('Button in RTL', () => { const tree = render(withRtl()); expect(tree).toMatchSnapshot(); }); + it('renders Multiline', () => { + const tree = render(withRtl()); + expect(tree).toMatchSnapshot(); + }); }); From 063535e7cbbb8b1abbb1c1c59fdc18e0be0b2b68 Mon Sep 17 00:00:00 2001 From: Dmytro Kireiev Date: Tue, 12 Sep 2023 16:00:21 +0300 Subject: [PATCH 4/6] fix: add link to next and prev buttons on Pagination with hrefs [MDS-673] (#2366) --- .../public/examples/pagination/WithHref.tsx | 17 ++++- .../__snapshots__/index.test.tsx.snap | 68 ++++++++++--------- 2 files changed, 50 insertions(+), 35 deletions(-) diff --git a/next-docs/public/examples/pagination/WithHref.tsx b/next-docs/public/examples/pagination/WithHref.tsx index 00666ae9af..29c2f71407 100644 --- a/next-docs/public/examples/pagination/WithHref.tsx +++ b/next-docs/public/examples/pagination/WithHref.tsx @@ -5,7 +5,18 @@ import { ControlsChevronRightSmall, } from '@heathmont/moon-icons-tw'; -const hrefsArray = ['#', '#', '#', '#', '#', '#', '#', '#', '#', '#']; +const hrefsArray = [ + '#?1', + '#?2', + '#?3', + '#?4', + '#?5', + '#?6', + '#?7', + '#?8', + '#?9', + '#?10', +]; const Example = () => { const [page, setPage] = useState(0); @@ -20,7 +31,7 @@ const Example = () => { currentPage={page} setCurrentPage={handlePageChange} > - + {({ disabled }) => ( } @@ -32,7 +43,7 @@ const Example = () => { )} - + {({ disabled }) => ( } diff --git a/next-docs/public/examples/pagination/__tests__/__snapshots__/index.test.tsx.snap b/next-docs/public/examples/pagination/__tests__/__snapshots__/index.test.tsx.snap index 770fbde27b..214c71a81e 100644 --- a/next-docs/public/examples/pagination/__tests__/__snapshots__/index.test.tsx.snap +++ b/next-docs/public/examples/pagination/__tests__/__snapshots__/index.test.tsx.snap @@ -483,7 +483,7 @@ Object { @@ -598,7 +599,7 @@ Object { , @@ -1223,7 +1225,7 @@ Object { , @@ -1334,7 +1337,7 @@ Object { , "debug": [Function], From 7dfdcb3ba2280455d452f0ef2544751fbc5666c2 Mon Sep 17 00:00:00 2001 From: Triin Kullisaar <95503530+tkullisaar@users.noreply.github.com> Date: Wed, 13 Sep 2023 16:23:12 +0300 Subject: [PATCH 5/6] update piccolo on Partners theme --- workspaces/themes/src/partners.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspaces/themes/src/partners.css b/workspaces/themes/src/partners.css index 45d4bcde26..9418260ecd 100644 --- a/workspaces/themes/src/partners.css +++ b/workspaces/themes/src/partners.css @@ -1,6 +1,6 @@ :root.theme-partners-light, .theme-partners-light { - --piccolo: 66 150 89; /* #429659 */ + --piccolo: 0 0 0; /* #000000 */ --hit: 70 99 163; /* #4663a3 */ --beerus: 224 224 225; /* #e0e0e1 */ --gohan: 255 255 255; /* #ffffff */ From 1003aadc1a29ccac66da542453b46105fd06ffc8 Mon Sep 17 00:00:00 2001 From: Dmytro Kireiev Date: Fri, 15 Sep 2023 13:02:07 +0300 Subject: [PATCH 6/6] chore: bump moon version to v10.7.2 (#2368) --- docs/CHANGELOG.md | 9 +++++++++ docs/package.json | 6 +++--- next-docs/CHANGELOG.md | 11 +++++++++++ next-docs/package.json | 10 +++++----- pnpm-lock.yaml | 16 ++++++++-------- workspaces/base/CHANGELOG.md | 6 ++++++ workspaces/base/package.json | 2 +- workspaces/cmdk/CHANGELOG.md | 8 ++++++++ workspaces/cmdk/package.json | 4 ++-- workspaces/core/CHANGELOG.md | 6 ++++++ workspaces/core/package.json | 2 +- workspaces/tables/CHANGELOG.md | 8 ++++++++ workspaces/tables/package.json | 4 ++-- workspaces/themes/CHANGELOG.md | 6 ++++++ workspaces/themes/package.json | 2 +- workspaces/themes/src/bitcasinoNew.css | 2 +- 16 files changed, 78 insertions(+), 24 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f556e3b82c..d4a2a70056 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,14 @@ # docs +## 0.5.2 + +### Patch Changes + +- Deploy 10.7.2 +- Updated dependencies + - @heathmont/moon-core-tw@10.7.2 + - @heathmont/moon-base-tw@10.7.2 + ## 0.5.1 ### Patch Changes diff --git a/docs/package.json b/docs/package.json index beaf00aab4..0e50b9ac6f 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "0.5.1", + "version": "0.5.2", "private": true, "scripts": { "dev": "next dev", @@ -9,8 +9,8 @@ "lint": "next lint" }, "dependencies": { - "@heathmont/moon-base-tw": "workspace:^10.7.1", - "@heathmont/moon-core-tw": "workspace:^10.7.1", + "@heathmont/moon-base-tw": "workspace:^10.7.2", + "@heathmont/moon-core-tw": "workspace:^10.7.2", "@heathmont/moon-icons-tw": "9.28.4", "@types/node": "20.4.9", "@types/react": "18.2.19", diff --git a/next-docs/CHANGELOG.md b/next-docs/CHANGELOG.md index 145a97a5f1..4353131e2f 100644 --- a/next-docs/CHANGELOG.md +++ b/next-docs/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## 10.7.2 + +### Patch Changes + +- Deploy 10.7.2 +- Updated dependencies + - @heathmont/moon-themes-tw@10.7.2 + - @heathmont/moon-core-tw@10.7.2 + - @heathmont/moon-cmdk-tw@10.7.2 + - @heathmont/moon-table-tw@10.7.2 + ## 10.7.1 ### Patch Changes diff --git a/next-docs/package.json b/next-docs/package.json index 211f099885..c42f508e61 100644 --- a/next-docs/package.json +++ b/next-docs/package.json @@ -1,6 +1,6 @@ { "name": "next-docs", - "version": "10.7.1", + "version": "10.7.2", "private": true, "scripts": { "dev": "next dev", @@ -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.7.1", + "@heathmont/moon-cmdk-tw": "workspace:^10.7.2", "@heathmont/moon-core": "workspace:^10.7.1", - "@heathmont/moon-core-tw": "workspace:^10.7.1", + "@heathmont/moon-core-tw": "workspace:^10.7.2", "@heathmont/moon-datepicker": "workspace:^10.7.1", "@heathmont/moon-draggabletable": "workspace:^10.7.1", "@heathmont/moon-icons": "workspace:^10.7.1", @@ -30,9 +30,9 @@ "@heathmont/moon-select": "workspace:^10.7.1", "@heathmont/moon-sidebar": "workspace:^10.7.1", "@heathmont/moon-table": "workspace:^10.7.1", - "@heathmont/moon-table-tw": "workspace:^10.7.1", + "@heathmont/moon-table-tw": "workspace:^10.7.2", "@heathmont/moon-themes": "workspace:^10.7.1", - "@heathmont/moon-themes-tw": "workspace:^10.7.1", + "@heathmont/moon-themes-tw": "workspace:^10.7.2", "@heathmont/moon-utils": "workspace:^10.7.1", "@heathmont/moon-icons-tw": "9.28.5", "@hookform/resolvers": "3.2.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b4f17249aa..a73ba88661 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -163,10 +163,10 @@ importers: docs: dependencies: '@heathmont/moon-base-tw': - specifier: workspace:^10.7.1 + specifier: workspace:^10.7.2 version: link:../workspaces/base '@heathmont/moon-core-tw': - specifier: workspace:^10.7.1 + specifier: workspace:^10.7.2 version: link:../workspaces/core '@heathmont/moon-icons-tw': specifier: 9.28.4 @@ -223,7 +223,7 @@ importers: specifier: workspace:^10.7.1 version: link:../packages/charts '@heathmont/moon-cmdk-tw': - specifier: workspace:^10.7.1 + specifier: workspace:^10.7.2 version: link:../workspaces/cmdk '@heathmont/moon-components': specifier: workspace:^10.7.1 @@ -232,7 +232,7 @@ importers: specifier: workspace:^10.7.1 version: link:../packages/core '@heathmont/moon-core-tw': - specifier: workspace:^10.7.1 + specifier: workspace:^10.7.2 version: link:../workspaces/core '@heathmont/moon-datepicker': specifier: workspace:^10.7.1 @@ -262,13 +262,13 @@ importers: specifier: workspace:^10.7.1 version: link:../packages/table '@heathmont/moon-table-tw': - specifier: workspace:^10.7.1 + specifier: workspace:^10.7.2 version: link:../workspaces/tables '@heathmont/moon-themes': specifier: workspace:^10.7.1 version: link:../packages/themes '@heathmont/moon-themes-tw': - specifier: workspace:^10.7.1 + specifier: workspace:^10.7.2 version: link:../workspaces/themes '@heathmont/moon-utils': specifier: workspace:^10.7.1 @@ -990,7 +990,7 @@ importers: specifier: 1.7.16 version: 1.7.16(react-dom@18.2.0)(react@18.2.0) '@heathmont/moon-core-tw': - specifier: workspace:^10.7.1 + specifier: workspace:^10.7.2 version: link:../core cmdk: specifier: 0.2.0 @@ -1050,7 +1050,7 @@ importers: workspaces/tables: dependencies: '@heathmont/moon-core-tw': - specifier: workspace:^10.7.1 + specifier: workspace:^10.7.2 version: link:../core react: specifier: 18.2.0 diff --git a/workspaces/base/CHANGELOG.md b/workspaces/base/CHANGELOG.md index 937d79b757..9fc75014ad 100644 --- a/workspaces/base/CHANGELOG.md +++ b/workspaces/base/CHANGELOG.md @@ -1,5 +1,11 @@ # @heathmont/moon-base-tw +## 10.7.2 + +### Patch Changes + +- Deploy 10.7.2 + ## 10.7.1 ### Patch Changes diff --git a/workspaces/base/package.json b/workspaces/base/package.json index f6989dc334..0e2d77f4ba 100644 --- a/workspaces/base/package.json +++ b/workspaces/base/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-base-tw", "sideEffects": false, - "version": "10.7.1", + "version": "10.7.2", "files": [ "lib" ], diff --git a/workspaces/cmdk/CHANGELOG.md b/workspaces/cmdk/CHANGELOG.md index 8b73adbbe6..8c93c39d94 100644 --- a/workspaces/cmdk/CHANGELOG.md +++ b/workspaces/cmdk/CHANGELOG.md @@ -1,5 +1,13 @@ # @heathmont/moon-cmdk-tw +## 10.7.2 + +### Patch Changes + +- Deploy 10.7.2 +- Updated dependencies + - @heathmont/moon-core-tw@10.7.2 + ## 10.7.1 ### Patch Changes diff --git a/workspaces/cmdk/package.json b/workspaces/cmdk/package.json index 33db5bee7c..a6064f9886 100644 --- a/workspaces/cmdk/package.json +++ b/workspaces/cmdk/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-cmdk-tw", "sideEffects": false, - "version": "10.7.1", + "version": "10.7.2", "files": [ "lib" ], @@ -21,7 +21,7 @@ }, "dependencies": { "@headlessui/react": "1.7.16", - "@heathmont/moon-core-tw": "workspace:^10.7.1", + "@heathmont/moon-core-tw": "workspace:^10.7.2", "cmdk": "0.2.0", "tailwind-merge": "1.14.0", "tailwindcss-radix": "2.8.0" diff --git a/workspaces/core/CHANGELOG.md b/workspaces/core/CHANGELOG.md index 22858c1309..1985f16408 100644 --- a/workspaces/core/CHANGELOG.md +++ b/workspaces/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @heathmont/moon-core-tw +## 10.7.2 + +### Patch Changes + +- Deploy 10.7.2 + ## 10.7.1 ### Patch Changes diff --git a/workspaces/core/package.json b/workspaces/core/package.json index 3e5d3c36f7..1a8e8bc13b 100644 --- a/workspaces/core/package.json +++ b/workspaces/core/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-core-tw", "sideEffects": false, - "version": "10.7.1", + "version": "10.7.2", "files": [ "lib" ], diff --git a/workspaces/tables/CHANGELOG.md b/workspaces/tables/CHANGELOG.md index 11dda63813..0d9b972842 100644 --- a/workspaces/tables/CHANGELOG.md +++ b/workspaces/tables/CHANGELOG.md @@ -1,5 +1,13 @@ # @heathmont/moon-table-tw +## 10.7.2 + +### Patch Changes + +- Deploy 10.7.2 +- Updated dependencies + - @heathmont/moon-core-tw@10.7.2 + ## 10.7.1 ### Patch Changes diff --git a/workspaces/tables/package.json b/workspaces/tables/package.json index 307116aeaa..23ad01e895 100644 --- a/workspaces/tables/package.json +++ b/workspaces/tables/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-table-tw", "sideEffects": false, - "version": "10.7.1", + "version": "10.7.2", "files": [ "lib" ], @@ -20,7 +20,7 @@ "chokidar": "chokidar \"**/*.tsx\" \"**/*.ts\" -i \"lib/**/*.d.ts\" -c \"pnpm run build:code\" " }, "dependencies": { - "@heathmont/moon-core-tw": "workspace:^10.7.1", + "@heathmont/moon-core-tw": "workspace:^10.7.2", "react": "18.2.0", "react-dom": "18.2.0", "react-table": "7.8.0", diff --git a/workspaces/themes/CHANGELOG.md b/workspaces/themes/CHANGELOG.md index 602769d38f..7ccfb51ef9 100644 --- a/workspaces/themes/CHANGELOG.md +++ b/workspaces/themes/CHANGELOG.md @@ -1,5 +1,11 @@ # @heathmont/moon-themes-tw +## 10.7.2 + +### Patch Changes + +- Deploy 10.7.2 + ## 10.7.1 ### Patch Changes diff --git a/workspaces/themes/package.json b/workspaces/themes/package.json index 702698a828..d20c6b7c2d 100644 --- a/workspaces/themes/package.json +++ b/workspaces/themes/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-themes-tw", "sideEffects": false, - "version": "10.7.1", + "version": "10.7.2", "files": [ "lib" ], diff --git a/workspaces/themes/src/bitcasinoNew.css b/workspaces/themes/src/bitcasinoNew.css index 408f32653f..636b6ac90a 100644 --- a/workspaces/themes/src/bitcasinoNew.css +++ b/workspaces/themes/src/bitcasinoNew.css @@ -3,7 +3,7 @@ --piccolo: 214 55 65; /* #D63741 */ --hit: 255 255 255; /* #FFFFFF */ --beerus: 224 224 224; /* #E0E0E0 */ - --gohan: 242, 242, 242; /* #F2F2F2 */ + --gohan: 242 242 242; /* #F2F2F2 */ --goten: 255 255 255; /* #FFFFFF */ --goku: 255 255 255; /* #FFFFFF */ --bulma: 27 20 20; /* #1B1414 */