@dpa-id-components/dpa-shared-components 23.1.0 → 23.1.1

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.
Files changed (51) hide show
  1. package/package.json +7 -7
  2. package/src/components/UiBadge/README.md +0 -15
  3. package/src/components/UiBadge/UiBadge.vue +14 -0
  4. package/src/components/UiButton/README.md +3 -18
  5. package/src/components/UiButton/UiButton.vue +13 -0
  6. package/src/components/UiCheckbox/README.md +2 -24
  7. package/src/components/UiCheckbox/UiCheckbox.vue +11 -0
  8. package/src/components/UiChip/README.md +0 -21
  9. package/src/components/UiChip/UiChip.vue +13 -0
  10. package/src/components/UiColorPicker/README.md +1 -15
  11. package/src/components/UiColorPicker/UiColorPicker.vue +4 -0
  12. package/src/components/UiDatePicker/README.md +5 -57
  13. package/src/components/UiDatePicker/UiDatePicker.vue +117 -0
  14. package/src/components/UiDialog/README.md +2 -27
  15. package/src/components/UiDialog/UiDialog.vue +32 -0
  16. package/src/components/UiFilterBadge/README.md +2 -17
  17. package/src/components/UiFilterBadge/UiFilterBadge.vue +23 -0
  18. package/src/components/UiIcon/README.md +2 -18
  19. package/src/components/UiIcon/UiIcon.vue +10 -0
  20. package/src/components/UiInfoContent/README.md +2 -17
  21. package/src/components/UiInfoContent/UiInfoContent.vue +22 -0
  22. package/src/components/UiInput/README.md +4 -32
  23. package/src/components/UiInput/UiInput.vue +25 -1
  24. package/src/components/UiLabel/README.md +2 -2
  25. package/src/components/UiListItem/README.md +0 -30
  26. package/src/components/UiListItem/UiListItem.vue +56 -0
  27. package/src/components/UiMediaTypeIcon/README.md +1 -10
  28. package/src/components/UiMediaTypeIcon/UiMediaTypeIcon.vue +7 -0
  29. package/src/components/UiMenu/README.md +4 -51
  30. package/src/components/UiMenu/UiMenu.vue +112 -0
  31. package/src/components/UiPopover/README.md +1 -34
  32. package/src/components/UiPopover/UiPopover.vue +20 -1
  33. package/src/components/UiRadioButton/README.md +1 -23
  34. package/src/components/UiRadioButton/UiRadioButton.vue +11 -0
  35. package/src/components/UiSearchBar/README.md +0 -29
  36. package/src/components/UiSearchBar/UiSearchBar.vue +42 -0
  37. package/src/components/UiSearchInput/README.md +1 -23
  38. package/src/components/UiSearchInput/UiSearchInput.vue +31 -0
  39. package/src/components/UiSelect/README.md +2 -28
  40. package/src/components/UiSelect/UiSelect.vue +7 -1
  41. package/src/components/UiSkeletonBox/README.md +0 -14
  42. package/src/components/UiSkeletonBox/UiSkeletonBox.vue +12 -0
  43. package/src/components/UiSnackbar/README.md +0 -26
  44. package/src/components/UiSnackbar/UiSnackbar.vue +38 -0
  45. package/src/components/UiSpinner/README.md +0 -14
  46. package/src/components/UiSpinner/UiSpinner.vue +9 -0
  47. package/src/components/UiTShirtSizeIcon/README.md +1 -1
  48. package/src/components/UiToggleButton/README.md +0 -26
  49. package/src/components/UiToggleButton/UiToggleButton.vue +16 -0
  50. package/src/components/UiTooltip/README.md +1 -26
  51. package/src/components/UiTooltip/UiTooltip.vue +32 -0
@@ -131,6 +131,7 @@ import UiIcon from "../UiIcon/UiIcon.vue";
131
131
  import UiListItem from "../UiListItem/UiListItem.vue";
132
132
  import UiPopover from "../UiPopover/UiPopover.vue";
133
133
 
134
+ /** A single selectable option of the `options` array prop of `UiMenu`. */
134
135
  export type UiMenuOptionType<Value = unknown> = {
135
136
  label: string;
136
137
  imageSrc?: string;
@@ -141,16 +142,23 @@ export type UiMenuOptionType<Value = unknown> = {
141
142
  hasDividerAbove?: boolean;
142
143
  };
143
144
 
145
+ /** Payload emitted by the `option-selected` event, the selected option plus its index within the (flattened) option list. */
144
146
  export type UiMenuSelectedOption<Value = unknown> = UiMenuOptionType<Value> & {
145
147
  index: number;
146
148
  };
147
149
 
150
+ /** A group of options with an optional group label, used with the `groupedOptions` prop. */
148
151
  export type UiMenuGroupedOption<Value = unknown> = {
149
152
  groupLabel?: string;
150
153
  options: UiMenuOptionType<Value>[];
151
154
  };
152
155
 
153
156
  defineSlots<{
157
+ /**
158
+ * Slot within the positioned popover div, used to build fully custom menu
159
+ * contents instead of the default option list. Falls back to the default
160
+ * rendering (with support for grouped options) when not provided.
161
+ */
154
162
  default?: (props: {
155
163
  checkboxAppearance: typeof checkboxAppearance;
156
164
  iconSize: typeof iconSize;
@@ -161,6 +169,10 @@ defineSlots<{
161
169
  }) => any;
162
170
  }>();
163
171
 
172
+ /**
173
+ * The search `input` value.
174
+ * @default ""
175
+ */
164
176
  const queryModel = defineModel<string>("query", { default: "" });
165
177
 
166
178
  const {
@@ -193,45 +205,145 @@ const {
193
205
  checkboxAppearance = "primary",
194
206
  listVariant = "blank",
195
207
  } = defineProps<{
208
+ /**
209
+ * Array of options for selection. Used for the flat (un-grouped) variant
210
+ * of the menu. Mutually exclusive with `groupedOptions`.
211
+ */
196
212
  options?: UiMenuOptionType<Value>[];
213
+ /**
214
+ * Array of grouped options for selection, rendered with an optional group
215
+ * label header per group. Mutually exclusive with `options`.
216
+ */
197
217
  groupedOptions?: UiMenuGroupedOption<Value>[];
218
+ /**
219
+ * Whether the menu is initially open.
220
+ * @default false
221
+ */
198
222
  isOpen?: boolean;
223
+ /**
224
+ * Placement of the popover menu, see the
225
+ * [Floating UI Placement type](https://floating-ui.com/docs/tutorial#placements).
226
+ * @default "bottom-start"
227
+ */
199
228
  floatingUiPlacement?: Placement;
229
+ /**
230
+ * Whether to animate the opening and closing of the menu. The transition
231
+ * duration can be customized by applying
232
+ * `placed-list-class="[--transition-duration:3000ms]"` for the opening
233
+ * animation and `placed-list-class="[--transition-close-duration:2000ms]"`
234
+ * for the closing animation.
235
+ * @default false
236
+ */
200
237
  animate?: boolean;
201
238
 
202
239
  // Button slot
240
+ /**
241
+ * Disables the button that opens the menu.
242
+ * @default false
243
+ */
203
244
  disabled?: boolean;
245
+ /**
246
+ * Applies the active/filled appearance to the button to indicate an
247
+ * active filter selection.
248
+ * @default false
249
+ */
204
250
  active?: boolean;
251
+ /**
252
+ * Icon displayed to the left of the button label.
253
+ * @default null
254
+ */
205
255
  iconLeft?: UiIconName;
256
+ /**
257
+ * Visual appearance of the button that opens the menu.
258
+ * @default "outline-subtle"
259
+ */
206
260
  buttonAppearance?:
207
261
  | "fill-emphasis"
208
262
  | "fill-subtle"
209
263
  | "outline-emphasis"
210
264
  | "outline-subtle"
211
265
  | "ghost";
266
+ /**
267
+ * Size of the button that opens the menu.
268
+ * @default "sm"
269
+ */
212
270
  filterButtonSize?: "sm" | "xs";
271
+ /**
272
+ * Default title displayed on the button when nothing is selected.
273
+ * @default ""
274
+ */
213
275
  defaultTitle?: string;
276
+ /**
277
+ * Label appended after the selection count when more than one option is
278
+ * selected, e.g. "3 selected options".
279
+ * @default ""
280
+ */
214
281
  multiLabel?: string;
282
+ /**
283
+ * Displays the button without any title/selection text, useful for
284
+ * icon-only menu triggers.
285
+ * @default false
286
+ */
215
287
  noTitle?: boolean;
216
288
 
217
289
  // Search
290
+ /**
291
+ * Toggles a search input above the option list.
292
+ * @default false
293
+ */
218
294
  hasSearch?: boolean;
295
+ /**
296
+ * Placeholder text of the search input.
297
+ * @default ""
298
+ */
219
299
  searchPlaceholder?: string;
300
+ /**
301
+ * Whether to autofocus the search input when the menu opens.
302
+ * @default false
303
+ */
220
304
  hasAutoFocus?: boolean;
305
+ /**
306
+ * Toggles a reset button below the option list.
307
+ * @default false
308
+ */
221
309
  hasResetOption?: boolean;
310
+ /**
311
+ * Label text of the reset button.
312
+ * @default ""
313
+ */
222
314
  resetLabel?: string;
223
315
 
224
316
  // Menu
317
+ /**
318
+ * Size of the option icons/images.
319
+ * @default "sm"
320
+ */
225
321
  iconSize?: "sm" | "md" | "lg";
322
+ /**
323
+ * Shape of the option images.
324
+ * @default "square"
325
+ */
226
326
  imageShape?: "rounded" | "square";
327
+ /**
328
+ * Appearance of the checkbox used when `listVariant` is `"checkbox"`.
329
+ * @default "primary"
330
+ */
227
331
  checkboxAppearance?: "primary" | "secondary";
332
+ /**
333
+ * Visual style of the option list items.
334
+ * @default "blank"
335
+ */
228
336
  listVariant?: "checkbox" | "selectable" | "blank";
229
337
  }>();
230
338
 
231
339
  const emit = defineEmits<{
340
+ /** Emitted when the menu is opened. */
232
341
  open: [];
342
+ /** Emitted when the menu is closed. */
233
343
  close: [];
344
+ /** Emitted when an option is selected. */
234
345
  "option-selected": [UiMenuSelectedOption<Value>];
346
+ /** Emitted when the reset button is clicked. */
235
347
  reset: [];
236
348
  }>();
237
349
 
@@ -4,7 +4,7 @@ A general purpose popover component.
4
4
 
5
5
  ## Usage
6
6
 
7
- ```vue
7
+ ```html
8
8
  <UiPopover animate placement="bottom-start">
9
9
  <template #button="{ toggle }">
10
10
  <UiButton @click="toggle">
@@ -21,36 +21,3 @@ A general purpose popover component.
21
21
  </template>
22
22
  </UiPopover>
23
23
  ```
24
-
25
- ## Props
26
-
27
- ### `animate`
28
-
29
- - **Description**: Whether to animate the opening and closing of the popover content.
30
- - **Type**: `boolean`
31
- - **Required**: No
32
- - **Default**: `false`
33
-
34
- ### `initiallyOpen`
35
-
36
- - **Description**: Whether the popover content is initially open.
37
- - **Type**: `boolean`
38
- - **Required**: No
39
- - **Default**: `false`
40
-
41
- ### `placement`
42
-
43
- - **Description**: The placement of the popover content.
44
- - **Type**: `Placement`
45
- - **Required**: No
46
- - **Default**: `"bottom-start"`
47
-
48
- ## Slots
49
-
50
- ### `button`
51
-
52
- The trigger button. Receives as slot props the `isOpen` property and the `open`, `close`, and `toggle` functions.
53
-
54
- ### `default`
55
-
56
- The popover content. Receives as slot props the `close` function.
@@ -29,12 +29,19 @@ import { onClickOutside } from "@vueuse/core";
29
29
  import { ref, useTemplateRef, watch } from "vue";
30
30
 
31
31
  defineSlots<{
32
+ /**
33
+ * The trigger button. Receives as slot props the `isOpen` property and
34
+ * the `open`, `close`, and `toggle` functions.
35
+ */
32
36
  button: (props: {
33
37
  open: typeof open;
34
38
  close: typeof close;
35
39
  toggle: typeof toggle;
36
40
  isOpen: typeof isOpen.value;
37
41
  }) => any;
42
+ /**
43
+ * The popover content. Receives as slot props the `close` function.
44
+ */
38
45
  default: (props: { close: typeof close }) => any;
39
46
  }>();
40
47
 
@@ -61,6 +68,9 @@ const {
61
68
  }>();
62
69
 
63
70
  const emit = defineEmits<{
71
+ /**
72
+ * Emitted when the popover is opened or closed.
73
+ */
64
74
  toggle: [isOpen: boolean];
65
75
  }>();
66
76
 
@@ -106,7 +116,16 @@ onClickOutside(
106
116
  },
107
117
  );
108
118
 
109
- defineExpose({ open, close });
119
+ defineExpose({
120
+ /**
121
+ * Opens the popover content.
122
+ */
123
+ open,
124
+ /**
125
+ * Closes the popover content.
126
+ */
127
+ close,
128
+ });
110
129
  </script>
111
130
 
112
131
  <style scoped>
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Usage
4
4
 
5
- ```vue
5
+ ```html
6
6
  <!-- SomeComponent.vue using UiRadioButton -->
7
7
  <template>
8
8
  <div class="space-y-2">
@@ -19,26 +19,4 @@
19
19
  </script>
20
20
  ```
21
21
 
22
- ### Props
23
-
24
- | Name | Type | Default | Description |
25
- |--------------|----------------------------|----------------|-------------------------------------------------------------------|
26
- | `modelValue` | `string` | `undefined` | The selected value (use with `v-model`) |
27
- | `id` | `string` | auto-generated | ID of the `input` element. Used for the `label`'s `for` attribute |
28
- | `appearance` | `"primary" \| "secondary"` | `"primary"` | Visual style of the radio button |
29
- | `size` | `"sm" \| "md"` | `"md"` | Size of the radio button and label text |
30
-
31
22
  All native `input` attributes (e.g. `value`, `disabled`, `name`, `data-testid`) are forwarded to the underlying `<input>` element.
32
-
33
- ### Events
34
-
35
- | Name | Type | Description |
36
- |---------------------|----------|----------------------------------------------------|
37
- | `update:modelValue` | `string` | Emitted when the selected value changes (v-model) |
38
-
39
- ### Slots
40
-
41
- | Name | Description |
42
- |-----------|-----------------------------------------------------------------|
43
- | `default` | Label content displayed next to the radio button |
44
- | `errors` | Error message content, rendered below the radio in an error box |
@@ -71,10 +71,21 @@ const {
71
71
  * ID of the `input` element. Used for the `label`'s `for` attribute.
72
72
  */
73
73
  id?: string;
74
+ /**
75
+ * Visual style of the radio button.
76
+ * @default "primary"
77
+ */
74
78
  appearance?: "primary" | "secondary";
79
+ /**
80
+ * Size of the radio button and label text.
81
+ * @default "md"
82
+ */
75
83
  size?: "sm" | "md";
76
84
  }>();
77
85
 
86
+ /**
87
+ * The selected value. Use with `v-model`.
88
+ */
78
89
  const model = defineModel<string>();
79
90
 
80
91
  const defaultId = useId();
@@ -25,32 +25,3 @@
25
25
  </template>
26
26
 
27
27
  ```
28
-
29
- ### Props
30
-
31
- | Name | Type | Default | Description |
32
- |----------------------------|----------------------------------|---------------------|---------------------------------------------|
33
- | `modelValue` | `string` | `""` | The `input`'s value (use with `v-model`) |
34
- | `placeholder` | `string` | `""` | Text for the `input`'s placeholder |
35
- | `appearance` | `"neutral-whisper" \| "neutral"` | `"neutral-whisper"` | Sets the background color of the search bar |
36
- | `executeSearchButtonTitle` | `string` | `"Execute Search"` | Aria-label for the search button |
37
- | `resetSearchButtonTitle` | `string` | `"Reset Search"` | Aria-label for the reset button |
38
- | `showResetButtonOnMobile` | `boolean` | `false` | Shows the reset button on mobile viewports |
39
-
40
- ### Events
41
-
42
- | Name | Type | Description |
43
- |---------------------|--------------|---------------------------------------------------------|
44
- | `blur` | `FocusEvent` | Emitted when the `input` loses focus |
45
- | `focus` | `FocusEvent` | Emitted when the `input` is focused |
46
- | `reset` | `string` | Emitted when the reset button is clicked |
47
- | `search` | `string` | Emitted when the search button is clicked |
48
- | `submit` | `string` | Emitted when the user presses Enter |
49
- | `update:modelValue` | `string` | Emitted when the input value changes (implicit v-model) |
50
-
51
- ### Slots
52
-
53
- | Name | Description |
54
- |----------|----------------------------------------------------------------------------------------|
55
- | `chips` | Content displayed in place of the input text when the input is blurred and has a value |
56
- | `action` | Additional action elements rendered before the reset and search buttons |
@@ -71,14 +71,36 @@ import { ref, useTemplateRef } from "vue";
71
71
  import UiButton from "../UiButton/UiButton.vue";
72
72
  import UiIcon from "../UiIcon/UiIcon.vue";
73
73
 
74
+ defineSlots<{
75
+ /**
76
+ * Content displayed in place of the input text when the input is
77
+ * blurred and has a value, e.g. filter chips.
78
+ */
79
+ chips?: () => any;
80
+ /**
81
+ * Additional action elements rendered before the reset and search
82
+ * buttons.
83
+ */
84
+ action?: () => any;
85
+ }>();
86
+
74
87
  const emit = defineEmits<{
88
+ /** Emitted when the `input` loses focus. */
75
89
  blur: [FocusEvent];
90
+ /** Emitted when the `input` is focused. */
76
91
  focus: [FocusEvent];
92
+ /** Emitted with the current value when the reset button is clicked. */
77
93
  reset: [string];
94
+ /** Emitted with the current value when the search button is clicked. */
78
95
  search: [string];
96
+ /** Emitted with the current value when the user presses Enter. */
79
97
  submit: [string];
80
98
  }>();
81
99
 
100
+ /**
101
+ * The input's value.
102
+ * @default ""
103
+ */
82
104
  const model = defineModel<string>({ default: "" });
83
105
 
84
106
  const {
@@ -88,10 +110,30 @@ const {
88
110
  resetSearchButtonTitle = "Reset Search",
89
111
  showResetButtonOnMobile = false,
90
112
  } = defineProps<{
113
+ /**
114
+ * Text for the input's placeholder.
115
+ * @default ""
116
+ */
91
117
  placeholder?: string;
118
+ /**
119
+ * Sets the background color of the search bar.
120
+ * @default "neutral-whisper"
121
+ */
92
122
  appearance?: "neutral-whisper" | "neutral";
123
+ /**
124
+ * Aria-label for the search button.
125
+ * @default "Execute Search"
126
+ */
93
127
  executeSearchButtonTitle?: string;
128
+ /**
129
+ * Aria-label for the reset button.
130
+ * @default "Reset Search"
131
+ */
94
132
  resetSearchButtonTitle?: string;
133
+ /**
134
+ * Shows the reset button on mobile viewports.
135
+ * @default false
136
+ */
95
137
  showResetButtonOnMobile?: boolean;
96
138
  }>();
97
139
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## Usage
4
4
 
5
- ```vue
5
+ ```html
6
6
  <template>
7
7
  <UiSearchInput
8
8
  :has-add-entry-option="true"
@@ -34,25 +34,3 @@
34
34
  }
35
35
  </script>
36
36
  ```
37
-
38
- ### Props
39
- | Name | Type | Default | Description |
40
- |---------------------|------------|-----------------------|-----------------------------------------------------------|
41
- | `hadAddEntryOption` | `boolean` | `false` | Ability to add more search input |
42
- | `modelValue` | `string[]` | `required` | Array of string arrays with the values of the input Field |
43
- | `label` | `string` | `""` | Sets Label for the input field |
44
- | `placeholder` | `string` | `Default placeholder` | Sets Placeholder attribute for the input |
45
-
46
- ### Slots
47
-
48
- | Name | Description |
49
- |-----------|---------------|
50
- | `default` | Label content |
51
-
52
- ### Events
53
-
54
- | Name | Type | Description |
55
- |---------------------|-----------------------|-------------------------------------------------------------------------------------|
56
- | `update:modelValue` | `UpdateValueEvent` | Emits the Array of strings so the parent can handle the modification |
57
- | `handleKeypress` | `HandleKeypressEvent` | Emits the keyboard event and the array of strings |
58
- | `blur` | `BlurEven` | Emits blur event of the input field and transports the values entered at this point |
@@ -87,10 +87,29 @@ const slots = defineSlots<{
87
87
 
88
88
  const props = withDefaults(
89
89
  defineProps<{
90
+ /**
91
+ * The `id` attribute of the input element. Auto-generated when not set.
92
+ */
90
93
  id?: string;
94
+ /**
95
+ * Whether an additional "Add Row" button is shown next to the last
96
+ * input, allowing the user to add more input fields.
97
+ * @default false
98
+ */
91
99
  hasAddEntryOption?: boolean;
100
+ /**
101
+ * Sets the label for the input field.
102
+ * @default ""
103
+ */
92
104
  label?: string;
105
+ /**
106
+ * Array of string values, one per rendered input field.
107
+ */
93
108
  modelValue: string[];
109
+ /**
110
+ * Sets the placeholder attribute for the input.
111
+ * @default "Default placeholder"
112
+ */
94
113
  placeholder?: string;
95
114
  }>(),
96
115
  {
@@ -133,8 +152,20 @@ const deleteRow = (index: number, value: string) => {
133
152
  };
134
153
 
135
154
  const emit = defineEmits<{
155
+ /**
156
+ * Emitted with the updated array of values whenever an input field
157
+ * changes, so the parent can keep its state in sync.
158
+ */
136
159
  "update:modelValue": [string[]];
160
+ /**
161
+ * Emitted on every keydown on an input field, together with the keyboard
162
+ * event and the current array of values.
163
+ */
137
164
  handleKeypress: [{ event: KeyboardEvent; value: string[] }];
165
+ /**
166
+ * Emitted when an input field loses focus, together with the values
167
+ * entered at this point.
168
+ */
138
169
  blur: [string[]];
139
170
  }>();
140
171
 
@@ -4,7 +4,7 @@ Wraps the native `select` element.
4
4
 
5
5
  ## Usage
6
6
 
7
- ```vue
7
+ ```html
8
8
 
9
9
  <UiSelect
10
10
  v-model="appearance"
@@ -25,30 +25,4 @@ Wraps the native `select` element.
25
25
  </UiSelect>
26
26
  ```
27
27
 
28
- ## Props
29
-
30
- **Note**: This component binds all non-prop attributes (apart from `class`) on its principal element (the `select` element) instead of the root element. This allows you to add arbitrary HTML attributes (and event listeners) on the principal element without them being explicitly supported by the component.
31
-
32
- ### modelValue
33
-
34
- - **Description**: Sets the `value` IDL attribute of the underlying `select` element. Allows using `v-model` on `UiSelect`.
35
- - **Type**: `string`
36
- - **Required**: No
37
- - **Default**: `undefined`
38
-
39
- ## Slots
40
-
41
- ### default
42
-
43
- The label content.
44
-
45
- ### options
46
-
47
- Receives arbitrarily many `option` elements (or anything that is allowed in a native `select` element, see [select: Technical summary](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select#technical_summary)).
48
-
49
- ## Events
50
-
51
- ### update:modelValue
52
-
53
- - **Description**: Fired when `select` fires `input`. Allows using `v-model` on `UiSelect`.
54
- - **Type**: `string`
28
+ This component binds all non-prop attributes (apart from `class`) on its principal element (the `select` element) instead of the root element. This allows you to add arbitrary HTML attributes (and event listeners) on the principal element without them being explicitly supported by the component.
@@ -62,7 +62,9 @@ defineSlots<{
62
62
  */
63
63
  errors?: () => any;
64
64
  /**
65
- * Select options.
65
+ * Receives arbitrarily many `option` elements (or anything that is
66
+ * allowed inside a native `select` element, see
67
+ * [select: Technical summary](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/select#technical_summary)).
66
68
  */
67
69
  options: () => any;
68
70
  }>();
@@ -74,6 +76,10 @@ const { id = undefined } = defineProps<{
74
76
  id?: string;
75
77
  }>();
76
78
 
79
+ /**
80
+ * Sets the `value` IDL attribute of the underlying `select` element.
81
+ * Allows using `v-model` on `UiSelect`.
82
+ */
77
83
  const model = defineModel<string>();
78
84
 
79
85
  const defaultId = useId();
@@ -12,17 +12,3 @@
12
12
  import {UiSkeletonBox} from "@dpa-id-components/dpa-shared-components";
13
13
  </script>
14
14
  ```
15
-
16
- ## API
17
-
18
- ### Props
19
-
20
- | Name | Type | Default | Description |
21
- |---------------|-----------|---------|------------------------------------|
22
- | `dynamicSize` | `Boolean` | `false` | If true, generates a random width. |
23
- | `maxWidth` | `Number` | `100` | Max width for random width. |
24
- | `minWidth` | `Number` | `80` | Min width for random width. |
25
-
26
- ### Slots
27
-
28
- This component has no slots
@@ -16,8 +16,20 @@ const {
16
16
  minWidth = 80,
17
17
  dynamicSize = false,
18
18
  } = defineProps<{
19
+ /**
20
+ * Max width (in percent) used when generating a random width.
21
+ * @default 100
22
+ */
19
23
  maxWidth?: number;
24
+ /**
25
+ * Min width (in percent) used when generating a random width.
26
+ * @default 80
27
+ */
20
28
  minWidth?: number;
29
+ /**
30
+ * Whether to generate a random width between `minWidth` and `maxWidth`.
31
+ * @default false
32
+ */
21
33
  dynamicSize?: boolean;
22
34
  }>();
23
35
 
@@ -27,29 +27,3 @@ yarn add @dpa-id-components/UiSnackbar
27
27
  };
28
28
  </script>
29
29
  ```
30
-
31
- ## API
32
-
33
- ### Props
34
-
35
- | Name | Type | Default | Description |
36
- | ---------- | -------------------------------- | -------- | ------------------------------------------------------------ |
37
- | `isShown` | `boolean` | `false` | Visibility of the snackbar. |
38
- | `position` | `left` or `right` | `left` | Location of the snackbar, fixed in the viewport. |
39
- | `iconName` | `UiIconName` | required | Sets the `name`, which determines which svg is used as icon. |
40
- | `iconSize` | `small`, `medium`, `large` | `medium` | Sets the `size` of the icon. |
41
- | `type` | `info`, `warning` | `info` | Sets the overall design of the snackbar. |
42
-
43
- ### Slots
44
-
45
- | Name | Description |
46
- | --------- | --------------------------------------- |
47
- | `default` | Default slot for text of the snackbar |
48
- | `action` | Optional slot for text in action button |
49
-
50
- ### Events
51
-
52
- | Name | Type | Description |
53
- | -------------- | --------- | -------------------------------------- |
54
- | `action-click` | none | Emitted when the action is clicked |
55
- | `input` | `boolean` | Emitted when the snackbar gets visible |