(components) Release: 4.0.0#467
Conversation
… object, due to NextJS turbopack issue with :export
…ttings per latest WTC default grid
🦋 Changeset detectedLatest commit: 9421a98 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…r/wrapper.module.scss Co-authored-by: Clinton <80900245+pravton@users.noreply.github.com> Signed-off-by: Andrew Rubin <30575213+andrewrubin@users.noreply.github.com>
…cific flexDirection prop, fix JSDoc
… Wrapper in favor of Row `noFlex` prop; update grid-calc utility helper to be more descriptive of what it's for
…king; ensure static directory serves images correctly in prod
There was a problem hiding this comment.
These were technically wrong syntax for the scss imports, so I've updated 'em. Also added @use instead of @import since SASS is deprecating that.
There was a problem hiding this comment.
No more padding for gutters, so no need for this!
There was a problem hiding this comment.
Github-flavored Markdown specifically needed to be an option under storybook/addon-docs in order to work 🤷♂️
| "use client" | ||
|
|
||
| import { useCallback, useRef } from "react" | ||
| import { JSX, useCallback, useRef } from "react" |
There was a problem hiding this comment.
Do we need this JSX import?
There was a problem hiding this comment.
I just did some digging and seems like the JSX name space was moved to React which caused these type errors, I have updated the type usage and removed these imports.
| @@ -1,7 +1,10 @@ | |||
| import { JSX } from "react" | |||
| import { Tag } from "@local/components/tag" | ||
| import type { TagProps } from "@local/components/tag" | ||
| import { buildBreakpointClassnames, classnames } from "@local/utilities" | ||
| import { JSX } from "react" |
| @@ -1,8 +1,8 @@ | |||
| import type { ElementType } from "react" | |||
| import type { ElementType, JSX } from "react" | |||
| @@ -1,5 +1,5 @@ | |||
| import { forwardRef } from "react" | |||
| import type { Ref, ReactNode, RefAttributes } from "react" | |||
| import type { Ref, ReactNode, RefAttributes, JSX } from "react" | |||
Co-authored-by: Marlon U. Marcello <marlon.marcello@gmail.com> Signed-off-by: Clinton <80900245+pravton@users.noreply.github.com>
…/in-view-item/in-view-item.tsx Co-authored-by: Marlon U. Marcello <marlon.marcello@gmail.com> Signed-off-by: Clinton <80900245+pravton@users.noreply.github.com>
Description
This PR bumps the
wethegit-componentspackage to version 4.0.0. It includes the following fixes and updates:index.ts) from each component. Barrel files are known to cause circular reference issues, so we've opted to remove them in favor of explicit imports.useBreakpoints, due to Next JS and Turbopack no longer supporting the:exportfeature. Instead, this value is hard-coded in theuse-breakpoints.tsfile now.grid-layoutsystem:Wrappercomponent in favor of the newvariantprop on theRowcomponent.Columncomponents, in favor of flexbox'sgapproperty. Way less of a learning curve here now for newcomers.flexDirectionprop to theFlex(and therefore theRow) component, to allow users to specify per-breakpoint flex directions.reverseprop, so that's now gone.grid-calc(n)SCSS utility to beget-column-width(n). This is more indicative of what it's used for.grid-layoutsystem to use the latest standards created by We the Collective's Design Team. This introduces a--grid-margin-widthCSS custom property, and updates theRowcomponent's width and margin calculations to take the new value into account.margin: 0to thebodyelement in the CSS resets stylesheet.denopackage manager.New grid system usage
The usual workflow, nothing new:
Replacement for old
<Wrapper>component:Replace old
stackMediumprop with this:The new
flexDirectionprop will allow you to be more specific about your flex layouts at specific breakpoints. The snippet below is visually equivalent to the oldstackMediumprop, just more expressive and powerful.Screenshots
Grid Layout basic usage
This screencap uses the new values per the WTC desgin team. It also shows the
gap-based gutters, rather than the oldpadding-inlineones.1.mp4
Custom values for flex direction
This example uses the following for its flexDirection prop, just to show what's possible. it's essentially "stacking" on medium and XXL+.
{ sm: "column", md: "column", lg: "row", xxl: "column" }2.mp4