Kasper 1 年間 前
コミット
b3b6d8fe60

+ 4 - 5
package.json

@@ -25,13 +25,12 @@
     "dev": "cross-env npm run build:server && medusa develop"
   },
   "dependencies": {
-    "@medusajs/admin": "^7.1.1",
+    "@medusajs/admin": "^7.1.4",
     "@medusajs/cache-inmemory": "^1.8.8",
     "@medusajs/cache-redis": "^1.8.8",
     "@medusajs/event-bus-local": "^1.9.6",
     "@medusajs/event-bus-redis": "^1.8.9",
     "@medusajs/file-local": "^1.0.2",
-    "@medusajs/icons": "^1.0.0",
     "@medusajs/medusa": "1.17.2-snapshot-20231013131050",
     "@tanstack/react-query": "4.22.0",
     "babel-preset-medusa-package": "^1.1.13",
@@ -42,7 +41,7 @@
     "medusa-fulfillment-manual": "^1.1.38",
     "medusa-interfaces": "^1.3.7",
     "medusa-payment-manual": "^1.0.24",
-    "medusa-payment-stripe": "^6.0.4",
+    "medusa-payment-stripe": "^6.0.5",
     "prism-react-renderer": "^2.0.4",
     "typeorm": "^0.3.16"
   },
@@ -50,11 +49,11 @@
     "@babel/cli": "^7.14.3",
     "@babel/core": "^7.14.3",
     "@babel/preset-typescript": "^7.21.4",
-    "@medusajs/medusa-cli": "^1.3.16",
+    "@medusajs/medusa-cli": "^1.3.21",
     "@types/express": "^4.17.13",
     "@types/jest": "^27.4.0",
     "@types/node": "^17.0.8",
-    "babel-preset-medusa-package": "^1.1.13",
+    "babel-preset-medusa-package": "^1.1.19",
     "cross-env": "^7.0.3",
     "eslint": "^6.8.0",
     "jest": "^27.3.1",

+ 41 - 25
src/admin/components/onboarding-flow/default/orders/order-detail.tsx

@@ -1,6 +1,10 @@
 import React from "react";
-import { ComputerDesktopSolid, CurrencyDollarSolid, ToolsSolid } from "@medusajs/icons";
-import { Badge, Heading, Text } from "@medusajs/ui";
+import {
+  ComputerDesktopSolid,
+  CurrencyDollarSolid,
+  ToolsSolid,
+} from "@medusajs/icons";
+import { IconBadge, Heading, Text } from "@medusajs/ui";
 
 const OrderDetailDefault = () => {
   return (
@@ -10,7 +14,10 @@ const OrderDetailDefault = () => {
         to play around with the order management functionalities, such as
         capturing payment, creating fulfillments, and more.
       </Text>
-      <Heading level="h2" className="text-ui-fg-base pt-6 border-t border-ui-border-base border-solid mb-2">
+      <Heading
+        level="h2"
+        className="text-ui-fg-base pt-6 border-t border-ui-border-base border-solid mb-2"
+      >
         Start developing with Medusa
       </Heading>
       <Text size="small">
@@ -23,22 +30,25 @@ const OrderDetailDefault = () => {
           target="_blank"
           className="flex"
         >
-          <div
-            className="p-3 rounded-rounded flex items-start bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover"
-          >
+          <div className="p-3 rounded-rounded flex items-start bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover">
             <div className="mr-4">
               <div className="bg-ui-bg-base rounded-lg border border-ui-border-strong p-1 flex justify-center items-center">
-                <Badge type="icon">
+                <IconBadge>
                   <CurrencyDollarSolid />
-                </Badge>
+                </IconBadge>
               </div>
             </div>
             <div>
-              <Text size="xsmall" weight="plus" className="mb-1 text-ui-fg-base">
+              <Text
+                size="xsmall"
+                weight="plus"
+                className="mb-1 text-ui-fg-base"
+              >
                 Start Selling in 3 Steps
               </Text>
               <Text size="small">
-                Go live with a backend, an admin, and a storefront by following these three steps.
+                Go live with a backend, an admin, and a storefront by following
+                these three steps.
               </Text>
             </div>
           </div>
@@ -48,22 +58,25 @@ const OrderDetailDefault = () => {
           target="_blank"
           className="flex"
         >
-          <div
-            className="p-3 rounded-rounded items-start flex bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover"
-          >
+          <div className="p-3 rounded-rounded items-start flex bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover">
             <div className="mr-4">
               <div className="bg-ui-bg-base rounded-lg border border-ui-border-strong p-1 flex justify-center items-center">
-                <Badge type="icon">
+                <IconBadge>
                   <ComputerDesktopSolid />
-                </Badge>
+                </IconBadge>
               </div>
             </div>
             <div>
-              <Text size="xsmall" weight="plus" className="mb-1 text-ui-fg-base">
+              <Text
+                size="xsmall"
+                weight="plus"
+                className="mb-1 text-ui-fg-base"
+              >
                 Build Custom Use Cases
               </Text>
               <Text size="small">
-                Learn how to build a marketplace, subscription-based purchases, or your custom use-case.
+                Learn how to build a marketplace, subscription-based purchases,
+                or your custom use-case.
               </Text>
             </div>
           </div>
@@ -73,22 +86,25 @@ const OrderDetailDefault = () => {
           target="_blank"
           className="flex"
         >
-          <div
-            className="p-3 rounded-rounded items-start flex bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover"
-          >
+          <div className="p-3 rounded-rounded items-start flex bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover">
             <div className="mr-4">
               <div className="bg-ui-bg-base rounded-lg border border-ui-border-strong p-1 flex justify-center items-center">
-                <Badge type="icon">
+                <IconBadge>
                   <ToolsSolid />
-                </Badge>
+                </IconBadge>
               </div>
             </div>
             <div>
-              <Text size="xsmall" weight="plus" className="mb-1 text-ui-fg-base">
+              <Text
+                size="xsmall"
+                weight="plus"
+                className="mb-1 text-ui-fg-base"
+              >
                 Check out beta features
               </Text>
               <Text size="small">
-                Learn about hidden beta features and how to enable them in your store.
+                Learn about hidden beta features and how to enable them in your
+                store.
               </Text>
             </div>
           </div>
@@ -104,7 +120,7 @@ const OrderDetailDefault = () => {
           our documentation
         </a>
         . If you like Medusa, please{" "}
-        <a 
+        <a
           href="https://github.com/medusajs/medusa"
           target="_blank"
           className="text-ui-fg-interactive hover:text-ui-fg-interactive-hover"

+ 48 - 31
src/admin/components/onboarding-flow/nextjs/orders/order-detail.tsx

@@ -1,22 +1,30 @@
 import React from "react";
 import { CurrencyDollarSolid, NextJs, SquaresPlusSolid } from "@medusajs/icons";
-import { Badge, Heading, Text } from "@medusajs/ui";
+import { IconBadge, Heading, Text } from "@medusajs/ui";
 
 const OrderDetailNextjs = () => {
-  const queryParams = `?ref=onboarding&type=${process.env.MEDUSA_ADMIN_ONBOARDING_TYPE || "nextjs"}`
+  const queryParams = `?ref=onboarding&type=${
+    process.env.MEDUSA_ADMIN_ONBOARDING_TYPE || "nextjs"
+  }`;
   return (
     <>
       <Text size="small" className="mb-6">
-      You finished the setup guide 🎉. You have now a complete ecommerce store with a backend, admin, and a Next.js storefront. Feel free to 
-      play around with each of these components to experience all commerce features that Medusa provides.
+        You finished the setup guide 🎉. You have now a complete ecommerce store
+        with a backend, admin, and a Next.js storefront. Feel free to play
+        around with each of these components to experience all commerce features
+        that Medusa provides.
       </Text>
-      <Heading level="h2" className="text-ui-fg-base pt-6 border-t border-ui-border-base border-solid mb-2">
+      <Heading
+        level="h2"
+        className="text-ui-fg-base pt-6 border-t border-ui-border-base border-solid mb-2"
+      >
         Continue Building your Ecommerce Store
       </Heading>
       <Text size="small">
-        Your ecommerce store provides all basic ecommerce features you need to start selling. 
-        You can add more functionalities, add plugins for third-party integrations, and customize the 
-        storefront’s look and feel to support your use case.
+        Your ecommerce store provides all basic ecommerce features you need to
+        start selling. You can add more functionalities, add plugins for
+        third-party integrations, and customize the storefront’s look and feel
+        to support your use case.
       </Text>
       <div className="grid grid-cols-3 gap-4 mt-6 pb-6 mb-6 border-b border-ui-border-base border-solid auto-rows-fr">
         <a
@@ -24,22 +32,25 @@ const OrderDetailNextjs = () => {
           target="_blank"
           className="flex"
         >
-          <div
-            className="p-3 rounded-rounded flex items-start bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover"
-          >
+          <div className="p-3 rounded-rounded flex items-start bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover">
             <div className="mr-4">
               <div className="bg-ui-bg-base rounded-lg border border-ui-border-strong p-1 flex justify-center items-center">
-                <Badge type="icon">
+                <IconBadge>
                   <SquaresPlusSolid />
-                </Badge>
+                </IconBadge>
               </div>
             </div>
             <div>
-              <Text size="xsmall" weight="plus" className="mb-1 text-ui-fg-base">
+              <Text
+                size="xsmall"
+                weight="plus"
+                className="mb-1 text-ui-fg-base"
+              >
                 Install Plugins
               </Text>
               <Text size="small">
-                Install plugins for payment, fulfillment, search, and more, and integrate them in your storefront.
+                Install plugins for payment, fulfillment, search, and more, and
+                integrate them in your storefront.
               </Text>
             </div>
           </div>
@@ -49,22 +60,25 @@ const OrderDetailNextjs = () => {
           target="_blank"
           className="flex"
         >
-          <div
-            className="p-3 rounded-rounded items-start flex bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover"
-          >
+          <div className="p-3 rounded-rounded items-start flex bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover">
             <div className="mr-4">
               <div className="bg-ui-bg-base rounded-lg border border-ui-border-strong p-1 flex justify-center items-center">
-                <Badge type="icon">
+                <IconBadge>
                   <CurrencyDollarSolid />
-                </Badge>
+                </IconBadge>
               </div>
             </div>
             <div>
-              <Text size="xsmall" weight="plus" className="mb-1 text-ui-fg-base">
+              <Text
+                size="xsmall"
+                weight="plus"
+                className="mb-1 text-ui-fg-base"
+              >
                 Add Commerce Features
               </Text>
               <Text size="small">
-                Learn about all available commerce features in Medusa and how to add them in your storefront
+                Learn about all available commerce features in Medusa and how to
+                add them in your storefront
               </Text>
             </div>
           </div>
@@ -74,22 +88,25 @@ const OrderDetailNextjs = () => {
           target="_blank"
           className="flex"
         >
-          <div
-            className="p-3 rounded-rounded items-start flex bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover"
-          >
+          <div className="p-3 rounded-rounded items-start flex bg-ui-bg-subtle shadow-elevation-card-rest hover:shadow-elevation-card-hover">
             <div className="mr-4">
               <div className="bg-ui-bg-base rounded-lg border border-ui-border-strong p-1 flex justify-center items-center">
-                <Badge type="icon">
+                <IconBadge>
                   <NextJs />
-                </Badge>
+                </IconBadge>
               </div>
             </div>
             <div>
-              <Text size="xsmall" weight="plus" className="mb-1 text-ui-fg-base">
+              <Text
+                size="xsmall"
+                weight="plus"
+                className="mb-1 text-ui-fg-base"
+              >
                 Build with the Next.js Storefront
               </Text>
               <Text size="small">
-                Learn about the Next.js starter storefront’s features and how to customize it.
+                Learn about the Next.js starter storefront’s features and how to
+                customize it.
               </Text>
             </div>
           </div>
@@ -105,7 +122,7 @@ const OrderDetailNextjs = () => {
           our documentation
         </a>
         . If you like Medusa, please{" "}
-        <a 
+        <a
           href="https://github.com/medusajs/medusa"
           target="_blank"
           className="text-ui-fg-interactive hover:text-ui-fg-interactive-hover"
@@ -118,4 +135,4 @@ const OrderDetailNextjs = () => {
   );
 };
 
-export default OrderDetailNextjs
+export default OrderDetailNextjs;

+ 9 - 7
src/admin/components/shared/accordion.tsx

@@ -1,6 +1,6 @@
 import * as AccordionPrimitive from "@radix-ui/react-accordion";
 import React from "react";
-import { CheckCircleSolid, CircleDottedLine, CircleMiniSolid } from "@medusajs/icons";
+import { CheckCircleSolid, CircleMiniSolid } from "@medusajs/icons";
 import { Heading, Text, clx } from "@medusajs/ui";
 import ActiveCircleDottedLine from "./icons/active-circle-dotted-line";
 
@@ -47,7 +47,6 @@ const Item: React.FC<AccordionItemProps> = ({
   triggerable,
   ...props
 }) => {
-
   return (
     <AccordionPrimitive.Item
       {...props}
@@ -67,15 +66,18 @@ const Item: React.FC<AccordionItemProps> = ({
                 ) : (
                   <>
                     {active && (
-                      <ActiveCircleDottedLine size={20} className="text-ui-fg-interactive rounded-full" />
+                      <ActiveCircleDottedLine
+                        size={20}
+                        className="text-ui-fg-interactive rounded-full"
+                      />
+                    )}
+                    {!active && (
+                      <CircleMiniSolid className="text-ui-fg-muted" />
                     )}
-                    {!active && <CircleMiniSolid className="text-ui-fg-muted" />}
                   </>
                 )}
               </div>
-              <Heading level="h3" className={clx(
-                "text-ui-fg-base"
-              )}>
+              <Heading level="h3" className={clx("text-ui-fg-base")}>
                 {title}
               </Heading>
             </div>

+ 12 - 13
yarn.lock

@@ -3129,7 +3129,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@medusajs/admin@npm:^7.1.1":
+"@medusajs/admin@npm:^7.1.4":
   version: 7.1.4
   resolution: "@medusajs/admin@npm:7.1.4"
   dependencies:
@@ -3211,7 +3211,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@medusajs/icons@npm:*, @medusajs/icons@npm:1.1.0, @medusajs/icons@npm:^1.0.0":
+"@medusajs/icons@npm:*, @medusajs/icons@npm:1.1.0":
   version: 1.1.0
   resolution: "@medusajs/icons@npm:1.1.0"
   peerDependencies:
@@ -3234,7 +3234,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"@medusajs/medusa-cli@npm:^1.3.16, @medusajs/medusa-cli@npm:^1.3.21":
+"@medusajs/medusa-cli@npm:^1.3.21":
   version: 1.3.21
   resolution: "@medusajs/medusa-cli@npm:1.3.21"
   dependencies:
@@ -8157,9 +8157,9 @@ __metadata:
   languageName: node
   linkType: hard
 
-"babel-preset-medusa-package@npm:^1.1.13":
-  version: 1.1.19
-  resolution: "babel-preset-medusa-package@npm:1.1.19"
+"babel-preset-medusa-package@npm:^1.1.19":
+  version: 1.1.20
+  resolution: "babel-preset-medusa-package@npm:1.1.20"
   dependencies:
     "@babel/plugin-proposal-class-properties": ^7.12.1
     "@babel/plugin-proposal-decorators": ^7.12.1
@@ -8173,7 +8173,7 @@ __metadata:
     core-js: ^3.7.0
   peerDependencies:
     "@babel/core": ^7.11.6
-  checksum: cafd7c73ae73f89ad44f4835cac1f654345bcb47427fed1d28edf6855da87c727c5319d0e2c0ac5fdc91dd8b4fa94692c8537ab41fec393790e83481102d9482
+  checksum: 4668aac61cfe93b2e669315ce10bd6eef63d8692b5adf7c778688195a45d0dd16c33cf60b0ad5d616652d78e5641ad4d0865f347d31d553725181b6b2eab4ab5
   languageName: node
   linkType: hard
 
@@ -13435,7 +13435,7 @@ __metadata:
   languageName: node
   linkType: hard
 
-"medusa-payment-stripe@npm:^6.0.4":
+"medusa-payment-stripe@npm:^6.0.5":
   version: 6.0.5
   resolution: "medusa-payment-stripe@npm:6.0.5"
   dependencies:
@@ -13474,20 +13474,19 @@ __metadata:
     "@babel/cli": ^7.14.3
     "@babel/core": ^7.14.3
     "@babel/preset-typescript": ^7.21.4
-    "@medusajs/admin": ^7.1.1
+    "@medusajs/admin": ^7.1.4
     "@medusajs/cache-inmemory": ^1.8.8
     "@medusajs/cache-redis": ^1.8.8
     "@medusajs/event-bus-local": ^1.9.6
     "@medusajs/event-bus-redis": ^1.8.9
     "@medusajs/file-local": ^1.0.2
-    "@medusajs/icons": ^1.0.0
     "@medusajs/medusa": 1.17.2-snapshot-20231013131050
-    "@medusajs/medusa-cli": ^1.3.16
+    "@medusajs/medusa-cli": ^1.3.21
     "@tanstack/react-query": 4.22.0
     "@types/express": ^4.17.13
     "@types/jest": ^27.4.0
     "@types/node": ^17.0.8
-    babel-preset-medusa-package: ^1.1.13
+    babel-preset-medusa-package: ^1.1.19
     body-parser: ^1.19.0
     cors: ^2.8.5
     cross-env: ^7.0.3
@@ -13498,7 +13497,7 @@ __metadata:
     medusa-fulfillment-manual: ^1.1.38
     medusa-interfaces: ^1.3.7
     medusa-payment-manual: ^1.0.24
-    medusa-payment-stripe: ^6.0.4
+    medusa-payment-stripe: ^6.0.5
     prism-react-renderer: ^2.0.4
     rimraf: ^3.0.2
     ts-jest: ^27.0.7