daisy-ui-kit 3.0.11 → 5.0.0-pre.3

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 (121) hide show
  1. package/README.md +62 -14
  2. package/package.json +45 -64
  3. package/components/Accordion.vue +0 -29
  4. package/components/Alert.vue +0 -25
  5. package/components/Artboard.vue +0 -33
  6. package/components/Avatar.vue +0 -70
  7. package/components/AvatarGroup.vue +0 -19
  8. package/components/Badge.vue +0 -50
  9. package/components/BottomNav.vue +0 -25
  10. package/components/Breadcrumbs.vue +0 -7
  11. package/components/Button.vue +0 -111
  12. package/components/Card.vue +0 -30
  13. package/components/CardActions.vue +0 -16
  14. package/components/CardBody.vue +0 -16
  15. package/components/CardTitle.vue +0 -16
  16. package/components/Carousel.vue +0 -25
  17. package/components/CarouselItem.vue +0 -5
  18. package/components/Chat.vue +0 -27
  19. package/components/ChatBubble.vue +0 -34
  20. package/components/ChatFooter.vue +0 -5
  21. package/components/ChatHeader.vue +0 -5
  22. package/components/ChatImage.vue +0 -5
  23. package/components/Checkbox.vue +0 -55
  24. package/components/Code.vue +0 -92
  25. package/components/Collapse.vue +0 -54
  26. package/components/CollapseContent.vue +0 -5
  27. package/components/CollapseTitle.vue +0 -5
  28. package/components/Countdown.vue +0 -15
  29. package/components/CountdownTimers.vue +0 -70
  30. package/components/Counter.vue +0 -14
  31. package/components/Crumb.vue +0 -5
  32. package/components/Divider.vue +0 -24
  33. package/components/Drawer.vue +0 -45
  34. package/components/DrawerContent.vue +0 -17
  35. package/components/DrawerSide.vue +0 -18
  36. package/components/Dropdown.vue +0 -95
  37. package/components/DropdownButton.vue +0 -16
  38. package/components/DropdownContent.vue +0 -56
  39. package/components/DropdownTarget.vue +0 -14
  40. package/components/FileInput.vue +0 -59
  41. package/components/Flex.vue +0 -59
  42. package/components/FlexItem.vue +0 -59
  43. package/components/Footer.vue +0 -24
  44. package/components/FooterTitle.vue +0 -15
  45. package/components/FormControl.vue +0 -5
  46. package/components/Hero.vue +0 -15
  47. package/components/HeroContent.vue +0 -15
  48. package/components/HeroOverlay.vue +0 -5
  49. package/components/Indicator.vue +0 -13
  50. package/components/IndicatorItem.vue +0 -36
  51. package/components/Join.vue +0 -5
  52. package/components/Kbd.vue +0 -25
  53. package/components/Label.vue +0 -15
  54. package/components/LabelText.vue +0 -15
  55. package/components/LabelTextAlt.vue +0 -15
  56. package/components/Link.vue +0 -40
  57. package/components/LoadingBall.vue +0 -43
  58. package/components/LoadingBars.vue +0 -43
  59. package/components/LoadingDots.vue +0 -43
  60. package/components/LoadingInfinity.vue +0 -43
  61. package/components/LoadingRing.vue +0 -43
  62. package/components/LoadingSpinner.vue +0 -43
  63. package/components/Mask.config.ts +0 -77
  64. package/components/Mask.vue +0 -14
  65. package/components/Menu.vue +0 -35
  66. package/components/MenuExpand.vue +0 -78
  67. package/components/MenuExpandToggle.vue +0 -13
  68. package/components/MenuItem.vue +0 -38
  69. package/components/MenuTitle.vue +0 -5
  70. package/components/MockupBrowser.vue +0 -5
  71. package/components/MockupBrowserToolbar.vue +0 -5
  72. package/components/MockupCode.vue +0 -4
  73. package/components/MockupPhone.vue +0 -8
  74. package/components/MockupWindow.vue +0 -5
  75. package/components/Modal.vue +0 -48
  76. package/components/ModalAction.vue +0 -5
  77. package/components/ModalBox.vue +0 -5
  78. package/components/NavButton.vue +0 -20
  79. package/components/Navbar.vue +0 -14
  80. package/components/NavbarCenter.vue +0 -13
  81. package/components/NavbarEnd.vue +0 -13
  82. package/components/NavbarStart.vue +0 -13
  83. package/components/Progress.vue +0 -42
  84. package/components/Prose.vue +0 -32
  85. package/components/RadialProgress.vue +0 -41
  86. package/components/Radio.vue +0 -76
  87. package/components/RadioGroup.vue +0 -46
  88. package/components/Range.vue +0 -60
  89. package/components/RangeMeasure.vue +0 -83
  90. package/components/RangeMeasureTick.vue +0 -74
  91. package/components/Rating.vue +0 -167
  92. package/components/Select.vue +0 -100
  93. package/components/Stack.vue +0 -13
  94. package/components/Stat.vue +0 -5
  95. package/components/StatActions.vue +0 -5
  96. package/components/StatDesc.vue +0 -5
  97. package/components/StatFigure.vue +0 -5
  98. package/components/StatTitle.vue +0 -5
  99. package/components/StatValue.vue +0 -5
  100. package/components/Stats.vue +0 -5
  101. package/components/Step.vue +0 -36
  102. package/components/Steps.vue +0 -21
  103. package/components/Swap.vue +0 -58
  104. package/components/Tab.vue +0 -48
  105. package/components/TabContent.vue +0 -29
  106. package/components/Tabs.vue +0 -77
  107. package/components/TabsManager.vue +0 -38
  108. package/components/Text.vue +0 -142
  109. package/components/TextArea.vue +0 -64
  110. package/components/TextInput.vue +0 -66
  111. package/components/Toast.vue +0 -31
  112. package/components/Toggle.vue +0 -59
  113. package/components/Tooltip.vue +0 -47
  114. package/index.ts +0 -108
  115. package/nuxt.js +0 -22
  116. package/utils/-utils.ts +0 -41
  117. package/utils/Button.config.ts +0 -26
  118. package/utils/drawer-utils.ts +0 -32
  119. package/utils/fixtures.ts +0 -62
  120. package/utils/random-string.ts +0 -19
  121. package/utils/types.ts +0 -7
@@ -1,56 +0,0 @@
1
- <script setup>
2
- import { inject, nextTick, ref, watchEffect } from 'vue'
3
- import { useFocusTrap } from '@vueuse/integrations/useFocusTrap'
4
-
5
- const autoFocus = inject('dropdownAutoFocus')
6
- const id = inject('dropdownId')
7
- const isOpen = inject('isDropdownOpen')
8
- const isOpenDelayed = ref(isOpen.value)
9
- const contentEl = inject('contentEl')
10
- const floatingStyles = inject('floatingStyles')
11
-
12
- // Dropdown Utils
13
- const toggle = inject('toggleDropdown')
14
- const open = inject('openDropdown')
15
- const close = inject('closeDropdown')
16
-
17
- let activate
18
- let deactivate
19
-
20
- if (autoFocus.value) {
21
- const { activate: _activate, deactivate: _deactivate, hasFocus } = useFocusTrap(contentEl, { immediate: true })
22
- activate = _activate
23
- deactivate = _deactivate
24
-
25
- // hide the dropdown when the focus-trap drops focus (by pressing escape, for example)
26
- watchEffect(() => {
27
- if (!hasFocus.value)
28
- close()
29
- })
30
- }
31
- // const { activate, deactivate, hasFocus } = useFocusTrap(contentEl, { immediate: true })
32
-
33
- // synchronize isOpenDelayed with isOpen
34
- watchEffect(async () => {
35
- if (isOpen.value) {
36
- isOpenDelayed.value = true
37
- if (autoFocus.value) {
38
- await nextTick()
39
- activate()
40
- }
41
- }
42
- else {
43
- if (autoFocus.value) {
44
- deactivate()
45
- await nextTick()
46
- }
47
- isOpenDelayed.value = false
48
- }
49
- })
50
- </script>
51
-
52
- <template>
53
- <div v-if="isOpen" ref="contentEl" :style="floatingStyles" :aria-labelledby="id" role="menu">
54
- <slot v-bind="{ toggle, open, close }" />
55
- </div>
56
- </template>
@@ -1,14 +0,0 @@
1
- <script setup>
2
- import { inject } from 'vue'
3
-
4
- const id = inject('dropdownId')
5
- const isOpen = inject('isDropdownOpen')
6
- const toggle = inject('toggleDropdown')
7
- const buttonEl = inject('buttonEl')
8
- </script>
9
-
10
- <template>
11
- <div :id="id" ref="buttonEl" :aria-expanded="isOpen" aria-haspopup="menu" class="dropdown-target" @click="toggle">
12
- <slot />
13
- </div>
14
- </template>
@@ -1,59 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- join?: boolean
6
-
7
- color?: string
8
- primary?: boolean
9
- secondary?: boolean
10
- accent?: boolean
11
- info?: boolean
12
- success?: boolean
13
- warning?: boolean
14
- error?: boolean
15
-
16
- bordered?: boolean
17
- ghost?: boolean
18
- disabled?: boolean
19
-
20
- size?: 'lg' | 'md' | 'sm' | 'xs'
21
- lg?: boolean
22
- md?: boolean
23
- sm?: boolean
24
- xs?: boolean
25
- }>()
26
- defineEmits(['files'])
27
-
28
- const classes = computed(() => {
29
- return {
30
- 'join-item': props.join,
31
-
32
- 'file-input-primary': props.primary || props.color === 'primary',
33
- 'file-input-secondary': props.secondary || props.color === 'secondary',
34
- 'file-input-accent': props.accent || props.color === 'accent',
35
- 'file-input-info': props.info || props.color === 'info',
36
- 'file-input-success': props.success || props.color === 'success',
37
- 'file-input-warning': props.warning || props.color === 'warning',
38
- 'file-input-error': props.error || props.color === 'error',
39
-
40
- 'file-input-lg': props.lg || props.size === 'lg',
41
- 'file-input-md': props.md || props.size === 'md',
42
- 'file-input-sm': props.sm || props.size === 'sm',
43
- 'file-input-xs': props.xs || props.size === 'xs',
44
-
45
- 'file-input-bordered': props.bordered,
46
- 'file-input-ghost': props.ghost,
47
- }
48
- })
49
- </script>
50
-
51
- <template>
52
- <input
53
- type="file"
54
- :disabled="disabled"
55
- class="file-input"
56
- :class="classes"
57
- @input="$emit('files', ($event.target as any).value)"
58
- >
59
- </template>
@@ -1,59 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = withDefaults(defineProps<{
5
- is?: string | Object | Function
6
- join?: boolean
7
-
8
- // https://tailwindcss.com/docs/flex
9
- flex?: boolean
10
- flex1?: boolean
11
- flexAuto?: boolean
12
- flexInitial?: boolean
13
- none?: boolean
14
-
15
- grow?: boolean
16
-
17
- // https://tailwindcss.com/docs/flex-direction
18
- direction?: 'row' | 'col' | 'row-reverse' | 'col-reverse'
19
- row?: boolean
20
- col?: boolean
21
- reverse?: boolean
22
-
23
- // https://tailwindcss.com/docs/flex-wrap
24
- wrap?: boolean
25
- nowrap?: boolean
26
- wrapReverse?: boolean
27
- }>(), {
28
- is: 'div',
29
- flex: true,
30
- })
31
-
32
- const classes = computed(() => {
33
- return {
34
- 'join-item': props.join,
35
-
36
- 'flex-1': props.flex1,
37
- 'flex-auto': props.flexAuto,
38
- 'flex-initial': props.flexInitial,
39
- 'flex-none': props.none,
40
-
41
- 'flex-grow': props.grow,
42
-
43
- 'flex-row': props.direction === 'row' || props.row,
44
- 'flex-col': props.direction === 'col' || props.col,
45
- 'flex-row-reverse': props.direction === 'row-reverse' || (props.row && props.reverse),
46
- 'flex-col-reverse': props.direction === 'col-reverse' || (props.col && props.reverse),
47
-
48
- 'flex-wrap': props.wrap,
49
- 'flex-wrap-reverse': props.wrapReverse,
50
- 'flex-nowrap': props.nowrap,
51
- }
52
- })
53
- </script>
54
-
55
- <template>
56
- <component :is="is" class="flex" :class="classes">
57
- <slot />
58
- </component>
59
- </template>
@@ -1,59 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = withDefaults(defineProps<{
5
- is?: string | Object | Function
6
- join?: boolean
7
-
8
- // https://tailwindcss.com/docs/flex
9
- flex?: boolean
10
- flex1?: boolean
11
- flexAuto?: boolean
12
- flexInitial?: boolean
13
- none?: boolean
14
-
15
- grow?: boolean
16
-
17
- // https://tailwindcss.com/docs/flex-direction
18
- direction?: 'row' | 'col' | 'row-reverse' | 'col-reverse'
19
- row?: boolean
20
- col?: boolean
21
- reverse?: boolean
22
-
23
- // https://tailwindcss.com/docs/flex-wrap
24
- wrap?: boolean
25
- nowrap?: boolean
26
- wrapReverse?: boolean
27
- }>(), {
28
- is: 'div',
29
- flex: false,
30
- })
31
-
32
- const classes = computed(() => {
33
- return {
34
- 'join-item': props.join,
35
-
36
- 'flex-1': props.flex1,
37
- 'flex-auto': props.flexAuto,
38
- 'flex-initial': props.flexInitial,
39
- 'flex-none': props.none,
40
-
41
- 'flex-grow': props.grow,
42
-
43
- 'flex-row': props.direction === 'row' || props.row,
44
- 'flex-col': props.direction === 'col' || props.col,
45
- 'flex-row-reverse': props.direction === 'row-reverse' || (props.row && props.reverse),
46
- 'flex-col-reverse': props.direction === 'col-reverse' || (props.col && props.reverse),
47
-
48
- 'flex-wrap': props.wrap,
49
- 'flex-wrap-reverse': props.wrapReverse,
50
- 'flex-nowrap': props.nowrap,
51
- }
52
- })
53
- </script>
54
-
55
- <template>
56
- <component :is="is" class="flex" :class="classes">
57
- <slot />
58
- </component>
59
- </template>
@@ -1,24 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
- import Text from './Text.vue'
4
-
5
- const props = withDefaults(defineProps<{
6
- center?: boolean
7
- is?: string
8
- }>(), {
9
- center: false,
10
- is: 'footer',
11
- })
12
-
13
- const classes = computed(() => {
14
- return {
15
- 'divider-center': props.center,
16
- }
17
- })
18
- </script>
19
-
20
- <template>
21
- <Text :is="is" class="footer" :class="classes">
22
- <slot />
23
- </Text>
24
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- withDefaults(defineProps<{
5
- is?: string
6
- }>(), {
7
- is: 'span',
8
- })
9
- </script>
10
-
11
- <template>
12
- <Text :is="is" class="footer-title">
13
- <slot />
14
- </Text>
15
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="form-control">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- withDefaults(defineProps<{
5
- is?: string
6
- }>(), {
7
- is: 'div',
8
- })
9
- </script>
10
-
11
- <template>
12
- <Text :is="is" class="hero">
13
- <slot />
14
- </Text>
15
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- withDefaults(defineProps<{
5
- is?: string
6
- }>(), {
7
- is: 'div',
8
- })
9
- </script>
10
-
11
- <template>
12
- <Text :is="is" class="hero-content">
13
- <slot />
14
- </Text>
15
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="hero-overlay">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,13 +0,0 @@
1
- <script setup lang="ts">
2
- withDefaults(defineProps<{
3
- is?: string
4
- }>(), {
5
- is: 'div',
6
- })
7
- </script>
8
-
9
- <template>
10
- <component :is="is" class="indicator">
11
- <slot />
12
- </component>
13
- </template>
@@ -1,36 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = withDefaults(defineProps<{
5
- is?: string
6
-
7
- align?: 'start' | 'center' | 'end'
8
- start?: boolean
9
- center?: boolean
10
- end?: boolean
11
-
12
- vAlign?: 'top' | 'middle' | 'bottom'
13
- top?: boolean
14
- middle?: boolean
15
- bottom?: boolean
16
- }>(), {
17
- is: 'div',
18
- })
19
- const classes = computed(() => {
20
- return {
21
- 'indicator-start': props.start || props.align === 'start',
22
- 'indicator-center': props.center || props.align === 'center',
23
- 'indicator-end': props.end || props.align === 'end',
24
-
25
- 'indicator-top': props.top || props.vAlign === 'top',
26
- 'indicator-middle': props.middle || props.vAlign === 'middle',
27
- 'indicator-bottom': props.bottom || props.vAlign === 'bottom',
28
- }
29
- })
30
- </script>
31
-
32
- <template>
33
- <component :is="is" class="indicator-item" :class="classes">
34
- <slot />
35
- </component>
36
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="join">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,25 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- size?: 'lg' | 'md' | 'sm' | 'xs'
6
- lg?: boolean
7
- md?: boolean
8
- sm?: boolean
9
- xs?: boolean
10
- }>()
11
-
12
- const classes = computed(() => {
13
- const { size, lg, md, sm, xs } = props
14
- return {
15
- 'kbd-lg': lg || size === 'lg',
16
- 'kbd-md': md || size === 'md',
17
- 'kbd-sm': sm || size === 'sm',
18
- 'kbd-xs': xs || size === 'xs',
19
- }
20
- })
21
- </script>
22
-
23
- <template>
24
- <kbd class="kbd" :class="classes"><slot /></kbd>
25
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- withDefaults(defineProps<{
5
- is?: string
6
- }>(), {
7
- is: 'label',
8
- })
9
- </script>
10
-
11
- <template>
12
- <Text :is="is" class="label">
13
- <slot />
14
- </Text>
15
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- withDefaults(defineProps<{
5
- is?: string
6
- }>(), {
7
- is: 'span',
8
- })
9
- </script>
10
-
11
- <template>
12
- <Text :is="is" class="label-text">
13
- <slot />
14
- </Text>
15
- </template>
@@ -1,15 +0,0 @@
1
- <script setup lang="ts">
2
- import Text from './Text.vue'
3
-
4
- withDefaults(defineProps<{
5
- is?: string
6
- }>(), {
7
- is: 'span',
8
- })
9
- </script>
10
-
11
- <template>
12
- <Text :is="is" class="label-text-alt">
13
- <slot />
14
- </Text>
15
- </template>
@@ -1,40 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = withDefaults(defineProps<{
5
- is?: string
6
- hover?: boolean
7
-
8
- color?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'success' | 'info' | 'warning' | 'error'
9
- neutral?: boolean
10
- primary?: boolean
11
- secondary?: boolean
12
- accent?: boolean
13
- success?: boolean
14
- info?: boolean
15
- warning?: boolean
16
- error?: boolean
17
- }>(), {
18
- is: 'a',
19
- })
20
-
21
- const classes = computed(() => {
22
- return {
23
- 'link-neutral': props.neutral || props.color === 'neutral',
24
- 'link-primary': props.primary || props.color === 'primary',
25
- 'link-secondary': props.secondary || props.color === 'secondary',
26
- 'link-accent': props.accent || props.color === 'accent',
27
- 'link-success': props.success || props.color === 'success',
28
- 'link-info': props.info || props.color === 'info',
29
- 'link-warning': props.warning || props.color === 'warning',
30
- 'link-error': props.error || props.color === 'error',
31
- 'link-hover': props.hover,
32
- }
33
- })
34
- </script>
35
-
36
- <template>
37
- <component :is="is" class="link" :class="classes">
38
- <slot />
39
- </component>
40
- </template>
@@ -1,43 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- color?: string
6
- neutral?: boolean
7
- primary?: boolean
8
- secondary?: boolean
9
- accent?: boolean
10
- info?: boolean
11
- success?: boolean
12
- warning?: boolean
13
- error?: boolean
14
-
15
- size?: 'lg' | 'md' | 'sm' | 'xs'
16
- lg?: boolean
17
- md?: boolean
18
- sm?: boolean
19
- xs?: boolean
20
- }>()
21
-
22
- const classes = computed(() => {
23
- return {
24
- 'text-primary': props.primary || props.color === 'primary',
25
- 'text-secondary': props.secondary || props.color === 'secondary',
26
- 'text-neutral': props.neutral || props.color === 'neutral',
27
- 'text-accent': props.accent || props.color === 'accent',
28
- 'text-info': props.info || props.color === 'info',
29
- 'text-success': props.success || props.color === 'success',
30
- 'text-warning': props.warning || props.color === 'warning',
31
- 'text-error': props.error || props.color === 'error',
32
-
33
- 'loading-lg': props.lg || props.size === 'lg',
34
- 'loading-md': props.md || props.size === 'md',
35
- 'loading-sm': props.sm || props.size === 'sm',
36
- 'loading-xs': props.xs || props.size === 'xs',
37
- }
38
- })
39
- </script>
40
-
41
- <template>
42
- <span class="loading loading-ball" :class="classes" />
43
- </template>
@@ -1,43 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- color?: string
6
- neutral?: boolean
7
- primary?: boolean
8
- secondary?: boolean
9
- accent?: boolean
10
- info?: boolean
11
- success?: boolean
12
- warning?: boolean
13
- error?: boolean
14
-
15
- size?: 'lg' | 'md' | 'sm' | 'xs'
16
- lg?: boolean
17
- md?: boolean
18
- sm?: boolean
19
- xs?: boolean
20
- }>()
21
-
22
- const classes = computed(() => {
23
- return {
24
- 'text-primary': props.primary || props.color === 'primary',
25
- 'text-secondary': props.secondary || props.color === 'secondary',
26
- 'text-neutral': props.neutral || props.color === 'neutral',
27
- 'text-accent': props.accent || props.color === 'accent',
28
- 'text-info': props.info || props.color === 'info',
29
- 'text-success': props.success || props.color === 'success',
30
- 'text-warning': props.warning || props.color === 'warning',
31
- 'text-error': props.error || props.color === 'error',
32
-
33
- 'loading-lg': props.lg || props.size === 'lg',
34
- 'loading-md': props.md || props.size === 'md',
35
- 'loading-sm': props.sm || props.size === 'sm',
36
- 'loading-xs': props.xs || props.size === 'xs',
37
- }
38
- })
39
- </script>
40
-
41
- <template>
42
- <span class="loading loading-bars" :class="classes" />
43
- </template>
@@ -1,43 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue'
3
-
4
- const props = defineProps<{
5
- color?: string
6
- neutral?: boolean
7
- primary?: boolean
8
- secondary?: boolean
9
- accent?: boolean
10
- info?: boolean
11
- success?: boolean
12
- warning?: boolean
13
- error?: boolean
14
-
15
- size?: 'lg' | 'md' | 'sm' | 'xs'
16
- lg?: boolean
17
- md?: boolean
18
- sm?: boolean
19
- xs?: boolean
20
- }>()
21
-
22
- const classes = computed(() => {
23
- return {
24
- 'text-primary': props.primary || props.color === 'primary',
25
- 'text-secondary': props.secondary || props.color === 'secondary',
26
- 'text-neutral': props.neutral || props.color === 'neutral',
27
- 'text-accent': props.accent || props.color === 'accent',
28
- 'text-info': props.info || props.color === 'info',
29
- 'text-success': props.success || props.color === 'success',
30
- 'text-warning': props.warning || props.color === 'warning',
31
- 'text-error': props.error || props.color === 'error',
32
-
33
- 'loading-lg': props.lg || props.size === 'lg',
34
- 'loading-md': props.md || props.size === 'md',
35
- 'loading-sm': props.sm || props.size === 'sm',
36
- 'loading-xs': props.xs || props.size === 'xs',
37
- }
38
- })
39
- </script>
40
-
41
- <template>
42
- <span class="loading loading-dots" :class="classes" />
43
- </template>