diff --git a/.changeset/shiny-mugs-sit.md b/.changeset/shiny-mugs-sit.md new file mode 100644 index 000000000..88bac9053 --- /dev/null +++ b/.changeset/shiny-mugs-sit.md @@ -0,0 +1,7 @@ +--- +"@hopper-ui/styled-system": patch +"@hopper-ui/components": patch +"@hopper-ui/icons": patch +--- + +Updated peer dependency versions range diff --git a/apps/docs/app/components/[...slug]/page.tsx b/apps/docs/app/components/[...slug]/page.tsx index 83edce006..0a2194dcb 100644 --- a/apps/docs/app/components/[...slug]/page.tsx +++ b/apps/docs/app/components/[...slug]/page.tsx @@ -11,7 +11,7 @@ interface PageProps { }; } -async function findComponentFromSlug(params : { slug: string[] }) { +function findComponentFromSlug(params : { slug: string[] }) { const [type] = params.slug; const component = allComponents.find(x => x.slug === type); @@ -73,14 +73,19 @@ export default async function ComponentPage({ params }: PageProps) { } export async function generateMetadata({ params }: PageProps) { - const component = await findComponentFromSlug(params); + const component = findComponentFromSlug(params); if (component) { - const title = component?.title; - - return { - title: `${title}` + const metadata: Record = { + title: component.title }; + + if (component.description) { + metadata.description = component.description; + } + + + return metadata; } return { diff --git a/apps/docs/app/components/layout.tsx b/apps/docs/app/components/layout.tsx index 59571b66f..96fff95d0 100644 --- a/apps/docs/app/components/layout.tsx +++ b/apps/docs/app/components/layout.tsx @@ -20,7 +20,8 @@ async function ComponentsLayout({ children }: { children: ReactNode }) { "pickers", "status", "content", - "placeholders" + "placeholders", + "internal-parts" ], // the components paths are slightly different than the other pages // we want the URLS to be /components/ComponentName diff --git a/apps/docs/app/getting-started/[...slug]/page.tsx b/apps/docs/app/getting-started/[...slug]/page.tsx index a146f4842..03ef98541 100644 --- a/apps/docs/app/getting-started/[...slug]/page.tsx +++ b/apps/docs/app/getting-started/[...slug]/page.tsx @@ -45,9 +45,22 @@ export async function generateStaticParams() { } export async function generateMetadata({ params }: PageProps) { - const page = await findPageFromSlug(params.slug); + const page = findPageFromSlug(params.slug); + + if (page) { + const metadata: Record = { + title: page.title + }; + + if (page.description) { + metadata.description = page.description; + } + + + return metadata; + } return { - title: page ? `${page.title}` : null + title: null }; } diff --git a/apps/docs/app/icons/[...slug]/page.tsx b/apps/docs/app/icons/[...slug]/page.tsx index 22be07efb..235d6d47f 100644 --- a/apps/docs/app/icons/[...slug]/page.tsx +++ b/apps/docs/app/icons/[...slug]/page.tsx @@ -44,9 +44,22 @@ export async function generateStaticParams() { } export async function generateMetadata({ params }: PageProps) { - const page = await findPageFromSlug(params.slug); + const page = findPageFromSlug(params.slug); + + if (page) { + const metadata: Record = { + title: page.title + }; + + if (page.description) { + metadata.description = page.description; + } + + + return metadata; + } return { - title: page ? `${page.title}` : null + title: null }; } diff --git a/apps/docs/app/tokens/[...slug]/page.tsx b/apps/docs/app/tokens/[...slug]/page.tsx index eddf0aa12..066cfd33b 100644 --- a/apps/docs/app/tokens/[...slug]/page.tsx +++ b/apps/docs/app/tokens/[...slug]/page.tsx @@ -44,7 +44,7 @@ export async function generateStaticParams() { // The sections are Overview, Semantic and Core. we want all title in "Core" to be "Core " + "Color"(the token type) + " Tokens" export async function generateMetadata({ params }: PageProps) { - const page = await findPageFromSlug(params.slug); + const page = findPageFromSlug(params.slug); if (!page) { return { @@ -52,7 +52,7 @@ export async function generateMetadata({ params }: PageProps) { }; } - const { title, section } = page; + const { title, section, description } = page; let pageTitle = `${title}`; if (section === "core") { @@ -61,7 +61,14 @@ export async function generateMetadata({ params }: PageProps) { pageTitle = `Semantic ${title} Tokens`; } - return { + const metadata: Record = { title: pageTitle }; + + if (description) { + metadata.description = description; + } + + + return metadata; } diff --git a/apps/docs/app/ui/components/overview/Overview.tsx b/apps/docs/app/ui/components/overview/Overview.tsx index 9b6f29a2a..b878310db 100644 --- a/apps/docs/app/ui/components/overview/Overview.tsx +++ b/apps/docs/app/ui/components/overview/Overview.tsx @@ -23,7 +23,9 @@ const sortOrder = [ "overlays", "pickers", "status", - "content" + "content", + "placeholders", + "internal-parts" ]; const categories = Array.from(new Set(allComponents.map(component => component.category))).filter(x => x && !ignoreCategories.includes(x)).sort((a, b) => { diff --git a/apps/docs/app/ui/layout/mobileMenu/MobileMenu.tsx b/apps/docs/app/ui/layout/mobileMenu/MobileMenu.tsx index 6bf459a7d..42202295e 100644 --- a/apps/docs/app/ui/layout/mobileMenu/MobileMenu.tsx +++ b/apps/docs/app/ui/layout/mobileMenu/MobileMenu.tsx @@ -17,7 +17,6 @@ import HopperLogo from "./assets/hopper-logo.svg"; import "./mobileMenu.css"; - interface MobileMenuProps { onClose?: () => void; isOpen: boolean; diff --git a/apps/docs/content/components/buttons/Button.mdx b/apps/docs/content/components/buttons/Button.mdx index 84ff0d31a..eee4c4167 100644 --- a/apps/docs/content/components/buttons/Button.mdx +++ b/apps/docs/content/components/buttons/Button.mdx @@ -21,17 +21,9 @@ links: ## Anatomy - - TODO: We have anatomy screenshots from the Figma, we could most likely use them here - - ### Concepts - - - [Client Side Routing](./client-side-routing) - - ### Composed Components -A `Button` uses the following components. +A `Button` uses the following components: @@ -74,7 +66,7 @@ A button can be expanded to full width to fill its parent container. ### Icon Only -A button can contain only an icon. +A button can contain only an icon. An accessible name must be provided through [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) prop. See also [WCAG practices](https://www.w3.org/TR/WCAG20-TECHS/ARIA6.html). diff --git a/apps/docs/content/components/buttons/ButtonGroup.mdx b/apps/docs/content/components/buttons/ButtonGroup.mdx index c8b96853b..4ae754b17 100644 --- a/apps/docs/content/components/buttons/ButtonGroup.mdx +++ b/apps/docs/content/components/buttons/ButtonGroup.mdx @@ -33,20 +33,10 @@ links: A `ButtonGroup` uses the following component. - + ## Usage -### Disabled -A button group can be disabled. - - - -### Fluid -A button group can be fluid. - - - ### Orientation A button group can render his items vertically. @@ -57,6 +47,16 @@ A button group can change the alignment of his items. +### Disabled +A button group can be disabled. + + + +### Fluid +A button group can be fluid. + + + ### Sizes A button group can be of different sizes. diff --git a/apps/docs/content/components/buttons/LinkButton.mdx b/apps/docs/content/components/buttons/LinkButton.mdx index 6d9d5f06e..9f312c4ea 100644 --- a/apps/docs/content/components/buttons/LinkButton.mdx +++ b/apps/docs/content/components/buttons/LinkButton.mdx @@ -21,17 +21,15 @@ links: ## Anatomy - - TODO: We have anatomy screenshots from the Figma, we could most likely use them here +### Concepts - ### Concepts +*LinkButton* makes use of the following concepts: - - [Client Side Routing](./client-side-routing) - +- [Client Side Routing](./client-side-routing) ### Composed Components -A `LinkButton` uses the following components. +A *LinkButton* uses the following components: @@ -64,13 +62,11 @@ A link button can be disabled. ### External - Add `rel="noopener noreferrer"` and `target="_blank"` attributes to render and external link button. ### No Href - When a link button link does not have an href prop, it is rendered as a `` instead of an ``. Events will need to be handled in JavaScript with the `onPress` prop. Note: this will not behave like a native link. Browser features like context menus and open in a new tab will not apply. @@ -87,6 +83,11 @@ A link button can contain only an icon. +### Router Link +A link button can be used with any Router. For more information, see the [Client Side Routing](../concepts/client-side-routing) article. + + + ### Icon A link button can contain icons. @@ -97,8 +98,6 @@ Nonstandard end icons can be provided to handle special cases. However, think tw - - ## Advanced customization diff --git a/apps/docs/content/components/collections/Listbox.mdx b/apps/docs/content/components/collections/Listbox.mdx index f57446e5c..bcb312162 100644 --- a/apps/docs/content/components/collections/Listbox.mdx +++ b/apps/docs/content/components/collections/Listbox.mdx @@ -33,7 +33,7 @@ links: #### ListBox -A `ListBox` uses the following components. +A `ListBox` uses the following components: @@ -69,6 +69,12 @@ A list box can have sections and section headers. +### Dividers + +A list box can have dividers. + + + ### Avatar A ListBox can contain an avatar. diff --git a/apps/docs/content/components/collections/TagGroup.mdx b/apps/docs/content/components/collections/TagGroup.mdx index 1b87a8518..886ab55c8 100644 --- a/apps/docs/content/components/collections/TagGroup.mdx +++ b/apps/docs/content/components/collections/TagGroup.mdx @@ -32,7 +32,7 @@ links: ### Composed Components -A `TagGroup` uses the following components. +A `TagGroup` uses the following components: diff --git a/apps/docs/content/components/concepts/controlled-mode.mdx b/apps/docs/content/components/concepts/controlled-mode.mdx index b61d1a5cc..a78dddedf 100644 --- a/apps/docs/content/components/concepts/controlled-mode.mdx +++ b/apps/docs/content/components/concepts/controlled-mode.mdx @@ -1,5 +1,6 @@ --- title: Controlled Mode +description: Learn how to use controlled and uncontrolled modes to customize Hopper components. order: 5 --- When working with Hopper components, you can customize a component's behavior using **controlled** or **uncontrolled** properties, depending on your needs. This flexibility is the foundation for **building custom components** on top of Hopper, enabling you to implement interactive features or modify the default behavior of components while preserving their visual style and structure. diff --git a/apps/docs/content/components/content/Card.mdx b/apps/docs/content/components/content/Card.mdx index 4116b0911..3933bc9f0 100644 --- a/apps/docs/content/components/content/Card.mdx +++ b/apps/docs/content/components/content/Card.mdx @@ -22,7 +22,7 @@ links: ### Composed Components -A `Card` uses the following components. +A `Card` uses the following components: diff --git a/apps/docs/content/components/content/IllustratedMessage.mdx b/apps/docs/content/components/content/IllustratedMessage.mdx index bc274a678..c93c3a334 100644 --- a/apps/docs/content/components/content/IllustratedMessage.mdx +++ b/apps/docs/content/components/content/IllustratedMessage.mdx @@ -12,7 +12,7 @@ links: ### Composed Components -A `IllustratedMessage` uses the following components. +A `IllustratedMessage` uses the following components: diff --git a/apps/docs/content/components/forms/Checkbox.mdx b/apps/docs/content/components/forms/Checkbox.mdx index 27787cc8d..721885613 100644 --- a/apps/docs/content/components/forms/Checkbox.mdx +++ b/apps/docs/content/components/forms/Checkbox.mdx @@ -32,7 +32,7 @@ links: ### Composed Components -A `Checkbox` uses the following components. +A `Checkbox` uses the following components: diff --git a/apps/docs/content/components/forms/CheckboxGroup.mdx b/apps/docs/content/components/forms/CheckboxGroup.mdx index 787385c87..1d88833e4 100644 --- a/apps/docs/content/components/forms/CheckboxGroup.mdx +++ b/apps/docs/content/components/forms/CheckboxGroup.mdx @@ -31,7 +31,7 @@ links: ### Composed Components -A `CheckboxGroup` uses the following components. +A `CheckboxGroup` uses the following components: diff --git a/apps/docs/content/components/forms/Form.mdx b/apps/docs/content/components/forms/Form.mdx index e3e8ffb16..18adc1804 100644 --- a/apps/docs/content/components/forms/Form.mdx +++ b/apps/docs/content/components/forms/Form.mdx @@ -30,7 +30,7 @@ links: ### Composed Components -A `Form` uses the following components. +A `Form` uses the following components: diff --git a/apps/docs/content/components/forms/RadioGroup.mdx b/apps/docs/content/components/forms/RadioGroup.mdx index 15df6d82c..6afa1d632 100644 --- a/apps/docs/content/components/forms/RadioGroup.mdx +++ b/apps/docs/content/components/forms/RadioGroup.mdx @@ -32,7 +32,7 @@ links: ### Composed Components -A `RadioGroup` uses the following components. +A `RadioGroup` uses the following components: diff --git a/apps/docs/content/components/forms/Switch.mdx b/apps/docs/content/components/forms/Switch.mdx index b46baece6..8313120d2 100644 --- a/apps/docs/content/components/forms/Switch.mdx +++ b/apps/docs/content/components/forms/Switch.mdx @@ -32,7 +32,7 @@ links: ### Composed Components -A `Switch` uses the following components. +A `Switch` uses the following components: diff --git a/apps/docs/content/components/icons/Icon.mdx b/apps/docs/content/components/icons/Icon.mdx index c5ea64da1..fee8b99d9 100644 --- a/apps/docs/content/components/icons/Icon.mdx +++ b/apps/docs/content/components/icons/Icon.mdx @@ -48,10 +48,10 @@ import { Icon, type CreatedIconProps } from "@hopper-ui/icons"; function CustomIcon(props: CreatedIconProps) { return ( + src16={CustomIcon16} + src24={CustomIcon24} + src32={CustomIcon32} + {...props} /> ) } ``` diff --git a/apps/docs/content/components/icons/IconList.mdx b/apps/docs/content/components/icons/IconList.mdx index de8c60771..6fd6de05b 100644 --- a/apps/docs/content/components/icons/IconList.mdx +++ b/apps/docs/content/components/icons/IconList.mdx @@ -30,7 +30,7 @@ links: ### Composed Components -An `IconList` uses the following components. +An `IconList` uses the following components: diff --git a/apps/docs/content/components/forms/ErrorMessage.mdx b/apps/docs/content/components/internal-parts/ErrorMessage.mdx similarity index 98% rename from apps/docs/content/components/forms/ErrorMessage.mdx rename to apps/docs/content/components/internal-parts/ErrorMessage.mdx index 8a20116de..c196d0daf 100644 --- a/apps/docs/content/components/forms/ErrorMessage.mdx +++ b/apps/docs/content/components/internal-parts/ErrorMessage.mdx @@ -1,7 +1,7 @@ --- title: ErrorMessage description: An error message displays validation errors for a form field. -category: "forms" +category: "internal parts" links: source: https://github.com/gsoft-inc/wl-hopper/blob/main/packages/components/src/ErrorMessage/src/ErrorMessage.tsx --- diff --git a/apps/docs/content/components/forms/HelperMessage.mdx b/apps/docs/content/components/internal-parts/HelperMessage.mdx similarity index 97% rename from apps/docs/content/components/forms/HelperMessage.mdx rename to apps/docs/content/components/internal-parts/HelperMessage.mdx index b44e319ae..a06e550ee 100644 --- a/apps/docs/content/components/forms/HelperMessage.mdx +++ b/apps/docs/content/components/internal-parts/HelperMessage.mdx @@ -1,7 +1,7 @@ --- title: HelperMessage description: A helper message component displays auxiliary text to guide users in the interface. -category: "forms" +category: "internal parts" links: source: https://github.com/gsoft-inc/wl-hopper/blob/main/packages/components/src/HelperMessage/src/HelperMessage.tsx --- diff --git a/apps/docs/content/components/layout/Inline.mdx b/apps/docs/content/components/layout/Inline.mdx index 3619ce5a6..d5d486e31 100644 --- a/apps/docs/content/components/layout/Inline.mdx +++ b/apps/docs/content/components/layout/Inline.mdx @@ -1,6 +1,6 @@ --- title: Inline -description: An inline compononent is a layout primitive used to arrange elements horizontally. +description: An inline component is a layout primitive used to arrange elements horizontally. category: "layout" links: source: https://github.com/gsoft-inc/wl-hopper/blob/main/packages/components/src/layout/src/Inline.tsx diff --git a/apps/docs/content/components/navigation/Disclosure.mdx b/apps/docs/content/components/navigation/Disclosure.mdx index a7f7bf806..e85743024 100644 --- a/apps/docs/content/components/navigation/Disclosure.mdx +++ b/apps/docs/content/components/navigation/Disclosure.mdx @@ -31,7 +31,7 @@ links: ### Composed Components -A `Disclosure` uses the following components. +A `Disclosure` uses the following components: diff --git a/apps/docs/content/components/navigation/Link.mdx b/apps/docs/content/components/navigation/Link.mdx index 3860024c3..d601569c9 100644 --- a/apps/docs/content/components/navigation/Link.mdx +++ b/apps/docs/content/components/navigation/Link.mdx @@ -31,7 +31,7 @@ links: ### Composed Components -A `Link` uses the following components. +A `Link` uses the following components: diff --git a/apps/docs/content/components/overlays/Popover.mdx b/apps/docs/content/components/overlays/Popover.mdx index 0053dbf63..4356b92e2 100644 --- a/apps/docs/content/components/overlays/Popover.mdx +++ b/apps/docs/content/components/overlays/Popover.mdx @@ -30,7 +30,7 @@ links: ### Composed Components -A `Popover` uses the following components. +A `Popover` uses the following components: diff --git a/apps/docs/content/components/overview/component-list.mdx b/apps/docs/content/components/overview/component-list.mdx index 541cda8c2..6953fba0a 100644 --- a/apps/docs/content/components/overview/component-list.mdx +++ b/apps/docs/content/components/overview/component-list.mdx @@ -1,5 +1,6 @@ --- title: Component List +description: A list of all the components available in the design system. order: 2 --- diff --git a/apps/docs/content/components/pickers/ComboBox.mdx b/apps/docs/content/components/pickers/ComboBox.mdx index 6c39f259b..8c89735b1 100644 --- a/apps/docs/content/components/pickers/ComboBox.mdx +++ b/apps/docs/content/components/pickers/ComboBox.mdx @@ -40,7 +40,7 @@ The Section component represents a `section` within a Hopper container. ### Composed Components -A `ComboBox` uses the following components. +A `ComboBox` uses the following components: diff --git a/apps/docs/content/components/pickers/Select.mdx b/apps/docs/content/components/pickers/Select.mdx index b36b72a3f..83f92e744 100644 --- a/apps/docs/content/components/pickers/Select.mdx +++ b/apps/docs/content/components/pickers/Select.mdx @@ -39,7 +39,7 @@ The Section component represents a `section` within a Hopper container. ### Composed Components -A `Select` uses the following components. +A `Select` uses the following components: diff --git a/apps/docs/content/getting-started/overview/installation.mdx b/apps/docs/content/getting-started/overview/installation.mdx index ba6d386b4..4a32882ba 100644 --- a/apps/docs/content/getting-started/overview/installation.mdx +++ b/apps/docs/content/getting-started/overview/installation.mdx @@ -1,6 +1,6 @@ --- title: Installation -description: How to install and set up Hopper in your project +description: Learn how to install and set up Hopper in your project order: 1 status: ready --- diff --git a/apps/docs/content/icons/SVG-icons/icon-library.mdx b/apps/docs/content/icons/SVG-icons/icon-library.mdx index 5d31f2e0a..c910c9d47 100644 --- a/apps/docs/content/icons/SVG-icons/icon-library.mdx +++ b/apps/docs/content/icons/SVG-icons/icon-library.mdx @@ -1,6 +1,6 @@ --- title: Icon Library -description: Getting started with Workleap Design Icons +description: Getting started with Hopper's SVG Icons library order: 2 --- diff --git a/apps/docs/content/icons/SVG-icons/rich-icon-library.mdx b/apps/docs/content/icons/SVG-icons/rich-icon-library.mdx index f36603d1d..bdfba59de 100644 --- a/apps/docs/content/icons/SVG-icons/rich-icon-library.mdx +++ b/apps/docs/content/icons/SVG-icons/rich-icon-library.mdx @@ -1,6 +1,6 @@ --- title: Rich Icon Library -description: Getting started with Workleap Design Icons +description: Getting started with Hopper's Rich SVG Icons library order: 3 --- diff --git a/apps/docs/content/icons/overview/designing-an-icon.mdx b/apps/docs/content/icons/overview/designing-an-icon.mdx index e9957dbe1..4b90e9613 100644 --- a/apps/docs/content/icons/overview/designing-an-icon.mdx +++ b/apps/docs/content/icons/overview/designing-an-icon.mdx @@ -1,6 +1,6 @@ --- title: Designing an Icon -description: Learn how to create consistent and high-quality icons for the Workleap platform by following these guidelines. +description: Learn how to create consistent and high-quality icons by following these guidelines. --- import { iconData } from './data.ts'; diff --git a/apps/docs/content/icons/overview/introduction.mdx b/apps/docs/content/icons/overview/introduction.mdx index d638b43ab..0d1b4df3e 100644 --- a/apps/docs/content/icons/overview/introduction.mdx +++ b/apps/docs/content/icons/overview/introduction.mdx @@ -1,6 +1,6 @@ --- title: Introduction -description: Getting started with Workleap Design Icons +description: Getting started with Hopper's Icons order: 1 --- diff --git a/apps/docs/content/icons/react-icons/icon-library.mdx b/apps/docs/content/icons/react-icons/icon-library.mdx index f5e4b572d..6cc2ef638 100644 --- a/apps/docs/content/icons/react-icons/icon-library.mdx +++ b/apps/docs/content/icons/react-icons/icon-library.mdx @@ -1,6 +1,6 @@ --- title: Icon Library -description: Getting started with Workleap Design Icons +description: Getting started with Hopper's Icons library order: 3 --- diff --git a/apps/docs/content/icons/react-icons/rich-icon-library.mdx b/apps/docs/content/icons/react-icons/rich-icon-library.mdx index d2d4cb9dc..9b05a4049 100644 --- a/apps/docs/content/icons/react-icons/rich-icon-library.mdx +++ b/apps/docs/content/icons/react-icons/rich-icon-library.mdx @@ -1,6 +1,6 @@ --- title: Rich Icons Library -description: Getting started with Workleap Design Rich Icons +description: Getting started with Hopper's Rich Icons library order: 4 --- diff --git a/apps/docs/content/tokens/core/border-radius.mdx b/apps/docs/content/tokens/core/border-radius.mdx index 0bab3961e..931c827cb 100644 --- a/apps/docs/content/tokens/core/border-radius.mdx +++ b/apps/docs/content/tokens/core/border-radius.mdx @@ -1,6 +1,6 @@ --- title: Border Radius -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core border-radius design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/core/color.mdx b/apps/docs/content/tokens/core/color.mdx index dbf41fc80..1bae95514 100644 --- a/apps/docs/content/tokens/core/color.mdx +++ b/apps/docs/content/tokens/core/color.mdx @@ -1,6 +1,6 @@ --- title: Color -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core color design tokens. --- import tokensDark from '../../../datas/tokens-dark.json'; diff --git a/apps/docs/content/tokens/core/dimensions.mdx b/apps/docs/content/tokens/core/dimensions.mdx index 5bae52be1..7bd1a5531 100644 --- a/apps/docs/content/tokens/core/dimensions.mdx +++ b/apps/docs/content/tokens/core/dimensions.mdx @@ -1,6 +1,6 @@ --- title: Dimensions -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core dimensions design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/core/font-family.mdx b/apps/docs/content/tokens/core/font-family.mdx index de0ea533e..5ea97b63b 100644 --- a/apps/docs/content/tokens/core/font-family.mdx +++ b/apps/docs/content/tokens/core/font-family.mdx @@ -1,6 +1,6 @@ --- title: Font Family -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core font-family design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/core/font-size.mdx b/apps/docs/content/tokens/core/font-size.mdx index f79f6cf76..bda5a3adc 100644 --- a/apps/docs/content/tokens/core/font-size.mdx +++ b/apps/docs/content/tokens/core/font-size.mdx @@ -1,6 +1,6 @@ --- title: Font Size -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core font-size design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/core/font-weight.mdx b/apps/docs/content/tokens/core/font-weight.mdx index 9571a0776..cf68e5e4a 100644 --- a/apps/docs/content/tokens/core/font-weight.mdx +++ b/apps/docs/content/tokens/core/font-weight.mdx @@ -1,6 +1,6 @@ --- title: Font Weight -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core font-weight design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/core/line-height.mdx b/apps/docs/content/tokens/core/line-height.mdx index ac88b8a4c..9c96237ac 100644 --- a/apps/docs/content/tokens/core/line-height.mdx +++ b/apps/docs/content/tokens/core/line-height.mdx @@ -1,6 +1,6 @@ --- title: Line Height -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core line-height design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/core/motion.mdx b/apps/docs/content/tokens/core/motion.mdx index c23044a38..5db5bdd8e 100644 --- a/apps/docs/content/tokens/core/motion.mdx +++ b/apps/docs/content/tokens/core/motion.mdx @@ -1,11 +1,11 @@ --- title: Motion -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core motion design tokens. --- import tokens from '../../../datas/tokens.json'; -Our motion utilities consists of two set of values, *durations* and *easings*. +Motion brings meaning and a sense of life to the experience. It should be purposeful, intuitive, and seamless. Our motion utilities consists of two set of values, *durations* and *easings*. ## Usage diff --git a/apps/docs/content/tokens/core/shadow.mdx b/apps/docs/content/tokens/core/shadow.mdx index f6f8faa1a..9b8f55fa6 100644 --- a/apps/docs/content/tokens/core/shadow.mdx +++ b/apps/docs/content/tokens/core/shadow.mdx @@ -1,6 +1,6 @@ --- title: Shadow -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the core box-shadow design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/semantic/color.mdx b/apps/docs/content/tokens/semantic/color.mdx index e282a686c..96298cfd4 100644 --- a/apps/docs/content/tokens/semantic/color.mdx +++ b/apps/docs/content/tokens/semantic/color.mdx @@ -1,6 +1,6 @@ --- title: Color -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the semantic color design tokens. --- import tokensDark from '../../../datas/tokens-dark.json'; import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/semantic/elevation.mdx b/apps/docs/content/tokens/semantic/elevation.mdx index c83b18064..e16645ccb 100644 --- a/apps/docs/content/tokens/semantic/elevation.mdx +++ b/apps/docs/content/tokens/semantic/elevation.mdx @@ -1,6 +1,6 @@ --- title: Elevation -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the semantic elevation design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/semantic/shape.mdx b/apps/docs/content/tokens/semantic/shape.mdx index 321ab39f9..49c11ddf5 100644 --- a/apps/docs/content/tokens/semantic/shape.mdx +++ b/apps/docs/content/tokens/semantic/shape.mdx @@ -1,6 +1,6 @@ --- title: Shape -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the semantic shape design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/semantic/space.mdx b/apps/docs/content/tokens/semantic/space.mdx index ce2b6df8d..5eb42c52d 100644 --- a/apps/docs/content/tokens/semantic/space.mdx +++ b/apps/docs/content/tokens/semantic/space.mdx @@ -1,6 +1,6 @@ --- title: Space -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the semantic space design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/content/tokens/semantic/typography.mdx b/apps/docs/content/tokens/semantic/typography.mdx index 7534417a4..6537239be 100644 --- a/apps/docs/content/tokens/semantic/typography.mdx +++ b/apps/docs/content/tokens/semantic/typography.mdx @@ -1,6 +1,6 @@ --- title: Typography -description: Getting started with Workleap Design Tokens +description: Design tokens are design decisions, translated into data. Explore the semantic typography design tokens. --- import tokens from '../../../datas/tokens.json'; diff --git a/apps/docs/examples/Preview.ts b/apps/docs/examples/Preview.ts index 385cd6b61..9bca98f24 100644 --- a/apps/docs/examples/Preview.ts +++ b/apps/docs/examples/Preview.ts @@ -44,18 +44,18 @@ export const Previews: Record = { "buttons/docs/buttonGroup/preview": { component: lazy(() => import("@/../../packages/components/src/buttons/docs/buttonGroup/preview.tsx")) }, - "buttons/docs/buttonGroup/disabled": { - component: lazy(() => import("@/../../packages/components/src/buttons/docs/buttonGroup/disabled.tsx")) - }, - "buttons/docs/buttonGroup/fluid": { - component: lazy(() => import("@/../../packages/components/src/buttons/docs/buttonGroup/fluid.tsx")) - }, "buttons/docs/buttonGroup/orientation": { component: lazy(() => import("@/../../packages/components/src/buttons/docs/buttonGroup/orientation.tsx")) }, "buttons/docs/buttonGroup/alignment": { component: lazy(() => import("@/../../packages/components/src/buttons/docs/buttonGroup/alignment.tsx")) }, + "buttons/docs/buttonGroup/disabled": { + component: lazy(() => import("@/../../packages/components/src/buttons/docs/buttonGroup/disabled.tsx")) + }, + "buttons/docs/buttonGroup/fluid": { + component: lazy(() => import("@/../../packages/components/src/buttons/docs/buttonGroup/fluid.tsx")) + }, "buttons/docs/buttonGroup/sizes": { component: lazy(() => import("@/../../packages/components/src/buttons/docs/buttonGroup/sizes.tsx")) }, @@ -83,15 +83,15 @@ export const Previews: Record = { "buttons/docs/linkButton/icon": { component: lazy(() => import("@/../../packages/components/src/buttons/docs/linkButton/icon.tsx")) }, + "buttons/docs/linkButton/reactRouterLink": { + component: lazy(() => import("@/../../packages/components/src/buttons/docs/linkButton/reactRouterLink.tsx")) + }, "buttons/docs/linkButton/icons": { component: lazy(() => import("@/../../packages/components/src/buttons/docs/linkButton/icons.tsx")) }, "buttons/docs/linkButton/endIcon": { component: lazy(() => import("@/../../packages/components/src/buttons/docs/linkButton/endIcon.tsx")) }, - "buttons/docs/linkButton/reactRouterLink": { - component: lazy(() => import("@/../../packages/components/src/buttons/docs/linkButton/reactRouterLink.tsx")) - }, "buttons/docs/linkButton/advancedCustomization": { component: lazy(() => import("@/../../packages/components/src/buttons/docs/linkButton/advancedCustomization.tsx")) }, @@ -113,6 +113,9 @@ export const Previews: Record = { "ListBox/docs/section": { component: lazy(() => import("@/../../packages/components/src/ListBox/docs/section.tsx")) }, + "ListBox/docs/divider": { + component: lazy(() => import("@/../../packages/components/src/ListBox/docs/divider.tsx")) + }, "ListBox/docs/avatar": { component: lazy(() => import("@/../../packages/components/src/ListBox/docs/avatar.tsx")) }, diff --git a/packages/components/package.json b/packages/components/package.json index 1cdfdbc85..876f27d60 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -44,7 +44,7 @@ "react": "^18 || ^19", "react-aria": "^3.36", "react-aria-components": "^1.5", - "react-dom": "^18" + "react-dom": "^18 || ^19" }, "dependencies": { "@hopper-ui/icons": "workspace:*", diff --git a/packages/components/src/Avatar/docs/customization.tsx b/packages/components/src/Avatar/docs/customization.tsx index d31514da1..3d95c6bd8 100644 --- a/packages/components/src/Avatar/docs/customization.tsx +++ b/packages/components/src/Avatar/docs/customization.tsx @@ -1,7 +1,7 @@ -import { Avatar, Stack, Flex } from "@hopper-ui/components"; +import { Avatar, Stack } from "@hopper-ui/components"; import { type ReactEventHandler, useEffect, useState } from "react"; -function useAsyncImage(src: string, retryCount = 5, delay = 250): [string | undefined, ReactEventHandler | undefined, number] { +function useAsyncImage(src: string, retryCount = 5, delay = 250) { const [currentSrc, setCurrentSrc] = useState(src); const [isLoaded, setIsLoaded] = useState(false); const [failureCount, setFailureCount] = useState(0); @@ -42,7 +42,7 @@ function useAsyncImage(src: string, retryCount = 5, delay = 250): [string | unde } }; - return [isLoaded ? currentSrc : undefined, onError, failureCount]; + return [isLoaded ? currentSrc : undefined, onError, failureCount] as const; } export default function Example() { @@ -51,20 +51,20 @@ export default function Example() { return ( - +

The avatar failed to load {failureCount} times.

-
- +
+

The avatar failed to load {failureCount2} times.

- +
); } diff --git a/packages/components/src/Card/docs/migration/button.tsx b/packages/components/src/Card/docs/migration/button.tsx index 3f1b7567e..75990ef74 100644 --- a/packages/components/src/Card/docs/migration/button.tsx +++ b/packages/components/src/Card/docs/migration/button.tsx @@ -1,18 +1,14 @@ -import { Button, Card, Content, Footer, H3, Header, Text } from "@hopper-ui/components"; +import { Button, Card, H3, Inline, Text } from "@hopper-ui/components"; export default function Example() { return ( -
+

NASA Headquarters

No visitors allowed. -
- - NASA Headquarters, officially known as Mary W. Jackson NASA Headquarters or NASA HQ and formerly named Two Independence Square, is a low-rise office building in the two-building Independence Square complex at 300 E Street SW in Washington, D.C. - -
- -
+ + NASA Headquarters, officially known as Mary W. Jackson NASA Headquarters or NASA HQ and formerly named Two Independence Square, is a low-rise office building in the two-building Independence Square complex at 300 E Street SW in Washington, D.C. +
); } diff --git a/packages/components/src/Card/docs/migration/buttongroup.tsx b/packages/components/src/Card/docs/migration/buttongroup.tsx index 193524d6e..ebae8d0c3 100644 --- a/packages/components/src/Card/docs/migration/buttongroup.tsx +++ b/packages/components/src/Card/docs/migration/buttongroup.tsx @@ -1,12 +1,10 @@ -import { Button, ButtonGroup, Card, Content, Footer, H3, Header, Text } from "@hopper-ui/components"; +import { Button, ButtonGroup, Card, H3, Stack, Text } from "@hopper-ui/components"; export default function Example() { return ( -
-

NASA Headquarters

-
- +

NASA Headquarters

+ 300 E. Street SW, Suite 5R30
@@ -17,16 +15,12 @@ export default function Example() { (202) 358-4338 (Fax)
- - Any trespassers are going to be sent in space. - -
-
- - - - -
+ Any trespassers are going to be sent in space. + + + + +
); } diff --git a/packages/components/src/Card/docs/migration/default.tsx b/packages/components/src/Card/docs/migration/default.tsx index c688132ae..099e7a199 100644 --- a/packages/components/src/Card/docs/migration/default.tsx +++ b/packages/components/src/Card/docs/migration/default.tsx @@ -1,14 +1,10 @@ -import { Card, Content, H3, Header, Text } from "@hopper-ui/components"; +import { Card, H3, Text } from "@hopper-ui/components"; export default function Example() { return ( -
-

NASA Headquarters

-
- - NASA Headquarters, officially known as Mary W. Jackson NASA Headquarters or NASA HQ and formerly named Two Independence Square, is a low-rise office building in the two-building Independence Square complex at 300 E Street SW in Washington, D.C. - +

NASA Headquarters

+ NASA Headquarters, officially known as Mary W. Jackson NASA Headquarters or NASA HQ and formerly named Two Independence Square, is a low-rise office building in the two-building Independence Square complex at 300 E Street SW in Washington, D.C.
); } diff --git a/packages/components/src/Card/docs/migration/fluid.tsx b/packages/components/src/Card/docs/migration/fluid.tsx index f54e910d4..cdd4e58ee 100644 --- a/packages/components/src/Card/docs/migration/fluid.tsx +++ b/packages/components/src/Card/docs/migration/fluid.tsx @@ -1,34 +1,26 @@ -import { Card, Content, Flex, Footer, Grid, H3, Header, Img, Text } from "@hopper-ui/components"; +import { Card, Flex, H3, Image, Stack, Text } from "@hopper-ui/components"; import planet from "./assets/planet.png"; export default function Example() { return ( - - - - Planet - - -
-

NASA

-
- - - 300 E. Street SW, Suite 5R30 -
- Washington, DC 20546 -
- (202) 358-0001 (Office) -
- (202) 358-4338 (Fax) -
-
-
- Please note that we are moving from December 12th to December 23rd. -
-
-
+ + + Planet + + +

NASA

+ + 300 E. Street SW, Suite 5R30 +
+ Washington, DC 20546 +
+ (202) 358-0001 (Office) +
+ (202) 358-4338 (Fax) +
+ Please note that we are moving from December 12th to December 23rd. +
); } diff --git a/packages/components/src/Card/docs/migration/illustration.tsx b/packages/components/src/Card/docs/migration/illustration.tsx index c626f7b25..db9fa82fc 100644 --- a/packages/components/src/Card/docs/migration/illustration.tsx +++ b/packages/components/src/Card/docs/migration/illustration.tsx @@ -1,19 +1,17 @@ -import { Card, Content, Flex, H3, Header, Img, Text } from "@hopper-ui/components"; +import { Card, Flex, H3, Image, Stack, Text } from "@hopper-ui/components"; import planet from "./assets/planet.png"; export default function Example() { return ( - -
- - Planet - -

NASA Headquarters

-
- + + + Planet + + +

NASA Headquarters

NASA Headquarters, officially known as Mary W. Jackson NASA Headquarters or NASA HQ and formerly named Two Independence Square, is a low-rise office building in the two-building Independence Square complex at 300 E Street SW in Washington, D.C. -
+
); } diff --git a/packages/components/src/Card/docs/migration/image.tsx b/packages/components/src/Card/docs/migration/image.tsx index 82b4f1d4d..e059f0054 100644 --- a/packages/components/src/Card/docs/migration/image.tsx +++ b/packages/components/src/Card/docs/migration/image.tsx @@ -1,19 +1,15 @@ -import { Card, Content, Div, H3, Header, Img, Text } from "@hopper-ui/components"; +import { Card, H3, Image, Stack, Text } from "@hopper-ui/components"; import SpaceLandscape from "./assets/space-landscape.png"; export default function Example() { return ( - -
-
- Space landscape -
-

NASA Headquarters

-
- + + Space landscape + +

NASA Headquarters

NASA Headquarters, officially known as Mary W. Jackson NASA Headquarters or NASA HQ and formerly named Two Independence Square, is a low-rise office building in the two-building Independence Square complex at 300 E Street SW in Washington, D.C. -
+
); } diff --git a/packages/components/src/Card/docs/migration/orientation.tsx b/packages/components/src/Card/docs/migration/orientation.tsx index 1772e9e0e..9ad7be953 100644 --- a/packages/components/src/Card/docs/migration/orientation.tsx +++ b/packages/components/src/Card/docs/migration/orientation.tsx @@ -1,34 +1,26 @@ -import { Card, Content, Flex, Footer, Grid, H3, Header, Img, Text } from "@hopper-ui/components"; +import { Card, Flex, H3, Image, Stack, Text } from "@hopper-ui/components"; import planet from "./assets/planet.png"; export default function Example() { return ( - - - - Planet - - -
-

NASA

-
- - - 300 E. Street SW, Suite 5R30 -
- Washington, DC 20546 -
- (202) 358-0001 (Office) -
- (202) 358-4338 (Fax) -
-
-
- Please note that we are moving from December 12th to December 23rd. -
-
-
+ + + Planet + + +

NASA

+ + 300 E. Street SW, Suite 5R30 +
+ Washington, DC 20546 +
+ (202) 358-0001 (Office) +
+ (202) 358-4338 (Fax) +
+ Please note that we are moving from December 12th to December 23rd. +
); } diff --git a/packages/components/src/Card/docs/migration/size.tsx b/packages/components/src/Card/docs/migration/size.tsx index e8b9c4e38..83bc3016b 100644 --- a/packages/components/src/Card/docs/migration/size.tsx +++ b/packages/components/src/Card/docs/migration/size.tsx @@ -1,98 +1,68 @@ -import { Card, Content, Flex, H3, Header, Text } from "@hopper-ui/components"; +import { Card, H3, Inline, Text } from "@hopper-ui/components"; export default function Example() { return ( - <> - - -
-

XS Card

-
- - - 300 E. Street SW, Suite 5R30 -
- Washington, DC 20546 -
- (202) 358-0001 (Office) -
- (202) 358-4338 (Fax) -
-
-
- - -
-

SM Card

-
- - - 300 E. Street SW, Suite 5R30 -
- Washington, DC 20546 -
- (202) 358-0001 (Office) -
- (202) 358-4338 (Fax) -
-
-
-
- - -
-

MD Card

-
- - - 300 E. Street SW, Suite 5R30 -
- Washington, DC 20546 -
- (202) 358-0001 (Office) -
- (202) 358-4338 (Fax) -
-
-
-
- - -
-

LG Card

-
- - - 300 E. Street SW, Suite 5R30 -
- Washington, DC 20546 -
- (202) 358-0001 (Office) -
- (202) 358-4338 (Fax) -
-
-
-
- - -
-

XL Card

-
- - - 300 E. Street SW, Suite 5R30 -
- Washington, DC 20546 -
- (202) 358-0001 (Office) -
- (202) 358-4338 (Fax) -
-
-
-
-
- + + +

XS Card

+ + 300 E. Street SW, Suite 5R30 +
+ Washington, DC 20546 +
+ (202) 358-0001 (Office) +
+ (202) 358-4338 (Fax) +
+
+ +

SM Card

+ + 300 E. Street SW, Suite 5R30 +
+ Washington, DC 20546 +
+ (202) 358-0001 (Office) +
+ (202) 358-4338 (Fax) +
+
+ +

MD Card

+ + 300 E. Street SW, Suite 5R30 +
+ Washington, DC 20546 +
+ (202) 358-0001 (Office) +
+ (202) 358-4338 (Fax) +
+
+ +

LG Card

+ + 300 E. Street SW, Suite 5R30 +
+ Washington, DC 20546 +
+ (202) 358-0001 (Office) +
+ (202) 358-4338 (Fax) +
+
+ +

XL Card

+ + 300 E. Street SW, Suite 5R30 +
+ Washington, DC 20546 +
+ (202) 358-0001 (Office) +
+ (202) 358-4338 (Fax) +
+
+
); } diff --git a/packages/components/src/Card/docs/preview.tsx b/packages/components/src/Card/docs/preview.tsx index 4e2878309..4de2e7e65 100644 --- a/packages/components/src/Card/docs/preview.tsx +++ b/packages/components/src/Card/docs/preview.tsx @@ -1,11 +1,9 @@ -import { Card, Content, Text } from "@hopper-ui/components"; +import { Card } from "@hopper-ui/components"; export default function Example() { return ( - - Software built for everyone to do their best work - + Software built for everyone to do their best work ); } diff --git a/packages/components/src/Card/docs/sections.tsx b/packages/components/src/Card/docs/sections.tsx index 326a6e837..0e7df75f7 100644 --- a/packages/components/src/Card/docs/sections.tsx +++ b/packages/components/src/Card/docs/sections.tsx @@ -1,17 +1,13 @@ -import { Card, Content, Footer, H3, Header, Text } from "@hopper-ui/components"; +import { Card, H3, Text } from "@hopper-ui/components"; export default function Example() { return ( -
-

Developer

-
- - - A developer builds and maintains software, ensuring functionality, performance, and alignment with project goals. - - -
Start date : September 13th
+

Developer

+ + A developer builds and maintains software, ensuring functionality, performance, and alignment with project goals. + + Start date : September 13th
); } diff --git a/packages/components/src/Card/docs/variant.tsx b/packages/components/src/Card/docs/variant.tsx index 727776a7c..27e176868 100644 --- a/packages/components/src/Card/docs/variant.tsx +++ b/packages/components/src/Card/docs/variant.tsx @@ -1,29 +1,13 @@ -import { Card, Content, Flex, H2, H3, Header, Text } from "@hopper-ui/components"; +import { Card, H2, H3, Text } from "@hopper-ui/components"; export default function Example() { return ( - +

Roles

- - -
-

Manager

-
- - A manager leads team operations, aligns goals, and fosters a productive work environment to achieve results. - -
- - -
-

Designer

-
- - A designer crafts visual solutions, enhancing user experience and aligning designs with brand goals. - -
-
-
+ +

Manager

+ A manager leads team operations, aligns goals, and fosters a productive work environment to achieve results. +
); } diff --git a/packages/components/src/Card/src/Card.module.css b/packages/components/src/Card/src/Card.module.css index 97e9437c4..cc3577154 100644 --- a/packages/components/src/Card/src/Card.module.css +++ b/packages/components/src/Card/src/Card.module.css @@ -2,6 +2,10 @@ /* Default */ --hop-Card-border-radius: var(--hop-shape-rounded-md); --hop-Card-border-size: 0.0625rem; + --hop-Card-font-size: var(--hop-body-md-font-size); + --hop-Card-font-family: var(--hop-body-md-font-family); + --hop-Card-font-weight: var(--hop-body-md-font-weight); + --hop-Card-line-height: var(--hop-body-md-line-height); /* Main */ --hop-Card-main-border: var(--hop-Card-border-size) solid var(--hop-neutral-border-weak); @@ -14,9 +18,15 @@ display: flex; flex-direction: column; + font-family: var(--hop-Card-font-family); + font-size: var(--hop-Card-font-size); + font-weight: var(--hop-Card-font-weight); + line-height: var(--hop-Card-line-height); + background-color: var(--background-color); border: var(--border); border-radius: var(--hop-Card-border-radius); + } .hop-Card--main { diff --git a/packages/components/src/Card/src/Card.tsx b/packages/components/src/Card/src/Card.tsx index e7ba19892..bae439153 100644 --- a/packages/components/src/Card/src/Card.tsx +++ b/packages/components/src/Card/src/Card.tsx @@ -1,10 +1,9 @@ import { useStyledSystem, type StyledComponentProps } from "@hopper-ui/styled-system"; import clsx from "clsx"; import { forwardRef, type CSSProperties, type ForwardedRef } from "react"; -import { HeaderContext, useContextProps } from "react-aria-components"; +import { useContextProps } from "react-aria-components"; -import { ContentContext, FooterContext } from "../../layout/index.ts"; -import { cssModule, SlotProvider, type BaseComponentDOMProps } from "../../utils/index.ts"; +import { cssModule, type BaseComponentDOMProps } from "../../utils/index.ts"; import { CardContext } from "./CardContext.ts"; @@ -20,7 +19,7 @@ export interface CardProps extends StyledComponentProps { variant?: "main" | "second-level"; } -const Card = (props: CardProps, ref: ForwardedRef) => { +const Card = (props: CardProps, ref: ForwardedRef) => { [props, ref] = useContextProps(props, ref, CardContext); const { stylingProps, ...ownProps } = useStyledSystem(props); const { @@ -49,28 +48,15 @@ const Card = (props: CardProps, ref: ForwardedRef) => { }; return ( -
- - {children} - -
+ {children} + ); }; @@ -79,7 +65,7 @@ const Card = (props: CardProps, ref: ForwardedRef) => { * * [View Documentation](TODO) */ -const _Card = forwardRef(Card); +const _Card = forwardRef(Card); _Card.displayName = "Card"; export { _Card as Card }; diff --git a/packages/components/src/Card/src/CardContext.ts b/packages/components/src/Card/src/CardContext.ts index 3d157a8c6..3b64b3529 100644 --- a/packages/components/src/Card/src/CardContext.ts +++ b/packages/components/src/Card/src/CardContext.ts @@ -3,6 +3,6 @@ import type { ContextValue } from "react-aria-components"; import type { CardProps } from "./Card.tsx"; -export const CardContext = createContext>({}); +export const CardContext = createContext>({}); CardContext.displayName = "CardContext"; diff --git a/packages/components/src/Card/tests/chromatic/Card.stories.tsx b/packages/components/src/Card/tests/chromatic/Card.stories.tsx index 3979558c0..a5a0d6a5f 100644 --- a/packages/components/src/Card/tests/chromatic/Card.stories.tsx +++ b/packages/components/src/Card/tests/chromatic/Card.stories.tsx @@ -1,7 +1,5 @@ import type { Meta, StoryObj } from "@storybook/react"; -import { Header } from "../../../Header/index.ts"; -import { Content, Footer } from "../../../layout/index.ts"; import { Card } from "../../src/Card.tsx"; const meta = { @@ -16,15 +14,7 @@ type Story = StoryObj; export const Main = { render: props => ( -
- Header -
- - Content - -
- Footer -
+ Content
) } satisfies Story; @@ -32,15 +22,7 @@ export const Main = { export const SecondLevel = { render: props => ( -
- Header -
- - Content - -
- Footer -
+ Content
) } satisfies Story; @@ -48,17 +30,11 @@ export const SecondLevel = { export const EmbeddedCard = { render: props => ( -
- Header -
- - - Embedded - - -
- Footer -
+ Above + + Embedded + + Under
) } satisfies Story; diff --git a/packages/components/src/Card/tests/jest/Card.test.tsx b/packages/components/src/Card/tests/jest/Card.test.tsx index c3e420eed..7f1f28ad7 100644 --- a/packages/components/src/Card/tests/jest/Card.test.tsx +++ b/packages/components/src/Card/tests/jest/Card.test.tsx @@ -47,10 +47,10 @@ describe("Card", () => { }); it("should support refs", () => { - const ref = createRef(); + const ref = createRef(); render(12); expect(ref.current).not.toBeNull(); - expect(ref.current instanceof HTMLElement).toBeTruthy(); + expect(ref.current instanceof HTMLDivElement).toBeTruthy(); }); }); diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/avatar.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/avatar.tsx index 88bffe3a1..1ae84a166 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/avatar.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/avatar.tsx @@ -5,15 +5,15 @@ export default function Example() { - Fred Smith + Fred Smith - Karen Smith + Karen Smith - John Doe + John Doe ); diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/count.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/count.tsx index 5953fca3d..b2e7f372d 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/count.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/count.tsx @@ -4,11 +4,11 @@ export default function Example() { return ( - Designer + Designer 50 - Developer + Developer 99+ Manager diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/dynamicLists.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/dynamicLists.tsx index b7984e91f..629867b2e 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/dynamicLists.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/dynamicLists.tsx @@ -1,71 +1,40 @@ -import { Collection, ComboBox, ComboBoxItem, ComboBoxSection, Header, Inline } from "@hopper-ui/components"; +import { Collection, ComboBox, ComboBoxItem, ComboBoxSection, Header } from "@hopper-ui/components"; -interface ListItemProps { - id: number | string; - role: string; -} - -interface ListSectionProps { - role: string; - children: ListItemProps[]; -} +const OPTIONS_WITH_SECTIONS = [ + { + role: "Operations", children: [ + { id: 2, role: "Project Coordinator" }, + { id: 3, role: "QA Specialist" }, + { id: 4, role: "System Administrator" } + ] + }, + { + role: "Creative Department", children: [ + { id: 6, role: "Designer" }, + { id: 7, role: "Designer" }, + { id: 8, role: "UX Researcher" } + ] + } +]; export default function Example() { - const options = [ - { id: 2, role: "Designer" }, - { id: 3, role: "Developer" }, - { id: 4, role: "Manager" }, - { id: 6, role: "QA Engineer" }, - { id: 7, role: "Product Owner" }, - { id: 8, role: "Scrum Master" } - ] satisfies ListItemProps[]; - - const optionsWithSections = [ - { - role: "Operations", children: [ - { id: 2, role: "Project Coordinator" }, - { id: 3, role: "QA Specialist" }, - { id: 4, role: "System Administrator" } - ] - }, - { - role: "Creative Department", children: [ - { id: 6, role: "Designer" }, - { id: 7, role: "Designer" }, - { id: 8, role: "UX Researcher" } - ] - } - ] satisfies ListSectionProps[]; - return ( - - - {(item: ListItemProps) => { - const { id, role } = item; - - return {role}; - }} - - - {(section: ListSectionProps) => { - const { role: sectionName, children } = section; + + {section => { + const { role: sectionName, children } = section; - return ( - -
{sectionName}
- - {item => {item.role}} - -
- ); - }} -
-
+ return ( + +
{sectionName}
+ + {item => {item.role}} + +
+ ); + }} +
); } diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/endIcons.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/endIcons.tsx index a2d2345b8..a0aa9c508 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/endIcons.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/endIcons.tsx @@ -5,13 +5,13 @@ export default function Example() { return ( - Designer + Designer - Developer + Developer Manager diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/footer.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/footer.tsx index 6ebc46825..bb86b67fa 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/footer.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/footer.tsx @@ -5,7 +5,11 @@ export default function Example() { return ( Add} + footer={( + + )} > Developer Designer diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/icons.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/icons.tsx index 7242e558c..c53ad41e6 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/icons.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/icons.tsx @@ -5,13 +5,13 @@ export default function Example() { return ( - Developer + Developer - Designer + Designer Manager diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/loadOnScroll.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/loadOnScroll.tsx index 238f6460e..96509cb48 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/loadOnScroll.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/loadOnScroll.tsx @@ -1,12 +1,11 @@ -import { ComboBox, ComboBoxItem } from "@hopper-ui/components"; -import { useAsyncList } from "react-stately"; +import { ComboBox, ComboBoxItem, useAsyncList } from "@hopper-ui/components"; interface Character { name: string; } export default function Example() { - const list = useAsyncList({ + const list = useAsyncList({ async load({ signal, cursor }) { const res = await fetch(cursor || "https://pokeapi.co/api/v2/pokemon", { signal @@ -23,15 +22,13 @@ export default function Example() { return ( } + items={list.items} maxHeight="core_1280" isLoading={list.isLoading} onLoadMore={list.loadMore} > - {(item: Character) => { - const { name } = item; - - return {name}; + {item => { + return {item.name}; }} ); diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/menuPlacement.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/menuPlacement.tsx index 0ef4b2d3e..04b1a2136 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/menuPlacement.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/menuPlacement.tsx @@ -2,7 +2,8 @@ import { ComboBox, ComboBoxItem } from "@hopper-ui/components"; export default function Example() { return ( - diff --git a/packages/components/src/ComboBox/docs/ComboBoxOption/selectionIndicator.tsx b/packages/components/src/ComboBox/docs/ComboBoxOption/selectionIndicator.tsx index 5a5c28938..1268e3094 100644 --- a/packages/components/src/ComboBox/docs/ComboBoxOption/selectionIndicator.tsx +++ b/packages/components/src/ComboBox/docs/ComboBoxOption/selectionIndicator.tsx @@ -13,15 +13,15 @@ export default function Example() { selectionIndicator="input" > - Developer + Developer Builds and maintains software. - Designer + Designer Creates visual design solutions. - Manager + Manager Leads teams and projects. diff --git a/packages/components/src/ComboBox/docs/allowCustomValue.tsx b/packages/components/src/ComboBox/docs/allowCustomValue.tsx index 78562b830..6f9135116 100644 --- a/packages/components/src/ComboBox/docs/allowCustomValue.tsx +++ b/packages/components/src/ComboBox/docs/allowCustomValue.tsx @@ -3,12 +3,12 @@ import { ComboBox, ComboBoxItem, ComboBoxSection, Header } from "@hopper-ui/comp export default function Example() { return ( - +
Creative Department
Designer Content creator
- Manager + Manager
); } diff --git a/packages/components/src/ComboBox/docs/controlled.tsx b/packages/components/src/ComboBox/docs/controlled.tsx index 032be4c3a..afb63e596 100644 --- a/packages/components/src/ComboBox/docs/controlled.tsx +++ b/packages/components/src/ComboBox/docs/controlled.tsx @@ -4,22 +4,22 @@ import { useState } from "react"; export default function Example() { const [selectedKey, setSelectedKey] = useState(); - function handleSelectionChange(key: Key | null) { + const handleSelectionChange = (key: Key | null) => { if (selectedKey === key) { setSelectedKey(null); } else { setSelectedKey(key); } - } + }; return ( - +
Operations
Project Coordinator QA Specialist
- Manager + Manager
); } diff --git a/packages/components/src/ComboBox/docs/customFiltering.tsx b/packages/components/src/ComboBox/docs/customFiltering.tsx index 5faf4d10f..0e66913d5 100644 --- a/packages/components/src/ComboBox/docs/customFiltering.tsx +++ b/packages/components/src/ComboBox/docs/customFiltering.tsx @@ -1,32 +1,26 @@ -import { ComboBox, ComboBoxItem } from "@hopper-ui/components"; +import { ComboBox, ComboBoxItem, useFilter } from "@hopper-ui/components"; import { useMemo, useState } from "react"; -import { useFilter } from "react-aria"; -interface Role { - id: number; - name: string; -} +const ROLE_OPTIONS = [ + { id: 1, name: "Designer" }, + { id: 2, name: "Developer" }, + { id: 3, name: "Manager" }, + { id: 4, name: "QA Engineer" }, + { id: 5, name: "Product Owner" }, + { id: 6, name: "Scrum Master" }, + { id: 7, name: "UX Researcher" }, + { id: 8, name: "Business Analyst" }, + { id: 9, name: "DevOps Engineer" }, + { id: 10, name: "Data Scientist" } +]; export default function Example() { - const options = useMemo(() => [ - { id: 1, name: "Designer" }, - { id: 2, name: "Developer" }, - { id: 3, name: "Manager" }, - { id: 4, name: "QA Engineer" }, - { id: 5, name: "Product Owner" }, - { id: 6, name: "Scrum Master" }, - { id: 7, name: "UX Researcher" }, - { id: 8, name: "Business Analyst" }, - { id: 9, name: "DevOps Engineer" }, - { id: 10, name: "Data Scientist" } - ] satisfies Role[], []); - const { startsWith } = useFilter({ sensitivity: "base" }); const [filterValue, setFilterValue] = useState(""); - const filteredItems = useMemo( - () => options.filter(item => startsWith(item.name, filterValue)), - [options, startsWith, filterValue] - ); + + const filteredItems = useMemo(() => { + return ROLE_OPTIONS.filter(item => startsWith(item.name, filterValue)); + }, [startsWith, filterValue]); return ( - {(item: Role) => {item.name}} + {item => {item.name}} ); } diff --git a/packages/components/src/ComboBox/src/ComboBox.tsx b/packages/components/src/ComboBox/src/ComboBox.tsx index 843a20892..bc6ab797d 100644 --- a/packages/components/src/ComboBox/src/ComboBox.tsx +++ b/packages/components/src/ComboBox/src/ComboBox.tsx @@ -1,7 +1,7 @@ import { IconContext } from "@hopper-ui/icons"; import { useResponsiveValue, useStyledSystem, type ResponsiveProp, type StyledComponentProps } from "@hopper-ui/styled-system"; import { mergeRefs, useObjectRef, useResizeObserver } from "@react-aria/utils"; -import { forwardRef, useCallback, useRef, useState, type Context, type ForwardedRef, type MouseEventHandler, type MutableRefObject, type NamedExoticComponent, type ReactNode } from "react"; +import { forwardRef, useCallback, useRef, useState, type ForwardedRef, type MouseEventHandler, type MutableRefObject, type NamedExoticComponent, type ReactNode } from "react"; import { Button, composeRenderProps, @@ -13,7 +13,6 @@ import { TextContext as RACTextContext, useContextProps, useSlottedContext, - type ContextValue, type ComboBoxProps as RACComboBoxProps, type GroupProps as RACGroupProps } from "react-aria-components"; @@ -148,7 +147,7 @@ function ComboBox(props: ComboBoxProps, ref: ForwardedRef(props: ComboBoxProps, ref: ForwardedRef> + RACButtonContext ]} > (props: ComboBoxProps, ref: ForwardedRef {ensureTextWrapper(footer)} - + ) : null; @@ -309,7 +308,7 @@ function ComboBox(props: ComboBoxProps, ref: ForwardedRef )} - (props: ComboBoxProps, ref: ForwardedRef diff --git a/packages/components/src/Disclosure/docs/controlled.tsx b/packages/components/src/Disclosure/docs/controlled.tsx index a096dd58d..7abe37cda 100644 --- a/packages/components/src/Disclosure/docs/controlled.tsx +++ b/packages/components/src/Disclosure/docs/controlled.tsx @@ -1,23 +1,22 @@ -import { Disclosure, DisclosureHeader, DisclosurePanel, Div } from "@hopper-ui/components"; +import { Disclosure, DisclosureHeader, DisclosurePanel } from "@hopper-ui/components"; import { useState } from "react"; export default function Example() { const [isExpanded, setIsExpanded] = useState(true); return ( -
- - - This disclosure is {isExpanded ? "expanded" : "collapsed"} - - - Tackle the challenges of hybrid, remote and distributed work, no matter what. - The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. - - -
+ + + This disclosure is {isExpanded ? "expanded" : "collapsed"} + + + Tackle the challenges of hybrid, remote and distributed work, no matter what. + The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. + + ); -} \ No newline at end of file +} diff --git a/packages/components/src/Disclosure/docs/customHeader.tsx b/packages/components/src/Disclosure/docs/customHeader.tsx index bb6518db7..493ceacdb 100644 --- a/packages/components/src/Disclosure/docs/customHeader.tsx +++ b/packages/components/src/Disclosure/docs/customHeader.tsx @@ -1,22 +1,18 @@ -import { Button, Disclosure, DisclosurePanel, Div, Text } from "@hopper-ui/components"; +import { Button, Disclosure, DisclosurePanel, Text } from "@hopper-ui/components"; import { ToggleArrow } from "../../ToggleArrow/index.ts"; export default function Example() { return ( -
- - - - Tackle the challenges of hybrid, remote and distributed work, no matter what. - The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. - - -
+ + + + Tackle the challenges of hybrid, remote and distributed work, no matter what. + The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. + + ); -} \ No newline at end of file +} diff --git a/packages/components/src/Disclosure/docs/description.tsx b/packages/components/src/Disclosure/docs/description.tsx index 4ae399822..fc1dcca80 100644 --- a/packages/components/src/Disclosure/docs/description.tsx +++ b/packages/components/src/Disclosure/docs/description.tsx @@ -1,20 +1,18 @@ -import { Disclosure, DisclosureHeader, DisclosurePanel, Div, Inline, Text } from "@hopper-ui/components"; +import { Disclosure, DisclosureHeader, DisclosurePanel, Inline, Text } from "@hopper-ui/components"; export default function Example() { return ( -
- - - - Workleap Officevibe - Engagement and Feedback - - - - Help employees speak up and make sure they feel heard. - Continuous and real-time surveys offer feedback to celebrate every win, recognize commitment, and uncover challenges. - - -
+ + + + Workleap Officevibe + Engagement and Feedback + + + + Help employees speak up and make sure they feel heard. + Continuous and real-time surveys offer feedback to celebrate every win, recognize commitment, and uncover challenges. + + ); -} \ No newline at end of file +} diff --git a/packages/components/src/Disclosure/docs/disabled.tsx b/packages/components/src/Disclosure/docs/disabled.tsx index 0e2827907..697df8595 100644 --- a/packages/components/src/Disclosure/docs/disabled.tsx +++ b/packages/components/src/Disclosure/docs/disabled.tsx @@ -1,22 +1,20 @@ -import { Disclosure, DisclosureHeader, DisclosurePanel, Div, Inline, Text } from "@hopper-ui/components"; +import { Disclosure, DisclosureHeader, DisclosurePanel, Inline, Text } from "@hopper-ui/components"; import { SparklesIcon } from "@hopper-ui/icons"; export default function Example() { return ( -
- - - - - Workleap Officevibe - Engagement and Feedback - - - - Help employees speak up and make sure they feel heard. - Continuous and real-time surveys offer feedback to celebrate every win, recognize commitment, and uncover challenges. - - -
+ + + + + Workleap Officevibe + Engagement and Feedback + + + + Help employees speak up and make sure they feel heard. + Continuous and real-time surveys offer feedback to celebrate every win, recognize commitment, and uncover challenges. + + ); -} \ No newline at end of file +} diff --git a/packages/components/src/Disclosure/docs/icon.tsx b/packages/components/src/Disclosure/docs/icon.tsx index 5c50a1770..3f9be485e 100644 --- a/packages/components/src/Disclosure/docs/icon.tsx +++ b/packages/components/src/Disclosure/docs/icon.tsx @@ -1,19 +1,17 @@ -import { Disclosure, DisclosureHeader, DisclosurePanel, Div, Text } from "@hopper-ui/components"; +import { Disclosure, DisclosureHeader, DisclosurePanel, Text } from "@hopper-ui/components"; import { SparklesIcon } from "@hopper-ui/icons"; export default function Example() { return ( -
- - - - Help your people work better - - - Tackle the challenges of hybrid, remote and distributed work, no matter what. - The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. - - -
+ + + + Help your people work better + + + Tackle the challenges of hybrid, remote and distributed work, no matter what. + The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. + + ); -} \ No newline at end of file +} diff --git a/packages/components/src/Disclosure/docs/preview.tsx b/packages/components/src/Disclosure/docs/preview.tsx index 5711f791b..8ef311fc9 100644 --- a/packages/components/src/Disclosure/docs/preview.tsx +++ b/packages/components/src/Disclosure/docs/preview.tsx @@ -1,17 +1,15 @@ -import { Disclosure, DisclosureHeader, DisclosurePanel, Div } from "@hopper-ui/components"; +import { Disclosure, DisclosureHeader, DisclosurePanel } from "@hopper-ui/components"; export default function Example() { return ( -
- - - Help your people work better - - - Tackle the challenges of hybrid, remote and distributed work, no matter what. - The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. - - -
+ + + Help your people work better + + + Tackle the challenges of hybrid, remote and distributed work, no matter what. + The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. + + ); -} \ No newline at end of file +} diff --git a/packages/components/src/Disclosure/docs/variants.tsx b/packages/components/src/Disclosure/docs/variants.tsx index 0bdde29c6..973bc2dda 100644 --- a/packages/components/src/Disclosure/docs/variants.tsx +++ b/packages/components/src/Disclosure/docs/variants.tsx @@ -2,13 +2,13 @@ import { Disclosure, DisclosureHeader, DisclosurePanel, Stack } from "@hopper-ui export default function Example() { return ( - + Help your people work better - Tackle the challenges of hybrid, remote and distributed work, no matter what. + Tackle the challenges of hybrid, remote and distributed work, no matter what. The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. @@ -17,10 +17,10 @@ export default function Example() { Help your people work better - Tackle the challenges of hybrid, remote and distributed work, no matter what. + Tackle the challenges of hybrid, remote and distributed work, no matter what. The Workleap platform builds solutions tailored to your existing HR and productivity tools to answer these challenges. ); -} \ No newline at end of file +} diff --git a/packages/components/src/Form/docs/ariaValidation.tsx b/packages/components/src/Form/docs/ariaValidation.tsx index 0e7ced461..f3d3bb31d 100644 --- a/packages/components/src/Form/docs/ariaValidation.tsx +++ b/packages/components/src/Form/docs/ariaValidation.tsx @@ -1,18 +1,16 @@ -import { Button, Div, Form, TextField } from "@hopper-ui/components"; +import { Button, Form, TextField } from "@hopper-ui/components"; export default function Example() { return ( -
-
- value === "admin" ? "Nice try." : null} - label="Username" - /> - - -
+
+ value === "admin" ? "Nice try." : null} + label="Username" + /> + + ); } diff --git a/packages/components/src/Form/docs/disabled.tsx b/packages/components/src/Form/docs/disabled.tsx index d07e0c05e..5e5f52a0c 100644 --- a/packages/components/src/Form/docs/disabled.tsx +++ b/packages/components/src/Form/docs/disabled.tsx @@ -1,12 +1,10 @@ -import { Button, Div, Form, TextField } from "@hopper-ui/components"; +import { Button, Form, TextField } from "@hopper-ui/components"; export default function Example() { return ( -
-
- - - -
+
+ + + ); } diff --git a/packages/components/src/Form/docs/fluid.tsx b/packages/components/src/Form/docs/fluid.tsx index b141b800b..378f49005 100644 --- a/packages/components/src/Form/docs/fluid.tsx +++ b/packages/components/src/Form/docs/fluid.tsx @@ -1,12 +1,10 @@ -import { Button, Div, Form, TextField } from "@hopper-ui/components"; +import { Button, Form, TextField } from "@hopper-ui/components"; export default function Example() { return ( -
-
- - - -
+
+ + + ); } diff --git a/packages/components/src/Form/docs/nativeValidation.tsx b/packages/components/src/Form/docs/nativeValidation.tsx index 8883963c2..ed6a8f85e 100644 --- a/packages/components/src/Form/docs/nativeValidation.tsx +++ b/packages/components/src/Form/docs/nativeValidation.tsx @@ -1,20 +1,18 @@ -import { Button, ButtonGroup, Div, Form, TextField } from "@hopper-ui/components"; +import { Button, ButtonGroup, Form, TextField } from "@hopper-ui/components"; export default function Example() { return ( -
-
- - - - - - -
+
+ + + + + + ); } diff --git a/packages/components/src/Form/docs/preview.tsx b/packages/components/src/Form/docs/preview.tsx index 2a0d40e8d..b76a74b5a 100644 --- a/packages/components/src/Form/docs/preview.tsx +++ b/packages/components/src/Form/docs/preview.tsx @@ -1,12 +1,10 @@ -import { Button, Div, Form, TextField } from "@hopper-ui/components"; +import { Button, Form, TextField } from "@hopper-ui/components"; export default function Example() { return ( -
-
- - - -
+
+ + + ); } diff --git a/packages/components/src/Form/docs/validation.tsx b/packages/components/src/Form/docs/validation.tsx index 15455ebb4..053473b6a 100644 --- a/packages/components/src/Form/docs/validation.tsx +++ b/packages/components/src/Form/docs/validation.tsx @@ -1,11 +1,9 @@ -import { Div, Form, TextField } from "@hopper-ui/components"; +import { Form, TextField } from "@hopper-ui/components"; export default function Example() { return ( -
-
- - -
+
+ + ); } diff --git a/packages/components/src/Form/tests/chromatic/Form.stories.tsx b/packages/components/src/Form/tests/chromatic/Form.stories.tsx index 5b0f4c9be..25e063191 100644 --- a/packages/components/src/Form/tests/chromatic/Form.stories.tsx +++ b/packages/components/src/Form/tests/chromatic/Form.stories.tsx @@ -22,60 +22,56 @@ import { Form } from "../../src/Form.tsx"; const meta = { title: "Components/Forms/Form", - component: Form, - render: args =>
+ component: Form } satisfies Meta; export default meta; type Story = StoryObj; -const Template = () => { - return ( - <> - - - - - Man - Women - Non-Binary - - - - - - - - - - - -