@desktalk/ui 0.1.0-alpha.1
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/LICENSE +21 -0
- package/dist/chart-entry.d.ts +7 -0
- package/dist/chart-entry.d.ts.map +1 -0
- package/dist/chart.umd.js +30 -0
- package/dist/chart.umd.js.map +7 -0
- package/dist/desktalk-ui.js +1681 -0
- package/dist/desktalk-ui.js.map +7 -0
- package/dist/dt-badge.d.ts +39 -0
- package/dist/dt-badge.d.ts.map +1 -0
- package/dist/dt-badge.stories.d.ts +34 -0
- package/dist/dt-badge.stories.d.ts.map +1 -0
- package/dist/dt-button.d.ts +51 -0
- package/dist/dt-button.d.ts.map +1 -0
- package/dist/dt-button.stories.d.ts +40 -0
- package/dist/dt-button.stories.d.ts.map +1 -0
- package/dist/dt-card.d.ts +30 -0
- package/dist/dt-card.d.ts.map +1 -0
- package/dist/dt-card.stories.d.ts +31 -0
- package/dist/dt-card.stories.d.ts.map +1 -0
- package/dist/dt-chart.d.ts +67 -0
- package/dist/dt-chart.d.ts.map +1 -0
- package/dist/dt-chart.stories.d.ts +26 -0
- package/dist/dt-chart.stories.d.ts.map +1 -0
- package/dist/dt-divider.d.ts +41 -0
- package/dist/dt-divider.d.ts.map +1 -0
- package/dist/dt-divider.stories.d.ts +38 -0
- package/dist/dt-divider.stories.d.ts.map +1 -0
- package/dist/dt-grid.d.ts +50 -0
- package/dist/dt-grid.d.ts.map +1 -0
- package/dist/dt-grid.stories.d.ts +49 -0
- package/dist/dt-grid.stories.d.ts.map +1 -0
- package/dist/dt-list-view.d.ts +94 -0
- package/dist/dt-list-view.d.ts.map +1 -0
- package/dist/dt-list-view.stories.d.ts +49 -0
- package/dist/dt-list-view.stories.d.ts.map +1 -0
- package/dist/dt-markdown-editor.d.ts +54 -0
- package/dist/dt-markdown-editor.d.ts.map +1 -0
- package/dist/dt-markdown-editor.stories.d.ts +22 -0
- package/dist/dt-markdown-editor.stories.d.ts.map +1 -0
- package/dist/dt-markdown.d.ts +47 -0
- package/dist/dt-markdown.d.ts.map +1 -0
- package/dist/dt-markdown.stories.d.ts +22 -0
- package/dist/dt-markdown.stories.d.ts.map +1 -0
- package/dist/dt-select.d.ts +71 -0
- package/dist/dt-select.d.ts.map +1 -0
- package/dist/dt-select.stories.d.ts +41 -0
- package/dist/dt-select.stories.d.ts.map +1 -0
- package/dist/dt-stack.d.ts +51 -0
- package/dist/dt-stack.d.ts.map +1 -0
- package/dist/dt-stack.stories.d.ts +48 -0
- package/dist/dt-stack.stories.d.ts.map +1 -0
- package/dist/dt-stat.d.ts +61 -0
- package/dist/dt-stat.d.ts.map +1 -0
- package/dist/dt-stat.stories.d.ts +47 -0
- package/dist/dt-stat.stories.d.ts.map +1 -0
- package/dist/dt-table-view.d.ts +119 -0
- package/dist/dt-table-view.d.ts.map +1 -0
- package/dist/dt-table-view.stories.d.ts +46 -0
- package/dist/dt-table-view.stories.d.ts.map +1 -0
- package/dist/dt-tooltip.d.ts +47 -0
- package/dist/dt-tooltip.d.ts.map +1 -0
- package/dist/dt-tooltip.stories.d.ts +41 -0
- package/dist/dt-tooltip.stories.d.ts.map +1 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1681 -0
- package/dist/index.js.map +7 -0
- package/dist/lib/chart-loader.d.ts +10 -0
- package/dist/lib/chart-loader.d.ts.map +1 -0
- package/dist/lib/marked-loader.d.ts +13 -0
- package/dist/lib/marked-loader.d.ts.map +1 -0
- package/dist/lib/milkdown-loader.d.ts +12 -0
- package/dist/lib/milkdown-loader.d.ts.map +1 -0
- package/dist/lib/template-bind.d.ts +3 -0
- package/dist/lib/template-bind.d.ts.map +1 -0
- package/dist/lib/virtualizer.d.ts +35 -0
- package/dist/lib/virtualizer.d.ts.map +1 -0
- package/dist/marked-entry.d.ts +7 -0
- package/dist/marked-entry.d.ts.map +1 -0
- package/dist/marked.umd.js +61 -0
- package/dist/marked.umd.js.map +7 -0
- package/dist/milkdown-entry.d.ts +7 -0
- package/dist/milkdown-entry.d.ts.map +1 -0
- package/dist/milkdown.umd.js +1875 -0
- package/dist/milkdown.umd.js.map +7 -0
- package/dist/stores/all-components.stories.d.ts +6 -0
- package/dist/stores/all-components.stories.d.ts.map +1 -0
- package/dist/theme-css.d.ts +38 -0
- package/dist/theme-css.d.ts.map +1 -0
- package/dist/theme-css.js +193 -0
- package/dist/theme-css.js.map +7 -0
- package/dist/ui-elements.d.ts +213 -0
- package/dist/ui-elements.d.ts.map +1 -0
- package/package.json +65 -0
- package/src/fonts/OFL.txt +76 -0
- package/src/fonts/README.md +43 -0
- package/src/fonts/fonts.css +91 -0
- package/src/fonts/sora-400.ttf +0 -0
- package/src/fonts/sora-500.ttf +0 -0
- package/src/fonts/sora-600.ttf +0 -0
- package/src/fonts/sora-700.ttf +0 -0
- package/src/fonts/work-sans-400.ttf +0 -0
- package/src/fonts/work-sans-500.ttf +0 -0
- package/src/fonts/work-sans-600.ttf +0 -0
- package/src/fonts/work-sans-700.ttf +0 -0
- package/src/theme-css.ts +390 -0
- package/types.d.ts +249 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import './index';
|
|
3
|
+
type ListViewStoryArgs = {
|
|
4
|
+
itemHeight: number | null;
|
|
5
|
+
dividers: boolean;
|
|
6
|
+
selectable: 'none' | 'single' | 'multi';
|
|
7
|
+
count: number;
|
|
8
|
+
};
|
|
9
|
+
declare function createListView(args: ListViewStoryArgs): HTMLElement;
|
|
10
|
+
declare const meta: {
|
|
11
|
+
title: string;
|
|
12
|
+
tags: string[];
|
|
13
|
+
argTypes: {
|
|
14
|
+
itemHeight: {
|
|
15
|
+
control: {
|
|
16
|
+
type: "number";
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
step: number;
|
|
20
|
+
};
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
selectable: {
|
|
24
|
+
control: "inline-radio";
|
|
25
|
+
options: string[];
|
|
26
|
+
};
|
|
27
|
+
count: {
|
|
28
|
+
control: {
|
|
29
|
+
type: "number";
|
|
30
|
+
min: number;
|
|
31
|
+
max: number;
|
|
32
|
+
step: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
args: {
|
|
37
|
+
itemHeight: number;
|
|
38
|
+
dividers: true;
|
|
39
|
+
selectable: "single";
|
|
40
|
+
count: number;
|
|
41
|
+
};
|
|
42
|
+
render: typeof createListView;
|
|
43
|
+
};
|
|
44
|
+
export default meta;
|
|
45
|
+
type Story = StoryObj<ListViewStoryArgs>;
|
|
46
|
+
export declare const Playground: Story;
|
|
47
|
+
export declare const VariableHeight: Story;
|
|
48
|
+
export declare const LargeDataset: Story;
|
|
49
|
+
//# sourceMappingURL=dt-list-view.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-list-view.stories.d.ts","sourceRoot":"","sources":["../src/dt-list-view.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,SAAS,CAAC;AAEjB,KAAK,iBAAiB,GAAG;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAeF,iBAAS,cAAc,CAAC,IAAI,EAAE,iBAAiB,GAAG,WAAW,CAkC5D;AAED,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuByB,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAEzC,eAAO,MAAM,UAAU,EAAE,KAAU,CAAC;AAEpC,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export interface DtMarkdownEditorChangeDetail {
|
|
2
|
+
value: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* `<dt-markdown-editor>` — full WYSIWYG markdown editor powered by Milkdown.
|
|
6
|
+
*
|
|
7
|
+
* The component lazy-loads Milkdown on first use, injects the required editor
|
|
8
|
+
* styles into its shadow root, and exposes a simple `value` property that reads
|
|
9
|
+
* and writes markdown.
|
|
10
|
+
*
|
|
11
|
+
* ## Attributes
|
|
12
|
+
* - `placeholder` — empty-state hint text
|
|
13
|
+
* - `readonly` — when present, disables editing
|
|
14
|
+
*
|
|
15
|
+
* ## Properties
|
|
16
|
+
* - `value` — JS-only markdown value for get/set access
|
|
17
|
+
* - `readonly` — boolean reflection of the `readonly` attribute
|
|
18
|
+
*
|
|
19
|
+
* ## Events
|
|
20
|
+
* - `dt-change` — debounced content updates with `{ value }`
|
|
21
|
+
* - `dt-focus` — fired when the editor gains focus
|
|
22
|
+
* - `dt-blur` — fired when the editor loses focus
|
|
23
|
+
*/
|
|
24
|
+
export declare class DtMarkdownEditor extends HTMLElement {
|
|
25
|
+
private readonly _runtimeStyle;
|
|
26
|
+
private readonly _surface;
|
|
27
|
+
private readonly _content;
|
|
28
|
+
private readonly _status;
|
|
29
|
+
private _runtime;
|
|
30
|
+
private _loadPromise;
|
|
31
|
+
private _editor;
|
|
32
|
+
private _pendingValue;
|
|
33
|
+
private _changeTimer;
|
|
34
|
+
private _setupToken;
|
|
35
|
+
private _suppressNextChange;
|
|
36
|
+
static get observedAttributes(): string[];
|
|
37
|
+
get placeholder(): string;
|
|
38
|
+
set placeholder(value: string);
|
|
39
|
+
get readonly(): boolean;
|
|
40
|
+
set readonly(value: boolean);
|
|
41
|
+
get value(): string;
|
|
42
|
+
set value(value: string);
|
|
43
|
+
constructor();
|
|
44
|
+
connectedCallback(): void;
|
|
45
|
+
disconnectedCallback(): void;
|
|
46
|
+
attributeChangedCallback(name: string): void;
|
|
47
|
+
private _ensureRuntime;
|
|
48
|
+
private _initializeEditor;
|
|
49
|
+
private _destroyEditor;
|
|
50
|
+
private _queueChange;
|
|
51
|
+
private _clearChangeTimer;
|
|
52
|
+
private _setStatus;
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=dt-markdown-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-markdown-editor.d.ts","sourceRoot":"","sources":["../src/dt-markdown-editor.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;IAC/C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAmB;IACjD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiB;IAC1C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAiB;IAC1C,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAiB;IACzC,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,YAAY,CAA2C;IAC/D,OAAO,CAAC,OAAO,CAAgD;IAC/D,OAAO,CAAC,aAAa,CAAM;IAC3B,OAAO,CAAC,YAAY,CAA8C;IAClE,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,mBAAmB,CAAS;IAEpC,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,WAAW,CAAC,KAAK,EAAE,MAAM,EAE5B;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAE1B;IAED,IAAI,KAAK,IAAI,MAAM,CAMlB;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,MAAM,EAQtB;;IA+BD,iBAAiB,IAAI,IAAI;IAIzB,oBAAoB,IAAI,IAAI;IAM5B,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;YAW9B,cAAc;YAgBd,iBAAiB;YAyEjB,cAAc;IAc5B,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,UAAU;CASnB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import './index';
|
|
3
|
+
import './milkdown-entry';
|
|
4
|
+
type MarkdownEditorStoryArgs = {
|
|
5
|
+
placeholder: string;
|
|
6
|
+
readonly: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function createMarkdownEditorStory(args: MarkdownEditorStoryArgs): HTMLElement;
|
|
9
|
+
declare const meta: {
|
|
10
|
+
title: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
args: {
|
|
13
|
+
placeholder: string;
|
|
14
|
+
readonly: false;
|
|
15
|
+
};
|
|
16
|
+
render: typeof createMarkdownEditorStory;
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<MarkdownEditorStoryArgs>;
|
|
20
|
+
export declare const Playground: Story;
|
|
21
|
+
export declare const Readonly: Story;
|
|
22
|
+
//# sourceMappingURL=dt-markdown-editor.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-markdown-editor.stories.d.ts","sourceRoot":"","sources":["../src/dt-markdown-editor.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,SAAS,CAAC;AACjB,OAAO,kBAAkB,CAAC;AAE1B,KAAK,uBAAuB,GAAG;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,iBAAS,yBAAyB,CAAC,IAAI,EAAE,uBAAuB,GAAG,WAAW,CA+B7E;AAED,QAAA,MAAM,IAAI;;;;;;;;CAQ+B,CAAC;AAE1C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,uBAAuB,CAAC,CAAC;AAE/C,eAAO,MAAM,UAAU,EAAE,KAAU,CAAC;AAEpC,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export interface DtMarkdownLinkClickDetail {
|
|
2
|
+
href: string;
|
|
3
|
+
}
|
|
4
|
+
/**
|
|
5
|
+
* `<dt-markdown>` — themed markdown renderer for LiveApps.
|
|
6
|
+
*
|
|
7
|
+
* Markdown can be provided either inline between the tags or through the JS-only
|
|
8
|
+
* `content` property. When `streaming` is present the component appends a live
|
|
9
|
+
* caret and performs lightweight fence balancing for incomplete code blocks.
|
|
10
|
+
*
|
|
11
|
+
* ## Attributes
|
|
12
|
+
* - `streaming` — when present, shows a blinking caret for in-progress content
|
|
13
|
+
* - `unsafe-html` — when present, allows raw HTML in the markdown source
|
|
14
|
+
*
|
|
15
|
+
* ## Properties
|
|
16
|
+
* - `content` — JS-only markdown source; overrides inline light-DOM text
|
|
17
|
+
* - `streaming` — boolean reflection of the `streaming` attribute
|
|
18
|
+
*
|
|
19
|
+
* ## Events
|
|
20
|
+
* - `dt-link-click` — fired with `{ href }` when a rendered link is activated
|
|
21
|
+
*/
|
|
22
|
+
export declare class DtMarkdown extends HTMLElement {
|
|
23
|
+
private readonly _body;
|
|
24
|
+
private readonly _caret;
|
|
25
|
+
private _contentOverride;
|
|
26
|
+
private _runtime;
|
|
27
|
+
private _loadPromise;
|
|
28
|
+
private _observer;
|
|
29
|
+
private _renderFrame;
|
|
30
|
+
static get observedAttributes(): string[];
|
|
31
|
+
get content(): string;
|
|
32
|
+
set content(value: string);
|
|
33
|
+
get streaming(): boolean;
|
|
34
|
+
set streaming(value: boolean);
|
|
35
|
+
get unsafeHtml(): boolean;
|
|
36
|
+
set unsafeHtml(value: boolean);
|
|
37
|
+
constructor();
|
|
38
|
+
connectedCallback(): void;
|
|
39
|
+
disconnectedCallback(): void;
|
|
40
|
+
attributeChangedCallback(): void;
|
|
41
|
+
private _onLinkClick;
|
|
42
|
+
private _readInlineMarkdown;
|
|
43
|
+
private _scheduleRender;
|
|
44
|
+
private _ensureRuntime;
|
|
45
|
+
private _render;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=dt-markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-markdown.d.ts","sourceRoot":"","sources":["../src/dt-markdown.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAC;CACd;AAwCD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAiB;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,QAAQ,CAAgC;IAChD,OAAO,CAAC,YAAY,CAAyC;IAC7D,OAAO,CAAC,SAAS,CAAiC;IAClD,OAAO,CAAC,YAAY,CAAK;IAEzB,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAED,IAAI,OAAO,IAAI,MAAM,CAEpB;IAED,IAAI,OAAO,CAAC,KAAK,EAAE,MAAM,EAGxB;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,OAAO,EAE3B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,OAAO,EAE5B;;IAsBD,iBAAiB,IAAI,IAAI;IAmBzB,oBAAoB,IAAI,IAAI;IAS5B,wBAAwB,IAAI,IAAI;IAIhC,OAAO,CAAC,YAAY,CAiBlB;IAEF,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,eAAe;YAWT,cAAc;YAed,OAAO;CAatB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import './index';
|
|
3
|
+
import './marked-entry';
|
|
4
|
+
type MarkdownStoryArgs = {
|
|
5
|
+
streaming: boolean;
|
|
6
|
+
unsafeHtml: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare function createMarkdownStory(args: MarkdownStoryArgs): HTMLElement;
|
|
9
|
+
declare const meta: {
|
|
10
|
+
title: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
args: {
|
|
13
|
+
streaming: false;
|
|
14
|
+
unsafeHtml: false;
|
|
15
|
+
};
|
|
16
|
+
render: typeof createMarkdownStory;
|
|
17
|
+
};
|
|
18
|
+
export default meta;
|
|
19
|
+
type Story = StoryObj<MarkdownStoryArgs>;
|
|
20
|
+
export declare const Playground: Story;
|
|
21
|
+
export declare const Streaming: Story;
|
|
22
|
+
//# sourceMappingURL=dt-markdown.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-markdown.stories.d.ts","sourceRoot":"","sources":["../src/dt-markdown.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,SAAS,CAAC;AACjB,OAAO,gBAAgB,CAAC;AAExB,KAAK,iBAAiB,GAAG;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AA2CF,iBAAS,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,GAAG,WAAW,CA4BjE;AAED,QAAA,MAAM,IAAI;;;;;;;;CAQyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAEzC,eAAO,MAAM,UAAU,EAAE,KAAU,CAAC;AAEpC,eAAO,MAAM,SAAS,EAAE,KAIvB,CAAC"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/** Shape of an option passed via the `options` property. */
|
|
2
|
+
export interface DtSelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
}
|
|
6
|
+
export type DtSelectAlign = 'left' | 'right';
|
|
7
|
+
/**
|
|
8
|
+
* `<dt-select>` — framework-agnostic select/dropdown web component.
|
|
9
|
+
*
|
|
10
|
+
* Uses Shadow DOM for the trigger button and appends the dropdown menu to
|
|
11
|
+
* `document.body` so it can escape overflow/clip ancestors.
|
|
12
|
+
*
|
|
13
|
+
* ## Attributes
|
|
14
|
+
* - `value` — the currently selected option value
|
|
15
|
+
* - `placeholder` — text shown when no value is selected (default "Select...")
|
|
16
|
+
* - `disabled` — when present, interaction is suppressed
|
|
17
|
+
* - `align` — horizontal alignment of the popup relative to the trigger:
|
|
18
|
+
* "left" (default) or "right"
|
|
19
|
+
*
|
|
20
|
+
* ## Properties
|
|
21
|
+
* - `options` — `Array<{ value: string; label: string }>` set via JS
|
|
22
|
+
*
|
|
23
|
+
* ## Events
|
|
24
|
+
* - `dt-change` — fired when the user selects an option; `detail.value` is
|
|
25
|
+
* the selected value
|
|
26
|
+
*
|
|
27
|
+
* ## Usage
|
|
28
|
+
* ```html
|
|
29
|
+
* <dt-select placeholder="Choose session" value="s1" align="right"></dt-select>
|
|
30
|
+
* <script>
|
|
31
|
+
* const sel = document.querySelector('dt-select');
|
|
32
|
+
* sel.options = [
|
|
33
|
+
* { value: 's1', label: 'Session 1' },
|
|
34
|
+
* { value: 's2', label: 'Session 2' },
|
|
35
|
+
* ];
|
|
36
|
+
* sel.addEventListener('dt-change', (e) => console.log(e.detail.value));
|
|
37
|
+
* </script>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare class DtSelect extends HTMLElement {
|
|
41
|
+
private _menu;
|
|
42
|
+
private _trigger;
|
|
43
|
+
private _options;
|
|
44
|
+
private _open;
|
|
45
|
+
private _menuId;
|
|
46
|
+
static get observedAttributes(): string[];
|
|
47
|
+
get value(): string;
|
|
48
|
+
set value(val: string);
|
|
49
|
+
get placeholder(): string;
|
|
50
|
+
set placeholder(val: string);
|
|
51
|
+
get disabled(): boolean;
|
|
52
|
+
set disabled(val: boolean);
|
|
53
|
+
get align(): DtSelectAlign;
|
|
54
|
+
set align(val: DtSelectAlign);
|
|
55
|
+
get options(): DtSelectOption[];
|
|
56
|
+
set options(val: DtSelectOption[]);
|
|
57
|
+
constructor();
|
|
58
|
+
connectedCallback(): void;
|
|
59
|
+
disconnectedCallback(): void;
|
|
60
|
+
attributeChangedCallback(name: string): void;
|
|
61
|
+
private _updateLabel;
|
|
62
|
+
private _onTriggerClick;
|
|
63
|
+
private _openMenu;
|
|
64
|
+
private _close;
|
|
65
|
+
private _onOutsideClick;
|
|
66
|
+
private _onKeyDown;
|
|
67
|
+
private _renderMenuItems;
|
|
68
|
+
private _selectValue;
|
|
69
|
+
private _position;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=dt-select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-select.d.ts","sourceRoot":"","sources":["../src/dt-select.ts"],"names":[],"mappings":"AAUA,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAaD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,QAAS,SAAQ,WAAW;IAEvC,OAAO,CAAC,KAAK,CAA+B;IAC5C,OAAO,CAAC,QAAQ,CAAkC;IAClD,OAAO,CAAC,QAAQ,CAAwB;IACxC,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,OAAO,CAAM;IAGrB,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAID,IAAI,KAAK,IAAI,MAAM,CAElB;IACD,IAAI,KAAK,CAAC,GAAG,EAAE,MAAM,EAEpB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IACD,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,EAE1B;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,IAAI,QAAQ,CAAC,GAAG,EAAE,OAAO,EAMxB;IAED,IAAI,KAAK,IAAI,aAAa,CAIzB;IACD,IAAI,KAAK,CAAC,GAAG,EAAE,aAAa,EAE3B;IAID,IAAI,OAAO,IAAI,cAAc,EAAE,CAE9B;IACD,IAAI,OAAO,CAAC,GAAG,EAAE,cAAc,EAAE,EAMhC;;IAkCD,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAK5B,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAiB5C,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,eAAe,CAOrB;IAEF,OAAO,CAAC,SAAS;IA4BjB,OAAO,CAAC,MAAM;IAkBd,OAAO,CAAC,eAAe,CAKrB;IAEF,OAAO,CAAC,UAAU,CAKhB;IAIF,OAAO,CAAC,gBAAgB;IA6BxB,OAAO,CAAC,YAAY;IAmBpB,OAAO,CAAC,SAAS;CAiClB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import './index';
|
|
3
|
+
import type { DtSelectOption } from './dt-select';
|
|
4
|
+
type SelectStoryArgs = {
|
|
5
|
+
align: 'left' | 'right';
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
placeholder: string;
|
|
8
|
+
value: string;
|
|
9
|
+
options: DtSelectOption[];
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
};
|
|
12
|
+
declare function createSelect(args: SelectStoryArgs): HTMLElement;
|
|
13
|
+
declare const meta: {
|
|
14
|
+
title: string;
|
|
15
|
+
tags: string[];
|
|
16
|
+
argTypes: {
|
|
17
|
+
align: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: string[];
|
|
20
|
+
};
|
|
21
|
+
onChange: {
|
|
22
|
+
action: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
args: {
|
|
26
|
+
align: "left";
|
|
27
|
+
disabled: false;
|
|
28
|
+
placeholder: string;
|
|
29
|
+
value: string;
|
|
30
|
+
options: {
|
|
31
|
+
value: string;
|
|
32
|
+
label: string;
|
|
33
|
+
}[];
|
|
34
|
+
};
|
|
35
|
+
render: typeof createSelect;
|
|
36
|
+
};
|
|
37
|
+
export default meta;
|
|
38
|
+
type Story = StoryObj<SelectStoryArgs>;
|
|
39
|
+
export declare const Playground: Story;
|
|
40
|
+
export declare const RightAligned: Story;
|
|
41
|
+
//# sourceMappingURL=dt-select.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-select.stories.d.ts","sourceRoot":"","sources":["../src/dt-select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,KAAK,eAAe,GAAG;IACrB,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,cAAc,EAAE,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,iBAAS,YAAY,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,CAwCxD;AAED,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAyBuB,CAAC;AAElC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEvC,eAAO,MAAM,UAAU,EAAE,KAAU,CAAC;AAEpC,eAAO,MAAM,YAAY,EAAE,KAa1B,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
type StackDirection = 'column' | 'row';
|
|
2
|
+
type StackGap = '0' | '4' | '8' | '12' | '16' | '20' | '24' | '32';
|
|
3
|
+
type StackAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
4
|
+
/**
|
|
5
|
+
* `<dt-stack>` — framework-agnostic flexbox stack web component.
|
|
6
|
+
*
|
|
7
|
+
* Provides vertical or horizontal flexbox layout with responsive behavior.
|
|
8
|
+
* Row stacks automatically wrap to column on narrow views.
|
|
9
|
+
*
|
|
10
|
+
* ## Attributes
|
|
11
|
+
* - `direction` — stack direction: `column` (default) or `row`
|
|
12
|
+
* - `gap` — spacing between items: 0, 4, 8, 12, 16, 20, 24, 32 (default: 16)
|
|
13
|
+
* - `align` — cross-axis alignment: `start`, `center`, `end`, `stretch` (default: stretch)
|
|
14
|
+
*
|
|
15
|
+
* ## Usage
|
|
16
|
+
* ```html
|
|
17
|
+
* <!-- Vertical stack (default) -->
|
|
18
|
+
* <dt-stack>
|
|
19
|
+
* <dt-card>Item 1</dt-card>
|
|
20
|
+
* <dt-card>Item 2</dt-card>
|
|
21
|
+
* <dt-card>Item 3</dt-card>
|
|
22
|
+
* </dt-stack>
|
|
23
|
+
*
|
|
24
|
+
* <!-- Horizontal row (wraps to column on narrow views) -->
|
|
25
|
+
* <dt-stack direction="row" gap="24">
|
|
26
|
+
* <dt-button>Save</dt-button>
|
|
27
|
+
* <dt-button variant="secondary">Cancel</dt-button>
|
|
28
|
+
* </dt-stack>
|
|
29
|
+
*
|
|
30
|
+
* <!-- Centered horizontal row -->
|
|
31
|
+
* <dt-stack direction="row" align="center" gap="8">
|
|
32
|
+
* <dt-badge variant="success">Active</dt-badge>
|
|
33
|
+
* <span>System running</span>
|
|
34
|
+
* </dt-stack>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare class DtStack extends HTMLElement {
|
|
38
|
+
#private;
|
|
39
|
+
static get observedAttributes(): string[];
|
|
40
|
+
get direction(): StackDirection;
|
|
41
|
+
set direction(val: StackDirection);
|
|
42
|
+
get gap(): StackGap;
|
|
43
|
+
set gap(val: StackGap);
|
|
44
|
+
get align(): StackAlign;
|
|
45
|
+
set align(val: StackAlign);
|
|
46
|
+
connectedCallback(): void;
|
|
47
|
+
attributeChangedCallback(name: string): void;
|
|
48
|
+
constructor();
|
|
49
|
+
}
|
|
50
|
+
export {};
|
|
51
|
+
//# sourceMappingURL=dt-stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-stack.d.ts","sourceRoot":"","sources":["../src/dt-stack.ts"],"names":[],"mappings":"AAIA,KAAK,cAAc,GAAG,QAAQ,GAAG,KAAK,CAAC;AACvC,KAAK,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACnE,KAAK,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAUzD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,OAAQ,SAAQ,WAAW;;IAEtC,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAGD,IAAI,SAAS,IAAI,cAAc,CAE9B;IAED,IAAI,SAAS,CAAC,GAAG,EAAE,cAAc,EAEhC;IAED,IAAI,GAAG,IAAI,QAAQ,CAclB;IAED,IAAI,GAAG,CAAC,GAAG,EAAE,QAAQ,EAEpB;IAED,IAAI,KAAK,IAAI,UAAU,CAMtB;IAED,IAAI,KAAK,CAAC,GAAG,EAAE,UAAU,EAExB;IAID,iBAAiB;IAIjB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;;CA2B7C"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import './index';
|
|
3
|
+
type StackStoryArgs = {
|
|
4
|
+
direction: 'column' | 'row';
|
|
5
|
+
gap: string;
|
|
6
|
+
align: 'start' | 'center' | 'end' | 'stretch';
|
|
7
|
+
itemCount: number;
|
|
8
|
+
};
|
|
9
|
+
declare function createStack(args: StackStoryArgs): HTMLElement;
|
|
10
|
+
declare const meta: {
|
|
11
|
+
title: string;
|
|
12
|
+
tags: string[];
|
|
13
|
+
argTypes: {
|
|
14
|
+
direction: {
|
|
15
|
+
control: "inline-radio";
|
|
16
|
+
options: string[];
|
|
17
|
+
};
|
|
18
|
+
gap: {
|
|
19
|
+
control: "select";
|
|
20
|
+
options: string[];
|
|
21
|
+
};
|
|
22
|
+
align: {
|
|
23
|
+
control: "inline-radio";
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
itemCount: {
|
|
27
|
+
control: {
|
|
28
|
+
type: "number";
|
|
29
|
+
min: number;
|
|
30
|
+
max: number;
|
|
31
|
+
step: number;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
args: {
|
|
36
|
+
direction: "column";
|
|
37
|
+
gap: string;
|
|
38
|
+
align: "stretch";
|
|
39
|
+
itemCount: number;
|
|
40
|
+
};
|
|
41
|
+
render: typeof createStack;
|
|
42
|
+
};
|
|
43
|
+
export default meta;
|
|
44
|
+
type Story = StoryObj<StackStoryArgs>;
|
|
45
|
+
export declare const Playground: Story;
|
|
46
|
+
export declare const HorizontalRow: Story;
|
|
47
|
+
export declare const HorizontalCentered: Story;
|
|
48
|
+
//# sourceMappingURL=dt-stack.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-stack.stories.d.ts","sourceRoot":"","sources":["../src/dt-stack.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,SAAS,CAAC;AAEjB,KAAK,cAAc,GAAG;IACpB,SAAS,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,iBAAS,WAAW,CAAC,IAAI,EAAE,cAAc,GAAG,WAAW,CA+BtD;AAED,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BsB,CAAC;AAEjC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,cAAc,CAAC,CAAC;AAEtC,eAAO,MAAM,UAAU,EAAE,KAAU,CAAC;AAEpC,eAAO,MAAM,aAAa,EAAE,KAO3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAOhC,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
type StatSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
type StatVariant = 'default' | 'outlined' | 'filled';
|
|
3
|
+
/**
|
|
4
|
+
* `<dt-stat>` — framework-agnostic statistic/metric display web component.
|
|
5
|
+
*
|
|
6
|
+
* Displays a metric/KPI with label, value, and optional description.
|
|
7
|
+
* Designed for dashboards and system monitors.
|
|
8
|
+
*
|
|
9
|
+
* ## Attributes
|
|
10
|
+
* - `label` — the metric label (e.g., "CPU Usage", "Memory")
|
|
11
|
+
* - `value` — the metric value (e.g., "42%", "8.2 GB")
|
|
12
|
+
* - `description` — optional descriptive text
|
|
13
|
+
* - `size` — size variant: `sm`, `md` (default), `lg`
|
|
14
|
+
* - `variant` — visual style: `default`, `outlined`, `filled`
|
|
15
|
+
* - `trend` — optional trend indicator: `up`, `down`, `neutral` (shows +/− symbol)
|
|
16
|
+
* - `trend-value` — value to display with trend (e.g., "+5%")
|
|
17
|
+
*
|
|
18
|
+
* ## Usage
|
|
19
|
+
* ```html
|
|
20
|
+
* <dt-stat label="CPU Usage" value="42%"></dt-stat>
|
|
21
|
+
*
|
|
22
|
+
* <dt-stat label="Memory" value="8.2 GB" description="of 16 GB used"></dt-stat>
|
|
23
|
+
*
|
|
24
|
+
* <dt-stat label="Uptime" value="99.9%" size="lg" variant="filled"></dt-stat>
|
|
25
|
+
*
|
|
26
|
+
* <dt-stat
|
|
27
|
+
* label="Traffic"
|
|
28
|
+
* value="12.5k"
|
|
29
|
+
* description="visitors today"
|
|
30
|
+
* trend="up"
|
|
31
|
+
* trend-value="+18%"
|
|
32
|
+
* ></dt-stat>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare class DtStat extends HTMLElement {
|
|
36
|
+
static get observedAttributes(): string[];
|
|
37
|
+
private _container;
|
|
38
|
+
private _labelEl;
|
|
39
|
+
private _valueEl;
|
|
40
|
+
private _descEl;
|
|
41
|
+
private _trendEl;
|
|
42
|
+
get label(): string | null;
|
|
43
|
+
set label(val: string | null);
|
|
44
|
+
get value(): string | null;
|
|
45
|
+
set value(val: string | null);
|
|
46
|
+
get description(): string | null;
|
|
47
|
+
set description(val: string | null);
|
|
48
|
+
get size(): StatSize;
|
|
49
|
+
set size(val: StatSize);
|
|
50
|
+
get variant(): StatVariant;
|
|
51
|
+
set variant(val: StatVariant);
|
|
52
|
+
get trend(): 'up' | 'down' | 'neutral' | null;
|
|
53
|
+
set trend(val: 'up' | 'down' | 'neutral' | null);
|
|
54
|
+
get trendValue(): string | null;
|
|
55
|
+
set trendValue(val: string | null);
|
|
56
|
+
constructor();
|
|
57
|
+
attributeChangedCallback(name: string, _oldVal: string | null, _newVal: string | null): void;
|
|
58
|
+
private _render;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
61
|
+
//# sourceMappingURL=dt-stat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-stat.d.ts","sourceRoot":"","sources":["../src/dt-stat.ts"],"names":[],"mappings":"AAIA,KAAK,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACnC,KAAK,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,MAAO,SAAQ,WAAW;IAErC,MAAM,KAAK,kBAAkB,IAAI,MAAM,EAAE,CAExC;IAGD,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,QAAQ,CAAkB;IAGlC,IAAI,KAAK,IAAI,MAAM,GAAG,IAAI,CAEzB;IAED,IAAI,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAM3B;IAED,IAAI,KAAK,IAAI,MAAM,GAAG,IAAI,CAEzB;IAED,IAAI,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAM3B;IAED,IAAI,WAAW,IAAI,MAAM,GAAG,IAAI,CAE/B;IAED,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAMjC;IAED,IAAI,IAAI,IAAI,QAAQ,CAInB;IAED,IAAI,IAAI,CAAC,GAAG,EAAE,QAAQ,EAErB;IAED,IAAI,OAAO,IAAI,WAAW,CAIzB;IAED,IAAI,OAAO,CAAC,GAAG,EAAE,WAAW,EAE3B;IAED,IAAI,KAAK,IAAI,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAI5C;IAED,IAAI,KAAK,CAAC,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,EAM9C;IAED,IAAI,UAAU,IAAI,MAAM,GAAG,IAAI,CAE9B;IAED,IAAI,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,EAMhC;;IAsCD,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAc5F,OAAO,CAAC,OAAO;CA2BhB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
import './index';
|
|
3
|
+
type StatStoryArgs = {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
description: string;
|
|
7
|
+
size: 'sm' | 'md' | 'lg';
|
|
8
|
+
variant: 'default' | 'outlined' | 'filled';
|
|
9
|
+
trend: 'up' | 'down' | 'neutral' | null;
|
|
10
|
+
trendValue: string;
|
|
11
|
+
};
|
|
12
|
+
declare function createStat(args: StatStoryArgs): HTMLElement;
|
|
13
|
+
declare const meta: {
|
|
14
|
+
title: string;
|
|
15
|
+
tags: string[];
|
|
16
|
+
argTypes: {
|
|
17
|
+
size: {
|
|
18
|
+
control: "inline-radio";
|
|
19
|
+
options: string[];
|
|
20
|
+
};
|
|
21
|
+
variant: {
|
|
22
|
+
control: "inline-radio";
|
|
23
|
+
options: string[];
|
|
24
|
+
};
|
|
25
|
+
trend: {
|
|
26
|
+
control: "select";
|
|
27
|
+
options: (string | null)[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
args: {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
description: string;
|
|
34
|
+
size: "md";
|
|
35
|
+
variant: "default";
|
|
36
|
+
trend: null;
|
|
37
|
+
trendValue: string;
|
|
38
|
+
};
|
|
39
|
+
render: typeof createStat;
|
|
40
|
+
};
|
|
41
|
+
export default meta;
|
|
42
|
+
type Story = StoryObj<StatStoryArgs>;
|
|
43
|
+
export declare const Playground: Story;
|
|
44
|
+
export declare const WithTrend: Story;
|
|
45
|
+
export declare const LargeVariant: Story;
|
|
46
|
+
export declare const SizeComparison: Story;
|
|
47
|
+
//# sourceMappingURL=dt-stat.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dt-stat.stories.d.ts","sourceRoot":"","sources":["../src/dt-stat.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,SAAS,CAAC;AAEjB,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC3C,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;IACxC,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,iBAAS,UAAU,CAAC,IAAI,EAAE,aAAa,GAAG,WAAW,CAoBpD;AAED,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,CAAC;AAErC,eAAO,MAAM,UAAU,EAAE,KAAU,CAAC;AAEpC,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAkB5B,CAAC"}
|