Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into fix/sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Niznikr committed Dec 9, 2024
2 parents b5859e5 + 9138f02 commit e2188ed
Show file tree
Hide file tree
Showing 105 changed files with 2,002 additions and 1,799 deletions.
2 changes: 2 additions & 0 deletions .storybook/utils.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { Args, Decorator, ReactRenderer } from '@storybook/react';
import type { AnnotatedStoryFn, StoryContext } from '@storybook/types';
import type { JSX } from 'react';

import merge from 'deepmerge';
import { Fragment } from 'react';

Expand Down
27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,44 +56,47 @@
"@storybook/types": "^8.4.0",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.6.2",
"@testing-library/react": "^16.0.0",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^14.5.2",
"@types/css-modules": "^1.0.5",
"@types/node": "^22.9.0",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@types/node": "^22.10.1",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.1",
"@vanilla-extract/css": "^1.16.0",
"@vanilla-extract/vite-plugin": "^4.0.2",
"@vitejs/plugin-react-swc": "^3.7.0",
"@vitejs/plugin-react-swc": "^3.7.2",
"@vitest/coverage-v8": "^2.1.1",
"@vitest/ui": "^2.1.1",
"browserslist": "^4.24.0",
"chromatic": "^11.18.1",
"chromatic": "^11.19.0",
"deepmerge": "^4.3.1",
"husky": "^9.1.1",
"jsdom": "^25.0.0",
"lightningcss": "^1.28.1",
"lint-staged": "^15.2.0",
"nx": "20.0.7",
"plop": "^4.0.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-router-dom": "6.16.0",
"rollup-plugin-pure": "^0.2.1",
"storybook": "^8.4.0",
"storybook-addon-pseudo-states": "^4.0.0",
"typescript": "^5.6.2",
"typescript": "^5.7.2",
"typescript-plugin-css-modules": "^5.1.0",
"vite": "^5.4.0",
"vite": "^6.0.2",
"vitest": "^2.1.1"
},
"packageManager": "[email protected]",
"pnpm": {
"overrides": {
"vite": "^6.0.2"
},
"peerDependencyRules": {
"allowedVersions": {
"react": "18",
"react": "19",
"rollup": "4",
"vite": "5"
"vite": "6"
}
}
},
Expand Down
8 changes: 4 additions & 4 deletions packages/alert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/avatar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/banner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
},
"peerDependencies": {
"@vanilla-extract/css": "^1.14.0",
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"flat": "^6.0.1",
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
8 changes: 7 additions & 1 deletion packages/button/src/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { IconProps } from '@launchpad-ui/icons';
import type {
ButtonHTMLAttributes,
ElementType,
JSX,
KeyboardEventHandler,
MouseEvent,
ReactElement,
Expand Down Expand Up @@ -95,7 +96,12 @@ const ButtonComponent = forwardRef<HTMLButtonElement, ButtonProps>((props, ref)

const renderChildren = () => {
if (asChild && isValidElement(children)) {
return cloneElement(children, undefined, getFinalChildren(children.props.children));
return cloneElement(
children,
undefined,
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
getFinalChildren((children as ReactElement<any>).props.children),
);
}

return getFinalChildren(children);
Expand Down
8 changes: 4 additions & 4 deletions packages/card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/card/src/RadioCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { ReactNode } from 'react';
import type { JSX, ReactNode } from 'react';

import { Radio, type RadioProps } from '@launchpad-ui/form';
import { cx } from 'classix';
Expand Down
6 changes: 3 additions & 3 deletions packages/card/stories/RadioCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { StoryFn, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

import { RadioCard } from '../src/RadioCard';

Expand All @@ -7,7 +7,7 @@ export default {
title: 'Legacy/Deprecated/Card/RadioCard',
description: 'A radio button with a label and optional image and subtext.',
decorators: [
(Story: StoryFn) => (
(Story) => (
<div style={{ display: 'flex', width: '15rem' }}>
<Story />
</div>
Expand All @@ -19,7 +19,7 @@ export default {
},
chromatic: { disableSnapshot: true },
},
};
} as Meta<typeof RadioCard>;

type Story = StoryObj<typeof RadioCard>;

Expand Down
8 changes: 4 additions & 4 deletions packages/chip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/clipboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/clipboard/src/CopyToClipboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { TooltipProps } from '@launchpad-ui/tooltip';
import type { ComponentPropsWithoutRef, KeyboardEventHandler } from 'react';
import type { ComponentPropsWithoutRef, JSX, KeyboardEventHandler } from 'react';

import { Icon } from '@launchpad-ui/icons';
import { Tooltip } from '@launchpad-ui/tooltip';
Expand Down
6 changes: 3 additions & 3 deletions packages/clipboard/stories/CopyToClipboard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { StoryFn, StoryObj } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';
import type { CopyToClipboardHandleRef } from '../src/CopyToClipboard';

import { userEvent, within } from '@storybook/test';
Expand Down Expand Up @@ -29,7 +29,7 @@ export default {
},
},
decorators: [
(Story: StoryFn) => (
(Story) => (
<div
style={{
height: '100vh',
Expand All @@ -42,7 +42,7 @@ export default {
</div>
),
],
};
} as Meta<typeof CopyToClipboard>;

type Story = StoryObj<typeof CopyToClipboard>;

Expand Down
8 changes: 4 additions & 4 deletions packages/collapsible/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
8 changes: 4 additions & 4 deletions packages/columns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"classix": "2.2.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "19.0.0",
"react-dom": "19.0.0"
}
}
10 changes: 10 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# @launchpad-ui/components

## 0.6.1

### Patch Changes

- [#1496](https://github.com/launchdarkly/launchpad-ui/pull/1496) [`cd85be1`](https://github.com/launchdarkly/launchpad-ui/commit/cd85be144135e2586125a957714b01d71234ee41) Thanks [@Niznikr](https://github.com/Niznikr)! - Add `ToggleButtonGroup`

- [#1489](https://github.com/launchdarkly/launchpad-ui/pull/1489) [`b7083bd`](https://github.com/launchdarkly/launchpad-ui/commit/b7083bdafce29dd82069f437fe25a3245718d182) Thanks [@Niznikr](https://github.com/Niznikr)! - Add `DropZone`

- [#1504](https://github.com/launchdarkly/launchpad-ui/pull/1504) [`99df328`](https://github.com/launchdarkly/launchpad-ui/commit/99df3284c510013f963e5ba06bce4ecfe39d9cbd) Thanks [@Niznikr](https://github.com/Niznikr)! - Add `TagButton`

## 0.6.0

### Minor Changes
Expand Down
11 changes: 11 additions & 0 deletions packages/components/__tests__/DropZone.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { describe, expect, it } from 'vitest';

import { render, screen } from '../../../test/utils';
import { DropZone } from '../src';

describe('DropZone', () => {
it('renders', () => {
render(<DropZone />);
expect(screen.getByRole('button')).toBeVisible();
});
});
17 changes: 17 additions & 0 deletions packages/components/__tests__/ToggleButtonGroup.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { describe, expect, it } from 'vitest';

import { render, screen } from '../../../test/utils';
import { ToggleButton, ToggleButtonGroup } from '../src';

describe('ToggleButtonGroup', () => {
it('renders', () => {
render(
<ToggleButtonGroup>
<ToggleButton id="first">First</ToggleButton>
<ToggleButton id="second">Second</ToggleButton>
<ToggleButton id="third">Third</ToggleButton>
</ToggleButtonGroup>,
);
expect(screen.getByRole('radiogroup')).toBeVisible();
});
});
10 changes: 5 additions & 5 deletions packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@launchpad-ui/components",
"version": "0.6.0",
"version": "0.6.1",
"status": "beta",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -48,12 +48,12 @@
"react-router-dom": "6.16.0"
},
"peerDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1"
"react": "^18.0.0 || ^19.0.0",
"react-dom": "^18.0.0 || ^19.0.0"
},
"devDependencies": {
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0",
"react-dom": "19.0.0",
"react-stately": "3.34.0"
}
}
Loading

0 comments on commit e2188ed

Please sign in to comment.