Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
samithaf committed Dec 20, 2023
2 parents 5d66f65 + 2d35004 commit 12b7182
Show file tree
Hide file tree
Showing 21 changed files with 56 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/ui/src/components/accordion/accordion.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ type Variants = VariantProps<typeof styles>;
export type AccordionProps<T = any> = SpectrumAccordionProps<T> & {
/**
* Stretch the tab to fill the whole content
* @default false
*/
justify?: boolean;
/**
* The look of the accordion
* @default soft
*/
look?: AccordionItemProps['look'];
/**
* Whether the accordion is rounded
* @default true
*/
rounded?: Variants['rounded'];
} & Omit<HTMLAttributes<HTMLDivElement>, 'color'>;
11 changes: 10 additions & 1 deletion packages/ui/src/components/alert/alert.types.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { HTMLAttributes } from 'react';
import React, { HTMLAttributes } from 'react';

export type Look = 'info' | 'success' | 'warning' | 'danger' | 'system';

export type AlertProps = {
/**
* The alert content
*/
children?: React.ReactNode;
/**
* Enable dismissible mode
* @default false
*/
dismissible?: boolean;
/**
Expand All @@ -13,6 +18,7 @@ export type AlertProps = {
heading?: string;
/**
* The alert heading tag is automatically defined, but may be overridden via this prop if required for semantic reasons.
* @default h2
*/
headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
/**
Expand All @@ -23,10 +29,12 @@ export type AlertProps = {
icon?: React.ElementType;
/**
* Alert look style
* @default info
*/
look?: Look;
/**
* Alert mode
* @default box
*/
mode?: 'box' | 'text';
/**
Expand All @@ -39,6 +47,7 @@ export type AlertProps = {
open?: boolean;
/**
* Tag to render
* @default div
*/
tag?: keyof JSX.IntrinsicElements;
} & HTMLAttributes<Element>;
3 changes: 3 additions & 0 deletions packages/ui/src/components/badge/badge.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ type Variants = VariantProps<typeof styles>;
export type BadgeProps = {
/**
* Color of badge
* @default hero
*/
color?: Variants['color'];
/**
* Tag to render
* @default div
*/
tag?: keyof JSX.IntrinsicElements;
/**
* Type of badge
* @default default
*/
type?: Variants['type'];
} & Omit<HTMLAttributes<Element>, 'color' | 'type'>;
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ import { AnchorHTMLAttributes } from 'react';
export type BreadcrumbItemProps = {
/**
* isCurrent flag
* @default false
*/
isCurrent?: boolean;
/**
* isDisabled flag
* @default false
*/
isDisabled?: boolean;
/**
* Tag to render
* @default span
*/
tag?: keyof JSX.IntrinsicElements;
} & AnchorHTMLAttributes<Element>;
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Variants = VariantProps<typeof styles>;

export type ButtonDropdownProps = {
/**
* Size of the the dropdown panel
* Size of the dropdown panel
*/
dropdownSize?: Variants['dropdownSize'];
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ export function Heading({ className, tag: Tag = 'h1', children, ...props }: Head
</Tag>
);
}
Heading.displayName = 'ButtonDropdown.Heading';
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { HTMLAttributes } from 'react';
export type HeadingProps = {
/**
* The tag of the heading element for semantic reasons
* @default h1
*/
tag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
} & HTMLAttributes<Element>;
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ export function Button({ className, children, ...props }: ButtonProps) {
</label>
);
}

Button.displayName = 'ButtonGroup.Button';
7 changes: 6 additions & 1 deletion packages/ui/src/components/button/button.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ type Variants = VariantProps<typeof styles>;
export type ButtonProps = {
/**
* Fit button width to its parent width.
* @default false
*/
block?: Variants['block'];
/**
Expand All @@ -27,15 +28,18 @@ export type ButtonProps = {
*/
iconColor?: IconProps['color'];
/**
* Justify align button children
* Justify align button children. When true, content will justify-between
* @default false
*/
justify?: Variants['justify'];
/**
* Button look
* @default hero
*/
look?: Variants['look'];
/**
* Size of the button
* @default medium
*/
size?: Variants['size'];
/**
Expand All @@ -44,6 +48,7 @@ export type ButtonProps = {
soft?: Variants['soft'];
/**
* Tag to render
* @default button
*/
tag?: keyof Pick<JSX.IntrinsicElements, 'a' | 'span' | 'button' | 'div'>;
} & ButtonHTMLAttributes<Element> &
Expand Down
1 change: 1 addition & 0 deletions packages/ui/src/components/compacta/compacta.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export type CompactaProps = {
children: (...props: ContentProps[]) => ReactNode;
/**
* Tag for primary title
* @default h3
*/
titleTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
} & Omit<HTMLAttributes<Element>, 'children'>;
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/src/components/flexi-cell/flexi-cell.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type BaseFlexiCellProps = {
* Wraps body with an 'a' tag for dual action styled component
* - Requires href to be provided
* - Tag prop should not be used when using this prop
* @default false
*/
dualAction?: boolean;
/**
Expand All @@ -32,10 +33,12 @@ type BaseFlexiCellProps = {
href?: string;
/**
* Large adds more padding/spacing to the Flex Cell
* @default default
*/
size?: Variants['size'];
/**
* The native tag that flexicell will be rendered
* @default div
*/
tag?: keyof JSX.IntrinsicElements;
/**
Expand All @@ -48,6 +51,7 @@ type BaseFlexiCellProps = {
withArrow?: boolean;
/**
* Adds a border radius and a border
* @default false
*/
withBorder?: boolean;
} & HTMLAttributes<HTMLOrSVGElement>;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/heading/heading.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ export type HeadingProps = {
* Whether heading should be uppercase
*/
uppercase?: boolean;
} & HTMLAttributes<Element>;
} & HTMLAttributes<HTMLDivElement>;
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export type InputFieldProps = {
supportingText?: ReactNode;
/**
* Tag to render
* @default div
*/
// TODO: maybe we could limit the tags to be only fieldset or div?
tag?: keyof JSX.IntrinsicElements;
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/input/input.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ type Variants = VariantProps<typeof styles>;
export type InputProps = {
/**
* Whether the input is invalid
* @default false
*/
invalid?: boolean;
/**
* Size of input
* @default medium
*/
size?: Variants['size'];
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>;
3 changes: 3 additions & 0 deletions packages/ui/src/components/link/link.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ export type LinkProps = {
iconBefore?: (props: IconProps) => JSX.Element;
/**
* set size of icon
* @default small
*/
iconSize?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge';
/**
* Link type
* @default standalone
*/
type?: 'inline' | 'standalone';
/**
* Visually style the (inline) link with an underline
* @default true
*/
underline?: boolean;
} & Omit<AriaLinkOptions, 'isDisabled' | 'elementType'> &
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/src/components/pagination/pagination.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export type PaginationHookProps = {
export type PaginationProps = {
/**
* Back label
* @default Back
*/
backLabel?: ReactNode;
/**
Expand All @@ -46,6 +47,7 @@ export type PaginationProps = {
current?: number;
/**
* Carousel feature
* @default false
*/
infinite?: boolean;
/**
Expand All @@ -54,10 +56,12 @@ export type PaginationProps = {
linkComponent?: PaginationItemProps['tag'];
/**
* Next label
* @default Next
*/
nextLabel?: ReactNode;
/**
* Tag to render
* @default nav
*/
tag?: keyof JSX.IntrinsicElements;
} & (PaginationAsLinkProps | PaginationAsButtonProps) &
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/components/panel/panel.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ export type PanelProps = {
heading: string;
/**
* Tag for heading defaults to h1
* @default h1
*/
headingTag?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
/**
* The styling of the panel
* @default hero
*/
look?: 'faint' | 'hero';
} & HTMLAttributes<Element>;
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ export function Panel({ state, heading, headingTag: Tag = 'h1', content, placeme
</FocusScope>
);
}
Panel.displayName = 'Popover.Panel';
2 changes: 2 additions & 0 deletions packages/ui/src/components/popover/popover.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export type PopoverProps = {
heading?: string;
/**
* Tag to render
* @default h1
*/
headingTag?: keyof Pick<JSX.IntrinsicElements, 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'>;
/**
Expand All @@ -34,6 +35,7 @@ export type PopoverProps = {
open?: boolean;
/**
* Placement of popover. If no placement provided it will default to top unless there is no space then will appear on bottom.
* @default top
*/
placement?: 'top' | 'bottom';
} & HTMLAttributes<Element> &
Expand Down
3 changes: 3 additions & 0 deletions packages/ui/src/components/progress-bar/progress-bar.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ export type ProgressBarProps = {
className?: string;
/**
* look of bar
* @default default
*/
look?: 'default' | 'skinny';
/**
* Whether or not label shows on default bar
* @default false
*/
noLabel?: boolean;
/**
* The progress bar value as a percentage. Decimal numbers are rounded.
* @default 0
*/
value?: number;
} & Pick<AriaProgressBarProps, 'aria-label' | 'aria-describedby' | 'aria-details' | 'aria-labelledby' | 'id'>;
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type ProgressRopeStepWithIndex =
export type ProgressRopeProps = {
/**
* Current active step (zero-indexed)
* @default 0
*/
current?: number;
/**
Expand All @@ -32,6 +33,7 @@ export type ProgressRopeProps = {
)[];
/**
* Tag to render
* @default nav
*/
tag?: keyof JSX.IntrinsicElements;
} & HTMLAttributes<Element>;

1 comment on commit 12b7182

@vercel
Copy link

@vercel vercel bot commented on 12b7182 Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

gel-next-site – ./apps/site

gel-next-site-git-main-westpacgel.vercel.app
gel-next-site.vercel.app
gel-next-site-westpacgel.vercel.app

Please sign in to comment.