@bitrix24/b24ui-nuxt 0.4.7 → 0.4.9
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/.nuxt/b24ui/calendar.ts +92 -0
- package/.nuxt/b24ui/index.ts +1 -0
- package/dist/meta.cjs +5742 -104
- package/dist/meta.d.cts +5742 -104
- package/dist/meta.d.mts +5742 -104
- package/dist/meta.d.ts +5742 -104
- package/dist/meta.mjs +5742 -104
- package/dist/module.cjs +1 -1
- package/dist/module.d.cts +1 -1
- package/dist/module.d.mts +1 -1
- package/dist/module.d.ts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +1 -1
- package/dist/runtime/components/Calendar.vue +211 -0
- package/dist/runtime/composables/defineLocale.d.ts +1 -0
- package/dist/runtime/dictionary/icons.d.ts +5 -0
- package/dist/runtime/dictionary/icons.js +2 -1
- package/dist/runtime/locale/ar.js +1 -0
- package/dist/runtime/locale/br.js +1 -0
- package/dist/runtime/locale/de.js +1 -0
- package/dist/runtime/locale/en.js +1 -0
- package/dist/runtime/locale/fr.js +1 -0
- package/dist/runtime/locale/id.js +1 -0
- package/dist/runtime/locale/it.js +1 -0
- package/dist/runtime/locale/ja.js +1 -0
- package/dist/runtime/locale/kz.js +1 -0
- package/dist/runtime/locale/la.js +1 -0
- package/dist/runtime/locale/ms.js +1 -0
- package/dist/runtime/locale/pl.js +1 -0
- package/dist/runtime/locale/ru.js +1 -0
- package/dist/runtime/locale/sc.js +1 -0
- package/dist/runtime/locale/tc.js +1 -0
- package/dist/runtime/locale/th.js +1 -0
- package/dist/runtime/locale/tr.js +1 -0
- package/dist/runtime/locale/ua.js +1 -0
- package/dist/runtime/locale/vn.js +1 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/shared/{b24ui-nuxt.lbv7ybxH.cjs → b24ui-nuxt.CH0xlXgy.cjs} +113 -0
- package/dist/shared/{b24ui-nuxt.CPOPpSQq.mjs → b24ui-nuxt.D6rkGFKm.mjs} +113 -0
- package/dist/unplugin.cjs +1 -1
- package/dist/unplugin.mjs +1 -1
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +6 -6
package/dist/module.cjs
CHANGED
package/dist/module.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ interface ModuleOptions {
|
|
|
5
5
|
/**
|
|
6
6
|
* Enable or disable `@nuxtjs/color-mode` module
|
|
7
7
|
* @defaultValue `true`
|
|
8
|
-
* @link https://
|
|
8
|
+
* @link https://bitrix24.github.io/b24ui/guide/color-mode-nuxt.html
|
|
9
9
|
*/
|
|
10
10
|
colorMode?: boolean;
|
|
11
11
|
}
|
package/dist/module.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ interface ModuleOptions {
|
|
|
5
5
|
/**
|
|
6
6
|
* Enable or disable `@nuxtjs/color-mode` module
|
|
7
7
|
* @defaultValue `true`
|
|
8
|
-
* @link https://
|
|
8
|
+
* @link https://bitrix24.github.io/b24ui/guide/color-mode-nuxt.html
|
|
9
9
|
*/
|
|
10
10
|
colorMode?: boolean;
|
|
11
11
|
}
|
package/dist/module.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ interface ModuleOptions {
|
|
|
5
5
|
/**
|
|
6
6
|
* Enable or disable `@nuxtjs/color-mode` module
|
|
7
7
|
* @defaultValue `true`
|
|
8
|
-
* @link https://
|
|
8
|
+
* @link https://bitrix24.github.io/b24ui/guide/color-mode-nuxt.html
|
|
9
9
|
*/
|
|
10
10
|
colorMode?: boolean;
|
|
11
11
|
}
|
package/dist/module.json
CHANGED
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.
|
|
3
|
+
import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.D6rkGFKm.mjs';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'scule';
|
|
6
6
|
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
|
+
import type { CalendarRootProps, CalendarRootEmits, RangeCalendarRootEmits, DateRange, CalendarCellTriggerProps } from 'reka-ui'
|
|
4
|
+
import type { DateValue } from '@internationalized/date'
|
|
5
|
+
import type { AppConfig } from '@nuxt/schema'
|
|
6
|
+
import _appConfig from '#build/app.config'
|
|
7
|
+
import theme from '#build/b24ui/calendar'
|
|
8
|
+
import { tv } from '../utils/tv'
|
|
9
|
+
import type { IconComponent } from '../types'
|
|
10
|
+
import type { PartialString } from '../types/utils'
|
|
11
|
+
|
|
12
|
+
const appConfigCalendar = _appConfig as AppConfig & { b24ui: { calendar: Partial<typeof theme> } }
|
|
13
|
+
|
|
14
|
+
const calendar = tv({ extend: tv(theme), ...(appConfigCalendar.b24ui?.calendar || {}) })
|
|
15
|
+
|
|
16
|
+
type CalendarVariants = VariantProps<typeof calendar>
|
|
17
|
+
|
|
18
|
+
type CalendarModelValue<R extends boolean = false, M extends boolean = false> = R extends true
|
|
19
|
+
? DateRange
|
|
20
|
+
: M extends true
|
|
21
|
+
? DateValue[]
|
|
22
|
+
: DateValue
|
|
23
|
+
|
|
24
|
+
export interface CalendarProps<R extends boolean, M extends boolean> extends Omit<CalendarRootProps, 'as' | 'asChild' | 'modelValue' | 'defaultValue' | 'dir' | 'locale' | 'calendarLabel' | 'multiple'> {
|
|
25
|
+
/**
|
|
26
|
+
* The element or component this component should render as.
|
|
27
|
+
* @defaultValue 'div'
|
|
28
|
+
*/
|
|
29
|
+
as?: any
|
|
30
|
+
/**
|
|
31
|
+
* The icon to use for the next year control.
|
|
32
|
+
* @defaultValue icons.chevronDoubleRight
|
|
33
|
+
* @IconComponent
|
|
34
|
+
*/
|
|
35
|
+
nextYearIcon?: IconComponent
|
|
36
|
+
/**
|
|
37
|
+
* The icon to use for the next month control.
|
|
38
|
+
* @defaultValue icons.chevronRight
|
|
39
|
+
* @IconComponent
|
|
40
|
+
*/
|
|
41
|
+
nextMonthIcon?: IconComponent
|
|
42
|
+
/**
|
|
43
|
+
* The icon to use for the previous year control.
|
|
44
|
+
* @defaultValue icons.chevronDoubleLeft
|
|
45
|
+
* @IconComponent
|
|
46
|
+
*/
|
|
47
|
+
prevYearIcon?: IconComponent
|
|
48
|
+
/**
|
|
49
|
+
* The icon to use for the previous month control.
|
|
50
|
+
* @defaultValue icons.chevronLeft
|
|
51
|
+
* @IconComponent
|
|
52
|
+
*/
|
|
53
|
+
prevMonthIcon?: IconComponent
|
|
54
|
+
/**
|
|
55
|
+
* @defaultValue 'primary'
|
|
56
|
+
*/
|
|
57
|
+
color?: CalendarVariants['color']
|
|
58
|
+
/**
|
|
59
|
+
* @defaultValue 'md'
|
|
60
|
+
*/
|
|
61
|
+
size?: CalendarVariants['size']
|
|
62
|
+
/** Whether a range of dates can be selected */
|
|
63
|
+
range?: R & boolean
|
|
64
|
+
/** Whether multiple dates can be selected */
|
|
65
|
+
multiple?: M & boolean
|
|
66
|
+
/** Show month controls */
|
|
67
|
+
monthControls?: boolean
|
|
68
|
+
/** Show year controls */
|
|
69
|
+
yearControls?: boolean
|
|
70
|
+
defaultValue?: CalendarModelValue<R, M>
|
|
71
|
+
modelValue?: CalendarModelValue<R, M>
|
|
72
|
+
class?: any
|
|
73
|
+
b24ui?: PartialString<typeof calendar.slots>
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface CalendarEmits<R extends boolean, M extends boolean> extends Omit<CalendarRootEmits & RangeCalendarRootEmits, 'update:modelValue'> {
|
|
77
|
+
'update:modelValue': [date: CalendarModelValue<R, M>]
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface CalendarSlots {
|
|
81
|
+
'heading': (props: { value: string }) => any
|
|
82
|
+
'day': (props: Pick<CalendarCellTriggerProps, 'day'>) => any
|
|
83
|
+
'week-day': (props: { day: string }) => any
|
|
84
|
+
}
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<script setup lang="ts" generic="R extends boolean = false, M extends boolean = false">
|
|
88
|
+
import { computed } from 'vue'
|
|
89
|
+
import { useForwardPropsEmits } from 'reka-ui'
|
|
90
|
+
import { Calendar as SingleCalendar, RangeCalendar } from 'reka-ui/namespaced'
|
|
91
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
92
|
+
import { useLocale } from '../composables/useLocale'
|
|
93
|
+
import icons from '../dictionary/icons'
|
|
94
|
+
import B24Button from './Button.vue'
|
|
95
|
+
|
|
96
|
+
const props = withDefaults(defineProps<CalendarProps<R, M>>(), {
|
|
97
|
+
fixedWeeks: true,
|
|
98
|
+
monthControls: true,
|
|
99
|
+
yearControls: true
|
|
100
|
+
})
|
|
101
|
+
const emits = defineEmits<CalendarEmits<R, M>>()
|
|
102
|
+
defineSlots<CalendarSlots>()
|
|
103
|
+
|
|
104
|
+
const { code: locale, dir, t } = useLocale()
|
|
105
|
+
|
|
106
|
+
const rootProps = useForwardPropsEmits(reactiveOmit(props, 'range', 'modelValue', 'defaultValue', 'color', 'size', 'monthControls', 'yearControls', 'class', 'b24ui'), emits)
|
|
107
|
+
|
|
108
|
+
const nextYearIcon = computed(() => props.nextYearIcon || (dir.value === 'rtl' ? icons.chevronDoubleLeft : icons.chevronDoubleRight))
|
|
109
|
+
const nextMonthIcon = computed(() => props.nextMonthIcon || (dir.value === 'rtl' ? icons.chevronLeft : icons.chevronRight))
|
|
110
|
+
const prevYearIcon = computed(() => props.prevYearIcon || (dir.value === 'rtl' ? icons.chevronDoubleRight : icons.chevronDoubleLeft))
|
|
111
|
+
const prevMonthIcon = computed(() => props.prevMonthIcon || (dir.value === 'rtl' ? icons.chevronRight : icons.chevronLeft))
|
|
112
|
+
|
|
113
|
+
const b24ui = computed(() => calendar({
|
|
114
|
+
color: props.color,
|
|
115
|
+
size: props.size
|
|
116
|
+
}))
|
|
117
|
+
|
|
118
|
+
function paginateYear(date: DateValue, sign: -1 | 1) {
|
|
119
|
+
if (sign === -1) {
|
|
120
|
+
return date.subtract({ years: 1 })
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return date.add({ years: 1 })
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const Calendar = computed(() => props.range ? RangeCalendar : SingleCalendar)
|
|
127
|
+
|
|
128
|
+
const btnSize = computed(() => {
|
|
129
|
+
switch (props.size) {
|
|
130
|
+
case 'lg': return 'sm'
|
|
131
|
+
default: return 'xs'
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
</script>
|
|
135
|
+
|
|
136
|
+
<template>
|
|
137
|
+
<Calendar.Root
|
|
138
|
+
v-slot="{ weekDays, grid }"
|
|
139
|
+
v-bind="rootProps"
|
|
140
|
+
:model-value="(modelValue as CalendarModelValue<true & false>)"
|
|
141
|
+
:default-value="(defaultValue as CalendarModelValue<true & false>)"
|
|
142
|
+
:locale="locale"
|
|
143
|
+
:dir="dir"
|
|
144
|
+
:class="b24ui.root({ class: [props.class, props.b24ui?.root] })"
|
|
145
|
+
>
|
|
146
|
+
<Calendar.Header :class="b24ui.header({ class: props.b24ui?.header })">
|
|
147
|
+
<Calendar.Prev v-if="props.yearControls" :prev-page="(date: DateValue) => paginateYear(date, -1)" :aria-label="t('calendar.prevYear')" as-child>
|
|
148
|
+
<B24Button :icon="prevYearIcon" :size="btnSize" color="link" />
|
|
149
|
+
</Calendar.Prev>
|
|
150
|
+
<Calendar.Prev v-if="props.monthControls" :aria-label="t('calendar.prevMonth')" as-child>
|
|
151
|
+
<B24Button :icon="prevMonthIcon" :size="btnSize" color="link" />
|
|
152
|
+
</Calendar.Prev>
|
|
153
|
+
<Calendar.Heading v-slot="{ headingValue }" :class="b24ui.heading({ class: props.b24ui?.heading })">
|
|
154
|
+
<slot name="heading" :value="headingValue">
|
|
155
|
+
{{ headingValue }}
|
|
156
|
+
</slot>
|
|
157
|
+
</Calendar.Heading>
|
|
158
|
+
<Calendar.Next v-if="props.monthControls" :aria-label="t('calendar.nextMonth')" as-child>
|
|
159
|
+
<B24Button :icon="nextMonthIcon" :size="btnSize" color="link" />
|
|
160
|
+
</Calendar.Next>
|
|
161
|
+
<Calendar.Next v-if="props.yearControls" :next-page="(date: DateValue) => paginateYear(date, 1)" :aria-label="t('calendar.nextYear')" as-child>
|
|
162
|
+
<B24Button :icon="nextYearIcon" :size="btnSize" color="link" />
|
|
163
|
+
</Calendar.Next>
|
|
164
|
+
</Calendar.Header>
|
|
165
|
+
<div :class="b24ui.body({ class: props.b24ui?.body })">
|
|
166
|
+
<Calendar.Grid
|
|
167
|
+
v-for="month in grid"
|
|
168
|
+
:key="month.value.toString()"
|
|
169
|
+
:class="b24ui.grid({ class: props.b24ui?.grid })"
|
|
170
|
+
>
|
|
171
|
+
<Calendar.GridHead>
|
|
172
|
+
<Calendar.GridRow :class="b24ui.gridWeekDaysRow({ class: props.b24ui?.gridWeekDaysRow })">
|
|
173
|
+
<Calendar.HeadCell
|
|
174
|
+
v-for="day in weekDays"
|
|
175
|
+
:key="day"
|
|
176
|
+
:class="b24ui.headCell({ class: props.b24ui?.headCell })"
|
|
177
|
+
>
|
|
178
|
+
<slot name="week-day" :day="day">
|
|
179
|
+
{{ day }}
|
|
180
|
+
</slot>
|
|
181
|
+
</Calendar.HeadCell>
|
|
182
|
+
</Calendar.GridRow>
|
|
183
|
+
</Calendar.GridHead>
|
|
184
|
+
<Calendar.GridBody :class="b24ui.gridBody({ class: props.b24ui?.gridBody })">
|
|
185
|
+
<Calendar.GridRow
|
|
186
|
+
v-for="(weekDates, index) in month.rows"
|
|
187
|
+
:key="`weekDate-${index}`"
|
|
188
|
+
:class="b24ui.gridRow({ class: props.b24ui?.gridRow })"
|
|
189
|
+
>
|
|
190
|
+
<Calendar.Cell
|
|
191
|
+
v-for="weekDate in weekDates"
|
|
192
|
+
:key="weekDate.toString()"
|
|
193
|
+
:date="weekDate"
|
|
194
|
+
:class="b24ui.cell({ class: props.b24ui?.cell })"
|
|
195
|
+
>
|
|
196
|
+
<Calendar.CellTrigger
|
|
197
|
+
:day="weekDate"
|
|
198
|
+
:month="month.value"
|
|
199
|
+
:class="b24ui.cellTrigger({ class: props.b24ui?.cellTrigger })"
|
|
200
|
+
>
|
|
201
|
+
<slot name="day" :day="weekDate">
|
|
202
|
+
{{ weekDate.day }}
|
|
203
|
+
</slot>
|
|
204
|
+
</Calendar.CellTrigger>
|
|
205
|
+
</Calendar.Cell>
|
|
206
|
+
</Calendar.GridRow>
|
|
207
|
+
</Calendar.GridBody>
|
|
208
|
+
</Calendar.Grid>
|
|
209
|
+
</div>
|
|
210
|
+
</Calendar.Root>
|
|
211
|
+
</template>
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default icons
|
|
3
|
+
* ---
|
|
4
|
+
* @link https://bitrix24.github.io/b24icons/
|
|
5
|
+
*/
|
|
1
6
|
declare const _default: {
|
|
2
7
|
arrowLeft: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}, any, {}>;
|
|
3
8
|
arrowRight: import("vue").FunctionalComponent<import("vue").HTMLAttributes & import("vue").VNodeProps, {}, any, {}>;
|
|
@@ -6,6 +6,7 @@ import ChevronDownIcon from "@bitrix24/b24icons-vue/actions/ChevronDownIcon";
|
|
|
6
6
|
import ChevronToTheLeftIcon from "@bitrix24/b24icons-vue/actions/ChevronToTheLeftIcon";
|
|
7
7
|
import ChevronToTheRightIcon from "@bitrix24/b24icons-vue/actions/ChevronToTheRightIcon";
|
|
8
8
|
import DoubleShevronsRightIcon from "@bitrix24/b24icons-vue/actions/DoubleShevronsRightIcon";
|
|
9
|
+
import DoubleShevronsLeftIcon from "@bitrix24/b24icons-vue/actions/DoubleShevronsLeftIcon";
|
|
9
10
|
import Cross30Icon from "@bitrix24/b24icons-vue/actions/Cross30Icon";
|
|
10
11
|
import DotsIcon from "@bitrix24/b24icons-vue/button/DotsIcon";
|
|
11
12
|
import OpenIn50Icon from "@bitrix24/b24icons-vue/actions/OpenIn50Icon";
|
|
@@ -18,7 +19,7 @@ export default {
|
|
|
18
19
|
arrowLeft: ArrowToTheLeftIcon,
|
|
19
20
|
arrowRight: ArrowToTheRightIcon,
|
|
20
21
|
check: CheckIcon,
|
|
21
|
-
chevronDoubleLeft:
|
|
22
|
+
chevronDoubleLeft: DoubleShevronsLeftIcon,
|
|
22
23
|
chevronDoubleRight: DoubleShevronsRightIcon,
|
|
23
24
|
chevronDown: ChevronDownIcon,
|
|
24
25
|
chevronLeft: ChevronToTheLeftIcon,
|
|
@@ -2,6 +2,7 @@ import { defineLocale } from "../composables/defineLocale.js";
|
|
|
2
2
|
export default defineLocale({
|
|
3
3
|
name: "\u65E5\u672C\u8A9E",
|
|
4
4
|
code: "ja",
|
|
5
|
+
locale: "ja",
|
|
5
6
|
messages: {
|
|
6
7
|
inputMenu: {
|
|
7
8
|
noMatch: "\u4E00\u81F4\u3059\u308B\u30C7\u30FC\u30BF\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
@@ -2,6 +2,7 @@ import { defineLocale } from "../composables/defineLocale.js";
|
|
|
2
2
|
export default defineLocale({
|
|
3
3
|
name: "\u049A\u0430\u0437\u0430\u049B\u0448\u0430",
|
|
4
4
|
code: "kz",
|
|
5
|
+
locale: "kk",
|
|
5
6
|
messages: {
|
|
6
7
|
inputMenu: {
|
|
7
8
|
noMatch: "\u0421\u04D9\u0439\u043A\u0435\u0441 \u0434\u0435\u0440\u0435\u043A\u0442\u0435\u0440 \u0436\u043E\u049B",
|
|
@@ -2,6 +2,7 @@ import { defineLocale } from "../composables/defineLocale.js";
|
|
|
2
2
|
export default defineLocale({
|
|
3
3
|
name: "\u0420\u0443\u0441\u0441\u043A\u0438\u0439",
|
|
4
4
|
code: "ru",
|
|
5
|
+
locale: "ru",
|
|
5
6
|
messages: {
|
|
6
7
|
inputMenu: {
|
|
7
8
|
noMatch: "\u0421\u043E\u0432\u043F\u0430\u0434\u0435\u043D\u0438\u0439 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E",
|
|
@@ -2,6 +2,7 @@ import { defineLocale } from "../composables/defineLocale.js";
|
|
|
2
2
|
export default defineLocale({
|
|
3
3
|
name: "\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22",
|
|
4
4
|
code: "th",
|
|
5
|
+
locale: "th",
|
|
5
6
|
messages: {
|
|
6
7
|
inputMenu: {
|
|
7
8
|
noMatch: "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E19",
|
|
@@ -2,6 +2,7 @@ import { defineLocale } from "../composables/defineLocale.js";
|
|
|
2
2
|
export default defineLocale({
|
|
3
3
|
name: "\u0423\u043A\u0440\u0430\u0457\u043D\u0441\u044C\u043A\u0430",
|
|
4
4
|
code: "ua",
|
|
5
|
+
locale: "uk",
|
|
5
6
|
messages: {
|
|
6
7
|
inputMenu: {
|
|
7
8
|
noMatch: "\u0417\u0431\u0456\u0433\u0456\u0432 \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E",
|
|
@@ -6,6 +6,7 @@ export * from '../components/AvatarGroup.vue';
|
|
|
6
6
|
export * from '../components/Badge.vue';
|
|
7
7
|
export * from '../components/Button.vue';
|
|
8
8
|
export * from '../components/ButtonGroup.vue';
|
|
9
|
+
export * from '../components/Calendar.vue';
|
|
9
10
|
export * from '../components/Checkbox.vue';
|
|
10
11
|
export * from '../components/Chip.vue';
|
|
11
12
|
export * from '../components/Container.vue';
|
|
@@ -6,6 +6,7 @@ export * from "../components/AvatarGroup.vue";
|
|
|
6
6
|
export * from "../components/Badge.vue";
|
|
7
7
|
export * from "../components/Button.vue";
|
|
8
8
|
export * from "../components/ButtonGroup.vue";
|
|
9
|
+
export * from "../components/Calendar.vue";
|
|
9
10
|
export * from "../components/Checkbox.vue";
|
|
10
11
|
export * from "../components/Chip.vue";
|
|
11
12
|
export * from "../components/Container.vue";
|
|
@@ -1277,6 +1277,118 @@ const button = {
|
|
|
1277
1277
|
}
|
|
1278
1278
|
};
|
|
1279
1279
|
|
|
1280
|
+
const calendar = {
|
|
1281
|
+
slots: {
|
|
1282
|
+
root: "font-b24-system w-full",
|
|
1283
|
+
header: "flex items-center justify-between",
|
|
1284
|
+
body: "flex flex-col space-y-4 pt-4 sm:flex-row sm:space-x-4 sm:space-y-0",
|
|
1285
|
+
heading: "text-center font-semibold truncate mx-auto",
|
|
1286
|
+
grid: "w-full border-collapse select-none space-y-1 focus:outline-none",
|
|
1287
|
+
gridRow: "grid grid-cols-7",
|
|
1288
|
+
gridWeekDaysRow: "mb-1 grid w-full grid-cols-7",
|
|
1289
|
+
gridBody: "grid",
|
|
1290
|
+
headCell: "font-normal text-base-500 dark:text-base-500",
|
|
1291
|
+
cell: "relative text-center cursor-pointer aria-disabled:cursor-not-allowed",
|
|
1292
|
+
cellTrigger: [
|
|
1293
|
+
"m-0.5 relative",
|
|
1294
|
+
"flex items-center justify-center",
|
|
1295
|
+
"rounded-full whitespace-nowrap",
|
|
1296
|
+
"focus-visible:ring-2 focus:outline-none",
|
|
1297
|
+
"data-disabled:text-base-500 dark:data-disabled:text-base-600",
|
|
1298
|
+
"data-unavailable:text-base-500 dark:data-unavailable:text-base-600",
|
|
1299
|
+
"data-outside-view:text-base-500 dark:data-outside-view:text-base-600",
|
|
1300
|
+
"data-[selected]:text-white dark:data-[selected]:text-base-100",
|
|
1301
|
+
"data-unavailable:line-through",
|
|
1302
|
+
"data-unavailable:pointer-events-none",
|
|
1303
|
+
"data-today:font-semibold",
|
|
1304
|
+
"transition"
|
|
1305
|
+
].join(" ")
|
|
1306
|
+
},
|
|
1307
|
+
variants: {
|
|
1308
|
+
color: {
|
|
1309
|
+
default: {
|
|
1310
|
+
cellTrigger: [
|
|
1311
|
+
"focus-visible:ring-base-300 data-[selected]:bg-base-500 data-today:not-data-[selected]:text-blue-500 data-[highlighted]:bg-base-500/20 hover:not-data-[disabled]:not-data-[selected]:bg-base-500/20",
|
|
1312
|
+
"dark:focus-visible:ring-base-800 dark:data-[selected]:bg-base-800 dark:data-today:not-data-[selected]:text-blue-600 dark:data-[highlighted]:bg-base-800/20 dark:hover:not-data-[disabled]:not-data-[selected]:bg-base-800/20"
|
|
1313
|
+
].join(" ")
|
|
1314
|
+
},
|
|
1315
|
+
danger: {
|
|
1316
|
+
cellTrigger: [
|
|
1317
|
+
"focus-visible:ring-red-300 data-[selected]:bg-red-500 data-today:not-data-[selected]:text-red-500 data-[highlighted]:bg-red-500/20 hover:not-data-[disabled]:not-data-[selected]:bg-red-500/20",
|
|
1318
|
+
"dark:focus-visible:ring-red-800 dark:data-[selected]:bg-red-500 dark:data-today:not-data-[selected]:text-red-600 dark:data-[highlighted]:bg-red-500/20 dark:hover:not-data-[disabled]:not-data-[selected]:bg-red-500/20"
|
|
1319
|
+
].join(" ")
|
|
1320
|
+
},
|
|
1321
|
+
success: {
|
|
1322
|
+
cellTrigger: [
|
|
1323
|
+
"focus-visible:ring-green-300 data-[selected]:bg-green-500 data-today:not-data-[selected]:text-green-500 data-[highlighted]:bg-green-500/20 hover:not-data-[disabled]:not-data-[selected]:bg-green-500/20",
|
|
1324
|
+
"dark:focus-visible:ring-green-800 dark:data-[selected]:bg-green-500 dark:data-today:not-data-[selected]:text-green-600 dark:data-[highlighted]:bg-green-500/20 dark:hover:not-data-[disabled]:not-data-[selected]:bg-green-500/20"
|
|
1325
|
+
].join(" ")
|
|
1326
|
+
},
|
|
1327
|
+
warning: {
|
|
1328
|
+
cellTrigger: [
|
|
1329
|
+
"focus-visible:ring-orange-300 data-[selected]:bg-orange-500 data-today:not-data-[selected]:text-orange-500 data-[highlighted]:bg-orange-500/20 hover:not-data-[disabled]:not-data-[selected]:bg-orange-500/20",
|
|
1330
|
+
"dark:focus-visible:ring-orange-800 dark:data-[selected]:bg-orange-500 dark:data-today:not-data-[selected]:text-orange-600 dark:data-[highlighted]:bg-orange-500/20 dark:hover:not-data-[disabled]:not-data-[selected]:bg-orange-500/20"
|
|
1331
|
+
].join(" ")
|
|
1332
|
+
},
|
|
1333
|
+
primary: {
|
|
1334
|
+
cellTrigger: [
|
|
1335
|
+
"focus-visible:ring-blue-300 data-[selected]:bg-blue-500 data-today:not-data-[selected]:text-blue-500 data-[highlighted]:bg-blue-500/20 hover:not-data-[disabled]:not-data-[selected]:bg-blue-500/20",
|
|
1336
|
+
"dark:focus-visible:ring-blue-800 dark:data-[selected]:bg-blue-500 dark:data-today:not-data-[selected]:text-blue-600 dark:data-[highlighted]:bg-blue-500/20 dark:hover:not-data-[disabled]:not-data-[selected]:bg-blue-500/20"
|
|
1337
|
+
].join(" ")
|
|
1338
|
+
},
|
|
1339
|
+
secondary: {
|
|
1340
|
+
cellTrigger: [
|
|
1341
|
+
"focus-visible:ring-cyan-300 data-[selected]:bg-cyan-500 data-today:not-data-[selected]:text-cyan-500 data-[highlighted]:bg-cyan-500/20 hover:not-data-[disabled]:not-data-[selected]:bg-cyan-500/20",
|
|
1342
|
+
"dark:focus-visible:ring-cyan-800 dark:data-[selected]:bg-cyan-500 dark:data-today:not-data-[selected]:text-cyan-600 dark:data-[highlighted]:bg-cyan-500/20 dark:hover:not-data-[disabled]:not-data-[selected]:bg-cyan-500/20"
|
|
1343
|
+
].join(" ")
|
|
1344
|
+
},
|
|
1345
|
+
collab: {
|
|
1346
|
+
cellTrigger: [
|
|
1347
|
+
"focus-visible:ring-collab-300 data-[selected]:bg-collab-500 data-today:not-data-[selected]:text-collab-500 data-[highlighted]:bg-collab-500/20 hover:not-data-[disabled]:not-data-[selected]:bg-collab-500/20",
|
|
1348
|
+
"dark:focus-visible:ring-collab-800 dark:data-[selected]:bg-collab-500 dark:data-today:not-data-[selected]:text-collab-600 dark:data-[highlighted]:bg-collab-500/20 dark:hover:not-data-[disabled]:not-data-[selected]:bg-collab-500/20"
|
|
1349
|
+
].join(" ")
|
|
1350
|
+
},
|
|
1351
|
+
ai: {
|
|
1352
|
+
cellTrigger: [
|
|
1353
|
+
"focus-visible:ring-ai-300 data-[selected]:bg-ai-500 data-today:not-data-[selected]:text-ai-500 data-[highlighted]:bg-ai-500/20 hover:not-data-[disabled]:not-data-[selected]:bg-ai-500/20",
|
|
1354
|
+
"dark:focus-visible:ring-ai-800 dark:data-[selected]:bg-ai-500 dark:data-today:not-data-[selected]:text-ai-600 dark:data-[highlighted]:bg-ai-500/20 dark:hover:not-data-[disabled]:not-data-[selected]:bg-ai-500/20"
|
|
1355
|
+
].join(" ")
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
size: {
|
|
1359
|
+
xs: {
|
|
1360
|
+
heading: "text-md",
|
|
1361
|
+
cell: "text-sm",
|
|
1362
|
+
headCell: "text-[10px]",
|
|
1363
|
+
cellTrigger: "size-7",
|
|
1364
|
+
body: "space-y-2 pt-2"
|
|
1365
|
+
},
|
|
1366
|
+
sm: {
|
|
1367
|
+
heading: "text-md",
|
|
1368
|
+
headCell: "text-sm",
|
|
1369
|
+
cell: "text-sm",
|
|
1370
|
+
cellTrigger: "size-7"
|
|
1371
|
+
},
|
|
1372
|
+
md: {
|
|
1373
|
+
heading: "text-lg",
|
|
1374
|
+
headCell: "text-md",
|
|
1375
|
+
cell: "text-md",
|
|
1376
|
+
cellTrigger: "size-8"
|
|
1377
|
+
},
|
|
1378
|
+
lg: {
|
|
1379
|
+
heading: "text-2xl",
|
|
1380
|
+
headCell: "text-lg",
|
|
1381
|
+
cell: "text-lg",
|
|
1382
|
+
cellTrigger: "size-9 text-lg"
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
defaultVariants: {
|
|
1387
|
+
size: "md",
|
|
1388
|
+
color: "primary"
|
|
1389
|
+
}
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1280
1392
|
const checkbox = {
|
|
1281
1393
|
slots: {
|
|
1282
1394
|
root: "relative flex items-start",
|
|
@@ -5294,6 +5406,7 @@ const theme = {
|
|
|
5294
5406
|
badge: badge,
|
|
5295
5407
|
button: button,
|
|
5296
5408
|
buttonGroup: buttonGroup,
|
|
5409
|
+
calendar: calendar,
|
|
5297
5410
|
checkbox: checkbox,
|
|
5298
5411
|
chip: chip,
|
|
5299
5412
|
container: container,
|