@kong/kongponents 9.28.2-pr.2690.aa31c581e.0 → 9.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/kongponents.css +1 -1
- package/dist/kongponents.es.js +2812 -2849
- package/dist/kongponents.umd.js +14 -14
- package/dist/types/components/KCollapse/KCollapse.vue.d.ts +9 -167
- package/dist/types/types/collapse.d.ts +64 -0
- package/package.json +30 -29
- package/dist/types/composables/useDeprecated.d.ts +0 -8
|
@@ -1,170 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
|
|
11
|
-
declare var __VLS_5: {}, __VLS_7: {
|
|
12
|
-
isCollapsed: boolean;
|
|
13
|
-
toggle: (isToggled?: boolean) => void;
|
|
14
|
-
}, __VLS_9: {}, __VLS_15: {}, __VLS_21: {};
|
|
15
|
-
type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
|
|
16
|
-
title?: (props: typeof __VLS_5) => any;
|
|
17
|
-
} & {
|
|
18
|
-
trigger?: (props: typeof __VLS_7) => any;
|
|
19
|
-
} & {
|
|
20
|
-
'trigger-content'?: (props: typeof __VLS_9) => any;
|
|
21
|
-
} & {
|
|
22
|
-
'visible-content'?: (props: typeof __VLS_15) => any;
|
|
23
|
-
} & {
|
|
24
|
-
default?: (props: typeof __VLS_21) => any;
|
|
25
|
-
}>;
|
|
26
|
-
declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
27
|
-
modelValue: {
|
|
28
|
-
type: BooleanConstructor;
|
|
29
|
-
required: false;
|
|
30
|
-
default: boolean;
|
|
31
|
-
};
|
|
32
|
-
title: {
|
|
33
|
-
type: StringConstructor;
|
|
34
|
-
required: false;
|
|
35
|
-
default: string;
|
|
36
|
-
};
|
|
37
|
-
titleTag: {
|
|
38
|
-
type: PropType<HeaderTag>;
|
|
39
|
-
default: string;
|
|
40
|
-
validator: (value: HeaderTag) => boolean;
|
|
41
|
-
};
|
|
42
|
-
triggerLabel: {
|
|
43
|
-
type: StringConstructor;
|
|
44
|
-
required: false;
|
|
45
|
-
default: string;
|
|
46
|
-
};
|
|
47
|
-
triggerAlignment: {
|
|
48
|
-
type: PropType<TriggerAlignment>;
|
|
49
|
-
required: false;
|
|
50
|
-
default: string;
|
|
51
|
-
validator: (value: TriggerAlignment) => boolean;
|
|
52
|
-
};
|
|
53
|
-
}>, {
|
|
54
|
-
ChevronRightIcon: typeof ChevronRightIcon;
|
|
55
|
-
KUI_ICON_SIZE_40: typeof KUI_ICON_SIZE_40;
|
|
56
|
-
contentId: typeof contentId;
|
|
57
|
-
trailingTrigger: typeof trailingTrigger;
|
|
58
|
-
hasVisibleContent: typeof hasVisibleContent;
|
|
59
|
-
collapsedState: typeof collapsedState;
|
|
60
|
-
toggleDisplay: typeof toggleDisplay;
|
|
61
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
62
|
-
toggle: (value: boolean) => any;
|
|
63
|
-
"update:modelValue": (value: boolean) => any;
|
|
64
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
65
|
-
modelValue: {
|
|
66
|
-
type: BooleanConstructor;
|
|
67
|
-
required: false;
|
|
68
|
-
default: boolean;
|
|
69
|
-
};
|
|
70
|
-
title: {
|
|
71
|
-
type: StringConstructor;
|
|
72
|
-
required: false;
|
|
73
|
-
default: string;
|
|
74
|
-
};
|
|
75
|
-
titleTag: {
|
|
76
|
-
type: PropType<HeaderTag>;
|
|
77
|
-
default: string;
|
|
78
|
-
validator: (value: HeaderTag) => boolean;
|
|
79
|
-
};
|
|
80
|
-
triggerLabel: {
|
|
81
|
-
type: StringConstructor;
|
|
82
|
-
required: false;
|
|
83
|
-
default: string;
|
|
84
|
-
};
|
|
85
|
-
triggerAlignment: {
|
|
86
|
-
type: PropType<TriggerAlignment>;
|
|
87
|
-
required: false;
|
|
88
|
-
default: string;
|
|
89
|
-
validator: (value: TriggerAlignment) => boolean;
|
|
90
|
-
};
|
|
91
|
-
}>> & Readonly<{
|
|
92
|
-
onToggle?: ((value: boolean) => any) | undefined;
|
|
93
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
94
|
-
}>, {
|
|
95
|
-
title: string;
|
|
96
|
-
titleTag: HeaderTag;
|
|
97
|
-
modelValue: boolean;
|
|
98
|
-
triggerLabel: string;
|
|
99
|
-
triggerAlignment: "leading" | "trailing";
|
|
100
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
101
|
-
declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
102
|
-
modelValue: {
|
|
103
|
-
type: BooleanConstructor;
|
|
104
|
-
required: false;
|
|
105
|
-
default: boolean;
|
|
106
|
-
};
|
|
107
|
-
title: {
|
|
108
|
-
type: StringConstructor;
|
|
109
|
-
required: false;
|
|
110
|
-
default: string;
|
|
111
|
-
};
|
|
112
|
-
titleTag: {
|
|
113
|
-
type: PropType<HeaderTag>;
|
|
114
|
-
default: string;
|
|
115
|
-
validator: (value: HeaderTag) => boolean;
|
|
116
|
-
};
|
|
117
|
-
triggerLabel: {
|
|
118
|
-
type: StringConstructor;
|
|
119
|
-
required: false;
|
|
120
|
-
default: string;
|
|
121
|
-
};
|
|
122
|
-
triggerAlignment: {
|
|
123
|
-
type: PropType<TriggerAlignment>;
|
|
124
|
-
required: false;
|
|
125
|
-
default: string;
|
|
126
|
-
validator: (value: TriggerAlignment) => boolean;
|
|
127
|
-
};
|
|
128
|
-
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
129
|
-
toggle: (value: boolean) => any;
|
|
130
|
-
"update:modelValue": (value: boolean) => any;
|
|
131
|
-
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
132
|
-
modelValue: {
|
|
133
|
-
type: BooleanConstructor;
|
|
134
|
-
required: false;
|
|
135
|
-
default: boolean;
|
|
136
|
-
};
|
|
137
|
-
title: {
|
|
138
|
-
type: StringConstructor;
|
|
139
|
-
required: false;
|
|
140
|
-
default: string;
|
|
141
|
-
};
|
|
142
|
-
titleTag: {
|
|
143
|
-
type: PropType<HeaderTag>;
|
|
144
|
-
default: string;
|
|
145
|
-
validator: (value: HeaderTag) => boolean;
|
|
146
|
-
};
|
|
147
|
-
triggerLabel: {
|
|
148
|
-
type: StringConstructor;
|
|
149
|
-
required: false;
|
|
150
|
-
default: string;
|
|
151
|
-
};
|
|
152
|
-
triggerAlignment: {
|
|
153
|
-
type: PropType<TriggerAlignment>;
|
|
154
|
-
required: false;
|
|
155
|
-
default: string;
|
|
156
|
-
validator: (value: TriggerAlignment) => boolean;
|
|
157
|
-
};
|
|
158
|
-
}>> & Readonly<{
|
|
159
|
-
onToggle?: ((value: boolean) => any) | undefined;
|
|
160
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
161
|
-
}>, {
|
|
162
|
-
title: string;
|
|
163
|
-
titleTag: HeaderTag;
|
|
164
|
-
modelValue: boolean;
|
|
165
|
-
triggerLabel: string;
|
|
166
|
-
triggerAlignment: "leading" | "trailing";
|
|
167
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
1
|
+
import type { CollapseProps, CollapseSlots } from '../../../types';
|
|
2
|
+
type __VLS_Slots = CollapseSlots;
|
|
3
|
+
declare const __VLS_component: import("vue").DefineComponent<CollapseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
|
+
toggle: (collapsed: boolean) => any;
|
|
5
|
+
"update:modelValue": (collapsed: boolean) => any;
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<CollapseProps> & Readonly<{
|
|
7
|
+
onToggle?: ((collapsed: boolean) => any) | undefined;
|
|
8
|
+
"onUpdate:modelValue"?: ((collapsed: boolean) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
168
10
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
169
11
|
export default _default;
|
|
170
12
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,3 +1,67 @@
|
|
|
1
1
|
import type { AnyElementOf } from '../types/utils';
|
|
2
|
+
import type { HeaderTag } from './card';
|
|
2
3
|
export declare const TriggerAlignmentArray: readonly ["leading", "trailing"];
|
|
3
4
|
export type TriggerAlignment = AnyElementOf<typeof TriggerAlignmentArray>;
|
|
5
|
+
export interface CollapseProps {
|
|
6
|
+
/**
|
|
7
|
+
* Whether the collapsible section is collapsed.
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
modelValue?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The title of the collapsible section.
|
|
13
|
+
*/
|
|
14
|
+
title?: string;
|
|
15
|
+
/**
|
|
16
|
+
* HTML element you want title to be rendered as.
|
|
17
|
+
* One of ['div', 'p', 'span', 'a', 'legend', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].
|
|
18
|
+
* @default 'div'
|
|
19
|
+
*/
|
|
20
|
+
titleTag?: HeaderTag;
|
|
21
|
+
/**
|
|
22
|
+
* The label of the trigger.
|
|
23
|
+
* @default ''
|
|
24
|
+
*/
|
|
25
|
+
triggerLabel?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The alignment of the trigger.
|
|
28
|
+
* One of ['leading', 'trailing'].
|
|
29
|
+
* @default 'leading'
|
|
30
|
+
*/
|
|
31
|
+
triggerAlignment?: TriggerAlignment;
|
|
32
|
+
}
|
|
33
|
+
export interface CollapseEmits {
|
|
34
|
+
/**
|
|
35
|
+
* Emitted when the trigger is clicked.
|
|
36
|
+
*/
|
|
37
|
+
toggle: [collapsed: boolean];
|
|
38
|
+
/**
|
|
39
|
+
* Emitted when the `modelValue` is changed.
|
|
40
|
+
*/
|
|
41
|
+
'update:modelValue': [collapsed: boolean];
|
|
42
|
+
}
|
|
43
|
+
export interface CollapseSlots {
|
|
44
|
+
/**
|
|
45
|
+
* Content to be hidden or shown when clicking the trigger.
|
|
46
|
+
*/
|
|
47
|
+
default?(): any;
|
|
48
|
+
/**
|
|
49
|
+
* Content displayed above the collapsible content that is always visible.
|
|
50
|
+
*/
|
|
51
|
+
'visible-content'?(): any;
|
|
52
|
+
/**
|
|
53
|
+
* Contents of the trigger link anchor; click handling is built-in.
|
|
54
|
+
*/
|
|
55
|
+
'trigger-content'?(): any;
|
|
56
|
+
/**
|
|
57
|
+
* Completely control the trigger, including managing click events.
|
|
58
|
+
*/
|
|
59
|
+
trigger?(props: {
|
|
60
|
+
isCollapsed: boolean;
|
|
61
|
+
toggle: () => void;
|
|
62
|
+
}): any;
|
|
63
|
+
/**
|
|
64
|
+
* Slot for custom title content.
|
|
65
|
+
*/
|
|
66
|
+
title?(): any;
|
|
67
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong/kongponents",
|
|
3
|
-
"version": "9.28.2
|
|
3
|
+
"version": "9.28.2",
|
|
4
4
|
"description": "Kong Component library",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -26,6 +26,33 @@
|
|
|
26
26
|
"./package.json": "./package.json",
|
|
27
27
|
"./dist/*": "./dist/*"
|
|
28
28
|
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build:cli": "rimraf ./bin && tsc --project ./cli/tsconfig.json && chmod u+x ./bin/index.js",
|
|
31
|
+
"build:docs": "vitepress build docs",
|
|
32
|
+
"build:kongponents": "pnpm typecheck && vite build && vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly && tsc-alias -p './tsconfig.build.json'",
|
|
33
|
+
"build:visualize": "cross-env-shell BUILD_VISUALIZER=true vite build -m production",
|
|
34
|
+
"build": "pnpm build:cli && pnpm stylelint && pnpm lint && pnpm build:kongponents && pnpm build:docs",
|
|
35
|
+
"build:ci": "pnpm build:kongponents && pnpm build:docs",
|
|
36
|
+
"commit": "cz",
|
|
37
|
+
"create-kongponent": "node ./bin/index.js",
|
|
38
|
+
"sandbox:dev": "cross-env USE_SANDBOX=true vite",
|
|
39
|
+
"sandbox:build": "cross-env USE_SANDBOX=true vite build && shx cp sandbox/dist/index.html sandbox/dist/404.html",
|
|
40
|
+
"sandbox:build:netlify": "cross-env USE_SANDBOX=true USE_NETLIFY=true vite build && shx cp sandbox/dist/index.html sandbox/dist/404.html",
|
|
41
|
+
"sandbox:preview": "cross-env USE_SANDBOX=true vite preview",
|
|
42
|
+
"docs:build": "vitepress build docs",
|
|
43
|
+
"docs:dev": "vitepress dev docs",
|
|
44
|
+
"docs:serve": "vitepress serve docs",
|
|
45
|
+
"docs:preview": "vitepress preview docs --port 8080",
|
|
46
|
+
"typecheck": "vue-tsc -p './tsconfig.build.json' --noEmit",
|
|
47
|
+
"lint": "eslint",
|
|
48
|
+
"lint:fix": "eslint --fix",
|
|
49
|
+
"stylelint": "stylelint './src/**/*.{css,scss,sass,vue}'",
|
|
50
|
+
"stylelint:fix": "stylelint './src/**/*.{css,scss,sass,vue}' --fix",
|
|
51
|
+
"test": "cypress run --component -b chrome",
|
|
52
|
+
"test:open": "cypress open --component -b chrome",
|
|
53
|
+
"test:spec": "cypress run --component -b chrome --spec",
|
|
54
|
+
"semantic-release": "semantic-release"
|
|
55
|
+
},
|
|
29
56
|
"dependencies": {
|
|
30
57
|
"@floating-ui/vue": "^1.1.6",
|
|
31
58
|
"@kong/icons": "^1.22.1",
|
|
@@ -156,6 +183,7 @@
|
|
|
156
183
|
"engines": {
|
|
157
184
|
"node": ">=v16.20.2 || >=18.12.1 || >=20.14.0"
|
|
158
185
|
},
|
|
186
|
+
"packageManager": "pnpm@9.11.0",
|
|
159
187
|
"volta": {
|
|
160
188
|
"node": "20.17.0",
|
|
161
189
|
"pnpm": "9.11.0"
|
|
@@ -169,32 +197,5 @@
|
|
|
169
197
|
"jiraPrepend": "[",
|
|
170
198
|
"jiraAppend": "]"
|
|
171
199
|
}
|
|
172
|
-
},
|
|
173
|
-
"scripts": {
|
|
174
|
-
"build:cli": "rimraf ./bin && tsc --project ./cli/tsconfig.json && chmod u+x ./bin/index.js",
|
|
175
|
-
"build:docs": "vitepress build docs",
|
|
176
|
-
"build:kongponents": "pnpm typecheck && vite build && vue-tsc -p './tsconfig.build.json' --emitDeclarationOnly && tsc-alias -p './tsconfig.build.json'",
|
|
177
|
-
"build:visualize": "cross-env-shell BUILD_VISUALIZER=true vite build -m production",
|
|
178
|
-
"build": "pnpm build:cli && pnpm stylelint && pnpm lint && pnpm build:kongponents && pnpm build:docs",
|
|
179
|
-
"build:ci": "pnpm build:kongponents && pnpm build:docs",
|
|
180
|
-
"commit": "cz",
|
|
181
|
-
"create-kongponent": "node ./bin/index.js",
|
|
182
|
-
"sandbox:dev": "cross-env USE_SANDBOX=true vite",
|
|
183
|
-
"sandbox:build": "cross-env USE_SANDBOX=true vite build && shx cp sandbox/dist/index.html sandbox/dist/404.html",
|
|
184
|
-
"sandbox:build:netlify": "cross-env USE_SANDBOX=true USE_NETLIFY=true vite build && shx cp sandbox/dist/index.html sandbox/dist/404.html",
|
|
185
|
-
"sandbox:preview": "cross-env USE_SANDBOX=true vite preview",
|
|
186
|
-
"docs:build": "vitepress build docs",
|
|
187
|
-
"docs:dev": "vitepress dev docs",
|
|
188
|
-
"docs:serve": "vitepress serve docs",
|
|
189
|
-
"docs:preview": "vitepress preview docs --port 8080",
|
|
190
|
-
"typecheck": "vue-tsc -p './tsconfig.build.json' --noEmit",
|
|
191
|
-
"lint": "eslint",
|
|
192
|
-
"lint:fix": "eslint --fix",
|
|
193
|
-
"stylelint": "stylelint './src/**/*.{css,scss,sass,vue}'",
|
|
194
|
-
"stylelint:fix": "stylelint './src/**/*.{css,scss,sass,vue}' --fix",
|
|
195
|
-
"test": "cypress run --component -b chrome",
|
|
196
|
-
"test:open": "cypress open --component -b chrome",
|
|
197
|
-
"test:spec": "cypress run --component -b chrome --spec",
|
|
198
|
-
"semantic-release": "semantic-release"
|
|
199
200
|
}
|
|
200
|
-
}
|
|
201
|
+
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { WatchSource } from 'vue';
|
|
2
|
-
export interface UseDeprecatedProps {
|
|
3
|
-
notice: string;
|
|
4
|
-
docPath?: string;
|
|
5
|
-
fragment?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const composeWarning: (componentName: string, notice: string, docPath?: string, fragment?: string) => string;
|
|
8
|
-
export declare const useDeprecated: (condition: WatchSource<boolean>, { notice, docPath, fragment, }: UseDeprecatedProps) => void;
|