Skip to content

Commit

Permalink
fix: add aria-label props & chenge button hover
Browse files Browse the repository at this point in the history
  • Loading branch information
muhamien committed May 2, 2024
1 parent 539db97 commit ce52170
Show file tree
Hide file tree
Showing 107 changed files with 752 additions and 95 deletions.
17 changes: 17 additions & 0 deletions packages/components/accordion/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @jala-banyu/accordion

## 3.0.2

### Patch Changes

- Updated dependencies []:
- @jala-banyu/theme@1.6.2

## 3.0.1

### Patch Changes

- add aria-label props & change button hover

- Updated dependencies []:
- @jala-banyu/divider@4.1.1
- @jala-banyu/theme@1.6.1

## 3.0.0

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/accordion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jala-banyu/accordion",
"version": "3.0.0",
"version": "3.0.2",
"description": "Collapse display a list of high-level options that can expand/collapse to reveal more information.",
"keywords": [
"react",
Expand Down Expand Up @@ -43,7 +43,7 @@
"react": ">=18",
"react-dom": ">=18",
"framer-motion": ">=4.0.0",
"@jala-banyu/theme": "1.6.0",
"@jala-banyu/theme": "1.6.2",
"@jala-banyu/system": ">=1.0.0"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/components/accordion/src/use-accordion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ interface Props extends HTMLBanyuProps<"div"> {
* The accordion items classNames.
*/
itemClasses?: AccordionItemProps["classNames"];
/** An accessibility label for this item. */
"aria-label"?: string;
}

export type UseAccordionProps<T extends object = {}> = Props &
Expand Down
10 changes: 10 additions & 0 deletions packages/components/alert/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @jala-banyu/alert

## 1.1.6

### Patch Changes

- add aria-label props & change button hover

- Updated dependencies []:
- @jala-banyu/avatar@6.0.1
- @jala-banyu/button@6.0.1

## 1.1.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/components/alert/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jala-banyu/alert",
"version": "1.1.5",
"version": "1.1.6",
"description": "Alert is a notification that typically appears as a small popup with text, an image, or a button.",
"keywords": [
"alert"
Expand Down
2 changes: 2 additions & 0 deletions packages/components/alert/src/use-alert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ interface Props extends HTMLBanyuProps<"div"> {
* The content of the alert.
*/
children?: string | React.ReactNode;
/** An accessibility label for this item. */
"aria-label"?: string;
}

export type UseAlertProps = Props &
Expand Down
16 changes: 16 additions & 0 deletions packages/components/avatar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @jala-banyu/avatar

## 6.0.2

### Patch Changes

- Updated dependencies []:
- @jala-banyu/theme@1.6.2

## 6.0.1

### Patch Changes

- add aria-label props & change button hover

- Updated dependencies []:
- @jala-banyu/theme@1.6.1

## 6.0.0

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/avatar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jala-banyu/avatar",
"version": "6.0.0",
"version": "6.0.2",
"description": "The Avatar component is used to represent a user, and displays the profile picture, initials or fallback icon.",
"keywords": [
"avatar"
Expand Down Expand Up @@ -36,7 +36,7 @@
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18",
"@jala-banyu/theme": "1.6.0",
"@jala-banyu/theme": "1.6.2",
"@jala-banyu/system": "1.1.0"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/components/avatar/src/use-avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ interface Props extends HTMLBanyuProps<"span"> {
* ```
*/
classNames?: SlotsToClasses<AvatarSlots>;
/** An accessibility label for this item. */
"aria-label"?: string;
}

export type UseAvatarProps = Props &
Expand Down
16 changes: 16 additions & 0 deletions packages/components/breadcrumbs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @jala-banyu/breadcrumbs

## 6.0.2

### Patch Changes

- Updated dependencies []:
- @jala-banyu/theme@1.6.2

## 6.0.1

### Patch Changes

- add aria-label props & change button hover

- Updated dependencies []:
- @jala-banyu/theme@1.6.1

## 6.0.0

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/breadcrumbs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jala-banyu/breadcrumbs",
"version": "6.0.0",
"version": "6.0.2",
"description": "Breadcrumbs display a hierarchy of links to the current page or resource in an application.",
"keywords": [
"breadcrumbs"
Expand Down Expand Up @@ -36,7 +36,7 @@
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18",
"@jala-banyu/theme": "1.6.0",
"@jala-banyu/theme": "1.6.2",
"@jala-banyu/system": "1.1.0"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/components/breadcrumbs/src/use-breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ interface Props extends HTMLBanyuProps<"nav">, AriaBreadcrumbsProps {
* @param key string
*/
onAction?: (key: Key) => void;
/** An accessibility label for this item. */
"aria-label"?: string;
}

export type UseBreadcrumbsProps = Props &
Expand Down
20 changes: 20 additions & 0 deletions packages/components/button/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# @jala-banyu/button

## 6.0.2

### Patch Changes

- Updated dependencies []:
- @jala-banyu/theme@1.6.2
- @jala-banyu/ripple@6.0.2
- @jala-banyu/spinner@6.0.2

## 6.0.1

### Patch Changes

- add aria-label props & change button hover

- Updated dependencies []:
- @jala-banyu/spinner@6.0.1
- @jala-banyu/theme@1.6.1
- @jala-banyu/ripple@6.0.1

## 6.0.0

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/button/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jala-banyu/button",
"version": "6.0.0",
"version": "6.0.2",
"description": "Buttons allow users to perform actions and choose with a single tap.",
"keywords": [
"button",
Expand Down Expand Up @@ -39,7 +39,7 @@
"framer-motion": ">=4.0.0",
"react": ">=18",
"react-dom": ">=18",
"@jala-banyu/theme": "1.6.0",
"@jala-banyu/theme": "1.6.2",
"@jala-banyu/system": "1.1.0"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/components/button/src/use-button-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ interface Props extends HTMLBanyuProps, ButtonGroupVariantProps {
* @default false
*/
isDisabled?: ButtonProps["isDisabled"];
/** An accessibility label for this item. */
"aria-label"?: string;
}

export type ContextType = {
Expand Down
6 changes: 4 additions & 2 deletions packages/components/button/src/use-button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ interface Props extends HTMLBanyuProps<"button"> {
* use `onPress` instead.
*/
onClick?: MouseEventHandler<HTMLButtonElement>;
/** An accessibility label for this item. */
"aria-label"?: string;
}

export type UseButtonProps = Props &
Expand Down Expand Up @@ -202,8 +204,8 @@ export function useButton(props: UseButtonProps) {
const spinnerSize = useMemo(() => {
const buttonSpinnerSizeMap: Record<string, SpinnerProps["size"]> = {
sm: "sm",
md: "sm",
lg: "md",
md: "md",
lg: "lg",
};

return buttonSpinnerSizeMap[size];
Expand Down
15 changes: 15 additions & 0 deletions packages/components/button/stories/button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,21 @@ export const IsLoading = {
isLoading: true,
},
};
export const IsLoadingWithText = {
parameters: {
design: {
type: "figma",
url: "https://www.figma.com/file/T0TUGURgVGElV6MtU2EPYU/%5BJDS%5D-Design-System---Banyu-1.0?node-id=376%3A46775&mode=dev",
},
},
args: {
...defaultProps,
children: "Loading",
color: "primary",
spinnerProps: {size: "sm"},
isLoading: true,
},
};

// export const WithState = {
// render: StateTemplate,
Expand Down
18 changes: 18 additions & 0 deletions packages/components/card/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @jala-banyu/card

## 6.0.2

### Patch Changes

- Updated dependencies []:
- @jala-banyu/theme@1.6.2
- @jala-banyu/ripple@6.0.2

## 6.0.1

### Patch Changes

- add aria-label props & change button hover

- Updated dependencies []:
- @jala-banyu/theme@1.6.1
- @jala-banyu/ripple@6.0.1

## 6.0.0

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/card/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jala-banyu/card",
"version": "6.0.0",
"version": "6.0.2",
"description": "Card is a container for text, photos, and actions in the context of a single subject.",
"keywords": [
"card"
Expand Down Expand Up @@ -37,7 +37,7 @@
"react": ">=18",
"react-dom": ">=18",
"framer-motion": ">=4.0.0",
"@jala-banyu/theme": "1.6.0",
"@jala-banyu/theme": "1.6.2",
"@jala-banyu/system": "1.1.0"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/components/card/src/use-card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export interface Props extends HTMLBanyuProps<"div"> {
* ```
*/
classNames?: SlotsToClasses<CardSlots>;
/** An accessibility label for this item. */
"aria-label"?: string;
}

export type UseCardProps = Props & PressEvents & FocusableProps & CardVariantProps;
Expand Down
16 changes: 16 additions & 0 deletions packages/components/checkbox/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @jala-banyu/checkbox

## 3.0.2

### Patch Changes

- Updated dependencies []:
- @jala-banyu/theme@1.6.2

## 3.0.1

### Patch Changes

- add aria-label props & change button hover

- Updated dependencies []:
- @jala-banyu/theme@1.6.1

## 3.0.0

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/components/checkbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jala-banyu/checkbox",
"version": "3.0.0",
"version": "3.0.2",
"description": "Checkboxes allow users to select multiple items from a list of individual items, or to mark one individual item as selected.",
"keywords": [
"checkbox"
Expand Down Expand Up @@ -36,7 +36,7 @@
"peerDependencies": {
"react": ">=18",
"react-dom": ">=18",
"@jala-banyu/theme": "1.6.0",
"@jala-banyu/theme": "1.6.2",
"@jala-banyu/system": ">=1.0.0"
},
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/components/checkbox/src/use-checkbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ interface Props extends Omit<HTMLBanyuProps<"input">, keyof CheckboxVariantProps
* ```
*/
classNames?: SlotsToClasses<CheckboxSlots>;
/** An accessibility label for this item. */
"aria-label"?: string;
}

export type UseCheckboxProps = Omit<Props, "defaultChecked"> &
Expand Down
16 changes: 16 additions & 0 deletions packages/components/chip/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @jala-banyu/chip

## 3.0.2

### Patch Changes

- Updated dependencies []:
- @jala-banyu/theme@1.6.2

## 3.0.1

### Patch Changes

- add aria-label props & change button hover

- Updated dependencies []:
- @jala-banyu/theme@1.6.1

## 3.0.0

### Patch Changes
Expand Down
Loading

0 comments on commit ce52170

Please sign in to comment.