@codefast/ui 0.0.40 → 0.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-EVN2IB57.js → chunk-6EAQQBWG.js} +2 -2
- package/dist/chunk-6EAQQBWG.js.map +1 -0
- package/dist/{chunk-YR36SVVG.mjs → chunk-7HJV22OF.mjs} +1 -1
- package/dist/chunk-7HJV22OF.mjs.map +1 -0
- package/dist/{chunk-5WJB3UAO.js → chunk-CERSQE5J.js} +1 -1
- package/dist/chunk-CERSQE5J.js.map +1 -0
- package/dist/{chunk-UPZHCTQV.js → chunk-ELWITZPX.js} +2 -2
- package/dist/chunk-ELWITZPX.js.map +1 -0
- package/dist/{chunk-WLMYX3C7.mjs → chunk-GDMHMSJ2.mjs} +2 -2
- package/dist/chunk-GDMHMSJ2.mjs.map +1 -0
- package/dist/{chunk-UJJZZCAC.js → chunk-HQ4AUOQM.js} +1 -1
- package/dist/{chunk-UJJZZCAC.js.map → chunk-HQ4AUOQM.js.map} +1 -1
- package/dist/{chunk-HLXU3SQI.mjs → chunk-HWEFQSTC.mjs} +1 -1
- package/dist/chunk-HWEFQSTC.mjs.map +1 -0
- package/dist/{chunk-JTAXNFUM.mjs → chunk-HX5YKP4E.mjs} +2 -2
- package/dist/chunk-HX5YKP4E.mjs.map +1 -0
- package/dist/{chunk-PLX35IKX.mjs → chunk-I6QCJDIF.mjs} +1 -1
- package/dist/chunk-I6QCJDIF.mjs.map +1 -0
- package/dist/{chunk-466PAJCA.mjs → chunk-LEUB3C3L.mjs} +1 -1
- package/dist/chunk-LEUB3C3L.mjs.map +1 -0
- package/dist/{chunk-KJ77RPJ4.mjs → chunk-M5UKNISJ.mjs} +2 -2
- package/dist/chunk-M5UKNISJ.mjs.map +1 -0
- package/dist/{chunk-EYERINEJ.js → chunk-MZJL73RI.js} +1 -1
- package/dist/chunk-MZJL73RI.js.map +1 -0
- package/dist/{chunk-JCMRDCFT.js → chunk-NH6X3FON.js} +1 -1
- package/dist/{chunk-JCMRDCFT.js.map → chunk-NH6X3FON.js.map} +1 -1
- package/dist/{chunk-UDNWQQ3I.js → chunk-NSK74YTM.js} +2 -2
- package/dist/chunk-NSK74YTM.js.map +1 -0
- package/dist/{chunk-N6QGG4WS.mjs → chunk-P5AV3QU7.mjs} +2 -2
- package/dist/chunk-P5AV3QU7.mjs.map +1 -0
- package/dist/{chunk-GRQGCS7U.mjs → chunk-PWF46YXQ.mjs} +2 -2
- package/dist/chunk-PWF46YXQ.mjs.map +1 -0
- package/dist/{chunk-ZWGC5M4G.js → chunk-SCJ3W2VO.js} +2 -2
- package/dist/chunk-SCJ3W2VO.js.map +1 -0
- package/dist/{chunk-MSHUAEXI.js → chunk-SCPFGC2X.js} +2 -2
- package/dist/chunk-SCPFGC2X.js.map +1 -0
- package/dist/{chunk-JIHHUXA5.js → chunk-VXPAGNPJ.js} +2 -2
- package/dist/chunk-VXPAGNPJ.js.map +1 -0
- package/dist/{chunk-6B2PU2GG.mjs → chunk-WL65TBKJ.mjs} +2 -2
- package/dist/chunk-WL65TBKJ.mjs.map +1 -0
- package/dist/{chunk-4TJBMO2Y.mjs → chunk-WYYOCZNI.mjs} +2 -2
- package/dist/chunk-WYYOCZNI.mjs.map +1 -0
- package/dist/{chunk-FEE6PNWV.js → chunk-XM4Y2S5E.js} +2 -2
- package/dist/chunk-XM4Y2S5E.js.map +1 -0
- package/dist/{chunk-7PJR4WFR.mjs → chunk-ZEYIBYZP.mjs} +2 -2
- package/dist/chunk-ZEYIBYZP.mjs.map +1 -0
- package/dist/{chunk-AEWLL6A2.js → chunk-ZTEJNUH6.js} +2 -2
- package/dist/chunk-ZTEJNUH6.js.map +1 -0
- package/dist/lib/utils.js +1 -1
- package/dist/lib/utils.mjs +1 -1
- package/dist/plugin/animate.plugin.js +1 -1
- package/dist/plugin/animate.plugin.mjs +1 -1
- package/dist/plugin/base.plugin.js +1 -1
- package/dist/plugin/base.plugin.mjs +1 -1
- package/dist/plugin/perspective.plugin.js +1 -1
- package/dist/plugin/perspective.plugin.mjs +1 -1
- package/dist/react/accordion.js +1 -1
- package/dist/react/accordion.js.map +1 -1
- package/dist/react/accordion.mjs +1 -1
- package/dist/react/accordion.mjs.map +1 -1
- package/dist/react/alert-dialog.js +1 -1
- package/dist/react/alert-dialog.js.map +1 -1
- package/dist/react/alert-dialog.mjs +1 -1
- package/dist/react/alert-dialog.mjs.map +1 -1
- package/dist/react/alert.js +1 -1
- package/dist/react/alert.js.map +1 -1
- package/dist/react/alert.mjs +1 -1
- package/dist/react/alert.mjs.map +1 -1
- package/dist/react/aspect-ratio.js.map +1 -1
- package/dist/react/aspect-ratio.mjs.map +1 -1
- package/dist/react/avatar.js +1 -1
- package/dist/react/avatar.js.map +1 -1
- package/dist/react/avatar.mjs +1 -1
- package/dist/react/avatar.mjs.map +1 -1
- package/dist/react/badge.js +1 -1
- package/dist/react/badge.js.map +1 -1
- package/dist/react/badge.mjs +1 -1
- package/dist/react/badge.mjs.map +1 -1
- package/dist/react/blockquote.js.map +1 -1
- package/dist/react/blockquote.mjs.map +1 -1
- package/dist/react/box.d.mts +2 -2
- package/dist/react/box.d.ts +2 -2
- package/dist/react/box.js.map +1 -1
- package/dist/react/box.mjs.map +1 -1
- package/dist/react/breadcrumb.js +1 -1
- package/dist/react/breadcrumb.js.map +1 -1
- package/dist/react/breadcrumb.mjs +1 -1
- package/dist/react/breadcrumb.mjs.map +1 -1
- package/dist/react/button.js +1 -1
- package/dist/react/button.mjs +1 -1
- package/dist/react/calendar.js +1 -1
- package/dist/react/calendar.js.map +1 -1
- package/dist/react/calendar.mjs +1 -1
- package/dist/react/calendar.mjs.map +1 -1
- package/dist/react/card.js +1 -1
- package/dist/react/card.js.map +1 -1
- package/dist/react/card.mjs +1 -1
- package/dist/react/card.mjs.map +1 -1
- package/dist/react/carousel.d.mts +1 -1
- package/dist/react/carousel.d.ts +1 -1
- package/dist/react/carousel.js +1 -1
- package/dist/react/carousel.js.map +1 -1
- package/dist/react/carousel.mjs +1 -1
- package/dist/react/carousel.mjs.map +1 -1
- package/dist/react/checkbox-cards.js +1 -1
- package/dist/react/checkbox-cards.js.map +1 -1
- package/dist/react/checkbox-cards.mjs +1 -1
- package/dist/react/checkbox-cards.mjs.map +1 -1
- package/dist/react/checkbox-group.js +1 -1
- package/dist/react/checkbox-group.js.map +1 -1
- package/dist/react/checkbox-group.mjs +1 -1
- package/dist/react/checkbox-group.mjs.map +1 -1
- package/dist/react/checkbox-group.primitive.d.mts +8 -8
- package/dist/react/checkbox-group.primitive.d.ts +8 -8
- package/dist/react/checkbox-group.primitive.js +1 -1
- package/dist/react/checkbox-group.primitive.mjs +1 -1
- package/dist/react/checkbox.js +1 -1
- package/dist/react/checkbox.js.map +1 -1
- package/dist/react/checkbox.mjs +1 -1
- package/dist/react/checkbox.mjs.map +1 -1
- package/dist/react/code.js.map +1 -1
- package/dist/react/code.mjs.map +1 -1
- package/dist/react/collapsible.js +1 -1
- package/dist/react/collapsible.js.map +1 -1
- package/dist/react/collapsible.mjs +1 -1
- package/dist/react/collapsible.mjs.map +1 -1
- package/dist/react/command.js +1 -1
- package/dist/react/command.js.map +1 -1
- package/dist/react/command.mjs +1 -1
- package/dist/react/command.mjs.map +1 -1
- package/dist/react/container.js +1 -1
- package/dist/react/container.js.map +1 -1
- package/dist/react/container.mjs +1 -1
- package/dist/react/container.mjs.map +1 -1
- package/dist/react/context-menu.js +1 -1
- package/dist/react/context-menu.js.map +1 -1
- package/dist/react/context-menu.mjs +1 -1
- package/dist/react/context-menu.mjs.map +1 -1
- package/dist/react/data-table.d.mts +1 -1
- package/dist/react/data-table.d.ts +1 -1
- package/dist/react/data-table.js +1 -1
- package/dist/react/data-table.js.map +1 -1
- package/dist/react/data-table.mjs +1 -1
- package/dist/react/data-table.mjs.map +1 -1
- package/dist/react/dialog.js +1 -1
- package/dist/react/dialog.mjs +1 -1
- package/dist/react/drawer.js +1 -1
- package/dist/react/drawer.js.map +1 -1
- package/dist/react/drawer.mjs +1 -1
- package/dist/react/drawer.mjs.map +1 -1
- package/dist/react/dropdown-menu.js +1 -1
- package/dist/react/dropdown-menu.mjs +1 -1
- package/dist/react/em.js.map +1 -1
- package/dist/react/em.mjs.map +1 -1
- package/dist/react/form.js +1 -1
- package/dist/react/form.js.map +1 -1
- package/dist/react/form.mjs +1 -1
- package/dist/react/form.mjs.map +1 -1
- package/dist/react/heading.d.mts +1 -1
- package/dist/react/heading.d.ts +1 -1
- package/dist/react/heading.js.map +1 -1
- package/dist/react/heading.mjs.map +1 -1
- package/dist/react/hover-card.js +1 -1
- package/dist/react/hover-card.js.map +1 -1
- package/dist/react/hover-card.mjs +1 -1
- package/dist/react/hover-card.mjs.map +1 -1
- package/dist/react/input-otp.js +1 -1
- package/dist/react/input-otp.js.map +1 -1
- package/dist/react/input-otp.mjs +1 -1
- package/dist/react/input-otp.mjs.map +1 -1
- package/dist/react/input.js +1 -1
- package/dist/react/input.js.map +1 -1
- package/dist/react/input.mjs +1 -1
- package/dist/react/input.mjs.map +1 -1
- package/dist/react/kbd.js +1 -1
- package/dist/react/kbd.js.map +1 -1
- package/dist/react/kbd.mjs +1 -1
- package/dist/react/kbd.mjs.map +1 -1
- package/dist/react/label.js +1 -1
- package/dist/react/label.mjs +1 -1
- package/dist/react/menubar.js +1 -1
- package/dist/react/menubar.js.map +1 -1
- package/dist/react/menubar.mjs +1 -1
- package/dist/react/menubar.mjs.map +1 -1
- package/dist/react/navigation-menu.js +1 -1
- package/dist/react/navigation-menu.js.map +1 -1
- package/dist/react/navigation-menu.mjs +1 -1
- package/dist/react/navigation-menu.mjs.map +1 -1
- package/dist/react/pagination.d.mts +1 -1
- package/dist/react/pagination.d.ts +1 -1
- package/dist/react/pagination.js +1 -1
- package/dist/react/pagination.js.map +1 -1
- package/dist/react/pagination.mjs +1 -1
- package/dist/react/pagination.mjs.map +1 -1
- package/dist/react/popover.js +1 -1
- package/dist/react/popover.js.map +1 -1
- package/dist/react/popover.mjs +1 -1
- package/dist/react/popover.mjs.map +1 -1
- package/dist/react/pre.js.map +1 -1
- package/dist/react/pre.mjs.map +1 -1
- package/dist/react/progress.js +1 -1
- package/dist/react/progress.js.map +1 -1
- package/dist/react/progress.mjs +1 -1
- package/dist/react/progress.mjs.map +1 -1
- package/dist/react/quote.js.map +1 -1
- package/dist/react/quote.mjs.map +1 -1
- package/dist/react/radio-cards.js +1 -1
- package/dist/react/radio-cards.js.map +1 -1
- package/dist/react/radio-cards.mjs +1 -1
- package/dist/react/radio-cards.mjs.map +1 -1
- package/dist/react/radio-group.js +1 -1
- package/dist/react/radio-group.js.map +1 -1
- package/dist/react/radio-group.mjs +1 -1
- package/dist/react/radio-group.mjs.map +1 -1
- package/dist/react/radio.js +1 -1
- package/dist/react/radio.js.map +1 -1
- package/dist/react/radio.mjs +1 -1
- package/dist/react/radio.mjs.map +1 -1
- package/dist/react/resizable.js +1 -1
- package/dist/react/resizable.js.map +1 -1
- package/dist/react/resizable.mjs +1 -1
- package/dist/react/resizable.mjs.map +1 -1
- package/dist/react/scroll-area.js +1 -1
- package/dist/react/scroll-area.js.map +1 -1
- package/dist/react/scroll-area.mjs +1 -1
- package/dist/react/scroll-area.mjs.map +1 -1
- package/dist/react/section.js.map +1 -1
- package/dist/react/section.mjs.map +1 -1
- package/dist/react/select.js +1 -1
- package/dist/react/select.mjs +1 -1
- package/dist/react/separator.js +1 -1
- package/dist/react/separator.js.map +1 -1
- package/dist/react/separator.mjs +1 -1
- package/dist/react/separator.mjs.map +1 -1
- package/dist/react/sheet.js +1 -1
- package/dist/react/sheet.js.map +1 -1
- package/dist/react/sheet.mjs +1 -1
- package/dist/react/sheet.mjs.map +1 -1
- package/dist/react/skeleton.js +1 -1
- package/dist/react/skeleton.js.map +1 -1
- package/dist/react/skeleton.mjs +1 -1
- package/dist/react/skeleton.mjs.map +1 -1
- package/dist/react/slider.js +1 -1
- package/dist/react/slider.js.map +1 -1
- package/dist/react/slider.mjs +1 -1
- package/dist/react/slider.mjs.map +1 -1
- package/dist/react/sonner.js.map +1 -1
- package/dist/react/sonner.mjs.map +1 -1
- package/dist/react/spinner.js +1 -1
- package/dist/react/spinner.mjs +1 -1
- package/dist/react/strong.js.map +1 -1
- package/dist/react/strong.mjs.map +1 -1
- package/dist/react/switch.js +1 -1
- package/dist/react/switch.js.map +1 -1
- package/dist/react/switch.mjs +1 -1
- package/dist/react/switch.mjs.map +1 -1
- package/dist/react/table.js +1 -1
- package/dist/react/table.js.map +1 -1
- package/dist/react/table.mjs +1 -1
- package/dist/react/table.mjs.map +1 -1
- package/dist/react/tabs.js +1 -1
- package/dist/react/tabs.js.map +1 -1
- package/dist/react/tabs.mjs +1 -1
- package/dist/react/tabs.mjs.map +1 -1
- package/dist/react/text.d.mts +2 -2
- package/dist/react/text.d.ts +2 -2
- package/dist/react/text.js.map +1 -1
- package/dist/react/text.mjs.map +1 -1
- package/dist/react/textarea.js +1 -1
- package/dist/react/textarea.js.map +1 -1
- package/dist/react/textarea.mjs +1 -1
- package/dist/react/textarea.mjs.map +1 -1
- package/dist/react/toggle-group.js +1 -1
- package/dist/react/toggle-group.js.map +1 -1
- package/dist/react/toggle-group.mjs +1 -1
- package/dist/react/toggle-group.mjs.map +1 -1
- package/dist/react/toggle.js +1 -1
- package/dist/react/toggle.mjs +1 -1
- package/dist/react/tooltip.js +1 -1
- package/dist/react/tooltip.js.map +1 -1
- package/dist/react/tooltip.mjs +1 -1
- package/dist/react/tooltip.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/tailwind.config.js +1 -1
- package/dist/tailwind.config.js.map +1 -1
- package/dist/tailwind.config.mjs +1 -1
- package/dist/tailwind.config.mjs.map +1 -1
- package/package.json +7 -7
- package/plugin/animate.plugin.ts +114 -111
- package/plugin/base.plugin.ts +10 -7
- package/plugin/perspective.plugin.ts +1 -1
- package/src/lib/utils.ts +2 -2
- package/src/react/accordion.tsx +65 -41
- package/src/react/alert-dialog.tsx +130 -62
- package/src/react/alert.tsx +50 -24
- package/src/react/aspect-ratio.tsx +6 -4
- package/src/react/avatar.tsx +47 -19
- package/src/react/badge.tsx +15 -10
- package/src/react/blockquote.tsx +11 -8
- package/src/react/box.tsx +11 -9
- package/src/react/breadcrumb.tsx +62 -29
- package/src/react/button.tsx +47 -31
- package/src/react/calendar.tsx +54 -37
- package/src/react/card.tsx +64 -30
- package/src/react/carousel.tsx +101 -43
- package/src/react/checkbox-cards.tsx +60 -33
- package/src/react/checkbox-group.primitive.tsx +93 -38
- package/src/react/checkbox-group.tsx +57 -34
- package/src/react/checkbox.tsx +24 -20
- package/src/react/code.tsx +9 -7
- package/src/react/collapsible.tsx +33 -23
- package/src/react/command.tsx +140 -75
- package/src/react/container.tsx +12 -8
- package/src/react/context-menu.tsx +228 -150
- package/src/react/data-table.tsx +51 -21
- package/src/react/dialog.tsx +95 -50
- package/src/react/drawer.tsx +96 -49
- package/src/react/dropdown-menu.tsx +199 -131
- package/src/react/em.tsx +9 -7
- package/src/react/form.tsx +96 -61
- package/src/react/heading.tsx +10 -8
- package/src/react/hover-card.tsx +42 -26
- package/src/react/input-otp.tsx +48 -37
- package/src/react/input.tsx +25 -15
- package/src/react/kbd.tsx +21 -19
- package/src/react/label.tsx +16 -14
- package/src/react/menubar.tsx +214 -135
- package/src/react/navigation-menu.tsx +153 -111
- package/src/react/pagination.tsx +59 -26
- package/src/react/popover.tsx +44 -29
- package/src/react/pre.tsx +9 -7
- package/src/react/progress.tsx +26 -19
- package/src/react/quote.tsx +9 -7
- package/src/react/radio-cards.tsx +32 -12
- package/src/react/radio-group.tsx +32 -12
- package/src/react/radio.tsx +24 -20
- package/src/react/resizable.tsx +13 -8
- package/src/react/scroll-area.tsx +56 -34
- package/src/react/section.tsx +9 -7
- package/src/react/select.tsx +167 -114
- package/src/react/separator.tsx +16 -7
- package/src/react/sheet.tsx +84 -34
- package/src/react/skeleton.tsx +8 -3
- package/src/react/slider.tsx +31 -24
- package/src/react/sonner.tsx +12 -10
- package/src/react/spinner.tsx +14 -9
- package/src/react/strong.tsx +9 -7
- package/src/react/switch.tsx +18 -16
- package/src/react/table.tsx +97 -52
- package/src/react/tabs.tsx +48 -38
- package/src/react/text.tsx +13 -10
- package/src/react/textarea.tsx +17 -15
- package/src/react/toggle-group.tsx +66 -23
- package/src/react/toggle.tsx +26 -18
- package/src/react/tooltip.tsx +43 -28
- package/tailwind.config.ts +62 -62
- package/dist/chunk-466PAJCA.mjs.map +0 -1
- package/dist/chunk-4TJBMO2Y.mjs.map +0 -1
- package/dist/chunk-5WJB3UAO.js.map +0 -1
- package/dist/chunk-6B2PU2GG.mjs.map +0 -1
- package/dist/chunk-7PJR4WFR.mjs.map +0 -1
- package/dist/chunk-AEWLL6A2.js.map +0 -1
- package/dist/chunk-EVN2IB57.js.map +0 -1
- package/dist/chunk-EYERINEJ.js.map +0 -1
- package/dist/chunk-FEE6PNWV.js.map +0 -1
- package/dist/chunk-GRQGCS7U.mjs.map +0 -1
- package/dist/chunk-HLXU3SQI.mjs.map +0 -1
- package/dist/chunk-JIHHUXA5.js.map +0 -1
- package/dist/chunk-JTAXNFUM.mjs.map +0 -1
- package/dist/chunk-KJ77RPJ4.mjs.map +0 -1
- package/dist/chunk-MSHUAEXI.js.map +0 -1
- package/dist/chunk-N6QGG4WS.mjs.map +0 -1
- package/dist/chunk-PLX35IKX.mjs.map +0 -1
- package/dist/chunk-UDNWQQ3I.js.map +0 -1
- package/dist/chunk-UPZHCTQV.js.map +0 -1
- package/dist/chunk-WLMYX3C7.mjs.map +0 -1
- package/dist/chunk-YR36SVVG.mjs.map +0 -1
- package/dist/chunk-ZWGC5M4G.js.map +0 -1
- package/dist/plugin/animate.plugin.d.mts +0 -9
- package/dist/plugin/animate.plugin.d.ts +0 -9
- package/dist/plugin/base.plugin.d.mts +0 -8
- package/dist/plugin/base.plugin.d.ts +0 -8
- package/dist/plugin/perspective.plugin.d.mts +0 -8
- package/dist/plugin/perspective.plugin.d.ts +0 -8
- package/dist/tailwind.config.d.mts +0 -5
- package/dist/tailwind.config.d.ts +0 -5
package/src/react/select.tsx
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as React from
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import {
|
|
5
|
+
CaretSortIcon,
|
|
6
|
+
CheckIcon,
|
|
7
|
+
ChevronDownIcon,
|
|
8
|
+
ChevronUpIcon,
|
|
9
|
+
} from '@radix-ui/react-icons';
|
|
10
|
+
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
11
|
+
import { cn } from '../lib/utils';
|
|
7
12
|
|
|
8
13
|
/* -----------------------------------------------------------------------------
|
|
9
14
|
* Component: Select
|
|
@@ -16,14 +21,18 @@ const Select = SelectPrimitive.Root;
|
|
|
16
21
|
* Component: SelectGroup
|
|
17
22
|
* -------------------------------------------------------------------------- */
|
|
18
23
|
|
|
19
|
-
type SelectGroupProps = React.ComponentPropsWithoutRef<
|
|
24
|
+
type SelectGroupProps = React.ComponentPropsWithoutRef<
|
|
25
|
+
typeof SelectPrimitive.Group
|
|
26
|
+
>;
|
|
20
27
|
const SelectGroup = SelectPrimitive.Group;
|
|
21
28
|
|
|
22
29
|
/* -----------------------------------------------------------------------------
|
|
23
30
|
* Component: SelectValue
|
|
24
31
|
* -------------------------------------------------------------------------- */
|
|
25
32
|
|
|
26
|
-
type SelectValueProps = React.ComponentPropsWithoutRef<
|
|
33
|
+
type SelectValueProps = React.ComponentPropsWithoutRef<
|
|
34
|
+
typeof SelectPrimitive.Value
|
|
35
|
+
>;
|
|
27
36
|
const SelectValue = SelectPrimitive.Value;
|
|
28
37
|
|
|
29
38
|
/* -----------------------------------------------------------------------------
|
|
@@ -31,25 +40,28 @@ const SelectValue = SelectPrimitive.Value;
|
|
|
31
40
|
* -------------------------------------------------------------------------- */
|
|
32
41
|
|
|
33
42
|
type SelectTriggerElement = React.ElementRef<typeof SelectPrimitive.Trigger>;
|
|
34
|
-
type SelectTriggerProps = React.ComponentPropsWithoutRef<
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
type SelectTriggerProps = React.ComponentPropsWithoutRef<
|
|
44
|
+
typeof SelectPrimitive.Trigger
|
|
45
|
+
>;
|
|
46
|
+
|
|
47
|
+
const SelectTrigger = React.forwardRef<
|
|
48
|
+
SelectTriggerElement,
|
|
49
|
+
SelectTriggerProps
|
|
50
|
+
>(({ children, className, ...props }, ref) => (
|
|
51
|
+
<SelectPrimitive.Trigger
|
|
52
|
+
ref={ref}
|
|
53
|
+
className={cn(
|
|
54
|
+
'border-input placeholder:text-muted-foreground flex h-10 w-full items-center justify-between gap-2 whitespace-nowrap rounded-md border bg-transparent px-3 text-sm shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:truncate',
|
|
55
|
+
className,
|
|
56
|
+
)}
|
|
57
|
+
{...props}
|
|
58
|
+
>
|
|
59
|
+
{children}
|
|
60
|
+
<SelectPrimitive.Icon asChild>
|
|
61
|
+
<CaretSortIcon className="size-4 opacity-50" />
|
|
62
|
+
</SelectPrimitive.Icon>
|
|
63
|
+
</SelectPrimitive.Trigger>
|
|
64
|
+
));
|
|
53
65
|
|
|
54
66
|
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
55
67
|
|
|
@@ -57,20 +69,28 @@ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
|
57
69
|
* Component: SelectScrollUpButton
|
|
58
70
|
* -------------------------------------------------------------------------- */
|
|
59
71
|
|
|
60
|
-
type SelectScrollUpButtonElement = React.ElementRef<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
type SelectScrollUpButtonElement = React.ElementRef<
|
|
73
|
+
typeof SelectPrimitive.ScrollUpButton
|
|
74
|
+
>;
|
|
75
|
+
type SelectScrollUpButtonProps = React.ComponentPropsWithoutRef<
|
|
76
|
+
typeof SelectPrimitive.ScrollUpButton
|
|
77
|
+
>;
|
|
78
|
+
|
|
79
|
+
const SelectScrollUpButton = React.forwardRef<
|
|
80
|
+
SelectScrollUpButtonElement,
|
|
81
|
+
SelectScrollUpButtonProps
|
|
82
|
+
>(({ className, ...props }, ref) => (
|
|
83
|
+
<SelectPrimitive.ScrollUpButton
|
|
84
|
+
ref={ref}
|
|
85
|
+
className={cn(
|
|
86
|
+
'flex cursor-default items-center justify-center py-1',
|
|
87
|
+
className,
|
|
88
|
+
)}
|
|
89
|
+
{...props}
|
|
90
|
+
>
|
|
91
|
+
<ChevronUpIcon />
|
|
92
|
+
</SelectPrimitive.ScrollUpButton>
|
|
93
|
+
));
|
|
74
94
|
|
|
75
95
|
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
76
96
|
|
|
@@ -78,59 +98,71 @@ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
|
78
98
|
* Component: SelectScrollDownButton
|
|
79
99
|
* -------------------------------------------------------------------------- */
|
|
80
100
|
|
|
81
|
-
type SelectScrollDownButtonElement = React.ElementRef<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
101
|
+
type SelectScrollDownButtonElement = React.ElementRef<
|
|
102
|
+
typeof SelectPrimitive.ScrollDownButton
|
|
103
|
+
>;
|
|
104
|
+
type SelectScrollDownButtonProps = React.ComponentPropsWithoutRef<
|
|
105
|
+
typeof SelectPrimitive.ScrollDownButton
|
|
106
|
+
>;
|
|
107
|
+
|
|
108
|
+
const SelectScrollDownButton = React.forwardRef<
|
|
109
|
+
SelectScrollDownButtonElement,
|
|
110
|
+
SelectScrollDownButtonProps
|
|
111
|
+
>(({ className, ...props }, ref) => (
|
|
112
|
+
<SelectPrimitive.ScrollDownButton
|
|
113
|
+
ref={ref}
|
|
114
|
+
className={cn(
|
|
115
|
+
'flex cursor-default items-center justify-center py-1',
|
|
116
|
+
className,
|
|
117
|
+
)}
|
|
118
|
+
{...props}
|
|
119
|
+
>
|
|
120
|
+
<ChevronDownIcon />
|
|
121
|
+
</SelectPrimitive.ScrollDownButton>
|
|
122
|
+
));
|
|
95
123
|
|
|
96
|
-
SelectScrollDownButton.displayName =
|
|
124
|
+
SelectScrollDownButton.displayName =
|
|
125
|
+
SelectPrimitive.ScrollDownButton.displayName;
|
|
97
126
|
|
|
98
127
|
/* -----------------------------------------------------------------------------
|
|
99
128
|
* Component: SelectContent
|
|
100
129
|
* -------------------------------------------------------------------------- */
|
|
101
130
|
|
|
102
131
|
type SelectContentElement = React.ElementRef<typeof SelectPrimitive.Content>;
|
|
103
|
-
type SelectContentProps = React.ComponentPropsWithoutRef<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
132
|
+
type SelectContentProps = React.ComponentPropsWithoutRef<
|
|
133
|
+
typeof SelectPrimitive.Content
|
|
134
|
+
>;
|
|
135
|
+
|
|
136
|
+
const SelectContent = React.forwardRef<
|
|
137
|
+
SelectContentElement,
|
|
138
|
+
SelectContentProps
|
|
139
|
+
>(({ children, className, position = 'popper', ...props }, ref) => (
|
|
140
|
+
<SelectPrimitive.Portal>
|
|
141
|
+
<SelectPrimitive.Content
|
|
142
|
+
ref={ref}
|
|
143
|
+
className={cn(
|
|
144
|
+
'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=open]:fade-in data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:data-[side=bottom]:slide-in-from-top-2 data-[state=open]:data-[side=left]:slide-in-from-right-2 data-[state=open]:data-[side=right]:slide-in-from-left-2 data-[state=open]:data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:data-[side=bottom]:slide-out-to-top-2 data-[state=closed]:data-[side=left]:slide-out-to-right-2 data-[state=closed]:data-[side=right]:slide-out-to-left-2 data-[state=closed]:data-[side=top]:slide-out-to-bottom-2 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md',
|
|
145
|
+
position === 'popper' &&
|
|
146
|
+
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',
|
|
147
|
+
className,
|
|
148
|
+
)}
|
|
149
|
+
position={position}
|
|
150
|
+
{...props}
|
|
151
|
+
>
|
|
152
|
+
<SelectScrollUpButton />
|
|
153
|
+
<SelectPrimitive.Viewport
|
|
110
154
|
className={cn(
|
|
111
|
-
|
|
112
|
-
position ===
|
|
113
|
-
|
|
114
|
-
className,
|
|
155
|
+
'p-1',
|
|
156
|
+
position === 'popper' &&
|
|
157
|
+
'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',
|
|
115
158
|
)}
|
|
116
|
-
position={position}
|
|
117
|
-
{...props}
|
|
118
159
|
>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
)}
|
|
126
|
-
>
|
|
127
|
-
{children}
|
|
128
|
-
</SelectPrimitive.Viewport>
|
|
129
|
-
<SelectScrollDownButton />
|
|
130
|
-
</SelectPrimitive.Content>
|
|
131
|
-
</SelectPrimitive.Portal>
|
|
132
|
-
),
|
|
133
|
-
);
|
|
160
|
+
{children}
|
|
161
|
+
</SelectPrimitive.Viewport>
|
|
162
|
+
<SelectScrollDownButton />
|
|
163
|
+
</SelectPrimitive.Content>
|
|
164
|
+
</SelectPrimitive.Portal>
|
|
165
|
+
));
|
|
134
166
|
|
|
135
167
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
136
168
|
|
|
@@ -139,11 +171,19 @@ SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
|
139
171
|
* -------------------------------------------------------------------------- */
|
|
140
172
|
|
|
141
173
|
type SelectLabelElement = React.ElementRef<typeof SelectPrimitive.Label>;
|
|
142
|
-
type SelectLabelProps = React.ComponentPropsWithoutRef<
|
|
174
|
+
type SelectLabelProps = React.ComponentPropsWithoutRef<
|
|
175
|
+
typeof SelectPrimitive.Label
|
|
176
|
+
>;
|
|
143
177
|
|
|
144
|
-
const SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(
|
|
145
|
-
|
|
146
|
-
|
|
178
|
+
const SelectLabel = React.forwardRef<SelectLabelElement, SelectLabelProps>(
|
|
179
|
+
({ className, ...props }, ref) => (
|
|
180
|
+
<SelectPrimitive.Label
|
|
181
|
+
ref={ref}
|
|
182
|
+
className={cn('px-2 py-1.5 text-sm font-semibold', className)}
|
|
183
|
+
{...props}
|
|
184
|
+
/>
|
|
185
|
+
),
|
|
186
|
+
);
|
|
147
187
|
|
|
148
188
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
149
189
|
|
|
@@ -152,25 +192,29 @@ SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
|
152
192
|
* -------------------------------------------------------------------------- */
|
|
153
193
|
|
|
154
194
|
type SelectItemElement = React.ElementRef<typeof SelectPrimitive.Item>;
|
|
155
|
-
type SelectItemProps = React.ComponentPropsWithoutRef<
|
|
195
|
+
type SelectItemProps = React.ComponentPropsWithoutRef<
|
|
196
|
+
typeof SelectPrimitive.Item
|
|
197
|
+
>;
|
|
156
198
|
|
|
157
|
-
const SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
<
|
|
168
|
-
<
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
199
|
+
const SelectItem = React.forwardRef<SelectItemElement, SelectItemProps>(
|
|
200
|
+
({ children, className, ...props }, ref) => (
|
|
201
|
+
<SelectPrimitive.Item
|
|
202
|
+
ref={ref}
|
|
203
|
+
className={cn(
|
|
204
|
+
'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm focus:outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50',
|
|
205
|
+
className,
|
|
206
|
+
)}
|
|
207
|
+
{...props}
|
|
208
|
+
>
|
|
209
|
+
<span className="absolute right-2 flex size-3.5 items-center justify-center">
|
|
210
|
+
<SelectPrimitive.ItemIndicator>
|
|
211
|
+
<CheckIcon className="size-4" />
|
|
212
|
+
</SelectPrimitive.ItemIndicator>
|
|
213
|
+
</span>
|
|
214
|
+
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
215
|
+
</SelectPrimitive.Item>
|
|
216
|
+
),
|
|
217
|
+
);
|
|
174
218
|
|
|
175
219
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
176
220
|
|
|
@@ -178,14 +222,23 @@ SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
|
178
222
|
* Component: SelectSeparator
|
|
179
223
|
* -------------------------------------------------------------------------- */
|
|
180
224
|
|
|
181
|
-
type SelectSeparatorElement = React.ElementRef<
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
225
|
+
type SelectSeparatorElement = React.ElementRef<
|
|
226
|
+
typeof SelectPrimitive.Separator
|
|
227
|
+
>;
|
|
228
|
+
type SelectSeparatorProps = React.ComponentPropsWithoutRef<
|
|
229
|
+
typeof SelectPrimitive.Separator
|
|
230
|
+
>;
|
|
231
|
+
|
|
232
|
+
const SelectSeparator = React.forwardRef<
|
|
233
|
+
SelectSeparatorElement,
|
|
234
|
+
SelectSeparatorProps
|
|
235
|
+
>(({ className, ...props }, ref) => (
|
|
236
|
+
<SelectPrimitive.Separator
|
|
237
|
+
ref={ref}
|
|
238
|
+
className={cn('bg-muted -mx-1 my-1 h-px', className)}
|
|
239
|
+
{...props}
|
|
240
|
+
/>
|
|
241
|
+
));
|
|
189
242
|
|
|
190
243
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
191
244
|
|
package/src/react/separator.tsx
CHANGED
|
@@ -1,23 +1,32 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as SeparatorPrimitive from
|
|
5
|
-
import { cn } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
5
|
+
import { cn } from '../lib/utils';
|
|
6
6
|
|
|
7
7
|
/* -----------------------------------------------------------------------------
|
|
8
8
|
* Component: Separator
|
|
9
9
|
* -------------------------------------------------------------------------- */
|
|
10
10
|
|
|
11
11
|
type SeparatorElement = React.ElementRef<typeof SeparatorPrimitive.Root>;
|
|
12
|
-
type SeparatorProps = React.ComponentPropsWithoutRef<
|
|
12
|
+
type SeparatorProps = React.ComponentPropsWithoutRef<
|
|
13
|
+
typeof SeparatorPrimitive.Root
|
|
14
|
+
>;
|
|
13
15
|
|
|
14
16
|
const Separator = React.forwardRef<SeparatorElement, SeparatorProps>(
|
|
15
|
-
(
|
|
17
|
+
(
|
|
18
|
+
{ className, orientation = 'horizontal', decorative = true, ...props },
|
|
19
|
+
ref,
|
|
20
|
+
) => (
|
|
16
21
|
<SeparatorPrimitive.Root
|
|
17
22
|
ref={ref}
|
|
18
23
|
decorative={decorative}
|
|
19
24
|
orientation={orientation}
|
|
20
|
-
className={cn(
|
|
25
|
+
className={cn(
|
|
26
|
+
'bg-border shrink-0',
|
|
27
|
+
orientation === 'horizontal' ? 'h-px w-full' : 'h-full w-px',
|
|
28
|
+
className,
|
|
29
|
+
)}
|
|
21
30
|
{...props}
|
|
22
31
|
/>
|
|
23
32
|
),
|
package/src/react/sheet.tsx
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
2
|
|
|
3
|
-
import * as React from
|
|
4
|
-
import * as SheetPrimitive from
|
|
5
|
-
import { Cross2Icon } from
|
|
6
|
-
import { type VariantProps } from
|
|
7
|
-
import { cn, cva } from
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
import { Cross2Icon } from '@radix-ui/react-icons';
|
|
6
|
+
import { type VariantProps } from 'cva';
|
|
7
|
+
import { cn, cva } from '../lib/utils';
|
|
8
8
|
|
|
9
9
|
/* -----------------------------------------------------------------------------
|
|
10
10
|
* Variant: Sheet
|
|
11
11
|
* -------------------------------------------------------------------------- */
|
|
12
12
|
|
|
13
13
|
const sheetVariants = cva({
|
|
14
|
-
base:
|
|
14
|
+
base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 gap-4 p-6 shadow-lg',
|
|
15
15
|
variants: {
|
|
16
16
|
side: {
|
|
17
|
-
top:
|
|
17
|
+
top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 border-b',
|
|
18
18
|
bottom:
|
|
19
|
-
|
|
20
|
-
left:
|
|
19
|
+
'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 border-t',
|
|
20
|
+
left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',
|
|
21
21
|
right:
|
|
22
|
-
|
|
22
|
+
'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',
|
|
23
23
|
},
|
|
24
24
|
},
|
|
25
25
|
defaultVariants: {
|
|
26
|
-
side:
|
|
26
|
+
side: 'right',
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -40,14 +40,18 @@ const Sheet = SheetPrimitive.Root;
|
|
|
40
40
|
* Component: SheetTrigger
|
|
41
41
|
* -------------------------------------------------------------------------- */
|
|
42
42
|
|
|
43
|
-
type SheetTriggerProps = React.ComponentPropsWithoutRef<
|
|
43
|
+
type SheetTriggerProps = React.ComponentPropsWithoutRef<
|
|
44
|
+
typeof SheetPrimitive.Trigger
|
|
45
|
+
>;
|
|
44
46
|
const SheetTrigger = SheetPrimitive.Trigger;
|
|
45
47
|
|
|
46
48
|
/* -----------------------------------------------------------------------------
|
|
47
49
|
* Component: SheetClose
|
|
48
50
|
* -------------------------------------------------------------------------- */
|
|
49
51
|
|
|
50
|
-
type SheetCloseProps = React.ComponentPropsWithoutRef<
|
|
52
|
+
type SheetCloseProps = React.ComponentPropsWithoutRef<
|
|
53
|
+
typeof SheetPrimitive.Close
|
|
54
|
+
>;
|
|
51
55
|
const SheetClose = SheetPrimitive.Close;
|
|
52
56
|
|
|
53
57
|
/* -----------------------------------------------------------------------------
|
|
@@ -55,13 +59,20 @@ const SheetClose = SheetPrimitive.Close;
|
|
|
55
59
|
* -------------------------------------------------------------------------- */
|
|
56
60
|
|
|
57
61
|
type SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;
|
|
58
|
-
type SheetContentProps = React.ComponentPropsWithoutRef<
|
|
62
|
+
type SheetContentProps = React.ComponentPropsWithoutRef<
|
|
63
|
+
typeof SheetPrimitive.Content
|
|
64
|
+
> &
|
|
65
|
+
SheetVariantsProps;
|
|
59
66
|
|
|
60
67
|
const SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(
|
|
61
|
-
({ children, side =
|
|
68
|
+
({ children, side = 'right', className, ...props }, ref) => (
|
|
62
69
|
<SheetPrimitive.Portal>
|
|
63
70
|
<SheetPrimitive.Overlay className="data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80" />
|
|
64
|
-
<SheetPrimitive.Content
|
|
71
|
+
<SheetPrimitive.Content
|
|
72
|
+
ref={ref}
|
|
73
|
+
className={sheetVariants({ side, className })}
|
|
74
|
+
{...props}
|
|
75
|
+
>
|
|
65
76
|
{children}
|
|
66
77
|
<SheetPrimitive.Close className="data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none">
|
|
67
78
|
<Cross2Icon className="size-4" />
|
|
@@ -80,8 +91,19 @@ SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
|
80
91
|
|
|
81
92
|
type SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;
|
|
82
93
|
|
|
83
|
-
function SheetHeader({
|
|
84
|
-
|
|
94
|
+
function SheetHeader({
|
|
95
|
+
className,
|
|
96
|
+
...props
|
|
97
|
+
}: SheetHeaderProps): React.JSX.Element {
|
|
98
|
+
return (
|
|
99
|
+
<div
|
|
100
|
+
className={cn(
|
|
101
|
+
'flex flex-col space-y-2 text-center sm:text-left',
|
|
102
|
+
className,
|
|
103
|
+
)}
|
|
104
|
+
{...props}
|
|
105
|
+
/>
|
|
106
|
+
);
|
|
85
107
|
}
|
|
86
108
|
|
|
87
109
|
/* -----------------------------------------------------------------------------
|
|
@@ -90,22 +112,41 @@ function SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Eleme
|
|
|
90
112
|
|
|
91
113
|
type SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;
|
|
92
114
|
|
|
93
|
-
function SheetFooter({
|
|
94
|
-
|
|
115
|
+
function SheetFooter({
|
|
116
|
+
className,
|
|
117
|
+
...props
|
|
118
|
+
}: SheetFooterProps): React.JSX.Element {
|
|
119
|
+
return (
|
|
120
|
+
<div
|
|
121
|
+
className={cn(
|
|
122
|
+
'flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2',
|
|
123
|
+
className,
|
|
124
|
+
)}
|
|
125
|
+
{...props}
|
|
126
|
+
/>
|
|
127
|
+
);
|
|
95
128
|
}
|
|
96
129
|
|
|
97
|
-
SheetFooter.displayName =
|
|
130
|
+
SheetFooter.displayName = 'SheetFooter';
|
|
98
131
|
|
|
99
132
|
/* -----------------------------------------------------------------------------
|
|
100
133
|
* Component: SheetTitle
|
|
101
134
|
* -------------------------------------------------------------------------- */
|
|
102
135
|
|
|
103
136
|
type SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;
|
|
104
|
-
type SheetTitleProps = React.ComponentPropsWithoutRef<
|
|
137
|
+
type SheetTitleProps = React.ComponentPropsWithoutRef<
|
|
138
|
+
typeof SheetPrimitive.Title
|
|
139
|
+
>;
|
|
105
140
|
|
|
106
|
-
const SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(
|
|
107
|
-
|
|
108
|
-
|
|
141
|
+
const SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(
|
|
142
|
+
({ className, ...props }, ref) => (
|
|
143
|
+
<SheetPrimitive.Title
|
|
144
|
+
ref={ref}
|
|
145
|
+
className={cn('text-foreground text-lg font-semibold', className)}
|
|
146
|
+
{...props}
|
|
147
|
+
/>
|
|
148
|
+
),
|
|
149
|
+
);
|
|
109
150
|
|
|
110
151
|
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
111
152
|
|
|
@@ -113,14 +154,23 @@ SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
|
113
154
|
* Component: SheetDescription
|
|
114
155
|
* -------------------------------------------------------------------------- */
|
|
115
156
|
|
|
116
|
-
type SheetDescriptionElement = React.ElementRef<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
157
|
+
type SheetDescriptionElement = React.ElementRef<
|
|
158
|
+
typeof SheetPrimitive.Description
|
|
159
|
+
>;
|
|
160
|
+
type SheetDescriptionProps = React.ComponentPropsWithoutRef<
|
|
161
|
+
typeof SheetPrimitive.Description
|
|
162
|
+
>;
|
|
163
|
+
|
|
164
|
+
const SheetDescription = React.forwardRef<
|
|
165
|
+
SheetDescriptionElement,
|
|
166
|
+
SheetDescriptionProps
|
|
167
|
+
>(({ className, ...props }, ref) => (
|
|
168
|
+
<SheetPrimitive.Description
|
|
169
|
+
ref={ref}
|
|
170
|
+
className={cn('text-muted-foreground text-sm', className)}
|
|
171
|
+
{...props}
|
|
172
|
+
/>
|
|
173
|
+
));
|
|
124
174
|
|
|
125
175
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
126
176
|
|
package/src/react/skeleton.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import { cn } from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { cn } from '../lib/utils';
|
|
3
3
|
|
|
4
4
|
/* -----------------------------------------------------------------------------
|
|
5
5
|
* Component: Skeleton
|
|
@@ -8,7 +8,12 @@ import { cn } from "../lib/utils";
|
|
|
8
8
|
type SkeletonProps = React.HTMLAttributes<HTMLDivElement>;
|
|
9
9
|
|
|
10
10
|
function Skeleton({ className, ...props }: SkeletonProps): React.JSX.Element {
|
|
11
|
-
return
|
|
11
|
+
return (
|
|
12
|
+
<div
|
|
13
|
+
className={cn('bg-primary/10 animate-pulse rounded', className)}
|
|
14
|
+
{...props}
|
|
15
|
+
/>
|
|
16
|
+
);
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
/* -----------------------------------------------------------------------------
|