@vamos-ui/react 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/blocks/block-heading.js +1 -1
- package/dist/blocks/block-image.js +1 -1
- package/dist/blocks/block-link.js +2 -2
- package/dist/blocks/index.d.ts +5 -5
- package/dist/blocks/index.js +5 -5
- package/dist/blocks/labels.d.ts +8 -0
- package/dist/blocks/labels.js +60 -0
- package/dist/blocks/section-header.js +1 -1
- package/dist/blocks/section.js +2 -2
- package/dist/blocks/site/_kit-1.js +1 -1
- package/dist/blocks/site/announcement-bar.js +1 -1
- package/dist/blocks/site/article-layout.d.ts +1 -0
- package/dist/blocks/site/article-layout.js +2 -1
- package/dist/blocks/site/blog-list.d.ts +1 -0
- package/dist/blocks/site/blog-list.js +3 -2
- package/dist/blocks/site/contact-dock.js +3 -1
- package/dist/blocks/site/contact-form.js +1 -1
- package/dist/blocks/site/cta.d.ts +2 -2
- package/dist/blocks/site/cta.js +6 -4
- package/dist/blocks/site/feature-grid.d.ts +1 -0
- package/dist/blocks/site/feature-grid.js +5 -4
- package/dist/blocks/site/feature-tabs.js +1 -1
- package/dist/blocks/site/footer.d.ts +11 -2
- package/dist/blocks/site/footer.js +36 -11
- package/dist/blocks/site/gallery-section.d.ts +6 -1
- package/dist/blocks/site/gallery-section.js +5 -4
- package/dist/blocks/site/hero.d.ts +3 -2
- package/dist/blocks/site/hero.js +7 -5
- package/dist/blocks/site/logo-strip.d.ts +1 -0
- package/dist/blocks/site/logo-strip.js +1 -1
- package/dist/blocks/site/map-hours.d.ts +2 -2
- package/dist/blocks/site/map-hours.js +4 -2
- package/dist/blocks/site/media-text.d.ts +4 -1
- package/dist/blocks/site/media-text.js +4 -3
- package/dist/blocks/site/menu-list.d.ts +7 -3
- package/dist/blocks/site/menu-list.js +34 -7
- package/dist/blocks/site/navbar.d.ts +1 -0
- package/dist/blocks/site/navbar.js +6 -5
- package/dist/blocks/site/not-found.js +2 -1
- package/dist/blocks/site/page-intro.d.ts +1 -0
- package/dist/blocks/site/page-intro.js +2 -1
- package/dist/blocks/site/process.d.ts +1 -0
- package/dist/blocks/site/process.js +2 -1
- package/dist/blocks/site/registry-1.d.ts +1 -1
- package/dist/blocks/site/registry-2.d.ts +5 -0
- package/dist/blocks/site/registry-2.js +5 -3
- package/dist/blocks/site/rich-text-section.js +2 -1
- package/dist/blocks/site/shared/heading-lines.d.ts +9 -0
- package/dist/blocks/site/shared/heading-lines.js +32 -0
- package/dist/blocks/site/shared/image-sizes.d.ts +25 -0
- package/dist/blocks/site/shared/image-sizes.js +37 -0
- package/dist/blocks/site/shared/island-keys.d.ts +1 -1
- package/dist/blocks/site/shared/island-keys.js +1 -1
- package/dist/blocks/site/shared/labels-2.d.ts +17 -1
- package/dist/blocks/site/shared/labels-2.js +832 -6
- package/dist/blocks/site/shared/open-now.d.ts +1 -1
- package/dist/blocks/site/shared/open-now.js +1 -1
- package/dist/blocks/site/shared/opening-hours.d.ts +18 -2
- package/dist/blocks/site/shared/opening-hours.js +36 -7
- package/dist/blocks/site/shared/tap.d.ts +9 -0
- package/dist/blocks/site/shared/tap.js +16 -0
- package/dist/blocks/site/site-shell.js +3 -3
- package/dist/blocks/site/team.d.ts +1 -1
- package/dist/blocks/site/team.js +4 -3
- package/dist/blocks/site/testimonials.d.ts +2 -2
- package/dist/blocks/site/testimonials.js +3 -3
- package/dist/business/approval-flow.js +2 -2
- package/dist/business/import-wizard.js +1 -1
- package/dist/business/line-items.js +1 -1
- package/dist/business/multi-step-form.js +2 -2
- package/dist/business/permission-matrix.js +1 -1
- package/dist/business/setup-checklist.js +2 -2
- package/dist/business/signer-status.js +1 -1
- package/dist/charts/bar-chart.js +1 -1
- package/dist/charts/bar-list.js +1 -1
- package/dist/charts/chart-shell.d.ts +9 -2
- package/dist/charts/chart-shell.js +11 -5
- package/dist/charts/chart.js +1 -1
- package/dist/charts/combo-chart.js +5 -7
- package/dist/charts/donut-chart.js +1 -1
- package/dist/charts/funnel.js +1 -1
- package/dist/charts/gauge.js +2 -2
- package/dist/charts/utils.d.ts +10 -0
- package/dist/charts/utils.js +46 -0
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +8 -8
- package/dist/components/activity-timeline.js +11 -11
- package/dist/components/address-field.js +3 -3
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +8 -8
- package/dist/components/alert.js +2 -2
- package/dist/components/app-shell.js +3 -3
- package/dist/components/aspect-ratio.d.ts +26 -0
- package/dist/components/aspect-ratio.js +42 -0
- package/dist/components/attachment-list.js +2 -2
- package/dist/components/audit-log.js +1 -1
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +8 -8
- package/dist/components/backup-codes.js +1 -1
- package/dist/components/badge.js +3 -3
- package/dist/components/breadcrumb.js +10 -9
- package/dist/components/button-group.js +4 -4
- package/dist/components/button.js +4 -4
- package/dist/components/calendar.js +5 -5
- package/dist/components/card.js +8 -8
- package/dist/components/carousel.d.ts +12 -3
- package/dist/components/carousel.js +17 -14
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +6 -6
- package/dist/components/collapsible.d.ts +36 -0
- package/dist/components/collapsible.js +37 -0
- package/dist/components/color-picker.js +3 -3
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.js +9 -9
- package/dist/components/comment-thread.js +3 -3
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.js +9 -9
- package/dist/components/currency-input.js +1 -1
- package/dist/components/date-picker.js +2 -2
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/description-list.js +2 -2
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +9 -9
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +9 -9
- package/dist/components/editor-layout.js +9 -9
- package/dist/components/empty-state.js +2 -2
- package/dist/components/entity-card.js +1 -1
- package/dist/components/file-upload.js +5 -5
- package/dist/components/formatted-input.js +3 -3
- package/dist/components/hierarchy-chart.js +1 -1
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.js +3 -3
- package/dist/components/iban-input.js +1 -1
- package/dist/components/id-input.js +3 -3
- package/dist/components/image.d.ts +18 -2
- package/dist/components/image.js +16 -9
- package/dist/components/input-otp.js +6 -6
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +6 -6
- package/dist/components/item.js +4 -4
- package/dist/components/kbd.js +3 -3
- package/dist/components/list-layout.js +9 -9
- package/dist/components/menubar.d.ts +96 -0
- package/dist/components/menubar.js +123 -0
- package/dist/components/native-select.js +1 -1
- package/dist/components/navigation-menu.d.ts +1 -1
- package/dist/components/navigation-menu.js +12 -11
- package/dist/components/notification-center.js +4 -4
- package/dist/components/page-header.js +3 -3
- package/dist/components/pagination.js +9 -9
- package/dist/components/phone-input.js +1 -1
- package/dist/components/pin-map.js +1 -1
- package/dist/components/placeholder-art.d.ts +51 -0
- package/dist/components/placeholder-art.js +82 -0
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +7 -7
- package/dist/components/progress.js +3 -3
- package/dist/components/qr-code.js +1 -1
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +4 -4
- package/dist/components/record-detail-layout.js +10 -10
- package/dist/components/record-picker.js +2 -2
- package/dist/components/resizable.js +2 -2
- package/dist/components/scroll-area.d.ts +1 -1
- package/dist/components/scroll-area.js +4 -4
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +10 -10
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +3 -3
- package/dist/components/settings-layout.js +6 -6
- package/dist/components/sheet.js +3 -3
- package/dist/components/sidebar.js +12 -11
- package/dist/components/signature-pad.js +1 -1
- package/dist/components/skeleton.js +5 -5
- package/dist/components/sla-timer.js +2 -2
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +2 -2
- package/dist/components/slug-input.js +1 -1
- package/dist/components/sparkline.js +1 -1
- package/dist/components/spinner.js +2 -2
- package/dist/components/stat.js +5 -5
- package/dist/components/status-picker.js +2 -2
- package/dist/components/stepper.js +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +3 -3
- package/dist/components/table.js +10 -10
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +11 -11
- package/dist/components/tag-input.js +1 -1
- package/dist/components/task-list.js +1 -1
- package/dist/components/time-picker.js +3 -3
- package/dist/components/toggle.d.ts +2 -1
- package/dist/components/toggle.js +7 -6
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +5 -4
- package/dist/components/top-bar.js +4 -4
- package/dist/components/tour.js +1 -1
- package/dist/components/tree-select.js +2 -2
- package/dist/components/tree-view.js +3 -3
- package/dist/components/typography.js +11 -11
- package/dist/components/user-picker.js +2 -2
- package/dist/components/version-history.js +3 -3
- package/dist/data-table/data-table.js +1 -1
- package/dist/data-table/filter-bar.js +2 -2
- package/dist/data-table/index.d.ts +15 -8
- package/dist/data-table/index.js +9 -8
- package/dist/data-table/saved-views.js +1 -1
- package/dist/editor/block-editor.js +1 -1
- package/dist/editor/context.js +1 -1
- package/dist/editor/menus.js +1 -1
- package/dist/fonts/font-picker.js +3 -3
- package/dist/fonts/pairing-picker.js +1 -1
- package/dist/fonts/provider.js +1 -1
- package/dist/index.d.ts +188 -90
- package/dist/index.js +94 -90
- package/dist/lib/data-islands.js +1 -1
- package/dist/lib/field-context.js +1 -1
- package/dist/lib/floating-arrow.js +1 -1
- package/dist/lib/islands.js +1 -1
- package/dist/lib/layer.js +3 -3
- package/dist/lib/locale.js +2 -2
- package/dist/lib/menu.js +2 -2
- package/dist/lib/provider.js +4 -4
- package/dist/lib/theme-scope.js +4 -3
- package/dist/lib/value-format.js +1 -1
- package/dist/lib/variants.js +2 -2
- package/dist/locales/ar.d.ts +2087 -0
- package/dist/locales/ar.js +2088 -0
- package/dist/locales/de.d.ts +2087 -0
- package/dist/locales/de.js +2088 -0
- package/dist/locales/en.d.ts +1 -0
- package/dist/locales/en.js +1 -0
- package/dist/locales/es.d.ts +2087 -0
- package/dist/locales/es.js +2087 -0
- package/dist/locales/fr.d.ts +2087 -0
- package/dist/locales/fr.js +2088 -0
- package/dist/locales/tr.d.ts +1 -0
- package/dist/locales/tr.js +1 -0
- package/dist/media/focal-point.js +1 -1
- package/dist/media/gallery.js +1 -1
- package/dist/media/image-cropper.js +1 -1
- package/dist/media/image-field.js +2 -2
- package/dist/media/lightbox.js +4 -3
- package/dist/media/link-preview.js +3 -3
- package/dist/media/media-library.js +4 -4
- package/dist/media/media-picker.js +1 -1
- package/dist/media/media-provider.js +1 -1
- package/dist/media/video-player.js +4 -4
- package/dist/motion/count-up.js +1 -1
- package/dist/motion/motion-scope.js +2 -2
- package/dist/motion/page-transition.js +1 -1
- package/dist/motion/parallax.js +2 -2
- package/dist/motion/pointer.js +3 -3
- package/dist/motion/reveal.js +3 -3
- package/dist/motion/skeleton-swap.js +1 -1
- package/dist/motion/text-reveal.d.ts +3 -1
- package/dist/motion/text-reveal.js +6 -4
- package/dist/motion/ticker.js +1 -1
- package/dist/node_modules/.vite/vitest/da39a3ee5e6b4b0d3255bfef95601890afd80709/results.json +1 -0
- package/dist/render/block-renderer.js +1 -1
- package/dist/scheduler/gantt.js +2 -2
- package/dist/scheduler/resource-calendar.js +2 -2
- package/dist/scheduler/scheduler.js +3 -3
- package/dist/scheduler/time-tracker.js +4 -4
- package/dist/sortable/kanban.js +2 -2
- package/dist/sortable/sortable-list.js +2 -2
- package/dist/sortable/sortable.js +4 -4
- package/dist/styles/blocks.css +18 -9
- package/dist/styles/editors.css +2 -1
- package/dist/styles/media.css +31 -5
- package/dist/styles.css +39 -9
- package/package.json +1 -1
package/dist/locales/tr.d.ts
CHANGED
package/dist/locales/tr.js
CHANGED
|
@@ -26,7 +26,7 @@ const round = (n) => Math.round(n * 1000) / 1000;
|
|
|
26
26
|
* <FocalPointPicker src={asset} defaultValue={asset.focalPoint} onValueCommit={(focalPoint) => adapter.update(asset.id, { focalPoint })} />
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
|
-
export const FocalPointPicker = React.forwardRef(function FocalPointPicker({ src, value, defaultValue, onValueChange, onValueCommit, previews = ["1/1", "16/9", "4/5"], maxHeight = "20rem", disabled, labels, className, ...props }, ref) {
|
|
29
|
+
export const FocalPointPicker = /*#__PURE__*/ React.forwardRef(function FocalPointPicker({ src, value, defaultValue, onValueChange, onValueCommit, previews = ["1/1", "16/9", "4/5"], maxHeight = "20rem", disabled, labels, className, ...props }, ref) {
|
|
30
30
|
const t = useLabels("focalPoint", focalLabels, labels);
|
|
31
31
|
const { locale } = useLocale();
|
|
32
32
|
const [point, setPoint] = useControllableState({ value, defaultValue: defaultValue ?? (isMediaAsset(src) ? src.focalPoint : undefined) ?? { x: 0.5, y: 0.5 }, onChange: onValueChange, name: "FocalPointPicker" });
|
package/dist/media/gallery.js
CHANGED
|
@@ -25,7 +25,7 @@ const galleryLabels = {
|
|
|
25
25
|
loading: "Loading images",
|
|
26
26
|
video: "Video",
|
|
27
27
|
};
|
|
28
|
-
export const galleryVariants = cva("vui-gallery @container/gallery min-w-0", {
|
|
28
|
+
export const galleryVariants = /*#__PURE__*/ cva("vui-gallery @container/gallery min-w-0", {
|
|
29
29
|
variants: {
|
|
30
30
|
gap: { sm: "[--gallery-gap:0.375rem]", md: "[--gallery-gap:0.75rem]", lg: "[--gallery-gap:1.25rem]" },
|
|
31
31
|
},
|
|
@@ -61,7 +61,7 @@ export function formatAspectRatio(value, locale = "en-US") {
|
|
|
61
61
|
* <ImageCropper src={asset} defaultAspect={1.91} onChange={(rect) => adapter.update(asset.id, { crops: { ...asset.crops, og: rect } })} />
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
|
-
export const ImageCropper = React.forwardRef(function ImageCropper({ src, value, defaultValue, onChange, aspect: aspectProp, defaultAspect, onAspectChange, presets: presetsProp, shape = "rect", grid = true, minZoom = 1, maxZoom = 4, toolbar = true, transform = true, height = "22rem", labels, className, ...props }, ref) {
|
|
64
|
+
export const ImageCropper = /*#__PURE__*/ React.forwardRef(function ImageCropper({ src, value, defaultValue, onChange, aspect: aspectProp, defaultAspect, onAspectChange, presets: presetsProp, shape = "rect", grid = true, minZoom = 1, maxZoom = 4, toolbar = true, transform = true, height = "22rem", labels, className, ...props }, ref) {
|
|
65
65
|
const t = useLabels("imageCropper", cropperLabels, labels);
|
|
66
66
|
const { locale } = useLocale();
|
|
67
67
|
const url = isMediaAsset(src) ? src.url : src;
|
|
@@ -54,7 +54,7 @@ const fieldLabels = {
|
|
|
54
54
|
pickerTitle: "Select image",
|
|
55
55
|
pickerConfirm: "Use image",
|
|
56
56
|
};
|
|
57
|
-
export const imageFieldVariants = cva("vui-image-field group/imgfield relative grid min-w-0 gap-2", {
|
|
57
|
+
export const imageFieldVariants = /*#__PURE__*/ cva("vui-image-field group/imgfield relative grid min-w-0 gap-2", {
|
|
58
58
|
variants: {
|
|
59
59
|
size: { sm: "w-24", md: "w-full max-w-[22rem]", full: "w-full" },
|
|
60
60
|
layout: { stacked: "", inline: "grid-cols-[auto_minmax(0,1fr)] items-start gap-x-4" },
|
|
@@ -75,7 +75,7 @@ const ratioOf = (aspect, a) => aspectRatioOf(aspect ?? "auto", a?.width, a?.heig
|
|
|
75
75
|
* </Field>
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
-
export const ImageField = React.forwardRef(function ImageField(props, ref) {
|
|
78
|
+
export const ImageField = /*#__PURE__*/ React.forwardRef(function ImageField(props, ref) {
|
|
79
79
|
const { value: valueProp, defaultValue, onChange, adapter: adapterProp, aspect: aspectProp, cropPresets, recommended, shape = "rect", size = "md", layout = "stacked", focal: focalEnabled = shape !== "round", crop: cropMode = true, requireAlt = false, accept = "image/*", name, className, labels, } = props;
|
|
80
80
|
const control = useFieldControl({ id: props.id, "aria-describedby": props["aria-describedby"], disabled: props.disabled, readOnly: props.readOnly, required: props.required, "aria-invalid": props.invalid || undefined });
|
|
81
81
|
const disabled = Boolean(control.disabled);
|
package/dist/media/lightbox.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as DialogPrimitive from "radix-ui/dialog";
|
|
5
|
+
import * as Slot from "radix-ui/slot";
|
|
5
6
|
import { Download, ImageOff, Info, X, ZoomIn, ZoomOut } from "lucide-react";
|
|
6
7
|
import { cn } from "../lib/cn.js";
|
|
7
8
|
import { useLabels } from "../lib/labels.js";
|
|
@@ -38,7 +39,7 @@ const lightboxLabels = {
|
|
|
38
39
|
noAlt: "Missing alt text",
|
|
39
40
|
decorative: "Decorative (no alt text)",
|
|
40
41
|
};
|
|
41
|
-
const LightboxContext = React.createContext(null);
|
|
42
|
+
const LightboxContext = /*#__PURE__*/ React.createContext(null);
|
|
42
43
|
/** Open / close the surrounding `Lightbox` from custom triggers. */
|
|
43
44
|
export function useLightbox() {
|
|
44
45
|
const ctx = React.useContext(LightboxContext);
|
|
@@ -75,7 +76,7 @@ export function Lightbox({ items, open: openProp, defaultOpen = false, onOpenCha
|
|
|
75
76
|
return (_jsxs(LightboxContext.Provider, { value: ctx, children: [children, _jsx(DialogPrimitive.Root, { open: open, onOpenChange: setOpen, children: _jsx(LightboxViewer, { items: items, index: Math.min(Math.max(0, index), Math.max(0, items.length - 1)), setIndex: setIndex, zoom: zoom, thumbnails: thumbnails ?? items.length > 1, download: download, info: info, loop: loop, backdrop: backdrop, chrome: chrome, labels: labels, returnFocus: returnFocus }) })] }));
|
|
76
77
|
}
|
|
77
78
|
/** Opens the surrounding Lightbox at `index`. Renders a button (or the child with `asChild`). */
|
|
78
|
-
export const LightboxTrigger = React.forwardRef(function LightboxTrigger({ index, asChild, onClick, className, type, ...props }, ref) {
|
|
79
|
+
export const LightboxTrigger = /*#__PURE__*/ React.forwardRef(function LightboxTrigger({ index, asChild, onClick, className, type, ...props }, ref) {
|
|
79
80
|
const lb = useLightbox();
|
|
80
81
|
const Comp = asChild ? Slot.Root : "button";
|
|
81
82
|
return (_jsx(Comp, { ref: ref, type: asChild ? undefined : type ?? "button", "data-slot": "lightbox-trigger", "aria-haspopup": "dialog", className: cn(!asChild && "focus-ring block cursor-zoom-in rounded-[inherit]", className), onClick: (e) => {
|
|
@@ -85,7 +85,7 @@ function highlight(text, term, locale) {
|
|
|
85
85
|
* How a page appears in a search result on desktop or mobile, with pixel-accurate truncation
|
|
86
86
|
* (`measureSerp`) and keyword bolding.
|
|
87
87
|
*/
|
|
88
|
-
export const SearchPreview = React.forwardRef(function SearchPreview({ data, device = "desktop", highlight: term, appearance = "auto", size = "md", labels, className, ...props }, ref) {
|
|
88
|
+
export const SearchPreview = /*#__PURE__*/ React.forwardRef(function SearchPreview({ data, device = "desktop", highlight: term, appearance = "auto", size = "md", labels, className, ...props }, ref) {
|
|
89
89
|
const t = useLabels("linkPreview", previewLabels, labels);
|
|
90
90
|
const { locale } = useLocale();
|
|
91
91
|
const { host, path } = parseUrl(data.url);
|
|
@@ -103,7 +103,7 @@ export const SearchPreview = React.forwardRef(function SearchPreview({ data, dev
|
|
|
103
103
|
const TARGET_RATIO = { facebook: 1.91, linkedin: 1.91, x: 1.91, whatsapp: 1.91, slack: 1.91 };
|
|
104
104
|
const MIN_SIZE = { width: 1200, height: 630 };
|
|
105
105
|
/** How a shared link unfurls on Facebook, LinkedIn, X, WhatsApp or Slack, with image warnings. */
|
|
106
|
-
export const SocialCardPreview = React.forwardRef(function SocialCardPreview({ data, platform, appearance = "auto", size = "md", hideWarnings, labels, className, ...props }, ref) {
|
|
106
|
+
export const SocialCardPreview = /*#__PURE__*/ React.forwardRef(function SocialCardPreview({ data, platform, appearance = "auto", size = "md", hideWarnings, labels, className, ...props }, ref) {
|
|
107
107
|
const t = useLabels("linkPreview", previewLabels, labels);
|
|
108
108
|
const { locale } = useLocale();
|
|
109
109
|
const { host } = parseUrl(data.url);
|
|
@@ -149,7 +149,7 @@ export const SocialCardPreview = React.forwardRef(function SocialCardPreview({ d
|
|
|
149
149
|
* Characters (graphemes) and, for SEO fields, rendered pixels against the limit, said in words
|
|
150
150
|
* too ("58 of 60 characters, 540 of 600 px: good"), never by colour alone.
|
|
151
151
|
*/
|
|
152
|
-
export const LengthMeter = React.forwardRef(function LengthMeter({ value, max: maxProp, min: minProp, field, device = "desktop", label, labels, className, ...props }, ref) {
|
|
152
|
+
export const LengthMeter = /*#__PURE__*/ React.forwardRef(function LengthMeter({ value, max: maxProp, min: minProp, field, device = "desktop", label, labels, className, ...props }, ref) {
|
|
153
153
|
const t = useLabels("linkPreview", previewLabels, labels);
|
|
154
154
|
const { locale } = useLocale();
|
|
155
155
|
const nf = new Intl.NumberFormat(locale);
|
|
@@ -167,7 +167,7 @@ export function MediaThumb({ asset, className, rounded = "ui" }) {
|
|
|
167
167
|
}
|
|
168
168
|
const dimensions = (a, nf) => (a.width && a.height ? `${nf.format(a.width)} × ${nf.format(a.height)}` : "—");
|
|
169
169
|
/** Per-file progress with cancel, retry and the reason a file failed; a polite live summary. */
|
|
170
|
-
export const MediaUploadQueue = React.forwardRef(function MediaUploadQueue({ queue, variant = "inline", labels, className, ...props }, ref) {
|
|
170
|
+
export const MediaUploadQueue = /*#__PURE__*/ React.forwardRef(function MediaUploadQueue({ queue, variant = "inline", labels, className, ...props }, ref) {
|
|
171
171
|
const t = useLabels("mediaUploadQueue", queueLabels, labels);
|
|
172
172
|
const f = useFormat();
|
|
173
173
|
if (!queue.items.length)
|
|
@@ -186,7 +186,7 @@ function MediaUploadRow({ item, queue, t }) {
|
|
|
186
186
|
* Preview, editable metadata with autosave (alt text, decorative, title, caption, description),
|
|
187
187
|
* focal point, file info, usage and actions. The body of the library's details panel.
|
|
188
188
|
*/
|
|
189
|
-
export const MediaDetails = React.forwardRef(function MediaDetails({ asset, adapter: adapterProp, onChange, onDelete, onClose, readOnly: readOnlyProp, autosaveDelay = 700, labels, className, ...props }, ref) {
|
|
189
|
+
export const MediaDetails = /*#__PURE__*/ React.forwardRef(function MediaDetails({ asset, adapter: adapterProp, onChange, onDelete, onClose, readOnly: readOnlyProp, autosaveDelay = 700, labels, className, ...props }, ref) {
|
|
190
190
|
const t = useLabels("mediaDetails", detailsLabels, labels);
|
|
191
191
|
const f = useFormat();
|
|
192
192
|
const { locale } = useLocale();
|
|
@@ -310,7 +310,7 @@ const GRID_GAP = 12;
|
|
|
310
310
|
* Keyboard (grid): arrows move, Space selects, Shift + arrows extends, Ctrl/⌘ + A selects all,
|
|
311
311
|
* Enter opens details, Delete asks to delete, Esc clears the selection.
|
|
312
312
|
*/
|
|
313
|
-
export const MediaLibrary = React.forwardRef(function MediaLibrary({ adapter: adapterProp, view: viewProp, defaultView = "grid", onViewChange, query: queryProp, defaultQuery, onQueryChange, selection = "multiple", selected: selectedProp, defaultSelected, onSelectedChange, accept, max, detailsPanel = "side", folders: foldersMode, pageSize = 60, tileSize = "md", height = "34rem", virtualizeAfter = 120, readOnly: readOnlyProp, selectUploaded = false, maxDimension, emptyState, searchRef, toolbar = true, onDeleted, handleRef, labels, queueLabels: queueLabelsProp, detailsLabels: detailsLabelsProp, className, ...props }, ref) {
|
|
313
|
+
export const MediaLibrary = /*#__PURE__*/ React.forwardRef(function MediaLibrary({ adapter: adapterProp, view: viewProp, defaultView = "grid", onViewChange, query: queryProp, defaultQuery, onQueryChange, selection = "multiple", selected: selectedProp, defaultSelected, onSelectedChange, accept, max, detailsPanel = "side", folders: foldersMode, pageSize = 60, tileSize = "md", height = "34rem", virtualizeAfter = 120, readOnly: readOnlyProp, selectUploaded = false, maxDimension, emptyState, searchRef, toolbar = true, onDeleted, handleRef, labels, queueLabels: queueLabelsProp, detailsLabels: detailsLabelsProp, className, ...props }, ref) {
|
|
314
314
|
const t = useLabels("mediaLibrary", libraryLabels, labels);
|
|
315
315
|
const tq = useLabels("mediaUploadQueue", queueLabels, queueLabelsProp);
|
|
316
316
|
const f = useFormat();
|
|
@@ -717,7 +717,7 @@ export const MediaLibrary = React.forwardRef(function MediaLibrary({ adapter: ad
|
|
|
717
717
|
const isSel = selected.includes(a.id);
|
|
718
718
|
const disabled = isDisabled(a);
|
|
719
719
|
const missing = isAltMissing(a);
|
|
720
|
-
return (_jsxs("div", { role: "gridcell", "data-tile": index, "data-slot": "media-tile", "data-selected": isSel ? "" : undefined, "data-active": activeId === a.id ? "" : undefined, "aria-selected": selection === "none" ? undefined : isSel, "aria-disabled": disabled || undefined, "aria-label": [a.filename, missing ? t("missingAlt") : null, a.status === "processing" ? t("processing") : a.status === "failed" ? t("failed") : null].filter(Boolean).join(", "), tabIndex: index === focusIndex ? 0 : -1, onClick: (e) => onTileClick(e, index), onDoubleClick: () => detailsPanel && openDetails(a), onFocus: () => setFocusIndex(index), className: cn("vui-media-tile group/tile focus-ring relative grid min-w-0 cursor-pointer gap-1.5 rounded-ui outline-none", disabled && "cursor-not-allowed opacity-45"), children: [_jsxs("div", { className: "vui-media-tile-frame relative overflow-hidden rounded-ui bg-surface-2", children: [_jsx(MediaThumb, { asset: a, rounded: "none" }), a.kind === "video" && a.duration ? _jsx("span", { className: "tabular absolute end-1.5 bottom-1.5 rounded-sm bg-[color-mix(in_srgb,var(--scene)_82%,transparent)] px-1.5 py-0.5 text-[10.5px] font-medium text-fg", children: f.duration(a.duration) }) : null, a.status === "failed" ? _jsx(Badge, { tone: "danger", className: "absolute start-1.5 top-1.5", children: t("failed") }) : null, missing ? _jsx("span", { "aria-hidden": true, title: t("missingAlt"), className: "vui-media-alt-dot absolute end-2 top-2 size-2 rounded-full bg-warning" }) : null, selection !== "none" ? (_jsx("span", { "aria-hidden": true, "data-slot": "media-tile-check", className: cn("vui-media-check absolute start-1.5 top-1.5 flex size-5 items-center justify-center rounded-full", isSel ? "bg-accent text-accent-fg" : "border border-[color-mix(in_srgb,var(--fg)_30%,transparent)] bg-[color-mix(in_srgb,var(--scene)_70%,transparent)] text-transparent"), children: _jsx(Check, { className: "size-3", strokeWidth: 3 }) })) : null] }), _jsx("span", { className: cn("truncate px-0.5 text-[12px] leading-tight", isSel ? "text-fg" : "text-fg-muted"), children: a.filename })] }, a.id));
|
|
720
|
+
return (_jsxs("div", { role: "gridcell", "data-tile": index, "data-slot": "media-tile", "data-selected": isSel ? "" : undefined, "data-active": activeId === a.id ? "" : undefined, "aria-selected": selection === "none" ? undefined : isSel, "aria-disabled": disabled || undefined, "aria-label": [a.filename, a.kind === "video" && a.duration ? f.duration(a.duration) : null, missing ? t("missingAlt") : null, a.status === "processing" ? t("processing") : a.status === "failed" ? t("failed") : null].filter(Boolean).join(", "), tabIndex: index === focusIndex ? 0 : -1, onClick: (e) => onTileClick(e, index), onDoubleClick: () => detailsPanel && openDetails(a), onFocus: () => setFocusIndex(index), className: cn("vui-media-tile group/tile focus-ring relative grid min-w-0 cursor-pointer gap-1.5 rounded-ui outline-none", disabled && "cursor-not-allowed opacity-45"), children: [_jsxs("div", { className: "vui-media-tile-frame relative overflow-hidden rounded-ui bg-surface-2", children: [_jsx(MediaThumb, { asset: a, rounded: "none" }), a.kind === "video" && a.duration ? _jsx("span", { "aria-hidden": true, className: "tabular absolute end-1.5 bottom-1.5 rounded-sm bg-[color-mix(in_srgb,var(--scene)_82%,transparent)] px-1.5 py-0.5 text-[10.5px] font-medium text-fg", children: f.duration(a.duration) }) : null, a.status === "failed" ? _jsx(Badge, { "aria-hidden": true, tone: "danger", className: "absolute start-1.5 top-1.5", children: t("failed") }) : null, missing ? _jsx("span", { "aria-hidden": true, title: t("missingAlt"), className: "vui-media-alt-dot absolute end-2 top-2 size-2 rounded-full bg-warning" }) : null, selection !== "none" ? (_jsx("span", { "aria-hidden": true, "data-slot": "media-tile-check", className: cn("vui-media-check absolute start-1.5 top-1.5 flex size-5 items-center justify-center rounded-full", isSel ? "bg-accent text-accent-fg" : "border border-[color-mix(in_srgb,var(--fg)_30%,transparent)] bg-[color-mix(in_srgb,var(--scene)_70%,transparent)] text-transparent"), children: _jsx(Check, { className: "size-3", strokeWidth: 3 }) })) : null] }), _jsx("span", { className: cn("truncate px-0.5 text-[12px] leading-tight", isSel ? "text-fg" : "text-fg-muted"), children: a.filename })] }, a.id));
|
|
721
721
|
};
|
|
722
722
|
const gridStyle = { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))`, gap: GRID_GAP };
|
|
723
723
|
const gridEl = (_jsx("div", { ref: gridRef, role: "grid", "aria-label": t("files"), "aria-multiselectable": selection === "multiple" || undefined, "aria-rowcount": virtual ? rows.length : undefined, "aria-describedby": liveId, "data-slot": "media-grid", onKeyDown: onGridKeyDown, className: "relative", style: virtual ? { height: virtualizer.getTotalSize() } : undefined, children: virtual
|
|
@@ -176,7 +176,7 @@ function PickerUrlForm({ adapter, onImported, t }) {
|
|
|
176
176
|
};
|
|
177
177
|
return (_jsxs("form", { onSubmit: submit, className: "mx-auto grid max-w-xl gap-2 py-6", children: [_jsx("label", { htmlFor: id, className: "text-[13px] font-medium text-fg", children: t("urlLabel") }), _jsxs("div", { className: "flex gap-2", children: [_jsx(Input, { id: id, type: "url", inputMode: "url", leading: _jsx(Link2, { "aria-hidden": true }), placeholder: t("urlPlaceholder"), value: url, "aria-describedby": hintId, invalid: state === "error", onChange: (e) => setUrl(e.target.value), className: "flex-1" }), _jsx(Button, { type: "submit", variant: "secondary", disabled: !valid, loading: state === "loading", loadingText: t("urlImporting"), children: t("urlImport") })] }), _jsx("p", { id: hintId, className: cn("text-[12.5px]", state === "error" ? "text-danger" : "text-fg-muted"), children: state === "error" ? (_jsxs("span", { className: "inline-flex items-center gap-1.5", children: [_jsx(TriangleAlert, { "aria-hidden": true, className: "size-3.5" }), t("urlError")] })) : (t("urlHint")) })] }));
|
|
178
178
|
}
|
|
179
|
-
const PickerContext = React.createContext(null);
|
|
179
|
+
const PickerContext = /*#__PURE__*/ React.createContext(null);
|
|
180
180
|
/**
|
|
181
181
|
* Hosts one Media picker for `useMediaPicker()`. Put it once near the app root, inside `MediaProvider`.
|
|
182
182
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useMediaAdapter } from "../lib/provider.js";
|
|
5
|
-
const MediaContext = React.createContext(undefined);
|
|
5
|
+
const MediaContext = /*#__PURE__*/ React.createContext(undefined);
|
|
6
6
|
/**
|
|
7
7
|
* Provides the media adapter to Media library, Media picker, Image field, Gallery and the editor.
|
|
8
8
|
* `VamosProvider media={adapter}` works too; this provider wins when both are set.
|
|
@@ -49,7 +49,7 @@ export function formatMediaTime(seconds, locale = "en-US") {
|
|
|
49
49
|
return h > 0 ? `${one.format(h)}:${two.format(m)}:${two.format(s)}` : `${one.format(m)}:${two.format(s)}`;
|
|
50
50
|
}
|
|
51
51
|
const SPEEDS = [0.5, 0.75, 1, 1.25, 1.5, 2];
|
|
52
|
-
export const videoPlayerVariants = cva("vui-video group/video relative isolate overflow-hidden bg-scene", {
|
|
52
|
+
export const videoPlayerVariants = /*#__PURE__*/ cva("vui-video group/video relative isolate overflow-hidden bg-scene", {
|
|
53
53
|
variants: {
|
|
54
54
|
rounded: { none: "", ui: "rounded-ui", "ui-lg": "rounded-ui-lg" },
|
|
55
55
|
chrome: { overlay: "", bar: "" },
|
|
@@ -75,7 +75,7 @@ const MIME = { mp4: "video/mp4", webm: "video/webm", hls: "application/vnd.apple
|
|
|
75
75
|
* tracks={[{ src: "/media/onboarding.en.vtt", lang: "en", label: "English", default: true }]} />
|
|
76
76
|
* ```
|
|
77
77
|
*/
|
|
78
|
-
export const VideoPlayer = React.forwardRef(function VideoPlayer({ src, poster: posterProp, aspect, tracks, autoPlay, muted: mutedProp = false, loop, playsInline = true, controls = "custom", chrome = "overlay", rounded, title, preload = "metadata", hls, onEnded, onTimeUpdate, videoRef, crossOrigin, labels, className, style, onKeyDown, ...props }, ref) {
|
|
78
|
+
export const VideoPlayer = /*#__PURE__*/ React.forwardRef(function VideoPlayer({ src, poster: posterProp, aspect, tracks, autoPlay, muted: mutedProp = false, loop, playsInline = true, controls = "custom", chrome = "overlay", rounded, title, preload = "metadata", hls, onEnded, onTimeUpdate, videoRef, crossOrigin, labels, className, style, onKeyDown, ...props }, ref) {
|
|
79
79
|
const t = useLabels("videoPlayer", videoLabels, labels);
|
|
80
80
|
const { locale } = useLocale();
|
|
81
81
|
const reduced = useReducedMotion();
|
|
@@ -283,7 +283,7 @@ export const VideoPlayer = React.forwardRef(function VideoPlayer({ src, poster:
|
|
|
283
283
|
* `youtube-nocookie.com` (or `player.vimeo.com` with `dnt=1`) iframe. No third-party request,
|
|
284
284
|
* cookie or script before the visitor chooses to play.
|
|
285
285
|
*/
|
|
286
|
-
export const VideoEmbed = React.forwardRef(function VideoEmbed({ provider, id, title, poster, aspect = "16/9", start, rounded = "ui", labels, className, style, ...props }, ref) {
|
|
286
|
+
export const VideoEmbed = /*#__PURE__*/ React.forwardRef(function VideoEmbed({ provider, id, title, poster, aspect = "16/9", start, rounded = "ui", labels, className, style, ...props }, ref) {
|
|
287
287
|
const t = useLabels("videoPlayer", videoLabels, labels);
|
|
288
288
|
const [active, setActive] = React.useState(false);
|
|
289
289
|
const ratio = aspectRatioOf(aspect) ?? 16 / 9;
|
|
@@ -297,7 +297,7 @@ export const VideoEmbed = React.forwardRef(function VideoEmbed({ provider, id, t
|
|
|
297
297
|
* Muted, looping, decorative video (hero backgrounds). `aria-hidden`, with a visible pause
|
|
298
298
|
* button (WCAG 2.2.2). Reduced motion shows the poster only.
|
|
299
299
|
*/
|
|
300
|
-
export const BackgroundVideo = React.forwardRef(function BackgroundVideo({ src, poster, labels, className, children, ...props }, ref) {
|
|
300
|
+
export const BackgroundVideo = /*#__PURE__*/ React.forwardRef(function BackgroundVideo({ src, poster, labels, className, children, ...props }, ref) {
|
|
301
301
|
const t = useLabels("videoPlayer", videoLabels, labels);
|
|
302
302
|
const reduced = useReducedMotion();
|
|
303
303
|
const video = React.useRef(null);
|
package/dist/motion/count-up.js
CHANGED
|
@@ -18,7 +18,7 @@ function decimalsOf(v) {
|
|
|
18
18
|
* <CountUp value={1240} /> reviews · <CountUp value={4.8} locale="tr-TR" />
|
|
19
19
|
* ```
|
|
20
20
|
*/
|
|
21
|
-
export const CountUp = React.forwardRef(function CountUp({ value, from = 0, duration, delay = 0, locale: localeProp, format, className, ...props }, ref) {
|
|
21
|
+
export const CountUp = /*#__PURE__*/ React.forwardRef(function CountUp({ value, from = 0, duration, delay = 0, locale: localeProp, format, className, ...props }, ref) {
|
|
22
22
|
const ctx = useLocale();
|
|
23
23
|
const locale = localeProp ?? ctx?.locale ?? "en-US";
|
|
24
24
|
const fmt = React.useMemo(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import
|
|
3
|
+
import * as Slot from "radix-ui/slot";
|
|
4
4
|
/**
|
|
5
5
|
* Sets the motion level for everything inside (`data-motion`). SiteShell does this for a site
|
|
6
6
|
* via its `motion` prop; use MotionScope for any other subtree. `data-motion="off"` on `<html>`
|
|
@@ -10,7 +10,7 @@ import { Slot } from "radix-ui";
|
|
|
10
10
|
* <MotionScope level="full"><Stagger>…</Stagger></MotionScope>
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
|
-
export const MotionScope = React.forwardRef(function MotionScope({ level, asChild, ...props }, ref) {
|
|
13
|
+
export const MotionScope = /*#__PURE__*/ React.forwardRef(function MotionScope({ level, asChild, ...props }, ref) {
|
|
14
14
|
const Comp = asChild ? Slot.Root : "div";
|
|
15
15
|
return _jsx(Comp, { ref: ref, "data-motion": level, ...props });
|
|
16
16
|
});
|
|
@@ -47,7 +47,7 @@ export function startPageTransition(update, { scope } = {}) {
|
|
|
47
47
|
* <PageTransition pageKey={tab}>{panels[tab]}</PageTransition>
|
|
48
48
|
* ```
|
|
49
49
|
*/
|
|
50
|
-
export const PageTransition = React.forwardRef(function PageTransition({ pageKey, className, children, ...props }, ref) {
|
|
50
|
+
export const PageTransition = /*#__PURE__*/ React.forwardRef(function PageTransition({ pageKey, className, children, ...props }, ref) {
|
|
51
51
|
const first = React.useRef(pageKey);
|
|
52
52
|
// Inside a View Transition the browser already cross-fades: no second fade on top.
|
|
53
53
|
const inViewTransition = typeof document !== "undefined" && document.documentElement.hasAttribute("data-vm-transition");
|
package/dist/motion/parallax.js
CHANGED
|
@@ -44,7 +44,7 @@ function useScrollFallback(enabled, ref, measure) {
|
|
|
44
44
|
* <Parallax shift={48} className="aspect-[16/9] rounded-ui-lg"><img className="size-full object-cover" … /></Parallax>
|
|
45
45
|
* ```
|
|
46
46
|
*/
|
|
47
|
-
export const Parallax = React.forwardRef(function Parallax({ shift = 40, clip = true, className, style, children, ...props }, ref) {
|
|
47
|
+
export const Parallax = /*#__PURE__*/ React.forwardRef(function Parallax({ shift = 40, clip = true, className, style, children, ...props }, ref) {
|
|
48
48
|
const inner = React.useRef(null);
|
|
49
49
|
const [fallback, setFallback] = React.useState(false);
|
|
50
50
|
React.useEffect(() => {
|
|
@@ -72,7 +72,7 @@ export const Parallax = React.forwardRef(function Parallax({ shift = 40, clip =
|
|
|
72
72
|
* <ScrollProgress />
|
|
73
73
|
* ```
|
|
74
74
|
*/
|
|
75
|
-
export const ScrollProgress = React.forwardRef(function ScrollProgress({ fixed = true, className, ...props }, ref) {
|
|
75
|
+
export const ScrollProgress = /*#__PURE__*/ React.forwardRef(function ScrollProgress({ fixed = true, className, ...props }, ref) {
|
|
76
76
|
const inner = React.useRef(null);
|
|
77
77
|
const [fallback, setFallback] = React.useState(false);
|
|
78
78
|
React.useEffect(() => setFallback(!supports("animation-timeline: scroll()")), []);
|
package/dist/motion/pointer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as Slot from "radix-ui/slot";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { motionLevel } from "./core.js";
|
|
7
7
|
const finePointer = () => typeof window !== "undefined" && typeof window.matchMedia === "function" && window.matchMedia("(hover: hover) and (pointer: fine)").matches;
|
|
@@ -79,7 +79,7 @@ function setRefs(node, ...refs) {
|
|
|
79
79
|
* <Tilt max={6} glare><article className="surface rounded-ui-lg p-6">…</article></Tilt>
|
|
80
80
|
* ```
|
|
81
81
|
*/
|
|
82
|
-
export const Tilt = React.forwardRef(function Tilt({ max = 5, glare = false, level = "subtle", asChild, className, style, children, ...props }, ref) {
|
|
82
|
+
export const Tilt = /*#__PURE__*/ React.forwardRef(function Tilt({ max = 5, glare = false, level = "subtle", asChild, className, style, children, ...props }, ref) {
|
|
83
83
|
const inner = React.useRef(null);
|
|
84
84
|
usePointerVars(inner, level, (el, x, y) => {
|
|
85
85
|
el.style.setProperty("--vm-tilt-x", `${(-y * max).toFixed(2)}deg`);
|
|
@@ -101,7 +101,7 @@ export const Tilt = React.forwardRef(function Tilt({ max = 5, glare = false, lev
|
|
|
101
101
|
* <Magnetic><Button variant="primary" size="xl">Book a table</Button></Magnetic>
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
|
-
export const Magnetic = React.forwardRef(function Magnetic({ strength = 0.3, limit = 10, level = "full", asChild, className, children, ...props }, ref) {
|
|
104
|
+
export const Magnetic = /*#__PURE__*/ React.forwardRef(function Magnetic({ strength = 0.3, limit = 10, level = "full", asChild, className, children, ...props }, ref) {
|
|
105
105
|
const inner = React.useRef(null);
|
|
106
106
|
usePointerVars(inner, level, (el, x, y) => {
|
|
107
107
|
const r = el.getBoundingClientRect();
|
package/dist/motion/reveal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import
|
|
4
|
+
import * as Slot from "radix-ui/slot";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
6
|
import { inViewport, ioSupported, motionAllowed, observe, transitionEnd } from "./core.js";
|
|
7
7
|
const noopSubscribe = () => () => { };
|
|
@@ -109,7 +109,7 @@ const timing = (delay, duration, extra) => ({
|
|
|
109
109
|
* <Reveal effect="rise" delay={80}><Card>…</Card></Reveal>
|
|
110
110
|
* ```
|
|
111
111
|
*/
|
|
112
|
-
export const Reveal = React.forwardRef(function Reveal({ effect = "rise", delay, duration, once, rootMargin, threshold, disabled, onReveal, asChild, className, style, ...props }, ref) {
|
|
112
|
+
export const Reveal = /*#__PURE__*/ React.forwardRef(function Reveal({ effect = "rise", delay, duration, once, rootMargin, threshold, disabled, onReveal, asChild, className, style, ...props }, ref) {
|
|
113
113
|
const inner = React.useRef(null);
|
|
114
114
|
const setRef = useComposedRef(ref, inner);
|
|
115
115
|
const initial = useReveal(inner, { once, rootMargin, threshold, disabled, onReveal });
|
|
@@ -124,7 +124,7 @@ export const Reveal = React.forwardRef(function Reveal({ effect = "rise", delay,
|
|
|
124
124
|
* <Stagger asChild step={70}><ul className="grid grid-cols-3">{plans.map(…)}</ul></Stagger>
|
|
125
125
|
* ```
|
|
126
126
|
*/
|
|
127
|
-
export const Stagger = React.forwardRef(function Stagger({ effect = "rise", step, delay, duration, once, rootMargin, threshold, disabled, onReveal, asChild, className, style, ...props }, ref) {
|
|
127
|
+
export const Stagger = /*#__PURE__*/ React.forwardRef(function Stagger({ effect = "rise", step, delay, duration, once, rootMargin, threshold, disabled, onReveal, asChild, className, style, ...props }, ref) {
|
|
128
128
|
const inner = React.useRef(null);
|
|
129
129
|
const setRef = useComposedRef(ref, inner);
|
|
130
130
|
const initial = useReveal(inner, { once, rootMargin, threshold, disabled, onReveal, stagger: true });
|
|
@@ -13,7 +13,7 @@ import { useIsoLayoutEffect } from "./reveal.js";
|
|
|
13
13
|
* <SkeletonSwap loading={isLoading} skeleton={<InvoiceSkeleton />}><InvoiceTable rows={rows} /></SkeletonSwap>
|
|
14
14
|
* ```
|
|
15
15
|
*/
|
|
16
|
-
export const SkeletonSwap = React.forwardRef(function SkeletonSwap({ loading, skeleton, className, children, ...props }, ref) {
|
|
16
|
+
export const SkeletonSwap = /*#__PURE__*/ React.forwardRef(function SkeletonSwap({ loading, skeleton, className, children, ...props }, ref) {
|
|
17
17
|
const inner = React.useRef(null);
|
|
18
18
|
const [prevLoading, setPrevLoading] = React.useState(loading);
|
|
19
19
|
const [leaving, setLeaving] = React.useState(false);
|
|
@@ -20,7 +20,9 @@ export interface TextRevealProps extends Omit<React.HTMLAttributes<HTMLElement>,
|
|
|
20
20
|
/**
|
|
21
21
|
* A heading that reveals word by word (or line by line) as it scrolls into view. Assistive
|
|
22
22
|
* tech gets one plain string: the split copy is `aria-hidden`, the real text is a visually
|
|
23
|
-
* hidden twin.
|
|
23
|
+
* hidden twin. Every unit — word or line — is separated by a real space, so `textContent`
|
|
24
|
+
* (search engines, copy-paste, reader mode) reads "közde, muhabbet", never "közde,muhabbet".
|
|
25
|
+
* Transform and opacity only; reduced motion shows it at once.
|
|
24
26
|
*
|
|
25
27
|
* ```tsx
|
|
26
28
|
* <TextReveal as="h2">Small rooms, slow mornings, nothing to scroll.</TextReveal>
|
|
@@ -6,17 +6,19 @@ import { useReveal } from "./reveal.js";
|
|
|
6
6
|
/**
|
|
7
7
|
* A heading that reveals word by word (or line by line) as it scrolls into view. Assistive
|
|
8
8
|
* tech gets one plain string: the split copy is `aria-hidden`, the real text is a visually
|
|
9
|
-
* hidden twin.
|
|
9
|
+
* hidden twin. Every unit — word or line — is separated by a real space, so `textContent`
|
|
10
|
+
* (search engines, copy-paste, reader mode) reads "közde, muhabbet", never "közde,muhabbet".
|
|
11
|
+
* Transform and opacity only; reduced motion shows it at once.
|
|
10
12
|
*
|
|
11
13
|
* ```tsx
|
|
12
14
|
* <TextReveal as="h2">Small rooms, slow mornings, nothing to scroll.</TextReveal>
|
|
13
15
|
* ```
|
|
14
16
|
*/
|
|
15
|
-
export const TextReveal = React.forwardRef(function TextReveal({ children, as: Tag = "h2", by = "word", effect = "mask", step, delay, once, rootMargin, threshold, disabled, onReveal, className, style, ...props }, ref) {
|
|
17
|
+
export const TextReveal = /*#__PURE__*/ React.forwardRef(function TextReveal({ children, as: Tag = "h2", by = "word", effect = "mask", step, delay, once, rootMargin, threshold, disabled, onReveal, className, style, ...props }, ref) {
|
|
16
18
|
const inner = React.useRef(null);
|
|
17
19
|
const initial = useReveal(inner, { once, rootMargin, threshold, disabled, onReveal });
|
|
18
20
|
const text = String(children);
|
|
19
|
-
const units = by === "line" ? text.split("\n") : text.split(/\s+/).filter(Boolean);
|
|
21
|
+
const units = by === "line" ? text.split("\n").map((l) => l.trim()).filter(Boolean) : text.split(/\s+/).filter(Boolean);
|
|
20
22
|
const gap = step ?? (by === "line" ? 110 : 45);
|
|
21
23
|
const Comp = Tag;
|
|
22
24
|
return (_jsxs(Comp, { ref: (node) => {
|
|
@@ -25,5 +27,5 @@ export const TextReveal = React.forwardRef(function TextReveal({ children, as: T
|
|
|
25
27
|
ref(node);
|
|
26
28
|
else if (ref)
|
|
27
29
|
ref.current = node;
|
|
28
|
-
}, "data-reveal": effect === "mask" ? "text" : effect, "data-text-reveal": by, ...initial, className: cn("vm-text-reveal", className), style: { "--vm-step": `${gap}ms`, ...(delay ? { "--vm-delay": `${delay}ms` } : null), ...style }, ...props, children: [_jsx("span", { className: "sr-only", children:
|
|
30
|
+
}, "data-reveal": effect === "mask" ? "text" : effect, "data-text-reveal": by, ...initial, className: cn("vm-text-reveal", className), style: { "--vm-step": `${gap}ms`, ...(delay ? { "--vm-delay": `${delay}ms` } : null), ...style }, ...props, children: [_jsx("span", { className: "sr-only", children: units.join(" ") }), " ", _jsx("span", { "aria-hidden": "true", className: "vm-text-reveal-visual", children: units.map((u, i) => (_jsxs(React.Fragment, { children: [_jsx("span", { className: "vm-tr-mask", children: _jsx("span", { className: "vm-tr-unit", style: { "--vm-i": i }, children: u }) }), i < units.length - 1 ? " " : null] }, i))) })] }));
|
|
29
31
|
});
|
package/dist/motion/ticker.js
CHANGED
|
@@ -11,6 +11,6 @@ import { cn } from "../lib/cn.js";
|
|
|
11
11
|
* <Ticker as="ul" duration={30}>{logos.map((l) => <li key={l.name}>…</li>)}</Ticker>
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
|
-
export const Ticker = React.forwardRef(function Ticker({ duration = 40, direction = "start", as: Group = "div", gap, fade = true, controls = true, pauseLabel = "Pause animation", groupClassName, className, style, children, "aria-label": ariaLabel, ...props }, ref) {
|
|
14
|
+
export const Ticker = /*#__PURE__*/ React.forwardRef(function Ticker({ duration = 40, direction = "start", as: Group = "div", gap, fade = true, controls = true, pauseLabel = "Pause animation", groupClassName, className, style, children, "aria-label": ariaLabel, ...props }, ref) {
|
|
15
15
|
return (_jsxs("div", { ref: ref, "data-direction": direction, "data-fade": fade ? "" : undefined, className: cn("vm-marquee", className), style: { "--vm-marquee-duration": `${duration}s`, ...(gap ? { "--vm-marquee-gap": gap } : null), ...style }, ...props, children: [_jsx("div", { className: "vm-marquee-viewport", children: _jsxs("div", { className: "vm-marquee-track", children: [_jsx(Group, { className: cn("vm-marquee-group", groupClassName), "aria-label": ariaLabel, children: children }), _jsx(Group, { className: cn("vm-marquee-group", groupClassName), "aria-hidden": "true", inert: true, "data-marquee-copy": "", children: children })] }) }), controls ? (_jsxs("label", { className: "vm-marquee-toggle", children: [_jsx("input", { type: "checkbox", className: "vm-marquee-pause sr-only", "aria-label": pauseLabel }), _jsxs("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", className: "vm-marquee-icon-pause", children: [_jsx("rect", { x: "4", y: "3", width: "2.5", height: "10", rx: "0.5" }), _jsx("rect", { x: "9.5", y: "3", width: "2.5", height: "10", rx: "0.5" })] }), _jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", className: "vm-marquee-icon-play", children: _jsx("path", { d: "M5 3.2v9.6a.5.5 0 0 0 .77.42l7.2-4.8a.5.5 0 0 0 0-.84l-7.2-4.8A.5.5 0 0 0 5 3.2Z" }) })] })) : null] }));
|
|
16
16
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":1,"projects":{"":{"files":{"scheduler/core/duration.test.ts":{"failed":false,"duration":82.473375,"lastRun":1794296632342},"scheduler/core/gantt.test.ts":{"failed":false,"duration":4.834499999999991,"lastRun":1794296632342},"scheduler/core/layout.test.ts":{"failed":false,"duration":36.943083,"lastRun":1794296632342},"scheduler/core/time-scale.test.ts":{"failed":false,"duration":10.341207999999938,"lastRun":1794296632342}}}}}
|
|
@@ -10,7 +10,7 @@ import { prepareDoc, resolveDoc } from "./prepare.js";
|
|
|
10
10
|
const isProd = () => typeof process !== "undefined" && process.env?.NODE_ENV === "production";
|
|
11
11
|
/** Edit/dev placeholder for a block that can't render normally. Server component. */
|
|
12
12
|
export function BlockNotice({ tone = "danger", title, hint, type, blockId, }) {
|
|
13
|
-
return (_jsx("div", { className: "vb-container py-4", "data-block-id": blockId, "data-block-type": type, "data-block-notice": tone, children: _jsxs("div", { role: "note", "data-tone": tone, className: "vb-notice flex flex-col gap-1 rounded-ui px-4 py-3.5 @2xl:flex-row @2xl:items-baseline @2xl:gap-4", children: [_jsx("span", { className: "shrink-0 font-mono text-eyebrow uppercase tracking-[0.08em] text-(--tone)", children: type }), _jsxs("span", { className: "text-small", children: [_jsx("strong", { className: "font-semibold text-fg", children: title }), hint ? _jsxs("span", { className: "text-fg-muted", children: [" \u2014 ", hint] }) : null] })] }) }));
|
|
13
|
+
return (_jsx("div", { className: "vb-container py-4", "data-block-id": blockId, "data-block-type": type, "data-block-notice": tone, children: _jsxs("div", { role: "note", "data-tone": tone, className: "vb-notice flex flex-col gap-1 rounded-ui px-4 py-3.5 @2xl:flex-row @2xl:items-baseline @2xl:gap-4", children: [_jsx("span", { className: "shrink-0 font-mono text-eyebrow uppercase tracking-[0.08em] text-(--tone-ink)", children: type }), _jsxs("span", { className: "text-small", children: [_jsx("strong", { className: "font-semibold text-fg", children: title }), hint ? _jsxs("span", { className: "text-fg-muted", children: [" \u2014 ", hint] }) : null] })] }) }));
|
|
14
14
|
}
|
|
15
15
|
function editAttrs(ctx, n) {
|
|
16
16
|
return ctx.opts.editMode ? { "data-block-id": n.node.id, "data-block-type": n.node.type, "data-hidden": n.node.hidden ? "" : undefined } : {};
|
package/dist/scheduler/gantt.js
CHANGED
|
@@ -68,7 +68,7 @@ export const ganttLabels = {
|
|
|
68
68
|
quarterShort: "Q{quarter}",
|
|
69
69
|
noOwner: "Unassigned",
|
|
70
70
|
};
|
|
71
|
-
export const ganttVariants = cva("ui-gantt relative flex min-w-0 flex-col", {
|
|
71
|
+
export const ganttVariants = /*#__PURE__*/ cva("ui-gantt relative flex min-w-0 flex-col", {
|
|
72
72
|
variants: { framed: { true: "surface rounded-ui-lg", false: "" } },
|
|
73
73
|
defaultVariants: { framed: true },
|
|
74
74
|
});
|
|
@@ -88,7 +88,7 @@ const COL_W = { assignees: 76, start: 84, end: 84, duration: 128, progress: 76,
|
|
|
88
88
|
* />
|
|
89
89
|
* ```
|
|
90
90
|
*/
|
|
91
|
-
export const Gantt = React.forwardRef(function Gantt({ tasks, links = [], scale: scaleProp, defaultScale = "week", onScaleChange, scales = ["day", "week", "month", "quarter"], workCalendar, durationUnit = "workdays", onTaskChange, onLinkCreate, onLinkDelete, autoSchedule = true, readOnly = false, columns = ["title", "start", "end", "duration", "progress"], gridWidth: gridWidthProp, defaultGridWidth, onGridWidthChange, collapsed: collapsedProp, defaultCollapsed = [], onCollapsedChange, height = "32rem", rowHeight: rowHeightProp, virtualizeAt = 150, toolbar, today: todayProp, labels, className, ...props }, ref) {
|
|
91
|
+
export const Gantt = /*#__PURE__*/ React.forwardRef(function Gantt({ tasks, links = [], scale: scaleProp, defaultScale = "week", onScaleChange, scales = ["day", "week", "month", "quarter"], workCalendar, durationUnit = "workdays", onTaskChange, onLinkCreate, onLinkDelete, autoSchedule = true, readOnly = false, columns = ["title", "start", "end", "duration", "progress"], gridWidth: gridWidthProp, defaultGridWidth, onGridWidthChange, collapsed: collapsedProp, defaultCollapsed = [], onCollapsedChange, height = "32rem", rowHeight: rowHeightProp, virtualizeAt = 150, toolbar, today: todayProp, labels, className, ...props }, ref) {
|
|
92
92
|
const { locale, timeZone, dir } = useLocale();
|
|
93
93
|
const rtl = dir === "rtl";
|
|
94
94
|
const t = useLabels("gantt", ganttLabels, labels);
|
|
@@ -64,7 +64,7 @@ export const resourceCalendarLabels = {
|
|
|
64
64
|
saveFailed: "Couldn't save the schedule. Your change was undone.",
|
|
65
65
|
loading: "Loading schedule…",
|
|
66
66
|
};
|
|
67
|
-
export const resourceCalendarVariants = cva("ui-rc relative flex min-w-0 flex-col", {
|
|
67
|
+
export const resourceCalendarVariants = /*#__PURE__*/ cva("ui-rc relative flex min-w-0 flex-col", {
|
|
68
68
|
variants: { variant: { blocks: "", codes: "" }, framed: { true: "surface rounded-ui-lg", false: "" } },
|
|
69
69
|
defaultVariants: { variant: "blocks", framed: true },
|
|
70
70
|
});
|
|
@@ -92,7 +92,7 @@ const blockEndDay = (b, tz) => (isDateOnly(b.start) ? (isDateOnly(b.end) ? b.end
|
|
|
92
92
|
* />
|
|
93
93
|
* ```
|
|
94
94
|
*/
|
|
95
|
-
export const ResourceCalendar = React.forwardRef(function ResourceCalendar({ resources, blocks, range, onRangeChange, unit = "day", hours = { start: "08:00", end: "20:00" }, variant = "blocks", templates = [], workCalendar, rules = [], onBlocksChange, cellActions = [], onCellAction, onBlockOpen, renderBlock, summary, rowSummary, groupBy = null, showRejected = false, readOnly = false, loading = false, timeZone, height = "32rem", virtualizeAt = 60, toolbar, now: nowProp, labels, className, ...props }, ref) {
|
|
95
|
+
export const ResourceCalendar = /*#__PURE__*/ React.forwardRef(function ResourceCalendar({ resources, blocks, range, onRangeChange, unit = "day", hours = { start: "08:00", end: "20:00" }, variant = "blocks", templates = [], workCalendar, rules = [], onBlocksChange, cellActions = [], onCellAction, onBlockOpen, renderBlock, summary, rowSummary, groupBy = null, showRejected = false, readOnly = false, loading = false, timeZone, height = "32rem", virtualizeAt = 60, toolbar, now: nowProp, labels, className, ...props }, ref) {
|
|
96
96
|
const { locale, timeZone: ctxZone, dir } = useLocale();
|
|
97
97
|
const tz = timeZone ?? ctxZone;
|
|
98
98
|
const rtl = dir === "rtl";
|
|
@@ -75,7 +75,7 @@ export const schedulerLabels = {
|
|
|
75
75
|
dayGrid: "{month}",
|
|
76
76
|
weekNumber: "Week {week}",
|
|
77
77
|
};
|
|
78
|
-
export const schedulerVariants = cva("ui-sch relative flex min-w-0 flex-col", {
|
|
78
|
+
export const schedulerVariants = /*#__PURE__*/ cva("ui-sch relative flex min-w-0 flex-col", {
|
|
79
79
|
variants: {
|
|
80
80
|
variant: {
|
|
81
81
|
full: "surface rounded-ui-lg",
|
|
@@ -84,7 +84,7 @@ export const schedulerVariants = cva("ui-sch relative flex min-w-0 flex-col", {
|
|
|
84
84
|
},
|
|
85
85
|
defaultVariants: { variant: "full" },
|
|
86
86
|
});
|
|
87
|
-
const SchedulerContext = React.createContext(null);
|
|
87
|
+
const SchedulerContext = /*#__PURE__*/ React.createContext(null);
|
|
88
88
|
const useSch = () => {
|
|
89
89
|
const c = React.useContext(SchedulerContext);
|
|
90
90
|
if (!c)
|
|
@@ -136,7 +136,7 @@ function stepDate(view, anchor, dir, listDays) {
|
|
|
136
136
|
* />
|
|
137
137
|
* ```
|
|
138
138
|
*/
|
|
139
|
-
export const Scheduler = React.forwardRef(function Scheduler({ events, view: viewProp, defaultView = "week", onViewChange, views = ["day", "week", "month", "list"], date: dateProp, defaultDate, onDateChange, onRangeChange, slotMinutes = 30, snapMinutes = 15, dayRange, scrollToTime, height = "36rem", workCalendar, restrictToBusinessHours = false, timeZone, onCreate, onEventChange, onEventOpen, renderEvent, maxEventsPerDay = 3, variant = "full", loading = false, readOnly = false, toolbar, listDays = 7, now: nowProp, labels, className, ...props }, ref) {
|
|
139
|
+
export const Scheduler = /*#__PURE__*/ React.forwardRef(function Scheduler({ events, view: viewProp, defaultView = "week", onViewChange, views = ["day", "week", "month", "list"], date: dateProp, defaultDate, onDateChange, onRangeChange, slotMinutes = 30, snapMinutes = 15, dayRange, scrollToTime, height = "36rem", workCalendar, restrictToBusinessHours = false, timeZone, onCreate, onEventChange, onEventOpen, renderEvent, maxEventsPerDay = 3, variant = "full", loading = false, readOnly = false, toolbar, listDays = 7, now: nowProp, labels, className, ...props }, ref) {
|
|
140
140
|
const { locale, timeZone: ctxZone, dir } = useLocale();
|
|
141
141
|
const tz = timeZone ?? ctxZone;
|
|
142
142
|
const t = useLabels("scheduler", schedulerLabels, labels);
|
|
@@ -161,7 +161,7 @@ const clock = (sec) => {
|
|
|
161
161
|
* <TimerButton adapter={adapter} projects={projects} defaultProjectId="mobile-app" />
|
|
162
162
|
* ```
|
|
163
163
|
*/
|
|
164
|
-
export const TimerButton = React.forwardRef(function TimerButton({ adapter, projects = [], projectId: projectIdProp, defaultProjectId, onProjectChange, variant = "compact", staleAfterMin = 600, onStart, onStop, onAdjust, titleTicker = false, labels, className, ...props }, ref) {
|
|
164
|
+
export const TimerButton = /*#__PURE__*/ React.forwardRef(function TimerButton({ adapter, projects = [], projectId: projectIdProp, defaultProjectId, onProjectChange, variant = "compact", staleAfterMin = 600, onStart, onStop, onAdjust, titleTicker = false, labels, className, ...props }, ref) {
|
|
165
165
|
const t = useLabels("timeTracker", timeTrackerLabels, labels);
|
|
166
166
|
const { locale } = useLocale();
|
|
167
167
|
const [projectId, setProjectId] = useControllableState({ value: projectIdProp, defaultValue: defaultProjectId ?? projects[0]?.id ?? "", onChange: onProjectChange });
|
|
@@ -232,7 +232,7 @@ export const TimerButton = React.forwardRef(function TimerButton({ adapter, proj
|
|
|
232
232
|
const button = (_jsxs("button", { type: "button", "aria-pressed": running, "aria-busy": busy || undefined, "data-slot": "timer-button", "data-running": running ? "" : undefined, disabled: busy, onClick: toggle, className: cn("ui-tt-btn focus-ring", variant === "full" && "ui-tt-btn-lg"), children: [_jsx("span", { className: "sr-only", children: name }), running ? _jsx("span", { "aria-hidden": true, className: "ui-tt-pulse" }) : _jsx(Play, { "aria-hidden": true, className: "ui-tt-ico" }), _jsx("span", { "aria-hidden": true, className: "tabular", children: clock(elapsedSec) }), variant === "compact" ? _jsx("span", { "aria-hidden": true, className: "ui-tt-proj", children: projectName }) : null, running && variant === "full" ? _jsx(Square, { "aria-hidden": true, className: "ui-tt-ico" }) : null] }));
|
|
233
233
|
return (_jsxs("div", { ref: ref, "data-slot": "timer", "data-variant": variant, className: cn(variant === "full" ? "ui-tt-full grid gap-3" : "inline-flex items-center gap-2", className), ...props, children: [variant === "full" ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex flex-wrap items-end gap-2", children: [_jsxs("label", { className: "grid min-w-[12rem] flex-1 gap-1", children: [_jsx("span", { className: "text-[12px] font-medium text-fg-muted", children: t("project") }), _jsx(NativeSelect, { value: active?.projectId ?? projectId, disabled: running, onChange: (e) => setProjectId(e.target.value), items: projects.map((p) => ({ value: p.id, label: p.meta ? `${p.label} · ${p.meta}` : p.label })) })] }), _jsxs("label", { className: "grid min-w-[14rem] flex-[2] gap-1", children: [_jsx("span", { className: "text-[12px] font-medium text-fg-muted", children: t("note") }), _jsx(Input, { value: active?.note ?? note, disabled: running, onChange: (e) => setNote(e.target.value), placeholder: t("notePlaceholder") })] }), button] }), elsewhere || stale ? (_jsxs("p", { className: "flex items-center gap-2 text-[12.5px]", "data-slot": "timer-note", children: [stale ? _jsx(TriangleAlert, { "aria-hidden": true, className: "size-3.5 text-warning" }) : null, _jsx("span", { className: stale ? "text-warning" : "text-fg-muted", children: stale ? t("stale", { duration: formatDuration(elapsedSec / 60, locale) }) : t("elsewhere") }), stale && onAdjust && active ? _jsx(Button, { size: "xs", variant: "ghost", onClick: () => onAdjust(active), children: t("adjust") }) : null] })) : null] })) : (_jsxs(_Fragment, { children: [button, stale ? _jsx("span", { className: "sr-only", children: t("stale", { duration: formatDuration(elapsedSec / 60, locale) }) }) : null, stale ? _jsx(TriangleAlert, { "aria-hidden": true, className: "size-3.5 text-warning" }) : null] })), _jsx("span", { className: "sr-only", "aria-live": "polite", children: message })] }));
|
|
234
234
|
});
|
|
235
|
-
export const timesheetVariants = cva("ui-ts relative min-w-0", {
|
|
235
|
+
export const timesheetVariants = /*#__PURE__*/ cva("ui-ts relative min-w-0", {
|
|
236
236
|
variants: { framed: { true: "surface rounded-ui-lg", false: "" } },
|
|
237
237
|
defaultVariants: { framed: true },
|
|
238
238
|
});
|
|
@@ -241,7 +241,7 @@ export const timesheetVariants = cva("ui-ts relative min-w-0", {
|
|
|
241
241
|
* <Timesheet weekStart="2026-11-09" rows={projects} value={hours} onCellChange={save} dailyTarget={8 * 60} />
|
|
242
242
|
* ```
|
|
243
243
|
*/
|
|
244
|
-
export const Timesheet = React.forwardRef(function Timesheet({ weekStart, days: dayCount = 7, rows, value: valueProp, defaultValue, onCellChange, dailyTarget, locked = false, workCalendar, display = "clock", labels, className, ...props }, ref) {
|
|
244
|
+
export const Timesheet = /*#__PURE__*/ React.forwardRef(function Timesheet({ weekStart, days: dayCount = 7, rows, value: valueProp, defaultValue, onCellChange, dailyTarget, locked = false, workCalendar, display = "clock", labels, className, ...props }, ref) {
|
|
245
245
|
const t = useLabels("timeTracker", timeTrackerLabels, labels);
|
|
246
246
|
const { locale, timeZone } = useLocale();
|
|
247
247
|
const cal = React.useMemo(() => resolveWorkCalendar(workCalendar, locale), [workCalendar, locale]);
|
|
@@ -372,7 +372,7 @@ export const Timesheet = React.forwardRef(function Timesheet({ weekStart, days:
|
|
|
372
372
|
});
|
|
373
373
|
const compareDay = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
374
374
|
/** Entries grouped by day (newest first) with day totals. */
|
|
375
|
-
export const TimeEntryList = React.forwardRef(function TimeEntryList({ entries, onEntryOpen, showAmounts = false, labels, className, ...props }, ref) {
|
|
375
|
+
export const TimeEntryList = /*#__PURE__*/ React.forwardRef(function TimeEntryList({ entries, onEntryOpen, showAmounts = false, labels, className, ...props }, ref) {
|
|
376
376
|
const t = useLabels("timeTracker", timeTrackerLabels, labels);
|
|
377
377
|
const { locale, timeZone, format } = useLocale();
|
|
378
378
|
const now = useNow(entries.some((e) => !e.end && e.durationMin === undefined), 30_000);
|
package/dist/sortable/kanban.js
CHANGED
|
@@ -60,7 +60,7 @@ export const kanbanLabels = {
|
|
|
60
60
|
retry: "Retry",
|
|
61
61
|
saving: "Saving",
|
|
62
62
|
};
|
|
63
|
-
const KanbanContext = React.createContext(null);
|
|
63
|
+
const KanbanContext = /*#__PURE__*/ React.createContext(null);
|
|
64
64
|
function useKanban() {
|
|
65
65
|
const ctx = React.useContext(KanbanContext);
|
|
66
66
|
if (!ctx)
|
|
@@ -73,7 +73,7 @@ const defaultGetLabel = (item) => {
|
|
|
73
73
|
const v = o?.title ?? o?.name ?? o?.label;
|
|
74
74
|
return typeof v === "string" ? v : undefined;
|
|
75
75
|
};
|
|
76
|
-
export const kanbanColumnVariants = cva("vui-kanban-column relative flex min-h-0 shrink-0 flex-col rounded-ui-lg", {
|
|
76
|
+
export const kanbanColumnVariants = /*#__PURE__*/ cva("vui-kanban-column relative flex min-h-0 shrink-0 flex-col rounded-ui-lg", {
|
|
77
77
|
variants: {
|
|
78
78
|
width: { sm: "w-[15.5rem]", md: "w-[18.5rem]", lg: "w-[22rem]" },
|
|
79
79
|
},
|
|
@@ -7,7 +7,7 @@ import { Sortable, SortableMoveMenu, SortableOverlay, useSortableItem, } from ".
|
|
|
7
7
|
// ---------------------------------------------------------------------------------------------
|
|
8
8
|
// SortableList
|
|
9
9
|
// ---------------------------------------------------------------------------------------------
|
|
10
|
-
export const sortableListVariants = cva("vui-sortable-list flex min-w-0", {
|
|
10
|
+
export const sortableListVariants = /*#__PURE__*/ cva("vui-sortable-list flex min-w-0", {
|
|
11
11
|
variants: {
|
|
12
12
|
orientation: { vertical: "flex-col", horizontal: "flex-row flex-wrap items-stretch" },
|
|
13
13
|
variant: {
|
|
@@ -22,7 +22,7 @@ export const sortableListVariants = cva("vui-sortable-list flex min-w-0", {
|
|
|
22
22
|
compoundVariants: [{ orientation: "horizontal", variant: "inset", className: "flex-nowrap" }],
|
|
23
23
|
defaultVariants: { orientation: "vertical", variant: "card" },
|
|
24
24
|
});
|
|
25
|
-
export const sortableRowVariants = cva("vui-sortable-row group/row relative flex min-w-0 items-center gap-1.5 text-sm text-fg outline-none", {
|
|
25
|
+
export const sortableRowVariants = /*#__PURE__*/ cva("vui-sortable-row group/row relative flex min-w-0 items-center gap-1.5 text-sm text-fg outline-none", {
|
|
26
26
|
variants: {
|
|
27
27
|
variant: {
|
|
28
28
|
card: "rounded-ui border border-line bg-surface ps-1 pe-1 shadow-[0_1px_1px_rgb(0_0_0/0.03)]",
|