@bitrix24/b24ui-nuxt 0.4.0 → 0.4.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.
Files changed (88) hide show
  1. package/.nuxt/b24ui/button.ts +8 -0
  2. package/.nuxt/b24ui/index.ts +1 -0
  3. package/.nuxt/b24ui/modal.ts +21 -3
  4. package/.nuxt/b24ui/prose/blockquote.ts +5 -0
  5. package/.nuxt/b24ui/prose/em.ts +5 -0
  6. package/.nuxt/b24ui/prose/h1.ts +6 -0
  7. package/.nuxt/b24ui/prose/h2.ts +16 -0
  8. package/.nuxt/b24ui/prose/h3.ts +16 -0
  9. package/.nuxt/b24ui/prose/h4.ts +16 -0
  10. package/.nuxt/b24ui/prose/h5.ts +16 -0
  11. package/.nuxt/b24ui/prose/h6.ts +16 -0
  12. package/.nuxt/b24ui/prose/hr.ts +5 -0
  13. package/.nuxt/b24ui/prose/li.ts +5 -0
  14. package/.nuxt/b24ui/prose/ol.ts +5 -0
  15. package/.nuxt/b24ui/prose/p.ts +5 -0
  16. package/.nuxt/b24ui/prose/strong.ts +5 -0
  17. package/.nuxt/b24ui/prose/ul.ts +5 -0
  18. package/.nuxt/b24ui/slideover.ts +26 -7
  19. package/dist/meta.cjs +32768 -29015
  20. package/dist/meta.d.cts +32768 -29015
  21. package/dist/meta.d.mts +32768 -29015
  22. package/dist/meta.d.ts +32768 -29015
  23. package/dist/meta.mjs +32768 -29015
  24. package/dist/module.cjs +6 -1
  25. package/dist/module.json +1 -1
  26. package/dist/module.mjs +6 -1
  27. package/dist/runtime/components/Advice.vue +3 -0
  28. package/dist/runtime/components/Alert.vue +17 -2
  29. package/dist/runtime/components/Avatar.vue +7 -0
  30. package/dist/runtime/components/AvatarGroup.vue +3 -0
  31. package/dist/runtime/components/Badge.vue +21 -3
  32. package/dist/runtime/components/Button.vue +120 -52
  33. package/dist/runtime/components/ButtonGroup.vue +7 -1
  34. package/dist/runtime/components/Checkbox.vue +6 -0
  35. package/dist/runtime/components/Chip.vue +18 -2
  36. package/dist/runtime/components/Countdown.vue +32 -8
  37. package/dist/runtime/components/{content/DescriptionList.vue → DescriptionList.vue} +19 -8
  38. package/dist/runtime/components/DropdownMenu.vue +14 -2
  39. package/dist/runtime/components/DropdownMenuContent.vue +6 -0
  40. package/dist/runtime/components/FormField.vue +6 -0
  41. package/dist/runtime/components/Input.vue +50 -6
  42. package/dist/runtime/components/InputMenu.vue +67 -15
  43. package/dist/runtime/components/InputNumber.vue +42 -8
  44. package/dist/runtime/components/Kbd.vue +6 -0
  45. package/dist/runtime/components/Link.vue +8 -4
  46. package/dist/runtime/components/Modal.vue +22 -5
  47. package/dist/runtime/components/Progress.vue +19 -3
  48. package/dist/runtime/components/RadioGroup.vue +6 -0
  49. package/dist/runtime/components/Range.vue +9 -1
  50. package/dist/runtime/components/Select.vue +47 -10
  51. package/dist/runtime/components/SelectMenu.vue +52 -12
  52. package/dist/runtime/components/Separator.vue +16 -2
  53. package/dist/runtime/components/Slideover.vue +22 -4
  54. package/dist/runtime/components/Switch.vue +19 -3
  55. package/dist/runtime/components/Tabs.vue +12 -0
  56. package/dist/runtime/components/Textarea.vue +50 -6
  57. package/dist/runtime/components/Toast.vue +13 -2
  58. package/dist/runtime/components/Toaster.vue +8 -0
  59. package/dist/runtime/components/{prose → content}/TableWrapper.vue +27 -3
  60. package/dist/runtime/composables/useComponentIcons.d.ts +9 -2
  61. package/dist/runtime/index.css +1 -1
  62. package/dist/runtime/prose/Blockquote.vue +36 -0
  63. package/dist/runtime/prose/Em.vue +36 -0
  64. package/dist/runtime/prose/H1.vue +36 -0
  65. package/dist/runtime/prose/H2.vue +36 -0
  66. package/dist/runtime/prose/H3.vue +36 -0
  67. package/dist/runtime/prose/H4.vue +36 -0
  68. package/dist/runtime/prose/H5.vue +36 -0
  69. package/dist/runtime/prose/H6.vue +36 -0
  70. package/dist/runtime/prose/Hr.vue +30 -0
  71. package/dist/runtime/prose/Li.vue +36 -0
  72. package/dist/runtime/prose/Ol.vue +36 -0
  73. package/dist/runtime/prose/P.vue +36 -0
  74. package/dist/runtime/prose/Strong.vue +36 -0
  75. package/dist/runtime/prose/Ul.vue +36 -0
  76. package/dist/runtime/types/index.d.ts +16 -2
  77. package/dist/runtime/types/index.js +16 -2
  78. package/dist/runtime/utils/index.js +1 -1
  79. package/dist/runtime/vue/components/Link.vue +10 -6
  80. package/dist/shared/{b24ui-nuxt.BT9wxrhm.cjs → b24ui-nuxt.Bt28CeAD.cjs} +350 -90
  81. package/dist/shared/{b24ui-nuxt.CBO0gAWn.mjs → b24ui-nuxt.Bx_-_mhu.mjs} +350 -90
  82. package/dist/unplugin.cjs +4 -4
  83. package/dist/unplugin.mjs +4 -4
  84. package/dist/vite.cjs +1 -1
  85. package/dist/vite.mjs +1 -1
  86. package/package.json +7 -6
  87. /package/.nuxt/b24ui/{prose → content}/table-wrapper.ts +0 -0
  88. /package/.nuxt/b24ui/{content/description-list.ts → description-list.ts} +0 -0
package/dist/module.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const defu = require('defu');
4
4
  const kit = require('@nuxt/kit');
5
- const templates = require('./shared/b24ui-nuxt.BT9wxrhm.cjs');
5
+ const templates = require('./shared/b24ui-nuxt.Bt28CeAD.cjs');
6
6
  require('node:url');
7
7
  require('scule');
8
8
 
@@ -46,6 +46,11 @@ const module$1 = kit.defineNuxtModule({
46
46
  prefix: "B24",
47
47
  pathPrefix: false
48
48
  });
49
+ kit.addComponentsDir({
50
+ path: resolve("./runtime/prose"),
51
+ prefix: "Prose",
52
+ pathPrefix: false
53
+ });
49
54
  kit.addImportsDir(resolve("./runtime/composables"));
50
55
  templates.addTemplates(options, nuxt, resolve);
51
56
  }
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.13.1"
6
6
  },
7
7
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
8
- "version": "0.4.0",
8
+ "version": "0.4.2",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "0.8.4",
11
11
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defu } from 'defu';
2
2
  import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
3
- import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.CBO0gAWn.mjs';
3
+ import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.Bx_-_mhu.mjs';
4
4
  import 'node:url';
5
5
  import 'scule';
6
6
 
@@ -43,6 +43,11 @@ const module = defineNuxtModule({
43
43
  prefix: "B24",
44
44
  pathPrefix: false
45
45
  });
46
+ addComponentsDir({
47
+ path: resolve("./runtime/prose"),
48
+ prefix: "Prose",
49
+ pathPrefix: false
50
+ });
46
51
  addImportsDir(resolve("./runtime/composables"));
47
52
  addTemplates(options, nuxt, resolve);
48
53
  }
@@ -20,6 +20,9 @@ export interface AdviceProps extends Omit<UseComponentIconsProps, 'loading' | 't
20
20
  */
21
21
  as?: any
22
22
  description?: string
23
+ /**
24
+ * @defaultValue 'bottom'
25
+ */
23
26
  angle?: AdviceVariants['angle']
24
27
  class?: any
25
28
  b24ui?: Partial<typeof advice.slots>
@@ -20,21 +20,35 @@ export interface AlertProps {
20
20
  as?: any
21
21
  title?: string
22
22
  description?: string
23
+ /**
24
+ * Display an icon on the left side.
25
+ * @IconComponent
26
+ */
23
27
  icon?: IconComponent
24
28
  avatar?: AvatarProps
29
+ /**
30
+ * @defaultValue 'default'
31
+ */
25
32
  color?: AlertVariants['color']
33
+ /**
34
+ * The orientation between the content and the actions.
35
+ * @defaultValue 'vertical'
36
+ */
26
37
  orientation?: AlertVariants['orientation']
38
+ /**
39
+ * @defaultValue 'md'
40
+ */
27
41
  size?: AlertVariants['size']
28
42
  /**
29
43
  * Display a list of actions:
30
44
  * - under the title and description when orientation is `vertical`
31
45
  * - next to the close button when orientation is `horizontal`
32
- * `{ size: 'xs' }`{lang="ts-type"}
46
+ * `{ size: 'xs' }`{lang="ts"}
33
47
  */
34
48
  actions?: ButtonProps[]
35
49
  /**
36
50
  * Display a close button to dismiss the alert.
37
- * `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts-type"}
51
+ * `{ size: 'md', color: 'neutral', variant: 'link' }`{lang="ts"}
38
52
  * @emits 'update:open'
39
53
  * @defaultValue false
40
54
  */
@@ -42,6 +56,7 @@ export interface AlertProps {
42
56
  /**
43
57
  * The icon displayed in the close button.
44
58
  * @defaultValue icons.close
59
+ * @IconComponent
45
60
  */
46
61
  closeIcon?: IconComponent
47
62
  class?: any
@@ -20,8 +20,15 @@ export interface AvatarProps {
20
20
  as?: any
21
21
  src?: string
22
22
  alt?: string
23
+ /**
24
+ * Display an icon on the left side.
25
+ * @IconComponent
26
+ */
23
27
  icon?: IconComponent
24
28
  text?: string
29
+ /**
30
+ * @defaultValue 'md'
31
+ */
25
32
  size?: AvatarVariants['size']
26
33
  class?: any
27
34
  b24ui?: Partial<typeof avatar.slots>
@@ -17,6 +17,9 @@ export interface AvatarGroupProps {
17
17
  * @defaultValue 'div'
18
18
  */
19
19
  as?: any
20
+ /**
21
+ * @defaultValue 'md'
22
+ */
20
23
  size?: AvatarGroupVariants['size']
21
24
  /**
22
25
  * The maximum number of avatars to display.
@@ -20,15 +20,33 @@ export interface BadgeProps extends Omit<UseComponentIconsProps, 'loading' | 'lo
20
20
  */
21
21
  as?: any
22
22
  label?: string | number
23
+ /**
24
+ * @defaultValue 'default'
25
+ */
23
26
  color?: BadgeVariants['color']
27
+ /**
28
+ * @defaultValue 'normal'
29
+ */
24
30
  depth?: BadgeVariants['depth']
31
+ /**
32
+ * @defaultValue 'md'
33
+ */
25
34
  size?: BadgeVariants['size']
26
- /** Shows 'underline' on hover */
35
+ /**
36
+ * Shows 'underline' on hover
37
+ * @defaultValue false
38
+ */
27
39
  useLink?: boolean
28
- /** Shows `Cross20Icon` icon on the right side */
40
+ /**
41
+ * Shows icons.close on the right side
42
+ * @defaultValue false
43
+ */
29
44
  useClose?: boolean
30
45
  onCloseClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>
31
- /** Fills the background */
46
+ /**
47
+ * Fills the background
48
+ * @defaultValue false
49
+ */
32
50
  useFill?: boolean
33
51
  class?: any
34
52
  b24ui?: Partial<typeof badge.slots>
@@ -17,25 +17,67 @@ type ButtonVariants = VariantProps<typeof button>
17
17
 
18
18
  export interface ButtonProps extends Omit<UseComponentIconsProps, 'trailing' | 'trailingIcon'>, Omit<LinkProps, 'raw' | 'custom'> {
19
19
  label?: string
20
+ /**
21
+ * @defaultValue 'default'
22
+ */
20
23
  color?: ButtonVariants['color']
24
+ activeColor?: ButtonVariants['color']
25
+ /**
26
+ * @defaultValue 'normal'
27
+ */
21
28
  depth?: ButtonVariants['depth']
29
+ activeDepth?: ButtonVariants['depth']
30
+ /**
31
+ * @defaultValue 'md'
32
+ */
22
33
  size?: ButtonVariants['size']
23
- /** Rounds the corners of the button. */
34
+ /**
35
+ * Rounds the corners of the button
36
+ * @defaultValue false
37
+ */
24
38
  rounded?: boolean
25
- /** Render the button full width. */
39
+ /**
40
+ * Render the button full width
41
+ * @defaultValue false
42
+ */
26
43
  block?: boolean
27
- /** Set loading state automatically based on the `@click` promise state */
44
+ /**
45
+ * Set loading state automatically based on the `@click` promise state
46
+ * @defaultValue false
47
+ */
28
48
  loadingAuto?: boolean
29
- /** Disable uppercase label */
49
+ /**
50
+ * Disable uppercase label
51
+ * @defaultValue false
52
+ */
30
53
  normalCase?: boolean
31
- /** Shows `Wait` icon in loading mode */
54
+ /**
55
+ * Shows LoaderWaitIcon in loading mode
56
+ * @defaultValue false
57
+ */
32
58
  useWait?: boolean
33
- /** Shows `Clock` icon in loading mode */
59
+ /**
60
+ * Shows LoaderClockIcon icon in loading mode
61
+ * @defaultValue false
62
+ */
34
63
  useClock?: boolean
35
- /** Shows `ChevronDownIcon` icon on the right side */
64
+ /**
65
+ * Shows icons.chevronDown on the right side
66
+ * @defaultValue false
67
+ */
36
68
  useDropdown?: boolean
37
69
  onClick?: ((event: MouseEvent) => void | Promise<void>) | Array<((event: MouseEvent) => void | Promise<void>)>
38
70
  class?: any
71
+ /**
72
+ * The class to apply when the link is active
73
+ * @defaultValue ''
74
+ */
75
+ activeClass?: string
76
+ /**
77
+ * The class to apply when the link is inactive
78
+ * @defaultValue ''
79
+ */
80
+ inactiveClass?: string
39
81
  b24ui?: PartialString<typeof button.slots>
40
82
  }
41
83
 
@@ -62,7 +104,10 @@ import LoaderClockIcon from '@bitrix24/b24icons-vue/animated/LoaderClockIcon'
62
104
  import SpinnerIcon from '@bitrix24/b24icons-vue/specialized/SpinnerIcon'
63
105
 
64
106
  const props = withDefaults(defineProps<ButtonProps>(), {
65
- type: 'button'
107
+ type: 'button',
108
+ active: undefined,
109
+ activeClass: '',
110
+ inactiveClass: ''
66
111
  })
67
112
 
68
113
  const slots = defineSlots<ButtonSlots>()
@@ -102,7 +147,19 @@ const isLabel = computed(() => {
102
147
  return (props?.label || '').length > 0 || isUseSlot
103
148
  })
104
149
 
105
- const b24ui = computed(() => button({
150
+ const b24ui = computed(() => tv({
151
+ extend: button,
152
+ variants: {
153
+ active: {
154
+ true: {
155
+ base: props.activeClass
156
+ },
157
+ false: {
158
+ base: props.inactiveClass
159
+ }
160
+ }
161
+ }
162
+ })({
106
163
  color: props.color,
107
164
  depth: props.depth,
108
165
  size: buttonSize.value,
@@ -122,54 +179,65 @@ const b24ui = computed(() => button({
122
179
 
123
180
  <template>
124
181
  <B24Link
182
+ v-slot="{ active, ...slotProps }"
125
183
  :type="type"
126
184
  :disabled="disabled || isLoading"
127
185
  :class="b24ui.base({ class: [props.class, props.b24ui?.base] })"
128
186
  v-bind="omit(linkProps, ['type', 'disabled'])"
129
- raw
130
- @click="onClickWrapper"
187
+ custom
131
188
  >
132
- <div
133
- v-if="isLoading"
134
- class="h-full w-full absolute inset-0 flex flex-row flex-nowrap items-center justify-center"
135
- >
136
- <LoaderWaitIcon v-if="useWait" class="w-[28px] h-[28px]" aria-hidden="true" />
137
- <LoaderClockIcon v-else-if="useClock" class="w-[28px] h-[28px]" aria-hidden="true" />
138
- <SpinnerIcon v-else class="size-lg animate-spin stroke-2" aria-hidden="true" />
139
- </div>
140
- <div
141
- :class="[
142
- b24ui.baseLine({ class: [props.b24ui?.baseLine] }),
143
- isLoading ? 'invisible' : ''
144
- ]"
189
+ <B24LinkBase
190
+ v-bind="slotProps"
191
+ :class="b24ui.base({
192
+ class: [props.class, props.b24ui?.base],
193
+ active,
194
+ ...(active && activeDepth ? { depth: activeDepth } : {}),
195
+ ...(active && activeColor ? { color: activeColor } : {})
196
+ })"
197
+ @click="onClickWrapper"
145
198
  >
146
- <slot name="leading">
147
- <Component
148
- :is="leadingIconName"
149
- v-if="isLeading && (typeof leadingIconName !== 'undefined')"
150
- :class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
151
- />
152
- <B24Avatar
153
- v-else-if="!!avatar"
154
- :size="((props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()) as AvatarProps['size'])"
155
- v-bind="avatar"
156
- :class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
157
- />
158
- </slot>
159
-
160
- <slot>
161
- <span v-if="label" :class="b24ui.label({ class: props.b24ui?.label })">
162
- {{ label }}
163
- </span>
164
- </slot>
165
-
166
- <slot name="trailing">
167
- <ChevronDownIcon
168
- v-if="useDropdown"
169
- :class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
170
- aria-hidden="true"
171
- />
172
- </slot>
173
- </div>
199
+ <div
200
+ v-if="isLoading"
201
+ class="h-full w-full absolute inset-0 flex flex-row flex-nowrap items-center justify-center"
202
+ >
203
+ <LoaderWaitIcon v-if="useWait" class="w-[28px] h-[28px]" aria-hidden="true" />
204
+ <LoaderClockIcon v-else-if="useClock" class="w-[28px] h-[28px]" aria-hidden="true" />
205
+ <SpinnerIcon v-else class="size-lg animate-spin stroke-2" aria-hidden="true" />
206
+ </div>
207
+ <div
208
+ :class="[
209
+ b24ui.baseLine({ class: [props.b24ui?.baseLine] }),
210
+ isLoading ? 'invisible' : ''
211
+ ]"
212
+ >
213
+ <slot name="leading">
214
+ <Component
215
+ :is="leadingIconName"
216
+ v-if="isLeading && (typeof leadingIconName !== 'undefined')"
217
+ :class="b24ui.leadingIcon({ class: props.b24ui?.leadingIcon })"
218
+ />
219
+ <B24Avatar
220
+ v-else-if="!!avatar"
221
+ :size="((props.b24ui?.leadingAvatarSize || b24ui.leadingAvatarSize()) as AvatarProps['size'])"
222
+ v-bind="avatar"
223
+ :class="b24ui.leadingAvatar({ class: props.b24ui?.leadingAvatar })"
224
+ />
225
+ </slot>
226
+
227
+ <slot>
228
+ <span v-if="label" :class="b24ui.label({ class: props.b24ui?.label, active })">
229
+ {{ label }}
230
+ </span>
231
+ </slot>
232
+
233
+ <slot name="trailing">
234
+ <ChevronDownIcon
235
+ v-if="useDropdown"
236
+ :class="b24ui.trailingIcon({ class: props.b24ui?.trailingIcon })"
237
+ aria-hidden="true"
238
+ />
239
+ </slot>
240
+ </div>
241
+ </B24LinkBase>
174
242
  </B24Link>
175
243
  </template>
@@ -17,13 +17,19 @@ export interface ButtonGroupProps {
17
17
  * @defaultValue 'div'
18
18
  */
19
19
  as?: any
20
+ /**
21
+ * @defaultValue 'md'
22
+ */
20
23
  size?: ButtonGroupVariants['size']
21
24
  /**
22
25
  * The orientation the buttons are laid out.
23
26
  * @defaultValue 'horizontal'
24
27
  */
25
28
  orientation?: ButtonGroupVariants['orientation']
26
- /** Disable split */
29
+ /**
30
+ * Disable show split
31
+ * @defaultValue false
32
+ */
27
33
  noSplit?: boolean
28
34
  class?: any
29
35
  }
@@ -20,7 +20,13 @@ export interface CheckboxProps extends Pick<CheckboxRootProps, 'disabled' | 'req
20
20
  as?: any
21
21
  label?: string
22
22
  description?: string
23
+ /**
24
+ * @defaultValue 'primary'
25
+ */
23
26
  color?: CheckboxVariants['color']
27
+ /**
28
+ * @defaultValue 'md'
29
+ */
24
30
  size?: CheckboxVariants['size']
25
31
  class?: any
26
32
  b24ui?: Partial<typeof checkbox.slots>
@@ -19,12 +19,28 @@ export interface ChipProps {
19
19
  as?: any
20
20
  /** Display some text inside the chip. */
21
21
  text?: string | number
22
+ /**
23
+ * @defaultValue 'danger'
24
+ */
22
25
  color?: ChipVariants['color']
26
+ /**
27
+ * @defaultValue 'sm'
28
+ */
23
29
  size?: ChipVariants['size']
30
+ /**
31
+ * The position of the chip.
32
+ * @defaultValue 'top-right'
33
+ */
24
34
  position?: ChipVariants['position']
25
- /** When `true`, keep the chip inside the component for rounded elements */
35
+ /**
36
+ * When `true`, keep the chip inside the component for rounded elements
37
+ * @defaultValue false
38
+ */
26
39
  inset?: boolean
27
- /** When `true`, render the chip relatively to the parent. */
40
+ /**
41
+ * When `true`, render the chip relatively to the parent.
42
+ * @defaultValue false
43
+ */
28
44
  standalone?: boolean
29
45
  class?: any
30
46
  b24ui?: Partial<typeof chip.slots>
@@ -28,24 +28,48 @@ export interface CountdownData {
28
28
 
29
29
  export interface CountdownProps extends Omit<UseComponentIconsProps, 'loading' | 'trailing' | 'trailingIcon'> {
30
30
  /**
31
- * The element or component this component should render as.
31
+ * The element or component this component should render as
32
32
  * @defaultValue 'span'
33
33
  */
34
34
  as?: any
35
+ /**
36
+ * @defaultValue 'md'
37
+ */
35
38
  size?: CountdownVariants['size']
36
- /** Emits the countdown events. */
39
+ /**
40
+ * Emits the countdown events
41
+ * @defaultValue true
42
+ */
37
43
  emitEvents?: boolean
38
- /** Number of seconds to countdown. */
44
+ /**
45
+ * Number of seconds to countdown
46
+ * @defaultValue 0
47
+ */
39
48
  seconds?: number | string
40
- /** Should seconds be divided into minutes? */
49
+ /**
50
+ * Should seconds be divided into minutes?
51
+ * @defaultValue true
52
+ */
41
53
  showMinutes?: boolean
42
- /** Shows a `Circle` around the countdown */
54
+ /**
55
+ * Shows a `Circle` around the countdown
56
+ * @defaultValue false
57
+ */
43
58
  useCircle?: boolean
44
- /** The interval time (in milliseconds) of the countdown progress. */
59
+ /**
60
+ * The interval time (in milliseconds) of the countdown progress
61
+ * @defaultValue 1000
62
+ */
45
63
  interval?: number
46
- /** Starts the countdown automatically when initialized. */
64
+ /**
65
+ * Starts the countdown automatically when initialized
66
+ * @defaultValue true
67
+ */
47
68
  needStartImmediately?: boolean
48
- /** Generate the current time of a specific time zone. */
69
+ /**
70
+ * Generate the current time of a specific time zone
71
+ * @defaultValue Date.now()
72
+ */
49
73
  now?: () => number
50
74
  class?: any
51
75
  b24ui?: Partial<typeof countdown.slots>
@@ -2,10 +2,10 @@
2
2
  import type { VariantProps } from 'tailwind-variants'
3
3
  import type { AppConfig } from '@nuxt/schema'
4
4
  import _appConfig from '#build/app.config'
5
- import theme from '#build/b24ui/content/description-list'
6
- import { tv } from '../../utils/tv'
7
- import type { AvatarProps, ButtonProps, IconComponent } from '../../types'
8
- import type { DynamicSlots } from '../../types/utils'
5
+ import theme from '#build/b24ui/description-list'
6
+ import { tv } from '../utils/tv'
7
+ import type { AvatarProps, ButtonProps, IconComponent } from '../types'
8
+ import type { DynamicSlots } from '../types/utils'
9
9
 
10
10
  const appConfigDescriptionList = _appConfig as AppConfig & { b24ui: { descriptionList: Partial<typeof theme> } }
11
11
 
@@ -15,16 +15,24 @@ type DescriptionListVariants = VariantProps<typeof descriptionList>
15
15
 
16
16
  export interface DescriptionListItem {
17
17
  label?: string
18
+ /**
19
+ * Display an icon on the left side.
20
+ * @IconComponent
21
+ */
18
22
  icon?: IconComponent
19
23
  avatar?: AvatarProps
20
24
  slot?: string
21
25
  description?: string
26
+ /**
27
+ * The orientation between the content and the actions.
28
+ * @defaultValue 'vertical'
29
+ */
22
30
  orientation?: DescriptionListVariants['orientation']
23
31
  /**
24
32
  * Display a list of actions:
25
33
  * - under the description when orientation is `vertical`
26
34
  * - next to the description when orientation is `horizontal`
27
- * `{ size: 'xs' }`{lang="ts-type"}
35
+ * `{ size: 'xs' }`{lang="ts"}
28
36
  */
29
37
  actions?: ButtonProps[]
30
38
  class?: any
@@ -45,6 +53,9 @@ export interface DescriptionListProps<T> {
45
53
  */
46
54
  descriptionKey?: string
47
55
  items?: T[]
56
+ /**
57
+ * @defaultValue 'md'
58
+ */
48
59
  size?: DescriptionListVariants['size']
49
60
  class?: any
50
61
  b24ui?: Partial<typeof descriptionList.slots>
@@ -65,9 +76,9 @@ export type DescriptionListSlots<T extends { slot?: string }> = {
65
76
 
66
77
  <script setup lang="ts" generic="T extends DescriptionListItem">
67
78
  import { computed } from 'vue'
68
- import { get } from '../../utils'
69
- import B24Avatar from '../Avatar.vue'
70
- import B24Button from '../Button.vue'
79
+ import { get } from '../utils'
80
+ import B24Avatar from './Avatar.vue'
81
+ import B24Button from './Button.vue'
71
82
 
72
83
  const props = withDefaults(defineProps<DescriptionListProps<T>>(), {
73
84
  labelKey: 'label',
@@ -16,6 +16,10 @@ type DropdownMenuVariants = VariantProps<typeof dropdownMenu>
16
16
 
17
17
  export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'custom'> {
18
18
  label?: string
19
+ /**
20
+ * Display an icon on the left side.
21
+ * @IconComponent
22
+ */
19
23
  icon?: IconComponent
20
24
  color?: DropdownMenuVariants['color']
21
25
  avatar?: AvatarProps
@@ -38,17 +42,22 @@ export interface DropdownMenuItem extends Omit<LinkProps, 'type' | 'raw' | 'cust
38
42
  }
39
43
 
40
44
  export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'> {
45
+ /**
46
+ * @defaultValue 'md'
47
+ */
41
48
  size?: DropdownMenuVariants['size']
42
49
  items?: T[] | T[][]
43
50
  /**
44
51
  * The icon displayed when an item is checked.
45
- * @defaultValue icons.check = `CheckIcon`
52
+ * @defaultValue icons.check
53
+ * @IconComponent
46
54
  */
47
55
  checkedIcon?: IconComponent
48
56
  /**
49
57
  * The icon displayed when the item is an external link.
50
58
  * Set to `false` to hide the external icon.
51
- * @defaultValue icons.external = `OpenIn50Icon`
59
+ * @defaultValue icons.external
60
+ * @IconComponent
52
61
  */
53
62
  externalIcon?: boolean | IconComponent
54
63
  /**
@@ -71,6 +80,9 @@ export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'>
71
80
  * @defaultValue 'label'
72
81
  */
73
82
  labelKey?: string
83
+ /**
84
+ * @defaultValue false
85
+ */
74
86
  disabled?: boolean
75
87
  class?: any
76
88
  b24ui?: PartialString<typeof dropdownMenu.slots>
@@ -12,7 +12,13 @@ interface DropdownMenuContentProps<T> extends Omit<RekaDropdownMenuContentProps,
12
12
  portal?: boolean
13
13
  sub?: boolean
14
14
  labelKey: string
15
+ /**
16
+ * @IconComponent
17
+ */
15
18
  checkedIcon?: IconComponent
19
+ /**
20
+ * @IconComponent
21
+ */
16
22
  externalIcon?: boolean | IconComponent
17
23
  class?: any
18
24
  b24ui: typeof _dropdownMenu
@@ -26,7 +26,13 @@ export interface FormFieldProps {
26
26
  help?: string
27
27
  error?: string | boolean
28
28
  hint?: string
29
+ /**
30
+ * @defaultValue 'md'
31
+ */
29
32
  size?: FormFieldVariants['size']
33
+ /**
34
+ * @defaultValue false
35
+ */
30
36
  required?: boolean
31
37
  eagerValidation?: boolean
32
38
  validateOnInputDelay?: number