Skip to content

Commit

Permalink
chore(main): release 5.0.4 (#460)
Browse files Browse the repository at this point in the history
* chore(main): release 5.0.4

* docs: update storybook for latest release

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: benjitrosch <[email protected]>
  • Loading branch information
github-actions[bot] and benjitrosch authored Aug 30, 2024
1 parent 275e2e9 commit 08b1801
Show file tree
Hide file tree
Showing 20 changed files with 33 additions and 25 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [5.0.4](https://github.com/daisyui/react-daisyui/compare/v5.0.3...v5.0.4) (2024-08-28)


### Miscellaneous

* **Modal:** added ariaHidden to Modal component Props. ([#456](https://github.com/daisyui/react-daisyui/issues/456)) ([9e5064d](https://github.com/daisyui/react-daisyui/commit/9e5064ddf991cc3366c0c3fd05a6fda121ed04cf))
* **Modal:** fixed Props type to use DialogHTMLAttributes ([#459](https://github.com/daisyui/react-daisyui/issues/459)) ([275e2e9](https://github.com/daisyui/react-daisyui/commit/275e2e90d5d146c8a96f38590fe856d80383c732))

## [5.0.3](https://github.com/daisyui/react-daisyui/compare/v5.0.2...v5.0.3) (2024-07-26)


Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{a,j as o}from"./tw-merge-4486aaf0.js";import{r as t}from"./index-f46741a2.js";import{M as e}from"./index-31be5245.js";import{B as d}from"./Button-e31631bb.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const T={title:"Actions/Modal",component:e},h=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click the button below to close"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})},c=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click outside to close"})]})]})};c.args={backdrop:!0};const u=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o("form",{method:"dialog",children:o(d,{size:"sm",color:"ghost",shape:"circle",className:"absolute right-2 top-2",children:"x"})}),o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click on X button to close"})]})]})},i=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click the button below to close"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})};i.args={className:"w-11/12 max-w-5xl"};const m=s=>{const{Dialog:n,handleShow:r}=e.useDialog();return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(n,{...s,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"This modal works with useDialog hook!"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})};var f,M,p;h.parameters={...h.parameters,docs:{...(f=h.parameters)==null?void 0:f.docs,source:{originalSource:`args => {
import{a,j as o}from"./tw-merge-4486aaf0.js";import{r as t}from"./index-f46741a2.js";import{M as e}from"./index-d3c6f540.js";import{B as d}from"./Button-e31631bb.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const T={title:"Actions/Modal",component:e},h=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click the button below to close"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})},c=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click outside to close"})]})]})};c.args={backdrop:!0};const u=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o("form",{method:"dialog",children:o(d,{size:"sm",color:"ghost",shape:"circle",className:"absolute right-2 top-2",children:"x"})}),o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click on X button to close"})]})]})},i=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click the button below to close"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})};i.args={className:"w-11/12 max-w-5xl"};const m=s=>{const{Dialog:n,handleShow:r}=e.useDialog();return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(n,{...s,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"This modal works with useDialog hook!"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})};var f,M,p;h.parameters={...h.parameters,docs:{...(f=h.parameters)==null?void 0:f.docs,source:{originalSource:`args => {
const ref = useRef<HTMLDialogElement>(null);
const handleShow = useCallback(() => {
ref.current?.showModal();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{a,j as e}from"./tw-merge-4486aaf0.js";import{r as b}from"./index-f46741a2.js";import{M as o}from"./index-31be5245.js";import{B as i}from"./Button-e31631bb.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const x={title:"Actions/Modal/Legacy",component:o.Legacy},d=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"This modal works with a legacy mode!"}),e(o.Actions,{children:e(i,{onClick:l,children:"Close"})})]})]})},r=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,onClickBackdrop:l,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"Click outside to close"})]})]})},g=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(i,{size:"sm",color:"ghost",shape:"circle",className:"absolute right-2 top-2",onClick:l,children:"✕"}),e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"Click on X button to close"})]})]})},c=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"This modal works with a legacy mode!"}),e(o.Actions,{children:e(i,{onClick:l,children:"Close"})})]})]})};c.args={className:"w-11/12 max-w-5xl"};var m,u,p;d.parameters={...d.parameters,docs:{...(m=d.parameters)==null?void 0:m.docs,source:{originalSource:`args => {
import{a,j as e}from"./tw-merge-4486aaf0.js";import{r as b}from"./index-f46741a2.js";import{M as o}from"./index-d3c6f540.js";import{B as i}from"./Button-e31631bb.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const x={title:"Actions/Modal/Legacy",component:o.Legacy},d=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"This modal works with a legacy mode!"}),e(o.Actions,{children:e(i,{onClick:l,children:"Close"})})]})]})},r=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,onClickBackdrop:l,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"Click outside to close"})]})]})},g=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(i,{size:"sm",color:"ghost",shape:"circle",className:"absolute right-2 top-2",onClick:l,children:"✕"}),e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"Click on X button to close"})]})]})},c=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"This modal works with a legacy mode!"}),e(o.Actions,{children:e(i,{onClick:l,children:"Close"})})]})]})};c.args={className:"w-11/12 max-w-5xl"};var m,u,p;d.parameters={...d.parameters,docs:{...(m=d.parameters)==null?void 0:m.docs,source:{originalSource:`args => {
const [visible, setVisible] = useState<boolean>(false);
const toggleVisible = () => {
setVisible(!visible);
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 08b1801

Please sign in to comment.