@krak-stack/registry 0.11.3 → 0.11.5
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 +18 -0
- 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 +555 -1265
- 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/html.d.ts +12 -12
- package/dist/components/data-table/html.js +200 -174
- package/dist/components/data-table/react.js +549 -1259
- 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/hint/react.d.ts +15 -0
- package/dist/components/hint/react.js +133 -0
- 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 +211 -184
- package/dist/components/webhook-delivery-table/react.js +585 -1362
- 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 +4 -8
- 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,52 +1,5 @@
|
|
|
1
|
-
// ../../src/components/ui/button.tsx
|
|
2
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
|
|
5
|
-
// ../../src/lib/utils.ts
|
|
6
|
-
import { cn } from "cn";
|
|
7
|
-
|
|
8
|
-
// ../../src/components/ui/button.tsx
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
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", {
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
14
|
-
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",
|
|
15
|
-
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",
|
|
16
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
17
|
-
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",
|
|
18
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
19
|
-
},
|
|
20
|
-
size: {
|
|
21
|
-
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",
|
|
22
|
-
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",
|
|
23
|
-
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",
|
|
24
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
25
|
-
icon: "size-9",
|
|
26
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
27
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
28
|
-
"icon-lg": "size-10"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
variant: "default",
|
|
33
|
-
size: "default"
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
function Button({
|
|
37
|
-
className,
|
|
38
|
-
variant = "default",
|
|
39
|
-
size = "default",
|
|
40
|
-
...props
|
|
41
|
-
}) {
|
|
42
|
-
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
43
|
-
"data-slot": "button",
|
|
44
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
45
|
-
...props
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
1
|
// ../../src/components/copy-button/react.tsx
|
|
2
|
+
import { Button } from "@/components/ui/button";
|
|
50
3
|
import { Check, Copy, TriangleAlert } from "lucide-react";
|
|
51
4
|
import { Redacted as Redacted2 } from "effect";
|
|
52
5
|
import { Component as Component2 } from "effect/ui";
|
|
@@ -149,7 +102,7 @@ var copyButtonStatus = (status, copy, description) => {
|
|
|
149
102
|
};
|
|
150
103
|
|
|
151
104
|
// ../../src/components/copy-button/react.tsx
|
|
152
|
-
import { jsx
|
|
105
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
153
106
|
"use client";
|
|
154
107
|
function CopyButton({
|
|
155
108
|
value,
|
|
@@ -207,22 +160,22 @@ function CopyButton({
|
|
|
207
160
|
size: size ?? defaultSize,
|
|
208
161
|
...props,
|
|
209
162
|
children: [
|
|
210
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ jsx("span", {
|
|
211
164
|
"aria-live": "polite",
|
|
212
165
|
className: "sr-only",
|
|
213
166
|
role: "status",
|
|
214
167
|
children: copyButtonStatus(status, labels, valueDescription)
|
|
215
168
|
}),
|
|
216
|
-
status === "copied" ? /* @__PURE__ */
|
|
169
|
+
status === "copied" ? /* @__PURE__ */ jsx(Check, {
|
|
217
170
|
"aria-hidden": "true"
|
|
218
171
|
}) : null,
|
|
219
|
-
status === "failed" ? /* @__PURE__ */
|
|
172
|
+
status === "failed" ? /* @__PURE__ */ jsx(TriangleAlert, {
|
|
220
173
|
"aria-hidden": "true"
|
|
221
174
|
}) : null,
|
|
222
|
-
status === "idle" ? /* @__PURE__ */
|
|
175
|
+
status === "idle" ? /* @__PURE__ */ jsx(Copy, {
|
|
223
176
|
"aria-hidden": "true"
|
|
224
177
|
}) : null,
|
|
225
|
-
isLarge ? /* @__PURE__ */
|
|
178
|
+
isLarge ? /* @__PURE__ */ jsx("span", {
|
|
226
179
|
children: labels.copy
|
|
227
180
|
}) : null
|
|
228
181
|
]
|
|
@@ -2,58 +2,14 @@
|
|
|
2
2
|
import { Redacted as Redacted3 } from "effect";
|
|
3
3
|
import { Command as Command2 } from "effect/ui";
|
|
4
4
|
import { Html as Html2, HtmlCommand } from "effect/ui/html";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import {
|
|
8
|
-
Button as KitButton
|
|
9
|
-
} from "effect/ui/kit";
|
|
10
|
-
|
|
11
|
-
// ../../src/lib/utils.ts
|
|
12
|
-
import { cn } from "cn";
|
|
13
|
-
|
|
14
|
-
// ../../src/components/effectcn/button.ts
|
|
15
|
-
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";
|
|
16
|
-
var variants = {
|
|
17
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/85",
|
|
18
|
-
secondary: "bg-secondary text-secondary-foreground hover:bg-accent",
|
|
19
|
-
outline: "border-input bg-background text-foreground shadow-sm hover:bg-accent hover:text-accent-foreground",
|
|
20
|
-
ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
21
|
-
brand: "bg-brand-soft text-brand-soft-foreground hover:bg-brand-soft/85",
|
|
22
|
-
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/85",
|
|
23
|
-
link: "h-auto px-0 text-foreground underline decoration-transparent underline-offset-4 hover:decoration-current"
|
|
24
|
-
};
|
|
25
|
-
var sizes = {
|
|
26
|
-
default: "",
|
|
27
|
-
sm: "h-7 rounded-sm px-2.5 text-xs",
|
|
28
|
-
lg: "h-10 px-5 text-sm",
|
|
29
|
-
icon: "w-8.5 px-0",
|
|
30
|
-
"icon-sm": "h-7 w-7 rounded-sm px-0"
|
|
31
|
-
};
|
|
32
|
-
var buttonVariants = (options = {}) => cn(base, variants[options.variant ?? "default"], sizes[options.size ?? "default"], options.class);
|
|
33
|
-
var Button = (h, options = {}) => KitButton(h, {
|
|
34
|
-
element: options.element,
|
|
35
|
-
onPress: options.onPress,
|
|
36
|
-
props: options.loading ? { ...options.props, disabled: true, focusableWhenDisabled: true } : options.props
|
|
37
|
-
}).class(buttonVariants(options)).attr("data-loading", options.loading ? "" : undefined);
|
|
38
|
-
|
|
39
|
-
// ../../src/components/effectcn/input.ts
|
|
40
|
-
import {
|
|
41
|
-
Input as KitInput
|
|
42
|
-
} from "effect/ui/kit";
|
|
43
|
-
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";
|
|
44
|
-
var sizes2 = {
|
|
45
|
-
default: "",
|
|
46
|
-
sm: "h-7 rounded-sm px-2.5 text-xs",
|
|
47
|
-
lg: "h-10 px-3.5 text-sm"
|
|
48
|
-
};
|
|
49
|
-
var inputVariants = (options = {}) => cn(base2, sizes2[options.size ?? "default"], options.class);
|
|
50
|
-
var Input = (h, options) => KitInput(h, options).class(inputVariants(options));
|
|
51
|
-
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));
|
|
5
|
+
import { Button as Button2 } from "@/components/effectcn/button";
|
|
6
|
+
import { Input as EffectInput, InputGroup } from "@/components/effectcn/input";
|
|
52
7
|
|
|
53
8
|
// ../../src/components/copy-button/html.ts
|
|
54
9
|
import { Schema as Schema3 } from "effect";
|
|
55
10
|
import { Component as Component2 } from "effect/ui";
|
|
56
11
|
import { Html } from "effect/ui/html";
|
|
12
|
+
import { Button } from "@/components/effectcn/button";
|
|
57
13
|
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
58
14
|
import { Check, Copy, TriangleAlert } from "@krak-stack/registry/lucide-effect";
|
|
59
15
|
|
|
@@ -182,6 +138,9 @@ var CopyButton = Html.component({
|
|
|
182
138
|
import { krakstackLocaleRead as krakstackLocaleRead2 } from "@krak-stack/registry/krakstack-provider/html";
|
|
183
139
|
import { Eye, EyeOff } from "@krak-stack/registry/lucide-effect";
|
|
184
140
|
|
|
141
|
+
// ../../src/lib/utils.ts
|
|
142
|
+
import { cn } from "cn";
|
|
143
|
+
|
|
185
144
|
// ../../src/components/copy-value/index.ts
|
|
186
145
|
import { Effect as Effect2, Redacted as Redacted2, Schema as Schema5, Stream } from "effect";
|
|
187
146
|
import { Component as Component3, Subscription, UiSchema as UiSchema2, View as View2 } from "effect/ui";
|
|
@@ -271,7 +230,7 @@ var CopyValueModel = Definition2.make({
|
|
|
271
230
|
});
|
|
272
231
|
|
|
273
232
|
// ../../src/components/copy-value/html.ts
|
|
274
|
-
var
|
|
233
|
+
var Input = Html2.ref("CopyValueInput", "input");
|
|
275
234
|
var CopyValue = Html2.component({
|
|
276
235
|
...copyValueOptions,
|
|
277
236
|
props: CopyValuePropsSchema,
|
|
@@ -279,7 +238,7 @@ var CopyValue = Html2.component({
|
|
|
279
238
|
slots: ["icon"]
|
|
280
239
|
}).make({
|
|
281
240
|
...copyValueBehaviours,
|
|
282
|
-
update: ($, message) => message._tag === "Focused" ? $.run(HtmlCommand.select(
|
|
241
|
+
update: ($, message) => message._tag === "Focused" ? $.run(HtmlCommand.select(Input, () => CopyValueMessage.Focused()).pipe(Command2.asNoop)) : copyValueBehaviours.update($, message),
|
|
283
242
|
view: (h, model) => {
|
|
284
243
|
const props = h.props;
|
|
285
244
|
const { label, showLabel } = props;
|
|
@@ -290,19 +249,19 @@ var CopyValue = Html2.component({
|
|
|
290
249
|
const id = h.id("value");
|
|
291
250
|
return h.div.class("grid min-w-0 gap-2").children(showLabel && h.label.class("text-sm font-medium").attr("for", id).children(label), InputGroup(h, {
|
|
292
251
|
class: cn("min-w-0 gap-1 [&>span:not(:empty)+input]:ps-1", (props.secret || props.copyable !== false) && "pe-1", props.variant === "ghost" && "border-transparent bg-transparent shadow-none", props.className)
|
|
293
|
-
}).attr("role", "group").children(h.span.class(cn("text-muted-foreground inline-flex shrink-0 empty:hidden [&_svg]:size-[15px]", props.variant !== "ghost" && "ms-2")).attr("aria-hidden", "true").children(h.slots.icon),
|
|
252
|
+
}).attr("role", "group").children(h.span.class(cn("text-muted-foreground inline-flex shrink-0 empty:hidden [&_svg]:size-[15px]", props.variant !== "ghost" && "ms-2")).attr("aria-hidden", "true").children(h.slots.icon), EffectInput(h, {
|
|
294
253
|
props: {
|
|
295
254
|
value: Redacted3.value(props.value),
|
|
296
255
|
disabled: props.disabled
|
|
297
256
|
},
|
|
298
257
|
class: cn("[&[readonly]]:text-foreground [&[readonly]]:bg-transparent", props.variant === "ghost" && "ps-0 font-mono")
|
|
299
|
-
}).ref(
|
|
258
|
+
}).ref(Input).attrs({
|
|
300
259
|
id,
|
|
301
260
|
type: masked ? "password" : "text",
|
|
302
261
|
"aria-label": masked ? `${label}: ${copy.hidden}` : showLabel ? undefined : label,
|
|
303
262
|
autocomplete: props.secret ? "off" : undefined,
|
|
304
263
|
readonly: ""
|
|
305
|
-
}).on("focus", CopyValueMessage.Focused()), props.secret &&
|
|
264
|
+
}).on("focus", CopyValueMessage.Focused()), props.secret && Button2(h, {
|
|
306
265
|
variant: "ghost",
|
|
307
266
|
size: "icon-sm",
|
|
308
267
|
props: { type: "button", disabled: props.disabled },
|
|
@@ -2,148 +2,15 @@
|
|
|
2
2
|
import { Eye, EyeOff } from "lucide-react";
|
|
3
3
|
import { Redacted as Redacted4 } from "effect";
|
|
4
4
|
import { useId } from "react";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import { cva } from "class-variance-authority";
|
|
12
|
-
|
|
13
|
-
// ../../src/lib/utils.ts
|
|
14
|
-
import { cn } from "cn";
|
|
15
|
-
|
|
16
|
-
// ../../src/components/ui/button.tsx
|
|
17
|
-
import { jsx } from "react/jsx-runtime";
|
|
18
|
-
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", {
|
|
19
|
-
variants: {
|
|
20
|
-
variant: {
|
|
21
|
-
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
22
|
-
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",
|
|
23
|
-
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",
|
|
24
|
-
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
25
|
-
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",
|
|
26
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
27
|
-
},
|
|
28
|
-
size: {
|
|
29
|
-
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",
|
|
30
|
-
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",
|
|
31
|
-
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",
|
|
32
|
-
lg: "h-10 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
33
|
-
icon: "size-9",
|
|
34
|
-
"icon-xs": "size-6 rounded-[min(var(--radius-md),8px)] in-data-[slot=button-group]:rounded-md [&_svg:not([class*='size-'])]:size-3",
|
|
35
|
-
"icon-sm": "size-8 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-md",
|
|
36
|
-
"icon-lg": "size-10"
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
defaultVariants: {
|
|
40
|
-
variant: "default",
|
|
41
|
-
size: "default"
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
function Button({
|
|
45
|
-
className,
|
|
46
|
-
variant = "default",
|
|
47
|
-
size = "default",
|
|
48
|
-
...props
|
|
49
|
-
}) {
|
|
50
|
-
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
51
|
-
"data-slot": "button",
|
|
52
|
-
className: cn(buttonVariants({ variant, size, className })),
|
|
53
|
-
...props
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
// ../../src/components/ui/input.tsx
|
|
58
|
-
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
59
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
60
|
-
function Input({ className, type, ...props }) {
|
|
61
|
-
return /* @__PURE__ */ jsx2(InputPrimitive, {
|
|
62
|
-
type,
|
|
63
|
-
"data-slot": "input",
|
|
64
|
-
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),
|
|
65
|
-
...props
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
// ../../src/components/ui/input-group.tsx
|
|
70
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
71
|
-
function InputGroup({ className, ...props }) {
|
|
72
|
-
return /* @__PURE__ */ jsx3("div", {
|
|
73
|
-
"data-slot": "input-group",
|
|
74
|
-
role: "group",
|
|
75
|
-
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),
|
|
76
|
-
...props
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
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", {
|
|
80
|
-
variants: {
|
|
81
|
-
align: {
|
|
82
|
-
"inline-start": "order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]",
|
|
83
|
-
"inline-end": "order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]",
|
|
84
|
-
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
85
|
-
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
defaultVariants: { align: "inline-start" }
|
|
89
|
-
});
|
|
90
|
-
function InputGroupAddon({
|
|
91
|
-
className,
|
|
92
|
-
align = "inline-start",
|
|
93
|
-
...props
|
|
94
|
-
}) {
|
|
95
|
-
return /* @__PURE__ */ jsx3("div", {
|
|
96
|
-
role: "group",
|
|
97
|
-
"data-slot": "input-group-addon",
|
|
98
|
-
"data-align": align,
|
|
99
|
-
className: cn(inputGroupAddonVariants({ align }), className),
|
|
100
|
-
onClick: (event) => {
|
|
101
|
-
if (event.target instanceof HTMLElement && event.target.closest("button")) {
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
event.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
105
|
-
},
|
|
106
|
-
...props
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
var inputGroupButtonVariants = cva2("flex items-center gap-2 text-sm shadow-none", {
|
|
110
|
-
variants: {
|
|
111
|
-
size: {
|
|
112
|
-
xs: "h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
113
|
-
sm: "",
|
|
114
|
-
"icon-xs": "size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0",
|
|
115
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
defaultVariants: { size: "xs" }
|
|
119
|
-
});
|
|
120
|
-
function InputGroupButton({
|
|
121
|
-
className,
|
|
122
|
-
type = "button",
|
|
123
|
-
variant = "ghost",
|
|
124
|
-
size = "xs",
|
|
125
|
-
...props
|
|
126
|
-
}) {
|
|
127
|
-
return /* @__PURE__ */ jsx3(Button, {
|
|
128
|
-
type,
|
|
129
|
-
"data-size": size,
|
|
130
|
-
variant,
|
|
131
|
-
className: cn(inputGroupButtonVariants({ size }), className),
|
|
132
|
-
...props
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
function InputGroupInput({
|
|
136
|
-
className,
|
|
137
|
-
...props
|
|
138
|
-
}) {
|
|
139
|
-
return /* @__PURE__ */ jsx3(Input, {
|
|
140
|
-
"data-slot": "input-group-control",
|
|
141
|
-
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),
|
|
142
|
-
...props
|
|
143
|
-
});
|
|
144
|
-
}
|
|
5
|
+
import {
|
|
6
|
+
InputGroup,
|
|
7
|
+
InputGroupAddon,
|
|
8
|
+
InputGroupButton,
|
|
9
|
+
InputGroupInput
|
|
10
|
+
} from "@/components/ui/input-group";
|
|
145
11
|
|
|
146
12
|
// ../../src/components/copy-button/react.tsx
|
|
13
|
+
import { Button } from "@/components/ui/button";
|
|
147
14
|
import { Check, Copy, TriangleAlert } from "lucide-react";
|
|
148
15
|
import { Redacted as Redacted2 } from "effect";
|
|
149
16
|
import { Component as Component2 } from "effect/ui";
|
|
@@ -246,7 +113,7 @@ var copyButtonStatus = (status, copy, description) => {
|
|
|
246
113
|
};
|
|
247
114
|
|
|
248
115
|
// ../../src/components/copy-button/react.tsx
|
|
249
|
-
import { jsx
|
|
116
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
250
117
|
"use client";
|
|
251
118
|
function CopyButton({
|
|
252
119
|
value,
|
|
@@ -304,22 +171,22 @@ function CopyButton({
|
|
|
304
171
|
size: size ?? defaultSize,
|
|
305
172
|
...props,
|
|
306
173
|
children: [
|
|
307
|
-
/* @__PURE__ */
|
|
174
|
+
/* @__PURE__ */ jsx("span", {
|
|
308
175
|
"aria-live": "polite",
|
|
309
176
|
className: "sr-only",
|
|
310
177
|
role: "status",
|
|
311
178
|
children: copyButtonStatus(status, labels, valueDescription)
|
|
312
179
|
}),
|
|
313
|
-
status === "copied" ? /* @__PURE__ */
|
|
180
|
+
status === "copied" ? /* @__PURE__ */ jsx(Check, {
|
|
314
181
|
"aria-hidden": "true"
|
|
315
182
|
}) : null,
|
|
316
|
-
status === "failed" ? /* @__PURE__ */
|
|
183
|
+
status === "failed" ? /* @__PURE__ */ jsx(TriangleAlert, {
|
|
317
184
|
"aria-hidden": "true"
|
|
318
185
|
}) : null,
|
|
319
|
-
status === "idle" ? /* @__PURE__ */
|
|
186
|
+
status === "idle" ? /* @__PURE__ */ jsx(Copy, {
|
|
320
187
|
"aria-hidden": "true"
|
|
321
188
|
}) : null,
|
|
322
|
-
isLarge ? /* @__PURE__ */
|
|
189
|
+
isLarge ? /* @__PURE__ */ jsx("span", {
|
|
323
190
|
children: labels.copy
|
|
324
191
|
}) : null
|
|
325
192
|
]
|
|
@@ -331,17 +198,10 @@ function CopyButton({
|
|
|
331
198
|
|
|
332
199
|
// ../../src/components/copy-value/react.tsx
|
|
333
200
|
import { useKrakstackLocale as useKrakstackLocale2 } from "@krak-stack/registry/krakstack-provider/react";
|
|
201
|
+
import { Label } from "@/components/ui/label";
|
|
334
202
|
|
|
335
|
-
// ../../src/
|
|
336
|
-
import {
|
|
337
|
-
"use client";
|
|
338
|
-
function Label({ className, ...props }) {
|
|
339
|
-
return /* @__PURE__ */ jsx5("label", {
|
|
340
|
-
"data-slot": "label",
|
|
341
|
-
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),
|
|
342
|
-
...props
|
|
343
|
-
});
|
|
344
|
-
}
|
|
203
|
+
// ../../src/lib/utils.ts
|
|
204
|
+
import { cn } from "cn";
|
|
345
205
|
|
|
346
206
|
// ../../src/components/copy-value/react.tsx
|
|
347
207
|
import { useModel as useModel2 } from "@krak-stack/registry/effect-ui-adapter/react";
|
|
@@ -435,7 +295,7 @@ var CopyValueModel = Definition2.make({
|
|
|
435
295
|
});
|
|
436
296
|
|
|
437
297
|
// ../../src/components/copy-value/react.tsx
|
|
438
|
-
import { jsx as
|
|
298
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
439
299
|
"use client";
|
|
440
300
|
var CopyValue = ({
|
|
441
301
|
value,
|
|
@@ -466,7 +326,7 @@ var CopyValue = ({
|
|
|
466
326
|
const input = /* @__PURE__ */ jsxs2(InputGroup, {
|
|
467
327
|
className: cn(variant === "ghost" && "border-0 bg-transparent shadow-none dark:bg-transparent", className),
|
|
468
328
|
children: [
|
|
469
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ jsx2(InputGroupInput, {
|
|
470
330
|
id: showLabel ? inputId : undefined,
|
|
471
331
|
className: variant === "ghost" ? "pl-0 font-mono" : undefined,
|
|
472
332
|
"aria-label": secret && !revealed ? `${label}: ${copy.hidden}` : showLabel ? undefined : label,
|
|
@@ -477,16 +337,16 @@ var CopyValue = ({
|
|
|
477
337
|
disabled,
|
|
478
338
|
onFocus: (event) => event.currentTarget.select()
|
|
479
339
|
}),
|
|
480
|
-
Icon && /* @__PURE__ */
|
|
340
|
+
Icon && /* @__PURE__ */ jsx2(InputGroupAddon, {
|
|
481
341
|
align: "inline-start",
|
|
482
|
-
children: /* @__PURE__ */
|
|
342
|
+
children: /* @__PURE__ */ jsx2(Icon, {
|
|
483
343
|
"aria-hidden": "true"
|
|
484
344
|
})
|
|
485
345
|
}),
|
|
486
346
|
(secret || copyable) && /* @__PURE__ */ jsxs2(InputGroupAddon, {
|
|
487
347
|
align: "inline-end",
|
|
488
348
|
children: [
|
|
489
|
-
secret ? /* @__PURE__ */
|
|
349
|
+
secret ? /* @__PURE__ */ jsx2(InputGroupButton, {
|
|
490
350
|
type: "button",
|
|
491
351
|
size: "icon-sm",
|
|
492
352
|
variant: "ghost",
|
|
@@ -494,13 +354,13 @@ var CopyValue = ({
|
|
|
494
354
|
"aria-label": `${revealed ? copy.hide : copy.show} ${label}`,
|
|
495
355
|
"aria-pressed": revealed,
|
|
496
356
|
onClick: () => send(CopyValueMessage.Toggled()),
|
|
497
|
-
children: revealed ? /* @__PURE__ */
|
|
357
|
+
children: revealed ? /* @__PURE__ */ jsx2(EyeOff, {
|
|
498
358
|
"aria-hidden": "true"
|
|
499
|
-
}) : /* @__PURE__ */
|
|
359
|
+
}) : /* @__PURE__ */ jsx2(Eye, {
|
|
500
360
|
"aria-hidden": "true"
|
|
501
361
|
})
|
|
502
362
|
}) : null,
|
|
503
|
-
copyable ? /* @__PURE__ */
|
|
363
|
+
copyable ? /* @__PURE__ */ jsx2(CopyButton, {
|
|
504
364
|
type: "button",
|
|
505
365
|
value,
|
|
506
366
|
valueDescription: label,
|
|
@@ -517,7 +377,7 @@ var CopyValue = ({
|
|
|
517
377
|
return showLabel ? /* @__PURE__ */ jsxs2("div", {
|
|
518
378
|
className: "flex min-w-0 flex-col gap-2",
|
|
519
379
|
children: [
|
|
520
|
-
/* @__PURE__ */
|
|
380
|
+
/* @__PURE__ */ jsx2(Label, {
|
|
521
381
|
htmlFor: inputId,
|
|
522
382
|
children: label
|
|
523
383
|
}),
|
|
@@ -1,27 +1,11 @@
|
|
|
1
1
|
// ../../src/components/cron-input/html.ts
|
|
2
2
|
import { Html } from "effect/ui/html";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
Input as KitInput
|
|
7
|
-
} from "effect/ui/kit";
|
|
3
|
+
import { Input } from "@/components/effectcn/input";
|
|
4
|
+
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
8
5
|
|
|
9
6
|
// ../../src/lib/utils.ts
|
|
10
7
|
import { cn } from "cn";
|
|
11
8
|
|
|
12
|
-
// ../../src/components/effectcn/input.ts
|
|
13
|
-
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";
|
|
14
|
-
var sizes = {
|
|
15
|
-
default: "",
|
|
16
|
-
sm: "h-7 rounded-sm px-2.5 text-xs",
|
|
17
|
-
lg: "h-10 px-3.5 text-sm"
|
|
18
|
-
};
|
|
19
|
-
var inputVariants = (options = {}) => cn(base, sizes[options.size ?? "default"], options.class);
|
|
20
|
-
var Input = (h, options) => KitInput(h, options).class(inputVariants(options));
|
|
21
|
-
|
|
22
|
-
// ../../src/components/cron-input/html.ts
|
|
23
|
-
import { krakstackLocaleRead } from "@krak-stack/registry/krakstack-provider/html";
|
|
24
|
-
|
|
25
9
|
// ../../src/components/cron-input/classes.ts
|
|
26
10
|
var cronInputClasses = {
|
|
27
11
|
root: "grid min-w-0 gap-2",
|
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
// ../../src/components/cron-input/react.tsx
|
|
2
2
|
import { useId, useLayoutEffect, useRef } from "react";
|
|
3
|
-
|
|
4
|
-
// ../../src/components/ui/input.tsx
|
|
5
|
-
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
6
|
-
|
|
7
|
-
// ../../src/lib/utils.ts
|
|
8
|
-
import { cn } from "cn";
|
|
9
|
-
|
|
10
|
-
// ../../src/components/ui/input.tsx
|
|
11
|
-
import { jsx } from "react/jsx-runtime";
|
|
12
|
-
function Input({ className, type, ...props }) {
|
|
13
|
-
return /* @__PURE__ */ jsx(InputPrimitive, {
|
|
14
|
-
type,
|
|
15
|
-
"data-slot": "input",
|
|
16
|
-
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),
|
|
17
|
-
...props
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// ../../src/components/cron-input/react.tsx
|
|
3
|
+
import { Input } from "@/components/ui/input";
|
|
22
4
|
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
23
5
|
|
|
24
6
|
// ../../src/components/cron-input/classes.ts
|
|
@@ -154,8 +136,11 @@ var cronInputBehaviours = {
|
|
|
154
136
|
})
|
|
155
137
|
};
|
|
156
138
|
|
|
139
|
+
// ../../src/lib/utils.ts
|
|
140
|
+
import { cn } from "cn";
|
|
141
|
+
|
|
157
142
|
// ../../src/components/cron-input/react.tsx
|
|
158
|
-
import { jsx
|
|
143
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
159
144
|
var CronInput = ({
|
|
160
145
|
classes: classOverrides,
|
|
161
146
|
value,
|
|
@@ -187,13 +172,13 @@ var CronInput = ({
|
|
|
187
172
|
"data-slot": "cron-input",
|
|
188
173
|
className: cn(cronInputClasses.root, className),
|
|
189
174
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ jsx("label", {
|
|
191
176
|
"data-slot": "cron-label",
|
|
192
177
|
htmlFor: id,
|
|
193
178
|
className: cronInputClasses.label,
|
|
194
179
|
children: label ?? copy.label
|
|
195
180
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ jsx(Input, {
|
|
197
182
|
"data-component": "cron-input",
|
|
198
183
|
id,
|
|
199
184
|
name,
|
|
@@ -223,7 +208,7 @@ var CronInput = ({
|
|
|
223
208
|
onValueChange(next);
|
|
224
209
|
}
|
|
225
210
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ jsx("p", {
|
|
227
212
|
"data-slot": "cron-help",
|
|
228
213
|
id: `${id}-help`,
|
|
229
214
|
className: cronInputClasses.hint,
|
|
@@ -237,12 +222,12 @@ var CronInput = ({
|
|
|
237
222
|
"data-slot": "cron-summary",
|
|
238
223
|
className: cronInputClasses.examplesToggle,
|
|
239
224
|
children: [
|
|
240
|
-
/* @__PURE__ */
|
|
225
|
+
/* @__PURE__ */ jsx("span", {
|
|
241
226
|
className: cronInputClasses.examplesHeading,
|
|
242
227
|
children: copy.next
|
|
243
228
|
}),
|
|
244
229
|
" · ",
|
|
245
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ jsx("time", {
|
|
246
231
|
dateTime: firstRun.toISOString(),
|
|
247
232
|
title: timeZone,
|
|
248
233
|
children: formatCronRun(firstRun, language, timeZone, true)
|
|
@@ -256,22 +241,22 @@ var CronInput = ({
|
|
|
256
241
|
})
|
|
257
242
|
]
|
|
258
243
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ jsx("p", {
|
|
260
245
|
className: cronInputClasses.examples,
|
|
261
246
|
children: timeZone
|
|
262
247
|
}),
|
|
263
|
-
/* @__PURE__ */
|
|
248
|
+
/* @__PURE__ */ jsx("ol", {
|
|
264
249
|
"data-slot": "cron-runs",
|
|
265
250
|
className: cronInputClasses.exampleList,
|
|
266
|
-
children: dates.map((date) => /* @__PURE__ */
|
|
267
|
-
children: /* @__PURE__ */
|
|
251
|
+
children: dates.map((date) => /* @__PURE__ */ jsx("li", {
|
|
252
|
+
children: /* @__PURE__ */ jsx("time", {
|
|
268
253
|
dateTime: date.toISOString(),
|
|
269
254
|
children: formatCronRun(date, language, timeZone)
|
|
270
255
|
})
|
|
271
256
|
}, date.toISOString()))
|
|
272
257
|
})
|
|
273
258
|
]
|
|
274
|
-
}) : /* @__PURE__ */
|
|
259
|
+
}) : /* @__PURE__ */ jsx("p", {
|
|
275
260
|
"data-slot": "cron-error",
|
|
276
261
|
role: "status",
|
|
277
262
|
className: cronInputClasses.error,
|