Skip to content

Commit

Permalink
chore(root): merged with main conflicts solved
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgarciadev committed Mar 21, 2024
2 parents b55502c + fb06254 commit 910b3b6
Show file tree
Hide file tree
Showing 52 changed files with 616 additions and 210 deletions.
5 changes: 5 additions & 0 deletions .changeset/dirty-beans-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/navbar": patch
---

fixed LazyMotion ForwardRef issue
5 changes: 5 additions & 0 deletions .changeset/empty-eels-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/table": patch
---

Fixed an issue where the `Table` component incorrectly rendered cell contents beneath the stripe when multiple computed values were provided in a `td` (table cell) element.
5 changes: 5 additions & 0 deletions .changeset/famous-owls-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/table": patch
---

Add RTL support to the table component.
5 changes: 5 additions & 0 deletions .changeset/four-turtles-move.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/popover": patch
---

fixed popover closing issue in autocomplete with open modal (#2475, #2082, #1987)
5 changes: 5 additions & 0 deletions .changeset/four-walls-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/select": patch
---

Fixed isFilled & hasValue logic for state.selectedItems in select
7 changes: 7 additions & 0 deletions .changeset/long-mayflies-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@nextui-org/autocomplete": patch
"@nextui-org/popover": patch
"@nextui-org/select": patch
---

revise shouldCloseOnInteractOutside for FreeSoloPopover
5 changes: 5 additions & 0 deletions .changeset/mighty-hornets-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/table": patch
---

Fixed normal cursor to cursor-not-allowed for disabled rows in Table
5 changes: 5 additions & 0 deletions .changeset/new-paws-remain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/avatar": patch
---

Add RTL support to the avatar group component
5 changes: 5 additions & 0 deletions .changeset/nice-rockets-watch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/table": patch
---

fixed `Spinner` loading on top of columns instead of inside `Table` in case of `emptyContent` prop not passed to `Table` body
5 changes: 5 additions & 0 deletions .changeset/purple-keys-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/switch": patch
---

Add RTL support to the switch component
5 changes: 5 additions & 0 deletions .changeset/rare-needles-study.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/checkbox": patch
---

Add RTL support to the checkbox component
5 changes: 5 additions & 0 deletions .changeset/serious-sheep-promise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/kbd": patch
---

Add RTL support to the kbd component
5 changes: 5 additions & 0 deletions .changeset/six-donuts-breathe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/input": patch
---

Add RTL support to the input component
5 changes: 5 additions & 0 deletions .changeset/slimy-panthers-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/accordion": patch
---

fixed remove dividers from hidden accordion items (#2210)
5 changes: 5 additions & 0 deletions .changeset/three-tools-whisper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/badge": patch
---

Removing the `children` type from BadgeProps, as the already extended UseBadgeProps has a `children` prop.
8 changes: 8 additions & 0 deletions .changeset/tough-spies-tease.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@nextui-org/autocomplete": patch
"@nextui-org/dropdown": patch
"@nextui-org/popover": patch
"@nextui-org/tooltip": patch
---

fix(autocomplete): support isReadOnly for dynamic collections in Autocomplete
11 changes: 11 additions & 0 deletions .changeset/warm-zoos-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@nextui-org/accordion": patch
"@nextui-org/modal": patch
"@nextui-org/navbar": patch
"@nextui-org/popover": patch
"@nextui-org/ripple": patch
"@nextui-org/tabs": patch
"@nextui-org/tooltip": patch
---

Changes the motion important to the more lightweight m component in framer motion to only load the required features.
5 changes: 5 additions & 0 deletions .changeset/wild-rockets-check.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/modal": patch
---

Add RTL support to the modal component.
22 changes: 22 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: "en"
early_access: false
reviews:
high_level_summary: true
poem: false
review_status: true
collapse_walkthrough: false
auto_review:
enabled: true
ignore_title_keywords:
- "WIP"
- "DO NOT MERGE"
- 'ci(changesets)'
drafts: false
base_branches:
- "main"
- "develop"
- "fix/.*"
- "chore/.*"
- "feat/.*"
chat:
auto_reply: true
7 changes: 2 additions & 5 deletions apps/docs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import "@/styles/globals.css";
import "@/styles/sandpack.css";
import {Metadata} from "next";
import Script from "next/script";
import {clsx} from "@nextui-org/shared-utils";
import {Analytics} from "@vercel/analytics/react";

import {Providers} from "./providers";

Expand All @@ -13,8 +11,8 @@ import {siteConfig} from "@/config/site";
import {fontSans} from "@/config/fonts";
import {Navbar} from "@/components/navbar";
import {Footer} from "@/components/footer";
import {__PROD__} from "@/utils";
import {ProBanner} from "@/components/pro-banner";
import {ScriptProviders} from "@/components/scripts/script-providers";

export const metadata: Metadata = {
title: {
Expand Down Expand Up @@ -79,8 +77,7 @@ export default function RootLayout({children}: {children: React.ReactNode}) {
</div>
<Cmdk />
</Providers>
{__PROD__ && <Analytics />}
<Script id="featurebase-sdk" src="https://do.featurebase.app/js/sdk.js" />
<ScriptProviders />
</body>
</html>
);
Expand Down
29 changes: 29 additions & 0 deletions apps/docs/components/scripts/script-providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import * as React from "react";
import {Analytics} from "@vercel/analytics/react";
import Script from "next/script";

import {__PROD__} from "@/utils";

export function ScriptProviders() {
return (
<>
<Script
id="featurebase-sdk"
src="https://do.featurebase.app/js/sdk.js"
strategy={"beforeInteractive"}
/>
<Script
defer
data-modal-disclaimer="This is a custom LLM for NextUI with access to all developer docs (nextui.org/docs) and GitHub Issues and PRs (github.com/nextui-org/nextui)."
data-modal-example-questions="How do I install for Next.js?,How do I customize primary color?"
data-project-color="#000000"
data-project-logo="https://avatars.githubusercontent.com/u/86160567?s=280&v=4"
data-project-name="NextUI"
data-website-id="e733a73f-980e-4f7d-9e8b-91867453f899"
src="https://widget.kapa.ai/kapa-widget.bundle.js"
strategy="afterInteractive"
/>
{__PROD__ && <Analytics />}
</>
);
}
4 changes: 2 additions & 2 deletions apps/docs/content/components/radio-group/with-description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default function App() {
<Radio value="buenos-aires" description="The capital of Argentina">
Buenos Aires
</Radio>
<Radio value="sydney" description="The capital of Australia">
Sydney
<Radio value="canberra" description="The capital of Australia">
Canberra
</Radio>
<Radio value="london" description="The capital of England">
London
Expand Down
1 change: 0 additions & 1 deletion apps/docs/content/docs/components/listbox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ You can use the `description` prop to add a description to the listbox item.

<CodeDemo
title="With Description"
typescriptStrict={true}
highlightedLines="17,24,32,41"
files={listboxContent.description}
/>
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/components/snippet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ You can customize the tooltip by using the `tooltipProps` property.

<CodeDemo title="Custom Tooltip" highlightedLines="7-10" files={snippetContent.customTooltip} />

> **Note**: For more information about the `Tootlip` props, please visit the [Tooltip](/docs/components/tooltip) page.
> **Note**: For more information about the `Tooltip` props, please visit the [Tooltip](/docs/components/tooltip) page.
### Multiline

Expand Down
4 changes: 1 addition & 3 deletions apps/docs/content/docs/components/spacer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,5 @@ Spacer is a component used to add space between components.
### Spaces

```ts
type Space = 0 | "px" | 2 | 1 | 0.5 | 1.5 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;
type Space = 0 | "px" | 0.5 | 1 | 1.5 | 2 | 2.5 | 3 | 3.5 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 52 | 56 | 60 | 64 | 72 | 80 | 96;
```


1 change: 0 additions & 1 deletion apps/docs/content/docs/components/tooltip.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ You can customize the `Tooltip` component by passing custom Tailwind CSS classes
| offset(px) | `number` | The distance or margin between the reference and popper. It is used internally to create an offset modifier. | `7` |
| containerPadding(px) | `number` | The placement padding that should be applied between the element and its surrounding container. | `12` |
| crossOffset(px) | `number` | The additional offset applied along the cross axis between the element and its anchor element. | `0` |
| triggerType | `dialog` \| `menu` \| `listbox` \| `tree` \| `grid`; | Type of tooltip that is opened by the trigger. | `dialog` |
| showArrow | `boolean` | Whether the tooltip should have an arrow. | `false` |
| shouldFlip | `boolean` | Whether the tooltip should change its placement and flip when it's about to overflow its boundary area. | `true` |
| triggerScaleOnOpen | `boolean` | Whether the trigger should scale down when the tooltip is open. | `true` |
Expand Down
19 changes: 19 additions & 0 deletions packages/components/accordion/__tests__/accordion.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,25 @@ describe("Accordion", () => {
expect(wrapper.getAllByRole("button")[0]).toBeDisabled();
});

it("should hide the accordion item when the hidden prop is set", () => {
const wrapper = render(
<Accordion>
<AccordionItem key="1" title="Accordion Item 1">
Accordion Item 1 description
</AccordionItem>
<AccordionItem key="2" hidden title="Accordion Item 2">
Accordion Item 2 description
</AccordionItem>
<AccordionItem key="3" title="Accordion Item 3">
Accordion Item 3 description
</AccordionItem>
</Accordion>,
);

expect(wrapper.getAllByRole("button")).toHaveLength(2);
expect(wrapper.getAllByRole("separator")).toHaveLength(1);
});

it("should expand the accordion item when clicked", async () => {
const wrapper = render(
<Accordion disableAnimation>
Expand Down
52 changes: 28 additions & 24 deletions packages/components/accordion/src/accordion-item.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {forwardRef} from "@nextui-org/system";
import {useMemo, ReactNode} from "react";
import {ChevronIcon} from "@nextui-org/shared-icons";
import {AnimatePresence, motion, useWillChange} from "framer-motion";
import {TRANSITION_VARIANTS} from "@nextui-org/framer-utils";
import {AnimatePresence, LazyMotion, domAnimation, m, useWillChange} from "framer-motion";
import {TRANSITION_VARIANTS} from "@nextui-org/framer-transitions";

import {UseAccordionItemProps, useAccordionItem} from "./use-accordion-item";

Expand Down Expand Up @@ -53,31 +53,35 @@ const AccordionItem = forwardRef<"button", AccordionItemProps>((props, ref) => {
}

return keepContentMounted ? (
<motion.section
key="accordion-content"
animate={isOpen ? "enter" : "exit"}
exit="exit"
initial="exit"
style={{overflowY: "hidden", willChange}}
variants={TRANSITION_VARIANTS.collapse}
{...motionProps}
>
<div {...getContentProps()}>{children}</div>
</motion.section>
<LazyMotion features={domAnimation}>
<m.section
key="accordion-content"
animate={isOpen ? "enter" : "exit"}
exit="exit"
initial="exit"
style={{overflowY: "hidden", willChange}}
variants={TRANSITION_VARIANTS.collapse}
{...motionProps}
>
<div {...getContentProps()}>{children}</div>
</m.section>
</LazyMotion>
) : (
<AnimatePresence initial={false}>
{isOpen && (
<motion.section
key="accordion-content"
animate="enter"
exit="exit"
initial="exit"
style={{overflowY: "hidden", willChange}}
variants={TRANSITION_VARIANTS.collapse}
{...motionProps}
>
<div {...getContentProps()}>{children}</div>
</motion.section>
<LazyMotion features={domAnimation}>
<m.section
key="accordion-content"
animate="enter"
exit="exit"
initial="exit"
style={{overflowY: "hidden", willChange}}
variants={TRANSITION_VARIANTS.collapse}
{...motionProps}
>
<div {...getContentProps()}>{children}</div>
</m.section>
</LazyMotion>
)}
</AnimatePresence>
);
Expand Down
5 changes: 4 additions & 1 deletion packages/components/accordion/src/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ const AccordionGroup = forwardRef<"div", AccordionProps>((props, ref) => {
{...item.props}
classNames={classNames}
/>
{!isSplitted && showDivider && index < state.collection.size - 1 && <Divider />}
{!item.props.hidden &&
!isSplitted &&
showDivider &&
index < state.collection.size - 1 && <Divider />}
</Fragment>
);
});
Expand Down
Loading

0 comments on commit 910b3b6

Please sign in to comment.