@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,65 +1,21 @@
|
|
|
1
1
|
// ../../src/components/theme-switcher/html.ts
|
|
2
2
|
import { Html } from "effect/ui/html";
|
|
3
3
|
import { Menu } from "effect/ui/kit";
|
|
4
|
-
|
|
5
|
-
// ../../src/lib/utils.ts
|
|
6
|
-
import { cn } from "cn";
|
|
7
|
-
|
|
8
|
-
// ../../src/components/effectcn/button.ts
|
|
9
4
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
brand: "bg-brand-soft text-brand-soft-foreground hover:bg-brand-soft/85",
|
|
19
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85",
|
|
20
|
-
link: "h-auto px-0 text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current"
|
|
21
|
-
};
|
|
22
|
-
var sizes = {
|
|
23
|
-
default: "",
|
|
24
|
-
sm: "h-7 rounded-sm px-2.5 text-xs",
|
|
25
|
-
lg: "h-10 px-5 text-sm",
|
|
26
|
-
icon: "w-8.5 px-0",
|
|
27
|
-
"icon-sm": "h-7 w-7 rounded-sm px-0"
|
|
28
|
-
};
|
|
29
|
-
var buttonVariants = (options = {}) => cn(base, variants[options.variant ?? "default"], sizes[options.size ?? "default"], options.class);
|
|
30
|
-
|
|
31
|
-
// ../../src/components/effectcn/menu.ts
|
|
32
|
-
var popup = "max-h-[var(--available-height)] max-w-[min(320px,var(--available-width))] min-w-[200px] origin-[var(--transform-origin)] " + "overflow-y-auto rounded-lg border bg-popover p-1 text-[13px] leading-snug text-foreground shadow-float outline-none " + "transition-[opacity,scale] duration-150 ease-out data-[nested]:min-w-[150px] " + "data-[starting-style]:scale-95 data-[starting-style]:opacity-0 " + "data-[ending-style]:scale-95 data-[ending-style]:opacity-0 data-[ending-style]:duration-100 " + "data-[instant]:transition-none";
|
|
33
|
-
var item = "relative flex min-h-[30px] cursor-default items-center gap-2 rounded-sm px-2 whitespace-nowrap text-foreground " + "no-underline outline-none select-none data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground " + "data-[popup-open]:bg-accent data-[disabled]:opacity-45 " + "[&_svg]:size-[15px] [&_svg]:shrink-0 [&_svg]:text-muted-foreground";
|
|
34
|
-
var inset = "pl-[30px]";
|
|
35
|
-
var tick = "before:absolute before:top-1/2 before:left-[10px] before:h-[5px] before:w-[9px] before:-translate-y-[70%] " + "before:-rotate-45 before:border-b-2 before:border-l-2 before:border-brand before:opacity-0 before:content-[''] " + "data-[checked]:before:opacity-100";
|
|
36
|
-
var dot = "before:absolute before:top-1/2 before:left-[12px] before:size-1.5 before:-translate-y-1/2 before:rounded-full " + "before:bg-brand before:opacity-0 before:content-[''] data-[checked]:before:opacity-100";
|
|
37
|
-
var submenuArrow = "after:ml-auto after:size-1.5 after:-translate-x-0.5 after:rotate-45 after:border-t-[1.5px] after:border-r-[1.5px] " + "after:border-muted-foreground after:content-['']";
|
|
38
|
-
var MenuTrigger = (h, menu, options = {}) => {
|
|
39
|
-
const { class: className, size, variant = "outline", ...trigger } = options;
|
|
40
|
-
return menu.trigger({
|
|
41
|
-
...trigger,
|
|
42
|
-
element: h.button.class(buttonVariants({ variant, size, class: cn("group", className) }))
|
|
43
|
-
});
|
|
44
|
-
};
|
|
45
|
-
var MenuPositioner = (h, menu, options = {}) => menu.positioner(h.div.class(cn("overflow-visible border-0 bg-transparent p-0 text-inherit outline-none", options.class)));
|
|
46
|
-
var MenuPopup = (h, menu, options = {}) => menu.popup(h.div.class(cn(popup, options.class)));
|
|
47
|
-
var MenuRadioGroup = (h, menu, options = {}) => menu.radioGroup(h.div.class(cn(options.class)).attr("aria-label", options.label));
|
|
48
|
-
var MenuRadioItem = (h, menu, options) => menu.radioItem({
|
|
49
|
-
element: h.div.class(cn(item, inset, dot, options.class)),
|
|
50
|
-
value: options.value,
|
|
51
|
-
closeOnClick: options.closeOnClick
|
|
52
|
-
});
|
|
53
|
-
var MenuGroup = (h, menu, options) => menu.group({ element: h.div.class(cn(options.class)), group: options.group });
|
|
54
|
-
var MenuLabel = (h, menu, options) => menu.groupLabel({
|
|
55
|
-
element: h.div.class(cn("text-muted-foreground px-2 pt-1.5 pb-1 text-xs font-medium", options.class)),
|
|
56
|
-
group: options.group
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// ../../src/components/theme-switcher/html.ts
|
|
5
|
+
MenuGroup,
|
|
6
|
+
MenuLabel,
|
|
7
|
+
MenuPopup,
|
|
8
|
+
MenuPositioner,
|
|
9
|
+
MenuRadioItem,
|
|
10
|
+
MenuRadioGroup,
|
|
11
|
+
MenuTrigger
|
|
12
|
+
} from "@/components/effectcn/menu";
|
|
60
13
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
61
14
|
import { Monitor, Moon, Sun } from "@krak-stack/registry/lucide-effect";
|
|
62
15
|
|
|
16
|
+
// ../../src/lib/utils.ts
|
|
17
|
+
import { cn } from "cn";
|
|
18
|
+
|
|
63
19
|
// ../../src/components/theme-switcher/index.ts
|
|
64
20
|
import { Schema as Schema2 } from "effect";
|
|
65
21
|
import { Component, UiSchema } from "effect/ui";
|
|
@@ -9,145 +9,21 @@ import {
|
|
|
9
9
|
useMemo,
|
|
10
10
|
useState
|
|
11
11
|
} from "react";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
import { Button } from "@/components/ui/button";
|
|
13
|
+
import {
|
|
14
|
+
DropdownMenu,
|
|
15
|
+
DropdownMenuContent,
|
|
16
|
+
DropdownMenuGroup,
|
|
17
|
+
DropdownMenuLabel,
|
|
18
|
+
DropdownMenuRadioGroup,
|
|
19
|
+
DropdownMenuRadioItem,
|
|
20
|
+
DropdownMenuTrigger
|
|
21
|
+
} from "@/components/ui/dropdown-menu";
|
|
22
|
+
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
16
23
|
|
|
17
24
|
// ../../src/lib/utils.ts
|
|
18
25
|
import { cn } from "cn";
|
|
19
26
|
|
|
20
|
-
// ../../src/components/ui/button.tsx
|
|
21
|
-
import { jsx } from "react/jsx-runtime";
|
|
22
|
-
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", {
|
|
23
|
-
variants: {
|
|
24
|
-
variant: {
|
|
25
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
26
|
-
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",
|
|
27
|
-
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",
|
|
28
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
29
|
-
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",
|
|
30
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
31
|
-
},
|
|
32
|
-
size: {
|
|
33
|
-
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",
|
|
34
|
-
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",
|
|
35
|
-
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",
|
|
36
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
37
|
-
icon: "size-9",
|
|
38
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
39
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
40
|
-
"icon-lg": "size-10"
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
defaultVariants: {
|
|
44
|
-
variant: "default",
|
|
45
|
-
size: "default"
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
function Button({
|
|
49
|
-
className,
|
|
50
|
-
variant = "default",
|
|
51
|
-
size = "default",
|
|
52
|
-
...props
|
|
53
|
-
}) {
|
|
54
|
-
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
55
|
-
"data-slot": "button",
|
|
56
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
57
|
-
...props
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// ../../src/components/ui/dropdown-menu.tsx
|
|
62
|
-
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
63
|
-
import { ChevronRightIcon, CheckIcon } from "lucide-react";
|
|
64
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
65
|
-
function DropdownMenu({ ...props }) {
|
|
66
|
-
return /* @__PURE__ */ jsx2(MenuPrimitive.Root, {
|
|
67
|
-
"data-slot": "dropdown-menu",
|
|
68
|
-
...props
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
function DropdownMenuTrigger({ ...props }) {
|
|
72
|
-
return /* @__PURE__ */ jsx2(MenuPrimitive.Trigger, {
|
|
73
|
-
"data-slot": "dropdown-menu-trigger",
|
|
74
|
-
...props
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
function DropdownMenuContent({
|
|
78
|
-
align = "start",
|
|
79
|
-
alignOffset = 0,
|
|
80
|
-
side = "bottom",
|
|
81
|
-
sideOffset = 4,
|
|
82
|
-
className,
|
|
83
|
-
...props
|
|
84
|
-
}) {
|
|
85
|
-
return /* @__PURE__ */ jsx2(MenuPrimitive.Portal, {
|
|
86
|
-
children: /* @__PURE__ */ jsx2(MenuPrimitive.Positioner, {
|
|
87
|
-
className: "isolate z-50 outline-none",
|
|
88
|
-
align,
|
|
89
|
-
alignOffset,
|
|
90
|
-
side,
|
|
91
|
-
sideOffset,
|
|
92
|
-
children: /* @__PURE__ */ jsx2(MenuPrimitive.Popup, {
|
|
93
|
-
"data-slot": "dropdown-menu-content",
|
|
94
|
-
className: cn("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
95
|
-
...props
|
|
96
|
-
})
|
|
97
|
-
})
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function DropdownMenuGroup({ ...props }) {
|
|
101
|
-
return /* @__PURE__ */ jsx2(MenuPrimitive.Group, {
|
|
102
|
-
"data-slot": "dropdown-menu-group",
|
|
103
|
-
...props
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
function DropdownMenuLabel({
|
|
107
|
-
className,
|
|
108
|
-
inset,
|
|
109
|
-
...props
|
|
110
|
-
}) {
|
|
111
|
-
return /* @__PURE__ */ jsx2(MenuPrimitive.GroupLabel, {
|
|
112
|
-
"data-slot": "dropdown-menu-label",
|
|
113
|
-
"data-inset": inset,
|
|
114
|
-
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8", className),
|
|
115
|
-
...props
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
function DropdownMenuRadioGroup({ ...props }) {
|
|
119
|
-
return /* @__PURE__ */ jsx2(MenuPrimitive.RadioGroup, {
|
|
120
|
-
"data-slot": "dropdown-menu-radio-group",
|
|
121
|
-
...props
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
function DropdownMenuRadioItem({
|
|
125
|
-
className,
|
|
126
|
-
children,
|
|
127
|
-
inset,
|
|
128
|
-
...props
|
|
129
|
-
}) {
|
|
130
|
-
return /* @__PURE__ */ jsxs(MenuPrimitive.RadioItem, {
|
|
131
|
-
"data-slot": "dropdown-menu-radio-item",
|
|
132
|
-
"data-inset": inset,
|
|
133
|
-
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
134
|
-
...props,
|
|
135
|
-
children: [
|
|
136
|
-
/* @__PURE__ */ jsx2("span", {
|
|
137
|
-
className: "pointer-events-none absolute right-2 flex items-center justify-center",
|
|
138
|
-
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
139
|
-
children: /* @__PURE__ */ jsx2(MenuPrimitive.RadioItemIndicator, {
|
|
140
|
-
children: /* @__PURE__ */ jsx2(CheckIcon, {})
|
|
141
|
-
})
|
|
142
|
-
}),
|
|
143
|
-
children
|
|
144
|
-
]
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
// ../../src/components/theme-switcher/react.tsx
|
|
149
|
-
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
150
|
-
|
|
151
27
|
// ../../src/components/theme-switcher/index.ts
|
|
152
28
|
import { Schema as Schema2 } from "effect";
|
|
153
29
|
import { Component, UiSchema } from "effect/ui";
|
|
@@ -212,7 +88,7 @@ var update = Component.define(themeSwitcherOptions).update({
|
|
|
212
88
|
});
|
|
213
89
|
|
|
214
90
|
// ../../src/components/theme-switcher/react.tsx
|
|
215
|
-
import { jsx
|
|
91
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
216
92
|
var DEFAULT_THEME = "system";
|
|
217
93
|
var DEFAULT_SYSTEM_THEME = "light";
|
|
218
94
|
var ThemeProviderContext = createContext(null);
|
|
@@ -287,12 +163,12 @@ var ThemeProvider = ({
|
|
|
287
163
|
theme,
|
|
288
164
|
setTheme: (theme) => updateTheme({ theme, systemTheme })
|
|
289
165
|
}), [systemTheme, theme, updateTheme]);
|
|
290
|
-
return /* @__PURE__ */
|
|
166
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
291
167
|
children: [
|
|
292
|
-
scriptDisabled ? null : /* @__PURE__ */
|
|
168
|
+
scriptDisabled ? null : /* @__PURE__ */ jsx(ScriptOnce, {
|
|
293
169
|
children: themeScript
|
|
294
170
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ jsx(ThemeProviderContext.Provider, {
|
|
296
172
|
value,
|
|
297
173
|
children
|
|
298
174
|
})
|
|
@@ -317,33 +193,33 @@ var ThemeSwitcher = ({
|
|
|
317
193
|
const locale = useKrakstackLocale(localeOverride);
|
|
318
194
|
const labels = themeMessages(locale, messages);
|
|
319
195
|
const Icon = iconForTheme[value];
|
|
320
|
-
return /* @__PURE__ */
|
|
196
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, {
|
|
321
197
|
children: [
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
render: /* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
199
|
+
render: /* @__PURE__ */ jsxs(Button, {
|
|
324
200
|
variant: "outline",
|
|
325
201
|
size: "icon",
|
|
326
202
|
"aria-label": labels.title,
|
|
327
203
|
className,
|
|
328
204
|
children: [
|
|
329
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ jsx(Icon, {
|
|
330
206
|
"aria-hidden": "true"
|
|
331
207
|
}),
|
|
332
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ jsx("span", {
|
|
333
209
|
className: "sr-only",
|
|
334
210
|
children: labels.title
|
|
335
211
|
})
|
|
336
212
|
]
|
|
337
213
|
})
|
|
338
214
|
}),
|
|
339
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
340
216
|
className: cn("w-32", contentClassName),
|
|
341
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: /* @__PURE__ */ jsxs(DropdownMenuGroup, {
|
|
342
218
|
children: [
|
|
343
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, {
|
|
344
220
|
children: labels.title
|
|
345
221
|
}),
|
|
346
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
|
|
347
223
|
"aria-label": labels.title,
|
|
348
224
|
value,
|
|
349
225
|
onValueChange: (theme) => {
|
|
@@ -351,13 +227,13 @@ var ThemeSwitcher = ({
|
|
|
351
227
|
if (selected)
|
|
352
228
|
onChange(selected);
|
|
353
229
|
},
|
|
354
|
-
children: options.map((theme) => /* @__PURE__ */
|
|
230
|
+
children: options.map((theme) => /* @__PURE__ */ jsxs(DropdownMenuRadioItem, {
|
|
355
231
|
value: theme,
|
|
356
232
|
children: [
|
|
357
|
-
/* @__PURE__ */
|
|
233
|
+
/* @__PURE__ */ jsx(ThemeOptionIcon, {
|
|
358
234
|
theme
|
|
359
235
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ jsx("span", {
|
|
361
237
|
children: labels[theme]
|
|
362
238
|
})
|
|
363
239
|
]
|
|
@@ -371,7 +247,7 @@ var ThemeSwitcher = ({
|
|
|
371
247
|
};
|
|
372
248
|
var ThemeOptionIcon = ({ theme }) => {
|
|
373
249
|
const Icon = iconForTheme[theme];
|
|
374
|
-
return /* @__PURE__ */
|
|
250
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
375
251
|
"aria-hidden": "true",
|
|
376
252
|
className: "text-muted-foreground"
|
|
377
253
|
});
|
|
@@ -58,11 +58,11 @@ export declare const TimeInput: Component.Component<"TimeInput", {
|
|
|
58
58
|
}, {
|
|
59
59
|
readonly open: boolean;
|
|
60
60
|
}, {
|
|
61
|
-
readonly _tag: "Cleared";
|
|
62
|
-
} | {
|
|
63
61
|
readonly _tag: "Closed";
|
|
64
62
|
} | {
|
|
65
63
|
readonly _tag: "Opened";
|
|
64
|
+
} | {
|
|
65
|
+
readonly _tag: "Cleared";
|
|
66
66
|
} | {
|
|
67
67
|
readonly _tag: "Edited";
|
|
68
68
|
readonly value: string;
|
|
@@ -3,64 +3,19 @@ import { Effect, Schema as Schema3, Stream } from "effect";
|
|
|
3
3
|
import { Component as Component2, Mount } from "effect/ui";
|
|
4
4
|
import { Html } from "effect/ui/html";
|
|
5
5
|
import { Popover } from "effect/ui/kit";
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
import { Button, buttonVariants } from "@/components/effectcn/button";
|
|
7
|
+
import { Input, InputGroup } from "@/components/effectcn/input";
|
|
8
8
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
PopoverPopup,
|
|
10
|
+
PopoverPositioner,
|
|
11
|
+
PopoverTitle
|
|
12
|
+
} from "@/components/effectcn/popover";
|
|
13
|
+
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
14
|
+
import { Clock as ClockIcon, X } from "@krak-stack/registry/lucide-effect";
|
|
11
15
|
|
|
12
16
|
// ../../src/lib/utils.ts
|
|
13
17
|
import { cn } from "cn";
|
|
14
18
|
|
|
15
|
-
// ../../src/components/effectcn/button.ts
|
|
16
|
-
var base = "inline-flex h-8.5 shrink-0 items-center justify-center gap-1.5 rounded-md border border-transparent px-3.5 text-[13px] leading-none font-medium whitespace-nowrap no-underline select-none transition-[background-color,border-color,color,opacity] duration-150 active:translate-y-px data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_svg]:size-[15px] [&_svg]:shrink-0 data-[loading]:before:size-3 data-[loading]:before:animate-spin data-[loading]:before:rounded-full data-[loading]:before:border-2 data-[loading]:before:border-current data-[loading]:before:border-r-transparent";
|
|
17
|
-
var variants = {
|
|
18
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/85",
|
|
19
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-accent",
|
|
20
|
-
outline: "border-input bg-background text-foreground shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
21
|
-
ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
22
|
-
brand: "bg-brand-soft text-brand-soft-foreground hover:bg-brand-soft/85",
|
|
23
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85",
|
|
24
|
-
link: "h-auto px-0 text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current"
|
|
25
|
-
};
|
|
26
|
-
var sizes = {
|
|
27
|
-
default: "",
|
|
28
|
-
sm: "h-7 rounded-sm px-2.5 text-xs",
|
|
29
|
-
lg: "h-10 px-5 text-sm",
|
|
30
|
-
icon: "w-8.5 px-0",
|
|
31
|
-
"icon-sm": "h-7 w-7 rounded-sm px-0"
|
|
32
|
-
};
|
|
33
|
-
var buttonVariants = (options = {}) => cn(base, variants[options.variant ?? "default"], sizes[options.size ?? "default"], options.class);
|
|
34
|
-
var Button = (h, options = {}) => KitButton(h, {
|
|
35
|
-
element: options.element,
|
|
36
|
-
onPress: options.onPress,
|
|
37
|
-
props: options.loading ? { ...options.props, disabled: true, focusableWhenDisabled: true } : options.props
|
|
38
|
-
}).class(buttonVariants(options)).attr("data-loading", options.loading ? "" : undefined);
|
|
39
|
-
|
|
40
|
-
// ../../src/components/effectcn/input.ts
|
|
41
|
-
import {
|
|
42
|
-
Input as KitInput
|
|
43
|
-
} from "effect/ui/kit";
|
|
44
|
-
var base2 = "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";
|
|
45
|
-
var sizes2 = {
|
|
46
|
-
default: "",
|
|
47
|
-
sm: "h-7 rounded-sm px-2.5 text-xs",
|
|
48
|
-
lg: "h-10 px-3.5 text-sm"
|
|
49
|
-
};
|
|
50
|
-
var inputVariants = (options = {}) => cn(base2, sizes2[options.size ?? "default"], options.class);
|
|
51
|
-
var Input = (h, options) => KitInput(h, options).class(inputVariants(options));
|
|
52
|
-
var InputGroup = (h, options = {}) => h.div.class(cn("border-input bg-background flex h-8.5 w-full items-center rounded-md border shadow-sm", "focus-within:border-ring focus-within:ring-ring/20 transition-[border-color,box-shadow] duration-150 focus-within:ring-3", "has-[input[aria-invalid=true]]:border-destructive has-[input[data-disabled]]:opacity-50", "[&>input]:h-full [&>input]:flex-1 [&>input]:border-0 [&>input]:bg-transparent [&>input]:shadow-none [&>input]:focus-visible:ring-0", options.class));
|
|
53
|
-
|
|
54
|
-
// ../../src/components/effectcn/popover.ts
|
|
55
|
-
var sizes3 = { sm: "w-56", default: "w-72", auto: "w-auto" };
|
|
56
|
-
var PopoverPositioner = (h, popover, options = {}) => popover.positioner(h.div.class(cn("z-50 outline-none", options.class)));
|
|
57
|
-
var PopoverPopup = (h, popover, options = {}) => popover.popup(h.div.class(cn("bg-popover relative flex origin-[var(--transform-origin)] flex-col gap-2 rounded-lg border p-4 text-[13px]", "text-popover-foreground shadow-md outline-none", "h-[var(--popup-height,auto)] transition-[opacity,scale,height] duration-150 ease-out", "data-[ending-style]:scale-95 data-[ending-style]:opacity-0", "data-[starting-style]:scale-95 data-[starting-style]:opacity-0", "data-[instant]:duration-0", sizes3[options.size ?? "default"], options.class)));
|
|
58
|
-
var PopoverTitle = (h, popover, options = {}) => popover.title(h.h2.class(cn("m-0 border-0 p-0 text-sm leading-snug font-semibold", options.class)));
|
|
59
|
-
|
|
60
|
-
// ../../src/components/time-input/html.ts
|
|
61
|
-
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
62
|
-
import { Clock as ClockIcon, X } from "@krak-stack/registry/lucide-effect";
|
|
63
|
-
|
|
64
19
|
// ../../src/components/time-input/classes.ts
|
|
65
20
|
var timeInputClasses = {
|
|
66
21
|
root: "grid min-w-0 gap-2",
|