@dreamlake/dockit 0.2.23 → 0.2.25

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.
@@ -99,7 +99,7 @@ function CodeBlock({ children, filename, lang }) {
99
99
  "div",
100
100
  {
101
101
  className: "absolute top-0 right-0 z-10 flex items-center opacity-0 group-hover:opacity-100 focus-within:opacity-100 transition-opacity duration-150",
102
- style: { gap: 6, padding: embedded ? "3px 8px" : "8px 8px", isolation: "isolate" },
102
+ style: { gap: embedded ? 8 : 6, padding: embedded ? "3px 0 3px 8px" : "8px 8px", isolation: "isolate" },
103
103
  children: [
104
104
  /* @__PURE__ */ jsx(
105
105
  "span",
@@ -12,7 +12,7 @@ function CodeTabs({ children, "aria-label": label = "Code examples" }) {
12
12
  const id = useId();
13
13
  const buttons = useRef([]);
14
14
  if (!examples.length) return null;
15
- return /* @__PURE__ */ jsx("div", { "data-code-tabs": true, className: "dockit-code-tabs group relative", children: /* @__PURE__ */ jsxs(Tabs, { value: String(active), onValueChange: (value) => setSelected(Number(value)), children: [
15
+ return /* @__PURE__ */ jsx("div", { "data-code-tabs": true, "data-first-active": active === 0, className: "dockit-code-tabs group relative", children: /* @__PURE__ */ jsxs(Tabs, { value: String(active), onValueChange: (value) => setSelected(Number(value)), children: [
16
16
  /* @__PURE__ */ jsx("div", { className: "dockit-code-tabs-header", children: /* @__PURE__ */ jsx(TabsList, { "aria-label": label, className: "dockit-code-tabs-list border-0 font-doc-template-ui", children: examples.map((example, index) => /* @__PURE__ */ jsx(
17
17
  TabsTrigger,
18
18
  {
package/dist/styles.css CHANGED
@@ -383,18 +383,17 @@
383
383
  their code/control state but are absent from keyboard and accessibility flow. */
384
384
  .dockit-code-tabs {
385
385
  margin: 18px 0 22px;
386
- border-radius: var(--radius-doc-template);
386
+ border-radius: 6px 6px var(--radius-doc-template) var(--radius-doc-template);
387
387
  overflow: hidden;
388
388
  }
389
389
  .dockit-code-tabs-header {
390
390
  background: var(--color-doc-template-bg);
391
- box-shadow: inset 0 -1px var(--color-doc-template-faint);
392
391
  min-height: 30px;
393
- padding: 0 156px 0 12px;
392
+ padding: 0 156px 0 0;
394
393
  }
395
394
  .dockit-code-tabs-list { overflow-x: auto; min-height: 30px; gap: 2px; }
396
395
  /* Raised file-tab geometry follows Studio's chat TabStrip. UIKit supplies the
397
- compound primitives; the active page-colored bottom edge opens the baseline. */
396
+ compound primitives; the active code-colored bottom edge opens the baseline. */
398
397
  .dockit-code-tabs-list [role='tab'] {
399
398
  margin: 0 1px;
400
399
  padding: 3px 9px 4px;
@@ -403,10 +402,17 @@
403
402
  background: transparent;
404
403
  line-height: 18px;
405
404
  }
405
+ .dockit-code-tabs-list [role='tab']:first-child { margin-left: 0; }
406
+ .dockit-code-tabs-list [role='tab'][aria-selected='false']:hover {
407
+ border-color: var(--color-doc-template-faint);
408
+ border-bottom-color: transparent;
409
+ color: var(--color-doc-template-ink);
410
+ }
406
411
  .dockit-code-tabs-list [role='tab'][aria-selected='true'] {
412
+ z-index: 1;
407
413
  border-color: var(--color-doc-template-faint);
408
- border-bottom-color: var(--color-doc-template-bg);
409
- background: var(--color-doc-template-bg);
414
+ border-bottom-color: var(--color-doc-template-code);
415
+ background: var(--color-doc-template-code);
410
416
  }
411
417
  .dockit-code-tabs-list [role='tab']:focus-visible,
412
418
  .dockit-code-tabs [role='tabpanel']:focus-visible {
@@ -415,8 +421,9 @@
415
421
  }
416
422
  .dockit-code-tabs [role='tabpanel'] {
417
423
  border: 1px solid var(--color-doc-template-faint);
418
- border-top: 0;
419
- border-radius: 0 0 var(--radius-doc-template) var(--radius-doc-template);
424
+ margin-top: -1px;
425
+ border-radius: var(--radius-doc-template);
420
426
  background: var(--color-doc-template-code);
421
427
  }
428
+ .dockit-code-tabs[data-first-active='true'] [role='tabpanel'] { border-top-left-radius: 0; }
422
429
  .dockit-code-tabs [role='tabpanel'][hidden] { display: none; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamlake/dockit",
3
- "version": "0.2.23",
3
+ "version": "0.2.25",
4
4
  "description": "The DreamLake documentation shell — Vike + React + Tailwind v4 + MDX docs framework with sidebar, TOC, search, and theming",
5
5
  "license": "MIT",
6
6
  "type": "module",