@noxickon/onyx 6.2.0 → 6.4.0
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/dist/components/Accordion/Accordion.styles.js +1 -1
- package/dist/components/Alert/Alert.styles.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.styles.js +1 -1
- package/dist/components/Button/Button.styles.d.ts +18 -0
- package/dist/components/Button/Button.styles.js +3 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +34 -33
- package/dist/components/Card/Card.styles.js +3 -3
- package/dist/components/Card/Card.types.d.ts +4 -1
- package/dist/components/Command/Command.styles.js +1 -1
- package/dist/components/CopyInput/CopyInput.d.ts +3 -0
- package/dist/components/CopyInput/CopyInput.js +46 -0
- package/dist/components/CopyInput/CopyInput.styles.d.ts +25 -0
- package/dist/components/CopyInput/CopyInput.styles.js +8 -0
- package/dist/components/CopyInput/CopyInput.types.d.ts +9 -0
- package/dist/components/CopyInput/index.d.ts +2 -0
- package/dist/components/DataTable/DataTable.js +282 -274
- package/dist/components/DataTable/DataTable.styles.js +2 -2
- package/dist/components/DataTable/DataTable.types.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +2 -2
- package/dist/components/Dialog/Dialog.types.d.ts +1 -1
- package/dist/components/HoldToDelete/HoldToDelete.styles.js +1 -1
- package/dist/components/Pagination/Pagination.styles.js +1 -1
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.d.ts +9 -0
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.js +228 -0
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.styles.d.ts +78 -0
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.styles.js +36 -0
- package/dist/components/ResponsiveOverlay/ResponsiveOverlay.types.d.ts +45 -0
- package/dist/components/ResponsiveOverlay/index.d.ts +11 -0
- package/dist/components/ResponsiveOverlay/index.js +12 -0
- package/dist/components/Sidebar/Sidebar.styles.js +13 -6
- package/dist/components/Sidebar/Sidebar2.js +288 -287
- package/dist/components/SidebarRail/SidebarRail.styles.js +2 -2
- package/dist/components/TabBar/TabBar.styles.js +1 -1
- package/dist/components/Tabs/Tabs.styles.js +2 -2
- package/dist/components/Toggle/Toggle.styles.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/hooks.js +3 -3
- package/dist/index.js +44 -42
- package/dist/internal/styles/controlStyles.d.ts +1 -1
- package/dist/internal/styles/controlStyles.js +1 -1
- package/dist/internal/styles/menuSurfaceStyles.js +4 -4
- package/dist/internal/styles/overlayFrameStyles.d.ts +5 -0
- package/dist/internal/styles/overlayFrameStyles.js +8 -0
- package/dist/internal/styles/triggerSurfaceStyles.js +1 -1
- package/dist/internal/utils/getInertActivationProps/getInertActivationProps.d.ts +7 -0
- package/dist/internal/utils/getInertActivationProps/getInertActivationProps.js +12 -0
- package/dist/internal/utils/getInertActivationProps/index.d.ts +1 -0
- package/dist/internal/utils/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/code-block/onyxHighlighter.test.d.ts +0 -1
- package/dist/components/Command/commandScore.test.d.ts +0 -1
- package/dist/graphql/executors/apolloMutationExecutor.test.d.ts +0 -1
- package/dist/graphql/executors/apolloQueryExecutor.test.d.ts +0 -1
- package/dist/hooks/useForm/standardSchemaResolver.test.d.ts +0 -1
- package/dist/internal/utils/getFieldControlAttributes/getFieldControlAttributes.test.d.ts +0 -1
- package/dist/rest/executors/restExecutor.test.d.ts +0 -1
- package/dist/utils/cn.test.d.ts +0 -1
|
@@ -12,7 +12,7 @@ var r = n({
|
|
|
12
12
|
"transition-colors",
|
|
13
13
|
"ox-interactive:hover:text-primary-ink",
|
|
14
14
|
"focus-visible:rounded-sm focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-primary-ink",
|
|
15
|
-
"ox-disabled:
|
|
15
|
+
"ox-disabled:cursor-not-allowed ox-disabled:opacity-50"
|
|
16
16
|
],
|
|
17
17
|
triggerIcon: [
|
|
18
18
|
"size-4 shrink-0 text-fg-subtle",
|
|
@@ -26,9 +26,9 @@ var t = e({
|
|
|
26
26
|
"shrink-0 inline-grid place-items-center cursor-pointer",
|
|
27
27
|
"size-5.5 rounded-sm bg-transparent text-fg-subtle",
|
|
28
28
|
"transition-colors ease-out-quint",
|
|
29
|
-
"hover:text-fg hover:bg-[color-mix(in_oklab,var(--fg)_8%,transparent)]",
|
|
29
|
+
"ox-interactive:hover:text-fg ox-interactive:hover:bg-[color-mix(in_oklab,var(--fg)_8%,transparent)]",
|
|
30
30
|
"focus-visible:outline-none focus-visible:shadow-[var(--focus-ring)]",
|
|
31
|
-
"ox-disabled:
|
|
31
|
+
"ox-disabled:cursor-not-allowed ox-disabled:opacity-50",
|
|
32
32
|
"pointer-coarse:size-8",
|
|
33
33
|
"pointer-coarse:group-has-[[data-ox-slot=alert-action]]/alert:absolute",
|
|
34
34
|
"pointer-coarse:group-has-[[data-ox-slot=alert-action]]/alert:top-3",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { OxAlertDialogActionsProps, OxAlertDialogCloseProps, OxAlertDialogContentProps, OxAlertDialogDescriptionProps, OxAlertDialogProps, OxAlertDialogTitleProps, OxAlertDialogTriggerProps } from './AlertDialog.types';
|
|
3
|
-
declare function OxAlertDialogRoot({ children, tone, ...props }: OxAlertDialogProps): import("react").JSX.Element;
|
|
4
|
-
declare function OxAlertDialogTrigger({ children, className, ...props }: OxAlertDialogTriggerProps): import("react").JSX.Element;
|
|
3
|
+
declare function OxAlertDialogRoot<Payload = unknown>({ children, tone, ...props }: OxAlertDialogProps<Payload>): import("react").JSX.Element;
|
|
4
|
+
declare function OxAlertDialogTrigger<Payload = unknown>({ children, className, ...props }: OxAlertDialogTriggerProps<Payload>): import("react").JSX.Element;
|
|
5
5
|
declare function OxAlertDialogContent({ children, className, scroll, ...props }: OxAlertDialogContentProps): import("react").JSX.Element;
|
|
6
6
|
declare function OxAlertDialogTitle({ children, className, ...props }: OxAlertDialogTitleProps): import("react").JSX.Element;
|
|
7
7
|
declare function OxAlertDialogDescription({ children, className, ...props }: OxAlertDialogDescriptionProps): import("react").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { AlertDialog as BaseAlertDialog, AlertDialogCloseProps as BaseAlertDialogCloseProps, AlertDialogDescriptionProps as BaseAlertDialogDescriptionProps, AlertDialogPopupProps as BaseAlertDialogPopupProps, AlertDialogRootProps as BaseAlertDialogRootProps, AlertDialogTitleProps as BaseAlertDialogTitleProps, AlertDialogTriggerProps as BaseAlertDialogTriggerProps } from '@base-ui/react/alert-dialog';
|
|
3
3
|
import { useRender } from '@base-ui/react/use-render';
|
|
4
4
|
import { AlertDialogVariants } from './AlertDialog.styles';
|
|
5
|
-
type AlertDialogHandle = ReturnType<typeof BaseAlertDialog.createHandle
|
|
5
|
+
type AlertDialogHandle<Payload = unknown> = ReturnType<typeof BaseAlertDialog.createHandle<Payload>>;
|
|
6
6
|
interface OxAlertDialogProps<Payload = unknown> extends BaseAlertDialogRootProps<Payload>, Pick<AlertDialogVariants, 'tone'> {
|
|
7
7
|
}
|
|
8
8
|
interface OxAlertDialogTriggerProps<Payload = unknown> extends Omit<BaseAlertDialogTriggerProps<Payload>, 'className'> {
|
|
@@ -16,7 +16,7 @@ var t = [
|
|
|
16
16
|
...t,
|
|
17
17
|
"text-fg-muted transition-colors ox-engaged:bg-surface-raised ox-engaged:text-fg",
|
|
18
18
|
n,
|
|
19
|
-
"ox-disabled:
|
|
19
|
+
"ox-disabled:cursor-not-allowed ox-disabled:opacity-50"
|
|
20
20
|
],
|
|
21
21
|
staticCrumb: [...t, "text-fg-muted"],
|
|
22
22
|
page: [...t, "font-medium text-fg"],
|
|
@@ -16,12 +16,18 @@ export declare const buttonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
16
16
|
'soft-primary': {
|
|
17
17
|
base: string[];
|
|
18
18
|
};
|
|
19
|
+
'ghost-primary': {
|
|
20
|
+
base: string[];
|
|
21
|
+
};
|
|
19
22
|
destructive: {
|
|
20
23
|
base: string[];
|
|
21
24
|
};
|
|
22
25
|
'soft-destructive': {
|
|
23
26
|
base: string[];
|
|
24
27
|
};
|
|
28
|
+
'ghost-destructive': {
|
|
29
|
+
base: string[];
|
|
30
|
+
};
|
|
25
31
|
link: {
|
|
26
32
|
base: string[];
|
|
27
33
|
};
|
|
@@ -60,12 +66,18 @@ export declare const buttonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
60
66
|
'soft-primary': {
|
|
61
67
|
base: string[];
|
|
62
68
|
};
|
|
69
|
+
'ghost-primary': {
|
|
70
|
+
base: string[];
|
|
71
|
+
};
|
|
63
72
|
destructive: {
|
|
64
73
|
base: string[];
|
|
65
74
|
};
|
|
66
75
|
'soft-destructive': {
|
|
67
76
|
base: string[];
|
|
68
77
|
};
|
|
78
|
+
'ghost-destructive': {
|
|
79
|
+
base: string[];
|
|
80
|
+
};
|
|
69
81
|
link: {
|
|
70
82
|
base: string[];
|
|
71
83
|
};
|
|
@@ -104,12 +116,18 @@ export declare const buttonVariants: import('tailwind-variants').TVReturnType<{
|
|
|
104
116
|
'soft-primary': {
|
|
105
117
|
base: string[];
|
|
106
118
|
};
|
|
119
|
+
'ghost-primary': {
|
|
120
|
+
base: string[];
|
|
121
|
+
};
|
|
107
122
|
destructive: {
|
|
108
123
|
base: string[];
|
|
109
124
|
};
|
|
110
125
|
'soft-destructive': {
|
|
111
126
|
base: string[];
|
|
112
127
|
};
|
|
128
|
+
'ghost-destructive': {
|
|
129
|
+
base: string[];
|
|
130
|
+
};
|
|
113
131
|
link: {
|
|
114
132
|
base: string[];
|
|
115
133
|
};
|
|
@@ -11,7 +11,7 @@ var n = ["h-auto rounded-sm px-0 tracking-normal shadow-none active:scale-100"],
|
|
|
11
11
|
"[&_svg:not([class*=size-])]:size-icon",
|
|
12
12
|
"transition active:scale-98 will-change-transform",
|
|
13
13
|
"outline-primary-ink focus-visible:outline-2 focus-visible:outline-offset-2",
|
|
14
|
-
"ox-disabled:
|
|
14
|
+
"ox-disabled:cursor-not-allowed ox-disabled:opacity-50 ox-disabled:active:scale-100",
|
|
15
15
|
"ox-loading:opacity-100"
|
|
16
16
|
],
|
|
17
17
|
content: ["inline-flex min-w-0 items-center gap-2 truncate", "group-data-[loading]/button:[&>svg:first-child]:hidden"],
|
|
@@ -29,12 +29,14 @@ var n = ["h-auto rounded-sm px-0 tracking-normal shadow-none active:scale-100"],
|
|
|
29
29
|
outline: { base: ["text-fg-muted border-line", "ox-engaged:bg-surface-raised ox-engaged:text-fg ox-engaged:border-line-strong"] },
|
|
30
30
|
ghost: { base: ["text-fg-muted", "ox-engaged:bg-surface-raised ox-engaged:text-fg"] },
|
|
31
31
|
"soft-primary": { base: ["bg-primary-soft text-primary-soft-fg", "ox-engaged:bg-[color-mix(in_oklab,var(--primary-soft),var(--fg)_8%)]"] },
|
|
32
|
+
"ghost-primary": { base: ["text-primary-ink", "ox-engaged:bg-primary-soft"] },
|
|
32
33
|
destructive: { base: [
|
|
33
34
|
"bg-danger-solid text-danger-solid-fg",
|
|
34
35
|
t,
|
|
35
36
|
"ox-engaged:bg-[color-mix(in_oklab,var(--danger-solid),var(--fg-on-solid)_12%)]"
|
|
36
37
|
] },
|
|
37
38
|
"soft-destructive": { base: ["bg-danger-soft text-danger-soft-fg", "ox-engaged:bg-[color-mix(in_oklab,var(--danger-soft),var(--fg)_8%)]"] },
|
|
39
|
+
"ghost-destructive": { base: ["text-danger-ink", "ox-engaged:bg-danger-soft"] },
|
|
38
40
|
link: { base: [...n, "text-primary-ink underline-offset-2 ox-engaged:underline"] },
|
|
39
41
|
"link-secondary": { base: [...n, "text-fg-muted underline-offset-2 ox-engaged:text-fg ox-engaged:underline"] },
|
|
40
42
|
"link-inline": {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OxCardContentProps, OxCardDescriptionProps, OxCardEyebrowProps, OxCardFooterProps, OxCardHeaderProps, OxCardProps, OxCardTitleProps } from './Card.types';
|
|
2
|
-
declare function OxCardRoot({ children, className, interactive, render, selected, variant, ...props }: OxCardProps): import("react").JSX.Element;
|
|
2
|
+
declare function OxCardRoot({ children, className, interactive, render, selected, tone, variant, ...props }: OxCardProps): import("react").JSX.Element;
|
|
3
3
|
declare function OxCardHeader({ children, className, render, ...props }: OxCardHeaderProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
4
4
|
declare function OxCardEyebrow({ children, className, render, ...props }: OxCardEyebrowProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
5
5
|
declare function OxCardTitle({ children, className, id: idProperty, render, ...props }: OxCardTitleProps): import('react').ReactElement<unknown, string | import('react').JSXElementConstructor<any>>;
|
|
@@ -7,48 +7,49 @@ import { useRender as s } from "@base-ui/react/use-render";
|
|
|
7
7
|
//#region src/components/Card/Card.tsx
|
|
8
8
|
var { Provider: c, useRequiredContext: l } = e("OxCard");
|
|
9
9
|
function u(e) {
|
|
10
|
-
let r = n(
|
|
11
|
-
r[0] === e ? (i = r[1], l = r[2], u = r[3], d = r[4], f = r[5], p = r[6], m = r[7]) : ({children: i, className: l, interactive: u, render: f, selected: p,
|
|
12
|
-
let
|
|
13
|
-
if (r[
|
|
10
|
+
let r = n(55), i, l, u, d, f, p, m, h;
|
|
11
|
+
r[0] === e ? (i = r[1], l = r[2], u = r[3], d = r[4], f = r[5], p = r[6], m = r[7], h = r[8]) : ({children: i, className: l, interactive: u, render: f, selected: p, tone: m, variant: h, ...d} = e, r[0] = e, r[1] = i, r[2] = l, r[3] = u, r[4] = d, r[5] = f, r[6] = p, r[7] = m, r[8] = h);
|
|
12
|
+
let g = m === void 0 ? "neutral" : m, _ = h === void 0 ? "outlined" : h, [v, y] = a(void 0), [b, x] = a(void 0), S, C, w, T, E, D, O, k, A;
|
|
13
|
+
if (r[9] !== l || r[10] !== b || r[11] !== u || r[12] !== d || r[13] !== f || r[14] !== p || r[15] !== v || r[16] !== g || r[17] !== _) {
|
|
14
14
|
let e = t({
|
|
15
|
-
variant:
|
|
15
|
+
variant: _,
|
|
16
16
|
interactive: u,
|
|
17
17
|
selected: p
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
C = s, r[27] === f ? S = r[28] : (S = f ?? /* @__PURE__ */ o("div", {}), r[27] = f, r[28] = S), w = d, r[29] === v ? T = r[30] : (T = v && {
|
|
20
20
|
role: "region",
|
|
21
|
-
"aria-labelledby":
|
|
22
|
-
}, r[
|
|
23
|
-
} else
|
|
24
|
-
let
|
|
25
|
-
r[
|
|
26
|
-
...b,
|
|
27
|
-
...x,
|
|
28
|
-
...S,
|
|
29
|
-
...C,
|
|
21
|
+
"aria-labelledby": v
|
|
22
|
+
}, r[29] = v, r[30] = T), r[31] === b ? E = r[32] : (E = b && { "aria-describedby": b }, r[31] = b, r[32] = E), r[33] === u ? D = r[34] : (D = u && { tabIndex: 0 }, r[33] = u, r[34] = D), r[35] === p ? O = r[36] : (O = p && { "data-selected": "" }, r[35] = p, r[36] = O), k = g, A = e.root({ class: l }), r[9] = l, r[10] = b, r[11] = u, r[12] = d, r[13] = f, r[14] = p, r[15] = v, r[16] = g, r[17] = _, r[18] = S, r[19] = C, r[20] = w, r[21] = T, r[22] = E, r[23] = D, r[24] = O, r[25] = k, r[26] = A;
|
|
23
|
+
} else S = r[18], C = r[19], w = r[20], T = r[21], E = r[22], D = r[23], O = r[24], k = r[25], A = r[26];
|
|
24
|
+
let j;
|
|
25
|
+
r[37] !== i || r[38] !== w || r[39] !== T || r[40] !== E || r[41] !== D || r[42] !== O || r[43] !== k || r[44] !== A ? (j = {
|
|
30
26
|
...w,
|
|
31
|
-
|
|
27
|
+
...T,
|
|
28
|
+
...E,
|
|
29
|
+
...D,
|
|
30
|
+
...O,
|
|
31
|
+
"data-ox-tone": k,
|
|
32
|
+
className: A,
|
|
32
33
|
"data-ox-slot": "card",
|
|
33
34
|
children: i
|
|
34
|
-
}, r[
|
|
35
|
-
let k;
|
|
36
|
-
r[42] !== O || r[43] !== E ? (k = {
|
|
37
|
-
render: E,
|
|
38
|
-
props: O
|
|
39
|
-
}, r[42] = O, r[43] = E, r[44] = k) : k = r[44];
|
|
40
|
-
let A = D(k), j;
|
|
41
|
-
r[45] !== v || r[46] !== g ? (j = {
|
|
42
|
-
titleId: g,
|
|
43
|
-
setTitleId: _,
|
|
44
|
-
descriptionId: v,
|
|
45
|
-
setDescriptionId: y
|
|
46
|
-
}, r[45] = v, r[46] = g, r[47] = j) : j = r[47];
|
|
35
|
+
}, r[37] = i, r[38] = w, r[39] = T, r[40] = E, r[41] = D, r[42] = O, r[43] = k, r[44] = A, r[45] = j) : j = r[45];
|
|
47
36
|
let M;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
37
|
+
r[46] !== S || r[47] !== j ? (M = {
|
|
38
|
+
render: S,
|
|
39
|
+
props: j
|
|
40
|
+
}, r[46] = S, r[47] = j, r[48] = M) : M = r[48];
|
|
41
|
+
let N = C(M), P;
|
|
42
|
+
r[49] !== b || r[50] !== v ? (P = {
|
|
43
|
+
titleId: v,
|
|
44
|
+
setTitleId: y,
|
|
45
|
+
descriptionId: b,
|
|
46
|
+
setDescriptionId: x
|
|
47
|
+
}, r[49] = b, r[50] = v, r[51] = P) : P = r[51];
|
|
48
|
+
let F;
|
|
49
|
+
return r[52] !== N || r[53] !== P ? (F = /* @__PURE__ */ o(c, {
|
|
50
|
+
value: P,
|
|
51
|
+
children: N
|
|
52
|
+
}), r[52] = N, r[53] = P, r[54] = F) : F = r[54], F;
|
|
52
53
|
}
|
|
53
54
|
function d(e) {
|
|
54
55
|
let r = n(16), i, a, c, u;
|
|
@@ -2,10 +2,10 @@ import { tv as e } from "../../internal/tv.js";
|
|
|
2
2
|
//#region src/components/Card/Card.styles.ts
|
|
3
3
|
var t = e({
|
|
4
4
|
slots: {
|
|
5
|
-
root: "flex flex-col rounded-card border border-line bg-card p-4",
|
|
6
|
-
eyebrow: "mb-1.5 text-3xs font-semibold uppercase tracking-[0.08em] text-fg-subtle",
|
|
5
|
+
root: "group flex flex-col rounded-card border border-line bg-card p-4 not-data-[ox-tone=neutral]:border-tone-outline",
|
|
6
|
+
eyebrow: "mb-1.5 text-3xs font-semibold uppercase tracking-[0.08em] text-tone-ink group-data-[ox-tone=neutral]:text-fg-subtle",
|
|
7
7
|
header: "mb-3 flex flex-col",
|
|
8
|
-
title: "text-sm font-semibold tracking-[-0.01em] text-
|
|
8
|
+
title: "text-sm font-semibold tracking-[-0.01em] break-words text-tone-ink group-data-[ox-tone=neutral]:text-fg",
|
|
9
9
|
description: "mt-0.5 text-2xs leading-normal text-fg-subtle",
|
|
10
10
|
content: "text-body leading-relaxed text-fg-muted",
|
|
11
11
|
footer: "mt-4 flex flex-wrap items-center justify-end gap-2"
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
|
+
import { OxTone } from '../../internal/types/tone';
|
|
3
4
|
import { CardVariants } from './Card.styles';
|
|
5
|
+
type OxCardTone = OxTone;
|
|
4
6
|
interface OxCardProps extends Pick<CardVariants, 'variant' | 'interactive' | 'selected'>, Omit<useRender.ComponentProps<'div'>, 'role'> {
|
|
5
7
|
children: ReactNode;
|
|
8
|
+
tone?: OxCardTone;
|
|
6
9
|
}
|
|
7
10
|
interface OxCardHeaderProps extends useRender.ComponentProps<'div'> {
|
|
8
11
|
children: ReactNode;
|
|
@@ -22,4 +25,4 @@ interface OxCardContentProps extends useRender.ComponentProps<'div'> {
|
|
|
22
25
|
interface OxCardFooterProps extends useRender.ComponentProps<'div'> {
|
|
23
26
|
children: ReactNode;
|
|
24
27
|
}
|
|
25
|
-
export type { OxCardContentProps, OxCardDescriptionProps, OxCardEyebrowProps, OxCardFooterProps, OxCardHeaderProps, OxCardProps, OxCardTitleProps, };
|
|
28
|
+
export type { OxCardContentProps, OxCardDescriptionProps, OxCardEyebrowProps, OxCardFooterProps, OxCardHeaderProps, OxCardProps, OxCardTitleProps, OxCardTone, };
|
|
@@ -22,7 +22,7 @@ var r = e({
|
|
|
22
22
|
"data-[destructive]:text-danger-ink",
|
|
23
23
|
"data-[destructive]:data-[highlighted]:bg-[var(--err-fill)]",
|
|
24
24
|
"data-[destructive]:data-[highlighted]:text-[var(--err-strong)]",
|
|
25
|
-
"ox-disabled:
|
|
25
|
+
"ox-disabled:cursor-not-allowed ox-disabled:opacity-50",
|
|
26
26
|
"[&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:opacity-80",
|
|
27
27
|
"data-[highlighted]:[&>svg]:opacity-100"
|
|
28
28
|
],
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { OxCopyButton as e } from "../CopyButton/CopyButton.js";
|
|
2
|
+
import { OxInput as t } from "../Input/index.js";
|
|
3
|
+
import { copyInputVariants as n } from "./CopyInput.styles.js";
|
|
4
|
+
import { c as r } from "react/compiler-runtime";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/CopyInput/CopyInput.tsx
|
|
7
|
+
function o(o) {
|
|
8
|
+
let c = r(27), { className: l, copiedLabel: u, copyLabel: d, disabled: f, mono: p, onCopyResult: m, timeout: h, value: g } = o, _ = d === void 0 ? "Copy" : d, v = f === void 0 ? !1 : f, y = p === void 0 ? !1 : p, b, x, S, C, w, T;
|
|
9
|
+
if (c[0] !== l || c[1] !== v || c[2] !== y) {
|
|
10
|
+
let e = n({ mono: y });
|
|
11
|
+
x = t.Group, C = l, w = v, T = !0, b = t, S = e.value(), c[0] = l, c[1] = v, c[2] = y, c[3] = b, c[4] = x, c[5] = S, c[6] = C, c[7] = w, c[8] = T;
|
|
12
|
+
} else b = c[3], x = c[4], S = c[5], C = c[6], w = c[7], T = c[8];
|
|
13
|
+
let E;
|
|
14
|
+
c[9] !== b || c[10] !== S || c[11] !== g ? (E = /* @__PURE__ */ i(b, {
|
|
15
|
+
className: S,
|
|
16
|
+
readOnly: !0,
|
|
17
|
+
value: g,
|
|
18
|
+
onFocus: s
|
|
19
|
+
}), c[9] = b, c[10] = S, c[11] = g, c[12] = E) : E = c[12];
|
|
20
|
+
let D;
|
|
21
|
+
c[13] !== u || c[14] !== _ || c[15] !== v || c[16] !== m || c[17] !== h || c[18] !== g ? (D = /* @__PURE__ */ i(t.Addon, {
|
|
22
|
+
align: "inline-end",
|
|
23
|
+
children: /* @__PURE__ */ i(e, {
|
|
24
|
+
"aria-label": _,
|
|
25
|
+
copiedLabel: u,
|
|
26
|
+
disabled: v,
|
|
27
|
+
isIconOnly: !0,
|
|
28
|
+
text: g,
|
|
29
|
+
timeout: h,
|
|
30
|
+
variant: "ghost",
|
|
31
|
+
onCopyResult: m
|
|
32
|
+
})
|
|
33
|
+
}), c[13] = u, c[14] = _, c[15] = v, c[16] = m, c[17] = h, c[18] = g, c[19] = D) : D = c[19];
|
|
34
|
+
let O;
|
|
35
|
+
return c[20] !== x || c[21] !== C || c[22] !== w || c[23] !== T || c[24] !== E || c[25] !== D ? (O = /* @__PURE__ */ a(x, {
|
|
36
|
+
className: C,
|
|
37
|
+
disabled: w,
|
|
38
|
+
readOnly: T,
|
|
39
|
+
children: [E, D]
|
|
40
|
+
}), c[20] = x, c[21] = C, c[22] = w, c[23] = T, c[24] = E, c[25] = D, c[26] = O) : O = c[26], O;
|
|
41
|
+
}
|
|
42
|
+
function s(e) {
|
|
43
|
+
return e.currentTarget.select();
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { o as OxCopyInput };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare const copyInputVariants: import('tailwind-variants').TVReturnType<{
|
|
2
|
+
mono: {
|
|
3
|
+
true: {
|
|
4
|
+
value: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
}, {
|
|
8
|
+
value: string;
|
|
9
|
+
}, undefined, {
|
|
10
|
+
mono: {
|
|
11
|
+
true: {
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
value: string;
|
|
17
|
+
}, import('tailwind-variants').TVReturnType<{
|
|
18
|
+
mono: {
|
|
19
|
+
true: {
|
|
20
|
+
value: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
value: string;
|
|
25
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OxCopyButtonProps } from '../CopyButton';
|
|
2
|
+
interface OxCopyInputProps extends Pick<OxCopyButtonProps, 'copiedLabel' | 'onCopyResult' | 'timeout'> {
|
|
3
|
+
className?: string;
|
|
4
|
+
copyLabel?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
mono?: boolean;
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
export type { OxCopyInputProps };
|