@krumio/trailhand-ui 1.5.0 → 1.7.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 +102 -11
- package/dist/components/button/button.d.ts +20 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +189 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/icon/icon.d.ts +18 -0
- package/dist/components/icon/icon.d.ts.map +1 -0
- package/dist/components/icon/icon.js +44 -0
- package/dist/components/icon/icon.js.map +1 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/index.d.ts.map +1 -0
- package/dist/components/icon/index.js +2 -0
- package/dist/components/icon/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/styles/colors.css +132 -0
- package/package.json +25 -28
- package/dist/Button.d.ts +0 -15
- package/dist/Button.d.ts.map +0 -1
- package/dist/Button.js +0 -18
- package/dist/Button.js.map +0 -1
- package/dist/Header.d.ts +0 -15
- package/dist/Header.d.ts.map +0 -1
- package/dist/Header.js +0 -44
- package/dist/Header.js.map +0 -1
- package/dist/Page.d.ts +0 -9
- package/dist/Page.d.ts.map +0 -1
- package/dist/Page.js +0 -61
- package/dist/Page.js.map +0 -1
- package/dist/action-menu.d.ts +0 -79
- package/dist/action-menu.d.ts.map +0 -1
- package/dist/action-menu.js +0 -321
- package/dist/action-menu.js.map +0 -1
- package/dist/assets/index-B7q5L5KS.js +0 -91
- package/dist/components/action-menu/action-menu.stories.d.ts +0 -261
- package/dist/components/action-menu/action-menu.stories.d.ts.map +0 -1
- package/dist/components/action-menu/action-menu.stories.js +0 -363
- package/dist/components/action-menu/action-menu.stories.js.map +0 -1
- package/dist/components/data-table/data-table.stories.d.ts +0 -507
- package/dist/components/data-table/data-table.stories.d.ts.map +0 -1
- package/dist/components/data-table/data-table.stories.js +0 -601
- package/dist/components/data-table/data-table.stories.js.map +0 -1
- package/dist/components/th-card/index.d.ts +0 -3
- package/dist/components/th-card/index.d.ts.map +0 -1
- package/dist/components/th-card/index.js +0 -2
- package/dist/components/th-card/index.js.map +0 -1
- package/dist/components/th-card/th-card.d.ts +0 -78
- package/dist/components/th-card/th-card.d.ts.map +0 -1
- package/dist/components/th-card/th-card.js +0 -449
- package/dist/components/th-card/th-card.js.map +0 -1
- package/dist/components/th-card/th-card.stories.d.ts +0 -232
- package/dist/components/th-card/th-card.stories.d.ts.map +0 -1
- package/dist/components/th-card/th-card.stories.js +0 -385
- package/dist/components/th-card/th-card.stories.js.map +0 -1
- package/dist/components/th-tag/index.d.ts +0 -3
- package/dist/components/th-tag/index.d.ts.map +0 -1
- package/dist/components/th-tag/index.js +0 -2
- package/dist/components/th-tag/index.js.map +0 -1
- package/dist/components/th-tag/th-tag.d.ts +0 -65
- package/dist/components/th-tag/th-tag.d.ts.map +0 -1
- package/dist/components/th-tag/th-tag.js +0 -307
- package/dist/components/th-tag/th-tag.js.map +0 -1
- package/dist/components/th-tag/th-tag.stories.d.ts +0 -277
- package/dist/components/th-tag/th-tag.stories.d.ts.map +0 -1
- package/dist/components/th-tag/th-tag.stories.js +0 -415
- package/dist/components/th-tag/th-tag.stories.js.map +0 -1
- package/dist/components/toggle-switch/toggle-switch.stories.d.ts +0 -239
- package/dist/components/toggle-switch/toggle-switch.stories.d.ts.map +0 -1
- package/dist/components/toggle-switch/toggle-switch.stories.js +0 -408
- package/dist/components/toggle-switch/toggle-switch.stories.js.map +0 -1
- package/dist/data-table.d.ts +0 -191
- package/dist/data-table.d.ts.map +0 -1
- package/dist/data-table.js +0 -796
- package/dist/data-table.js.map +0 -1
- package/dist/design-system/color-palette.stories.d.ts +0 -24
- package/dist/design-system/color-palette.stories.d.ts.map +0 -1
- package/dist/design-system/color-palette.stories.js +0 -361
- package/dist/design-system/color-palette.stories.js.map +0 -1
- package/dist/index.html +0 -102
- package/dist/toggle-switch.d.ts +0 -38
- package/dist/toggle-switch.d.ts.map +0 -1
- package/dist/toggle-switch.js +0 -175
- package/dist/toggle-switch.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krumio/trailhand-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reusable web components built with Lit Element",
|
|
6
|
-
"main": "./dist/
|
|
7
|
-
"
|
|
8
|
-
"types": "./dist/toggle-switch.d.ts",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
9
8
|
"exports": {
|
|
10
9
|
".": {
|
|
11
|
-
"types": "./dist/
|
|
12
|
-
"default": "./dist/
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"default": "./dist/index.js"
|
|
13
12
|
},
|
|
14
|
-
"./
|
|
15
|
-
"types": "./dist/
|
|
16
|
-
"default": "./dist/
|
|
13
|
+
"./components/*": {
|
|
14
|
+
"types": "./dist/components/*/index.d.ts",
|
|
15
|
+
"default": "./dist/components/*/index.js"
|
|
17
16
|
},
|
|
18
|
-
"./
|
|
19
|
-
"types": "./dist/data-table.d.ts",
|
|
20
|
-
"default": "./dist/data-table.js"
|
|
21
|
-
},
|
|
22
|
-
"./action-menu": {
|
|
23
|
-
"types": "./dist/action-menu.d.ts",
|
|
24
|
-
"default": "./dist/action-menu.js"
|
|
25
|
-
},
|
|
26
|
-
"./button": {
|
|
27
|
-
"types": "./dist/Button.d.ts",
|
|
28
|
-
"default": "./dist/Button.js"
|
|
29
|
-
}
|
|
17
|
+
"./styles/*": "./dist/styles/*"
|
|
30
18
|
},
|
|
31
19
|
"files": [
|
|
32
20
|
"dist",
|
|
@@ -37,14 +25,19 @@
|
|
|
37
25
|
"access": "public"
|
|
38
26
|
},
|
|
39
27
|
"scripts": {
|
|
40
|
-
"
|
|
41
|
-
"build": "tsc",
|
|
28
|
+
"dev": "vite",
|
|
29
|
+
"build": "tsc -p tsconfig.build.json && mkdir -p dist/styles && cp src/styles/colors.css dist/styles/colors.css",
|
|
42
30
|
"build:demo": "vite build",
|
|
43
31
|
"typecheck": "tsc --noEmit",
|
|
44
32
|
"typecheck:watch": "tsc --noEmit --watch",
|
|
45
33
|
"storybook": "storybook dev -p 6006",
|
|
46
34
|
"build-storybook": "storybook build",
|
|
47
|
-
"prepublishOnly": "npm run build"
|
|
35
|
+
"prepublishOnly": "npm run build",
|
|
36
|
+
"chromatic": "chromatic --project-token=$CHROMATIC_PROJECT_TOKEN",
|
|
37
|
+
"test": "vitest",
|
|
38
|
+
"test:unit": "vitest --project unit",
|
|
39
|
+
"test:storybook": "vitest --project storybook",
|
|
40
|
+
"test:run": "vitest run"
|
|
48
41
|
},
|
|
49
42
|
"repository": {
|
|
50
43
|
"type": "git",
|
|
@@ -60,22 +53,26 @@
|
|
|
60
53
|
"author": "",
|
|
61
54
|
"license": "MIT",
|
|
62
55
|
"dependencies": {
|
|
56
|
+
"@fortawesome/fontawesome-svg-core": "^7.1.0",
|
|
57
|
+
"@fortawesome/free-solid-svg-icons": "^7.1.0",
|
|
63
58
|
"@iconify/icons-heroicons": "^1.2.9",
|
|
64
59
|
"iconify-icon": "^3.0.2",
|
|
65
60
|
"lit": "^3.3.1"
|
|
66
61
|
},
|
|
67
62
|
"devDependencies": {
|
|
63
|
+
"@chromatic-com/storybook": "^5.0.0",
|
|
68
64
|
"@storybook/addon-a11y": "^10.2.0",
|
|
69
65
|
"@storybook/addon-docs": "^10.2.0",
|
|
70
66
|
"@storybook/addon-vitest": "^10.2.0",
|
|
71
67
|
"@storybook/web-components-vite": "^10.2.0",
|
|
72
68
|
"@types/node": "^25.0.3",
|
|
69
|
+
"@vitest/browser-playwright": "^4.0.17",
|
|
70
|
+
"@vitest/coverage-v8": "^4.0.17",
|
|
71
|
+
"chromatic": "^15.0.0",
|
|
72
|
+
"playwright": "^1.57.0",
|
|
73
73
|
"storybook": "^10.2.0",
|
|
74
74
|
"typescript": "^5.9.3",
|
|
75
75
|
"vite": "^6.4.1",
|
|
76
|
-
"vitest": "^4.0.17"
|
|
77
|
-
"playwright": "^1.57.0",
|
|
78
|
-
"@vitest/browser-playwright": "^4.0.17",
|
|
79
|
-
"@vitest/coverage-v8": "^4.0.17"
|
|
76
|
+
"vitest": "^4.0.17"
|
|
80
77
|
}
|
|
81
78
|
}
|
package/dist/Button.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit';
|
|
2
|
-
import './button.css';
|
|
3
|
-
/**
|
|
4
|
-
* Props for the Button component
|
|
5
|
-
*/
|
|
6
|
-
export interface ButtonProps {
|
|
7
|
-
primary?: boolean;
|
|
8
|
-
backgroundColor?: string | null;
|
|
9
|
-
size?: 'small' | 'medium' | 'large';
|
|
10
|
-
label: string;
|
|
11
|
-
onClick?: (e: Event) => void;
|
|
12
|
-
}
|
|
13
|
-
/** Primary UI component for user interaction */
|
|
14
|
-
export declare const Button: ({ primary, backgroundColor, size, label, onClick }: ButtonProps) => TemplateResult;
|
|
15
|
-
//# sourceMappingURL=Button.d.ts.map
|
package/dist/Button.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../Components/Button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAG3C,OAAO,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;CAC9B;AAED,gDAAgD;AAChD,eAAO,MAAM,MAAM,GAAI,oDAMpB,WAAW,KAAG,cAahB,CAAC"}
|
package/dist/Button.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { styleMap } from 'lit/directives/style-map.js';
|
|
3
|
-
import './button.css';
|
|
4
|
-
/** Primary UI component for user interaction */
|
|
5
|
-
export const Button = ({ primary, backgroundColor = null, size, label, onClick }) => {
|
|
6
|
-
const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
|
|
7
|
-
return html `
|
|
8
|
-
<button
|
|
9
|
-
type="button"
|
|
10
|
-
class=${['storybook-button', `storybook-button--${size || 'medium'}`, mode].join(' ')}
|
|
11
|
-
style=${styleMap({ backgroundColor })}
|
|
12
|
-
@click=${onClick}
|
|
13
|
-
>
|
|
14
|
-
${label}
|
|
15
|
-
</button>
|
|
16
|
-
`;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=Button.js.map
|
package/dist/Button.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../Components/Button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,cAAc,CAAC;AAatB,gDAAgD;AAChD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,OAAO,EACP,eAAe,GAAG,IAAI,EACtB,IAAI,EACJ,KAAK,EACL,OAAO,EACK,EAAkB,EAAE;IAChC,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,6BAA6B,CAAC;IAEnF,OAAO,IAAI,CAAA;;;cAGC,CAAC,kBAAkB,EAAE,qBAAqB,IAAI,IAAI,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;cAC7E,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;eAC5B,OAAO;;QAEd,KAAK;;GAEV,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/Header.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit';
|
|
2
|
-
import './header.css';
|
|
3
|
-
/**
|
|
4
|
-
* Props for the Header component
|
|
5
|
-
*/
|
|
6
|
-
export interface HeaderProps {
|
|
7
|
-
user?: {
|
|
8
|
-
name?: string;
|
|
9
|
-
} | null;
|
|
10
|
-
onLogin?: (e: Event) => void;
|
|
11
|
-
onLogout?: (e: Event) => void;
|
|
12
|
-
onCreateAccount?: (e: Event) => void;
|
|
13
|
-
}
|
|
14
|
-
export declare const Header: ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => TemplateResult;
|
|
15
|
-
//# sourceMappingURL=Header.d.ts.map
|
package/dist/Header.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../Components/Header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAG3C,OAAO,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAChC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC9B,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;CACtC;AAED,eAAO,MAAM,MAAM,GAAI,8CAKpB,WAAW,KAAG,cAuChB,CAAC"}
|
package/dist/Header.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { Button } from './Button';
|
|
3
|
-
import './header.css';
|
|
4
|
-
export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => html `
|
|
5
|
-
<header>
|
|
6
|
-
<div class="storybook-header">
|
|
7
|
-
<div>
|
|
8
|
-
<svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
|
|
9
|
-
<g fill="none" fillRule="evenodd">
|
|
10
|
-
<path
|
|
11
|
-
d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
|
|
12
|
-
fill="#FFF"
|
|
13
|
-
/>
|
|
14
|
-
<path
|
|
15
|
-
d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
|
|
16
|
-
fill="#555AB9"
|
|
17
|
-
/>
|
|
18
|
-
<path
|
|
19
|
-
d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
|
|
20
|
-
fill="#91BAF8"
|
|
21
|
-
/>
|
|
22
|
-
</g>
|
|
23
|
-
</svg>
|
|
24
|
-
<h1>Acme</h1>
|
|
25
|
-
</div>
|
|
26
|
-
<div>
|
|
27
|
-
${user
|
|
28
|
-
? Button({ size: 'small', onClick: onLogout, label: 'Log out' })
|
|
29
|
-
: html `${Button({
|
|
30
|
-
size: 'small',
|
|
31
|
-
onClick: onLogin,
|
|
32
|
-
label: 'Log in',
|
|
33
|
-
})}
|
|
34
|
-
${Button({
|
|
35
|
-
primary: true,
|
|
36
|
-
size: 'small',
|
|
37
|
-
onClick: onCreateAccount,
|
|
38
|
-
label: 'Sign up',
|
|
39
|
-
})}`}
|
|
40
|
-
</div>
|
|
41
|
-
</div>
|
|
42
|
-
</header>
|
|
43
|
-
`;
|
|
44
|
-
//# sourceMappingURL=Header.js.map
|
package/dist/Header.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Header.js","sourceRoot":"","sources":["../Components/Header.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,cAAc,CAAC;AAYtB,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EACrB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,eAAe,EACH,EAAkB,EAAE,CAAC,IAAI,CAAA;;;;;;;;;;;;;;;;;;;;;;;UAuB7B,IAAI;IACJ,CAAC,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAChE,CAAC,CAAC,IAAI,CAAA,GAAG,MAAM,CAAC;QACZ,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,OAAO;QAChB,KAAK,EAAE,QAAQ;KAChB,CAAC;cACA,MAAM,CAAC;QACP,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,eAAe;QACxB,KAAK,EAAE,SAAS;KACjB,CAAC,EAAE;;;;CAIf,CAAC"}
|
package/dist/Page.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit';
|
|
2
|
-
import { HeaderProps } from './Header';
|
|
3
|
-
import './page.css';
|
|
4
|
-
/**
|
|
5
|
-
* Props for the Page component (extends HeaderProps)
|
|
6
|
-
*/
|
|
7
|
-
export type PageProps = HeaderProps;
|
|
8
|
-
export declare const Page: ({ user, onLogin, onLogout, onCreateAccount }: PageProps) => TemplateResult;
|
|
9
|
-
//# sourceMappingURL=Page.d.ts.map
|
package/dist/Page.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"","sources":["../Components/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,cAAc,EAAE,MAAM,KAAK,CAAC;AAE3C,OAAO,EAAU,WAAW,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,YAAY,CAAC;AAEpB;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AAEpC,eAAO,MAAM,IAAI,GAAI,8CAKlB,SAAS,KAAG,cAwDd,CAAC"}
|
package/dist/Page.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { Header } from './Header';
|
|
3
|
-
import './page.css';
|
|
4
|
-
export const Page = ({ user, onLogin, onLogout, onCreateAccount }) => html `
|
|
5
|
-
<article>
|
|
6
|
-
${Header({
|
|
7
|
-
user,
|
|
8
|
-
onLogin,
|
|
9
|
-
onLogout,
|
|
10
|
-
onCreateAccount,
|
|
11
|
-
})}
|
|
12
|
-
|
|
13
|
-
<section class="storybook-page">
|
|
14
|
-
<h2>Pages in Storybook</h2>
|
|
15
|
-
<p>
|
|
16
|
-
We recommend building UIs with a
|
|
17
|
-
<a href="https://componentdriven.org" target="_blank" rel="noopener noreferrer">
|
|
18
|
-
<strong>component-driven</strong> </a
|
|
19
|
-
>process starting with atomic components and ending with pages.
|
|
20
|
-
</p>
|
|
21
|
-
<p>
|
|
22
|
-
Render pages with mock data. This makes it easy to build and review page states without
|
|
23
|
-
needing to navigate to them in your app. Here are some handy patterns for managing page data
|
|
24
|
-
in Storybook:
|
|
25
|
-
</p>
|
|
26
|
-
<ul>
|
|
27
|
-
<li>
|
|
28
|
-
Use a higher-level connected component. Storybook helps you compose such data from the
|
|
29
|
-
"args" of child component stories
|
|
30
|
-
</li>
|
|
31
|
-
<li>
|
|
32
|
-
Assemble data in the page component from your services. You can mock these services out
|
|
33
|
-
using Storybook.
|
|
34
|
-
</li>
|
|
35
|
-
</ul>
|
|
36
|
-
<p>
|
|
37
|
-
Get a guided tutorial on component-driven development at
|
|
38
|
-
<a href="https://storybook.js.org/tutorials/" target="_blank" rel="noopener noreferrer">
|
|
39
|
-
Storybook tutorials
|
|
40
|
-
</a>
|
|
41
|
-
. Read more in the
|
|
42
|
-
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer"> docs </a>
|
|
43
|
-
.
|
|
44
|
-
</p>
|
|
45
|
-
<div class="tip-wrapper">
|
|
46
|
-
<span class="tip">Tip</span> Adjust the width of the canvas with the
|
|
47
|
-
<svg width="10" height="10" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
|
|
48
|
-
<g fill="none" fillRule="evenodd">
|
|
49
|
-
<path
|
|
50
|
-
d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
|
|
51
|
-
id="a"
|
|
52
|
-
fill="#999"
|
|
53
|
-
/>
|
|
54
|
-
</g>
|
|
55
|
-
</svg>
|
|
56
|
-
Viewports addon in the toolbar
|
|
57
|
-
</div>
|
|
58
|
-
</section>
|
|
59
|
-
</article>
|
|
60
|
-
`;
|
|
61
|
-
//# sourceMappingURL=Page.js.map
|
package/dist/Page.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","sourceRoot":"","sources":["../Components/Page.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,KAAK,CAAC;AAE3C,OAAO,EAAE,MAAM,EAAe,MAAM,UAAU,CAAC;AAC/C,OAAO,YAAY,CAAC;AAOpB,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,EACnB,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,eAAe,EACL,EAAkB,EAAE,CAAC,IAAI,CAAA;;MAE/B,MAAM,CAAC;IACP,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,eAAe;CAChB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDL,CAAC"}
|
package/dist/action-menu.d.ts
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { LitElement, TemplateResult } from 'lit';
|
|
2
|
-
/**
|
|
3
|
-
* Type definition for resource data
|
|
4
|
-
*/
|
|
5
|
-
interface ResourceData {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
availableActions?: ActionMenuItem[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Type definition for action menu items
|
|
11
|
-
*/
|
|
12
|
-
export interface ActionMenuItem {
|
|
13
|
-
label?: string;
|
|
14
|
-
action?: (resource: ResourceData) => void;
|
|
15
|
-
enabled?: boolean | ((resource: ResourceData) => boolean);
|
|
16
|
-
visible?: boolean | ((resource: ResourceData) => boolean);
|
|
17
|
-
danger?: boolean;
|
|
18
|
-
divider?: boolean;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* A dropdown action menu component for displaying contextual actions.
|
|
22
|
-
* Typically used in table rows or cards to provide action options.
|
|
23
|
-
*/
|
|
24
|
-
export declare class ActionMenu extends LitElement {
|
|
25
|
-
actions: ActionMenuItem[];
|
|
26
|
-
resource: ResourceData;
|
|
27
|
-
disabled: boolean;
|
|
28
|
-
private _isOpen;
|
|
29
|
-
private _boundHandleClickOutside;
|
|
30
|
-
static styles: import("lit").CSSResult;
|
|
31
|
-
constructor();
|
|
32
|
-
connectedCallback(): void;
|
|
33
|
-
disconnectedCallback(): void;
|
|
34
|
-
/**
|
|
35
|
-
* Handle clicks outside the menu to close it
|
|
36
|
-
* @param e - The click event
|
|
37
|
-
* @private
|
|
38
|
-
*/
|
|
39
|
-
private _handleClickOutside;
|
|
40
|
-
/**
|
|
41
|
-
* Toggle the dropdown menu open/closed
|
|
42
|
-
* @param e - The click event
|
|
43
|
-
* @private
|
|
44
|
-
*/
|
|
45
|
-
private _toggleMenu;
|
|
46
|
-
/**
|
|
47
|
-
* Handle action click
|
|
48
|
-
* @param e - The click event
|
|
49
|
-
* @param action - The action object
|
|
50
|
-
* @private
|
|
51
|
-
*/
|
|
52
|
-
private _handleActionClick;
|
|
53
|
-
/**
|
|
54
|
-
* Check if an action is enabled
|
|
55
|
-
* @param action - The action object
|
|
56
|
-
* @returns boolean
|
|
57
|
-
* @private
|
|
58
|
-
*/
|
|
59
|
-
private _isActionEnabled;
|
|
60
|
-
/**
|
|
61
|
-
* Render the three-dots icon
|
|
62
|
-
* @returns TemplateResult
|
|
63
|
-
* @private
|
|
64
|
-
*/
|
|
65
|
-
private _renderIcon;
|
|
66
|
-
/**
|
|
67
|
-
* Get actions to display
|
|
68
|
-
* @returns Array of actions
|
|
69
|
-
* @private
|
|
70
|
-
*/
|
|
71
|
-
private _getActions;
|
|
72
|
-
/**
|
|
73
|
-
* Render the component
|
|
74
|
-
* @returns TemplateResult
|
|
75
|
-
*/
|
|
76
|
-
render(): TemplateResult;
|
|
77
|
-
}
|
|
78
|
-
export {};
|
|
79
|
-
//# sourceMappingURL=action-menu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-menu.d.ts","sourceRoot":"","sources":["../Components/action-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAG5D;;GAEG;AACH,UAAU,YAAY;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;CACrC;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC;IAC1D,OAAO,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,QAAQ,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,qBAAa,UAAW,SAAQ,UAAU;IAExC,OAAO,EAAE,cAAc,EAAE,CAAM;IAG/B,QAAQ,EAAE,YAAY,CAAM;IAG5B,QAAQ,UAAS;IAGjB,OAAO,CAAC,OAAO,CAAS;IAExB,OAAO,CAAC,wBAAwB,CAAqB;IAErD,OAAgB,MAAM,0BAkHpB;;IAOO,iBAAiB,IAAI,IAAI;IAKzB,oBAAoB,IAAI,IAAI;IAKrC;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAOnB;;;;;OAKG;IACH,OAAO,CAAC,kBAAkB;IAoB1B;;;;;OAKG;IACH,OAAO,CAAC,gBAAgB;IAQxB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAUnB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAYnB;;;OAGG;IACM,MAAM,IAAI,cAAc;CAuElC"}
|