@krak-stack/registry 0.11.6 → 0.11.7
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 +26 -0
- package/dist/components/audit-log-table/classes.d.ts +1 -0
- package/dist/components/audit-log-table/html.d.ts +158 -0
- package/dist/components/audit-log-table/html.js +3260 -0
- package/dist/components/audit-log-table/index.d.ts +37 -0
- package/dist/components/audit-log-table/react.d.ts +3 -51
- package/dist/components/audit-log-table/react.js +94 -77
- package/dist/components/audit-log-table/schema.d.ts +122 -0
- package/dist/components/copy-button/html.d.ts +2 -2
- package/dist/components/danger-confirmation/index.d.ts +2 -2
- package/dist/components/data-table/classes.d.ts +1 -0
- package/dist/components/data-table/html.d.ts +12 -12
- package/dist/components/data-table/html.js +9 -6
- package/dist/components/data-table/react.js +10 -4
- package/dist/components/date-input/html.d.ts +2 -2
- package/dist/components/editable-text/html.d.ts +2 -2
- package/dist/components/editable-text/index.d.ts +4 -4
- package/dist/components/editing-locale-switcher/html.d.ts +2 -2
- package/dist/components/email-editor/legacy-editor.html.d.ts +6 -6
- package/dist/components/form/react.d.ts +5 -5
- package/dist/components/locale-switcher/html.d.ts +2 -2
- package/dist/components/map-menu/html.d.ts +4 -4
- package/dist/components/presence-transition/index.d.ts +2 -2
- package/dist/components/select-with-custom-input/html.d.ts +2 -2
- package/dist/components/switch/react.d.ts +14 -0
- package/dist/components/switch/react.js +55 -0
- package/dist/components/theme-switcher/html.d.ts +2 -2
- package/dist/components/tracking-notice/classes.d.ts +6 -0
- package/dist/components/tracking-notice/html.d.ts +85 -0
- package/dist/components/tracking-notice/html.js +354 -0
- package/dist/components/tracking-notice/index.d.ts +95 -0
- package/dist/components/tracking-notice/react.d.ts +5 -27
- package/dist/components/tracking-notice/react.js +189 -59
- package/dist/components/tracking-notice/schema.d.ts +45 -0
- package/dist/components/upload-attachment/html.d.ts +4 -4
- package/dist/components/virtualized-combobox/html.d.ts +3 -3
- package/dist/components/webhook-delivery-table/html.js +9 -6
- package/dist/components/webhook-delivery-table/react.js +10 -4
- package/dist/services/events/browser.js +39 -26
- package/dist/services/events/index.js +23 -19
- package/dist/services/opentelemetry/web-vitals.js +27 -23
- package/package.json +9 -1
|
@@ -42,9 +42,9 @@ export declare const DateInput: Component.Component<"DateInput", {
|
|
|
42
42
|
readonly open: boolean;
|
|
43
43
|
readonly month: DateTime.Utc | null;
|
|
44
44
|
}, {
|
|
45
|
-
readonly _tag: "Closed";
|
|
46
|
-
} | {
|
|
47
45
|
readonly _tag: "Opened";
|
|
46
|
+
} | {
|
|
47
|
+
readonly _tag: "Closed";
|
|
48
48
|
} | {
|
|
49
49
|
readonly _tag: "Edited";
|
|
50
50
|
readonly value: string;
|
|
@@ -32,6 +32,8 @@ export declare const EditableText: import("effect/ui/Component").Component<"Edit
|
|
|
32
32
|
readonly draft: Redacted.Redacted<string>;
|
|
33
33
|
}, {
|
|
34
34
|
readonly _tag: "Opened";
|
|
35
|
+
} | {
|
|
36
|
+
readonly _tag: "Focused";
|
|
35
37
|
} | {
|
|
36
38
|
readonly _tag: "Cancelled";
|
|
37
39
|
} | {
|
|
@@ -41,8 +43,6 @@ export declare const EditableText: import("effect/ui/Component").Component<"Edit
|
|
|
41
43
|
readonly _tag: "Finished";
|
|
42
44
|
readonly value: Redacted.Redacted<string>;
|
|
43
45
|
readonly success: boolean;
|
|
44
|
-
} | {
|
|
45
|
-
readonly _tag: "Focused";
|
|
46
46
|
} | {
|
|
47
47
|
readonly _tag: "Saved";
|
|
48
48
|
}, {
|
|
@@ -106,9 +106,9 @@ declare const init: () => Model;
|
|
|
106
106
|
export declare const canSaveEditableText: (model: Model, props: EditableTextSharedProps) => boolean;
|
|
107
107
|
export declare const editableTextTransition: (model: Model, props: EditableTextSharedProps, message: typeof EditableTextMessage.Type) => Model;
|
|
108
108
|
export declare const saveEditableDraft: (model: Model) => Command.Issued<{
|
|
109
|
-
readonly _tag: "Opened";
|
|
110
|
-
} | {
|
|
111
109
|
readonly _tag: "Focused";
|
|
110
|
+
} | {
|
|
111
|
+
readonly _tag: "Opened";
|
|
112
112
|
} | {
|
|
113
113
|
readonly _tag: "Cancelled";
|
|
114
114
|
} | {
|
|
@@ -121,9 +121,9 @@ export declare const saveEditableDraft: (model: Model) => Command.Issued<{
|
|
|
121
121
|
} | {
|
|
122
122
|
readonly _tag: "Saved";
|
|
123
123
|
}, SaveEditableText, {
|
|
124
|
-
readonly _tag: "Opened";
|
|
125
|
-
} | {
|
|
126
124
|
readonly _tag: "Focused";
|
|
125
|
+
} | {
|
|
126
|
+
readonly _tag: "Opened";
|
|
127
127
|
} | {
|
|
128
128
|
readonly _tag: "Cancelled";
|
|
129
129
|
} | {
|
|
@@ -15,9 +15,9 @@ export declare const EditingLocaleSwitcher: import("effect/ui/Component").Compon
|
|
|
15
15
|
} | undefined;
|
|
16
16
|
readonly value: string;
|
|
17
17
|
}, boolean, {
|
|
18
|
-
readonly _tag: "Opened";
|
|
19
|
-
} | {
|
|
20
18
|
readonly _tag: "Closed";
|
|
19
|
+
} | {
|
|
20
|
+
readonly _tag: "Opened";
|
|
21
21
|
} | {
|
|
22
22
|
readonly _tag: "Picked";
|
|
23
23
|
readonly value: string;
|
|
@@ -66,6 +66,12 @@ export declare const LegacyEditor: import("effect/ui/Component").Component<"Emai
|
|
|
66
66
|
readonly link: string;
|
|
67
67
|
readonly linkError: boolean;
|
|
68
68
|
}, {
|
|
69
|
+
readonly _tag: "ApplyLink";
|
|
70
|
+
} | {
|
|
71
|
+
readonly _tag: "CloseLink";
|
|
72
|
+
} | {
|
|
73
|
+
readonly _tag: "ToggleLink";
|
|
74
|
+
} | {
|
|
69
75
|
readonly _tag: "Action";
|
|
70
76
|
readonly action: {
|
|
71
77
|
readonly _tag: "Block";
|
|
@@ -80,8 +86,6 @@ export declare const LegacyEditor: import("effect/ui/Component").Component<"Emai
|
|
|
80
86
|
readonly _tag: "Link";
|
|
81
87
|
readonly href: string;
|
|
82
88
|
};
|
|
83
|
-
} | {
|
|
84
|
-
readonly _tag: "ApplyLink";
|
|
85
89
|
} | {
|
|
86
90
|
readonly _tag: "Changed";
|
|
87
91
|
readonly value: {
|
|
@@ -109,8 +113,6 @@ export declare const LegacyEditor: import("effect/ui/Component").Component<"Emai
|
|
|
109
113
|
})[];
|
|
110
114
|
}[];
|
|
111
115
|
};
|
|
112
|
-
} | {
|
|
113
|
-
readonly _tag: "CloseLink";
|
|
114
116
|
} | {
|
|
115
117
|
readonly _tag: "EditLink";
|
|
116
118
|
readonly value: string;
|
|
@@ -128,8 +130,6 @@ export declare const LegacyEditor: import("effect/ui/Component").Component<"Emai
|
|
|
128
130
|
readonly link: string;
|
|
129
131
|
readonly block: "bullet" | "heading" | "numbered" | "paragraph";
|
|
130
132
|
};
|
|
131
|
-
} | {
|
|
132
|
-
readonly _tag: "ToggleLink";
|
|
133
133
|
}, {
|
|
134
134
|
readonly _tag: "Changed";
|
|
135
135
|
readonly value: {
|
|
@@ -145,7 +145,7 @@ declare const RevertButton: ({ locale, messages, original, }: {
|
|
|
145
145
|
messages?: FormMessageTranslations;
|
|
146
146
|
original: string;
|
|
147
147
|
}) => JSX.Element | null;
|
|
148
|
-
declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/form
|
|
148
|
+
declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta>(props: import("@tanstack/react-form").FormOptions<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta>) => import("@tanstack/react-form").AppFieldExtendedReactFormApi<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
149
149
|
readonly TextField: typeof TextField;
|
|
150
150
|
readonly TextAreaField: typeof TextAreaField;
|
|
151
151
|
readonly SelectField: typeof SelectField;
|
|
@@ -161,7 +161,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
161
161
|
readonly FormError: typeof FormError;
|
|
162
162
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
163
163
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
164
|
-
}>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/form
|
|
164
|
+
}>, withForm: <TFormData, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TSubmitMeta, TRenderProps extends object = {}>({ render, props, }: import("@tanstack/react-form").WithFormProps<TFormData, TOnMount, TOnChange, TOnChangeAsync, TOnBlur, TOnBlurAsync, TOnSubmit, TOnSubmitAsync, TOnDynamic, TOnDynamicAsync, TOnServer, TSubmitMeta, {
|
|
165
165
|
readonly TextField: typeof TextField;
|
|
166
166
|
readonly TextAreaField: typeof TextAreaField;
|
|
167
167
|
readonly SelectField: typeof SelectField;
|
|
@@ -178,7 +178,7 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
178
178
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
179
179
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
180
180
|
}, TRenderProps>) => import("react").FunctionComponent<import("react").PropsWithChildren<NoInfer<[unknown] extends [TRenderProps] ? any : TRenderProps> & {
|
|
181
|
-
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/form
|
|
181
|
+
form: import("@tanstack/react-form").AppFieldExtendedReactFormApi<[unknown] extends [TFormData] ? any : TFormData, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnMount] ? [TOnMount] extends [TOnMount & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnMount : TOnMount, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChange] ? [TOnChange] extends [TOnChange & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChange : TOnChange, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnChangeAsync] ? [TOnChangeAsync] extends [TOnChangeAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnChangeAsync : TOnChangeAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlur] ? [TOnBlur] extends [TOnBlur & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlur : TOnBlur, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnBlurAsync] ? [TOnBlurAsync] extends [TOnBlurAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnBlurAsync : TOnBlurAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmit] ? [TOnSubmit] extends [TOnSubmit & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmit : TOnSubmit, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnSubmitAsync] ? [TOnSubmitAsync] extends [TOnSubmitAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnSubmitAsync : TOnSubmitAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamic] ? [TOnDynamic] extends [TOnDynamic & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamic : TOnDynamic, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnDynamicAsync] ? [TOnDynamicAsync] extends [TOnDynamicAsync & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnDynamicAsync : TOnDynamicAsync, [import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined] extends [TOnServer] ? [TOnServer] extends [TOnServer & (import("@tanstack/react-form").FormValidateOrFn<TFormData> | undefined)] ? any : TOnServer : TOnServer, [unknown] extends [TSubmitMeta] ? any : TSubmitMeta, {
|
|
182
182
|
readonly TextField: typeof TextField;
|
|
183
183
|
readonly TextAreaField: typeof TextAreaField;
|
|
184
184
|
readonly SelectField: typeof SelectField;
|
|
@@ -211,8 +211,8 @@ declare const useAppForm: <TFormData, TOnMount extends undefined | import("@tans
|
|
|
211
211
|
readonly FormError: typeof FormError;
|
|
212
212
|
readonly FieldWrapper: typeof FieldWrapper;
|
|
213
213
|
readonly BlockNavigation: typeof BlockNavigation;
|
|
214
|
-
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/form
|
|
215
|
-
form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/form
|
|
214
|
+
}, TSubmitMeta, TRenderProps>) => <TFormData, TFields extends import("@tanstack/react-form").DeepKeysOfType<TFormData, TFieldGroupData | null | undefined> | import("@tanstack/react-form").FieldsMap<TFormData, TFieldGroupData>, TOnMount extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChange extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnChangeAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnBlur extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnBlurAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnSubmit extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnSubmitAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnDynamic extends undefined | import("@tanstack/react-form").FormValidateOrFn<TFormData>, TOnDynamicAsync extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TOnServer extends undefined | import("@tanstack/react-form").FormAsyncValidateOrFn<TFormData>, TFormSubmitMeta>(params: import("react").PropsWithChildren<NoInfer<TRenderProps> & {
|
|
215
|
+
form: import("@tanstack/react-form").AppFieldExtendedReactFieldGroupApi<unknown, TFormData, string | import("@tanstack/react-form").FieldsMap<unknown, TFormData>, any, any, any, any, any, any, any, any, any, any, unknown extends TSubmitMeta ? TFormSubmitMeta : TSubmitMeta, {
|
|
216
216
|
readonly TextField: typeof TextField;
|
|
217
217
|
readonly TextAreaField: typeof TextAreaField;
|
|
218
218
|
readonly SelectField: typeof SelectField;
|
|
@@ -10,9 +10,9 @@ export declare const LocaleSwitcher: import("effect/ui/Component").Component<"Lo
|
|
|
10
10
|
} | undefined;
|
|
11
11
|
} | undefined;
|
|
12
12
|
}, boolean, {
|
|
13
|
-
readonly _tag: "Closed";
|
|
14
|
-
} | {
|
|
15
13
|
readonly _tag: "Opened";
|
|
14
|
+
} | {
|
|
15
|
+
readonly _tag: "Closed";
|
|
16
16
|
} | {
|
|
17
17
|
readonly _tag: "Picked";
|
|
18
18
|
readonly locale: string;
|
|
@@ -112,9 +112,9 @@ export declare const makeMapMenu: (viewportHost?: MapViewportHost) => import("ef
|
|
|
112
112
|
readonly _tag: "ZoomChanged";
|
|
113
113
|
readonly zoom: number;
|
|
114
114
|
}, {
|
|
115
|
-
readonly _tag: "Confirmed";
|
|
116
|
-
} | {
|
|
117
115
|
readonly _tag: "Cancelled";
|
|
116
|
+
} | {
|
|
117
|
+
readonly _tag: "Confirmed";
|
|
118
118
|
} | {
|
|
119
119
|
readonly _tag: "CurrentLocationRequested";
|
|
120
120
|
} | {
|
|
@@ -245,9 +245,9 @@ export declare const MapMenu: import("effect/ui/Component").Component<"MapMenu",
|
|
|
245
245
|
readonly _tag: "ZoomChanged";
|
|
246
246
|
readonly zoom: number;
|
|
247
247
|
}, {
|
|
248
|
-
readonly _tag: "Confirmed";
|
|
249
|
-
} | {
|
|
250
248
|
readonly _tag: "Cancelled";
|
|
249
|
+
} | {
|
|
250
|
+
readonly _tag: "Confirmed";
|
|
251
251
|
} | {
|
|
252
252
|
readonly _tag: "CurrentLocationRequested";
|
|
253
253
|
} | {
|
|
@@ -28,9 +28,9 @@ export declare const presenceTransitionBehaviours: {
|
|
|
28
28
|
init: ($: Component.Init<{
|
|
29
29
|
readonly retained: boolean;
|
|
30
30
|
}, {
|
|
31
|
-
readonly _tag: "Exited";
|
|
32
|
-
} | {
|
|
33
31
|
readonly _tag: "Opened";
|
|
32
|
+
} | {
|
|
33
|
+
readonly _tag: "Exited";
|
|
34
34
|
}, never, {
|
|
35
35
|
readonly open: boolean;
|
|
36
36
|
readonly duration?: number | undefined;
|
|
@@ -42,9 +42,9 @@ export declare const SelectWithCustomInput: import("effect/ui/Component").Compon
|
|
|
42
42
|
readonly open: boolean;
|
|
43
43
|
readonly focusCustom: boolean;
|
|
44
44
|
}, {
|
|
45
|
-
readonly _tag: "Opened";
|
|
46
|
-
} | {
|
|
47
45
|
readonly _tag: "Closed";
|
|
46
|
+
} | {
|
|
47
|
+
readonly _tag: "Opened";
|
|
48
48
|
} | {
|
|
49
49
|
readonly _tag: "Edited";
|
|
50
50
|
readonly text: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentProps } from "react";
|
|
2
|
+
import { Switch as Primitive } from "@base-ui/react/switch";
|
|
3
|
+
export type SwitchProps = Omit<ComponentProps<typeof Primitive.Root>, "children" | "className" | "nativeButton" | "render"> & {
|
|
4
|
+
className?: string;
|
|
5
|
+
variant?: "rectangular" | "rounded";
|
|
6
|
+
showText?: boolean;
|
|
7
|
+
animated?: boolean;
|
|
8
|
+
locale?: string;
|
|
9
|
+
labels?: {
|
|
10
|
+
on: string;
|
|
11
|
+
off: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export declare const Switch: ({ variant, showText, animated, locale, labels, className, ...props }: SwitchProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// ../../src/components/switch/react.tsx
|
|
2
|
+
import { Switch as Primitive } from "@base-ui/react/switch";
|
|
3
|
+
import { useKrakstackLocale } from "@krak-stack/registry/krakstack-provider/react";
|
|
4
|
+
|
|
5
|
+
// ../../src/lib/utils.ts
|
|
6
|
+
import { cn } from "cn";
|
|
7
|
+
|
|
8
|
+
// ../../src/components/switch/react.tsx
|
|
9
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
10
|
+
"use client";
|
|
11
|
+
var Switch = ({
|
|
12
|
+
variant = "rectangular",
|
|
13
|
+
showText = true,
|
|
14
|
+
animated = false,
|
|
15
|
+
locale,
|
|
16
|
+
labels,
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}) => {
|
|
20
|
+
const language = useKrakstackLocale(locale).split("-")[0]?.toLowerCase();
|
|
21
|
+
const text = labels ?? (language === "fr" ? { on: "OUI", off: "NON" } : { on: "ON", off: "OFF" });
|
|
22
|
+
return /* @__PURE__ */ jsxs(Primitive.Root, {
|
|
23
|
+
...props,
|
|
24
|
+
nativeButton: true,
|
|
25
|
+
render: /* @__PURE__ */ jsx("button", {
|
|
26
|
+
type: "button"
|
|
27
|
+
}),
|
|
28
|
+
"data-slot": "switch",
|
|
29
|
+
"data-variant": variant,
|
|
30
|
+
className: cn("group/switch bg-muted text-muted-foreground ring-input data-checked:bg-primary data-checked:text-primary-foreground relative inline-grid h-7 min-w-14 shrink-0 grid-cols-2 items-center ring-1 select-none ring-inset", "focus-visible:outline-ring focus-visible:outline-2 focus-visible:outline-offset-2 data-disabled:opacity-50", variant === "rounded" ? "rounded-full" : "rounded-[4px]", animated && "focus-visible:transition-none motion-safe:transition-colors motion-safe:duration-150", className),
|
|
31
|
+
children: [
|
|
32
|
+
showText && /* @__PURE__ */ jsxs(Fragment, {
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ jsx("span", {
|
|
35
|
+
"aria-hidden": "true",
|
|
36
|
+
className: cn("px-0.5 text-center text-[9px] font-bold opacity-0 group-data-checked/switch:opacity-100", animated && "group-focus-visible/switch:transition-none motion-safe:transition-opacity motion-safe:duration-150"),
|
|
37
|
+
children: text.on
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ jsx("span", {
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
className: cn("px-0.5 text-center text-[9px] font-bold group-data-checked/switch:opacity-0", animated && "group-focus-visible/switch:transition-none motion-safe:transition-opacity motion-safe:duration-150"),
|
|
42
|
+
children: text.off
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ jsx(Primitive.Thumb, {
|
|
47
|
+
"data-slot": "switch-thumb",
|
|
48
|
+
className: cn("bg-background ring-border pointer-events-none absolute start-[3px] top-[3px] size-[22px] shadow-sm ring-1 data-checked:start-[calc(100%-25px)]", animated && "group-focus-visible/switch:transition-none motion-safe:transition-[inset-inline-start] motion-safe:duration-150 motion-safe:ease-[cubic-bezier(0.2,0.8,0.2,1)]", variant === "rounded" ? "rounded-full" : "rounded-[3px]")
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
Switch
|
|
55
|
+
};
|
|
@@ -16,9 +16,9 @@ export declare const ThemeSwitcher: import("effect/ui/Component").Component<"The
|
|
|
16
16
|
readonly options?: readonly ("dark" | "light" | "system")[] | undefined;
|
|
17
17
|
readonly value: "dark" | "light" | "system";
|
|
18
18
|
}, boolean, {
|
|
19
|
-
readonly _tag: "Closed";
|
|
20
|
-
} | {
|
|
21
19
|
readonly _tag: "Opened";
|
|
20
|
+
} | {
|
|
21
|
+
readonly _tag: "Closed";
|
|
22
22
|
} | {
|
|
23
23
|
readonly _tag: "Picked";
|
|
24
24
|
readonly value: "dark" | "light" | "system";
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Html } from "effect/ui/html";
|
|
2
|
+
import { type TrackingNoticePreferenceStore } from "./index.js";
|
|
3
|
+
export type { TrackingNoticeMessages, TrackingNoticeProps } from "./schema.js";
|
|
4
|
+
export declare const makeTrackingNotice: (preferences: TrackingNoticePreferenceStore) => import("effect/ui/Component").Component<"TrackingNotice", {
|
|
5
|
+
readonly messages?: {
|
|
6
|
+
readonly preferences?: string | undefined;
|
|
7
|
+
readonly title?: string | undefined;
|
|
8
|
+
readonly description?: string | undefined;
|
|
9
|
+
readonly learnMore?: string | undefined;
|
|
10
|
+
readonly details?: string | undefined;
|
|
11
|
+
readonly essential?: string | undefined;
|
|
12
|
+
readonly privacy?: string | undefined;
|
|
13
|
+
readonly accept?: string | undefined;
|
|
14
|
+
readonly decline?: string | undefined;
|
|
15
|
+
readonly close?: string | undefined;
|
|
16
|
+
readonly blocked?: string | undefined;
|
|
17
|
+
readonly accepted?: string | undefined;
|
|
18
|
+
readonly declined?: string | undefined;
|
|
19
|
+
readonly pending?: string | undefined;
|
|
20
|
+
readonly error?: string | undefined;
|
|
21
|
+
} | undefined;
|
|
22
|
+
readonly locale?: string | undefined;
|
|
23
|
+
readonly privacyHref?: string | undefined;
|
|
24
|
+
}, {
|
|
25
|
+
readonly open: boolean;
|
|
26
|
+
readonly dismissed: boolean;
|
|
27
|
+
readonly failed: boolean;
|
|
28
|
+
readonly snapshot: string;
|
|
29
|
+
}, {
|
|
30
|
+
readonly _tag: "Closed";
|
|
31
|
+
} | {
|
|
32
|
+
readonly _tag: "Opened";
|
|
33
|
+
} | {
|
|
34
|
+
readonly _tag: "Dismissed";
|
|
35
|
+
} | {
|
|
36
|
+
readonly _tag: "ChoiceRequested";
|
|
37
|
+
readonly choice: "accepted" | "declined";
|
|
38
|
+
} | {
|
|
39
|
+
readonly _tag: "Saved";
|
|
40
|
+
readonly success: boolean;
|
|
41
|
+
} | {
|
|
42
|
+
readonly _tag: "SnapshotChanged";
|
|
43
|
+
readonly snapshot: string;
|
|
44
|
+
}, never, never, Html.Elements, {}, never>;
|
|
45
|
+
export declare const TrackingNotice: import("effect/ui/Component").Component<"TrackingNotice", {
|
|
46
|
+
readonly messages?: {
|
|
47
|
+
readonly preferences?: string | undefined;
|
|
48
|
+
readonly title?: string | undefined;
|
|
49
|
+
readonly description?: string | undefined;
|
|
50
|
+
readonly learnMore?: string | undefined;
|
|
51
|
+
readonly details?: string | undefined;
|
|
52
|
+
readonly essential?: string | undefined;
|
|
53
|
+
readonly privacy?: string | undefined;
|
|
54
|
+
readonly accept?: string | undefined;
|
|
55
|
+
readonly decline?: string | undefined;
|
|
56
|
+
readonly close?: string | undefined;
|
|
57
|
+
readonly blocked?: string | undefined;
|
|
58
|
+
readonly accepted?: string | undefined;
|
|
59
|
+
readonly declined?: string | undefined;
|
|
60
|
+
readonly pending?: string | undefined;
|
|
61
|
+
readonly error?: string | undefined;
|
|
62
|
+
} | undefined;
|
|
63
|
+
readonly locale?: string | undefined;
|
|
64
|
+
readonly privacyHref?: string | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
readonly open: boolean;
|
|
67
|
+
readonly dismissed: boolean;
|
|
68
|
+
readonly failed: boolean;
|
|
69
|
+
readonly snapshot: string;
|
|
70
|
+
}, {
|
|
71
|
+
readonly _tag: "Closed";
|
|
72
|
+
} | {
|
|
73
|
+
readonly _tag: "Opened";
|
|
74
|
+
} | {
|
|
75
|
+
readonly _tag: "Dismissed";
|
|
76
|
+
} | {
|
|
77
|
+
readonly _tag: "ChoiceRequested";
|
|
78
|
+
readonly choice: "accepted" | "declined";
|
|
79
|
+
} | {
|
|
80
|
+
readonly _tag: "Saved";
|
|
81
|
+
readonly success: boolean;
|
|
82
|
+
} | {
|
|
83
|
+
readonly _tag: "SnapshotChanged";
|
|
84
|
+
readonly snapshot: string;
|
|
85
|
+
}, never, never, Html.Elements, {}, never>;
|