@lt-three/love3 0.0.0 → 0.1.1
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/README.md +85 -1
- package/dist/native/analytics/animation.d.ts +4 -0
- package/dist/native/analytics/animation.js +6 -0
- package/dist/native/analytics/chart.types.d.ts +25 -0
- package/dist/native/analytics/chart.types.js +0 -0
- package/dist/native/analytics/line-chart.d.ts +4 -0
- package/dist/native/analytics/line-chart.ios.d.ts +4 -0
- package/dist/native/analytics/line-chart.ios.js +24 -0
- package/dist/native/analytics/line-chart.js +33 -0
- package/dist/native/analytics/metric-card.d.ts +10 -0
- package/dist/native/analytics/metric-card.js +29 -0
- package/dist/native/analytics/multi-line-chart.d.ts +18 -0
- package/dist/native/analytics/multi-line-chart.js +216 -0
- package/dist/native/analytics/pie-chart.d.ts +15 -0
- package/dist/native/analytics/pie-chart.ios.d.ts +4 -0
- package/dist/native/analytics/pie-chart.ios.js +24 -0
- package/dist/native/analytics/pie-chart.js +92 -0
- package/dist/native/analytics/single-number.d.ts +19 -0
- package/dist/native/analytics/single-number.js +101 -0
- package/dist/native/atom/avatar.d.ts +21 -0
- package/dist/native/atom/avatar.js +46 -0
- package/dist/native/atom/badge.d.ts +28 -0
- package/dist/native/atom/badge.js +51 -0
- package/dist/native/atom/button.d.ts +46 -0
- package/dist/native/atom/button.js +109 -0
- package/dist/native/atom/checkbox.d.ts +21 -0
- package/dist/native/atom/checkbox.js +47 -0
- package/dist/native/atom/colored-value.d.ts +12 -0
- package/dist/native/atom/colored-value.js +24 -0
- package/dist/native/atom/image.d.ts +21 -0
- package/dist/native/atom/image.js +72 -0
- package/dist/native/atom/label.d.ts +18 -0
- package/dist/native/atom/label.js +33 -0
- package/dist/native/atom/link.d.ts +18 -0
- package/dist/native/atom/link.js +25 -0
- package/dist/native/atom/readout.d.ts +22 -0
- package/dist/native/atom/readout.js +39 -0
- package/dist/native/atom/search-input.d.ts +12 -0
- package/dist/native/atom/search-input.js +36 -0
- package/dist/native/atom/select.d.ts +54 -0
- package/dist/native/atom/select.js +200 -0
- package/dist/native/atom/separator.d.ts +12 -0
- package/dist/native/atom/separator.js +16 -0
- package/dist/native/atom/skeleton.d.ts +12 -0
- package/dist/native/atom/skeleton.js +39 -0
- package/dist/native/atom/slider.d.ts +32 -0
- package/dist/native/atom/slider.js +75 -0
- package/dist/native/atom/spinner.d.ts +15 -0
- package/dist/native/atom/spinner.js +25 -0
- package/dist/native/atom/switch.d.ts +18 -0
- package/dist/native/atom/switch.js +52 -0
- package/dist/native/atom/symbol.d.ts +16 -0
- package/dist/native/atom/symbol.js +38 -0
- package/dist/native/atom/symbol.types.d.ts +25 -0
- package/dist/native/atom/symbol.types.js +49 -0
- package/dist/native/atom/text-field.d.ts +49 -0
- package/dist/native/atom/text-field.js +56 -0
- package/dist/native/atom/text.d.ts +2 -0
- package/dist/native/atom/text.js +3 -0
- package/dist/native/atom/theme-toggle.d.ts +21 -0
- package/dist/native/atom/theme-toggle.js +36 -0
- package/dist/native/atom/timezone-select.d.ts +16 -0
- package/dist/native/atom/timezone-select.js +28 -0
- package/dist/native/atom/typography.d.ts +13 -0
- package/dist/native/atom/typography.js +28 -0
- package/dist/native/base/button.d.ts +61 -0
- package/dist/native/base/button.js +92 -0
- package/dist/native/base/form.d.ts +72 -0
- package/dist/native/base/form.js +113 -0
- package/dist/native/base/glass-card.d.ts +15 -0
- package/dist/native/base/glass-card.js +38 -0
- package/dist/native/base/input.d.ts +29 -0
- package/dist/native/base/input.js +27 -0
- package/dist/native/base/sheet.d.ts +71 -0
- package/dist/native/base/sheet.js +187 -0
- package/dist/native/base/text.d.ts +14 -0
- package/dist/native/base/text.js +53 -0
- package/dist/native/form/checkbox.d.ts +13 -0
- package/dist/native/form/checkbox.js +55 -0
- package/dist/native/form/date-picker.d.ts +23 -0
- package/dist/native/form/date-picker.js +119 -0
- package/dist/native/form/form.d.ts +22 -0
- package/dist/native/form/form.js +44 -0
- package/dist/native/form/radio-group.d.ts +23 -0
- package/dist/native/form/radio-group.js +88 -0
- package/dist/native/form/select.d.ts +13 -0
- package/dist/native/form/select.js +45 -0
- package/dist/native/form/slider.d.ts +14 -0
- package/dist/native/form/slider.js +42 -0
- package/dist/native/form/switch.d.ts +9 -0
- package/dist/native/form/switch.js +59 -0
- package/dist/native/form/text-area.d.ts +11 -0
- package/dist/native/form/text-area.js +50 -0
- package/dist/native/form/text-input.d.ts +18 -0
- package/dist/native/form/text-input.js +90 -0
- package/dist/native/index.d.ts +1 -0
- package/dist/native/index.js +0 -0
- package/dist/native/layout/accordion.d.ts +25 -0
- package/dist/native/layout/accordion.js +54 -0
- package/dist/native/layout/card.d.ts +47 -0
- package/dist/native/layout/card.js +57 -0
- package/dist/native/layout/description.d.ts +16 -0
- package/dist/native/layout/description.js +32 -0
- package/dist/native/layout/error.d.ts +21 -0
- package/dist/native/layout/error.js +44 -0
- package/dist/native/layout/information.d.ts +25 -0
- package/dist/native/layout/information.js +35 -0
- package/dist/native/layout/locked.d.ts +38 -0
- package/dist/native/layout/locked.js +94 -0
- package/dist/native/layout/modal.d.ts +25 -0
- package/dist/native/layout/modal.js +93 -0
- package/dist/native/layout/not-found.d.ts +17 -0
- package/dist/native/layout/not-found.js +30 -0
- package/dist/native/layout/page-frame.d.ts +23 -0
- package/dist/native/layout/page-frame.js +46 -0
- package/dist/native/layout/panel.d.ts +18 -0
- package/dist/native/layout/panel.js +23 -0
- package/dist/native/layout/reorderable-list.d.ts +42 -0
- package/dist/native/layout/reorderable-list.js +52 -0
- package/dist/native/layout/sheet.d.ts +30 -0
- package/dist/native/layout/sheet.js +46 -0
- package/dist/native/layout/simple-dialog.d.ts +16 -0
- package/dist/native/layout/simple-dialog.js +20 -0
- package/dist/native/layout/simple-table.d.ts +50 -0
- package/dist/native/layout/simple-table.js +75 -0
- package/dist/native/layout/tab-bar.d.ts +33 -0
- package/dist/native/layout/tab-bar.js +48 -0
- package/dist/native/layout/tabs.d.ts +28 -0
- package/dist/native/layout/tabs.js +54 -0
- package/dist/native/layout/tuning-panel.d.ts +24 -0
- package/dist/native/layout/tuning-panel.js +246 -0
- package/dist/native/lib/autocomplete.d.ts +7 -0
- package/dist/native/lib/autocomplete.js +34 -0
- package/dist/native/lib/breakpoints.d.ts +14 -0
- package/dist/native/lib/breakpoints.js +17 -0
- package/dist/native/lib/chart-palette.d.ts +8 -0
- package/dist/native/lib/chart-palette.js +20 -0
- package/dist/native/lib/confirm.d.ts +48 -0
- package/dist/native/lib/confirm.js +69 -0
- package/dist/native/lib/control.d.ts +24 -0
- package/dist/native/lib/control.js +0 -0
- package/dist/native/lib/external-store.d.ts +16 -0
- package/dist/native/lib/external-store.js +30 -0
- package/dist/native/lib/keyboard.d.ts +15 -0
- package/dist/native/lib/keyboard.js +24 -0
- package/dist/native/lib/labels.d.ts +15 -0
- package/dist/native/lib/labels.js +17 -0
- package/dist/native/lib/loading.d.ts +10 -0
- package/dist/native/lib/loading.js +15 -0
- package/dist/native/lib/network.d.ts +11 -0
- package/dist/native/lib/network.js +20 -0
- package/dist/native/lib/scheme.d.ts +18 -0
- package/dist/native/lib/scheme.js +22 -0
- package/dist/native/lib/snackbar.d.ts +45 -0
- package/dist/native/lib/snackbar.js +59 -0
- package/dist/native/lib/theme.d.ts +34 -0
- package/dist/native/lib/theme.js +53 -0
- package/dist/native/lib/timezone.d.ts +26 -0
- package/dist/native/lib/timezone.js +95 -0
- package/dist/native/lib/token-color.d.ts +5 -0
- package/dist/native/lib/token-color.js +13 -0
- package/dist/native/lib/token-color.web.d.ts +4 -0
- package/dist/native/lib/token-color.web.js +7 -0
- package/dist/native/lib/tuning-context.d.ts +9 -0
- package/dist/native/lib/tuning-context.js +7 -0
- package/dist/native/lib/tuning.d.ts +24 -0
- package/dist/native/lib/tuning.js +42 -0
- package/dist/native/lib/typography.d.ts +10 -0
- package/dist/native/lib/typography.js +11 -0
- package/dist/native/lib/utils.d.ts +11 -0
- package/dist/native/lib/utils.js +21 -0
- package/dist/native/once/confirm.d.ts +7 -0
- package/dist/native/once/confirm.js +60 -0
- package/dist/native/once/error-boundary.d.ts +28 -0
- package/dist/native/once/error-boundary.js +55 -0
- package/dist/native/once/loading-lock.d.ts +8 -0
- package/dist/native/once/loading-lock.js +28 -0
- package/dist/native/once/offline-banner.d.ts +15 -0
- package/dist/native/once/offline-banner.js +35 -0
- package/dist/native/once/snackbar.d.ts +17 -0
- package/dist/native/once/snackbar.js +106 -0
- package/dist/native/styles.css +46 -0
- package/dist/shared/analytics.d.ts +71 -0
- package/dist/shared/analytics.js +0 -0
- package/dist/shared/button.d.ts +7 -0
- package/dist/shared/button.js +23 -0
- package/dist/shared/form.d.ts +45 -0
- package/dist/shared/form.js +46 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.js +3 -0
- package/dist/tokens/contrast-pairs.d.ts +30 -0
- package/dist/tokens/contrast-pairs.js +404 -0
- package/dist/tokens/index.d.ts +6 -0
- package/dist/tokens/index.js +10 -0
- package/dist/tokens/styles.gen.css +250 -0
- package/dist/tokens/tokens.gen.d.ts +141 -0
- package/dist/tokens/tokens.gen.js +206 -0
- package/dist/tuning/catalog.d.ts +27 -0
- package/dist/tuning/catalog.gen.d.ts +4 -0
- package/dist/tuning/catalog.gen.js +397 -0
- package/dist/tuning/catalog.js +128 -0
- package/dist/tuning/color.d.ts +20 -0
- package/dist/tuning/color.js +80 -0
- package/dist/tuning/css.d.ts +35 -0
- package/dist/tuning/css.js +147 -0
- package/dist/tuning/index.d.ts +8 -0
- package/dist/tuning/index.js +9 -0
- package/dist/tuning/model.d.ts +33 -0
- package/dist/tuning/model.js +154 -0
- package/dist/tuning/native.d.ts +35 -0
- package/dist/tuning/native.js +80 -0
- package/dist/tuning/schema.d.ts +69 -0
- package/dist/tuning/schema.js +247 -0
- package/dist/tuning/types.d.ts +75 -0
- package/dist/tuning/types.js +39 -0
- package/dist/web/analytics/line-chart.d.ts +20 -0
- package/dist/web/analytics/line-chart.js +28 -0
- package/dist/web/analytics/metric-card.d.ts +18 -0
- package/dist/web/analytics/metric-card.js +40 -0
- package/dist/web/analytics/multi-line-chart.d.ts +39 -0
- package/dist/web/analytics/multi-line-chart.js +345 -0
- package/dist/web/atom/avatar.d.ts +11 -0
- package/dist/web/atom/avatar.js +24 -0
- package/dist/web/atom/badge.d.ts +2 -0
- package/dist/web/atom/badge.js +3 -0
- package/dist/web/atom/button.d.ts +23 -0
- package/dist/web/atom/button.js +35 -0
- package/dist/web/atom/checkbox.d.ts +19 -0
- package/dist/web/atom/checkbox.js +33 -0
- package/dist/web/atom/colored-value.d.ts +13 -0
- package/dist/web/atom/colored-value.js +24 -0
- package/dist/web/atom/help.d.ts +10 -0
- package/dist/web/atom/help.js +18 -0
- package/dist/web/atom/label.d.ts +2 -0
- package/dist/web/atom/label.js +3 -0
- package/dist/web/atom/segmented-control.d.ts +39 -0
- package/dist/web/atom/segmented-control.js +42 -0
- package/dist/web/atom/select.d.ts +43 -0
- package/dist/web/atom/select.js +93 -0
- package/dist/web/atom/separator.d.ts +2 -0
- package/dist/web/atom/separator.js +3 -0
- package/dist/web/atom/skeleton.d.ts +2 -0
- package/dist/web/atom/skeleton.js +3 -0
- package/dist/web/atom/slider.d.ts +33 -0
- package/dist/web/atom/slider.js +70 -0
- package/dist/web/atom/spinner.d.ts +8 -0
- package/dist/web/atom/spinner.js +14 -0
- package/dist/web/atom/switch.d.ts +11 -0
- package/dist/web/atom/switch.js +10 -0
- package/dist/web/atom/text-area.d.ts +23 -0
- package/dist/web/atom/text-area.js +27 -0
- package/dist/web/atom/text-field.d.ts +18 -0
- package/dist/web/atom/text-field.js +22 -0
- package/dist/web/atom/toggle-chip.d.ts +22 -0
- package/dist/web/atom/toggle-chip.js +28 -0
- package/dist/web/atom/tooltip.d.ts +23 -0
- package/dist/web/atom/tooltip.js +26 -0
- package/dist/web/atom/typography.d.ts +6 -0
- package/dist/web/atom/typography.js +23 -0
- package/dist/web/base/accordion.d.ts +9 -0
- package/dist/web/base/accordion.js +44 -0
- package/dist/web/base/alert.d.ts +11 -0
- package/dist/web/base/alert.js +37 -0
- package/dist/web/base/avatar.d.ts +8 -0
- package/dist/web/base/avatar.js +29 -0
- package/dist/web/base/badge.d.ts +12 -0
- package/dist/web/base/badge.js +26 -0
- package/dist/web/base/breadcrumb.d.ts +16 -0
- package/dist/web/base/breadcrumb.js +72 -0
- package/dist/web/base/button.d.ts +12 -0
- package/dist/web/base/button.js +47 -0
- package/dist/web/base/card.d.ts +19 -0
- package/dist/web/base/card.js +74 -0
- package/dist/web/base/checkbox.d.ts +6 -0
- package/dist/web/base/checkbox.js +21 -0
- package/dist/web/base/dialog.d.ts +20 -0
- package/dist/web/base/dialog.js +92 -0
- package/dist/web/base/dropdown-menu.d.ts +29 -0
- package/dist/web/base/dropdown-menu.js +125 -0
- package/dist/web/base/field.d.ts +27 -0
- package/dist/web/base/field.js +118 -0
- package/dist/web/base/form.d.ts +38 -0
- package/dist/web/base/form.js +110 -0
- package/dist/web/base/input.d.ts +9 -0
- package/dist/web/base/input.js +23 -0
- package/dist/web/base/label.d.ts +6 -0
- package/dist/web/base/label.js +15 -0
- package/dist/web/base/pagination.d.ts +34 -0
- package/dist/web/base/pagination.js +90 -0
- package/dist/web/base/popover.d.ts +11 -0
- package/dist/web/base/popover.js +37 -0
- package/dist/web/base/radio-group.d.ts +7 -0
- package/dist/web/base/radio-group.js +27 -0
- package/dist/web/base/scroll-area.d.ts +10 -0
- package/dist/web/base/scroll-area.js +41 -0
- package/dist/web/base/select.d.ts +17 -0
- package/dist/web/base/select.js +96 -0
- package/dist/web/base/separator.d.ts +6 -0
- package/dist/web/base/separator.js +17 -0
- package/dist/web/base/sheet.d.ts +19 -0
- package/dist/web/base/sheet.js +88 -0
- package/dist/web/base/skeleton.d.ts +5 -0
- package/dist/web/base/skeleton.js +14 -0
- package/dist/web/base/slider.d.ts +9 -0
- package/dist/web/base/slider.js +39 -0
- package/dist/web/base/sonner.d.ts +9 -0
- package/dist/web/base/sonner.js +25 -0
- package/dist/web/base/spinner.d.ts +5 -0
- package/dist/web/base/spinner.js +17 -0
- package/dist/web/base/switch.d.ts +6 -0
- package/dist/web/base/switch.js +19 -0
- package/dist/web/base/table.d.ts +14 -0
- package/dist/web/base/table.js +68 -0
- package/dist/web/base/tabs.d.ts +9 -0
- package/dist/web/base/tabs.js +36 -0
- package/dist/web/base/textarea.d.ts +9 -0
- package/dist/web/base/textarea.js +23 -0
- package/dist/web/base/tooltip.d.ts +9 -0
- package/dist/web/base/tooltip.js +36 -0
- package/dist/web/form/checkbox.d.ts +35 -0
- package/dist/web/form/checkbox.js +91 -0
- package/dist/web/form/radio-group.d.ts +24 -0
- package/dist/web/form/radio-group.js +75 -0
- package/dist/web/form/select.d.ts +16 -0
- package/dist/web/form/select.js +44 -0
- package/dist/web/form/slider.d.ts +19 -0
- package/dist/web/form/slider.js +51 -0
- package/dist/web/form/switch.d.ts +11 -0
- package/dist/web/form/switch.js +50 -0
- package/dist/web/form/text-area.d.ts +10 -0
- package/dist/web/form/text-area.js +31 -0
- package/dist/web/form/text-input.d.ts +10 -0
- package/dist/web/form/text-input.js +42 -0
- package/dist/web/index.d.ts +1 -0
- package/dist/web/index.js +0 -0
- package/dist/web/layout/accordion.d.ts +26 -0
- package/dist/web/layout/accordion.js +29 -0
- package/dist/web/layout/alert-modal.d.ts +41 -0
- package/dist/web/layout/alert-modal.js +71 -0
- package/dist/web/layout/card.d.ts +17 -0
- package/dist/web/layout/card.js +35 -0
- package/dist/web/layout/description.d.ts +12 -0
- package/dist/web/layout/description.js +20 -0
- package/dist/web/layout/information.d.ts +36 -0
- package/dist/web/layout/information.js +53 -0
- package/dist/web/layout/modal.d.ts +16 -0
- package/dist/web/layout/modal.js +37 -0
- package/dist/web/layout/page-frame.d.ts +37 -0
- package/dist/web/layout/page-frame.js +79 -0
- package/dist/web/layout/scroll-area.d.ts +10 -0
- package/dist/web/layout/scroll-area.js +13 -0
- package/dist/web/layout/sheet.d.ts +32 -0
- package/dist/web/layout/sheet.js +68 -0
- package/dist/web/layout/simple-dialog.d.ts +11 -0
- package/dist/web/layout/simple-dialog.js +24 -0
- package/dist/web/layout/simple-table.d.ts +49 -0
- package/dist/web/layout/simple-table.js +58 -0
- package/dist/web/layout/tabs.d.ts +26 -0
- package/dist/web/layout/tabs.js +42 -0
- package/dist/web/layout/titled-modal.d.ts +32 -0
- package/dist/web/layout/titled-modal.js +58 -0
- package/dist/web/lib/css-vars.d.ts +14 -0
- package/dist/web/lib/css-vars.js +18 -0
- package/dist/web/lib/dialog.d.ts +13 -0
- package/dist/web/lib/dialog.js +0 -0
- package/dist/web/lib/form.d.ts +2 -0
- package/dist/web/lib/form.js +3 -0
- package/dist/web/lib/labels.d.ts +27 -0
- package/dist/web/lib/labels.js +29 -0
- package/dist/web/lib/modal-open-focus.d.ts +17 -0
- package/dist/web/lib/modal-open-focus.js +44 -0
- package/dist/web/lib/restore-focus.d.ts +12 -0
- package/dist/web/lib/restore-focus.js +32 -0
- package/dist/web/lib/utils.d.ts +4 -0
- package/dist/web/lib/utils.js +10 -0
- package/dist/web/styles.css +162 -0
- package/package.json +203 -4
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
5
|
+
|
|
6
|
+
//#region src/web/base/select.tsx
|
|
7
|
+
function Select({ ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, {
|
|
9
|
+
"data-slot": "select",
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function SelectGroup({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, {
|
|
15
|
+
"data-slot": "select-group",
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function SelectValue({ ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, {
|
|
21
|
+
"data-slot": "select-value",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
27
|
+
"data-slot": "select-trigger",
|
|
28
|
+
"data-size": size,
|
|
29
|
+
className: cn("cursor-pointer border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/25 aria-invalid:ring-destructive/20 aria-invalid:border-destructive hover:bg-accent flex w-fit items-center justify-between gap-2 rounded-control border bg-card px-2.5 py-1.5 text-[13px] whitespace-nowrap shadow-xs outline-none transition-[border-color,box-shadow,background-color] focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=xs]:h-6 data-[size=xs]:px-2 data-[size=xs]:py-1 data-[size=xs]:text-xs data-[size=xs]:gap-1 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
30
|
+
...props,
|
|
31
|
+
children: [children, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
32
|
+
asChild: true,
|
|
33
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function SelectContent({ className, children, position = "popper", ...props }) {
|
|
38
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
|
|
39
|
+
"data-slot": "select-content",
|
|
40
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-surface border border-border shadow-lg", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
41
|
+
position,
|
|
42
|
+
...props,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
45
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
46
|
+
className: cn("p-1", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
47
|
+
children
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
50
|
+
]
|
|
51
|
+
}) });
|
|
52
|
+
}
|
|
53
|
+
function SelectLabel({ className, ...props }) {
|
|
54
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Label, {
|
|
55
|
+
"data-slot": "select-label",
|
|
56
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function SelectItem({ className, children, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
62
|
+
"data-slot": "select-item",
|
|
63
|
+
className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-pointer items-center gap-2 rounded-control py-1.5 pr-8 pl-2 text-[13px] outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
64
|
+
...props,
|
|
65
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
67
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
68
|
+
}), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })]
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function SelectSeparator({ className, ...props }) {
|
|
72
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Separator, {
|
|
73
|
+
"data-slot": "select-separator",
|
|
74
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, {
|
|
80
|
+
"data-slot": "select-scroll-up-button",
|
|
81
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
82
|
+
...props,
|
|
83
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
87
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, {
|
|
88
|
+
"data-slot": "select-scroll-down-button",
|
|
89
|
+
className: cn("flex cursor-default items-center justify-center py-1", className),
|
|
90
|
+
...props,
|
|
91
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
+
//#region src/web/base/separator.d.ts
|
|
4
|
+
declare function Separator({ className, orientation, decorative, ...props }: React$1.ComponentProps<typeof SeparatorPrimitive.Root>): React$1.JSX.Element;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { Separator };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
4
|
+
|
|
5
|
+
//#region src/web/base/separator.tsx
|
|
6
|
+
function Separator({ className, orientation = "horizontal", decorative = true, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(SeparatorPrimitive.Root, {
|
|
8
|
+
"data-slot": "separator",
|
|
9
|
+
decorative,
|
|
10
|
+
orientation,
|
|
11
|
+
className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Separator };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
//#region src/web/base/sheet.d.ts
|
|
4
|
+
declare function Sheet({ ...props }: React$1.ComponentProps<typeof SheetPrimitive.Root>): React$1.JSX.Element;
|
|
5
|
+
declare function SheetTrigger({ ...props }: React$1.ComponentProps<typeof SheetPrimitive.Trigger>): React$1.JSX.Element;
|
|
6
|
+
declare function SheetClose({ ...props }: React$1.ComponentProps<typeof SheetPrimitive.Close>): React$1.JSX.Element;
|
|
7
|
+
declare function SheetContent({ className, children, side, showCloseButton, closeLabel, onClose, onOpenAutoFocus, onCloseAutoFocus, ...props }: React$1.ComponentProps<typeof SheetPrimitive.Content> & {
|
|
8
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
9
|
+
showCloseButton?: boolean;
|
|
10
|
+
/** Accessible name of the close button */
|
|
11
|
+
closeLabel?: string;
|
|
12
|
+
onClose?: () => void;
|
|
13
|
+
}): React$1.JSX.Element;
|
|
14
|
+
declare function SheetHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
15
|
+
declare function SheetFooter({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
|
|
16
|
+
declare function SheetTitle({ className, ...props }: React$1.ComponentProps<typeof SheetPrimitive.Title>): React$1.JSX.Element;
|
|
17
|
+
declare function SheetDescription({ className, ...props }: React$1.ComponentProps<typeof SheetPrimitive.Description>): React$1.JSX.Element;
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { CLOSE_LABEL } from "../lib/labels.js";
|
|
3
|
+
import { useRestoreFocus } from "../lib/restore-focus.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
7
|
+
|
|
8
|
+
//#region src/web/base/sheet.tsx
|
|
9
|
+
function Sheet({ ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Root, {
|
|
11
|
+
"data-slot": "sheet",
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function SheetTrigger({ ...props }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Trigger, {
|
|
17
|
+
"data-slot": "sheet-trigger",
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function SheetClose({ ...props }) {
|
|
22
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Close, {
|
|
23
|
+
"data-slot": "sheet-close",
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function SheetPortal({ ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Portal, {
|
|
29
|
+
"data-slot": "sheet-portal",
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function SheetOverlay({ className, ...props }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Overlay, {
|
|
35
|
+
"data-slot": "sheet-overlay",
|
|
36
|
+
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-scrim duration-200", className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function SheetContent({ className, children, side = "right", showCloseButton = true, closeLabel = CLOSE_LABEL, onClose, onOpenAutoFocus, onCloseAutoFocus, ...props }) {
|
|
41
|
+
const focus = useRestoreFocus(onOpenAutoFocus, onCloseAutoFocus);
|
|
42
|
+
return /* @__PURE__ */ jsxs(SheetPortal, { children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(SheetPrimitive.Content, {
|
|
43
|
+
"data-slot": "sheet-content",
|
|
44
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition duration-200 ease-out", side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-[90%] rounded-l-surface sm:max-w-lg", side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-[90%] rounded-r-surface sm:max-w-lg", side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto rounded-b-surface", side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto rounded-t-surface", className),
|
|
45
|
+
onOpenAutoFocus: focus.onOpenAutoFocus,
|
|
46
|
+
onCloseAutoFocus: focus.onCloseAutoFocus,
|
|
47
|
+
...props,
|
|
48
|
+
children: [children, showCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
|
|
49
|
+
className: "text-muted-foreground hover:bg-accent hover:text-foreground absolute top-3.5 right-3.5 flex size-7 cursor-pointer items-center justify-center rounded-control outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-popover disabled:pointer-events-none",
|
|
50
|
+
onClick: onClose,
|
|
51
|
+
children: [/* @__PURE__ */ jsx(XIcon, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
52
|
+
className: "sr-only",
|
|
53
|
+
children: closeLabel
|
|
54
|
+
})]
|
|
55
|
+
})]
|
|
56
|
+
})] });
|
|
57
|
+
}
|
|
58
|
+
function SheetHeader({ className, ...props }) {
|
|
59
|
+
return /* @__PURE__ */ jsx("div", {
|
|
60
|
+
"data-slot": "sheet-header",
|
|
61
|
+
className: cn("flex flex-col gap-1.5 p-5", className),
|
|
62
|
+
...props
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function SheetFooter({ className, ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx("div", {
|
|
67
|
+
"data-slot": "sheet-footer",
|
|
68
|
+
className: cn("mt-auto flex flex-col gap-2 p-5", className),
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function SheetTitle({ className, ...props }) {
|
|
73
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Title, {
|
|
74
|
+
"data-slot": "sheet-title",
|
|
75
|
+
className: cn("text-foreground text-base leading-6 font-semibold", className),
|
|
76
|
+
...props
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
function SheetDescription({ className, ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx(SheetPrimitive.Description, {
|
|
81
|
+
"data-slot": "sheet-description",
|
|
82
|
+
className: cn("text-muted-foreground text-[13px] leading-5", className),
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
//#endregion
|
|
88
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/web/base/skeleton.tsx
|
|
5
|
+
function Skeleton({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
"data-slot": "skeleton",
|
|
8
|
+
className: cn("bg-accent animate-pulse rounded-control", className),
|
|
9
|
+
...props
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Skeleton };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
+
//#region src/web/base/slider.d.ts
|
|
4
|
+
declare function Slider({ className, defaultValue, value, min, max, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, thumbLabels, ...props }: React$1.ComponentProps<typeof SliderPrimitive.Root> & {
|
|
5
|
+
/** Accessible name per thumb (when you want to tell the thumbs of a range apart). If absent, `aria-label` is applied to all thumbs */
|
|
6
|
+
thumbLabels?: readonly string[];
|
|
7
|
+
}): React$1.JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Slider };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
5
|
+
|
|
6
|
+
//#region src/web/base/slider.tsx
|
|
7
|
+
function Slider({ className, defaultValue, value, min = 0, max = 100, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, thumbLabels, ...props }) {
|
|
8
|
+
const thumbValues = React$1.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
9
|
+
value,
|
|
10
|
+
defaultValue,
|
|
11
|
+
min,
|
|
12
|
+
max
|
|
13
|
+
]);
|
|
14
|
+
return /* @__PURE__ */ jsxs(SliderPrimitive.Root, {
|
|
15
|
+
"data-slot": "slider",
|
|
16
|
+
defaultValue,
|
|
17
|
+
value,
|
|
18
|
+
min,
|
|
19
|
+
max,
|
|
20
|
+
className: cn("group/slider relative flex w-full touch-none items-center select-none data-[disabled]:opacity-50 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-auto data-[orientation=vertical]:flex-col", className),
|
|
21
|
+
...props,
|
|
22
|
+
children: [/* @__PURE__ */ jsx(SliderPrimitive.Track, {
|
|
23
|
+
"data-slot": "slider-track",
|
|
24
|
+
className: cn("bg-muted relative grow overflow-hidden rounded-full group-aria-invalid/slider:ring-1 group-aria-invalid/slider:ring-destructive data-[orientation=horizontal]:h-1.5 data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-1.5"),
|
|
25
|
+
children: /* @__PURE__ */ jsx(SliderPrimitive.Range, {
|
|
26
|
+
"data-slot": "slider-range",
|
|
27
|
+
className: cn("bg-action group-aria-invalid/slider:bg-destructive absolute data-[orientation=horizontal]:h-full data-[orientation=vertical]:w-full")
|
|
28
|
+
})
|
|
29
|
+
}), Array.from({ length: thumbValues.length }, (_, index) => /* @__PURE__ */ jsx(SliderPrimitive.Thumb, {
|
|
30
|
+
"data-slot": "slider-thumb",
|
|
31
|
+
"aria-label": thumbLabels?.[index] ?? ariaLabel,
|
|
32
|
+
"aria-labelledby": ariaLabelledby,
|
|
33
|
+
className: "border-action group-aria-invalid/slider:border-destructive bg-card block size-4 shrink-0 rounded-full border-2 shadow-sm hover:ring-4 hover:ring-action/25 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50"
|
|
34
|
+
}, `thumb-${index.toString()}`))]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Slider };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ToasterProps } from "sonner";
|
|
2
|
+
//#region src/web/base/sonner.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Where notifications are rendered. The theme is passed with `theme` (defaults to following the OS).
|
|
5
|
+
* love3 holds no app state (such as where the theme is stored), so the theme is not read here.
|
|
6
|
+
*/
|
|
7
|
+
declare const Toaster: ({ ...props }: ToasterProps) => import("react").JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Toaster };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { cssVars } from "../lib/css-vars.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Toaster as Toaster$1 } from "sonner";
|
|
4
|
+
|
|
5
|
+
//#region src/web/base/sonner.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Where notifications are rendered. The theme is passed with `theme` (defaults to following the OS).
|
|
8
|
+
* love3 holds no app state (such as where the theme is stored), so the theme is not read here.
|
|
9
|
+
*/
|
|
10
|
+
const Toaster = ({ ...props }) => {
|
|
11
|
+
return /* @__PURE__ */ jsx(Toaster$1, {
|
|
12
|
+
theme: "system",
|
|
13
|
+
className: "toaster group",
|
|
14
|
+
style: cssVars({
|
|
15
|
+
"--normal-bg": "var(--popover)",
|
|
16
|
+
"--normal-text": "var(--popover-foreground)",
|
|
17
|
+
"--normal-border": "var(--border)",
|
|
18
|
+
"--border-radius": "var(--radius-surface)"
|
|
19
|
+
}),
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
//#endregion
|
|
25
|
+
export { Toaster };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { LOADING_LABEL } from "../lib/labels.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Loader2Icon } from "lucide-react";
|
|
5
|
+
|
|
6
|
+
//#region src/web/base/spinner.tsx
|
|
7
|
+
function Spinner({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Loader2Icon, {
|
|
9
|
+
role: "status",
|
|
10
|
+
"aria-label": LOADING_LABEL,
|
|
11
|
+
className: cn("size-4 animate-spin", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Spinner };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
3
|
+
//#region src/web/base/switch.d.ts
|
|
4
|
+
declare function Switch({ className, ...props }: React.ComponentProps<typeof SwitchPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { Switch };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
4
|
+
|
|
5
|
+
//#region src/web/base/switch.tsx
|
|
6
|
+
function Switch({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
|
|
8
|
+
"data-slot": "switch",
|
|
9
|
+
className: cn("peer data-[state=checked]:bg-action data-[state=unchecked]:bg-accent data-[state=checked]:border-action data-[state=unchecked]:border-line-control inline-flex h-5 w-9 shrink-0 items-center rounded-full border outline-none transition-[background-color,border-color] duration-150 ease-out motion-reduce:transition-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
10
|
+
...props,
|
|
11
|
+
children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, {
|
|
12
|
+
"data-slot": "switch-thumb",
|
|
13
|
+
className: cn("bg-white shadow-xs pointer-events-none block size-3.5 rounded-full ring-0 transition-[translate,background-color] duration-150 ease-out motion-reduce:transition-none data-[state=checked]:translate-x-[19px] data-[state=unchecked]:translate-x-px")
|
|
14
|
+
})
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Switch };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
//#region src/web/base/table.d.ts
|
|
3
|
+
declare function Table({ className, wrapperClassName, ...props }: React.ComponentProps<"table"> & {
|
|
4
|
+
wrapperClassName?: string;
|
|
5
|
+
}): React.JSX.Element;
|
|
6
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): React.JSX.Element;
|
|
7
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): React.JSX.Element;
|
|
8
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): React.JSX.Element;
|
|
9
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): React.JSX.Element;
|
|
10
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): React.JSX.Element;
|
|
11
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): React.JSX.Element;
|
|
12
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): React.JSX.Element;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { ScrollArea, ScrollBar } from "./scroll-area.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/web/base/table.tsx
|
|
6
|
+
function Table({ className, wrapperClassName, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs(ScrollArea, {
|
|
8
|
+
"data-slot": "table-container",
|
|
9
|
+
className: cn("relative w-full", wrapperClassName),
|
|
10
|
+
children: [/* @__PURE__ */ jsx("table", {
|
|
11
|
+
"data-slot": "table",
|
|
12
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
13
|
+
...props
|
|
14
|
+
}), /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" })]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function TableHeader({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx("thead", {
|
|
19
|
+
"data-slot": "table-header",
|
|
20
|
+
className: cn("bg-section [&_tr]:border-b", className),
|
|
21
|
+
...props
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function TableBody({ className, ...props }) {
|
|
25
|
+
return /* @__PURE__ */ jsx("tbody", {
|
|
26
|
+
"data-slot": "table-body",
|
|
27
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function TableFooter({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx("tfoot", {
|
|
33
|
+
"data-slot": "table-footer",
|
|
34
|
+
className: cn("bg-section border-t font-medium [&>tr]:last:border-b-0", className),
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function TableRow({ className, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
40
|
+
"data-slot": "table-row",
|
|
41
|
+
className: cn("hover:bg-muted data-[state=selected]:bg-muted border-b transition-colors", className),
|
|
42
|
+
...props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
function TableHead({ className, ...props }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("th", {
|
|
47
|
+
"data-slot": "table-head",
|
|
48
|
+
className: cn("text-muted-foreground h-9 px-2 text-left align-middle text-xs font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
49
|
+
...props
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function TableCell({ className, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx("td", {
|
|
54
|
+
"data-slot": "table-cell",
|
|
55
|
+
className: cn("px-2 py-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function TableCaption({ className, ...props }) {
|
|
60
|
+
return /* @__PURE__ */ jsx("caption", {
|
|
61
|
+
"data-slot": "table-caption",
|
|
62
|
+
className: cn("text-muted-foreground mt-4 text-sm", className),
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//#endregion
|
|
68
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
+
//#region src/web/base/tabs.d.ts
|
|
4
|
+
declare function Tabs({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Root>): React$1.JSX.Element;
|
|
5
|
+
declare function TabsList({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.List>): React$1.JSX.Element;
|
|
6
|
+
declare function TabsTrigger({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Trigger>): React$1.JSX.Element;
|
|
7
|
+
declare function TabsContent({ className, ...props }: React$1.ComponentProps<typeof TabsPrimitive.Content>): React$1.JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4
|
+
|
|
5
|
+
//#region src/web/base/tabs.tsx
|
|
6
|
+
function Tabs({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Root, {
|
|
8
|
+
"data-slot": "tabs",
|
|
9
|
+
className: cn("flex flex-col gap-2", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function TabsList({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
15
|
+
"data-slot": "tabs-list",
|
|
16
|
+
className: cn("text-muted-foreground border-border flex w-full items-center gap-5 border-b", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function TabsTrigger({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
|
|
22
|
+
"data-slot": "tabs-trigger",
|
|
23
|
+
className: cn("text-muted-foreground hover:text-foreground data-[state=active]:text-foreground data-[state=active]:border-action data-[state=active]:font-medium focus-visible:outline-ring -mb-px inline-flex items-center justify-center gap-1.5 border-b-2 border-transparent px-0 pb-2 text-[13px] font-normal whitespace-nowrap transition-colors focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
24
|
+
...props
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function TabsContent({ className, ...props }) {
|
|
28
|
+
return /* @__PURE__ */ jsx(TabsPrimitive.Content, {
|
|
29
|
+
"data-slot": "tabs-content",
|
|
30
|
+
className: cn("flex-1 outline-none", className),
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
//#region src/web/base/textarea.d.ts
|
|
4
|
+
declare const textareaVariants: (props?: ({
|
|
5
|
+
variant?: "<3" | "block" | "default" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function Textarea({ className, variant, ...props }: React.ComponentProps<"textarea"> & VariantProps<typeof textareaVariants>): React.JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Textarea, textareaVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
|
|
5
|
+
//#region src/web/base/textarea.tsx
|
|
6
|
+
const textareaVariants = cva("field-sizing-content placeholder:text-muted-foreground w-full outline-none disabled:cursor-not-allowed disabled:opacity-50", {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: "border-input flex min-h-20 rounded-control border bg-card px-2.5 py-1.5 text-base transition-[border-color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/25 aria-invalid:border-destructive md:text-[13px]",
|
|
9
|
+
"<3": "min-h-0 resize-none border-0 border-b border-dashed border-border bg-transparent px-0 py-0.5 text-xs focus-visible:border-solid focus-visible:border-ring",
|
|
10
|
+
block: "min-h-0 resize-none border-0 bg-transparent px-1 py-0.5 text-sm leading-relaxed hover:bg-wash focus-visible:bg-wash"
|
|
11
|
+
} },
|
|
12
|
+
defaultVariants: { variant: "default" }
|
|
13
|
+
});
|
|
14
|
+
function Textarea({ className, variant, ...props }) {
|
|
15
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
16
|
+
"data-slot": "textarea",
|
|
17
|
+
className: cn(textareaVariants({ variant }), className),
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//#endregion
|
|
23
|
+
export { Textarea, textareaVariants };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
//#region src/web/base/tooltip.d.ts
|
|
4
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
5
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
6
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
7
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
4
|
+
|
|
5
|
+
//#region src/web/base/tooltip.tsx
|
|
6
|
+
function TooltipProvider({ delayDuration = 0, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
|
|
8
|
+
"data-slot": "tooltip-provider",
|
|
9
|
+
delayDuration,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function Tooltip({ ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, {
|
|
15
|
+
"data-slot": "tooltip",
|
|
16
|
+
...props
|
|
17
|
+
}) });
|
|
18
|
+
}
|
|
19
|
+
function TooltipTrigger({ ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, {
|
|
21
|
+
"data-slot": "tooltip-trigger",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function TooltipContent({ className, sideOffset = 0, children, ...props }) {
|
|
26
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
|
|
27
|
+
"data-slot": "tooltip-content",
|
|
28
|
+
sideOffset,
|
|
29
|
+
className: cn("bg-popover text-popover-foreground border border-border shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-control px-2.5 py-1 text-xs text-balance", className),
|
|
30
|
+
...props,
|
|
31
|
+
children
|
|
32
|
+
}) });
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
//#endregion
|
|
36
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|