@canonical/react-ds-app-launchpad 0.9.0-experimental.1 → 0.9.0-experimental.4
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/dist/esm/ui/GitDiffViewer/Context.js +4 -0
- package/dist/esm/ui/GitDiffViewer/Context.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/Provider.js +31 -0
- package/dist/esm/ui/GitDiffViewer/Provider.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.js +119 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.js +33 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.js +4 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/index.js +2 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/common/index.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/index.js +4 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/index.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/CodeDiffViewer/types.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/FileHeader/FileHeader.js +35 -0
- package/dist/esm/ui/GitDiffViewer/common/FileHeader/FileHeader.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/FileHeader/index.js +4 -0
- package/dist/esm/ui/GitDiffViewer/common/FileHeader/index.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/FileHeader/types.js +2 -0
- package/dist/esm/ui/GitDiffViewer/common/FileHeader/types.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/common/index.js +3 -0
- package/dist/esm/ui/GitDiffViewer/common/index.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/hooks/index.js +2 -0
- package/dist/esm/ui/GitDiffViewer/hooks/index.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/hooks/useGitDiffViewer.js +11 -0
- package/dist/esm/ui/GitDiffViewer/hooks/useGitDiffViewer.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/index.js +9 -0
- package/dist/esm/ui/GitDiffViewer/index.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/styles.css +38 -0
- package/dist/esm/ui/GitDiffViewer/types.js +2 -0
- package/dist/esm/ui/{Button → GitDiffViewer}/types.js.map +1 -1
- package/dist/esm/ui/GitDiffViewer/utils/index.js +2 -0
- package/dist/esm/ui/GitDiffViewer/utils/index.js.map +1 -0
- package/dist/esm/ui/GitDiffViewer/utils/parseGitDiff.js +73 -0
- package/dist/esm/ui/GitDiffViewer/utils/parseGitDiff.js.map +1 -0
- package/dist/esm/ui/index.js +1 -1
- package/dist/esm/ui/index.js.map +1 -1
- package/dist/types/ui/GitDiffViewer/Context.d.ts +4 -0
- package/dist/types/ui/GitDiffViewer/Context.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/Provider.d.ts +5 -0
- package/dist/types/ui/GitDiffViewer/Provider.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.d.ts +16 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/CodeDiffViewer.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.d.ts +11 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/DiffLine.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.d.ts +3 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/index.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.d.ts +20 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/DiffLine/types.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/index.d.ts +2 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/common/index.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/index.d.ts +3 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/index.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/types.d.ts +18 -0
- package/dist/types/ui/GitDiffViewer/common/CodeDiffViewer/types.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/FileHeader/FileHeader.d.ts +15 -0
- package/dist/types/ui/GitDiffViewer/common/FileHeader/FileHeader.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/FileHeader/index.d.ts +3 -0
- package/dist/types/ui/GitDiffViewer/common/FileHeader/index.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/FileHeader/types.d.ts +17 -0
- package/dist/types/ui/GitDiffViewer/common/FileHeader/types.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/common/index.d.ts +3 -0
- package/dist/types/ui/GitDiffViewer/common/index.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/hooks/index.d.ts +2 -0
- package/dist/types/ui/GitDiffViewer/hooks/index.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/hooks/useGitDiffViewer.d.ts +3 -0
- package/dist/types/ui/GitDiffViewer/hooks/useGitDiffViewer.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/index.d.ts +6 -0
- package/dist/types/ui/GitDiffViewer/index.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/types.d.ts +77 -0
- package/dist/types/ui/GitDiffViewer/types.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/utils/index.d.ts +2 -0
- package/dist/types/ui/GitDiffViewer/utils/index.d.ts.map +1 -0
- package/dist/types/ui/GitDiffViewer/utils/parseGitDiff.d.ts +4 -0
- package/dist/types/ui/GitDiffViewer/utils/parseGitDiff.d.ts.map +1 -0
- package/dist/types/ui/index.d.ts +1 -1
- package/dist/types/ui/index.d.ts.map +1 -1
- package/package.json +10 -14
- package/dist/esm/ui/Button/Button.js +0 -10
- package/dist/esm/ui/Button/Button.js.map +0 -1
- package/dist/esm/ui/Button/index.js +0 -2
- package/dist/esm/ui/Button/index.js.map +0 -1
- package/dist/esm/ui/Button/styles.css +0 -63
- package/dist/esm/ui/Chip/Chip.css +0 -79
- package/dist/esm/ui/Chip/Chip.js +0 -15
- package/dist/esm/ui/Chip/Chip.js.map +0 -1
- package/dist/esm/ui/Chip/index.js +0 -4
- package/dist/esm/ui/Chip/index.js.map +0 -1
- package/dist/esm/ui/Chip/types.js.map +0 -1
- package/dist/types/ui/Button/Button.d.ts +0 -6
- package/dist/types/ui/Button/Button.d.ts.map +0 -1
- package/dist/types/ui/Button/index.d.ts +0 -3
- package/dist/types/ui/Button/index.d.ts.map +0 -1
- package/dist/types/ui/Button/types.d.ts +0 -15
- package/dist/types/ui/Button/types.d.ts.map +0 -1
- package/dist/types/ui/Chip/Chip.d.ts +0 -10
- package/dist/types/ui/Chip/Chip.d.ts.map +0 -1
- package/dist/types/ui/Chip/index.d.ts +0 -3
- package/dist/types/ui/Chip/index.d.ts.map +0 -1
- package/dist/types/ui/Chip/types.d.ts +0 -27
- package/dist/types/ui/Chip/types.d.ts.map +0 -1
- /package/dist/esm/ui/{Button → GitDiffViewer/common/CodeDiffViewer/common/DiffLine}/types.js +0 -0
- /package/dist/esm/ui/{Chip → GitDiffViewer/common/CodeDiffViewer}/types.js +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,cAAc,YAAY,CAAC"}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import type React from "react";
|
2
|
+
export type CodeDiffViewerAddComment = (props: {
|
3
|
+
lineNumber: number;
|
4
|
+
onClose: () => void;
|
5
|
+
}) => React.ReactNode;
|
6
|
+
export type CodeDiffViewerProps = {
|
7
|
+
/** A unique identifier for the CodeDiffViewer */
|
8
|
+
id?: string;
|
9
|
+
/** Additional CSS classes */
|
10
|
+
className?: string;
|
11
|
+
/** Add comment element.
|
12
|
+
* If provided, the add comment button will be displayed on the line number.
|
13
|
+
*/
|
14
|
+
AddComment?: CodeDiffViewerAddComment;
|
15
|
+
/** Inline styles */
|
16
|
+
style?: React.CSSProperties;
|
17
|
+
};
|
18
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/CodeDiffViewer/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,wBAAwB,GAAG,CAAC,KAAK,EAAE;IAC7C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,KAAK,KAAK,CAAC,SAAS,CAAC;AAEtB,MAAM,MAAM,mBAAmB,GAAG;IAChC,iDAAiD;IACjD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,wBAAwB,CAAC;IACtC,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import type React from "react";
|
2
|
+
import "./styles.css";
|
3
|
+
import type { FileHeaderProps } from "./types.js";
|
4
|
+
/**
|
5
|
+
* Displays the file name and change count for a diff.
|
6
|
+
* With option to add custom elements to the left and right of the file header.
|
7
|
+
*
|
8
|
+
* @returns {React.ReactElement} - Rendered FileHeader
|
9
|
+
*/
|
10
|
+
declare const FileHeader: {
|
11
|
+
({ id, children, className, style, hideCollapse, showChangeCount, leftContent, rightContent, ...props }: FileHeaderProps): React.ReactElement;
|
12
|
+
displayName: string;
|
13
|
+
};
|
14
|
+
export default FileHeader;
|
15
|
+
//# sourceMappingURL=FileHeader.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FileHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/FileHeader/FileHeader.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAIlD;;;;;GAKG;AACH,QAAA,MAAM,UAAU;6GAUb,eAAe,GAAG,KAAK,CAAC,YAAY;;CA0EtC,CAAC;AAIF,eAAe,UAAU,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/FileHeader/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACxD,cAAc,YAAY,CAAC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type React from "react";
|
2
|
+
export type FileHeaderProps = {
|
3
|
+
/** A unique identifier for the FileHeader */
|
4
|
+
id?: string;
|
5
|
+
/** Additional CSS classes */
|
6
|
+
className?: string;
|
7
|
+
/** Child elements */
|
8
|
+
children?: React.ReactNode;
|
9
|
+
/** Inline styles */
|
10
|
+
style?: React.CSSProperties;
|
11
|
+
/** Shown by default */
|
12
|
+
hideCollapse?: boolean;
|
13
|
+
showChangeCount?: boolean;
|
14
|
+
leftContent?: React.ReactNode;
|
15
|
+
rightContent?: React.ReactNode;
|
16
|
+
};
|
17
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/GitDiffViewer/common/FileHeader/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,MAAM,eAAe,GAAG;IAC5B,6CAA6C;IAC7C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,oBAAoB;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,uBAAuB;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,uBAAuB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useGitDiffViewer.d.ts","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/hooks/useGitDiffViewer.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,gBAAgB,4CAQrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export * from "./hooks/index.js";
|
2
|
+
export type { DiffFile as GitDiffFile, Hunk as GitDiffHunk } from "./types.js";
|
3
|
+
export * from "./utils/index.js";
|
4
|
+
import type { GitDiffViewerComponent } from "./types.js";
|
5
|
+
export declare const GitDiffViewer: GitDiffViewerComponent;
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/GitDiffViewer/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,YAAY,EAAE,QAAQ,IAAI,WAAW,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,YAAY,CAAC;AAC/E,cAAc,kBAAkB,CAAC;AAIjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,eAAO,MAAM,aAAa,EAAe,sBAAsB,CAAC"}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import type { AllOrNone } from "@canonical/utils";
|
2
|
+
import type React from "react";
|
3
|
+
import type { CodeDiffViewerProps, FileHeaderProps } from "./common/index.js";
|
4
|
+
/**
|
5
|
+
* When this is provided, the component will add support for collapsing the diff code section.
|
6
|
+
*/
|
7
|
+
export type CollapseOption = {
|
8
|
+
/**
|
9
|
+
* Whether the diff code section is collapsed.
|
10
|
+
*/
|
11
|
+
isCollapsed: boolean;
|
12
|
+
/**
|
13
|
+
* Toggle the collapse state of the diff code section.
|
14
|
+
*/
|
15
|
+
onCollapseToggle: (collapsed: boolean) => void;
|
16
|
+
};
|
17
|
+
export type DiffOptions = {
|
18
|
+
/**
|
19
|
+
* The diff file being displayed.
|
20
|
+
*
|
21
|
+
* In case you need to parse raw diff text,
|
22
|
+
* you can use the `parseDiff` function from `@canonical/react-ds-app-launchpad`
|
23
|
+
*/
|
24
|
+
diff: DiffFile;
|
25
|
+
};
|
26
|
+
export type WrapLinesOption = {
|
27
|
+
/**
|
28
|
+
* Whether the code lines should not overflow.
|
29
|
+
*/
|
30
|
+
wrapLines?: boolean;
|
31
|
+
};
|
32
|
+
export type LineDecorationOptions = {
|
33
|
+
/**
|
34
|
+
* Additional UI elements to be displayed bellow the code diff lines.
|
35
|
+
*/
|
36
|
+
lineDecorations?: Record<number, React.ReactElement>;
|
37
|
+
};
|
38
|
+
type UserContextOptions = LineDecorationOptions & DiffOptions & WrapLinesOption & AllOrNone<CollapseOption>;
|
39
|
+
type ManagedContextOptions = {
|
40
|
+
addCommentEnabled: boolean;
|
41
|
+
setAddCommentEnabled: (enabled: boolean) => void;
|
42
|
+
addCommentOpenLocations: Set<number>;
|
43
|
+
toggleAddCommentLocation: (lineNumber: number) => void;
|
44
|
+
};
|
45
|
+
export type ContextOptions = UserContextOptions & ManagedContextOptions;
|
46
|
+
export type ProviderOptions = {
|
47
|
+
id?: string;
|
48
|
+
className?: string;
|
49
|
+
style?: React.CSSProperties;
|
50
|
+
/**
|
51
|
+
* Consider using `GitDiffViewer.FileHeader`, and `GitDiffViewer.CodeDiff` components.
|
52
|
+
*/
|
53
|
+
children?: React.ReactNode;
|
54
|
+
} & UserContextOptions;
|
55
|
+
export type Hunk = {
|
56
|
+
header: string;
|
57
|
+
oldStart: number;
|
58
|
+
oldLines: number;
|
59
|
+
newStart: number;
|
60
|
+
newLines: number;
|
61
|
+
lines: {
|
62
|
+
type: "add" | "remove" | "context";
|
63
|
+
content: string;
|
64
|
+
}[];
|
65
|
+
};
|
66
|
+
export type DiffFile = {
|
67
|
+
oldPath: string;
|
68
|
+
newPath: string;
|
69
|
+
hunks: Hunk[];
|
70
|
+
fileChangeState: "none" | "added" | "deleted" | "modified";
|
71
|
+
};
|
72
|
+
export type GitDiffViewerComponent = ((props: ProviderOptions) => React.ReactElement) & {
|
73
|
+
FileHeader: (props: FileHeaderProps) => React.ReactElement | null;
|
74
|
+
CodeDiffViewer: (props: CodeDiffViewerProps) => React.ReactElement | null;
|
75
|
+
};
|
76
|
+
export {};
|
77
|
+
//# sourceMappingURL=types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/GitDiffViewer/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,gBAAgB,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB;;;;;OAKG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;CACtD,CAAC;AAEF,KAAK,kBAAkB,GAAG,qBAAqB,GAC7C,WAAW,GACX,eAAe,GACf,SAAS,CAAC,cAAc,CAAC,CAAC;AAE5B,KAAK,qBAAqB,GAAG;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,uBAAuB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrC,wBAAwB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAExE,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,GAAG,kBAAkB,CAAC;AAEvB,MAAM,MAAM,IAAI,GAAG;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE;QACL,IAAI,EAAE,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;QACnC,OAAO,EAAE,MAAM,CAAC;KACjB,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,eAAe,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CACpC,KAAK,EAAE,eAAe,KACnB,KAAK,CAAC,YAAY,CAAC,GAAG;IACzB,UAAU,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAClE,cAAc,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;CAC3E,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mBAAmB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"parseGitDiff.d.ts","sourceRoot":"","sources":["../../../../../src/ui/GitDiffViewer/utils/parseGitDiff.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAQ,MAAM,aAAa,CAAC;AAElD,iBAAS,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,EAAE,CAwElD;AAED,eAAe,YAAY,CAAC"}
|
package/dist/types/ui/index.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export
|
1
|
+
export * from "./GitDiffViewer/index.js";
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@canonical/react-ds-app-launchpad",
|
3
|
-
"version": "0.9.0-experimental.
|
3
|
+
"version": "0.9.0-experimental.4",
|
4
4
|
"type": "module",
|
5
5
|
"module": "dist/esm/index.js",
|
6
6
|
"types": "dist/types/index.d.ts",
|
@@ -28,8 +28,8 @@
|
|
28
28
|
"build:package:tsc": "tsc -p tsconfig.build.json",
|
29
29
|
"check": "bun run check:biome && bun run check:ts",
|
30
30
|
"check:fix": "bun run check:biome:fix && bun run check:ts",
|
31
|
-
"check:biome": "biome check
|
32
|
-
"check:biome:fix": "biome check --write
|
31
|
+
"check:biome": "biome check",
|
32
|
+
"check:biome:fix": "biome check --write",
|
33
33
|
"check:ts": "tsc --noEmit",
|
34
34
|
"storybook": "storybook dev -p 6006 --no-open --host 0.0.0.0",
|
35
35
|
"test": "bun run test:vitest",
|
@@ -38,24 +38,20 @@
|
|
38
38
|
"test:vitest:watch": "vitest"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@canonical/storybook-
|
42
|
-
"@canonical/styles": "^0.9.0-experimental.
|
41
|
+
"@canonical/storybook-config": "^0.9.0-experimental.2",
|
42
|
+
"@canonical/styles": "^0.9.0-experimental.2",
|
43
|
+
"@canonical/utils": "^0.9.0-experimental.4",
|
44
|
+
"highlight.js": "^11.11.1",
|
43
45
|
"react": "^19.0.0",
|
44
46
|
"react-dom": "^19.0.0"
|
45
47
|
},
|
46
48
|
"devDependencies": {
|
47
49
|
"@biomejs/biome": "^1.9.4",
|
48
|
-
"@canonical/biome-config": "^0.9.0-experimental.
|
49
|
-
"@canonical/typescript-config-react": "^0.9.0-experimental.
|
50
|
+
"@canonical/biome-config": "^0.9.0-experimental.2",
|
51
|
+
"@canonical/typescript-config-react": "^0.9.0-experimental.2",
|
50
52
|
"@chromatic-com/storybook": "^3.2.2",
|
51
|
-
"@storybook/addon-essentials": "^8.4.7",
|
52
|
-
"@storybook/addon-interactions": "^8.4.7",
|
53
|
-
"@storybook/addon-links": "^8.4.7",
|
54
|
-
"@storybook/addon-onboarding": "^8.4.7",
|
55
|
-
"@storybook/addon-themes": "^8.4.7",
|
56
53
|
"@storybook/blocks": "^8.4.7",
|
57
54
|
"@storybook/react": "^8.4.7",
|
58
|
-
"@storybook/react-vite": "^8.4.7",
|
59
55
|
"@storybook/test": "^8.4.7",
|
60
56
|
"@testing-library/jest-dom": "^6.6.3",
|
61
57
|
"@testing-library/react": "^16.1.0",
|
@@ -72,5 +68,5 @@
|
|
72
68
|
"vite-tsconfig-paths": "^5.1.4",
|
73
69
|
"vitest": "^2.1.8"
|
74
70
|
},
|
75
|
-
"gitHead": "
|
71
|
+
"gitHead": "1d084380afa970ea924d774ced9c2a3f6a6c027e"
|
76
72
|
}
|
@@ -1,10 +0,0 @@
|
|
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, appearance, label, ...props }) => {
|
5
|
-
return (_jsx("button", { id: id, className: ["ds", "button", appearance, className]
|
6
|
-
.filter(Boolean)
|
7
|
-
.join(" "), ...props, "aria-label": label, children: label }));
|
8
|
-
};
|
9
|
-
export default Button;
|
10
|
-
//# sourceMappingURL=Button.js.map
|
@@ -1 +0,0 @@
|
|
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,UAAU,EACV,KAAK,EACL,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,KACR,KAAK,gBACG,KAAK,YAEhB,KAAK,GACC,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -1 +0,0 @@
|
|
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"}
|
@@ -1,63 +0,0 @@
|
|
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(--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));
|
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
|
-
--intent-color-hover,
|
45
|
-
var(--button-color-background-hover)
|
46
|
-
);
|
47
|
-
border-color: var(
|
48
|
-
--intent-color-border-hover,
|
49
|
-
var(--button-color-border-hover)
|
50
|
-
);
|
51
|
-
}
|
52
|
-
|
53
|
-
&:active {
|
54
|
-
background-color: var(
|
55
|
-
--intent-color-active,
|
56
|
-
var(--button-color-background-active)
|
57
|
-
);
|
58
|
-
border-color: var(
|
59
|
-
--intent-color-border-active,
|
60
|
-
var(--button-color-border-active)
|
61
|
-
);
|
62
|
-
}
|
63
|
-
}
|
@@ -1,79 +0,0 @@
|
|
1
|
-
/* @canonical/generator-canonical-ds 0.4.0-experimental.0 */
|
2
|
-
|
3
|
-
.ds.chip {
|
4
|
-
border-color: var(--intent-color-border, var(--chip-color-border));
|
5
|
-
border-style: solid;
|
6
|
-
border-radius: var(--chip-border-radius);
|
7
|
-
border-width: var(--chip-border-width);
|
8
|
-
|
9
|
-
color: var(--intent-color-text-tinted, var(--chip-color-text));
|
10
|
-
background-color: var(--intent-color-tinted, var(--chip-color-background));
|
11
|
-
|
12
|
-
display: inline-flex;
|
13
|
-
align-items: baseline;
|
14
|
-
|
15
|
-
user-select: none;
|
16
|
-
white-space: nowrap;
|
17
|
-
|
18
|
-
font-size: var(--chip-font-size);
|
19
|
-
font-weight: var(--chip-font-weight);
|
20
|
-
line-height: var(--chip-line-height);
|
21
|
-
|
22
|
-
margin-block-end: var(--chip-margin-bottom);
|
23
|
-
margin-inline-end: var(--chip-margin-left);
|
24
|
-
padding-block: var(--chip-padding-vertical);
|
25
|
-
padding-inline: var(--chip-padding-horizontal);
|
26
|
-
|
27
|
-
& > .lead {
|
28
|
-
font-variant-caps: all-small-caps;
|
29
|
-
font-variant-numeric: oldstyle-nums;
|
30
|
-
}
|
31
|
-
|
32
|
-
& > .lead + .value::before {
|
33
|
-
content: ": ";
|
34
|
-
}
|
35
|
-
|
36
|
-
& > .lead,
|
37
|
-
& > .value {
|
38
|
-
display: inline;
|
39
|
-
overflow: hidden;
|
40
|
-
text-overflow: ellipsis;
|
41
|
-
}
|
42
|
-
|
43
|
-
& > .dismiss {
|
44
|
-
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23000' fill-rule='nonzero' d='M13.041 1.898l1.06 1.06L9.062 8l5.04 5.042-1.06 1.06L8 9.062 2.96 14.1l-1.06-1.06L6.938 8 1.9 2.96l1.06-1.06 5.04 5.04z'/%3E%3C/svg%3E");
|
45
|
-
background-color: var(--chip-color-background);
|
46
|
-
align-self: center;
|
47
|
-
background-size: 0.75rem;
|
48
|
-
background-repeat: no-repeat;
|
49
|
-
background-position: center;
|
50
|
-
display: inline-block;
|
51
|
-
cursor: pointer;
|
52
|
-
margin-left: var(--spacing-horizontal-xsmall);
|
53
|
-
flex: 0 0 auto;
|
54
|
-
border-radius: 50%;
|
55
|
-
border-color: transparent;
|
56
|
-
height: var(--font-size-default);
|
57
|
-
width: var(--font-size-default);
|
58
|
-
}
|
59
|
-
|
60
|
-
&:is(button) {
|
61
|
-
cursor: pointer;
|
62
|
-
}
|
63
|
-
|
64
|
-
&:hover:not(:has(.dismiss)),
|
65
|
-
& > .dismiss:hover {
|
66
|
-
background-color: var(
|
67
|
-
--intent-color-tinted-hover,
|
68
|
-
var(--chip-color-background-hover)
|
69
|
-
);
|
70
|
-
}
|
71
|
-
|
72
|
-
&:active:not(:has(.dismiss)),
|
73
|
-
& > .dismiss:active {
|
74
|
-
background-color: var(
|
75
|
-
--intent-color-tinted-active,
|
76
|
-
var(--chip-color-background-active)
|
77
|
-
);
|
78
|
-
}
|
79
|
-
}
|
package/dist/esm/ui/Chip/Chip.js
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
2
|
-
import "./Chip.css";
|
3
|
-
const componentCssClassName = "ds chip";
|
4
|
-
/**
|
5
|
-
* description of the Chip component
|
6
|
-
* @returns {React.ReactElement} - Rendered Chip
|
7
|
-
*/
|
8
|
-
const Chip = ({ appearance = "neutral", lead, value, onClick, onDismiss, id, className, style, ...props }) => {
|
9
|
-
const Container = onClick ? "button" : "span";
|
10
|
-
return (_jsxs(Container, { id: id, style: style, className: [componentCssClassName, appearance, className]
|
11
|
-
.filter(Boolean)
|
12
|
-
.join(" "), onClick: onClick, ...props, children: [lead && _jsx("span", { className: "lead", children: lead }), value && _jsx("span", { className: "value", children: value }), onDismiss && (_jsx("button", { type: "button", className: "dismiss", "aria-label": "Dismiss", onClick: () => onDismiss() }))] }));
|
13
|
-
};
|
14
|
-
export default Chip;
|
15
|
-
//# sourceMappingURL=Chip.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Chip.js","sourceRoot":"","sources":["../../../../src/ui/Chip/Chip.tsx"],"names":[],"mappings":";AAEA,OAAO,YAAY,CAAC;AAGpB,MAAM,qBAAqB,GAAG,SAAS,CAAC;AAExC;;;GAGG;AACH,MAAM,IAAI,GAAG,CAAC,EACZ,UAAU,GAAG,SAAS,EACtB,IAAI,EACJ,KAAK,EACL,OAAO,EACP,SAAS,EACT,EAAE,EACF,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACM,EAAsB,EAAE;IACtC,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC;IAC9C,OAAO,CACL,MAAC,SAAS,IACR,EAAE,EAAE,EAAE,EACN,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,CAAC,qBAAqB,EAAE,UAAU,EAAE,SAAS,CAAC;aACtD,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,EACZ,OAAO,EAAE,OAAO,KACZ,KAAK,aAER,IAAI,IAAI,eAAM,SAAS,EAAC,MAAM,YAAE,IAAI,GAAQ,EAC5C,KAAK,IAAI,eAAM,SAAS,EAAC,OAAO,YAAE,KAAK,GAAQ,EAC/C,SAAS,IAAI,CACZ,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,SAAS,gBACR,SAAS,EACpB,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,GAC1B,CACH,IACS,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/Chip/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,cAAc,YAAY,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/Chip/types.ts"],"names":[],"mappings":""}
|
@@ -1,6 +0,0 @@
|
|
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, appearance, label, ...props }: Props) => React.ReactElement;
|
5
|
-
export default Button;
|
6
|
-
//# sourceMappingURL=Button.d.ts.map
|
@@ -1 +0,0 @@
|
|
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,mDAMT,KAAK,KAAG,KAAK,CAAC,YAahB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -1 +0,0 @@
|
|
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,OAAO,IAAI,WAAW,EACtB,SAAS,IAAI,eAAe,GAC7B,MAAM,YAAY,CAAC"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import type React from "react";
|
2
|
-
export interface BaseProps {
|
3
|
-
id?: string;
|
4
|
-
/** Additional CSS classes */
|
5
|
-
className?: string;
|
6
|
-
/** The visual style of the button */
|
7
|
-
appearance?: "neutral" | "base" | "positive" | "negative" | "link";
|
8
|
-
/** Button contents */
|
9
|
-
label: string;
|
10
|
-
/** Optional click handler */
|
11
|
-
onClick?: () => void;
|
12
|
-
}
|
13
|
-
type Props = BaseProps & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
14
|
-
export default Props;
|
15
|
-
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/Button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,MAAM,WAAW,SAAS;IAExB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,UAAU,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;IACnE,sBAAsB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,KAAK,KAAK,GAAG,SAAS,GAAG,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEvE,eAAe,KAAK,CAAC"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import type React from "react";
|
2
|
-
import "./Chip.css";
|
3
|
-
import type { ChipPropsType } from "./types.js";
|
4
|
-
/**
|
5
|
-
* description of the Chip component
|
6
|
-
* @returns {React.ReactElement} - Rendered Chip
|
7
|
-
*/
|
8
|
-
declare const Chip: ({ appearance, lead, value, onClick, onDismiss, id, className, style, ...props }: ChipPropsType) => React.ReactElement;
|
9
|
-
export default Chip;
|
10
|
-
//# sourceMappingURL=Chip.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Chip.d.ts","sourceRoot":"","sources":["../../../../src/ui/Chip/Chip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD;;;GAGG;AACH,QAAA,MAAM,IAAI,oFAUP,aAAa,KAAG,KAAK,CAAC,YAwBxB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ui/Chip/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,cAAc,YAAY,CAAC"}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import type React from "react";
|
2
|
-
/**
|
3
|
-
* Props for the `Chip` component.
|
4
|
-
*/
|
5
|
-
export interface ChipProps {
|
6
|
-
/**
|
7
|
-
* The chip’s appearance.
|
8
|
-
* @default "neutral"
|
9
|
-
*/
|
10
|
-
appearance?: "neutral" | "positive" | "negative" | "caution" | "information";
|
11
|
-
/** Text shown before the value. */
|
12
|
-
lead?: string;
|
13
|
-
/** The chip’s value text. */
|
14
|
-
value?: string;
|
15
|
-
/** Called when the chip is clicked. */
|
16
|
-
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
17
|
-
/** Called when the chip is dismissed. */
|
18
|
-
onDismiss?: () => void;
|
19
|
-
/** Unique identifier for the chip. */
|
20
|
-
id?: string;
|
21
|
-
/** Additional CSS class names. */
|
22
|
-
className?: string;
|
23
|
-
/** Inline styles for the chip. */
|
24
|
-
style?: React.CSSProperties;
|
25
|
-
}
|
26
|
-
export type ChipPropsType = ChipProps & Omit<React.HTMLAttributes<HTMLButtonElement>, "children">;
|
27
|
-
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ui/Chip/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC;IAE7E,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,6BAA6B;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,uCAAuC;IACvC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAE/D,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IAEvB,sCAAsC;IACtC,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,kCAAkC;IAClC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,MAAM,MAAM,aAAa,GAAG,SAAS,GACnC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
/package/dist/esm/ui/{Button → GitDiffViewer/common/CodeDiffViewer/common/DiffLine}/types.js
RENAMED
File without changes
|
File without changes
|