@canonical/react-ds-core 0.10.0-experimental.4 → 0.10.0-experimental.5

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.
Files changed (83) hide show
  1. package/dist/esm/storybook/decorators.js +14 -1
  2. package/dist/esm/storybook/decorators.js.map +1 -1
  3. package/dist/esm/ui/Badge/styles.css +2 -2
  4. package/dist/esm/ui/Button/styles.css +7 -7
  5. package/dist/esm/ui/Card/Card.js +16 -0
  6. package/dist/esm/ui/Card/Card.js.map +1 -0
  7. package/dist/esm/ui/Card/common/Image/Image.js +14 -0
  8. package/dist/esm/ui/Card/common/Image/Image.js.map +1 -0
  9. package/dist/esm/ui/Card/common/Image/index.js +2 -0
  10. package/dist/esm/ui/Card/common/Image/index.js.map +1 -0
  11. package/dist/esm/ui/Card/common/Image/styles.css +7 -0
  12. package/dist/esm/ui/Card/common/Image/types.js +3 -0
  13. package/dist/esm/ui/Card/common/Image/types.js.map +1 -0
  14. package/dist/esm/ui/Card/common/Section/Section.js +13 -0
  15. package/dist/esm/ui/Card/common/Section/Section.js.map +1 -0
  16. package/dist/esm/ui/Card/common/Section/index.js +2 -0
  17. package/dist/esm/ui/Card/common/Section/index.js.map +1 -0
  18. package/dist/esm/ui/Card/common/Section/styles.css +6 -0
  19. package/dist/esm/ui/Card/common/Section/types.js +3 -0
  20. package/dist/esm/ui/Card/common/Section/types.js.map +1 -0
  21. package/dist/esm/ui/Card/common/ThumbnailSection/ThumbnailSection.js +14 -0
  22. package/dist/esm/ui/Card/common/ThumbnailSection/ThumbnailSection.js.map +1 -0
  23. package/dist/esm/ui/Card/common/ThumbnailSection/index.js +2 -0
  24. package/dist/esm/ui/Card/common/ThumbnailSection/index.js.map +1 -0
  25. package/dist/esm/ui/Card/common/ThumbnailSection/styles.css +11 -0
  26. package/dist/esm/ui/Card/common/ThumbnailSection/types.js +3 -0
  27. package/dist/esm/ui/Card/common/ThumbnailSection/types.js.map +1 -0
  28. package/dist/esm/ui/Card/common/index.js +4 -0
  29. package/dist/esm/ui/Card/common/index.js.map +1 -0
  30. package/dist/esm/ui/Card/index.js +3 -0
  31. package/dist/esm/ui/Card/index.js.map +1 -0
  32. package/dist/esm/ui/Card/styles.css +23 -0
  33. package/dist/esm/ui/Card/types.js +3 -0
  34. package/dist/esm/ui/Card/types.js.map +1 -0
  35. package/dist/esm/ui/Chip/styles.css +5 -5
  36. package/dist/esm/ui/Rule/styles.css +3 -3
  37. package/dist/esm/ui/SkipLink/SkipLink.js +20 -0
  38. package/dist/esm/ui/SkipLink/SkipLink.js.map +1 -0
  39. package/dist/esm/ui/SkipLink/index.js +4 -0
  40. package/dist/esm/ui/SkipLink/index.js.map +1 -0
  41. package/dist/esm/ui/SkipLink/styles.css +21 -0
  42. package/dist/esm/ui/SkipLink/types.js +3 -0
  43. package/dist/esm/ui/SkipLink/types.js.map +1 -0
  44. package/dist/esm/ui/Tooltip/styles.css +3 -3
  45. package/dist/esm/ui/index.js +2 -0
  46. package/dist/esm/ui/index.js.map +1 -1
  47. package/dist/types/storybook/decorators.d.ts +13 -1
  48. package/dist/types/storybook/decorators.d.ts.map +1 -1
  49. package/dist/types/ui/Card/Card.d.ts +24 -0
  50. package/dist/types/ui/Card/Card.d.ts.map +1 -0
  51. package/dist/types/ui/Card/common/Image/Image.d.ts +14 -0
  52. package/dist/types/ui/Card/common/Image/Image.d.ts.map +1 -0
  53. package/dist/types/ui/Card/common/Image/index.d.ts +3 -0
  54. package/dist/types/ui/Card/common/Image/index.d.ts.map +1 -0
  55. package/dist/types/ui/Card/common/Image/types.d.ts +5 -0
  56. package/dist/types/ui/Card/common/Image/types.d.ts.map +1 -0
  57. package/dist/types/ui/Card/common/Section/Section.d.ts +13 -0
  58. package/dist/types/ui/Card/common/Section/Section.d.ts.map +1 -0
  59. package/dist/types/ui/Card/common/Section/index.d.ts +3 -0
  60. package/dist/types/ui/Card/common/Section/index.d.ts.map +1 -0
  61. package/dist/types/ui/Card/common/Section/types.d.ts +6 -0
  62. package/dist/types/ui/Card/common/Section/types.d.ts.map +1 -0
  63. package/dist/types/ui/Card/common/ThumbnailSection/ThumbnailSection.d.ts +13 -0
  64. package/dist/types/ui/Card/common/ThumbnailSection/ThumbnailSection.d.ts.map +1 -0
  65. package/dist/types/ui/Card/common/ThumbnailSection/index.d.ts +3 -0
  66. package/dist/types/ui/Card/common/ThumbnailSection/index.d.ts.map +1 -0
  67. package/dist/types/ui/Card/common/ThumbnailSection/types.d.ts +12 -0
  68. package/dist/types/ui/Card/common/ThumbnailSection/types.d.ts.map +1 -0
  69. package/dist/types/ui/Card/common/index.d.ts +4 -0
  70. package/dist/types/ui/Card/common/index.d.ts.map +1 -0
  71. package/dist/types/ui/Card/index.d.ts +3 -0
  72. package/dist/types/ui/Card/index.d.ts.map +1 -0
  73. package/dist/types/ui/Card/types.d.ts +10 -0
  74. package/dist/types/ui/Card/types.d.ts.map +1 -0
  75. package/dist/types/ui/SkipLink/SkipLink.d.ts +16 -0
  76. package/dist/types/ui/SkipLink/SkipLink.d.ts.map +1 -0
  77. package/dist/types/ui/SkipLink/index.d.ts +3 -0
  78. package/dist/types/ui/SkipLink/index.d.ts.map +1 -0
  79. package/dist/types/ui/SkipLink/types.d.ts +16 -0
  80. package/dist/types/ui/SkipLink/types.d.ts.map +1 -0
  81. package/dist/types/ui/index.d.ts +2 -0
  82. package/dist/types/ui/index.d.ts.map +1 -1
  83. package/package.json +5 -5
@@ -1,3 +1,16 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  export const rtl = () => (Story) => (_jsx("div", { dir: "rtl", children: _jsx(Story, {}) }));
3
+ export const grid = () => (Story) => (_jsx("div", { style: {
4
+ display: "grid",
5
+ gridTemplateColumns: "repeat(auto-fit, minmax(300px, 1fr))",
6
+ gap: "1em",
7
+ }, children: _jsx(Story, {}) }));
8
+ /**
9
+ * Places the story before a `<main>` element. This is useful for stories that need to be placed before the rest of the page contents in reading order (such as a skip link).
10
+ * @param id - The id of the main element
11
+ * @param children - Content to be rendered inside the main element
12
+ * @TODO this is the first decorator that seems like it may deserve a complex props object, and thus a separate Type.
13
+ * Should the type be declared separately? Should this be a separate file? Should the decorator be simplified somehow?
14
+ */
15
+ export const beforeMain = ({ id = "main", children }) => (Story) => (_jsxs(_Fragment, { children: [_jsx(Story, {}), _jsx("main", { id: id, tabIndex: -1, children: children })] }));
3
16
  //# sourceMappingURL=decorators.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../src/storybook/decorators.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,KAAkB,EAAE,EAAE,CAAC,CAC/C,cAAK,GAAG,EAAC,KAAK,YACZ,KAAC,KAAK,KAAG,GACL,CACP,CAAC"}
1
+ {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../src/storybook/decorators.tsx"],"names":[],"mappings":";AAEA,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,EAAE,CAAC,CAAC,KAAkB,EAAE,EAAE,CAAC,CAC/C,cAAK,GAAG,EAAC,KAAK,YACZ,KAAC,KAAK,KAAG,GACL,CACP,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,GAAG,EAAE,CAAC,CAAC,KAAkB,EAAE,EAAE,CAAC,CAChD,cACE,KAAK,EAAE;QACL,OAAO,EAAE,MAAM;QACf,mBAAmB,EAAE,sCAAsC;QAC3D,GAAG,EAAE,KAAK;KACX,YAED,KAAC,KAAK,KAAG,GACL,CACP,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GACrB,CAAC,EAAE,EAAE,GAAG,MAAM,EAAE,QAAQ,EAAyC,EAAE,EAAE,CACrE,CAAC,KAAkB,EAAE,EAAE,CAAC,CACtB,8BACE,KAAC,KAAK,KAAG,EACT,eAAM,EAAE,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC,YACvB,QAAQ,GACJ,IACN,CACJ,CAAC"}
@@ -4,10 +4,10 @@
4
4
  --badge-chip-margin-tweak: 0.15rem;
5
5
 
6
6
  /* Base badge styles using tokens */
7
- background-color: var(--intent-color, var(--badge-color-background));
7
+ background-color: var(--modifier-color, var(--badge-color-background));
8
8
  border-radius: var(--badge-border-radius);
9
9
  box-sizing: content-box;
10
- color: var(--intent-color-text, var(--badge-color-text));
10
+ color: var(--modifier-color-text, var(--badge-color-text));
11
11
  display: inline-block;
12
12
  font-size: var(--badge-font-size);
13
13
  font-weight: var(--badge-font-weight);
@@ -22,9 +22,9 @@
22
22
  display: inline-block;
23
23
  cursor: pointer;
24
24
 
25
- color: var(--intent-color-text, var(--button-color-text));
26
- background-color: var(--intent-color, var(--button-color-background));
27
- border-color: var(--intent-color-border, var(--button-color-border));
25
+ color: var(--modifier-color-text, var(--button-color-text));
26
+ background-color: var(--modifier-color, var(--button-color-background));
27
+ border-color: var(--modifier-color-border, var(--button-color-border));
28
28
  border-style: solid;
29
29
  border-width: var(--button-border-width);
30
30
  font-size: var(--button-font-size);
@@ -41,22 +41,22 @@
41
41
  /* component states */
42
42
  &:hover {
43
43
  background-color: var(
44
- --intent-color-hover,
44
+ --modifier-color-hover,
45
45
  var(--button-color-background-hover)
46
46
  );
47
47
  border-color: var(
48
- --intent-color-border-hover,
48
+ --modifier-color-border-hover,
49
49
  var(--button-color-border-hover)
50
50
  );
51
51
  }
52
52
 
53
53
  &:active {
54
54
  background-color: var(
55
- --intent-color-active,
55
+ --modifier-color-active,
56
56
  var(--button-color-background-active)
57
57
  );
58
58
  border-color: var(
59
- --intent-color-border-active,
59
+ --modifier-color-border-active,
60
60
  var(--button-color-border-active)
61
61
  );
62
62
  }
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Image, Section, ThumbnailSection } from "./common/index.js";
3
+ import "./styles.css";
4
+ const componentCssClassName = "ds card";
5
+ /**
6
+ * Card component
7
+ * @implements syntax:core:component:card:1.0.0
8
+ */
9
+ const Card = ({ className, children, emphasis = "neutral", ...props }) => (_jsx("div", { className: [componentCssClassName, emphasis, className]
10
+ .filter(Boolean)
11
+ .join(" "), ...props, children: children }));
12
+ Card.ThumbnailSection = ThumbnailSection;
13
+ Card.Image = Image;
14
+ Card.Section = Section;
15
+ export default Card;
16
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.js","sourceRoot":"","sources":["../../../../src/ui/Card/Card.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErE,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAExC;;;GAGG;AACH,MAAM,IAAI,GAAG,CAAC,EACZ,SAAS,EACT,QAAQ,EACR,QAAQ,GAAG,SAAS,EACpB,GAAG,KAAK,EACE,EAAsB,EAAE,CAAC,CACnC,cACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,QAAQ,EAAE,SAAS,CAAC;SACpD,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,GAAG,CAAC,KACR,KAAK,YAER,QAAQ,GACL,CACP,CAAC;AAEF,IAAI,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;AACzC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;AACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;AAEvB,eAAe,IAAI,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "./styles.css";
3
+ const componentCssClassName = "ds card-image";
4
+ /**
5
+ * Image component for Card
6
+ * Full-width image with content bleed (no padding)
7
+ * @returns {React.ReactElement} - Rendered Image
8
+ */
9
+ const Image = ({ className, alt, ...props }) => {
10
+ return (_jsx("img", { className: [componentCssClassName, className].filter(Boolean).join(" "), alt: alt, ...props }));
11
+ };
12
+ Image.displayName = "Card.Image";
13
+ export default Image;
14
+ //# sourceMappingURL=Image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Image/Image.tsx"],"names":[],"mappings":";AAIA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAE9C;;;;GAIG;AACH,MAAM,KAAK,GAAG,CAAC,EACb,SAAS,EACT,GAAG,EACH,GAAG,KAAK,EACG,EAAsB,EAAE;IACnC,OAAO,CACL,cACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,GAAG,EAAE,GAAG,KACJ,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,KAAK,CAAC,WAAW,GAAG,YAAY,CAAC;AAEjC,eAAe,KAAK,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as Image } from "./Image.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Image/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+
3
+ .ds.card-image {
4
+ display: block;
5
+ height: auto;
6
+ width: 100%;
7
+ }
@@ -0,0 +1,3 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Image/types.ts"],"names":[],"mappings":"AAAA,mDAAmD"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "./styles.css";
3
+ const componentCssClassName = "ds card-section";
4
+ /**
5
+ * Section component for Card
6
+ * @returns {React.ReactElement} - Rendered Section
7
+ */
8
+ const Section = ({ children, className, ...props }) => {
9
+ return (_jsx("section", { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: children }));
10
+ };
11
+ Section.displayName = "Card.Section";
12
+ export default Section;
13
+ //# sourceMappingURL=Section.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Section/Section.tsx"],"names":[],"mappings":";AAIA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEhD;;;GAGG;AACH,MAAM,OAAO,GAAG,CAAC,EACf,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACK,EAAsB,EAAE;IACrC,OAAO,CACL,kBACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,YAER,QAAQ,GACD,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,cAAc,CAAC;AAErC,eAAe,OAAO,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as Section } from "./Section.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Section/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,6 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+
3
+ .ds.card-section {
4
+ padding-block: var(--card-section-padding-vertical);
5
+ padding-inline: var(--card-section-padding-horizontal);
6
+ }
@@ -0,0 +1,3 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Section/types.ts"],"names":[],"mappings":"AAAA,mDAAmD"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Section from "../Section/Section.js";
3
+ import "./styles.css";
4
+ const componentCssClassName = "ds card-thumbnail-section";
5
+ /**
6
+ * ThumbnailSection component for Card thumbnails
7
+ * Extends Section behavior with thumbnail image
8
+ */
9
+ const ThumbnailSection = ({ className, imageProps, ...props }) => {
10
+ return (_jsx(Section, { className: [componentCssClassName, className].filter(Boolean).join(" "), ...props, children: _jsx("img", { alt: imageProps.alt, ...imageProps }) }));
11
+ };
12
+ ThumbnailSection.displayName = "Card.ThumbnailSection";
13
+ export default ThumbnailSection;
14
+ //# sourceMappingURL=ThumbnailSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThumbnailSection.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/ThumbnailSection/ThumbnailSection.tsx"],"names":[],"mappings":";AAGA,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAE5C,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,2BAA2B,CAAC;AAE1D;;;GAGG;AACH,MAAM,gBAAgB,GAAG,CAAC,EACxB,SAAS,EACT,UAAU,EACV,GAAG,KAAK,EACc,EAAsB,EAAE;IAC9C,OAAO,CACL,KAAC,OAAO,IACN,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,KACnE,KAAK,YAGT,cAAK,GAAG,EAAE,UAAU,CAAC,GAAG,KAAM,UAAU,GAAI,GACpC,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB,CAAC,WAAW,GAAG,uBAAuB,CAAC;AAEvD,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { default as ThumbnailSection } from "./ThumbnailSection.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/ThumbnailSection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+
3
+ .ds.card-thumbnail-section {
4
+ & > img {
5
+ max-height: var(--card-thumbnail-max-height);
6
+
7
+ /* TODO in Vanilla these are globally applied to all imgs, maybe we want to do that here as well */
8
+ max-width: 100%;
9
+ height: auto;
10
+ }
11
+ }
@@ -0,0 +1,3 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/ThumbnailSection/types.ts"],"names":[],"mappings":"AAAA,mDAAmD"}
@@ -0,0 +1,4 @@
1
+ export * from "./Image/index.js";
2
+ export * from "./Section/index.js";
3
+ export * from "./ThumbnailSection/index.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/Card/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,3 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+ export { default } from "./Card.js";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/Card/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AAEnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,23 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+
3
+ .ds.card {
4
+ /* prevent overflow of child margins */
5
+ overflow: auto;
6
+
7
+ box-shadow: var(--modifier-box-shadow, var(--card-box-shadow));
8
+ color: var(--modifier-color-text, var(--card-color-text));
9
+ background-color: var(--modifier-color, var(--card-color-background));
10
+ border-width: var(--card-border-width);
11
+ border-style: var(--card-border-style);
12
+ border-color: var(--card-section-separator-color);
13
+
14
+ & .card-section,
15
+ & .card-image {
16
+ /* Last section doesn't need a border (the Card itself has a border) */
17
+ &:not(:last-child) {
18
+ border-bottom: var(--card-section-separator-border-width)
19
+ var(--card-section-separator-border-style)
20
+ var(--card-section-separator-color);
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,3 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.2 */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/Card/types.ts"],"names":[],"mappings":"AAAA,mDAAmD"}
@@ -1,13 +1,13 @@
1
1
  /* @canonical/generator-canonical-ds 0.4.0-experimental.0 */
2
2
 
3
3
  .ds.chip {
4
- border-color: var(--intent-color-border, var(--chip-color-border));
4
+ border-color: var(--modifier-color-border, var(--chip-color-border));
5
5
  border-style: solid;
6
6
  border-radius: var(--chip-border-radius);
7
7
  border-width: var(--chip-border-width);
8
8
 
9
- color: var(--intent-color-text-tinted, var(--chip-color-text));
10
- background-color: var(--intent-color-tinted, var(--chip-color-background));
9
+ color: var(--modifier-color-text-tinted, var(--chip-color-text));
10
+ background-color: var(--modifier-color-tinted, var(--chip-color-background));
11
11
 
12
12
  display: inline-flex;
13
13
  align-items: baseline;
@@ -64,7 +64,7 @@
64
64
  &:hover:not(:has(.dismiss)),
65
65
  & > .dismiss:hover {
66
66
  background-color: var(
67
- --intent-color-tinted-hover,
67
+ --modifier-color-tinted-hover,
68
68
  var(--chip-color-background-hover)
69
69
  );
70
70
  }
@@ -72,7 +72,7 @@
72
72
  &:active:not(:has(.dismiss)),
73
73
  & > .dismiss:active {
74
74
  background-color: var(
75
- --intent-color-tinted-active,
75
+ --modifier-color-tinted-active,
76
76
  var(--chip-color-background-active)
77
77
  );
78
78
  }
@@ -2,15 +2,15 @@
2
2
 
3
3
  .ds.rule {
4
4
  background-color: var(
5
- --intent-separator-bar-color,
5
+ --modifier-separator-bar-color,
6
6
  var(--rule-color-background)
7
7
  );
8
8
  border-width: var(--rule-border-width);
9
- height: var(--intent-separator-bar-height, var(--rule-height));
9
+ height: var(--modifier-separator-bar-height, var(--rule-height));
10
10
  margin-block-start: var(--rule-margin-top);
11
11
  /* global modifiers can change the height of the rule. Subtract the actual height of the rule from the target height to keep baseline alignment */
12
12
  margin-block-end: calc(
13
13
  var(--rule-height-with-margin) -
14
- var(--intent-separator-bar-height, var(--rule-height))
14
+ var(--modifier-separator-bar-height, var(--rule-height))
15
15
  );
16
16
  }
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import "./styles.css";
3
+ const componentCssClassName = "ds skip-link";
4
+ /**
5
+ * The `SkipLink` component provides a way for users to quickly navigate to the main content of a page.
6
+ * It is typically used by keyboard and screen reader users to bypass repetitive navigation links
7
+ * and other elements that appear at the top of the page, pursuant to [WCAG 2.1 Success Criterion 2.4.1](https://www.w3.org/WAI/WCAG21/Understanding/bypass-blocks.html).
8
+ *
9
+ * `SkipLink` should be placed near the top of your document body, before the `<main>` element.
10
+ * The `<main>` element should have a `tabindex` of `-1` to prevent it from receiving focus from the keyboard without using the skip link.
11
+ *
12
+ * @implements syntax:core:component:skiplink:1.0.0
13
+ */
14
+ const SkipLink = ({ className, children, mainId = "main", ...props }) => {
15
+ const href = `#${mainId}`;
16
+ const skipLinkContents = children || "Skip to main content";
17
+ return (_jsx("a", { className: [componentCssClassName, className].filter(Boolean).join(" "), href: href, tabIndex: 0, ...props, children: skipLinkContents }));
18
+ };
19
+ export default SkipLink;
20
+ //# sourceMappingURL=SkipLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkipLink.js","sourceRoot":"","sources":["../../../../src/ui/SkipLink/SkipLink.tsx"],"names":[],"mappings":";AAIA,OAAO,cAAc,CAAC;AAEtB,MAAM,qBAAqB,GAAG,cAAc,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,QAAQ,GAAG,CAAC,EAChB,SAAS,EACT,QAAQ,EACR,MAAM,GAAG,MAAM,EACf,GAAG,KAAK,EACM,EAAsB,EAAE;IACtC,MAAM,IAAI,GAAG,IAAI,MAAM,EAAE,CAAC;IAC1B,MAAM,gBAAgB,GAAG,QAAQ,IAAI,sBAAsB,CAAC;IAE5D,OAAO,CACL,YACE,SAAS,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EACvE,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,KACP,KAAK,YAER,gBAAgB,GACf,CACL,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,4 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.4 */
2
+ export { default as SkipLink } from "./SkipLink.js";
3
+ export * from "./types.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/SkipLink/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AAEnD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,cAAc,YAAY,CAAC"}
@@ -0,0 +1,21 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.4 */
2
+
3
+ .ds.skip-link {
4
+ background: var(--skip-link-background);
5
+ color: var(--skip-link-color);
6
+ display: block;
7
+ inset-inline-start: var(--skip-link-inset-inline-start);
8
+ position: absolute;
9
+ top: var(--skip-link-top);
10
+
11
+ &:focus,
12
+ &:focus-visible {
13
+ inset-inline-start: var(--skip-link-focus-inset-inline-start);
14
+ outline-offset: var(--skip-link-outline-offset);
15
+ padding-block: var(--skip-link-focus-padding-block);
16
+ padding-inline: var(--skip-link-focus-padding-inline);
17
+ position: fixed;
18
+ top: var(--skip-link-focus-top);
19
+ z-index: var(--skip-link-focus-z-index);
20
+ }
21
+ }
@@ -0,0 +1,3 @@
1
+ /* @canonical/generator-ds 0.10.0-experimental.4 */
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/SkipLink/types.ts"],"names":[],"mappings":"AAAA,mDAAmD"}
@@ -32,15 +32,15 @@
32
32
  transparent;
33
33
 
34
34
  color: var(
35
- --intent-color-text,
35
+ --modifier-color-text,
36
36
  var(--tooltip-color-text, var(--color-text-default))
37
37
  );
38
38
  background-color: var(
39
- --intent-color,
39
+ --modifier-color,
40
40
  var(--tooltip-color-background, var(--color-background-default))
41
41
  );
42
42
  border-color: var(
43
- --intent-color-border,
43
+ --modifier-color-border,
44
44
  var(--tooltip-color-border, transparent)
45
45
  );
46
46
  border-style: solid;
@@ -1,8 +1,10 @@
1
1
  export * from "./Badge/index.js";
2
2
  export * from "./Button/index.js";
3
+ export * from "./Card/index.js";
3
4
  export * from "./Chip/index.js";
4
5
  export * from "./Icon/index.js";
5
6
  export * from "./Link/index.js";
6
7
  export * from "./Rule/index.js";
8
+ export * from "./SkipLink/index.js";
7
9
  export * from "./Tooltip/index.js";
8
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
@@ -1,3 +1,15 @@
1
- import type { ElementType } from "react";
1
+ import type { ElementType, ReactNode } from "react";
2
2
  export declare const rtl: () => (Story: ElementType) => import("react/jsx-runtime").JSX.Element;
3
+ export declare const grid: () => (Story: ElementType) => import("react/jsx-runtime").JSX.Element;
4
+ /**
5
+ * Places the story before a `<main>` element. This is useful for stories that need to be placed before the rest of the page contents in reading order (such as a skip link).
6
+ * @param id - The id of the main element
7
+ * @param children - Content to be rendered inside the main element
8
+ * @TODO this is the first decorator that seems like it may deserve a complex props object, and thus a separate Type.
9
+ * Should the type be declared separately? Should this be a separate file? Should the decorator be simplified somehow?
10
+ */
11
+ export declare const beforeMain: ({ id, children }: {
12
+ id?: string;
13
+ children?: ReactNode;
14
+ }) => (Story: ElementType) => import("react/jsx-runtime").JSX.Element;
3
15
  //# sourceMappingURL=decorators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/storybook/decorators.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC,eAAO,MAAM,GAAG,SAAU,OAAO,WAAW,4CAI3C,CAAC"}
1
+ {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/storybook/decorators.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEpD,eAAO,MAAM,GAAG,SAAU,OAAO,WAAW,4CAI3C,CAAC;AAEF,eAAO,MAAM,IAAI,SAAU,OAAO,WAAW,4CAU5C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACpB,kBAA2B;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,MAChE,OAAO,WAAW,4CAOlB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type React from "react";
2
+ import type { CardProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * Card component
6
+ * @implements syntax:core:component:card:1.0.0
7
+ */
8
+ declare const Card: {
9
+ ({ className, children, emphasis, ...props }: CardProps): React.ReactElement;
10
+ ThumbnailSection: {
11
+ ({ className, imageProps, ...props }: import("./common/index.js").ThumbnailSectionProps): React.ReactElement;
12
+ displayName: string;
13
+ };
14
+ Image: {
15
+ ({ className, alt, ...props }: import("./common/index.js").ImageProps): React.ReactElement;
16
+ displayName: string;
17
+ };
18
+ Section: {
19
+ ({ children, className, ...props }: import("./common/index.js").SectionProps): React.ReactElement;
20
+ displayName: string;
21
+ };
22
+ };
23
+ export default Card;
24
+ //# sourceMappingURL=Card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../src/ui/Card/Card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,cAAc,CAAC;AAItB;;;GAGG;AACH,QAAA,MAAM,IAAI;kDAKP,SAAS,GAAG,KAAK,CAAC,YAAY;;;;;;;;;;;;;CAShC,CAAC;AAMF,eAAe,IAAI,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type React from "react";
2
+ import type { ImageProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * Image component for Card
6
+ * Full-width image with content bleed (no padding)
7
+ * @returns {React.ReactElement} - Rendered Image
8
+ */
9
+ declare const Image: {
10
+ ({ className, alt, ...props }: ImageProps): React.ReactElement;
11
+ displayName: string;
12
+ };
13
+ export default Image;
14
+ //# sourceMappingURL=Image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Image/Image.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,cAAc,CAAC;AAItB;;;;GAIG;AACH,QAAA,MAAM,KAAK;mCAIR,UAAU,GAAG,KAAK,CAAC,YAAY;;CAQjC,CAAC;AAIF,eAAe,KAAK,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as Image } from "./Image.js";
2
+ export type * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Image/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { ImgHTMLAttributes } from "react";
2
+ export interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
3
+ className?: string;
4
+ }
5
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Image/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,MAAM,WAAW,UAAW,SAAQ,iBAAiB,CAAC,gBAAgB,CAAC;IAErE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,13 @@
1
+ import type React from "react";
2
+ import type { SectionProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * Section component for Card
6
+ * @returns {React.ReactElement} - Rendered Section
7
+ */
8
+ declare const Section: {
9
+ ({ children, className, ...props }: SectionProps): React.ReactElement;
10
+ displayName: string;
11
+ };
12
+ export default Section;
13
+ //# sourceMappingURL=Section.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Section.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Section/Section.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,cAAc,CAAC;AAItB;;;GAGG;AACH,QAAA,MAAM,OAAO;wCAIV,YAAY,GAAG,KAAK,CAAC,YAAY;;CASnC,CAAC;AAIF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as Section } from "./Section.js";
2
+ export type * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Section/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ export interface SectionProps extends HTMLAttributes<HTMLElement> {
3
+ children: ReactNode;
4
+ className?: string;
5
+ }
6
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/Section/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,WAAW,YAAa,SAAQ,cAAc,CAAC,WAAW,CAAC;IAE/D,QAAQ,EAAE,SAAS,CAAC;IAEpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,13 @@
1
+ import type React from "react";
2
+ import type { ThumbnailSectionProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * ThumbnailSection component for Card thumbnails
6
+ * Extends Section behavior with thumbnail image
7
+ */
8
+ declare const ThumbnailSection: {
9
+ ({ className, imageProps, ...props }: ThumbnailSectionProps): React.ReactElement;
10
+ displayName: string;
11
+ };
12
+ export default ThumbnailSection;
13
+ //# sourceMappingURL=ThumbnailSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThumbnailSection.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/ThumbnailSection/ThumbnailSection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,cAAc,CAAC;AAItB;;;GAGG;AACH,QAAA,MAAM,gBAAgB;0CAInB,qBAAqB,GAAG,KAAK,CAAC,YAAY;;CAU5C,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as ThumbnailSection } from "./ThumbnailSection.js";
2
+ export type * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/ThumbnailSection/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACpE,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ImgHTMLAttributes } from "react";
2
+ import type { SectionProps } from "../Section/index.js";
3
+ export interface ThumbnailSectionProps extends Omit<SectionProps, "children"> {
4
+ /** Additional class name(s) to apply to the component */
5
+ className?: string;
6
+ /**
7
+ * Props for the thumbnail image element
8
+ * TODO this should always include `alt` for accessibility, and this is likely to be repeated across the DS - should this type + `alt` requirement be extracted to ds-types packages?
9
+ */
10
+ imageProps: ImgHTMLAttributes<HTMLImageElement>;
11
+ }
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/Card/common/ThumbnailSection/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC;IAC3E,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,UAAU,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;CACjD"}
@@ -0,0 +1,4 @@
1
+ export * from "./Image/index.js";
2
+ export * from "./Section/index.js";
3
+ export * from "./ThumbnailSection/index.js";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Card/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default } from "./Card.js";
2
+ export type * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/Card/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,mBAAmB,YAAY,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ModifierFamily } from "@canonical/ds-types";
2
+ import type { HTMLAttributes } from "react";
3
+ export interface CardProps extends HTMLAttributes<HTMLDivElement> {
4
+ /**
5
+ * TODO we need to verify with DS ontology group whether it is expected that a component consume ALL of a modifier family
6
+ * Card in vanilla does not currently support the "muted" or "accented" emphasis modifiers.
7
+ */
8
+ emphasis?: ModifierFamily<"emphasis">;
9
+ }
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/Card/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC,UAAU,CAAC,CAAC;CACvC"}
@@ -0,0 +1,16 @@
1
+ import type React from "react";
2
+ import type { SkipLinkProps } from "./types.js";
3
+ import "./styles.css";
4
+ /**
5
+ * The `SkipLink` component provides a way for users to quickly navigate to the main content of a page.
6
+ * It is typically used by keyboard and screen reader users to bypass repetitive navigation links
7
+ * and other elements that appear at the top of the page, pursuant to [WCAG 2.1 Success Criterion 2.4.1](https://www.w3.org/WAI/WCAG21/Understanding/bypass-blocks.html).
8
+ *
9
+ * `SkipLink` should be placed near the top of your document body, before the `<main>` element.
10
+ * The `<main>` element should have a `tabindex` of `-1` to prevent it from receiving focus from the keyboard without using the skip link.
11
+ *
12
+ * @implements syntax:core:component:skiplink:1.0.0
13
+ */
14
+ declare const SkipLink: ({ className, children, mainId, ...props }: SkipLinkProps) => React.ReactElement;
15
+ export default SkipLink;
16
+ //# sourceMappingURL=SkipLink.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SkipLink.d.ts","sourceRoot":"","sources":["../../../../src/ui/SkipLink/SkipLink.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,cAAc,CAAC;AAItB;;;;;;;;;GASG;AACH,QAAA,MAAM,QAAQ,GAAI,2CAKf,aAAa,KAAG,KAAK,CAAC,YAcxB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { default as SkipLink } from "./SkipLink.js";
2
+ export * from "./types.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/SkipLink/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AACpD,cAAc,YAAY,CAAC"}
@@ -0,0 +1,16 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ /**
3
+ We have used the `HTMLDivElement` as a default props base.
4
+ If your component is based on a different HTML element, please update it accordingly.
5
+ See https://developer.mozilla.org/en-US/docs/Web/API/HTML_DOM_API for a full list of HTML elements interfaces.
6
+ */
7
+ export interface SkipLinkProps extends Omit<HTMLAttributes<HTMLAnchorElement>, "href" | "tabIndex"> {
8
+ /** The contents of the skip link itself */
9
+ children?: ReactNode;
10
+ /**
11
+ * ID of the main content element
12
+ * @default "main"
13
+ * */
14
+ mainId?: string;
15
+ }
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/SkipLink/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD;;;;EAIE;AACF,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACpE,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;SAGK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1,8 +1,10 @@
1
1
  export * from "./Badge/index.js";
2
2
  export * from "./Button/index.js";
3
+ export * from "./Card/index.js";
3
4
  export * from "./Chip/index.js";
4
5
  export * from "./Icon/index.js";
5
6
  export * from "./Link/index.js";
6
7
  export * from "./Rule/index.js";
8
+ export * from "./SkipLink/index.js";
7
9
  export * from "./Tooltip/index.js";
8
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canonical/react-ds-core",
3
- "version": "0.10.0-experimental.4",
3
+ "version": "0.10.0-experimental.5",
4
4
  "type": "module",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -38,9 +38,9 @@
38
38
  "test:vitest:watch": "vitest"
39
39
  },
40
40
  "dependencies": {
41
- "@canonical/ds-assets": "^0.10.0-experimental.4",
42
- "@canonical/storybook-config": "^0.10.0-experimental.4",
43
- "@canonical/styles": "^0.10.0-experimental.4",
41
+ "@canonical/ds-assets": "^0.10.0-experimental.5",
42
+ "@canonical/storybook-config": "^0.10.0-experimental.5",
43
+ "@canonical/styles": "^0.10.0-experimental.5",
44
44
  "@canonical/utils": "^0.10.0-experimental.4",
45
45
  "react": "^19.1.0",
46
46
  "react-dom": "^19.1.0"
@@ -66,5 +66,5 @@
66
66
  "vite-tsconfig-paths": "^5.1.4",
67
67
  "vitest": "^3.2.3"
68
68
  },
69
- "gitHead": "2c35cfbe5527808f3d612a1c683da1b113861e3d"
69
+ "gitHead": "467161a7c642004bf423a62ca1e76e0e31f568c3"
70
70
  }