diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index f85fd36f2e..61d86c9f04 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,15 @@ # docs +## 10.7.7 + +### Patch Changes + +- Deploy 10.7.7 +- Updated dependencies + - @heathmont/moon-cmdk-tw@10.7.7 + - @heathmont/moon-core-tw@10.7.7 + - @heathmont/moon-base-tw@10.7.7 + ## 10.7.6 ### Patch Changes diff --git a/docs/app/components/client/accordion/description.md b/docs/app/components/client/accordion/description.md new file mode 100644 index 0000000000..2a5be6b03e --- /dev/null +++ b/docs/app/components/client/accordion/description.md @@ -0,0 +1,3 @@ +An accordion is a vertical stack of interactive headings used to toggle the display of further information; each item can be 'collapsed' with just a short label visible or 'expanded' to show the full content. + +Based on [Radix UI](https://www.radix-ui.com/). diff --git a/docs/app/components/client/accordion/examples/Default.tsx b/docs/app/components/client/accordion/examples/Default.tsx new file mode 100644 index 0000000000..6189b96d57 --- /dev/null +++ b/docs/app/components/client/accordion/examples/Default.tsx @@ -0,0 +1,44 @@ +'use client' + +import React from 'react'; +import Accordion from '@heathmont/moon-core-tw/lib/es/accordion/Accordion'; +import { ControlsChevronDownSmall } from '@heathmont/moon-icons-tw'; + +export const Default = () => ( + + + + + Default + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint + occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. + + + + + + Test accordion + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod + tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim + veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea + commodo consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint + occaecat cupidatat non proident, sunt in culpa qui officia deserunt + mollit anim id est laborum. + + + +); diff --git a/docs/app/components/client/accordion/page.tsx b/docs/app/components/client/accordion/page.tsx new file mode 100644 index 0000000000..9ea40789e9 --- /dev/null +++ b/docs/app/components/client/accordion/page.tsx @@ -0,0 +1,22 @@ +import { Default } from "./examples/Default"; +import { getExamples } from "@/app/utils/getExamples"; +import { MDX } from "@/components/MDX"; + +export default async function Home() { + const { client } = await getExamples() + return ( +
+

Accordion

+ + + +
+

Default

+
+ +
+
{client.accordion.examples.Default}
+
+
+ ) +} diff --git a/docs/app/components/client/button/description.md b/docs/app/components/client/button/description.md new file mode 100644 index 0000000000..4608b1b7c3 --- /dev/null +++ b/docs/app/components/client/button/description.md @@ -0,0 +1,8 @@ +Buttons allow users to take actions and make choices with a single tap. + +Buttons communicate actions that users can take. They are typically placed throughout your UI, in places like: + +- Modal windows +- Forms +- Cards +- Toolbars diff --git a/docs/app/components/client/button/examples/Default.tsx b/docs/app/components/client/button/examples/Default.tsx new file mode 100644 index 0000000000..de99552b81 --- /dev/null +++ b/docs/app/components/client/button/examples/Default.tsx @@ -0,0 +1,5 @@ +'use client' + +import Button from '@heathmont/moon-core-tw/lib/es/button/Button'; + +export const Default = () => ; diff --git a/docs/app/components/client/button/page.tsx b/docs/app/components/client/button/page.tsx new file mode 100644 index 0000000000..2069342cd6 --- /dev/null +++ b/docs/app/components/client/button/page.tsx @@ -0,0 +1,22 @@ +import { Default } from "@/app/components/client/button/examples/Default"; +import { getExamples } from "@/app/utils/getExamples"; +import { MDX } from "@/components/MDX"; + +export default async function Home() { + const { client } = await getExamples() + return ( +
+

Button

+ + + +
+

Default

+
+ +
+
{client.button.examples.Default}
+
+
+ ) +} diff --git a/docs/app/components/server/avatar/description.md b/docs/app/components/server/avatar/description.md new file mode 100644 index 0000000000..347d36893e --- /dev/null +++ b/docs/app/components/server/avatar/description.md @@ -0,0 +1 @@ +The Avatar component is typically used to display images, icons, or initials representing people or other entities. diff --git a/docs/app/components/avatar/examples/Active.tsx b/docs/app/components/server/avatar/examples/Active.tsx similarity index 100% rename from docs/app/components/avatar/examples/Active.tsx rename to docs/app/components/server/avatar/examples/Active.tsx diff --git a/docs/app/components/avatar/examples/Default.tsx b/docs/app/components/server/avatar/examples/Default.tsx similarity index 100% rename from docs/app/components/avatar/examples/Default.tsx rename to docs/app/components/server/avatar/examples/Default.tsx diff --git a/docs/app/components/avatar/page.tsx b/docs/app/components/server/avatar/page.tsx similarity index 51% rename from docs/app/components/avatar/page.tsx rename to docs/app/components/server/avatar/page.tsx index 74c9ca8e45..9cc2938a33 100644 --- a/docs/app/components/avatar/page.tsx +++ b/docs/app/components/server/avatar/page.tsx @@ -1,22 +1,24 @@ -import { Active } from "@/app/components/avatar/examples/Active"; -import { Default } from "@/app/components/avatar/examples/Default"; -import { getSourceCode } from "@/app/utils/getSourceCode"; +import { Active } from "@/app/components/server/avatar/examples/Active"; +import { Default } from "@/app/components/server/avatar/examples/Default"; +import { getExamples } from "@/app/utils/getExamples"; +import { MDX } from "@/components/MDX"; + export default async function Home() { - // TODO too much boilerplate code - const defaultCode = await getSourceCode('./app/components/avatar/examples/Default.tsx'); - const activeCode = await getSourceCode('./app/components/avatar/examples/Active.tsx'); + const { server } = await getExamples(); return (

Avatar

+ +

Default

-
{defaultCode}
+
{server.avatar.examples.Default}
@@ -24,7 +26,7 @@ export default async function Home() {
-
{activeCode}
+
{server.avatar.examples.Active}
) diff --git a/docs/app/components/server/tag/description.md b/docs/app/components/server/tag/description.md new file mode 100644 index 0000000000..f800b50c1b --- /dev/null +++ b/docs/app/components/server/tag/description.md @@ -0,0 +1,3 @@ +Tags represent a set of interactive keywords that help organize and categorize objects. + +Tags can be added or removed from an object. diff --git a/docs/app/components/tag/examples/Default.tsx b/docs/app/components/server/tag/examples/Default.tsx similarity index 100% rename from docs/app/components/tag/examples/Default.tsx rename to docs/app/components/server/tag/examples/Default.tsx diff --git a/docs/app/components/tag/page.tsx b/docs/app/components/server/tag/page.tsx similarity index 51% rename from docs/app/components/tag/page.tsx rename to docs/app/components/server/tag/page.tsx index 636fb6587b..0606c03229 100644 --- a/docs/app/components/tag/page.tsx +++ b/docs/app/components/server/tag/page.tsx @@ -1,19 +1,22 @@ -import { Default } from "@/app/components/tag/examples/Default"; -import { getSourceCode } from "@/app/utils/getSourceCode"; +import { Default } from "@/app/components/server/tag/examples/Default"; +import { getExamples } from "@/app/utils/getExamples"; +import { MDX } from "@/components/MDX"; export default async function Home() { - const defaultCode = await getSourceCode('./app/components/tag/examples/Default.tsx'); + const { server } = await getExamples(); return (

Tag

+ +

Default

-
{defaultCode}
+
{server.tag.examples.Default}
) diff --git a/docs/app/components/types.ts b/docs/app/components/types.ts new file mode 100644 index 0000000000..59344a3c58 --- /dev/null +++ b/docs/app/components/types.ts @@ -0,0 +1,31 @@ +export interface Examples { + "client": { + "accordion": { + "description": "string", + "examples": { + "Default": "string" + } + }, + "button": { + "description": "string", + "examples": { + "Default": "string" + } + } + }, + "server": { + "avatar": { + "description": "string", + "examples": { + "Active": "string", + "Default": "string" + } + }, + "tag": { + "description": "string", + "examples": { + "Default": "string" + } + } + } +}; diff --git a/docs/app/page.tsx b/docs/app/page.tsx index 4e9ad59c2d..62b0fa044f 100644 --- a/docs/app/page.tsx +++ b/docs/app/page.tsx @@ -1,7 +1,23 @@ -export default function Home() { +import { getExamples } from "./utils/getExamples"; +import { MDX } from "@/components/MDX"; +import { CommandMenu } from "@/components/Search"; + +export default async function Home() { + const examples = await getExamples(); + + const items = [ + { label: "Aurum" }, + { label: "Argentum" }, + { label: "Zink" }, + { label: "Plumbum" }, + { label: "Test" } + ]; + return (
Moon Design System + +
) } diff --git a/docs/app/utils/buildExamplesType.ts b/docs/app/utils/buildExamplesType.ts new file mode 100644 index 0000000000..4f1d6ef98d --- /dev/null +++ b/docs/app/utils/buildExamplesType.ts @@ -0,0 +1,116 @@ +import { promises as fs } from 'fs'; +import path from 'path'; + +export async function writeToFile({ + contentToWrite, + path, +}: { + contentToWrite: string, + path: string +}) { + if (!contentToWrite) { + throw new Error('Content for writeToFile function must be provided.'); + } + if (!path) { + throw new Error('Path for writeToFile function must be provided.'); + } + + try { + await fs.writeFile(path, contentToWrite, 'utf8'); + console.log(`${path} file has been written successfully.`); + } catch (err) { + if (err instanceof Error) { + console.error('Error writing to file:', err.message); + throw err; + } + } +} + +export async function hasSubfolders(_path: string) { + try { + const files = await fs.readdir(_path, { withFileTypes: true }); + + for (const file of files) { + if (file.isDirectory()) { + // There is at least one subdirectory + return true; + } + } + // No subdirectories found + return false; + } catch (err) { + if (err instanceof Error) { + console.error('Error checking folders:', err.message); + throw err; + } + } +} + +type FilesTypes = Record; + +export async function processFiles( + dirPath: string, + processCallback: (filePath: string) => Promise +) { + const files = await fs.readdir(dirPath); + const result: Record | string[] | string> = {}; + + for (const file of files) { + const filePath = path.join(dirPath, file); + const stats = await fs.stat(filePath); + + if (stats.isDirectory()) { + const _hasSubfolders = await hasSubfolders(filePath); + if (_hasSubfolders) { + result[file] = await processFiles(filePath, processCallback); + } else { + result[file] = await processCallback(filePath); + } + } + if (stats.isFile()) { + const extname = path.extname(filePath).toLowerCase(); + const fileName = path.basename(filePath); + const fileNameWithoutExtension = path.parse(fileName).name + + if (extname === '.md') { + result[fileNameWithoutExtension] = 'string'; + } + } + } + + return result; +} + +export const getTemplate = (content: string) => { + return `export interface Examples ${content}; +` +} + +const getFilesTypes = async (dirPath: string) => { + const files = await fs.readdir(dirPath); + const result: FilesTypes = {}; + + for (const file of files) { + const filePath = path.join(dirPath, file); + const fileName = path.basename(filePath); + const fileNameWithoutExtension = path.parse(fileName).name + result[fileNameWithoutExtension] = 'string'; + } + return result; +} + + +export const buildExamplesType = async () => { + const components = ( + await processFiles('./app/components/', getFilesTypes) + ); + + await writeToFile({ + contentToWrite: getTemplate(JSON.stringify(components, null, 2)), + path: './app/components/types.ts' + }); + + return components; +} + +buildExamplesType(); diff --git a/docs/app/utils/getExamples.ts b/docs/app/utils/getExamples.ts new file mode 100644 index 0000000000..6f39275c00 --- /dev/null +++ b/docs/app/utils/getExamples.ts @@ -0,0 +1,94 @@ +import { promises as fs } from 'fs'; +import path from 'path'; +import { Examples } from '../components/types'; + +export async function hasSubfolders(_path: string) { + try { + const files = await fs.readdir(_path, { withFileTypes: true }); + + for (const file of files) { + if (file.isDirectory()) { + // There is at least one subdirectory + return true; + } + } + // No subdirectories found + return false; + } catch (err) { + if (err instanceof Error) { + console.error('Error checking folders:', err.message); + throw err; + } + } +} + +type FilesContent = Record; + +export async function processFiles( + dirPath: string, + processCallback: (filePath: string) => Promise +) { + const files = await fs.readdir(dirPath); + const result: Record | string[] > | FilesContent = {}; + + for (const file of files) { + const filePath = path.join(dirPath, file); + const stats = await fs.stat(filePath); + + if (stats.isDirectory()) { + const _hasSubfolders = await hasSubfolders(filePath); + if (_hasSubfolders) { + result[file] = await processFiles(filePath, processCallback); + } else { + result[file] = await processCallback(filePath); + } + } + + if (stats.isFile()) { + const extname = path.extname(filePath).toLowerCase(); + const fileName = path.basename(filePath); + const fileNameWithoutExtension = path.parse(fileName).name + + if (extname === '.md') { + const content = await readFromFile(filePath); + result[fileNameWithoutExtension] = content; + } + } + } + + return result; +} + +const getFilesContent = async (dirPath: string) => { + const files = await fs.readdir(dirPath); + const result: FilesContent = {}; + + for (const file of files) { + const filePath = path.join(dirPath, file); + const fileName = path.basename(filePath); + const fileNameWithoutExtension = path.parse(fileName).name + const content = await readFromFile(filePath); + result[fileNameWithoutExtension] = content; + } + return result; +} + +export async function readFromFile(pathToFile: string) { + try { + const data = await fs.readFile(pathToFile, 'utf8'); + return data; + } catch (err) { + if (err instanceof Error) { + console.error(`Error reading from file ${pathToFile}:`, err.message); + throw err; + } + } +} + +export async function getExamples() { + const components = ( + await processFiles('./app/components/', getFilesContent) + ) as unknown as Examples; + + return components; +} diff --git a/docs/app/utils/getSourceCode.ts b/docs/app/utils/getSourceCode.ts deleted file mode 100644 index 5581cf9d07..0000000000 --- a/docs/app/utils/getSourceCode.ts +++ /dev/null @@ -1,30 +0,0 @@ -import fs from 'fs'; -import path from 'path'; - -function readFromFile(pathToFile: string) { - return new Promise((resolve, reject) => { - fs.readFile(pathToFile, 'utf8', (err, data) => { - if (err) { - console.error(err); - reject(err); - } else { - resolve(data); - } - }); - }); -} - -export async function getSourceCode(_path: string) { - const dirPath = path.resolve( - _path - ); - - const res = await readFromFile(dirPath) - - if (!res) { - // This will activate the closest `error.js` Error Boundary - throw new Error('Failed to fetch data') - } - - return res.toString(); -} \ No newline at end of file diff --git a/docs/components/MDX.tsx b/docs/components/MDX.tsx new file mode 100644 index 0000000000..95319aebb9 --- /dev/null +++ b/docs/components/MDX.tsx @@ -0,0 +1,11 @@ +import { MDXRemote } from 'next-mdx-remote/rsc' + +export function MDX({ markdown }: { markdown: string }) { + /* + An error is triggered by `next-mdx-remote/rsc`: + "'MDXRemote' cannot be used as a JSX component." + https://github.com/hashicorp/next-mdx-remote/issues/366 + */ + return +} + diff --git a/docs/components/Search.tsx b/docs/components/Search.tsx new file mode 100644 index 0000000000..9f1112cf5e --- /dev/null +++ b/docs/components/Search.tsx @@ -0,0 +1,82 @@ +'use client' + +import React, { useEffect, useState } from "react"; +import SearchCmdk from '@heathmont/moon-cmdk-tw/lib/es/searchCmdk/SearchCmdk'; + +type Item = { + label: string +} + +export function CommandMenu({ items }: { items: Item[] }) { + const [open, setOpen] = useState(false); + const [search, setSearch] = useState(""); + + useEffect(() => { + const down = (e: KeyboardEvent) => { + // Toggle the menu when ⌘K is pressed + if (e.key === "k" && e.metaKey) { + e.preventDefault(); + setOpen((open) => !open); + } + }; + + document.addEventListener("keydown", down); + return () => document.removeEventListener("keydown", down); + }, []); + + const filterItems = (values: Item[], search: string) => { + return values.filter(({ label }) => +label.toLowerCase().includes(search)); + } + const filteredItems = filterItems(items, search.toLowerCase()); + + return ( + <> + { setOpen(true) }}> + + Search... + ⌘K + + + {open && } + + + + + + setOpen(false)}> + Esc + + + + + + No Results + + {filteredItems.map(({ label }) => + { + setOpen(false); + }} + > + {label} + + )} + + + + ); +} + + diff --git a/docs/next.config.js b/docs/next.config.cjs similarity index 100% rename from docs/next.config.js rename to docs/next.config.cjs diff --git a/docs/package.json b/docs/package.json index bbfd77e370..7b059e740b 100644 --- a/docs/package.json +++ b/docs/package.json @@ -1,16 +1,19 @@ { "name": "docs", - "version": "10.7.6", + "version": "10.7.7", "private": true, + "type": "module", "scripts": { "dev": "next dev", - "build": "next build", + "build:types": "npx ts-node --esm app/utils/buildExamplesType.ts", + "build": "pnpm run build:types && next build", "start": "next start", "lint": "next lint" }, "dependencies": { - "@heathmont/moon-base-tw": "workspace:^10.7.6", - "@heathmont/moon-core-tw": "workspace:^10.7.6", + "@heathmont/moon-base-tw": "workspace:^10.7.7", + "@heathmont/moon-cmdk-tw": "workspace:^10.7.7", + "@heathmont/moon-core-tw": "workspace:^10.7.7", "@heathmont/moon-icons-tw": "9.28.4", "@types/node": "20.4.9", "@types/react": "18.2.19", @@ -19,10 +22,12 @@ "eslint": "8.46.0", "eslint-config-next": "13.4.13", "next": "13.4.13", + "next-mdx-remote": "^4.4.1", "postcss": "8.4.27", "react": "18.2.0", "react-dom": "18.2.0", "tailwindcss": "3.3.3", + "ts-node": "^10.9.1", "typescript": "5.1.6" } } diff --git a/docs/postcss.config.js b/docs/postcss.config.cjs similarity index 100% rename from docs/postcss.config.js rename to docs/postcss.config.cjs diff --git a/docs/tailwind.config.js b/docs/tailwind.config.cjs similarity index 100% rename from docs/tailwind.config.js rename to docs/tailwind.config.cjs diff --git a/next-docs/CHANGELOG.md b/next-docs/CHANGELOG.md index 5a05ff3aea..ed107c7372 100644 --- a/next-docs/CHANGELOG.md +++ b/next-docs/CHANGELOG.md @@ -1,5 +1,16 @@ # Change Log +## 10.7.7 + +### Patch Changes + +- Deploy 10.7.7 +- Updated dependencies + - @heathmont/moon-table-tw@10.7.7 + - @heathmont/moon-themes-tw@10.7.7 + - @heathmont/moon-cmdk-tw@10.7.7 + - @heathmont/moon-core-tw@10.7.7 + ## 10.7.6 ### Patch Changes diff --git a/next-docs/package.json b/next-docs/package.json index 0b94929a01..6adebc2759 100644 --- a/next-docs/package.json +++ b/next-docs/package.json @@ -1,6 +1,6 @@ { "name": "next-docs", - "version": "10.7.6", + "version": "10.7.7", "private": true, "scripts": { "dev": "next dev", @@ -19,9 +19,9 @@ "@heathmont/moon-assets": "workspace:^10.7.1", "@heathmont/moon-charts": "workspace:^10.7.1", "@heathmont/moon-components": "workspace:^10.7.1", - "@heathmont/moon-cmdk-tw": "workspace:^10.7.6", + "@heathmont/moon-cmdk-tw": "workspace:^10.7.7", "@heathmont/moon-core": "workspace:^10.7.1", - "@heathmont/moon-core-tw": "workspace:^10.7.6", + "@heathmont/moon-core-tw": "workspace:^10.7.7", "@heathmont/moon-datepicker": "workspace:^10.7.1", "@heathmont/moon-draggabletable": "workspace:^10.7.1", "@heathmont/moon-icons": "workspace:^10.7.1", @@ -30,9 +30,9 @@ "@heathmont/moon-select": "workspace:^10.7.1", "@heathmont/moon-sidebar": "workspace:^10.7.1", "@heathmont/moon-table": "workspace:^10.7.1", - "@heathmont/moon-table-tw": "workspace:^10.7.6", + "@heathmont/moon-table-tw": "workspace:^10.7.7", "@heathmont/moon-themes": "workspace:^10.7.1", - "@heathmont/moon-themes-tw": "workspace:^10.7.6", + "@heathmont/moon-themes-tw": "workspace:^10.7.7", "@heathmont/moon-utils": "workspace:^10.7.1", "@heathmont/moon-icons-tw": "9.28.5", "@hookform/resolvers": "3.2.0", diff --git a/next-docs/pages/api/examples.ts b/next-docs/pages/api/examples.ts index 2689f9b4cf..d2c63436db 100644 --- a/next-docs/pages/api/examples.ts +++ b/next-docs/pages/api/examples.ts @@ -2,6 +2,7 @@ import fs from 'fs'; import path from 'path'; // Next.js API route support: https://nextjs.org/docs/api-routes/introduction import type { NextApiRequest, NextApiResponse } from 'next'; +import useFilteredRequestQuery, { filterAllowedSymbolsOnly, filterAlphaNumericOnly, filterSafePath } from '../../utils/useFilteredRequestQuery'; type Data = { examples: Object; @@ -59,7 +60,7 @@ export default async (req: NextApiRequest, res: NextApiResponse) => { const dirPath = path.resolve( './public', dirRelativeToPublicFolder, - component as string + useFilteredRequestQuery(component as string, filterAlphaNumericOnly) ); const examples = await getFilesFromDirectory(dirPath); diff --git a/next-docs/pages/api/styledExamples.ts b/next-docs/pages/api/styledExamples.ts index 00f5f5ee0a..0725a54b14 100644 --- a/next-docs/pages/api/styledExamples.ts +++ b/next-docs/pages/api/styledExamples.ts @@ -2,6 +2,7 @@ import fs from 'fs'; import path from 'path'; // Next.js API route support: https://nextjs.org/docs/api-routes/introduction import type { NextApiRequest, NextApiResponse } from 'next'; +import useFilteredRequestQuery, { filterAllowedSymbolsOnly, filterAlphaNumericOnly, filterSafePath } from '../../utils/useFilteredRequestQuery'; type Data = { examples: Object; @@ -59,7 +60,7 @@ export default async (req: NextApiRequest, res: NextApiResponse) => { const dirPath = path.resolve( './public', dirRelativeToPublicFolder, - component as string + useFilteredRequestQuery(component as string, filterAlphaNumericOnly) ); const examples = await getFilesFromDirectory(dirPath); diff --git a/next-docs/pages/components/carousel.tsx b/next-docs/pages/components/carousel.tsx index dd3af753b3..d460fff8dd 100644 --- a/next-docs/pages/components/carousel.tsx +++ b/next-docs/pages/components/carousel.tsx @@ -2,17 +2,18 @@ import { ReactNode } from 'react'; import Preview from '../../components/codePreview/Preview'; import ComponentAnatomy from '../../components/ComponentAnatomy'; import ComponentPageDescription from '../../components/ComponentPageDescription'; +import type { ComponentNames } from '../../components/getComponent'; import Layout from '../../components/Layout'; import PropsTable from '../../components/PropsTable'; import Autoslide from '../../public/examples/carousel/Autoslide'; import CustomizedArrow from '../../public/examples/carousel/CustomizedArrow'; import Default from '../../public/examples/carousel/Default'; import Indicators from '../../public/examples/carousel/Indicators'; +import Rtl from '../../public/examples/carousel/Rtl'; import SelectIndex from '../../public/examples/carousel/SelectIndex'; import Spaces from '../../public/examples/carousel/Spaces'; import VisibleIndex from '../../public/examples/carousel/VisibleIndex'; import useComponent from '../../utils/useComponent'; -import type { ComponentNames } from '../../components/getComponent'; const COMPONENT_NAME: ComponentNames = 'Carousel'; @@ -27,6 +28,10 @@ const PageCarousel = () => { to focus on important website content and improves the overall visual appeal effectively.

+

+ To support Arabic languages this component requires setting up isRtl + prop directly. +

{` @@ -73,6 +78,11 @@ const PageCarousel = () => { preview={} code={examples ? examples.Autoslide : 'Loading'} /> + } + code={examples ? examples.Rtl : 'Loading'} + /> { description: 'Interval of auto sliding in milliseconds. No auto sliding if undefined', }, + { + name: 'isRtl', + type: 'boolean', + required: false, + default: '-', + description: 'Set right to left (rtl) view', + }, ]} /> diff --git a/next-docs/pages/components/combobox.tsx b/next-docs/pages/components/combobox.tsx index f477c7157d..c942419843 100644 --- a/next-docs/pages/components/combobox.tsx +++ b/next-docs/pages/components/combobox.tsx @@ -2,6 +2,7 @@ import { ReactNode } from 'react'; import Preview from '../../components/codePreview/Preview'; import ComponentAnatomy from '../../components/ComponentAnatomy'; import ComponentPageDescription from '../../components/ComponentPageDescription'; +import type { ComponentNames } from '../../components/getComponent'; import Layout from '../../components/Layout'; import PropsTable from '../../components/PropsTable'; import Default from '../../public/examples/combobox/Default'; @@ -12,7 +13,6 @@ import MultiSelect from '../../public/examples/combobox/MultiSelect'; import Select from '../../public/examples/combobox/Select'; import SelectStates from '../../public/examples/combobox/SelectStates'; import useComponent from '../../utils/useComponent'; -import type { ComponentNames } from '../../components/getComponent'; const COMPONENT_NAME: ComponentNames = 'Combobox'; @@ -242,6 +242,13 @@ const PageCombobox = () => { default: '-', description: 'Tailwind classes for custom styles.', }, + { + name: 'onClose', + type: '(value: unknown) => void;', + required: false, + default: '-', + description: 'Called when the Combobox is dismissed.', + }, ]} /> @@ -457,6 +464,13 @@ const PageCombobox = () => { default: '-', description: 'Whether or not the Listbox is open.', }, + { + name: 'onClose', + type: '(value: unknown) => void;', + required: false, + default: '-', + description: 'Called when the Combobox is dismissed.', + }, ]} /> @@ -527,6 +541,13 @@ const PageCombobox = () => { default: '-', description: 'Whether or not the Listbox is open.', }, + { + name: 'onClose', + type: '(value: unknown) => void;', + required: false, + default: '-', + description: 'Called when the Combobox is dismissed.', + }, ]} /> diff --git a/next-docs/public/examples/carousel/Rtl.tsx b/next-docs/public/examples/carousel/Rtl.tsx new file mode 100644 index 0000000000..2f9e0c4fb5 --- /dev/null +++ b/next-docs/public/examples/carousel/Rtl.tsx @@ -0,0 +1,34 @@ +import { Carousel, MenuItem } from '@heathmont/moon-core-tw'; +import { useState } from 'react'; + +const Example = () => { + const [selected, setSelected] = useState(0); + const items = Array.from({ length: 5 }, (index) => index); + return ( +
+
+ {items.map((_, index) => ( + setSelected(index)} + className="px-4" + > + {index} + + ))} +
+ + + {items.map((_, index) => ( + + {index} + + ))} + + +
+ ); +}; + +export default Example; diff --git a/next-docs/public/examples/carousel/__tests__/__snapshots__/index.test.tsx.snap b/next-docs/public/examples/carousel/__tests__/__snapshots__/index.test.tsx.snap index 1f0c8b1854..01075e8935 100644 --- a/next-docs/public/examples/carousel/__tests__/__snapshots__/index.test.tsx.snap +++ b/next-docs/public/examples/carousel/__tests__/__snapshots__/index.test.tsx.snap @@ -1,2298 +1,5 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Carousel in RTL renders Autoslide 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
-
-
-
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse overflow-x-hidden" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
  • - 5 -
  • -
  • - 6 -
  • -
  • - 7 -
  • -
  • - 8 -
  • -
  • - 9 -
  • -
  • - 10 -
  • -
  • - 11 -
  • -
  • - 12 -
  • -
  • - 13 -
  • -
  • - 14 -
  • -
  • - 15 -
  • -
  • - 16 -
  • -
  • - 17 -
  • -
  • - 18 -
  • -
  • - 19 -
  • -
  • - 20 -
  • -
  • - 21 -
  • -
  • - 22 -
  • -
  • - 23 -
  • -
  • - 24 -
  • -
-
-
-
- , - "container":
-
-
-
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse overflow-x-hidden" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
  • - 5 -
  • -
  • - 6 -
  • -
  • - 7 -
  • -
  • - 8 -
  • -
  • - 9 -
  • -
  • - 10 -
  • -
  • - 11 -
  • -
  • - 12 -
  • -
  • - 13 -
  • -
  • - 14 -
  • -
  • - 15 -
  • -
  • - 16 -
  • -
  • - 17 -
  • -
  • - 18 -
  • -
  • - 19 -
  • -
  • - 20 -
  • -
  • - 21 -
  • -
  • - 22 -
  • -
  • - 23 -
  • -
  • - 24 -
  • -
-
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`; - -exports[`Carousel in RTL renders CustomizedArrow 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
  • - 5 -
  • -
  • - 6 -
  • -
  • - 7 -
  • -
  • - 8 -
  • -
  • - 9 -
  • -
  • - 10 -
  • -
  • - 11 -
  • -
  • - 12 -
  • -
  • - 13 -
  • -
  • - 14 -
  • -
  • - 15 -
  • -
  • - 16 -
  • -
  • - 17 -
  • -
  • - 18 -
  • -
  • - 19 -
  • -
  • - 20 -
  • -
  • - 21 -
  • -
  • - 22 -
  • -
  • - 23 -
  • -
  • - 24 -
  • -
- -
-
-
- , - "container":
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
  • - 5 -
  • -
  • - 6 -
  • -
  • - 7 -
  • -
  • - 8 -
  • -
  • - 9 -
  • -
  • - 10 -
  • -
  • - 11 -
  • -
  • - 12 -
  • -
  • - 13 -
  • -
  • - 14 -
  • -
  • - 15 -
  • -
  • - 16 -
  • -
  • - 17 -
  • -
  • - 18 -
  • -
  • - 19 -
  • -
  • - 20 -
  • -
  • - 21 -
  • -
  • - 22 -
  • -
  • - 23 -
  • -
  • - 24 -
  • -
- -
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`; - -exports[`Carousel in RTL renders Default 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
  • - 5 -
  • -
  • - 6 -
  • -
  • - 7 -
  • -
  • - 8 -
  • -
  • - 9 -
  • -
  • - 10 -
  • -
  • - 11 -
  • -
  • - 12 -
  • -
  • - 13 -
  • -
  • - 14 -
  • -
  • - 15 -
  • -
  • - 16 -
  • -
  • - 17 -
  • -
  • - 18 -
  • -
  • - 19 -
  • -
  • - 20 -
  • -
  • - 21 -
  • -
  • - 22 -
  • -
  • - 23 -
  • -
  • - 24 -
  • -
- -
-
-
- , - "container":
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
  • - 5 -
  • -
  • - 6 -
  • -
  • - 7 -
  • -
  • - 8 -
  • -
  • - 9 -
  • -
  • - 10 -
  • -
  • - 11 -
  • -
  • - 12 -
  • -
  • - 13 -
  • -
  • - 14 -
  • -
  • - 15 -
  • -
  • - 16 -
  • -
  • - 17 -
  • -
  • - 18 -
  • -
  • - 19 -
  • -
  • - 20 -
  • -
  • - 21 -
  • -
  • - 22 -
  • -
  • - 23 -
  • -
  • - 24 -
  • -
- -
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`; - -exports[`Carousel in RTL renders Indicators 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
- -
-
-
-
-
-
-
-
-
-
- , - "container":
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
- -
-
-
-
-
-
-
-
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`; - -exports[`Carousel in RTL renders SelectIndex 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
-
-
-
- - - - - -
-
-
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse overflow-x-hidden" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
-
-
-
-
- , - "container":
-
-
-
- - - - - -
-
-
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse overflow-x-hidden" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
-
-
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`; - -exports[`Carousel in RTL renders Spaces 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse gap-10" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
- -
-
-
- , - "container":
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse gap-10" - > -
  • - 0 -
  • -
  • - 1 -
  • -
  • - 2 -
  • -
  • - 3 -
  • -
  • - 4 -
  • -
- -
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`; - -exports[`Carousel in RTL renders VisibleIndex 1`] = ` -Object { - "asFragment": [Function], - "baseElement": -
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse" - > -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
- -
-
-
- , - "container":
-
-
- -
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse" - > -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
  • - -1--1 -
  • -
- -
-
-
, - "debug": [Function], - "findAllByAltText": [Function], - "findAllByDisplayValue": [Function], - "findAllByLabelText": [Function], - "findAllByPlaceholderText": [Function], - "findAllByRole": [Function], - "findAllByTestId": [Function], - "findAllByText": [Function], - "findAllByTitle": [Function], - "findByAltText": [Function], - "findByDisplayValue": [Function], - "findByLabelText": [Function], - "findByPlaceholderText": [Function], - "findByRole": [Function], - "findByTestId": [Function], - "findByText": [Function], - "findByTitle": [Function], - "getAllByAltText": [Function], - "getAllByDisplayValue": [Function], - "getAllByLabelText": [Function], - "getAllByPlaceholderText": [Function], - "getAllByRole": [Function], - "getAllByTestId": [Function], - "getAllByText": [Function], - "getAllByTitle": [Function], - "getByAltText": [Function], - "getByDisplayValue": [Function], - "getByLabelText": [Function], - "getByPlaceholderText": [Function], - "getByRole": [Function], - "getByTestId": [Function], - "getByText": [Function], - "getByTitle": [Function], - "queryAllByAltText": [Function], - "queryAllByDisplayValue": [Function], - "queryAllByLabelText": [Function], - "queryAllByPlaceholderText": [Function], - "queryAllByRole": [Function], - "queryAllByTestId": [Function], - "queryAllByText": [Function], - "queryAllByTitle": [Function], - "queryByAltText": [Function], - "queryByDisplayValue": [Function], - "queryByLabelText": [Function], - "queryByPlaceholderText": [Function], - "queryByRole": [Function], - "queryByTestId": [Function], - "queryByText": [Function], - "queryByTitle": [Function], - "rerender": [Function], - "unmount": [Function], -} -`; - exports[`Carousel renders Autoslide 1`] = ` Object { "asFragment": [Function], @@ -4529,3 +2236,210 @@ Object { "unmount": [Function], } `; + +exports[`Carousel renders in RTL 1`] = ` +Object { + "asFragment": [Function], + "baseElement": +
+
+
+ + + + + +
+
+
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse overflow-x-hidden" + > +
  • + 4 +
  • +
  • + 3 +
  • +
  • + 2 +
  • +
  • + 1 +
  • +
  • + 0 +
  • +
+
+
+
+ , + "container":
+
+
+ + + + + +
+
+
    *]:flex-[0_0_auto] [&>img]:h-full [&>img]:basis-auto [&>img]:w-auto snap-x snap-mandatory rtl:flex-row-reverse overflow-x-hidden" + > +
  • + 4 +
  • +
  • + 3 +
  • +
  • + 2 +
  • +
  • + 1 +
  • +
  • + 0 +
  • +
+
+
+
, + "debug": [Function], + "findAllByAltText": [Function], + "findAllByDisplayValue": [Function], + "findAllByLabelText": [Function], + "findAllByPlaceholderText": [Function], + "findAllByRole": [Function], + "findAllByTestId": [Function], + "findAllByText": [Function], + "findAllByTitle": [Function], + "findByAltText": [Function], + "findByDisplayValue": [Function], + "findByLabelText": [Function], + "findByPlaceholderText": [Function], + "findByRole": [Function], + "findByTestId": [Function], + "findByText": [Function], + "findByTitle": [Function], + "getAllByAltText": [Function], + "getAllByDisplayValue": [Function], + "getAllByLabelText": [Function], + "getAllByPlaceholderText": [Function], + "getAllByRole": [Function], + "getAllByTestId": [Function], + "getAllByText": [Function], + "getAllByTitle": [Function], + "getByAltText": [Function], + "getByDisplayValue": [Function], + "getByLabelText": [Function], + "getByPlaceholderText": [Function], + "getByRole": [Function], + "getByTestId": [Function], + "getByText": [Function], + "getByTitle": [Function], + "queryAllByAltText": [Function], + "queryAllByDisplayValue": [Function], + "queryAllByLabelText": [Function], + "queryAllByPlaceholderText": [Function], + "queryAllByRole": [Function], + "queryAllByTestId": [Function], + "queryAllByText": [Function], + "queryAllByTitle": [Function], + "queryByAltText": [Function], + "queryByDisplayValue": [Function], + "queryByLabelText": [Function], + "queryByPlaceholderText": [Function], + "queryByRole": [Function], + "queryByTestId": [Function], + "queryByText": [Function], + "queryByTitle": [Function], + "rerender": [Function], + "unmount": [Function], +} +`; diff --git a/next-docs/public/examples/carousel/__tests__/index.test.tsx b/next-docs/public/examples/carousel/__tests__/index.test.tsx index e9de066ea9..93d3d77337 100644 --- a/next-docs/public/examples/carousel/__tests__/index.test.tsx +++ b/next-docs/public/examples/carousel/__tests__/index.test.tsx @@ -11,8 +11,7 @@ import VisibleIndex from '../VisibleIndex'; import Indicators from '../Indicators'; import SelectIndex from '../SelectIndex'; import Autoslide from '../Autoslide'; - -const withRtl = (component: JSX.Element) =>
{component}
; +import Rtl from '../Rtl'; describe('Carousel', () => { afterEach(cleanup); @@ -44,36 +43,8 @@ describe('Carousel', () => { const tree = render(); expect(tree).toMatchSnapshot(); }); -}); - -describe('Carousel in RTL', () => { - afterEach(cleanup); - it('renders Default', () => { - const tree = render(withRtl()); - expect(tree).toMatchSnapshot(); - }); - it('renders Spaces', () => { - const tree = render(withRtl()); - expect(tree).toMatchSnapshot(); - }); - it('renders CustomizedArrow', () => { - const tree = render(withRtl()); - expect(tree).toMatchSnapshot(); - }); - it('renders VisibleIndex', () => { - const tree = render(withRtl()); - expect(tree).toMatchSnapshot(); - }); - it('renders Indicators', () => { - const tree = render(withRtl()); - expect(tree).toMatchSnapshot(); - }); - it('renders SelectIndex', () => { - const tree = render(withRtl()); - expect(tree).toMatchSnapshot(); - }); - it('renders Autoslide', () => { - const tree = render(withRtl()); + it('renders in RTL', () => { + const tree = render(); expect(tree).toMatchSnapshot(); }); }); diff --git a/next-docs/public/examples/combobox/Default.tsx b/next-docs/public/examples/combobox/Default.tsx index f0a88d77b7..3e228614cd 100644 --- a/next-docs/public/examples/combobox/Default.tsx +++ b/next-docs/public/examples/combobox/Default.tsx @@ -45,7 +45,7 @@ const Example = () => { > {({ open }) => ( <> - + { > {({ open }) => ( <> - + { counter={selected0.length} placeholder="Choose an option" displayValue={({ label }) => label} + onClose={console.log} > @@ -101,6 +102,7 @@ const Example = () => { counter={selected1.length} placeholder="Choose an option" displayValue={({ label }) => label} + onClose={console.log} > @@ -146,6 +148,7 @@ const Example = () => { counter={selected2.length} placeholder="Choose an option" displayValue={({ label }) => label} + onClose={console.log} > diff --git a/next-docs/public/examples/table/__tests__/__snapshots__/index.test.tsx.snap b/next-docs/public/examples/table/__tests__/__snapshots__/index.test.tsx.snap index 5af405c352..de0d2167e8 100644 --- a/next-docs/public/examples/table/__tests__/__snapshots__/index.test.tsx.snap +++ b/next-docs/public/examples/table/__tests__/__snapshots__/index.test.tsx.snap @@ -5576,7 +5576,7 @@ Object { />
string; +} + +/* Allows letters, digits, dashes, dots, slashes. + Denies: leading/trailing/multiple dots, + leading/trailing/multiple slashes, + dots-slashes combinations. + Returns: resulting string. +*/ + +export const filterSafePath: Patterns = { + trimRepeatedSymbols: (path: string) => { + const pattern = new RegExp('([\\.]{2,})|([\\/]{2,})|([\\\\]{2,})', 'g'); + return path.replace(pattern, (match) => { return match[0]; }) + }, + removeDottedSlashes: (path: string) => { + const pattern = new RegExp('(\\.\\\\)|(\\.\\/)|(\\\\\\.)|(\\/\\.)', 'g'); + return path.replace(pattern, ''); + }, + removeUnallowedSymbols: (path: string) => { + const pattern = new RegExp('([^\\w\\d\\.\\/\\\\-]+)', 'g'); + return path.replace(pattern, ''); + }, + trimSymbols: (path: string) => { + const pattern = new RegExp('(^[\\.\\\\\\/]+)|([\\.\\\\\\/]+)$', 'g'); + return path.replace(pattern, ''); + } +} + +/* Allows letters, digits, dashes. + Returns if matched: result string, + otherwise: empty string; +*/ +export const filterAllowedSymbolsOnly: Patterns = { + ...filterSafePath, + getPath: (path: string) => { + const matched = path.match(new RegExp('^([\\w\\d-]+)$', 'gi')); + return matched === null ? '' : matched[0]; + } +} + +/* Allows alphanumeric symbols. + Returns if matched: result string, + otherwise: empty string; +*/ +export const filterAlphaNumericOnly: Patterns = { + ...filterSafePath, + getPath: (path: string) => { + const matched = path.match(new RegExp('^([\\w]+)$', 'gi')); + return matched === null ? '' : matched[0]; + } +} + +const useFilteredRequestQuery = (path: string, patterns: Patterns, defaultPath: string = '') => { + let threatedPath = path; + for (const pattern of Object.values(patterns)) { + threatedPath = pattern(threatedPath); + } + + return threatedPath.length + ? threatedPath + : defaultPath; +}; + +export default useFilteredRequestQuery; diff --git a/package.json b/package.json index c11c09936d..725b4a5ce9 100644 --- a/package.json +++ b/package.json @@ -131,4 +131,4 @@ "dependencies": { "@tanstack/react-table": "8.9.3" } -} \ No newline at end of file +} diff --git a/packages/assets/src/icons/IconLivespins.tsx b/packages/assets/src/icons/IconLivespins.tsx index 1bbd2d0217..e6728b0490 100644 --- a/packages/assets/src/icons/IconLivespins.tsx +++ b/packages/assets/src/icons/IconLivespins.tsx @@ -1,7 +1,7 @@ import React from 'react'; -import styled from 'styled-components'; import { ColorProps } from '@heathmont/moon-themes'; import { themed } from '@heathmont/moon-utils'; +import styled from 'styled-components'; const Svg = (props: React.SVGProps) => ( =12'} + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + dev: false + /@emotion/babel-plugin@11.10.6: resolution: {integrity: sha512-p2dAqtVrkhSa7xz1u/m9eHYdLi+en8NowrmXeF/dKtJpU8lCWli8RUAati7NcSl0afsBott48pdnANuD0wh9QQ==} dependencies: @@ -3492,6 +3508,13 @@ packages: '@jridgewell/resolve-uri': 3.1.0 '@jridgewell/sourcemap-codec': 1.4.14 + /@jridgewell/trace-mapping@0.3.9: + resolution: {integrity: sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==} + dependencies: + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.15 + dev: false + /@manypkg/find-root@1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: @@ -3512,6 +3535,40 @@ packages: read-yaml-file: 1.1.0 dev: true + /@mdx-js/mdx@2.3.0: + resolution: {integrity: sha512-jLuwRlz8DQfQNiUCJR50Y09CGPq3fLtmtUQfVrj79E0JWu3dvsVcxVIcfhR5h0iXu+/z++zDrYeiJqifRynJkA==} + dependencies: + '@types/estree-jsx': 1.0.1 + '@types/mdx': 2.0.7 + estree-util-build-jsx: 2.2.2 + estree-util-is-identifier-name: 2.1.0 + estree-util-to-js: 1.2.0 + estree-walker: 3.0.3 + hast-util-to-estree: 2.3.3 + markdown-extensions: 1.1.1 + periscopic: 3.1.0 + remark-mdx: 2.3.0 + remark-parse: 10.0.2 + remark-rehype: 10.1.0 + unified: 10.1.2 + unist-util-position-from-estree: 1.1.2 + unist-util-stringify-position: 3.0.3 + unist-util-visit: 4.1.2 + vfile: 5.3.7 + transitivePeerDependencies: + - supports-color + dev: false + + /@mdx-js/react@2.3.0(react@18.2.0): + resolution: {integrity: sha512-zQH//gdOmuu7nt2oJR29vFhDv88oGPmVw6BggmrHeMI+xgEkp1B2dX9/bMBSYtK0dyLX/aOmesKS09g222K1/g==} + peerDependencies: + react: '>=16' + dependencies: + '@types/mdx': 2.0.7 + '@types/react': 18.2.19 + react: 18.2.0 + dev: false + /@next/bundle-analyzer@13.4.13: resolution: {integrity: sha512-XygyFn3V61vF9LkU1zM6GlAMp8h7FbApaLA40anMGhZtQt/0S1tGSNImv9T/Z3ZTbWIQTcbYxyHIM6Fv/uSGrA==} dependencies: @@ -4781,6 +4838,28 @@ packages: resolution: {integrity: sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==} engines: {node: '>= 6'} + /@tsconfig/node10@1.0.9: + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + dev: false + + /@tsconfig/node12@1.0.11: + resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} + dev: false + + /@tsconfig/node14@1.0.3: + resolution: {integrity: sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==} + dev: false + + /@tsconfig/node16@1.0.4: + resolution: {integrity: sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==} + dev: false + + /@types/acorn@4.0.6: + resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} + dependencies: + '@types/estree': 1.0.2 + dev: false + /@types/aria-query@5.0.1: resolution: {integrity: sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q==} dev: false @@ -4843,6 +4922,22 @@ packages: date-fns: 2.28.0 dev: false + /@types/debug@4.1.9: + resolution: {integrity: sha512-8Hz50m2eoS56ldRlepxSBa6PWEVCtzUo/92HgLc2qTMnotJNIm7xP+UZhyWoYsyOdd5dxZ+NZLb24rsKyFs2ow==} + dependencies: + '@types/ms': 0.7.31 + dev: false + + /@types/estree-jsx@1.0.1: + resolution: {integrity: sha512-sHyakZlAezNFxmYRo0fopDZW+XvK6ipeZkkp5EAOLjdPfZp8VjZBJ67vSRI99RSCAoqXVmXOHS4fnWoxpuGQtQ==} + dependencies: + '@types/estree': 1.0.2 + dev: false + + /@types/estree@1.0.2: + resolution: {integrity: sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==} + dev: false + /@types/geojson@7946.0.10: resolution: {integrity: sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==} dev: false @@ -4907,6 +5002,10 @@ packages: resolution: {integrity: sha512-+oY0FDTO2GYKEV0YPvSshGq9t7YozVkgvXLty7zogQNuCxBhT9/3INX9Q7H1aRZ4SUDRXAKlJuA4EA5nTt7SNw==} dev: false + /@types/js-yaml@4.0.6: + resolution: {integrity: sha512-ACTuifTSIIbyksx2HTon3aFtCKWcID7/h3XEmRpDYdMCXxPbl+m9GteOJeaAkiAta/NJaSFuA7ahZ0NkwajDSw==} + dev: false + /@types/json-schema@7.0.11: resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} dev: true @@ -4930,6 +5029,16 @@ packages: resolution: {integrity: sha512-22y3o88f4a94mKljsZcanlNWPzO0uBsBdzLAngf2tp533LzZcQzb6+eZPJ+vCTt+bqF2XnvT9gejTLsAcJAJyQ==} dev: true + /@types/mdast@3.0.12: + resolution: {integrity: sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==} + dependencies: + '@types/unist': 2.0.6 + dev: false + + /@types/mdx@2.0.7: + resolution: {integrity: sha512-BG4tyr+4amr3WsSEmHn/fXPqaCba/AYZ7dsaQTiavihQunHSIxk+uAtqsjvicNpyHN6cm+B9RVrUOtW9VzIKHw==} + dev: false + /@types/minimatch@5.1.2: resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} dev: true @@ -4938,6 +5047,10 @@ packages: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true + /@types/ms@0.7.31: + resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} + dev: false + /@types/node@12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true @@ -5454,7 +5567,6 @@ packages: /arg@4.1.3: resolution: {integrity: sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==} - dev: true /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -5573,6 +5685,11 @@ packages: engines: {node: '>=8'} dev: true + /astring@1.8.6: + resolution: {integrity: sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==} + hasBin: true + dev: false + /asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} @@ -5802,6 +5919,10 @@ packages: babel-preset-current-node-syntax: 1.0.1(@babel/core@7.22.10) dev: true + /bail@2.0.2: + resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} + dev: false + /balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} @@ -6002,6 +6123,10 @@ packages: /caniuse-lite@1.0.30001519: resolution: {integrity: sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==} + /ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} + dev: false + /chalk@1.1.3: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} @@ -6040,18 +6165,34 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} + /character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + dev: false + /character-entities-legacy@1.1.4: resolution: {integrity: sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==} dev: false + /character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + dev: false + /character-entities@1.2.4: resolution: {integrity: sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==} dev: false + /character-entities@2.0.2: + resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} + dev: false + /character-reference-invalid@1.1.4: resolution: {integrity: sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==} dev: false + /character-reference-invalid@2.0.1: + resolution: {integrity: sha512-iBZ4F4wRbyORVsu0jPV7gXkOsGYjGHPmAyv+HiHG8gi5PtC9KI2j1+v8/tlibRvjoWX027ypmG/n0HtO5t7unw==} + dev: false + /chardet@0.7.0: resolution: {integrity: sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==} dev: true @@ -6257,6 +6398,10 @@ packages: resolution: {integrity: sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw==} dev: false + /comma-separated-tokens@2.0.3: + resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + dev: false + /command-score@0.1.2: resolution: {integrity: sha512-VtDvQpIJBvBatnONUsPzXYFVKQQAhuf3XTNOAsdBxCNO/QCtUUd8LSgjn0GVarBkCad6aJCZfXgrjYbl/KRr7w==} dev: false @@ -6375,7 +6520,6 @@ packages: /create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} - dev: true /cross-spawn@5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} @@ -6693,6 +6837,12 @@ packages: /decimal.js@10.4.3: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} + /decode-named-character-reference@1.0.2: + resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} + dependencies: + character-entities: 2.0.2 + dev: false + /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -6835,7 +6985,11 @@ packages: /diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} - dev: true + + /diff@5.1.0: + resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} + engines: {node: '>=0.3.1'} + dev: false /dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} @@ -7533,6 +7687,45 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} + /estree-util-attach-comments@2.1.1: + resolution: {integrity: sha512-+5Ba/xGGS6mnwFbXIuQiDPTbuTxuMCooq3arVv7gPZtYpjp+VXH/NkHAP35OOefPhNG/UGqU3vt/LTABwcHX0w==} + dependencies: + '@types/estree': 1.0.2 + dev: false + + /estree-util-build-jsx@2.2.2: + resolution: {integrity: sha512-m56vOXcOBuaF+Igpb9OPAy7f9w9OIkb5yhjsZuaPm7HoGi4oTOQi0h2+yZ+AtKklYFZ+rPC4n0wYCJCEU1ONqg==} + dependencies: + '@types/estree-jsx': 1.0.1 + estree-util-is-identifier-name: 2.1.0 + estree-walker: 3.0.3 + dev: false + + /estree-util-is-identifier-name@2.1.0: + resolution: {integrity: sha512-bEN9VHRyXAUOjkKVQVvArFym08BTWB0aJPppZZr0UNyAqWsLaVfAqP7hbaTJjzHifmB5ebnR8Wm7r7yGN/HonQ==} + dev: false + + /estree-util-to-js@1.2.0: + resolution: {integrity: sha512-IzU74r1PK5IMMGZXUVZbmiu4A1uhiPgW5hm1GjcOfr4ZzHaMPpLNJjR7HjXiIOzi25nZDrgFTobHTkV5Q6ITjA==} + dependencies: + '@types/estree-jsx': 1.0.1 + astring: 1.8.6 + source-map: 0.7.4 + dev: false + + /estree-util-visit@1.2.1: + resolution: {integrity: sha512-xbgqcrkIVbIG+lI/gzbvd9SGTJL4zqJKBFttUl5pP27KhAjtMKbX/mQXJ7qgyXpMgVy/zvpm0xoQQaGL8OloOw==} + dependencies: + '@types/estree-jsx': 1.0.1 + '@types/unist': 2.0.6 + dev: false + + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.2 + dev: false + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -7637,6 +7830,10 @@ packages: jest-util: 29.6.2 dev: true + /extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + dev: false + /extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} dev: true @@ -8183,6 +8380,32 @@ packages: resolution: {integrity: sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ==} dev: false + /hast-util-to-estree@2.3.3: + resolution: {integrity: sha512-ihhPIUPxN0v0w6M5+IiAZZrn0LH2uZomeWwhn7uP7avZC6TE7lIiEh2yBMPr5+zi1aUCXq6VoYRgs2Bw9xmycQ==} + dependencies: + '@types/estree': 1.0.2 + '@types/estree-jsx': 1.0.1 + '@types/hast': 2.3.4 + '@types/unist': 2.0.6 + comma-separated-tokens: 2.0.3 + estree-util-attach-comments: 2.1.1 + estree-util-is-identifier-name: 2.1.0 + hast-util-whitespace: 2.0.1 + mdast-util-mdx-expression: 1.3.2 + mdast-util-mdxjs-esm: 1.3.1 + property-information: 6.3.0 + space-separated-tokens: 2.0.2 + style-to-object: 0.4.2 + unist-util-position: 4.0.4 + zwitch: 2.0.4 + transitivePeerDependencies: + - supports-color + dev: false + + /hast-util-whitespace@2.0.1: + resolution: {integrity: sha512-nAxA0v8+vXSBDt3AnRUNjyRIQ0rD+ntpbAp4LnPkumc5M9yUbSMa4XDU9Q6etY4f1Wp4bNgvc1yjiZtsTTrSng==} + dev: false + /hastscript@6.0.0: resolution: {integrity: sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w==} dependencies: @@ -8396,6 +8619,10 @@ packages: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: false + /inline-style-parser@0.1.1: + resolution: {integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q==} + dev: false + /inline-style-prefixer@6.0.4: resolution: {integrity: sha512-FwXmZC2zbeeS7NzGjJ6pAiqRhXR0ugUShSNb6GApMl6da0/XGc4MOJsoWAywia52EEWbXNSy0pzkwz/+Y+swSg==} dependencies: @@ -8425,6 +8652,10 @@ packages: resolution: {integrity: sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==} dev: false + /is-alphabetical@2.0.1: + resolution: {integrity: sha512-FWyyY60MeTNyeSRpkM2Iry0G9hpr7/9kD40mD/cGQEuilcZYS4okz8SN2Q6rLCJ8gbCt6fN+rC+6tMGS99LaxQ==} + dev: false + /is-alphanumerical@1.0.4: resolution: {integrity: sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==} dependencies: @@ -8432,6 +8663,13 @@ packages: is-decimal: 1.0.4 dev: false + /is-alphanumerical@2.0.1: + resolution: {integrity: sha512-hmbYhX/9MUMF5uh7tOXyK/n0ZvWpad5caBA17GsC6vyuCqaWliRG5K1qS9inmUhEMaOBIW7/whAnSwveW/LtZw==} + dependencies: + is-alphabetical: 2.0.1 + is-decimal: 2.0.1 + dev: false + /is-arguments@1.1.1: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} @@ -8476,6 +8714,11 @@ packages: resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} dev: true + /is-buffer@2.0.5: + resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} + engines: {node: '>=4'} + dev: false + /is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -8502,6 +8745,10 @@ packages: resolution: {integrity: sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==} dev: false + /is-decimal@2.0.1: + resolution: {integrity: sha512-AAB9hiomQs5DXWcRB1rqsxGUstbRroFOPPVAomNk/3XHR5JyEZChOyTWe2oayKnsSsr/kcGqF+z6yuH6HHpN0A==} + dev: false + /is-directory@0.3.1: resolution: {integrity: sha512-yVChGzahRFvbkscn2MlwGismPO12i9+znNruC5gVEntG3qu0xQMzsGg/JFbrsqDOHtHFPci+V5aP5T9I+yeKqw==} engines: {node: '>=0.10.0'} @@ -8556,6 +8803,10 @@ packages: resolution: {integrity: sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==} dev: false + /is-hexadecimal@2.0.1: + resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + dev: false + /is-inside-container@1.0.0: resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} engines: {node: '>=14.16'} @@ -8607,6 +8858,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-plain-obj@4.1.0: + resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} + engines: {node: '>=12'} + dev: false + /is-plain-object@2.0.4: resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} engines: {node: '>=0.10.0'} @@ -8626,6 +8882,12 @@ packages: resolution: {integrity: sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==} dev: true + /is-reference@3.0.2: + resolution: {integrity: sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==} + dependencies: + '@types/estree': 1.0.2 + dev: false + /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -9886,7 +10148,6 @@ packages: /kleur@4.1.5: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} - dev: true /language-subtag-registry@0.3.22: resolution: {integrity: sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==} @@ -10139,6 +10400,10 @@ packages: wrap-ansi: 3.0.1 dev: true + /longest-streak@3.1.0: + resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} + dev: false + /loose-envify@1.4.0: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true @@ -10196,7 +10461,6 @@ packages: /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - dev: true /makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} @@ -10213,6 +10477,132 @@ packages: engines: {node: '>=8'} dev: true + /markdown-extensions@1.1.1: + resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==} + engines: {node: '>=0.10.0'} + dev: false + + /mdast-util-definitions@5.1.2: + resolution: {integrity: sha512-8SVPMuHqlPME/z3gqVwWY4zVXn8lqKv/pAhC57FuJ40ImXyBpmO5ukh98zB2v7Blql2FiHjHv9LVztSIqjY+MA==} + dependencies: + '@types/mdast': 3.0.12 + '@types/unist': 2.0.6 + unist-util-visit: 4.1.2 + dev: false + + /mdast-util-from-markdown@1.3.1: + resolution: {integrity: sha512-4xTO/M8c82qBcnQc1tgpNtubGUW/Y1tBQ1B0i5CtSoelOLKFYlElIr3bvgREYYO5iRqbMY1YuqZng0GVOI8Qww==} + dependencies: + '@types/mdast': 3.0.12 + '@types/unist': 2.0.6 + decode-named-character-reference: 1.0.2 + mdast-util-to-string: 3.2.0 + micromark: 3.2.0 + micromark-util-decode-numeric-character-reference: 1.1.0 + micromark-util-decode-string: 1.1.0 + micromark-util-normalize-identifier: 1.1.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + unist-util-stringify-position: 3.0.3 + uvu: 0.5.6 + transitivePeerDependencies: + - supports-color + dev: false + + /mdast-util-mdx-expression@1.3.2: + resolution: {integrity: sha512-xIPmR5ReJDu/DHH1OoIT1HkuybIfRGYRywC+gJtI7qHjCJp/M9jrmBEJW22O8lskDWm562BX2W8TiAwRTb0rKA==} + dependencies: + '@types/estree-jsx': 1.0.1 + '@types/hast': 2.3.4 + '@types/mdast': 3.0.12 + mdast-util-from-markdown: 1.3.1 + mdast-util-to-markdown: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: false + + /mdast-util-mdx-jsx@2.1.4: + resolution: {integrity: sha512-DtMn9CmVhVzZx3f+optVDF8yFgQVt7FghCRNdlIaS3X5Bnym3hZwPbg/XW86vdpKjlc1PVj26SpnLGeJBXD3JA==} + dependencies: + '@types/estree-jsx': 1.0.1 + '@types/hast': 2.3.4 + '@types/mdast': 3.0.12 + '@types/unist': 2.0.6 + ccount: 2.0.1 + mdast-util-from-markdown: 1.3.1 + mdast-util-to-markdown: 1.5.0 + parse-entities: 4.0.1 + stringify-entities: 4.0.3 + unist-util-remove-position: 4.0.2 + unist-util-stringify-position: 3.0.3 + vfile-message: 3.1.4 + transitivePeerDependencies: + - supports-color + dev: false + + /mdast-util-mdx@2.0.1: + resolution: {integrity: sha512-38w5y+r8nyKlGvNjSEqWrhG0w5PmnRA+wnBvm+ulYCct7nsGYhFVb0lljS9bQav4psDAS1eGkP2LMVcZBi/aqw==} + dependencies: + mdast-util-from-markdown: 1.3.1 + mdast-util-mdx-expression: 1.3.2 + mdast-util-mdx-jsx: 2.1.4 + mdast-util-mdxjs-esm: 1.3.1 + mdast-util-to-markdown: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: false + + /mdast-util-mdxjs-esm@1.3.1: + resolution: {integrity: sha512-SXqglS0HrEvSdUEfoXFtcg7DRl7S2cwOXc7jkuusG472Mmjag34DUDeOJUZtl+BVnyeO1frIgVpHlNRWc2gk/w==} + dependencies: + '@types/estree-jsx': 1.0.1 + '@types/hast': 2.3.4 + '@types/mdast': 3.0.12 + mdast-util-from-markdown: 1.3.1 + mdast-util-to-markdown: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: false + + /mdast-util-phrasing@3.0.1: + resolution: {integrity: sha512-WmI1gTXUBJo4/ZmSk79Wcb2HcjPJBzM1nlI/OUWA8yk2X9ik3ffNbBGsU+09BFmXaL1IBb9fiuvq6/KMiNycSg==} + dependencies: + '@types/mdast': 3.0.12 + unist-util-is: 5.2.1 + dev: false + + /mdast-util-to-hast@12.3.0: + resolution: {integrity: sha512-pits93r8PhnIoU4Vy9bjW39M2jJ6/tdHyja9rrot9uujkN7UTU9SDnE6WNJz/IGyQk3XHX6yNNtrBH6cQzm8Hw==} + dependencies: + '@types/hast': 2.3.4 + '@types/mdast': 3.0.12 + mdast-util-definitions: 5.1.2 + micromark-util-sanitize-uri: 1.2.0 + trim-lines: 3.0.1 + unist-util-generated: 2.0.1 + unist-util-position: 4.0.4 + unist-util-visit: 4.1.2 + dev: false + + /mdast-util-to-markdown@1.5.0: + resolution: {integrity: sha512-bbv7TPv/WC49thZPg3jXuqzuvI45IL2EVAr/KxF0BSdHsU0ceFHOmwQn6evxAh1GaoK/6GQ1wp4R4oW2+LFL/A==} + dependencies: + '@types/mdast': 3.0.12 + '@types/unist': 2.0.6 + longest-streak: 3.1.0 + mdast-util-phrasing: 3.0.1 + mdast-util-to-string: 3.2.0 + micromark-util-decode-string: 1.1.0 + unist-util-visit: 4.1.2 + zwitch: 2.0.4 + dev: false + + /mdast-util-to-string@3.2.0: + resolution: {integrity: sha512-V4Zn/ncyN1QNSqSBxTrMOLpjr+IKdHl2v3KVLoWmDPscP4r9GcCi71gjgvUV1SFSKh92AjAG4peFuBl2/YgCJg==} + dependencies: + '@types/mdast': 3.0.12 + dev: false + /mdn-data@2.0.14: resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} @@ -10275,6 +10665,268 @@ packages: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} + /micromark-core-commonmark@1.1.0: + resolution: {integrity: sha512-BgHO1aRbolh2hcrzL2d1La37V0Aoz73ymF8rAcKnohLy93titmv62E0gP8Hrx9PKcKrqCZ1BbLGbP3bEhoXYlw==} + dependencies: + decode-named-character-reference: 1.0.2 + micromark-factory-destination: 1.1.0 + micromark-factory-label: 1.1.0 + micromark-factory-space: 1.1.0 + micromark-factory-title: 1.1.0 + micromark-factory-whitespace: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-chunked: 1.1.0 + micromark-util-classify-character: 1.1.0 + micromark-util-html-tag-name: 1.2.0 + micromark-util-normalize-identifier: 1.1.0 + micromark-util-resolve-all: 1.1.0 + micromark-util-subtokenize: 1.1.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + dev: false + + /micromark-extension-mdx-expression@1.0.8: + resolution: {integrity: sha512-zZpeQtc5wfWKdzDsHRBY003H2Smg+PUi2REhqgIhdzAa5xonhP03FcXxqFSerFiNUr5AWmHpaNPQTBVOS4lrXw==} + dependencies: + '@types/estree': 1.0.2 + micromark-factory-mdx-expression: 1.0.9 + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-events-to-acorn: 1.2.3 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + dev: false + + /micromark-extension-mdx-jsx@1.0.5: + resolution: {integrity: sha512-gPH+9ZdmDflbu19Xkb8+gheqEDqkSpdCEubQyxuz/Hn8DOXiXvrXeikOoBA71+e8Pfi0/UYmU3wW3H58kr7akA==} + dependencies: + '@types/acorn': 4.0.6 + '@types/estree': 1.0.2 + estree-util-is-identifier-name: 2.1.0 + micromark-factory-mdx-expression: 1.0.9 + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + vfile-message: 3.1.4 + dev: false + + /micromark-extension-mdx-md@1.0.1: + resolution: {integrity: sha512-7MSuj2S7xjOQXAjjkbjBsHkMtb+mDGVW6uI2dBL9snOBCbZmoNgDAeZ0nSn9j3T42UE/g2xVNMn18PJxZvkBEA==} + dependencies: + micromark-util-types: 1.1.0 + dev: false + + /micromark-extension-mdxjs-esm@1.0.5: + resolution: {integrity: sha512-xNRBw4aoURcyz/S69B19WnZAkWJMxHMT5hE36GtDAyhoyn/8TuAeqjFJQlwk+MKQsUD7b3l7kFX+vlfVWgcX1w==} + dependencies: + '@types/estree': 1.0.2 + micromark-core-commonmark: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-events-to-acorn: 1.2.3 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + unist-util-position-from-estree: 1.1.2 + uvu: 0.5.6 + vfile-message: 3.1.4 + dev: false + + /micromark-extension-mdxjs@1.0.1: + resolution: {integrity: sha512-7YA7hF6i5eKOfFUzZ+0z6avRG52GpWR8DL+kN47y3f2KhxbBZMhmxe7auOeaTBrW2DenbbZTf1ea9tA2hDpC2Q==} + dependencies: + acorn: 8.10.0 + acorn-jsx: 5.3.2(acorn@8.10.0) + micromark-extension-mdx-expression: 1.0.8 + micromark-extension-mdx-jsx: 1.0.5 + micromark-extension-mdx-md: 1.0.1 + micromark-extension-mdxjs-esm: 1.0.5 + micromark-util-combine-extensions: 1.1.0 + micromark-util-types: 1.1.0 + dev: false + + /micromark-factory-destination@1.1.0: + resolution: {integrity: sha512-XaNDROBgx9SgSChd69pjiGKbV+nfHGDPVYFs5dOoDd7ZnMAE+Cuu91BCpsY8RT2NP9vo/B8pds2VQNCLiu0zhg==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: false + + /micromark-factory-label@1.1.0: + resolution: {integrity: sha512-OLtyez4vZo/1NjxGhcpDSbHQ+m0IIGnT8BoPamh+7jVlzLJBH98zzuCoUeMxvM6WsNeh8wx8cKvqLiPHEACn0w==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + dev: false + + /micromark-factory-mdx-expression@1.0.9: + resolution: {integrity: sha512-jGIWzSmNfdnkJq05c7b0+Wv0Kfz3NJ3N4cBjnbO4zjXIlxJr+f8lk+5ZmwFvqdAbUy2q6B5rCY//g0QAAaXDWA==} + dependencies: + '@types/estree': 1.0.2 + micromark-util-character: 1.2.0 + micromark-util-events-to-acorn: 1.2.3 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + unist-util-position-from-estree: 1.1.2 + uvu: 0.5.6 + vfile-message: 3.1.4 + dev: false + + /micromark-factory-space@1.1.0: + resolution: {integrity: sha512-cRzEj7c0OL4Mw2v6nwzttyOZe8XY/Z8G0rzmWQZTBi/jjwyw/U4uqKtUORXQrR5bAZZnbTI/feRV/R7hc4jQYQ==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-types: 1.1.0 + dev: false + + /micromark-factory-title@1.1.0: + resolution: {integrity: sha512-J7n9R3vMmgjDOCY8NPw55jiyaQnH5kBdV2/UXCtZIpnHH3P6nHUKaH7XXEYuWwx/xUJcawa8plLBEjMPU24HzQ==} + dependencies: + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: false + + /micromark-factory-whitespace@1.1.0: + resolution: {integrity: sha512-v2WlmiymVSp5oMg+1Q0N1Lxmt6pMhIHD457whWM7/GUlEks1hI9xj5w3zbc4uuMKXGisksZk8DzP2UyGbGqNsQ==} + dependencies: + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: false + + /micromark-util-character@1.2.0: + resolution: {integrity: sha512-lXraTwcX3yH/vMDaFWCQJP1uIszLVebzUa3ZHdrgxr7KEU/9mL4mVgCpGbyhvNLNlauROiNUq7WN5u7ndbY6xg==} + dependencies: + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: false + + /micromark-util-chunked@1.1.0: + resolution: {integrity: sha512-Ye01HXpkZPNcV6FiyoW2fGZDUw4Yc7vT0E9Sad83+bEDiCJ1uXu0S3mr8WLpsz3HaG3x2q0HM6CTuPdcZcluFQ==} + dependencies: + micromark-util-symbol: 1.1.0 + dev: false + + /micromark-util-classify-character@1.1.0: + resolution: {integrity: sha512-SL0wLxtKSnklKSUplok1WQFoGhUdWYKggKUiqhX+Swala+BtptGCu5iPRc+xvzJ4PXE/hwM3FNXsfEVgoZsWbw==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + dev: false + + /micromark-util-combine-extensions@1.1.0: + resolution: {integrity: sha512-Q20sp4mfNf9yEqDL50WwuWZHUrCO4fEyeDCnMGmG5Pr0Cz15Uo7KBs6jq+dq0EgX4DPwwrh9m0X+zPV1ypFvUA==} + dependencies: + micromark-util-chunked: 1.1.0 + micromark-util-types: 1.1.0 + dev: false + + /micromark-util-decode-numeric-character-reference@1.1.0: + resolution: {integrity: sha512-m9V0ExGv0jB1OT21mrWcuf4QhP46pH1KkfWy9ZEezqHKAxkj4mPCy3nIH1rkbdMlChLHX531eOrymlwyZIf2iw==} + dependencies: + micromark-util-symbol: 1.1.0 + dev: false + + /micromark-util-decode-string@1.1.0: + resolution: {integrity: sha512-YphLGCK8gM1tG1bd54azwyrQRjCFcmgj2S2GoJDNnh4vYtnL38JS8M4gpxzOPNyHdNEpheyWXCTnnTDY3N+NVQ==} + dependencies: + decode-named-character-reference: 1.0.2 + micromark-util-character: 1.2.0 + micromark-util-decode-numeric-character-reference: 1.1.0 + micromark-util-symbol: 1.1.0 + dev: false + + /micromark-util-encode@1.1.0: + resolution: {integrity: sha512-EuEzTWSTAj9PA5GOAs992GzNh2dGQO52UvAbtSOMvXTxv3Criqb6IOzJUBCmEqrrXSblJIJBbFFv6zPxpreiJw==} + dev: false + + /micromark-util-events-to-acorn@1.2.3: + resolution: {integrity: sha512-ij4X7Wuc4fED6UoLWkmo0xJQhsktfNh1J0m8g4PbIMPlx+ek/4YdW5mvbye8z/aZvAPUoxgXHrwVlXAPKMRp1w==} + dependencies: + '@types/acorn': 4.0.6 + '@types/estree': 1.0.2 + '@types/unist': 2.0.6 + estree-util-visit: 1.2.1 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + vfile-message: 3.1.4 + dev: false + + /micromark-util-html-tag-name@1.2.0: + resolution: {integrity: sha512-VTQzcuQgFUD7yYztuQFKXT49KghjtETQ+Wv/zUjGSGBioZnkA4P1XXZPT1FHeJA6RwRXSF47yvJ1tsJdoxwO+Q==} + dev: false + + /micromark-util-normalize-identifier@1.1.0: + resolution: {integrity: sha512-N+w5vhqrBihhjdpM8+5Xsxy71QWqGn7HYNUvch71iV2PM7+E3uWGox1Qp90loa1ephtCxG2ftRV/Conitc6P2Q==} + dependencies: + micromark-util-symbol: 1.1.0 + dev: false + + /micromark-util-resolve-all@1.1.0: + resolution: {integrity: sha512-b/G6BTMSg+bX+xVCshPTPyAu2tmA0E4X98NSR7eIbeC6ycCqCeE7wjfDIgzEbkzdEVJXRtOG4FbEm/uGbCRouA==} + dependencies: + micromark-util-types: 1.1.0 + dev: false + + /micromark-util-sanitize-uri@1.2.0: + resolution: {integrity: sha512-QO4GXv0XZfWey4pYFndLUKEAktKkG5kZTdUNaTAkzbuJxn2tNBOr+QtxR2XpWaMhbImT2dPzyLrPXLlPhph34A==} + dependencies: + micromark-util-character: 1.2.0 + micromark-util-encode: 1.1.0 + micromark-util-symbol: 1.1.0 + dev: false + + /micromark-util-subtokenize@1.1.0: + resolution: {integrity: sha512-kUQHyzRoxvZO2PuLzMt2P/dwVsTiivCK8icYTeR+3WgbuPqfHgPPy7nFKbeqRivBvn/3N3GBiNC+JRTMSxEC7A==} + dependencies: + micromark-util-chunked: 1.1.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + dev: false + + /micromark-util-symbol@1.1.0: + resolution: {integrity: sha512-uEjpEYY6KMs1g7QfJ2eX1SQEV+ZT4rUD3UcF6l57acZvLNK7PBZL+ty82Z1qhK1/yXIY4bdx04FKMgR0g4IAag==} + dev: false + + /micromark-util-types@1.1.0: + resolution: {integrity: sha512-ukRBgie8TIAcacscVHSiddHjO4k/q3pnedmzMQ4iwDcK0FtFCohKOlFbaOL/mPgfnPsL3C1ZyxJa4sbWrBl3jg==} + dev: false + + /micromark@3.2.0: + resolution: {integrity: sha512-uD66tJj54JLYq0De10AhWycZWGQNUvDI55xPgk2sQM5kn1JYlhbCMTtEeT27+vAhW2FBQxLlOmS3pmA7/2z4aA==} + dependencies: + '@types/debug': 4.1.9 + debug: 4.3.4(supports-color@5.5.0) + decode-named-character-reference: 1.0.2 + micromark-core-commonmark: 1.1.0 + micromark-factory-space: 1.1.0 + micromark-util-character: 1.2.0 + micromark-util-chunked: 1.1.0 + micromark-util-combine-extensions: 1.1.0 + micromark-util-decode-numeric-character-reference: 1.1.0 + micromark-util-encode: 1.1.0 + micromark-util-normalize-identifier: 1.1.0 + micromark-util-resolve-all: 1.1.0 + micromark-util-sanitize-uri: 1.2.0 + micromark-util-subtokenize: 1.1.0 + micromark-util-symbol: 1.1.0 + micromark-util-types: 1.1.0 + uvu: 0.5.6 + transitivePeerDependencies: + - supports-color + dev: false + /micromatch@4.0.5: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} @@ -10369,6 +11021,11 @@ packages: hasBin: true dev: true + /mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + dev: false + /mrmime@1.0.1: resolution: {integrity: sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==} engines: {node: '>=10'} @@ -10436,6 +11093,23 @@ packages: resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} dev: true + /next-mdx-remote@4.4.1(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-1BvyXaIou6xy3XoNF4yaMZUCb6vD2GTAa5ciOa6WoO+gAUTYsb1K4rI/HSC2ogAWLrb/7VSV52skz07vOzmqIQ==} + engines: {node: '>=14', npm: '>=7'} + peerDependencies: + react: '>=16.x <=18.x' + react-dom: '>=16.x <=18.x' + dependencies: + '@mdx-js/mdx': 2.3.0 + '@mdx-js/react': 2.3.0(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + vfile: 5.3.7 + vfile-matter: 3.0.1 + transitivePeerDependencies: + - supports-color + dev: false + /next@13.4.13(@babel/core@7.22.10)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-A3YVbVDNeXLhWsZ8Nf6IkxmNlmTNz0yVg186NJ97tGZqPDdPzTrHotJ+A1cuJm2XfuWPrKOUZILl5iBQkIf8Jw==} engines: {node: '>=16.8.0'} @@ -10899,6 +11573,19 @@ packages: is-hexadecimal: 1.0.4 dev: false + /parse-entities@4.0.1: + resolution: {integrity: sha512-SWzvYcSJh4d/SGLIOQfZ/CoNv6BTlI6YEQ7Nj82oDVnRpwe/Z/F1EMx42x3JAOwGBlCjeCH0BRJQbQ/opHL17w==} + dependencies: + '@types/unist': 2.0.6 + character-entities: 2.0.2 + character-entities-legacy: 3.0.0 + character-reference-invalid: 2.0.1 + decode-named-character-reference: 1.0.2 + is-alphanumerical: 2.0.1 + is-decimal: 2.0.1 + is-hexadecimal: 2.0.1 + dev: false + /parse-json@4.0.0: resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==} engines: {node: '>=4'} @@ -10968,6 +11655,14 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + /periscopic@3.1.0: + resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==} + dependencies: + '@types/estree': 1.0.2 + estree-walker: 3.0.3 + is-reference: 3.0.2 + dev: false + /picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} @@ -11060,7 +11755,7 @@ packages: yaml: 1.10.2 dev: true - /postcss-load-config@4.0.1(postcss@8.4.27): + /postcss-load-config@4.0.1(postcss@8.4.27)(ts-node@10.9.1): resolution: {integrity: sha512-vEJIc8RdiBRu3oRAI0ymerOn+7rPuMvRXslTvZUKZonDHFIczxztIyJ1urxM1x9JXEikvpWWTUUqal5j/8QgvA==} engines: {node: '>= 14'} peerDependencies: @@ -11074,6 +11769,7 @@ packages: dependencies: lilconfig: 2.1.0 postcss: 8.4.27 + ts-node: 10.9.1(@types/node@20.4.9)(typescript@5.1.6) yaml: 2.3.1 dev: false @@ -11261,6 +11957,10 @@ packages: xtend: 4.0.2 dev: false + /property-information@6.3.0: + resolution: {integrity: sha512-gVNZ74nqhRMiIUYWGQdosYetaKc83x8oT41a0LlV3AAFCAZwCpg4vmGkq8t34+cUhp3cnM4XDiU/7xlgK7HGrg==} + dev: false + /prr@1.0.1: resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==} dev: true @@ -11890,6 +12590,34 @@ packages: jsesc: 0.5.0 dev: true + /remark-mdx@2.3.0: + resolution: {integrity: sha512-g53hMkpM0I98MU266IzDFMrTD980gNF3BJnkyFcmN+dD873mQeD5rdMO3Y2X+x8umQfbSE0PcoEDl7ledSA+2g==} + dependencies: + mdast-util-mdx: 2.0.1 + micromark-extension-mdxjs: 1.0.1 + transitivePeerDependencies: + - supports-color + dev: false + + /remark-parse@10.0.2: + resolution: {integrity: sha512-3ydxgHa/ZQzG8LvC7jTXccARYDcRld3VfcgIIFs7bI6vbRSxJJmzgLEIIoYKyrfhaY+ujuWaf/PJiMZXoiCXgw==} + dependencies: + '@types/mdast': 3.0.12 + mdast-util-from-markdown: 1.3.1 + unified: 10.1.2 + transitivePeerDependencies: + - supports-color + dev: false + + /remark-rehype@10.1.0: + resolution: {integrity: sha512-EFmR5zppdBp0WQeDVZ/b66CWJipB2q2VLNFMabzDSGR66Z2fQii83G5gTBbgGEnEEA0QRussvrFHxk1HWGJskw==} + dependencies: + '@types/hast': 2.3.4 + '@types/mdast': 3.0.12 + mdast-util-to-hast: 12.3.0 + unified: 10.1.2 + dev: false + /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -12026,6 +12754,13 @@ packages: tslib: 2.6.1 dev: true + /sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + dependencies: + mri: 1.2.0 + dev: false + /safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: false @@ -12312,6 +13047,10 @@ packages: resolution: {integrity: sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA==} dev: false + /space-separated-tokens@2.0.2: + resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + dev: false + /spawn-command@0.0.2: resolution: {integrity: sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ==} dev: true @@ -12495,6 +13234,13 @@ packages: safe-buffer: 5.2.1 dev: false + /stringify-entities@4.0.3: + resolution: {integrity: sha512-BP9nNHMhhfcMbiuQKCqMjhDP5yBCAxsPu4pHFFzJ6Alo9dZgY4VLDPutXqIjpRiMoKdp7Av85Gr73Q5uH9k7+g==} + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + dev: false + /stringify-object@3.3.0: resolution: {integrity: sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==} engines: {node: '>=4'} @@ -12573,6 +13319,12 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} + /style-to-object@0.4.2: + resolution: {integrity: sha512-1JGpfPB3lo42ZX8cuPrheZbfQ6kqPPnPHlKMyeRYtfKD+0jG+QsXgXN57O/dvJlzlB2elI6dGmrPnl5VPQFPaA==} + dependencies: + inline-style-parser: 0.1.1 + dev: false + /styled-components@5.3.11(@babel/core@7.22.10)(react-dom@18.2.0)(react-is@18.2.0)(react@18.2.0): resolution: {integrity: sha512-uuzIIfnVkagcVHv9nE0VPlHPSCmXIUGKfJ42LNjxCCTDTL5sgnJ8Z7GZBq0EnLYGln77tPpEpExt2+qa+cZqSw==} engines: {node: '>=10'} @@ -12775,7 +13527,7 @@ packages: resolution: {integrity: sha512-1k1UfoIYgVyBl13FKwwoKavjnJ5VEaUClCTAsgz3VLquN4ay/lyaMPzkbqD71sACDs2fRGImytAUlMb4TzOt1A==} dev: false - /tailwindcss@3.3.3: + /tailwindcss@3.3.3(ts-node@10.9.1): resolution: {integrity: sha512-A0KgSkef7eE4Mf+nKJ83i75TMyq8HqY3qmFIJSWy8bNt0v1lG7jUcpGpoTFxAwYcWOphcTBLPPJg+bDfhDf52w==} engines: {node: '>=14.0.0'} hasBin: true @@ -12797,7 +13549,7 @@ packages: postcss: 8.4.27 postcss-import: 15.1.0(postcss@8.4.27) postcss-js: 4.0.1(postcss@8.4.27) - postcss-load-config: 4.0.1(postcss@8.4.27) + postcss-load-config: 4.0.1(postcss@8.4.27)(ts-node@10.9.1) postcss-nested: 6.0.1(postcss@8.4.27) postcss-selector-parser: 6.0.11 resolve: 1.22.3 @@ -12964,6 +13716,10 @@ packages: hasBin: true dev: true + /trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + dev: false + /trim-newlines@3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} @@ -12974,6 +13730,10 @@ packages: engines: {node: '>=14.16'} dev: true + /trough@2.1.0: + resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} + dev: false + /ts-easing@0.2.0: resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} dev: false @@ -13006,6 +13766,37 @@ packages: typescript: 5.1.6 dev: true + /ts-node@10.9.1(@types/node@20.4.9)(typescript@5.1.6): + resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} + hasBin: true + peerDependencies: + '@swc/core': '>=1.2.50' + '@swc/wasm': '>=1.2.50' + '@types/node': '*' + typescript: '>=2.7' + peerDependenciesMeta: + '@swc/core': + optional: true + '@swc/wasm': + optional: true + dependencies: + '@cspotcode/source-map-support': 0.8.1 + '@tsconfig/node10': 1.0.9 + '@tsconfig/node12': 1.0.11 + '@tsconfig/node14': 1.0.3 + '@tsconfig/node16': 1.0.4 + '@types/node': 20.4.9 + acorn: 8.10.0 + acorn-walk: 8.2.0 + arg: 4.1.3 + create-require: 1.1.1 + diff: 4.0.2 + make-error: 1.3.6 + typescript: 5.1.6 + v8-compile-cache-lib: 3.0.1 + yn: 3.1.1 + dev: false + /ts-node@9.1.1(typescript@5.1.6): resolution: {integrity: sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==} engines: {node: '>=10.0.0'} @@ -13214,10 +14005,72 @@ packages: engines: {node: '>=4'} dev: true + /unified@10.1.2: + resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} + dependencies: + '@types/unist': 2.0.6 + bail: 2.0.2 + extend: 3.0.2 + is-buffer: 2.0.5 + is-plain-obj: 4.1.0 + trough: 2.1.0 + vfile: 5.3.7 + dev: false + /uniqid@5.4.0: resolution: {integrity: sha512-38JRbJ4Fj94VmnC7G/J/5n5SC7Ab46OM5iNtSstB/ko3l1b5g7ALt4qzHFgGciFkyiRNtDXtLNb+VsxtMSE77A==} dev: false + /unist-util-generated@2.0.1: + resolution: {integrity: sha512-qF72kLmPxAw0oN2fwpWIqbXAVyEqUzDHMsbtPvOudIlUzXYFIeQIuxXQCRCFh22B7cixvU0MG7m3MW8FTq/S+A==} + dev: false + + /unist-util-is@5.2.1: + resolution: {integrity: sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==} + dependencies: + '@types/unist': 2.0.6 + dev: false + + /unist-util-position-from-estree@1.1.2: + resolution: {integrity: sha512-poZa0eXpS+/XpoQwGwl79UUdea4ol2ZuCYguVaJS4qzIOMDzbqz8a3erUCOmubSZkaOuGamb3tX790iwOIROww==} + dependencies: + '@types/unist': 2.0.6 + dev: false + + /unist-util-position@4.0.4: + resolution: {integrity: sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==} + dependencies: + '@types/unist': 2.0.6 + dev: false + + /unist-util-remove-position@4.0.2: + resolution: {integrity: sha512-TkBb0HABNmxzAcfLf4qsIbFbaPDvMO6wa3b3j4VcEzFVaw1LBKwnW4/sRJ/atSLSzoIg41JWEdnE7N6DIhGDGQ==} + dependencies: + '@types/unist': 2.0.6 + unist-util-visit: 4.1.2 + dev: false + + /unist-util-stringify-position@3.0.3: + resolution: {integrity: sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==} + dependencies: + '@types/unist': 2.0.6 + dev: false + + /unist-util-visit-parents@5.1.3: + resolution: {integrity: sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==} + dependencies: + '@types/unist': 2.0.6 + unist-util-is: 5.2.1 + dev: false + + /unist-util-visit@4.1.2: + resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==} + dependencies: + '@types/unist': 2.0.6 + unist-util-is: 5.2.1 + unist-util-visit-parents: 5.1.3 + dev: false + /universal-user-agent@6.0.0: resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==} dev: false @@ -13314,6 +14167,21 @@ packages: object.getownpropertydescriptors: 2.1.5 dev: true + /uvu@0.5.6: + resolution: {integrity: sha512-+g8ENReyr8YsOc6fv/NVJs2vFdHBnBNdfE49rshrTzDWOlUx4Gq7KOS2GD8eqhy2j+Ejq29+SbKH8yjkAqXqoA==} + engines: {node: '>=8'} + hasBin: true + dependencies: + dequal: 2.0.3 + diff: 5.1.0 + kleur: 4.1.5 + sade: 1.8.1 + dev: false + + /v8-compile-cache-lib@3.0.1: + resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} + dev: false + /v8-compile-cache@2.3.0: resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} dev: true @@ -13342,6 +14210,30 @@ packages: spdx-expression-parse: 3.0.1 dev: true + /vfile-matter@3.0.1: + resolution: {integrity: sha512-CAAIDwnh6ZdtrqAuxdElUqQRQDQgbbIrYtDYI8gCjXS1qQ+1XdLoK8FIZWxJwn0/I+BkSSZpar3SOgjemQz4fg==} + dependencies: + '@types/js-yaml': 4.0.6 + is-buffer: 2.0.5 + js-yaml: 4.1.0 + dev: false + + /vfile-message@3.1.4: + resolution: {integrity: sha512-fa0Z6P8HUrQN4BZaX05SIVXic+7kE3b05PWAtPuYP9QLHsLKYR7/AlLW3NtOrpXRLeawpDLMsVkmk5DG0NXgWw==} + dependencies: + '@types/unist': 2.0.6 + unist-util-stringify-position: 3.0.3 + dev: false + + /vfile@5.3.7: + resolution: {integrity: sha512-r7qlzkgErKjobAmyNIkkSpizsFPYiUPuJb5pNW1RB4JcYVZhs4lIbVqk8XPk033CV/1z8ss5pkax8SuhGpcG8g==} + dependencies: + '@types/unist': 2.0.6 + is-buffer: 2.0.5 + unist-util-stringify-position: 3.0.3 + vfile-message: 3.1.4 + dev: false + /w3c-hr-time@1.0.2: resolution: {integrity: sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==} deprecated: Use your platform's native performance.now() and performance.timeOrigin. @@ -13678,7 +14570,6 @@ packages: /yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} - dev: true /yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} @@ -13692,3 +14583,7 @@ packages: /zod@3.21.4: resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} dev: false + + /zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + dev: false diff --git a/workspaces/base/CHANGELOG.md b/workspaces/base/CHANGELOG.md index 4d55000a52..c9d9722248 100644 --- a/workspaces/base/CHANGELOG.md +++ b/workspaces/base/CHANGELOG.md @@ -1,5 +1,11 @@ # @heathmont/moon-base-tw +## 10.7.7 + +### Patch Changes + +- Deploy 10.7.7 + ## 10.7.6 ### Patch Changes diff --git a/workspaces/base/package.json b/workspaces/base/package.json index 5f92810f42..1ebe834077 100644 --- a/workspaces/base/package.json +++ b/workspaces/base/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-base-tw", "sideEffects": false, - "version": "10.7.6", + "version": "10.7.7", "files": [ "lib" ], diff --git a/workspaces/cmdk/CHANGELOG.md b/workspaces/cmdk/CHANGELOG.md index f97f445858..152977817a 100644 --- a/workspaces/cmdk/CHANGELOG.md +++ b/workspaces/cmdk/CHANGELOG.md @@ -1,5 +1,13 @@ # @heathmont/moon-cmdk-tw +## 10.7.7 + +### Patch Changes + +- Deploy 10.7.7 +- Updated dependencies + - @heathmont/moon-core-tw@10.7.7 + ## 10.7.6 ### Patch Changes diff --git a/workspaces/cmdk/package.json b/workspaces/cmdk/package.json index 72fe9fd1ef..60816d7d26 100644 --- a/workspaces/cmdk/package.json +++ b/workspaces/cmdk/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-cmdk-tw", "sideEffects": false, - "version": "10.7.6", + "version": "10.7.7", "files": [ "lib" ], @@ -21,7 +21,7 @@ }, "dependencies": { "@headlessui/react": "1.7.16", - "@heathmont/moon-core-tw": "workspace:^10.7.6", + "@heathmont/moon-core-tw": "workspace:^10.7.7", "cmdk": "0.2.0", "tailwind-merge": "1.14.0", "tailwindcss-radix": "2.8.0" diff --git a/workspaces/cmdk/src/searchCmdk/SearchCmdk.tsx b/workspaces/cmdk/src/searchCmdk/SearchCmdk.tsx index 2b1f56a12b..3262153cac 100644 --- a/workspaces/cmdk/src/searchCmdk/SearchCmdk.tsx +++ b/workspaces/cmdk/src/searchCmdk/SearchCmdk.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { Command } from 'cmdk'; import { mergeClassnames } from '@heathmont/moon-core-tw'; +import { Command } from 'cmdk'; import GenericSearch from './private/icons/GenericSearch'; const SearchCmdkRoot = ({ diff --git a/workspaces/core/CHANGELOG.md b/workspaces/core/CHANGELOG.md index e9c28a3245..25e1394138 100644 --- a/workspaces/core/CHANGELOG.md +++ b/workspaces/core/CHANGELOG.md @@ -1,5 +1,11 @@ # @heathmont/moon-core-tw +## 10.7.7 + +### Patch Changes + +- Deploy 10.7.7 + ## 10.7.6 ### Patch Changes diff --git a/workspaces/core/package.json b/workspaces/core/package.json index 1085ba70a1..2d2c564222 100644 --- a/workspaces/core/package.json +++ b/workspaces/core/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-core-tw", "sideEffects": false, - "version": "10.7.6", + "version": "10.7.7", "files": [ "lib" ], diff --git a/workspaces/core/src/bottomSheet/BottomSheet.tsx b/workspaces/core/src/bottomSheet/BottomSheet.tsx index 5e47a01e1d..711f5ca9b2 100644 --- a/workspaces/core/src/bottomSheet/BottomSheet.tsx +++ b/workspaces/core/src/bottomSheet/BottomSheet.tsx @@ -31,12 +31,7 @@ const BottomSheetRoot = ({ value={{ ...state, size, registerChild, dispatch }} > - + {React.Children.map(children, (child) => { if (React.isValidElement(child)) { let extraProps = {}; @@ -62,11 +57,14 @@ const Panel = ({ hasShadow, // deprecated onClose, }: PanelProps) => { - const { size } = useBottomSheetContext('BottomSheet.Panel'); // deprecated + const { size, bottomSheetChildren } = + useBottomSheetContext('BottomSheet.Panel'); // deprecated + const isDragable = bottomSheetChildren?.find((name) => name === 'Draghandle'); const { isTransition, // deprecated panelRef, - } = useDrag(onClose); + clickOutsideClose, + } = useDrag(onClose, isDragable); let height; switch (size) { case 'lg': @@ -83,6 +81,9 @@ const Panel = ({ } return ( { + clickOutsideClose(); + }} as={React.Fragment} enter="ease-out duration-300 transition-transform" enterFrom="translate-y-full" diff --git a/workspaces/core/src/bottomSheet/private/utils/useDrag.ts b/workspaces/core/src/bottomSheet/private/utils/useDrag.ts index 52d1b74090..343863265c 100644 --- a/workspaces/core/src/bottomSheet/private/utils/useDrag.ts +++ b/workspaces/core/src/bottomSheet/private/utils/useDrag.ts @@ -1,7 +1,7 @@ import { useEffect, useRef, useState } from 'react'; import { useBottomSheetContext } from './context'; -const useDrag = (onClose?: () => void) => { +const useDrag = (onClose?: () => void, isDragable?: boolean) => { const draghandleRef = useRef(null); const panelRef = useRef(null); const contentRef = useRef(null); @@ -23,7 +23,7 @@ const useDrag = (onClose?: () => void) => { const onTouchEnd = () => { const ref = panelRef?.current; - if (!ref) { + if (!ref || !isDragable) { return; } if (delta > ref.clientHeight / 2) { @@ -38,9 +38,22 @@ const useDrag = (onClose?: () => void) => { } }; + const clickOutsideClose = () => { + const ref = panelRef?.current; + if (!ref || !isDragable) { + return; + } + ref.style.transform = `translateY(${ref.clientHeight}px)`; + setIsClosing(true); + setTimeout(() => { + onClose && onClose(); + }, 210); + }; + useEffect(() => { const ref = draghandleRef?.current; - if (!ref) { + + if (!ref || !isDragable) { return; } ref.addEventListener('touchstart', onTouchStart); @@ -55,7 +68,7 @@ const useDrag = (onClose?: () => void) => { useEffect(() => { const ref = panelRef?.current; - if (!ref) { + if (!ref || !isDragable) { return; } if (delta > 0) { @@ -90,6 +103,7 @@ const useDrag = (onClose?: () => void) => { panelRef, contentRef, hasDraghandle, + clickOutsideClose, }; }; diff --git a/workspaces/core/src/carousel/Carousel.tsx b/workspaces/core/src/carousel/Carousel.tsx index 8fc557cef8..904e645a2a 100644 --- a/workspaces/core/src/carousel/Carousel.tsx +++ b/workspaces/core/src/carousel/Carousel.tsx @@ -1,4 +1,4 @@ -import React, { useEffect } from 'react'; +import React, { Children, useEffect } from 'react'; import type CarouselRootProps from './private/types/CarouselRootProps'; import type SubcomponentProps from './private/types/SubcomponentProps'; import CarouselContext from './private/utils/CarouselContext'; @@ -15,6 +15,7 @@ const CarouselRoot = ({ step, selectedIndex, autoSlideDelay, + isRtl, ...rest }: CarouselRootProps) => { const { @@ -30,24 +31,33 @@ const CarouselRoot = ({ lastVisibleIndex, } = withHorizontalScroll({ scrollStep: step || 5, - scrollTo, + scrollTo: scrollTo, scrollInContainer: true, + isRtl, }); useInterval(() => { if (!autoSlideDelay) return; - if (canScrollRight) { - scrollRightToStep(); + if (isRtl) { + if (canScrollLeft) { + scrollLeftToStep(); + } else { + scrollToIndex(itemsCount - 1); + } } else { - scrollToIndex(0); + if (canScrollRight) { + scrollRightToStep(); + } else { + scrollToIndex(0); + } } }, autoSlideDelay as number); useEffect(() => { if (selectedIndex !== undefined) { - scrollToIndex(selectedIndex); + scrollToIndex(isRtl ? itemsCount - selectedIndex - 1 : selectedIndex); } - }, [selectedIndex]); + }, [selectedIndex, isRtl, itemsCount]); return (
@@ -82,7 +93,10 @@ const CarouselRoot = ({ }; const Reel = ({ children, className, ...rest }: SubcomponentProps) => { - const { containerRef, autoSlideDelay } = useCarouselContext('Carousel.Reel'); + const { containerRef, autoSlideDelay, isRtl } = + useCarouselContext('Carousel.Reel'); + const arrayChildren = Children.toArray(children); + const revertChildren = arrayChildren.reverse(); return (
    { ref={containerRef} {...rest} > - {children} + {isRtl ? revertChildren : children}
); }; diff --git a/workspaces/core/src/carousel/private/types/CarouselRootProps.ts b/workspaces/core/src/carousel/private/types/CarouselRootProps.ts index bba53e6683..a8a228151d 100644 --- a/workspaces/core/src/carousel/private/types/CarouselRootProps.ts +++ b/workspaces/core/src/carousel/private/types/CarouselRootProps.ts @@ -4,6 +4,7 @@ type CarouselRootProps = { step?: number; selectedIndex?: number; autoSlideDelay?: number; + isRtl?: boolean; children?: | React.ReactNode | ((data: { diff --git a/workspaces/core/src/carousel/private/types/CarouselState.ts b/workspaces/core/src/carousel/private/types/CarouselState.ts index 2f80faf14d..3391294db1 100644 --- a/workspaces/core/src/carousel/private/types/CarouselState.ts +++ b/workspaces/core/src/carousel/private/types/CarouselState.ts @@ -12,6 +12,7 @@ type CarouselState = { firstVisibleIndex?: number; lastVisibleIndex?: number; autoSlideDelay?: number; + isRtl?: boolean; }; export default CarouselState; diff --git a/workspaces/core/src/carousel/private/utils/withHorizontalScroll.ts b/workspaces/core/src/carousel/private/utils/withHorizontalScroll.ts index c7a7292606..e7eae64a40 100644 --- a/workspaces/core/src/carousel/private/utils/withHorizontalScroll.ts +++ b/workspaces/core/src/carousel/private/utils/withHorizontalScroll.ts @@ -8,6 +8,7 @@ type Options = { scrollStep?: number; scrollInContainer?: boolean; scrollTo?: number; + isRtl?: boolean; }; const findLastVisibleIndex = (childRefs: any[]): any => { @@ -29,13 +30,14 @@ const scrollToIndex = ( itemRef: HTMLElement, scrollIntoViewSmoothly: any, containerRef?: any, - scrollStep?: number + scrollStep?: number, + isNotSmooth?: boolean ) => { if (itemRef) { scrollIntoViewSmoothly(itemRef, { block: 'nearest', inline: scrollStep === 1 ? 'center' : 'nearest', - behavior: 'smooth', + behavior: isNotSmooth ? undefined : 'smooth', boundary: containerRef, }); } @@ -130,7 +132,7 @@ export const withHorizontalScroll = (options: Options): any => { const [itemsCount, setItemsCount] = React.useState(0); const containerRef = React.useRef(null); - const { scrollStep, scrollInContainer, scrollTo } = options; + const { scrollStep, scrollInContainer, scrollTo, isRtl } = options; const itemRefs: HTMLElement[] = []; let scrollIntoViewSmoothly: any = scrollIntoView; @@ -184,27 +186,48 @@ export const withHorizontalScroll = (options: Options): any => { setItemsCount(itemRefs.length); }; + //If RTL is enabled, scroll to the last element of the items array + React.useEffect(() => { + if (!itemRefs.length) return; + setItemsCount(itemRefs.length); + if (isRtl) { + scrollToIndex( + itemRefs[itemRefs.length - 1], + scrollIntoViewSmoothly, + scrollInContainer && containerRef && containerRef.current, + undefined, + true + ); + } + }, []); + React.useEffect(() => { if (!scrollTo || !itemRefs.length) { return; } + const revertSrollTo = itemRefs.length - scrollTo - 1; + const currentScrollTo = isRtl ? revertSrollTo : scrollTo; // We scroll for another extra item because we defined our THRESHOLD = 0.75; // It means that item will be visible for 75%. // We scroll one more to guarantee 100% visibility. // "items.length - 1" because indices start from 0. - if (scrollTo && scrollTo < itemRefs.length - 1) { + if (currentScrollTo && currentScrollTo < itemRefs.length - 1) { scrollToIndex( - itemRefs[scrollTo + 1], + itemRefs[currentScrollTo + 1], scrollIntoViewSmoothly, - scrollInContainer && containerRef && containerRef.current + scrollInContainer && containerRef && containerRef.current, + undefined, + false ); } // No point for scroll another extra item because that's the last one - if (scrollTo && scrollTo === itemRefs.length - 1) { + if (currentScrollTo && currentScrollTo === itemRefs.length - 1) { scrollToIndex( - itemRefs[scrollTo], + itemRefs[currentScrollTo], scrollIntoViewSmoothly, - scrollInContainer && containerRef && containerRef.current + scrollInContainer && containerRef && containerRef.current, + undefined, + false ); } }, []); diff --git a/workspaces/core/src/combobox/Combobox.tsx b/workspaces/core/src/combobox/Combobox.tsx index ea699295df..66d963b6de 100644 --- a/workspaces/core/src/combobox/Combobox.tsx +++ b/workspaces/core/src/combobox/Combobox.tsx @@ -1,4 +1,4 @@ -import React, { forwardRef } from 'react'; +import React, { forwardRef, useEffect, useState } from 'react'; import { Combobox as HeadlessCombobox, Transition as HeadlessTransition, @@ -109,12 +109,20 @@ const Trigger = forwardRef>(({ children, className, innerLabel, + open, + onClose, }, ref ) => { - const { size, input, popper, disabled, isError } = + const { value, size, input, popper, disabled, isError } = useComboboxContext('Combobox.Trigger'); + useEffect(() => { + if (!open && typeof onClose === 'function') { + onClose(value) + } + }, [open, value]); + return (
void; }; export default SelectProps diff --git a/workspaces/tables/CHANGELOG.md b/workspaces/tables/CHANGELOG.md index cc39fc9adb..c010589fdb 100644 --- a/workspaces/tables/CHANGELOG.md +++ b/workspaces/tables/CHANGELOG.md @@ -1,5 +1,13 @@ # @heathmont/moon-table-tw +## 10.7.7 + +### Patch Changes + +- Deploy 10.7.7 +- Updated dependencies + - @heathmont/moon-core-tw@10.7.7 + ## 10.7.6 ### Patch Changes diff --git a/workspaces/tables/package.json b/workspaces/tables/package.json index c393ca42c6..afde75ccfc 100644 --- a/workspaces/tables/package.json +++ b/workspaces/tables/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-table-tw", "sideEffects": false, - "version": "10.7.6", + "version": "10.7.7", "files": [ "lib" ], @@ -20,7 +20,7 @@ "chokidar": "chokidar \"**/*.tsx\" \"**/*.ts\" -i \"lib/**/*.d.ts\" -c \"pnpm run build:code\" " }, "dependencies": { - "@heathmont/moon-core-tw": "workspace:^10.7.6", + "@heathmont/moon-core-tw": "workspace:^10.7.7", "react": "18.2.0", "react-dom": "18.2.0", "react-table": "7.8.0", diff --git a/workspaces/tables/src/components/TD.tsx b/workspaces/tables/src/components/TD.tsx index d8b2abead6..5ad074f9e7 100644 --- a/workspaces/tables/src/components/TD.tsx +++ b/workspaces/tables/src/components/TD.tsx @@ -52,7 +52,7 @@ const TD = forwardRef( ? `text-${fontColor}` : 'text-bulma', stickySide === 'right' && - 'before:absolute before:w-px before:bg-beerus before:h-[70%] before:bottom-[15%] before:start-0 before:-ms-2', + 'before:absolute before:w-px before:bg-beerus before:h-[70%] before:bottom-[15%] before:start-0', isSelected || isHovered ? 'border-piccolo cursor-pointer bg-beerus' : `bg-${backgroundColor} border-${backgroundColor}`, diff --git a/workspaces/tables/src/components/TH.tsx b/workspaces/tables/src/components/TH.tsx index 5abb8e86d3..a907405e70 100644 --- a/workspaces/tables/src/components/TH.tsx +++ b/workspaces/tables/src/components/TH.tsx @@ -30,7 +30,7 @@ const TH = forwardRef( `bg-${headerBackgroundColor}`, variant === 'calendar' && 'first:after:hidden', stickySide === 'right' && - 'before:absolute before:w-px before:bg-beerus before:h-[70%] before:bottom-[15%] before:start-0 before:-ms-2' + 'before:absolute before:w-px before:bg-beerus before:h-[70%] before:bottom-[15%] before:start-0' )} > {children} diff --git a/workspaces/themes/CHANGELOG.md b/workspaces/themes/CHANGELOG.md index 71144e2ae8..94f2698b48 100644 --- a/workspaces/themes/CHANGELOG.md +++ b/workspaces/themes/CHANGELOG.md @@ -1,5 +1,11 @@ # @heathmont/moon-themes-tw +## 10.7.7 + +### Patch Changes + +- Deploy 10.7.7 + ## 10.7.6 ### Patch Changes diff --git a/workspaces/themes/package.json b/workspaces/themes/package.json index 38e02e4dec..141c1675d0 100644 --- a/workspaces/themes/package.json +++ b/workspaces/themes/package.json @@ -1,7 +1,7 @@ { "name": "@heathmont/moon-themes-tw", "sideEffects": false, - "version": "10.7.6", + "version": "10.7.7", "files": [ "lib" ], diff --git a/workspaces/themes/src/partners.css b/workspaces/themes/src/partners.css index 9418260ecd..6a5eadac46 100644 --- a/workspaces/themes/src/partners.css +++ b/workspaces/themes/src/partners.css @@ -14,41 +14,41 @@ --zeno: 1 9 19 / 0.4; /* #010913 */ /* support-colors */ - --krillin: 255 179 25; /* #ffb319 */ - --krillin-60: 255 198 82; /* #ffc652 */ - --krillin-10: 255 217 141; /* #ffd98d */ + --krillin: 255 179 25; /* #ff9800 */ + --krillin-60: 255 179 25 / 0.56; /* #ff9800 */ + --krillin-10: 255 179 25 / 0.08; /* #ff9800 */ --chichi: 255 78 100; /* #ff4e64 */ - --chichi-60: 255 118 135; /* #ff7687 */ - --chichi-10: 255 150 163; /* #ff96a3 */ + --chichi-60: 255 78 100 / 0.56; /* #ff4e64 */ + --chichi-10: 255 78 100 / 0.08; /* #ff4e64 */ - --roshi: 74 209 95; /* #4ad15f */ - --roshi-60: 100 220 119; /* #64dc77 */ - --roshi-10: 127 242 145; /* #7ff291 */ + --roshi: 46 125 50; /* #2e7d32 */ + --roshi-60: 46 125 50 / 0.56; /* #2e7d32 */ + --roshi-10: 46 125 50 / 0.08; /* #2e7d32 */ --dodoria: 211 48 48; /* #d33030 */ - --dodoria-60: 219 78 78; /* #db4e4e */ - --dodoria-10: 240 103 103; /* #f06767 */ + --dodoria-60: 211 48 48 / 0.56; /* #d33030 */ + --dodoria-10: 211 48 48 / 0.08; /* #d33030 */ --cell: 149 241 213; /* #95f1d5 */ - --cell-60: 162 250 223; /* #a2fadf */ - --cell-10: 191 255 236; /* #bfffec */ + --cell-60: 149 241 213 / 0.56; /* #95f1d5 */ + --cell-10: 149 241 213 / 0.08; /* #95f1d5 */ --raditz: 179 128 74; /* #b3804a */ - --raditz-60: 193 145 93; /* #c1915d */ - --raditz-10: 214 169 121; /* #d6a979 */ + --raditz-60: 179 128 74 / 0.56; /* #b3804a */ + --raditz-10: 179 128 74 / 0.08; /* #b3804a */ --whis: 52 72 240; /* #3448f0 */ - --whis-60: 103 119 248; /* #6777f8 */ - --whis-10: 132 144 249; /* #8490f9 */ + --whis-60: 52 72 240 / 0.56; /* #3448f0 */ + --whis-10: 52 72 240 / 0.08; /* #3448f0 */ --frieza: 92 51 207; /* #5c33cf */ - --frieza-60: 115 77 222; /* #734dde */ - --frieza-10: 146 113 239; /* #9271ef */ + --frieza-60: 92 51 207 / 0.56; /* #5c33cf */ + --frieza-10: 92 51 207 / 0.08; /* #5c33cf */ --nappa: 114 85 80; /* #725550 */ - --nappa-60: 133 106 102; /* #856a66 */ - --nappa-10: 161 134 129; /* #a18681 */ + --nappa-60: 114 85 80 / 0.56; /* #725550 */ + --nappa-10: 114 85 80 / 0.08; /* #725550 */ /* border-radius */ --radius-i-xs: 0.25rem; /* 4px */