@jfrader/ui 0.5.0 → 0.5.1
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/accordion-DLul6vIl.js +205 -0
- package/dist/accordion.js +1 -1
- package/dist/{announcement-bar-B58xempt.js → announcement-bar-Dlbq5-9D.js} +1 -1
- package/dist/announcement-bar.js +1 -1
- package/dist/avatar-CaGJHy1N.js +145 -0
- package/dist/{avatar-group-DOQQuV51.js → avatar-group-M1opAQEG.js} +1 -1
- package/dist/avatar-group.js +1 -1
- package/dist/avatar.js +1 -1
- package/dist/badge-CjM5Agqk.js +119 -0
- package/dist/badge.js +1 -1
- package/dist/{bottom-sheet-DPJBFkie.js → bottom-sheet-DjZOPq4k.js} +10 -9
- package/dist/bottom-sheet.js +1 -1
- package/dist/{breadcrumbs-Cfw_hgt2.js → breadcrumbs-BDK_LiwH.js} +10 -3
- package/dist/breadcrumbs.js +1 -1
- package/dist/{button-C92uYFJW.js → button-NLY0h6EJ.js} +7 -7
- package/dist/button.js +1 -1
- package/dist/{calendar-B3Svu0X2.js → calendar-BzJdv_SZ.js} +3 -1
- package/dist/calendar.js +1 -1
- package/dist/card-Ca4KQKYQ.js +154 -0
- package/dist/card.js +1 -1
- package/dist/carousel-B7OrvD6J.js +474 -0
- package/dist/carousel.js +1 -1
- package/dist/{checkbox-cFquiSdy.js → checkbox-DKSzExj2.js} +16 -15
- package/dist/checkbox.js +1 -1
- package/dist/{chip-group-DTQd_M-G.js → chip-group-DjQ0_6Y9.js} +2 -1
- package/dist/chip-group.js +1 -1
- package/dist/{code-block-ahnRi-g8.js → code-block-B5we2lZa.js} +75 -74
- package/dist/code-block.js +1 -1
- package/dist/{combobox-Bhzvu9ma.js → combobox-DFFqOBCi.js} +114 -109
- package/dist/combobox.js +1 -1
- package/dist/command-palette-BmQu2w4H.js +391 -0
- package/dist/command-palette.js +1 -1
- package/dist/comment-thread-ASaXDcGo.js +1410 -0
- package/dist/comment-thread.js +2 -0
- package/dist/context-menu-__1c2Dk9.js +370 -0
- package/dist/context-menu.js +2 -0
- package/dist/{copy-button-ByiA6D3R.js → copy-button-DCSLcYS-.js} +1 -1
- package/dist/copy-button.js +1 -1
- package/dist/{date-picker-5zKSSuFF.js → date-picker-BiPN7yeK.js} +4 -4
- package/dist/date-picker.js +1 -1
- package/dist/date-range-picker-DQpUeKqV.js +570 -0
- package/dist/date-range-picker.js +1 -1
- package/dist/{dialog-ciiv9H2b.js → dialog-BX1zYMs-.js} +2 -1
- package/dist/dialog.js +1 -1
- package/dist/{divider-DYoJf0I_.js → divider-Cp7aNbhM.js} +21 -20
- package/dist/divider.js +1 -1
- package/dist/elastic-slider-BG6K019r.js +395 -0
- package/dist/elastic-slider.js +2 -0
- package/dist/{expandable-card-C-qJcZ14.js → expandable-card-rUATve0o.js} +8 -1
- package/dist/expandable-card.js +1 -1
- package/dist/expanding-search-BxOwtdwt.js +238 -0
- package/dist/expanding-search.js +2 -0
- package/dist/file-dropzone-BuXm3Tea.js +457 -0
- package/dist/file-dropzone.js +1 -1
- package/dist/{filter-toolbar-D5KEKTSe.js → filter-toolbar-Cy5Hqur-.js} +4 -2
- package/dist/filter-toolbar.js +1 -1
- package/dist/{hover-card-B-nrCIy2.js → hover-card-CoMJKg1g.js} +7 -7
- package/dist/hover-card.js +1 -1
- package/dist/{image-compare-ciuhPtQZ.js → image-compare-BxY8Ykzt.js} +1 -1
- package/dist/image-compare.js +1 -1
- package/dist/index.js +81 -76
- package/dist/{json-viewer-BcySQfjZ.js → json-viewer-DgWqyU75.js} +7 -3
- package/dist/json-viewer.js +1 -1
- package/dist/mention-input-sq61si9L.js +600 -0
- package/dist/mention-input.js +1 -1
- package/dist/menu-DDKgmK2F.js +295 -0
- package/dist/menu.js +1 -1
- package/dist/{metric-card-Bh9K4fZs.js → metric-card--lVTz5Wn.js} +2 -2
- package/dist/metric-card.js +1 -1
- package/dist/{multi-select-Pce_IYnz.js → multi-select-DG1BCFX7.js} +14 -6
- package/dist/multi-select.js +1 -1
- package/dist/{navigation-sP5fiuQS.js → navigation-CC26JDr-.js} +20 -14
- package/dist/navigation.js +1 -1
- package/dist/{overlay-layer-SeUyyEPD.js → overlay-layer-qEbpEtb8.js} +16 -2
- package/dist/{pagination-DmXZ8E85.js → pagination-BfkeWbmP.js} +23 -22
- package/dist/pagination.js +1 -1
- package/dist/pill-BaS-uIbn.js +58 -0
- package/dist/pill.js +1 -1
- package/dist/popover-CErIw2q3.js +125 -0
- package/dist/popover.js +1 -1
- package/dist/{progress-CbOWBUdA.js → progress-DAQkfhPd.js} +1 -1
- package/dist/progress.js +1 -1
- package/dist/{radio-cards-D2QZENI_.js → radio-cards-Cu9cBssN.js} +35 -34
- package/dist/radio-cards.js +1 -1
- package/dist/{radio-group-E6mMRgo7.js → radio-group-TIK0-iPX.js} +18 -15
- package/dist/radio-group.js +1 -1
- package/dist/{resizable-panels-BhjUVXZZ.js → resizable-panels-DUpQEpwG.js} +3 -2
- package/dist/resizable-panels.js +1 -1
- package/dist/{search-field-IxF0IJXm.js → search-field-DMvho0KQ.js} +2 -2
- package/dist/search-field.js +1 -1
- package/dist/{segmented-control-yO1K1nbi.js → segmented-control-8ZUGnsZm.js} +2 -1
- package/dist/segmented-control.js +1 -1
- package/dist/{select-n_H52W1Z.js → select-D5rhJ8gi.js} +3 -2
- package/dist/select.js +1 -1
- package/dist/{signature-pad-q2SAsrdD.js → signature-pad-_bTeguN9.js} +256 -251
- package/dist/signature-pad.js +1 -1
- package/dist/slider-DVG6-Awh.js +308 -0
- package/dist/slider.js +1 -1
- package/dist/{sortable-data-table-tirqlLY2.js → sortable-data-table-CYKT_Ng7.js} +2 -2
- package/dist/sortable-data-table.js +1 -1
- package/dist/{split-button-Cb3EHs64.js → split-button-BCw4zZom.js} +75 -81
- package/dist/split-button.js +1 -1
- package/dist/{swipe-actions-DiZC57-3.js → swipe-actions-CBuJREU1.js} +4 -2
- package/dist/swipe-actions.js +1 -1
- package/dist/switch-C1WrKrf-.js +145 -0
- package/dist/switch.js +1 -1
- package/dist/tabs-XluwRjgg.js +210 -0
- package/dist/tabs.js +1 -1
- package/dist/{text-field-C8TWG-tY.js → text-field-hU72iSVS.js} +15 -13
- package/dist/text-field.js +1 -1
- package/dist/{textarea-BrW0XcG_.js → textarea-3k4Y0QQ3.js} +18 -16
- package/dist/textarea.js +1 -1
- package/dist/theme-root.js +1 -1
- package/dist/theme-switch-C505TtU8.js +166 -0
- package/dist/theme-switch.js +2 -0
- package/dist/{time-picker-Db8D49cP.js → time-picker-CPlhW0tr.js} +26 -20
- package/dist/time-picker.js +1 -1
- package/dist/{timeline-k3nURuCP.js → timeline-B0uAAVfT.js} +8 -2
- package/dist/timeline.js +1 -1
- package/dist/{toast-BHxI32ZA.js → toast-B7wo3sX1.js} +98 -79
- package/dist/{toast-stack-DqrAzdg5.js → toast-stack-B40VpS4M.js} +18 -4
- package/dist/toast-stack.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/{toggle-group-fcjzpifI.js → toggle-group-B2fpFZwV.js} +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/tooltip-BvgVTCTN.js +120 -0
- package/dist/tooltip.js +1 -1
- package/dist/{tree-view-C2liIxqy.js → tree-view-j8qLqkb_.js} +5 -1
- package/dist/tree-view.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/command-palette/command-palette.d.ts +1 -1
- package/dist/types/components/comment-thread/comment-thread.d.ts +118 -0
- package/dist/types/components/comment-thread/index.d.ts +1 -0
- package/dist/types/components/comment-thread/thread-core.d.ts +96 -0
- package/dist/types/components/comment-thread/thread-parts.d.ts +114 -0
- package/dist/types/components/context-menu/context-menu.d.ts +55 -0
- package/dist/types/components/context-menu/index.d.ts +2 -0
- package/dist/types/components/date-range-picker/date-range-picker.d.ts +1 -1
- package/dist/types/components/elastic-slider/elastic-slider.d.ts +53 -0
- package/dist/types/components/elastic-slider/index.d.ts +1 -0
- package/dist/types/components/expanding-search/expanding-search.d.ts +22 -0
- package/dist/types/components/expanding-search/index.d.ts +1 -0
- package/dist/types/components/menu/menu.d.ts +50 -7
- package/dist/types/components/pagination/pagination.d.ts +1 -1
- package/dist/types/components/radio-cards/radio-cards.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.d.ts +1 -1
- package/dist/types/components/slider/slider-style.d.ts +14 -0
- package/dist/types/components/slider/slider.d.ts +2 -10
- package/dist/types/components/slider/use-slider-interaction.d.ts +79 -0
- package/dist/types/components/split-button/split-button.d.ts +2 -2
- package/dist/types/components/tabs/tabs.d.ts +1 -1
- package/dist/types/components/text-field/text-field.d.ts +1 -1
- package/dist/types/components/textarea/textarea.d.ts +1 -1
- package/dist/types/components/theme-switch/index.d.ts +1 -0
- package/dist/types/components/theme-switch/theme-switch.d.ts +33 -0
- package/dist/types/components/tooltip/tooltip.d.ts +1 -1
- package/dist/types/index.d.ts +5 -0
- package/dist/types/overlay/overlay-layer.d.ts +20 -0
- package/dist/types/overlay/use-overlay-floating.d.ts +9 -2
- package/dist/{use-overlay-floating-DvJifLpF.js → use-overlay-floating-Bx2jBKAA.js} +8 -6
- package/dist/use-slider-interaction-ChL-208h.js +234 -0
- package/package.json +22 -2
- package/dist/accordion-xCI_u0BV.js +0 -198
- package/dist/avatar-BahDVO9t.js +0 -132
- package/dist/badge-B_sLygxU.js +0 -108
- package/dist/card-D-aI2QHx.js +0 -158
- package/dist/carousel-IvPqN-oM.js +0 -472
- package/dist/command-palette-BQ5LleGb.js +0 -384
- package/dist/date-range-picker-B5uFWsm-.js +0 -562
- package/dist/file-dropzone-pR4v7owg.js +0 -457
- package/dist/mention-input-BcQKX2EJ.js +0 -599
- package/dist/menu-xwOOUtWP.js +0 -275
- package/dist/pill-DO2gHzMb.js +0 -56
- package/dist/popover-QHcEvf9c.js +0 -119
- package/dist/slider-t0B5cecO.js +0 -477
- package/dist/switch-qwv8jQnR.js +0 -142
- package/dist/tabs-CAVJndX1.js +0 -203
- package/dist/tooltip-CkeiW9C1.js +0 -113
- package/dist/{theme-root-BbTBuLMQ.js → theme-root-Bs1U3uPA.js} +2 -2
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { r as e, t } from "./sx-Dx9JUKp5.js";
|
|
3
3
|
import { t as n } from "./focus-ring-BK5W5_NY.js";
|
|
4
4
|
import { n as r, r as i } from "./media-8yrN85VT.js";
|
|
5
|
-
import { t as
|
|
6
|
-
import { t as
|
|
7
|
-
import { t as o } from "./copy-button-
|
|
5
|
+
import { t as ee } from "./use-controlled-state-DpeVQZNR.js";
|
|
6
|
+
import { t as a } from "./button-NLY0h6EJ.js";
|
|
7
|
+
import { t as o } from "./copy-button-DCSLcYS-.js";
|
|
8
8
|
import { Fragment as te, useCallback as s, useEffect as c, useId as ne, useLayoutEffect as re, useRef as l, useState as ie } from "react";
|
|
9
9
|
import { vars as u } from "@jfrader/tokens/vars";
|
|
10
10
|
import { Fragment as d, jsx as f, jsxs as p } from "@emotion/react/jsx-runtime";
|
|
@@ -30,17 +30,17 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
30
30
|
borderColor: "CanvasText",
|
|
31
31
|
color: "CanvasText"
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
33
|
+
}), oe = e({
|
|
34
34
|
display: "flex",
|
|
35
35
|
alignItems: "center",
|
|
36
36
|
gap: u.space[2],
|
|
37
37
|
minBlockSize: u.space[8],
|
|
38
38
|
paddingInlineStart: u.space[3]
|
|
39
|
-
}),
|
|
39
|
+
}), se = e({
|
|
40
40
|
minInlineSize: 0,
|
|
41
41
|
fontWeight: u.fontWeight.medium,
|
|
42
42
|
overflowWrap: "anywhere"
|
|
43
|
-
}),
|
|
43
|
+
}), ce = e({
|
|
44
44
|
flexShrink: 0,
|
|
45
45
|
maxInlineSize: "50%",
|
|
46
46
|
paddingInline: u.space[2],
|
|
@@ -50,7 +50,7 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
50
50
|
fontFamily: u.font.mono,
|
|
51
51
|
fontSize: u.textSize.xs,
|
|
52
52
|
overflowWrap: "anywhere"
|
|
53
|
-
}),
|
|
53
|
+
}), le = e({ marginInlineStart: "auto" }), g = e({
|
|
54
54
|
position: "relative",
|
|
55
55
|
display: "flex",
|
|
56
56
|
direction: "ltr",
|
|
@@ -72,14 +72,14 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
72
72
|
borderColor: "CanvasText",
|
|
73
73
|
"&[data-state=\"collapsed\"]::after": { display: "none" }
|
|
74
74
|
}
|
|
75
|
-
}),
|
|
75
|
+
}), _ = e({
|
|
76
76
|
fontFamily: u.font.mono,
|
|
77
77
|
fontSize: u.textSize.sm,
|
|
78
78
|
lineHeight: u.lineHeight.relaxed,
|
|
79
79
|
fontVariantNumeric: "tabular-nums",
|
|
80
80
|
whiteSpace: "pre",
|
|
81
81
|
tabSize: m
|
|
82
|
-
}),
|
|
82
|
+
}), v = e({
|
|
83
83
|
flexShrink: 0,
|
|
84
84
|
paddingBlock: u.space[3],
|
|
85
85
|
paddingInline: u.space[3],
|
|
@@ -87,7 +87,7 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
87
87
|
color: u.color.textSubtle,
|
|
88
88
|
userSelect: "none",
|
|
89
89
|
borderInlineEnd: `1px solid ${u.color.border}`
|
|
90
|
-
}),
|
|
90
|
+
}), ue = e({
|
|
91
91
|
flex: "1 1 auto",
|
|
92
92
|
minInlineSize: 0,
|
|
93
93
|
margin: 0,
|
|
@@ -103,7 +103,7 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
103
103
|
borderEndStartRadius: 0
|
|
104
104
|
},
|
|
105
105
|
"&:focus-visible": n
|
|
106
|
-
}),
|
|
106
|
+
}), y = e({ font: "inherit" }), b = e({
|
|
107
107
|
inlineSize: "100%",
|
|
108
108
|
blockSize: "auto",
|
|
109
109
|
minBlockSize: u.space[8],
|
|
@@ -118,7 +118,7 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
118
118
|
},
|
|
119
119
|
"&[aria-expanded=\"true\"] svg": { transform: "rotate(180deg)" },
|
|
120
120
|
[i]: { "& svg": { transitionDuration: "0s" } }
|
|
121
|
-
}),
|
|
121
|
+
}), x = /* @__PURE__ */ f("svg", {
|
|
122
122
|
viewBox: "0 0 16 16",
|
|
123
123
|
fill: "none",
|
|
124
124
|
stroke: "currentColor",
|
|
@@ -127,13 +127,13 @@ var m = 2, h = `calc(${u.radius.lg} - ${u.space[1]})`, ae = e({
|
|
|
127
127
|
strokeLinejoin: "round",
|
|
128
128
|
children: /* @__PURE__ */ f("path", { d: "M4 6l4 4 4-4" })
|
|
129
129
|
}), S = new Intl.PluralRules("en");
|
|
130
|
-
function
|
|
130
|
+
function C(e, t) {
|
|
131
131
|
return `Show all ${t} ${S.select(e) === "one" ? "line" : "lines"}`;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function w(e) {
|
|
134
134
|
process.env.NODE_ENV !== "production" && console.warn("CodeBlock: highlighting failed; showing plain text.", e);
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function de(e, t) {
|
|
137
137
|
let n = t?.map((e) => e.content).join("");
|
|
138
138
|
return t === void 0 || n === void 0 || !e.startsWith(n) ? e : /* @__PURE__ */ p(d, { children: [t.map((e, t) => /* @__PURE__ */ f("span", {
|
|
139
139
|
style: {
|
|
@@ -143,17 +143,17 @@ function fe(e, t) {
|
|
|
143
143
|
children: e.content
|
|
144
144
|
}, t)), e.slice(n.length)] });
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
let
|
|
146
|
+
function T({ ref: e, code: n, filename: r, language: i, label: u = "Source code", sourceLabel: d = "Selectable source code", maxLines: m, open: h, defaultOpen: S = !1, onOpenChange: T, lineNumbers: fe = !1, locale: pe, getExpandLabel: E = C, collapseLabel: D = "Show fewer lines", copyable: O = !0, copyButtonProps: k, preRef: A, highlight: j, slotProps: M, className: N, sx: P, "aria-label": F, "aria-labelledby": I, ...L }) {
|
|
147
|
+
let R = ne(), z = `${R}-label`, B = `${R}-source`, [V, me] = ee(h, S, T), H = n.match(/[^\n]*\n|[^\n]+$/g) ?? [], U = m !== void 0 && Number.isFinite(m) && m > 0 ? Math.max(1, Math.floor(m)) : void 0, W = U !== void 0 && H.length > U, G = !W || V, K = G ? H : H.slice(0, U), q = new Intl.NumberFormat(pe), J = l(null), he = s((e) => {
|
|
148
148
|
if (e) return () => {
|
|
149
|
-
e.ownerDocument.activeElement === e && (
|
|
149
|
+
e.ownerDocument.activeElement === e && (J.current = e.ownerDocument);
|
|
150
150
|
};
|
|
151
|
-
}, []),
|
|
151
|
+
}, []), Y = l(j), [X, Z] = ie(null), Q = j !== void 0;
|
|
152
152
|
c(() => {
|
|
153
|
-
|
|
153
|
+
Y.current = j;
|
|
154
154
|
}), c(() => {
|
|
155
|
-
let e =
|
|
156
|
-
if (!e || n === "") return;
|
|
155
|
+
let e = Y.current;
|
|
156
|
+
if (Z(null), !e || n === "") return;
|
|
157
157
|
let t = !0, r;
|
|
158
158
|
try {
|
|
159
159
|
r = e({
|
|
@@ -161,17 +161,18 @@ function w({ ref: e, code: n, filename: r, language: i, label: u = "Source code"
|
|
|
161
161
|
language: i
|
|
162
162
|
});
|
|
163
163
|
} catch (e) {
|
|
164
|
-
|
|
164
|
+
w(e);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
return Promise.resolve(r).then((
|
|
168
|
-
t &&
|
|
167
|
+
return Promise.resolve(r).then((r) => {
|
|
168
|
+
t && Z(r ? {
|
|
169
|
+
loader: e,
|
|
169
170
|
code: n,
|
|
170
171
|
language: i,
|
|
171
|
-
lines:
|
|
172
|
+
lines: r
|
|
172
173
|
} : null);
|
|
173
174
|
}, (e) => {
|
|
174
|
-
t &&
|
|
175
|
+
t && w(e);
|
|
175
176
|
}), () => {
|
|
176
177
|
t = !1;
|
|
177
178
|
};
|
|
@@ -179,114 +180,114 @@ function w({ ref: e, code: n, filename: r, language: i, label: u = "Source code"
|
|
|
179
180
|
n,
|
|
180
181
|
i,
|
|
181
182
|
Q,
|
|
182
|
-
|
|
183
|
+
j
|
|
183
184
|
]);
|
|
184
|
-
let $ = Q &&
|
|
185
|
+
let $ = Q && X?.loader === j && X.code === n && X.language === i ? X.lines : void 0;
|
|
185
186
|
return re(() => {
|
|
186
|
-
|
|
187
|
+
J.current &&= (J.current.getElementById(B)?.focus(), null);
|
|
187
188
|
}), /* @__PURE__ */ f(t, {
|
|
188
|
-
className:
|
|
189
|
+
className: N,
|
|
189
190
|
styles: ae,
|
|
190
|
-
sx:
|
|
191
|
+
sx: P,
|
|
191
192
|
children: (t) => /* @__PURE__ */ p("section", {
|
|
192
|
-
...
|
|
193
|
+
...L,
|
|
193
194
|
ref: e,
|
|
194
195
|
"data-ui": "code-block",
|
|
195
196
|
className: t,
|
|
196
|
-
"aria-label":
|
|
197
|
-
"aria-labelledby":
|
|
197
|
+
"aria-label": F,
|
|
198
|
+
"aria-labelledby": I ? `${I} ${z}` : F === void 0 ? z : void 0,
|
|
198
199
|
"data-highlighted": $ ? "" : void 0,
|
|
199
200
|
children: [
|
|
200
201
|
/* @__PURE__ */ p("header", {
|
|
201
202
|
"data-ui": "code-block-header",
|
|
202
|
-
className:
|
|
203
|
-
css: [
|
|
203
|
+
className: M?.header?.className,
|
|
204
|
+
css: [oe, M?.header?.css],
|
|
204
205
|
children: [
|
|
205
206
|
/* @__PURE__ */ f("span", {
|
|
206
|
-
id:
|
|
207
|
+
id: z,
|
|
207
208
|
"data-ui": "code-block-label",
|
|
208
|
-
className:
|
|
209
|
-
css: [
|
|
209
|
+
className: M?.label?.className,
|
|
210
|
+
css: [se, M?.label?.css],
|
|
210
211
|
children: r || u
|
|
211
212
|
}),
|
|
212
213
|
i !== void 0 && i !== "" && /* @__PURE__ */ f("span", {
|
|
213
214
|
"data-ui": "code-block-language",
|
|
214
|
-
className:
|
|
215
|
-
css: [
|
|
215
|
+
className: M?.language?.className,
|
|
216
|
+
css: [ce, M?.language?.css],
|
|
216
217
|
children: i
|
|
217
218
|
}),
|
|
218
|
-
|
|
219
|
+
O && /* @__PURE__ */ f(o, {
|
|
219
220
|
label: "Copy code",
|
|
220
221
|
pendingLabel: "Copying code",
|
|
221
222
|
copiedLabel: "Code copied",
|
|
222
223
|
errorLabel: "Could not copy code",
|
|
223
224
|
variant: "ghost",
|
|
224
225
|
iconOnly: !0,
|
|
225
|
-
...
|
|
226
|
-
css: [
|
|
226
|
+
...k,
|
|
227
|
+
css: [le, k?.css],
|
|
227
228
|
text: n
|
|
228
229
|
})
|
|
229
230
|
]
|
|
230
231
|
}),
|
|
231
232
|
/* @__PURE__ */ p("div", {
|
|
232
233
|
"data-ui": "code-block-source-frame",
|
|
233
|
-
"data-state":
|
|
234
|
-
className:
|
|
235
|
-
css: [
|
|
236
|
-
children: [
|
|
234
|
+
"data-state": W ? G ? "expanded" : "collapsed" : void 0,
|
|
235
|
+
className: M?.sourceFrame?.className,
|
|
236
|
+
css: [g, M?.sourceFrame?.css],
|
|
237
|
+
children: [fe && K.length > 0 && /* @__PURE__ */ f("div", {
|
|
237
238
|
"aria-hidden": "true",
|
|
238
239
|
"data-ui": "code-block-gutter",
|
|
239
|
-
className:
|
|
240
|
+
className: M?.gutter?.className,
|
|
240
241
|
css: [
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
_,
|
|
243
|
+
v,
|
|
244
|
+
M?.gutter?.css
|
|
244
245
|
],
|
|
245
|
-
children:
|
|
246
|
+
children: K.map((e, t) => q.format(t + 1)).join("\n")
|
|
246
247
|
}), /* @__PURE__ */ f("pre", {
|
|
247
|
-
id:
|
|
248
|
-
ref:
|
|
248
|
+
id: B,
|
|
249
|
+
ref: A,
|
|
249
250
|
role: "group",
|
|
250
251
|
tabIndex: 0,
|
|
251
252
|
dir: "ltr",
|
|
252
253
|
"aria-label": d,
|
|
253
254
|
"data-ui": "code-block-pre",
|
|
254
|
-
className:
|
|
255
|
+
className: M?.pre?.className,
|
|
255
256
|
css: [
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
_,
|
|
258
|
+
ue,
|
|
259
|
+
M?.pre?.css
|
|
259
260
|
],
|
|
260
261
|
children: /* @__PURE__ */ f("code", {
|
|
261
262
|
"data-ui": "code-block-code",
|
|
262
|
-
className:
|
|
263
|
-
css: [
|
|
264
|
-
children: $ ?
|
|
263
|
+
className: M?.code?.className,
|
|
264
|
+
css: [y, M?.code?.css],
|
|
265
|
+
children: $ ? K.map((e, t) => /* @__PURE__ */ f(te, { children: de(e, $[t]) }, t)) : G ? n : K.join("")
|
|
265
266
|
})
|
|
266
267
|
})]
|
|
267
268
|
}),
|
|
268
|
-
|
|
269
|
-
ref:
|
|
269
|
+
W && /* @__PURE__ */ f(a, {
|
|
270
|
+
ref: he,
|
|
270
271
|
variant: "ghost",
|
|
271
272
|
tone: "neutral",
|
|
272
273
|
size: "sm",
|
|
273
|
-
endIcon:
|
|
274
|
-
"aria-expanded": !!
|
|
275
|
-
"aria-controls":
|
|
274
|
+
endIcon: x,
|
|
275
|
+
"aria-expanded": !!V,
|
|
276
|
+
"aria-controls": B,
|
|
276
277
|
"data-ui": "code-block-toggle",
|
|
277
|
-
className:
|
|
278
|
-
css: [
|
|
278
|
+
className: M?.toggle?.className,
|
|
279
|
+
css: [b, M?.toggle?.css],
|
|
279
280
|
render: (e) => /* @__PURE__ */ f("button", {
|
|
280
281
|
...e,
|
|
281
282
|
type: "button"
|
|
282
283
|
}),
|
|
283
|
-
onClick: () =>
|
|
284
|
-
children:
|
|
284
|
+
onClick: () => me(!V),
|
|
285
|
+
children: V ? D : E(H.length, q.format(H.length))
|
|
285
286
|
})
|
|
286
287
|
]
|
|
287
288
|
})
|
|
288
289
|
});
|
|
289
290
|
}
|
|
290
|
-
|
|
291
|
+
T.displayName = "CodeBlock";
|
|
291
292
|
//#endregion
|
|
292
|
-
export {
|
|
293
|
+
export { T as t };
|
package/dist/code-block.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { t as CodeBlock } from "./code-block-
|
|
2
|
+
export { t as CodeBlock } from "./code-block-B5we2lZa.js";
|