@kazee-ds/react 0.7.0 → 0.8.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/README.md +2 -2
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/types/Card.d.ts +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Accessible Kazee React components, including Toast, built on React Aria Components. Requires React/React DOM 19+ and ESM.
|
|
4
4
|
|
|
5
|
-
Version **0.
|
|
5
|
+
Version **0.8.0** adds controlled selectable Card actions and builds on Avatar/AvatarGroup, expanded Badge, sized/icon Switch, interactive/compact Card, dense controls, input clearing and composable date/time families. Existing compact APIs remain supported. Verify registry availability before installing; use matching local packed artifacts for checkout testing. See [component expansion](https://gitlab.com/kazee.indonesia/kazee-design-system/-/blob/main/docs/component-expansion.md) and [release status](https://gitlab.com/kazee.indonesia/kazee-design-system/-/blob/main/docs/versions.md).
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Version 0.5.3 ignores Toast shortcut events with missing or non-string keys. Normal shortcuts and scoped Escape dismissal remain available.
|
|
@@ -12,7 +12,7 @@ Version 0.5.3 ignores Toast shortcut events with missing or non-string keys. Nor
|
|
|
12
12
|
Public npm installation requires no read token or login. Preserve the application's package manager and lockfile.
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
|
-
npm install --save-exact @kazee-ds/react@0.
|
|
15
|
+
npm install --save-exact @kazee-ds/react@0.8.0 @kazee-ds/styles@0.8.0
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Use
|
package/dist/index.js
CHANGED
|
@@ -1725,7 +1725,7 @@ var NumberField = /* @__PURE__ */ Object.assign(NumberFieldRoot, {
|
|
|
1725
1725
|
//#region src/Card.tsx
|
|
1726
1726
|
/** Native primary action is a sibling of content, so nested controls remain valid HTML. */
|
|
1727
1727
|
var CardTitleIdContext = createContext(void 0);
|
|
1728
|
-
function CardAction({ href, target, rel, onPress, isDisabled, actionLabel, actionLabelledBy, actionClassName, renderLink }) {
|
|
1728
|
+
function CardAction({ href, target, rel, onPress, isDisabled, isSelected, actionLabel, actionLabelledBy, actionClassName, renderLink }) {
|
|
1729
1729
|
if (!href && !onPress) return null;
|
|
1730
1730
|
if (href) {
|
|
1731
1731
|
const props = {
|
|
@@ -1754,18 +1754,20 @@ function CardAction({ href, target, rel, onPress, isDisabled, actionLabel, actio
|
|
|
1754
1754
|
className: partClass("card__action", actionClassName),
|
|
1755
1755
|
"aria-label": actionLabel,
|
|
1756
1756
|
"aria-labelledby": actionLabelledBy,
|
|
1757
|
+
"aria-pressed": isSelected,
|
|
1757
1758
|
disabled: isDisabled,
|
|
1758
1759
|
onClick: () => onPress?.()
|
|
1759
1760
|
};
|
|
1760
1761
|
return /* @__PURE__ */ jsx("button", { ...props });
|
|
1761
1762
|
}
|
|
1762
|
-
function CompactCard({ title, description, headingLevel = 3, actions, header, titleExtras, footer, children, className, classNames, density, href, target, rel, onPress, isDisabled, actionLabel, actionLabelledBy, actionClassName, renderLink, headerAlign, dividedHeader, flushFooter, ...props }) {
|
|
1763
|
+
function CompactCard({ title, description, headingLevel = 3, actions, header, titleExtras, footer, children, className, classNames, density, href, target, rel, onPress, isDisabled, isSelected, actionLabel, actionLabelledBy, actionClassName, renderLink, headerAlign, dividedHeader, flushFooter, ...props }) {
|
|
1763
1764
|
const Heading = `h${headingLevel}`;
|
|
1764
1765
|
return /* @__PURE__ */ jsxs("div", {
|
|
1765
1766
|
...props,
|
|
1766
1767
|
"data-density": density,
|
|
1767
1768
|
"data-interactive": !!(href || onPress) || void 0,
|
|
1768
1769
|
"data-disabled": isDisabled || void 0,
|
|
1770
|
+
"data-selected": isSelected || void 0,
|
|
1769
1771
|
className: partClass(partClass("card", classNames?.root), className),
|
|
1770
1772
|
children: [
|
|
1771
1773
|
/* @__PURE__ */ jsx(CardAction, {
|
|
@@ -1774,6 +1776,7 @@ function CompactCard({ title, description, headingLevel = 3, actions, header, ti
|
|
|
1774
1776
|
rel,
|
|
1775
1777
|
onPress,
|
|
1776
1778
|
isDisabled,
|
|
1779
|
+
isSelected,
|
|
1777
1780
|
renderLink,
|
|
1778
1781
|
actionClassName: partClass(classNames?.action ?? "", actionClassName),
|
|
1779
1782
|
actionLabelledBy: actionLabelledBy ?? props["aria-labelledby"],
|
|
@@ -1815,7 +1818,7 @@ function CompactCard({ title, description, headingLevel = 3, actions, header, ti
|
|
|
1815
1818
|
]
|
|
1816
1819
|
});
|
|
1817
1820
|
}
|
|
1818
|
-
function CardRoot({ className, classNames, children, density, href, target, rel, onPress, isDisabled, actionLabel, actionLabelledBy, actionClassName, renderLink, ...props }) {
|
|
1821
|
+
function CardRoot({ className, classNames, children, density, href, target, rel, onPress, isDisabled, isSelected, actionLabel, actionLabelledBy, actionClassName, renderLink, ...props }) {
|
|
1819
1822
|
const titleId = useId();
|
|
1820
1823
|
const label = actionLabel ?? props["aria-label"];
|
|
1821
1824
|
return /* @__PURE__ */ jsx(CardTitleIdContext.Provider, {
|
|
@@ -1825,6 +1828,7 @@ function CardRoot({ className, classNames, children, density, href, target, rel,
|
|
|
1825
1828
|
"data-density": density,
|
|
1826
1829
|
"data-interactive": !!(href || onPress) || void 0,
|
|
1827
1830
|
"data-disabled": isDisabled || void 0,
|
|
1831
|
+
"data-selected": isSelected || void 0,
|
|
1828
1832
|
className: partClass(partClass("card", classNames?.root), className),
|
|
1829
1833
|
children: [/* @__PURE__ */ jsx(CardAction, {
|
|
1830
1834
|
href,
|
|
@@ -1832,6 +1836,7 @@ function CardRoot({ className, classNames, children, density, href, target, rel,
|
|
|
1832
1836
|
rel,
|
|
1833
1837
|
onPress,
|
|
1834
1838
|
isDisabled,
|
|
1839
|
+
isSelected,
|
|
1835
1840
|
renderLink,
|
|
1836
1841
|
actionClassName: partClass(classNames?.action ?? "", actionClassName),
|
|
1837
1842
|
actionLabel: label,
|