Skip to content

Commit

Permalink
Update to beta-2
Browse files Browse the repository at this point in the history
  • Loading branch information
bkspace committed Oct 4, 2023
1 parent c098595 commit d9ce54e
Show file tree
Hide file tree
Showing 18 changed files with 1,444 additions and 1,652 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"@shopify/loom-plugin-eslint": "^2.0.0",
"@shopify/loom-plugin-prettier": "^2.0.0",
"@shopify/loom-plugin-stylelint": "^2.0.0",
"@shopify/polaris": "^12.0.0-beta.1",
"@shopify/polaris": "^12.0.0-beta.2",
"@shopify/postcss-plugin": "^5.0.1",
"@shopify/prettier-config": "^1.1.2",
"@shopify/react-testing": "^5.1.3",
Expand Down
4 changes: 2 additions & 2 deletions src/components/ActiveDatesCard/ActiveDatesCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ export function ActiveDatesCard({
);

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<FormLayout>
<Text variant="headingMd" as="h2">
{i18n.translate('DiscountAppComponents.ActiveDatesCard.title')}
Expand Down
4 changes: 2 additions & 2 deletions src/components/AppliesTo/AppliesTo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ export function AppliesTo({
return (
<>
{productSelector || collectionSelector ? (
<Box paddingBlockEnd="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate('DiscountAppComponents.AppliesToCard.title')}
</Text>
Expand Down
6 changes: 3 additions & 3 deletions src/components/CombinationCard/CombinationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ export function CombinationCard({
selectedChoices.includes(DiscountClass.Order));

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate('title', I18N_SCOPE)}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export function CountriesAndRatesCard({
const localizeCountry = useLocalizeCountry();

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate(
'DiscountAppComponents.CountriesAndRatesCard.title',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ export function CustomerEligibilityCard({
const [i18n] = useI18n();

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate('title', I18N_SCOPE)}
</Text>
Expand Down Expand Up @@ -82,7 +82,7 @@ export function CustomerEligibilityCard({
/>

{eligibility.value === Eligibility.CustomerSegments && (
<BlockStack gap="4">
<BlockStack gap="400">
{customerSegmentSelector}

<SelectedCustomerSegmentsList
Expand All @@ -92,7 +92,7 @@ export function CustomerEligibilityCard({
)}

{eligibility.value === Eligibility.Customers && (
<BlockStack gap="4">
<BlockStack gap="400">
{customerSelector}
<SelectedCustomersList selectedCustomers={selectedCustomers} />
</BlockStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ export function DiscountApplicationStrategyCard({
strategy.onChange(strategies[0]);

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate('title', I18N_SCOPE)}
</Text>
Expand Down
10 changes: 5 additions & 5 deletions src/components/MethodCard/MethodCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ export function MethodCard({
};

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<InlineStack align="start" blockAlign="center" gap="1">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<InlineStack align="start" blockAlign="center" gap="100">
<Text variant="headingMd" as="h2">
{title}
</Text>
Expand All @@ -93,7 +93,7 @@ export function MethodCard({
)}
</Text>
)}
<BlockStack gap="4">
<BlockStack gap="400">
{!discountMethodHidden && (
<ChoiceList
title={i18n.translate(
Expand Down
4 changes: 2 additions & 2 deletions src/components/MethodCard/tests/MethodCard.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ describe('<MethodCard />', () => {
const methodCard = mountWithApp(<MethodCard {...mockProps} />);

expect(methodCard).toContainReactComponent(Card, {
padding: '4',
padding: '400',
});
expect(methodCard).toContainReactComponent(InlineStack, {
align: 'start',
blockAlign: 'center',
gap: '1',
gap: '100',
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export function MinimumRequirementsCard({
renderChildren: (isSelected: boolean) => {
return (
isSelected && (
<BlockStack gap="4">
<BlockStack gap="400">
<div className={styles.TextField}>
<CurrencyField
id={SUBTOTAL_FIELD_ID}
Expand Down Expand Up @@ -153,7 +153,7 @@ export function MinimumRequirementsCard({
renderChildren: (isSelected: boolean) => {
return (
isSelected && (
<BlockStack gap="4">
<BlockStack gap="400">
<div className={styles.TextField}>
<TextField
id={QUANTITY_FIELD_ID}
Expand Down Expand Up @@ -191,9 +191,9 @@ export function MinimumRequirementsCard({
: allMinimumRequirementChoices;

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate(
'DiscountAppComponents.MinimumRequirementsCard.title',
Expand Down
6 changes: 3 additions & 3 deletions src/components/PurchaseTypeCard/PurchaseTypeCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export interface PurchaseTypeCardProps {
export function PurchaseTypeCard({purchaseType}: PurchaseTypeCardProps) {
const [i18n] = useI18n();
return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate('DiscountAppComponents.PurchaseTypeList.title')}
</Text>
Expand Down
12 changes: 6 additions & 6 deletions src/components/SummaryCard/SummaryCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,19 @@ export function SummaryCard(props: SummaryCardProps) {
);

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate('title', I18N_SCOPE)}
</Text>

<BlockStack gap="2">
<BlockStack gap="200">
<Header {...props.header} />

{showDetailsSection && (
<BlockStack gap="2">
<Text variant="headingXs" as="h3">
<BlockStack gap="200">
<Text variant="headingSm" as="h3">
{i18n.translate('details', I18N_SCOPE)}
</Text>

Expand Down
6 changes: 3 additions & 3 deletions src/components/SummaryCard/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export function Header(props: HeaderProps) {
const trimmedDescriptor = discountDescriptor.trim();

return (
<BlockStack gap="4">
<BlockStack gap="400">
{trimmedDescriptor ? (
<InlineStack align="space-between">
<Text variant="headingMd" as="h3">
Expand All @@ -71,8 +71,8 @@ export function Header(props: HeaderProps) {
</Text>
)}

<BlockStack gap="2">
<Text variant="headingXs" as="h3">
<BlockStack gap="200">
<Text variant="headingSm" as="h3">
{i18n.translate('typeAndMethod', I18N_SCOPE)}
</Text>
<List type="bullet">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export function Performance({
status === DiscountStatus.Active || status === DiscountStatus.Expired;

return (
<BlockStack gap="2">
<Text variant="headingXs" as="h3">
<BlockStack gap="200">
<Text variant="headingSm" as="h3">
{i18n.translate('title', I18N_SCOPE)}
</Text>
{status === DiscountStatus.Scheduled && (
Expand Down
8 changes: 4 additions & 4 deletions src/components/UsageLimitsCard/UsageLimitsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ export function UsageLimitsCard(props: UsageLimitsCardProps) {
};

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="4">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="400">
<Text variant="headingMd" as="h2">
{i18n.translate('DiscountAppComponents.UsageLimitsCard.title')}
</Text>
Expand Down Expand Up @@ -169,7 +169,7 @@ export function UsageLimitsCard(props: UsageLimitsCardProps) {
/>
</BlockStack>
{isShowRecurringPaymentSection(props) && (
<BlockStack gap="4">
<BlockStack gap="400">
<RecurringPayment
recurringPaymentType={props.recurringPaymentType}
recurringPaymentLimit={props.recurringPaymentLimit}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export function RecurringPayment({
renderChildren: (isSelected: boolean) => {
return (
isSelected && (
<BlockStack gap="4">
<BlockStack gap="400">
<div className={styles.RecurringPaymentTextField}>
<TextField
id={RECURRING_PAYMENT_FIELD_ID}
Expand Down Expand Up @@ -92,8 +92,8 @@ export function RecurringPayment({
];

return (
<BlockStack gap="4">
<Text variant="headingXs" as="h3">
<BlockStack gap="400">
<Text variant="headingSm" as="h3">
{i18n.translate('DiscountAppComponents.RecurringPayment.title')}
</Text>
<ChoiceList
Expand Down
8 changes: 4 additions & 4 deletions src/components/ValueCard/ValueCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,13 @@ export function ValueCard({
);

return (
<Box paddingBlockEnd="4">
<Card padding="4">
<BlockStack gap="2">
<Box paddingBlockEnd="400">
<Card padding="400">
<BlockStack gap="200">
<Text variant="headingMd" as="h2">
{i18n.translate('DiscountAppComponents.ValueCard.title')}{' '}
</Text>
<InlineStack gap="3" align="start">
<InlineStack gap="300" align="start">
<ButtonGroup variant="segmented">
<Button
size="large"
Expand Down
Loading

0 comments on commit d9ce54e

Please sign in to comment.