diff --git a/www/apps/api-reference/package.json b/www/apps/api-reference/package.json index f571b617f8..fba3f925fc 100644 --- a/www/apps/api-reference/package.json +++ b/www/apps/api-reference/package.json @@ -15,8 +15,8 @@ "dependencies": { "@mdx-js/loader": "^3.1.0", "@mdx-js/react": "^3.1.0", - "@medusajs/icons": "~2.0.0", - "@medusajs/ui": "~3.0.0", + "@medusajs/icons": "~2.4.0", + "@medusajs/ui": "~4.0.4", "@next/mdx": "15.0.4", "@react-hook/resize-observer": "^2.0.2", "@readme/openapi-parser": "^2.5.0", diff --git a/www/apps/book/app/learn/customization/customize-admin/route/page.mdx b/www/apps/book/app/learn/customization/customize-admin/route/page.mdx index 2ef94df023..221eb3636c 100644 --- a/www/apps/book/app/learn/customization/customize-admin/route/page.mdx +++ b/www/apps/book/app/learn/customization/customize-admin/route/page.mdx @@ -204,7 +204,9 @@ export const uiRouteHighlights = [ ```tsx title="src/admin/routes/brands/page.tsx" highlights={uiRouteHighlights} import { defineRouteConfig } from "@medusajs/admin-sdk" import { TagSolid } from "@medusajs/icons" -import { Container, Heading } from "@medusajs/ui" +import { + Container, +} from "@medusajs/ui" import { useQuery } from "@tanstack/react-query" import { sdk } from "../../lib/sdk" import { useMemo, useState } from "react" @@ -214,11 +216,6 @@ const BrandsPage = () => { return ( -
-
- Brands -
-
{/* TODO show brands */}
) @@ -234,123 +231,7 @@ export default BrandsPage A route's file must export the React component that will be rendered in the new page. It must be the default export of the file. You can also export configurations that add a link in the sidebar for the UI route. You create these configurations using `defineRouteConfig` from the Admin Extension SDK. -So far, you only show a "Brands" header. In admin customizations, use components from the [Medusa UI package](!ui!) to maintain a consistent user interface and design in the dashboard. - -### Add Table Component - -To show the brands with pagination functionalities, you'll create a new `Table` component that uses the UI package's [Table](!ui!/components/table) component with some alterations to match the design of the Medusa Admin. This new component is taken from the [Admin Components guide](!resources!/admin-components/components/table). - -Create the `Table` component in the file `src/admin/components/table.tsx`: - -![Directory structure of the Medusa application after adding the table component.](https://res.cloudinary.com/dza7lstvk/image/upload/v1733472527/Medusa%20Book/brands-admin-dir-overview-4_avosrf.jpg) - -```tsx title="src/admin/components/table.tsx" -import { useMemo } from "react" -import { Table as UiTable } from "@medusajs/ui" - -export type TableProps = { - columns: { - key: string - label?: string - render?: (value: unknown) => React.ReactNode - }[] - data: Record[] - pageSize: number - count: number - currentPage: number - setCurrentPage: (value: number) => void -} - -export const Table = ({ - columns, - data, - pageSize, - count, - currentPage, - setCurrentPage, -}: TableProps) => { - const pageCount = useMemo(() => { - return Math.ceil(count / pageSize) - }, [count, pageSize]) - - const canNextPage = useMemo(() => { - return currentPage < pageCount - 1 - }, [currentPage, pageCount]) - const canPreviousPage = useMemo(() => { - return currentPage - 1 >= 0 - }, [currentPage]) - - const nextPage = () => { - if (canNextPage) { - setCurrentPage(currentPage + 1) - } - } - - const previousPage = () => { - if (canPreviousPage) { - setCurrentPage(currentPage - 1) - } - } - - return ( -
- - - - {columns.map((column, index) => ( - - {column.label || column.key} - - ))} - - - - {data.map((item, index) => { - const rowIndex = "id" in item ? item.id as string : index - return ( - - {columns.map((column, index) => ( - - <> - {column.render && column.render(item[column.key])} - {!column.render && ( - <>{item[column.key] as string} - )} - - - ))} - - ) - })} - - - -
- ) -} -``` - -This component accepts the following props: - -- `columns`: An array of the table's columns. -- `data`: The rows in the table. -- `pageSize`: The maximum number of items shown in a page. -- `count`: The total number of items. -- `currentPage`: A zero-based index of the current page. -- `setCurrentPage`: A function to change the current page. - -In the component, you use the UI package's [Table](!ui!/components/table) component to display the data received as a prop in a table that supports pagination. - -You can learn more about this component's implementation and how it works in the [Admin Components guide](!resources!/admin-components), which provides more examples of how to build common components in the Medusa Admin dashboard. +So far, you only show a container. In admin customizations, use components from the [Medusa UI package](!ui!) to maintain a consistent user interface and design in the dashboard. ### Retrieve Brands From API Route @@ -359,39 +240,81 @@ You'll now update the UI route to retrieve the brands from the API route you add First, add the following type in `src/admin/routes/brands/page.tsx`: ```tsx title="src/admin/routes/brands/page.tsx" +type Brand = { + id: string + name: string +} type BrandsResponse = { - brands: { - id: string - name: string - }[] + brands: Brand[] count: number limit: number offset: number } ``` -This is the type of expected response from the `GET /admin/brands` API route. +You define the type for a brand, and the type of expected response from the `GET /admin/brands` API route. + +To display the brands, you'll use Medusa UI's [DataTable](!ui!/components/data-table) component. So, add the following imports in `src/admin/routes/brands/page.tsx`: + +```tsx title="src/admin/routes/brands/page.tsx" +import { + // ... + Heading, + createDataTableColumnHelper, + DataTable, + DataTablePaginationState, + useDataTable, +} from "@medusajs/ui" +``` + +You import the `DataTable` component and the following utilities: + +- `createDataTableColumnHelper`: A utility to create columns for the data table. +- `DataTablePaginationState`: A type that holds the pagination state of the data table. +- `useDataTable`: A hook to initialize and configure the data table. + +You also import the `Heading` component to show a heading above the data table. + +Next, you'll define the table's columns. Add the following before the `BrandsPage` component: + +```tsx title="src/admin/routes/brands/page.tsx" +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("id", { + header: "ID", + }), + columnHelper.accessor("name", { + header: "Name", + }) +] +``` + +You use the `createDataTableColumnHelper` utility to create columns for the data table. You define two columns for the ID and name of the brands. Then, replace the `// TODO retrieve brands` in the component with the following: export const queryHighlights = [ - ["1", "currentPage", "A zero-based index of the current page of items."], - ["2", "limit", "The maximum number of items per page."], - ["3", "offset", "The number of items to skip before retrieving the page's items."], - ["7", "useQuery", "Retrieve brands using Tanstack Query"], - ["8", "fetch", "Send a request to a custom API route."], - ["8", "`/admin/brands`", "The API route's path."], - ["9", "query", "Query parameters to pass in the request"] + ["1", "limit", "The maximum number of items per page."], + ["2", "pagination", "Define a pagination state to be passed to the data table."], + ["6", "offset", "The number of items to skip before retrieving the page's items."], + ["10", "useQuery", "Retrieve brands using Tanstack Query"], + ["11", "fetch", "Send a request to a custom API route."], + ["11", "`/admin/brands`", "The API route's path."], + ["12", "query", "Query parameters to pass in the request"] ] ```tsx title="src/admin/routes/brands/page.tsx" highlights={queryHighlights} -const [currentPage, setCurrentPage] = useState(0) const limit = 15 +const [pagination, setPagination] = useState({ + pageSize: limit, + pageIndex: 0, +}) const offset = useMemo(() => { - return currentPage * limit -}, [currentPage]) + return pagination.pageIndex * limit +}, [pagination]) -const { data } = useQuery({ +const { data, isLoading } = useQuery({ queryFn: () => sdk.client.fetch(`/admin/brands`, { query: { limit, @@ -400,13 +323,16 @@ const { data } = useQuery({ }), queryKey: [["brands", limit, offset]], }) + +// TODO configure data table ``` -You first define pagination-related variables: +To enable pagination in the `DataTable` component, you need to define a state variable of type `DataTablePaginationState`. It's an object having the following properties: -- `currentPage`: A zero-based index of the current page of items. -- `limit`: The maximum number of items per page. -- `offset`: The number of items to skip before retrieving the page's items. This is calculated from the `currentPage` and `limit` variables. +- `pageSize`: The maximum number of items per page. You set it to `15`. +- `pageIndex`: A zero-based index of the current page of items. + +You also define a memoized `offset` value that indicates the number of items to skip before retrieving the current page's items. Then, you use `useQuery` from [Tanstack (React) Query](https://tanstack.com/query/latest) to query the Medusa server. Tanstack Query provides features like asynchronous state management and optimized caching. @@ -422,35 +348,46 @@ This sends a request to the [Get Brands API route](#1-get-brands-api-route), pas ### Display Brands Table -Finally, you'll display the brands in a table using the component you created earlier. Import the component at the top of `src/admin/routes/brands/page.tsx`: +Finally, you'll display the brands in a data table. Replace the `// TODO configure data table` in the component with the following: ```tsx title="src/admin/routes/brands/page.tsx" -import { Table } from "../../components/table" +const table = useDataTable({ + columns, + data: data?.brands || [], + getRowId: (row) => row.id, + rowCount: data?.count || 0, + isLoading, + pagination: { + state: pagination, + onPaginationChange: setPagination, + }, +}) ``` +You use the `useDataTable` hook to initialize and configure the data table. It accepts an object with the following properties: + +- `columns`: The columns of the data table. You created them using the `createDataTableColumnHelper` utility. +- `data`: The brands to display in the table. +- `getRowId`: A function that returns a unique identifier for a row. +- `rowCount`: The total count of items. This is used to determine the number of pages. +- `isLoading`: A boolean indicating whether the data is loading. +- `pagination`: An object to configure pagination. It accepts the following properties: + - `state`: The pagination state of the data table. + - `onPaginationChange`: A function to update the pagination state. + Then, replace the `{/* TODO show brands */}` in the return statement with the following: ```tsx title="src/admin/routes/brands/page.tsx" - + + + Brands + + + + ``` -This renders a table that shows the ID and name of the brands. +This renders the data table that shows the brands with pagination. The `DataTable` component accepts the `instance` prop, which is the object returned by the `useDataTable` hook. --- diff --git a/www/apps/book/generated/edit-dates.mjs b/www/apps/book/generated/edit-dates.mjs index 5fd0223d13..57a327fe37 100644 --- a/www/apps/book/generated/edit-dates.mjs +++ b/www/apps/book/generated/edit-dates.mjs @@ -88,7 +88,7 @@ export const generatedEditDates = { "app/learn/customization/extend-features/extend-create-product/page.mdx": "2025-01-06T11:18:58.250Z", "app/learn/customization/custom-features/page.mdx": "2024-12-09T10:46:28.593Z", "app/learn/customization/customize-admin/page.mdx": "2024-12-09T11:02:38.801Z", - "app/learn/customization/customize-admin/route/page.mdx": "2024-12-24T15:08:46.095Z", + "app/learn/customization/customize-admin/route/page.mdx": "2025-01-22T16:23:31.772Z", "app/learn/customization/customize-admin/widget/page.mdx": "2024-12-09T11:02:39.108Z", "app/learn/customization/extend-features/define-link/page.mdx": "2024-12-09T11:02:39.346Z", "app/learn/customization/extend-features/page.mdx": "2024-12-09T11:02:39.244Z", diff --git a/www/apps/resources/app/admin-components/components/data-table/page.mdx b/www/apps/resources/app/admin-components/components/data-table/page.mdx new file mode 100644 index 0000000000..86b950c8f7 --- /dev/null +++ b/www/apps/resources/app/admin-components/components/data-table/page.mdx @@ -0,0 +1,481 @@ +--- +sidebar_label: "Data Table" +--- + +import { TypeList } from "docs-ui" + +export const metadata = { + title: `Data Table - Admin Components`, +} + +# {metadata.title} + + + +This component is available after [Medusa v2.4.0+](https://github.com/medusajs/medusa/releases/tag/v2.4.0). + + + +The [DataTable component in Medusa UI](!ui!/components/data-table) allows you to display data in a table with sorting, filtering, and pagination. + +You can use this component in your Admin Extensions to display data in a table format, especially if they're retrieved from API routes of the Medusa application. + + + +Refer to the [Medusa UI documentation](!ui!/components/data-table) for detailed information about the DataTable component and its different usages. + + + +## Example: DataTable with Data Fetching + +In this example, you'll create a UI widget that shows the list of products retrieved from the [List Products API Route](!api!/admin#products_getproducts) in a data table with pagination, filtering, searching, and sorting. + +Start by initializing the columns in the data table. To do that, use the `createDataTableColumnHelper` from Medusa UI: + +```tsx title="src/admin/routes/custom/page.tsx" +import { + createDataTableColumnHelper, +} from "@medusajs/ui" +import { + HttpTypes, +} from "@medusajs/framework/types" + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + // Enables sorting for the column. + enableSorting: true, + // If omitted, the header will be used instead if it's a string, + // otherwise the accessor key (id) will be used. + sortLabel: "Title", + // If omitted the default value will be "A-Z" + sortAscLabel: "A-Z", + // If omitted the default value will be "Z-A" + sortDescLabel: "Z-A", + }), + columnHelper.accessor("status", { + header: "Status", + cell: ({ getValue }) => { + const status = getValue() + return ( + + {status === "published" ? "Published" : "Draft"} + + ) + }, + }), +] +``` + +`createDataTableColumnHelper` utility creates a column helper that helps you define the columns for the data table. The column helper has an `accessor` method that accepts two parameters: + +1. The column's key in the table's data. +2. An object with the following properties: + - `header`: The column's header. + - `cell`: (optional) By default, a data's value for a column is displayed as a string. Use this property to specify custom rendering of the value. It accepts a function that returns a string or a React node. The function receives an object that has a `getValue` property function to retrieve the raw value of the cell. + - `enableSorting`: (optional) A boolean that enables sorting data by this column. + - `sortLabel`: (optional) The label for the sorting button. If omitted, the `header` will be used instead if it's a string, otherwise the accessor key (id) will be used. + - `sortAscLabel`: (optional) The label for the ascending sorting button. If omitted, the default value will be "A-Z". + - `sortDescLabel`: (optional) The label for the descending sorting button. If omitted, the default value will be "Z-A". + +Next, you'll define the filters that can be applied to the data table. You'll configure filtering by product status. + +To define the filters, add the following: + +```tsx title="src/admin/routes/custom/page.tsx" +// other imports... +import { + // ... + createDataTableFilterHelper, +} from "@medusajs/ui" + +const filterHelper = createDataTableFilterHelper() + +const filters = [ + filterHelper.accessor("status", { + type: "select", + label: "Status", + options: [ + { + label: "Published", + value: "published", + }, + { + label: "Draft", + value: "draft", + }, + ], + }), +] +``` + +`createDataTableFilterHelper` utility creates a filter helper that helps you define the filters for the data table. The filter helper has an `accessor` method that accepts two parameters: + +1. The key of a column in the table's data. +2. An object with the following properties: + - `type`: The type of filter. It can be either: + - `select`: A select dropdown allowing users to choose multiple values. + - `radio`: A radio button allowing users to choose one value. + - `date`: A date picker allowing users to choose a date. + - `label`: The filter's label. + - `options`: An array of objects with `label` and `value` properties. The `label` is the option's label, and the `value` is the value to filter by. + +You'll now start creating the UI widget's component. Start by adding the necessary state variables: + +```tsx title="src/admin/routes/custom/page.tsx" +// other imports... +import { + // ... + DataTablePaginationState, + DataTableFilteringState, + DataTableSortingState, +} from "@medusajs/ui" +import { useMemo, useState } from "react" + +// ... + +const limit = 15 + +const CustomPage = () => { + const [pagination, setPagination] = useState({ + pageSize: limit, + pageIndex: 0, + }) + const [search, setSearch] = useState("") + const [filtering, setFiltering] = useState({}) + const [sorting, setSorting] = useState(null) + + const offset = useMemo(() => { + return pagination.pageIndex * limit + }, [pagination]) + const statusFilters = useMemo(() => { + return (filtering.status || []) as ProductStatus + }, [filtering]) + + // TODO add data fetching logic +} +``` + +In the component, you've added the following state variables: + +- `pagination`: An object of type `DataTablePaginationState` that holds the pagination state. It has two properties: + - `pageSize`: The number of items to show per page. + - `pageIndex`: The current page index. +- `search`: A string that holds the search query. +- `filtering`: An object of type `DataTableFilteringState` that holds the filtering state. +- `sorting`: An object of type `DataTableSortingState` that holds the sorting state. + +You've also added two memoized variables: + +- `offset`: How many items to skip when fetching data based on the current page. +- `statusFilters`: The selected status filters, if any. + +Next, you'll fetch the products from the Medusa application. Assuming you have the JS SDK configured as explained in [this guide](../../../js-sdk/page.mdx), add the following imports at the top of the file: + +```tsx title="src/admin/routes/custom/page.tsx" +import { sdk } from "../../lib/config" +import { useQuery } from "@tanstack/react-query" +``` + +This imports the JS SDK instance and `useQuery` from [Tanstack Query](https://tanstack.com/query/latest). + +Then, replace the `TODO` in the component with the following: + +```tsx title="src/admin/routes/custom/page.tsx" +const { data, isLoading } = useQuery({ + queryFn: () => sdk.admin.product.list({ + limit, + offset, + q: search, + status: statusFilters, + order: sorting ? `${sorting.desc ? "-" : ""}${sorting.id}` : undefined, + }), + queryKey: [["products", limit, offset, search, statusFilters, sorting?.id, sorting?.desc]], +}) + +// TODO configure data table +``` + +You use the `useQuery` hook to fetch the products from the Medusa application. In the `queryFn`, you call the `sdk.admin.product.list` method to fetch the products. You pass the following query parameters to the method: + +- `limit`: The number of products to fetch per page. +- `offset`: The number of products to skip based on the current page. +- `q`: The search query, if set. +- `status`: The status filters, if set. +- `order`: The sorting order, if set. + +So, whenever the user changes the current page, search query, status filters, or sorting, the products are fetched based on the new parameters. + +Next, you'll configure the data table. Medusa UI provides a `useDataTable` hook that helps you configure the data table. Add the following imports at the top of the file: + +```tsx title="src/admin/routes/custom/page.tsx" +import { + // ... + useDataTable, +} from "@medusajs/ui" +``` + +Then, replace the `TODO` in the component with the following: + +```tsx title="src/admin/routes/custom/page.tsx" +const table = useDataTable({ + columns, + data: data?.products || [], + getRowId: (row) => row.id, + rowCount: data?.count || 0, + isLoading, + pagination: { + state: pagination, + onPaginationChange: setPagination, + }, + search: { + state: search, + onSearchChange: setSearch, + }, + filtering: { + state: filtering, + onFilteringChange: setFiltering, + }, + filters, + sorting: { + // Pass the pagination state and updater to the table instance + state: sorting, + onSortingChange: setSorting, + }, +}) + +// TODO render component +``` + +The `useDataTable` hook accepts an object with the following properties: + +- `columns`: The columns to display in the data table. You created this using the `createDataTableColumnHelper` utility. +- `data`: The products fetched from the Medusa application. +- `getRowId`: A function that returns the unique ID of a row. +- `rowCount`: The total number of products that can be retrieved. This is used to determine the number of pages. +- `isLoading`: A boolean that indicates if the data is being fetched. +- `pagination`: An object to configure pagination. It accepts with the following properties: + - `state`: The pagination React state variable. + - `onPaginationChange`: A function that updates the pagination state. +- `search`: An object to configure searching. It accepts the following properties: + - `state`: The search query React state variable. + - `onSearchChange`: A function that updates the search query state. +- `filtering`: An object to configure filtering. It accepts the following properties: + - `state`: The filtering React state variable. + - `onFilteringChange`: A function that updates the filtering state. +- `filters`: The filters to display in the data table. You created this using the `createDataTableFilterHelper` utility. +- `sorting`: An object to configure sorting. It accepts the following properties: + - `state`: The sorting React state variable. + - `onSortingChange`: A function that updates the sorting state. + +Finally, you'll render the data table. But first, add the following imports at the top of the page: + +```tsx title="src/admin/routes/custom/page.tsx" +import { + // ... + DataTable, +} from "@medusajs/ui" +import { SingleColumnLayout } from "../../layouts/single-column" +import { Container } from "../../components/container" +``` + +Aside from the `DataTable` component, you also import the [SingleColumnLayout](../../layouts/single-column/page.mdx) and [Container](../container/page.mdx) components implemented in other Admin Component guides. These components ensure a style consistent to other pages in the admin dashboard. + +Then, replace the `TODO` in the component with the following: + +```tsx title="src/admin/routes/custom/page.tsx" +return ( + + + + + Products +
+ + + +
+
+ + +
+
+
+) +``` + +You render the `DataTable` component and pass the `table` instance as a prop. In the `DataTable` component, you render a toolbar showing a heading, filter menu, sorting menu, and a search input. You also show pagination after the table. + +Lastly, export the component and the UI widget's configuration at the end of the file: + +```tsx title="src/admin/routes/custom/page.tsx" +// other imports... +import { defineRouteConfig } from "@medusajs/admin-sdk" +import { ChatBubbleLeftRight } from "@medusajs/icons" + +// ... + +export const config = defineRouteConfig({ + label: "Custom", + icon: ChatBubbleLeftRight, +}) + +export default CustomPage +``` + +If you start your Medusa application and go to `localhost:9000/app/custom`, you'll see the data table showing the list of products with pagination, filtering, searching, and sorting functionalities. + +### Full Example Code + +```tsx title="src/admin/routes/custom/page.tsx" +import { defineRouteConfig } from "@medusajs/admin-sdk" +import { ChatBubbleLeftRight } from "@medusajs/icons" +import { + Badge, + createDataTableColumnHelper, + createDataTableFilterHelper, + DataTable, + DataTableFilteringState, + DataTablePaginationState, + DataTableSortingState, + Heading, + useDataTable, +} from "@medusajs/ui" +import { useQuery } from "@tanstack/react-query" +import { SingleColumnLayout } from "../../layouts/single-column" +import { sdk } from "../../lib/config" +import { useMemo, useState } from "react" +import { Container } from "../../components/container" +import { HttpTypes, ProductStatus } from "@medusajs/framework/types" + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + // Enables sorting for the column. + enableSorting: true, + // If omitted, the header will be used instead if it's a string, + // otherwise the accessor key (id) will be used. + sortLabel: "Title", + // If omitted the default value will be "A-Z" + sortAscLabel: "A-Z", + // If omitted the default value will be "Z-A" + sortDescLabel: "Z-A", + }), + columnHelper.accessor("status", { + header: "Status", + cell: ({ getValue }) => { + const status = getValue() + return ( + + {status === "published" ? "Published" : "Draft"} + + ) + }, + }), +] + +const filterHelper = createDataTableFilterHelper() + +const filters = [ + filterHelper.accessor("status", { + type: "select", + label: "Status", + options: [ + { + label: "Published", + value: "published", + }, + { + label: "Draft", + value: "draft", + }, + ], + }), +] + +const limit = 15 + +const CustomPage = () => { + const [pagination, setPagination] = useState({ + pageSize: limit, + pageIndex: 0, + }) + const [search, setSearch] = useState("") + const [filtering, setFiltering] = useState({}) + const [sorting, setSorting] = useState(null) + + const offset = useMemo(() => { + return pagination.pageIndex * limit + }, [pagination]) + const statusFilters = useMemo(() => { + return (filtering.status || []) as ProductStatus + }, [filtering]) + + const { data, isLoading } = useQuery({ + queryFn: () => sdk.admin.product.list({ + limit, + offset, + q: search, + status: statusFilters, + order: sorting ? `${sorting.desc ? "-" : ""}${sorting.id}` : undefined, + }), + queryKey: [["products", limit, offset, search, statusFilters, sorting?.id, sorting?.desc]], + }) + + const table = useDataTable({ + columns, + data: data?.products || [], + getRowId: (row) => row.id, + rowCount: data?.count || 0, + isLoading, + pagination: { + state: pagination, + onPaginationChange: setPagination, + }, + search: { + state: search, + onSearchChange: setSearch, + }, + filtering: { + state: filtering, + onFilteringChange: setFiltering, + }, + filters, + sorting: { + // Pass the pagination state and updater to the table instance + state: sorting, + onSortingChange: setSorting, + }, + }) + + return ( + + + + + Products +
+ + + +
+
+ + +
+
+
+ ) +} + +export const config = defineRouteConfig({ + label: "Custom", + icon: ChatBubbleLeftRight, +}) + +export default CustomPage +``` diff --git a/www/apps/resources/app/admin-components/components/table/page.mdx b/www/apps/resources/app/admin-components/components/table/page.mdx index ad4de2e8ec..3c5da0b1f9 100644 --- a/www/apps/resources/app/admin-components/components/table/page.mdx +++ b/www/apps/resources/app/admin-components/components/table/page.mdx @@ -10,6 +10,12 @@ export const metadata = { # {metadata.title} + + +If you're using [Medusa v2.4.0+](https://github.com/medusajs/medusa/releases/tag/v2.4.0), it's recommended to use the [Data Table](../data-table/page.mdx) component instead. + + + The listing pages in the Admin show a table with pagination. ![Example of a table in the product listing page](https://res.cloudinary.com/dza7lstvk/image/upload/v1728295658/Medusa%20Resources/list_ddt9zc.png) diff --git a/www/apps/resources/generated/edit-dates.mjs b/www/apps/resources/generated/edit-dates.mjs index 4f316d317a..72afd1d7a4 100644 --- a/www/apps/resources/generated/edit-dates.mjs +++ b/www/apps/resources/generated/edit-dates.mjs @@ -2125,7 +2125,7 @@ export const generatedEditDates = { "app/admin-components/components/header/page.mdx": "2024-10-07T11:16:47.407Z", "app/admin-components/components/json-view-section/page.mdx": "2024-10-07T11:15:58.833Z", "app/admin-components/components/section-row/page.mdx": "2024-10-07T11:15:58.832Z", - "app/admin-components/components/table/page.mdx": "2024-12-16T15:28:59.428Z", + "app/admin-components/components/table/page.mdx": "2025-01-22T16:00:56.772Z", "app/admin-components/page.mdx": "2024-10-07T11:09:49.493Z", "app/admin-components/layouts/single-column/page.mdx": "2024-10-07T11:16:06.435Z", "app/admin-components/layouts/two-column/page.mdx": "2024-10-07T11:16:10.092Z", @@ -5886,5 +5886,6 @@ export const generatedEditDates = { "references/core_flows/interfaces/core_flows.ValidateProductInputStepInput/page.mdx": "2025-01-17T16:43:26.173Z", "references/core_flows/types/core_flows.ThrowUnlessPaymentCollectionNotePaidInput/page.mdx": "2025-01-17T16:43:25.819Z", "references/core_flows/types/core_flows.ValidatePaymentsRefundStepInput/page.mdx": "2025-01-17T16:43:26.128Z", - "references/core_flows/types/core_flows.ValidateRefundStepInput/page.mdx": "2025-01-17T16:43:26.124Z" + "references/core_flows/types/core_flows.ValidateRefundStepInput/page.mdx": "2025-01-17T16:43:26.124Z", + "app/admin-components/components/data-table/page.mdx": "2025-01-22T16:01:01.279Z" } \ No newline at end of file diff --git a/www/apps/resources/generated/files-map.mjs b/www/apps/resources/generated/files-map.mjs index 3354447b28..181668542a 100644 --- a/www/apps/resources/generated/files-map.mjs +++ b/www/apps/resources/generated/files-map.mjs @@ -7,6 +7,10 @@ export const filesMap = [ "filePath": "/www/apps/resources/app/admin-components/components/container/page.mdx", "pathname": "/admin-components/components/container" }, + { + "filePath": "/www/apps/resources/app/admin-components/components/data-table/page.mdx", + "pathname": "/admin-components/components/data-table" + }, { "filePath": "/www/apps/resources/app/admin-components/components/forms/page.mdx", "pathname": "/admin-components/components/forms" diff --git a/www/apps/resources/generated/sidebar.mjs b/www/apps/resources/generated/sidebar.mjs index 483608cc7d..53a16279ee 100644 --- a/www/apps/resources/generated/sidebar.mjs +++ b/www/apps/resources/generated/sidebar.mjs @@ -17377,6 +17377,15 @@ export const generatedSidebar = [ "description": "", "children": [] }, + { + "loaded": true, + "isPathHref": true, + "type": "link", + "path": "/admin-components/components/data-table", + "title": "Data Table", + "description": "", + "children": [] + }, { "loaded": true, "isPathHref": true, diff --git a/www/apps/ui/package.json b/www/apps/ui/package.json index 5813c81a9c..ef2f18956a 100644 --- a/www/apps/ui/package.json +++ b/www/apps/ui/package.json @@ -16,9 +16,9 @@ "dependencies": { "@faker-js/faker": "^8.0.2", "@mdx-js/react": "^3.1.0", - "@medusajs/icons": "~2.0.0", - "@medusajs/ui": "~4.0.0", - "@medusajs/ui-preset": "~1.1.3", + "@medusajs/icons": "~2.4.0", + "@medusajs/ui": "~4.0.4", + "@medusajs/ui-preset": "~2.4.0", "autoprefixer": "10.4.14", "clsx": "^2.0.0", "contentlayer": "^0.3.4", diff --git a/www/apps/ui/src/components/component-example.tsx b/www/apps/ui/src/components/component-example.tsx index 1dd96a20ad..6977899ed4 100644 --- a/www/apps/ui/src/components/component-example.tsx +++ b/www/apps/ui/src/components/component-example.tsx @@ -10,11 +10,13 @@ import { ExampleRegistry } from "@/registries/example-registry" interface ComponentExampleProps extends React.HTMLAttributes { name: string + disableCenterAlignPreview?: boolean } export function ComponentExample({ children, name, + disableCenterAlignPreview = false, ...props }: ComponentExampleProps) { const Preview = React.useMemo(() => { @@ -45,7 +47,8 @@ export function ComponentExample({
+ +This component is available after Medusa UI v4.0.4 (or Medusa v2.4.0). It is built on top of the [Table](./table.mdx) component. If you want a table with more control over its styling and functionality, use that component instead. + + + +## Simple Example + +--- + + + +## Usage + +--- + +You import the `DataTable` component from `@medusajs/ui`. + +```tsx +import { + DataTable, +} from "@medusajs/ui" +``` + +### Columns Preparation + +Before using the `DataTable` component, you need to prepare its columns using the `createDataTableColumnHelper` utility: + +```tsx +import { + // ... + createDataTableColumnHelper, +} from "@medusajs/ui" + +const data = [ + { + id: "1", + title: "Shirt", + price: 10 + }, + // other data... +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + }), +] +``` + +The `createDataTableColumnHelper` utility is a function that returns a helper used to generates column configurations for the `DataTable` component. + +For each column in the table, use the `accessor` method of the column helper to specify configurations for a specific column. The `accessor` method accepts the column's key in the table's data as the first parameter, and an object with the following properties as the second parameter: + +- `header`: The table header text for the column. +- `enableSorting`: (optional) A boolean that indicates whether data in the table can be sorted by this column. More on sorting in [this section](#datatable-with-sorting). + +### Create Table Instance + +The `DataTable` component expects a table instance created using the `useDataTable` hook. Import that hook from `@medusajs/ui`: + +```tsx +import { + // ... + useDataTable, +} from "@medusajs/ui" +``` + +Then, inside the component that will render `DataTable`, create a table instance using the `useDataTable` hook: + +```tsx +export default function ProductTable () { + const table = useDataTable({ + columns, + data, + getRowId: (product) => product.id, + rowCount: data.length, + isLoading: false, + }) +} +``` + +The `useDataTable` hook accepts an object with the following properties: + +- `columns`: An array of column configurations generated using the `createDataTableColumnHelper` utility. +- `data`: The data to be displayed in the table. +- `getRowId`: A function that returns the unique identifier of a row. The identifier must be a string. +- `rowCount`: The total number of rows in the table. If you're fetching data from the Medusa application with pagination or filters, this will be the total count, not the count of the data returned in the current page. +- `isLoading`: A boolean that indicates whether the table is loading data. This is useful when loading data from the Medusa application for the first time or in between pages. + +### Render DataTable + +Finally, render the `DataTable` component with the table instance created using the `useDataTable` hook: + +```tsx +export default function ProductTable () { + // ... + return ( + + + Products + + + + ) +} +``` + +In the `DataTable` component, you pass the following child components: + +1. `DataTable.Toolbar`: The toolbar component shown at the top of the table. You can also add buttons for custom actions. +2. `DataTable.Table`: The table component that renders the data. + +Refer to the examples later on this page to learn how to add pagination, filtering, and other functionalities using the `DataTable` component. + +## API Reference + +--- + + + +## Example with Data Fetching + +--- + +Refer to [this Admin Components guide](https://docs.medusajs.com/resources/admin-components/components/data-table) for an example on using the `DataTable` component with data fetching from the Medusa application. + + +## Configure Cell Rendering + +--- + + + +The `accessor` method of the `createDataTableColumnHelper` utility accepts a `cell` property that you can use to customize the rendering of the cell content. + +For example: + +```tsx +const products = [ + { + id: "1", + title: "Shirt", + price: 10, + is_active: true + }, + { + id: "2", + title: "Pants", + price: 20, + is_active: true + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("is_active", { + header: "Status", + cell: ({ getValue }) => { + const isActive = getValue() + return ( + + {isActive ? "Active" : "Inactive"} + + ) + } + }), + // ... +] +``` + +The `cell` property's value is a function that returns a string or a React node to be rendered in the cell. The function receives as a parameter an object having a `getValue` property to get the raw value of the cell. + +## DataTable with Search + +--- + + + +The object passed to the `useDataTable` hook accepts a `search` property that you can use to enable and configure the search functionality in the `DataTable` component: + +```tsx +// `useState` imported from `React` +const [search, setSearch] = useState("") + +const table = useDataTable({ + // ... + search: { + state: search, + onSearchChange: setSearch + } +}) +``` + +`search` accepts the following properties: + +- `state`: The search query string. This must be a React state variable, as its value will be used for the table's search input. +- `onSearchChange`: A function that updates the search query string. Typically, this would be the setter function of the state variable, but you can also perform custom actions if necessary. + +Next, you must implement the search filtering. For example, if you're retrieving data from the Medusa application, you pass the search query to the API to filter the data. + +For example, when using a simple array as in the example above, this is how you filter the data by the search query: + +```tsx +const [search, setSearch] = useState("") + +const shownProducts = useMemo(() => { + return products.filter((product) => product.title.toLowerCase().includes(search.toLowerCase())) +}, [search]) + +const table = useDataTable({ + columns, + data: shownProducts, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + // Pass the state and onSearchChange to the table instance. + search: { + state: search, + onSearchChange: setSearch + } +}) +``` + +Then, render the `DataTable.Search` component as part of the `DataTable`'s children: + +```tsx +return ( + + + Products + {/* This component renders the search bar */} + + + + +) +``` + +This will show a search input at the top of the table, in the data table's toolbar. + +## DataTable with Pagination + +--- + + + +The object passed to the `useDataTable` hook accepts a `pagination` property that you can use to enable and configure the pagination functionality in the `DataTable` component. + +First, import the `DataTablePaginationState` type from `@medusajs/ui`: + +```tsx +import { + // ... + DataTablePaginationState, +} from "@medusajs/ui" +``` + +Then, create a state variable to manage the pagination: + +```tsx +const [pagination, setPagination] = useState({ + pageSize: 15, + pageIndex: 0, +}) +``` + +The pagination state variable of type `DataTablePaginationState` is an object with the following properties: + +- `pageSize`: The number of rows to display per page. +- `pageIndex`: The current page index. It's zero-based, meaning the first page would be `0`. + +Next, pass the pagination object to the `useDataTable` hook: + +```tsx +const table = useDataTable({ + // ... + pagination: { + state: pagination, + onPaginationChange: setPagination, + }, +}) +``` + +`pagination` accepts the following properties: + +- `state`: The pagination state object. This must be a React state variable of type `DataTablePaginationState`. +- `onPaginationChange`: A function that updates the pagination state object. Typically, this would be the setter function of the state variable, but you can also perform custom actions if necessary. + +You must also implement the pagination logic, such as fetching data from the Medusa application with the pagination parameters. + +For example, when using a simple array as in the example above, this is how you paginate the data: + +```tsx +const [pagination, setPagination] = useState({ + pageSize: PAGE_SIZE, + pageIndex: 0, +}) + +const shownProducts = useMemo(() => { + return products.slice( + pagination.pageIndex * pagination.pageSize, + (pagination.pageIndex + 1) * pagination.pageSize + ) +}, [pagination]) + +const table = useDataTable({ + data: shownProducts, + columns, + rowCount: products.length, + getRowId: (product) => product.id, + pagination: { + // Pass the pagination state and updater to the table instance + state: pagination, + onPaginationChange: setPagination, + }, + isLoading: false, +}); +``` + +Finally, render the `DataTable.Pagination` component as part of the `DataTable`'s children: + +```tsx +return ( + + + Products + + + {/** This component will render the pagination controls **/} + + +) +``` + +This will show the pagination controls at the end of the table. + +## DataTable with Filters + +--- + + + +The object passed to the `useDataTable` hook accepts a `filters` property that you can use to enable and configure the filtering functionality in the `DataTable` component. + +First, add the following imports from the `@medusajs/ui` package: + +```tsx +import { + // ... + createDataTableFilterHelper, + DataTableFilteringState, +} from "@medusajs/ui" +``` + +The `createDataTableFilterHelper` utility is a function that returns a helper function to generate filter configurations for the `DataTable` component. The `DataTableFilteringState` type is an object that represents the filtering state of the table. + +Then, create the filters using the `createDataTableFilterHelper` utility: + + + +Create the filters outside the component rendering the `DataTable` component. + + + +```tsx +const filterHelper = createDataTableFilterHelper() + +const filters = [ + filterHelper.accessor("title", { + type: "select", + label: "Title", + options: products.map((product) => ({ + label: product.title, + value: product.title.toLowerCase() + })) + }), +] +``` + +The filter helper returned by `createDataTableFilterHelper` has an `accessor` method that accepts the column's key in the data as the first parameter, and an object with the following properties as the second parameter: + +- `type`: The type of filter. It can be either: + - `select`: A select dropdown filter. + - `radio`: A radio button filter. + - `date`: A date filter. +- `label`: The label text for the filter. +- `options`: If the filter type is `select` or `radio`, an array of dropdown options. Each option has a `label` and `value` property. + + + +Refer to [this section](#filtering-date-values) to learn how to use date filters. + + + +Next, in the component rendering the `DataTable` component, create a state variable to manage the filtering, and pass the filters to the `useDataTable` hook: + +```tsx +const [filtering, setFiltering] = useState({}) + +const table = useDataTable({ + // ... + filters, + filtering: { + state: filtering, + onFilteringChange: setFiltering, + }, +}) +``` + +You create a `filtering` state variable of type `DataTableFilteringState` to manage the filtering state. You can also set initial filters as explained in [this section](#initial-filter-values). + +The `useDataTable` hook accepts the following properties for filtering: + +- `filters`: An array of filter configurations generated using the `createDataTableFilterHelper` utility. +- `filtering`: An object with the following properties: + - `state`: The filtering state object. This must be a React state variable of type `DataTableFilteringState`. + - `onFilteringChange`: A function that updates the filtering state object. Typically, this would be the setter function of the state variable, but you can also perform custom actions if necessary. + +You must also implement the logic of filtering the data based on the filter conditions, such as sending the filter conditions to the Medusa application when fetching data. + +For example, when using a simple array as in the example above, this is how you filter the data based on the filter conditions: + +```tsx +const [filtering, setFiltering] = useState({}) + +const shownProducts = useMemo(() => { + return products.filter((product) => { + return Object.entries(filtering).every(([key, value]) => { + if (!value) { + return true + } + if (typeof value === "string") { + // @ts-ignore + return product[key].toString().toLowerCase().includes(value.toString().toLowerCase()) + } + if (Array.isArray(value)) { + // @ts-ignore + return value.includes(product[key].toLowerCase()) + } + if (typeof value === "object") { + // @ts-ignore + const date = new Date(product[key]) + let matching = false + if ("$gte" in value && value.$gte) { + matching = date >= new Date(value.$gte as number) + } + if ("$lte" in value && value.$lte) { + matching = date <= new Date(value.$lte as number) + } + if ("$lt" in value && value.$lt) { + matching = date < new Date(value.$lt as number) + } + if ("$gt" in value && value.$gt) { + matching = date > new Date(value.$gt as number) + } + return matching + } + }) + }) +}, [filtering]) + +const table = useDataTable({ + data: shownProducts, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + filtering: { + state: filtering, + onFilteringChange: setFiltering, + }, + filters +}) +``` + +When filters are selected, the `filtering` state object will contain the filter conditions, where the key is the column key and the value can be: + +- `undefined` if the user is still selecting the value. +- A string if the filter type is `radio`, as the user can choose only one value. +- An array of strings if the filter type is `select`, as the user can choose multiple values. +- An object with the filter conditions if the filter type is `date`. The filter conditions for dates are explained more in [this section](#filtering-date-values). + +Finally, render the `DataTable.FilterMenu` component as part of the `DataTable`'s children: + +```tsx +return ( + + + Products + {/** This component will render a menu that allows the user to choose which filters to apply to the table data. **/} + + + + +) +``` + +This will show a filter menu at the top of the table, in the data table's toolbar. + +### Filtering Date Values + + + +Consider your data has a `created_at` field that contains date values. To filter the data based on date values, you can add a `date` filter using the filter helper: + +```tsx +const filters = [ + // ... + filterHelper.accessor("created_at", { + type: "date", + label: "Created At", + format: "date", + formatDateValue: (date) => date.toLocaleString(), + rangeOptionStartLabel: "From", + rangeOptionEndLabel: "To", + rangeOptionLabel: "Between", + options: [ + { + label: "Today", + value: { + $gte: new Date(new Date().setHours(0, 0, 0, 0)).toString(), + $lte: new Date(new Date().setHours(23, 59, 59, 999)).toString() + } + }, + { + label: "Yesterday", + value: { + $gte: new Date(new Date().setHours(0, 0, 0, 0) - 24 * 60 * 60 * 1000).toString(), + $lte: new Date(new Date().setHours(0, 0, 0, 0)).toString() + } + }, + { + label: "Last Week", + value: { + $gte: new Date(new Date().setHours(0, 0, 0, 0) - 7 * 24 * 60 * 60 * 1000).toString(), + $lte: new Date(new Date().setHours(0, 0, 0, 0)).toString() + }, + }, + ] + }), +] +``` + +When the filter type is `date`, the filter configuration object passed as a second parameter to the `accessor` method accepts the following properties: + +- `format`: The format of the date value. It can be either `date` to filter by dates, or `datetime` to filter by dates and times. +- `formatDateValue`: A function that formats the date value when displaying it in the filter options. +- `rangeOptionStartLabel`: (optional) The label for the start date input in the range filter. +- `rangeOptionEndLabel`: (optional) The label for the end date input in the range filter. +- `rangeOptionLabel`: (optional) The label for the range filter option. +- `options`: By default, the filter will allow the user to filter between two dates. You can also set this property to an array of filter options to quickly choose from. Each option has a `label` and `value` property. The `value` property is an object that represents the filter condition. In this example, the filter condition is an object with a `$gte` property that specifies the date that the data should be greater than or equal to. Allowed properties are: + - `$gt`: Greater than. + - `$lt`: Less than. + - `$lte`: Less than or equal to. + - `$gte`: Greater than or equal to. + +When the user selects a date filter option, the `filtering` state object will contain the filter conditions, where the key is the column key and the value is an object with the filter conditions. You must handle the filter logic as explained earlier. + +For example, when using a simple array as in the example above, this is how you filter the data based on the date filter conditions: + +```tsx +const shownProducts = useMemo(() => { + return products.filter((product) => { + return Object.entries(filtering).every(([key, value]) => { + if (!value) { + return true + } + // other types checks... + if (typeof value === "object") { + // @ts-ignore + const date = new Date(product[key]) + let matching = false + if ("$gte" in value && value.$gte) { + matching = date >= new Date(value.$gte as number) + } + if ("$lte" in value && value.$lte) { + matching = date <= new Date(value.$lte as number) + } + if ("$lt" in value && value.$lt) { + matching = date < new Date(value.$lt as number) + } + if ("$gt" in value && value.$gt) { + matching = date > new Date(value.$gt as number) + } + return matching + } + }) + }) +}, [filtering]) +``` + +### Initial Filter Values + + + +If you want to set initial filter values, you can set the initial state of the `filtering` state variable: + +```tsx +const [filtering, setFiltering] = useState({ + title: ["shirt"] +}) +``` + +The user can still change the filter values, but the initial values will be applied when the table is first rendered. + +## DataTable with Sorting + +--- + + + +The object passed to the `useDataTable` hook accepts a `sorting` property that you can use to enable and configure the sorting functionality in the `DataTable` component. + +First, in the `columns` array created by the columns helper, specify for the sortable columns the following properties: + +```tsx +const columns = [ + columnHelper.accessor("title", { + header: "Title", + // Enables sorting for the column. + enableSorting: true, + // If omitted, the header will be used instead if it's a string, + // otherwise the accessor key (id) will be used. + sortLabel: "Title", + // If omitted the default value will be "A-Z" + sortAscLabel: "A-Z", + // If omitted the default value will be "Z-A" + sortDescLabel: "Z-A", + }), +] +``` + +The `accessor` method of the helper function accepts the following properties for sorting: + +- `enableSorting`: A boolean that indicates whether data in the table can be sorted by this column. +- `sortLabel`: The label text for the sort button in the column header. If omitted, the `header` will be used instead if it's a string, otherwise the accessor key (id) will be used. +- `sortAscLabel`: The label text for the ascending sort button. If omitted, the default value will be `A-Z`. +- `sortDescLabel`: The label text for the descending sort button. If omitted, the default value will be `Z-A`. + +Next, in the component rendering the `DataTable` component, create a state variable to manage the sorting, and pass the sorting object to the `useDataTable` hook: + +```tsx +import { + // ... + DataTableSortingState +} from "@medusajs/ui" + +export default function ProductTable () { + const [sorting, setSorting] = useState(null); + + const table = useDataTable({ + // ... + sorting: { + state: sorting, + onSortingChange: setSorting, + }, + }) + + // ... +} +``` + +You create a state variable of type `DataTableSortingState` to manage the sorting state. You can also set initial sorting values as explained in [this section](#initial-sort-values). + +The `sorting` object passed to the `useDataTable` hook accepts the following properties: + +- `state`: The sorting state object. This must be a React state variable of type `DataTableSortingState`. +- `onSortingChange`: A function that updates the sorting state object. Typically, this would be the setter function of the state variable, but you can also perform custom actions if necessary. + +You must also implement the sorting logic, such as sending the sorting conditions to the Medusa application when fetching data. + +For example, when using a simple array as in the example above, this is how you sort the data based on the sorting conditions: + +```tsx +const [sorting, setSorting] = useState(null); + +const shownProducts = useMemo(() => { + if (!sorting) { + return products + } + return products.slice().sort((a, b) => { + // @ts-ignore + const aVal = a[sorting.id] + // @ts-ignore + const bVal = b[sorting.id] + if (aVal < bVal) { + return sorting.desc ? 1 : -1 + } + if (aVal > bVal) { + return sorting.desc ? -1 : 1 + } + return 0 + }) +}, [sorting]) + +const table = useDataTable({ + data: shownProducts, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + sorting: { + // Pass the pagination state and updater to the table instance + state: sorting, + onSortingChange: setSorting, + }, + isLoading: false, +}) +``` + +The `sorting` state object has the following properties: + +- `id`: The column key to sort by. +- `desc`: A boolean that indicates whether to sort in descending order. + +Finally, render the `DataTable.SortingMenu` component as part of the `DataTable`'s children: + +```tsx +return ( + + + Products + {/** This component will render a menu that allows the user to choose which column to sort by and in what direction. **/} + + + + +) +``` + +This will show a sorting menu at the top of the table, in the data table's toolbar. + +### Initial Sort Values + + + +If you want to set initial sort values, you can set the initial state of the `sorting` state variable: + +```tsx +const [sorting, setSorting] = useState({ + id: "title", + desc: false, +}) +``` + +The user can still change the sort values, but the initial values will be applied when the table is first rendered. + +## DataTable with Command Bar + +--- + + + +The object passed to the `useDataTable` hook accepts a `commands` object property that you can use to add custom actions to the `DataTable` component. + +First, add the following imports from `@medusajs/ui`: + +```tsx +import { + // ... + createDataTableCommandHelper, + DataTableRowSelectionState, +} from "@medusajs/ui" +``` + +The `createDataTableCommandHelper` utility is a function that returns a helper function to generate command configurations for the `DataTable` component. The `DataTableRowSelectionState` type is an object that represents the row selection state of the table. + +Then, in the `columns` array created by the columns helper, add a `select` column: + +```tsx +const columns = [ + // Commands requires a select column. + columnHelper.select(), + // ... +] +``` + +The `select` method of the helper function adds a select column to the table. This column will render checkboxes in each row to allow the user to select rows. + +Next, create the commands using the `createDataTableCommandHelper` utility: + + + +Create the commands outside the component rendering the `DataTable` component. + + + +```tsx +const commandHelper = createDataTableCommandHelper() + +const useCommands = () => { + return [ + commandHelper.command({ + label: "Delete", + shortcut: "D", + action: async (selection) => { + const productsToDeleteIds = Object.keys(selection) + + // TODO remove products from the server + } + }) + ] +} +``` + +The `createDataTableCommandHelper` utility is a function that returns a helper function to generate command configurations for the `DataTable` component. + +You create a function that returns an array of command configurations. This is useful if the command's action requires initializing other functions or hooks. + +The `command` method of the helper function accepts the following properties: + +- `label`: The label text for the command. +- `shortcut`: The keyboard shortcut for the command. This shortcut only works when rows are selected in the table. +- `action`: A function that performs the action when the command is executed. The function receives the selected rows as an object, where the key is the row's `id` field and the value is a boolean indicating that the row is selected. You can send a request to the server within this function to perform the action. + +Then, in the component rendering the `DataTable` component, create a state variable to manage the selected rows, and pass the commands to the `useDataTable` hook: + +```tsx +const [rowSelection, setRowSelection] = useState({}) + +const commands = useCommands() + +const instance = useDataTable({ + data: products, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + commands, + rowSelection: { + state: rowSelection, + onRowSelectionChange: setRowSelection, + }, +}) +``` + +You create a state variable of type `DataTableRowSelectionState` to manage the selected rows. You also retrieve the commands by calling the `useCommand` function. + +The `useDataTable` hook accepts the following properties for commands: + +- `commands`: An array of command configurations generated using the `createDataTableCommandHelper` utility. +- `rowSelection`: An object that enables selecting rows in the table. It accepts the following properties: + - `state`: The row selection state object. This must be a React state variable of type `DataTableRowSelectionState`. + - `onRowSelectionChange`: A function that updates the row selection state object. Typically, this would be the setter function of the state variable, but you can also perform custom actions if necessary. + +Finally, render the `DataTable.CommandBar` component as part of the `DataTable`'s children: + +```tsx +return ( + + + Products + + + {/** This component will the command bar when the user has selected at least one row. **/} + `${count} selected`} /> + +) +``` + +This will show a command bar when the user has selected at least one row in the table. \ No newline at end of file diff --git a/www/apps/ui/src/content/docs/components/table.mdx b/www/apps/ui/src/content/docs/components/table.mdx index 77e3e4ac3b..7891523620 100644 --- a/www/apps/ui/src/content/docs/components/table.mdx +++ b/www/apps/ui/src/content/docs/components/table.mdx @@ -3,6 +3,12 @@ title: "Table" description: "A Table component for displaying data." --- + + +If you're looking to add a table in your Medusa Admin Extensions with features like pagination and filters, refer to the [DataTable](./data-table.mdx) component instead. + + + ## Usage diff --git a/www/apps/ui/src/examples/data-table-commands.tsx b/www/apps/ui/src/examples/data-table-commands.tsx new file mode 100644 index 0000000000..48f6c67e6b --- /dev/null +++ b/www/apps/ui/src/examples/data-table-commands.tsx @@ -0,0 +1,76 @@ +import { DataTable, DataTableRowSelectionState, Heading, createDataTableColumnHelper, createDataTableCommandHelper, useDataTable } from "@medusajs/ui" +import { useState } from "react" + +let products = [ + { + id: "1", + title: "Shirt", + price: 10, + }, + { + id: "2", + title: "Pants", + price: 20, + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + // Commands requires a select column. + columnHelper.select(), + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + enableSorting: true, + }), +] + +const commandHelper = createDataTableCommandHelper() + +const useCommands = () => { + return [ + commandHelper.command({ + label: "Delete", + shortcut: "D", + action: async (selection) => { + const productsToDeleteIds = Object.keys(selection) + + alert(`You deleted product(s) with IDs: ${productsToDeleteIds.join()}`) + } + }) + ] +} + +export default function ProductTable () { + const [rowSelection, setRowSelection] = useState({}) + + const commands = useCommands() + + const instance = useDataTable({ + data: products, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + commands, + rowSelection: { + state: rowSelection, + onRowSelectionChange: setRowSelection, + }, + }); + + return ( + + + Products + + + {/** This component will the command bar when the user has selected at least one row. **/} + `${count} selected`} /> + + ); +}; \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-custom-cell.tsx b/www/apps/ui/src/examples/data-table-custom-cell.tsx new file mode 100644 index 0000000000..27867cb746 --- /dev/null +++ b/www/apps/ui/src/examples/data-table-custom-cell.tsx @@ -0,0 +1,59 @@ +import { createDataTableColumnHelper, useDataTable, DataTable, Heading, Badge } from "@medusajs/ui" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10, + is_active: true + }, + { + id: "2", + title: "Pants", + price: 20, + is_active: false + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + enableSorting: true, + }), + columnHelper.accessor("is_active", { + header: "Status", + cell: ({ getValue }) => { + const isActive = getValue() + return ( + + {isActive ? "Active" : "Inactive"} + + ) + } + }) +] + +export default function ProductTable () { + const table = useDataTable({ + columns, + data: products, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + }) + + return ( + + + Products + + + + ) +} \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-demo.tsx b/www/apps/ui/src/examples/data-table-demo.tsx new file mode 100644 index 0000000000..94fa6c6038 --- /dev/null +++ b/www/apps/ui/src/examples/data-table-demo.tsx @@ -0,0 +1,46 @@ +import { createDataTableColumnHelper, useDataTable, DataTable, Heading } from "@medusajs/ui" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10 + }, + { + id: "2", + title: "Pants", + price: 20 + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + enableSorting: true, + }), +] + +export default function ProductTable () { + const table = useDataTable({ + columns, + data: products, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + }) + + return ( + + + Products + + + + ) +} \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-filters-date.tsx b/www/apps/ui/src/examples/data-table-filters-date.tsx new file mode 100644 index 0000000000..633a5a3f5b --- /dev/null +++ b/www/apps/ui/src/examples/data-table-filters-date.tsx @@ -0,0 +1,137 @@ +import { DataTable, DataTableFilteringState, Heading, createDataTableColumnHelper, createDataTableFilterHelper, useDataTable } from "@medusajs/ui" +import { useMemo, useState } from "react" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10, + created_at: new Date() + }, + { + id: "2", + title: "Pants", + price: 20, + created_at: new Date("2026-01-01") + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + enableSorting: true, + }), + columnHelper.accessor("created_at", { + header: "Created At", + cell: ({ getValue }) => { + return getValue().toLocaleString() + } + }), +] + +const filterHelper = createDataTableFilterHelper() + +const filters = [ + filterHelper.accessor("created_at", { + type: "date", + label: "Created At", + format: "date", + formatDateValue: (date) => date.toLocaleString(), + rangeOptionStartLabel: "From", + rangeOptionEndLabel: "To", + rangeOptionLabel: "Between", + options: [ + { + label: "Today", + value: { + $gte: new Date(new Date().setHours(0, 0, 0, 0)).toString(), + $lte: new Date(new Date().setHours(23, 59, 59, 999)).toString() + } + }, + { + label: "Yesterday", + value: { + $gte: new Date(new Date().setHours(0, 0, 0, 0) - 24 * 60 * 60 * 1000).toString(), + $lte: new Date(new Date().setHours(0, 0, 0, 0)).toString() + } + }, + { + label: "Last Week", + value: { + $gte: new Date(new Date().setHours(0, 0, 0, 0) - 7 * 24 * 60 * 60 * 1000).toString(), + $lte: new Date(new Date().setHours(0, 0, 0, 0)).toString() + }, + }, + ] + }), +] + +export default function ProductTable () { + const [filtering, setFiltering] = useState({}) + + const shownProducts = useMemo(() => { + return products.filter((product) => { + return Object.entries(filtering).every(([key, value]) => { + if (!value) { + return true + } + if (typeof value === "string") { + // @ts-ignore + return product[key].toString().toLowerCase().includes(value.toString().toLowerCase()) + } + if (Array.isArray(value)) { + // @ts-ignore + return value.includes(product[key].toLowerCase()) + } + if (typeof value === "object") { + // @ts-ignore + const date = new Date(product[key]) + let matching = false + if ("$gte" in value && value.$gte) { + matching = date >= new Date(value.$gte as number) + } + if ("$lte" in value && value.$lte) { + matching = date <= new Date(value.$lte as number) + } + if ("$lt" in value && value.$lt) { + matching = date < new Date(value.$lt as number) + } + if ("$gt" in value && value.$gt) { + matching = date > new Date(value.$gt as number) + } + return matching + } + }) + }) + }, [filtering]) + + const table = useDataTable({ + data: shownProducts, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + filtering: { + state: filtering, + onFilteringChange: setFiltering, + }, + filters + }); + + return ( + + + Products + {/** This component will render a menu that allows the user to choose which filters to apply to the table data. **/} + + + + + ); +}; \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-filters-initial.tsx b/www/apps/ui/src/examples/data-table-filters-initial.tsx new file mode 100644 index 0000000000..50469e4bc9 --- /dev/null +++ b/www/apps/ui/src/examples/data-table-filters-initial.tsx @@ -0,0 +1,107 @@ +import { DataTable, DataTableFilteringState, Heading, createDataTableColumnHelper, createDataTableFilterHelper, useDataTable } from "@medusajs/ui" +import { useMemo, useState } from "react" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10 + }, + { + id: "2", + title: "Pants", + price: 20 + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + enableSorting: true, + }), +] + +const filterHelper = createDataTableFilterHelper() + +const filters = [ + filterHelper.accessor("title", { + type: "select", + label: "Title", + options: products.map((product) => ({ + label: product.title, + value: product.title.toLowerCase() + })) + }), +] + +export default function ProductTable () { + const [filtering, setFiltering] = useState({ + title: ["shirt"] + }) + + const shownProducts = useMemo(() => { + return products.filter((product) => { + return Object.entries(filtering).every(([key, value]) => { + if (!value) { + return true + } + if (typeof value === "string") { + // @ts-ignore + return product[key].toString().toLowerCase().includes(value.toString().toLowerCase()) + } + if (Array.isArray(value)) { + // @ts-ignore + return value.includes(product[key].toLowerCase()) + } + if (typeof value === "object") { + // @ts-ignore + const date = new Date(product[key]) + let matching = false + if ("$gte" in value && value.$gte) { + matching = date >= new Date(value.$gte as number) + } + if ("$lte" in value && value.$lte) { + matching = date <= new Date(value.$lte as number) + } + if ("$lt" in value && value.$lt) { + matching = date < new Date(value.$lt as number) + } + if ("$gt" in value && value.$gt) { + matching = date > new Date(value.$gt as number) + } + return matching + } + }) + }) + }, [filtering]) + + const table = useDataTable({ + data: shownProducts, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + filtering: { + state: filtering, + onFilteringChange: setFiltering, + }, + filters + }); + + return ( + + + Products + {/** This component will render a menu that allows the user to choose which filters to apply to the table data. **/} + + + + + ); +}; \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-filters.tsx b/www/apps/ui/src/examples/data-table-filters.tsx new file mode 100644 index 0000000000..6d3f47963e --- /dev/null +++ b/www/apps/ui/src/examples/data-table-filters.tsx @@ -0,0 +1,105 @@ +import { DataTable, DataTableFilteringState, Heading, createDataTableColumnHelper, createDataTableFilterHelper, useDataTable } from "@medusajs/ui" +import { useMemo, useState } from "react" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10 + }, + { + id: "2", + title: "Pants", + price: 20 + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + enableSorting: true, + }), +] + +const filterHelper = createDataTableFilterHelper() + +const filters = [ + filterHelper.accessor("title", { + type: "select", + label: "Title", + options: products.map((product) => ({ + label: product.title, + value: product.title.toLowerCase() + })) + }), +] + +export default function ProductTable () { + const [filtering, setFiltering] = useState({}) + + const shownProducts = useMemo(() => { + return products.filter((product) => { + return Object.entries(filtering).every(([key, value]) => { + if (!value) { + return true + } + if (typeof value === "string") { + // @ts-ignore + return product[key].toString().toLowerCase().includes(value.toString().toLowerCase()) + } + if (Array.isArray(value)) { + // @ts-ignore + return value.includes(product[key].toLowerCase()) + } + if (typeof value === "object") { + // @ts-ignore + const date = new Date(product[key]) + let matching = false + if ("$gte" in value && value.$gte) { + matching = date >= new Date(value.$gte as number) + } + if ("$lte" in value && value.$lte) { + matching = date <= new Date(value.$lte as number) + } + if ("$lt" in value && value.$lt) { + matching = date < new Date(value.$lt as number) + } + if ("$gt" in value && value.$gt) { + matching = date > new Date(value.$gt as number) + } + return matching + } + }) + }) + }, [filtering]) + + const table = useDataTable({ + data: shownProducts, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + filtering: { + state: filtering, + onFilteringChange: setFiltering, + }, + filters + }); + + return ( + + + Products + {/** This component will render a menu that allows the user to choose which filters to apply to the table data. **/} + + + + + ); +}; \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-pagination.tsx b/www/apps/ui/src/examples/data-table-pagination.tsx new file mode 100644 index 0000000000..ab4b304796 --- /dev/null +++ b/www/apps/ui/src/examples/data-table-pagination.tsx @@ -0,0 +1,143 @@ +import { DataTable, Heading, createDataTableColumnHelper, useDataTable, type DataTablePaginationState } from "@medusajs/ui" +import { useMemo, useState } from "react" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10 + }, + { + id: "2", + title: "Pants", + price: 20 + }, + { + id: "3", + title: "Hat", + price: 15 + }, + { + id: "4", + title: "Socks", + price: 5 + }, + { + id: "5", + title: "Shoes", + price: 50 + }, + { + id: "6", + title: "Jacket", + price: 100 + }, + { + id: "7", + title: "Scarf", + price: 25 + }, + { + id: "8", + title: "Gloves", + price: 12 + }, + { + id: "9", + title: "Belt", + price: 18 + }, + { + id: "10", + title: "Sunglasses", + price: 30 + }, + { + id: "11", + title: "Watch", + price: 200 + }, + { + id: "12", + title: "Tie", + price: 20 + }, + { + id: "13", + title: "Sweater", + price: 40 + }, + { + id: "14", + title: "Jeans", + price: 60 + }, + { + id: "15", + title: "Shorts", + price: 25 + }, + { + id: "16", + title: "Blouse", + price: 35 + }, + { + id: "17", + title: "Dress", + price: 80 + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + enableSorting: true, + }), +] + +const PAGE_SIZE = 10; + +export default function ProductTable () { + const [pagination, setPagination] = useState({ + pageSize: PAGE_SIZE, + pageIndex: 0, + }) + + const shownProducts = useMemo(() => { + return products.slice( + pagination.pageIndex * pagination.pageSize, + (pagination.pageIndex + 1) * pagination.pageSize + ) + }, [pagination]) + + const table = useDataTable({ + data: shownProducts, + columns, + rowCount: products.length, + getRowId: (product) => product.id, + pagination: { + // Pass the pagination state and updater to the table instance + state: pagination, + onPaginationChange: setPagination, + }, + isLoading: false, + }); + + return ( + + + Products + + + {/** This component will render the pagination controls **/} + + + ); +}; \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-search.tsx b/www/apps/ui/src/examples/data-table-search.tsx new file mode 100644 index 0000000000..e5a45d4e95 --- /dev/null +++ b/www/apps/ui/src/examples/data-table-search.tsx @@ -0,0 +1,60 @@ +import { createDataTableColumnHelper, useDataTable, DataTable, Heading } from "@medusajs/ui" +import { useMemo, useState } from "react" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10 + }, + { + id: "2", + title: "Pants", + price: 20 + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + enableSorting: true, + }), + columnHelper.accessor("price", { + header: "Price", + enableSorting: true, + }), +] + +export default function ProductTable () { + const [search, setSearch] = useState("") + + const shownProducts = useMemo(() => { + return products.filter((product) => product.title.toLowerCase().includes(search.toLowerCase())) + }, [search]) + + const table = useDataTable({ + columns, + data: shownProducts, + getRowId: (product) => product.id, + rowCount: products.length, + isLoading: false, + // Pass the state and onSearchChange to the table instance. + search: { + state: search, + onSearchChange: setSearch + } + }) + + return ( + + + Products + {/* This component renders the search bar */} + + + + + ) +} \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-sorting-initial.tsx b/www/apps/ui/src/examples/data-table-sorting-initial.tsx new file mode 100644 index 0000000000..f003b3f6db --- /dev/null +++ b/www/apps/ui/src/examples/data-table-sorting-initial.tsx @@ -0,0 +1,85 @@ +import { DataTable, DataTableSortingState, Heading, createDataTableColumnHelper, useDataTable } from "@medusajs/ui" +import { useMemo, useState } from "react" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10 + }, + { + id: "2", + title: "Pants", + price: 20 + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + // Enables sorting for the column. + enableSorting: true, + // If omitted, the header will be used instead if it's a string, + // otherwise the accessor key (id) will be used. + sortLabel: "Title", + // If omitted the default value will be "A-Z" + sortAscLabel: "A-Z", + // If omitted the default value will be "Z-A" + sortDescLabel: "Z-A", + }), + columnHelper.accessor("price", { + header: "Price", + }), +] + +export default function ProductTable () { + const [sorting, setSorting] = useState({ + id: "title", + desc: false, + }) + + const shownProducts = useMemo(() => { + if (!sorting) { + return products + } + return products.slice().sort((a, b) => { + // @ts-ignore + const aVal = a[sorting.id] + // @ts-ignore + const bVal = b[sorting.id] + if (aVal < bVal) { + return sorting.desc ? 1 : -1 + } + if (aVal > bVal) { + return sorting.desc ? -1 : 1 + } + return 0 + }) + }, [sorting]) + + const table = useDataTable({ + data: shownProducts, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + sorting: { + // Pass the pagination state and updater to the table instance + state: sorting, + onSortingChange: setSorting, + }, + isLoading: false, + }) + + return ( + + + Products + {/** This component will render a menu that allows the user to choose which column to sort by and in what direction. **/} + + + + + ); +}; \ No newline at end of file diff --git a/www/apps/ui/src/examples/data-table-sorting.tsx b/www/apps/ui/src/examples/data-table-sorting.tsx new file mode 100644 index 0000000000..a9b9469e44 --- /dev/null +++ b/www/apps/ui/src/examples/data-table-sorting.tsx @@ -0,0 +1,82 @@ +import { DataTable, DataTableSortingState, Heading, createDataTableColumnHelper, useDataTable } from "@medusajs/ui" +import { useMemo, useState } from "react" + +const products = [ + { + id: "1", + title: "Shirt", + price: 10 + }, + { + id: "2", + title: "Pants", + price: 20 + } +] + +const columnHelper = createDataTableColumnHelper() + +const columns = [ + columnHelper.accessor("title", { + header: "Title", + // Enables sorting for the column. + enableSorting: true, + // If omitted, the header will be used instead if it's a string, + // otherwise the accessor key (id) will be used. + sortLabel: "Title", + // If omitted the default value will be "A-Z" + sortAscLabel: "A-Z", + // If omitted the default value will be "Z-A" + sortDescLabel: "Z-A", + }), + columnHelper.accessor("price", { + header: "Price", + }), +] + +export default function ProductTable () { + const [sorting, setSorting] = useState(null); + + const shownProducts = useMemo(() => { + if (!sorting) { + return products + } + return products.slice().sort((a, b) => { + // @ts-ignore + const aVal = a[sorting.id] + // @ts-ignore + const bVal = b[sorting.id] + if (aVal < bVal) { + return sorting.desc ? 1 : -1 + } + if (aVal > bVal) { + return sorting.desc ? -1 : 1 + } + return 0 + }) + }, [sorting]) + + const table = useDataTable({ + data: shownProducts, + columns, + getRowId: (product) => product.id, + rowCount: products.length, + sorting: { + // Pass the pagination state and updater to the table instance + state: sorting, + onSortingChange: setSorting, + }, + isLoading: false, + }) + + return ( + + + Products + {/** This component will render a menu that allows the user to choose which column to sort by and in what direction. **/} + + + + + ); +}; \ No newline at end of file diff --git a/www/apps/ui/src/registries/example-registry.tsx b/www/apps/ui/src/registries/example-registry.tsx index bb571019f4..e0878ca2ce 100644 --- a/www/apps/ui/src/registries/example-registry.tsx +++ b/www/apps/ui/src/registries/example-registry.tsx @@ -83,15 +83,75 @@ export const ExampleRegistry: Record = { file: "src/examples/badge-large.tsx", }, "badge-rounded-full": { - name: "badge-rounded", + name: "badge-rounded-full", component: React.lazy(async () => import("@/examples/badge-rounded-full")), file: "src/examples/badge-rounded-full.tsx", }, "badge-rounded-base": { - name: "badge-rounded", + name: "badge-rounded-base", component: React.lazy(async () => import("@/examples/badge-rounded-base")), file: "src/examples/badge-rounded-base.tsx", }, + "data-table-demo": { + name: "data-table-demo", + component: React.lazy(async () => import("@/examples/data-table-demo")), + file: "src/examples/data-table-demo.tsx", + }, + "data-table-custom-cell": { + name: "data-table-custom-cell", + component: React.lazy( + async () => import("@/examples/data-table-custom-cell") + ), + file: "src/examples/data-table-custom-cell.tsx", + }, + "data-table-search": { + name: "data-table-search", + component: React.lazy(async () => import("@/examples/data-table-search")), + file: "src/examples/data-table-search.tsx", + }, + "data-table-pagination": { + name: "data-table-pagination", + component: React.lazy( + async () => import("@/examples/data-table-pagination") + ), + file: "src/examples/data-table-pagination.tsx", + }, + "data-table-filters": { + name: "data-table-filters", + component: React.lazy(async () => import("@/examples/data-table-filters")), + file: "src/examples/data-table-filters.tsx", + }, + "data-table-filters-date": { + name: "data-table-filters-date", + component: React.lazy( + async () => import("@/examples/data-table-filters-date") + ), + file: "src/examples/data-table-filters-date.tsx", + }, + "data-table-filters-initial": { + name: "data-table-filters-initial", + component: React.lazy( + async () => import("@/examples/data-table-filters-initial") + ), + file: "src/examples/data-table-filters-initial.tsx", + }, + "data-table-sorting": { + name: "data-table-sorting", + component: React.lazy(async () => import("@/examples/data-table-sorting")), + file: "src/examples/data-table-sorting.tsx", + }, + "data-table-sorting-initial": { + name: "data-table-sorting-initial", + component: React.lazy( + async () => import("@/examples/data-table-sorting-initial") + ), + file: "src/examples/data-table-sorting-initial.tsx", + }, + "data-table-commands": { + name: "data-table-commands", + component: React.lazy(async () => import("@/examples/data-table-commands")), + file: "src/examples/data-table-commands.tsx", + }, "icon-badge-demo": { name: "icon-badge-demo", component: React.lazy(async () => import("@/examples/icon-badge-demo")), diff --git a/www/apps/ui/src/specs/DataTable/DataTable.ActionCell.json b/www/apps/ui/src/specs/DataTable/DataTable.ActionCell.json new file mode 100644 index 0000000000..5483b0f2c1 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.ActionCell.json @@ -0,0 +1,23 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTable.ActionCell", + "props": { + "ctx": { + "required": true, + "tsType": { + "name": "CellContext", + "elements": [ + { + "name": "TData" + }, + { + "name": "unknown" + } + ], + "raw": "CellContext" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.CommandBar.json b/www/apps/ui/src/specs/DataTable/DataTable.CommandBar.json new file mode 100644 index 0000000000..505adf43e4 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.CommandBar.json @@ -0,0 +1,23 @@ +{ + "description": "This component adds a command bar to the data table, which is used\nto show commands that can be executed on the selected rows.", + "methods": [], + "displayName": "DataTable.CommandBar", + "props": { + "selectedLabel": { + "required": false, + "tsType": { + "name": "union", + "raw": "((count: number) => string) | string", + "elements": [ + { + "name": "unknown" + }, + { + "name": "string" + } + ] + }, + "description": "The label to show when items are selected. If a function is passed, \nit will be called with the count of selected items." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.Filter.json b/www/apps/ui/src/specs/DataTable/DataTable.Filter.json new file mode 100644 index 0000000000..0baedf9af7 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.Filter.json @@ -0,0 +1,21 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTable.Filter", + "props": { + "id": { + "required": true, + "tsType": { + "name": "string" + }, + "description": "" + }, + "filter": { + "required": true, + "tsType": { + "name": "unknown" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.FilterBar.json b/www/apps/ui/src/specs/DataTable/DataTable.FilterBar.json new file mode 100644 index 0000000000..903c750456 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.FilterBar.json @@ -0,0 +1,18 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTable.FilterBar", + "props": { + "clearAllFiltersLabel": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "", + "defaultValue": { + "value": "\"Clear all\"", + "computed": false + } + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.FilterMenu.json b/www/apps/ui/src/specs/DataTable/DataTable.FilterMenu.json new file mode 100644 index 0000000000..f6e4c27431 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.FilterMenu.json @@ -0,0 +1,14 @@ +{ + "description": "This component adds a filter menu to the data table, allowing users\nto filter the table's data.", + "methods": [], + "displayName": "DataTable.FilterMenu", + "props": { + "tooltip": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "The tooltip to show when hovering over the filter menu." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.Pagination.json b/www/apps/ui/src/specs/DataTable/DataTable.Pagination.json new file mode 100644 index 0000000000..e075ca60e0 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.Pagination.json @@ -0,0 +1,15 @@ +{ + "description": "This component adds a pagination component and functionality to the data table.", + "methods": [], + "displayName": "DataTable.Pagination", + "props": { + "translations": { + "required": false, + "tsType": { + "name": "ReactComponentProps[\"translations\"]", + "raw": "React.ComponentProps[\"translations\"]" + }, + "description": "The translations for strings in the pagination component." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.Search.json b/www/apps/ui/src/specs/DataTable/DataTable.Search.json new file mode 100644 index 0000000000..5b5d7b25e7 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.Search.json @@ -0,0 +1,28 @@ +{ + "description": "This component adds a search input to the data table, allowing users\nto search through the table's data.", + "methods": [], + "displayName": "DataTable.Search", + "props": { + "autoFocus": { + "required": false, + "tsType": { + "name": "boolean" + }, + "description": "If true, the search input will be focused on mount." + }, + "className": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "Additional classes to pass to the search input." + }, + "placeholder": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "The placeholder text to show in the search input." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.SelectCell.json b/www/apps/ui/src/specs/DataTable/DataTable.SelectCell.json new file mode 100644 index 0000000000..ddabcab8e4 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.SelectCell.json @@ -0,0 +1,23 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTable.SelectCell", + "props": { + "ctx": { + "required": true, + "tsType": { + "name": "DataTableCellContext", + "elements": [ + { + "name": "TData" + }, + { + "name": "unknown" + } + ], + "raw": "DataTableCellContext" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.SortingIcon.json b/www/apps/ui/src/specs/DataTable/DataTable.SortingIcon.json new file mode 100644 index 0000000000..9af7d2a585 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.SortingIcon.json @@ -0,0 +1,24 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTable.SortingIcon", + "props": { + "direction": { + "required": true, + "tsType": { + "name": "union", + "raw": "DataTableSortDirection | false", + "elements": [ + { + "name": "DataTableSortDirection" + }, + { + "name": "literal", + "value": "false" + } + ] + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.SortingMenu.json b/www/apps/ui/src/specs/DataTable/DataTable.SortingMenu.json new file mode 100644 index 0000000000..412d6132b1 --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.SortingMenu.json @@ -0,0 +1,14 @@ +{ + "description": "This component adds a sorting menu to the data table, allowing users\nto sort the table's data.", + "methods": [], + "displayName": "DataTable.SortingMenu", + "props": { + "tooltip": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "The tooltip to show when hovering over the sorting menu." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.Table.json b/www/apps/ui/src/specs/DataTable/DataTable.Table.json new file mode 100644 index 0000000000..aa8c6e146c --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.Table.json @@ -0,0 +1,98 @@ +{ + "description": "This component renders the table in a data table, supporting advanced features.\nIt's useful to create tables similar to those in the Medusa Admin dashboard.", + "methods": [], + "displayName": "DataTable.Table", + "props": { + "emptyState": { + "required": false, + "tsType": { + "name": "signature", + "type": "object", + "raw": "{\n /**\n * The empty state to display when the table is filtered, but no rows are found.\n */\n filtered?: DataTableEmptyStateContent\n /**\n * The empty state to display when the table is empty.\n */\n empty?: DataTableEmptyStateContent\n}", + "signature": { + "properties": [ + { + "key": "filtered", + "value": { + "name": "signature", + "type": "object", + "raw": "{\n /**\n * The heading to display in the empty state.\n */\n heading?: string\n /**\n * The description to display in the empty state.\n */\n description?: string\n /**\n * A custom component to display in the empty state, if provided it will override the heading and description.\n */\n custom?: React.ReactNode\n}", + "signature": { + "properties": [ + { + "key": "heading", + "value": { + "name": "string", + "required": false + }, + "description": "The heading to display in the empty state." + }, + { + "key": "description", + "value": { + "name": "string", + "required": false + }, + "description": "The description to display in the empty state." + }, + { + "key": "custom", + "value": { + "name": "ReactReactNode", + "raw": "React.ReactNode", + "required": false + }, + "description": "A custom component to display in the empty state, if provided it will override the heading and description." + } + ] + }, + "required": false + }, + "description": "The empty state to display when the table is filtered, but no rows are found." + }, + { + "key": "empty", + "value": { + "name": "signature", + "type": "object", + "raw": "{\n /**\n * The heading to display in the empty state.\n */\n heading?: string\n /**\n * The description to display in the empty state.\n */\n description?: string\n /**\n * A custom component to display in the empty state, if provided it will override the heading and description.\n */\n custom?: React.ReactNode\n}", + "signature": { + "properties": [ + { + "key": "heading", + "value": { + "name": "string", + "required": false + }, + "description": "The heading to display in the empty state." + }, + { + "key": "description", + "value": { + "name": "string", + "required": false + }, + "description": "The description to display in the empty state." + }, + { + "key": "custom", + "value": { + "name": "ReactReactNode", + "raw": "React.ReactNode", + "required": false + }, + "description": "A custom component to display in the empty state, if provided it will override the heading and description." + } + ] + }, + "required": false + }, + "description": "The empty state to display when the table is empty." + } + ] + } + }, + "description": "The empty state to display when the table is empty." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTable/DataTable.json b/www/apps/ui/src/specs/DataTable/DataTable.json new file mode 100644 index 0000000000..00c31c353e --- /dev/null +++ b/www/apps/ui/src/specs/DataTable/DataTable.json @@ -0,0 +1,35 @@ +{ + "description": "This component creates a data table with filters, pagination, sorting, and more.\nIt's built on top of the `Table` component while expanding its functionality.", + "methods": [], + "displayName": "DataTable", + "props": { + "instance": { + "required": true, + "tsType": { + "name": "UseDataTableReturn", + "elements": [ + { + "name": "TData" + } + ], + "raw": "UseDataTableReturn" + }, + "description": "The instance returned by the `useDataTable` hook." + }, + "children": { + "required": false, + "tsType": { + "name": "ReactReactNode", + "raw": "React.ReactNode" + }, + "description": "The children of the component." + }, + "className": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "Additional classes to pass to the wrapper `div` of the component." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableContextProvider/DataTableContextProvider.json b/www/apps/ui/src/specs/DataTableContextProvider/DataTableContextProvider.json new file mode 100644 index 0000000000..e8de08824f --- /dev/null +++ b/www/apps/ui/src/specs/DataTableContextProvider/DataTableContextProvider.json @@ -0,0 +1,28 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableContextProvider", + "props": { + "instance": { + "required": true, + "tsType": { + "name": "UseDataTableReturn", + "elements": [ + { + "name": "TData" + } + ], + "raw": "UseDataTableReturn" + }, + "description": "" + }, + "children": { + "required": true, + "tsType": { + "name": "ReactReactNode", + "raw": "React.ReactNode" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableEmptyStateDisplay/DataTableEmptyStateDisplay.json b/www/apps/ui/src/specs/DataTableEmptyStateDisplay/DataTableEmptyStateDisplay.json new file mode 100644 index 0000000000..e6d71682b1 --- /dev/null +++ b/www/apps/ui/src/specs/DataTableEmptyStateDisplay/DataTableEmptyStateDisplay.json @@ -0,0 +1,105 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableEmptyStateDisplay", + "props": { + "state": { + "required": true, + "tsType": { + "name": "DataTableEmptyState" + }, + "description": "" + }, + "props": { + "required": false, + "tsType": { + "name": "signature", + "type": "object", + "raw": "{\n /**\n * The empty state to display when the table is filtered, but no rows are found.\n */\n filtered?: DataTableEmptyStateContent\n /**\n * The empty state to display when the table is empty.\n */\n empty?: DataTableEmptyStateContent\n}", + "signature": { + "properties": [ + { + "key": "filtered", + "value": { + "name": "signature", + "type": "object", + "raw": "{\n /**\n * The heading to display in the empty state.\n */\n heading?: string\n /**\n * The description to display in the empty state.\n */\n description?: string\n /**\n * A custom component to display in the empty state, if provided it will override the heading and description.\n */\n custom?: React.ReactNode\n}", + "signature": { + "properties": [ + { + "key": "heading", + "value": { + "name": "string", + "required": false + }, + "description": "The heading to display in the empty state." + }, + { + "key": "description", + "value": { + "name": "string", + "required": false + }, + "description": "The description to display in the empty state." + }, + { + "key": "custom", + "value": { + "name": "ReactReactNode", + "raw": "React.ReactNode", + "required": false + }, + "description": "A custom component to display in the empty state, if provided it will override the heading and description." + } + ] + }, + "required": false + }, + "description": "The empty state to display when the table is filtered, but no rows are found." + }, + { + "key": "empty", + "value": { + "name": "signature", + "type": "object", + "raw": "{\n /**\n * The heading to display in the empty state.\n */\n heading?: string\n /**\n * The description to display in the empty state.\n */\n description?: string\n /**\n * A custom component to display in the empty state, if provided it will override the heading and description.\n */\n custom?: React.ReactNode\n}", + "signature": { + "properties": [ + { + "key": "heading", + "value": { + "name": "string", + "required": false + }, + "description": "The heading to display in the empty state." + }, + { + "key": "description", + "value": { + "name": "string", + "required": false + }, + "description": "The description to display in the empty state." + }, + { + "key": "custom", + "value": { + "name": "ReactReactNode", + "raw": "React.ReactNode", + "required": false + }, + "description": "A custom component to display in the empty state, if provided it will override the heading and description." + } + ] + }, + "required": false + }, + "description": "The empty state to display when the table is empty." + } + ] + } + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableFilterBarSkeleton/DataTableFilterBarSkeleton.json b/www/apps/ui/src/specs/DataTableFilterBarSkeleton/DataTableFilterBarSkeleton.json new file mode 100644 index 0000000000..0a468283ba --- /dev/null +++ b/www/apps/ui/src/specs/DataTableFilterBarSkeleton/DataTableFilterBarSkeleton.json @@ -0,0 +1,14 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableFilterBarSkeleton", + "props": { + "filterCount": { + "required": true, + "tsType": { + "name": "number" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableFilterDateContent/DataTableFilterDateContent.json b/www/apps/ui/src/specs/DataTableFilterDateContent/DataTableFilterDateContent.json new file mode 100644 index 0000000000..66f76645d3 --- /dev/null +++ b/www/apps/ui/src/specs/DataTableFilterDateContent/DataTableFilterDateContent.json @@ -0,0 +1,135 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableFilterDateContent", + "props": { + "id": { + "required": true, + "tsType": { + "name": "string" + }, + "description": "" + }, + "filter": { + "required": true, + "tsType": { + "name": "unknown" + }, + "description": "" + }, + "options": { + "required": true, + "tsType": { + "name": "Array", + "elements": [ + { + "name": "DataTableFilterOption", + "elements": [ + { + "name": "DataTableDateComparisonOperator" + } + ], + "raw": "DataTableFilterOption" + } + ], + "raw": "DataTableFilterOption[]" + }, + "description": "" + }, + "isCustom": { + "required": true, + "tsType": { + "name": "boolean" + }, + "description": "" + }, + "setIsCustom": { + "required": true, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(isCustom: boolean) => void", + "signature": { + "arguments": [ + { + "type": { + "name": "boolean" + }, + "name": "isCustom" + } + ], + "return": { + "name": "void" + } + } + }, + "description": "" + }, + "format": { + "defaultValue": { + "value": "\"date\"", + "computed": false + }, + "description": "", + "tsType": { + "name": "union", + "raw": "\"date\" \\| \"date-time\"", + "elements": [ + { + "name": "literal", + "value": "\"date\"" + }, + { + "name": "literal", + "value": "\"date-time\"" + } + ] + }, + "required": false + }, + "rangeOptionLabel": { + "defaultValue": { + "value": "\"Custom\"", + "computed": false + }, + "description": "", + "tsType": { + "name": "string" + }, + "required": false + }, + "rangeOptionStartLabel": { + "defaultValue": { + "value": "\"Starting\"", + "computed": false + }, + "description": "", + "tsType": { + "name": "string" + }, + "required": false + }, + "rangeOptionEndLabel": { + "defaultValue": { + "value": "\"Ending\"", + "computed": false + }, + "description": "", + "tsType": { + "name": "string" + }, + "required": false + }, + "disableRangeOption": { + "defaultValue": { + "value": "false", + "computed": false + }, + "description": "", + "tsType": { + "name": "boolean" + }, + "required": false + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableFilterMenuSkeleton/DataTableFilterMenuSkeleton.json b/www/apps/ui/src/specs/DataTableFilterMenuSkeleton/DataTableFilterMenuSkeleton.json new file mode 100644 index 0000000000..9bf6a6f011 --- /dev/null +++ b/www/apps/ui/src/specs/DataTableFilterMenuSkeleton/DataTableFilterMenuSkeleton.json @@ -0,0 +1,6 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableFilterMenuSkeleton", + "props": {} +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableFilterRadioContent/DataTableFilterRadioContent.json b/www/apps/ui/src/specs/DataTableFilterRadioContent/DataTableFilterRadioContent.json new file mode 100644 index 0000000000..c79aee614a --- /dev/null +++ b/www/apps/ui/src/specs/DataTableFilterRadioContent/DataTableFilterRadioContent.json @@ -0,0 +1,40 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableFilterRadioContent", + "props": { + "id": { + "required": true, + "tsType": { + "name": "string" + }, + "description": "" + }, + "filter": { + "required": true, + "tsType": { + "name": "unknown" + }, + "description": "" + }, + "options": { + "required": true, + "tsType": { + "name": "Array", + "elements": [ + { + "name": "DataTableFilterOption", + "elements": [ + { + "name": "string" + } + ], + "raw": "DataTableFilterOption" + } + ], + "raw": "DataTableFilterOption[]" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableFilterSelectContent/DataTableFilterSelectContent.json b/www/apps/ui/src/specs/DataTableFilterSelectContent/DataTableFilterSelectContent.json new file mode 100644 index 0000000000..79e4da7198 --- /dev/null +++ b/www/apps/ui/src/specs/DataTableFilterSelectContent/DataTableFilterSelectContent.json @@ -0,0 +1,50 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableFilterSelectContent", + "props": { + "id": { + "required": true, + "tsType": { + "name": "string" + }, + "description": "" + }, + "filter": { + "required": false, + "tsType": { + "name": "Array", + "elements": [ + { + "name": "string" + } + ], + "raw": "string[]" + }, + "description": "", + "defaultValue": { + "value": "[]", + "computed": false + } + }, + "options": { + "required": true, + "tsType": { + "name": "Array", + "elements": [ + { + "name": "DataTableFilterOption", + "elements": [ + { + "name": "string" + } + ], + "raw": "DataTableFilterOption" + } + ], + "raw": "DataTableFilterOption[]" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTablePaginationSkeleton/DataTablePaginationSkeleton.json b/www/apps/ui/src/specs/DataTablePaginationSkeleton/DataTablePaginationSkeleton.json new file mode 100644 index 0000000000..c6f652999c --- /dev/null +++ b/www/apps/ui/src/specs/DataTablePaginationSkeleton/DataTablePaginationSkeleton.json @@ -0,0 +1,6 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTablePaginationSkeleton", + "props": {} +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableSearchSkeleton/DataTableSearchSkeleton.json b/www/apps/ui/src/specs/DataTableSearchSkeleton/DataTableSearchSkeleton.json new file mode 100644 index 0000000000..78ef0daecc --- /dev/null +++ b/www/apps/ui/src/specs/DataTableSearchSkeleton/DataTableSearchSkeleton.json @@ -0,0 +1,6 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableSearchSkeleton", + "props": {} +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableSelectHeader/DataTableSelectHeader.json b/www/apps/ui/src/specs/DataTableSelectHeader/DataTableSelectHeader.json new file mode 100644 index 0000000000..97efb08a1d --- /dev/null +++ b/www/apps/ui/src/specs/DataTableSelectHeader/DataTableSelectHeader.json @@ -0,0 +1,23 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableSelectHeader", + "props": { + "ctx": { + "required": true, + "tsType": { + "name": "DataTableHeaderContext", + "elements": [ + { + "name": "TData" + }, + { + "name": "unknown" + } + ], + "raw": "DataTableHeaderContext" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableSortingMenuSkeleton/DataTableSortingMenuSkeleton.json b/www/apps/ui/src/specs/DataTableSortingMenuSkeleton/DataTableSortingMenuSkeleton.json new file mode 100644 index 0000000000..502acba853 --- /dev/null +++ b/www/apps/ui/src/specs/DataTableSortingMenuSkeleton/DataTableSortingMenuSkeleton.json @@ -0,0 +1,6 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableSortingMenuSkeleton", + "props": {} +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableTableSkeleton/DataTableTableSkeleton.json b/www/apps/ui/src/specs/DataTableTableSkeleton/DataTableTableSkeleton.json new file mode 100644 index 0000000000..c130cc0164 --- /dev/null +++ b/www/apps/ui/src/specs/DataTableTableSkeleton/DataTableTableSkeleton.json @@ -0,0 +1,18 @@ +{ + "description": "", + "methods": [], + "displayName": "DataTableTableSkeleton", + "props": { + "pageSize": { + "required": false, + "tsType": { + "name": "number" + }, + "description": "", + "defaultValue": { + "value": "10", + "computed": false + } + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DataTableToolbar/DataTableToolbar.json b/www/apps/ui/src/specs/DataTableToolbar/DataTableToolbar.json new file mode 100644 index 0000000000..8c43e1fb7b --- /dev/null +++ b/www/apps/ui/src/specs/DataTableToolbar/DataTableToolbar.json @@ -0,0 +1,29 @@ +{ + "description": "Toolbar shown for the data table.", + "methods": [], + "displayName": "DataTableToolbar", + "props": { + "className": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "Additional classes to pass to the wrapper `div` of the component." + }, + "children": { + "required": false, + "tsType": { + "name": "ReactReactNode", + "raw": "React.ReactNode" + }, + "description": "The children to show in the toolbar." + }, + "translations": { + "required": false, + "tsType": { + "name": "DataTableToolbarTranslations" + }, + "description": "The translations of strings in the toolbar." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/DefaultEmptyStateContent/DefaultEmptyStateContent.json b/www/apps/ui/src/specs/DefaultEmptyStateContent/DefaultEmptyStateContent.json new file mode 100644 index 0000000000..45385e475e --- /dev/null +++ b/www/apps/ui/src/specs/DefaultEmptyStateContent/DefaultEmptyStateContent.json @@ -0,0 +1,29 @@ +{ + "description": "", + "methods": [], + "displayName": "DefaultEmptyStateContent", + "props": { + "heading": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "The heading to display in the empty state." + }, + "description": { + "required": false, + "tsType": { + "name": "string" + }, + "description": "The description to display in the empty state." + }, + "custom": { + "required": false, + "tsType": { + "name": "ReactReactNode", + "raw": "React.ReactNode" + }, + "description": "A custom component to display in the empty state, if provided it will override the heading and description." + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/OptionButton/OptionButton.json b/www/apps/ui/src/specs/OptionButton/OptionButton.json new file mode 100644 index 0000000000..258444cb9d --- /dev/null +++ b/www/apps/ui/src/specs/OptionButton/OptionButton.json @@ -0,0 +1,95 @@ +{ + "description": "", + "methods": [], + "displayName": "OptionButton", + "props": { + "index": { + "required": true, + "tsType": { + "name": "number" + }, + "description": "" + }, + "option": { + "required": true, + "tsType": { + "name": "DataTableFilterOption", + "elements": [ + { + "name": "union", + "raw": "string | DataTableDateComparisonOperator", + "elements": [ + { + "name": "string" + }, + { + "name": "DataTableDateComparisonOperator" + } + ] + } + ], + "raw": "DataTableFilterOption" + }, + "description": "" + }, + "isSelected": { + "required": true, + "tsType": { + "name": "boolean" + }, + "description": "" + }, + "isFocused": { + "required": true, + "tsType": { + "name": "boolean" + }, + "description": "" + }, + "onClick": { + "required": true, + "tsType": { + "name": "signature", + "type": "function", + "raw": "() => void", + "signature": { + "arguments": [], + "return": { + "name": "void" + } + } + }, + "description": "" + }, + "onMouseEvent": { + "required": true, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(idx: number) => void", + "signature": { + "arguments": [ + { + "type": { + "name": "number" + }, + "name": "idx" + } + ], + "return": { + "name": "void" + } + } + }, + "description": "" + }, + "icon": { + "required": true, + "tsType": { + "name": "ReactElementType", + "raw": "React.ElementType" + }, + "description": "" + } + } +} \ No newline at end of file diff --git a/www/apps/ui/src/specs/Skeleton/Skeleton.json b/www/apps/ui/src/specs/Skeleton/Skeleton.json new file mode 100644 index 0000000000..653af18ea6 --- /dev/null +++ b/www/apps/ui/src/specs/Skeleton/Skeleton.json @@ -0,0 +1,6 @@ +{ + "description": "", + "methods": [], + "displayName": "Skeleton", + "props": {} +} \ No newline at end of file diff --git a/www/packages/docs-ui/package.json b/www/packages/docs-ui/package.json index ab5be64b8e..fb6ca056a4 100644 --- a/www/packages/docs-ui/package.json +++ b/www/packages/docs-ui/package.json @@ -57,8 +57,8 @@ }, "dependencies": { "@emotion/is-prop-valid": "^1.3.1", - "@medusajs/icons": "~2.0.0", - "@medusajs/ui": "~4.0.0", + "@medusajs/icons": "~2.4.0", + "@medusajs/ui": "~4.0.4", "@next/third-parties": "15.0.4", "@octokit/request": "^8.1.1", "@react-hook/resize-observer": "^1.2.6", diff --git a/www/packages/tailwind/package.json b/www/packages/tailwind/package.json index 99e3746401..c1981f2030 100644 --- a/www/packages/tailwind/package.json +++ b/www/packages/tailwind/package.json @@ -12,7 +12,7 @@ "postcss.config.js" ], "dependencies": { - "@medusajs/ui-preset": "~1.1.2", + "@medusajs/ui-preset": "~2.4.0", "tailwindcss-animate": "^1.0.7" }, "peerDependencies": { diff --git a/www/yarn.lock b/www/yarn.lock index 9f3c9ddd01..de85a6de52 100644 --- a/www/yarn.lock +++ b/www/yarn.lock @@ -480,7 +480,7 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.13.10, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.7, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": +"@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.21.0, @babel/runtime@npm:^7.23.7, @babel/runtime@npm:^7.5.5, @babel/runtime@npm:^7.8.7": version: 7.23.9 resolution: "@babel/runtime@npm:7.23.9" dependencies: @@ -1356,15 +1356,6 @@ __metadata: languageName: node linkType: hard -"@internationalized/date@npm:^3.5.2": - version: 3.5.2 - resolution: "@internationalized/date@npm:3.5.2" - dependencies: - "@swc/helpers": ^0.5.0 - checksum: abfca0dbaf4187713761e97b39c44b0766e40304bfaa1c4ce9f9ef051d9fdb0d4607a46bb0a9c5b22136bea806d46ef6ffa6262593a9e540ebd2ebd2b372ca6e - languageName: node - linkType: hard - "@internationalized/date@npm:^3.5.6": version: 3.5.6 resolution: "@internationalized/date@npm:3.5.6" @@ -1374,16 +1365,6 @@ __metadata: languageName: node linkType: hard -"@internationalized/message@npm:^3.1.2": - version: 3.1.2 - resolution: "@internationalized/message@npm:3.1.2" - dependencies: - "@swc/helpers": ^0.5.0 - intl-messageformat: ^10.1.0 - checksum: e634e3ae2d800710e80a3b7c67b684a88905703e6617e037897a0fc53b384083e58d9fd42b2c8edf7a3b59f55491bb013a6e53d9f9788bf00de3697416f8b77a - languageName: node - linkType: hard - "@internationalized/message@npm:^3.1.5": version: 3.1.5 resolution: "@internationalized/message@npm:3.1.5" @@ -1394,15 +1375,6 @@ __metadata: languageName: node linkType: hard -"@internationalized/number@npm:^3.5.1": - version: 3.5.1 - resolution: "@internationalized/number@npm:3.5.1" - dependencies: - "@swc/helpers": ^0.5.0 - checksum: 14427e675f84b51a6f951840bc28bf6bc03a7401cdf38f917e17fbbd70a736f83c001a44387212def6ce5d6301c4b4227df350aa39018eac1922bfcd8e7a7813 - languageName: node - linkType: hard - "@internationalized/number@npm:^3.5.4": version: 3.5.4 resolution: "@internationalized/number@npm:3.5.4" @@ -1412,15 +1384,6 @@ __metadata: languageName: node linkType: hard -"@internationalized/string@npm:^3.2.1": - version: 3.2.1 - resolution: "@internationalized/string@npm:3.2.1" - dependencies: - "@swc/helpers": ^0.5.0 - checksum: 6323a703a2e547cc86557ba3a189c17e6bf1668087a234436eecea7e21cb21aea84a9bb5ddecc71828af34010d89f8d327ef01ce55a4809ad5e75663d93af539 - languageName: node - linkType: hard - "@internationalized/string@npm:^3.2.4": version: 3.2.4 resolution: "@internationalized/string@npm:3.2.4" @@ -1676,24 +1639,6 @@ __metadata: languageName: node linkType: hard -"@medusajs/icons@npm:^1.2.2": - version: 1.2.2 - resolution: "@medusajs/icons@npm:1.2.2" - peerDependencies: - react: ^16.x || ^17.x || ^18.x - checksum: 610117b959ddbd68f927caa12e70fb5fc849e8c68a25ca38f4d137aca1363f36552455aa83669847bd42753cccf36ad57b82f9bd5be7794e5b23af1046f78967 - languageName: node - linkType: hard - -"@medusajs/icons@npm:^2.2.0": - version: 2.3.1 - resolution: "@medusajs/icons@npm:2.3.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc - checksum: ad37dc6061e89661b6a1158edceb8efa3106b5a8fe0284e600372133ca42a16d4f8c9575066d94cf07facf0ed28a20abf06b2d7f20cdf8b744b9eaa564322ee5 - languageName: node - linkType: hard - "@medusajs/icons@npm:~2.0.0": version: 2.0.7 resolution: "@medusajs/icons@npm:2.0.7" @@ -1703,63 +1648,32 @@ __metadata: languageName: node linkType: hard -"@medusajs/ui-preset@npm:~1.1.2, @medusajs/ui-preset@npm:~1.1.3": - version: 1.1.4 - resolution: "@medusajs/ui-preset@npm:1.1.4" +"@medusajs/icons@npm:~2.4.0": + version: 2.4.0 + resolution: "@medusajs/icons@npm:2.4.0" + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc + checksum: 2cfe2b1913e79a92247ce09becd5c9a7d67b45fb23d59519ffc0b515df82e12646f9c4e2de7c320120fe298540cf9ad60ca24f2ff9a2f91b583c92405f58e801 + languageName: node + linkType: hard + +"@medusajs/ui-preset@npm:~2.4.0": + version: 2.4.0 + resolution: "@medusajs/ui-preset@npm:2.4.0" dependencies: "@tailwindcss/forms": ^0.5.3 tailwindcss-animate: ^1.0.6 peerDependencies: tailwindcss: ">=3.0.0" - checksum: 49ffcecc49c9971fe4e195b46fde3da9c3c0e8e12c7cbf0ab6186ffd71a4027019603e72496288d32742add61905e621318d379ac2dcaea6ed2d0330efecbe3c + checksum: 1a6c35578c2510a5eaaba77d1d4f30a847960ae1d383e845a390493fac0ceec31257e56b4099c18e67d3509f4dff7a440b51d92a1933b7d05606c295f4ebd193 languageName: node linkType: hard -"@medusajs/ui@npm:~3.0.0": - version: 3.0.1 - resolution: "@medusajs/ui@npm:3.0.1" +"@medusajs/ui@npm:~4.0.4": + version: 4.0.4 + resolution: "@medusajs/ui@npm:4.0.4" dependencies: - "@medusajs/icons": ^1.2.2 - "@radix-ui/react-accordion": ^1.1.2 - "@radix-ui/react-alert-dialog": ^1.0.4 - "@radix-ui/react-avatar": ^1.0.3 - "@radix-ui/react-checkbox": ^1.0.4 - "@radix-ui/react-dialog": ^1.0.4 - "@radix-ui/react-dropdown-menu": ^2.0.5 - "@radix-ui/react-label": ^2.0.2 - "@radix-ui/react-popover": ^1.0.6 - "@radix-ui/react-portal": ^1.0.3 - "@radix-ui/react-radio-group": ^1.1.3 - "@radix-ui/react-scroll-area": ^1.0.4 - "@radix-ui/react-select": ^2.0.0 - "@radix-ui/react-slot": ^1.0.2 - "@radix-ui/react-switch": ^1.0.3 - "@radix-ui/react-tabs": ^1.0.4 - "@radix-ui/react-tooltip": ^1.0.6 - "@react-aria/datepicker": ^3.5.0 - "@react-stately/datepicker": ^3.5.0 - clsx: ^1.2.1 - copy-to-clipboard: ^3.3.3 - cva: 1.0.0-beta.1 - date-fns: ^2.30.0 - prism-react-renderer: ^2.0.6 - prismjs: ^1.29.0 - react-currency-input-field: ^3.6.11 - react-day-picker: ^8.8.0 - sonner: ^1.4.41 - tailwind-merge: ^2.2.1 - peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 - checksum: 07284402f4cb8c24937f4330c7217bf909fa0fb923f545cafbe24a8aa5a467d179d76d723c9faaea74516766444d6beb4ba8248496e70dbfd2750ea87383c9ad - languageName: node - linkType: hard - -"@medusajs/ui@npm:~4.0.0": - version: 4.0.3 - resolution: "@medusajs/ui@npm:4.0.3" - dependencies: - "@medusajs/icons": ^2.2.0 + "@medusajs/icons": ~2.4.0 "@radix-ui/react-accordion": 1.2.0 "@radix-ui/react-alert-dialog": 1.1.1 "@radix-ui/react-avatar": 1.1.0 @@ -1775,6 +1689,7 @@ __metadata: "@radix-ui/react-switch": 1.1.0 "@radix-ui/react-tabs": 1.1.0 "@radix-ui/react-tooltip": 1.1.2 + "@tanstack/react-table": 8.20.5 clsx: ^1.2.1 copy-to-clipboard: ^3.3.3 cva: 1.0.0-beta.1 @@ -1788,7 +1703,7 @@ __metadata: peerDependencies: react: ^18.0.0 || ^19.0.0 || ^19.0.0-rc react-dom: ^18.0.0 || ^19.0.0 || ^19.0.0-rc - checksum: 8f45adfc52c2d6500c748bf0bd08bf3b9a4eeb0fa848f27c50521474b6572a97cf76a91ee8370d1d9af26575e6ab8048ec2c95156219456d3bfc608984321690 + checksum: ae90527f30f2f1ef32e3c3d15284f94de798c1590ae065df09f7a401c0d0b6e0cedcb1027156bae36b9e525286d5c4453b0e9fd9ee044ffc5b1d9c47ed5d0846 languageName: node linkType: hard @@ -2344,15 +2259,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/number@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/number@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - checksum: 42e4870cd14459da6da03e43c7507dc4c807ed787a87bda52912a0d1d6d5013326b697c18c9625fc6a2cf0af2b45d9c86747985b45358fd92ab646b983978e3c - languageName: node - linkType: hard - "@radix-ui/number@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/number@npm:1.1.0" @@ -2360,15 +2266,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/primitive@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/primitive@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - checksum: 912216455537db3ca77f3e7f70174fb2b454fbd4a37a0acb7cfadad9ab6131abdfb787472242574460a3c301edf45738340cc84f6717982710082840fde7d916 - languageName: node - linkType: hard - "@radix-ui/primitive@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/primitive@npm:1.1.0" @@ -2403,34 +2300,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-accordion@npm:^1.1.2": - version: 1.1.2 - resolution: "@radix-ui/react-accordion@npm:1.1.2" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-collapsible": 1.0.3 - "@radix-ui/react-collection": 1.0.3 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-direction": 1.0.1 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-controllable-state": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 54fe3642306d62f68ac4d534c6bec1998d00d441663b16119fe267cb085e48761acf3c02b9466245d42b8ab419632a573d35d79d3a5d328906bde121dd1816db - languageName: node - linkType: hard - "@radix-ui/react-alert-dialog@npm:1.1.1": version: 1.1.1 resolution: "@radix-ui/react-alert-dialog@npm:1.1.1" @@ -2455,51 +2324,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-alert-dialog@npm:^1.0.4": - version: 1.0.5 - resolution: "@radix-ui/react-alert-dialog@npm:1.0.5" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-dialog": 1.0.5 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-slot": 1.0.2 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 73854a1011b07a50261a12ce33c4b9d6585603e731a2ceffc7a4d2b8c795631716fda8b8006a813648e247d17abbaf290a419a935ae4cd70c83c3c70a34ce9f4 - languageName: node - linkType: hard - -"@radix-ui/react-arrow@npm:1.0.3": - version: 1.0.3 - resolution: "@radix-ui/react-arrow@npm:1.0.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-primitive": 1.0.3 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: c931f6d7e0bac50fd1654a0303a303aff74a68a13a33a851a43a7c88677b53a92ca6557920b9105144a3002f899ce888437d20ddd7803a5c716edac99587626d - languageName: node - linkType: hard - "@radix-ui/react-arrow@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-arrow@npm:1.1.0" @@ -2541,29 +2365,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-avatar@npm:^1.0.3": - version: 1.0.4 - resolution: "@radix-ui/react-avatar@npm:1.0.4" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-callback-ref": 1.0.1 - "@radix-ui/react-use-layout-effect": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 608494c53968085bfcf9b987d80c3ec6720bdb65f78591d53e8bba3b360e86366d48a7dee11405dd443f5a3565432184b95bb9d4954bca1922cc9385a942caaf - languageName: node - linkType: hard - "@radix-ui/react-checkbox@npm:1.1.1": version: 1.1.1 resolution: "@radix-ui/react-checkbox@npm:1.1.1" @@ -2590,60 +2391,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-checkbox@npm:^1.0.4": - version: 1.0.4 - resolution: "@radix-ui/react-checkbox@npm:1.0.4" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-controllable-state": 1.0.1 - "@radix-ui/react-use-previous": 1.0.1 - "@radix-ui/react-use-size": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: a4bd259a7e15ad88f72524190ddcc2db0688d439aad954e06d0adf6038b2e17397ed8ae0ea26ab09bf6981f1b9dd883904b2b7e74b307b5c6b1a3765d27fe737 - languageName: node - linkType: hard - -"@radix-ui/react-collapsible@npm:1.0.3": - version: 1.0.3 - resolution: "@radix-ui/react-collapsible@npm:1.0.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-controllable-state": 1.0.1 - "@radix-ui/react-use-layout-effect": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 7bc3e601e3fa84991bdf46ea1bdb725760942f8facadf42f05808abc7a1399c6ab90a00c70699367026afbd8afba0254ff9634f9d1e05b24ae452d9e0524d328 - languageName: node - linkType: hard - "@radix-ui/react-collapsible@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-collapsible@npm:1.1.0" @@ -2670,29 +2417,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-collection@npm:1.0.3": - version: 1.0.3 - resolution: "@radix-ui/react-collection@npm:1.0.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-slot": 1.0.2 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: cefa56383d7451ca79e4bd5a29aaeef6c205a04297213efd149aaead82fc8cde4fb8298e20e6b3613e5696e43f814fb4489805428f6604834fb31f73c6725fa8 - languageName: node - linkType: hard - "@radix-ui/react-collection@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-collection@npm:1.1.0" @@ -2715,21 +2439,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-compose-refs@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-compose-refs@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: be06f8dab35b5a1bffa7a5982fb26218ddade1acb751288333e3b89d7b4a7dfb5a6371be83876dac0ec2ebe0866d295e8618b778608e1965342986ea448040ec - languageName: node - linkType: hard - "@radix-ui/react-compose-refs@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-compose-refs@npm:1.1.0" @@ -2743,21 +2452,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-context@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-context@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 3de5761b32cc70cd61715527f29d8c699c01ab28c195ced972ccbc7025763a373a68f18c9f948c7a7b922e469fd2df7fee5f7536e3f7bad44ffc06d959359333 - languageName: node - linkType: hard - "@radix-ui/react-context@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-context@npm:1.1.0" @@ -2771,39 +2465,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-dialog@npm:1.0.5, @radix-ui/react-dialog@npm:^1.0.4": - version: 1.0.5 - resolution: "@radix-ui/react-dialog@npm:1.0.5" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-dismissable-layer": 1.0.5 - "@radix-ui/react-focus-guards": 1.0.1 - "@radix-ui/react-focus-scope": 1.0.4 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-portal": 1.0.4 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-slot": 1.0.2 - "@radix-ui/react-use-controllable-state": 1.0.1 - aria-hidden: ^1.1.1 - react-remove-scroll: 2.5.5 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: c5b3069397379e79857a3203f3ead4d12d87736b59899f02a63e620a07dd1e6704e15523926cdf8e39afe1c945a7ff0f2533c5ea5be1e17c3114820300a51133 - languageName: node - linkType: hard - "@radix-ui/react-dialog@npm:1.1.1": version: 1.1.1 resolution: "@radix-ui/react-dialog@npm:1.1.1" @@ -2836,21 +2497,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-direction@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-direction@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: b1a45b4d1d5070ca3b5864b920f6c6210c962bdb519abb62b38b1baef9d06737dc3d8ecdb61860b7504a735235a539652f5977c7299ec021da84e6b0f64d988a - languageName: node - linkType: hard - "@radix-ui/react-direction@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-direction@npm:1.1.0" @@ -2864,30 +2510,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-dismissable-layer@npm:1.0.5": - version: 1.0.5 - resolution: "@radix-ui/react-dismissable-layer@npm:1.0.5" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-callback-ref": 1.0.1 - "@radix-ui/react-use-escape-keydown": 1.0.3 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 7e4308867aecfb07b506330c1964d94a52247ab9453725613cd326762aa13e483423c250f107219c131b0449600eb8d1576ce3159c2b96e8c978f75e46062cb2 - languageName: node - linkType: hard - "@radix-ui/react-dismissable-layer@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-dismissable-layer@npm:1.1.0" @@ -2936,47 +2558,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-dropdown-menu@npm:^2.0.5": - version: 2.0.6 - resolution: "@radix-ui/react-dropdown-menu@npm:2.0.6" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-menu": 2.0.6 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-controllable-state": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 525cab53547d2ce2904518b1f66b62179d656c57c8d6dd7dbe863cc05025d8bad535f44011e2735b07fc500579c3d64d89a9a39593d4c8f91f31052d75b729e1 - languageName: node - linkType: hard - -"@radix-ui/react-focus-guards@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-focus-guards@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: d5fd4e5aa9d9a87c8ad490b3b4992d6f1d9eddf18e56df2a2bcf8744c4332b275d73377fd193df3e6ba0ad9608dc497709beca5c64de2b834d5f5350b3c9a272 - languageName: node - linkType: hard - "@radix-ui/react-focus-guards@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-focus-guards@npm:1.1.0" @@ -2990,28 +2571,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-focus-scope@npm:1.0.4": - version: 1.0.4 - resolution: "@radix-ui/react-focus-scope@npm:1.0.4" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-callback-ref": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 2fce0bafcab4e16cf4ed7560bda40654223f3d0add6b231e1c607433030c14e6249818b444b7b58ee7a6ff6bbf8e192c9c81d22c3a5c88c2daade9d1f881b5be - languageName: node - linkType: hard - "@radix-ui/react-focus-scope@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-focus-scope@npm:1.1.0" @@ -3033,22 +2592,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-id@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-id@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-use-layout-effect": 1.0.1 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: e2859ca58bea171c956098ace7ecf615cf9432f58a118b779a14720746b3adcf0351c36c75de131548672d3cd290ca238198acbd33b88dc4706f98312e9317ad - languageName: node - linkType: hard - "@radix-ui/react-id@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-id@npm:1.1.0" @@ -3083,63 +2626,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-label@npm:^2.0.2": - version: 2.0.2 - resolution: "@radix-ui/react-label@npm:2.0.2" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-primitive": 1.0.3 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: a6528735b9f3e15ad83b7a905861bbc5a9b9236716957d6e99902bbfced0472aed4ddbf519bc0e6c41f528986e7acf7270cf0734a2fc380a547a8640809d3a81 - languageName: node - linkType: hard - -"@radix-ui/react-menu@npm:2.0.6": - version: 2.0.6 - resolution: "@radix-ui/react-menu@npm:2.0.6" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-collection": 1.0.3 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-direction": 1.0.1 - "@radix-ui/react-dismissable-layer": 1.0.5 - "@radix-ui/react-focus-guards": 1.0.1 - "@radix-ui/react-focus-scope": 1.0.4 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-popper": 1.1.3 - "@radix-ui/react-portal": 1.0.4 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-roving-focus": 1.0.4 - "@radix-ui/react-slot": 1.0.2 - "@radix-ui/react-use-callback-ref": 1.0.1 - aria-hidden: ^1.1.1 - react-remove-scroll: 2.5.5 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 06926fa59cb8f5614f2e1a085ea1cbf09631ae28fb6e5d6e6d2a0a84d24979e3aca311cdb19dfdb254c1823ff85fd5250c29d4463f8f7622dd523e35df3fce1d - languageName: node - linkType: hard - "@radix-ui/react-menu@npm:2.1.1": version: 2.1.1 resolution: "@radix-ui/react-menu@npm:2.1.1" @@ -3209,69 +2695,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-popover@npm:^1.0.6": - version: 1.0.7 - resolution: "@radix-ui/react-popover@npm:1.0.7" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-dismissable-layer": 1.0.5 - "@radix-ui/react-focus-guards": 1.0.1 - "@radix-ui/react-focus-scope": 1.0.4 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-popper": 1.1.3 - "@radix-ui/react-portal": 1.0.4 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-slot": 1.0.2 - "@radix-ui/react-use-controllable-state": 1.0.1 - aria-hidden: ^1.1.1 - react-remove-scroll: 2.5.5 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: ed7abbd61df1e15d62072e214fafbdc4e31942e0ce49665f2045d8279944a0a37762bcd70a36389ed9e43c95797d5acb57f6f5ca5a15b688b1928cfc2b9ce196 - languageName: node - linkType: hard - -"@radix-ui/react-popper@npm:1.1.3": - version: 1.1.3 - resolution: "@radix-ui/react-popper@npm:1.1.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@floating-ui/react-dom": ^2.0.0 - "@radix-ui/react-arrow": 1.0.3 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-callback-ref": 1.0.1 - "@radix-ui/react-use-layout-effect": 1.0.1 - "@radix-ui/react-use-rect": 1.0.1 - "@radix-ui/react-use-size": 1.0.1 - "@radix-ui/rect": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: a38c374ec65dd8d7c604af7151e96faec1743828d859dc4892e720c1803a7e1562add26aec2ddf2091defae4e15d989c028032ea481419e38c4693b3f12545c3 - languageName: node - linkType: hard - "@radix-ui/react-popper@npm:1.2.0": version: 1.2.0 resolution: "@radix-ui/react-popper@npm:1.2.0" @@ -3300,26 +2723,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-portal@npm:1.0.4, @radix-ui/react-portal@npm:^1.0.3": - version: 1.0.4 - resolution: "@radix-ui/react-portal@npm:1.0.4" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-primitive": 1.0.3 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: fed32f8148b833fe852fb5e2f859979ffdf2fb9a9ef46583b9b52915d764ad36ba5c958a64e61d23395628ccc09d678229ee94cd112941e8fe2575021f820c29 - languageName: node - linkType: hard - "@radix-ui/react-portal@npm:1.1.1": version: 1.1.1 resolution: "@radix-ui/react-portal@npm:1.1.1" @@ -3340,27 +2743,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-presence@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-presence@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-use-layout-effect": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 90780618b265fe794a8f1ddaa5bfd3c71a1127fa79330a14d32722e6265b44452a9dd36efe4e769129d33e57f979f6b8713e2cbf2e2755326aa3b0f337185b6e - languageName: node - linkType: hard - "@radix-ui/react-presence@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-presence@npm:1.1.0" @@ -3381,26 +2763,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-primitive@npm:1.0.3": - version: 1.0.3 - resolution: "@radix-ui/react-primitive@npm:1.0.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-slot": 1.0.2 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 67a66ff8898a5e7739eda228ab6f5ce808858da1dce967014138d87e72b6bbfc93dc1467c706d98d1a2b93bf0b6e09233d1a24d31c78227b078444c1a69c42be - languageName: node - linkType: hard - "@radix-ui/react-primitive@npm:2.0.0": version: 2.0.0 resolution: "@radix-ui/react-primitive@npm:2.0.0" @@ -3448,63 +2810,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-radio-group@npm:^1.1.3": - version: 1.1.3 - resolution: "@radix-ui/react-radio-group@npm:1.1.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-direction": 1.0.1 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-roving-focus": 1.0.4 - "@radix-ui/react-use-controllable-state": 1.0.1 - "@radix-ui/react-use-previous": 1.0.1 - "@radix-ui/react-use-size": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: a23264cc9e8cb3738db8edf50ae27b82f79093f57c2e9a4d319fdece280147f5615643ad6df480383dcd53f39078e321c25be5e18992ffda36b2c73ebfcad9c4 - languageName: node - linkType: hard - -"@radix-ui/react-roving-focus@npm:1.0.4": - version: 1.0.4 - resolution: "@radix-ui/react-roving-focus@npm:1.0.4" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-collection": 1.0.3 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-direction": 1.0.1 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-callback-ref": 1.0.1 - "@radix-ui/react-use-controllable-state": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 61e3ddfd1647e64fba855434ff41e8e7ba707244fe8841f78c450fbdce525383b64259279475615d030dbf1625cbffd8eeebee72d91bf6978794f5dbcf887fc0 - languageName: node - linkType: hard - "@radix-ui/react-roving-focus@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-roving-focus@npm:1.1.0" @@ -3532,34 +2837,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-scroll-area@npm:^1.0.4": - version: 1.0.5 - resolution: "@radix-ui/react-scroll-area@npm:1.0.5" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/number": 1.0.1 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-direction": 1.0.1 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-callback-ref": 1.0.1 - "@radix-ui/react-use-layout-effect": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: a08818aeeb15920a02e708699a8bdc85c26eab0579ab741129b464a799b5d9a04f81810a2d200f1cf4aef03452067770e87b0f81593a689350fcd7e51819e4cb - languageName: node - linkType: hard - "@radix-ui/react-select@npm:2.1.1": version: 2.1.1 resolution: "@radix-ui/react-select@npm:2.1.1" @@ -3599,62 +2876,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-select@npm:^2.0.0": - version: 2.0.0 - resolution: "@radix-ui/react-select@npm:2.0.0" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/number": 1.0.1 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-collection": 1.0.3 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-direction": 1.0.1 - "@radix-ui/react-dismissable-layer": 1.0.5 - "@radix-ui/react-focus-guards": 1.0.1 - "@radix-ui/react-focus-scope": 1.0.4 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-popper": 1.1.3 - "@radix-ui/react-portal": 1.0.4 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-slot": 1.0.2 - "@radix-ui/react-use-callback-ref": 1.0.1 - "@radix-ui/react-use-controllable-state": 1.0.1 - "@radix-ui/react-use-layout-effect": 1.0.1 - "@radix-ui/react-use-previous": 1.0.1 - "@radix-ui/react-visually-hidden": 1.0.3 - aria-hidden: ^1.1.1 - react-remove-scroll: 2.5.5 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 63aa4d119c5273035a2fce5a05739729abb8995ead00e810b86acfba05835fda655d962d3553b1f2011ed4f84e328f1e7e171cd9eaa7e3433b3d65c58cf3394a - languageName: node - linkType: hard - -"@radix-ui/react-slot@npm:1.0.2, @radix-ui/react-slot@npm:^1.0.2": - version: 1.0.2 - resolution: "@radix-ui/react-slot@npm:1.0.2" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-compose-refs": 1.0.1 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 3af6ea4891e6fa8091e666802adffe7718b3cd390a10fa9229a5f40f8efded9f3918ea01b046103d93923d41cc32119505ebb6bde76cad07a87b6cf4f2119347 - languageName: node - linkType: hard - "@radix-ui/react-slot@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-slot@npm:1.1.0" @@ -3695,32 +2916,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-switch@npm:^1.0.3": - version: 1.0.3 - resolution: "@radix-ui/react-switch@npm:1.0.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-use-controllable-state": 1.0.1 - "@radix-ui/react-use-previous": 1.0.1 - "@radix-ui/react-use-size": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: e7c65aeedf9d3cd47320fd3759b8c7f3777619cd847a96f2c52841488ad1745fa35335e2877a4f839902942410a7ffe9baf05ec1c249a0401a2b1b9363dbf343 - languageName: node - linkType: hard - "@radix-ui/react-tabs@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-tabs@npm:1.1.0" @@ -3747,33 +2942,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-tabs@npm:^1.0.4": - version: 1.0.4 - resolution: "@radix-ui/react-tabs@npm:1.0.4" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-direction": 1.0.1 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-roving-focus": 1.0.4 - "@radix-ui/react-use-controllable-state": 1.0.1 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 79699a921f5c2e890e0e496a751d9c2a7c4017eff8e52f094389e993263332881353bdd27b8cc123c906b36743e803eec7f32fdbb4d413328cba0a37d6413339 - languageName: node - linkType: hard - "@radix-ui/react-tooltip@npm:1.1.2": version: 1.1.2 resolution: "@radix-ui/react-tooltip@npm:1.1.2" @@ -3804,52 +2972,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-tooltip@npm:^1.0.6": - version: 1.0.7 - resolution: "@radix-ui/react-tooltip@npm:1.0.7" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/primitive": 1.0.1 - "@radix-ui/react-compose-refs": 1.0.1 - "@radix-ui/react-context": 1.0.1 - "@radix-ui/react-dismissable-layer": 1.0.5 - "@radix-ui/react-id": 1.0.1 - "@radix-ui/react-popper": 1.1.3 - "@radix-ui/react-portal": 1.0.4 - "@radix-ui/react-presence": 1.0.1 - "@radix-ui/react-primitive": 1.0.3 - "@radix-ui/react-slot": 1.0.2 - "@radix-ui/react-use-controllable-state": 1.0.1 - "@radix-ui/react-visually-hidden": 1.0.3 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 915524ea9d102eb26e656c550a084ca460219041c0e7cec0e72b522ee52a43b4d725f4ad3352212f4ae88b3672ef7b23bad07844275cafea075ada590678d873 - languageName: node - linkType: hard - -"@radix-ui/react-use-callback-ref@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-use-callback-ref@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 331b432be1edc960ca148637ae6087220873ee828ceb13bd155926ef8f49e862812de5b379129f6aaefcd11be53715f3237e6caa9a33d9c0abfff43f3ba58938 - languageName: node - linkType: hard - "@radix-ui/react-use-callback-ref@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-use-callback-ref@npm:1.1.0" @@ -3863,22 +2985,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-use-controllable-state@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-use-controllable-state@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-use-callback-ref": 1.0.1 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 29b069dbf09e48bca321af6272574ad0fc7283174e7d092731a10663fe00c0e6b4bde5e1b5ea67725fe48dcbe8026e7ff0d69d42891c62cbb9ca408498171fbe - languageName: node - linkType: hard - "@radix-ui/react-use-controllable-state@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-use-controllable-state@npm:1.1.0" @@ -3894,22 +3000,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-use-escape-keydown@npm:1.0.3": - version: 1.0.3 - resolution: "@radix-ui/react-use-escape-keydown@npm:1.0.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-use-callback-ref": 1.0.1 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 3c94c78902dcb40b60083ee2184614f45c95a189178f52d89323b467bd04bcf5fdb1bc4d43debecd7f0b572c3843c7e04edbcb56f40a4b4b43936fb2770fb8ad - languageName: node - linkType: hard - "@radix-ui/react-use-escape-keydown@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-use-escape-keydown@npm:1.1.0" @@ -3925,21 +3015,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-use-layout-effect@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-use-layout-effect@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 13cd0c38395c5838bc9a18238020d3bcf67fb340039e6d1cbf438be1b91d64cf6900b78121f3dc9219faeb40dcc7b523ce0f17e4a41631655690e5a30a40886a - languageName: node - linkType: hard - "@radix-ui/react-use-layout-effect@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-use-layout-effect@npm:1.1.0" @@ -3953,21 +3028,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-use-previous@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-use-previous@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: f5fbc602108668484a4ed506b7842482222d1d03094362e26abb7fdd593eee8794fc47d85b3524fb9d00884801c89a6eefd0bed0971eba1ec189c637b6afd398 - languageName: node - linkType: hard - "@radix-ui/react-use-previous@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-use-previous@npm:1.1.0" @@ -3981,22 +3041,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-use-rect@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-use-rect@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/rect": 1.0.1 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 94c5ab31dfd3678c0cb77a30025e82b3a287577c1a8674b0d703a36d27434bc9c59790e0bebf57ed153f0b8e0d8c3b9675fc9787b9eac525a09abcda8fa9e7eb - languageName: node - linkType: hard - "@radix-ui/react-use-rect@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-use-rect@npm:1.1.0" @@ -4012,22 +3056,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-use-size@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/react-use-size@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-use-layout-effect": 1.0.1 - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: b109a4b3781781c4dc641a1173f0a6fcb0b0f7b2d7cdba5848a46070c9fb4e518909a46c20a3c2efbc78737c64859c59ead837f2940e8c8394d1c503ef58773b - languageName: node - linkType: hard - "@radix-ui/react-use-size@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-use-size@npm:1.1.0" @@ -4043,26 +3071,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/react-visually-hidden@npm:1.0.3": - version: 1.0.3 - resolution: "@radix-ui/react-visually-hidden@npm:1.0.3" - dependencies: - "@babel/runtime": ^7.13.10 - "@radix-ui/react-primitive": 1.0.3 - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 - react-dom: ^16.8 || ^17.0 || ^18.0 - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 0cbc12c2156b3fa0e40090cafd8525ce84c16a6b5a038a8e8fc7cbb16ed6da9ab369593962c57a18c41a16ec8713e0195c68ea34072ef1ca254ed4d4c0770bb4 - languageName: node - linkType: hard - "@radix-ui/react-visually-hidden@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/react-visually-hidden@npm:1.1.0" @@ -4082,15 +3090,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/rect@npm:1.0.1": - version: 1.0.1 - resolution: "@radix-ui/rect@npm:1.0.1" - dependencies: - "@babel/runtime": ^7.13.10 - checksum: 4c5159661340acc31b11e1f2ebd87a1521d39bfa287544dd2cd75b399539a4b625d38a1501c90ceae21fcca18ed164b0c3735817ff140ae334098192c110e571 - languageName: node - linkType: hard - "@radix-ui/rect@npm:1.1.0": version: 1.1.0 resolution: "@radix-ui/rect@npm:1.1.0" @@ -4252,35 +3251,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/datepicker@npm:^3.5.0": - version: 3.9.3 - resolution: "@react-aria/datepicker@npm:3.9.3" - dependencies: - "@internationalized/date": ^3.5.2 - "@internationalized/number": ^3.5.1 - "@internationalized/string": ^3.2.1 - "@react-aria/focus": ^3.16.2 - "@react-aria/form": ^3.0.3 - "@react-aria/i18n": ^3.10.2 - "@react-aria/interactions": ^3.21.1 - "@react-aria/label": ^3.7.6 - "@react-aria/spinbutton": ^3.6.3 - "@react-aria/utils": ^3.23.2 - "@react-stately/datepicker": ^3.9.2 - "@react-stately/form": ^3.0.1 - "@react-types/button": ^3.9.2 - "@react-types/calendar": ^3.4.4 - "@react-types/datepicker": ^3.7.2 - "@react-types/dialog": ^3.5.8 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 2f37070b0779b1abe63f17b3c1e0ce9b7b63ee05d813ed437a18f0cd203085d375ec45233124becd50b0a877cc8122505bb60d8bfee00c4b134a89260be1f962 - languageName: node - linkType: hard - "@react-aria/dialog@npm:^3.5.19": version: 3.5.19 resolution: "@react-aria/dialog@npm:3.5.19" @@ -4319,21 +3289,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/focus@npm:^3.16.2": - version: 3.16.2 - resolution: "@react-aria/focus@npm:3.16.2" - dependencies: - "@react-aria/interactions": ^3.21.1 - "@react-aria/utils": ^3.23.2 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - clsx: ^2.0.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 53fb2cf838b1a2aa8043cd1516943f75b6b4d0c1088802d670bbc768451b8659be656469657f413b4c0a3afce577c2529a238e14b4dbf26fbfc169651988579a - languageName: node - linkType: hard - "@react-aria/focus@npm:^3.18.4": version: 3.18.4 resolution: "@react-aria/focus@npm:3.18.4" @@ -4364,21 +3319,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/form@npm:^3.0.3": - version: 3.0.3 - resolution: "@react-aria/form@npm:3.0.3" - dependencies: - "@react-aria/interactions": ^3.21.1 - "@react-aria/utils": ^3.23.2 - "@react-stately/form": ^3.0.1 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: dad764b89d2b78dd07c915f2d65b129877b24b86c6b1be6b155823bb3616872552b2c8eb11ca69fa0031d41d8643b3cd9aad79bf1971e48e70fb3f20bb81f1ab - languageName: node - linkType: hard - "@react-aria/grid@npm:^3.10.5": version: 3.10.5 resolution: "@react-aria/grid@npm:3.10.5" @@ -4425,24 +3365,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/i18n@npm:^3.10.2": - version: 3.10.2 - resolution: "@react-aria/i18n@npm:3.10.2" - dependencies: - "@internationalized/date": ^3.5.2 - "@internationalized/message": ^3.1.2 - "@internationalized/number": ^3.5.1 - "@internationalized/string": ^3.2.1 - "@react-aria/ssr": ^3.9.2 - "@react-aria/utils": ^3.23.2 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: fa2799b416d12a59905eae8b7419fba1b82cd80b35b94ccf33acdd14c8e915555af4187ca2781b3dcebfae4ec7c51827c2a6fd8ada01b25ef389e399f76d233d - languageName: node - linkType: hard - "@react-aria/i18n@npm:^3.12.3": version: 3.12.3 resolution: "@react-aria/i18n@npm:3.12.3" @@ -4461,20 +3383,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/interactions@npm:^3.21.1": - version: 3.21.1 - resolution: "@react-aria/interactions@npm:3.21.1" - dependencies: - "@react-aria/ssr": ^3.9.2 - "@react-aria/utils": ^3.23.2 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 3ece0cafc5cfd7a1b7b5fe44ead4496b6a56e5719cb3f0f5b668fa0a81aec5c85e014404b8067813249215f1a169c1da3fd18808bc1e29441ea1968e36bbc0be - languageName: node - linkType: hard - "@react-aria/interactions@npm:^3.22.4": version: 3.22.4 resolution: "@react-aria/interactions@npm:3.22.4" @@ -4502,19 +3410,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/label@npm:^3.7.6": - version: 3.7.6 - resolution: "@react-aria/label@npm:3.7.6" - dependencies: - "@react-aria/utils": ^3.23.2 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 77812f0d8ea0ca2fbfa7a2eb707082c27b49a727f72e383f2c2dba549e2990f03a93048ff530db63d8ea6138c3cd0690c6ac2abbf2b846d6a72cbc16b7b79f2f - languageName: node - linkType: hard - "@react-aria/link@npm:^3.7.6": version: 3.7.6 resolution: "@react-aria/link@npm:3.7.6" @@ -4551,15 +3446,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/live-announcer@npm:^3.3.2": - version: 3.3.2 - resolution: "@react-aria/live-announcer@npm:3.3.2" - dependencies: - "@swc/helpers": ^0.5.0 - checksum: 698e854f92666edbf967d37f062c5d843906738b92069f24afd7e5066fd1fe33890a233e3dba0feaab0a73cb54ef2f847790befd7cd30033c8ec71a45d99dd38 - languageName: node - linkType: hard - "@react-aria/live-announcer@npm:^3.4.0": version: 3.4.0 resolution: "@react-aria/live-announcer@npm:3.4.0" @@ -4780,23 +3666,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/spinbutton@npm:^3.6.3": - version: 3.6.3 - resolution: "@react-aria/spinbutton@npm:3.6.3" - dependencies: - "@react-aria/i18n": ^3.10.2 - "@react-aria/live-announcer": ^3.3.2 - "@react-aria/utils": ^3.23.2 - "@react-types/button": ^3.9.2 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 3b94f371684b5d5a7dbeca66dc56189fa2e699534dda23f651c4a12e638135e046a27124d0f46682a43b12309e3bf45678dfb92ef7e19c2751899fbf2b2591db - languageName: node - linkType: hard - "@react-aria/spinbutton@npm:^3.6.9": version: 3.6.9 resolution: "@react-aria/spinbutton@npm:3.6.9" @@ -4814,17 +3683,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/ssr@npm:^3.9.2": - version: 3.9.2 - resolution: "@react-aria/ssr@npm:3.9.2" - dependencies: - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: d1abc8eb6bc31a12e54299795657cf45d9765b0565753d32ad675f9c797cac8973073da04b6114ac63fd713318602e7e225a7824879991eb66b9b6df89dfba99 - languageName: node - linkType: hard - "@react-aria/ssr@npm:^3.9.6": version: 3.9.6 resolution: "@react-aria/ssr@npm:3.9.6" @@ -4970,21 +3828,6 @@ __metadata: languageName: node linkType: hard -"@react-aria/utils@npm:^3.23.2": - version: 3.23.2 - resolution: "@react-aria/utils@npm:3.23.2" - dependencies: - "@react-aria/ssr": ^3.9.2 - "@react-stately/utils": ^3.9.1 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - clsx: ^2.0.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: f75986e5a6f4fb138a57179041d6b84629575398459152aad4875343d98c5fab035db95198e0f6e844157b4e88a3684e06a796c873736de1d90dda4996167fea - languageName: node - linkType: hard - "@react-aria/utils@npm:^3.25.3": version: 3.25.3 resolution: "@react-aria/utils@npm:3.25.3" @@ -5168,24 +4011,6 @@ __metadata: languageName: node linkType: hard -"@react-stately/datepicker@npm:^3.5.0, @react-stately/datepicker@npm:^3.9.2": - version: 3.9.2 - resolution: "@react-stately/datepicker@npm:3.9.2" - dependencies: - "@internationalized/date": ^3.5.2 - "@internationalized/string": ^3.2.1 - "@react-stately/form": ^3.0.1 - "@react-stately/overlays": ^3.6.5 - "@react-stately/utils": ^3.9.1 - "@react-types/datepicker": ^3.7.2 - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: f0a5eb946517a3c531fc091c1d4fbe879a182c2169d027b4b0f43c61312cab0ef0d668e1707ffa783fd18bcb8c1d5cc23d0bee2d07e5881b1faa38d46289043d - languageName: node - linkType: hard - "@react-stately/dnd@npm:^3.4.3": version: 3.4.3 resolution: "@react-stately/dnd@npm:3.4.3" @@ -5208,18 +4033,6 @@ __metadata: languageName: node linkType: hard -"@react-stately/form@npm:^3.0.1": - version: 3.0.1 - resolution: "@react-stately/form@npm:3.0.1" - dependencies: - "@react-types/shared": ^3.22.1 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: cedc33e9db4dae112716d38f3e0b3497f5d65aa686f292e1c130e0563169937531db60023de3dc0df1fa52e984a2b28b1f00b95b9fd0fbc4bf5faf4e31ec7022 - languageName: node - linkType: hard - "@react-stately/form@npm:^3.0.6": version: 3.0.6 resolution: "@react-stately/form@npm:3.0.6" @@ -5304,19 +4117,6 @@ __metadata: languageName: node linkType: hard -"@react-stately/overlays@npm:^3.6.5": - version: 3.6.5 - resolution: "@react-stately/overlays@npm:3.6.5" - dependencies: - "@react-stately/utils": ^3.9.1 - "@react-types/overlays": ^3.8.5 - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 7a905211376124174c410db803c31fb51dbd55a038f1908a97308ce34d3903f626fd1423a2ad89a3a473f09654319b4ce1b83a448de71932931e0f015a3d1c0f - languageName: node - linkType: hard - "@react-stately/radio@npm:^3.10.8": version: 3.10.8 resolution: "@react-stately/radio@npm:3.10.8" @@ -5474,17 +4274,6 @@ __metadata: languageName: node linkType: hard -"@react-stately/utils@npm:^3.9.1": - version: 3.9.1 - resolution: "@react-stately/utils@npm:3.9.1" - dependencies: - "@swc/helpers": ^0.5.0 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 13866d235519b2dc587e35c2f0caeadf3bbb487f8e9e0b24c9d18c464b5fde26dcceb472d499f04165277a93cd80bee7203a5e6257b54030f44570a081d138b3 - languageName: node - linkType: hard - "@react-types/breadcrumbs@npm:^3.7.8": version: 3.7.8 resolution: "@react-types/breadcrumbs@npm:3.7.8" @@ -5508,17 +4297,6 @@ __metadata: languageName: node linkType: hard -"@react-types/button@npm:^3.9.2": - version: 3.9.2 - resolution: "@react-types/button@npm:3.9.2" - dependencies: - "@react-types/shared": ^3.22.1 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 540c875328f6035037d1db1b13b8394f099892a6d93e41a1748597accc2b736a48067779573d75c661a9f7df30f0de25fee00c7935cbda977fba176d6f149d47 - languageName: node - linkType: hard - "@react-types/calendar@npm:^3.4.10": version: 3.4.10 resolution: "@react-types/calendar@npm:3.4.10" @@ -5531,18 +4309,6 @@ __metadata: languageName: node linkType: hard -"@react-types/calendar@npm:^3.4.4": - version: 3.4.4 - resolution: "@react-types/calendar@npm:3.4.4" - dependencies: - "@internationalized/date": ^3.5.2 - "@react-types/shared": ^3.22.1 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: 9088c3b28e2259b58d41ece490de360b9f82c5e1dc8638b23ac42c28223e722376dbf3e72a44b2f8543ac45b9c5ddbbd3752bbb1f4354a6854aa99f13051b93c - languageName: node - linkType: hard - "@react-types/checkbox@npm:^3.8.4": version: 3.8.4 resolution: "@react-types/checkbox@npm:3.8.4" @@ -5577,20 +4343,6 @@ __metadata: languageName: node linkType: hard -"@react-types/datepicker@npm:^3.7.2": - version: 3.7.2 - resolution: "@react-types/datepicker@npm:3.7.2" - dependencies: - "@internationalized/date": ^3.5.2 - "@react-types/calendar": ^3.4.4 - "@react-types/overlays": ^3.8.5 - "@react-types/shared": ^3.22.1 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: e25142d89765954e7a1b20a6a945f76c154a70246044c493255b04f068e38281421b1144b88da3fab8a0cfdf4d76d974bb12e85edaf7e85b80b4cefdb1faadf3 - languageName: node - linkType: hard - "@react-types/datepicker@npm:^3.8.3": version: 3.8.3 resolution: "@react-types/datepicker@npm:3.8.3" @@ -5617,18 +4369,6 @@ __metadata: languageName: node linkType: hard -"@react-types/dialog@npm:^3.5.8": - version: 3.5.8 - resolution: "@react-types/dialog@npm:3.5.8" - dependencies: - "@react-types/overlays": ^3.8.5 - "@react-types/shared": ^3.22.1 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: beafa8fe3371cbc32367a3352f79777594a6d0def3beaa2e981bc67957ea530484f4f3e57f29a77e7fa0e8af9612e690df25155697f667fce5a3febba65eeaea - languageName: node - linkType: hard - "@react-types/grid@npm:^3.2.9": version: 3.2.9 resolution: "@react-types/grid@npm:3.2.9" @@ -5707,17 +4447,6 @@ __metadata: languageName: node linkType: hard -"@react-types/overlays@npm:^3.8.5": - version: 3.8.5 - resolution: "@react-types/overlays@npm:3.8.5" - dependencies: - "@react-types/shared": ^3.22.1 - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: ce7436d81f82997f183d20950e06ff23ef0d0b51a93ec3b63e5fe120fa3fad6e3949c00583fb151b27d8bed77e6501bf7594fca06d4574441ed05498b37c624f - languageName: node - linkType: hard - "@react-types/progress@npm:^3.5.7": version: 3.5.7 resolution: "@react-types/progress@npm:3.5.7" @@ -5763,15 +4492,6 @@ __metadata: languageName: node linkType: hard -"@react-types/shared@npm:^3.22.1": - version: 3.22.1 - resolution: "@react-types/shared@npm:3.22.1" - peerDependencies: - react: ^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 - checksum: c86d1c943b3d7a1164b13bd90401bab2588aa7a741d769acabede4655db7da663dae42c3646b177271ddec101af881747ce13d7825ef4eb9eb791741ff0623d9 - languageName: node - linkType: hard - "@react-types/shared@npm:^3.25.0": version: 3.25.0 resolution: "@react-types/shared@npm:3.25.0" @@ -6022,6 +4742,25 @@ __metadata: languageName: node linkType: hard +"@tanstack/react-table@npm:8.20.5": + version: 8.20.5 + resolution: "@tanstack/react-table@npm:8.20.5" + dependencies: + "@tanstack/table-core": 8.20.5 + peerDependencies: + react: ">=16.8" + react-dom: ">=16.8" + checksum: 574fa62fc6868a3b1113dbd043323f8b73aeb60555609caa164d5137a14636d4502784a961191afde2ec46f33f8c2bbfc4561d27a701c3d084e899a632dda3c8 + languageName: node + linkType: hard + +"@tanstack/table-core@npm:8.20.5": + version: 8.20.5 + resolution: "@tanstack/table-core@npm:8.20.5" + checksum: 3c27b5debd61b6bd9bfbb40bfc7c5d5af90873ae1a566b20e3bf2d2f4f2e9a78061c081aacc5259a00e256f8df506ec250eb5472f5c01ff04baf9918b554982b + languageName: node + linkType: hard + "@tootallnate/once@npm:2": version: 2.0.0 resolution: "@tootallnate/once@npm:2.0.0" @@ -6786,8 +5525,8 @@ __metadata: dependencies: "@mdx-js/loader": ^3.1.0 "@mdx-js/react": ^3.1.0 - "@medusajs/icons": ~2.0.0 - "@medusajs/ui": ~3.0.0 + "@medusajs/icons": ~2.4.0 + "@medusajs/ui": ~4.0.4 "@next/bundle-analyzer": 15.0.4 "@next/mdx": 15.0.4 "@react-hook/resize-observer": ^2.0.2 @@ -8212,15 +6951,6 @@ __metadata: languageName: node linkType: hard -"date-fns@npm:^2.30.0": - version: 2.30.0 - resolution: "date-fns@npm:2.30.0" - dependencies: - "@babel/runtime": ^7.21.0 - checksum: e4b521fbf22bc8c3db332bbfb7b094fd3e7627de0259a9d17c7551e2d2702608a7307a449206065916538e384f37b181565447ce2637ae09828427aed9cb5581 - languageName: node - linkType: hard - "date-fns@npm:^3.3.1": version: 3.3.1 resolution: "date-fns@npm:3.3.1" @@ -8427,8 +7157,8 @@ __metadata: resolution: "docs-ui@workspace:packages/docs-ui" dependencies: "@emotion/is-prop-valid": ^1.3.1 - "@medusajs/icons": ~2.0.0 - "@medusajs/ui": ~4.0.0 + "@medusajs/icons": ~2.4.0 + "@medusajs/ui": ~4.0.4 "@next/third-parties": 15.0.4 "@octokit/request": ^8.1.1 "@react-hook/resize-observer": ^1.2.6 @@ -14105,16 +12835,6 @@ __metadata: languageName: node linkType: hard -"react-day-picker@npm:^8.8.0": - version: 8.10.0 - resolution: "react-day-picker@npm:8.10.0" - peerDependencies: - date-fns: ^2.28.0 || ^3.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: e9868aced1e40b4cb7d6cf8d50e250226b38ec7ebea944b65aa9db20a0f36d0581b8a501297d09dcbf2d812de852168952b3fb27990915381629d6e314c2a4d8 - languageName: node - linkType: hard - "react-docgen@npm:^7.1.0": version: 7.1.0 resolution: "react-docgen@npm:7.1.0" @@ -14226,22 +12946,6 @@ __metadata: languageName: node linkType: hard -"react-remove-scroll-bar@npm:^2.3.3": - version: 2.3.5 - resolution: "react-remove-scroll-bar@npm:2.3.5" - dependencies: - react-style-singleton: ^2.2.1 - tslib: ^2.0.0 - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 21b2b02818b04f2c755c5062c90385420adb244107ac90ec87d43cd338760d3cc1cae6eeb59ab198bbc9e388e1a5909551e0b8a708b0d87ce221cf50951bb1fc - languageName: node - linkType: hard - "react-remove-scroll-bar@npm:^2.3.4": version: 2.3.6 resolution: "react-remove-scroll-bar@npm:2.3.6" @@ -14258,25 +12962,6 @@ __metadata: languageName: node linkType: hard -"react-remove-scroll@npm:2.5.5": - version: 2.5.5 - resolution: "react-remove-scroll@npm:2.5.5" - dependencies: - react-remove-scroll-bar: ^2.3.3 - react-style-singleton: ^2.2.1 - tslib: ^2.1.0 - use-callback-ref: ^1.3.0 - use-sidecar: ^1.1.2 - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 4952657e6a7b9d661d4ad4dfcef81b9c7fa493e35164abff99c35c0b27b3d172ef7ad70c09416dc44dd14ff2e6b38a5ec7da27e27e90a15cbad36b8fd2fd8054 - languageName: node - linkType: hard - "react-remove-scroll@npm:2.5.7": version: 2.5.7 resolution: "react-remove-scroll@npm:2.5.7" @@ -15260,16 +13945,6 @@ __metadata: languageName: node linkType: hard -"sonner@npm:^1.4.41": - version: 1.4.41 - resolution: "sonner@npm:1.4.41" - peerDependencies: - react: ^18.0.0 - react-dom: ^18.0.0 - checksum: 31467ecab0fcbd5161fb76d158c698841b524686f7f598eecbc2a58d76bc496b5d5242df4350e274575aa3df59428d3aacd534415c968b19fc309c192c443330 - languageName: node - linkType: hard - "sonner@npm:^1.5.0": version: 1.5.0 resolution: "sonner@npm:1.5.0" @@ -15710,7 +14385,7 @@ __metadata: version: 0.0.0-use.local resolution: "tailwind@workspace:packages/tailwind" dependencies: - "@medusajs/ui-preset": ~1.1.2 + "@medusajs/ui-preset": ~2.4.0 tailwindcss-animate: ^1.0.7 peerDependencies: docs-ui: "*" @@ -16355,9 +15030,9 @@ turbo@latest: dependencies: "@faker-js/faker": ^8.0.2 "@mdx-js/react": ^3.1.0 - "@medusajs/icons": ~2.0.0 - "@medusajs/ui": ~4.0.0 - "@medusajs/ui-preset": ~1.1.3 + "@medusajs/icons": ~2.4.0 + "@medusajs/ui": ~4.0.4 + "@medusajs/ui-preset": ~2.4.0 "@types/node": 20.4.9 "@types/react": "npm:types-react@rc" "@types/react-dom": "npm:types-react@rc"