@aortl/admin-react 0.18.2 → 0.18.3
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 +9 -1
- package/dist/Tabs.d.ts +9 -3
- package/dist/Tabs.d.ts.map +1 -1
- package/dist/admin.scoped.css +10 -0
- package/dist/index.cjs +7 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +7 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.18.3] - 2026-06-29
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `Tabs.Tab` `icon` prop (leading glyph via `renderIcon`); tab SVG icons are pinned to the label size (`.tabs .tab > svg`), so non-Tabler sets (e.g. Heroicons) render uniformly. (both)
|
|
12
|
+
- `Tabs` `wrap` prop (`.tabs-wrap`) lets the list wrap onto new rows instead of overflowing, keeping each tab's label on one line. (both)
|
|
13
|
+
|
|
7
14
|
## [0.18.2] - 2026-06-29
|
|
8
15
|
|
|
9
16
|
### Added
|
|
@@ -91,12 +98,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
91
98
|
- Make `primary` a high-contrast neutral and move blue to `info`. (both)
|
|
92
99
|
- Use solid color fills for `Alert` and `Badge` status variants. (both)
|
|
93
100
|
|
|
94
|
-
[Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.
|
|
101
|
+
[Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.3...HEAD
|
|
95
102
|
[0.16.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.16.0...v0.16.1
|
|
96
103
|
[0.16.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.1...v0.16.0
|
|
97
104
|
[0.15.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.0...v0.15.1
|
|
98
105
|
[0.15.0]: https://github.com/Digital-Udvikling/admin-design-system/releases/tag/v0.15.0
|
|
99
106
|
|
|
107
|
+
[0.18.3]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.2...v0.18.3
|
|
100
108
|
[0.18.2]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.1...v0.18.2
|
|
101
109
|
[0.18.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.0...v0.18.1
|
|
102
110
|
[0.18.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.17.0...v0.18.0
|
package/dist/Tabs.d.ts
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { Tabs as BaseTabs } from '@base-ui/react/tabs';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
+
import { IconProp } from './icon';
|
|
3
4
|
export type TabsVariant = "bordered" | "boxed";
|
|
4
5
|
export type TabsSize = "sm" | "md" | "lg";
|
|
5
6
|
export interface TabsProps extends ComponentProps<typeof BaseTabs.Root> {
|
|
6
7
|
variant?: TabsVariant;
|
|
7
8
|
size?: TabsSize;
|
|
8
9
|
fullWidth?: boolean;
|
|
10
|
+
/** Let the list wrap to multiple rows instead of overflowing; each tab stays on one line. */
|
|
11
|
+
wrap?: boolean;
|
|
9
12
|
}
|
|
10
|
-
declare function TabsRoot({ variant, size, fullWidth, className, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function TabsRoot({ variant, size, fullWidth, wrap, className, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
11
14
|
export type TabsListProps = ComponentProps<typeof BaseTabs.List>;
|
|
12
15
|
declare function TabsList({ className, ...rest }: TabsListProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export
|
|
14
|
-
|
|
16
|
+
export interface TabsTabProps extends ComponentProps<typeof BaseTabs.Tab> {
|
|
17
|
+
/** Leading icon. Pass a component (`icon={IconLock}`) or an element. */
|
|
18
|
+
icon?: IconProp;
|
|
19
|
+
}
|
|
20
|
+
declare function TabsTab({ icon, className, children, ...rest }: TabsTabProps): import("react/jsx-runtime").JSX.Element;
|
|
15
21
|
export type TabsPanelProps = ComponentProps<typeof BaseTabs.Panel>;
|
|
16
22
|
declare function TabsPanel({ className, ...rest }: TabsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
17
23
|
export declare const Tabs: typeof TabsRoot & {
|
package/dist/Tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEnD,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,OAAO,CAAC;AAC/C,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE1C,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC;IACrE,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6FAA6F;IAC7F,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,iBAAS,QAAQ,CAAC,EAChB,OAAoB,EACpB,IAAW,EACX,SAAiB,EACjB,IAAY,EACZ,SAAS,EACT,GAAG,IAAI,EACR,EAAE,SAAS,2CAgBX;AAED,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAC;AAEjE,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,aAAa,2CAEtD;AAED,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,OAAO,QAAQ,CAAC,GAAG,CAAC;IACvE,wEAAwE;IACxE,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,iBAAS,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,YAAY,2CAOpE;AAED,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;AAEnE,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,cAAc,2CAExD;AAED,eAAO,MAAM,IAAI;;;;CAIf,CAAC"}
|
package/dist/admin.scoped.css
CHANGED
|
@@ -4751,6 +4751,10 @@
|
|
|
4751
4751
|
:scope._ao-tabs ._ao-tab > :is(i, svg), :scope ._ao-tabs ._ao-tab > :is(i, svg) {
|
|
4752
4752
|
flex-shrink: 0;
|
|
4753
4753
|
}
|
|
4754
|
+
:scope._ao-tabs ._ao-tab > svg, :scope ._ao-tabs ._ao-tab > svg {
|
|
4755
|
+
width: 1em;
|
|
4756
|
+
height: 1em;
|
|
4757
|
+
}
|
|
4754
4758
|
:scope._ao-tabs ._ao-tab-input, :scope ._ao-tabs ._ao-tab-input {
|
|
4755
4759
|
position: absolute;
|
|
4756
4760
|
width: 1px;
|
|
@@ -4864,6 +4868,12 @@
|
|
|
4864
4868
|
flex: 1;
|
|
4865
4869
|
justify-content: center;
|
|
4866
4870
|
}
|
|
4871
|
+
:scope._ao-tabs-wrap ._ao-tab-list, :scope ._ao-tabs-wrap ._ao-tab-list {
|
|
4872
|
+
flex-wrap: wrap;
|
|
4873
|
+
}
|
|
4874
|
+
:scope._ao-tabs-wrap ._ao-tab, :scope ._ao-tabs-wrap ._ao-tab {
|
|
4875
|
+
white-space: nowrap;
|
|
4876
|
+
}
|
|
4867
4877
|
:scope._ao-tabs-sm ._ao-tab, :scope ._ao-tabs-sm ._ao-tab {
|
|
4868
4878
|
height: calc(var(--spacing) * 7);
|
|
4869
4879
|
padding-inline: calc(var(--spacing) * 2);
|
package/dist/index.cjs
CHANGED
|
@@ -2352,13 +2352,14 @@ var Navbar = Object.assign(NavbarRoot, {
|
|
|
2352
2352
|
});
|
|
2353
2353
|
//#endregion
|
|
2354
2354
|
//#region src/Tabs.tsx
|
|
2355
|
-
function TabsRoot({ variant = "bordered", size = "md", fullWidth = false, className, ...rest }) {
|
|
2355
|
+
function TabsRoot({ variant = "bordered", size = "md", fullWidth = false, wrap = false, className, ...rest }) {
|
|
2356
2356
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tabs.Tabs.Root, {
|
|
2357
2357
|
className: cn([
|
|
2358
2358
|
"tabs",
|
|
2359
2359
|
variant !== "bordered" && `tabs-${variant}`,
|
|
2360
2360
|
size !== "md" && `tabs-${size}`,
|
|
2361
|
-
fullWidth && "tabs-full-width"
|
|
2361
|
+
fullWidth && "tabs-full-width",
|
|
2362
|
+
wrap && "tabs-wrap"
|
|
2362
2363
|
], className),
|
|
2363
2364
|
...rest
|
|
2364
2365
|
});
|
|
@@ -2369,10 +2370,11 @@ function TabsList({ className, ...rest }) {
|
|
|
2369
2370
|
...rest
|
|
2370
2371
|
});
|
|
2371
2372
|
}
|
|
2372
|
-
function TabsTab({ className, ...rest }) {
|
|
2373
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.
|
|
2373
|
+
function TabsTab({ icon, className, children, ...rest }) {
|
|
2374
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_tabs.Tabs.Tab, {
|
|
2374
2375
|
className: cn("tab", className),
|
|
2375
|
-
...rest
|
|
2376
|
+
...rest,
|
|
2377
|
+
children: [renderIcon(icon), children]
|
|
2376
2378
|
});
|
|
2377
2379
|
}
|
|
2378
2380
|
function TabsPanel({ className, ...rest }) {
|