@canonical/react-ds-app-landscape 0.27.1-experimental.0 → 0.29.0-experimental.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.
@@ -4,7 +4,8 @@ import "./styles.css";
4
4
  const Button = ({ id, className, children, style, appearance, ...props }) => {
5
5
  return (_jsx("button", { id: id, className: ["ds", "button", appearance, className]
6
6
  .filter(Boolean)
7
- .join(" "), style: style, "aria-label": props["aria-label"] || children?.toString(), ...props, children: children }));
7
+ .join(" "), style: style, "aria-label": props["aria-label"] ||
8
+ (typeof children === "string" ? children : undefined), ...props, children: children }));
8
9
  };
9
10
  export default Button;
10
11
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/lib/Button/Button.tsx"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC;AAEtB,gEAAgE;AAChE,MAAM,MAAM,GAAG,CAAC,EACd,EAAE,EACF,SAAS,EACT,QAAQ,EACR,KAAK,EACL,UAAU,EACV,GAAG,KAAK,EACF,EAAsB,EAAE;IAC9B,OAAO,CACL,iBACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,KAAK,gBAIA,KAAK,CAAC,YAAY,CAAC,IAAI,QAAQ,EAAE,QAAQ,EAAE,KACnD,KAAK,YAER,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/lib/Button/Button.tsx"],"names":[],"mappings":";AACA,OAAO,cAAc,CAAC;AAEtB,gEAAgE;AAChE,MAAM,MAAM,GAAG,CAAC,EACd,EAAE,EACF,SAAS,EACT,QAAQ,EACR,KAAK,EACL,UAAU,EACV,GAAG,KAAK,EACF,EAAsB,EAAE;IAC9B,OAAO,CACL,iBACE,EAAE,EAAE,EAAE,EACN,SAAS,EAAE,CAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,CAAC;aAC/C,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,KAAK,EAAE,KAAK,gBAKV,KAAK,CAAC,YAAY,CAAC;YACnB,CAAC,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,KAEnD,KAAK,YAER,QAAQ,GACF,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/lib/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,gEAAgE;AAChE,QAAA,MAAM,MAAM,GAAI,0DAOb,KAAK,KAAG,KAAK,CAAC,YAiBhB,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/lib/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAEtB,gEAAgE;AAChE,QAAA,MAAM,MAAM,GAAI,0DAOb,KAAK,KAAG,KAAK,CAAC,YAoBhB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -5,9 +5,9 @@ export interface BaseProps {
5
5
  className?: string;
6
6
  /**
7
7
  * Button contents.
8
- * This will also be used for the `aria-label`.
9
- * If this contains anything other than a string literal (such as a <p> element), you should specify an
10
- * `aria-label` prop to ensure that the button label is applied properly. Otherwise, the label will be set to [object Object].
8
+ * String children are also applied as the button's `aria-label`. For
9
+ * non-string children the accessible name comes from the rendered text
10
+ * content; pass an explicit `aria-label` for icon-only buttons.
11
11
  * */
12
12
  children: ReactNode;
13
13
  /** The visual style of the button */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@canonical/react-ds-app-landscape",
3
3
  "description": "Landscape-specific components for the Pragma design system",
4
- "version": "0.27.1-experimental.0",
4
+ "version": "0.29.0-experimental.0",
5
5
  "type": "module",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -43,19 +43,19 @@
43
43
  "test:vitest:watch": "vitest"
44
44
  },
45
45
  "dependencies": {
46
- "@canonical/react-ds-global": "^0.27.1-experimental.0",
47
- "@canonical/storybook-config": "^0.27.1-experimental.0",
48
- "@canonical/styles": "^0.27.1-experimental.0",
46
+ "@canonical/react-ds-global": "^0.29.0-experimental.0",
47
+ "@canonical/storybook-config": "^0.29.0-experimental.0",
48
+ "@canonical/styles": "^0.28.0",
49
49
  "react": "^19.2.4",
50
50
  "react-dom": "^19.2.4"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@biomejs/biome": "2.4.9",
54
- "@canonical/biome-config": "^0.27.1-experimental.0",
54
+ "@canonical/biome-config": "^0.28.0",
55
55
  "@canonical/design-tokens": "^0.6.0",
56
- "@canonical/storybook-helpers": "^0.27.1-experimental.0",
57
- "@canonical/typescript-config-react": "^0.27.1-experimental.0",
58
- "@canonical/webarchitect": "^0.27.1-experimental.0",
56
+ "@canonical/storybook-helpers": "^0.29.0-experimental.0",
57
+ "@canonical/typescript-config-react": "^0.28.0",
58
+ "@canonical/webarchitect": "^0.29.0-experimental.0",
59
59
  "@chromatic-com/storybook": "^5.0.1",
60
60
  "@storybook/addon-docs": "^10.3.1",
61
61
  "@storybook/react-vite": "^10.3.1",
@@ -73,5 +73,5 @@
73
73
  "vite": "^8.0.1",
74
74
  "vitest": "^4.0.18"
75
75
  },
76
- "gitHead": "d3f5b9aab7bec07fce40a12b45097d28d3cf0201"
76
+ "gitHead": "eda67fea634a79b9f77910d3106219efc9b30136"
77
77
  }