@canonical/react-ds-app-portal 0.15.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 +40 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/Button/Button.js +10 -0
- package/dist/esm/lib/Button/Button.js.map +1 -0
- package/dist/esm/lib/Button/index.js +2 -0
- package/dist/esm/lib/Button/index.js.map +1 -0
- package/dist/esm/lib/Button/styles.css +63 -0
- package/dist/esm/lib/Button/types.js +12 -0
- package/dist/esm/lib/Button/types.js.map +1 -0
- package/dist/esm/lib/index.js +2 -0
- package/dist/esm/lib/index.js.map +1 -0
- package/dist/esm/ui/Button/Button.js +10 -0
- package/dist/esm/ui/Button/Button.js.map +1 -0
- package/dist/esm/ui/Button/index.js +2 -0
- package/dist/esm/ui/Button/index.js.map +1 -0
- package/dist/esm/ui/Button/styles.css +63 -0
- package/dist/esm/ui/Button/types.js +12 -0
- package/dist/esm/ui/Button/types.js.map +1 -0
- package/dist/esm/ui/index.js +2 -0
- package/dist/esm/ui/index.js.map +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/lib/Button/Button.d.ts +6 -0
- package/dist/types/lib/Button/Button.d.ts.map +1 -0
- package/dist/types/lib/Button/index.d.ts +3 -0
- package/dist/types/lib/Button/index.d.ts.map +1 -0
- package/dist/types/lib/Button/types.d.ts +18 -0
- package/dist/types/lib/Button/types.d.ts.map +1 -0
- package/dist/types/lib/index.d.ts +2 -0
- package/dist/types/lib/index.d.ts.map +1 -0
- package/dist/types/ui/Button/Button.d.ts +6 -0
- package/dist/types/ui/Button/Button.d.ts.map +1 -0
- package/dist/types/ui/Button/index.d.ts +3 -0
- package/dist/types/ui/Button/index.d.ts.map +1 -0
- package/dist/types/ui/Button/types.d.ts +18 -0
- package/dist/types/ui/Button/types.d.ts.map +1 -0
- package/dist/types/ui/index.d.ts +2 -0
- package/dist/types/ui/index.d.ts.map +1 -0
- package/package.json +73 -0
package/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# @canonical/react-ds-app-portal
|
|
2
|
+
|
|
3
|
+
Portal-specific components for the Pragma design system. This package provides specialized UI elements for the Portal application tier.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- React 19 or higher
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
bun add @canonical/react-ds-app-portal
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
The package builds on top of `@canonical/react-ds-global`.
|
|
16
|
+
|
|
17
|
+
## Usage
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { Button } from "@canonical/react-ds-app-portal";
|
|
21
|
+
|
|
22
|
+
function AppHeader() {
|
|
23
|
+
return (
|
|
24
|
+
<header>
|
|
25
|
+
<Button>Settings</Button>
|
|
26
|
+
</header>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Storybook
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cd packages/react/ds-app-portal
|
|
35
|
+
bun run storybook
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Component Specifications
|
|
39
|
+
|
|
40
|
+
Component specifications are defined in the [Design System Ontology](https://github.com/canonical/design-system).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
/** Buttons are clickable elements used to perform an action. */
|
|
4
|
+
const Button = ({ id, className, children, style, appearance, ...props }) => {
|
|
5
|
+
return (_jsx("button", { id: id, className: ["ds", "button", appearance, className]
|
|
6
|
+
.filter(Boolean)
|
|
7
|
+
.join(" "), style: style, "aria-label": props["aria-label"] || children?.toString(), ...props, children: children }));
|
|
8
|
+
};
|
|
9
|
+
export default Button;
|
|
10
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* component styles */
|
|
2
|
+
|
|
3
|
+
/* component variables
|
|
4
|
+
--button-color-background: background color of the button
|
|
5
|
+
--button-color-background-hover: background color of the button on hover
|
|
6
|
+
--button-color-background-active: background color of the button on active
|
|
7
|
+
--button-color-text: text color of the button
|
|
8
|
+
--button-color-border: border color of the button
|
|
9
|
+
--button-color-border-hover: border color of the button on hover
|
|
10
|
+
--button-color-border-active: border color of the button on active
|
|
11
|
+
|
|
12
|
+
--button-margin-left: left margin of the button
|
|
13
|
+
--button-margin-bottom: bottom margin of the button
|
|
14
|
+
--button-padding-vertical: vertical padding of the button
|
|
15
|
+
--button-padding-horizontal: horizontal padding of the button
|
|
16
|
+
--button-border-width: border width of the button
|
|
17
|
+
--button-font-size: font size of the button
|
|
18
|
+
--button-font-weight: font weight of the button
|
|
19
|
+
--button-line-height: line height of the button
|
|
20
|
+
*/
|
|
21
|
+
.ds.button {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
|
|
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
|
+
border-style: solid;
|
|
29
|
+
border-width: var(--button-border-width);
|
|
30
|
+
font-size: var(--button-font-size);
|
|
31
|
+
font-weight: var(--button-font-weight);
|
|
32
|
+
line-height: var(--button-line-height);
|
|
33
|
+
margin-block-end: var(--button-margin-bottom);
|
|
34
|
+
margin-inline-end: var(--button-margin-left);
|
|
35
|
+
padding-block: var(--button-padding-vertical);
|
|
36
|
+
padding-inline: var(--button-padding-horizontal);
|
|
37
|
+
|
|
38
|
+
text-align: left;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
|
|
41
|
+
/* component states */
|
|
42
|
+
&:hover {
|
|
43
|
+
background-color: var(
|
|
44
|
+
--modifier-color-hover,
|
|
45
|
+
var(--button-color-background-hover)
|
|
46
|
+
);
|
|
47
|
+
border-color: var(
|
|
48
|
+
--modifier-color-border-hover,
|
|
49
|
+
var(--button-color-border-hover)
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:active {
|
|
54
|
+
background-color: var(
|
|
55
|
+
--modifier-color-active,
|
|
56
|
+
var(--button-color-background-active)
|
|
57
|
+
);
|
|
58
|
+
border-color: var(
|
|
59
|
+
--modifier-color-border-active,
|
|
60
|
+
var(--button-color-border-active)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// TODO: this is how appearance could work as enum
|
|
2
|
+
//
|
|
3
|
+
// export enum ButtonAppearance {
|
|
4
|
+
// DEFAULT = "default",
|
|
5
|
+
// BASE = "base",
|
|
6
|
+
// POSITIVE = "positive",
|
|
7
|
+
// NEGATIVE = "negative",
|
|
8
|
+
// LINK = "link",
|
|
9
|
+
// }
|
|
10
|
+
//
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/lib/Button/types.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,iCAAiC;AACjC,yBAAyB;AACzB,mBAAmB;AACnB,2BAA2B;AAC3B,2BAA2B;AAC3B,mBAAmB;AACnB,IAAI;AACJ,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
/** Buttons are clickable elements used to perform an action. */
|
|
4
|
+
const Button = ({ id, className, children, style, appearance, ...props }) => {
|
|
5
|
+
return (_jsx("button", { id: id, className: ["ds", "button", appearance, className]
|
|
6
|
+
.filter(Boolean)
|
|
7
|
+
.join(" "), style: style, "aria-label": props["aria-label"] || children?.toString(), ...props, children: children }));
|
|
8
|
+
};
|
|
9
|
+
export default Button;
|
|
10
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/ui/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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/* component styles */
|
|
2
|
+
|
|
3
|
+
/* component variables
|
|
4
|
+
--button-color-background: background color of the button
|
|
5
|
+
--button-color-background-hover: background color of the button on hover
|
|
6
|
+
--button-color-background-active: background color of the button on active
|
|
7
|
+
--button-color-text: text color of the button
|
|
8
|
+
--button-color-border: border color of the button
|
|
9
|
+
--button-color-border-hover: border color of the button on hover
|
|
10
|
+
--button-color-border-active: border color of the button on active
|
|
11
|
+
|
|
12
|
+
--button-margin-left: left margin of the button
|
|
13
|
+
--button-margin-bottom: bottom margin of the button
|
|
14
|
+
--button-padding-vertical: vertical padding of the button
|
|
15
|
+
--button-padding-horizontal: horizontal padding of the button
|
|
16
|
+
--button-border-width: border width of the button
|
|
17
|
+
--button-font-size: font size of the button
|
|
18
|
+
--button-font-weight: font weight of the button
|
|
19
|
+
--button-line-height: line height of the button
|
|
20
|
+
*/
|
|
21
|
+
.ds.button {
|
|
22
|
+
display: inline-block;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
|
|
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
|
+
border-style: solid;
|
|
29
|
+
border-width: var(--button-border-width);
|
|
30
|
+
font-size: var(--button-font-size);
|
|
31
|
+
font-weight: var(--button-font-weight);
|
|
32
|
+
line-height: var(--button-line-height);
|
|
33
|
+
margin-block-end: var(--button-margin-bottom);
|
|
34
|
+
margin-inline-end: var(--button-margin-left);
|
|
35
|
+
padding-block: var(--button-padding-vertical);
|
|
36
|
+
padding-inline: var(--button-padding-horizontal);
|
|
37
|
+
|
|
38
|
+
text-align: left;
|
|
39
|
+
text-decoration: none;
|
|
40
|
+
|
|
41
|
+
/* component states */
|
|
42
|
+
&:hover {
|
|
43
|
+
background-color: var(
|
|
44
|
+
--modifier-color-hover,
|
|
45
|
+
var(--button-color-background-hover)
|
|
46
|
+
);
|
|
47
|
+
border-color: var(
|
|
48
|
+
--modifier-color-border-hover,
|
|
49
|
+
var(--button-color-border-hover)
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:active {
|
|
54
|
+
background-color: var(
|
|
55
|
+
--modifier-color-active,
|
|
56
|
+
var(--button-color-background-active)
|
|
57
|
+
);
|
|
58
|
+
border-color: var(
|
|
59
|
+
--modifier-color-border-active,
|
|
60
|
+
var(--button-color-border-active)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// TODO: this is how appearance could work as enum
|
|
2
|
+
//
|
|
3
|
+
// export enum ButtonAppearance {
|
|
4
|
+
// DEFAULT = "default",
|
|
5
|
+
// BASE = "base",
|
|
6
|
+
// POSITIVE = "positive",
|
|
7
|
+
// NEGATIVE = "negative",
|
|
8
|
+
// LINK = "link",
|
|
9
|
+
// }
|
|
10
|
+
//
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/Button/types.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,EAAE;AACF,iCAAiC;AACjC,yBAAyB;AACzB,mBAAmB;AACnB,2BAA2B;AAC3B,2BAA2B;AAC3B,mBAAmB;AACnB,IAAI;AACJ,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type Props from "./types.js";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
/** Buttons are clickable elements used to perform an action. */
|
|
4
|
+
declare const Button: ({ id, className, children, style, appearance, ...props }: Props) => React.ReactElement;
|
|
5
|
+
export default Button;
|
|
6
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EACV,SAAS,IAAI,eAAe,EAC5B,OAAO,IAAI,WAAW,GACvB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface BaseProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
/** Additional CSS classes */
|
|
5
|
+
className?: string;
|
|
6
|
+
/**
|
|
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].
|
|
11
|
+
* */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** The visual style of the button */
|
|
14
|
+
appearance?: "neutral" | "base" | "positive" | "negative" | "link";
|
|
15
|
+
}
|
|
16
|
+
type Props = BaseProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
17
|
+
export default Props;
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Button/types.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,MAAM,WAAW,SAAS;IAExB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;SAKK;IACL,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;CACpE;AAED,KAAK,KAAK,GAAG,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEjE,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type Props from "./types.js";
|
|
2
|
+
import "./styles.css";
|
|
3
|
+
/** Buttons are clickable elements used to perform an action. */
|
|
4
|
+
declare const Button: ({ id, className, children, style, appearance, ...props }: Props) => React.ReactElement;
|
|
5
|
+
export default Button;
|
|
6
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/ui/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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/Button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,YAAY,EACV,SAAS,IAAI,eAAe,EAC5B,OAAO,IAAI,WAAW,GACvB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
export interface BaseProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
/** Additional CSS classes */
|
|
5
|
+
className?: string;
|
|
6
|
+
/**
|
|
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].
|
|
11
|
+
* */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** The visual style of the button */
|
|
14
|
+
appearance?: "neutral" | "base" | "positive" | "negative" | "link";
|
|
15
|
+
}
|
|
16
|
+
type Props = BaseProps & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
17
|
+
export default Props;
|
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/Button/types.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7D,MAAM,WAAW,SAAS;IAExB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;SAKK;IACL,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;CACpE;AAED,KAAK,KAAK,GAAG,SAAS,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEjE,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@canonical/react-ds-app-portal",
|
|
3
|
+
"description": "Portal-specific components for the Pragma design system",
|
|
4
|
+
"version": "0.15.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"author": {
|
|
12
|
+
"email": "webteam@canonical.com",
|
|
13
|
+
"name": "Canonical Webteam"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/canonical/ds25"
|
|
18
|
+
},
|
|
19
|
+
"license": "LGPL-3.0",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/canonical/ds25/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/canonical/ds25#readme",
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "bun run build:package",
|
|
26
|
+
"build:all": "bun run build:package && bun run build:storybook",
|
|
27
|
+
"build:storybook": "storybook build",
|
|
28
|
+
"build:package": "bun run build:package:tsc && bun run build:package:copycss",
|
|
29
|
+
"build:package:copycss": "copyfiles -u 1 'src/lib/{,**/}*.css' dist/esm",
|
|
30
|
+
"build:package:tsc": "tsc -p tsconfig.build.json",
|
|
31
|
+
"check": "bun run check:biome && bun run check:ts && bun run check:webarchitect",
|
|
32
|
+
"check:webarchitect": "webarchitect library",
|
|
33
|
+
"check:fix": "bun run check:biome:fix && bun run check:ts",
|
|
34
|
+
"check:biome": "biome check",
|
|
35
|
+
"check:biome:fix": "biome check --write",
|
|
36
|
+
"check:ts": "tsc --noEmit",
|
|
37
|
+
"storybook": "storybook dev -p 6009 --no-open --host 0.0.0.0",
|
|
38
|
+
"test": "bun run test:vitest",
|
|
39
|
+
"test:vitest": "vitest run",
|
|
40
|
+
"test:vitest:watch": "vitest"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"@canonical/react-ds-global": "^0.15.0",
|
|
44
|
+
"@canonical/storybook-config": "^0.15.0",
|
|
45
|
+
"@canonical/styles": "^0.15.0",
|
|
46
|
+
"react": "^19.2.4",
|
|
47
|
+
"react-dom": "^19.2.4"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@biomejs/biome": "2.3.14",
|
|
51
|
+
"@canonical/biome-config": "^0.15.0",
|
|
52
|
+
"@canonical/storybook-helpers": "^0.15.0",
|
|
53
|
+
"@canonical/typescript-config-react": "^0.15.0",
|
|
54
|
+
"@canonical/webarchitect": "^0.15.0",
|
|
55
|
+
"@chromatic-com/storybook": "^5.0.1",
|
|
56
|
+
"@storybook/addon-docs": "^10.2.8",
|
|
57
|
+
"@storybook/react-vite": "^10.2.8",
|
|
58
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
59
|
+
"@testing-library/react": "^16.3.2",
|
|
60
|
+
"@types/node": "^24.10.13",
|
|
61
|
+
"@types/react": "^19.2.13",
|
|
62
|
+
"@types/react-dom": "^19.2.3",
|
|
63
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
64
|
+
"copyfiles": "^2.4.1",
|
|
65
|
+
"globals": "^17.3.0",
|
|
66
|
+
"jsdom": "^28.0.0",
|
|
67
|
+
"storybook": "^10.2.8",
|
|
68
|
+
"typescript": "^5.9.3",
|
|
69
|
+
"vite": "^7.3.1",
|
|
70
|
+
"vite-tsconfig-paths": "^6.1.0",
|
|
71
|
+
"vitest": "^4.0.18"
|
|
72
|
+
}
|
|
73
|
+
}
|