@resq-sw/ui 0.2.0
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/LICENSE.md +20 -0
- package/README.md +61 -0
- package/lib/components/accordion/accordion.d.ts +27 -0
- package/lib/components/accordion/accordion.d.ts.map +1 -0
- package/lib/components/accordion/accordion.js +71 -0
- package/lib/components/accordion/accordion.js.map +1 -0
- package/lib/components/accordion/index.d.ts +2 -0
- package/lib/components/accordion/index.js +2 -0
- package/lib/components/alert/alert.d.ts +30 -0
- package/lib/components/alert/alert.d.ts.map +1 -0
- package/lib/components/alert/alert.js +59 -0
- package/lib/components/alert/alert.js.map +1 -0
- package/lib/components/alert/index.d.ts +2 -0
- package/lib/components/alert/index.js +2 -0
- package/lib/components/alert-dialog/alert-dialog.d.ts +61 -0
- package/lib/components/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/lib/components/alert-dialog/alert-dialog.js +102 -0
- package/lib/components/alert-dialog/alert-dialog.js.map +1 -0
- package/lib/components/alert-dialog/index.d.ts +2 -0
- package/lib/components/alert-dialog/index.js +2 -0
- package/lib/components/aspect-ratio/aspect-ratio.d.ts +11 -0
- package/lib/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
- package/lib/components/aspect-ratio/aspect-ratio.js +29 -0
- package/lib/components/aspect-ratio/aspect-ratio.js.map +1 -0
- package/lib/components/aspect-ratio/index.d.ts +2 -0
- package/lib/components/aspect-ratio/index.js +2 -0
- package/lib/components/avatar/avatar.d.ts +36 -0
- package/lib/components/avatar/avatar.d.ts.map +1 -0
- package/lib/components/avatar/avatar.js +67 -0
- package/lib/components/avatar/avatar.js.map +1 -0
- package/lib/components/avatar/index.d.ts +2 -0
- package/lib/components/avatar/index.js +2 -0
- package/lib/components/badge/badge.d.ts +21 -0
- package/lib/components/badge/badge.d.ts.map +1 -0
- package/lib/components/badge/badge.js +43 -0
- package/lib/components/badge/badge.js.map +1 -0
- package/lib/components/badge/index.d.ts +2 -0
- package/lib/components/badge/index.js +2 -0
- package/lib/components/breadcrumb/breadcrumb.d.ts +40 -0
- package/lib/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/lib/components/breadcrumb/breadcrumb.js +86 -0
- package/lib/components/breadcrumb/breadcrumb.js.map +1 -0
- package/lib/components/breadcrumb/index.d.ts +2 -0
- package/lib/components/breadcrumb/index.js +2 -0
- package/lib/components/button/button.d.ts +23 -0
- package/lib/components/button/button.d.ts.map +1 -0
- package/lib/components/button/button.js +63 -0
- package/lib/components/button/button.js.map +1 -0
- package/lib/components/button/index.d.ts +2 -0
- package/lib/components/button/index.js +2 -0
- package/lib/components/button-group/button-group.d.ts +30 -0
- package/lib/components/button-group/button-group.d.ts.map +1 -0
- package/lib/components/button-group/button-group.js +55 -0
- package/lib/components/button-group/button-group.js.map +1 -0
- package/lib/components/button-group/index.d.ts +2 -0
- package/lib/components/button-group/index.js +2 -0
- package/lib/components/calendar/calendar.d.ts +32 -0
- package/lib/components/calendar/calendar.d.ts.map +1 -0
- package/lib/components/calendar/calendar.js +126 -0
- package/lib/components/calendar/calendar.js.map +1 -0
- package/lib/components/calendar/index.d.ts +2 -0
- package/lib/components/calendar/index.js +2 -0
- package/lib/components/card/card.d.ts +39 -0
- package/lib/components/card/card.d.ts.map +1 -0
- package/lib/components/card/card.js +57 -0
- package/lib/components/card/card.js.map +1 -0
- package/lib/components/card/index.d.ts +2 -0
- package/lib/components/card/index.js +2 -0
- package/lib/components/carousel/carousel.d.ts +58 -0
- package/lib/components/carousel/carousel.d.ts.map +1 -0
- package/lib/components/carousel/carousel.js +150 -0
- package/lib/components/carousel/carousel.js.map +1 -0
- package/lib/components/carousel/index.d.ts +2 -0
- package/lib/components/carousel/index.js +2 -0
- package/lib/components/chart/chart.d.ts +70 -0
- package/lib/components/chart/chart.d.ts.map +1 -0
- package/lib/components/chart/chart.js +164 -0
- package/lib/components/chart/chart.js.map +1 -0
- package/lib/components/chart/index.d.ts +2 -0
- package/lib/components/chart/index.js +2 -0
- package/lib/components/checkbox/checkbox.d.ts +13 -0
- package/lib/components/checkbox/checkbox.d.ts.map +1 -0
- package/lib/components/checkbox/checkbox.js +37 -0
- package/lib/components/checkbox/checkbox.js.map +1 -0
- package/lib/components/checkbox/index.d.ts +2 -0
- package/lib/components/checkbox/index.js +2 -0
- package/lib/components/collapsible/collapsible.d.ts +17 -0
- package/lib/components/collapsible/collapsible.d.ts.map +1 -0
- package/lib/components/collapsible/collapsible.js +41 -0
- package/lib/components/collapsible/collapsible.js.map +1 -0
- package/lib/components/collapsible/index.d.ts +2 -0
- package/lib/components/collapsible/index.js +2 -0
- package/lib/components/combobox/combobox.d.ts +83 -0
- package/lib/components/combobox/combobox.d.ts.map +1 -0
- package/lib/components/combobox/combobox.js +180 -0
- package/lib/components/combobox/combobox.js.map +1 -0
- package/lib/components/combobox/index.d.ts +2 -0
- package/lib/components/combobox/index.js +2 -0
- package/lib/components/command/command.d.ts +56 -0
- package/lib/components/command/command.d.ts.map +1 -0
- package/lib/components/command/command.js +104 -0
- package/lib/components/command/command.js.map +1 -0
- package/lib/components/command/index.d.ts +2 -0
- package/lib/components/command/index.js +2 -0
- package/lib/components/context-menu/context-menu.d.ts +81 -0
- package/lib/components/context-menu/context-menu.d.ts.map +1 -0
- package/lib/components/context-menu/context-menu.js +139 -0
- package/lib/components/context-menu/context-menu.js.map +1 -0
- package/lib/components/context-menu/index.d.ts +2 -0
- package/lib/components/context-menu/index.js +2 -0
- package/lib/components/dialog/dialog.d.ts +52 -0
- package/lib/components/dialog/dialog.d.ts.map +1 -0
- package/lib/components/dialog/dialog.js +97 -0
- package/lib/components/dialog/dialog.js.map +1 -0
- package/lib/components/dialog/index.d.ts +2 -0
- package/lib/components/dialog/index.js +2 -0
- package/lib/components/direction/direction.d.ts +17 -0
- package/lib/components/direction/direction.d.ts.map +1 -0
- package/lib/components/direction/direction.js +30 -0
- package/lib/components/direction/direction.js.map +1 -0
- package/lib/components/direction/index.d.ts +2 -0
- package/lib/components/direction/index.js +2 -0
- package/lib/components/drawer/drawer.d.ts +46 -0
- package/lib/components/drawer/drawer.d.ts.map +1 -0
- package/lib/components/drawer/drawer.js +94 -0
- package/lib/components/drawer/drawer.js.map +1 -0
- package/lib/components/drawer/index.d.ts +2 -0
- package/lib/components/drawer/index.js +2 -0
- package/lib/components/dropdown-menu/dropdown-menu.d.ts +80 -0
- package/lib/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/lib/components/dropdown-menu/dropdown-menu.js +142 -0
- package/lib/components/dropdown-menu/dropdown-menu.js.map +1 -0
- package/lib/components/dropdown-menu/index.d.ts +2 -0
- package/lib/components/dropdown-menu/index.js +2 -0
- package/lib/components/empty/empty.d.ts +37 -0
- package/lib/components/empty/empty.d.ts.map +1 -0
- package/lib/components/empty/empty.js +76 -0
- package/lib/components/empty/empty.js.map +1 -0
- package/lib/components/empty/index.d.ts +2 -0
- package/lib/components/empty/index.js +2 -0
- package/lib/components/field/field.d.ts +66 -0
- package/lib/components/field/field.d.ts.map +1 -0
- package/lib/components/field/field.js +127 -0
- package/lib/components/field/field.js.map +1 -0
- package/lib/components/field/index.d.ts +2 -0
- package/lib/components/field/index.js +2 -0
- package/lib/components/hover-card/hover-card.d.ts +21 -0
- package/lib/components/hover-card/hover-card.d.ts.map +1 -0
- package/lib/components/hover-card/hover-card.js +48 -0
- package/lib/components/hover-card/hover-card.js.map +1 -0
- package/lib/components/hover-card/index.d.ts +2 -0
- package/lib/components/hover-card/index.js +2 -0
- package/lib/components/input/index.d.ts +2 -0
- package/lib/components/input/index.js +2 -0
- package/lib/components/input/input.d.ts +13 -0
- package/lib/components/input/input.d.ts.map +1 -0
- package/lib/components/input/input.js +15 -0
- package/lib/components/input/input.js.map +1 -0
- package/lib/components/input-group/index.d.ts +2 -0
- package/lib/components/input-group/index.js +2 -0
- package/lib/components/input-group/input-group.d.ts +45 -0
- package/lib/components/input-group/input-group.d.ts.map +1 -0
- package/lib/components/input-group/input-group.js +95 -0
- package/lib/components/input-group/input-group.js.map +1 -0
- package/lib/components/input-otp/index.d.ts +2 -0
- package/lib/components/input-otp/index.js +2 -0
- package/lib/components/input-otp/input-otp.d.ts +30 -0
- package/lib/components/input-otp/input-otp.d.ts.map +1 -0
- package/lib/components/input-otp/input-otp.js +64 -0
- package/lib/components/input-otp/input-otp.js.map +1 -0
- package/lib/components/item/index.d.ts +2 -0
- package/lib/components/item/index.js +2 -0
- package/lib/components/item/item.d.ts +64 -0
- package/lib/components/item/item.d.ts.map +1 -0
- package/lib/components/item/item.js +133 -0
- package/lib/components/item/item.js.map +1 -0
- package/lib/components/kbd/index.d.ts +2 -0
- package/lib/components/kbd/index.js +2 -0
- package/lib/components/kbd/kbd.d.ts +30 -0
- package/lib/components/kbd/kbd.d.ts.map +1 -0
- package/lib/components/kbd/kbd.js +36 -0
- package/lib/components/kbd/kbd.js.map +1 -0
- package/lib/components/label/index.d.ts +2 -0
- package/lib/components/label/index.js +2 -0
- package/lib/components/label/label.d.ts +13 -0
- package/lib/components/label/label.d.ts.map +1 -0
- package/lib/components/label/label.js +31 -0
- package/lib/components/label/label.js.map +1 -0
- package/lib/components/menubar/index.d.ts +2 -0
- package/lib/components/menubar/index.js +2 -0
- package/lib/components/menubar/menubar.d.ts +86 -0
- package/lib/components/menubar/menubar.d.ts.map +1 -0
- package/lib/components/menubar/menubar.js +149 -0
- package/lib/components/menubar/menubar.js.map +1 -0
- package/lib/components/native-select/index.d.ts +2 -0
- package/lib/components/native-select/index.js +2 -0
- package/lib/components/native-select/native-select.d.ts +23 -0
- package/lib/components/native-select/native-select.d.ts.map +1 -0
- package/lib/components/native-select/native-select.js +53 -0
- package/lib/components/native-select/native-select.js.map +1 -0
- package/lib/components/navigation-menu/index.d.ts +2 -0
- package/lib/components/navigation-menu/index.js +2 -0
- package/lib/components/navigation-menu/navigation-menu.d.ts +48 -0
- package/lib/components/navigation-menu/navigation-menu.d.ts.map +1 -0
- package/lib/components/navigation-menu/navigation-menu.js +96 -0
- package/lib/components/navigation-menu/navigation-menu.js.map +1 -0
- package/lib/components/pagination/index.d.ts +2 -0
- package/lib/components/pagination/index.js +2 -0
- package/lib/components/pagination/pagination.d.ts +47 -0
- package/lib/components/pagination/pagination.d.ts.map +1 -0
- package/lib/components/pagination/pagination.js +95 -0
- package/lib/components/pagination/pagination.js.map +1 -0
- package/lib/components/popover/index.d.ts +2 -0
- package/lib/components/popover/index.js +2 -0
- package/lib/components/popover/popover.d.ts +36 -0
- package/lib/components/popover/popover.d.ts.map +1 -0
- package/lib/components/popover/popover.js +72 -0
- package/lib/components/popover/popover.js.map +1 -0
- package/lib/components/progress/index.d.ts +2 -0
- package/lib/components/progress/index.js +2 -0
- package/lib/components/progress/progress.d.ts +14 -0
- package/lib/components/progress/progress.d.ts.map +1 -0
- package/lib/components/progress/progress.js +36 -0
- package/lib/components/progress/progress.js.map +1 -0
- package/lib/components/radio-group/index.d.ts +2 -0
- package/lib/components/radio-group/index.js +2 -0
- package/lib/components/radio-group/radio-group.d.ts +17 -0
- package/lib/components/radio-group/radio-group.d.ts.map +1 -0
- package/lib/components/radio-group/radio-group.js +44 -0
- package/lib/components/radio-group/radio-group.js.map +1 -0
- package/lib/components/resizable/index.d.ts +2 -0
- package/lib/components/resizable/index.js +2 -0
- package/lib/components/resizable/resizable.d.ts +23 -0
- package/lib/components/resizable/resizable.d.ts.map +1 -0
- package/lib/components/resizable/resizable.js +45 -0
- package/lib/components/resizable/resizable.js.map +1 -0
- package/lib/components/scroll-area/index.d.ts +2 -0
- package/lib/components/scroll-area/index.js +2 -0
- package/lib/components/scroll-area/scroll-area.d.ts +19 -0
- package/lib/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/lib/components/scroll-area/scroll-area.js +53 -0
- package/lib/components/scroll-area/scroll-area.js.map +1 -0
- package/lib/components/select/index.d.ts +2 -0
- package/lib/components/select/index.js +2 -0
- package/lib/components/select/select.d.ts +55 -0
- package/lib/components/select/select.d.ts.map +1 -0
- package/lib/components/select/select.js +116 -0
- package/lib/components/select/select.js.map +1 -0
- package/lib/components/separator/index.d.ts +2 -0
- package/lib/components/separator/index.js +2 -0
- package/lib/components/separator/separator.d.ts +15 -0
- package/lib/components/separator/separator.d.ts.map +1 -0
- package/lib/components/separator/separator.js +33 -0
- package/lib/components/separator/separator.js.map +1 -0
- package/lib/components/sheet/index.d.ts +2 -0
- package/lib/components/sheet/index.js +2 -0
- package/lib/components/sheet/sheet.d.ts +44 -0
- package/lib/components/sheet/sheet.d.ts.map +1 -0
- package/lib/components/sheet/sheet.js +106 -0
- package/lib/components/sheet/sheet.js.map +1 -0
- package/lib/components/sidebar/index.d.ts +2 -0
- package/lib/components/sidebar/index.js +2 -0
- package/lib/components/sidebar/sidebar.d.ts +169 -0
- package/lib/components/sidebar/sidebar.d.ts.map +1 -0
- package/lib/components/sidebar/sidebar.js +388 -0
- package/lib/components/sidebar/sidebar.js.map +1 -0
- package/lib/components/skeleton/index.d.ts +2 -0
- package/lib/components/skeleton/index.js +2 -0
- package/lib/components/skeleton/skeleton.d.ts +26 -0
- package/lib/components/skeleton/skeleton.d.ts.map +1 -0
- package/lib/components/skeleton/skeleton.js +29 -0
- package/lib/components/skeleton/skeleton.js.map +1 -0
- package/lib/components/slider/index.d.ts +2 -0
- package/lib/components/slider/index.js +2 -0
- package/lib/components/slider/slider.d.ts +17 -0
- package/lib/components/slider/slider.d.ts.map +1 -0
- package/lib/components/slider/slider.js +53 -0
- package/lib/components/slider/slider.js.map +1 -0
- package/lib/components/sonner/index.d.ts +2 -0
- package/lib/components/sonner/index.js +2 -0
- package/lib/components/sonner/sonner.d.ts +11 -0
- package/lib/components/sonner/sonner.d.ts.map +1 -0
- package/lib/components/sonner/sonner.js +47 -0
- package/lib/components/sonner/sonner.js.map +1 -0
- package/lib/components/spinner/index.d.ts +2 -0
- package/lib/components/spinner/index.js +2 -0
- package/lib/components/spinner/spinner.d.ts +26 -0
- package/lib/components/spinner/spinner.d.ts.map +1 -0
- package/lib/components/spinner/spinner.js +31 -0
- package/lib/components/spinner/spinner.js.map +1 -0
- package/lib/components/switch/index.d.ts +2 -0
- package/lib/components/switch/index.js +2 -0
- package/lib/components/switch/switch.d.ts +16 -0
- package/lib/components/switch/switch.d.ts.map +1 -0
- package/lib/components/switch/switch.js +36 -0
- package/lib/components/switch/switch.js.map +1 -0
- package/lib/components/table/index.d.ts +2 -0
- package/lib/components/table/index.js +2 -0
- package/lib/components/table/table.d.ts +40 -0
- package/lib/components/table/table.d.ts.map +1 -0
- package/lib/components/table/table.js +83 -0
- package/lib/components/table/table.js.map +1 -0
- package/lib/components/tabs/index.d.ts +2 -0
- package/lib/components/tabs/index.js +2 -0
- package/lib/components/tabs/tabs.d.ts +32 -0
- package/lib/components/tabs/tabs.d.ts.map +1 -0
- package/lib/components/tabs/tabs.js +62 -0
- package/lib/components/tabs/tabs.js.map +1 -0
- package/lib/components/textarea/index.d.ts +2 -0
- package/lib/components/textarea/index.js +2 -0
- package/lib/components/textarea/textarea.d.ts +12 -0
- package/lib/components/textarea/textarea.d.ts.map +1 -0
- package/lib/components/textarea/textarea.js +14 -0
- package/lib/components/textarea/textarea.js.map +1 -0
- package/lib/components/toggle/index.d.ts +2 -0
- package/lib/components/toggle/index.js +2 -0
- package/lib/components/toggle/toggle.d.ts +21 -0
- package/lib/components/toggle/toggle.d.ts.map +1 -0
- package/lib/components/toggle/toggle.js +53 -0
- package/lib/components/toggle/toggle.js.map +1 -0
- package/lib/components/toggle-group/index.d.ts +2 -0
- package/lib/components/toggle-group/index.js +2 -0
- package/lib/components/toggle-group/toggle-group.d.ts +30 -0
- package/lib/components/toggle-group/toggle-group.d.ts.map +1 -0
- package/lib/components/toggle-group/toggle-group.js +68 -0
- package/lib/components/toggle-group/toggle-group.js.map +1 -0
- package/lib/components/tooltip/index.d.ts +2 -0
- package/lib/components/tooltip/index.js +2 -0
- package/lib/components/tooltip/tooltip.d.ts +25 -0
- package/lib/components/tooltip/tooltip.d.ts.map +1 -0
- package/lib/components/tooltip/tooltip.js +52 -0
- package/lib/components/tooltip/tooltip.js.map +1 -0
- package/lib/hooks/use-mobile.d.ts +20 -0
- package/lib/hooks/use-mobile.d.ts.map +1 -0
- package/lib/hooks/use-mobile.js +37 -0
- package/lib/hooks/use-mobile.js.map +1 -0
- package/lib/index.d.ts +58 -0
- package/lib/index.js +113 -0
- package/lib/lib/utils.d.ts +7 -0
- package/lib/lib/utils.d.ts.map +1 -0
- package/lib/lib/utils.js +10 -0
- package/lib/lib/utils.js.map +1 -0
- package/package.json +395 -0
- package/src/styles/globals.css +140 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { Button } from "../button/button.js";
|
|
4
|
+
import { Input } from "../input/input.js";
|
|
5
|
+
import { Textarea } from "../textarea/textarea.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
8
|
+
//#region src/components/input-group/input-group.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Copyright 2026 ResQ
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
function InputGroup({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("div", {
|
|
26
|
+
className: cn("border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-lg border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot][aria-invalid=true]]:ring-[3px] has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto", className),
|
|
27
|
+
"data-slot": "input-group",
|
|
28
|
+
role: "group",
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
const inputGroupAddonVariants = cva("text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none", {
|
|
33
|
+
defaultVariants: { align: "inline-start" },
|
|
34
|
+
variants: { align: {
|
|
35
|
+
"block-end": "px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start",
|
|
36
|
+
"block-start": "px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start",
|
|
37
|
+
"inline-end": "pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last",
|
|
38
|
+
"inline-start": "pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first"
|
|
39
|
+
} }
|
|
40
|
+
});
|
|
41
|
+
function InputGroupAddon({ align = "inline-start", className, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
44
|
+
"data-align": align,
|
|
45
|
+
"data-slot": "input-group-addon",
|
|
46
|
+
onClick: (e) => {
|
|
47
|
+
if (e.target.closest("button")) return;
|
|
48
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
49
|
+
},
|
|
50
|
+
role: "group",
|
|
51
|
+
...props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
const inputGroupButtonVariants = cva("gap-2 text-sm shadow-none flex items-center", {
|
|
55
|
+
defaultVariants: { size: "xs" },
|
|
56
|
+
variants: { size: {
|
|
57
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0",
|
|
58
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
59
|
+
sm: "",
|
|
60
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5"
|
|
61
|
+
} }
|
|
62
|
+
});
|
|
63
|
+
function InputGroupButton({ className, size = "xs", type = "button", variant = "ghost", ...props }) {
|
|
64
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
65
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
66
|
+
"data-size": size,
|
|
67
|
+
type,
|
|
68
|
+
variant,
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function InputGroupInput({ className, ...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
74
|
+
className: cn("rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1", className),
|
|
75
|
+
"data-slot": "input-group-control",
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function InputGroupText({ className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx("span", {
|
|
81
|
+
className: cn("text-muted-foreground gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none", className),
|
|
82
|
+
...props
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
86
|
+
return /* @__PURE__ */ jsx(Textarea, {
|
|
87
|
+
className: cn("rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1 resize-none", className),
|
|
88
|
+
"data-slot": "input-group-control",
|
|
89
|
+
...props
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
//#endregion
|
|
93
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=input-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-group.js","names":[],"sources":["../../../src/components/input-group/input-group.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use client\";\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/utils.js\";\nimport { Button } from \"../button/button.js\";\nimport { Input } from \"../input/input.js\";\nimport { Textarea } from \"../textarea/textarea.js\";\n\nfunction InputGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[[data-slot][aria-invalid=true]]:border-destructive dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-disabled:bg-input/50 dark:has-disabled:bg-input/80 h-8 rounded-lg border transition-colors has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:ring-[3px] has-[[data-slot][aria-invalid=true]]:ring-[3px] has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5 [[data-slot=combobox-content]_&]:focus-within:border-inherit [[data-slot=combobox-content]_&]:focus-within:ring-0 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"input-group\"\n\t\t\trole=\"group\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst inputGroupAddonVariants = cva(\n\t\"text-muted-foreground h-auto gap-2 py-1.5 text-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4 flex cursor-text items-center justify-center select-none\",\n\t{\n\t\tdefaultVariants: {\n\t\t\talign: \"inline-start\",\n\t\t},\n\t\tvariants: {\n\t\t\talign: {\n\t\t\t\t\"block-end\":\n\t\t\t\t\t\"px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2 order-last w-full justify-start\",\n\t\t\t\t\"block-start\":\n\t\t\t\t\t\"px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2 order-first w-full justify-start\",\n\t\t\t\t\"inline-end\": \"pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem] order-last\",\n\t\t\t\t\"inline-start\": \"pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem] order-first\",\n\t\t\t},\n\t\t},\n\t},\n);\n\nfunction InputGroupAddon({\n\talign = \"inline-start\",\n\tclassName,\n\t...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof inputGroupAddonVariants>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(inputGroupAddonVariants({ align }), className)}\n\t\t\tdata-align={align}\n\t\t\tdata-slot=\"input-group-addon\"\n\t\t\tonClick={(e) => {\n\t\t\t\tif ((e.target as HTMLElement).closest(\"button\")) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\te.currentTarget.parentElement?.querySelector(\"input\")?.focus();\n\t\t\t}}\n\t\t\trole=\"group\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst inputGroupButtonVariants = cva(\"gap-2 text-sm shadow-none flex items-center\", {\n\tdefaultVariants: {\n\t\tsize: \"xs\",\n\t},\n\tvariants: {\n\t\tsize: {\n\t\t\t\"icon-sm\": \"size-8 p-0 has-[>svg]:p-0\",\n\t\t\t\"icon-xs\": \"size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0\",\n\t\t\tsm: \"\",\n\t\t\txs: \"h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5\",\n\t\t},\n\t},\n});\n\nfunction InputGroupButton({\n\tclassName,\n\tsize = \"xs\",\n\ttype = \"button\",\n\tvariant = \"ghost\",\n\t...props\n}: Omit<React.ComponentProps<typeof Button>, \"size\"> &\n\tVariantProps<typeof inputGroupButtonVariants>) {\n\treturn (\n\t\t<Button\n\t\t\tclassName={cn(inputGroupButtonVariants({ size }), className)}\n\t\t\tdata-size={size}\n\t\t\ttype={type}\n\t\t\tvariant={variant}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupInput({ className, ...props }: React.ComponentProps<\"input\">) {\n\treturn (\n\t\t<Input\n\t\t\tclassName={cn(\n\t\t\t\t\"rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"input-group-control\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupText({ className, ...props }: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground gap-2 text-sm [&_svg:not([class*='size-'])]:size-4 flex items-center [&_svg]:pointer-events-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputGroupTextarea({ className, ...props }: React.ComponentProps<\"textarea\">) {\n\treturn (\n\t\t<Textarea\n\t\t\tclassName={cn(\n\t\t\t\t\"rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent flex-1 resize-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"input-group-control\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tInputGroup,\n\tInputGroupAddon,\n\tInputGroupButton,\n\tInputGroupInput,\n\tInputGroupText,\n\tInputGroupTextarea,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;AACzE,QACC,oBAAC,OAAD;EACC,WAAW,GACV,mmCACA,UACA;EACD,aAAU;EACV,MAAK;EACL,GAAI;EACH,CAAA;;AAIJ,MAAM,0BAA0B,IAC/B,2PACA;CACC,iBAAiB,EAChB,OAAO,gBACP;CACD,UAAU,EACT,OAAO;EACN,aACC;EACD,eACC;EACD,cAAc;EACd,gBAAgB;EAChB,EACD;CACD,CACD;AAED,SAAS,gBAAgB,EACxB,QAAQ,gBACR,WACA,GAAG,SAC2E;AAC9E,QACC,oBAAC,OAAD;EACC,WAAW,GAAG,wBAAwB,EAAE,OAAO,CAAC,EAAE,UAAU;EAC5D,cAAY;EACZ,aAAU;EACV,UAAU,MAAM;AACf,OAAK,EAAE,OAAuB,QAAQ,SAAS,CAC9C;AAED,KAAE,cAAc,eAAe,cAAc,QAAQ,EAAE,OAAO;;EAE/D,MAAK;EACL,GAAI;EACH,CAAA;;AAIJ,MAAM,2BAA2B,IAAI,+CAA+C;CACnF,iBAAiB,EAChB,MAAM,MACN;CACD,UAAU,EACT,MAAM;EACL,WAAW;EACX,WAAW;EACX,IAAI;EACJ,IAAI;EACJ,EACD;CACD,CAAC;AAEF,SAAS,iBAAiB,EACzB,WACA,OAAO,MACP,OAAO,UACP,UAAU,SACV,GAAG,SAE4C;AAC/C,QACC,oBAAC,QAAD;EACC,WAAW,GAAG,yBAAyB,EAAE,MAAM,CAAC,EAAE,UAAU;EAC5D,aAAW;EACL;EACG;EACT,GAAI;EACH,CAAA;;AAIJ,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAwC;AAChF,QACC,oBAAC,OAAD;EACC,WAAW,GACV,oLACA,UACA;EACD,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,eAAe,EAAE,WAAW,GAAG,SAAuC;AAC9E,QACC,oBAAC,QAAD;EACC,WAAW,GACV,0HACA,UACA;EACD,GAAI;EACH,CAAA;;AAIJ,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA2C;AACtF,QACC,oBAAC,UAAD;EACC,WAAW,GACV,qMACA,UACA;EACD,aAAU;EACV,GAAI;EACH,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime247 from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { OTPInput } from "input-otp";
|
|
4
|
+
|
|
5
|
+
//#region src/components/input-otp/input-otp.d.ts
|
|
6
|
+
|
|
7
|
+
declare function InputOTP({
|
|
8
|
+
className,
|
|
9
|
+
containerClassName,
|
|
10
|
+
...props
|
|
11
|
+
}: React.ComponentProps<typeof OTPInput> & {
|
|
12
|
+
containerClassName?: string;
|
|
13
|
+
}): react_jsx_runtime247.JSX.Element;
|
|
14
|
+
declare function InputOTPGroup({
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<"div">): react_jsx_runtime247.JSX.Element;
|
|
18
|
+
declare function InputOTPSeparator({
|
|
19
|
+
...props
|
|
20
|
+
}: React.ComponentProps<"div">): react_jsx_runtime247.JSX.Element;
|
|
21
|
+
declare function InputOTPSlot({
|
|
22
|
+
className,
|
|
23
|
+
index,
|
|
24
|
+
...props
|
|
25
|
+
}: React.ComponentProps<"div"> & {
|
|
26
|
+
index: number;
|
|
27
|
+
}): react_jsx_runtime247.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
30
|
+
//# sourceMappingURL=input-otp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.d.ts","names":[],"sources":["../../../src/components/input-otp/input-otp.tsx"],"sourcesContent":[],"mappings":";;;;;;AA6C2E,iBArBlE,QAAA,CAkCiB;EAAA,SAAe;EAAA,kBAAM;EAAqB,GAAA;CAAA,EA9BjE,KAAA,CAAM,cA8B2D,CAAA,OA9BrC,QA8BqC,CAAA,GAAA;EAa3D,kBAAY,CAAA,EAAA,MAAA;CACpB,CAAA,EA1CA,oBAAA,CAAA,GAAA,CAAA,OA0CA;iBA3BQ,aAAA,CA4BR;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA5B+C,KAAA,CAAM,cA4BrD,CAAA,KAAA,CAAA,CAAA,EA5B0E,oBAAA,CAAA,GAAA,CAAA,OA4B1E;iBAfQ,iBAAA,CAiBA;EAAA,GAAA;AAAA,CAAA,EAjBgC,KAAA,CAAM,cAiBtC,CAAA,KAAA,CAAA,CAAA,EAjB2D,oBAAA,CAAA,GAAA,CAAA,OAiB3D;iBAJA,YAAA,CAMR;EAAA,SAAA;EAAA,KAAA;EAAA,GAAA;CAAA,EAFE,KAAA,CAAM,cAER,CAAA,KAAA,CAAA,GAAA;EAAA,KAAA,EAAA,MAAA;IAAA,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { MinusIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as React from "react";
|
|
6
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
7
|
+
//#region src/components/input-otp/input-otp.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Copyright 2026 ResQ
|
|
10
|
+
*
|
|
11
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
12
|
+
* you may not use this file except in compliance with the License.
|
|
13
|
+
* You may obtain a copy of the License at
|
|
14
|
+
*
|
|
15
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
16
|
+
*
|
|
17
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
18
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
19
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
20
|
+
* See the License for the specific language governing permissions and
|
|
21
|
+
* limitations under the License.
|
|
22
|
+
*/
|
|
23
|
+
function InputOTP({ className, containerClassName, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(OTPInput, {
|
|
25
|
+
className: cn("disabled:cursor-not-allowed", className),
|
|
26
|
+
containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName),
|
|
27
|
+
"data-slot": "input-otp",
|
|
28
|
+
spellCheck: false,
|
|
29
|
+
...props
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function InputOTPGroup({ className, ...props }) {
|
|
33
|
+
return /* @__PURE__ */ jsx("div", {
|
|
34
|
+
className: cn("has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-lg has-aria-invalid:ring-[3px] flex items-center", className),
|
|
35
|
+
"data-slot": "input-otp-group",
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function InputOTPSeparator({ ...props }) {
|
|
40
|
+
return /* @__PURE__ */ jsx("div", {
|
|
41
|
+
className: "[&_svg:not([class*='size-'])]:size-4 flex items-center",
|
|
42
|
+
"data-slot": "input-otp-separator",
|
|
43
|
+
role: "separator",
|
|
44
|
+
...props,
|
|
45
|
+
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function InputOTPSlot({ className, index, ...props }) {
|
|
49
|
+
const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext).slots[index] ?? {};
|
|
50
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
className: cn("dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-8 border-y border-r text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:ring-[3px] relative flex items-center justify-center data-[active=true]:z-10", className),
|
|
52
|
+
"data-active": isActive,
|
|
53
|
+
"data-slot": "input-otp-slot",
|
|
54
|
+
...props,
|
|
55
|
+
children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
57
|
+
children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
|
|
58
|
+
})]
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=input-otp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-otp.js","names":[],"sources":["../../../src/components/input-otp/input-otp.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use client\";\n\nimport { OTPInput, OTPInputContext } from \"input-otp\";\nimport { MinusIcon } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils.js\";\n\nfunction InputOTP({\n\tclassName,\n\tcontainerClassName,\n\t...props\n}: React.ComponentProps<typeof OTPInput> & {\n\tcontainerClassName?: string;\n}) {\n\treturn (\n\t\t<OTPInput\n\t\t\tclassName={cn(\"disabled:cursor-not-allowed\", className)}\n\t\t\tcontainerClassName={cn(\n\t\t\t\t\"cn-input-otp flex items-center has-disabled:opacity-50\",\n\t\t\t\tcontainerClassName,\n\t\t\t)}\n\t\t\tdata-slot=\"input-otp\"\n\t\t\tspellCheck={false}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputOTPGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40 has-aria-invalid:border-destructive rounded-lg has-aria-invalid:ring-[3px] flex items-center\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"input-otp-group\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName=\"[&_svg:not([class*='size-'])]:size-4 flex items-center\"\n\t\t\tdata-slot=\"input-otp-separator\"\n\t\t\trole=\"separator\"\n\t\t\t{...props}\n\t\t>\n\t\t\t<MinusIcon />\n\t\t</div>\n\t);\n}\n\nfunction InputOTPSlot({\n\tclassName,\n\tindex,\n\t...props\n}: React.ComponentProps<\"div\"> & {\n\tindex: number;\n}) {\n\tconst inputOTPContext = React.useContext(OTPInputContext);\n\tconst { char, hasFakeCaret, isActive } = inputOTPContext.slots[index] ?? {};\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"dark:bg-input/30 border-input data-[active=true]:border-ring data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:ring-destructive/20 dark:data-[active=true]:aria-invalid:ring-destructive/40 aria-invalid:border-destructive data-[active=true]:aria-invalid:border-destructive size-8 border-y border-r text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:ring-[3px] relative flex items-center justify-center data-[active=true]:z-10\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-active={isActive}\n\t\t\tdata-slot=\"input-otp-slot\"\n\t\t\t{...props}\n\t\t>\n\t\t\t{char}\n\t\t\t{hasFakeCaret && (\n\t\t\t\t<div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n\t\t\t\t\t<div className=\"animate-caret-blink bg-foreground h-4 w-px duration-1000\" />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAwBA,SAAS,SAAS,EACjB,WACA,oBACA,GAAG,SAGD;AACF,QACC,oBAAC,UAAD;EACC,WAAW,GAAG,+BAA+B,UAAU;EACvD,oBAAoB,GACnB,0DACA,mBACA;EACD,aAAU;EACV,YAAY;EACZ,GAAI;EACH,CAAA;;AAIJ,SAAS,cAAc,EAAE,WAAW,GAAG,SAAsC;AAC5E,QACC,oBAAC,OAAD;EACC,WAAW,GACV,+KACA,UACA;EACD,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,kBAAkB,EAAE,GAAG,SAAsC;AACrE,QACC,oBAAC,OAAD;EACC,WAAU;EACV,aAAU;EACV,MAAK;EACL,GAAI;YAEJ,oBAAC,WAAD,EAAa,CAAA;EACR,CAAA;;AAIR,SAAS,aAAa,EACrB,WACA,OACA,GAAG,SAGD;CAEF,MAAM,EAAE,MAAM,cAAc,aADJ,MAAM,WAAW,gBAAgB,CACA,MAAM,UAAU,EAAE;AAE3E,QACC,qBAAC,OAAD;EACC,WAAW,GACV,ifACA,UACA;EACD,eAAa;EACb,aAAU;EACV,GAAI;YAPL,CASE,MACA,gBACA,oBAAC,OAAD;GAAK,WAAU;aACd,oBAAC,OAAD,EAAK,WAAU,4DAA6D,CAAA;GACvE,CAAA,CAEF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./item.js";
|
|
2
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./item.js";
|
|
2
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Separator } from "../separator/separator.js";
|
|
2
|
+
import * as react_jsx_runtime251 from "react/jsx-runtime";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import * as class_variance_authority_types10 from "class-variance-authority/types";
|
|
6
|
+
|
|
7
|
+
//#region src/components/item/item.d.ts
|
|
8
|
+
|
|
9
|
+
declare function ItemGroup({
|
|
10
|
+
className,
|
|
11
|
+
...props
|
|
12
|
+
}: React.ComponentProps<"div">): react_jsx_runtime251.JSX.Element;
|
|
13
|
+
declare function ItemSeparator({
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
}: React.ComponentProps<typeof Separator>): react_jsx_runtime251.JSX.Element;
|
|
17
|
+
declare const itemVariants: (props?: ({
|
|
18
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
19
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
20
|
+
} & class_variance_authority_types10.ClassProp) | undefined) => string;
|
|
21
|
+
declare function Item({
|
|
22
|
+
asChild,
|
|
23
|
+
className,
|
|
24
|
+
size,
|
|
25
|
+
variant,
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
28
|
+
asChild?: boolean;
|
|
29
|
+
}): react_jsx_runtime251.JSX.Element;
|
|
30
|
+
declare const itemMediaVariants: (props?: ({
|
|
31
|
+
variant?: "default" | "icon" | "image" | null | undefined;
|
|
32
|
+
} & class_variance_authority_types10.ClassProp) | undefined) => string;
|
|
33
|
+
declare function ItemActions({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}: React.ComponentProps<"div">): react_jsx_runtime251.JSX.Element;
|
|
37
|
+
declare function ItemContent({
|
|
38
|
+
className,
|
|
39
|
+
...props
|
|
40
|
+
}: React.ComponentProps<"div">): react_jsx_runtime251.JSX.Element;
|
|
41
|
+
declare function ItemDescription({
|
|
42
|
+
className,
|
|
43
|
+
...props
|
|
44
|
+
}: React.ComponentProps<"p">): react_jsx_runtime251.JSX.Element;
|
|
45
|
+
declare function ItemFooter({
|
|
46
|
+
className,
|
|
47
|
+
...props
|
|
48
|
+
}: React.ComponentProps<"div">): react_jsx_runtime251.JSX.Element;
|
|
49
|
+
declare function ItemHeader({
|
|
50
|
+
className,
|
|
51
|
+
...props
|
|
52
|
+
}: React.ComponentProps<"div">): react_jsx_runtime251.JSX.Element;
|
|
53
|
+
declare function ItemMedia({
|
|
54
|
+
className,
|
|
55
|
+
variant,
|
|
56
|
+
...props
|
|
57
|
+
}: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): react_jsx_runtime251.JSX.Element;
|
|
58
|
+
declare function ItemTitle({
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}: React.ComponentProps<"div">): react_jsx_runtime251.JSX.Element;
|
|
62
|
+
//#endregion
|
|
63
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
64
|
+
//# sourceMappingURL=item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.d.ts","names":[],"sources":["../../../src/components/item/item.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAqCsF,iBAd7E,SAAA,CA6CR;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA7C2C,KAAA,CAAM,cA6CjD,CAAA,KAAA,CAAA,CAAA,EA7CsE,oBAAA,CAAA,GAAA,CAAA,OA6CtE;iBA/BQ,aAAA,CAiCI;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAjCmC,KAAA,CAAM,cAiCzC,CAAA,OAjC+D,SAiC/D,CAAA,CAAA,EAjCyE,oBAAA,CAAA,GAAA,CAAA,OAiCzE;cAtBP,YAuBL,EAAA,CAAA,KAGA,CAHA,EAAA,CAAA;EACA,IAAA,CAAA,EAAA,SAAA,GAAA,IAAA,GAAA,IAAA,GAAA,IAAA,GAAA,SAAA;EACA,OAAA,CAAA,EAAA,SAAA,GAAA,SAAA,GAAA,OAAA,GAAA,IAAA,GAAA,SAAA;CACA,GANA,gCAAA,CAAA,SAMA,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBAJQ,IAAA,CAMA;EAAA,OAAA;EAAA,SAAA;EAAA,IAAA;EAAA,OAAA;EAAA,GAAA;CAAA,EAAN,KAAA,CAAM,cAAA,CAAA,KAAA,CAAA,GAAwB,YAAxB,CAAA,OAA4C,YAA5C,CAAA,GAAA;EAA4C,OAAA,CAAA,EAAA,OAAA;CAApB,CAAA,EAAyD,oBAAA,CAAA,GAAA,CAAA,OAAzD;cAa3B,iBAboF,EAAA,CAAA,KA4BzF,CA5ByF,EAAA,CAAA;EAAA,OAAA,CAAA,EAAA,SAAA,GAAA,MAAA,GAAA,OAAA,GAAA,IAAA,GAAA,SAAA;AAAA,CAAA,GA4BzF,gCAAA,CAAA,SAAA,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;iBAEQ,WAAA,CAAW;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAA0B,KAAA,CAAM,cAAhC,CAAA,KAAA,CAAA,CAAA,EAAqD,oBAAA,CAAA,GAAA,CAAA,OAArD;iBAMX,WAAA,CANc;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAMuB,KAAA,CAAM,cAN7B,CAAA,KAAA,CAAA,CAAA,EAMkD,oBAAA,CAAA,GAAA,CAAA,OANlD;iBAmBd,eAAA,CAnB2C;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAmBF,KAAA,CAAM,cAnBJ,CAAA,GAAA,CAAA,CAAA,EAmBuB,oBAAA,CAAA,GAAA,CAAA,OAnBvB;iBAgC3C,UAAA,CAhCgE;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAgC5B,KAAA,CAAM,cAhCsB,CAAA,KAAA,CAAA,CAAA,EAgCD,oBAAA,CAAA,GAAA,CAAA,OAhCC;iBA0ChE,UAAA,CA1CgE;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA0C5B,KAAA,CAAM,cA1CsB,CAAA,KAAA,CAAA,CAAA,EA0CD,oBAAA,CAAA,GAAA,CAAA,OA1CC;AAAA,iBAoDhE,SAAA,CA9CW;EAAA,SAAA;EAAA,OAAA;EAAA,GAAA;AAAA,CAAA,EAkDjB,KAAA,CAAM,cAlDW,CAAA,KAAA,CAAA,GAkDa,YAlDb,CAAA,OAkDiC,iBAlDjC,CAAA,CAAA,EAkDmD,oBAAA,CAAA,GAAA,CAAA,OAlDnD;iBA6DX,SAAA,CA7Dc;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EA6DqB,KAAA,CAAM,cA7D3B,CAAA,KAAA,CAAA,CAAA,EA6DgD,oBAAA,CAAA,GAAA,CAAA,OA7DhD"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { Separator as Separator$1 } from "../separator/separator.js";
|
|
3
|
+
import { Slot } from "radix-ui";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
//#region src/components/item/item.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Copyright 2026 ResQ
|
|
9
|
+
*
|
|
10
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
+
* you may not use this file except in compliance with the License.
|
|
12
|
+
* You may obtain a copy of the License at
|
|
13
|
+
*
|
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
17
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
+
* See the License for the specific language governing permissions and
|
|
20
|
+
* limitations under the License.
|
|
21
|
+
*/
|
|
22
|
+
function ItemGroup({ className, ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsx("div", {
|
|
24
|
+
className: cn("gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col", className),
|
|
25
|
+
"data-slot": "item-group",
|
|
26
|
+
role: "list",
|
|
27
|
+
...props
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function ItemSeparator({ className, ...props }) {
|
|
31
|
+
return /* @__PURE__ */ jsx(Separator$1, {
|
|
32
|
+
className: cn("my-2", className),
|
|
33
|
+
"data-slot": "item-separator",
|
|
34
|
+
orientation: "horizontal",
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const itemVariants = cva("[a]:hover:bg-muted rounded-lg border text-sm w-full group/item focus-visible:border-ring focus-visible:ring-ring/50 flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:ring-[3px] [a]:transition-colors", {
|
|
39
|
+
defaultVariants: {
|
|
40
|
+
size: "default",
|
|
41
|
+
variant: "default"
|
|
42
|
+
},
|
|
43
|
+
variants: {
|
|
44
|
+
size: {
|
|
45
|
+
default: "gap-2.5 px-3 py-2.5",
|
|
46
|
+
sm: "gap-2.5 px-3 py-2.5",
|
|
47
|
+
xs: "gap-2 px-2.5 py-2 [[data-slot=dropdown-menu-content]_&]:p-0"
|
|
48
|
+
},
|
|
49
|
+
variant: {
|
|
50
|
+
default: "border-transparent",
|
|
51
|
+
muted: "bg-muted/50 border-transparent",
|
|
52
|
+
outline: "border-border"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
function Item({ asChild = false, className, size = "default", variant = "default", ...props }) {
|
|
57
|
+
return /* @__PURE__ */ jsx(asChild ? Slot.Root : "div", {
|
|
58
|
+
className: cn(itemVariants({
|
|
59
|
+
className,
|
|
60
|
+
size,
|
|
61
|
+
variant
|
|
62
|
+
})),
|
|
63
|
+
"data-size": size,
|
|
64
|
+
"data-slot": "item",
|
|
65
|
+
"data-variant": variant,
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const itemMediaVariants = cva("gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none", {
|
|
70
|
+
defaultVariants: { variant: "default" },
|
|
71
|
+
variants: { variant: {
|
|
72
|
+
default: "bg-transparent",
|
|
73
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
74
|
+
image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
|
|
75
|
+
} }
|
|
76
|
+
});
|
|
77
|
+
function ItemActions({ className, ...props }) {
|
|
78
|
+
return /* @__PURE__ */ jsx("div", {
|
|
79
|
+
className: cn("gap-2 flex items-center", className),
|
|
80
|
+
"data-slot": "item-actions",
|
|
81
|
+
...props
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function ItemContent({ className, ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx("div", {
|
|
86
|
+
className: cn("gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none", className),
|
|
87
|
+
"data-slot": "item-content",
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function ItemDescription({ className, ...props }) {
|
|
92
|
+
return /* @__PURE__ */ jsx("p", {
|
|
93
|
+
className: cn("text-muted-foreground text-left text-sm leading-normal group-data-[size=xs]/item:text-xs [&>a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4", className),
|
|
94
|
+
"data-slot": "item-description",
|
|
95
|
+
...props
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
function ItemFooter({ className, ...props }) {
|
|
99
|
+
return /* @__PURE__ */ jsx("div", {
|
|
100
|
+
className: cn("gap-2 flex basis-full items-center justify-between", className),
|
|
101
|
+
"data-slot": "item-footer",
|
|
102
|
+
...props
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
function ItemHeader({ className, ...props }) {
|
|
106
|
+
return /* @__PURE__ */ jsx("div", {
|
|
107
|
+
className: cn("gap-2 flex basis-full items-center justify-between", className),
|
|
108
|
+
"data-slot": "item-header",
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function ItemMedia({ className, variant = "default", ...props }) {
|
|
113
|
+
return /* @__PURE__ */ jsx("div", {
|
|
114
|
+
className: cn(itemMediaVariants({
|
|
115
|
+
className,
|
|
116
|
+
variant
|
|
117
|
+
})),
|
|
118
|
+
"data-slot": "item-media",
|
|
119
|
+
"data-variant": variant,
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function ItemTitle({ className, ...props }) {
|
|
124
|
+
return /* @__PURE__ */ jsx("div", {
|
|
125
|
+
className: cn("gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center", className),
|
|
126
|
+
"data-slot": "item-title",
|
|
127
|
+
...props
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
132
|
+
|
|
133
|
+
//# sourceMappingURL=item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.js","names":["Separator"],"sources":["../../../src/components/item/item.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { Slot } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/utils.js\";\nimport { Separator } from \"../separator/separator.js\";\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"gap-4 has-[[data-size=sm]]:gap-2.5 has-[[data-size=xs]]:gap-2 group/item-group flex w-full flex-col\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"item-group\"\n\t\t\trole=\"list\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>) {\n\treturn (\n\t\t<Separator\n\t\t\tclassName={cn(\"my-2\", className)}\n\t\t\tdata-slot=\"item-separator\"\n\t\t\torientation=\"horizontal\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst itemVariants = cva(\n\t\"[a]:hover:bg-muted rounded-lg border text-sm w-full group/item focus-visible:border-ring focus-visible:ring-ring/50 flex items-center flex-wrap outline-none transition-colors duration-100 focus-visible:ring-[3px] [a]:transition-colors\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tsize: \"default\",\n\t\t\tvariant: \"default\",\n\t\t},\n\t\tvariants: {\n\t\t\tsize: {\n\t\t\t\tdefault: \"gap-2.5 px-3 py-2.5\",\n\t\t\t\tsm: \"gap-2.5 px-3 py-2.5\",\n\t\t\t\txs: \"gap-2 px-2.5 py-2 [[data-slot=dropdown-menu-content]_&]:p-0\",\n\t\t\t},\n\t\t\tvariant: {\n\t\t\t\tdefault: \"border-transparent\",\n\t\t\t\tmuted: \"bg-muted/50 border-transparent\",\n\t\t\t\toutline: \"border-border\",\n\t\t\t},\n\t\t},\n\t},\n);\n\nfunction Item({\n\tasChild = false,\n\tclassName,\n\tsize = \"default\",\n\tvariant = \"default\",\n\t...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemVariants> & { asChild?: boolean }) {\n\tconst Comp = asChild ? Slot.Root : \"div\";\n\treturn (\n\t\t<Comp\n\t\t\tclassName={cn(itemVariants({ className, size, variant }))}\n\t\t\tdata-size={size}\n\t\t\tdata-slot=\"item\"\n\t\t\tdata-variant={variant}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nconst itemMediaVariants = cva(\n\t\"gap-2 group-has-[[data-slot=item-description]]/item:translate-y-0.5 group-has-[[data-slot=item-description]]/item:self-start flex shrink-0 items-center justify-center [&_svg]:pointer-events-none\",\n\t{\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t},\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: \"bg-transparent\",\n\t\t\t\ticon: \"[&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\timage:\n\t\t\t\t\t\"size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover\",\n\t\t\t},\n\t\t},\n\t},\n);\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div className={cn(\"gap-2 flex items-center\", className)} data-slot=\"item-actions\" {...props} />\n\t);\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"gap-1 group-data-[size=xs]/item:gap-0 flex flex-1 flex-col [&+[data-slot=item-content]]:flex-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"item-content\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n\treturn (\n\t\t<p\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground text-left text-sm leading-normal group-data-[size=xs]/item:text-xs [&>a:hover]:text-primary line-clamp-2 font-normal [&>a]:underline [&>a]:underline-offset-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"item-description\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"gap-2 flex basis-full items-center justify-between\", className)}\n\t\t\tdata-slot=\"item-footer\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\"gap-2 flex basis-full items-center justify-between\", className)}\n\t\t\tdata-slot=\"item-header\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ItemMedia({\n\tclassName,\n\tvariant = \"default\",\n\t...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(itemMediaVariants({ className, variant }))}\n\t\t\tdata-slot=\"item-media\"\n\t\t\tdata-variant={variant}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"gap-2 text-sm leading-snug font-medium underline-offset-4 line-clamp-1 flex w-fit items-center\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"item-title\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tItem,\n\tItemActions,\n\tItemContent,\n\tItemDescription,\n\tItemFooter,\n\tItemGroup,\n\tItemHeader,\n\tItemMedia,\n\tItemSeparator,\n\tItemTitle,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAuBA,SAAS,UAAU,EAAE,WAAW,GAAG,SAAsC;AACxE,QACC,oBAAC,OAAD;EACC,WAAW,GACV,uGACA,UACA;EACD,aAAU;EACV,MAAK;EACL,GAAI;EACH,CAAA;;AAIJ,SAAS,cAAc,EAAE,WAAW,GAAG,SAAiD;AACvF,QACC,oBAACA,aAAD;EACC,WAAW,GAAG,QAAQ,UAAU;EAChC,aAAU;EACV,aAAY;EACZ,GAAI;EACH,CAAA;;AAIJ,MAAM,eAAe,IACpB,8OACA;CACC,iBAAiB;EAChB,MAAM;EACN,SAAS;EACT;CACD,UAAU;EACT,MAAM;GACL,SAAS;GACT,IAAI;GACJ,IAAI;GACJ;EACD,SAAS;GACR,SAAS;GACT,OAAO;GACP,SAAS;GACT;EACD;CACD,CACD;AAED,SAAS,KAAK,EACb,UAAU,OACV,WACA,OAAO,WACP,UAAU,WACV,GAAG,SACwF;AAE3F,QACC,oBAFY,UAAU,KAAK,OAAO,OAElC;EACC,WAAW,GAAG,aAAa;GAAE;GAAW;GAAM;GAAS,CAAC,CAAC;EACzD,aAAW;EACX,aAAU;EACV,gBAAc;EACd,GAAI;EACH,CAAA;;AAIJ,MAAM,oBAAoB,IACzB,sMACA;CACC,iBAAiB,EAChB,SAAS,WACT;CACD,UAAU,EACT,SAAS;EACR,SAAS;EACT,MAAM;EACN,OACC;EACD,EACD;CACD,CACD;AAED,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACC,oBAAC,OAAD;EAAK,WAAW,GAAG,2BAA2B,UAAU;EAAE,aAAU;EAAe,GAAI;EAAS,CAAA;;AAIlG,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;AAC1E,QACC,oBAAC,OAAD;EACC,WAAW,GACV,qGACA,UACA;EACD,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAoC;AAC5E,QACC,oBAAC,KAAD;EACC,WAAW,GACV,uLACA,UACA;EACD,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;AACzE,QACC,oBAAC,OAAD;EACC,WAAW,GAAG,sDAAsD,UAAU;EAC9E,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,WAAW,EAAE,WAAW,GAAG,SAAsC;AACzE,QACC,oBAAC,OAAD;EACC,WAAW,GAAG,sDAAsD,UAAU;EAC9E,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,UAAU,EAClB,WACA,UAAU,WACV,GAAG,SACqE;AACxE,QACC,oBAAC,OAAD;EACC,WAAW,GAAG,kBAAkB;GAAE;GAAW;GAAS,CAAC,CAAC;EACxD,aAAU;EACV,gBAAc;EACd,GAAI;EACH,CAAA;;AAIJ,SAAS,UAAU,EAAE,WAAW,GAAG,SAAsC;AACxE,QACC,oBAAC,OAAD;EACC,WAAW,GACV,kGACA,UACA;EACD,aAAU;EACV,GAAI;EACH,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as react_jsx_runtime261 from "react/jsx-runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/components/kbd/kbd.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Copyright 2026 ResQ
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*/
|
|
20
|
+
declare function Kbd({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<"kbd">): react_jsx_runtime261.JSX.Element;
|
|
24
|
+
declare function KbdGroup({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<"div">): react_jsx_runtime261.JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Kbd, KbdGroup };
|
|
30
|
+
//# sourceMappingURL=kbd.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.d.ts","names":[],"sources":["../../../src/components/kbd/kbd.tsx"],"sourcesContent":[],"mappings":";;;;;;;AAkBiE;;;;;AAAA;;;;;;;iBAAxD,GAAA;;;GAA6B,KAAA,CAAM,wBAAqB,oBAAA,CAAA,GAAA,CAAA;iBAaxD,QAAA;;;GAAkC,KAAA,CAAM,wBAAqB,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/kbd/kbd.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Copyright 2026 ResQ
|
|
6
|
+
*
|
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
* you may not use this file except in compliance with the License.
|
|
9
|
+
* You may obtain a copy of the License at
|
|
10
|
+
*
|
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
*
|
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
* See the License for the specific language governing permissions and
|
|
17
|
+
* limitations under the License.
|
|
18
|
+
*/
|
|
19
|
+
function Kbd({ className, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
21
|
+
className: cn("bg-muted text-muted-foreground [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none", className),
|
|
22
|
+
"data-slot": "kbd",
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function KbdGroup({ className, ...props }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
28
|
+
className: cn("gap-1 inline-flex items-center", className),
|
|
29
|
+
"data-slot": "kbd-group",
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Kbd, KbdGroup };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=kbd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kbd.js","names":[],"sources":["../../../src/components/kbd/kbd.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { cn } from \"../../lib/utils.js\";\n\nfunction Kbd({ className, ...props }: React.ComponentProps<\"kbd\">) {\n\treturn (\n\t\t<kbd\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-muted text-muted-foreground [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"kbd\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction KbdGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n\treturn (\n\t\t<kbd\n\t\t\tclassName={cn(\"gap-1 inline-flex items-center\", className)}\n\t\t\tdata-slot=\"kbd-group\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Kbd, KbdGroup };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAS,IAAI,EAAE,WAAW,GAAG,SAAsC;AAClE,QACC,oBAAC,OAAD;EACC,WAAW,GACV,4WACA,UACA;EACD,aAAU;EACV,GAAI;EACH,CAAA;;AAIJ,SAAS,SAAS,EAAE,WAAW,GAAG,SAAsC;AACvE,QACC,oBAAC,OAAD;EACC,WAAW,GAAG,kCAAkC,UAAU;EAC1D,aAAU;EACV,GAAI;EACH,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Label as Label$1 } from "radix-ui";
|
|
2
|
+
import * as react_jsx_runtime119 from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/label/label.d.ts
|
|
6
|
+
|
|
7
|
+
declare function Label({
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}: React.ComponentProps<typeof Label$1.Root>): react_jsx_runtime119.JSX.Element;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { Label };
|
|
13
|
+
//# sourceMappingURL=label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.d.ts","names":[],"sources":["../../../src/components/label/label.tsx"],"sourcesContent":[],"mappings":";;;;;;iBAuBS,KAAA;;;GAA+B,KAAA,CAAM,sBAAsB,OAAA,CAAe,QAAK,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { Label as Label$1 } from "radix-ui";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/label/label.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Copyright 2026 ResQ
|
|
8
|
+
*
|
|
9
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10
|
+
* you may not use this file except in compliance with the License.
|
|
11
|
+
* You may obtain a copy of the License at
|
|
12
|
+
*
|
|
13
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
14
|
+
*
|
|
15
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
16
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
17
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
18
|
+
* See the License for the specific language governing permissions and
|
|
19
|
+
* limitations under the License.
|
|
20
|
+
*/
|
|
21
|
+
function Label({ className, ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(Label$1.Root, {
|
|
23
|
+
className: cn("gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed", className),
|
|
24
|
+
"data-slot": "label",
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { Label };
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label.js","names":["LabelPrimitive"],"sources":["../../../src/components/label/label.tsx"],"sourcesContent":["/**\n * Copyright 2026 ResQ\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n\"use client\";\n\nimport { Label as LabelPrimitive } from \"radix-ui\";\nimport type * as React from \"react\";\n\nimport { cn } from \"../../lib/utils.js\";\n\nfunction Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>) {\n\treturn (\n\t\t<LabelPrimitive.Root\n\t\t\tclassName={cn(\n\t\t\t\t\"gap-2 text-sm leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"label\"\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport { Label };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAuBA,SAAS,MAAM,EAAE,WAAW,GAAG,SAA2D;AACzF,QACC,oBAACA,QAAe,MAAhB;EACC,WAAW,GACV,uNACA,UACA;EACD,aAAU;EACV,GAAI;EACH,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./menubar.js";
|
|
2
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger } from "./menubar.js";
|
|
2
|
+
export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|