mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
* ci(changesets): 📦 version packages (beta) (#5254) * chore(pre-release): enter pre-release mode * feat: support tailwindcss v4 (#4656) * feat: upgrade tailwindcssv4 * feat: upgrade tailwindcssv4 * feat: update config * feat: first init tailwindcss v4 * fix: update shadow xs to sm * fix: update rounded xs to sm * fix: variant issues * fix: variant shadow etc issues * fix: variant shadow issues * fix: redundant shadow issues * fix: redundant blur-sm issues * fix: redundant blur-sm issues * fix: redundant blur-sm shadow issues * fix: remove redundant rename * fix: role button issues * fix: role button issues * fix: font size * fix: alpha color value * fix: support text utilities in plugin * feat: upgrade tailwind-merge * fix: pkg package scope (cherry picked from commit 6e823233fca0e920336ec32dda6d1d1d845ed0d2) * fix: button base ui add cursor pointer * fix: tailwindcss experimental * feat: upgrade tailwindcss version * fix: input step 1 * fix: input transition issue * fix: theme to var function * ci: run QA in beta branch * fix: var to the theme and incorrect var usage MER-3261 * feat: upgrade tailwind-variants --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> * feat: changeset for tailwindcss v4 * fix: changeset * fix: changeset * ci(changesets): version packages (beta) (#5008) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: tw 4 docs * fix: select tests * chore: timeout * ci(changesets): version packages (beta) * ci(changesets): version packages (beta) * fix: deployment * ci(changesets): version packages (beta) (#5009) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: add the cli to upgrade the packages to beta * fix: cli command * fix: revert to use previous version (#5012) * fix: revert to use previous version * fix: revert to use previous version * fix: revert * fix: revert to use previous tailwind-merge version * ci(changesets): version packages (beta) (#5015) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: adapt tailwind merger config (#5016) * Revert "fix: revert to use previous version (#5012)" This reverts commit 1d01df254d6df9bc524d29d767236823b33a96fd. * fix: adapt tailwind merge config * fix: adapt tailwind merge config * fix: adapt tailwind merge config * fix: changeset * ci(changesets): version packages (beta) * fix(tailwind): add missing values config for bg-grid plugin * fix: remove useless tw config * fix: add default styles * docs: changeset * docs: typo * chore: merge origin canary to beta * ci(changesets): version packages (beta) * chore: remove changeset & pre.json * chore: change to minor * chore(pre-release): enter pre-release mode * chore(deps): fix versions * chore(deps): revise changed packages * chore(deps): update tailwindcss version * ci(changesets): 📦 version packages (beta) (#5166) * ci(changesets): version packages (beta) * fix: add missing delimiter --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: winches <329487092@qq.com> * fix(docs): add missing semicolon * fix: animate about skeleton (#5198) * chore: pre release * ci(changesets): version packages (beta) (#5199) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs: blurred hover button style * fix: language selector blur (#5208) * fix: skeleton animate translate value (#5207) * fix: open in remote repo (#5214) * chore: upgrade tw version * fix: open in remote repo * fix: update lock * fix: select translate styles (#5219) * chore: pre release * ci(changesets): version packages (beta) (#5222) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: remove changeset * chore(pre-release): enter pre-release mode * chore(react): continue from 2.8.0-beta.2 * chore(changeset): add changeset * fix(changeset): use patch * ci(changesets): version packages (beta) * fix(docs): beta docs --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: winches <329487092@qq.com> Co-authored-by: WK Wong <wingkwong.code@gmail.com> Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Charlotte21110 <hejianer9@163.com> * fix(workflow): check_if_pre_json_exists order * chore(changeset): redeploy * chore(changeset): changeset (#5263) * ci(changesets): version packages (beta) (#5264) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(docs): mdx in beta (#5261) * chore(docs): add lint:fix * fix(docs): slug requires promise in next 15 * fix(docs): useMDXComponent * fix(docs): typing issue * docs: typography style error (#5274) * chore(pre-release): enter pre-release mode * feat: support tailwindcss v4 (#4656) * feat: upgrade tailwindcssv4 * feat: upgrade tailwindcssv4 * feat: update config * feat: first init tailwindcss v4 * fix: update shadow xs to sm * fix: update rounded xs to sm * fix: variant issues * fix: variant shadow etc issues * fix: variant shadow issues * fix: redundant shadow issues * fix: redundant blur-sm issues * fix: redundant blur-sm issues * fix: redundant blur-sm shadow issues * fix: remove redundant rename * fix: role button issues * fix: role button issues * fix: font size * fix: alpha color value * fix: support text utilities in plugin * feat: upgrade tailwind-merge * fix: pkg package scope (cherry picked from commit 6e823233fca0e920336ec32dda6d1d1d845ed0d2) * fix: button base ui add cursor pointer * fix: tailwindcss experimental * feat: upgrade tailwindcss version * fix: input step 1 * fix: input transition issue * fix: theme to var function * ci: run QA in beta branch * fix: var to the theme and incorrect var usage MER-3261 * feat: upgrade tailwind-variants --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> * feat: changeset for tailwindcss v4 * fix: changeset * fix: changeset * ci(changesets): version packages (beta) (#5008) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: tw 4 docs * fix: select tests * chore: timeout * ci(changesets): version packages (beta) * ci(changesets): version packages (beta) * fix: deployment * ci(changesets): version packages (beta) (#5009) Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: add the cli to upgrade the packages to beta * fix: cli command * fix: revert to use previous version (#5012) * fix: revert to use previous version * fix: revert to use previous version * fix: revert * fix: revert to use previous tailwind-merge version * ci(changesets): version packages (beta) (#5015) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: adapt tailwind merger config (#5016) * Revert "fix: revert to use previous version (#5012)" This reverts commit 1d01df254d6df9bc524d29d767236823b33a96fd. * fix: adapt tailwind merge config * fix: adapt tailwind merge config * fix: adapt tailwind merge config * fix: changeset * ci(changesets): version packages (beta) * fix(tailwind): add missing values config for bg-grid plugin * fix: remove useless tw config * fix: add default styles * docs: changeset * docs: typo * chore: merge origin canary to beta * ci(changesets): version packages (beta) * chore: remove changeset & pre.json * chore: change to minor * chore(pre-release): enter pre-release mode * chore(deps): fix versions * chore(deps): revise changed packages * chore(deps): update tailwindcss version * ci(changesets): 📦 version packages (beta) (#5166) * ci(changesets): version packages (beta) * fix: add missing delimiter --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: winches <329487092@qq.com> * fix(docs): add missing semicolon * fix: animate about skeleton (#5198) * chore: pre release * ci(changesets): version packages (beta) (#5199) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs: blurred hover button style * fix: language selector blur (#5208) * fix: skeleton animate translate value (#5207) * fix: open in remote repo (#5214) * chore: upgrade tw version * fix: open in remote repo * fix: update lock * fix: select translate styles * Merge branch beta/release-next of github.com:heroui-inc/heroui into beta/release-next-original --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: WK Wong <wingkwong.code@gmail.com> Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Charlotte21110 <hejianer9@163.com> * fix: transition scale (#5284) * feat(toast): enable programatically closing a toast with a specific key (#5125) * feat(toast): add closeToast method * docs(toast): add example for programmatically closing toast * refactor: change button title in doc * refactor: add type for key * test: sync storybook example with the one in docs * chore: add changeset * refactor: fix grammar * chore: update toast package version change to patch * Merge branch 'canary' into pr/5125 * chore(changeset): add ref number * refactor(toast): export hooks * chore(docs): use flat buttons --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * ci(changesets): version packages (beta) (#5285) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(input): prevent accessibility label duplication (#5161) * fix(input): prevent accessibility label duplication * chore(chageset): add changeset * chore(changeset): include issue number --------- Co-authored-by: WK <wingkwong.code@gmail.com> * refactor: overlay & interactOutside (#5100) * fix: remove ariaShouldCloseOnInteractOutside usage * feat: add `@heroui/use-aria-overlay` * chore(popover): remove ariaHideOutside * fix(use-aria-modal-overlay): use useAriaOverlay instead * fix(use-aira-overlay): revise onInteractOutside * chore(deps): pnpm-lock.yaml * feat(modal): add ModalWithAutocompleteTemplate * chore(modal): remove state.close as handled by useInteractOutside * fix(use-aria-multiselect): add menuTriggerProps.onPressStart and change domProps to triggerProps * chore(use-aria-button): support onPressUp * chore(deps): pnpm-lock.yaml * chore(use-aria-multiselect): join by commas * fix(tooltip): use useAriaOverlay instead * fix(autocomplete): jest timeout issue * chore(deps): pnpm-lock.yaml * chore(changset): add changeset * chore(deps): bump versions * refactor(tooltip): move to type * chore(deps): bump RA versions (#5315) * chore(deps): bump RA versions * fix(scripts): incorrect docs path * chore(changeset): add changeset for bumping RA versions * fix(docs): incorrect import path * refactor(modal): use a simple example * ci(changesets): version packages (beta) (#5303) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * feat(input): adding outside-top prop (#4775) * feat(input): adding outside-top prop * chore(input): add outside-top to use-label-placement hook * refactor(input): use old method for computing labelPlacement in 'use-input' * fix(input): fix focus behaviouir and alignment for 'outside-top' * Merge branch 'canary' into pr/4775 * chore(changeset): include issue number * feat(system): useInputLabelPlacement * refactor(input): use useInputLabelPlacement * chore(changeset): add changeset --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * chore: sync latest changes to beta (#5347) * chore: add herohack announcement * fix(date-picker): error state (#5317) * fix(date-range-picker): fixed the error state in preset * Update giant-sloths-shop.md * Removed if statement * chore(date-picker): prettier --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * chore: banner replacement * fix(theme): clear button in mobile (#5252) * fix(toast): fixed close button hover position * fix(input): fixed the clear button rendering on smaller devices * Delete .changeset/soft-spoons-march.md * Update input.ts * Undo unrelated toast changes * fix(toast): icons (#5246) * feat(shared-icons): add loading icon * fix(toast): icons * chore(toast): revise types for icons * chore(changeset): add changeset * refactor: migrate eslint to v9 (#5267) * refactor: migrate eslint to v9 * chore: lint * chore: update eslint command * chore: fix lint warnings * chore: separate lint and lint:fix * chore: exclude contentlayer generated code * fix(scripts): add missing await * fix(autocomplete): persist last selected item position (#5286) * refactor(select): remove unnecessary code * fix(autocomplete): persist last selected item position * chore(changeset): add changeset * chore(deps): bump framer-motion version (#5287) * chore(deps): bump framer-motion version * fix: typing issues * chore(changeset): add changeset --------- Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> * chore(docs): supplement onAction & selectionBehavior (#5289) * fix(autocomplete): ensure focused item matches selected item after filter, selection (#5290) * fix(autocomplete): ensure focused item matches selected item after filter, selection * chore: apply type and default value * chore: add perpose coment in updated code * test: add focuskey management testcode * docs: add changeset * docs: update changeset * chore: remove comment * fix: broken components in stories (#5291) * chore(switch): remove xl size * chore(docs): remove xl size * chore(system-rsc): remove xl size * chore(circular-progress): remove xl size * chore: undo * chore(deps): bump RA versions (#5310) * chore(deps): ra version bump * chore(changeset): add changeset * fix(scripts): incorrect docs path --------- Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> * chore(docs): update meta data (#5311) * docs(layout.tsx): added text-foreground (#5316) * feat(tabs): add click handling for tab items in tests and implementation (#3917) Co-authored-by: WK Wong <wingkwong.code@gmail.com> * fix issues in tabs examples (#2405) Co-authored-by: WK Wong <wingkwong.code@gmail.com> * chore(docs): add missing onValueChange in CheckboxGroup (#5332) * ci(changesets): version packages (#5323) Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> * chore: remove pre.json --------- Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> Co-authored-by: Vishv Salvi <82429084+Vishvsalvi@users.noreply.github.com> Co-authored-by: KumJungMin <37934668+KumJungMin@users.noreply.github.com> Co-authored-by: liaoyinglong <vigossliao@gmail.com> Co-authored-by: zhengjitf <zhengjitf@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(pre-release): enter pre-release mode * chore: update changesets * chore: remove changesets * chore: add changeset * chore: update `@heroui/react` pre version * fix(deps): add missing `@heroui/use-aria-overlay` import * fix: lock file (#5351) * ci(changesets): 📦 version packages (beta) (#5348) * ci(changesets): version packages (beta) * Merge branch 'beta/release-next' into changeset-release/beta/release-next --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: WK Wong <wingkwong.code@gmail.com> * chore: sync 2.8.0 to beta (#5388) * chore: remove outdated changeset * chore(pre-release): enter pre-release mode * chore(deps): bump RA versions (beta) (#5392) * chore(deps): bump RA versions * chore: add changeset * ci(changesets): version packages (beta) (#5393) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * refactor: remove RA dependencies (overaly & utils) (#5398) * refactor(system): remove `@react-aria/utils` package * refactor(system): remove `@react-aria/overlays` package * ci(changesets): version packages (beta) (#5399) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * refactor: RA optimization (#5401) * refactor(shared-utils): add common functions from `@react-aria/utils` * feat(system): add shouldClientNavigate & useRouter * refactor(deps): remove `@react-aria/utils` * feat(shared-utils): include common functions from RA * refactor: import functions from `@heroui/shared-utils` instead * chore(deps): pnpm-lock.yaml * chore: add changeset * chore(shared-utils): update directory * fix(shared-utils): add use client directive * feat: add `@heroui/use-viewport-size` * feat: add `@heroui/use-form-reset` * feat(use-resize): add hasResizeObserver & RefObject * feat(form): add useObjectRef * chore: update import * chore(deps): update dependencies * refactor(shared-utils): only keep utils * chore(deps): pnpm-lock.yaml * chore(changeset): add changeset * ci(changesets): version packages (beta) (#5406) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: transitions (#5409) * chore(changeset): add changeset * fix: outline style (#5421) * fix: outline style * chore(changeset): add changeset --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * fix(toast): Renaming the loadingIcon to loadingComponent (#4919) * fix: toast should be above the modal * fix: renaming the loadingIcon to loadingComponent * chore: adding changeset * chore: fixing conflicts * chore: adding the region props * fix: adding Marcus' suggestions * fix: marcus' suggestions * Revert all commits except 4c6bf32 * chore(toast): bump `@heroui/theme` in peerDependencies * chore: nits * chore: applying marcus' suggestions * chore(toast): update story --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * chore: use beta version * chore: delete pre.json * chore(pre-release): enter pre-release mode * chore(changeset): trigger release * chore(changeset): trigger release * chore: keep previous changesets * ci(changesets): version packages (beta) (#5429) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(table): header and isStriped missing radius (#5062) * fix(table): tableheader and isStriped missing radius * chore: add changeset * fix: fix missing radius styles * chore(changeset): update message * fix(theme): reorder radius --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * fix(slider): prevent NaN error for equal min / max values (#5044) * fix(slider): prevent NaN error for equal min/max values * fix: restore isdisabled code * fix(slider): perf prevent NaN error for equal min max values * refactor: slider code * fix(slider): prevent NaN error for equal min max values & add test * fix(slider): perf prevent NaN error for equal min max values * fix: remove redundant code * chore: add changeset * Revert "chore: add changeset" This reverts commit f31de4ac859e48eb09c8a14a546fed9e5197eccd. * chore(slider): add missing warn * refactor(slider): remove unnecessary line --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * fix: double fetch img src (#5417) * fix(image): double fetch when using custom image component * fix(avatar): avoid passing disableAnimation to dom & double fetch source * chore(changeset): include avatar * fix(autocomplete): empty button when selectorIcon is null (#5427) * fix(toast): Toast items close in reverse order (#5405) * fix(toast): correct closing order to implement proper FIFO behavior * chore(changeset): add changeset * fix(changeset): update issue number * chore(toast): use `!==` instead * feat(toast): apply exit animation to auto-close timeout --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * fix(table): remove removeWrapper on virtualized table (#5428) * fix(table): remove `removeWrapper` for virtualized table * chore(docs): update description for removeWrapper * chore(changeset): add changeset * fix(toast): fixed close button hover position (#5245) * fix(toast): fixed close button hover position * Update soft-spoons-march.md * Update toast.ts * chore(theme): prettier * Using "placement" to apply the top and bottom extension * fix(toast): modified hover for expanded region * update dependancy array * lint fix * Merge branch 'canary' into pr/5245 * chore(theme): remove line breaks * chore(changeset): add missing package * static extension size * fix(toast): static extension fix --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * feat(table): support custom sort icon (#5243) * feat(shared-icons): add SortIcon * feat(table): add CustomSortIcon story * feat(table): support custom sort icon * fix(table): handle functional sortIcon * chore(changeset): add changeset * chore(table): update type * feat(docs): add sortIcon to table * fix(docs): broken object * chore(shared-icons): lint * feat(docs): add example for sort icon * chore: bump pnpm & node version (#5442) * refactor: bump pnpm & node version * chore(deps): bump `@types/node` * fix(calendar): improve month and year picker selection for different zoom levels (#5151) * fix(calendar): improve month and year picker selection for different zoom levels * fix(calendar): improve month and year picker selection for different zoom levels * fix(calendar): prevent stale values while scrolling both year and month pickers simultaneously * docs: replace invalid yarn command (#5422) * chore: remove ph banner (#5437) * chore(changeset): update changeset message * chore: add line breaks --------- Co-authored-by: Nicolas Cappabianca <nicolas.cappabianca@gmail.com> Co-authored-by: WK <wingkwong.code@gmail.com> * feat(select): adding isClearable to select (#4785) * feat(select): adding isClearable to select * chore(select): add changeset * test(select): add tests for isClearable * chore(select): add theme package patch, improve the testcase, rename nextui package to heroui * fix(select): fixing alignment for clear button for different cases * Merge branch 'canary' into pr/4785 * Merge branch 'canary' into pr/4785 * fix(select): remove component level styling * fix(select): fix the alignment and focus behaviour * fix(select): shift clear buttojn close to trigger * fix(select): fix alignment for different variants * feat(select): add data-has-end-content * fix(theme): revise select styles with clear button and end content * feat(docs): add end content --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * fix(select): use span instead as trigger is button * fix(docs): add ToastProvider for blog post * ci(changesets): version packages (beta) (#5430) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(select): clear button test cases * fix(modal): draggable modal, scrollable on mobile (#5444) Co-authored-by: Vishv Salvi <vishvsalvi@Vishvs-MacBook-Air.local> * chore: trigger release * ci(changesets): version packages (beta) (#5445) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(theme): table header sorting icon transition (#5449) * fix: table header sorcting icon transition * chore(changeset): add changeset --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * fix(table): allow text selection with cursor in table cells (#5454) * fix(table): allow text selection with cursor in table cells * chore(changeset): add changeset --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * ci(changesets): version packages (beta) (#5450) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore: add back RA deps (#5466) * chore(deps): bump testing-library & jest versions (#5468) * refactor: revise test cases * chore(deps): bump testing-library & jest versions * ci(changesets): version packages (beta) (#5467) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * refactor(autocomplete): test cases * fix(use-theme): incorrect target theme * ci(changesets): version packages (beta) (#5470) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(use-theme): remove all theme values and add the new one * ci(changesets): version packages (beta) (#5472) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * docs: 2.8.0 (#5443) * chore(docs): update routes.json * chore(docs): bump versions * chore(docs): initial draft * chore(docs): add examples * chore(Docs): update credits and community * chore(docs): update date & what's next * chore(docs): update meta data * chore(docs): add update tags * chore(docs): add tableSortIcon example * chore(docs): revise sidebar width * chore(docs): remove package size optimization * chore(docs): update meta * ci(changesets): exit pre-release mode * chore: update package versions * chore(changeset): remove unrelated changeset * chore(deps): remove unused autoprefixer * chore(docs): update tailwind v4 content * chore(docs): update template doc content * chore(docs): update formatting * chore(toast): export getToastQueue (#5476) * chore(docs): add hydration issue handling to page router example (#5474) * docs(dark-mode): add hydration handling to page router example * chore(docs): format --------- Co-authored-by: WK Wong <wingkwong.code@gmail.com> * chore(deps): bump tw4 versions * fix: handle files with paths containing empty space (#5478) * chore(docs): revise wordings in 2.8.0 blog * feat(slider): add getTooltipValue prop for custom tooltip value (#5384) * feat(slider): add getTooltipValue prop for custom tooltip value * feat(slider): fix coderabbit highlights * feat(slider): fixed wingkwong highlights * feat(slider): added custom-tooltip.raw.tsx?raw * feat(slider): improved custom-tooltip.raw.tsx * chore: undo README.md * chore(slider): use normal $ sign * chore(changeset): add changeset * chore(docs): formatting --------- Co-authored-by: andartadev1 <andartadev@gmail.com> Co-authored-by: WK Wong <wingkwong.code@gmail.com> * chore(docs): revise custom tooltip example * chore(docs): add custom tooltip example for slider * chore(deps): bump contentlayer2 & next-contentlayer2 * chore(docs): fix formatting * chore(docs): update metadata * chore: add v2.8.0 image --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: winches <329487092@qq.com> Co-authored-by: Junior Garcia <jrgarciadev@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Charlotte21110 <hejianer9@163.com> Co-authored-by: Feiyu Zheng <67126194+ChaserZ98@users.noreply.github.com> Co-authored-by: Dmytro Klymenko <dmytro@klymenko.xyz> Co-authored-by: Abhinav Agarwal <78839973+abhinav700@users.noreply.github.com> Co-authored-by: Vishv Salvi <82429084+Vishvsalvi@users.noreply.github.com> Co-authored-by: KumJungMin <37934668+KumJungMin@users.noreply.github.com> Co-authored-by: liaoyinglong <vigossliao@gmail.com> Co-authored-by: zhengjitf <zhengjitf@gmail.com> Co-authored-by: Maharshi Alpesh <maharshialpesh@gmail.com> Co-authored-by: Yohan <58714229+kaishuige@users.noreply.github.com> Co-authored-by: Aditya Ray <96347576+adi-ray@users.noreply.github.com> Co-authored-by: Aakash Patel <ap0524@srmist.edu.in> Co-authored-by: Nicolas Cappabianca <nicolas.cappabianca@gmail.com> Co-authored-by: Vishv Salvi <vishvsalvi@Vishvs-MacBook-Air.local> Co-authored-by: Priyadharshini S <priyadharshinis5102@gmail.com> Co-authored-by: arar <77303253+ararTP@users.noreply.github.com> Co-authored-by: andartadev1 <andartadev@gmail.com>
129 lines
7.3 KiB
TypeScript
129 lines
7.3 KiB
TypeScript
import type {IconSvgProps} from "@/types";
|
|
|
|
import React from "react";
|
|
import {cn} from "@heroui/theme";
|
|
|
|
import {dataAttr} from "@/utils";
|
|
export interface LogoProps extends IconSvgProps {
|
|
auto?: boolean;
|
|
small?: boolean;
|
|
outlined?: boolean;
|
|
fill?: string;
|
|
className?: string;
|
|
}
|
|
|
|
export const SmallLogoOutlined: React.FC<LogoProps> = ({
|
|
auto,
|
|
size,
|
|
width,
|
|
height,
|
|
className,
|
|
...props
|
|
}) => (
|
|
<svg
|
|
className={cn("sm:data-[auto=true]:hidden block text-foreground", className)}
|
|
data-auto={dataAttr(auto)}
|
|
fill="none"
|
|
height={height || size || 25}
|
|
viewBox="0 0 126 126"
|
|
width={width || size || 25}
|
|
{...props}
|
|
>
|
|
<path
|
|
d="M33.3529 5H92.6471C108.306 5 121 17.694 121 33.3529V92.6471C121 108.306 108.306 121 92.6471 121H33.3529C17.694 121 5 108.306 5 92.6471V33.3529C5 17.694 17.694 5 33.3529 5Z"
|
|
stroke="currentColor"
|
|
strokeWidth="10"
|
|
/>
|
|
<path d="M94.9539 36V89.6887H86.3363V36H94.9539Z" fill="currentColor" />
|
|
<path
|
|
d="M69.0885 36H77.7339V71.3118C77.7339 75.0694 76.795 78.3987 74.9172 81.2998C73.0394 84.1835 70.3993 86.4555 66.9969 88.1158C63.5945 89.7586 59.6064 90.58 55.0327 90.58C50.4776 90.58 46.4988 89.7586 43.0964 88.1158C39.694 86.4555 37.0539 84.1835 35.1761 81.2998C33.2983 78.3987 32.3594 75.0694 32.3594 71.3118V36H40.9769V70.6565C40.9769 73.0857 41.544 75.2441 42.6781 77.1316C43.8308 79.0191 45.4577 80.5046 47.5586 81.5882C49.6595 82.6543 52.1509 83.1873 55.0327 83.1873C57.9331 83.1873 60.4338 82.6543 62.5347 81.5882C64.6542 80.5046 66.2718 79.0191 67.3873 77.1316C68.5214 75.2441 69.0885 73.0857 69.0885 70.6565V36Z"
|
|
fill="currentColor"
|
|
/>
|
|
</svg>
|
|
);
|
|
|
|
export const SmallLogo: React.FC<LogoProps> = ({
|
|
auto,
|
|
size,
|
|
width,
|
|
height,
|
|
className,
|
|
...props
|
|
}) => (
|
|
<svg
|
|
className={cn("sm:data-[auto=true]:hidden block text-foreground", className)}
|
|
data-auto={dataAttr(auto)}
|
|
fill="none"
|
|
height={height || size || 25}
|
|
viewBox="0 0 126 126"
|
|
width={width || size || 25}
|
|
{...props}
|
|
>
|
|
<path
|
|
d="M92.6471 0H33.3529C14.9326 0 0 14.9326 0 33.3529V92.6471C0 111.067 14.9326 126 33.3529 126H92.6471C111.067 126 126 111.067 126 92.6471V33.3529C126 14.9326 111.067 0 92.6471 0Z"
|
|
fill="currentColor"
|
|
/>
|
|
<path className="fill-background" d="M86.3181 89.4661V36H92.9271V89.4661H86.3181Z" />
|
|
<path
|
|
className="fill-background"
|
|
d="M54.0894 90.58C49.9557 90.58 46.3046 89.726 43.1363 88.0181C39.9679 86.3101 37.4803 83.9215 35.6733 80.8521C33.8911 77.758 33 74.1317 33 69.9733V36.0371L39.6833 36V69.4163C39.6833 71.9411 40.1041 74.1441 40.9457 76.0253C41.812 77.8818 42.9506 79.4289 44.3616 80.6665C45.7725 81.9041 47.3195 82.8324 49.0027 83.4512C50.7107 84.0453 52.4062 84.3423 54.0894 84.3423C55.7974 84.3423 57.5053 84.0329 59.2133 83.4141C60.9212 82.7952 62.4682 81.8794 63.8544 80.6665C65.2653 79.4289 66.3916 77.8694 67.2332 75.9882C68.0748 74.107 68.4956 71.9164 68.4956 69.4163V36H75.1788V69.9733C75.1788 74.107 74.2754 77.7209 72.4684 80.815C70.6862 83.9091 68.2109 86.3101 65.0425 88.0181C61.8742 89.726 58.2231 90.58 54.0894 90.58Z"
|
|
/>
|
|
</svg>
|
|
);
|
|
|
|
export const LargeLogo: React.FC<LogoProps> = ({auto, className, ...props}) => (
|
|
<svg
|
|
className={cn(
|
|
"data-[auto=true]:hidden sm:data-[auto=true]:block block text-foreground",
|
|
className,
|
|
)}
|
|
data-auto={dataAttr(auto)}
|
|
fill="none"
|
|
viewBox="0 0 384 96"
|
|
{...props}
|
|
>
|
|
<path d="M374.28 93.12V0.959961H383.688V93.12H374.28Z" fill="currentColor" />
|
|
<path
|
|
d="M319.093 95.04C312.053 95.04 305.824 93.5893 300.405 90.688C295.029 87.7866 290.805 83.6906 287.733 78.4C284.661 73.1093 283.125 66.9226 283.125 59.84V1.02396L292.597 0.959961V58.624C292.597 63.4026 293.408 67.5413 295.029 71.04C296.65 74.496 298.762 77.3546 301.365 79.616C304.01 81.8346 306.89 83.4773 310.005 84.544C313.12 85.6106 316.149 86.144 319.093 86.144C322.08 86.144 325.13 85.6106 328.245 84.544C331.36 83.4773 334.218 81.8346 336.821 79.616C339.424 77.3546 341.536 74.496 343.157 71.04C344.778 67.5413 345.589 63.4026 345.589 58.624V0.959961H355.061V59.84C355.061 66.9226 353.525 73.1093 350.453 78.4C347.381 83.648 343.136 87.744 337.717 90.688C332.341 93.5893 326.133 95.04 319.093 95.04Z"
|
|
fill="currentColor"
|
|
/>
|
|
<path
|
|
d="M236.239 95.04C229.37 95.04 223.503 93.4827 218.639 90.368C213.775 87.2534 210.042 82.944 207.439 77.44C204.836 71.936 203.535 65.6214 203.535 58.496C203.535 51.2427 204.858 44.8854 207.503 39.424C210.148 33.9627 213.903 29.7173 218.767 26.688C223.674 23.616 229.498 22.08 236.239 22.08C243.151 22.08 249.039 23.6373 253.903 26.752C258.81 29.824 262.543 34.112 265.103 39.616C267.706 45.0774 269.007 51.3707 269.007 58.496C269.007 65.7494 267.706 72.128 265.103 77.632C262.5 83.0934 258.746 87.36 253.839 90.432C248.932 93.504 243.066 95.04 236.239 95.04ZM236.239 86.016C243.919 86.016 249.636 83.4773 253.391 78.4C257.146 73.28 259.023 66.6454 259.023 58.496C259.023 50.1333 257.124 43.4773 253.327 38.528C249.572 33.5787 243.876 31.104 236.239 31.104C231.076 31.104 226.81 32.2773 223.439 34.624C220.111 36.928 217.615 40.1494 215.951 44.288C214.33 48.384 213.519 53.12 213.519 58.496C213.519 66.816 215.439 73.4933 219.279 78.528C223.119 83.52 228.772 86.016 236.239 86.016Z"
|
|
fill="currentColor"
|
|
/>
|
|
<path
|
|
d="M162.5 93.12V24H170.948V40.64L169.284 38.464C170.052 36.416 171.055 34.5387 172.292 32.832C173.529 31.0827 174.873 29.6533 176.324 28.544C178.116 26.9653 180.207 25.7707 182.596 24.96C184.985 24.1067 187.396 23.616 189.828 23.488C192.26 23.3173 194.479 23.488 196.484 24V32.832C193.967 32.192 191.215 32.0427 188.228 32.384C185.241 32.7253 182.489 33.92 179.972 35.968C177.668 37.76 175.94 39.9147 174.788 42.432C173.636 44.9067 172.868 47.552 172.484 50.368C172.1 53.1413 171.908 55.8933 171.908 58.624V93.12H162.5Z"
|
|
fill="currentColor"
|
|
/>
|
|
<path
|
|
d="M116.873 95.04C110.132 95.04 104.286 93.5467 99.337 90.56C94.4304 87.5734 90.6117 83.3707 87.881 77.952C85.1504 72.5334 83.785 66.176 83.785 58.88C83.785 51.328 85.129 44.8 87.817 39.296C90.505 33.792 94.281 29.5467 99.145 26.56C104.052 23.5733 109.833 22.08 116.489 22.08C123.316 22.08 129.14 23.6587 133.961 26.816C138.782 29.9307 142.43 34.4107 144.905 40.256C147.38 46.1014 148.51 53.0773 148.297 61.184H138.697V57.856C138.526 48.896 136.585 42.1333 132.873 37.568C129.204 33.0027 123.828 30.72 116.745 30.72C109.321 30.72 103.625 33.1307 99.657 37.952C95.7317 42.7734 93.769 49.6427 93.769 58.56C93.769 67.264 95.7317 74.0267 99.657 78.848C103.625 83.6267 109.236 86.016 116.489 86.016C121.438 86.016 125.748 84.8853 129.417 82.624C133.129 80.32 136.052 77.0134 138.185 72.704L146.953 76.096C144.222 82.112 140.19 86.784 134.857 90.112C129.566 93.3974 123.572 95.04 116.873 95.04ZM99 61.184V53.312H143.241V61.184H99Z"
|
|
fill="currentColor"
|
|
/>
|
|
<path
|
|
d="M0 93.12V0.959961H9.408V42.496H60.352V0.959961H69.696V93.12H60.352V51.52H9.408V93.12H0Z"
|
|
fill="currentColor"
|
|
/>
|
|
</svg>
|
|
);
|
|
|
|
export const HeroUILogo: React.FC<LogoProps> = ({auto, small, outlined, ...props}) => {
|
|
if (outlined) {
|
|
return <SmallLogoOutlined {...props} />;
|
|
}
|
|
|
|
if (auto) {
|
|
return (
|
|
<div>
|
|
<SmallLogo auto={auto} {...props} />
|
|
<LargeLogo auto={auto} {...props} />
|
|
</div>
|
|
);
|
|
}
|
|
|
|
if (small) {
|
|
return <SmallLogo {...props} />;
|
|
}
|
|
|
|
return <LargeLogo auto={auto} {...props} />;
|
|
};
|