@cboxdk/cbox-ui 0.12.1 → 0.13.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/index.d.ts +6 -8
- package/dist/index.js +742 -707
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/tokens/cbox.css +1 -0
- package/tokens/page-tabs.css +26 -0
package/package.json
CHANGED
package/tokens/cbox.css
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@import './shell.css';
|
|
3
3
|
/* Form controls and the dialog (Button, Field, Input, Checkbox, RadioGroup, Switch, Dialog). */
|
|
4
4
|
@import './controls.css';
|
|
5
|
+
@import './page-tabs.css';
|
|
5
6
|
|
|
6
7
|
/* Cbox colour tokens — cbox-ui structure, warmed toward cbox.dk's cream/ink palette
|
|
7
8
|
* so the products share temperature with the brand site (and aren't a Linear clone).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* PageTabs also serves the shell: it must work without a host Tailwind build. */
|
|
2
|
+
@layer components {
|
|
3
|
+
.cbx-page-tabs { container: tabs / inline-size; min-width: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
|
|
4
|
+
.cbx-page-tabs-desktop { display: none; align-items: end; gap: 12px; padding: 0 12px; }
|
|
5
|
+
.cbx-page-tabs-desktop nav { display: flex; flex: 1; align-items: center; gap: 4px; min-height: 48px; overflow-x: auto; padding: 6px 0; }
|
|
6
|
+
.cbx-page-tabs-desktop nav a { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
|
|
7
|
+
.cbx-page-tabs-desktop > div { display: flex; align-items: center; gap: 8px; min-height: 48px; }
|
|
8
|
+
.cbx-page-tabs-mobile { display: flex; flex-direction: column; gap: 8px; padding: 8px; }
|
|
9
|
+
.cbx-page-tabs-dropdown { position: relative; }
|
|
10
|
+
.cbx-page-tabs-dropdown > button { display: flex; width: 100%; min-height: 44px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); color: var(--foreground); text-align: left; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
|
|
11
|
+
.cbx-page-tabs-dropdown > button > span { display: flex; min-width: 0; align-items: center; gap: 8px; }
|
|
12
|
+
.cbx-page-tabs-dropdown > button > span > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
13
|
+
.cbx-page-tabs-dropdown > ul { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin: 4px 0 0; padding: 0; max-height: 60dvh; overflow-y: auto; list-style: none; border: 1px solid var(--border); border-radius: 6px; background: var(--popover); box-shadow: 0 8px 24px oklch(0.2 0.02 75 / 0.18); }
|
|
14
|
+
.cbx-page-tabs-dropdown li a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 12px; overflow-wrap: anywhere; }
|
|
15
|
+
.cbx-page-tabs a { color: var(--muted-foreground); text-decoration: none; font-size: 13px; }
|
|
16
|
+
.cbx-page-tabs a:hover { color: var(--foreground); background: var(--secondary); }
|
|
17
|
+
.cbx-page-tabs a[aria-current="page"] { color: var(--foreground); background: var(--accent-soft); font-weight: 600; }
|
|
18
|
+
.cbx-page-tabs :is(a, button):focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
|
|
19
|
+
.cbx-page-tabs svg { width: 14px; height: 14px; flex-shrink: 0; }
|
|
20
|
+
.cbx-page-tabs-dropdown > button[aria-expanded="true"] > svg { transform: rotate(180deg); }
|
|
21
|
+
.cbx-m-section-nav { padding: 8px 16px; }
|
|
22
|
+
@container tabs (min-width: 56rem) {
|
|
23
|
+
.cbx-page-tabs-desktop { display: flex; }
|
|
24
|
+
.cbx-page-tabs-mobile { display: none; }
|
|
25
|
+
}
|
|
26
|
+
}
|