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 @@
|
|
|
1
|
+
{"version":3,"file":"card.example.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card.example.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAG/B,wBAAgB,kBAAkB,IAAI,WAAW,CA0DhD;AAGD,wBAAgB,kBAAkB,IAAI,IAAI,CAsCzC;AAGD,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './card';
|
|
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
|
+
padding: {
|
|
15
|
+
control: string;
|
|
16
|
+
options: string[];
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
shadow: {
|
|
20
|
+
control: string;
|
|
21
|
+
options: string[];
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
border: {
|
|
25
|
+
control: string;
|
|
26
|
+
options: string[];
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
type Story = StoryObj<typeof meta>;
|
|
33
|
+
export declare const Default: Story;
|
|
34
|
+
export declare const WithPadding: Story;
|
|
35
|
+
export declare const WithShadow: Story;
|
|
36
|
+
export declare const WithBorder: Story;
|
|
37
|
+
export declare const Interactive: Story;
|
|
38
|
+
export declare const WithContent: Story;
|
|
39
|
+
export declare const Grid: Story;
|
|
40
|
+
//# sourceMappingURL=card.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"card.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/card.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,QAAQ,CAAC;AAEhB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAiBzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAqBxB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAiBlB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { BaseComponent } from '../../core/base-component';
|
|
2
|
+
import { AccessibilityConfig } from '../../types';
|
|
3
|
+
import type { KContainerProps } from '../../types/components';
|
|
4
|
+
/**
|
|
5
|
+
* KContainer - A responsive container component with max-width and centering
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <k-container>
|
|
10
|
+
* <p>This content is contained and centered</p>
|
|
11
|
+
* </k-container>
|
|
12
|
+
*
|
|
13
|
+
* <k-container size="lg" center>
|
|
14
|
+
* <h1>Large centered container</h1>
|
|
15
|
+
* </k-container>
|
|
16
|
+
*
|
|
17
|
+
* <k-container size="full" styles="no-padding">
|
|
18
|
+
* <div>Full width container without padding</div>
|
|
19
|
+
* </k-container>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class KContainer extends BaseComponent {
|
|
23
|
+
static get observedAttributes(): string[];
|
|
24
|
+
get size(): KContainerProps['size'];
|
|
25
|
+
set size(value: KContainerProps['size']);
|
|
26
|
+
get center(): boolean;
|
|
27
|
+
set center(value: boolean);
|
|
28
|
+
render(): void;
|
|
29
|
+
/**
|
|
30
|
+
* Get max-width value based on size attribute
|
|
31
|
+
*/
|
|
32
|
+
private getMaxWidth;
|
|
33
|
+
/**
|
|
34
|
+
* Get padding value based on responsive breakpoints
|
|
35
|
+
*/
|
|
36
|
+
private getPadding;
|
|
37
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
38
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
39
|
+
protected onAttributeChange(name: string, oldValue: string | null, newValue: string | null): void;
|
|
40
|
+
setSize(size: KContainerProps['size']): void;
|
|
41
|
+
setCenter(center: boolean): void;
|
|
42
|
+
/**
|
|
43
|
+
* Get the current computed max-width
|
|
44
|
+
*/
|
|
45
|
+
getComputedMaxWidth(): string;
|
|
46
|
+
/**
|
|
47
|
+
* Get the current computed width
|
|
48
|
+
*/
|
|
49
|
+
getComputedWidth(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Check if the container is currently centered
|
|
52
|
+
*/
|
|
53
|
+
isCentered(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Get container breakpoint information
|
|
56
|
+
*/
|
|
57
|
+
getBreakpointInfo(): {
|
|
58
|
+
current: string;
|
|
59
|
+
maxWidth: string;
|
|
60
|
+
isCentered: boolean;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Set responsive padding based on screen size
|
|
64
|
+
*/
|
|
65
|
+
updateResponsivePadding(): void;
|
|
66
|
+
/**
|
|
67
|
+
* Override observeThemeChanges to be test-friendly
|
|
68
|
+
*/
|
|
69
|
+
protected observeThemeChanges(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Override connectedCallback to add resize listener
|
|
72
|
+
*/
|
|
73
|
+
connectedCallback(): void;
|
|
74
|
+
/**
|
|
75
|
+
* Override disconnectedCallback to remove resize listener
|
|
76
|
+
*/
|
|
77
|
+
disconnectedCallback(): void;
|
|
78
|
+
/**
|
|
79
|
+
* Handle window resize events
|
|
80
|
+
*/
|
|
81
|
+
private handleResize;
|
|
82
|
+
}
|
|
83
|
+
export default KContainer;
|
|
84
|
+
//# sourceMappingURL=container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,UAAW,SAAQ,aAAa;IAC3C,WAAoB,kBAAkB,IAAI,MAAM,EAAE,CAEjD;IAGD,IAAI,IAAI,IAAI,eAAe,CAAC,MAAM,CAAC,CAElC;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC,MAAM,CAAC,EAMtC;IAED,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,IAAI,MAAM,CAAC,KAAK,EAAE,OAAO,EAMxB;IAEe,MAAM,IAAI,IAAI;IAsJ9B;;OAEG;IACH,OAAO,CAAC,WAAW;IAYnB;;OAEG;IACH,OAAO,CAAC,UAAU;IAKF,sBAAsB,IAAI,mBAAmB;IA6BtD,gBAAgB,IAAI,aAAa;cAKrB,iBAAiB,CAClC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI;IAUA,OAAO,CAAC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG,IAAI;IAI5C,SAAS,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAIvC;;OAEG;IACI,mBAAmB,IAAI,MAAM;IAOpC;;OAEG;IACI,gBAAgB,IAAI,MAAM;IAOjC;;OAEG;IACI,UAAU,IAAI,OAAO;IAI5B;;OAEG;IACI,iBAAiB,IAAI;QAC1B,OAAO,EAAE,MAAM,CAAC;QAChB,QAAQ,EAAE,MAAM,CAAC;QACjB,UAAU,EAAE,OAAO,CAAC;KACrB;IAqBD;;OAEG;IACI,uBAAuB,IAAI,IAAI;IAetC;;OAEG;cACgB,mBAAmB,IAAI,IAAI;IAW9C;;OAEG;IACM,iBAAiB,IAAI,IAAI;IASlC;;OAEG;IACM,oBAAoB,IAAI,IAAI;IASrC;;OAEG;IACH,OAAO,CAAC,YAAY;CAGrB;AAQD,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './container';
|
|
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
|
+
maxWidth: {
|
|
15
|
+
control: string;
|
|
16
|
+
options: string[];
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
centered: {
|
|
20
|
+
control: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
padding: {
|
|
24
|
+
control: string;
|
|
25
|
+
options: string[];
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
export declare const Default: Story;
|
|
33
|
+
export declare const Small: Story;
|
|
34
|
+
export declare const Large: Story;
|
|
35
|
+
export declare const Full: Story;
|
|
36
|
+
export declare const Centered: Story;
|
|
37
|
+
export declare const WithPadding: Story;
|
|
38
|
+
export declare const Responsive: Story;
|
|
39
|
+
export declare const NestedContainers: Story;
|
|
40
|
+
//# sourceMappingURL=container.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/container.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,aAAa,CAAC;AAErB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KASnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KASnB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KASlB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KA6BzB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAaxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAc9B,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { BaseComponent } from '../../core/base-component';
|
|
2
|
+
import { AccessibilityConfig } from '../../types';
|
|
3
|
+
import type { KGridProps } from '../../types/components';
|
|
4
|
+
/**
|
|
5
|
+
* KGrid - A responsive grid layout component with CSS Grid
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <k-grid>
|
|
10
|
+
* <div>Item 1</div>
|
|
11
|
+
* <div>Item 2</div>
|
|
12
|
+
* <div>Item 3</div>
|
|
13
|
+
* </k-grid>
|
|
14
|
+
*
|
|
15
|
+
* <k-grid cols="3" gap="lg">
|
|
16
|
+
* <div>Item 1</div>
|
|
17
|
+
* <div>Item 2</div>
|
|
18
|
+
* <div>Item 3</div>
|
|
19
|
+
* </k-grid>
|
|
20
|
+
*
|
|
21
|
+
* <k-grid cols="repeat(auto-fit, minmax(250px, 1fr))" responsive>
|
|
22
|
+
* <div>Responsive Item 1</div>
|
|
23
|
+
* <div>Responsive Item 2</div>
|
|
24
|
+
* </k-grid>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class KGrid extends BaseComponent {
|
|
28
|
+
static get observedAttributes(): string[];
|
|
29
|
+
get cols(): KGridProps['cols'];
|
|
30
|
+
set cols(value: KGridProps['cols']);
|
|
31
|
+
get gap(): 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
32
|
+
set gap(value: KGridProps['gap']);
|
|
33
|
+
get responsive(): boolean;
|
|
34
|
+
set responsive(value: boolean);
|
|
35
|
+
render(): void;
|
|
36
|
+
/**
|
|
37
|
+
* Get CSS grid-template-columns value based on cols attribute
|
|
38
|
+
*/
|
|
39
|
+
private getGridColumns;
|
|
40
|
+
/**
|
|
41
|
+
* Get CSS gap value based on gap attribute
|
|
42
|
+
*/
|
|
43
|
+
private getGapValue;
|
|
44
|
+
/**
|
|
45
|
+
* Generate responsive CSS for mobile-first breakpoints
|
|
46
|
+
*/
|
|
47
|
+
private getResponsiveCSS;
|
|
48
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
49
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
50
|
+
protected onAttributeChange(name: string, oldValue: string | null, newValue: string | null): void;
|
|
51
|
+
/**
|
|
52
|
+
* Setup keyboard navigation for grid items
|
|
53
|
+
*/
|
|
54
|
+
private setupKeyboardNavigation;
|
|
55
|
+
setCols(cols: KGridProps['cols']): void;
|
|
56
|
+
setGap(gap: KGridProps['gap']): void;
|
|
57
|
+
setResponsive(responsive: boolean): void;
|
|
58
|
+
/**
|
|
59
|
+
* Get the number of columns currently displayed (useful for responsive grids)
|
|
60
|
+
*/
|
|
61
|
+
getColumnCount(): number;
|
|
62
|
+
/**
|
|
63
|
+
* Get grid item positions for advanced layouts
|
|
64
|
+
*/
|
|
65
|
+
getGridItems(): Array<{
|
|
66
|
+
element: Element;
|
|
67
|
+
row: number;
|
|
68
|
+
column: number;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
* Override observeThemeChanges to be test-friendly
|
|
72
|
+
*/
|
|
73
|
+
protected observeThemeChanges(): void;
|
|
74
|
+
}
|
|
75
|
+
export default KGrid;
|
|
76
|
+
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/grid.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,KAAM,SAAQ,aAAa;IACtC,WAAoB,kBAAkB,IAAI,MAAM,EAAE,CAEjD;IAGD,IAAI,IAAI,IAAI,UAAU,CAAC,MAAM,CAAC,CAE7B;IAED,IAAI,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,MAAM,CAAC,EAMjC;IAED,IAAI,GAAG,IAAI,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAG1C;IAED,IAAI,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,EAM/B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,UAAU,CAAC,KAAK,EAAE,OAAO,EAM5B;IAEe,MAAM,IAAI,IAAI;IA8F9B;;OAEG;IACH,OAAO,CAAC,cAAc;IAgCtB;;OAEG;IACH,OAAO,CAAC,WAAW;IAanB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA2CR,sBAAsB,IAAI,mBAAmB;IAqBtD,gBAAgB,IAAI,aAAa;cAKrB,iBAAiB,CAClC,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,IAAI;IASP;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAkDxB,OAAO,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI;IAIvC,MAAM,CAAC,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI;IAIpC,aAAa,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAI/C;;OAEG;IACI,cAAc,IAAI,MAAM;IAY/B;;OAEG;IACI,YAAY,IAAI,KAAK,CAAC;QAC3B,OAAO,EAAE,OAAO,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IAwBF;;OAEG;cACgB,mBAAmB,IAAI,IAAI;CAa/C;AAQD,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import './grid';
|
|
2
|
+
/**
|
|
3
|
+
* Create comprehensive examples for the KGrid component
|
|
4
|
+
*/
|
|
5
|
+
export declare function createGridExamples(): HTMLElement;
|
|
6
|
+
/**
|
|
7
|
+
* Demonstrate the KGrid API programmatically
|
|
8
|
+
*/
|
|
9
|
+
export declare function demonstrateGridAPI(): void;
|
|
10
|
+
export { KGrid } from './grid';
|
|
11
|
+
//# sourceMappingURL=grid.example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.example.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/grid.example.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,CAAC;AAGhB;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,WAAW,CAuIhD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAyDzC;AA4DD,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './grid';
|
|
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
|
+
cols: {
|
|
15
|
+
control: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
gap: {
|
|
19
|
+
control: string;
|
|
20
|
+
options: string[];
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
responsive: {
|
|
24
|
+
control: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
export declare const TwoColumns: Story;
|
|
32
|
+
export declare const ThreeColumns: Story;
|
|
33
|
+
export declare const FourColumns: Story;
|
|
34
|
+
export declare const WithGaps: Story;
|
|
35
|
+
export declare const Responsive: Story;
|
|
36
|
+
export declare const AutoFit: Story;
|
|
37
|
+
export declare const WithCards: Story;
|
|
38
|
+
//# sourceMappingURL=grid.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grid.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/grid.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,QAAQ,CAAC;AAEhB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;CAyBM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAUnC,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAO1B,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAQzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAmCtB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAOxB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAOrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/index.ts"],"names":[],"mappings":"AAEA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { BaseComponent } from '../../core/base-component';
|
|
2
|
+
import { AccessibilityConfig } from '../../types';
|
|
3
|
+
import type { KStackProps } from '../../types/components';
|
|
4
|
+
/**
|
|
5
|
+
* KStack - A flexible layout component for vertical and horizontal stacking
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <k-stack>
|
|
10
|
+
* <div>Item 1</div>
|
|
11
|
+
* <div>Item 2</div>
|
|
12
|
+
* <div>Item 3</div>
|
|
13
|
+
* </k-stack>
|
|
14
|
+
*
|
|
15
|
+
* <k-stack direction="row" gap="lg" align="center">
|
|
16
|
+
* <button>Button 1</button>
|
|
17
|
+
* <button>Button 2</button>
|
|
18
|
+
* </k-stack>
|
|
19
|
+
*
|
|
20
|
+
* <k-stack direction="column" justify="between" styles="stretch">
|
|
21
|
+
* <header>Header</header>
|
|
22
|
+
* <main>Content</main>
|
|
23
|
+
* <footer>Footer</footer>
|
|
24
|
+
* </k-stack>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare class KStack extends BaseComponent {
|
|
28
|
+
static get observedAttributes(): string[];
|
|
29
|
+
get direction(): KStackProps['direction'];
|
|
30
|
+
set direction(value: KStackProps['direction']);
|
|
31
|
+
get gap(): KStackProps['gap'];
|
|
32
|
+
set gap(value: KStackProps['gap']);
|
|
33
|
+
get align(): KStackProps['align'];
|
|
34
|
+
set align(value: KStackProps['align']);
|
|
35
|
+
get justify(): KStackProps['justify'];
|
|
36
|
+
set justify(value: KStackProps['justify']);
|
|
37
|
+
get wrap(): boolean;
|
|
38
|
+
set wrap(value: boolean);
|
|
39
|
+
render(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Get CSS gap value based on gap attribute
|
|
42
|
+
*/
|
|
43
|
+
private getGapValue;
|
|
44
|
+
/**
|
|
45
|
+
* Get CSS align-items value based on align attribute
|
|
46
|
+
*/
|
|
47
|
+
private getAlignItemsValue;
|
|
48
|
+
/**
|
|
49
|
+
* Get CSS justify-content value based on justify attribute
|
|
50
|
+
*/
|
|
51
|
+
private getJustifyContentValue;
|
|
52
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
53
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
54
|
+
protected onAttributeChange(name: string, oldValue: string | null, newValue: string | null): void;
|
|
55
|
+
setDirection(direction: KStackProps['direction']): void;
|
|
56
|
+
setGap(gap: KStackProps['gap']): void;
|
|
57
|
+
setAlign(align: KStackProps['align']): void;
|
|
58
|
+
setJustify(justify: KStackProps['justify']): void;
|
|
59
|
+
setWrap(wrap: boolean): void;
|
|
60
|
+
/**
|
|
61
|
+
* Get the current flex direction
|
|
62
|
+
*/
|
|
63
|
+
getFlexDirection(): string;
|
|
64
|
+
/**
|
|
65
|
+
* Get all slotted elements
|
|
66
|
+
*/
|
|
67
|
+
getStackItems(): Element[];
|
|
68
|
+
/**
|
|
69
|
+
* Add spacing between specific items
|
|
70
|
+
*/
|
|
71
|
+
addItemSpacing(itemIndex: number, spacing: string): void;
|
|
72
|
+
/**
|
|
73
|
+
* Remove spacing from specific items
|
|
74
|
+
*/
|
|
75
|
+
removeItemSpacing(itemIndex: number): void;
|
|
76
|
+
/**
|
|
77
|
+
* Override observeThemeChanges to be test-friendly
|
|
78
|
+
*/
|
|
79
|
+
protected observeThemeChanges(): void;
|
|
80
|
+
}
|
|
81
|
+
export default KStack;
|
|
82
|
+
//# sourceMappingURL=stack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/stack.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,MAAO,SAAQ,aAAa;IACvC,WAAoB,kBAAkB,IAAI,MAAM,EAAE,CAEjD;IAGD,IAAI,SAAS,IAAI,WAAW,CAAC,WAAW,CAAC,CAIxC;IAED,IAAI,SAAS,CAAC,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,EAM5C;IAED,IAAI,GAAG,IAAI,WAAW,CAAC,KAAK,CAAC,CAE5B;IAED,IAAI,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,EAMhC;IAED,IAAI,KAAK,IAAI,WAAW,CAAC,OAAO,CAAC,CA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0,0 +1,44 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './stack';
|
|
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
|
+
direction: {
|
|
15
|
+
control: string;
|
|
16
|
+
options: string[];
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
gap: {
|
|
20
|
+
control: string;
|
|
21
|
+
options: string[];
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
align: {
|
|
25
|
+
control: string;
|
|
26
|
+
options: string[];
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
justify: {
|
|
30
|
+
control: string;
|
|
31
|
+
options: string[];
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default meta;
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
export declare const Vertical: Story;
|
|
39
|
+
export declare const Horizontal: Story;
|
|
40
|
+
export declare const WithGaps: Story;
|
|
41
|
+
export declare const Centered: Story;
|
|
42
|
+
export declare const SpaceBetween: Story;
|
|
43
|
+
export declare const NestedStacks: Story;
|
|
44
|
+
//# sourceMappingURL=stack.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/stack.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,SAAS,CAAC;AAEjB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,QAAQ,EAAE,KActB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAcxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAiEtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAiBtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAgB1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KA6B1B,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { BaseComponent } from '../../core/base-component.js';
|
|
2
|
+
import type { KBreadcrumbsProps, BreadcrumbItem } from '../../types/components.js';
|
|
3
|
+
import type { AccessibilityConfig } from '../../types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* KBreadcrumbs - Breadcrumb navigation component
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Customizable separator
|
|
9
|
+
* - Structured data markup for SEO (JSON-LD)
|
|
10
|
+
* - Keyboard navigation support
|
|
11
|
+
* - Accessibility features (ARIA, keyboard navigation, screen reader support)
|
|
12
|
+
* - Responsive design
|
|
13
|
+
* - Theme integration
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <k-breadcrumbs separator="/" max-items="5">
|
|
18
|
+
* <k-breadcrumb-item href="/" label="Home"></k-breadcrumb-item>
|
|
19
|
+
* <k-breadcrumb-item href="/products" label="Products"></k-breadcrumb-item>
|
|
20
|
+
* <k-breadcrumb-item href="/products/electronics" label="Electronics" active></k-breadcrumb-item>
|
|
21
|
+
* </k-breadcrumbs>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class KBreadcrumbs extends BaseComponent implements KBreadcrumbsProps {
|
|
25
|
+
private _items;
|
|
26
|
+
private breadcrumbList;
|
|
27
|
+
private structuredData;
|
|
28
|
+
private currentFocusIndex;
|
|
29
|
+
private breadcrumbLinks;
|
|
30
|
+
static get observedAttributes(): string[];
|
|
31
|
+
get separator(): string;
|
|
32
|
+
set separator(value: string);
|
|
33
|
+
get maxItems(): number;
|
|
34
|
+
set maxItems(value: number);
|
|
35
|
+
get items(): BreadcrumbItem[];
|
|
36
|
+
set items(items: BreadcrumbItem[]);
|
|
37
|
+
constructor();
|
|
38
|
+
render(): void;
|
|
39
|
+
private renderBreadcrumbItems;
|
|
40
|
+
private getBreadcrumbItems;
|
|
41
|
+
private setupKeyboardNavigation;
|
|
42
|
+
private focusNext;
|
|
43
|
+
private focusPrevious;
|
|
44
|
+
private focusFirst;
|
|
45
|
+
private focusLast;
|
|
46
|
+
private setupStructuredData;
|
|
47
|
+
private attachEventListeners;
|
|
48
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
49
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
50
|
+
protected onAttributeChange(name: string, oldValue: string | null, newValue: string | null): void;
|
|
51
|
+
addItem(item: BreadcrumbItem): void;
|
|
52
|
+
removeItem(index: number): void;
|
|
53
|
+
setItems(items: BreadcrumbItem[]): void;
|
|
54
|
+
clear(): void;
|
|
55
|
+
getStructuredData(): string;
|
|
56
|
+
}
|
|
57
|
+
declare global {
|
|
58
|
+
interface HTMLElementTagNameMap {
|
|
59
|
+
'k-breadcrumbs': KBreadcrumbs;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/breadcrumbs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAGhE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qB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C7B,eAAe,EAAE,YAAY,CAAC;KAC/B;CACF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/web-components';
|
|
2
|
+
import './breadcrumbs';
|
|
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
|
+
separator: {
|
|
15
|
+
control: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default meta;
|
|
21
|
+
type Story = StoryObj<typeof meta>;
|
|
22
|
+
export declare const Default: Story;
|
|
23
|
+
export declare const WithCustomSeparator: Story;
|
|
24
|
+
export declare const SlashSeparator: Story;
|
|
25
|
+
export declare const DotSeparator: Story;
|
|
26
|
+
export declare const LongPath: Story;
|
|
27
|
+
export declare const ShortPath: Story;
|
|
28
|
+
export declare const AllLinks: Story;
|
|
29
|
+
export declare const MixedContent: Story;
|
|
30
|
+
export declare const WithIcons: Story;
|
|
31
|
+
export declare const Responsive: Story;
|
|
32
|
+
//# sourceMappingURL=breadcrumbs.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/breadcrumbs.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,eAAe,CAAC;AAEvB,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;CAiBM,CAAC;AAEjB,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KASjC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAS5B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAS1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAStB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAS1B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAqBvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAexB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { BaseComponent } from '../../core/base-component.js';
|
|
2
|
+
import type { AccessibilityConfig } from '../../types/index.js';
|
|
3
|
+
import { KNavbarProps } from '../../types/components.js';
|
|
4
|
+
/**
|
|
5
|
+
* KNavbar - Responsive navigation bar component
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Responsive collapse functionality
|
|
9
|
+
* - Keyboard navigation support
|
|
10
|
+
* - Accessibility with ARIA attributes
|
|
11
|
+
* - Theme integration
|
|
12
|
+
* - Mobile-first responsive design
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <k-navbar>
|
|
17
|
+
* <k-navbar-brand>My App</k-navbar-brand>
|
|
18
|
+
* <k-navbar-nav>
|
|
19
|
+
* <k-navbar-item href="/home">Home</k-navbar-item>
|
|
20
|
+
* <k-navbar-item href="/about">About</k-navbar-item>
|
|
21
|
+
* </k-navbar-nav>
|
|
22
|
+
* </k-navbar>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare class KNavbar extends BaseComponent implements KNavbarProps {
|
|
26
|
+
private navElement;
|
|
27
|
+
private brandElement;
|
|
28
|
+
private toggleButton;
|
|
29
|
+
private navContent;
|
|
30
|
+
private isCollapsed;
|
|
31
|
+
private resizeObserver;
|
|
32
|
+
static get observedAttributes(): string[];
|
|
33
|
+
get collapsed(): boolean;
|
|
34
|
+
set collapsed(value: boolean);
|
|
35
|
+
get sticky(): boolean;
|
|
36
|
+
set sticky(value: boolean);
|
|
37
|
+
get variant(): KNavbarProps['variant'];
|
|
38
|
+
set variant(value: KNavbarProps['variant']);
|
|
39
|
+
get size(): KNavbarProps['size'];
|
|
40
|
+
set size(value: KNavbarProps['size']);
|
|
41
|
+
get breakpoint(): KNavbarProps['breakpoint'];
|
|
42
|
+
set breakpoint(value: KNavbarProps['breakpoint']);
|
|
43
|
+
render(): void;
|
|
44
|
+
private getBreakpointValue;
|
|
45
|
+
private setupEventListeners;
|
|
46
|
+
private setupResizeObserver;
|
|
47
|
+
private updateCollapseState;
|
|
48
|
+
private focusNext;
|
|
49
|
+
private focusPrevious;
|
|
50
|
+
private focusFirst;
|
|
51
|
+
private focusLast;
|
|
52
|
+
private getFocusableNavItems;
|
|
53
|
+
expand(): void;
|
|
54
|
+
collapse(): void;
|
|
55
|
+
toggleNavbar(): void;
|
|
56
|
+
getAccessibilityConfig(): AccessibilityConfig;
|
|
57
|
+
getDefaultStyles(): CSSStyleSheet;
|
|
58
|
+
protected onAttributeChange(name: string, _oldValue: string | null, _newValue: string | null): void;
|
|
59
|
+
disconnectedCallback(): void;
|
|
60
|
+
}
|
|
61
|
+
declare global {
|
|
62
|
+
interface HTMLElementTagNameMap {
|
|
63
|
+
'k-navbar': KNavbar;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=navbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navbar.d.ts","sourceRoot":"","sources":["../../../../src/components/navigation/navbar.ts"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