@krak-stack/registry 0.11.4 → 0.11.6
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/CHANGELOG.md +23 -1
- package/README.md +23 -9
- package/dist/components/agent/react.js +226 -1072
- package/dist/components/app-switcher/html.js +10 -53
- package/dist/components/app-switcher/react.js +29 -139
- package/dist/components/async-action-button/html.js +3 -34
- package/dist/components/async-action-button/react.d.ts +1 -1
- package/dist/components/async-action-button/react.js +8 -54
- package/dist/components/audit-log-table/react.js +706 -1279
- package/dist/components/bulk-list-input/html.js +3 -40
- package/dist/components/bulk-list-input/react.d.ts +1 -1
- package/dist/components/bulk-list-input/react.js +6 -59
- package/dist/components/code-block/html.js +1 -35
- package/dist/components/code-block/react.js +12 -59
- package/dist/components/color-input/html.js +2 -19
- package/dist/components/color-input/react.js +6 -97
- package/dist/components/copy-button/html.js +1 -35
- package/dist/components/copy-button/react.d.ts +1 -1
- package/dist/components/copy-button/react.js +7 -54
- package/dist/components/copy-value/html.js +11 -52
- package/dist/components/copy-value/react.js +25 -165
- package/dist/components/cron-input/html.js +2 -18
- package/dist/components/cron-input/react.js +15 -30
- package/dist/components/danger-confirmation/html.js +11 -57
- package/dist/components/danger-confirmation/react.js +26 -187
- package/dist/components/data-table/classes.d.ts +9 -3
- package/dist/components/data-table/html.d.ts +93 -21
- package/dist/components/data-table/html.js +309 -196
- package/dist/components/data-table/index.d.ts +97 -9
- package/dist/components/data-table/react.d.ts +14 -3
- package/dist/components/data-table/react.js +700 -1273
- package/dist/components/data-table/schema.d.ts +175 -16
- package/dist/components/date-input/html.js +19 -74
- package/dist/components/date-input/react.d.ts +1 -1
- package/dist/components/date-input/react.js +28 -313
- package/dist/components/docs/classes.d.ts +15 -0
- package/dist/components/docs/html.d.ts +55 -0
- package/dist/components/docs/html.js +837 -0
- package/dist/components/docs/index.d.ts +49 -0
- package/dist/components/docs/react.d.ts +10 -0
- package/dist/components/docs/react.js +949 -0
- package/dist/components/docs/schema.d.ts +49 -0
- package/dist/components/editable-text/html.js +6 -52
- package/dist/components/editable-text/react.js +13 -83
- package/dist/components/editing-locale-switcher/html.d.ts +2 -2
- package/dist/components/editing-locale-switcher/html.js +13 -43
- package/dist/components/editing-locale-switcher/react.js +17 -141
- package/dist/components/effect-form/react.js +249 -812
- package/dist/components/email-composer/react.js +62 -279
- package/dist/components/email-editor/html.js +13 -58
- package/dist/components/email-editor/react.js +187 -483
- package/dist/components/error-component/html.js +2 -47
- package/dist/components/error-component/react.js +33 -137
- package/dist/components/file-input/html.js +9 -40
- package/dist/components/file-input/react.js +39 -208
- package/dist/components/form/react.js +212 -777
- package/dist/components/icon-input/html.js +9 -56
- package/dist/components/icon-input/react.js +43 -143
- package/dist/components/image-crop-editor/html.js +1 -35
- package/dist/components/image-crop-editor/react.js +21 -66
- package/dist/components/locale-switcher/html.js +8 -55
- package/dist/components/locale-switcher/react.js +21 -146
- package/dist/components/map-menu/html.d.ts +8 -8
- package/dist/components/map-menu/html.js +13 -72
- package/dist/components/map-menu/react.js +92 -309
- package/dist/components/markdown/html.js +1 -35
- package/dist/components/markdown/react.js +20 -64
- package/dist/components/notification-menu/html.js +14 -50
- package/dist/components/notification-menu/react.js +73 -343
- package/dist/components/pagination/html.js +17 -73
- package/dist/components/pagination/react.js +37 -200
- package/dist/components/phone-number-input/html.js +19 -57
- package/dist/components/phone-number-input/react.d.ts +1 -1
- package/dist/components/phone-number-input/react.js +43 -142
- package/dist/components/presence-transition/index.d.ts +2 -2
- package/dist/components/registry-previews/component-example.js +26 -126
- package/dist/components/rich-text-editor/html.d.ts +12 -12
- package/dist/components/rich-text-editor/html.js +12 -85
- package/dist/components/rich-text-editor/react.js +55 -272
- package/dist/components/search-menu/classes.d.ts +2 -0
- package/dist/components/search-menu/html.d.ts +2 -0
- package/dist/components/search-menu/html.js +40 -73
- package/dist/components/search-menu/index.d.ts +27 -2
- package/dist/components/search-menu/react.d.ts +1 -1
- package/dist/components/search-menu/react.js +59 -280
- package/dist/components/search-menu/schema.d.ts +1 -0
- package/dist/components/select-with-custom-input/html.d.ts +2 -2
- package/dist/components/select-with-custom-input/html.js +13 -48
- package/dist/components/select-with-custom-input/react.js +22 -146
- package/dist/components/sidebar-layout/html.d.ts +16 -6
- package/dist/components/sidebar-layout/html.js +83 -69
- package/dist/components/sidebar-layout/index.d.ts +16 -0
- package/dist/components/sidebar-layout/react.js +105 -698
- package/dist/components/stats-card/react.js +13 -58
- package/dist/components/support/html.js +14 -69
- package/dist/components/support/react.js +74 -320
- package/dist/components/theme-switcher/html.js +11 -55
- package/dist/components/theme-switcher/react.js +28 -152
- package/dist/components/time-input/html.d.ts +2 -2
- package/dist/components/time-input/html.js +8 -53
- package/dist/components/time-input/react.js +34 -188
- package/dist/components/timezone-input/html.js +11 -67
- package/dist/components/timezone-input/react.js +41 -143
- package/dist/components/toast/html.d.ts +6 -6
- package/dist/components/toast/html.js +13 -46
- package/dist/components/tracking-notice/react.js +39 -188
- package/dist/components/unsaved-changes-guard/html.js +9 -43
- package/dist/components/unsaved-changes-guard/react.js +19 -169
- package/dist/components/upload-attachment/html.d.ts +4 -4
- package/dist/components/upload-attachment/html.js +4 -35
- package/dist/components/upload-attachment/react.js +25 -164
- package/dist/components/virtualized-combobox/html.js +10 -35
- package/dist/components/virtualized-combobox/react.js +28 -129
- package/dist/components/webhook-delivery-table/html.js +320 -206
- package/dist/components/webhook-delivery-table/react.js +736 -1376
- package/dist/lib/docs.integrations.server.js +150 -202
- package/dist/lib/docs.js +305 -1085
- package/dist/lib/docs.server.js +134 -186
- package/dist/lib/documentation-toolkit.js +144 -196
- package/dist/services/agent/client/index.js +226 -1072
- package/dist/services/notification/client/index.js +73 -343
- package/dist/services/notification/public.js +73 -343
- package/package.json +5 -13
- package/dist/components/effectcn/alert-dialog.d.ts +0 -13
- package/dist/components/effectcn/button.d.ts +0 -31
- package/dist/components/effectcn/calendar.d.ts +0 -12
- package/dist/components/effectcn/checkbox.d.ts +0 -10
- package/dist/components/effectcn/combobox.d.ts +0 -25
- package/dist/components/effectcn/dialog.d.ts +0 -19
- package/dist/components/effectcn/field.d.ts +0 -11
- package/dist/components/effectcn/file-drop.d.ts +0 -8
- package/dist/components/effectcn/input.d.ts +0 -26
- package/dist/components/effectcn/menu.d.ts +0 -85
- package/dist/components/effectcn/menubar.d.ts +0 -8
- package/dist/components/effectcn/popover.d.ts +0 -18
- package/dist/components/effectcn/scroll-area.d.ts +0 -12
- package/dist/components/effectcn/select.d.ts +0 -68
- package/dist/components/effectcn/toast.d.ts +0 -29
- package/dist/components/ui/alert-dialog.d.ts +0 -18
- package/dist/components/ui/alert.d.ts +0 -10
- package/dist/components/ui/attachment.d.ts +0 -23
- package/dist/components/ui/badge.d.ts +0 -7
- package/dist/components/ui/bubble.d.ts +0 -16
- package/dist/components/ui/button.d.ts +0 -8
- package/dist/components/ui/calendar.d.ts +0 -10
- package/dist/components/ui/card.d.ts +0 -11
- package/dist/components/ui/checkbox.d.ts +0 -3
- package/dist/components/ui/collapsible.d.ts +0 -5
- package/dist/components/ui/command.d.ts +0 -18
- package/dist/components/ui/dialog.d.ts +0 -17
- package/dist/components/ui/dropdown-menu.d.ts +0 -29
- package/dist/components/ui/empty.d.ts +0 -11
- package/dist/components/ui/field.d.ts +0 -24
- package/dist/components/ui/input-group.d.ts +0 -17
- package/dist/components/ui/input.d.ts +0 -3
- package/dist/components/ui/item.d.ts +0 -22
- package/dist/components/ui/label.d.ts +0 -3
- package/dist/components/ui/menubar.d.ts +0 -29
- package/dist/components/ui/message-scroller.d.ts +0 -10
- package/dist/components/ui/message.d.ts +0 -10
- package/dist/components/ui/popover.d.ts +0 -9
- package/dist/components/ui/scroll-area.d.ts +0 -4
- package/dist/components/ui/select.d.ts +0 -15
- package/dist/components/ui/select.js +0 -159
- package/dist/components/ui/separator.d.ts +0 -3
- package/dist/components/ui/sheet.d.ts +0 -14
- package/dist/components/ui/sidebar.d.ts +0 -63
- package/dist/components/ui/skeleton.d.ts +0 -2
- package/dist/components/ui/table.d.ts +0 -10
- package/dist/components/ui/tabs.d.ts +0 -10
- package/dist/components/ui/textarea.d.ts +0 -3
- package/dist/components/ui/tooltip.d.ts +0 -6
- package/dist/components/ui/trace.d.ts +0 -18
- package/dist/lib/effectcn-form.d.ts +0 -3
- package/dist/lib/effectcn-form.js +0 -54
|
@@ -1,80 +1,21 @@
|
|
|
1
1
|
// ../../src/components/pagination/html.ts
|
|
2
2
|
import { Html } from "effect/ui/html";
|
|
3
3
|
import { Select } from "effect/ui/kit";
|
|
4
|
-
|
|
5
|
-
// ../../src/components/effectcn/button.ts
|
|
4
|
+
import { Button } from "@/components/effectcn/button";
|
|
6
5
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
brand: "bg-brand-soft text-brand-soft-foreground hover:bg-brand-soft/85",
|
|
21
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85",
|
|
22
|
-
link: "h-auto px-0 text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current"
|
|
23
|
-
};
|
|
24
|
-
var sizes = {
|
|
25
|
-
default: "",
|
|
26
|
-
sm: "h-7 rounded-sm px-2.5 text-xs",
|
|
27
|
-
lg: "h-10 px-5 text-sm",
|
|
28
|
-
icon: "w-8.5 px-0",
|
|
29
|
-
"icon-sm": "h-7 w-7 rounded-sm px-0"
|
|
30
|
-
};
|
|
31
|
-
var buttonVariants = (options = {}) => cn(base, variants[options.variant ?? "default"], sizes[options.size ?? "default"], options.class);
|
|
32
|
-
var Button = (h, options = {}) => KitButton(h, {
|
|
33
|
-
element: options.element,
|
|
34
|
-
onPress: options.onPress,
|
|
35
|
-
props: options.loading ? { ...options.props, disabled: true, focusableWhenDisabled: true } : options.props
|
|
36
|
-
}).class(buttonVariants(options)).attr("data-loading", options.loading ? "" : undefined);
|
|
37
|
-
|
|
38
|
-
// ../../src/components/effectcn/select.ts
|
|
39
|
-
var triggerSizes = {
|
|
40
|
-
sm: "h-7 min-w-36 gap-1.5 rounded-sm pr-2 pl-2.5 text-xs",
|
|
41
|
-
default: "h-8.5 min-w-48 pr-2.5 pl-3 text-[13px]",
|
|
42
|
-
lg: "h-10 min-w-56 pr-3 pl-3.5 text-sm"
|
|
43
|
-
};
|
|
44
|
-
var popupSizes = {
|
|
45
|
-
sm: "text-xs [&_[role=option]]:min-h-6.5 [&_[role=option]]:px-1.5 [&_[role=option]]:py-0.5",
|
|
46
|
-
default: "text-[13px]",
|
|
47
|
-
lg: "text-sm [&_[role=option]]:min-h-8.5 [&_[role=option]]:px-2.5"
|
|
48
|
-
};
|
|
49
|
-
var SelectLabel = (h, select, options = {}) => select.label(h.div.class(cn("mb-1.5 cursor-default text-[13px] leading-snug font-medium", options.class)));
|
|
50
|
-
var SelectTrigger = (h, select, options = {}) => select.trigger(h.button.on("mousedown", () => {
|
|
51
|
-
return;
|
|
52
|
-
}, { preventDefault: "always" }).class(cn("border-input bg-background inline-flex items-center justify-between gap-2 rounded-md border text-start", "text-foreground leading-none whitespace-nowrap shadow-sm select-none", "hover:bg-accent data-[popup-open]:bg-accent transition-colors duration-150", "data-[disabled]:hover:bg-background data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50", "data-[readonly]:bg-muted data-[readonly]:cursor-default", triggerSizes[options.size ?? "default"], options.class)));
|
|
53
|
-
var SelectValue = (h, select, options = {}) => select.value(h.span.class(cn("data-[placeholder]:text-muted-foreground min-w-0 truncate leading-snug", options.class)));
|
|
54
|
-
var SelectIcon = (h, select, options = {}) => select.icon(h.span.class(cn("border-muted-foreground mx-1 mb-[3px] size-[7px] shrink-0 rotate-45 border-r-[1.5px] border-b-[1.5px]", options.class)));
|
|
55
|
-
var SelectPositioner = (h, select, options = {}) => select.positioner(h.div.class(cn("outline-none data-[side=none]:my-2.5", options.class)));
|
|
56
|
-
var SelectPopup = (h, select, options = {}) => select.popup(h.div.class(cn("relative box-border max-w-[var(--available-width)] min-w-[max(var(--anchor-width),10rem)] overflow-y-auto", "bg-popover text-foreground shadow-float rounded-lg border p-1 outline-none", "max-h-[min(var(--available-height),20rem)] data-[side=none]:max-h-none", "origin-[var(--transform-origin)] transition-[opacity,scale] duration-150", "data-[ending-style]:opacity-0 data-[starting-style]:opacity-0", "not-data-[side=none]:data-[ending-style]:scale-95 not-data-[side=none]:data-[starting-style]:scale-95", "data-[side=none]:[scrollbar-width:none]", "has-[>[data-slot=select-list]]:flex has-[>[data-slot=select-list]]:flex-col", "has-[>[data-slot=select-list]]:overflow-hidden has-[>[data-slot=select-list]]:p-0", popupSizes[options.size ?? "default"], options.class)));
|
|
57
|
-
var SelectList = (h, select, options = {}) => select.list(h.div.attr("data-slot", "select-list").class(cn("min-h-0 flex-1 [scrollbar-width:none] overflow-y-auto p-1 outline-none", options.class)));
|
|
58
|
-
var SelectItem = (h, select, options) => select.item({
|
|
59
|
-
element: h.div.class(cn("flex min-h-7.5 cursor-default scroll-my-1 items-center gap-2 rounded-sm px-2 py-1 leading-snug outline-none", "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground select-none", "data-[disabled]:text-muted-foreground data-[disabled]:opacity-60 data-[selected]:font-medium", "[&_svg]:text-muted-foreground [&_svg]:size-[15px] [&_svg]:shrink-0", options.class)),
|
|
60
|
-
value: options.value
|
|
61
|
-
});
|
|
62
|
-
var SelectItemText = (h, select, options = {}) => select.itemText(h.div.class(cn("min-w-0 flex-1 whitespace-nowrap", options.class)));
|
|
63
|
-
var SelectItemIndicator = (h, select, options) => select.itemIndicator({
|
|
64
|
-
element: h.span.class(cn("border-brand mr-1.5 mb-0.5 ml-2.5 h-[9px] w-[5px] shrink-0 rotate-45 border-r-[1.5px] border-b-[1.5px]", options.class)),
|
|
65
|
-
value: options.value
|
|
66
|
-
});
|
|
67
|
-
var scrollArrow = "inset-x-0 z-10 hidden h-6 cursor-default place-items-center rounded-lg bg-popover data-[visible]:grid " + "before:size-1.5 before:rotate-45 before:border-muted-foreground";
|
|
68
|
-
var SelectScrollUpArrow = (h, select, options = {}) => select.scrollUpArrow({
|
|
69
|
-
keepMounted: true,
|
|
70
|
-
element: h.div.class(cn(scrollArrow, "top-0 before:translate-y-0.5 before:border-t-[1.5px] before:border-l-[1.5px]", options.class))
|
|
71
|
-
});
|
|
72
|
-
var SelectScrollDownArrow = (h, select, options = {}) => select.scrollDownArrow({
|
|
73
|
-
keepMounted: true,
|
|
74
|
-
element: h.div.class(cn(scrollArrow, "bottom-0 before:-translate-y-0.5 before:border-r-[1.5px] before:border-b-[1.5px]", options.class))
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// ../../src/components/pagination/html.ts
|
|
6
|
+
SelectIcon,
|
|
7
|
+
SelectItem,
|
|
8
|
+
SelectItemIndicator,
|
|
9
|
+
SelectItemText,
|
|
10
|
+
SelectLabel,
|
|
11
|
+
SelectList,
|
|
12
|
+
SelectPopup,
|
|
13
|
+
SelectPositioner,
|
|
14
|
+
SelectScrollDownArrow,
|
|
15
|
+
SelectScrollUpArrow,
|
|
16
|
+
SelectTrigger,
|
|
17
|
+
SelectValue
|
|
18
|
+
} from "@/components/effectcn/select";
|
|
78
19
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
79
20
|
import {
|
|
80
21
|
ChevronLeft,
|
|
@@ -83,6 +24,9 @@ import {
|
|
|
83
24
|
ChevronsRight
|
|
84
25
|
} from "@krak-stack/registry/lucide-effect";
|
|
85
26
|
|
|
27
|
+
// ../../src/lib/utils.ts
|
|
28
|
+
import { cn } from "cn";
|
|
29
|
+
|
|
86
30
|
// ../../src/components/pagination/classes.ts
|
|
87
31
|
var paginationClasses = {
|
|
88
32
|
root: "flex flex-col gap-3 px-2 sm:flex-row sm:items-center sm:justify-between",
|
|
@@ -6,182 +6,19 @@ import {
|
|
|
6
6
|
ChevronsRight
|
|
7
7
|
} from "lucide-react";
|
|
8
8
|
import { useId } from "react";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import {
|
|
12
|
-
|
|
9
|
+
import { Button } from "@/components/ui/button";
|
|
10
|
+
import { Label } from "@/components/ui/label";
|
|
11
|
+
import {
|
|
12
|
+
Select,
|
|
13
|
+
SelectContent,
|
|
14
|
+
SelectItem,
|
|
15
|
+
SelectTrigger,
|
|
16
|
+
SelectValue
|
|
17
|
+
} from "@/components/ui/select";
|
|
13
18
|
|
|
14
19
|
// ../../src/lib/utils.ts
|
|
15
20
|
import { cn } from "cn";
|
|
16
21
|
|
|
17
|
-
// ../../src/components/ui/button.tsx
|
|
18
|
-
import { jsx } from "react/jsx-runtime";
|
|
19
|
-
var buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
20
|
-
variants: {
|
|
21
|
-
variant: {
|
|
22
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
23
|
-
outline: "border-border bg-background shadow-xs hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
24
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
25
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
26
|
-
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
27
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
28
|
-
},
|
|
29
|
-
size: {
|
|
30
|
-
default: "h-9 gap-1.5 px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
31
|
-
xs: "h-6 gap-1 rounded-[min(var(--radius-md),8px)] px-2 text-xs in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
32
|
-
sm: "h-8 gap-1 rounded-[min(var(--radius-md),10px)] px-2.5 in-data-[slot=button-group]:rounded-md has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
33
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
34
|
-
icon: "size-9",
|
|
35
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
36
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
37
|
-
"icon-lg": "size-10"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
defaultVariants: {
|
|
41
|
-
variant: "default",
|
|
42
|
-
size: "default"
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
function Button({
|
|
46
|
-
className,
|
|
47
|
-
variant = "default",
|
|
48
|
-
size = "default",
|
|
49
|
-
...props
|
|
50
|
-
}) {
|
|
51
|
-
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
52
|
-
"data-slot": "button",
|
|
53
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
54
|
-
...props
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// ../../src/components/ui/label.tsx
|
|
59
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
60
|
-
"use client";
|
|
61
|
-
function Label({ className, ...props }) {
|
|
62
|
-
return /* @__PURE__ */ jsx2("label", {
|
|
63
|
-
"data-slot": "label",
|
|
64
|
-
className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
|
|
65
|
-
...props
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// ../../src/components/ui/select.tsx
|
|
70
|
-
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
71
|
-
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
72
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
73
|
-
"use client";
|
|
74
|
-
var Select = SelectPrimitive.Root;
|
|
75
|
-
function SelectValue({ className, ...props }) {
|
|
76
|
-
return /* @__PURE__ */ jsx3(SelectPrimitive.Value, {
|
|
77
|
-
"data-slot": "select-value",
|
|
78
|
-
className: cn("flex flex-1 text-left", className),
|
|
79
|
-
...props
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function SelectTrigger({
|
|
83
|
-
className,
|
|
84
|
-
size = "default",
|
|
85
|
-
children,
|
|
86
|
-
...props
|
|
87
|
-
}) {
|
|
88
|
-
return /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
89
|
-
"data-slot": "select-trigger",
|
|
90
|
-
"data-size": size,
|
|
91
|
-
className: cn("border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 flex w-fit items-center justify-between gap-1.5 rounded-md border bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
92
|
-
...props,
|
|
93
|
-
children: [
|
|
94
|
-
children,
|
|
95
|
-
/* @__PURE__ */ jsx3(SelectPrimitive.Icon, {
|
|
96
|
-
render: /* @__PURE__ */ jsx3(ChevronDownIcon, {
|
|
97
|
-
className: "text-muted-foreground pointer-events-none size-4"
|
|
98
|
-
})
|
|
99
|
-
})
|
|
100
|
-
]
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
function SelectContent({
|
|
104
|
-
className,
|
|
105
|
-
children,
|
|
106
|
-
side = "bottom",
|
|
107
|
-
sideOffset = 4,
|
|
108
|
-
align = "start",
|
|
109
|
-
alignOffset = 0,
|
|
110
|
-
alignItemWithTrigger = false,
|
|
111
|
-
...props
|
|
112
|
-
}) {
|
|
113
|
-
return /* @__PURE__ */ jsx3(SelectPrimitive.Portal, {
|
|
114
|
-
children: /* @__PURE__ */ jsx3(SelectPrimitive.Positioner, {
|
|
115
|
-
side,
|
|
116
|
-
sideOffset,
|
|
117
|
-
align,
|
|
118
|
-
alignOffset,
|
|
119
|
-
alignItemWithTrigger,
|
|
120
|
-
className: "isolate z-50",
|
|
121
|
-
children: /* @__PURE__ */ jsxs(SelectPrimitive.Popup, {
|
|
122
|
-
"data-slot": "select-content",
|
|
123
|
-
"data-align-trigger": alignItemWithTrigger,
|
|
124
|
-
className: cn("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 relative isolate z-50 max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md shadow-md ring-1 duration-100 data-[align-trigger=true]:animate-none", className),
|
|
125
|
-
...props,
|
|
126
|
-
children: [
|
|
127
|
-
/* @__PURE__ */ jsx3(SelectScrollUpButton, {}),
|
|
128
|
-
/* @__PURE__ */ jsx3(SelectPrimitive.List, {
|
|
129
|
-
children
|
|
130
|
-
}),
|
|
131
|
-
/* @__PURE__ */ jsx3(SelectScrollDownButton, {})
|
|
132
|
-
]
|
|
133
|
-
})
|
|
134
|
-
})
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
function SelectItem({
|
|
138
|
-
className,
|
|
139
|
-
children,
|
|
140
|
-
...props
|
|
141
|
-
}) {
|
|
142
|
-
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
143
|
-
"data-slot": "select-item",
|
|
144
|
-
className: cn("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm 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),
|
|
145
|
-
...props,
|
|
146
|
-
children: [
|
|
147
|
-
/* @__PURE__ */ jsx3(SelectPrimitive.ItemText, {
|
|
148
|
-
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
149
|
-
children
|
|
150
|
-
}),
|
|
151
|
-
/* @__PURE__ */ jsx3(SelectPrimitive.ItemIndicator, {
|
|
152
|
-
render: /* @__PURE__ */ jsx3("span", {
|
|
153
|
-
className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center"
|
|
154
|
-
}),
|
|
155
|
-
children: /* @__PURE__ */ jsx3(CheckIcon, {
|
|
156
|
-
className: "pointer-events-none"
|
|
157
|
-
})
|
|
158
|
-
})
|
|
159
|
-
]
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
function SelectScrollUpButton({
|
|
163
|
-
className,
|
|
164
|
-
...props
|
|
165
|
-
}) {
|
|
166
|
-
return /* @__PURE__ */ jsx3(SelectPrimitive.ScrollUpArrow, {
|
|
167
|
-
"data-slot": "select-scroll-up-button",
|
|
168
|
-
className: cn("bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
169
|
-
...props,
|
|
170
|
-
children: /* @__PURE__ */ jsx3(ChevronUpIcon, {})
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
function SelectScrollDownButton({
|
|
174
|
-
className,
|
|
175
|
-
...props
|
|
176
|
-
}) {
|
|
177
|
-
return /* @__PURE__ */ jsx3(SelectPrimitive.ScrollDownArrow, {
|
|
178
|
-
"data-slot": "select-scroll-down-button",
|
|
179
|
-
className: cn("bg-popover bottom-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
180
|
-
...props,
|
|
181
|
-
children: /* @__PURE__ */ jsx3(ChevronDownIcon, {})
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
22
|
// ../../src/components/pagination/react.tsx
|
|
186
23
|
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
187
24
|
|
|
@@ -309,7 +146,7 @@ var paginationNavigation = (page, pageCount) => ({
|
|
|
309
146
|
});
|
|
310
147
|
|
|
311
148
|
// ../../src/components/pagination/react.tsx
|
|
312
|
-
import { jsx
|
|
149
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
313
150
|
function Pagination({
|
|
314
151
|
classes: classOverrides,
|
|
315
152
|
className,
|
|
@@ -333,33 +170,33 @@ function Pagination({
|
|
|
333
170
|
const pageSizeId = useId();
|
|
334
171
|
const navigation = paginationNavigation(page, pageCount);
|
|
335
172
|
const pageLabel = paginationPageLabel(page, pageCount, labels.pageOf);
|
|
336
|
-
return /* @__PURE__ */
|
|
173
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
337
174
|
"data-slot": "pagination",
|
|
338
175
|
className: cn(paginationClasses.root, compact && paginationClasses.compactRoot, className),
|
|
339
176
|
children: [
|
|
340
|
-
showResults ? /* @__PURE__ */
|
|
177
|
+
showResults ? /* @__PURE__ */ jsxs("div", {
|
|
341
178
|
className: paginationClasses.summary,
|
|
342
179
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ jsx("span", {
|
|
344
181
|
children: labels.results(totalRows)
|
|
345
182
|
}),
|
|
346
|
-
selectedRows > 0 ? /* @__PURE__ */
|
|
183
|
+
selectedRows > 0 ? /* @__PURE__ */ jsx("span", {
|
|
347
184
|
children: labels.selectedOf(selectedRows, totalRows)
|
|
348
185
|
}) : null
|
|
349
186
|
]
|
|
350
187
|
}) : null,
|
|
351
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ jsxs("div", {
|
|
352
189
|
className: cn(paginationClasses.controls, compact && paginationClasses.compactControls),
|
|
353
190
|
children: [
|
|
354
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ jsxs("div", {
|
|
355
192
|
className: paginationClasses.controlGroup,
|
|
356
193
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
194
|
+
/* @__PURE__ */ jsx(Label, {
|
|
358
195
|
htmlFor: pageSizeId,
|
|
359
196
|
className: cn("hidden text-sm sm:block", compact && "block"),
|
|
360
197
|
children: labels.pageSize
|
|
361
198
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ jsxs(Select, {
|
|
363
200
|
items: pageSizes.map((size) => ({
|
|
364
201
|
label: size.toString(),
|
|
365
202
|
value: size.toString()
|
|
@@ -367,17 +204,17 @@ function Pagination({
|
|
|
367
204
|
value: `${pageSize}`,
|
|
368
205
|
onValueChange: (value) => onPageSizeChange(Number(value)),
|
|
369
206
|
children: [
|
|
370
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ jsx(SelectTrigger, {
|
|
371
208
|
className: "h-8 w-[70px]",
|
|
372
209
|
id: pageSizeId,
|
|
373
|
-
children: /* @__PURE__ */
|
|
210
|
+
children: /* @__PURE__ */ jsx(SelectValue, {
|
|
374
211
|
placeholder: pageSize
|
|
375
212
|
})
|
|
376
213
|
}),
|
|
377
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ jsx(SelectContent, {
|
|
378
215
|
side: "top",
|
|
379
216
|
className: pageSizeContentClassName,
|
|
380
|
-
children: pageSizes.map((size) => /* @__PURE__ */
|
|
217
|
+
children: pageSizes.map((size) => /* @__PURE__ */ jsx(SelectItem, {
|
|
381
218
|
value: `${size}`,
|
|
382
219
|
children: size
|
|
383
220
|
}, size))
|
|
@@ -386,66 +223,66 @@ function Pagination({
|
|
|
386
223
|
})
|
|
387
224
|
]
|
|
388
225
|
}),
|
|
389
|
-
/* @__PURE__ */
|
|
226
|
+
/* @__PURE__ */ jsxs("div", {
|
|
390
227
|
className: paginationClasses.controlGroup,
|
|
391
228
|
children: [
|
|
392
|
-
pageLabel !== undefined && /* @__PURE__ */
|
|
229
|
+
pageLabel !== undefined && /* @__PURE__ */ jsx("div", {
|
|
393
230
|
className: "flex items-center justify-center text-sm font-medium sm:block",
|
|
394
231
|
children: pageLabel
|
|
395
232
|
}),
|
|
396
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ jsxs("div", {
|
|
397
234
|
className: paginationClasses.navigation,
|
|
398
235
|
children: [
|
|
399
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
400
237
|
className: cn("hidden h-8 w-8 p-0 lg:flex", compact && "!hidden"),
|
|
401
238
|
disabled: navigation.goToFirstPage.disabled,
|
|
402
239
|
onClick: () => onPageChange(navigation.goToFirstPage.page),
|
|
403
240
|
type: "button",
|
|
404
241
|
children: [
|
|
405
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ jsx("span", {
|
|
406
243
|
className: "sr-only",
|
|
407
244
|
children: labels.goToFirstPage
|
|
408
245
|
}),
|
|
409
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ jsx(ChevronsLeft, {})
|
|
410
247
|
]
|
|
411
248
|
}),
|
|
412
|
-
/* @__PURE__ */
|
|
249
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
413
250
|
className: "h-8 w-8 p-0",
|
|
414
251
|
disabled: navigation.goToPreviousPage.disabled,
|
|
415
252
|
onClick: () => onPageChange(navigation.goToPreviousPage.page),
|
|
416
253
|
type: "button",
|
|
417
254
|
children: [
|
|
418
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ jsx("span", {
|
|
419
256
|
className: "sr-only",
|
|
420
257
|
children: labels.goToPreviousPage
|
|
421
258
|
}),
|
|
422
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ jsx(ChevronLeft, {})
|
|
423
260
|
]
|
|
424
261
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
426
263
|
className: "h-8 w-8 p-0",
|
|
427
264
|
disabled: navigation.goToNextPage.disabled,
|
|
428
265
|
onClick: () => onPageChange(navigation.goToNextPage.page),
|
|
429
266
|
type: "button",
|
|
430
267
|
children: [
|
|
431
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ jsx("span", {
|
|
432
269
|
className: "sr-only",
|
|
433
270
|
children: labels.goToNextPage
|
|
434
271
|
}),
|
|
435
|
-
/* @__PURE__ */
|
|
272
|
+
/* @__PURE__ */ jsx(ChevronRight, {})
|
|
436
273
|
]
|
|
437
274
|
}),
|
|
438
|
-
/* @__PURE__ */
|
|
275
|
+
/* @__PURE__ */ jsxs(Button, {
|
|
439
276
|
className: cn("hidden h-8 w-8 p-0 lg:flex", compact && "!hidden"),
|
|
440
277
|
disabled: navigation.goToLastPage.disabled,
|
|
441
278
|
onClick: () => onPageChange(navigation.goToLastPage.page),
|
|
442
279
|
type: "button",
|
|
443
280
|
children: [
|
|
444
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ jsx("span", {
|
|
445
282
|
className: "sr-only",
|
|
446
283
|
children: labels.goToLastPage
|
|
447
284
|
}),
|
|
448
|
-
/* @__PURE__ */
|
|
285
|
+
/* @__PURE__ */ jsx(ChevronsRight, {})
|
|
449
286
|
]
|
|
450
287
|
})
|
|
451
288
|
]
|
|
@@ -3,63 +3,22 @@ import { Redacted, Schema as Schema4 } from "effect";
|
|
|
3
3
|
import { Component as Component2, UiSchema as UiSchema2 } from "effect/ui";
|
|
4
4
|
import { Html as Html2, HtmlCommand } from "effect/ui/html";
|
|
5
5
|
import { getCountryCallingCode as getCountryCallingCode3 } from "libphonenumber-js/max";
|
|
6
|
-
|
|
7
|
-
// ../../src/components/effectcn/input.ts
|
|
8
|
-
import {
|
|
9
|
-
Input as KitInput
|
|
10
|
-
} from "effect/ui/kit";
|
|
11
|
-
|
|
12
|
-
// ../../src/lib/utils.ts
|
|
13
|
-
import { cn } from "cn";
|
|
14
|
-
|
|
15
|
-
// ../../src/components/effectcn/input.ts
|
|
16
|
-
var base = "block h-8.5 w-full min-w-0 rounded-md border border-input bg-background px-3 text-[13px] text-foreground shadow-sm outline-none " + "transition-[border-color,box-shadow] duration-150 placeholder:text-muted-foreground " + "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/20 " + "aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/20 " + "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 " + "[&[readonly]]:bg-muted [&[readonly]]:text-muted-foreground [&[readonly]]:shadow-none " + "[&[type=file]]:cursor-pointer [&[type=file]]:pl-0 [&[type=file]]:leading-8 [&[type=file]]:text-muted-foreground " + "file:mr-3 file:h-8 file:cursor-pointer file:border-0 file:border-r file:border-solid file:border-input file:bg-muted file:px-3 " + "file:text-[13px] file:font-medium file:text-foreground";
|
|
17
|
-
var sizes = {
|
|
18
|
-
default: "",
|
|
19
|
-
sm: "h-7 rounded-sm px-2.5 text-xs",
|
|
20
|
-
lg: "h-10 px-3.5 text-sm"
|
|
21
|
-
};
|
|
22
|
-
var inputVariants = (options = {}) => cn(base, sizes[options.size ?? "default"], options.class);
|
|
23
|
-
var Input = (h, options) => KitInput(h, options).class(inputVariants(options));
|
|
24
|
-
|
|
25
|
-
// ../../src/components/phone-number-input/html.ts
|
|
6
|
+
import { Input as TextInput } from "@/components/effectcn/input";
|
|
26
7
|
import { krakstackLocaleRead as krakstackLocaleRead2 } from "@krak-stack/registry/krakstack-provider/html";
|
|
27
8
|
|
|
28
9
|
// ../../src/components/virtualized-combobox/html.ts
|
|
29
10
|
import { Html } from "effect/ui/html";
|
|
30
11
|
import { Combobox, VirtualList } from "effect/ui/kit";
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}).children(h.el("path").attr("d", path));
|
|
42
|
-
var ComboboxButton = (h, combobox, options = {}) => combobox.trigger(h.button.class(cn("border-input bg-background text-foreground hover:bg-accent data-[popup-open]:bg-accent inline-flex h-8.5 w-56 items-center justify-between gap-2 rounded-md border pr-2 pl-3 text-start text-[13px] whitespace-nowrap shadow-sm transition-colors duration-150 select-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:size-3.5", options.class))).children(options.value === undefined ? combobox.value(h.span.class("min-w-0 truncate data-[placeholder]:text-muted-foreground")) : h.span.class(cn("data-[placeholder]:text-muted-foreground min-w-0 truncate", options.valueClass)).children(options.value), combobox.icon(h.span.class("grid shrink-0 place-items-center text-muted-foreground")).children(icon(h, "M7 15l5 5 5-5M7 9l5-5 5 5")));
|
|
43
|
-
var ComboboxClear = (h, combobox, options = {}) => combobox.clear({
|
|
44
|
-
element: h.button.class(cn("text-muted-foreground hover:bg-accent hover:text-foreground grid size-6 shrink-0 place-items-center rounded-sm transition-colors duration-150 data-[disabled]:pointer-events-none [&_svg]:size-3.5", options.class))
|
|
45
|
-
})?.children(icon(h, "M18 6L6 18M6 6l12 12"));
|
|
46
|
-
var ComboboxPositioner = (h, combobox, options = {}) => combobox.positioner(h.div.class(cn("outline-none", options.class)));
|
|
47
|
-
var ComboboxPopup = (h, combobox, options = {}) => combobox.popup(h.div.class(cn("bg-popover text-foreground shadow-float box-border flex max-h-[min(var(--available-height),20rem)] w-[var(--anchor-width)] max-w-[var(--available-width)] min-w-48 origin-[var(--transform-origin)] flex-col overflow-hidden rounded-lg border text-[13px] transition-[opacity,scale] duration-150 outline-none data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:scale-95 data-[starting-style]:opacity-0", options.class)));
|
|
48
|
-
var ComboboxSearchInput = (h, combobox, options = {}) => h.div.class(cn("text-muted-foreground flex shrink-0 items-center border-b pl-3 [&_svg]:size-3.5", options.class)).children(icon(h, "M21 21l-4.3-4.3M11 18a7 7 0 100-14 7 7 0 000 14z"), combobox.input(h.input.attrs({
|
|
49
|
-
placeholder: options.placeholder,
|
|
50
|
-
"aria-label": options.placeholder
|
|
51
|
-
}).class("h-9 min-w-0 flex-1 bg-transparent px-2 text-[13px] text-foreground outline-none placeholder:text-muted-foreground")));
|
|
52
|
-
var ComboboxEmpty = (h, combobox, options = {}) => combobox.empty(h.div.class(cn("text-muted-foreground px-3 py-5 text-center empty:hidden", options.class)));
|
|
53
|
-
var ComboboxItem = (h, combobox, options) => combobox.item({
|
|
54
|
-
element: h.div.class(cn("data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[disabled]:text-muted-foreground flex min-h-7.5 cursor-default items-center justify-between gap-2 rounded-sm px-2 py-1 leading-snug select-none data-[disabled]:opacity-60 data-[selected]:font-medium", options.class)),
|
|
55
|
-
value: options.value
|
|
56
|
-
});
|
|
57
|
-
var ComboboxItemIndicator = (h, combobox, options) => combobox.itemIndicator({
|
|
58
|
-
element: h.span.class(cn("border-brand mr-1.5 mb-0.5 ml-2.5 h-[9px] w-[5px] shrink-0 rotate-45 border-r-[1.5px] border-b-[1.5px]", options.class)),
|
|
59
|
-
value: options.value
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// ../../src/components/virtualized-combobox/html.ts
|
|
12
|
+
import {
|
|
13
|
+
ComboboxButton,
|
|
14
|
+
ComboboxClear,
|
|
15
|
+
ComboboxEmpty,
|
|
16
|
+
ComboboxItem,
|
|
17
|
+
ComboboxItemIndicator,
|
|
18
|
+
ComboboxPopup,
|
|
19
|
+
ComboboxPositioner,
|
|
20
|
+
ComboboxSearchInput
|
|
21
|
+
} from "@/components/effectcn/combobox";
|
|
63
22
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
64
23
|
|
|
65
24
|
// ../../src/components/virtualized-combobox/classes.ts
|
|
@@ -330,6 +289,9 @@ var VirtualizedCombobox = Html.component({
|
|
|
330
289
|
}
|
|
331
290
|
});
|
|
332
291
|
|
|
292
|
+
// ../../src/lib/utils.ts
|
|
293
|
+
import { cn } from "cn";
|
|
294
|
+
|
|
333
295
|
// ../../src/components/phone-number-input/classes.ts
|
|
334
296
|
var phoneNumberInputClasses = {
|
|
335
297
|
root: "grid gap-2",
|
|
@@ -512,7 +474,7 @@ var phoneCaretOffset = (value, digits) => {
|
|
|
512
474
|
};
|
|
513
475
|
|
|
514
476
|
// ../../src/components/phone-number-input/html.ts
|
|
515
|
-
var
|
|
477
|
+
var Input = Html2.ref("PhoneNationalInput", "input");
|
|
516
478
|
var Value = Schema4.Redacted(Schema4.String);
|
|
517
479
|
var Details = Schema4.Redacted(Schema4.NullOr(Schema4.Struct({
|
|
518
480
|
e164: Schema4.String,
|
|
@@ -553,7 +515,7 @@ var PhoneNumberInput = Html2.component({
|
|
|
553
515
|
return next;
|
|
554
516
|
const { nationalValue } = getPhoneNumberView({ value: Redacted.value(value), country, countries: [country] }, "en");
|
|
555
517
|
const position = phoneCaretOffset(nationalValue, caret);
|
|
556
|
-
return next.run(HtmlCommand.select(
|
|
518
|
+
return next.run(HtmlCommand.select(Input, () => Message.Ignored(), { start: position }));
|
|
557
519
|
},
|
|
558
520
|
Ignored: () => null
|
|
559
521
|
}),
|
|
@@ -598,10 +560,10 @@ var PhoneNumberInput = Html2.component({
|
|
|
598
560
|
const selected = options.find((option) => option === value);
|
|
599
561
|
return selected && selected !== p.country ? request(changeNational(nationalDigits, getCountryCallingCode3(selected), extension, selected), selected) : undefined;
|
|
600
562
|
}
|
|
601
|
-
}),
|
|
563
|
+
}), TextInput(h, {
|
|
602
564
|
props: { value: nationalValue, disabled: p.disabled },
|
|
603
565
|
class: cn(phoneNumberInputClasses.numberInput, p.className)
|
|
604
|
-
}).ref(
|
|
566
|
+
}).ref(Input).attrs({
|
|
605
567
|
id,
|
|
606
568
|
type: "tel",
|
|
607
569
|
inputmode: "numeric",
|
|
@@ -638,7 +600,7 @@ var PhoneNumberInput = Html2.component({
|
|
|
638
600
|
value,
|
|
639
601
|
details: normalizePhoneNumber(value, p.country)
|
|
640
602
|
}) : undefined;
|
|
641
|
-
})), (p.withExtension || extension) && h.div.class(phoneNumberInputClasses.extension).attr("data-slot", "phone-number-extension").children(h.label.attr("for", h.id("extension")).class(phoneNumberInputClasses.hint).children(copy.extension),
|
|
603
|
+
})), (p.withExtension || extension) && h.div.class(phoneNumberInputClasses.extension).attr("data-slot", "phone-number-extension").children(h.label.attr("for", h.id("extension")).class(phoneNumberInputClasses.hint).children(copy.extension), TextInput(h, {
|
|
642
604
|
props: { value: extension, disabled: p.disabled },
|
|
643
605
|
onUpdate: ({ value }) => request(changeNational(nationalDigits, callingCode, value.replace(/\D/g, ""), p.country))
|
|
644
606
|
}).attrs({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentProps } from "react";
|
|
2
2
|
import { type CountryCode } from "libphonenumber-js/max";
|
|
3
|
-
import { Input } from "
|
|
3
|
+
import { Input } from "@/components/ui/input";
|
|
4
4
|
import { type PhoneNumberDetails } from "./index.js";
|
|
5
5
|
import type { PhoneNumberSharedProps } from "./schema.js";
|
|
6
6
|
export { normalizePhoneNumber, type PhoneNumberDetails } from "./index.js";
|