@kong/kongponents 9.28.2 → 9.28.3-pr.2684.3fe2fcabf.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.
@@ -1,69 +1,15 @@
1
- import type { PropType } from 'vue';
2
- import type { LabelAttributes } from '../../../types';
3
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
- modelValue: {
5
- type: BooleanConstructor;
6
- default: boolean;
7
- required: true;
8
- };
9
- label: {
10
- type: StringConstructor;
11
- default: string;
12
- };
13
- labelAttributes: {
14
- type: PropType<LabelAttributes>;
15
- default: () => {};
16
- validator: (value: LabelAttributes) => boolean;
17
- };
18
- description: {
19
- type: StringConstructor;
20
- default: string;
21
- };
22
- error: {
23
- type: BooleanConstructor;
24
- default: boolean;
25
- };
26
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
1
+ import type { CheckboxProps, CheckboxSlots } from '../../../types';
2
+ type __VLS_Slots = CheckboxSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<CheckboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
4
  input: (value: boolean) => any;
28
- change: (value: boolean) => any;
29
- "update:modelValue": (value: boolean) => any;
30
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
31
- modelValue: {
32
- type: BooleanConstructor;
33
- default: boolean;
34
- required: true;
35
- };
36
- label: {
37
- type: StringConstructor;
38
- default: string;
39
- };
40
- labelAttributes: {
41
- type: PropType<LabelAttributes>;
42
- default: () => {};
43
- validator: (value: LabelAttributes) => boolean;
44
- };
45
- description: {
46
- type: StringConstructor;
47
- default: string;
48
- };
49
- error: {
50
- type: BooleanConstructor;
51
- default: boolean;
52
- };
53
- }>> & Readonly<{
5
+ change: (changed: boolean) => any;
6
+ "update:modelValue": (modelValue: boolean) => any;
7
+ }, string, import("vue").PublicProps, Readonly<CheckboxProps> & Readonly<{
54
8
  onInput?: ((value: boolean) => any) | undefined;
55
- onChange?: ((value: boolean) => any) | undefined;
56
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
57
- }>, {
58
- label: string;
59
- description: string;
60
- error: boolean;
61
- labelAttributes: LabelAttributes;
62
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
63
- default?: ((props: {}) => any) | undefined;
64
- tooltip?: ((props: {}) => any) | undefined;
65
- description?: ((props: {}) => any) | undefined;
66
- }>;
9
+ onChange?: ((changed: boolean) => any) | undefined;
10
+ "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
11
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
67
13
  export default _default;
68
14
  type __VLS_WithSlots<T, S> = T & {
69
15
  new (): {
@@ -1,273 +1,18 @@
1
- import type { PropType } from 'vue';
2
- import type { CodeBlockEventData, Theme } from '../../../types';
3
- type __VLS_Slots = {
4
- /**
5
- * Additional actions to be displayed in the code block.
6
- */
7
- 'secondary-actions': void;
8
- };
9
- declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
10
- /**
11
- * ID value used for form elements like the search input and its label.
12
- */
13
- id: {
14
- type: StringConstructor;
15
- required: true;
16
- };
17
- /**
18
- * The code that will be rendered as a text node inside of a `<pre><code></code></pre>` fragment.
19
- */
20
- code: {
21
- type: StringConstructor;
22
- required: true;
23
- };
24
- /**
25
- * The syntax language of `props.code` (e.g. `'json'`).
26
- */
27
- language: {
28
- type: StringConstructor;
29
- required: true;
30
- };
31
- /**
32
- * Whether filter mode is initially active. **Default: `false`**.
33
- */
34
- initialFilterMode: {
35
- type: BooleanConstructor;
36
- required: false;
37
- default: boolean;
38
- };
39
- /**
40
- * Whether regular expression mode is initially active. **Default: `false`**.
41
- */
42
- initialRegExpMode: {
43
- type: BooleanConstructor;
44
- required: false;
45
- default: boolean;
46
- };
47
- /**
48
- * Shows an actions bar with a search input and related action buttons. **Default: `false`**.
49
- */
50
- searchable: {
51
- type: BooleanConstructor;
52
- required: false;
53
- default: boolean;
54
- };
55
- /**
56
- * The line numbers for the lines to highlight by default. **Default: `[]`**.
57
- */
58
- highlightedLineNumbers: {
59
- type: PropType<string | (number | [number, number])[]>;
60
- default: () => never[];
61
- validator: (value: string | (number | [number, number])[]) => boolean;
62
- };
63
- /**
64
- * Allows controlling the processing state from outside the component. This allows a parent component to show the processing icon when it’s, for example, currently syntax highlighting the code. **Default: `false`**.
65
- */
66
- processing: {
67
- type: BooleanConstructor;
68
- required: false;
69
- default: boolean;
70
- };
71
- /**
72
- * Used as the initial value of the search input. Can be used to initialize a code block with a query which was read from client storage. **Default: `''`**.
73
- */
74
- query: {
75
- type: StringConstructor;
76
- required: false;
77
- default: string;
78
- };
79
- /**
80
- * Controls whether to show a copy button. It copies the original code (i.e. the value of `props.code`) to the clipboard. **Default: `true`**.
81
- */
82
- showCopyButton: {
83
- type: BooleanConstructor;
84
- required: false;
85
- default: boolean;
86
- };
87
- /**
88
- * Controls whether to show line numbers. **Default: `true`**.
89
- */
90
- showLineNumbers: {
91
- type: BooleanConstructor;
92
- required: false;
93
- default: boolean;
94
- };
95
- /**
96
- * Controls whether to add links to the current line number. **Default: `false`**.
97
- */
98
- showLineNumberLinks: {
99
- type: BooleanConstructor;
100
- required: false;
101
- default: boolean;
102
- };
103
- /**
104
- * Controls the color scheme of the component. **Default: `light`**.
105
- */
106
- theme: {
107
- type: PropType<Theme>;
108
- required: false;
109
- default: string;
110
- };
111
- /**
112
- * Displays the code on a single line. **Default: `false`**.
113
- */
114
- singleLine: {
115
- type: BooleanConstructor;
116
- required: false;
117
- default: boolean;
118
- };
119
- /**
120
- * The max-height of the code block. **Default: `none`**.
121
- */
122
- maxHeight: {
123
- type: StringConstructor;
124
- required: false;
125
- default: string;
126
- };
127
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
128
- "code-block-render": (data: CodeBlockEventData) => any;
129
- "matching-lines-change": (data: CodeBlockEventData) => any;
130
- "query-change": (data: string) => any;
131
- "filter-mode-change": (data: boolean) => any;
132
- "reg-exp-mode-change": (data: boolean) => any;
133
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
134
- /**
135
- * ID value used for form elements like the search input and its label.
136
- */
137
- id: {
138
- type: StringConstructor;
139
- required: true;
140
- };
141
- /**
142
- * The code that will be rendered as a text node inside of a `<pre><code></code></pre>` fragment.
143
- */
144
- code: {
145
- type: StringConstructor;
146
- required: true;
147
- };
148
- /**
149
- * The syntax language of `props.code` (e.g. `'json'`).
150
- */
151
- language: {
152
- type: StringConstructor;
153
- required: true;
154
- };
155
- /**
156
- * Whether filter mode is initially active. **Default: `false`**.
157
- */
158
- initialFilterMode: {
159
- type: BooleanConstructor;
160
- required: false;
161
- default: boolean;
162
- };
163
- /**
164
- * Whether regular expression mode is initially active. **Default: `false`**.
165
- */
166
- initialRegExpMode: {
167
- type: BooleanConstructor;
168
- required: false;
169
- default: boolean;
170
- };
171
- /**
172
- * Shows an actions bar with a search input and related action buttons. **Default: `false`**.
173
- */
174
- searchable: {
175
- type: BooleanConstructor;
176
- required: false;
177
- default: boolean;
178
- };
179
- /**
180
- * The line numbers for the lines to highlight by default. **Default: `[]`**.
181
- */
182
- highlightedLineNumbers: {
183
- type: PropType<string | (number | [number, number])[]>;
184
- default: () => never[];
185
- validator: (value: string | (number | [number, number])[]) => boolean;
186
- };
187
- /**
188
- * Allows controlling the processing state from outside the component. This allows a parent component to show the processing icon when it’s, for example, currently syntax highlighting the code. **Default: `false`**.
189
- */
190
- processing: {
191
- type: BooleanConstructor;
192
- required: false;
193
- default: boolean;
194
- };
195
- /**
196
- * Used as the initial value of the search input. Can be used to initialize a code block with a query which was read from client storage. **Default: `''`**.
197
- */
198
- query: {
199
- type: StringConstructor;
200
- required: false;
201
- default: string;
202
- };
203
- /**
204
- * Controls whether to show a copy button. It copies the original code (i.e. the value of `props.code`) to the clipboard. **Default: `true`**.
205
- */
206
- showCopyButton: {
207
- type: BooleanConstructor;
208
- required: false;
209
- default: boolean;
210
- };
211
- /**
212
- * Controls whether to show line numbers. **Default: `true`**.
213
- */
214
- showLineNumbers: {
215
- type: BooleanConstructor;
216
- required: false;
217
- default: boolean;
218
- };
219
- /**
220
- * Controls whether to add links to the current line number. **Default: `false`**.
221
- */
222
- showLineNumberLinks: {
223
- type: BooleanConstructor;
224
- required: false;
225
- default: boolean;
226
- };
227
- /**
228
- * Controls the color scheme of the component. **Default: `light`**.
229
- */
230
- theme: {
231
- type: PropType<Theme>;
232
- required: false;
233
- default: string;
234
- };
235
- /**
236
- * Displays the code on a single line. **Default: `false`**.
237
- */
238
- singleLine: {
239
- type: BooleanConstructor;
240
- required: false;
241
- default: boolean;
242
- };
243
- /**
244
- * The max-height of the code block. **Default: `none`**.
245
- */
246
- maxHeight: {
247
- type: StringConstructor;
248
- required: false;
249
- default: string;
250
- };
251
- }>> & Readonly<{
252
- "onCode-block-render"?: ((data: CodeBlockEventData) => any) | undefined;
253
- "onMatching-lines-change"?: ((data: CodeBlockEventData) => any) | undefined;
254
- "onQuery-change"?: ((data: string) => any) | undefined;
255
- "onFilter-mode-change"?: ((data: boolean) => any) | undefined;
256
- "onReg-exp-mode-change"?: ((data: boolean) => any) | undefined;
257
- }>, {
258
- maxHeight: string;
259
- theme: Theme;
260
- initialFilterMode: boolean;
261
- initialRegExpMode: boolean;
262
- searchable: boolean;
263
- highlightedLineNumbers: string | (number | [number, number])[];
264
- processing: boolean;
265
- query: string;
266
- showCopyButton: boolean;
267
- showLineNumbers: boolean;
268
- showLineNumberLinks: boolean;
269
- singleLine: boolean;
270
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
1
+ import type { CodeBlockProps, CodeBlockSlots, CodeBlockEventData } from '../../../types';
2
+ type __VLS_Slots = CodeBlockSlots;
3
+ declare const __VLS_component: import("vue").DefineComponent<CodeBlockProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
4
+ "code-block-render": (evt: CodeBlockEventData) => any;
5
+ "matching-lines-change": (evt: CodeBlockEventData) => any;
6
+ "query-change": (query: string) => any;
7
+ "filter-mode-change": (on: boolean) => any;
8
+ "reg-exp-mode-change": (on: boolean) => any;
9
+ }, string, import("vue").PublicProps, Readonly<CodeBlockProps> & Readonly<{
10
+ "onCode-block-render"?: ((evt: CodeBlockEventData) => any) | undefined;
11
+ "onMatching-lines-change"?: ((evt: CodeBlockEventData) => any) | undefined;
12
+ "onQuery-change"?: ((query: string) => any) | undefined;
13
+ "onFilter-mode-change"?: ((on: boolean) => any) | undefined;
14
+ "onReg-exp-mode-change"?: ((on: boolean) => any) | undefined;
15
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
271
16
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
272
17
  export default _default;
273
18
  type __VLS_WithSlots<T, S> = T & {
@@ -1,44 +1,25 @@
1
- import { type PropType } from 'vue';
2
- import type { Theme } from '../../../types';
3
- declare const _default: __VLS_WithSlots<import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
- theme: {
5
- type: PropType<Theme>;
6
- default: string;
7
- };
8
- active: {
9
- type: BooleanConstructor;
10
- default: boolean;
11
- };
12
- /**
13
- * Only pass tooltip text if it's the copy button
14
- */
15
- copyTooltip: {
16
- type: StringConstructor;
17
- default: string;
18
- };
19
- }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
20
- theme: {
21
- type: PropType<Theme>;
22
- default: string;
23
- };
24
- active: {
25
- type: BooleanConstructor;
26
- default: boolean;
27
- };
28
- /**
29
- * Only pass tooltip text if it's the copy button
30
- */
31
- copyTooltip: {
32
- type: StringConstructor;
33
- default: string;
34
- };
35
- }>> & Readonly<{}>, {
36
- active: boolean;
37
- theme: Theme;
38
- copyTooltip: string;
39
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>, {
40
- default?: ((props: {}) => any) | undefined;
1
+ import type { CodeBlockIconButtonProps } from '../../../types';
2
+ import KButton from '../../components/KButton/KButton.vue';
3
+ import KTooltip from '../../components/KTooltip/KTooltip.vue';
4
+ declare const copyTooltipText: import("vue").Ref<string, string>;
5
+ declare const attrs: {
6
+ [x: string]: unknown;
7
+ };
8
+ declare const onClick: () => void;
9
+ declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
10
+ declare var __VLS_12: {};
11
+ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
12
+ default?: (props: typeof __VLS_12) => any;
41
13
  }>;
14
+ declare const __VLS_self: import("vue").DefineComponent<CodeBlockIconButtonProps, {
15
+ KButton: typeof KButton;
16
+ KTooltip: typeof KTooltip;
17
+ copyTooltipText: typeof copyTooltipText;
18
+ attrs: typeof attrs;
19
+ onClick: typeof onClick;
20
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CodeBlockIconButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_component: import("vue").DefineComponent<CodeBlockIconButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CodeBlockIconButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
42
23
  export default _default;
43
24
  type __VLS_WithSlots<T, S> = T & {
44
25
  new (): {
@@ -0,0 +1,61 @@
1
+ import type { LabelAttributes } from './input';
2
+ export interface CheckboxProps {
3
+ /**
4
+ * Use v-model to bind the checked state of the underlying <input>.
5
+ * The v-model binds to the modelValue prop of the component and sets
6
+ * current checked state of the input.
7
+ * @required
8
+ */
9
+ modelValue: boolean;
10
+ /**
11
+ * Will place label text to the right of the checkbox. Can also be slotted.
12
+ * @default ''
13
+ */
14
+ label?: string;
15
+ /**
16
+ * KCheckbox has an instance of KLabel for supporting tooltip text.
17
+ * Use the labelAttributes prop to configure the KLabel's props.
18
+ * @default {}
19
+ */
20
+ labelAttributes?: LabelAttributes;
21
+ /**
22
+ * Will place description text under the checkbox label. Can also be slotted.
23
+ * @default ''
24
+ */
25
+ description?: string;
26
+ /**
27
+ * Use this prop to apply error styling to the component.
28
+ * @default false
29
+ */
30
+ error?: boolean;
31
+ }
32
+ export interface CheckboxEmits {
33
+ /**
34
+ * Fired on change, returns the checked status of the checkbox (boolean).
35
+ */
36
+ change: [changed: boolean];
37
+ /**
38
+ * Fired on change, returns the checked status of the checkbox (boolean).
39
+ */
40
+ input: [value: boolean];
41
+ /**
42
+ * Fired on change, returns the checked status of the checkbox (boolean).
43
+ */
44
+ 'update:modelValue': [modelValue: boolean];
45
+ }
46
+ export interface CheckboxSlots {
47
+ /**
48
+ * Content passed in to the default slot will be shown as the label content.
49
+ * The slot content takes precedence over the label prop.
50
+ */
51
+ default?(): any;
52
+ /**
53
+ * Provides a slot for tooltip content displayed after the checkbox label.
54
+ */
55
+ tooltip?(): any;
56
+ /**
57
+ * Content passed in to the description slot will be shown as the description content.
58
+ * The slot content takes precedence over the description prop.
59
+ */
60
+ description?(): any;
61
+ }
@@ -8,3 +8,117 @@ export interface CodeBlockEventData {
8
8
  }
9
9
  export type Theme = 'light' | 'dark';
10
10
  export type CommandKeywords = 'toggleFilterMode' | 'toggleRegExpMode' | 'jumpToNextMatch' | 'jumpToPreviousMatch' | 'copyCode';
11
+ /**
12
+ * @internal
13
+ */
14
+ export interface CodeBlockIconButtonProps {
15
+ theme?: Theme;
16
+ active?: boolean;
17
+ /**
18
+ * Only pass tooltip text if it's the copy button
19
+ */
20
+ copyTooltip?: string;
21
+ }
22
+ export interface CodeBlockProps {
23
+ /**
24
+ * ID value used for form elements like the search input and its label.
25
+ */
26
+ id: string;
27
+ /**
28
+ * The code that will be rendered as a text node inside of a `<pre><code></code></pre>` fragment.
29
+ */
30
+ code: string;
31
+ /**
32
+ * The syntax language of `props.code` (e.g. `'json'`).
33
+ */
34
+ language: string;
35
+ /**
36
+ * Whether filter mode is initially active.
37
+ * @default false
38
+ */
39
+ initialFilterMode?: boolean;
40
+ /**
41
+ * Whether regular expression mode is initially active.
42
+ * @default false
43
+ */
44
+ initialRegExpMode?: boolean;
45
+ /**
46
+ * Shows an actions bar with a search input and related action buttons.
47
+ * @default false
48
+ */
49
+ searchable?: boolean;
50
+ /**
51
+ * The line numbers for the lines to highlight by default.
52
+ * @default []
53
+ */
54
+ highlightedLineNumbers?: string | (number | [number, number])[];
55
+ /**
56
+ * Allows controlling the processing state from outside the component. This allows a parent component to show the processing icon when it’s, for example, currently syntax highlighting the code.
57
+ * @default false
58
+ */
59
+ processing?: boolean;
60
+ /**
61
+ * Used as the initial value of the search input. Can be used to initialize a code block with a query which was read from client storage.
62
+ * @default ''
63
+ */
64
+ query?: string;
65
+ /**
66
+ * Controls whether to show a copy button. It copies the original code (i.e. the value of `props.code`) to the clipboard.
67
+ * @default true
68
+ */
69
+ showCopyButton?: boolean;
70
+ /**
71
+ * Controls whether to show line numbers.
72
+ * @default true
73
+ */
74
+ showLineNumbers?: boolean;
75
+ /**
76
+ * Controls whether to add links to the current line number.
77
+ * @default false
78
+ */
79
+ showLineNumberLinks?: boolean;
80
+ /**
81
+ * Controls the color scheme of the component.
82
+ * @default light
83
+ */
84
+ theme?: Theme;
85
+ /**
86
+ * Displays the code on a single line.
87
+ * @default false
88
+ */
89
+ singleLine?: boolean;
90
+ /**
91
+ * The max-height of the code block.
92
+ * @default none
93
+ */
94
+ maxHeight?: string;
95
+ }
96
+ export interface CodeBlockEmits {
97
+ /**
98
+ * Fired when the code block is rendered or re-rendered.
99
+ * This happens initially when mounting the component. It also happens when turning *off* filter mode (this renders a line-filtered sub set of the code and can’t be syntax highlighted after the fact). It also happens when the code changes (i.e. `props.code` is updated).
100
+ */
101
+ 'code-block-render': [evt: CodeBlockEventData];
102
+ /**
103
+ * Fired when the matching line numbers are updated in response to a search.
104
+ */
105
+ 'matching-lines-change': [evt: CodeBlockEventData];
106
+ /**
107
+ * Fired when the search query is updated.
108
+ */
109
+ 'query-change': [query: string];
110
+ /**
111
+ * Fired when the filter mode is toggled.
112
+ */
113
+ 'filter-mode-change': [on: boolean];
114
+ /**
115
+ * Fired when the regular expression mode is toggled.
116
+ */
117
+ 'reg-exp-mode-change': [on: boolean];
118
+ }
119
+ export interface CodeBlockSlots {
120
+ /**
121
+ * Additional actions to be displayed in the code block.
122
+ */
123
+ 'secondary-actions'?(): any;
124
+ }
@@ -4,6 +4,7 @@ export * from './breadcrumbs';
4
4
  export * from './button';
5
5
  export * from './card';
6
6
  export * from './catalog';
7
+ export * from './checkbox';
7
8
  export * from './code-block';
8
9
  export * from './collapse';
9
10
  export * from './date-time-picker';