@byyuurin/ui 0.0.6 → 0.0.7
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 +4 -5
- package/dist/module.cjs +5 -0
- package/dist/module.json +12 -0
- package/dist/{nuxt.mjs → module.mjs} +4 -4
- package/dist/module.mjs.map +1 -0
- package/dist/runtime/components/Accordion.vue +20 -31
- package/dist/runtime/components/Alert.vue +1 -1
- package/dist/runtime/components/Button.vue +10 -11
- package/dist/runtime/components/Card.vue +9 -6
- package/dist/runtime/components/Checkbox.vue +3 -3
- package/dist/runtime/components/Chip.vue +2 -2
- package/dist/runtime/components/Collapsible.vue +56 -0
- package/dist/runtime/components/Drawer.vue +4 -2
- package/dist/runtime/components/Input.vue +4 -4
- package/dist/runtime/components/InputNumber.vue +167 -0
- package/dist/runtime/components/Link.vue +301 -72
- package/dist/runtime/components/LinkBase.vue +88 -0
- package/dist/runtime/components/Modal.vue +0 -1
- package/dist/runtime/components/Select.vue +4 -4
- package/dist/runtime/components/Separator.vue +63 -0
- package/dist/runtime/components/Switch.vue +3 -3
- package/dist/runtime/components/Table.vue +292 -0
- package/dist/runtime/components/Tabs.vue +17 -17
- package/dist/runtime/components/Toast.vue +1 -1
- package/dist/runtime/components/Toaster.vue +1 -35
- package/dist/runtime/composables/useButtonGroup.d.ts +1 -1
- package/dist/runtime/composables/{useButtonGroup.mjs → useButtonGroup.js} +1 -1
- package/dist/runtime/composables/{useComponentIcons.mjs → useComponentIcons.js} +1 -1
- package/dist/runtime/composables/useModal.d.ts +1 -1
- package/dist/runtime/composables/{useModal.mjs → useModal.js} +1 -1
- package/dist/runtime/composables/useTheme.d.ts +3 -3
- package/dist/runtime/composables/{useTheme.mjs → useTheme.js} +3 -3
- package/dist/runtime/composables/useToast.d.ts +1 -1
- package/dist/runtime/index.d.ts +34 -0
- package/dist/runtime/index.js +34 -0
- package/dist/runtime/theme/accordion.d.ts +8 -8
- package/dist/runtime/theme/{accordion.mjs → accordion.js} +2 -2
- package/dist/runtime/theme/alert.d.ts +2 -2
- package/dist/runtime/theme/{alert.mjs → alert.js} +4 -4
- package/dist/runtime/theme/app.d.ts +3 -0
- package/dist/runtime/theme/{app.mjs → app.js} +4 -1
- package/dist/runtime/theme/badge.d.ts +45 -21
- package/dist/runtime/theme/{badge.mjs → badge.js} +2 -2
- package/dist/runtime/theme/button-group.d.ts +2 -2
- package/dist/runtime/theme/button.d.ts +57 -111
- package/dist/runtime/theme/button.js +164 -0
- package/dist/runtime/theme/card.d.ts +38 -38
- package/dist/runtime/theme/card.js +37 -0
- package/dist/runtime/theme/carousel.d.ts +2 -2
- package/dist/runtime/theme/{carousel.mjs → carousel.js} +2 -2
- package/dist/runtime/theme/checkbox.d.ts +1 -1
- package/dist/runtime/theme/{checkbox.mjs → checkbox.js} +3 -3
- package/dist/runtime/theme/chip.d.ts +45 -12
- package/dist/runtime/theme/{chip.mjs → chip.js} +5 -7
- package/dist/runtime/theme/collapsible.d.ts +38 -0
- package/dist/runtime/theme/collapsible.js +10 -0
- package/dist/runtime/theme/drawer.d.ts +43 -43
- package/dist/runtime/theme/{drawer.mjs → drawer.js} +33 -22
- package/dist/runtime/theme/index.d.ts +31 -27
- package/dist/runtime/theme/index.js +31 -0
- package/dist/runtime/theme/input-number.d.ts +135 -0
- package/dist/runtime/theme/input-number.js +92 -0
- package/dist/runtime/theme/input.d.ts +71 -99
- package/dist/runtime/theme/{input.mjs → input.js} +14 -14
- package/dist/runtime/theme/link.d.ts +2 -2
- package/dist/runtime/theme/{link.mjs → link.js} +1 -1
- package/dist/runtime/theme/modal.d.ts +31 -8
- package/dist/runtime/theme/{modal.mjs → modal.js} +4 -9
- package/dist/runtime/theme/pagination.d.ts +17 -17
- package/dist/runtime/theme/pinInput.d.ts +42 -42
- package/dist/runtime/theme/{pinInput.mjs → pinInput.js} +10 -10
- package/dist/runtime/theme/popover.d.ts +8 -8
- package/dist/runtime/theme/{popover.mjs → popover.js} +1 -1
- package/dist/runtime/theme/radio-group.d.ts +1 -1
- package/dist/runtime/theme/{radio-group.mjs → radio-group.js} +1 -1
- package/dist/runtime/theme/scroll-area.d.ts +17 -17
- package/dist/runtime/theme/{scroll-area.mjs → scroll-area.js} +2 -2
- package/dist/runtime/theme/select.d.ts +84 -99
- package/dist/runtime/theme/{select.mjs → select.js} +17 -17
- package/dist/runtime/theme/separator.d.ts +95 -0
- package/dist/runtime/theme/separator.js +53 -0
- package/dist/runtime/theme/slider.d.ts +1 -1
- package/dist/runtime/theme/{slider.mjs → slider.js} +3 -3
- package/dist/runtime/theme/switch.d.ts +1 -1
- package/dist/runtime/theme/{switch.mjs → switch.js} +2 -2
- package/dist/runtime/theme/table.d.ts +89 -0
- package/dist/runtime/theme/table.js +35 -0
- package/dist/runtime/theme/tabs.d.ts +69 -52
- package/dist/runtime/theme/{tabs.mjs → tabs.js} +11 -11
- package/dist/runtime/theme/textarea.d.ts +43 -37
- package/dist/runtime/theme/{textarea.mjs → textarea.js} +10 -10
- package/dist/runtime/theme/toast.d.ts +2 -2
- package/dist/runtime/theme/{toast.mjs → toast.js} +1 -1
- package/dist/runtime/theme/toaster.d.ts +42 -27
- package/dist/runtime/theme/tooltip.d.ts +11 -11
- package/dist/runtime/theme/tooltip.js +11 -0
- package/dist/runtime/types/components.d.ts +31 -27
- package/dist/runtime/types/index.d.ts +4 -4
- package/dist/runtime/types/index.js +2 -0
- package/dist/runtime/types/utils.js +0 -0
- package/dist/runtime/utils/index.d.ts +3 -3
- package/dist/runtime/utils/{index.mjs → index.js} +3 -3
- package/dist/runtime/utils/link.d.ts +22 -7
- package/dist/runtime/utils/link.js +30 -0
- package/dist/runtime/utils/styler.d.ts +1 -1
- package/dist/runtime/vue/stubs.d.ts +9 -0
- package/dist/runtime/vue/stubs.js +16 -0
- package/dist/shared/{ui.D4zm1r0C.mjs → ui.d1728164.mjs} +1 -1
- package/dist/shared/ui.d1728164.mjs.map +1 -0
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/unocss.d.mts +6 -11
- package/dist/unocss.d.ts +6 -11
- package/dist/unocss.mjs +40 -21
- package/dist/unocss.mjs.map +1 -1
- package/dist/unplugin.mjs +37 -1
- package/dist/unplugin.mjs.map +1 -1
- package/dist/vite.d.mts +0 -1
- package/dist/vite.d.ts +0 -1
- package/dist/vite.mjs +3 -1
- package/dist/vite.mjs.map +1 -1
- package/package.json +37 -36
- package/dist/index.d.ts +0 -29
- package/dist/index.mjs +0 -29
- package/dist/nuxt.mjs.map +0 -1
- package/dist/runtime/theme/button.mjs +0 -148
- package/dist/runtime/theme/card.mjs +0 -14
- package/dist/runtime/theme/index.mjs +0 -27
- package/dist/runtime/theme/tooltip.mjs +0 -11
- package/dist/runtime/types/components.mjs +0 -27
- package/dist/runtime/types/index.mjs +0 -2
- package/dist/runtime/utils/link.mjs +0 -4
- package/dist/shared/ui.D4zm1r0C.mjs.map +0 -1
- /package/dist/{nuxt.d.mts → module.d.mts} +0 -0
- /package/dist/{nuxt.d.ts → module.d.ts} +0 -0
- /package/dist/runtime/composables/{defineInjection.mjs → defineInjection.js} +0 -0
- /package/dist/runtime/composables/{useToast.mjs → useToast.js} +0 -0
- /package/dist/runtime/theme/{button-group.mjs → button-group.js} +0 -0
- /package/dist/runtime/theme/{pagination.mjs → pagination.js} +0 -0
- /package/dist/runtime/theme/{toaster.mjs → toaster.js} +0 -0
- /package/dist/runtime/types/{utils.mjs → components.js} +0 -0
- /package/dist/runtime/utils/{extend-theme.mjs → extend-theme.js} +0 -0
- /package/dist/runtime/utils/{styler.mjs → styler.js} +0 -0
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { CellContext, ColumnDef, ColumnFiltersOptions, ColumnFiltersState, ColumnOrderState, ColumnPinningOptions, ColumnPinningState, ColumnSizingInfoState, ColumnSizingOptions, ColumnSizingState, CoreOptions, ExpandedOptions, ExpandedState, FacetedOptions, GlobalFilterOptions, GroupingOptions, GroupingState, HeaderContext, PaginationOptions, PaginationState, Row, RowData, RowPinningOptions, RowPinningState, RowSelectionOptions, RowSelectionState, SortingOptions, SortingState, Updater, VisibilityOptions, VisibilityState } from '@tanstack/vue-table'
|
|
3
|
+
import type { PrimitiveProps } from 'reka-ui'
|
|
4
|
+
import type { Ref } from 'vue'
|
|
5
|
+
import type { table } from '../theme'
|
|
6
|
+
import type { ComponentAttrs } from '../types'
|
|
7
|
+
|
|
8
|
+
export type TableData = RowData
|
|
9
|
+
export type TableColumn<T extends TableData, D = unknown> = ColumnDef<T, D> & { title?: string }
|
|
10
|
+
|
|
11
|
+
export interface TableOptions<T extends TableData> extends Omit<CoreOptions<T>, 'data' | 'columns' | 'getCoreRowModel' | 'state' | 'onStateChange' | 'renderFallbackValue'> {
|
|
12
|
+
state?: CoreOptions<T>['state']
|
|
13
|
+
onStateChange?: CoreOptions<T>['onStateChange']
|
|
14
|
+
renderFallbackValue?: CoreOptions<T>['renderFallbackValue']
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
type DynamicHeaderSlots<T, K = keyof T> = Record<string, (props: HeaderContext<T, unknown>) => any> & Record<`${K extends string ? K : never}-header`, (props: HeaderContext<T, unknown>) => any>
|
|
18
|
+
type DynamicCellSlots<T, K = keyof T> = Record<string, (props: CellContext<T, unknown>) => any> & Record<`${K extends string ? K : never}-cell`, (props: CellContext<T, unknown>) => any>
|
|
19
|
+
|
|
20
|
+
export type TableSlots<T> = {
|
|
21
|
+
expanded: (props: { row: Row<T> }) => any
|
|
22
|
+
empty: (props?: {}) => any
|
|
23
|
+
caption: (props?: {}) => any
|
|
24
|
+
} & DynamicHeaderSlots<T> & DynamicCellSlots<T>
|
|
25
|
+
|
|
26
|
+
export interface TableProps<T extends TableData> extends ComponentAttrs<typeof table>, Pick<PrimitiveProps, 'as'>, TableOptions<T> {
|
|
27
|
+
data?: T[]
|
|
28
|
+
columns?: TableColumn<T>[]
|
|
29
|
+
caption?: string
|
|
30
|
+
/**
|
|
31
|
+
* Whether the table should have a sticky header.
|
|
32
|
+
* @default false
|
|
33
|
+
*/
|
|
34
|
+
sticky?: boolean
|
|
35
|
+
/**
|
|
36
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/global-filtering#table-options)
|
|
37
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/global-filtering)
|
|
38
|
+
*/
|
|
39
|
+
globalFilterOptions?: Omit<GlobalFilterOptions<T>, 'onGlobalFilterChange'>
|
|
40
|
+
/**
|
|
41
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-filtering#table-options)
|
|
42
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-filtering)
|
|
43
|
+
*/
|
|
44
|
+
columnFiltersOptions?: Omit<ColumnFiltersOptions<T>, 'getFilteredRowModel' | 'onColumnFiltersChange'>
|
|
45
|
+
/**
|
|
46
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-pinning#table-options)
|
|
47
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-pinning)
|
|
48
|
+
*/
|
|
49
|
+
columnPinningOptions?: Omit<ColumnPinningOptions, 'onColumnPinningChange'>
|
|
50
|
+
/**
|
|
51
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-sizing#table-options)
|
|
52
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-sizing)
|
|
53
|
+
*/
|
|
54
|
+
columnSizingOptions?: Omit<ColumnSizingOptions, 'onColumnSizingChange' | 'onColumnSizingInfoChange'>
|
|
55
|
+
/**
|
|
56
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-visibility#table-options)
|
|
57
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-visibility)
|
|
58
|
+
*/
|
|
59
|
+
visibilityOptions?: Omit<VisibilityOptions, 'onColumnVisibilityChange'>
|
|
60
|
+
/**
|
|
61
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/sorting#table-options)
|
|
62
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/sorting)
|
|
63
|
+
*/
|
|
64
|
+
sortingOptions?: Omit<SortingOptions<T>, 'getSortedRowModel' | 'onSortingChange'>
|
|
65
|
+
/**
|
|
66
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/grouping#table-options)
|
|
67
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/grouping)
|
|
68
|
+
*/
|
|
69
|
+
groupingOptions?: Omit<GroupingOptions, 'onGroupingChange'>
|
|
70
|
+
/**
|
|
71
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/expanding#table-options)
|
|
72
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/expanding)
|
|
73
|
+
*/
|
|
74
|
+
expandedOptions?: Omit<ExpandedOptions<T>, 'getExpandedRowModel' | 'onExpandedChange'>
|
|
75
|
+
/**
|
|
76
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-selection#table-options)
|
|
77
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-selection)
|
|
78
|
+
*/
|
|
79
|
+
rowSelectionOptions?: Omit<RowSelectionOptions<T>, 'onRowSelectionChange'>
|
|
80
|
+
/**
|
|
81
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/row-pinning#table-options)
|
|
82
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/row-pinning)
|
|
83
|
+
*/
|
|
84
|
+
rowPinningOptions?: Omit<RowPinningOptions<T>, 'onRowPinningChange'>
|
|
85
|
+
/**
|
|
86
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/pagination#table-options)
|
|
87
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/pagination)
|
|
88
|
+
*/
|
|
89
|
+
paginationOptions?: Omit<PaginationOptions, 'onPaginationChange'>
|
|
90
|
+
/**
|
|
91
|
+
* @link [API Docs](https://tanstack.com/table/v8/docs/api/features/column-faceting#table-options)
|
|
92
|
+
* @link [Guide](https://tanstack.com/table/v8/docs/guide/column-faceting)
|
|
93
|
+
*/
|
|
94
|
+
facetedOptions?: FacetedOptions<T>
|
|
95
|
+
}
|
|
96
|
+
</script>
|
|
97
|
+
|
|
98
|
+
<script setup lang="ts" generic="T extends TableData">
|
|
99
|
+
import { FlexRender, getCoreRowModel, getExpandedRowModel, getFilteredRowModel, getSortedRowModel, useVueTable } from '@tanstack/vue-table'
|
|
100
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
101
|
+
import { Primitive } from 'reka-ui'
|
|
102
|
+
import { upperFirst } from 'scule'
|
|
103
|
+
import { computed } from 'vue'
|
|
104
|
+
import { useTheme } from '../composables/useTheme'
|
|
105
|
+
|
|
106
|
+
const props = defineProps<TableProps<T>>()
|
|
107
|
+
|
|
108
|
+
defineSlots<TableSlots<T>>()
|
|
109
|
+
|
|
110
|
+
const globalFilterState = defineModel<string>('globalFilter', { default: undefined })
|
|
111
|
+
const columnFiltersState = defineModel<ColumnFiltersState>('columnFilters', { default: [] })
|
|
112
|
+
const columnOrderState = defineModel<ColumnOrderState>('columnOrder', { default: [] })
|
|
113
|
+
const columnVisibilityState = defineModel<VisibilityState>('columnVisibility', { default: {} })
|
|
114
|
+
const columnPinningState = defineModel<ColumnPinningState>('columnPinning', { default: {} })
|
|
115
|
+
const columnSizingState = defineModel<ColumnSizingState>('columnSizing', { default: {} })
|
|
116
|
+
const columnSizingInfoState = defineModel<ColumnSizingInfoState>('columnSizingInfo', { default: {} })
|
|
117
|
+
const rowSelectionState = defineModel<RowSelectionState>('rowSelection', { default: {} })
|
|
118
|
+
const rowPinningState = defineModel<RowPinningState>('rowPinning', { default: {} })
|
|
119
|
+
const sortingState = defineModel<SortingState>('sorting', { default: [] })
|
|
120
|
+
const groupingState = defineModel<GroupingState>('grouping', { default: [] })
|
|
121
|
+
const expandedState = defineModel<ExpandedState>('expanded', { default: {} })
|
|
122
|
+
const paginationState = defineModel<PaginationState>('pagination', { default: {} })
|
|
123
|
+
|
|
124
|
+
const data = computed(() => props.data ?? [])
|
|
125
|
+
const columns = computed<TableColumn<T>[]>(
|
|
126
|
+
() =>
|
|
127
|
+
props.columns ?? Object.keys(data.value[0] ?? {}).map(
|
|
128
|
+
(accessorKey: string) => ({ accessorKey, header: upperFirst(accessorKey) }),
|
|
129
|
+
),
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
const tableApi = useVueTable({
|
|
133
|
+
...reactiveOmit(props, 'data', 'columns', 'caption', 'sticky', 'class', 'ui'),
|
|
134
|
+
data,
|
|
135
|
+
columns: columns.value,
|
|
136
|
+
getCoreRowModel: getCoreRowModel(),
|
|
137
|
+
|
|
138
|
+
...props.globalFilterOptions,
|
|
139
|
+
onGlobalFilterChange: (updaterOrValue) => valueUpdater(updaterOrValue, globalFilterState),
|
|
140
|
+
|
|
141
|
+
...props.columnFiltersOptions,
|
|
142
|
+
getFilteredRowModel: getFilteredRowModel(),
|
|
143
|
+
onColumnFiltersChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnFiltersState),
|
|
144
|
+
onColumnOrderChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnOrderState),
|
|
145
|
+
|
|
146
|
+
...props.visibilityOptions,
|
|
147
|
+
onColumnVisibilityChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnVisibilityState),
|
|
148
|
+
|
|
149
|
+
...props.columnPinningOptions,
|
|
150
|
+
onColumnPinningChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnPinningState),
|
|
151
|
+
|
|
152
|
+
...props.columnSizingOptions,
|
|
153
|
+
onColumnSizingChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnSizingState),
|
|
154
|
+
onColumnSizingInfoChange: (updaterOrValue) => valueUpdater(updaterOrValue, columnSizingInfoState),
|
|
155
|
+
|
|
156
|
+
...props.rowSelectionOptions,
|
|
157
|
+
onRowSelectionChange: (updaterOrValue) => valueUpdater(updaterOrValue, rowSelectionState),
|
|
158
|
+
|
|
159
|
+
...props.rowPinningOptions,
|
|
160
|
+
onRowPinningChange: (updaterOrValue) => valueUpdater(updaterOrValue, rowPinningState),
|
|
161
|
+
|
|
162
|
+
...props.sortingOptions,
|
|
163
|
+
getSortedRowModel: getSortedRowModel(),
|
|
164
|
+
onSortingChange: (updaterOrValue) => valueUpdater(updaterOrValue, sortingState),
|
|
165
|
+
|
|
166
|
+
...props.groupingOptions,
|
|
167
|
+
onGroupingChange: (updaterOrValue) => valueUpdater(updaterOrValue, groupingState),
|
|
168
|
+
|
|
169
|
+
...props.expandedOptions,
|
|
170
|
+
getExpandedRowModel: getExpandedRowModel(),
|
|
171
|
+
onExpandedChange: (updaterOrValue) => valueUpdater(updaterOrValue, expandedState),
|
|
172
|
+
|
|
173
|
+
...props.paginationOptions,
|
|
174
|
+
onPaginationChange: (updaterOrValue) => valueUpdater(updaterOrValue, paginationState),
|
|
175
|
+
|
|
176
|
+
...props.facetedOptions,
|
|
177
|
+
state: {
|
|
178
|
+
get globalFilter() {
|
|
179
|
+
return globalFilterState.value
|
|
180
|
+
},
|
|
181
|
+
get columnFilters() {
|
|
182
|
+
return columnFiltersState.value
|
|
183
|
+
},
|
|
184
|
+
get columnOrder() {
|
|
185
|
+
return columnOrderState.value
|
|
186
|
+
},
|
|
187
|
+
get columnVisibility() {
|
|
188
|
+
return columnVisibilityState.value
|
|
189
|
+
},
|
|
190
|
+
get columnPinning() {
|
|
191
|
+
return columnPinningState.value
|
|
192
|
+
},
|
|
193
|
+
get expanded() {
|
|
194
|
+
return expandedState.value
|
|
195
|
+
},
|
|
196
|
+
get rowSelection() {
|
|
197
|
+
return rowSelectionState.value
|
|
198
|
+
},
|
|
199
|
+
get sorting() {
|
|
200
|
+
return sortingState.value
|
|
201
|
+
},
|
|
202
|
+
get grouping() {
|
|
203
|
+
return groupingState.value
|
|
204
|
+
},
|
|
205
|
+
get rowPinning() {
|
|
206
|
+
return rowPinningState.value
|
|
207
|
+
},
|
|
208
|
+
get columnSizing() {
|
|
209
|
+
return columnSizingState.value
|
|
210
|
+
},
|
|
211
|
+
get columnSizingInfo() {
|
|
212
|
+
return columnSizingInfoState.value
|
|
213
|
+
},
|
|
214
|
+
get pagination() {
|
|
215
|
+
return paginationState.value
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
})
|
|
219
|
+
|
|
220
|
+
function valueUpdater<T extends Updater<any>>(updaterOrValue: T, ref: Ref) {
|
|
221
|
+
ref.value = typeof updaterOrValue === 'function' ? updaterOrValue(ref.value) : updaterOrValue
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const { theme, createStyler } = useTheme()
|
|
225
|
+
const style = computed(() => {
|
|
226
|
+
const styler = createStyler(theme.value.table)
|
|
227
|
+
return styler(props)
|
|
228
|
+
})
|
|
229
|
+
|
|
230
|
+
defineExpose({
|
|
231
|
+
tableApi,
|
|
232
|
+
})
|
|
233
|
+
</script>
|
|
234
|
+
|
|
235
|
+
<template>
|
|
236
|
+
<Primitive :as="props.as" :class="style.root({ class: [props.class, props.ui?.root] })">
|
|
237
|
+
<table :class="style.base({ class: props.ui?.base })">
|
|
238
|
+
<caption v-if="props.caption" :class="style.caption({ class: props.caption })">
|
|
239
|
+
<slot name="caption">
|
|
240
|
+
{{ props.caption }}
|
|
241
|
+
</slot>
|
|
242
|
+
</caption>
|
|
243
|
+
|
|
244
|
+
<thead :class="style.thead({ class: props.ui?.thead })">
|
|
245
|
+
<tr v-for="headerGroup in tableApi.getHeaderGroups()" :key="headerGroup.id" :class="style.tr({ class: props.ui?.tr })">
|
|
246
|
+
<th
|
|
247
|
+
v-for="header in headerGroup.headers"
|
|
248
|
+
:key="header.id"
|
|
249
|
+
:data-pinned="header.column.getIsPinned()"
|
|
250
|
+
:class="style.th({ class: props.ui?.th, pinned: !!header.column.getIsPinned() })"
|
|
251
|
+
>
|
|
252
|
+
<slot :name="`${header.id}-header`" v-bind="header.getContext()">
|
|
253
|
+
<FlexRender v-if="!header.isPlaceholder" :render="header.column.columnDef.header" :props="header.getContext" />
|
|
254
|
+
</slot>
|
|
255
|
+
</th>
|
|
256
|
+
</tr>
|
|
257
|
+
</thead>
|
|
258
|
+
|
|
259
|
+
<tbody :class="style.tbody({ class: props.ui?.tbody })">
|
|
260
|
+
<template v-if="tableApi.getRowModel().rows.length > 0">
|
|
261
|
+
<template v-for="row in tableApi.getRowModel().rows" :key="row.id">
|
|
262
|
+
<tr :data-selected="row.getIsSelected()" :data-expanded="row.getIsExpanded()" :class="style.tr({ class: props.ui?.tr })">
|
|
263
|
+
<td
|
|
264
|
+
v-for="cell in row.getVisibleCells()"
|
|
265
|
+
:key="cell.id"
|
|
266
|
+
:data-pinned="cell.column.getIsPinned()"
|
|
267
|
+
:class="style.td({ class: props.ui?.td, pinned: !!cell.column.getIsPinned() })"
|
|
268
|
+
>
|
|
269
|
+
<slot :name="`${cell.column.id}-cell`" v-bind="cell.getContext()">
|
|
270
|
+
<FlexRender :render="cell.column.columnDef.cell" :props="cell.getContext()" />
|
|
271
|
+
</slot>
|
|
272
|
+
</td>
|
|
273
|
+
</tr>
|
|
274
|
+
<tr v-if="row.getIsExpanded()" :class="style.tr({ class: props.ui?.tr, expanded: true })">
|
|
275
|
+
<td :colspan="row.getAllCells().length" :class="style.td({ class: props.ui?.td })">
|
|
276
|
+
<slot name="expanded" :row="row"></slot>
|
|
277
|
+
</td>
|
|
278
|
+
</tr>
|
|
279
|
+
</template>
|
|
280
|
+
</template>
|
|
281
|
+
|
|
282
|
+
<tr v-else :class="style.tr({ class: props.ui?.tr })">
|
|
283
|
+
<td :colspan="columns.length" :class="style.empty({ class: props.ui?.empty })">
|
|
284
|
+
<slot name="empty">
|
|
285
|
+
Empty
|
|
286
|
+
</slot>
|
|
287
|
+
</td>
|
|
288
|
+
</tr>
|
|
289
|
+
</tbody>
|
|
290
|
+
</table>
|
|
291
|
+
</Primitive>
|
|
292
|
+
</template>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { VariantProps } from '@byyuurin/ui-kit'
|
|
3
3
|
import type { PrimitiveProps, TabsRootEmits, TabsRootProps } from 'reka-ui'
|
|
4
4
|
import type { tabs } from '../theme'
|
|
5
|
-
import type { ComponentAttrs
|
|
5
|
+
import type { ComponentAttrs } from '../types'
|
|
6
6
|
|
|
7
7
|
export interface TabsItem {
|
|
8
8
|
label?: string
|
|
@@ -14,6 +14,17 @@ export interface TabsItem {
|
|
|
14
14
|
disabled?: boolean
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export interface TabsEmits extends TabsRootEmits<string | number> {}
|
|
18
|
+
|
|
19
|
+
type SlotProps<T> = (props: { item: T, index: number }) => any
|
|
20
|
+
|
|
21
|
+
export type TabsSlots<T extends { slot?: string }> = {
|
|
22
|
+
prefix?: SlotProps<T>
|
|
23
|
+
default?: SlotProps<T>
|
|
24
|
+
suffix?: SlotProps<T>
|
|
25
|
+
content?: SlotProps<T>
|
|
26
|
+
} & Record<string, SlotProps<T>>
|
|
27
|
+
|
|
17
28
|
type TabsVariants = VariantProps<typeof tabs>
|
|
18
29
|
|
|
19
30
|
export interface TabsProps<T> extends ComponentAttrs<typeof tabs>, Pick<TabsRootProps<string | number>, 'defaultValue' | 'modelValue' | 'activationMode' | 'unmountOnHide'> {
|
|
@@ -23,7 +34,7 @@ export interface TabsProps<T> extends ComponentAttrs<typeof tabs>, Pick<TabsRoot
|
|
|
23
34
|
orientation?: TabsVariants['orientation']
|
|
24
35
|
size?: TabsVariants['size']
|
|
25
36
|
/** @default true */
|
|
26
|
-
|
|
37
|
+
evenly?: boolean
|
|
27
38
|
/**
|
|
28
39
|
* The content of the tabs, can be disabled to prevent rendering the content.
|
|
29
40
|
* @default true
|
|
@@ -35,17 +46,6 @@ export interface TabsProps<T> extends ComponentAttrs<typeof tabs>, Pick<TabsRoot
|
|
|
35
46
|
*/
|
|
36
47
|
labelKey?: string
|
|
37
48
|
}
|
|
38
|
-
|
|
39
|
-
export interface TabsEmits extends TabsRootEmits<string | number> {}
|
|
40
|
-
|
|
41
|
-
type SlotProps<T> = (props: { item: T, index: number }) => any
|
|
42
|
-
|
|
43
|
-
export type TabsSlots<T extends { slot?: string }> = {
|
|
44
|
-
prefix?: SlotProps<T>
|
|
45
|
-
default?: SlotProps<T>
|
|
46
|
-
suffix?: SlotProps<T>
|
|
47
|
-
content?: SlotProps<T>
|
|
48
|
-
} & DynamicSlots<T, SlotProps<T>>
|
|
49
49
|
</script>
|
|
50
50
|
|
|
51
51
|
<script lang="ts" setup generic="T extends TabsItem">
|
|
@@ -59,15 +59,15 @@ const props = withDefaults(defineProps<TabsProps<T>>(), {
|
|
|
59
59
|
defaultValue: '0',
|
|
60
60
|
variant: 'solid',
|
|
61
61
|
orientation: 'horizontal',
|
|
62
|
-
|
|
62
|
+
evenly: true,
|
|
63
63
|
content: true,
|
|
64
64
|
labelKey: 'label',
|
|
65
65
|
})
|
|
66
66
|
|
|
67
|
-
const
|
|
67
|
+
const emit = defineEmits<TabsEmits>()
|
|
68
68
|
const slots = defineSlots<TabsSlots<T>>()
|
|
69
69
|
|
|
70
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'orientation', 'activationMode', 'unmountOnHide'),
|
|
70
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'orientation', 'activationMode', 'unmountOnHide'), emit)
|
|
71
71
|
|
|
72
72
|
const { theme, createStyler } = useTheme()
|
|
73
73
|
const style = computed(() => {
|
|
@@ -89,7 +89,7 @@ const style = computed(() => {
|
|
|
89
89
|
:class="style.trigger({ class: props.ui?.trigger })"
|
|
90
90
|
>
|
|
91
91
|
<slot name="prefix" :item="item" :index="index">
|
|
92
|
-
<
|
|
92
|
+
<span v-if="item.icon" :class="style.prefixIcon({ class: [item.icon, props.ui?.prefixIcon] })"></span>
|
|
93
93
|
</slot>
|
|
94
94
|
|
|
95
95
|
<span v-if="get(item, props.labelKey) || slots.default" :class="style.label({ class: props.ui?.label })">
|
|
@@ -83,7 +83,7 @@ defineExpose({
|
|
|
83
83
|
:style="{ '--height': height }"
|
|
84
84
|
>
|
|
85
85
|
<slot name="icon">
|
|
86
|
-
<
|
|
86
|
+
<span v-if="props.icon" :class="style.icon({ class: [props.icon, props.ui?.icon] })"></span>
|
|
87
87
|
</slot>
|
|
88
88
|
|
|
89
89
|
<div :class="style.wrapper({ class: props.ui?.wrapper })">
|
|
@@ -139,39 +139,5 @@ function getOffset(index: number) {
|
|
|
139
139
|
</template>
|
|
140
140
|
|
|
141
141
|
<style>
|
|
142
|
-
@keyframes toast-collapsed-closed {
|
|
143
|
-
from {
|
|
144
|
-
transform: var(--transform);
|
|
145
|
-
}
|
|
146
|
-
to {
|
|
147
|
-
transform: translateY(calc((var(--before) - var(--height)) * var(--gap)))
|
|
148
|
-
scale(var(--scale));
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
@keyframes toast-closed {
|
|
152
|
-
from {
|
|
153
|
-
transform: var(--transform);
|
|
154
|
-
}
|
|
155
|
-
to {
|
|
156
|
-
transform: translateY(
|
|
157
|
-
calc((var(--offset) - var(--height)) * var(--translate-factor))
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
@keyframes toast-slide-left {
|
|
162
|
-
from {
|
|
163
|
-
transform: translateX(0) translateY(var(--translate));
|
|
164
|
-
}
|
|
165
|
-
to {
|
|
166
|
-
transform: translateX(-100%) translateY(var(--translate));
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
@keyframes toast-slide-right {
|
|
170
|
-
from {
|
|
171
|
-
transform: translateX(0) translateY(var(--translate));
|
|
172
|
-
}
|
|
173
|
-
to {
|
|
174
|
-
transform: translateX(100%) translateY(var(--translate));
|
|
175
|
-
}
|
|
176
|
-
}
|
|
142
|
+
@keyframes toast-collapsed-closed{0%{transform:var(--transform)}to{transform:translateY(calc((var(--before) - var(--height))*var(--gap))) scale(var(--scale))}}@keyframes toast-closed{0%{transform:var(--transform)}to{transform:translateY(calc((var(--offset) - var(--height))*var(--translate-factor)))}}@keyframes toast-slide-left{0%{transform:translateX(0) translateY(var(--translate))}to{transform:translateX(-100%) translateY(var(--translate))}}@keyframes toast-slide-right{0%{transform:translateX(0) translateY(var(--translate))}to{transform:translateX(100%) translateY(var(--translate))}}
|
|
177
143
|
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComputedRef } from 'vue';
|
|
2
|
-
import type { ButtonGroupProps } from '../components/ButtonGroup.vue';
|
|
2
|
+
import type { ButtonGroupProps } from '../components/ButtonGroup.vue.js';
|
|
3
3
|
interface ButtonGroupInjectData {
|
|
4
4
|
size: ButtonGroupProps['size'];
|
|
5
5
|
orientation: ButtonGroupProps['orientation'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed, toValue } from "vue";
|
|
2
|
-
import { useTheme } from "./useTheme.
|
|
2
|
+
import { useTheme } from "./useTheme.js";
|
|
3
3
|
export function useComponentIcons(componentProps) {
|
|
4
4
|
const { theme } = useTheme();
|
|
5
5
|
const props = computed(() => toValue(componentProps));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Component, ShallowRef } from 'vue';
|
|
2
2
|
import type { ComponentProps } from 'vue-component-type-helpers';
|
|
3
|
-
import type { ModalProps } from '../types';
|
|
3
|
+
import type { ModalProps } from '../types/index.js';
|
|
4
4
|
export interface ModalState {
|
|
5
5
|
component: Component | string;
|
|
6
6
|
props: ModalProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createSharedComposable } from "@vueuse/core";
|
|
2
2
|
import { ref } from "vue";
|
|
3
|
-
import { defineInjection } from "./defineInjection.
|
|
3
|
+
import { defineInjection } from "./defineInjection.js";
|
|
4
4
|
export const {
|
|
5
5
|
InjectionKey: InjectionKeyModalState,
|
|
6
6
|
inject: injectModalState,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { UserConfig } from '@unocss/core';
|
|
2
2
|
import type { MaybeRefOrGetter } from 'vue';
|
|
3
|
-
import * as theme from '../theme';
|
|
4
|
-
export declare const InjectionKeyThemeExtension: import("vue").InjectionKey<MaybeRefOrGetter<import("
|
|
3
|
+
import * as theme from '../theme/index.js';
|
|
4
|
+
export declare const InjectionKeyThemeExtension: import("vue").InjectionKey<MaybeRefOrGetter<import("..").PartialTheme<typeof theme>>>, provideThemeExtension: (value: MaybeRefOrGetter<import("..").PartialTheme<typeof theme>>) => void, injectThemeExtension: () => MaybeRefOrGetter<import("..").PartialTheme<typeof theme>>;
|
|
5
5
|
export declare const InjectionKeyUnoConfig: import("vue").InjectionKey<UserConfig<object>>, provideUnoConfig: (value: UserConfig<object>) => void, injectUnoConfig: () => UserConfig<object>;
|
|
6
6
|
export declare const useTheme: () => {
|
|
7
7
|
theme: import("vue").ComputedRef<typeof theme>;
|
|
8
|
-
createStyler: <V extends import("@byyuurin/ui-kit
|
|
8
|
+
createStyler: <V extends import("@byyuurin/ui-kit").CVVariants<S, B>, CV extends import("@byyuurin/ui-kit").CVCompoundVariants<V, S, B>, DV extends import("@byyuurin/ui-kit").CVDefaultVariants<V, S>, B extends import("@byyuurin/ui-kit").ClassValue = undefined, S extends import("@byyuurin/ui-kit").CVSlots = undefined>(theme: import("@byyuurin/ui-kit").CVMeta<V, CV, DV, B, S>) => [keyof V] extends string[] ? (props: import("@byyuurin/ui-kit").VariantProps<import("@byyuurin/ui-kit").CVReturnType<V, S, B>> & import("..").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit").CVHandler<V, S, string>; } : (props?: import("..").StylerBaseProps) => S extends undefined ? string : { [K in keyof S | (B extends undefined ? never : "base")]: import("@byyuurin/ui-kit").CVHandler<V, S, string>; };
|
|
9
9
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { transformUnoRules } from "@byyuurin/ui/unocss";
|
|
2
2
|
import { createSharedComposable } from "@vueuse/core";
|
|
3
3
|
import { computed, toValue } from "vue";
|
|
4
|
-
import * as theme from "../theme/index.
|
|
5
|
-
import { extendTheme, prepareStyler } from "../utils/index.
|
|
6
|
-
import { defineInjection } from "./defineInjection.
|
|
4
|
+
import * as theme from "../theme/index.js";
|
|
5
|
+
import { extendTheme, prepareStyler } from "../utils/index.js";
|
|
6
|
+
import { defineInjection } from "./defineInjection.js";
|
|
7
7
|
export const {
|
|
8
8
|
InjectionKey: InjectionKeyThemeExtension,
|
|
9
9
|
provide: provideThemeExtension,
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export { default as Accordion } from './components/Accordion.vue.js';
|
|
2
|
+
export { default as Alert } from './components/Alert.vue.js';
|
|
3
|
+
export { default as App } from './components/App.vue.js';
|
|
4
|
+
export { default as Badge } from './components/Badge.vue.js';
|
|
5
|
+
export { default as Button } from './components/Button.vue.js';
|
|
6
|
+
export { default as ButtonGroup } from './components/ButtonGroup.vue.js';
|
|
7
|
+
export { default as Card } from './components/Card.vue.js';
|
|
8
|
+
export { default as Carousel } from './components/Carousel.vue.js';
|
|
9
|
+
export { default as Checkbox } from './components/Checkbox.vue.js';
|
|
10
|
+
export { default as Chip } from './components/Chip.vue.js';
|
|
11
|
+
export { default as Collapsible } from './components/Collapsible.vue.js';
|
|
12
|
+
export { default as Drawer } from './components/Drawer.vue.js';
|
|
13
|
+
export { default as Input } from './components/Input.vue.js';
|
|
14
|
+
export { default as InputNumber } from './components/InputNumber.vue.js';
|
|
15
|
+
export { default as Link } from './components/Link.vue.js';
|
|
16
|
+
export { default as LinkBase } from './components/LinkBase.vue.js';
|
|
17
|
+
export { default as Modal } from './components/Modal.vue.js';
|
|
18
|
+
export { default as ModalProvider } from './components/ModalProvider.vue.js';
|
|
19
|
+
export { default as Pagination } from './components/Pagination.vue.js';
|
|
20
|
+
export { default as PinInput } from './components/PinInput.vue.js';
|
|
21
|
+
export { default as Popover } from './components/Popover.vue.js';
|
|
22
|
+
export { default as RadioGroup } from './components/RadioGroup.vue.js';
|
|
23
|
+
export { default as ScrollArea } from './components/ScrollArea.vue.js';
|
|
24
|
+
export { default as Select } from './components/Select.vue.js';
|
|
25
|
+
export { default as Separator } from './components/Separator.vue.js';
|
|
26
|
+
export { default as Slider } from './components/Slider.vue.js';
|
|
27
|
+
export { default as Switch } from './components/Switch.vue.js';
|
|
28
|
+
export { default as Table } from './components/Table.vue.js';
|
|
29
|
+
export { default as Tabs } from './components/Tabs.vue.js';
|
|
30
|
+
export { default as Textarea } from './components/Textarea.vue.js';
|
|
31
|
+
export { default as Toast } from './components/Toast.vue.js';
|
|
32
|
+
export { default as Toaster } from './components/Toaster.vue.js';
|
|
33
|
+
export { default as Tooltip } from './components/Tooltip.vue.js';
|
|
34
|
+
export * from './types/index.js';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export { default as Accordion } from "./components/Accordion.vue";
|
|
2
|
+
export { default as Alert } from "./components/Alert.vue";
|
|
3
|
+
export { default as App } from "./components/App.vue";
|
|
4
|
+
export { default as Badge } from "./components/Badge.vue";
|
|
5
|
+
export { default as Button } from "./components/Button.vue";
|
|
6
|
+
export { default as ButtonGroup } from "./components/ButtonGroup.vue";
|
|
7
|
+
export { default as Card } from "./components/Card.vue";
|
|
8
|
+
export { default as Carousel } from "./components/Carousel.vue";
|
|
9
|
+
export { default as Checkbox } from "./components/Checkbox.vue";
|
|
10
|
+
export { default as Chip } from "./components/Chip.vue";
|
|
11
|
+
export { default as Collapsible } from "./components/Collapsible.vue";
|
|
12
|
+
export { default as Drawer } from "./components/Drawer.vue";
|
|
13
|
+
export { default as Input } from "./components/Input.vue";
|
|
14
|
+
export { default as InputNumber } from "./components/InputNumber.vue";
|
|
15
|
+
export { default as Link } from "./components/Link.vue";
|
|
16
|
+
export { default as LinkBase } from "./components/LinkBase.vue";
|
|
17
|
+
export { default as Modal } from "./components/Modal.vue";
|
|
18
|
+
export { default as ModalProvider } from "./components/ModalProvider.vue";
|
|
19
|
+
export { default as Pagination } from "./components/Pagination.vue";
|
|
20
|
+
export { default as PinInput } from "./components/PinInput.vue";
|
|
21
|
+
export { default as Popover } from "./components/Popover.vue";
|
|
22
|
+
export { default as RadioGroup } from "./components/RadioGroup.vue";
|
|
23
|
+
export { default as ScrollArea } from "./components/ScrollArea.vue";
|
|
24
|
+
export { default as Select } from "./components/Select.vue";
|
|
25
|
+
export { default as Separator } from "./components/Separator.vue";
|
|
26
|
+
export { default as Slider } from "./components/Slider.vue";
|
|
27
|
+
export { default as Switch } from "./components/Switch.vue";
|
|
28
|
+
export { default as Table } from "./components/Table.vue";
|
|
29
|
+
export { default as Tabs } from "./components/Tabs.vue";
|
|
30
|
+
export { default as Textarea } from "./components/Textarea.vue";
|
|
31
|
+
export { default as Toast } from "./components/Toast.vue";
|
|
32
|
+
export { default as Toaster } from "./components/Toaster.vue";
|
|
33
|
+
export { default as Tooltip } from "./components/Tooltip.vue";
|
|
34
|
+
export * from "./types/index.js";
|
|
@@ -7,8 +7,8 @@ declare const _default: {
|
|
|
7
7
|
trigger: string;
|
|
8
8
|
content: string[];
|
|
9
9
|
body: string;
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
prefixIcon: string;
|
|
11
|
+
suffixIcon: string;
|
|
12
12
|
label: string;
|
|
13
13
|
};
|
|
14
14
|
variants: {
|
|
@@ -18,7 +18,7 @@ declare const _default: {
|
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
compoundVariants: import("@byyuurin/ui-kit
|
|
21
|
+
compoundVariants: import("@byyuurin/ui-kit").CVCompoundVariants<{
|
|
22
22
|
disabled: {
|
|
23
23
|
true: {
|
|
24
24
|
trigger: string;
|
|
@@ -31,11 +31,11 @@ declare const _default: {
|
|
|
31
31
|
trigger: string;
|
|
32
32
|
content: string[];
|
|
33
33
|
body: string;
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
prefixIcon: string;
|
|
35
|
+
suffixIcon: string;
|
|
36
36
|
label: string;
|
|
37
37
|
}, undefined>;
|
|
38
|
-
defaultVariants: import("@byyuurin/ui-kit
|
|
38
|
+
defaultVariants: import("@byyuurin/ui-kit").CVDefaultVariants<{
|
|
39
39
|
disabled: {
|
|
40
40
|
true: {
|
|
41
41
|
trigger: string;
|
|
@@ -48,8 +48,8 @@ declare const _default: {
|
|
|
48
48
|
trigger: string;
|
|
49
49
|
content: string[];
|
|
50
50
|
body: string;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
prefixIcon: string;
|
|
52
|
+
suffixIcon: string;
|
|
53
53
|
label: string;
|
|
54
54
|
}>;
|
|
55
55
|
};
|
|
@@ -13,8 +13,8 @@ export default ct(
|
|
|
13
13
|
"data-[state=closed]:animate-[accordion-up_200ms_ease-out]"
|
|
14
14
|
],
|
|
15
15
|
body: "text-sm pb-4 color-ui-cb/80",
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
prefixIcon: "shrink-0 size-5",
|
|
17
|
+
suffixIcon: "shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-all duration-200",
|
|
18
18
|
label: "text-start break-words"
|
|
19
19
|
},
|
|
20
20
|
variants: {
|
|
@@ -41,7 +41,7 @@ declare const _default: {
|
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
43
|
};
|
|
44
|
-
compoundVariants: import("@byyuurin/ui-kit
|
|
44
|
+
compoundVariants: import("@byyuurin/ui-kit").CVCompoundVariants<{
|
|
45
45
|
variant: {
|
|
46
46
|
solid: {
|
|
47
47
|
root: string;
|
|
@@ -81,7 +81,7 @@ declare const _default: {
|
|
|
81
81
|
actions: string;
|
|
82
82
|
close: string;
|
|
83
83
|
}, undefined>;
|
|
84
|
-
defaultVariants: import("@byyuurin/ui-kit
|
|
84
|
+
defaultVariants: import("@byyuurin/ui-kit").CVDefaultVariants<{
|
|
85
85
|
variant: {
|
|
86
86
|
solid: {
|
|
87
87
|
root: string;
|