@antify/ui 4.2.0 → 4.2.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.
@@ -6,11 +6,12 @@ import {
6
6
  import {
7
7
  AntField,
8
8
  } from './Elements';
9
+ import AntSkeleton from '../AntSkeleton.vue';
9
10
  import {
10
11
  type AntRadioTypes,
11
12
  } from './__types/AntRadio.types';
12
13
  import {
13
- InputState, Size,
14
+ InputState, LayoutVariant, Size,
14
15
  } from '../../enums';
15
16
  import {
16
17
  computed, onMounted, ref, watch,
@@ -35,6 +36,7 @@ const props = withDefaults(defineProps<{
35
36
  direction?: Direction;
36
37
  state?: InputState;
37
38
  size?: Size;
39
+ layoutVariant?: LayoutVariant;
38
40
  skeleton?: boolean;
39
41
  disabled?: boolean;
40
42
  readonly?: boolean;
@@ -42,6 +44,7 @@ const props = withDefaults(defineProps<{
42
44
  }>(), {
43
45
  direction: Direction.column,
44
46
  state: InputState.base,
47
+ layoutVariant: LayoutVariant.default,
45
48
  size: Size.md,
46
49
  skeleton: false,
47
50
  disabled: false,
@@ -49,6 +52,7 @@ const props = withDefaults(defineProps<{
49
52
  messages: () => [],
50
53
  });
51
54
  const _modelValue = useVModel(props, 'modelValue', emit);
55
+ const radioRef = ref<Array<InstanceType<typeof AntRadio>>>([]);
52
56
  const containerClasses = computed(() => ({
53
57
  'flex justify-start': true,
54
58
  'flex-row': props.direction === Direction.row,
@@ -58,6 +62,50 @@ const containerClasses = computed(() => ({
58
62
  'gap-1.5': props.size === Size.sm || props.size === Size.xs,
59
63
  'gap-1': props.size === Size.xs2,
60
64
  }));
65
+ const blockContainerClasses = computed(() => ({
66
+ 'flex flex-col gap-px rounded-md border overflow-hidden': true,
67
+ 'bg-base-300 border-base-300': props.state === InputState.base,
68
+ 'bg-info-500 border-info-500': props.state === InputState.info,
69
+ 'bg-success-500 border-success-500': props.state === InputState.success,
70
+ 'bg-warning-500 border-warning-500': props.state === InputState.warning,
71
+ 'bg-danger-500 border-danger-500': props.state === InputState.danger,
72
+ 'cursor-not-allowed': props.disabled,
73
+ }));
74
+ const blockItemClasses = computed(() => ({
75
+ 'p-2.5': props.size === Size.lg,
76
+ 'p-2': props.size === Size.md,
77
+ 'p-1.5': props.size === Size.sm || props.size === Size.xs,
78
+ 'p-1': props.size === Size.xs2,
79
+ }));
80
+ const tabContainerClasses = computed(() => ({
81
+ 'flex gap-px rounded-md border overflow-hidden': true,
82
+ 'bg-base-300 border-base-300': props.state === InputState.base,
83
+ 'bg-info-500 border-info-500': props.state === InputState.info,
84
+ 'bg-success-500 border-success-500': props.state === InputState.success,
85
+ 'bg-warning-500 border-warning-500': props.state === InputState.warning,
86
+ 'bg-danger-500 border-danger-500': props.state === InputState.danger,
87
+ 'cursor-not-allowed': props.disabled,
88
+ }));
89
+ const tabItemClasses = computed(() => ({
90
+ 'flex justify-center grow transition-colors': true,
91
+ 'text-sm': props.size === Size.lg || props.size === Size.md || props.size === Size.sm,
92
+ 'text-xs': props.size === Size.xs || props.size === Size.xs2,
93
+ 'p-2.5': props.size === Size.lg,
94
+ 'p-2': props.size === Size.md,
95
+ 'p-1.5': props.size === Size.sm || props.size === Size.xs,
96
+ 'p-1': props.size === Size.xs2,
97
+ }));
98
+ const getTabItemColorClasses = (radio: AntRadioTypes) => {
99
+ return {
100
+ 'opacity-50': props.disabled || radio.disabled,
101
+ 'bg-white text-for-white-bg-font': radio.value !== _modelValue.value,
102
+ '!bg-primary-500 text-primary-500-font': !props.skeleton && radio.value === _modelValue.value && props.state === InputState.base,
103
+ '!bg-info-500 text-info-500-font': !props.skeleton && radio.value === _modelValue.value && props.state === InputState.info,
104
+ '!bg-success-500 text-success-500-font': !props.skeleton && radio.value === _modelValue.value && props.state === InputState.success,
105
+ '!bg-warning-500 text-warning-500-font': !props.skeleton && radio.value === _modelValue.value && props.state === InputState.warning,
106
+ '!bg-danger-500 text-danger-500-font': !props.skeleton && radio.value === _modelValue.value && props.state === InputState.danger,
107
+ };
108
+ };
61
109
  const containerRef = ref<null | HTMLElement>(null);
62
110
  const fieldSize = computed(() => {
63
111
  switch (props.size) {
@@ -107,6 +155,34 @@ function onBlurRadio() {
107
155
  }, 100);
108
156
  }
109
157
 
158
+ const onClickBlockItem = (radio: AntRadioTypes, index: number) => {
159
+ if (props.skeleton || props.disabled || props.readonly || radio.disabled || radio.readonly) {
160
+ return;
161
+ }
162
+
163
+ _modelValue.value = radio.value;
164
+
165
+ setTimeout(() => {
166
+ const radioComponent = radioRef.value[index];
167
+
168
+ if (radioComponent && radioComponent.$el) {
169
+ const input = radioComponent.$el.querySelector('input[type="radio"]');
170
+
171
+ if (input) {
172
+ input.focus();
173
+ }
174
+ }
175
+ });
176
+ };
177
+
178
+ const onClickTabItem = (radio: AntRadioTypes) => {
179
+ if (props.skeleton || props.disabled || props.readonly || radio.disabled || radio.readonly) {
180
+ return;
181
+ }
182
+
183
+ _modelValue.value = radio.value;
184
+ };
185
+
110
186
  onMounted(() => {
111
187
  handleEnumValidation(props.size, Size, 'size');
112
188
  handleEnumValidation(props.state, InputState, 'state');
@@ -133,6 +209,7 @@ onMounted(() => {
133
209
  data-e2e="radio-group"
134
210
  >
135
211
  <div
212
+ v-if="layoutVariant === LayoutVariant.default"
136
213
  ref="containerRef"
137
214
  :class="containerClasses"
138
215
  >
@@ -149,5 +226,62 @@ onMounted(() => {
149
226
  @blur="onBlurRadio"
150
227
  />
151
228
  </div>
229
+
230
+ <div
231
+ v-if="layoutVariant === LayoutVariant.block"
232
+ ref="containerRef"
233
+ :class="blockContainerClasses"
234
+ >
235
+ <div
236
+ v-for="(radio, index) in radioButtons"
237
+ :key="`radio-button-widget_${radio.value}-${index}`"
238
+ :class="{
239
+ ...blockItemClasses,
240
+ 'cursor-not-allowed': props.disabled || radio.disabled,
241
+ 'cursor-pointer hover:bg-base-50': !props.skeleton && !props.disabled && !props.readonly && !radio.disabled && !radio.readonly,
242
+ 'bg-base-100': !skeleton && _modelValue === radio.value,
243
+ 'bg-white': skeleton || _modelValue !== radio.value,
244
+ }"
245
+ @click="onClickBlockItem(radio, index)"
246
+ >
247
+ <AntRadio
248
+ :ref="el => radioRef[index] = el"
249
+ v-model="_modelValue"
250
+ :value="radio"
251
+ :skeleton="skeleton"
252
+ :disabled="disabled || radio.disabled"
253
+ :readonly="readonly || radio.readonly"
254
+ :state="radio.state || state"
255
+ :size="size"
256
+ @blur="onBlurRadio"
257
+ />
258
+ </div>
259
+ </div>
260
+
261
+ <div
262
+ v-if="layoutVariant === LayoutVariant.tab"
263
+ :class="tabContainerClasses"
264
+ >
265
+ <div
266
+ v-for="(radio, index) in radioButtons"
267
+ :key="`radio-button-widget_${radio.value}-${index}`"
268
+ :class="{
269
+ ...tabItemClasses,
270
+ ...getTabItemColorClasses(radio),
271
+ 'cursor-not-allowed': props.disabled || radio.disabled,
272
+ 'cursor-pointer hover:bg-base-50': !props.skeleton && !props.disabled && !props.readonly && !radio.disabled && !radio.readonly,
273
+ 'bg-base-100': !skeleton && _modelValue === radio.value,
274
+ 'bg-white': skeleton || _modelValue !== radio.value,
275
+ }"
276
+ @click="onClickTabItem(radio)"
277
+ >
278
+ <AntSkeleton
279
+ :visible="skeleton"
280
+ rounded
281
+ >
282
+ {{ radio.label }}
283
+ </AntSkeleton>
284
+ </div>
285
+ </div>
152
286
  </AntField>
153
287
  </template>
@@ -5,3 +5,6 @@ export default meta;
5
5
  type Story = StoryObj<typeof AntCheckboxGroup>;
6
6
  export declare const Docs: Story;
7
7
  export declare const WithLongContent: Story;
8
+ export declare const BlockVariant: Story;
9
+ export declare const TabVariant: Story;
10
+ export declare const summary: Story;
@@ -3,10 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- module.exports = exports.WithLongContent = exports.Docs = void 0;
6
+ exports.summary = exports.default = exports.WithLongContent = exports.TabVariant = exports.Docs = exports.BlockVariant = void 0;
7
7
  var _AntCheckboxGroup = _interopRequireDefault(require("../AntCheckboxGroup.vue"));
8
8
  var _enums = require("../../../enums");
9
9
  var _Direction = require("../../../enums/Direction.enum");
10
+ var _AntFormGroupLabel = _interopRequireDefault(require("../../forms/AntFormGroupLabel.vue"));
11
+ var _AntFormGroup = _interopRequireDefault(require("../../forms/AntFormGroup.vue"));
12
+ var _vue = require("vue");
10
13
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
14
  const meta = {
12
15
  title: "Inputs/Checkbox Group",
@@ -40,10 +43,29 @@ const meta = {
40
43
  type: "select"
41
44
  },
42
45
  options: Object.values(_Direction.Direction)
46
+ },
47
+ layoutVariant: {
48
+ control: {
49
+ type: "select"
50
+ },
51
+ options: Object.values(_enums.LayoutVariant)
43
52
  }
44
53
  }
45
54
  };
46
55
  module.exports = meta;
56
+ const checkboxOptions = [{
57
+ label: "Checkbox 1",
58
+ value: "checkbox-1"
59
+ }, {
60
+ label: "Checkbox 2",
61
+ value: "checkbox-2"
62
+ }, {
63
+ label: "Checkbox 3",
64
+ value: "checkbox-3"
65
+ }, {
66
+ label: "Checkbox 4",
67
+ value: "checkbox-4"
68
+ }];
47
69
  const Docs = exports.Docs = {
48
70
  render: args => ({
49
71
  components: {
@@ -55,24 +77,18 @@ const Docs = exports.Docs = {
55
77
  };
56
78
  },
57
79
  template: `
58
- <AntCheckboxGroup v-bind="args" v-model="args.modelValue"/>
80
+ <div class="flex flex-col gap-2.5">
81
+ <div class="w-1/2">
82
+ <AntCheckboxGroup v-bind="args" v-model="args.modelValue"/>
83
+ </div>
84
+ </div>
85
+
86
+ <span class="text-xs text-gray-500">Reactive value: {{ args.modelValue }}</span>
59
87
  `
60
88
  }),
61
89
  args: {
62
90
  modelValue: [],
63
- checkboxes: [{
64
- label: "Checkbox 1",
65
- value: "checkbox-1"
66
- }, {
67
- label: "Checkbox 2",
68
- value: "checkbox-2"
69
- }, {
70
- label: "Checkbox 3",
71
- value: "checkbox-3"
72
- }, {
73
- label: "Checkbox 4",
74
- value: "checkbox-4"
75
- }]
91
+ checkboxes: checkboxOptions
76
92
  }
77
93
  };
78
94
  const WithLongContent = exports.WithLongContent = {
@@ -107,4 +123,333 @@ const WithLongContent = exports.WithLongContent = {
107
123
  value: "checkbox-4"
108
124
  }]
109
125
  }
126
+ };
127
+ const BlockVariant = exports.BlockVariant = {
128
+ render: Docs.render,
129
+ args: {
130
+ modelValue: [],
131
+ checkboxes: checkboxOptions,
132
+ layoutVariant: _enums.LayoutVariant.block
133
+ }
134
+ };
135
+ const TabVariant = exports.TabVariant = {
136
+ render: Docs.render,
137
+ args: {
138
+ modelValue: [],
139
+ checkboxes: checkboxOptions,
140
+ layoutVariant: _enums.LayoutVariant.tab
141
+ }
142
+ };
143
+ const summary = exports.summary = {
144
+ parameters: {
145
+ chromatic: {
146
+ disableSnapshot: false
147
+ }
148
+ },
149
+ render: args => ({
150
+ components: {
151
+ AntCheckboxGroup: _AntCheckboxGroup.default,
152
+ AntFormGroupLabel: _AntFormGroupLabel.default,
153
+ AntFormGroup: _AntFormGroup.default
154
+ },
155
+ setup() {
156
+ const value = (0, _vue.ref)(["checkbox-3"]);
157
+ return {
158
+ args,
159
+ value,
160
+ InputState: _enums.InputState,
161
+ Size: _enums.Size,
162
+ LayoutVariant: _enums.LayoutVariant
163
+ };
164
+ },
165
+ template: `
166
+ <AntFormGroup>
167
+ <AntFormGroupLabel>State</AntFormGroupLabel>
168
+ <AntFormGroup direction="row">
169
+ <AntCheckboxGroup
170
+ v-bind="args"
171
+ v-model="value"
172
+ :state="InputState.base"
173
+ label="Label"
174
+ description="Lorem ipsum dolor sit amet"
175
+ />
176
+ <AntCheckboxGroup
177
+ v-bind="args"
178
+ v-model="value"
179
+ :state="InputState.info"
180
+ label="Label"
181
+ description="Lorem ipsum dolor sit amet"
182
+ :messages="['Message']"
183
+ />
184
+ <AntCheckboxGroup
185
+ v-bind="args"
186
+ v-model="value"
187
+ :state="InputState.success"
188
+ label="Label"
189
+ description="Lorem ipsum dolor sit amet"
190
+ :messages="['Message']"
191
+ />
192
+ <AntCheckboxGroup
193
+ v-bind="args"
194
+ v-model="value"
195
+ :state="InputState.warning"
196
+ label="Label"
197
+ description="Lorem ipsum dolor sit amet"
198
+ :messages="['Message']"
199
+ />
200
+ <AntCheckboxGroup
201
+ v-bind="args"
202
+ v-model="value"
203
+ :state="InputState.danger"
204
+ label="Label"
205
+ description="Lorem ipsum dolor sit amet"
206
+ :messages="['Message']"
207
+ />
208
+ </AntFormGroup>
209
+
210
+ <AntFormGroup direction="row">
211
+ <AntCheckboxGroup
212
+ v-bind="args"
213
+ v-model="value"
214
+ :state="InputState.base"
215
+ :layout-variant="LayoutVariant.block"
216
+ label="Label"
217
+ description="Lorem ipsum dolor sit amet"
218
+ />
219
+ <AntCheckboxGroup
220
+ v-bind="args"
221
+ v-model="value"
222
+ :state="InputState.info"
223
+ :layout-variant="LayoutVariant.block"
224
+ label="Label"
225
+ description="Lorem ipsum dolor sit amet"
226
+ :messages="['Message']"
227
+ />
228
+ <AntCheckboxGroup
229
+ v-bind="args"
230
+ v-model="value"
231
+ :state="InputState.success"
232
+ :layout-variant="LayoutVariant.block"
233
+ label="Label"
234
+ description="Lorem ipsum dolor sit amet"
235
+ :messages="['Message']"
236
+ />
237
+ <AntCheckboxGroup
238
+ v-bind="args"
239
+ v-model="value"
240
+ :state="InputState.warning"
241
+ :layout-variant="LayoutVariant.block"
242
+ label="Label"
243
+ description="Lorem ipsum dolor sit amet"
244
+ :messages="['Message']"
245
+ />
246
+ <AntCheckboxGroup
247
+ v-bind="args"
248
+ v-model="value"
249
+ :state="InputState.danger"
250
+ :layout-variant="LayoutVariant.block"
251
+ label="Label"
252
+ description="Lorem ipsum dolor sit amet"
253
+ :messages="['Message']"
254
+ />
255
+ </AntFormGroup>
256
+
257
+ <AntFormGroup direction="row">
258
+ <AntCheckboxGroup
259
+ v-bind="args"
260
+ v-model="value"
261
+ :state="InputState.base"
262
+ :layout-variant="LayoutVariant.tab"
263
+ label="Label"
264
+ description="Lorem ipsum dolor sit amet"
265
+ />
266
+ <AntCheckboxGroup
267
+ v-bind="args"
268
+ v-model="value"
269
+ :state="InputState.info"
270
+ :layout-variant="LayoutVariant.tab"
271
+ label="Label"
272
+ description="Lorem ipsum dolor sit amet"
273
+ :messages="['Message']"
274
+ />
275
+ <AntCheckboxGroup
276
+ v-bind="args"
277
+ v-model="value"
278
+ :state="InputState.success"
279
+ :layout-variant="LayoutVariant.tab"
280
+ label="Label"
281
+ description="Lorem ipsum dolor sit amet"
282
+ :messages="['Message']"
283
+ />
284
+ <AntCheckboxGroup
285
+ v-bind="args"
286
+ v-model="value"
287
+ :state="InputState.warning"
288
+ :layout-variant="LayoutVariant.tab"
289
+ label="Label"
290
+ description="Lorem ipsum dolor sit amet"
291
+ :messages="['Message']"
292
+ />
293
+ <AntCheckboxGroup
294
+ v-bind="args"
295
+ v-model="value"
296
+ :state="InputState.danger"
297
+ :layout-variant="LayoutVariant.tab"
298
+ label="Label"
299
+ description="Lorem ipsum dolor sit amet"
300
+ :messages="['Message']"
301
+ />
302
+ </AntFormGroup>
303
+
304
+ <AntFormGroupLabel>Size</AntFormGroupLabel>
305
+ <AntFormGroup direction="row">
306
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.lg" label="Label"
307
+ description="Lorem ipsum dolor sit amet"/>
308
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.md" label="Label"
309
+ description="Lorem ipsum dolor sit amet"/>
310
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.sm" label="Label"
311
+ description="Lorem ipsum dolor sit amet"/>
312
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.xs" label="Label"
313
+ description="Lorem ipsum dolor sit amet"/>
314
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.xs2" label="Label"
315
+ description="Lorem ipsum dolor sit amet"/>
316
+ </AntFormGroup>
317
+
318
+ <AntFormGroup direction="row">
319
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.lg" label="Label" :layout-variant="LayoutVariant.block"
320
+ description="Lorem ipsum dolor sit amet"/>
321
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.md" label="Label" :layout-variant="LayoutVariant.block"
322
+ description="Lorem ipsum dolor sit amet"/>
323
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.sm" label="Label" :layout-variant="LayoutVariant.block"
324
+ description="Lorem ipsum dolor sit amet"/>
325
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.xs" label="Label" :layout-variant="LayoutVariant.block"
326
+ description="Lorem ipsum dolor sit amet"/>
327
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.xs2" label="Label" :layout-variant="LayoutVariant.block"
328
+ description="Lorem ipsum dolor sit amet"/>
329
+ </AntFormGroup>
330
+
331
+ <AntFormGroup direction="row">
332
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.lg" label="Label" :layout-variant="LayoutVariant.tab"
333
+ description="Lorem ipsum dolor sit amet"/>
334
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.md" label="Label" :layout-variant="LayoutVariant.tab"
335
+ description="Lorem ipsum dolor sit amet"/>
336
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.sm" label="Label" :layout-variant="LayoutVariant.tab"
337
+ description="Lorem ipsum dolor sit amet"/>
338
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.xs" label="Label" :layout-variant="LayoutVariant.tab"
339
+ description="Lorem ipsum dolor sit amet"/>
340
+ <AntCheckboxGroup v-bind="args" v-model="value" :size="Size.xs2" label="Label" :layout-variant="LayoutVariant.tab"
341
+ description="Lorem ipsum dolor sit amet"/>
342
+ </AntFormGroup>
343
+
344
+ <AntFormGroup>
345
+ <AntFormGroupLabel>Disabled</AntFormGroupLabel>
346
+ <AntFormGroup direction="row">
347
+ <div>
348
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet"
349
+ disabled/>
350
+ </div>
351
+ <div>
352
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.block"
353
+ disabled/>
354
+ </div>
355
+ <div>
356
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.tab"
357
+ disabled/>
358
+ </div>
359
+ </AntFormGroup>
360
+ </AntFormGroup>
361
+
362
+ <AntFormGroup>
363
+ <AntFormGroupLabel>Readonly</AntFormGroupLabel>
364
+ <AntFormGroup direction="row">
365
+ <div>
366
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet"
367
+ :readonly="true"/>
368
+ </div>
369
+ <div>
370
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.block"
371
+ :readonly="true"/>
372
+ </div>
373
+ <div>
374
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.tab"
375
+ :readonly="true"/>
376
+ </div>
377
+ </AntFormGroup>
378
+ </AntFormGroup>
379
+
380
+ <AntFormGroup>
381
+ <AntFormGroupLabel>Skeleton</AntFormGroupLabel>
382
+ <AntFormGroup direction="row">
383
+ <div>
384
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet"
385
+ :skeleton="true"/>
386
+ </div>
387
+ <div>
388
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.block"
389
+ :skeleton="true"/>
390
+ </div>
391
+ <div>
392
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.tab"
393
+ :skeleton="true"/>
394
+ </div>
395
+ </AntFormGroup>
396
+ </AntFormGroup>
397
+
398
+ <AntFormGroupLabel>Plain</AntFormGroupLabel>
399
+ <AntFormGroup direction="row">
400
+ <div>
401
+ <AntCheckboxGroup v-bind="args" v-model="value"/>
402
+ </div>
403
+ <div>
404
+ <AntCheckboxGroup v-bind="args" v-model="value" :layout-variant="LayoutVariant.block"/>
405
+ </div>
406
+ <div>
407
+ <AntCheckboxGroup v-bind="args" v-model="value" :layout-variant="LayoutVariant.tab"/>
408
+ </div>
409
+ </AntFormGroup>
410
+
411
+ <AntFormGroupLabel>With label</AntFormGroupLabel>
412
+ <AntFormGroup direction="row">
413
+ <div>
414
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label"/>
415
+ </div>
416
+ <div>
417
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" :layout-variant="LayoutVariant.block"/>
418
+ </div>
419
+ <div>
420
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" :layout-variant="LayoutVariant.tab"/>
421
+ </div>
422
+ </AntFormGroup>
423
+
424
+ <AntFormGroupLabel>With description</AntFormGroupLabel>
425
+ <AntFormGroup direction="row">
426
+ <div>
427
+ <AntCheckboxGroup v-bind="args" v-model="value" description="Lorem ipsum dolor sit amet"/>
428
+ </div>
429
+ <div>
430
+ <AntCheckboxGroup v-bind="args" v-model="value" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.block"/>
431
+ </div>
432
+ <div>
433
+ <AntCheckboxGroup v-bind="args" v-model="value" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.tab"/>
434
+ </div>
435
+ </AntFormGroup>
436
+
437
+ <AntFormGroupLabel>With label + description</AntFormGroupLabel>
438
+ <AntFormGroup direction="row">
439
+ <div>
440
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet"/>
441
+ </div>
442
+ <div>
443
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.block"/>
444
+ </div>
445
+ <div>
446
+ <AntCheckboxGroup v-bind="args" v-model="value" label="Label" description="Lorem ipsum dolor sit amet" :layout-variant="LayoutVariant.tab"/>
447
+ </div>
448
+ </AntFormGroup>
449
+ </AntFormGroup>
450
+ `
451
+ }),
452
+ args: {
453
+ ...Docs.args
454
+ }
110
455
  };