@cognite/aura 1.48020.0 → 1.48084.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/DESIGN.md CHANGED
@@ -1001,6 +1001,7 @@ When a component has a guidance file, treat it as the primary reference and its
1001
1001
 
1002
1002
  **Storybook-slug:** accordion
1003
1003
  **Docs-slug:** accordion
1004
+ **Full guidance:** [accordion.md](./src/components/ui/core/accordion/accordion.md)
1004
1005
 
1005
1006
  **Definition**
1006
1007
  Accordion reveals and hides grouped content sections to reduce cognitive load and page density.
@@ -1284,6 +1285,7 @@ Visually joins related buttons into a connected row, clarifying that the actions
1284
1285
 
1285
1286
  **Storybook-slug:** card
1286
1287
  **Docs-slug:** card
1288
+ **Full guidance:** [card.md](./src/components/ui/core/card/card.md)
1287
1289
 
1288
1290
  **Definition**
1289
1291
  A structural container with optional header, body, and footer slots for displaying data artifacts, widgets, or media. The Card with Count variant adds a numeric indicator to the header.
@@ -1707,6 +1709,7 @@ Single-line text field for capturing short text-based information in forms and t
1707
1709
 
1708
1710
  **Storybook-slug:** item
1709
1711
  **Docs-slug:** item
1712
+ **Full guidance:** [item.md](./src/components/ui/core/item/item.md)
1710
1713
 
1711
1714
  **Definition**
1712
1715
  A flexible list-row primitive for displaying a title, optional description, leading media, and trailing actions. Composes into groups for lists, trees, cards, and popovers.
@@ -1848,6 +1851,7 @@ Divides large datasets into pages, giving users control over navigation and impr
1848
1851
 
1849
1852
  **Storybook-slug:** popover
1850
1853
  **Docs-slug:** popover
1854
+ **Full guidance:** [popover.md](./src/components/ui/core/popover/popover.md)
1851
1855
 
1852
1856
  **Definition**
1853
1857
  A click-triggered panel for interactive or structured supplemental content. Stays open until dismissed.
@@ -0,0 +1,2 @@
1
+ import type { ReactElement } from "react";
2
+ export declare function AccordionGallery(): ReactElement;
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./accordion.js";
3
+ export function AccordionGallery() {
4
+ return /*#__PURE__*/ _jsxs(Accordion, {
5
+ type: "single",
6
+ collapsible: true,
7
+ className: "w-100 max-w-full",
8
+ children: [
9
+ /*#__PURE__*/ _jsxs(AccordionItem, {
10
+ value: "item-1",
11
+ children: [
12
+ /*#__PURE__*/ _jsx(AccordionTrigger, {
13
+ children: "Is it accessible?"
14
+ }),
15
+ /*#__PURE__*/ _jsx(AccordionContent, {
16
+ children: "Yes. It adheres to the WAI-ARIA design pattern."
17
+ })
18
+ ]
19
+ }),
20
+ /*#__PURE__*/ _jsxs(AccordionItem, {
21
+ value: "item-2",
22
+ children: [
23
+ /*#__PURE__*/ _jsx(AccordionTrigger, {
24
+ children: "Is it styled?"
25
+ }),
26
+ /*#__PURE__*/ _jsx(AccordionContent, {
27
+ children: "Yes. It comes with default styles that match your theme."
28
+ })
29
+ ]
30
+ }),
31
+ /*#__PURE__*/ _jsxs(AccordionItem, {
32
+ value: "item-3",
33
+ children: [
34
+ /*#__PURE__*/ _jsx(AccordionTrigger, {
35
+ children: "Is it animated?"
36
+ }),
37
+ /*#__PURE__*/ _jsx(AccordionContent, {
38
+ children: "Yes. It uses smooth transitions for opening and closing."
39
+ })
40
+ ]
41
+ })
42
+ ]
43
+ });
44
+ }
45
+
46
+ //# sourceMappingURL=accordion.gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/accordion/accordion.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport {\n Accordion,\n AccordionContent,\n AccordionItem,\n AccordionTrigger,\n} from './accordion';\n\nexport function AccordionGallery(): ReactElement {\n return (\n <Accordion type=\"single\" collapsible className=\"w-100 max-w-full\">\n <AccordionItem value=\"item-1\">\n <AccordionTrigger>Is it accessible?</AccordionTrigger>\n <AccordionContent>\n Yes. It adheres to the WAI-ARIA design pattern.\n </AccordionContent>\n </AccordionItem>\n <AccordionItem value=\"item-2\">\n <AccordionTrigger>Is it styled?</AccordionTrigger>\n <AccordionContent>\n Yes. It comes with default styles that match your theme.\n </AccordionContent>\n </AccordionItem>\n <AccordionItem value=\"item-3\">\n <AccordionTrigger>Is it animated?</AccordionTrigger>\n <AccordionContent>\n Yes. It uses smooth transitions for opening and closing.\n </AccordionContent>\n </AccordionItem>\n </Accordion>\n );\n}\n"],"names":["Accordion","AccordionContent","AccordionItem","AccordionTrigger","AccordionGallery","type","collapsible","className","value"],"mappings":";AAEA,SACEA,SAAS,EACTC,gBAAgB,EAChBC,aAAa,EACbC,gBAAgB,QACX,iBAAc;AAErB,OAAO,SAASC;IACd,qBACE,MAACJ;QAAUK,MAAK;QAASC,WAAW;QAACC,WAAU;;0BAC7C,MAACL;gBAAcM,OAAM;;kCACnB,KAACL;kCAAiB;;kCAClB,KAACF;kCAAiB;;;;0BAIpB,MAACC;gBAAcM,OAAM;;kCACnB,KAACL;kCAAiB;;kCAClB,KAACF;kCAAiB;;;;0BAIpB,MAACC;gBAAcM,OAAM;;kCACnB,KAACL;kCAAiB;;kCAClB,KAACF;kCAAiB;;;;;;AAM1B"}
@@ -0,0 +1,2 @@
1
+ import type { ReactElement } from "react";
2
+ export declare function CardGallery(): ReactElement;
@@ -0,0 +1,66 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconCube, IconDotsVertical } from "@tabler/icons-react";
3
+ import { Avatar, AvatarIcon } from "../avatar/avatar.js";
4
+ import { Button } from "../button/button.js";
5
+ import { Card, CardContent, CardDescription, CardFooter, CardFooterEnd, CardFooterStart, CardHeader, CardHeaderCenter, CardHeaderEnd, CardHeaderStart, CardTitle } from "./card.js";
6
+ export function CardGallery() {
7
+ return /*#__PURE__*/ _jsxs(Card, {
8
+ className: "w-[440px] max-w-full",
9
+ children: [
10
+ /*#__PURE__*/ _jsxs(CardHeader, {
11
+ children: [
12
+ /*#__PURE__*/ _jsx(CardHeaderStart, {
13
+ children: /*#__PURE__*/ _jsx(Avatar, {
14
+ variant: "overflow",
15
+ "aria-label": "Card leading icon",
16
+ className: "rounded-lg",
17
+ children: /*#__PURE__*/ _jsx(AvatarIcon, {
18
+ children: /*#__PURE__*/ _jsx(IconCube, {})
19
+ })
20
+ })
21
+ }),
22
+ /*#__PURE__*/ _jsxs(CardHeaderCenter, {
23
+ children: [
24
+ /*#__PURE__*/ _jsx(CardTitle, {
25
+ children: "Title"
26
+ }),
27
+ /*#__PURE__*/ _jsx(CardDescription, {
28
+ children: "Subtitle"
29
+ })
30
+ ]
31
+ }),
32
+ /*#__PURE__*/ _jsx(CardHeaderEnd, {
33
+ children: /*#__PURE__*/ _jsx(Button, {
34
+ variant: "ghost",
35
+ size: "icon-sm",
36
+ "aria-label": "More options",
37
+ children: /*#__PURE__*/ _jsx(IconDotsVertical, {
38
+ className: "size-4"
39
+ })
40
+ })
41
+ })
42
+ ]
43
+ }),
44
+ /*#__PURE__*/ _jsx(CardContent, {
45
+ children: /*#__PURE__*/ _jsx("div", {
46
+ className: "w-full h-44 bg-muted-background rounded flex items-center justify-center text-secondary-foreground text-sm",
47
+ children: "Main content slot"
48
+ })
49
+ }),
50
+ /*#__PURE__*/ _jsxs(CardFooter, {
51
+ children: [
52
+ /*#__PURE__*/ _jsx(CardFooterStart, {}),
53
+ /*#__PURE__*/ _jsx(CardFooterEnd, {
54
+ children: /*#__PURE__*/ _jsx(Button, {
55
+ variant: "outline",
56
+ size: "sm",
57
+ children: "Button"
58
+ })
59
+ })
60
+ ]
61
+ })
62
+ ]
63
+ });
64
+ }
65
+
66
+ //# sourceMappingURL=card.gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/card/card.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { IconCube, IconDotsVertical } from '@tabler/icons-react';\n\nimport { Avatar, AvatarIcon } from '../avatar/avatar';\nimport { Button } from '../button/button';\n\nimport {\n Card,\n CardContent,\n CardDescription,\n CardFooter,\n CardFooterEnd,\n CardFooterStart,\n CardHeader,\n CardHeaderCenter,\n CardHeaderEnd,\n CardHeaderStart,\n CardTitle,\n} from './card';\n\nexport function CardGallery(): ReactElement {\n return (\n <Card className=\"w-[440px] max-w-full\">\n <CardHeader>\n <CardHeaderStart>\n <Avatar\n variant=\"overflow\"\n aria-label=\"Card leading icon\"\n className=\"rounded-lg\"\n >\n <AvatarIcon>\n <IconCube />\n </AvatarIcon>\n </Avatar>\n </CardHeaderStart>\n <CardHeaderCenter>\n <CardTitle>Title</CardTitle>\n <CardDescription>Subtitle</CardDescription>\n </CardHeaderCenter>\n <CardHeaderEnd>\n <Button variant=\"ghost\" size=\"icon-sm\" aria-label=\"More options\">\n <IconDotsVertical className=\"size-4\" />\n </Button>\n </CardHeaderEnd>\n </CardHeader>\n <CardContent>\n <div className=\"w-full h-44 bg-muted-background rounded flex items-center justify-center text-secondary-foreground text-sm\">\n Main content slot\n </div>\n </CardContent>\n <CardFooter>\n <CardFooterStart />\n <CardFooterEnd>\n <Button variant=\"outline\" size=\"sm\">\n Button\n </Button>\n </CardFooterEnd>\n </CardFooter>\n </Card>\n );\n}\n"],"names":["IconCube","IconDotsVertical","Avatar","AvatarIcon","Button","Card","CardContent","CardDescription","CardFooter","CardFooterEnd","CardFooterStart","CardHeader","CardHeaderCenter","CardHeaderEnd","CardHeaderStart","CardTitle","CardGallery","className","variant","aria-label","size","div"],"mappings":";AAEA,SAASA,QAAQ,EAAEC,gBAAgB,QAAQ,sBAAsB;AAEjE,SAASC,MAAM,EAAEC,UAAU,QAAQ,sBAAmB;AACtD,SAASC,MAAM,QAAQ,sBAAmB;AAE1C,SACEC,IAAI,EACJC,WAAW,EACXC,eAAe,EACfC,UAAU,EACVC,aAAa,EACbC,eAAe,EACfC,UAAU,EACVC,gBAAgB,EAChBC,aAAa,EACbC,eAAe,EACfC,SAAS,QACJ,YAAS;AAEhB,OAAO,SAASC;IACd,qBACE,MAACX;QAAKY,WAAU;;0BACd,MAACN;;kCACC,KAACG;kCACC,cAAA,KAACZ;4BACCgB,SAAQ;4BACRC,cAAW;4BACXF,WAAU;sCAEV,cAAA,KAACd;0CACC,cAAA,KAACH;;;;kCAIP,MAACY;;0CACC,KAACG;0CAAU;;0CACX,KAACR;0CAAgB;;;;kCAEnB,KAACM;kCACC,cAAA,KAACT;4BAAOc,SAAQ;4BAAQE,MAAK;4BAAUD,cAAW;sCAChD,cAAA,KAAClB;gCAAiBgB,WAAU;;;;;;0BAIlC,KAACX;0BACC,cAAA,KAACe;oBAAIJ,WAAU;8BAA6G;;;0BAI9H,MAACT;;kCACC,KAACE;kCACD,KAACD;kCACC,cAAA,KAACL;4BAAOc,SAAQ;4BAAUE,MAAK;sCAAK;;;;;;;AAO9C"}
@@ -0,0 +1,2 @@
1
+ import type { ReactElement } from "react";
2
+ export declare function ItemGallery(): ReactElement;
@@ -0,0 +1,65 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { IconFolder } from "@tabler/icons-react";
3
+ import { Item, ItemContent, ItemDescription, ItemGroup, ItemMedia, ItemTitle } from "./item.js";
4
+ export function ItemGallery() {
5
+ return /*#__PURE__*/ _jsxs(ItemGroup, {
6
+ className: "w-83 max-w-full",
7
+ children: [
8
+ /*#__PURE__*/ _jsxs(Item, {
9
+ children: [
10
+ /*#__PURE__*/ _jsx(ItemMedia, {
11
+ children: /*#__PURE__*/ _jsx(IconFolder, {})
12
+ }),
13
+ /*#__PURE__*/ _jsxs(ItemContent, {
14
+ children: [
15
+ /*#__PURE__*/ _jsx(ItemTitle, {
16
+ children: "Default"
17
+ }),
18
+ /*#__PURE__*/ _jsx(ItemDescription, {
19
+ children: "Transparent background"
20
+ })
21
+ ]
22
+ })
23
+ ]
24
+ }),
25
+ /*#__PURE__*/ _jsxs(Item, {
26
+ selected: true,
27
+ children: [
28
+ /*#__PURE__*/ _jsx(ItemMedia, {
29
+ children: /*#__PURE__*/ _jsx(IconFolder, {})
30
+ }),
31
+ /*#__PURE__*/ _jsxs(ItemContent, {
32
+ children: [
33
+ /*#__PURE__*/ _jsx(ItemTitle, {
34
+ children: "Selected"
35
+ }),
36
+ /*#__PURE__*/ _jsx(ItemDescription, {
37
+ children: "Secondary background"
38
+ })
39
+ ]
40
+ })
41
+ ]
42
+ }),
43
+ /*#__PURE__*/ _jsxs(Item, {
44
+ disabled: true,
45
+ children: [
46
+ /*#__PURE__*/ _jsx(ItemMedia, {
47
+ children: /*#__PURE__*/ _jsx(IconFolder, {})
48
+ }),
49
+ /*#__PURE__*/ _jsxs(ItemContent, {
50
+ children: [
51
+ /*#__PURE__*/ _jsx(ItemTitle, {
52
+ children: "Disabled"
53
+ }),
54
+ /*#__PURE__*/ _jsx(ItemDescription, {
55
+ children: "Disabled foreground token"
56
+ })
57
+ ]
58
+ })
59
+ ]
60
+ })
61
+ ]
62
+ });
63
+ }
64
+
65
+ //# sourceMappingURL=item.gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/item/item.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { IconFolder } from '@tabler/icons-react';\n\nimport {\n Item,\n ItemContent,\n ItemDescription,\n ItemGroup,\n ItemMedia,\n ItemTitle,\n} from './item';\n\nexport function ItemGallery(): ReactElement {\n return (\n <ItemGroup className=\"w-83 max-w-full\">\n <Item>\n <ItemMedia>\n <IconFolder />\n </ItemMedia>\n <ItemContent>\n <ItemTitle>Default</ItemTitle>\n <ItemDescription>Transparent background</ItemDescription>\n </ItemContent>\n </Item>\n <Item selected>\n <ItemMedia>\n <IconFolder />\n </ItemMedia>\n <ItemContent>\n <ItemTitle>Selected</ItemTitle>\n <ItemDescription>Secondary background</ItemDescription>\n </ItemContent>\n </Item>\n <Item disabled>\n <ItemMedia>\n <IconFolder />\n </ItemMedia>\n <ItemContent>\n <ItemTitle>Disabled</ItemTitle>\n <ItemDescription>Disabled foreground token</ItemDescription>\n </ItemContent>\n </Item>\n </ItemGroup>\n );\n}\n"],"names":["IconFolder","Item","ItemContent","ItemDescription","ItemGroup","ItemMedia","ItemTitle","ItemGallery","className","selected","disabled"],"mappings":";AAEA,SAASA,UAAU,QAAQ,sBAAsB;AAEjD,SACEC,IAAI,EACJC,WAAW,EACXC,eAAe,EACfC,SAAS,EACTC,SAAS,EACTC,SAAS,QACJ,YAAS;AAEhB,OAAO,SAASC;IACd,qBACE,MAACH;QAAUI,WAAU;;0BACnB,MAACP;;kCACC,KAACI;kCACC,cAAA,KAACL;;kCAEH,MAACE;;0CACC,KAACI;0CAAU;;0CACX,KAACH;0CAAgB;;;;;;0BAGrB,MAACF;gBAAKQ,QAAQ;;kCACZ,KAACJ;kCACC,cAAA,KAACL;;kCAEH,MAACE;;0CACC,KAACI;0CAAU;;0CACX,KAACH;0CAAgB;;;;;;0BAGrB,MAACF;gBAAKS,QAAQ;;kCACZ,KAACL;kCACC,cAAA,KAACL;;kCAEH,MAACE;;0CACC,KAACI;0CAAU;;0CACX,KAACH;0CAAgB;;;;;;;;AAK3B"}
@@ -0,0 +1,2 @@
1
+ import type { ReactElement } from "react";
2
+ export declare function PopoverGallery(): ReactElement;
@@ -0,0 +1,46 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from "../button/button.js";
3
+ import { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger } from "./popover.js";
4
+ export function PopoverGallery() {
5
+ return /*#__PURE__*/ _jsx("div", {
6
+ className: "flex items-center justify-center p-12",
7
+ children: /*#__PURE__*/ _jsxs(Popover, {
8
+ children: [
9
+ /*#__PURE__*/ _jsx(PopoverTrigger, {
10
+ render: /*#__PURE__*/ _jsx(Button, {
11
+ children: "Open Popover"
12
+ })
13
+ }),
14
+ /*#__PURE__*/ _jsxs(PopoverContent, {
15
+ "aria-label": "Getting started",
16
+ children: [
17
+ /*#__PURE__*/ _jsxs(PopoverHeader, {
18
+ children: [
19
+ /*#__PURE__*/ _jsxs(PopoverHeaderContent, {
20
+ children: [
21
+ /*#__PURE__*/ _jsx(PopoverTitle, {
22
+ children: "Getting started"
23
+ }),
24
+ /*#__PURE__*/ _jsx(PopoverClose, {})
25
+ ]
26
+ }),
27
+ /*#__PURE__*/ _jsx(PopoverDescription, {
28
+ children: "This popover provides helpful information and guidance to help you understand key features and workflows."
29
+ })
30
+ ]
31
+ }),
32
+ /*#__PURE__*/ _jsx(PopoverSlot, {
33
+ children: /*#__PURE__*/ _jsx(Button, {
34
+ variant: "outline",
35
+ size: "sm",
36
+ children: "Explore"
37
+ })
38
+ })
39
+ ]
40
+ })
41
+ ]
42
+ })
43
+ });
44
+ }
45
+
46
+ //# sourceMappingURL=popover.gallery.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/components/ui/core/popover/popover.gallery.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { Button } from '../button/button';\n\nimport {\n Popover,\n PopoverClose,\n PopoverContent,\n PopoverDescription,\n PopoverHeader,\n PopoverHeaderContent,\n PopoverSlot,\n PopoverTitle,\n PopoverTrigger,\n} from './popover';\n\nexport function PopoverGallery(): ReactElement {\n return (\n <div className=\"flex items-center justify-center p-12\">\n <Popover>\n <PopoverTrigger render={<Button>Open Popover</Button>} />\n <PopoverContent aria-label=\"Getting started\">\n <PopoverHeader>\n <PopoverHeaderContent>\n <PopoverTitle>Getting started</PopoverTitle>\n <PopoverClose />\n </PopoverHeaderContent>\n <PopoverDescription>\n This popover provides helpful information and guidance to help you\n understand key features and workflows.\n </PopoverDescription>\n </PopoverHeader>\n <PopoverSlot>\n <Button variant=\"outline\" size=\"sm\">\n Explore\n </Button>\n </PopoverSlot>\n </PopoverContent>\n </Popover>\n </div>\n );\n}\n"],"names":["Button","Popover","PopoverClose","PopoverContent","PopoverDescription","PopoverHeader","PopoverHeaderContent","PopoverSlot","PopoverTitle","PopoverTrigger","PopoverGallery","div","className","render","aria-label","variant","size"],"mappings":";AAEA,SAASA,MAAM,QAAQ,sBAAmB;AAE1C,SACEC,OAAO,EACPC,YAAY,EACZC,cAAc,EACdC,kBAAkB,EAClBC,aAAa,EACbC,oBAAoB,EACpBC,WAAW,EACXC,YAAY,EACZC,cAAc,QACT,eAAY;AAEnB,OAAO,SAASC;IACd,qBACE,KAACC;QAAIC,WAAU;kBACb,cAAA,MAACX;;8BACC,KAACQ;oBAAeI,sBAAQ,KAACb;kCAAO;;;8BAChC,MAACG;oBAAeW,cAAW;;sCACzB,MAACT;;8CACC,MAACC;;sDACC,KAACE;sDAAa;;sDACd,KAACN;;;8CAEH,KAACE;8CAAmB;;;;sCAKtB,KAACG;sCACC,cAAA,KAACP;gCAAOe,SAAQ;gCAAUC,MAAK;0CAAK;;;;;;;;AAQhD"}