Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/gsoft-inc/ov-igloo-ui into …
Browse files Browse the repository at this point in the history
…feature/IGL-115-action-menu_drodpown-props
  • Loading branch information
vicky-comeau committed Jan 17, 2024
2 parents c6250e0 + 278e7ec commit 7419f84
Show file tree
Hide file tree
Showing 97 changed files with 531 additions and 108 deletions.
15 changes: 15 additions & 0 deletions packages/ActionMenu/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @igloo-ui/action-menu

## 1.3.5

### Patch Changes

- ed3dc67: Added optional helper text prop to be passed to dropdown

## 1.3.4

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.
- Updated dependencies [cfb5619]
- @igloo-ui/dropdown@1.6.6
- @igloo-ui/list@0.5.5

## 1.3.3

### Patch Changes
Expand Down
7 changes: 4 additions & 3 deletions packages/ActionMenu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/action-menu",
"version": "1.3.3",
"version": "1.3.5",
"main": "dist/ActionMenu.js",
"module": "dist/ActionMenu.js",
"types": "dist/ActionMenu.d.ts",
Expand All @@ -25,14 +25,15 @@
},
"dependencies": {
"@igloo-ui/tokens": "^2.0.0",
"@igloo-ui/dropdown": "^1.6.5",
"@igloo-ui/list": "^0.5.4",
"@igloo-ui/dropdown": "^1.6.6",
"@igloo-ui/list": "^0.5.5",
"@hopper-ui/tokens": "^3.1.3",
"classnames": "^2.3.2"
},
"devDependencies": {
"@igloo-ui/icons": "^1.12.2",
"@igloo-ui/button": "^0.7.4",
"@igloo-ui/helper-text": "^0.2.16",
"@igloo-ui/icon-button": "^1.1.6"
},
"browserslist": [
Expand Down
13 changes: 13 additions & 0 deletions packages/ActionMenu/src/ActionMenu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import isChromatic from 'chromatic/isChromatic';

import IconButton from '@igloo-ui/icon-button';
import Button from '@igloo-ui/button';
import HelperText from '@igloo-ui/helper-text';
import Kebab from '@igloo-ui/icons/dist/Kebab';
import AddSolid from '@igloo-ui/icons/dist/AddSolid';
import Delete from '@igloo-ui/icons/dist/Delete';
Expand Down Expand Up @@ -278,3 +279,15 @@ export const Events = () => {
</ChromaticWrapper>
);
};

export const WithFooter = () => {
return (
<ChromaticWrapper>
<ActionMenu
renderReference={kebab}
options={actionMenuListEvents}
footer={<HelperText>Helper text</HelperText>}
/>
</ChromaticWrapper>
);
};
8 changes: 6 additions & 2 deletions packages/ActionMenu/src/ActionMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ export interface ActionMenuProps extends React.ComponentProps<"div"> {
renderReference: (
props: React.HTMLProps<HTMLButtonElement>,
) => React.ReactElement;
/** Footer to display helper text or other content below the options */
footer?: React.ReactNode;
}

const ActionMenu: React.FunctionComponent<ActionMenuProps> = ({
Expand All @@ -70,6 +72,7 @@ const ActionMenu: React.FunctionComponent<ActionMenuProps> = ({
options,
position = "bottom-end",
renderReference,
footer,
...rest
}: ActionMenuProps) => {
const actionMenuOptions = options.map((option): OptionType => {
Expand All @@ -81,7 +84,7 @@ const ActionMenu: React.FunctionComponent<ActionMenuProps> = ({

const [showMenu, setShowMenu] = React.useState(isOpen);
const [currentFocusedOption, setCurrentFocusedOption] =
React.useState<OptionType>();
React.useState<OptionType>();

const isOptionDisabled = (option: OptionType | undefined): boolean => {
if (option?.type === "list") {
Expand Down Expand Up @@ -138,7 +141,7 @@ const ActionMenu: React.FunctionComponent<ActionMenuProps> = ({
const enabledOptions = actionMenuOptions.filter(
option => !isOptionDisabled(option)
);
if (!enabledOptions.length) {return;}
if (!enabledOptions.length) { return; }

let currentFocusedIndex = -1;
if (currentFocusedOption) {
Expand Down Expand Up @@ -265,6 +268,7 @@ const ActionMenu: React.FunctionComponent<ActionMenuProps> = ({
className: "ids-action-menu__trigger"
});
}}
footer={footer}
/>
</div>
);
Expand Down
5 changes: 2 additions & 3 deletions packages/ActionMenu/src/action-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
}

[data-brand="workleap"] {
--ids-action-menu-font-family: var(--hop-body-sm-font-family);
--ids-action-menu-font-family: var(--hop-body-sm-font-family);
--ids-action-menu-font-size: var(--hop-body-sm-font-size);
}

.ids-action-menu {
font-family: var(--ids-action-menu-font-family);
font-size: var(--ids-action-menu-font-size);
}

}
10 changes: 10 additions & 0 deletions packages/Alert/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @igloo-ui/alert

## 0.6.5

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.
- Updated dependencies [cfb5619]
- Updated dependencies [cfb5619]
- @igloo-ui/button@0.7.7
- @igloo-ui/icon-button@1.1.7

## 0.6.4

### Patch Changes
Expand Down
10 changes: 5 additions & 5 deletions packages/Alert/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/alert",
"version": "0.6.4",
"version": "0.6.5",
"main": "dist/Alert.js",
"module": "dist/Alert.js",
"types": "dist/Alert.d.ts",
Expand All @@ -24,15 +24,15 @@
"build": "rollup -c rollup.config.js"
},
"dependencies": {
"@igloo-ui/button": "^0.7.4",
"@igloo-ui/icon-button": "^1.1.6",
"@igloo-ui/button": "^0.7.7",
"@igloo-ui/icon-button": "^1.1.7",
"@igloo-ui/icons": "^1.12.2",
"@igloo-ui/tokens": "^2.0.0",
"@hopper-ui/tokens": "^3.1.3",
"classnames": "^2.3.2"
},
"devDependencies": {
"@igloo-ui/tooltip": "^3.4.3",
"@igloo-ui/hyperlink": "^0.3.3"
"@igloo-ui/tooltip": "^3.4.4",
"@igloo-ui/hyperlink": "^0.3.4"
}
}
6 changes: 6 additions & 0 deletions packages/AreaChart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/area-chart

## 1.1.1

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 1.1.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/AreaChart/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/area-chart",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/AreaChart.js",
"module": "dist/AreaChart.js",
"types": "dist/AreaChart.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/Avatar/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/avatar

## 0.2.4

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 0.2.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/Avatar/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/avatar",
"version": "0.2.3",
"version": "0.2.4",
"main": "dist/Avatar.js",
"module": "dist/Avatar.js",
"types": "dist/Avatar.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/BarChart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/bar-chart

## 0.3.4

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 0.3.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/BarChart/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/bar-chart",
"version": "0.3.3",
"version": "0.3.4",
"main": "dist/BarChart.js",
"module": "dist/BarChart.js",
"types": "dist/BarChart.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/Breadcrumb/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/breadcrumb

## 0.2.5

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 0.2.4

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/Breadcrumb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/breadcrumb",
"version": "0.2.4",
"version": "0.2.5",
"main": "dist/Breadcrumb.js",
"module": "dist/Breadcrumb.js",
"types": "dist/Breadcrumb.d.ts",
Expand Down
13 changes: 13 additions & 0 deletions packages/Button/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Change Log

## 0.7.7

### Patch Changes

- cfb5619: Fixed button padding. Also removed styles on loader buttons so they don't show up on focus.
- cfb5619: Updated hopper token versions and button versions.

## 0.7.6

### Patch Changes

- 5c12940: Fixed button padding. Also removed styles on loader buttons so they don't show up on focus.

## 0.7.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/Button/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/button",
"version": "0.7.5",
"version": "0.7.7",
"main": "dist/Button.js",
"module": "dist/Button.js",
"types": "dist/Button.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/ButtonGroup/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/button-group

## 0.3.5

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 0.3.4

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/ButtonGroup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/button-group",
"version": "0.3.4",
"version": "0.3.5",
"main": "dist/ButtonGroup.js",
"module": "dist/ButtonGroup.js",
"types": "dist/ButtonGroup.d.ts",
Expand Down Expand Up @@ -35,6 +35,6 @@
],
"devDependencies": {
"@igloo-ui/icons": "^1.12.2",
"@igloo-ui/tooltip": "^3.4.3"
"@igloo-ui/tooltip": "^3.4.4"
}
}
6 changes: 6 additions & 0 deletions packages/Card/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/card

## 0.1.4

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 0.1.3

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/Card/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/card",
"version": "0.1.3",
"version": "0.1.4",
"main": "dist/Card.js",
"module": "dist/Card.js",
"types": "dist/Card.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/Carousel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/carousel

## 0.2.4

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 0.2.3

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/Carousel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/carousel",
"version": "0.2.3",
"version": "0.2.4",
"main": "dist/Carousel.js",
"module": "dist/Carousel.js",
"types": "dist/Carousel.d.ts",
Expand Down Expand Up @@ -29,7 +29,7 @@
"classnames": "^2.3.2"
},
"devDependencies": {
"@igloo-ui/button": "^0.7.4"
"@igloo-ui/button": "^0.7.7"
},
"browserslist": [
"> 1%",
Expand Down
6 changes: 6 additions & 0 deletions packages/Checkbox/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/checkbox

## 0.2.7

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 0.2.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/Checkbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/checkbox",
"version": "0.2.6",
"version": "0.2.7",
"main": "dist/Checkbox.js",
"module": "dist/Checkbox.js",
"types": "dist/Checkbox.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions packages/Color/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @igloo-ui/color

## 0.3.3

### Patch Changes

- cfb5619: Updated hopper token versions and button versions.

## 0.3.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/Color/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@igloo-ui/color",
"version": "0.3.2",
"version": "0.3.3",
"main": "dist/Color.js",
"module": "dist/Color.js",
"types": "dist/Color.d.ts",
Expand Down
Loading

0 comments on commit 7419f84

Please sign in to comment.