@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,309 +1,24 @@
|
|
|
1
1
|
// ../../src/components/date-input/react.tsx
|
|
2
|
-
import { useEffect
|
|
2
|
+
import { useEffect, useId, useRef, useState } from "react";
|
|
3
3
|
import { CalendarDays, X } from "lucide-react";
|
|
4
4
|
import { enUS, fr } from "react-day-picker/locale";
|
|
5
|
-
|
|
6
|
-
// ../../src/components/ui/calendar.tsx
|
|
7
|
-
import * as React from "react";
|
|
8
|
-
import { cn as cn2 } from "cn";
|
|
5
|
+
import { Calendar, CalendarDayButton } from "@/components/ui/calendar";
|
|
9
6
|
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
InputGroup,
|
|
8
|
+
InputGroupButton,
|
|
9
|
+
InputGroupInput
|
|
10
|
+
} from "@/components/ui/input-group";
|
|
11
|
+
import {
|
|
12
|
+
Popover,
|
|
13
|
+
PopoverContent,
|
|
14
|
+
PopoverTitle,
|
|
15
|
+
PopoverTrigger
|
|
16
|
+
} from "@/components/ui/popover";
|
|
17
|
+
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
17
18
|
|
|
18
19
|
// ../../src/lib/utils.ts
|
|
19
20
|
import { cn } from "cn";
|
|
20
21
|
|
|
21
|
-
// ../../src/components/ui/button.tsx
|
|
22
|
-
import { jsx } from "react/jsx-runtime";
|
|
23
|
-
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", {
|
|
24
|
-
variants: {
|
|
25
|
-
variant: {
|
|
26
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
27
|
-
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",
|
|
28
|
-
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",
|
|
29
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
30
|
-
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",
|
|
31
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
32
|
-
},
|
|
33
|
-
size: {
|
|
34
|
-
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",
|
|
35
|
-
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",
|
|
36
|
-
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",
|
|
37
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
38
|
-
icon: "size-9",
|
|
39
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
40
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
41
|
-
"icon-lg": "size-10"
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
defaultVariants: {
|
|
45
|
-
variant: "default",
|
|
46
|
-
size: "default"
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
function Button({
|
|
50
|
-
className,
|
|
51
|
-
variant = "default",
|
|
52
|
-
size = "default",
|
|
53
|
-
...props
|
|
54
|
-
}) {
|
|
55
|
-
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
56
|
-
"data-slot": "button",
|
|
57
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
58
|
-
...props
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// ../../src/components/ui/calendar.tsx
|
|
63
|
-
import { ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon } from "lucide-react";
|
|
64
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
65
|
-
function Calendar({
|
|
66
|
-
className,
|
|
67
|
-
classNames,
|
|
68
|
-
showOutsideDays = true,
|
|
69
|
-
captionLayout = "label",
|
|
70
|
-
buttonVariant = "ghost",
|
|
71
|
-
locale,
|
|
72
|
-
formatters,
|
|
73
|
-
components,
|
|
74
|
-
...props
|
|
75
|
-
}) {
|
|
76
|
-
const defaultClassNames = getDefaultClassNames();
|
|
77
|
-
return /* @__PURE__ */ jsx2(DayPicker, {
|
|
78
|
-
showOutsideDays,
|
|
79
|
-
className: cn2("group/calendar bg-background p-3 [--cell-radius:var(--radius-md)] [--cell-size:--spacing(8)] in-data-[slot=card-content]:bg-transparent in-data-[slot=popover-content]:bg-transparent", String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`, String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`, className),
|
|
80
|
-
captionLayout,
|
|
81
|
-
locale,
|
|
82
|
-
formatters: {
|
|
83
|
-
formatMonthDropdown: (date) => date.toLocaleString(locale?.code, { month: "short" }),
|
|
84
|
-
...formatters
|
|
85
|
-
},
|
|
86
|
-
classNames: {
|
|
87
|
-
root: cn2("w-fit", defaultClassNames.root),
|
|
88
|
-
months: cn2("relative flex flex-col gap-4 md:flex-row", defaultClassNames.months),
|
|
89
|
-
month: cn2("flex w-full flex-col gap-4", defaultClassNames.month),
|
|
90
|
-
nav: cn2("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
|
|
91
|
-
button_previous: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
|
|
92
|
-
button_next: cn2(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
|
|
93
|
-
month_caption: cn2("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
|
|
94
|
-
dropdowns: cn2("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
|
|
95
|
-
dropdown_root: cn2("relative rounded-(--cell-radius)", defaultClassNames.dropdown_root),
|
|
96
|
-
dropdown: cn2("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
|
|
97
|
-
caption_label: cn2("font-medium select-none", captionLayout === "label" ? "text-sm" : "flex items-center gap-1 rounded-(--cell-radius) text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
|
|
98
|
-
month_grid: cn2("w-full border-collapse", defaultClassNames.month_grid),
|
|
99
|
-
weekdays: cn2("flex", defaultClassNames.weekdays),
|
|
100
|
-
weekday: cn2("flex-1 rounded-(--cell-radius) text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
|
|
101
|
-
week: cn2("mt-2 flex w-full", defaultClassNames.week),
|
|
102
|
-
week_number_header: cn2("w-(--cell-size) select-none", defaultClassNames.week_number_header),
|
|
103
|
-
week_number: cn2("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
|
|
104
|
-
day: cn2("group/day relative aspect-square h-full w-full rounded-(--cell-radius) p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-(--cell-radius)", props.showWeekNumber ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-(--cell-radius)" : "[&:first-child[data-selected=true]_button]:rounded-l-(--cell-radius)", defaultClassNames.day),
|
|
105
|
-
range_start: cn2("relative isolate z-0 rounded-l-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:right-0 after:w-4 after:bg-muted", defaultClassNames.range_start),
|
|
106
|
-
range_middle: cn2("rounded-none", defaultClassNames.range_middle),
|
|
107
|
-
range_end: cn2("relative isolate z-0 rounded-r-(--cell-radius) bg-muted after:absolute after:inset-y-0 after:left-0 after:w-4 after:bg-muted", defaultClassNames.range_end),
|
|
108
|
-
today: cn2("rounded-(--cell-radius) bg-muted text-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
|
|
109
|
-
outside: cn2("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
|
|
110
|
-
disabled: cn2("text-muted-foreground opacity-50", defaultClassNames.disabled),
|
|
111
|
-
hidden: cn2("invisible", defaultClassNames.hidden),
|
|
112
|
-
...classNames
|
|
113
|
-
},
|
|
114
|
-
components: {
|
|
115
|
-
Root: ({ className, rootRef, ...props }) => {
|
|
116
|
-
return /* @__PURE__ */ jsx2("div", {
|
|
117
|
-
"data-slot": "calendar",
|
|
118
|
-
ref: rootRef,
|
|
119
|
-
className: cn2(className),
|
|
120
|
-
...props
|
|
121
|
-
});
|
|
122
|
-
},
|
|
123
|
-
Chevron: ({ className, orientation, ...props }) => {
|
|
124
|
-
if (orientation === "left") {
|
|
125
|
-
return /* @__PURE__ */ jsx2(ChevronLeftIcon, {
|
|
126
|
-
className: cn2("size-4", className),
|
|
127
|
-
...props
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
if (orientation === "right") {
|
|
131
|
-
return /* @__PURE__ */ jsx2(ChevronRightIcon, {
|
|
132
|
-
className: cn2("size-4", className),
|
|
133
|
-
...props
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
return /* @__PURE__ */ jsx2(ChevronDownIcon, {
|
|
137
|
-
className: cn2("size-4", className),
|
|
138
|
-
...props
|
|
139
|
-
});
|
|
140
|
-
},
|
|
141
|
-
DayButton: ({ ...props }) => /* @__PURE__ */ jsx2(CalendarDayButton, {
|
|
142
|
-
locale,
|
|
143
|
-
...props
|
|
144
|
-
}),
|
|
145
|
-
WeekNumber: ({ children, ...props }) => {
|
|
146
|
-
return /* @__PURE__ */ jsx2("td", {
|
|
147
|
-
...props,
|
|
148
|
-
children: /* @__PURE__ */ jsx2("div", {
|
|
149
|
-
className: "flex size-(--cell-size) items-center justify-center text-center",
|
|
150
|
-
children
|
|
151
|
-
})
|
|
152
|
-
});
|
|
153
|
-
},
|
|
154
|
-
...components
|
|
155
|
-
},
|
|
156
|
-
...props
|
|
157
|
-
});
|
|
158
|
-
}
|
|
159
|
-
function CalendarDayButton({
|
|
160
|
-
className,
|
|
161
|
-
day,
|
|
162
|
-
modifiers,
|
|
163
|
-
locale,
|
|
164
|
-
...props
|
|
165
|
-
}) {
|
|
166
|
-
const defaultClassNames = getDefaultClassNames();
|
|
167
|
-
const ref = React.useRef(null);
|
|
168
|
-
React.useEffect(() => {
|
|
169
|
-
if (modifiers.focused)
|
|
170
|
-
ref.current?.focus();
|
|
171
|
-
}, [modifiers.focused]);
|
|
172
|
-
return /* @__PURE__ */ jsx2(Button, {
|
|
173
|
-
variant: "ghost",
|
|
174
|
-
size: "icon",
|
|
175
|
-
"data-day": day.date.toLocaleDateString(locale?.code),
|
|
176
|
-
"data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
|
|
177
|
-
"data-range-start": modifiers.range_start,
|
|
178
|
-
"data-range-end": modifiers.range_end,
|
|
179
|
-
"data-range-middle": modifiers.range_middle,
|
|
180
|
-
className: cn2("relative isolate z-10 flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 border-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-(--cell-radius) data-[range-end=true]:rounded-r-(--cell-radius) data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-muted data-[range-middle=true]:text-foreground data-[range-start=true]:rounded-(--cell-radius) data-[range-start=true]:rounded-l-(--cell-radius) data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
|
|
181
|
-
...props
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// ../../src/components/ui/input-group.tsx
|
|
186
|
-
import { cva as cva2 } from "class-variance-authority";
|
|
187
|
-
|
|
188
|
-
// ../../src/components/ui/input.tsx
|
|
189
|
-
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
190
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
191
|
-
function Input({ className, type, ...props }) {
|
|
192
|
-
return /* @__PURE__ */ jsx3(InputPrimitive, {
|
|
193
|
-
type,
|
|
194
|
-
"data-slot": "input",
|
|
195
|
-
className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
196
|
-
...props
|
|
197
|
-
});
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// ../../src/components/ui/input-group.tsx
|
|
201
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
202
|
-
function InputGroup({ className, ...props }) {
|
|
203
|
-
return /* @__PURE__ */ jsx4("div", {
|
|
204
|
-
"data-slot": "input-group",
|
|
205
|
-
role: "group",
|
|
206
|
-
className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
207
|
-
...props
|
|
208
|
-
});
|
|
209
|
-
}
|
|
210
|
-
var inputGroupAddonVariants = cva2("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
211
|
-
variants: {
|
|
212
|
-
align: {
|
|
213
|
-
"inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
|
|
214
|
-
"inline-end": "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
|
|
215
|
-
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
216
|
-
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
defaultVariants: { align: "inline-start" }
|
|
220
|
-
});
|
|
221
|
-
var inputGroupButtonVariants = cva2("flex items-center gap-2 text-sm shadow-none", {
|
|
222
|
-
variants: {
|
|
223
|
-
size: {
|
|
224
|
-
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
225
|
-
sm: "",
|
|
226
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
227
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
defaultVariants: { size: "xs" }
|
|
231
|
-
});
|
|
232
|
-
function InputGroupButton({
|
|
233
|
-
className,
|
|
234
|
-
type = "button",
|
|
235
|
-
variant = "ghost",
|
|
236
|
-
size = "xs",
|
|
237
|
-
...props
|
|
238
|
-
}) {
|
|
239
|
-
return /* @__PURE__ */ jsx4(Button, {
|
|
240
|
-
type,
|
|
241
|
-
"data-size": size,
|
|
242
|
-
variant,
|
|
243
|
-
className: cn(inputGroupButtonVariants({ size }), className),
|
|
244
|
-
...props
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
function InputGroupInput({
|
|
248
|
-
className,
|
|
249
|
-
...props
|
|
250
|
-
}) {
|
|
251
|
-
return /* @__PURE__ */ jsx4(Input, {
|
|
252
|
-
"data-slot": "input-group-control",
|
|
253
|
-
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
254
|
-
...props
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
// ../../src/components/ui/popover.tsx
|
|
259
|
-
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
260
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
261
|
-
function Popover({ ...props }) {
|
|
262
|
-
return /* @__PURE__ */ jsx5(PopoverPrimitive.Root, {
|
|
263
|
-
"data-slot": "popover",
|
|
264
|
-
...props
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
function PopoverTrigger({ ...props }) {
|
|
268
|
-
return /* @__PURE__ */ jsx5(PopoverPrimitive.Trigger, {
|
|
269
|
-
"data-slot": "popover-trigger",
|
|
270
|
-
...props
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
function PopoverContent({
|
|
274
|
-
className,
|
|
275
|
-
align = "center",
|
|
276
|
-
alignOffset = 0,
|
|
277
|
-
side = "bottom",
|
|
278
|
-
sideOffset = 4,
|
|
279
|
-
...props
|
|
280
|
-
}) {
|
|
281
|
-
return /* @__PURE__ */ jsx5(PopoverPrimitive.Portal, {
|
|
282
|
-
children: /* @__PURE__ */ jsx5(PopoverPrimitive.Positioner, {
|
|
283
|
-
align,
|
|
284
|
-
alignOffset,
|
|
285
|
-
side,
|
|
286
|
-
sideOffset,
|
|
287
|
-
className: "isolate z-50",
|
|
288
|
-
children: /* @__PURE__ */ jsx5(PopoverPrimitive.Popup, {
|
|
289
|
-
"data-slot": "popover-content",
|
|
290
|
-
className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 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", className),
|
|
291
|
-
...props
|
|
292
|
-
})
|
|
293
|
-
})
|
|
294
|
-
});
|
|
295
|
-
}
|
|
296
|
-
function PopoverTitle({ className, ...props }) {
|
|
297
|
-
return /* @__PURE__ */ jsx5(PopoverPrimitive.Title, {
|
|
298
|
-
"data-slot": "popover-title",
|
|
299
|
-
className: cn("font-medium", className),
|
|
300
|
-
...props
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
// ../../src/components/date-input/react.tsx
|
|
305
|
-
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
306
|
-
|
|
307
22
|
// ../../src/components/date-input/classes.ts
|
|
308
23
|
var dateInputClasses = {
|
|
309
24
|
actions: "size-6 bg-clip-padding hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent",
|
|
@@ -442,16 +157,16 @@ var dateInputBehaviours = {
|
|
|
442
157
|
};
|
|
443
158
|
|
|
444
159
|
// ../../src/components/date-input/react.tsx
|
|
445
|
-
import { jsx
|
|
160
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
446
161
|
"use client";
|
|
447
162
|
var DateInputDayButton = (props) => {
|
|
448
|
-
const ref =
|
|
449
|
-
|
|
163
|
+
const ref = useRef(null);
|
|
164
|
+
useEffect(() => {
|
|
450
165
|
if (props.modifiers.focused)
|
|
451
166
|
ref.current?.focus();
|
|
452
167
|
}, [props.modifiers.focused]);
|
|
453
168
|
const buttonProps = { ...props, ref };
|
|
454
|
-
return /* @__PURE__ */
|
|
169
|
+
return /* @__PURE__ */ jsx(CalendarDayButton, {
|
|
455
170
|
...buttonProps
|
|
456
171
|
});
|
|
457
172
|
};
|
|
@@ -495,7 +210,7 @@ var DateInput = ({
|
|
|
495
210
|
"data-state": status,
|
|
496
211
|
className: cn(dateInputClasses.root, className),
|
|
497
212
|
children: [
|
|
498
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ jsx("label", {
|
|
499
214
|
htmlFor: id,
|
|
500
215
|
"data-slot": "date-input-label",
|
|
501
216
|
className: dateInputClasses.label,
|
|
@@ -506,7 +221,7 @@ var DateInput = ({
|
|
|
506
221
|
className: "min-w-0 gap-1 pe-1 data-[disabled]:opacity-50 [&>input:disabled]:opacity-100",
|
|
507
222
|
"data-disabled": disabled || undefined,
|
|
508
223
|
children: [
|
|
509
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ jsx(InputGroupInput, {
|
|
510
225
|
ref: (element) => {
|
|
511
226
|
element?.setCustomValidity(error ?? "");
|
|
512
227
|
},
|
|
@@ -528,7 +243,7 @@ var DateInput = ({
|
|
|
528
243
|
onValueChange(event.target.value);
|
|
529
244
|
}
|
|
530
245
|
}),
|
|
531
|
-
clearable && value ? /* @__PURE__ */
|
|
246
|
+
clearable && value ? /* @__PURE__ */ jsx(InputGroupButton, {
|
|
532
247
|
type: "button",
|
|
533
248
|
size: "icon-xs",
|
|
534
249
|
className: actionsClass,
|
|
@@ -536,7 +251,7 @@ var DateInput = ({
|
|
|
536
251
|
disabled: locked,
|
|
537
252
|
"aria-label": copy.clear,
|
|
538
253
|
onClick: () => onValueChange(""),
|
|
539
|
-
children: /* @__PURE__ */
|
|
254
|
+
children: /* @__PURE__ */ jsx(X, {
|
|
540
255
|
"aria-hidden": "true"
|
|
541
256
|
})
|
|
542
257
|
}) : null,
|
|
@@ -544,8 +259,8 @@ var DateInput = ({
|
|
|
544
259
|
open: open && !locked && status !== "invalid-range",
|
|
545
260
|
onOpenChange: setOpen,
|
|
546
261
|
children: [
|
|
547
|
-
/* @__PURE__ */
|
|
548
|
-
render: /* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ jsx(PopoverTrigger, {
|
|
263
|
+
render: /* @__PURE__ */ jsx(InputGroupButton, {
|
|
549
264
|
type: "button",
|
|
550
265
|
size: "icon-xs",
|
|
551
266
|
className: actionsClass,
|
|
@@ -553,7 +268,7 @@ var DateInput = ({
|
|
|
553
268
|
"aria-label": copy.open,
|
|
554
269
|
"data-component": "date-input-trigger"
|
|
555
270
|
}),
|
|
556
|
-
children: /* @__PURE__ */
|
|
271
|
+
children: /* @__PURE__ */ jsx(CalendarDays, {
|
|
557
272
|
"aria-hidden": "true"
|
|
558
273
|
})
|
|
559
274
|
}),
|
|
@@ -563,11 +278,11 @@ var DateInput = ({
|
|
|
563
278
|
"data-component": "date-input-content",
|
|
564
279
|
className: cn("w-auto max-w-[calc(100vw-2rem)] gap-0 p-0", contentClassName),
|
|
565
280
|
children: [
|
|
566
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ jsx(PopoverTitle, {
|
|
567
282
|
className: "sr-only",
|
|
568
283
|
children: label ?? copy.label
|
|
569
284
|
}),
|
|
570
|
-
open ? /* @__PURE__ */
|
|
285
|
+
open ? /* @__PURE__ */ jsx(Calendar, {
|
|
571
286
|
components: { DayButton: DateInputDayButton },
|
|
572
287
|
mode: "single",
|
|
573
288
|
required: true,
|
|
@@ -600,13 +315,13 @@ var DateInput = ({
|
|
|
600
315
|
})
|
|
601
316
|
]
|
|
602
317
|
}),
|
|
603
|
-
description ? /* @__PURE__ */
|
|
318
|
+
description ? /* @__PURE__ */ jsx("p", {
|
|
604
319
|
id: `${id}-description`,
|
|
605
320
|
"data-slot": "date-input-description",
|
|
606
321
|
className: dateInputClasses.hint,
|
|
607
322
|
children: description
|
|
608
323
|
}) : null,
|
|
609
|
-
error ? /* @__PURE__ */
|
|
324
|
+
error ? /* @__PURE__ */ jsx("p", {
|
|
610
325
|
id: `${id}-error`,
|
|
611
326
|
"data-slot": "date-input-error",
|
|
612
327
|
role: "status",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const docsArticleClasses: {
|
|
2
|
+
readonly container: "@container/docs-article mx-auto w-full max-w-6xl";
|
|
3
|
+
readonly grid: "grid min-w-0 gap-x-10 @3xl/docs-article:grid-cols-[minmax(0,1fr)_13rem]";
|
|
4
|
+
readonly inlineToc: "group mb-8 overflow-hidden rounded-lg border @3xl/docs-article:hidden";
|
|
5
|
+
readonly tocTrigger: "flex w-full cursor-pointer list-none items-center justify-between gap-3 p-4 text-left text-sm font-semibold [&::-webkit-details-marker]:hidden";
|
|
6
|
+
readonly tocChevron: "text-muted-foreground shrink-0 transition-transform group-open:rotate-180 motion-reduce:transition-none";
|
|
7
|
+
readonly tocPanel: "px-4 pt-1 pb-4";
|
|
8
|
+
readonly tocList: "border-border border-l";
|
|
9
|
+
readonly tocLink: "text-muted-foreground hover:text-foreground block py-1.5 pr-2 text-sm leading-5 wrap-break-word transition-colors";
|
|
10
|
+
readonly tocLinkLevel: {
|
|
11
|
+
readonly 2: "pl-4";
|
|
12
|
+
readonly 3: "pl-6";
|
|
13
|
+
};
|
|
14
|
+
readonly sidebarToc: "sticky top-20 hidden max-h-[calc(100svh-5rem)] self-start overflow-y-auto @3xl/docs-article:block";
|
|
15
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Html } from "effect/ui/html";
|
|
2
|
+
export { matchesDocsSearch, normalizeDocsSearch } from "./index.js";
|
|
3
|
+
export declare const DocsLayout: import("effect/ui/Component").Component<"DocsLayout", {
|
|
4
|
+
readonly locale: string;
|
|
5
|
+
readonly currentPath: string;
|
|
6
|
+
readonly brand: {
|
|
7
|
+
readonly href: string;
|
|
8
|
+
readonly label: string;
|
|
9
|
+
readonly subtitle?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
readonly repository?: {
|
|
12
|
+
readonly href: string;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
} | undefined;
|
|
15
|
+
readonly searchLabel: string;
|
|
16
|
+
readonly searchEmpty?: string | undefined;
|
|
17
|
+
readonly skipLabel: string;
|
|
18
|
+
readonly enableShortcut?: boolean | undefined;
|
|
19
|
+
readonly groups: readonly {
|
|
20
|
+
readonly label: string;
|
|
21
|
+
readonly items: readonly {
|
|
22
|
+
readonly label: string;
|
|
23
|
+
readonly href: string;
|
|
24
|
+
readonly exact?: boolean | undefined;
|
|
25
|
+
readonly badge?: string | undefined;
|
|
26
|
+
readonly external?: boolean | undefined;
|
|
27
|
+
readonly description?: string | undefined;
|
|
28
|
+
readonly searchText?: string | undefined;
|
|
29
|
+
readonly icon?: [string, {
|
|
30
|
+
readonly [x: string]: string | number | undefined;
|
|
31
|
+
}][] | (<Msg>(h: Html.H<Msg>, { size, color, strokeWidth, className, }?: import("../../lib/lucide-effect.js").LucideIconProps) => Html.SvgElement<Msg, never, SVGSVGElement, "svg">) | undefined;
|
|
32
|
+
}[];
|
|
33
|
+
}[];
|
|
34
|
+
}, string, {
|
|
35
|
+
readonly _tag: "Closed";
|
|
36
|
+
} | {
|
|
37
|
+
readonly _tag: "QueryChanged";
|
|
38
|
+
readonly query: string;
|
|
39
|
+
} | {
|
|
40
|
+
readonly _tag: "Selected";
|
|
41
|
+
readonly href: string;
|
|
42
|
+
}, {
|
|
43
|
+
readonly _tag: "Selected";
|
|
44
|
+
readonly href: string;
|
|
45
|
+
}, never, Html.Elements, {}, "brandIcon" | "content" | "headerActions">;
|
|
46
|
+
export declare const DocsArticle: import("effect/ui/Component").Component<"DocsArticle", {
|
|
47
|
+
readonly title: string;
|
|
48
|
+
readonly description?: string | undefined;
|
|
49
|
+
readonly tocLabel: string;
|
|
50
|
+
readonly headings: readonly {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
readonly title: string;
|
|
53
|
+
readonly depth: 2 | 3;
|
|
54
|
+
}[];
|
|
55
|
+
}, null, never, never, never, Html.Elements, {}, "body">;
|