kenikool-ui 1.0.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 +144 -0
- package/dist/cdn-auto-register.js +188 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/components/advanced/datepicker.d.ts +86 -0
- package/dist/types/components/advanced/datepicker.d.ts.map +1 -0
- package/dist/types/components/advanced/datepicker.stories.d.ts +48 -0
- package/dist/types/components/advanced/datepicker.stories.d.ts.map +1 -0
- package/dist/types/components/advanced/fileupload.d.ts +75 -0
- package/dist/types/components/advanced/fileupload.d.ts.map +1 -0
- package/dist/types/components/advanced/fileupload.stories.d.ts +46 -0
- package/dist/types/components/advanced/fileupload.stories.d.ts.map +1 -0
- package/dist/types/components/advanced/index.d.ts +4 -0
- package/dist/types/components/advanced/index.d.ts.map +1 -0
- package/dist/types/components/data/avatar.d.ts +94 -0
- package/dist/types/components/data/avatar.d.ts.map +1 -0
- package/dist/types/components/data/avatar.stories.d.ts +51 -0
- package/dist/types/components/data/avatar.stories.d.ts.map +1 -0
- package/dist/types/components/data/badge.d.ts +69 -0
- package/dist/types/components/data/badge.d.ts.map +1 -0
- package/dist/types/components/data/badge.stories.d.ts +48 -0
- package/dist/types/components/data/badge.stories.d.ts.map +1 -0
- package/dist/types/components/data/index.d.ts +5 -0
- package/dist/types/components/data/index.d.ts.map +1 -0
- package/dist/types/components/data/list.d.ts +66 -0
- package/dist/types/components/data/list.d.ts.map +1 -0
- package/dist/types/components/data/list.stories.d.ts +38 -0
- package/dist/types/components/data/list.stories.d.ts.map +1 -0
- package/dist/types/components/data/table.d.ts +70 -0
- package/dist/types/components/data/table.d.ts.map +1 -0
- package/dist/types/components/data/table.stories.d.ts +42 -0
- package/dist/types/components/data/table.stories.d.ts.map +1 -0
- package/dist/types/components/feedback/alert.d.ts +78 -0
- package/dist/types/components/feedback/alert.d.ts.map +1 -0
- package/dist/types/components/feedback/alert.stories.d.ts +35 -0
- package/dist/types/components/feedback/alert.stories.d.ts.map +1 -0
- package/dist/types/components/feedback/index.d.ts +5 -0
- package/dist/types/components/feedback/index.d.ts.map +1 -0
- package/dist/types/components/feedback/loading.d.ts +87 -0
- package/dist/types/components/feedback/loading.d.ts.map +1 -0
- package/dist/types/components/feedback/loading.stories.d.ts +48 -0
- package/dist/types/components/feedback/loading.stories.d.ts.map +1 -0
- package/dist/types/components/feedback/modal.d.ts +93 -0
- package/dist/types/components/feedback/modal.d.ts.map +1 -0
- package/dist/types/components/feedback/modal.stories.d.ts +37 -0
- package/dist/types/components/feedback/modal.stories.d.ts.map +1 -0
- package/dist/types/components/feedback/toast.d.ts +102 -0
- package/dist/types/components/feedback/toast.d.ts.map +1 -0
- package/dist/types/components/feedback/toast.stories.d.ts +51 -0
- package/dist/types/components/feedback/toast.stories.d.ts.map +1 -0
- package/dist/types/components/forms/button.d.ts +64 -0
- package/dist/types/components/forms/button.d.ts.map +1 -0
- package/dist/types/components/forms/button.stories.d.ts +52 -0
- package/dist/types/components/forms/button.stories.d.ts.map +1 -0
- package/dist/types/components/forms/checkbox.d.ts +51 -0
- package/dist/types/components/forms/checkbox.d.ts.map +1 -0
- package/dist/types/components/forms/checkbox.stories.d.ts +31 -0
- package/dist/types/components/forms/checkbox.stories.d.ts.map +1 -0
- package/dist/types/components/forms/index.d.ts +6 -0
- package/dist/types/components/forms/index.d.ts.map +1 -0
- package/dist/types/components/forms/input.d.ts +66 -0
- package/dist/types/components/forms/input.d.ts.map +1 -0
- package/dist/types/components/forms/input.stories.d.ts +49 -0
- package/dist/types/components/forms/input.stories.d.ts.map +1 -0
- package/dist/types/components/forms/radio.d.ts +51 -0
- package/dist/types/components/forms/radio.d.ts.map +1 -0
- package/dist/types/components/forms/radio.stories.d.ts +41 -0
- package/dist/types/components/forms/radio.stories.d.ts.map +1 -0
- package/dist/types/components/forms/select.d.ts +67 -0
- package/dist/types/components/forms/select.d.ts.map +1 -0
- package/dist/types/components/forms/select.stories.d.ts +42 -0
- package/dist/types/components/forms/select.stories.d.ts.map +1 -0
- package/dist/types/components/layout/card.d.ts +66 -0
- package/dist/types/components/layout/card.d.ts.map +1 -0
- package/dist/types/components/layout/card.example.d.ts +5 -0
- package/dist/types/components/layout/card.example.d.ts.map +1 -0
- package/dist/types/components/layout/card.stories.d.ts +40 -0
- package/dist/types/components/layout/card.stories.d.ts.map +1 -0
- package/dist/types/components/layout/container.d.ts +84 -0
- package/dist/types/components/layout/container.d.ts.map +1 -0
- package/dist/types/components/layout/container.stories.d.ts +40 -0
- package/dist/types/components/layout/container.stories.d.ts.map +1 -0
- package/dist/types/components/layout/grid.d.ts +76 -0
- package/dist/types/components/layout/grid.d.ts.map +1 -0
- package/dist/types/components/layout/grid.example.d.ts +11 -0
- package/dist/types/components/layout/grid.example.d.ts.map +1 -0
- package/dist/types/components/layout/grid.stories.d.ts +38 -0
- package/dist/types/components/layout/grid.stories.d.ts.map +1 -0
- package/dist/types/components/layout/index.d.ts +5 -0
- package/dist/types/components/layout/index.d.ts.map +1 -0
- package/dist/types/components/layout/stack.d.ts +82 -0
- package/dist/types/components/layout/stack.d.ts.map +1 -0
- package/dist/types/components/layout/stack.stories.d.ts +44 -0
- package/dist/types/components/layout/stack.stories.d.ts.map +1 -0
- package/dist/types/components/navigation/breadcrumbs.d.ts +62 -0
- package/dist/types/components/navigation/breadcrumbs.d.ts.map +1 -0
- package/dist/types/components/navigation/breadcrumbs.stories.d.ts +32 -0
- package/dist/types/components/navigation/breadcrumbs.stories.d.ts.map +1 -0
- package/dist/types/components/navigation/index.d.ts +4 -0
- package/dist/types/components/navigation/index.d.ts.map +1 -0
- package/dist/types/components/navigation/navbar.d.ts +66 -0
- package/dist/types/components/navigation/navbar.d.ts.map +1 -0
- package/dist/types/components/navigation/navbar.stories.d.ts +37 -0
- package/dist/types/components/navigation/navbar.stories.d.ts.map +1 -0
- package/dist/types/components/navigation/sidebar.d.ts +72 -0
- package/dist/types/components/navigation/sidebar.d.ts.map +1 -0
- package/dist/types/components/navigation/sidebar.stories.d.ts +43 -0
- package/dist/types/components/navigation/sidebar.stories.d.ts.map +1 -0
- package/dist/types/components/typography/index.d.ts +3 -0
- package/dist/types/components/typography/index.d.ts.map +1 -0
- package/dist/types/components/typography/text.d.ts +111 -0
- package/dist/types/components/typography/text.d.ts.map +1 -0
- package/dist/types/components/typography/text.stories.d.ts +48 -0
- package/dist/types/components/typography/text.stories.d.ts.map +1 -0
- package/dist/types/core/base-component.d.ts +178 -0
- package/dist/types/core/base-component.d.ts.map +1 -0
- package/dist/types/core/base-component.example.d.ts +24 -0
- package/dist/types/core/base-component.example.d.ts.map +1 -0
- package/dist/types/core/registry.d.ts +88 -0
- package/dist/types/core/registry.d.ts.map +1 -0
- package/dist/types/core/registry.example.d.ts +42 -0
- package/dist/types/core/registry.example.d.ts.map +1 -0
- package/dist/types/core/smart-defaults.d.ts +45 -0
- package/dist/types/core/smart-defaults.d.ts.map +1 -0
- package/dist/types/core/smart-defaults.example.d.ts +20 -0
- package/dist/types/core/smart-defaults.example.d.ts.map +1 -0
- package/dist/types/core/styles-parser.d.ts +107 -0
- package/dist/types/core/styles-parser.d.ts.map +1 -0
- package/dist/types/core/styles-parser.example.d.ts +10 -0
- package/dist/types/core/styles-parser.example.d.ts.map +1 -0
- package/dist/types/core/theme-system.d.ts +91 -0
- package/dist/types/core/theme-system.d.ts.map +1 -0
- package/dist/types/index.d.ts +24 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/themes/built-in-themes.d.ts +32 -0
- package/dist/types/themes/built-in-themes.d.ts.map +1 -0
- package/dist/types/themes/index.d.ts +5 -0
- package/dist/types/themes/index.d.ts.map +1 -0
- package/dist/types/types/components.d.ts +549 -0
- package/dist/types/types/components.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +379 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/types/theme-config.d.ts +674 -0
- package/dist/types/types/theme-config.d.ts.map +1 -0
- package/dist/types/types/themes.d.ts +325 -0
- package/dist/types/types/themes.d.ts.map +1 -0
- package/dist/types/types/utils.d.ts +293 -0
- package/dist/types/types/utils.d.ts.map +1 -0
- package/dist/types/types/wrappers.d.ts +335 -0
- package/dist/types/types/wrappers.d.ts.map +1 -0
- package/dist/types/utils/accessibility.d.ts +345 -0
- package/dist/types/utils/accessibility.d.ts.map +1 -0
- package/dist/types/utils/accessibility.example.d.ts +50 -0
- package/dist/types/utils/accessibility.example.d.ts.map +1 -0
- package/dist/types/utils/css-variables.d.ts +278 -0
- package/dist/types/utils/css-variables.d.ts.map +1 -0
- package/dist/types/utils/icon-system.d.ts +79 -0
- package/dist/types/utils/icon-system.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +9 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/performance.d.ts +141 -0
- package/dist/types/utils/performance.d.ts.map +1 -0
- package/dist/types/utils/security.d.ts +109 -0
- package/dist/types/utils/security.d.ts.map +1 -0
- package/dist/types/utils/validation.d.ts +84 -0
- package/dist/types/utils/validation.d.ts.map +1 -0
- package/dist/types/wrappers/angular/components.d.ts +2 -0
- package/dist/types/wrappers/angular/components.d.ts.map +1 -0
- package/dist/types/wrappers/angular/index.d.ts +6 -0
- package/dist/types/wrappers/angular/index.d.ts.map +1 -0
- package/dist/types/wrappers/angular/module.d.ts +2 -0
- package/dist/types/wrappers/angular/module.d.ts.map +1 -0
- package/dist/types/wrappers/angular/services.d.ts +2 -0
- package/dist/types/wrappers/angular/services.d.ts.map +1 -0
- package/dist/types/wrappers/angular/types.d.ts +44 -0
- package/dist/types/wrappers/angular/types.d.ts.map +1 -0
- package/dist/types/wrappers/react/components.d.ts +2 -0
- package/dist/types/wrappers/react/components.d.ts.map +1 -0
- package/dist/types/wrappers/react/hooks.d.ts +2 -0
- package/dist/types/wrappers/react/hooks.d.ts.map +1 -0
- package/dist/types/wrappers/react/index.d.ts +6 -0
- package/dist/types/wrappers/react/index.d.ts.map +1 -0
- package/dist/types/wrappers/react/provider.d.ts +2 -0
- package/dist/types/wrappers/react/provider.d.ts.map +1 -0
- package/dist/types/wrappers/react/types.d.ts +31 -0
- package/dist/types/wrappers/react/types.d.ts.map +1 -0
- package/dist/types/wrappers/vue/components.d.ts +2 -0
- package/dist/types/wrappers/vue/components.d.ts.map +1 -0
- package/dist/types/wrappers/vue/composables.d.ts +2 -0
- package/dist/types/wrappers/vue/composables.d.ts.map +1 -0
- package/dist/types/wrappers/vue/index.d.ts +6 -0
- package/dist/types/wrappers/vue/index.d.ts.map +1 -0
- package/dist/types/wrappers/vue/plugin.d.ts +2 -0
- package/dist/types/wrappers/vue/plugin.d.ts.map +1 -0
- package/dist/types/wrappers/vue/types.d.ts +38 -0
- package/dist/types/wrappers/vue/types.d.ts.map +1 -0
- package/package.json +138 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './table';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
striped: {
|
|
15
|
+
control: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
bordered: {
|
|
19
|
+
control: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
hover: {
|
|
23
|
+
control: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
compact: {
|
|
27
|
+
control: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
export declare const Default: Story;
|
|
35
|
+
export declare const Striped: Story;
|
|
36
|
+
export declare const Bordered: Story;
|
|
37
|
+
export declare const Hover: Story;
|
|
38
|
+
export declare const Compact: Story;
|
|
39
|
+
export declare const Sortable: Story;
|
|
40
|
+
export declare const Selectable: Story;
|
|
41
|
+
export declare const AllFeatures: Story;
|
|
42
|
+
//# sourceMappingURL=table.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/data/table.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,SAAS,CAAC;AAEjB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAwCnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KActB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAcnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAkBzB,CAAC"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KAlert - Alert Component
|
|
3
|
+
*
|
|
4
|
+
* An alert component with severity variants for displaying important messages.
|
|
5
|
+
* Provides different severity levels, closable functionality, and accessibility features.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Severity variants (info, success, warning, error)
|
|
9
|
+
* - Closable with close button
|
|
10
|
+
* - Title and description slots
|
|
11
|
+
* - Proper ARIA attributes and roles
|
|
12
|
+
* - Icon support for each severity level
|
|
13
|
+
* - Responsive design
|
|
14
|
+
* - Theme integration
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* <k-alert severity="warning" closable>
|
|
18
|
+
* <span slot="title">Warning</span>
|
|
19
|
+
* <span slot="description">This action cannot be undone.</span>
|
|
20
|
+
* </k-alert>
|
|
21
|
+
*/
|
|
22
|
+
import { BaseComponent } from '../../core/base-component.js';
|
|
23
|
+
import type { AccessibilityConfig } from '../../types/index.js';
|
|
24
|
+
export declare class KAlert extends BaseComponent {
|
|
25
|
+
private closeButton;
|
|
26
|
+
private titleSlot;
|
|
27
|
+
private descriptionSlot;
|
|
28
|
+
static get observedAttributes(): string[];
|
|
29
|
+
constructor();
|
|
30
|
+
/**
|
|
31
|
+
* Render the alert component
|
|
32
|
+
*/
|
|
33
|
+
render(): void;
|
|
34
|
+
/**
|
|
35
|
+
* Get icon for severity level
|
|
36
|
+
*/
|
|
37
|
+
private getSeverityIcon;
|
|
38
|
+
/**
|
|
39
|
+
* Setup event listeners for alert interactions
|
|
40
|
+
*/
|
|
41
|
+
private setupEventListeners;
|
|
42
|
+
/**
|
|
43
|
+
* Close the alert
|
|
44
|
+
*/
|
|
45
|
+
close(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Show the alert (if hidden)
|
|
48
|
+
*/
|
|
49
|
+
show(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Hide the alert (without removing from DOM)
|
|
52
|
+
*/
|
|
53
|
+
hide(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Handle attribute changes
|
|
56
|
+
*/
|
|
57
|
+
protected onAttributeChange(name: string, _oldValue: string | null, _newValue: string | null): void;
|
|
58
|
+
/**
|
|
59
|
+
* Get default styles (not implemented yet)
|
|
60
|
+
*/
|
|
61
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
62
|
+
/**
|
|
63
|
+
* Get accessibility configuration
|
|
64
|
+
*/
|
|
65
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
66
|
+
/**
|
|
67
|
+
* Static method to create and show an alert
|
|
68
|
+
*/
|
|
69
|
+
static show(message: string, options?: {
|
|
70
|
+
severity?: 'info' | 'success' | 'warning' | 'error';
|
|
71
|
+
title?: string;
|
|
72
|
+
closable?: boolean;
|
|
73
|
+
border?: boolean;
|
|
74
|
+
container?: Element;
|
|
75
|
+
}): KAlert;
|
|
76
|
+
}
|
|
77
|
+
export default KAlert;
|
|
78
|
+
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/alert.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,qBAAa,MAAO,SAAQ,aAAa;IACvC,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,SAAS,CAAgC;IACjD,OAAO,CAAC,eAAe,CAAgC;IAEvD,WAAoB,kBAAkB,IAAI,MAAM,EAAE,CAUjD;;IAMD;;OAEG;IACM,MAAM,IAAI,IAAI;IA8LvB;;OAEG;IACH,OAAO,CAAC,eAAe;IAkBvB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;OAEG;IACH,KAAK,IAAI,IAAI;IAoBb;;OAEG;IACH,IAAI,IAAI,IAAI;IAKZ;;OAEG;IACH,IAAI,IAAI,IAAI;IAKZ;;OAEG;cACgB,iBAAiB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,IAAI;IAgBP;;OAEG;IACH,gBAAgB,IAAI,aAAa;IAKjC;;OAEG;IACH,sBAAsB,IAAI,mBAAmB;IAU7C;;OAEG;IACH,MAAM,CAAC,IAAI,CACT,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QACP,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;QACpD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,CAAC,EAAE,OAAO,CAAC;KAChB,GACL,MAAM;CAkBV;AAOD,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './alert';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
severity: {
|
|
15
|
+
control: string;
|
|
16
|
+
options: string[];
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
closable: {
|
|
20
|
+
control: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
export declare const Info: Story;
|
|
28
|
+
export declare const Success: Story;
|
|
29
|
+
export declare const Warning: Story;
|
|
30
|
+
export declare const Error: Story;
|
|
31
|
+
export declare const Closable: Story;
|
|
32
|
+
export declare const WithTitle: Story;
|
|
33
|
+
export declare const AllSeverities: Story;
|
|
34
|
+
export declare const WithContent: Story;
|
|
35
|
+
//# sourceMappingURL=alert.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/alert.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,SAAS,CAAC;AAEjB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;CAsBM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,IAAI,EAAE,KAIlB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAMnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAiB3B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAYzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/index.ts"],"names":[],"mappings":"AAEA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KLoading - Loading Component
|
|
3
|
+
*
|
|
4
|
+
* A loading component with spinner and progress variants for indicating loading states.
|
|
5
|
+
* Provides different loading indicators, sizes, and accessibility features.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Spinner and progress bar variants
|
|
9
|
+
* - Size variants (xs, sm, md, lg, xl)
|
|
10
|
+
* - Color variants
|
|
11
|
+
* - Progress value support for progress bars
|
|
12
|
+
* - Label and description support
|
|
13
|
+
* - Proper ARIA attributes and screen reader announcements
|
|
14
|
+
* - Overlay mode for full-screen loading
|
|
15
|
+
* - Animation controls (play/pause)
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* <k-loading variant="spinner" size="md" label="Loading..."></k-loading>
|
|
19
|
+
* <k-loading variant="progress" value="75" max="100" label="Uploading file..."></k-loading>
|
|
20
|
+
*/
|
|
21
|
+
import { BaseComponent } from '../../core/base-component.js';
|
|
22
|
+
import type { AccessibilityConfig } from '../../types/index.js';
|
|
23
|
+
export declare class KLoading extends BaseComponent {
|
|
24
|
+
private progressBar;
|
|
25
|
+
private spinner;
|
|
26
|
+
private labelElement;
|
|
27
|
+
static get observedAttributes(): string[];
|
|
28
|
+
constructor();
|
|
29
|
+
/**
|
|
30
|
+
* Render the loading component
|
|
31
|
+
*/
|
|
32
|
+
render(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Render the appropriate loading indicator based on variant
|
|
35
|
+
*/
|
|
36
|
+
private renderLoadingIndicator;
|
|
37
|
+
/**
|
|
38
|
+
* Announce loading state to screen readers
|
|
39
|
+
*/
|
|
40
|
+
private announceLoadingState;
|
|
41
|
+
/**
|
|
42
|
+
* Update progress value
|
|
43
|
+
*/
|
|
44
|
+
updateProgress(value: number, max?: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Start/resume animations
|
|
47
|
+
*/
|
|
48
|
+
play(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Pause animations
|
|
51
|
+
*/
|
|
52
|
+
pause(): void;
|
|
53
|
+
/**
|
|
54
|
+
* Show the loading indicator
|
|
55
|
+
*/
|
|
56
|
+
show(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Hide the loading indicator
|
|
59
|
+
*/
|
|
60
|
+
hide(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Handle attribute changes
|
|
63
|
+
*/
|
|
64
|
+
protected onAttributeChange(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
65
|
+
/**
|
|
66
|
+
* Get default styles (not implemented yet)
|
|
67
|
+
*/
|
|
68
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
69
|
+
/**
|
|
70
|
+
* Get accessibility configuration
|
|
71
|
+
*/
|
|
72
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
73
|
+
/**
|
|
74
|
+
* Static method to create and show a loading indicator
|
|
75
|
+
*/
|
|
76
|
+
static show(options?: {
|
|
77
|
+
variant?: 'spinner' | 'progress' | 'dots' | 'pulse';
|
|
78
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
79
|
+
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
80
|
+
label?: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
overlay?: boolean;
|
|
83
|
+
container?: Element;
|
|
84
|
+
}): KLoading;
|
|
85
|
+
}
|
|
86
|
+
export default KLoading;
|
|
87
|
+
//# sourceMappingURL=loading.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/loading.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,qBAAa,QAAS,SAAQ,aAAa;IACzC,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,OAAO,CAA4B;IAC3C,OAAO,CAAC,YAAY,CAA4B;IAEhD,WAAoB,kBAAkB,IAAI,MAAM,EAAE,CAajD;;IAMD;;OAEG;IACM,MAAM,IAAI,IAAI;IAwTvB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAwB9B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAkB5B;;OAEG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI;IA2BjD;;OAEG;IACH,IAAI,IAAI,IAAI;IAIZ;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,IAAI,IAAI,IAAI;IAKZ;;OAEG;IACH,IAAI,IAAI,IAAI;IAKZ;;OAEG;cACgB,iBAAiB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI;IAiCP;;OAEG;IACH,gBAAgB,IAAI,aAAa;IAKjC;;OAEG;IACH,sBAAsB,IAAI,mBAAmB;IAkB7C;;OAEG;IACH,MAAM,CAAC,IAAI,CACT,OAAO,GAAE;QACP,OAAO,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,CAAC;QACpD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QACxC,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;QAClE,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;KAChB,GACL,QAAQ;CAiBZ;AAOD,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './loading';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
variant: {
|
|
15
|
+
control: string;
|
|
16
|
+
options: string[];
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
size: {
|
|
20
|
+
control: string;
|
|
21
|
+
options: string[];
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
color: {
|
|
25
|
+
control: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
progress: {
|
|
29
|
+
control: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export default meta;
|
|
35
|
+
type Story = StoryObj<typeof meta>;
|
|
36
|
+
export declare const Spinner: Story;
|
|
37
|
+
export declare const Dots: Story;
|
|
38
|
+
export declare const Bars: Story;
|
|
39
|
+
export declare const Progress: Story;
|
|
40
|
+
export declare const SmallSpinner: Story;
|
|
41
|
+
export declare const MediumSpinner: Story;
|
|
42
|
+
export declare const LargeSpinner: Story;
|
|
43
|
+
export declare const AllSizes: Story;
|
|
44
|
+
export declare const AllVariants: Story;
|
|
45
|
+
export declare const ProgressVariations: Story;
|
|
46
|
+
export declare const WithText: Story;
|
|
47
|
+
export declare const ProgressWithText: Story;
|
|
48
|
+
//# sourceMappingURL=loading.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loading.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/loading.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,WAAW,CAAC;AAEnB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAE1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAuBtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAiBzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAyBhC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAO9B,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KModal - Modal Dialog Component
|
|
3
|
+
*
|
|
4
|
+
* A modal dialog component with backdrop, focus trap, and ESC handling.
|
|
5
|
+
* Provides size variants, closable attribute, and proper ARIA attributes.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Backdrop with click-to-close
|
|
9
|
+
* - Focus trap for accessibility
|
|
10
|
+
* - ESC key handling
|
|
11
|
+
* - Size variants (xs, sm, md, lg, xl, full)
|
|
12
|
+
* - Closable attribute control
|
|
13
|
+
* - Proper ARIA attributes and focus management
|
|
14
|
+
* - Body scroll lock when open
|
|
15
|
+
* - Animation support
|
|
16
|
+
*
|
|
17
|
+
* Usage:
|
|
18
|
+
* <k-modal open size="md" closable>
|
|
19
|
+
* <h2>Modal Title</h2>
|
|
20
|
+
* <p>Modal content goes here</p>
|
|
21
|
+
* </k-modal>
|
|
22
|
+
*/
|
|
23
|
+
import { BaseComponent } from '../../core/base-component.js';
|
|
24
|
+
import type { AccessibilityConfig } from '../../types/index.js';
|
|
25
|
+
export declare class KModal extends BaseComponent {
|
|
26
|
+
private backdrop;
|
|
27
|
+
private dialog;
|
|
28
|
+
private closeButton;
|
|
29
|
+
private focusTrap;
|
|
30
|
+
private previouslyFocused;
|
|
31
|
+
private keydownHandler;
|
|
32
|
+
private backdropClickHandler;
|
|
33
|
+
static get observedAttributes(): string[];
|
|
34
|
+
constructor();
|
|
35
|
+
/**
|
|
36
|
+
* Render the modal component
|
|
37
|
+
*/
|
|
38
|
+
render(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Setup event listeners for modal interactions
|
|
41
|
+
*/
|
|
42
|
+
private setupEventListeners;
|
|
43
|
+
/**
|
|
44
|
+
* Handle backdrop click
|
|
45
|
+
*/
|
|
46
|
+
private handleBackdropClick;
|
|
47
|
+
/**
|
|
48
|
+
* Handle keyboard events
|
|
49
|
+
*/
|
|
50
|
+
private handleKeydown;
|
|
51
|
+
/**
|
|
52
|
+
* Handle modal opening
|
|
53
|
+
*/
|
|
54
|
+
private handleOpen;
|
|
55
|
+
/**
|
|
56
|
+
* Handle modal closing
|
|
57
|
+
*/
|
|
58
|
+
private handleClose;
|
|
59
|
+
/**
|
|
60
|
+
* Open the modal
|
|
61
|
+
*/
|
|
62
|
+
open(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Close the modal
|
|
65
|
+
*/
|
|
66
|
+
close(): void;
|
|
67
|
+
/**
|
|
68
|
+
* Toggle the modal open/closed state
|
|
69
|
+
*/
|
|
70
|
+
toggle(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Focus the modal dialog
|
|
73
|
+
*/
|
|
74
|
+
focus(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Handle attribute changes
|
|
77
|
+
*/
|
|
78
|
+
protected onAttributeChange(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
79
|
+
/**
|
|
80
|
+
* Cleanup when component is disconnected
|
|
81
|
+
*/
|
|
82
|
+
protected cleanup(): void;
|
|
83
|
+
/**
|
|
84
|
+
* Get default styles (not implemented yet)
|
|
85
|
+
*/
|
|
86
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
87
|
+
/**
|
|
88
|
+
* Get accessibility configuration
|
|
89
|
+
*/
|
|
90
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
91
|
+
}
|
|
92
|
+
export default KModal;
|
|
93
|
+
//# sourceMappingURL=modal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/modal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAa,MAAM,sBAAsB,CAAC;AAG3E,qBAAa,MAAO,SAAQ,aAAa;IACvC,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,iBAAiB,CAAwB;IACjD,OAAO,CAAC,cAAc,CAAiC;IACvD,OAAO,CAAC,oBAAoB,CAA8B;IAE1D,WAAoB,kBAAkB,IAAI,MAAM,EAAE,CASjD;;IAUD;;OAEG;IACM,MAAM,IAAI,IAAI;IAsMvB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAM3B;;OAEG;IACH,OAAO,CAAC,aAAa;IAWrB;;OAEG;IACH,OAAO,CAAC,UAAU;IAoClB;;OAEG;IACH,OAAO,CAAC,WAAW;IAuBnB;;OAEG;IACH,IAAI,IAAI,IAAI;IAIZ;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;OAEG;IACH,MAAM,IAAI,IAAI;IAQd;;OAEG;IACM,KAAK,IAAI,IAAI;IAMtB;;OAEG;cACgB,iBAAiB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI;IA2BP;;OAEG;cACgB,OAAO,IAAI,IAAI;IAwBlC;;OAEG;IACH,gBAAgB,IAAI,aAAa;IAKjC;;OAEG;IACH,sBAAsB,IAAI,mBAAmB;CA2B9C;AAOD,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './modal';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
open: {
|
|
15
|
+
control: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
closable: {
|
|
19
|
+
control: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
size: {
|
|
23
|
+
control: string;
|
|
24
|
+
options: string[];
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
export declare const Default: Story;
|
|
32
|
+
export declare const Sizes: Story;
|
|
33
|
+
export declare const WithForm: Story;
|
|
34
|
+
export declare const Confirmation: Story;
|
|
35
|
+
export declare const WithContent: Story;
|
|
36
|
+
export declare const Closable: Story;
|
|
37
|
+
//# sourceMappingURL=modal.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modal.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/modal.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,SAAS,CAAC;AAEjB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;CA0BM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAarB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAsCnB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAkCtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAe1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAqBzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KToast - Toast Notification Component
|
|
3
|
+
*
|
|
4
|
+
* A toast notification component with auto-dismiss and positioning options.
|
|
5
|
+
* Provides severity variants, positioning, and accessibility features.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Auto-dismiss with configurable timeout
|
|
9
|
+
* - Positioning (top-left, top-center, top-right, bottom-left, bottom-center, bottom-right)
|
|
10
|
+
* - Severity variants (info, success, warning, error)
|
|
11
|
+
* - Closable with close button
|
|
12
|
+
* - Proper ARIA attributes and screen reader announcements
|
|
13
|
+
* - Animation support with slide-in/fade-out
|
|
14
|
+
* - Stack management for multiple toasts
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* <k-toast severity="success" position="top-right" timeout="5000" closable>
|
|
18
|
+
* Operation completed successfully!
|
|
19
|
+
* </k-toast>
|
|
20
|
+
*/
|
|
21
|
+
import { BaseComponent } from '../../core/base-component.js';
|
|
22
|
+
import type { AccessibilityConfig } from '../../types/index.js';
|
|
23
|
+
export declare class KToast extends BaseComponent {
|
|
24
|
+
private container;
|
|
25
|
+
private closeButton;
|
|
26
|
+
private timeoutId;
|
|
27
|
+
private isVisible;
|
|
28
|
+
static get observedAttributes(): string[];
|
|
29
|
+
constructor();
|
|
30
|
+
/**
|
|
31
|
+
* Setup the global toast container if it doesn't exist
|
|
32
|
+
*/
|
|
33
|
+
private setupToastContainer;
|
|
34
|
+
/**
|
|
35
|
+
* Render the toast component
|
|
36
|
+
*/
|
|
37
|
+
render(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Get icon for severity level
|
|
40
|
+
*/
|
|
41
|
+
private getSeverityIcon;
|
|
42
|
+
/**
|
|
43
|
+
* Setup event listeners for toast interactions
|
|
44
|
+
*/
|
|
45
|
+
private setupEventListeners;
|
|
46
|
+
/**
|
|
47
|
+
* Show the toast
|
|
48
|
+
*/
|
|
49
|
+
show(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Hide the toast
|
|
52
|
+
*/
|
|
53
|
+
hide(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Move toast to the appropriate container based on position
|
|
56
|
+
*/
|
|
57
|
+
private moveToContainer;
|
|
58
|
+
/**
|
|
59
|
+
* Setup auto-hide timeout
|
|
60
|
+
*/
|
|
61
|
+
private setupAutoHide;
|
|
62
|
+
/**
|
|
63
|
+
* Clear auto-hide timeout
|
|
64
|
+
*/
|
|
65
|
+
private clearAutoHide;
|
|
66
|
+
/**
|
|
67
|
+
* Pause auto-hide (on hover/focus)
|
|
68
|
+
*/
|
|
69
|
+
private pauseAutoHide;
|
|
70
|
+
/**
|
|
71
|
+
* Resume auto-hide (on mouse leave/blur)
|
|
72
|
+
*/
|
|
73
|
+
private resumeAutoHide;
|
|
74
|
+
/**
|
|
75
|
+
* Handle attribute changes
|
|
76
|
+
*/
|
|
77
|
+
protected onAttributeChange(name: string, _oldValue: string | null, newValue: string | null): void;
|
|
78
|
+
/**
|
|
79
|
+
* Cleanup when component is disconnected
|
|
80
|
+
*/
|
|
81
|
+
protected cleanup(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Get default styles (not implemented yet)
|
|
84
|
+
*/
|
|
85
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
86
|
+
/**
|
|
87
|
+
* Get accessibility configuration
|
|
88
|
+
*/
|
|
89
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
90
|
+
/**
|
|
91
|
+
* Static method to create and show a toast
|
|
92
|
+
*/
|
|
93
|
+
static show(message: string, options?: {
|
|
94
|
+
severity?: 'info' | 'success' | 'warning' | 'error';
|
|
95
|
+
position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
96
|
+
timeout?: number;
|
|
97
|
+
closable?: boolean;
|
|
98
|
+
persistent?: boolean;
|
|
99
|
+
}): KToast;
|
|
100
|
+
}
|
|
101
|
+
export default KToast;
|
|
102
|
+
//# sourceMappingURL=toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,qBAAa,MAAO,SAAQ,aAAa;IACvC,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,SAAS,CAAuB;IACxC,OAAO,CAAC,SAAS,CAAkB;IAEnC,WAAoB,kBAAkB,IAAI,MAAM,EAAE,CAUjD;;IAOD;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAqB3B;;OAEG;IACM,MAAM,IAAI,IAAI;IAkKvB;;OAEG;IACH,OAAO,CAAC,eAAe;IAkBvB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA2B3B;;OAEG;IACH,IAAI,IAAI,IAAI;IAqBZ;;OAEG;IACH,IAAI,IAAI,IAAI;IAoBZ;;OAEG;IACH,OAAO,CAAC,eAAe;IASvB;;OAEG;IACH,OAAO,CAAC,aAAa;IAWrB;;OAEG;IACH,OAAO,CAAC,aAAa;IAOrB;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAMtB;;OAEG;cACgB,iBAAiB,CAClC,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,GAAG,IAAI,EACxB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI;IAsBP;;OAEG;cACgB,OAAO,IAAI,IAAI;IAKlC;;OAEG;IACH,gBAAgB,IAAI,aAAa;IAKjC;;OAEG;IACH,sBAAsB,IAAI,mBAAmB;IAU7C;;OAEG;IACH,MAAM,CAAC,IAAI,CACT,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QACP,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;QACpD,QAAQ,CAAC,EACL,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,UAAU,CAAC,EAAE,OAAO,CAAC;KACjB,GACL,MAAM;CAmBV;AAOD,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './toast';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: string;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
argTypes: {
|
|
14
|
+
type: {
|
|
15
|
+
control: string;
|
|
16
|
+
options: string[];
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
duration: {
|
|
20
|
+
control: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
position: {
|
|
24
|
+
control: string;
|
|
25
|
+
options: string[];
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
closable: {
|
|
29
|
+
control: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export default meta;
|
|
35
|
+
type Story = StoryObj<typeof meta>;
|
|
36
|
+
export declare const Success: Story;
|
|
37
|
+
export declare const Error: Story;
|
|
38
|
+
export declare const Warning: Story;
|
|
39
|
+
export declare const Info: Story;
|
|
40
|
+
export declare const Closable: Story;
|
|
41
|
+
export declare const LongDuration: Story;
|
|
42
|
+
export declare const ShortDuration: Story;
|
|
43
|
+
export declare const TopLeft: Story;
|
|
44
|
+
export declare const TopCenter: Story;
|
|
45
|
+
export declare const TopRight: Story;
|
|
46
|
+
export declare const BottomLeft: Story;
|
|
47
|
+
export declare const BottomCenter: Story;
|
|
48
|
+
export declare const BottomRight: Story;
|
|
49
|
+
export declare const WithLongMessage: Story;
|
|
50
|
+
export declare const AllTypes: Story;
|
|
51
|
+
//# sourceMappingURL=toast.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/feedback/toast.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,SAAS,CAAC;AAEjB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAGrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAGnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAGlB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAK3B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAGrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAK1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAKzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAO7B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC"}
|