@coreui/vue-pro 5.1.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cjs/components/calendar/CCalendar.js +2 -2
- package/dist/cjs/components/calendar/CCalendar.js.map +1 -1
- package/dist/cjs/components/calendar/utils.d.ts +1 -0
- package/dist/cjs/components/calendar/utils.js +13 -6
- package/dist/cjs/components/calendar/utils.js.map +1 -1
- package/dist/cjs/components/dropdown/CDropdown.js +3 -1
- package/dist/cjs/components/dropdown/CDropdown.js.map +1 -1
- package/dist/cjs/components/dropdown/utils.d.ts +0 -1
- package/dist/cjs/components/dropdown/utils.js +0 -13
- package/dist/cjs/components/dropdown/utils.js.map +1 -1
- package/dist/cjs/components/index.js +8 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/multi-select/CMultiSelect.js +4 -0
- package/dist/cjs/components/multi-select/CMultiSelect.js.map +1 -1
- package/dist/cjs/components/multi-select/CMultiSelectSelection.js +1 -0
- package/dist/cjs/components/multi-select/CMultiSelectSelection.js.map +1 -1
- package/dist/cjs/components/popover/CPopover.js +3 -2
- package/dist/cjs/components/popover/CPopover.js.map +1 -1
- package/dist/cjs/components/tabs/CTab.d.ts +20 -0
- package/dist/cjs/components/tabs/CTab.js +41 -0
- package/dist/cjs/components/tabs/CTab.js.map +1 -0
- package/dist/cjs/components/tabs/CTabList.d.ts +42 -0
- package/dist/cjs/components/tabs/CTabList.js +74 -0
- package/dist/cjs/components/tabs/CTabList.js.map +1 -0
- package/dist/cjs/components/tabs/CTabPane.d.ts +19 -0
- package/dist/cjs/components/tabs/CTabPane.js +10 -1
- package/dist/cjs/components/tabs/CTabPane.js.map +1 -1
- package/dist/cjs/components/tabs/CTabPanel.d.ts +55 -0
- package/dist/cjs/components/tabs/CTabPanel.js +93 -0
- package/dist/cjs/components/tabs/CTabPanel.js.map +1 -0
- package/dist/cjs/components/tabs/CTabs.d.ts +22 -0
- package/dist/cjs/components/tabs/CTabs.js +43 -0
- package/dist/cjs/components/tabs/CTabs.js.map +1 -0
- package/dist/cjs/components/tabs/index.d.ts +5 -1
- package/dist/cjs/components/tabs/index.js +12 -0
- package/dist/cjs/components/tabs/index.js.map +1 -1
- package/dist/cjs/components/tooltip/CTooltip.js +3 -2
- package/dist/cjs/components/tooltip/CTooltip.js.map +1 -1
- package/dist/cjs/composables/index.d.ts +2 -1
- package/dist/cjs/composables/useUniqueId.d.ts +3 -0
- package/dist/cjs/composables/useUniqueId.js +20 -0
- package/dist/cjs/composables/useUniqueId.js.map +1 -0
- package/dist/cjs/directives/v-c-popover.js +4 -2
- package/dist/cjs/directives/v-c-popover.js.map +1 -1
- package/dist/cjs/directives/v-c-tooltip.js +4 -2
- package/dist/cjs/directives/v-c-tooltip.js.map +1 -1
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/getNextActiveElement.d.ts +2 -0
- package/dist/cjs/utils/getNextActiveElement.js +19 -0
- package/dist/cjs/utils/getNextActiveElement.js.map +1 -0
- package/dist/cjs/utils/index.d.ts +2 -1
- package/dist/esm/components/calendar/CCalendar.js +2 -2
- package/dist/esm/components/calendar/CCalendar.js.map +1 -1
- package/dist/esm/components/calendar/utils.d.ts +1 -0
- package/dist/esm/components/calendar/utils.js +13 -7
- package/dist/esm/components/calendar/utils.js.map +1 -1
- package/dist/esm/components/dropdown/CDropdown.js +3 -1
- package/dist/esm/components/dropdown/CDropdown.js.map +1 -1
- package/dist/esm/components/dropdown/utils.d.ts +0 -1
- package/dist/esm/components/dropdown/utils.js +1 -13
- package/dist/esm/components/dropdown/utils.js.map +1 -1
- package/dist/esm/components/index.js +4 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/multi-select/CMultiSelect.js +4 -0
- package/dist/esm/components/multi-select/CMultiSelect.js.map +1 -1
- package/dist/esm/components/multi-select/CMultiSelectSelection.js +1 -0
- package/dist/esm/components/multi-select/CMultiSelectSelection.js.map +1 -1
- package/dist/esm/components/popover/CPopover.js +3 -2
- package/dist/esm/components/popover/CPopover.js.map +1 -1
- package/dist/esm/components/tabs/CTab.d.ts +20 -0
- package/dist/esm/components/tabs/CTab.js +39 -0
- package/dist/esm/components/tabs/CTab.js.map +1 -0
- package/dist/esm/components/tabs/CTabList.d.ts +42 -0
- package/dist/esm/components/tabs/CTabList.js +72 -0
- package/dist/esm/components/tabs/CTabList.js.map +1 -0
- package/dist/esm/components/tabs/CTabPane.d.ts +19 -0
- package/dist/esm/components/tabs/CTabPane.js +10 -1
- package/dist/esm/components/tabs/CTabPane.js.map +1 -1
- package/dist/esm/components/tabs/CTabPanel.d.ts +55 -0
- package/dist/esm/components/tabs/CTabPanel.js +91 -0
- package/dist/esm/components/tabs/CTabPanel.js.map +1 -0
- package/dist/esm/components/tabs/CTabs.d.ts +22 -0
- package/dist/esm/components/tabs/CTabs.js +41 -0
- package/dist/esm/components/tabs/CTabs.js.map +1 -0
- package/dist/esm/components/tabs/index.d.ts +5 -1
- package/dist/esm/components/tabs/index.js +9 -1
- package/dist/esm/components/tabs/index.js.map +1 -1
- package/dist/esm/components/tooltip/CTooltip.js +3 -2
- package/dist/esm/components/tooltip/CTooltip.js.map +1 -1
- package/dist/esm/composables/index.d.ts +2 -1
- package/dist/esm/composables/useUniqueId.d.ts +3 -0
- package/dist/esm/composables/useUniqueId.js +18 -0
- package/dist/esm/composables/useUniqueId.js.map +1 -0
- package/dist/esm/directives/v-c-popover.js +4 -2
- package/dist/esm/directives/v-c-popover.js.map +1 -1
- package/dist/esm/directives/v-c-tooltip.js +4 -2
- package/dist/esm/directives/v-c-tooltip.js.map +1 -1
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/getNextActiveElement.d.ts +2 -0
- package/dist/esm/utils/getNextActiveElement.js +15 -0
- package/dist/esm/utils/getNextActiveElement.js.map +1 -0
- package/dist/esm/utils/index.d.ts +2 -1
- package/package.json +5 -5
- package/src/components/calendar/CCalendar.ts +2 -2
- package/src/components/calendar/utils.ts +23 -7
- package/src/components/dropdown/CDropdown.ts +3 -2
- package/src/components/dropdown/utils.ts +0 -22
- package/src/components/multi-select/CMultiSelect.ts +6 -0
- package/src/components/multi-select/CMultiSelectSelection.ts +1 -0
- package/src/components/popover/CPopover.ts +4 -3
- package/src/components/tabs/CTab.ts +45 -0
- package/src/components/tabs/CTabList.ts +89 -0
- package/src/components/tabs/CTabPane.ts +10 -1
- package/src/components/tabs/CTabPanel.ts +129 -0
- package/src/components/tabs/CTabs.ts +45 -0
- package/src/components/tabs/index.ts +9 -1
- package/src/components/tooltip/CTooltip.ts +4 -3
- package/src/composables/index.ts +2 -1
- package/src/composables/useUniqueId.ts +18 -0
- package/src/directives/v-c-popover.ts +3 -3
- package/src/directives/v-c-tooltip.ts +3 -3
- package/src/utils/getNextActiveElement.ts +23 -0
- package/src/utils/index.ts +2 -1
- package/dist/cjs/utils/getUID.js +0 -13
- package/dist/cjs/utils/getUID.js.map +0 -1
- package/dist/esm/utils/getUID.js +0 -9
- package/dist/esm/utils/getUID.js.map +0 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defineComponent,
|
|
3
|
+
h,
|
|
4
|
+
inject,
|
|
5
|
+
ref,
|
|
6
|
+
Ref,
|
|
7
|
+
RendererElement,
|
|
8
|
+
Transition,
|
|
9
|
+
vShow,
|
|
10
|
+
watch,
|
|
11
|
+
withDirectives,
|
|
12
|
+
} from 'vue'
|
|
13
|
+
|
|
14
|
+
import { executeAfterTransition } from '../../utils/transition'
|
|
15
|
+
|
|
16
|
+
const CTabPanel = defineComponent({
|
|
17
|
+
name: 'CTabPanel',
|
|
18
|
+
props: {
|
|
19
|
+
/**
|
|
20
|
+
* Item key.
|
|
21
|
+
*/
|
|
22
|
+
itemKey: {
|
|
23
|
+
type: [Number, String],
|
|
24
|
+
required: true,
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* Enable fade in and fade out transition.
|
|
28
|
+
*/
|
|
29
|
+
transition: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: true,
|
|
32
|
+
},
|
|
33
|
+
/**
|
|
34
|
+
* Toggle the visibility of component.
|
|
35
|
+
*/
|
|
36
|
+
visible: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: false,
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
emits: [
|
|
42
|
+
/**
|
|
43
|
+
* Callback fired when the component requests to be hidden.
|
|
44
|
+
*/
|
|
45
|
+
'hide',
|
|
46
|
+
/**
|
|
47
|
+
* Callback fired when the component requests to be shown.
|
|
48
|
+
*/
|
|
49
|
+
'show',
|
|
50
|
+
],
|
|
51
|
+
setup(props, { slots, emit }) {
|
|
52
|
+
const activeItemKey = inject('activeItemKey') as Ref<number | string>
|
|
53
|
+
const id = inject('id') as Ref<number | string>
|
|
54
|
+
|
|
55
|
+
const tabPaneRef = ref()
|
|
56
|
+
const firstRender = ref(true)
|
|
57
|
+
const visible = ref()
|
|
58
|
+
|
|
59
|
+
watch(
|
|
60
|
+
() => props.visible,
|
|
61
|
+
() => {
|
|
62
|
+
visible.value = props.visible
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
immediate: true,
|
|
66
|
+
},
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
watch(
|
|
70
|
+
activeItemKey,
|
|
71
|
+
() => {
|
|
72
|
+
visible.value = Boolean(activeItemKey.value === props.itemKey)
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
immediate: true,
|
|
76
|
+
},
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
const handleEnter = (el: RendererElement, done: () => void) => {
|
|
80
|
+
firstRender.value = false
|
|
81
|
+
emit('show')
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
executeAfterTransition(() => done(), el as HTMLElement)
|
|
84
|
+
el.classList.add('show')
|
|
85
|
+
}, 1)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const handleLeave = (el: RendererElement, done: () => void) => {
|
|
89
|
+
firstRender.value = false
|
|
90
|
+
emit('hide')
|
|
91
|
+
el.classList.remove('show')
|
|
92
|
+
executeAfterTransition(() => done(), el as HTMLElement)
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
return () =>
|
|
96
|
+
h(
|
|
97
|
+
Transition,
|
|
98
|
+
{
|
|
99
|
+
onEnter: (el, done) => handleEnter(el, done),
|
|
100
|
+
onLeave: (el, done) => handleLeave(el, done),
|
|
101
|
+
},
|
|
102
|
+
() =>
|
|
103
|
+
withDirectives(
|
|
104
|
+
h(
|
|
105
|
+
'div',
|
|
106
|
+
{
|
|
107
|
+
class: [
|
|
108
|
+
'tab-pane',
|
|
109
|
+
{
|
|
110
|
+
active: visible.value,
|
|
111
|
+
fade: props.transition,
|
|
112
|
+
show: firstRender.value && visible.value,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
id: `${props.itemKey}-tab-panel-${id.value}`,
|
|
116
|
+
role: 'tabpanel',
|
|
117
|
+
'aria-labelledby': `${props.itemKey}-tab-${id.value}`,
|
|
118
|
+
tabindex: 0,
|
|
119
|
+
ref: tabPaneRef,
|
|
120
|
+
},
|
|
121
|
+
slots.default && slots.default(),
|
|
122
|
+
),
|
|
123
|
+
[[vShow, visible.value]],
|
|
124
|
+
),
|
|
125
|
+
)
|
|
126
|
+
},
|
|
127
|
+
})
|
|
128
|
+
|
|
129
|
+
export { CTabPanel }
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent, h, provide, ref, watch } from 'vue'
|
|
2
|
+
import { useUniqueId } from '../../composables'
|
|
3
|
+
|
|
4
|
+
const CTabs = defineComponent({
|
|
5
|
+
name: 'CTabs',
|
|
6
|
+
props: {
|
|
7
|
+
/**
|
|
8
|
+
* The active item key.
|
|
9
|
+
*/
|
|
10
|
+
activeItemKey: {
|
|
11
|
+
type: [Number, String],
|
|
12
|
+
required: true,
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
emits: [
|
|
16
|
+
/**
|
|
17
|
+
* The callback is fired when the active tab changes.
|
|
18
|
+
*/
|
|
19
|
+
'change',
|
|
20
|
+
],
|
|
21
|
+
setup(props, { slots, emit }) {
|
|
22
|
+
const { getUID } = useUniqueId()
|
|
23
|
+
const uID = ref(getUID())
|
|
24
|
+
const activeItemKey = ref(props.activeItemKey)
|
|
25
|
+
const setActiveItemKey = (key: string | number) => {
|
|
26
|
+
activeItemKey.value = key
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
watch(
|
|
30
|
+
() => props.activeItemKey,
|
|
31
|
+
(value) => {
|
|
32
|
+
activeItemKey.value = value
|
|
33
|
+
emit('change', value)
|
|
34
|
+
},
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
provide('activeItemKey', activeItemKey)
|
|
38
|
+
provide('id', uID)
|
|
39
|
+
provide('setActiveItemKey', setActiveItemKey)
|
|
40
|
+
|
|
41
|
+
return () => h('div', { class: 'tabs' }, slots.default && slots.default())
|
|
42
|
+
},
|
|
43
|
+
})
|
|
44
|
+
|
|
45
|
+
export { CTabs }
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import { App } from 'vue'
|
|
2
|
+
import { CTab } from './CTab'
|
|
2
3
|
import { CTabContent } from './CTabContent'
|
|
4
|
+
import { CTabList } from './CTabList'
|
|
3
5
|
import { CTabPane } from './CTabPane'
|
|
6
|
+
import { CTabPanel } from './CTabPanel'
|
|
7
|
+
import { CTabs } from './CTabs'
|
|
4
8
|
|
|
5
9
|
const CTabsPlugin = {
|
|
6
10
|
install: (app: App): void => {
|
|
11
|
+
app.component(CTab.name as string, CTab)
|
|
7
12
|
app.component(CTabContent.name as string, CTabContent)
|
|
13
|
+
app.component(CTabList.name as string, CTabList)
|
|
8
14
|
app.component(CTabPane.name as string, CTabPane)
|
|
15
|
+
app.component(CTabPanel.name as string, CTabPanel)
|
|
16
|
+
app.component(CTabs.name as string, CTabs)
|
|
9
17
|
},
|
|
10
18
|
}
|
|
11
19
|
|
|
12
|
-
export { CTabsPlugin, CTabContent, CTabPane }
|
|
20
|
+
export { CTabsPlugin, CTab, CTabContent, CTabList, CTabPane, CTabPanel, CTabs }
|
|
@@ -2,10 +2,10 @@ import { defineComponent, h, onMounted, PropType, ref, RendererElement, Transiti
|
|
|
2
2
|
import type { Placement } from '@popperjs/core'
|
|
3
3
|
|
|
4
4
|
import { CConditionalTeleport } from '../conditional-teleport'
|
|
5
|
-
import { usePopper } from '../../composables'
|
|
5
|
+
import { useUniqueId, usePopper } from '../../composables'
|
|
6
6
|
import type { Placements, Triggers } from '../../types'
|
|
7
7
|
import { executeAfterTransition } from '../../utils/transition'
|
|
8
|
-
import { getRTLPlacement
|
|
8
|
+
import { getRTLPlacement } from '../../utils'
|
|
9
9
|
|
|
10
10
|
const CTooltip = defineComponent({
|
|
11
11
|
name: 'CTooltip',
|
|
@@ -115,6 +115,7 @@ const CTooltip = defineComponent({
|
|
|
115
115
|
const tooltipRef = ref()
|
|
116
116
|
const uID = ref()
|
|
117
117
|
const visible = ref(props.visible)
|
|
118
|
+
const { getUID } = useUniqueId('popover')
|
|
118
119
|
const { initPopper, destroyPopper } = usePopper()
|
|
119
120
|
|
|
120
121
|
const delay =
|
|
@@ -145,7 +146,7 @@ const CTooltip = defineComponent({
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
onMounted(() => {
|
|
148
|
-
uID.value = getUID(
|
|
149
|
+
uID.value = getUID()
|
|
149
150
|
})
|
|
150
151
|
|
|
151
152
|
const handleEnter = (el: RendererElement, done: () => void) => {
|
package/src/composables/index.ts
CHANGED
|
@@ -2,5 +2,6 @@ import { useColorModes } from './useColorModes'
|
|
|
2
2
|
import { useDebouncedCallback } from './useDebouncedCallback'
|
|
3
3
|
import { useIsVisible } from './useIsVisible'
|
|
4
4
|
import { usePopper } from './usePopper'
|
|
5
|
+
import { useUniqueId } from './useUniqueId'
|
|
5
6
|
|
|
6
|
-
export { useColorModes, useDebouncedCallback, useIsVisible, usePopper }
|
|
7
|
+
export { useColorModes, useDebouncedCallback, useIsVisible, usePopper, useUniqueId }
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ref } from 'vue'
|
|
2
|
+
|
|
3
|
+
export const useUniqueId = (prefix: string = '') => {
|
|
4
|
+
const ids = ref<string[]>([])
|
|
5
|
+
|
|
6
|
+
const getUID = () => {
|
|
7
|
+
do {
|
|
8
|
+
prefix += Math.floor(Math.random() * 1_000_000)
|
|
9
|
+
} while (ids.value.includes(prefix))
|
|
10
|
+
|
|
11
|
+
ids.value.push(prefix)
|
|
12
|
+
return prefix
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return {
|
|
16
|
+
getUID,
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DirectiveBinding } from 'vue'
|
|
2
2
|
import { createPopper } from '@popperjs/core'
|
|
3
|
-
|
|
4
3
|
import type { Options } from '@popperjs/core'
|
|
5
4
|
|
|
6
|
-
import {
|
|
5
|
+
import { useUniqueId } from '../composables'
|
|
7
6
|
|
|
8
7
|
const createPopoverElement = (id: string, header: string, content: string): HTMLDivElement => {
|
|
9
8
|
const popover = document.createElement('div')
|
|
@@ -56,6 +55,7 @@ export default {
|
|
|
56
55
|
name: 'c-popover',
|
|
57
56
|
uid: '',
|
|
58
57
|
mounted(el: HTMLElement, binding: DirectiveBinding): void {
|
|
58
|
+
const { getUID } = useUniqueId('popover')
|
|
59
59
|
const value = binding.value
|
|
60
60
|
const content = typeof value === 'string' ? value : value.content ?? ''
|
|
61
61
|
const header = value.header ?? ''
|
|
@@ -77,7 +77,7 @@ export default {
|
|
|
77
77
|
],
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
const uID = getUID(
|
|
80
|
+
const uID = getUID()
|
|
81
81
|
binding.arg = uID
|
|
82
82
|
const popover = createPopoverElement(uID, header, content)
|
|
83
83
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { DirectiveBinding } from 'vue'
|
|
2
2
|
import { createPopper } from '@popperjs/core'
|
|
3
|
-
|
|
4
3
|
import type { Options } from '@popperjs/core'
|
|
5
4
|
|
|
6
|
-
import {
|
|
5
|
+
import { useUniqueId } from '../composables'
|
|
7
6
|
|
|
8
7
|
const createTooltipElement = (id: string, content: string): HTMLDivElement => {
|
|
9
8
|
const tooltip = document.createElement('div')
|
|
@@ -54,6 +53,7 @@ const toggleTooltipElement = (
|
|
|
54
53
|
export default {
|
|
55
54
|
name: 'c-tooltip',
|
|
56
55
|
mounted(el: HTMLElement, binding: DirectiveBinding): void {
|
|
56
|
+
const { getUID } = useUniqueId('tooltip')
|
|
57
57
|
const value = binding.value
|
|
58
58
|
const content = typeof value === 'string' ? value : value.content ?? ''
|
|
59
59
|
const trigger = value.trigger ?? 'hover'
|
|
@@ -74,7 +74,7 @@ export default {
|
|
|
74
74
|
],
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
const uID = getUID(
|
|
77
|
+
const uID = getUID()
|
|
78
78
|
binding.arg = uID
|
|
79
79
|
const tooltip = createTooltipElement(uID, content)
|
|
80
80
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const getNextActiveElement = (
|
|
2
|
+
list: HTMLElement[],
|
|
3
|
+
activeElement: HTMLElement,
|
|
4
|
+
shouldGetNext: boolean,
|
|
5
|
+
isCycleAllowed: boolean,
|
|
6
|
+
) => {
|
|
7
|
+
const listLength = list.length
|
|
8
|
+
let index = list.indexOf(activeElement)
|
|
9
|
+
|
|
10
|
+
if (index === -1) {
|
|
11
|
+
return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
index += shouldGetNext ? 1 : -1
|
|
15
|
+
|
|
16
|
+
if (isCycleAllowed) {
|
|
17
|
+
index = (index + listLength) % listLength
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return list[Math.max(0, Math.min(index, listLength - 1))]
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export default getNextActiveElement
|
package/src/utils/index.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import getNextActiveElement from './getNextActiveElement'
|
|
1
2
|
import getRTLPlacement from './getRTLPlacement'
|
|
2
3
|
import getUID from './getUID'
|
|
3
4
|
import isInViewport from './isInViewport'
|
|
4
5
|
import isObjectInArray from './isObjectInArray'
|
|
5
6
|
import isRTL from './isRTL'
|
|
6
7
|
|
|
7
|
-
export { getRTLPlacement, getUID, isInViewport, isObjectInArray, isRTL }
|
|
8
|
+
export { getNextActiveElement, getRTLPlacement, getUID, isInViewport, isObjectInArray, isRTL }
|
package/dist/cjs/utils/getUID.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const getUID = (prefix) => {
|
|
6
|
-
do {
|
|
7
|
-
prefix += Math.floor(Math.random() * 1_000_000);
|
|
8
|
-
} while (document.getElementById(prefix));
|
|
9
|
-
return prefix;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
exports.default = getUID;
|
|
13
|
-
//# sourceMappingURL=getUID.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getUID.js","sources":["../../../src/utils/getUID.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAAA,MAAM,MAAM,GAAG,CAAC,MAAc,KAAI;AAChC,IAAA,GAAG;AACD,QAAA,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;AACjD,KAAC,QAAQ,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,EAAC;AAEzC,IAAA,OAAO,MAAM,CAAA;AACf;;;;"}
|
package/dist/esm/utils/getUID.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getUID.js","sources":["../../../src/utils/getUID.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA,MAAM,MAAM,GAAG,CAAC,MAAc,KAAI;AAChC,IAAA,GAAG;AACD,QAAA,MAAM,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;AACjD,KAAC,QAAQ,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,EAAC;AAEzC,IAAA,OAAO,MAAM,CAAA;AACf;;;;"}
|