@soybeanjs/ui 0.15.5 → 0.16.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/dist/components/autocomplete/variants.js +1 -1
- package/dist/components/calendar/calendar.js +1 -0
- package/dist/components/calendar/calendar.vue.d.ts +24 -0
- package/dist/components/calendar/index.d.ts +4 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/calendar/types.d.ts +13 -0
- package/dist/components/calendar/variants.js +1 -0
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/types.d.ts +2 -10
- package/dist/components/carousel/carousel.vue.d.ts +12 -1
- package/dist/components/carousel/index.d.ts +3 -3
- package/dist/components/color-picker/color-picker.vue.d.ts +2 -2
- package/dist/components/date-field/date-field.js +1 -0
- package/dist/components/date-field/date-field.vue.d.ts +15 -0
- package/dist/components/date-field/index.d.ts +4 -0
- package/dist/components/date-field/index.js +1 -0
- package/dist/components/date-field/types.d.ts +13 -0
- package/dist/components/date-field/variants.js +1 -0
- package/dist/components/date-picker/date-picker.js +1 -0
- package/dist/components/date-picker/date-picker.vue.d.ts +24 -0
- package/dist/components/date-picker/index.d.ts +4 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-picker/types.d.ts +24 -0
- package/dist/components/date-picker/variants.js +1 -0
- package/dist/components/date-range-field/date-range-field.js +1 -0
- package/dist/components/date-range-field/date-range-field.vue.d.ts +29 -0
- package/dist/components/date-range-field/index.d.ts +4 -0
- package/dist/components/date-range-field/index.js +1 -0
- package/dist/components/date-range-field/types.d.ts +31 -0
- package/dist/components/date-range-field/variants.js +1 -0
- package/dist/components/date-range-picker/date-range-picker.js +1 -0
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +29 -0
- package/dist/components/date-range-picker/index.d.ts +4 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/date-range-picker/types.d.ts +31 -0
- package/dist/components/date-range-picker/variants.js +1 -0
- package/dist/components/month-picker/index.d.ts +4 -0
- package/dist/components/month-picker/index.js +1 -0
- package/dist/components/month-picker/month-picker.js +1 -0
- package/dist/components/month-picker/month-picker.vue.d.ts +24 -0
- package/dist/components/month-picker/types.d.ts +44 -0
- package/dist/components/month-picker/variants.js +1 -0
- package/dist/components/month-range-picker/index.d.ts +4 -0
- package/dist/components/month-range-picker/index.js +1 -0
- package/dist/components/month-range-picker/month-range-picker.js +1 -0
- package/dist/components/month-range-picker/month-range-picker.vue.d.ts +29 -0
- package/dist/components/month-range-picker/types.d.ts +47 -0
- package/dist/components/month-range-picker/variants.js +1 -0
- package/dist/components/popconfirm/popconfirm.vue.d.ts +1 -1
- package/dist/components/range-calendar/index.d.ts +4 -0
- package/dist/components/range-calendar/index.js +1 -0
- package/dist/components/range-calendar/range-calendar.js +1 -0
- package/dist/components/range-calendar/range-calendar.vue.d.ts +25 -0
- package/dist/components/range-calendar/types.d.ts +62 -0
- package/dist/components/range-calendar/variants.js +1 -0
- package/dist/components/time-field/index.d.ts +4 -0
- package/dist/components/time-field/index.js +1 -0
- package/dist/components/time-field/time-field.js +1 -0
- package/dist/components/time-field/time-field.vue.d.ts +22 -0
- package/dist/components/time-field/types.d.ts +25 -0
- package/dist/components/time-field/variants.js +1 -0
- package/dist/components/time-picker/index.d.ts +4 -0
- package/dist/components/time-picker/index.js +1 -0
- package/dist/components/time-picker/time-picker.js +1 -0
- package/dist/components/time-picker/time-picker.vue.d.ts +24 -0
- package/dist/components/time-picker/types.d.ts +35 -0
- package/dist/components/time-picker/variants.js +1 -0
- package/dist/components/time-range-field/index.d.ts +4 -0
- package/dist/components/time-range-field/index.js +1 -0
- package/dist/components/time-range-field/time-range-field.js +1 -0
- package/dist/components/time-range-field/time-range-field.vue.d.ts +28 -0
- package/dist/components/time-range-field/types.d.ts +31 -0
- package/dist/components/time-range-field/variants.js +1 -0
- package/dist/components/time-range-picker/index.d.ts +4 -0
- package/dist/components/time-range-picker/index.js +1 -0
- package/dist/components/time-range-picker/time-range-picker.js +1 -0
- package/dist/components/time-range-picker/time-range-picker.vue.d.ts +28 -0
- package/dist/components/time-range-picker/types.d.ts +38 -0
- package/dist/components/time-range-picker/variants.js +1 -0
- package/dist/components/year-picker/index.d.ts +4 -0
- package/dist/components/year-picker/index.js +1 -0
- package/dist/components/year-picker/types.d.ts +44 -0
- package/dist/components/year-picker/variants.js +1 -0
- package/dist/components/year-picker/year-picker.js +1 -0
- package/dist/components/year-picker/year-picker.vue.d.ts +24 -0
- package/dist/components/year-range-picker/index.d.ts +4 -0
- package/dist/components/year-range-picker/index.js +1 -0
- package/dist/components/year-range-picker/types.d.ts +48 -0
- package/dist/components/year-range-picker/variants.js +1 -0
- package/dist/components/year-range-picker/year-range-picker.js +1 -0
- package/dist/components/year-range-picker/year-range-picker.vue.d.ts +29 -0
- package/dist/constants/components.d.ts +14 -0
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +138 -96
- package/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Alignment.d.ts +4 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Animations.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Axis.d.ts +16 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Counter.d.ts +9 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragHandler.d.ts +13 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragTracker.d.ts +4 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EmblaCarousel.d.ts +31 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Engine.d.ts +67 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventHandler.d.ts +29 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventStore.d.ts +10 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Limit.d.ts +13 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/NodeRects.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Options.d.ts +43 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/OptionsHandler.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/PercentOfView.d.ts +6 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Plugins.d.ts +20 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ResizeHandler.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBody.d.ts +14 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBounds.d.ts +8 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollContain.d.ts +4 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollLooper.d.ts +6 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollProgress.d.ts +6 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTarget.d.ts +12 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTo.d.ts +7 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideFocus.d.ts +10 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideLooper.d.ts +19 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideRegistry.d.ts +6 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesHandler.d.ts +11 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesInView.d.ts +9 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesToScroll.d.ts +7 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Translate.d.ts +8 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Vector1d.d.ts +9 -0
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/utils.d.ts +4 -0
- package/dist/styles.css +99 -27
- package/dist/theme/shared.js +1 -1
- package/package.json +11 -10
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MonthRangePickerProps, MonthRangePickerSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import * as _$_internationalized_date0 from "@internationalized/date";
|
|
4
|
+
import * as _$_soybeanjs_headless_date0 from "@soybeanjs/headless/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/month-range-picker/month-range-picker.vue.d.ts
|
|
7
|
+
type __VLS_Slots = MonthRangePickerSlots;
|
|
8
|
+
declare const __VLS_base: _$vue.DefineComponent<MonthRangePickerProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
9
|
+
"update:open": (open: boolean) => any;
|
|
10
|
+
"update:modelValue": (range: _$_soybeanjs_headless_date0.DateRange) => any;
|
|
11
|
+
"update:placeholder": (date: _$_internationalized_date0.DateValue) => any;
|
|
12
|
+
"update:startValue": (date: _$_internationalized_date0.DateValue | undefined) => any;
|
|
13
|
+
"update:endValue": (date: _$_internationalized_date0.DateValue | undefined) => any;
|
|
14
|
+
}, string, _$vue.PublicProps, Readonly<MonthRangePickerProps> & Readonly<{
|
|
15
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
16
|
+
"onUpdate:modelValue"?: ((range: _$_soybeanjs_headless_date0.DateRange) => any) | undefined;
|
|
17
|
+
"onUpdate:placeholder"?: ((date: _$_internationalized_date0.DateValue) => any) | undefined;
|
|
18
|
+
"onUpdate:startValue"?: ((date: _$_internationalized_date0.DateValue | undefined) => any) | undefined;
|
|
19
|
+
"onUpdate:endValue"?: ((date: _$_internationalized_date0.DateValue | undefined) => any) | undefined;
|
|
20
|
+
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { _default };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ClassValue } from "@soybeanjs/headless";
|
|
3
|
+
import { MonthRangePickerPopupProps, MonthRangePickerRootEmits, MonthRangePickerRootProps, MonthRangePickerTriggerProps, MonthRangePickerUi } from "@soybeanjs/headless/month-range-picker";
|
|
4
|
+
import { DateRange, DateValue } from "@soybeanjs/headless/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/month-range-picker/types.d.ts
|
|
7
|
+
interface MonthRangePickerProps extends /* @vue-ignore */MonthRangePickerRootProps {
|
|
8
|
+
class?: ClassValue;
|
|
9
|
+
size?: ThemeSize;
|
|
10
|
+
ui?: Partial<MonthRangePickerUi>;
|
|
11
|
+
triggerProps?: MonthRangePickerTriggerProps;
|
|
12
|
+
popupProps?: MonthRangePickerPopupProps;
|
|
13
|
+
}
|
|
14
|
+
type MonthRangePickerEmits = MonthRangePickerRootEmits;
|
|
15
|
+
interface MonthRangePickerSlots {
|
|
16
|
+
trigger?: (props: {
|
|
17
|
+
displayValue: string;
|
|
18
|
+
modelValue: DateRange;
|
|
19
|
+
open: boolean;
|
|
20
|
+
}) => any;
|
|
21
|
+
heading?: (props: {
|
|
22
|
+
headingValue: string;
|
|
23
|
+
}) => any;
|
|
24
|
+
prev?: (props: {
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
}) => any;
|
|
27
|
+
next?: (props: {
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
}) => any;
|
|
30
|
+
month?: (props: {
|
|
31
|
+
date: DateValue;
|
|
32
|
+
label: string;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
focused: boolean;
|
|
35
|
+
highlighted: boolean;
|
|
36
|
+
rangeEnd: boolean;
|
|
37
|
+
rangeStart: boolean;
|
|
38
|
+
selected: boolean;
|
|
39
|
+
}) => any;
|
|
40
|
+
default?: (props: {
|
|
41
|
+
displayValue: string;
|
|
42
|
+
modelValue: DateRange;
|
|
43
|
+
open: boolean;
|
|
44
|
+
}) => any;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { MonthRangePickerEmits, MonthRangePickerProps, MonthRangePickerSlots };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex w-full flex-col gap-2`,trigger:[`inline-flex w-full items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-0 text-start font-normal shadow-xs transition-[background-color,color,box-shadow]`,`hover:bg-accent/50 hover:text-accent-foreground`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`data-[disabled]:opacity-60 data-[disabled]:cursor-not-allowed data-[disabled]:pointer-events-none`,`data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground`],popup:[`z-50 overflow-hidden rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`],header:`mb-3 grid grid-cols-[auto_1fr_auto] items-center gap-1`,heading:`font-medium text-foreground text-center`,prev:[`inline-flex size-8 items-center justify-center rounded-md border border-transparent bg-transparent transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],next:[`inline-flex size-8 items-center justify-center rounded-md border border-transparent bg-transparent transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],grid:`grid grid-cols-3 gap-1`,cellTrigger:[`inline-flex h-9 cursor-pointer items-center justify-center rounded-md border border-transparent bg-transparent px-3 text-sm font-normal transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[selected]:bg-accent data-[selected]:text-foreground`,`data-[range-start]:bg-primary data-[range-start]:text-primary-foreground`,`data-[range-end]:bg-primary data-[range-end]:text-primary-foreground`,`data-[highlighted]:bg-accent/80 data-[highlighted]:text-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[focused]:ring-2 data-[focused]:ring-primary/20`]},variants:{size:{xs:{root:`text-2xs`,trigger:`h-6 px-2 text-2xs`,prev:`size-6 text-2xs`,next:`size-6 text-2xs`,cellTrigger:`h-7 px-2 text-2xs`},sm:{root:`text-xs`,trigger:`h-7 px-2.5 text-xs`,prev:`size-7 text-xs`,next:`size-7 text-xs`,cellTrigger:`h-8 px-2.5 text-xs`},md:{root:`text-sm`,trigger:`h-8 px-3 text-sm`,prev:`size-8 text-sm`,next:`size-8 text-sm`,cellTrigger:`h-9 px-3 text-sm`},lg:{root:`text-base`,trigger:`h-9 px-3.5 text-base`,prev:`size-9 text-base`,next:`size-9 text-base`,cellTrigger:`h-10 px-3.5 text-base`},xl:{root:`text-lg`,trigger:`h-10 px-4 text-lg`,prev:`size-10 text-lg`,next:`size-10 text-lg`,cellTrigger:`h-11 px-4 text-lg`},"2xl":{root:`text-xl`,trigger:`h-12 px-5 text-xl`,prev:`size-12 text-xl`,next:`size-12 text-xl`,cellTrigger:`h-12 px-5 text-xl`}}},defaultVariants:{size:`md`}});export{t as monthRangePickerVariants};
|
|
@@ -48,8 +48,8 @@ declare const __VLS_base: _$vue.DefineComponent<PopconfirmProps, {}, {}, {}, {},
|
|
|
48
48
|
open: boolean;
|
|
49
49
|
defaultOpen: boolean;
|
|
50
50
|
modal: boolean;
|
|
51
|
-
showIcon: boolean;
|
|
52
51
|
showArrow: boolean;
|
|
52
|
+
showIcon: boolean;
|
|
53
53
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
54
54
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
55
55
|
declare const _default: typeof __VLS_export;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RangeCalendarDaySlotProps, RangeCalendarEmits, RangeCalendarHeadCellSlotProps, RangeCalendarProps, RangeCalendarSlots } from "./types.js";
|
|
2
|
+
import { _default } from "./range-calendar.vue.js";
|
|
3
|
+
import { RangeCalendarCellProps as RangeCalendarCellProps$1, RangeCalendarCellTriggerProps as RangeCalendarCellTriggerProps$1, RangeCalendarGridBodyProps as RangeCalendarGridBodyProps$1, RangeCalendarGridHeadProps as RangeCalendarGridHeadProps$1, RangeCalendarGridProps as RangeCalendarGridProps$1, RangeCalendarGridRowProps as RangeCalendarGridRowProps$1, RangeCalendarHeadCellProps as RangeCalendarHeadCellProps$1, RangeCalendarHeaderProps as RangeCalendarHeaderProps$1, RangeCalendarHeadingProps as RangeCalendarHeadingProps$1, RangeCalendarNextProps as RangeCalendarNextProps$1, RangeCalendarPrevProps as RangeCalendarPrevProps$1, RangeCalendarRootEmits as RangeCalendarRootEmits$1, RangeCalendarRootProps as RangeCalendarRootProps$1, RangeCalendarUi as RangeCalendarUi$1, RangeCalendarUiSlot } from "@soybeanjs/headless/range-calendar";
|
|
4
|
+
export { type RangeCalendarCellProps$1 as RangeCalendarCellProps, type RangeCalendarCellTriggerProps$1 as RangeCalendarCellTriggerProps, type RangeCalendarGridBodyProps$1 as RangeCalendarGridBodyProps, type RangeCalendarGridHeadProps$1 as RangeCalendarGridHeadProps, type RangeCalendarGridProps$1 as RangeCalendarGridProps, type RangeCalendarGridRowProps$1 as RangeCalendarGridRowProps, type RangeCalendarHeadCellProps$1 as RangeCalendarHeadCellProps, type RangeCalendarHeaderProps$1 as RangeCalendarHeaderProps, type RangeCalendarHeadingProps$1 as RangeCalendarHeadingProps, type RangeCalendarNextProps$1 as RangeCalendarNextProps, type RangeCalendarPrevProps$1 as RangeCalendarPrevProps, type RangeCalendarRootEmits$1 as RangeCalendarRootEmits, type RangeCalendarRootProps$1 as RangeCalendarRootProps, type RangeCalendarUi$1 as RangeCalendarUi, type RangeCalendarUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./range-calendar.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{rangeCalendarVariants as n}from"./variants.js";import{computed as r,createBlock as i,createTextVNode as a,createVNode as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeProps as u,openBlock as d,renderSlot as f,toDisplayString as p,toHandlers as m,unref as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{RangeCalendarCompact as y,provideRangeCalendarUi as b}from"@soybeanjs/headless/range-calendar";const x=s({name:`SRangeCalendar`,__name:`range-calendar`,props:{class:{},size:{},ui:{},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},defaultValue:{},defaultPlaceholder:{},placeholder:{},modelValue:{},allowNonContiguousRanges:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},maximumDays:{},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},isDateHighlightable:{type:Function},dir:{},nextPage:{type:Function},prevPage:{type:Function},disableDaysOutsideCurrentView:{type:Boolean},fixedDate:{},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`update:placeholder`,`update:startValue`],setup(s,{emit:x}){let S=s,C=x,w=v(S,[`cellProps`,`cellTriggerProps`,`class`,`gridBodyProps`,`gridHeadProps`,`gridProps`,`gridRowProps`,`headCellProps`,`headerProps`,`headingProps`,`nextProps`,`prevProps`,`size`,`ui`]),T=_(C);return b(r(()=>e(n({size:S.size}),S.ui,{root:S.class}))),(e,n)=>(d(),i(h(y),l({...h(w),cellProps:s.cellProps,cellTriggerProps:s.cellTriggerProps,gridBodyProps:s.gridBodyProps,gridHeadProps:s.gridHeadProps,gridProps:s.gridProps,gridRowProps:s.gridRowProps,headCellProps:s.headCellProps,headerProps:s.headerProps,headingProps:s.headingProps,nextProps:s.nextProps,prevProps:s.prevProps},m(h(T))),{prev:g(n=>[f(e.$slots,`prev`,u(c(n)),()=>[o(t,{class:`size-4 rtl:rotate-180`,icon:`lucide:chevron-left`})])]),heading:g(t=>[f(e.$slots,`heading`,u(c(t)),()=>[a(p(t.headingValue),1)])]),next:g(n=>[f(e.$slots,`next`,u(c(n)),()=>[o(t,{class:`size-4 rtl:rotate-180`,icon:`lucide:chevron-right`})])]),"head-cell":g(t=>[f(e.$slots,`head-cell`,u(c(t)),()=>[a(p(t.label),1)])]),day:g(t=>[f(e.$slots,`day`,u(c(t)),()=>[a(p(t.dayValue),1)])]),default:g(t=>[f(e.$slots,`default`,u(c(t)))]),_:3},16))}});export{x as default};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { RangeCalendarProps, RangeCalendarSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import * as _$_internationalized_date0 from "@internationalized/date";
|
|
4
|
+
import * as _$_soybeanjs_headless_date0 from "@soybeanjs/headless/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/range-calendar/range-calendar.vue.d.ts
|
|
7
|
+
type __VLS_Slots = RangeCalendarSlots;
|
|
8
|
+
declare const __VLS_base: _$vue.DefineComponent<RangeCalendarProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (range: _$_soybeanjs_headless_date0.DateRange) => any;
|
|
10
|
+
"update:placeholder": (date: _$_internationalized_date0.DateValue) => any;
|
|
11
|
+
"update:startValue": (date: _$_internationalized_date0.DateValue | undefined) => any;
|
|
12
|
+
}, string, _$vue.PublicProps, Readonly<RangeCalendarProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((range: _$_soybeanjs_headless_date0.DateRange) => any) | undefined;
|
|
14
|
+
"onUpdate:placeholder"?: ((date: _$_internationalized_date0.DateValue) => any) | undefined;
|
|
15
|
+
"onUpdate:startValue"?: ((date: _$_internationalized_date0.DateValue | undefined) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { _default };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ClassValue } from "@soybeanjs/headless";
|
|
3
|
+
import { RangeCalendarCellProps, RangeCalendarCellTriggerProps, RangeCalendarGridBodyProps, RangeCalendarGridHeadProps, RangeCalendarGridProps, RangeCalendarGridRowProps, RangeCalendarHeadCellProps, RangeCalendarHeaderProps, RangeCalendarHeadingProps, RangeCalendarNextProps, RangeCalendarPrevProps, RangeCalendarRootEmits, RangeCalendarRootProps, RangeCalendarUi } from "@soybeanjs/headless/range-calendar";
|
|
4
|
+
import { DateValue } from "@internationalized/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/range-calendar/types.d.ts
|
|
7
|
+
interface RangeCalendarProps extends RangeCalendarRootProps {
|
|
8
|
+
class?: ClassValue;
|
|
9
|
+
size?: ThemeSize;
|
|
10
|
+
ui?: Partial<RangeCalendarUi>;
|
|
11
|
+
headerProps?: RangeCalendarHeaderProps;
|
|
12
|
+
headingProps?: RangeCalendarHeadingProps;
|
|
13
|
+
prevProps?: RangeCalendarPrevProps;
|
|
14
|
+
nextProps?: RangeCalendarNextProps;
|
|
15
|
+
gridProps?: RangeCalendarGridProps;
|
|
16
|
+
gridHeadProps?: RangeCalendarGridHeadProps;
|
|
17
|
+
gridBodyProps?: RangeCalendarGridBodyProps;
|
|
18
|
+
gridRowProps?: RangeCalendarGridRowProps;
|
|
19
|
+
headCellProps?: RangeCalendarHeadCellProps;
|
|
20
|
+
cellProps?: Omit<RangeCalendarCellProps, 'date'>;
|
|
21
|
+
cellTriggerProps?: Omit<RangeCalendarCellTriggerProps, 'day' | 'month'>;
|
|
22
|
+
}
|
|
23
|
+
type RangeCalendarEmits = RangeCalendarRootEmits;
|
|
24
|
+
interface RangeCalendarHeadCellSlotProps {
|
|
25
|
+
date: DateValue;
|
|
26
|
+
index: number;
|
|
27
|
+
label: string;
|
|
28
|
+
}
|
|
29
|
+
interface RangeCalendarDaySlotProps {
|
|
30
|
+
day: DateValue;
|
|
31
|
+
dayValue: string;
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
highlighted: boolean;
|
|
34
|
+
highlightedEnd: boolean;
|
|
35
|
+
highlightedStart: boolean;
|
|
36
|
+
month: DateValue;
|
|
37
|
+
outsideView: boolean;
|
|
38
|
+
outsideVisibleView: boolean;
|
|
39
|
+
selected: boolean;
|
|
40
|
+
selectionEnd: boolean;
|
|
41
|
+
selectionStart: boolean;
|
|
42
|
+
today: boolean;
|
|
43
|
+
unavailable: boolean;
|
|
44
|
+
}
|
|
45
|
+
type RangeCalendarSlots = {
|
|
46
|
+
heading?: (props: {
|
|
47
|
+
headingValue: string;
|
|
48
|
+
}) => any;
|
|
49
|
+
prev?: (props: {
|
|
50
|
+
disabled: boolean;
|
|
51
|
+
}) => any;
|
|
52
|
+
next?: (props: {
|
|
53
|
+
disabled: boolean;
|
|
54
|
+
}) => any;
|
|
55
|
+
'head-cell'?: (props: RangeCalendarHeadCellSlotProps) => any;
|
|
56
|
+
day?: (props: RangeCalendarDaySlotProps) => any;
|
|
57
|
+
default?: (props: {
|
|
58
|
+
modelValue: RangeCalendarRootProps['modelValue'] | undefined;
|
|
59
|
+
}) => any;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
export { RangeCalendarDaySlotProps, RangeCalendarEmits, RangeCalendarHeadCellSlotProps, RangeCalendarProps, RangeCalendarSlots };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex flex-col gap-4 p-3 text-sm`,header:`grid grid-cols-[auto_1fr_auto] items-center gap-1`,heading:`text-center font-medium`,prev:[`inline-flex h-8 w-8 items-center justify-center rounded-md border border-transparent bg-transparent text-foreground transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],next:[`inline-flex h-8 w-8 items-center justify-center rounded-md border border-transparent bg-transparent text-foreground transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],grid:`inline-table border-collapse me-4 last:me-0`,gridHead:``,gridBody:``,gridRow:``,headCell:`h-9 w-9 rounded-md p-0 text-center text-xs font-normal text-muted-foreground`,cell:[`h-9 w-9 p-0 text-center align-middle text-sm focus-within:relative focus-within:z-20`,`[&:has([data-selected])]:bg-accent first:[&:has([data-selected])]:rounded-s-md last:[&:has([data-selected])]:rounded-e-md`,`[&:has([data-selection-end])]:rounded-e-md [&:has([data-selection-start])]:rounded-s-md`],cellTrigger:[`inline-flex h-9 w-9 cursor-pointer items-center justify-center rounded-md p-0 text-sm font-normal transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`[&[data-today]:not([data-selected])]:bg-accent [&[data-today]:not([data-selected])]:text-accent-foreground`,`data-[selected]:text-foreground`,`data-[selection-start]:bg-primary data-[selection-start]:text-primary-foreground`,`data-[selection-end]:bg-primary data-[selection-end]:text-primary-foreground`,`[&[data-selection-start]:hover]:bg-primary data-[selection-start]:hover:text-primary-foreground data-[selection-start]:focus-visible:bg-primary data-[selection-start]:focus-visible:text-primary-foreground`,`[&[data-selection-end]:hover]:bg-primary data-[selection-end]:hover:text-primary-foreground data-[selection-end]:focus-visible:bg-primary data-[selection-end]:focus-visible:text-primary-foreground`,`data-[highlighted]:bg-accent/80 data-[highlighted]:text-foreground`,`hover:bg-accent hover:text-accent-foreground data-[outside-view]:text-muted-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:text-muted-foreground data-[disabled]:opacity-50`,`data-[unavailable]:line-through`]},variants:{size:{xs:{root:`gap-3 text-2xs`,heading:`text-xs`,prev:`h-6 w-6`,next:`h-6 w-6`,headCell:`h-7 w-7 text-3xs`,cell:`h-7 w-7`,cellTrigger:`h-7 w-7 text-2xs`},sm:{root:`gap-3.5 text-xs`,heading:`text-sm`,prev:`h-7 w-7`,next:`h-7 w-7`,headCell:`h-8 w-8 text-2xs`,cell:`h-8 w-8`,cellTrigger:`h-8 w-8 text-xs`},md:{root:`gap-4 text-sm`,heading:`text-sm`,prev:`h-8 w-8`,next:`h-8 w-8`,headCell:`h-9 w-9 text-xs`,cell:`h-9 w-9`,cellTrigger:`h-9 w-9 text-sm`},lg:{root:`gap-4.5 text-base`,heading:`text-base`,prev:`h-9 w-9`,next:`h-9 w-9`,headCell:`h-10 w-10 text-sm`,cell:`h-10 w-10`,cellTrigger:`h-10 w-10 text-base`},xl:{root:`gap-5 text-lg`,heading:`text-lg`,prev:`h-10 w-10`,next:`h-10 w-10`,headCell:`h-11 w-11 text-base`,cell:`h-11 w-11`,cellTrigger:`h-11 w-11 text-lg`},"2xl":{root:`gap-6 text-xl`,heading:`text-xl`,prev:`h-12 w-12`,next:`h-12 w-12`,headCell:`h-12 w-12 text-lg`,cell:`h-12 w-12`,cellTrigger:`h-12 w-12 text-xl`}}},defaultVariants:{size:`md`}});export{t as rangeCalendarVariants};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TimeFieldEmits, TimeFieldProps, TimeFieldSlotProps, TimeFieldSlots } from "./types.js";
|
|
2
|
+
import { _default } from "./time-field.vue.js";
|
|
3
|
+
import { TimeFieldInputProps as TimeFieldInputProps$1, TimeFieldRootEmits as TimeFieldRootEmits$1, TimeFieldRootProps as TimeFieldRootProps$1, TimeFieldUi as TimeFieldUi$1, TimeFieldUiSlot } from "@soybeanjs/headless/time-field";
|
|
4
|
+
export { type TimeFieldInputProps$1 as TimeFieldInputProps, type TimeFieldRootEmits$1 as TimeFieldRootEmits, type TimeFieldRootProps$1 as TimeFieldRootProps, type TimeFieldUi$1 as TimeFieldUi, type TimeFieldUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./time-field.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{timeFieldVariants as t}from"./variants.js";import{Fragment as n,computed as r,createBlock as i,createElementBlock as a,createTextVNode as o,defineComponent as s,mergeProps as c,normalizeProps as l,openBlock as u,renderList as d,renderSlot as f,toDisplayString as p,toHandlers as m,unref as h,withCtx as g}from"vue";import{useForwardListeners as _,useOmitProps as v}from"@soybeanjs/headless/composables";import{TimeFieldInput as y,TimeFieldRoot as b,provideTimeFieldUi as x}from"@soybeanjs/headless/time-field";const S=s({name:`STimeField`,__name:`time-field`,props:{class:{},size:{},ui:{},inputProps:{}},emits:[`update:modelValue`,`update:placeholder`],setup(s,{emit:S}){let C=s,w=_(S),T=v(C,[`class`,`size`,`ui`,`inputProps`]);return x(r(()=>e(t({size:C.size}),C.ui,{root:C.class}))),(e,t)=>(u(),i(h(b),c(h(T),m(h(w))),{default:g(t=>[e.$slots.default?f(e.$slots,`default`,l(c({key:0},t))):(u(!0),a(n,{key:1},d(t.segments,(e,t)=>(u(),i(h(y),c({key:`${e.part}-${t}`,part:e.part},{ref_for:!0},s.inputProps),{default:g(()=>[o(p(e.value),1)]),_:2},1040,[`part`]))),128))]),_:3},16))}});export{S as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { TimeFieldProps, TimeFieldSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import * as _$_soybeanjs_headless_date0 from "@soybeanjs/headless/date";
|
|
4
|
+
|
|
5
|
+
//#region src/components/time-field/time-field.vue.d.ts
|
|
6
|
+
type __VLS_Slots = TimeFieldSlots;
|
|
7
|
+
declare const __VLS_base: _$vue.DefineComponent<TimeFieldProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any;
|
|
9
|
+
"update:placeholder": (time: _$_soybeanjs_headless_date0.TimeValue) => any;
|
|
10
|
+
}, string, _$vue.PublicProps, Readonly<TimeFieldProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any) | undefined;
|
|
12
|
+
"onUpdate:placeholder"?: ((time: _$_soybeanjs_headless_date0.TimeValue) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { _default };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ClassValue } from "@soybeanjs/headless";
|
|
3
|
+
import { TimeFieldInputProps, TimeFieldRootEmits, TimeFieldRootProps, TimeFieldUi } from "@soybeanjs/headless/time-field";
|
|
4
|
+
|
|
5
|
+
//#region src/components/time-field/types.d.ts
|
|
6
|
+
interface TimeFieldSlotProps {
|
|
7
|
+
modelValue: TimeFieldRootProps['modelValue'];
|
|
8
|
+
segments: {
|
|
9
|
+
part: TimeFieldInputProps['part'];
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
isInvalid: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface TimeFieldProps extends /* @vue-ignore */TimeFieldRootProps {
|
|
15
|
+
class?: ClassValue;
|
|
16
|
+
size?: ThemeSize;
|
|
17
|
+
ui?: Partial<TimeFieldUi>;
|
|
18
|
+
inputProps?: Omit<TimeFieldInputProps, 'part'>;
|
|
19
|
+
}
|
|
20
|
+
type TimeFieldEmits = TimeFieldRootEmits;
|
|
21
|
+
interface TimeFieldSlots {
|
|
22
|
+
default?: (props: TimeFieldSlotProps) => any;
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { TimeFieldEmits, TimeFieldProps, TimeFieldSlotProps, TimeFieldSlots };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:[`group inline-flex w-full flex-wrap items-center rounded-md border border-input bg-background px-2.5 transition-all-150 gap-1.5`,`focus-within:outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[disabled]:opacity-60 data-[readonly]:bg-muted/40`,`data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive/20`],input:[`inline-flex min-w-5 items-center justify-center rounded-sm px-0.5 text-center outline-none`,`tabular-nums leading-none`,`data-[segment=literal]:min-w-0 data-[segment=literal]:px-0 data-[segment=literal]:text-muted-foreground`,`data-[segment=timeZoneName]:min-w-fit data-[segment=timeZoneName]:px-1 data-[segment=timeZoneName]:text-muted-foreground`,`data-[placeholder]:text-muted-foreground`,`focus-visible:bg-accent/60 focus-visible:ring-2 focus-visible:ring-primary/20`,`data-[disabled]:cursor-not-allowed data-[readonly]:cursor-default`]},variants:{size:{xs:{root:`min-h-6 px-1.5 text-2xs`,input:`min-h-4.5 min-w-4.5`},sm:{root:`min-h-7 px-2 text-xs`,input:`min-h-5 min-w-5`},md:{root:`min-h-8 px-2.5 text-sm`,input:`min-h-5.5 min-w-5.5`},lg:{root:`min-h-9 px-3 text-base`,input:`min-h-6 min-w-6`},xl:{root:`min-h-10 px-3.5 text-lg`,input:`min-h-6.5 min-w-6.5`},"2xl":{root:`min-h-12 px-4 text-xl`,input:`min-h-8 min-w-8`}}},defaultVariants:{size:`md`}});export{t as timeFieldVariants};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TimePickerEmits, TimePickerProps, TimePickerSlots } from "./types.js";
|
|
2
|
+
import { _default } from "./time-picker.vue.js";
|
|
3
|
+
import { TimePickerPopupProps as TimePickerPopupProps$1, TimePickerRootEmits as TimePickerRootEmits$1, TimePickerRootProps as TimePickerRootProps$1, TimePickerTriggerProps as TimePickerTriggerProps$1, TimePickerUi as TimePickerUi$1, TimePickerUiSlot } from "@soybeanjs/headless/time-picker";
|
|
4
|
+
export { type TimePickerPopupProps$1 as TimePickerPopupProps, type TimePickerRootEmits$1 as TimePickerRootEmits, type TimePickerRootProps$1 as TimePickerRootProps, type TimePickerTriggerProps$1 as TimePickerTriggerProps, type TimePickerUi$1 as TimePickerUi, type TimePickerUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./time-picker.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{timePickerVariants as n}from"./variants.js";import{computed as r,createBlock as i,createElementBlock as a,createTextVNode as o,createVNode as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeProps as d,openBlock as f,renderSlot as p,toDisplayString as m,toHandlers as h,unref as g,withCtx as _}from"vue";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{TimePickerPopup as b,TimePickerRoot as x,TimePickerTrigger as S,provideTimePickerUi as C}from"@soybeanjs/headless/time-picker";const w={key:0},T={key:1,class:`text-muted-foreground`},E=c({name:`STimePicker`,__name:`time-picker`,props:{class:{},size:{},ui:{},triggerProps:{},popupProps:{}},emits:[`update:modelValue`,`update:placeholder`,`update:open`],setup(c,{emit:E}){let D=c,O=v(E),k=y(D,[`class`,`size`,`ui`,`triggerProps`,`popupProps`]);return C(r(()=>e(n({size:D.size}),D.ui,{root:D.class}))),(e,n)=>(f(),i(g(x),u(g(k),h(g(O))),{default:_(n=>[s(g(S),d(l(c.triggerProps)),{default:_(()=>[p(e.$slots,`trigger`,{displayValue:n.displayValue,modelValue:n.modelValue,open:n.open},()=>[s(t,{class:`size-4`,icon:`lucide:clock-3`}),n.displayValue?(f(),a(`span`,w,m(n.displayValue),1)):(f(),a(`span`,T,`Pick a time`))])]),_:2},1040),s(g(b),d(l(c.popupProps)),{time:_(t=>[p(e.$slots,`time`,d(l(t)),()=>[o(m(t.label),1)])]),_:3},16),p(e.$slots,`default`,d(l(n)))]),_:3},16))}});export{E as default};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TimePickerProps, TimePickerSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import * as _$_soybeanjs_headless_date0 from "@soybeanjs/headless/date";
|
|
4
|
+
|
|
5
|
+
//#region src/components/time-picker/time-picker.vue.d.ts
|
|
6
|
+
type __VLS_Slots = TimePickerSlots;
|
|
7
|
+
declare const __VLS_base: _$vue.DefineComponent<TimePickerProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
8
|
+
"update:open": (open: boolean) => any;
|
|
9
|
+
"update:modelValue": (time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any;
|
|
10
|
+
"update:placeholder": (time: _$_soybeanjs_headless_date0.TimeValue) => any;
|
|
11
|
+
}, string, _$vue.PublicProps, Readonly<TimePickerProps> & Readonly<{
|
|
12
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
13
|
+
"onUpdate:modelValue"?: ((time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any) | undefined;
|
|
14
|
+
"onUpdate:placeholder"?: ((time: _$_soybeanjs_headless_date0.TimeValue) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
export { _default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ClassValue } from "@soybeanjs/headless";
|
|
3
|
+
import { TimePickerPopupProps, TimePickerRootEmits, TimePickerRootProps, TimePickerTriggerProps, TimePickerUi } from "@soybeanjs/headless/time-picker";
|
|
4
|
+
import { TimeValue } from "@soybeanjs/headless/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/time-picker/types.d.ts
|
|
7
|
+
interface TimePickerProps extends /* @vue-ignore */TimePickerRootProps {
|
|
8
|
+
class?: ClassValue;
|
|
9
|
+
size?: ThemeSize;
|
|
10
|
+
ui?: Partial<TimePickerUi>;
|
|
11
|
+
triggerProps?: TimePickerTriggerProps;
|
|
12
|
+
popupProps?: TimePickerPopupProps;
|
|
13
|
+
}
|
|
14
|
+
type TimePickerEmits = TimePickerRootEmits;
|
|
15
|
+
interface TimePickerSlots {
|
|
16
|
+
trigger?: (props: {
|
|
17
|
+
displayValue: string;
|
|
18
|
+
modelValue: TimeValue | undefined;
|
|
19
|
+
open: boolean;
|
|
20
|
+
}) => any;
|
|
21
|
+
time?: (props: {
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
focused: boolean;
|
|
24
|
+
label: string;
|
|
25
|
+
selected: boolean;
|
|
26
|
+
time: TimeValue;
|
|
27
|
+
}) => any;
|
|
28
|
+
default?: (props: {
|
|
29
|
+
displayValue: string;
|
|
30
|
+
modelValue: TimeValue | undefined;
|
|
31
|
+
open: boolean;
|
|
32
|
+
}) => any;
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { TimePickerEmits, TimePickerProps, TimePickerSlots };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex w-full flex-col gap-2`,trigger:[`inline-flex w-full items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-0 text-start font-normal shadow-xs transition-[background-color,color,box-shadow]`,`hover:bg-accent/50 hover:text-accent-foreground`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-60`,`data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground`],popup:[`z-50 w-64 overflow-hidden rounded-lg border border-border bg-popover p-2 text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`],list:`max-h-72 flex flex-col gap-1 overflow-y-auto`,cellTrigger:[`inline-flex min-h-8 w-full cursor-pointer items-center rounded-md px-3 text-start text-sm font-normal transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[selected]:bg-primary data-[selected]:text-primary-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[focused]:ring-2 data-[focused]:ring-primary/20`]},variants:{size:{xs:{root:`text-2xs`,trigger:`h-6 px-2 text-2xs`,cellTrigger:`min-h-7 px-2 text-2xs`},sm:{root:`text-xs`,trigger:`h-7 px-2.5 text-xs`,cellTrigger:`min-h-8 px-2.5 text-xs`},md:{root:`text-sm`,trigger:`h-8 px-3 text-sm`,cellTrigger:`min-h-9 px-3 text-sm`},lg:{root:`text-base`,trigger:`h-9 px-3.5 text-base`,cellTrigger:`min-h-10 px-3.5 text-base`},xl:{root:`text-lg`,trigger:`h-10 px-4 text-lg`,cellTrigger:`min-h-11 px-4 text-lg`},"2xl":{root:`text-xl`,trigger:`h-12 px-5 text-xl`,cellTrigger:`min-h-12 px-5 text-xl`}}},defaultVariants:{size:`md`}});export{t as timePickerVariants};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TimeRangeFieldEmits, TimeRangeFieldProps, TimeRangeFieldSlotProps, TimeRangeFieldSlots } from "./types.js";
|
|
2
|
+
import { _default } from "./time-range-field.vue.js";
|
|
3
|
+
import { TimeRangeFieldInputProps as TimeRangeFieldInputProps$1, TimeRangeFieldRootEmits as TimeRangeFieldRootEmits$1, TimeRangeFieldRootProps as TimeRangeFieldRootProps$1, TimeRangeFieldUi as TimeRangeFieldUi$1, TimeRangeFieldUiSlot } from "@soybeanjs/headless/time-range-field";
|
|
4
|
+
export { type TimeRangeFieldInputProps$1 as TimeRangeFieldInputProps, type TimeRangeFieldRootEmits$1 as TimeRangeFieldRootEmits, type TimeRangeFieldRootProps$1 as TimeRangeFieldRootProps, type TimeRangeFieldUi$1 as TimeRangeFieldUi, type TimeRangeFieldUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./time-range-field.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{timeRangeFieldVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,renderSlot as u,toHandlers as d,unref as f,withCtx as p}from"vue";import{useForwardListeners as m,useOmitProps as h}from"@soybeanjs/headless/composables";import{TimeRangeFieldCompact as g,provideTimeRangeFieldUi as _}from"@soybeanjs/headless/time-range-field";const v=a({name:`STimeRangeField`,__name:`time-range-field`,props:{class:{},size:{},ui:{},inputProps:{},separator:{default:`–`}},emits:[`update:modelValue`,`update:placeholder`,`update:startValue`,`update:endValue`],setup(a,{emit:v}){let y=a,b=m(v),x=h(y,[`class`,`size`,`ui`,`inputProps`,`separator`]);return _(n(()=>e(t({size:y.size}),y.ui,{root:y.class}))),(e,t)=>(l(),r(f(g),s({...f(x),inputProps:a.inputProps,separator:a.separator},d(f(b))),i({_:2},[e.$slots.default?{name:`default`,fn:p(t=>[u(e.$slots,`default`,c(o(t)))]),key:`0`}:void 0,e.$slots.separator?{name:`separator`,fn:p(()=>[u(e.$slots,`separator`)]),key:`1`}:void 0]),1040))}});export{v as default};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TimeRangeFieldProps, TimeRangeFieldSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import * as _$_soybeanjs_headless_date0 from "@soybeanjs/headless/date";
|
|
4
|
+
|
|
5
|
+
//#region src/components/time-range-field/time-range-field.vue.d.ts
|
|
6
|
+
type __VLS_Slots = TimeRangeFieldSlots;
|
|
7
|
+
declare const __VLS_base: _$vue.DefineComponent<TimeRangeFieldProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (range: _$_soybeanjs_headless_date0.TimeRange) => any;
|
|
9
|
+
"update:placeholder": (time: _$_soybeanjs_headless_date0.TimeValue) => any;
|
|
10
|
+
"update:startValue": (time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any;
|
|
11
|
+
"update:endValue": (time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any;
|
|
12
|
+
}, string, _$vue.PublicProps, Readonly<TimeRangeFieldProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((range: _$_soybeanjs_headless_date0.TimeRange) => any) | undefined;
|
|
14
|
+
"onUpdate:placeholder"?: ((time: _$_soybeanjs_headless_date0.TimeValue) => any) | undefined;
|
|
15
|
+
"onUpdate:startValue"?: ((time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any) | undefined;
|
|
16
|
+
"onUpdate:endValue"?: ((time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any) | undefined;
|
|
17
|
+
}>, {
|
|
18
|
+
separator: string;
|
|
19
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { _default };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ClassValue } from "@soybeanjs/headless";
|
|
3
|
+
import { TimeRangeFieldInputProps, TimeRangeFieldRootEmits, TimeRangeFieldRootProps, TimeRangeFieldUi } from "@soybeanjs/headless/time-range-field";
|
|
4
|
+
|
|
5
|
+
//#region src/components/time-range-field/types.d.ts
|
|
6
|
+
interface TimeRangeFieldSlotProps {
|
|
7
|
+
modelValue: TimeRangeFieldRootProps['modelValue'];
|
|
8
|
+
startSegments: {
|
|
9
|
+
part: TimeRangeFieldInputProps['part'];
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
endSegments: {
|
|
13
|
+
part: TimeRangeFieldInputProps['part'];
|
|
14
|
+
value: string;
|
|
15
|
+
}[];
|
|
16
|
+
isInvalid: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface TimeRangeFieldProps extends /* @vue-ignore */TimeRangeFieldRootProps {
|
|
19
|
+
class?: ClassValue;
|
|
20
|
+
size?: ThemeSize;
|
|
21
|
+
ui?: Partial<TimeRangeFieldUi>;
|
|
22
|
+
inputProps?: Omit<TimeRangeFieldInputProps, 'part' | 'type'>;
|
|
23
|
+
separator?: string;
|
|
24
|
+
}
|
|
25
|
+
type TimeRangeFieldEmits = TimeRangeFieldRootEmits;
|
|
26
|
+
interface TimeRangeFieldSlots {
|
|
27
|
+
default?: (props: TimeRangeFieldSlotProps) => any;
|
|
28
|
+
separator?: () => any;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { TimeRangeFieldEmits, TimeRangeFieldProps, TimeRangeFieldSlotProps, TimeRangeFieldSlots };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:[`group inline-flex w-full flex-wrap items-center rounded-md border border-input bg-background px-2.5 transition-all-150 gap-1.5`,`focus-within:outline-none focus-within:ring-3 focus-within:ring-offset-background focus-within:ring-primary/30`,`data-[disabled]:opacity-60 data-[readonly]:bg-muted/40`,`data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive/20`],input:[`inline-flex min-w-5 items-center justify-center rounded-sm px-0.5 text-center outline-none`,`tabular-nums leading-none`,`data-[segment=literal]:min-w-0 data-[segment=literal]:px-0 data-[segment=literal]:text-muted-foreground`,`data-[segment=timeZoneName]:min-w-fit data-[segment=timeZoneName]:px-1 data-[segment=timeZoneName]:text-muted-foreground`,`data-[placeholder]:text-muted-foreground`,`focus-visible:bg-accent/60 focus-visible:ring-2 focus-visible:ring-primary/20`,`data-[disabled]:cursor-not-allowed data-[readonly]:cursor-default`],separator:[`inline-flex items-center justify-center px-1 text-muted-foreground`,`select-none`]},variants:{size:{xs:{root:`min-h-6 px-1.5 text-2xs`,input:`min-h-4.5 min-w-4.5`,separator:`text-2xs`},sm:{root:`min-h-7 px-2 text-xs`,input:`min-h-5 min-w-5`,separator:`text-xs`},md:{root:`min-h-8 px-2.5 text-sm`,input:`min-h-5.5 min-w-5.5`,separator:`text-sm`},lg:{root:`min-h-9 px-3 text-base`,input:`min-h-6 min-w-6`,separator:`text-base`},xl:{root:`min-h-10 px-3.5 text-lg`,input:`min-h-6.5 min-w-6.5`,separator:`text-lg`},"2xl":{root:`min-h-12 px-4 text-xl`,input:`min-h-8 min-w-8`,separator:`text-xl`}}},defaultVariants:{size:`md`}});export{t as timeRangeFieldVariants};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TimeRangePickerEmits, TimeRangePickerProps, TimeRangePickerSlots } from "./types.js";
|
|
2
|
+
import { _default } from "./time-range-picker.vue.js";
|
|
3
|
+
import { TimeRangePickerPopupProps as TimeRangePickerPopupProps$1, TimeRangePickerRootEmits as TimeRangePickerRootEmits$1, TimeRangePickerRootProps as TimeRangePickerRootProps$1, TimeRangePickerTriggerProps as TimeRangePickerTriggerProps$1, TimeRangePickerUi as TimeRangePickerUi$1, TimeRangePickerUiSlot } from "@soybeanjs/headless/time-range-picker";
|
|
4
|
+
export { type TimeRangePickerPopupProps$1 as TimeRangePickerPopupProps, type TimeRangePickerRootEmits$1 as TimeRangePickerRootEmits, type TimeRangePickerRootProps$1 as TimeRangePickerRootProps, type TimeRangePickerTriggerProps$1 as TimeRangePickerTriggerProps, type TimeRangePickerUi$1 as TimeRangePickerUi, type TimeRangePickerUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./time-range-picker.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{timeRangePickerVariants as n}from"./variants.js";import{computed as r,createBlock as i,createElementBlock as a,createTextVNode as o,createVNode as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeProps as d,openBlock as f,renderSlot as p,toDisplayString as m,toHandlers as h,unref as g,withCtx as _}from"vue";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{TimeRangePickerCompact as b,provideTimeRangePickerUi as x}from"@soybeanjs/headless/time-range-picker";const S={key:0},C={key:1,class:`text-muted-foreground`},w=c({name:`STimeRangePicker`,__name:`time-range-picker`,props:{class:{},size:{},ui:{},triggerProps:{},popupProps:{}},emits:[`update:modelValue`,`update:placeholder`,`update:startValue`,`update:endValue`,`update:open`],setup(c,{emit:w}){let T=c,E=v(w),D=y(T,[`class`,`size`,`ui`,`triggerProps`,`popupProps`]);return x(r(()=>e(n({size:T.size}),T.ui,{root:T.class}))),(e,n)=>(f(),i(g(b),u({...g(D),triggerProps:c.triggerProps,popupProps:c.popupProps},h(g(E))),{trigger:_(n=>[p(e.$slots,`trigger`,d(l(n)),()=>[s(t,{class:`size-4`,icon:`lucide:clock-3`}),n.displayValue?(f(),a(`span`,S,m(n.displayValue),1)):(f(),a(`span`,C,`Pick a time range`))])]),time:_(t=>[p(e.$slots,`time`,d(l(t)),()=>[o(m(t.label),1)])]),default:_(t=>[p(e.$slots,`default`,d(l(t)))]),_:3},16))}});export{w as default};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TimeRangePickerProps, TimeRangePickerSlots } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import * as _$_soybeanjs_headless_date0 from "@soybeanjs/headless/date";
|
|
4
|
+
|
|
5
|
+
//#region src/components/time-range-picker/time-range-picker.vue.d.ts
|
|
6
|
+
type __VLS_Slots = TimeRangePickerSlots;
|
|
7
|
+
declare const __VLS_base: _$vue.DefineComponent<TimeRangePickerProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
8
|
+
"update:open": (open: boolean) => any;
|
|
9
|
+
"update:modelValue": (range: _$_soybeanjs_headless_date0.TimeRange) => any;
|
|
10
|
+
"update:placeholder": (time: _$_soybeanjs_headless_date0.TimeValue) => any;
|
|
11
|
+
"update:startValue": (time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any;
|
|
12
|
+
"update:endValue": (time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any;
|
|
13
|
+
}, string, _$vue.PublicProps, Readonly<TimeRangePickerProps> & Readonly<{
|
|
14
|
+
"onUpdate:open"?: ((open: boolean) => any) | undefined;
|
|
15
|
+
"onUpdate:modelValue"?: ((range: _$_soybeanjs_headless_date0.TimeRange) => any) | undefined;
|
|
16
|
+
"onUpdate:placeholder"?: ((time: _$_soybeanjs_headless_date0.TimeValue) => any) | undefined;
|
|
17
|
+
"onUpdate:startValue"?: ((time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any) | undefined;
|
|
18
|
+
"onUpdate:endValue"?: ((time: _$_soybeanjs_headless_date0.TimeValue | undefined) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { _default };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ClassValue } from "@soybeanjs/headless";
|
|
3
|
+
import { TimeRangePickerPopupProps, TimeRangePickerRootEmits, TimeRangePickerRootProps, TimeRangePickerTriggerProps, TimeRangePickerUi } from "@soybeanjs/headless/time-range-picker";
|
|
4
|
+
import { TimeRange, TimeValue } from "@soybeanjs/headless/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/time-range-picker/types.d.ts
|
|
7
|
+
interface TimeRangePickerProps extends /* @vue-ignore */TimeRangePickerRootProps {
|
|
8
|
+
class?: ClassValue;
|
|
9
|
+
size?: ThemeSize;
|
|
10
|
+
ui?: Partial<TimeRangePickerUi>;
|
|
11
|
+
triggerProps?: TimeRangePickerTriggerProps;
|
|
12
|
+
popupProps?: TimeRangePickerPopupProps;
|
|
13
|
+
}
|
|
14
|
+
type TimeRangePickerEmits = TimeRangePickerRootEmits;
|
|
15
|
+
interface TimeRangePickerSlots {
|
|
16
|
+
trigger?: (props: {
|
|
17
|
+
displayValue: string;
|
|
18
|
+
modelValue: TimeRange;
|
|
19
|
+
open: boolean;
|
|
20
|
+
}) => any;
|
|
21
|
+
time?: (props: {
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
focused: boolean;
|
|
24
|
+
highlighted: boolean;
|
|
25
|
+
label: string;
|
|
26
|
+
rangeEnd: boolean;
|
|
27
|
+
rangeStart: boolean;
|
|
28
|
+
selected: boolean;
|
|
29
|
+
time: TimeValue;
|
|
30
|
+
}) => any;
|
|
31
|
+
default?: (props: {
|
|
32
|
+
displayValue: string;
|
|
33
|
+
modelValue: TimeRange;
|
|
34
|
+
open: boolean;
|
|
35
|
+
}) => any;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { TimeRangePickerEmits, TimeRangePickerProps, TimeRangePickerSlots };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex w-full flex-col gap-2`,trigger:[`inline-flex w-full items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-0 text-start font-normal shadow-xs transition-[background-color,color,box-shadow]`,`hover:bg-accent/50 hover:text-accent-foreground`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-60`,`data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground`],popup:[`z-50 w-72 overflow-hidden rounded-lg border border-border bg-popover p-2 text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`],list:`max-h-72 flex flex-col gap-1 overflow-y-auto`,cellTrigger:[`inline-flex min-h-8 w-full cursor-pointer items-center rounded-md px-3 text-start text-sm font-normal transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[selected]:bg-accent data-[selected]:text-foreground`,`data-[range-start]:bg-primary data-[range-start]:text-primary-foreground`,`data-[range-end]:bg-primary data-[range-end]:text-primary-foreground`,`data-[highlighted]:bg-accent/80 data-[highlighted]:text-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[focused]:ring-2 data-[focused]:ring-primary/20`]},variants:{size:{xs:{root:`text-2xs`,trigger:`h-6 px-2 text-2xs`,cellTrigger:`min-h-7 px-2 text-2xs`},sm:{root:`text-xs`,trigger:`h-7 px-2.5 text-xs`,cellTrigger:`min-h-8 px-2.5 text-xs`},md:{root:`text-sm`,trigger:`h-8 px-3 text-sm`,cellTrigger:`min-h-9 px-3 text-sm`},lg:{root:`text-base`,trigger:`h-9 px-3.5 text-base`,cellTrigger:`min-h-10 px-3.5 text-base`},xl:{root:`text-lg`,trigger:`h-10 px-4 text-lg`,cellTrigger:`min-h-11 px-4 text-lg`},"2xl":{root:`text-xl`,trigger:`h-12 px-5 text-xl`,cellTrigger:`min-h-12 px-5 text-xl`}}},defaultVariants:{size:`md`}});export{t as timeRangePickerVariants};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { YearPickerEmits, YearPickerProps, YearPickerSlots } from "./types.js";
|
|
2
|
+
import { _default } from "./year-picker.vue.js";
|
|
3
|
+
import { YearPickerPopupProps as YearPickerPopupProps$1, YearPickerRootEmits as YearPickerRootEmits$1, YearPickerRootProps as YearPickerRootProps$1, YearPickerTriggerProps as YearPickerTriggerProps$1, YearPickerUi as YearPickerUi$1, YearPickerUiSlot } from "@soybeanjs/headless/year-picker";
|
|
4
|
+
export { type YearPickerPopupProps$1 as YearPickerPopupProps, type YearPickerRootEmits$1 as YearPickerRootEmits, type YearPickerRootProps$1 as YearPickerRootProps, type YearPickerTriggerProps$1 as YearPickerTriggerProps, type YearPickerUi$1 as YearPickerUi, type YearPickerUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./year-picker.js";
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ClassValue } from "@soybeanjs/headless";
|
|
3
|
+
import { YearPickerPopupProps, YearPickerRootEmits, YearPickerRootProps, YearPickerTriggerProps, YearPickerUi } from "@soybeanjs/headless/year-picker";
|
|
4
|
+
import { DateValue } from "@internationalized/date";
|
|
5
|
+
|
|
6
|
+
//#region src/components/year-picker/types.d.ts
|
|
7
|
+
interface YearPickerProps extends /* @vue-ignore */YearPickerRootProps {
|
|
8
|
+
class?: ClassValue;
|
|
9
|
+
size?: ThemeSize;
|
|
10
|
+
ui?: Partial<YearPickerUi>;
|
|
11
|
+
triggerProps?: YearPickerTriggerProps;
|
|
12
|
+
popupProps?: YearPickerPopupProps;
|
|
13
|
+
}
|
|
14
|
+
type YearPickerEmits = YearPickerRootEmits;
|
|
15
|
+
interface YearPickerSlots {
|
|
16
|
+
trigger?: (props: {
|
|
17
|
+
displayValue: string;
|
|
18
|
+
modelValue: DateValue | undefined;
|
|
19
|
+
open: boolean;
|
|
20
|
+
}) => any;
|
|
21
|
+
heading?: (props: {
|
|
22
|
+
headingValue: string;
|
|
23
|
+
}) => any;
|
|
24
|
+
prev?: (props: {
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
}) => any;
|
|
27
|
+
next?: (props: {
|
|
28
|
+
disabled: boolean;
|
|
29
|
+
}) => any;
|
|
30
|
+
year?: (props: {
|
|
31
|
+
date: DateValue;
|
|
32
|
+
label: string;
|
|
33
|
+
disabled: boolean;
|
|
34
|
+
focused: boolean;
|
|
35
|
+
selected: boolean;
|
|
36
|
+
}) => any;
|
|
37
|
+
default?: (props: {
|
|
38
|
+
displayValue: string;
|
|
39
|
+
modelValue: DateValue | undefined;
|
|
40
|
+
open: boolean;
|
|
41
|
+
}) => any;
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { YearPickerEmits, YearPickerProps, YearPickerSlots };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`inline-flex w-full flex-col gap-2`,trigger:[`inline-flex w-full items-center justify-start gap-2 rounded-md border border-input bg-background px-3 py-0 text-start font-normal shadow-xs transition-[background-color,color,box-shadow]`,`hover:bg-accent/50 hover:text-accent-foreground`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-60`,`data-[state=open]:bg-accent/50 data-[state=open]:text-accent-foreground`],popup:[`z-50 overflow-hidden rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-md`,`data-[state=open]:animate-in data-[state=closed]:animate-out`,`data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,`data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`],header:`mb-3 grid grid-cols-[auto_1fr_auto] items-center gap-1`,heading:`text-center font-medium text-foreground`,prev:[`inline-flex size-8 items-center justify-center rounded-md border border-transparent bg-transparent transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],next:[`inline-flex size-8 items-center justify-center rounded-md border border-transparent bg-transparent transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`],grid:`grid grid-cols-4 gap-1`,cellTrigger:[`inline-flex h-9 cursor-pointer items-center justify-center rounded-md border border-transparent bg-transparent px-3 text-sm font-normal transition-colors`,`hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/30`,`data-[selected]:bg-primary data-[selected]:text-primary-foreground`,`data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,`data-[focused]:ring-2 data-[focused]:ring-primary/20`]},variants:{size:{xs:{root:`text-2xs`,trigger:`h-6 px-2 text-2xs`,prev:`size-6 text-2xs`,next:`size-6 text-2xs`,cellTrigger:`h-7 px-2 text-2xs`},sm:{root:`text-xs`,trigger:`h-7 px-2.5 text-xs`,prev:`size-7 text-xs`,next:`size-7 text-xs`,cellTrigger:`h-8 px-2.5 text-xs`},md:{root:`text-sm`,trigger:`h-8 px-3 text-sm`,prev:`size-8 text-sm`,next:`size-8 text-sm`,cellTrigger:`h-9 px-3 text-sm`},lg:{root:`text-base`,trigger:`h-9 px-3.5 text-base`,prev:`size-9 text-base`,next:`size-9 text-base`,cellTrigger:`h-10 px-3.5 text-base`},xl:{root:`text-lg`,trigger:`h-10 px-4 text-lg`,prev:`size-10 text-lg`,next:`size-10 text-lg`,cellTrigger:`h-11 px-4 text-lg`},"2xl":{root:`text-xl`,trigger:`h-12 px-5 text-xl`,prev:`size-12 text-xl`,next:`size-12 text-xl`,cellTrigger:`h-12 px-5 text-xl`}}},defaultVariants:{size:`md`}});export{t as yearPickerVariants};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../icon/icon.js";import{yearPickerVariants as n}from"./variants.js";import{computed as r,createBlock as i,createElementBlock as a,createTextVNode as o,createVNode as s,defineComponent as c,guardReactiveProps as l,mergeProps as u,normalizeProps as d,openBlock as f,renderSlot as p,toDisplayString as m,toHandlers as h,unref as g,withCtx as _}from"vue";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{YearPickerPopup as b,YearPickerRoot as x,YearPickerTrigger as S,provideYearPickerUi as C}from"@soybeanjs/headless/year-picker";const w={key:0},T={key:1,class:`text-muted-foreground`},E=c({name:`SYearPicker`,__name:`year-picker`,props:{class:{},size:{},ui:{},triggerProps:{},popupProps:{}},emits:[`update:modelValue`,`update:placeholder`,`update:open`],setup(c,{emit:E}){let D=c,O=v(E),k=y(D,[`class`,`size`,`ui`,`triggerProps`,`popupProps`]);return C(r(()=>e(n({size:D.size}),D.ui,{root:D.class}))),(e,n)=>(f(),i(g(x),u(g(k),h(g(O))),{default:_(n=>[s(g(S),d(l(c.triggerProps)),{default:_(()=>[p(e.$slots,`trigger`,{displayValue:n.displayValue,modelValue:n.modelValue,open:n.open},()=>[s(t,{class:`size-4`,icon:`lucide:calendar`}),n.displayValue?(f(),a(`span`,w,m(n.displayValue),1)):(f(),a(`span`,T,`Pick a year`))])]),_:2},1040),s(g(b),d(l(c.popupProps)),{heading:_(t=>[p(e.$slots,`heading`,d(l(t)),()=>[o(m(t.headingValue),1)])]),prev:_(n=>[p(e.$slots,`prev`,d(l(n)),()=>[s(t,{class:`size-4 rtl:rotate-180`,icon:`lucide:chevron-left`})])]),next:_(n=>[p(e.$slots,`next`,d(l(n)),()=>[s(t,{class:`size-4 rtl:rotate-180`,icon:`lucide:chevron-right`})])]),year:_(t=>[p(e.$slots,`year`,d(l(t)),()=>[o(m(t.label),1)])]),_:3},16),p(e.$slots,`default`,d(l(n)))]),_:3},16))}});export{E as default};
|