@aortl/admin-react 0.19.0 → 0.19.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/CHANGELOG.md +8 -1
- package/dist/PropertyList.d.ts +1 -1
- package/dist/PropertyList.d.ts.map +1 -1
- package/dist/admin.scoped.css +3 -0
- package/dist/index.cjs +12 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.19.1] - 2026-07-02
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Copyable `PropertyList` value cells copy on click anywhere in the cell, not only on the copy button (which stays as the keyboard and screen-reader path). Selecting text or clicking an interactive child doesn't trigger a copy; the cell shows a pointer cursor. (both)
|
|
12
|
+
|
|
7
13
|
## [0.19.0] - 2026-07-02
|
|
8
14
|
|
|
9
15
|
### Added
|
|
@@ -121,12 +127,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
121
127
|
- Make `primary` a high-contrast neutral and move blue to `info`. (both)
|
|
122
128
|
- Use solid color fills for `Alert` and `Badge` status variants. (both)
|
|
123
129
|
|
|
124
|
-
[Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.19.
|
|
130
|
+
[Unreleased]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.19.1...HEAD
|
|
125
131
|
[0.16.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.16.0...v0.16.1
|
|
126
132
|
[0.16.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.1...v0.16.0
|
|
127
133
|
[0.15.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.15.0...v0.15.1
|
|
128
134
|
[0.15.0]: https://github.com/Digital-Udvikling/admin-design-system/releases/tag/v0.15.0
|
|
129
135
|
|
|
136
|
+
[0.19.1]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.19.0...v0.19.1
|
|
130
137
|
[0.19.0]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.5...v0.19.0
|
|
131
138
|
[0.18.5]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.4...v0.18.5
|
|
132
139
|
[0.18.4]: https://github.com/Digital-Udvikling/admin-design-system/compare/v0.18.3...v0.18.4
|
package/dist/PropertyList.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export interface PropertyListValueProps extends ComponentProps<"dd"> {
|
|
|
36
36
|
/** Per-slot class overrides. `className` targets the root; these target inner slots. */
|
|
37
37
|
classNames?: SlotClasses<"copy">;
|
|
38
38
|
}
|
|
39
|
-
declare function PropertyListValue({ numeric, copyable, empty, copyValue, className, classNames, children, ...rest }: PropertyListValueProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare function PropertyListValue({ numeric, copyable, empty, copyValue, className, classNames, children, onClick, ...rest }: PropertyListValueProps): import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
export declare const PropertyList: typeof PropertyListRoot & {
|
|
41
41
|
Item: typeof PropertyListItem;
|
|
42
42
|
Label: typeof PropertyListLabel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropertyList.d.ts","sourceRoot":"","sources":["../src/PropertyList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"PropertyList.d.ts","sourceRoot":"","sources":["../src/PropertyList.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,cAAc,EAAmB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/F,OAAO,EAAM,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AA4C5C,MAAM,WAAW,iBAAkB,SAAQ,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AAC;IAClE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wFAAwF;IACxF,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAClC;AAED,iBAAS,iBAAiB,CAAC,EACzB,OAAO,EACP,QAAQ,EACR,KAAK,EACL,SAAS,EACT,SAAS,EACT,UAAU,EACV,QAAQ,EACR,OAAO,EACP,GAAG,IAAI,EACR,EAAE,sBAAsB,2CA0DxB;AAED,eAAO,MAAM,YAAY;;;;CAIvB,CAAC"}
|
package/dist/admin.scoped.css
CHANGED
|
@@ -1744,6 +1744,9 @@
|
|
|
1744
1744
|
padding: 0.125rem;
|
|
1745
1745
|
transition: opacity 100ms ease, color 100ms ease;
|
|
1746
1746
|
}
|
|
1747
|
+
:scope._ao-property-list-value-copyable, :scope ._ao-property-list-value-copyable {
|
|
1748
|
+
cursor: pointer;
|
|
1749
|
+
}
|
|
1747
1750
|
:scope._ao-property-list-value-copyable ._ao-property-list-copy, :scope ._ao-property-list-value-copyable ._ao-property-list-copy {
|
|
1748
1751
|
display: inline-flex;
|
|
1749
1752
|
opacity: 0;
|
package/dist/index.cjs
CHANGED
|
@@ -2582,8 +2582,9 @@ function PropertyListLabel({ className, ...rest }) {
|
|
|
2582
2582
|
...rest
|
|
2583
2583
|
});
|
|
2584
2584
|
}
|
|
2585
|
-
function PropertyListValue({ numeric, copyable, empty, copyValue, className, classNames, children, ...rest }) {
|
|
2585
|
+
function PropertyListValue({ numeric, copyable, empty, copyValue, className, classNames, children, onClick, ...rest }) {
|
|
2586
2586
|
const ddRef = (0, react.useRef)(null);
|
|
2587
|
+
const copyButtonRef = (0, react.useRef)(null);
|
|
2587
2588
|
const [copied, setCopied] = (0, react.useState)(false);
|
|
2588
2589
|
async function handleCopy() {
|
|
2589
2590
|
const text = copyValue ?? ddRef.current?.textContent?.trim() ?? "";
|
|
@@ -2594,6 +2595,14 @@ function PropertyListValue({ numeric, copyable, empty, copyValue, className, cla
|
|
|
2594
2595
|
setTimeout(() => setCopied(false), 1200);
|
|
2595
2596
|
} catch {}
|
|
2596
2597
|
}
|
|
2598
|
+
function handleCellClick(event) {
|
|
2599
|
+
onClick?.(event);
|
|
2600
|
+
if (event.defaultPrevented) return;
|
|
2601
|
+
if (window.getSelection()?.toString()) return;
|
|
2602
|
+
const interactive = event.target.closest("a, button, input, select, textarea");
|
|
2603
|
+
if (interactive && interactive !== copyButtonRef.current) return;
|
|
2604
|
+
handleCopy();
|
|
2605
|
+
}
|
|
2597
2606
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dd", {
|
|
2598
2607
|
ref: ddRef,
|
|
2599
2608
|
className: cn([
|
|
@@ -2602,12 +2611,13 @@ function PropertyListValue({ numeric, copyable, empty, copyValue, className, cla
|
|
|
2602
2611
|
copyable && "property-list-value-copyable",
|
|
2603
2612
|
empty && "property-list-value-empty"
|
|
2604
2613
|
], className),
|
|
2614
|
+
onClick: copyable ? handleCellClick : onClick,
|
|
2605
2615
|
...rest,
|
|
2606
2616
|
children: [children, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2617
|
+
ref: copyButtonRef,
|
|
2607
2618
|
type: "button",
|
|
2608
2619
|
"aria-label": "Copy",
|
|
2609
2620
|
className: cn("property-list-copy", classNames?.copy),
|
|
2610
|
-
onClick: handleCopy,
|
|
2611
2621
|
"data-copied": copied ? "true" : void 0,
|
|
2612
2622
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(CopyGlyph, { className: cn("property-list-copy-icon", void 0) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckGlyph, { className: cn("property-list-copy-icon-copied", void 0) })]
|
|
2613
2623
|
})]
|