pxd 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/_internal/calendar-day.d.vue.ts +15 -13
- package/dist/components/_internal/dismiss-container.d.vue.ts +5 -3
- package/dist/components/_internal/fragment-container.d.vue.ts +5 -3
- package/dist/components/_internal/mention-editor.d.vue.ts +3 -1
- package/dist/components/_internal/mention-editor.vue +9 -3
- package/dist/components/_internal/step-item.d.vue.ts +5 -3
- package/dist/components/_internal/tree-node.d.vue.ts +37 -33
- package/dist/components/_internal/tree-node.vue +17 -3
- package/dist/components/active-graph/index.d.vue.ts +7 -5
- package/dist/components/active-graph/index.vue +63 -63
- package/dist/components/approval-card/index.d.vue.ts +5 -3
- package/dist/components/avatar/index.d.vue.ts +7 -5
- package/dist/components/avatar/index.vue +1 -1
- package/dist/components/backtop/index.d.vue.ts +6 -4
- package/dist/components/backtop/index.vue +71 -38
- package/dist/components/backtop/types.d.ts +1 -0
- package/dist/components/badge/index.d.vue.ts +7 -5
- package/dist/components/book/index.d.vue.ts +9 -7
- package/dist/components/border-beam/index.d.vue.ts +5 -3
- package/dist/components/breadcrumb/index.d.vue.ts +5 -3
- package/dist/components/breadcrumb-item/index.d.vue.ts +7 -5
- package/dist/components/browser/index.d.vue.ts +5 -3
- package/dist/components/browser/index.vue +1 -1
- package/dist/components/bubble/index.d.vue.ts +14 -12
- package/dist/components/bubble/index.vue +8 -6
- package/dist/components/bubble/types.d.ts +1 -1
- package/dist/components/bubble-group/index.d.vue.ts +17 -14
- package/dist/components/bubble-group/index.vue +121 -9
- package/dist/components/bubble-group/types.d.ts +1 -1
- package/dist/components/button/index.d.vue.ts +9 -7
- package/dist/components/button/index.vue +6 -3
- package/dist/components/button-group/index.d.vue.ts +5 -3
- package/dist/components/calendar/index.d.vue.ts +20 -18
- package/dist/components/card/index.d.vue.ts +9 -7
- package/dist/components/carousel/index.d.vue.ts +13 -11
- package/dist/components/checkbox/index.d.vue.ts +5 -3
- package/dist/components/checkbox-group/index.d.vue.ts +5 -3
- package/dist/components/checkerboard/index.d.vue.ts +5 -3
- package/dist/components/chip/index.d.vue.ts +5 -3
- package/dist/components/choicebox/index.d.vue.ts +5 -3
- package/dist/components/choicebox/types.d.ts +2 -2
- package/dist/components/choicebox-item/index.d.vue.ts +9 -7
- package/dist/components/choicebox-item/index.vue +9 -5
- package/dist/components/choicebox-item/types.d.ts +1 -1
- package/dist/components/code-block/index.d.vue.ts +7 -5
- package/dist/components/code-block/index.vue +6 -6
- package/dist/components/collapse/index.d.vue.ts +7 -5
- package/dist/components/collapse-group/index.d.vue.ts +5 -3
- package/dist/components/command-menu/index.d.vue.ts +12 -10
- package/dist/components/command-menu/index.vue +1 -1
- package/dist/components/config-provider/index.d.vue.ts +5 -14
- package/dist/components/confirm-popover/index.d.vue.ts +16 -14
- package/dist/components/confirm-popover/index.vue +1 -1
- package/dist/components/context-usage/index.vue +19 -12
- package/dist/components/copy-button/index.d.vue.ts +7 -5
- package/dist/components/countdown/index.d.vue.ts +17 -16
- package/dist/components/countdown/index.vue +3 -8
- package/dist/components/countdown/types.d.ts +1 -1
- package/dist/components/date-picker/index.d.vue.ts +5 -3
- package/dist/components/description/index.d.vue.ts +7 -5
- package/dist/components/description/index.vue +5 -2
- package/dist/components/description/types.d.ts +1 -1
- package/dist/components/drawer/index.d.vue.ts +13 -11
- package/dist/components/drawer/index.vue +1 -1
- package/dist/components/effort-slider/index.vue +47 -47
- package/dist/components/empty-state/index.d.vue.ts +11 -9
- package/dist/components/empty-state/index.vue +2 -2
- package/dist/components/empty-state/types.d.ts +1 -1
- package/dist/components/error/index.d.vue.ts +5 -3
- package/dist/components/error/index.vue +1 -1
- package/dist/components/fader/index.d.vue.ts +2 -0
- package/dist/components/fader/index.vue +55 -29
- package/dist/components/fader/types.d.ts +2 -1
- package/dist/components/grid/index.d.vue.ts +5 -3
- package/dist/components/grid-item/index.d.vue.ts +5 -3
- package/dist/components/hint/index.d.vue.ts +15 -13
- package/dist/components/hold-button/index.d.vue.ts +9 -7
- package/dist/components/hue-text/index.d.vue.ts +7 -5
- package/dist/components/image-preview/index.d.vue.ts +24 -7
- package/dist/components/image-preview/index.vue +122 -23
- package/dist/components/image-preview/types.d.ts +9 -1
- package/dist/components/input/index.d.vue.ts +7 -5
- package/dist/components/input/index.vue +1 -1
- package/dist/components/intersection-observer/index.d.vue.ts +7 -5
- package/dist/components/kbd/index.d.vue.ts +5 -3
- package/dist/components/kbd/index.vue +1 -1
- package/dist/components/label/index.d.vue.ts +5 -3
- package/dist/components/link-button/index.d.vue.ts +10 -8
- package/dist/components/list/index.d.vue.ts +12 -10
- package/dist/components/list/index.vue +36 -43
- package/dist/components/list/types.d.ts +5 -5
- package/dist/components/list-group/index.vue +1 -1
- package/dist/components/list-item/index.d.vue.ts +5 -3
- package/dist/components/list-item/index.vue +16 -6
- package/dist/components/loading-dots/index.vue +0 -1
- package/dist/components/loading-mask/index.d.vue.ts +13 -1
- package/dist/components/loading-mask/index.vue +5 -3
- package/dist/components/marching-ants/index.d.vue.ts +6 -4
- package/dist/components/marquee/index.d.vue.ts +12 -10
- package/dist/components/material/index.d.vue.ts +5 -3
- package/dist/components/mention/index.d.vue.ts +17 -13
- package/dist/components/mention/index.vue +35 -3
- package/dist/components/mention/types.d.ts +11 -0
- package/dist/components/menu/index.d.vue.ts +16 -14
- package/dist/components/message/index.d.vue.ts +1 -1
- package/dist/components/modal/index.d.vue.ts +13 -11
- package/dist/components/modal/index.vue +2 -2
- package/dist/components/note/index.d.vue.ts +9 -7
- package/dist/components/number-input/index.d.vue.ts +15 -13
- package/dist/components/number-input/index.vue +7 -3
- package/dist/components/overlay/index.d.vue.ts +5 -3
- package/dist/components/pagination/index.d.vue.ts +5 -3
- package/dist/components/pagination/index.vue +2 -2
- package/dist/components/pin-input/index.d.vue.ts +1 -1
- package/dist/components/pin-input/index.vue +1 -1
- package/dist/components/placeholder/index.d.vue.ts +5 -3
- package/dist/components/popover/index.vue +4 -5
- package/dist/components/progress/index.d.vue.ts +5 -3
- package/dist/components/project-banner/index.d.vue.ts +9 -7
- package/dist/components/radial-burst/index.d.vue.ts +5 -3
- package/dist/components/radio/index.d.vue.ts +5 -3
- package/dist/components/radio-group/index.d.vue.ts +5 -3
- package/dist/components/rating/index.d.vue.ts +1 -1
- package/dist/components/reactions/index.d.vue.ts +5 -3
- package/dist/components/reasoning/index.d.vue.ts +6 -4
- package/dist/components/reasoning/index.vue +14 -12
- package/dist/components/reasoning/types.d.ts +5 -7
- package/dist/components/resizable/index.d.vue.ts +11 -9
- package/dist/components/resizable/index.vue +2 -2
- package/dist/components/reveal/index.d.vue.ts +6 -4
- package/dist/components/rolling-number/index.d.vue.ts +1 -1
- package/dist/components/scroll-progress/index.d.vue.ts +7 -5
- package/dist/components/scroll-text/index.d.vue.ts +6 -3
- package/dist/components/scroll-text/index.vue +11 -2
- package/dist/components/scroll-text/types.d.ts +1 -0
- package/dist/components/scrollable/index.d.vue.ts +5 -3
- package/dist/components/scrollable/index.vue +119 -179
- package/dist/components/search-input/index.d.vue.ts +7 -5
- package/dist/components/select/index.d.vue.ts +22 -20
- package/dist/components/select/index.vue +2 -2
- package/dist/components/shimmer-text/index.d.vue.ts +6 -4
- package/dist/components/skeleton/index.d.vue.ts +5 -3
- package/dist/components/slider/index.vue +74 -74
- package/dist/components/spinner/index.vue +0 -1
- package/dist/components/spinner-dots/index.vue +0 -1
- package/dist/components/split-button/index.d.vue.ts +18 -16
- package/dist/components/stack/index.d.vue.ts +5 -3
- package/dist/components/steps/index.d.vue.ts +9 -7
- package/dist/components/steps/index.vue +3 -3
- package/dist/components/stick-to-bottom/index.d.vue.ts +13 -10
- package/dist/components/stick-to-bottom/index.vue +25 -10
- package/dist/components/stick-to-bottom/types.d.ts +2 -1
- package/dist/components/swipe-cell/index.d.vue.ts +21 -19
- package/dist/components/switch/index.d.vue.ts +5 -3
- package/dist/components/switch/index.vue +1 -1
- package/dist/components/switch-item/index.d.vue.ts +5 -3
- package/dist/components/tabs/index.vue +1 -1
- package/dist/components/teleport/index.d.vue.ts +7 -5
- package/dist/components/text/index.d.vue.ts +5 -3
- package/dist/components/textarea/index.vue +1 -1
- package/dist/components/time-picker/index.d.vue.ts +5 -3
- package/dist/components/time-picker/index.vue +3 -8
- package/dist/components/timeline-item/index.d.vue.ts +7 -5
- package/dist/components/toc/index.d.vue.ts +11 -9
- package/dist/components/toc/index.vue +81 -62
- package/dist/components/todo-list/index.d.vue.ts +25 -23
- package/dist/components/todo-list/index.vue +2 -3
- package/dist/components/todo-list/types.d.ts +1 -1
- package/dist/components/toggle/index.d.vue.ts +7 -5
- package/dist/components/toggle/index.vue +1 -1
- package/dist/components/toggle-button/index.d.vue.ts +5 -3
- package/dist/components/toggle-button/index.vue +1 -1
- package/dist/components/toggle-button-group/index.d.vue.ts +5 -3
- package/dist/components/tool-call/index.d.vue.ts +15 -1
- package/dist/components/tool-call/index.vue +26 -16
- package/dist/components/tooltip/index.d.vue.ts +11 -9
- package/dist/components/tour/index.d.vue.ts +2 -2
- package/dist/components/tour/index.vue +1 -1
- package/dist/components/tour/types.d.ts +1 -1
- package/dist/components/tree/index.d.vue.ts +44 -42
- package/dist/components/tree/index.vue +16 -12
- package/dist/components/virtual-list/index.d.vue.ts +13 -10
- package/dist/components/virtual-list/index.vue +10 -5
- package/dist/components/virtual-list/types.d.ts +2 -1
- package/dist/composables/_internal/use-details-collapse.d.ts +2 -1
- package/dist/composables/_internal/use-focus-trap.d.ts +1 -2
- package/dist/composables/_internal/use-forward-ref-expose.d.ts +1 -1
- package/dist/composables/_internal/use-list-keyboard-controller.d.ts +1 -1
- package/dist/composables/_internal/use-list-navigation.d.ts +2 -1
- package/dist/composables/_internal/use-list-search.d.ts +2 -1
- package/dist/composables/_internal/use-list-search.js +1 -3
- package/dist/composables/_internal/use-mention-editor.d.ts +10 -5
- package/dist/composables/_internal/use-mention-editor.js +97 -25
- package/dist/composables/_internal/use-message-group.d.ts +1 -1
- package/dist/composables/_internal/use-overlay-manager.d.ts +1 -1
- package/dist/composables/_internal/use-remote-search.d.ts +2 -1
- package/dist/composables/_internal/use-selected-list-item.d.ts +1 -1
- package/dist/composables/_internal/use-swipe-gesture.d.ts +1 -2
- package/dist/composables/_internal/use-tailwind-variant.js +1 -1
- package/dist/composables/_internal/use-tour-target.d.ts +1 -1
- package/dist/composables/_internal/use-tree.d.ts +2 -2
- package/dist/composables/_internal/use-word-limit.d.ts +2 -1
- package/dist/composables/use-countdown.d.ts +2 -7
- package/dist/composables/use-countdown.js +6 -6
- package/dist/composables/use-deferred-value.d.ts +2 -1
- package/dist/composables/use-delay-change.d.ts +2 -1
- package/dist/composables/use-delay-destroy.d.ts +2 -2
- package/dist/composables/use-intersection-observer.d.ts +1 -1
- package/dist/composables/use-mutation-observer.d.ts +1 -1
- package/dist/composables/use-mutation-observer.js +4 -1
- package/dist/composables/use-outside-click.d.ts +1 -2
- package/dist/composables/use-repeat-action.d.ts +1 -2
- package/dist/composables/use-resize-observer.d.ts +1 -1
- package/dist/composables/use-scrollspy.d.ts +2 -1
- package/dist/composables/use-stick-to-bottom.d.ts +6 -2
- package/dist/composables/use-stick-to-bottom.js +18 -2
- package/dist/composables/use-virtual-list.d.ts +9 -3
- package/dist/composables/use-virtual-list.js +92 -48
- package/dist/constants/size.d.ts +1 -0
- package/dist/constants/size.js +1 -0
- package/dist/constants/tooltip-variants.d.ts +1 -1
- package/dist/constants/tooltip-variants.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/en-us.d.ts +0 -11
- package/dist/locales/en-us.js +0 -11
- package/dist/locales/zh-cn.d.ts +0 -11
- package/dist/locales/zh-cn.js +0 -11
- package/dist/styles/styles.css +2 -2
- package/dist/types/shared/props.d.ts +4 -0
- package/dist/types/shared/utils.d.ts +4 -1
- package/dist/utils/_internal/mention-html.d.ts +32 -0
- package/dist/utils/_internal/mention-html.js +45 -17
- package/dist/utils/_internal/observer.d.ts +2 -1
- package/dist/utils/dom.d.ts +5 -6
- package/dist/utils/dom.js +5 -31
- package/dist/utils/event.d.ts +0 -1
- package/dist/utils/event.js +0 -3
- package/dist/utils/helper.d.ts +1 -4
- package/dist/utils/mention-html.js +13 -38
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/package.json +12 -12
|
@@ -13,9 +13,6 @@ defineOptions({
|
|
|
13
13
|
event: "update:model-value"
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
function clamp(value, lower, upper) {
|
|
17
|
-
return Math.min(Math.max(value, lower), upper);
|
|
18
|
-
}
|
|
19
16
|
const props = defineProps({
|
|
20
17
|
min: {
|
|
21
18
|
type: Number,
|
|
@@ -75,21 +72,6 @@ const props = defineProps({
|
|
|
75
72
|
}
|
|
76
73
|
});
|
|
77
74
|
const emits = defineEmits(["change", "update:model-value"]);
|
|
78
|
-
const configProvider = useConfigProvider();
|
|
79
|
-
const { attrs, classes } = useTailwindVariant({
|
|
80
|
-
base: "pxd-slider group/slider relative flex w-full max-w-full shrink-0 touch-none items-center rounded-full bg-gray-200 select-none",
|
|
81
|
-
variants: {
|
|
82
|
-
size: {
|
|
83
|
-
sm: "h-2",
|
|
84
|
-
md: "h-2.5",
|
|
85
|
-
lg: "h-3.5"
|
|
86
|
-
},
|
|
87
|
-
disabled: { true: "cursor-not-allowed" }
|
|
88
|
-
}
|
|
89
|
-
}, { selection: () => ({
|
|
90
|
-
size: props.size || configProvider.size,
|
|
91
|
-
disabled: props.disabled
|
|
92
|
-
}) });
|
|
93
75
|
const sliderThumbClasses = createTailwindVariant({
|
|
94
76
|
base: "pxd-slider--thumb group rounded-xs absolute -translate-x-1/2 transform-gpu touch-none bg-none self-focus-ring outline-none motion-safe:before:transition-appearance",
|
|
95
77
|
variants: {
|
|
@@ -133,11 +115,15 @@ let sliderRect = null;
|
|
|
133
115
|
let lastClientX = null;
|
|
134
116
|
let lastUpdatedValue = null;
|
|
135
117
|
let stopMoveListener = null;
|
|
118
|
+
const labelRefList = [shallowRef(), shallowRef()];
|
|
119
|
+
const scheduleUpdate = throttleByRaf(() => {
|
|
120
|
+
if (lastClientX !== null) {
|
|
121
|
+
updateValueFromPosition(lastClientX);
|
|
122
|
+
}
|
|
123
|
+
});
|
|
136
124
|
const sliderRef = shallowRef();
|
|
137
125
|
const activeThumb = shallowRef(null);
|
|
138
|
-
const labelRefList = [shallowRef(), shallowRef()];
|
|
139
126
|
const labelShiftList = shallowRef([0, 0]);
|
|
140
|
-
const modelValue = useModelValue(props, emits, { withChange: false });
|
|
141
127
|
const innerValue = shallowRef(props.defaultValue ?? (props.range ? [props.min, props.min] : props.min));
|
|
142
128
|
const activeValue = computed(() => props.modelValue ?? innerValue.value);
|
|
143
129
|
// Outside range mode the start slot is pinned to `min`, so both modes share one pair and
|
|
@@ -149,23 +135,6 @@ const valueRange = computed(() => {
|
|
|
149
135
|
}
|
|
150
136
|
return [props.min, Array.isArray(value) ? value[1] ?? 0 : value];
|
|
151
137
|
});
|
|
152
|
-
function setValue(range) {
|
|
153
|
-
const value = props.range ? range : range[1];
|
|
154
|
-
innerValue.value = value;
|
|
155
|
-
modelValue.value = value;
|
|
156
|
-
return value;
|
|
157
|
-
}
|
|
158
|
-
function getPercentage(value) {
|
|
159
|
-
return clamp((value - props.min) / (props.max - props.min) * 100, 0, 100);
|
|
160
|
-
}
|
|
161
|
-
function getNumericStepValues(min, max, step) {
|
|
162
|
-
if (step <= 0) {
|
|
163
|
-
return [];
|
|
164
|
-
}
|
|
165
|
-
// Only the values the drag/keyboard snapping can actually reach are stoppable.
|
|
166
|
-
const count = Math.floor((max - min) / step);
|
|
167
|
-
return Array.from({ length: count + 1 }, (_, index) => min + index * step);
|
|
168
|
-
}
|
|
169
138
|
const stepValues = computed(() => {
|
|
170
139
|
const { step, min, max } = props;
|
|
171
140
|
if (!Array.isArray(step)) {
|
|
@@ -173,33 +142,6 @@ const stepValues = computed(() => {
|
|
|
173
142
|
}
|
|
174
143
|
return [...step].sort((a, b) => a - b).filter((value) => value >= min && value <= max);
|
|
175
144
|
});
|
|
176
|
-
function toValidValue(value) {
|
|
177
|
-
if (!Array.isArray(props.step)) {
|
|
178
|
-
const offset = value - props.min;
|
|
179
|
-
return clamp(props.step > 0 ? Math.round(offset / props.step) * props.step + props.min : value, props.min, props.max);
|
|
180
|
-
}
|
|
181
|
-
if (!stepValues.value.length) {
|
|
182
|
-
return props.min;
|
|
183
|
-
}
|
|
184
|
-
// Ties resolve to the lower value because the list is sorted ascending.
|
|
185
|
-
return stepValues.value.reduce((closest, stepValue) => Math.abs(stepValue - value) < Math.abs(closest - value) ? stepValue : closest);
|
|
186
|
-
}
|
|
187
|
-
function toKeyboardValue(current, isNegative) {
|
|
188
|
-
if (!Array.isArray(props.step)) {
|
|
189
|
-
return isNegative ? current - props.step : current + props.step;
|
|
190
|
-
}
|
|
191
|
-
const values = stepValues.value;
|
|
192
|
-
if (!values.length) {
|
|
193
|
-
return props.min;
|
|
194
|
-
}
|
|
195
|
-
const index = values.indexOf(current);
|
|
196
|
-
if (index !== -1) {
|
|
197
|
-
return values[Math.min(Math.max(index + (isNegative ? -1 : 1), 0), values.length - 1)];
|
|
198
|
-
}
|
|
199
|
-
// The current value is off-grid: jump to the closest allowed value in the pressed direction.
|
|
200
|
-
const candidates = isNegative ? values.slice().reverse() : values;
|
|
201
|
-
return candidates.find((value) => isNegative ? value < current : value > current) ?? current;
|
|
202
|
-
}
|
|
203
145
|
const startPercentage = computed(() => getPercentage(valueRange.value[0]));
|
|
204
146
|
const endPercentage = computed(() => getPercentage(valueRange.value[1]));
|
|
205
147
|
const stopList = computed(() => {
|
|
@@ -237,6 +179,12 @@ const markList = computed(() => {
|
|
|
237
179
|
})
|
|
238
180
|
}));
|
|
239
181
|
});
|
|
182
|
+
const trackStyle = computed(() => ({
|
|
183
|
+
left: `${startPercentage.value}%`,
|
|
184
|
+
width: `${endPercentage.value - startPercentage.value}%`,
|
|
185
|
+
backgroundColor: props.disabled ? "var(--color-gray-alpha-400)" : getFallbackValue(props.variant, VARIANTS, "primary")
|
|
186
|
+
}));
|
|
187
|
+
const configProvider = useConfigProvider();
|
|
240
188
|
const thumbList = computed(() => {
|
|
241
189
|
const base = {
|
|
242
190
|
size: props.size || configProvider.size,
|
|
@@ -263,11 +211,68 @@ const thumbList = computed(() => {
|
|
|
263
211
|
})
|
|
264
212
|
}));
|
|
265
213
|
});
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
214
|
+
const { attrs, classes } = useTailwindVariant({
|
|
215
|
+
base: "pxd-slider group/slider relative flex w-full max-w-full shrink-0 touch-none items-center rounded-full bg-gray-200 select-none",
|
|
216
|
+
variants: {
|
|
217
|
+
size: {
|
|
218
|
+
sm: "h-2",
|
|
219
|
+
md: "h-2.5",
|
|
220
|
+
lg: "h-3.5"
|
|
221
|
+
},
|
|
222
|
+
disabled: { true: "cursor-not-allowed" }
|
|
223
|
+
}
|
|
224
|
+
}, { selection: () => ({
|
|
225
|
+
size: props.size || configProvider.size,
|
|
226
|
+
disabled: props.disabled
|
|
227
|
+
}) });
|
|
228
|
+
const modelValue = useModelValue(props, emits, { withChange: false });
|
|
229
|
+
function clamp(value, lower, upper) {
|
|
230
|
+
return Math.min(Math.max(value, lower), upper);
|
|
231
|
+
}
|
|
232
|
+
function setValue(range) {
|
|
233
|
+
const value = props.range ? range : range[1];
|
|
234
|
+
innerValue.value = value;
|
|
235
|
+
modelValue.value = value;
|
|
236
|
+
return value;
|
|
237
|
+
}
|
|
238
|
+
function getPercentage(value) {
|
|
239
|
+
return clamp((value - props.min) / (props.max - props.min) * 100, 0, 100);
|
|
240
|
+
}
|
|
241
|
+
function getNumericStepValues(min, max, step) {
|
|
242
|
+
if (step <= 0) {
|
|
243
|
+
return [];
|
|
244
|
+
}
|
|
245
|
+
// Only the values the drag/keyboard snapping can actually reach are stoppable.
|
|
246
|
+
const count = Math.floor((max - min) / step);
|
|
247
|
+
return Array.from({ length: count + 1 }, (_, index) => min + index * step);
|
|
248
|
+
}
|
|
249
|
+
function toValidValue(value) {
|
|
250
|
+
if (!Array.isArray(props.step)) {
|
|
251
|
+
const offset = value - props.min;
|
|
252
|
+
return clamp(props.step > 0 ? Math.round(offset / props.step) * props.step + props.min : value, props.min, props.max);
|
|
253
|
+
}
|
|
254
|
+
if (!stepValues.value.length) {
|
|
255
|
+
return props.min;
|
|
256
|
+
}
|
|
257
|
+
// Ties resolve to the lower value because the list is sorted ascending.
|
|
258
|
+
return stepValues.value.reduce((closest, stepValue) => Math.abs(stepValue - value) < Math.abs(closest - value) ? stepValue : closest);
|
|
259
|
+
}
|
|
260
|
+
function toKeyboardValue(current, isNegative) {
|
|
261
|
+
if (!Array.isArray(props.step)) {
|
|
262
|
+
return isNegative ? current - props.step : current + props.step;
|
|
263
|
+
}
|
|
264
|
+
const values = stepValues.value;
|
|
265
|
+
if (!values.length) {
|
|
266
|
+
return props.min;
|
|
267
|
+
}
|
|
268
|
+
const index = values.indexOf(current);
|
|
269
|
+
if (index !== -1) {
|
|
270
|
+
return values[Math.min(Math.max(index + (isNegative ? -1 : 1), 0), values.length - 1)];
|
|
271
|
+
}
|
|
272
|
+
// The current value is off-grid: jump to the closest allowed value in the pressed direction.
|
|
273
|
+
const candidates = isNegative ? values.slice().reverse() : values;
|
|
274
|
+
return candidates.find((value) => isNegative ? value < current : value > current) ?? current;
|
|
275
|
+
}
|
|
271
276
|
function setLabelRef(index, el) {
|
|
272
277
|
labelRefList[index].value = el instanceof HTMLElement ? el : undefined;
|
|
273
278
|
}
|
|
@@ -309,11 +314,6 @@ function updateValueFromPosition(clientX) {
|
|
|
309
314
|
lastUpdatedValue = setValue(next);
|
|
310
315
|
}
|
|
311
316
|
}
|
|
312
|
-
const scheduleUpdate = throttleByRaf(() => {
|
|
313
|
-
if (lastClientX !== null) {
|
|
314
|
-
updateValueFromPosition(lastClientX);
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
317
|
function handleMove(ev) {
|
|
318
318
|
if (activeThumb.value === null || props.disabled) {
|
|
319
319
|
return;
|
|
@@ -12,7 +12,6 @@ const OPACITY_STEP = 1 / ITEMS_COUNT;
|
|
|
12
12
|
<span
|
|
13
13
|
data-spinner
|
|
14
14
|
aria-hidden="true"
|
|
15
|
-
aria-label="Loading"
|
|
16
15
|
class="pxd-spinner leading-0 transform-origin-center motion-safe:animate-spin pointer-events-none relative inline-block size-em shrink-0 overflow-hidden content-visibility-auto intrinsic-size-auto"
|
|
17
16
|
v-bind="$attrs"
|
|
18
17
|
>
|
|
@@ -212,7 +212,6 @@ const spinnerStyle = computed(() => {
|
|
|
212
212
|
class="pxd-spinner-dots inline-block h-lh w-max max-w-full shrink-0 overflow-hidden align-baseline text-foreground-secondary"
|
|
213
213
|
:style="spinnerStyle"
|
|
214
214
|
aria-hidden="true"
|
|
215
|
-
aria-label="Loading"
|
|
216
215
|
v-bind="$attrs"
|
|
217
216
|
>
|
|
218
217
|
<span class="pxd-spinner-dots--track block backface-hidden motion-reduce:animate-none!">
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import type { SplitButtonProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
} & {
|
|
17
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {
|
|
5
|
+
data: import("../list/types.js").ListOption;
|
|
6
|
+
}) => any;
|
|
7
|
+
} & {
|
|
8
|
+
icon?: (props: {}) => any;
|
|
9
|
+
} & {
|
|
10
|
+
item?: (props: {
|
|
11
|
+
item: import("../list/types.js").ListOption;
|
|
12
|
+
index: number;
|
|
13
|
+
group: import("../list/types.js").ListOptionGroup | undefined;
|
|
14
|
+
groupIndex: number | undefined;
|
|
15
|
+
}) => any;
|
|
16
|
+
} & {
|
|
17
|
+
footer?: (props: {}) => any;
|
|
18
|
+
};
|
|
18
19
|
};
|
|
20
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
19
21
|
declare const __VLS_base: import("vue").DefineComponent<SplitButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
22
|
change: (args_0: import("../list/types.js").ListModelValue) => any;
|
|
21
23
|
"update:model-value": (args_0: import("../list/types.js").ListModelValue) => any;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { StackProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
5
6
|
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
6
8
|
declare const __VLS_base: import("vue").DefineComponent<StackProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<StackProps> & Readonly<{}>, {
|
|
7
9
|
as: import("../../types/shared/props").ComponentAs;
|
|
8
10
|
align: import("./types").Align;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { StepsOption, StepsProps, StepsStatus } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
item?: (props: {
|
|
5
|
+
index: number;
|
|
6
|
+
item: StepsOption;
|
|
7
|
+
status: StepsStatus;
|
|
8
|
+
}) => any;
|
|
9
|
+
};
|
|
9
10
|
};
|
|
11
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
10
12
|
declare const __VLS_base: import("vue").DefineComponent<StepsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
13
|
change: (args_0: number) => any;
|
|
12
14
|
"update:model-value": (args_0: number) => any;
|
|
@@ -51,13 +51,13 @@ const SIZES = {
|
|
|
51
51
|
indicatorSize: "1.25rem",
|
|
52
52
|
indicatorFontSize: "0.6875rem",
|
|
53
53
|
iconSize: "0.75rem",
|
|
54
|
-
titleFontSize: "0.
|
|
54
|
+
titleFontSize: "0.75rem",
|
|
55
55
|
descriptionFontSize: "0.75rem",
|
|
56
56
|
gap: "0.5rem"
|
|
57
57
|
},
|
|
58
58
|
md: {
|
|
59
59
|
indicatorSize: "1.75rem",
|
|
60
|
-
indicatorFontSize: "0.
|
|
60
|
+
indicatorFontSize: "0.75rem",
|
|
61
61
|
iconSize: "0.875rem",
|
|
62
62
|
titleFontSize: "0.875rem",
|
|
63
63
|
descriptionFontSize: "0.75rem",
|
|
@@ -68,7 +68,7 @@ const SIZES = {
|
|
|
68
68
|
indicatorFontSize: "0.9375rem",
|
|
69
69
|
iconSize: "1rem",
|
|
70
70
|
titleFontSize: "1rem",
|
|
71
|
-
descriptionFontSize: "0.
|
|
71
|
+
descriptionFontSize: "0.75rem",
|
|
72
72
|
gap: "0.5rem"
|
|
73
73
|
}
|
|
74
74
|
};
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import type { StickToBottomProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
6
|
+
action?: (props: {
|
|
7
|
+
container: HTMLElement | undefined;
|
|
8
|
+
isAtBottom: boolean;
|
|
9
|
+
scrollToBottom: () => void;
|
|
10
|
+
forceStickToBottom: () => void;
|
|
11
|
+
}) => any;
|
|
12
|
+
};
|
|
11
13
|
};
|
|
14
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
12
15
|
declare const __VLS_base: import("vue").DefineComponent<StickToBottomProps, {
|
|
13
16
|
containerRef: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
14
17
|
contentRef: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
@@ -22,7 +25,7 @@ declare const __VLS_base: import("vue").DefineComponent<StickToBottomProps, {
|
|
|
22
25
|
}, string, import("vue").PublicProps, Readonly<StickToBottomProps> & Readonly<{
|
|
23
26
|
onChange?: ((isAtBottom: boolean) => any) | undefined;
|
|
24
27
|
}>, {
|
|
25
|
-
|
|
28
|
+
disabled: boolean;
|
|
26
29
|
threshold: number;
|
|
27
30
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<script setup>
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { computed, shallowRef, watch } from "vue";
|
|
4
4
|
import { useStickToBottom } from "../../composables/use-stick-to-bottom.js";
|
|
5
5
|
defineOptions({
|
|
6
6
|
name: "PStickToBottom",
|
|
7
7
|
inheritAttrs: false
|
|
8
8
|
});
|
|
9
9
|
const props = defineProps({
|
|
10
|
-
|
|
10
|
+
disabled: {
|
|
11
11
|
type: Boolean,
|
|
12
12
|
required: false,
|
|
13
|
-
default:
|
|
13
|
+
default: false
|
|
14
14
|
},
|
|
15
15
|
threshold: {
|
|
16
16
|
type: Number,
|
|
@@ -24,16 +24,24 @@ const props = defineProps({
|
|
|
24
24
|
Object
|
|
25
25
|
],
|
|
26
26
|
required: false
|
|
27
|
+
},
|
|
28
|
+
wrapperClass: {
|
|
29
|
+
type: [
|
|
30
|
+
String,
|
|
31
|
+
Array,
|
|
32
|
+
Object
|
|
33
|
+
],
|
|
34
|
+
required: false
|
|
27
35
|
}
|
|
28
36
|
});
|
|
29
37
|
const emits = defineEmits(["change"]);
|
|
30
38
|
const containerRef = shallowRef();
|
|
31
39
|
const contentRef = shallowRef();
|
|
32
40
|
const actionRef = shallowRef();
|
|
33
|
-
const
|
|
41
|
+
const wrapperClasses = computed(() => cn("pxd-stick-to-bottom min-h-0 size-full max-w-full overflow-y-auto [overflow-anchor:none]", props.wrapperClass));
|
|
34
42
|
const { isAtBottom, scrollToBottom, forceStickToBottom, stickIfNeeded, update } = useStickToBottom(containerRef, contentRef, {
|
|
35
43
|
threshold: () => props.threshold,
|
|
36
|
-
enabled: () => props.
|
|
44
|
+
enabled: () => !props.disabled,
|
|
37
45
|
action: actionRef
|
|
38
46
|
});
|
|
39
47
|
watch(() => isAtBottom.value, (value) => {
|
|
@@ -51,18 +59,25 @@ defineExpose({
|
|
|
51
59
|
</script>
|
|
52
60
|
|
|
53
61
|
<template>
|
|
54
|
-
<div
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
<div
|
|
63
|
+
data-stick-to-bottom
|
|
64
|
+
class="pxd-stick-to-bottom--root min-h-0 relative w-full max-w-full"
|
|
65
|
+
v-bind="$attrs"
|
|
66
|
+
>
|
|
67
|
+
<div ref="containerRef" :class="wrapperClasses">
|
|
68
|
+
<div ref="contentRef" class="pxd-stick-to-bottom--content" :class="contentClass">
|
|
69
|
+
<slot />
|
|
70
|
+
</div>
|
|
57
71
|
</div>
|
|
58
72
|
|
|
59
73
|
<div
|
|
60
74
|
v-if="$slots.action"
|
|
61
75
|
ref="actionRef"
|
|
62
|
-
class="pxd-stick-to-bottom--action
|
|
76
|
+
class="pxd-stick-to-bottom--action inset-x-0 bottom-1 absolute z-1"
|
|
63
77
|
>
|
|
64
78
|
<slot
|
|
65
79
|
name="action"
|
|
80
|
+
:container="containerRef"
|
|
66
81
|
:is-at-bottom="isAtBottom"
|
|
67
82
|
:scroll-to-bottom="scrollToBottom"
|
|
68
83
|
:force-stick-to-bottom="forceStickToBottom"
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import type { ComponentClass } from '../../types/shared/props'
|
|
2
2
|
|
|
3
3
|
export interface StickToBottomProps {
|
|
4
|
-
|
|
4
|
+
disabled?: boolean
|
|
5
5
|
threshold?: number
|
|
6
6
|
contentClass?: ComponentClass
|
|
7
|
+
wrapperClass?: ComponentClass
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
export interface StickToBottomEmits {
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import type { SwipeCellCloseTrigger, SwipeCellProps, SwipeCellSide } from './types';
|
|
2
2
|
declare function close(trigger?: SwipeCellCloseTrigger): Promise<boolean>;
|
|
3
|
-
declare
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
3
|
+
declare const __VLS_template: () => {
|
|
4
|
+
__VLS_Slots: {
|
|
5
|
+
prefix?: (props: {
|
|
6
|
+
side: SwipeCellSide;
|
|
7
|
+
active: boolean;
|
|
8
|
+
distance: number;
|
|
9
|
+
progress: number;
|
|
10
|
+
overSwipe: boolean;
|
|
11
|
+
}) => any;
|
|
12
|
+
} & {
|
|
13
|
+
default?: (props: {}) => any;
|
|
14
|
+
} & {
|
|
15
|
+
suffix?: (props: {
|
|
16
|
+
side: SwipeCellSide;
|
|
17
|
+
active: boolean;
|
|
18
|
+
distance: number;
|
|
19
|
+
progress: number;
|
|
20
|
+
overSwipe: boolean;
|
|
21
|
+
}) => any;
|
|
22
|
+
};
|
|
22
23
|
};
|
|
24
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
23
25
|
declare const __VLS_base: import("vue").DefineComponent<SwipeCellProps, {
|
|
24
26
|
close: typeof close;
|
|
25
27
|
open: (side: SwipeCellSide) => Promise<boolean>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { SwitchProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
5
6
|
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
6
8
|
declare const __VLS_base: import("vue").DefineComponent<SwitchProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
9
|
change: (args_0: NonNullable<string | number | undefined>) => any;
|
|
8
10
|
"update:model-value": (args_0: NonNullable<string | number | undefined>) => any;
|
|
@@ -40,7 +40,7 @@ const props = defineProps({
|
|
|
40
40
|
});
|
|
41
41
|
const emits = defineEmits(["change", "update:model-value"]);
|
|
42
42
|
const SIZES = {
|
|
43
|
-
sm: `${BASIC_HEIGHTS.sm} text-
|
|
43
|
+
sm: `${BASIC_HEIGHTS.sm} text-sm`,
|
|
44
44
|
md: `${BASIC_HEIGHTS.md} text-sm`,
|
|
45
45
|
lg: `${BASIC_HEIGHTS.lg} text-base`
|
|
46
46
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { SwitchItemProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
5
6
|
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
6
8
|
declare const __VLS_base: import("vue").DefineComponent<SwitchItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<SwitchItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
9
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
8
10
|
declare const _default: typeof __VLS_export;
|
|
@@ -309,5 +309,5 @@ onBeforeUnmount(() => {
|
|
|
309
309
|
</template>
|
|
310
310
|
|
|
311
311
|
<style>
|
|
312
|
-
.pxd-tabs--header[data-variant=default]{box-shadow:0 -1px 0 0 var(--color-border) inset;padding-bottom:1px}.pxd-tabs--header[data-variant=default]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--scroll{margin-bottom:-1px}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav{gap:1.5rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item{border-bottom:.125rem solid transparent;padding:.875rem .375rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item:not(:disabled){color:var(--color-gray-900)}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item[aria-selected=true]{border-color:currentColor;color:var(--color-primary)}.pxd-tabs--header[data-variant=secondary]+.pxd-tabs--content{padding-top:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav{gap:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);font-size:.
|
|
312
|
+
.pxd-tabs--header[data-variant=default]{box-shadow:0 -1px 0 0 var(--color-border) inset;padding-bottom:1px}.pxd-tabs--header[data-variant=default]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--scroll{margin-bottom:-1px}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav{gap:1.5rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item{border-bottom:.125rem solid transparent;padding:.875rem .375rem}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item:not(:disabled){color:var(--color-gray-900)}.pxd-tabs--header[data-variant=default] .pxd-tabs--nav-item[aria-selected=true]{border-color:currentColor;color:var(--color-primary)}.pxd-tabs--header[data-variant=secondary]+.pxd-tabs--content{padding-top:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav{gap:.5rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);font-size:.75rem;height:1.5rem;padding:0 .375rem}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item:disabled{background-color:var(--color-gray-100)}.pxd-tabs--header[data-variant=secondary] .pxd-tabs--nav-item[aria-selected=true]{background-color:var(--color-primary);color:var(--color-gray-100)}.pxd-tabs--header[data-variant=segmented]{background-color:var(--color-gray-alpha-200);border-radius:var(--radius-md);color:var(--color-gray-800);padding:.25rem;width:-moz-max-content;width:max-content}.pxd-tabs--header[data-variant=segmented]+.pxd-tabs--content{padding-top:.75rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--arrow{border-width:0}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav{gap:.25rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item{border-radius:var(--radius-sm);height:1.5rem;padding:0 .5rem}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item:hover{color:var(--color-foreground)}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item:disabled{color:var(--color-gray-500)}.pxd-tabs--header[data-variant=segmented] .pxd-tabs--nav-item[aria-selected=true]{background-color:var(--color-background-100);box-shadow:var(--shadow-small);color:var(--color-foreground)}
|
|
313
313
|
</style>
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { TeleportProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} & {
|
|
6
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
6
|
+
default?: (props: {}) => any;
|
|
7
|
+
};
|
|
7
8
|
};
|
|
9
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
10
|
declare const __VLS_base: import("vue").DefineComponent<TeleportProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TeleportProps> & Readonly<{}>, {
|
|
9
11
|
to: string | object;
|
|
10
12
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { TextProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
default?: (props: {}) => any;
|
|
5
|
+
};
|
|
5
6
|
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
6
8
|
declare const __VLS_base: import("vue").DefineComponent<TextProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<TextProps> & Readonly<{}>, {
|
|
7
9
|
as: import("../../types/shared/props.js").ComponentAs;
|
|
8
10
|
align: "center" | "left" | "right";
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { TimePickerProps } from './types';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
suffix?: (props: {}) => any;
|
|
5
|
+
};
|
|
5
6
|
};
|
|
7
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
6
8
|
declare const __VLS_base: import("vue").DefineComponent<TimePickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
9
|
change: (args_0: import("../../types/shared/props.js").ComponentDateTimeValue) => any;
|
|
8
10
|
"update:model-value": (args_0: import("../../types/shared/props.js").ComponentDateTimeValue) => any;
|
|
@@ -305,16 +305,11 @@ onBeforeUnmount(() => {
|
|
|
305
305
|
|
|
306
306
|
<template #content>
|
|
307
307
|
<div class="p-1.5 gap-1 flex items-center justify-between border-b" @click.stop>
|
|
308
|
-
<PButton
|
|
309
|
-
size="xs"
|
|
310
|
-
variant="ghost"
|
|
311
|
-
class="sm:px-0.5 rounded-md text-[0.8125rem]"
|
|
312
|
-
@click="onCancelClick"
|
|
313
|
-
>
|
|
308
|
+
<PButton size="xs" variant="ghost" class="rounded-md" @click="onCancelClick">
|
|
314
309
|
{{ configProvider.locale.interaction.cancel }}
|
|
315
310
|
</PButton>
|
|
316
311
|
|
|
317
|
-
<PButton size="xs" variant="ghost" class="
|
|
312
|
+
<PButton size="xs" variant="ghost" class="rounded-md" @click="onSetNowClick">
|
|
318
313
|
{{ configProvider.locale.date.now }}
|
|
319
314
|
</PButton>
|
|
320
315
|
</div>
|
|
@@ -383,7 +378,7 @@ onBeforeUnmount(() => {
|
|
|
383
378
|
v-for="(preset, i) in presets"
|
|
384
379
|
:key="preset.label"
|
|
385
380
|
:data-index="i"
|
|
386
|
-
class="px-1.5 py-0.5
|
|
381
|
+
class="px-1.5 py-0.5 leading-4 text-xs cursor-pointer appearance-none rounded-sm border-none bg-gray-300 font-inherit whitespace-nowrap text-foreground self-focus-ring outline-none hover:bg-gray-400 active:bg-gray-500 motion-safe:transition-colors"
|
|
387
382
|
>
|
|
388
383
|
{{ preset.label }}
|
|
389
384
|
</button>
|