@brightlocal/ui-components 3.2.0 → 3.3.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/AI_USAGE.md +10 -0
- package/README.md +3 -1
- package/component-meta.json +1271 -428
- package/deprecations.json +44 -0
- package/dist/_virtual/_rolldown/runtime.cjs +1 -0
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +73 -102
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +6 -4
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +85 -133
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +4 -4
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +106 -168
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.js +13 -16
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.js +30 -45
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +23 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +90 -91
- package/dist/banner.cjs +1 -1
- package/dist/banner.js +102 -148
- package/dist/blocks/empty-state.cjs +1 -1
- package/dist/blocks/empty-state.d.ts +20 -3
- package/dist/blocks/empty-state.d.ts.map +1 -1
- package/dist/blocks/empty-state.js +73 -140
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +136 -176
- package/dist/blocks/progress-state.cjs +1 -1
- package/dist/blocks/progress-state.js +223 -347
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +11 -6
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +763 -1092
- package/dist/brand-illustration-motif.cjs +1 -1
- package/dist/brand-illustration-motif.js +40 -61
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +62 -102
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.js +23 -31
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts +4 -2
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +149 -189
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +87 -3
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +116 -173
- package/dist/callout.cjs +1 -1
- package/dist/callout.js +73 -96
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +10 -4
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +233 -316
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +3 -3
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +174 -268
- package/dist/centred-layout.cjs +1 -1
- package/dist/centred-layout.js +27 -48
- package/dist/chart-empty.cjs +1 -1
- package/dist/chart-empty.js +18 -27
- package/dist/chart.cjs +7 -7
- package/dist/chart.d.ts +23 -13
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +445 -651
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +36 -69
- package/dist/chip.cjs +1 -1
- package/dist/chip.js +116 -173
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.js +35 -41
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +14 -4
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +439 -638
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +273 -420
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +5 -5
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +121 -191
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +280 -129
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +687 -948
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +15 -4
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +156 -231
- package/dist/delta.cjs +1 -0
- package/dist/delta.d.ts +79 -0
- package/dist/delta.d.ts.map +1 -0
- package/dist/delta.js +62 -0
- package/dist/description.cjs +1 -1
- package/dist/description.js +11 -20
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +76 -116
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +11 -11
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +76 -134
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +6 -6
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +179 -300
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +9 -9
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +166 -286
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.js +203 -342
- package/dist/grid.cjs +1 -1
- package/dist/grid.js +16 -29
- package/dist/header.cjs +1 -1
- package/dist/header.js +21 -38
- package/dist/height-transition.cjs +1 -1
- package/dist/height-transition.js +38 -55
- package/dist/hooks/use-breakpoint.cjs +1 -1
- package/dist/hooks/use-breakpoint.js +9 -9
- package/dist/hooks/use-debounce.cjs +1 -1
- package/dist/hooks/use-debounce.js +12 -11
- package/dist/hooks/use-delayed-pending.cjs +1 -1
- package/dist/hooks/use-delayed-pending.js +8 -9
- package/dist/hooks/use-filter-search-params.cjs +1 -0
- package/dist/hooks/use-filter-search-params.d.ts +93 -0
- package/dist/hooks/use-filter-search-params.d.ts.map +1 -0
- package/dist/hooks/use-filter-search-params.js +122 -0
- package/dist/hooks/use-mobile.cjs +1 -1
- package/dist/hooks/use-mobile.js +6 -6
- package/dist/hooks/use-overlay-pointer-lock.cjs +1 -1
- package/dist/hooks/use-overlay-pointer-lock.js +8 -9
- package/dist/hooks/use-prefers-reduced-motion.cjs +1 -1
- package/dist/hooks/use-prefers-reduced-motion.js +5 -8
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +1 -1
- package/dist/hover-card.d.ts.map +1 -1
- package/dist/hover-card.js +30 -62
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +630 -608
- package/dist/info-tooltip.cjs +1 -1
- package/dist/info-tooltip.js +22 -36
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +32 -3
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +181 -230
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +174 -221
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.d.ts +3 -3
- package/dist/input-otp.d.ts.map +1 -1
- package/dist/input-otp.js +102 -146
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +12 -16
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +139 -171
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +51 -73
- package/dist/label.cjs +1 -1
- package/dist/label.js +20 -38
- package/dist/lib/block-illustration.cjs +1 -1
- package/dist/lib/block-illustration.d.ts +1 -1
- package/dist/lib/block-illustration.d.ts.map +1 -1
- package/dist/lib/block-illustration.js +16 -18
- package/dist/lib/compose-event-handlers.cjs +1 -0
- package/dist/lib/compose-event-handlers.d.ts +9 -0
- package/dist/lib/compose-event-handlers.d.ts.map +1 -0
- package/dist/lib/compose-event-handlers.js +8 -0
- package/dist/lib/download-file.cjs +1 -0
- package/dist/lib/download-file.d.ts +14 -0
- package/dist/lib/download-file.d.ts.map +1 -0
- package/dist/lib/download-file.js +40 -0
- package/dist/lib/empty-canvas.cjs +1 -1
- package/dist/lib/empty-canvas.js +28 -56
- package/dist/lib/empty-chip.cjs +1 -1
- package/dist/lib/empty-chip.d.ts +14 -3
- package/dist/lib/empty-chip.d.ts.map +1 -1
- package/dist/lib/empty-chip.js +15 -11
- package/dist/lib/field-aria.cjs +1 -0
- package/dist/lib/field-aria.d.ts +34 -0
- package/dist/lib/field-aria.d.ts.map +1 -0
- package/dist/lib/field-aria.js +52 -0
- package/dist/lib/image-file-info.cjs +1 -0
- package/dist/lib/image-file-info.d.ts +25 -0
- package/dist/lib/image-file-info.d.ts.map +1 -0
- package/dist/lib/image-file-info.js +67 -0
- package/dist/lib/media-viewer-content.cjs +1 -0
- package/dist/lib/media-viewer-content.d.ts +102 -0
- package/dist/lib/media-viewer-content.d.ts.map +1 -0
- package/dist/lib/media-viewer-content.js +650 -0
- package/dist/lib/media-viewer-internal.cjs +1 -0
- package/dist/lib/media-viewer-internal.d.ts +98 -0
- package/dist/lib/media-viewer-internal.d.ts.map +1 -0
- package/dist/lib/media-viewer-internal.js +61 -0
- package/dist/lib/media-viewer-motion.cjs +1 -0
- package/dist/lib/media-viewer-motion.d.ts +40 -0
- package/dist/lib/media-viewer-motion.d.ts.map +1 -0
- package/dist/lib/media-viewer-motion.js +37 -0
- package/dist/lib/motion.cjs +1 -1
- package/dist/lib/motion.d.ts +8 -0
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/motion.js +11 -10
- package/dist/lib/optical-center.cjs +1 -1
- package/dist/lib/optical-center.d.ts +1 -1
- package/dist/lib/optical-center.d.ts.map +1 -1
- package/dist/lib/optical-center.js +12 -5
- package/dist/lib/spring-settle.cjs +1 -1
- package/dist/lib/spring-settle.js +1 -1
- package/dist/lib/table-internal.cjs +1 -0
- package/dist/lib/table-internal.d.ts +62 -0
- package/dist/lib/table-internal.d.ts.map +1 -0
- package/dist/lib/table-internal.js +18 -0
- package/dist/lib/use-controllable.cjs +1 -0
- package/dist/lib/use-controllable.d.ts +12 -0
- package/dist/lib/use-controllable.d.ts.map +1 -0
- package/dist/lib/use-controllable.js +15 -0
- package/dist/lib/use-dev-warning.cjs +1 -1
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.js +26 -33
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +1 -1
- package/dist/link.js +78 -124
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts +8 -0
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +94 -156
- package/dist/loading.cjs +1 -1
- package/dist/loading.js +124 -151
- package/dist/logo-mark.cjs +1 -0
- package/dist/logo-mark.d.ts +79 -0
- package/dist/logo-mark.d.ts.map +1 -0
- package/dist/logo-mark.js +219 -0
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +1 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +51 -87
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +390 -586
- package/dist/media-empty.cjs +1 -1
- package/dist/media-empty.js +27 -42
- package/dist/media-viewer.cjs +1 -0
- package/dist/media-viewer.d.ts +224 -0
- package/dist/media-viewer.d.ts.map +1 -0
- package/dist/media-viewer.js +295 -0
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +14 -14
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +130 -267
- package/dist/multi-select-filter.cjs +1 -1
- package/dist/multi-select-filter.d.ts +9 -1
- package/dist/multi-select-filter.d.ts.map +1 -1
- package/dist/multi-select-filter.js +357 -446
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +108 -172
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +36 -12
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +208 -281
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +1 -1
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +34 -45
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +17 -2
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +116 -162
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +90 -146
- package/dist/rating.cjs +1 -1
- package/dist/rating.d.ts +80 -13
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +70 -65
- package/dist/relative-date.cjs +1 -1
- package/dist/relative-date.d.ts.map +1 -1
- package/dist/relative-date.js +73 -89
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +39 -23
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.js +42 -44
- package/dist/result-count.cjs +1 -0
- package/dist/result-count.d.ts +110 -0
- package/dist/result-count.d.ts.map +1 -0
- package/dist/result-count.js +49 -0
- package/dist/route-progress.cjs +1 -1
- package/dist/route-progress.js +58 -102
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +9 -1
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +44 -79
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +10 -10
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +118 -238
- package/dist/separator.cjs +1 -1
- package/dist/separator.js +90 -78
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +8 -5
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +250 -317
- package/dist/single-select-filter.cjs +1 -1
- package/dist/single-select-filter.d.ts +32 -0
- package/dist/single-select-filter.d.ts.map +1 -1
- package/dist/single-select-filter.js +201 -203
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.js +24 -38
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +51 -81
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +101 -125
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.js +22 -31
- package/dist/split-layout.cjs +1 -1
- package/dist/split-layout.js +52 -101
- package/dist/status.cjs +1 -0
- package/dist/status.d.ts +51 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +60 -0
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +184 -316
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +17 -32
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +103 -30
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +170 -209
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +102 -147
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.js +307 -363
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.d.ts.map +1 -1
- package/dist/textarea.js +22 -35
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.js +43 -62
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +34 -46
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.d.ts +2 -2
- package/dist/tooltip.d.ts.map +1 -1
- package/dist/tooltip.js +157 -249
- package/dist/typography-heading.cjs +1 -1
- package/dist/typography-heading.js +25 -61
- package/dist/typography-text.cjs +1 -1
- package/dist/typography-text.js +27 -57
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +132 -340
- package/package.json +46 -46
- package/src/blocks/empty-state.tsx +34 -18
- package/src/blocks/sidebar.tsx +86 -31
- package/src/components/accordion.tsx +1 -1
- package/src/components/alert-dialog.tsx +4 -2
- package/src/components/badge.tsx +127 -15
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button.tsx +8 -6
- package/src/components/calendar.tsx +155 -9
- package/src/components/card.tsx +63 -10
- package/src/components/carousel.tsx +4 -1
- package/src/components/chart.tsx +151 -17
- package/src/components/checkbox.tsx +1 -1
- package/src/components/collapsible.tsx +4 -1
- package/src/components/combobox.tsx +40 -7
- package/src/components/command.tsx +9 -10
- package/src/components/context-menu.tsx +4 -4
- package/src/components/data-table.tsx +619 -237
- package/src/components/date-picker.tsx +31 -4
- package/src/components/delta.tsx +217 -0
- package/src/components/drawer.tsx +5 -5
- package/src/components/dropdown-menu.tsx +4 -4
- package/src/components/field.tsx +36 -15
- package/src/components/global-layout.tsx +1 -1
- package/src/components/input-chip.tsx +51 -7
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-password.tsx +15 -19
- package/src/components/input.tsx +10 -1
- package/src/components/list.tsx +14 -2
- package/src/components/logo-mark.tsx +345 -0
- package/src/components/map.tsx +18 -20
- package/src/components/media-viewer.tsx +908 -0
- package/src/components/multi-select-filter.tsx +255 -121
- package/src/components/navigation-menu.tsx +2 -2
- package/src/components/pagination.tsx +86 -26
- package/src/components/progress.tsx +91 -23
- package/src/components/rating.tsx +200 -74
- package/src/components/relative-date.tsx +19 -11
- package/src/components/resizable.tsx +86 -33
- package/src/components/result-count.tsx +253 -0
- package/src/components/scroll-area.tsx +31 -5
- package/src/components/select.tsx +2 -2
- package/src/components/sheet.tsx +14 -4
- package/src/components/single-select-filter.tsx +136 -41
- package/src/components/slider.tsx +2 -2
- package/src/components/status.tsx +162 -0
- package/src/components/switch.tsx +1 -1
- package/src/components/table.tsx +278 -106
- package/src/components/tabs.tsx +1 -0
- package/src/components/textarea.tsx +20 -2
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +11 -20
- package/src/hooks/use-filter-search-params.ts +302 -0
- package/src/index.ts +6 -0
- package/src/lib/compose-event-handlers.ts +14 -0
- package/src/lib/download-file.ts +61 -0
- package/src/lib/empty-chip.tsx +52 -0
- package/src/lib/field-aria.tsx +97 -0
- package/src/lib/image-file-info.ts +102 -0
- package/src/lib/media-viewer-content.tsx +1587 -0
- package/src/lib/media-viewer-internal.tsx +191 -0
- package/src/lib/media-viewer-motion.ts +120 -0
- package/src/lib/motion.ts +9 -0
- package/src/lib/table-internal.ts +74 -0
- package/src/lib/use-controllable.ts +43 -0
- package/src/lib/empty-chip.ts +0 -24
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* One image in the set.
|
|
4
|
+
*/
|
|
5
|
+
export interface MediaViewerItem {
|
|
6
|
+
/**
|
|
7
|
+
* The image URL.
|
|
8
|
+
*/
|
|
9
|
+
src: string;
|
|
10
|
+
/**
|
|
11
|
+
* The image's description — alternative text for screen readers and
|
|
12
|
+
* search engines. It also names the trigger that previews it, and the
|
|
13
|
+
* view shows it under the title while the image is open.
|
|
14
|
+
*/
|
|
15
|
+
alt: string;
|
|
16
|
+
/**
|
|
17
|
+
* A smaller image for the trigger's preview. Falls back to `src`.
|
|
18
|
+
*/
|
|
19
|
+
thumbnailSrc?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The file Download saves — say, the original at full size. Falls back to
|
|
22
|
+
* `src`.
|
|
23
|
+
*/
|
|
24
|
+
downloadSrc?: string;
|
|
25
|
+
/**
|
|
26
|
+
* When the image was taken or added, shown under the title while it is
|
|
27
|
+
* open. An ISO 8601 timestamp or a Date; a plain `YYYY-MM-DD` string for a
|
|
28
|
+
* calendar date with no time of day.
|
|
29
|
+
*/
|
|
30
|
+
date?: string | Date;
|
|
31
|
+
/**
|
|
32
|
+
* Marks a capture that is no longer available. The frame shows the
|
|
33
|
+
* unavailable message instead of requesting the image. An image that fails to
|
|
34
|
+
* load is treated the same way.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
expired?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare const MediaViewerControlsContext: React.Context<{
|
|
40
|
+
lead: React.ReactNode;
|
|
41
|
+
more: React.ReactNode;
|
|
42
|
+
}>;
|
|
43
|
+
export declare const MediaViewerActionsRegistry: React.Context<(() => () => void) | null>;
|
|
44
|
+
export interface MediaViewerContextValue {
|
|
45
|
+
items: MediaViewerItem[];
|
|
46
|
+
index: number;
|
|
47
|
+
setIndex: (index: number) => void;
|
|
48
|
+
/** The trigger that last opened the view, for focus return. */
|
|
49
|
+
openerRef: React.MutableRefObject<HTMLButtonElement | null>;
|
|
50
|
+
open: boolean;
|
|
51
|
+
setOpen: (open: boolean) => void;
|
|
52
|
+
/** Counts openings; per-opening state in the view is keyed by it, as the
|
|
53
|
+
view's component stays mounted while closed. */
|
|
54
|
+
openCount: number;
|
|
55
|
+
/** When the opening press happened (event time), for the zoom's cutoff. */
|
|
56
|
+
openedAtRef: React.MutableRefObject<number>;
|
|
57
|
+
/** Whether the view's image has appeared this opening (its zoom has
|
|
58
|
+
started, or the reader has stepped) — only then does the preview step
|
|
59
|
+
aside, so there is never a frame with neither on screen. */
|
|
60
|
+
revealed: boolean;
|
|
61
|
+
reveal: () => void;
|
|
62
|
+
/** Mounted triggers by item index — where the image zooms from and to. */
|
|
63
|
+
triggersRef: React.MutableRefObject<Map<number, HTMLButtonElement>>;
|
|
64
|
+
/** Where the pointer last was while the view was open — the preview
|
|
65
|
+
under it when the view closes holds off its hover zoom. */
|
|
66
|
+
pointerRef: React.MutableRefObject<{
|
|
67
|
+
x: number;
|
|
68
|
+
y: number;
|
|
69
|
+
} | null>;
|
|
70
|
+
/** The item's menu, as the root's `actions` builds it, or null. */
|
|
71
|
+
renderActions: ((item: MediaViewerItem, index: number) => React.ReactNode) | null;
|
|
72
|
+
actionsLabel: (item: MediaViewerItem, index: number) => string;
|
|
73
|
+
/** Whether the set has a full view; without one the previews only show. */
|
|
74
|
+
viewable: boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare const MediaViewerContext: React.Context<MediaViewerContextValue | null>;
|
|
77
|
+
export declare function useMediaViewerContext(part: string): MediaViewerContextValue;
|
|
78
|
+
export declare const defaultActionsLabel: (item: MediaViewerItem, index: number) => string;
|
|
79
|
+
export declare const defaultTriggerLabel: (item: MediaViewerItem, index: number, total: number) => string;
|
|
80
|
+
export declare function ItemActionsMenu({ dataHook, label, variant, children, }: {
|
|
81
|
+
dataHook: string;
|
|
82
|
+
label: string;
|
|
83
|
+
variant: "secondary" | "ghost";
|
|
84
|
+
children: React.ReactNode;
|
|
85
|
+
}): React.JSX.Element;
|
|
86
|
+
/**
|
|
87
|
+
* Renders `render(ref)` — an element that truncates to one line — inside a
|
|
88
|
+
* tooltip with the full text, which opens only when the text is actually
|
|
89
|
+
* cut at the moment the pointer or focus arrives.
|
|
90
|
+
*/
|
|
91
|
+
export declare function TruncatedText<T extends HTMLElement>({ dataHook, forwardRef, full, render, }: {
|
|
92
|
+
dataHook: string;
|
|
93
|
+
/** A ref of the caller's to set to the same element. Keep it stable. */
|
|
94
|
+
forwardRef?: (node: T | null) => void;
|
|
95
|
+
full: React.ReactNode;
|
|
96
|
+
render: (ref: (node: T | null) => void) => React.ReactElement;
|
|
97
|
+
}): React.JSX.Element;
|
|
98
|
+
//# sourceMappingURL=media-viewer-internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-viewer-internal.d.ts","sourceRoot":"","sources":["../../src/lib/media-viewer-internal.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button as p } from "../button.js";
|
|
3
|
+
import { DropdownMenu as f, DropdownMenuContent as h, DropdownMenuTrigger as C } from "../dropdown-menu.js";
|
|
4
|
+
import { Tooltip as g, TooltipContent as x, TooltipTrigger as w } from "../tooltip.js";
|
|
5
|
+
import * as n from "react";
|
|
6
|
+
import { Ellipsis as M } from "@brightlocal/icons";
|
|
7
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
8
|
+
var A = n.createContext({
|
|
9
|
+
lead: null,
|
|
10
|
+
more: null
|
|
11
|
+
}), D = n.createContext(null), T = n.createContext(null);
|
|
12
|
+
function L(t) {
|
|
13
|
+
const e = n.useContext(T);
|
|
14
|
+
if (!e) throw new Error(`${t} must be used within <MediaViewer>`);
|
|
15
|
+
return e;
|
|
16
|
+
}
|
|
17
|
+
var O = (t, e) => `More actions for ${t.alt || `image ${e + 1}`}`, j = (t, e, o) => t.alt || `Image ${e + 1} of ${o}`;
|
|
18
|
+
function k({ dataHook: t, label: e, variant: o, children: l }) {
|
|
19
|
+
return /* @__PURE__ */ s(f, { children: [/* @__PURE__ */ r(C, {
|
|
20
|
+
asChild: !0,
|
|
21
|
+
children: /* @__PURE__ */ r(p, {
|
|
22
|
+
iconOnly: !0,
|
|
23
|
+
ariaLabel: e,
|
|
24
|
+
dataHook: t,
|
|
25
|
+
size: o === "secondary" ? "sm" : void 0,
|
|
26
|
+
variant: o,
|
|
27
|
+
children: /* @__PURE__ */ r(M, { "aria-hidden": !0 })
|
|
28
|
+
})
|
|
29
|
+
}), /* @__PURE__ */ r(h, {
|
|
30
|
+
align: "end",
|
|
31
|
+
dataHook: `${t}-content`,
|
|
32
|
+
children: l
|
|
33
|
+
})] });
|
|
34
|
+
}
|
|
35
|
+
function E({ dataHook: t, forwardRef: e, full: o, render: l }) {
|
|
36
|
+
const [a, u] = n.useState(null), [d, c] = n.useState(!1), m = n.useCallback((i) => {
|
|
37
|
+
u(i), e?.(i);
|
|
38
|
+
}, [e]);
|
|
39
|
+
return /* @__PURE__ */ s(g, {
|
|
40
|
+
open: d,
|
|
41
|
+
onOpenChange: (i) => c(i && !!a && a.scrollWidth > a.clientWidth),
|
|
42
|
+
children: [/* @__PURE__ */ r(w, {
|
|
43
|
+
asChild: !0,
|
|
44
|
+
children: l(m)
|
|
45
|
+
}), /* @__PURE__ */ r(x, {
|
|
46
|
+
dataHook: `${t}-full`,
|
|
47
|
+
side: "top",
|
|
48
|
+
children: o
|
|
49
|
+
})]
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
k as ItemActionsMenu,
|
|
54
|
+
D as MediaViewerActionsRegistry,
|
|
55
|
+
T as MediaViewerContext,
|
|
56
|
+
A as MediaViewerControlsContext,
|
|
57
|
+
E as TruncatedText,
|
|
58
|
+
O as defaultActionsLabel,
|
|
59
|
+
j as defaultTriggerLabel,
|
|
60
|
+
L as useMediaViewerContext
|
|
61
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
let m=require("@brightlocal/ui-components/lib/motion");var A={transform:"none",transformOrigin:"0 0",clipPath:"inset(0px 0px 0px 0px round 0px)"};function T(o,e){const t=o.getBoundingClientRect(),n=e.getBoundingClientRect();if(!t.width||!t.height||!n.width||!n.height||t.bottom<=0||t.right<=0||t.top>=window.innerHeight||t.left>=window.innerWidth)return null;const r=Math.max(t.width/n.width,t.height/n.height),E=o.querySelector("img"),a=E&&parseFloat(getComputedStyle(E).scale)||1,i=r*a,h=t.left+t.width/2,s=t.top+t.height/2,l=(n.width-t.width/r)/2*r,c=h+a*(t.left-l-h),_=s+a*(t.top-s),g=(t.left-c)/i,R=(t.top-_)/i,d=n.width-g-t.width/i,p=n.height-R-t.height/i,u=(parseFloat(getComputedStyle(o).borderTopLeftRadius)||0)/i;return{transform:`translate(${c-n.left}px, ${_-n.top}px) scale(${i})`,transformOrigin:"0 0",clipPath:`inset(${R}px ${d}px ${p}px ${g}px round ${u}px)`}}var f=.2,x=.5,B=(o,e)=>({duration:Math.min(320,Math.max(120,Math.abs(o)/Math.max(Math.abs(e),.6))),easing:m.MOTION_EASE_DECELERATE}),b=.1,S=.55,w=.2,D=1.2;function H(o,e){if(!e)return 0;const t=1-1/(Math.abs(o)*S/e+1);return Math.sign(o)*t*e}exports.DRAG_STEP_SHARE=f;exports.DRAG_STEP_SPEED=x;exports.RUBBER_BAND_SHARE=b;exports.RUBBER_BAND_STIFFNESS=S;exports.WHEEL_INERTIA_RISE=D;exports.WHEEL_STEP_SHARE=w;exports.ZOOM_REST=A;exports.glideTiming=B;exports.rubberBand=H;exports.zoomKeyframe=T;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** The image at its resting place, unclipped. */
|
|
2
|
+
export declare const ZOOM_REST: Keyframe;
|
|
3
|
+
export declare function zoomKeyframe(preview: HTMLElement, image: HTMLImageElement): Keyframe | null;
|
|
4
|
+
/** Share of the stage width a drag must cover to step on release… */
|
|
5
|
+
export declare const DRAG_STEP_SHARE = 0.2;
|
|
6
|
+
/** …capped, in px, so a wide screen does not ask for a long pull. */
|
|
7
|
+
export declare const DRAG_STEP_MAX = 160;
|
|
8
|
+
/** Release speed, in px/ms, that steps however short the drag. */
|
|
9
|
+
export declare const DRAG_STEP_SPEED = 0.5;
|
|
10
|
+
export declare const glideTiming: (distance: number, speed: number) => {
|
|
11
|
+
duration: number;
|
|
12
|
+
easing: string;
|
|
13
|
+
};
|
|
14
|
+
/** Rubber band past the first or last image: the most it gives, as a share
|
|
15
|
+
of the stage, and how stiffly (Apple's scroll-view constant). */
|
|
16
|
+
export declare const RUBBER_BAND_SHARE = 0.1;
|
|
17
|
+
export declare const RUBBER_BAND_STIFFNESS = 0.55;
|
|
18
|
+
/** Horizontal travel, in px, before a trackpad swipe starts moving the
|
|
19
|
+
image — a resting hand's drift does nothing. */
|
|
20
|
+
export declare const WHEEL_INTENT = 30;
|
|
21
|
+
/** Share of the stage width a trackpad swipe must pull to step. */
|
|
22
|
+
export declare const WHEEL_STEP_SHARE = 0.2;
|
|
23
|
+
/** Quiet time, in ms, after which a swipe short of a step springs back —
|
|
24
|
+
long enough that a pause in the fingers is not a let-go. */
|
|
25
|
+
export declare const WHEEL_CANCEL_DELAY = 600;
|
|
26
|
+
/** After a step, the inertia that follows is recognised by size: a delta
|
|
27
|
+
no more than this many times the last one is inertia, not new fingers.
|
|
28
|
+
The record fades after WHEEL_INERTIA_TTL ms of quiet. */
|
|
29
|
+
export declare const WHEEL_INERTIA_RISE = 1.2;
|
|
30
|
+
export declare const WHEEL_INERTIA_TTL = 300;
|
|
31
|
+
/** Inertia only fades: once it has, a delta this many times its faintest is
|
|
32
|
+
new fingers — the next swipe, without waiting for the inertia to die. */
|
|
33
|
+
export declare const WHEEL_FRESH_RISE = 2;
|
|
34
|
+
/**
|
|
35
|
+
* Where a track pulled `offset` px past the first or last image stands: it
|
|
36
|
+
* gives like a rubber band, ever stiffer, approaching but never reaching
|
|
37
|
+
* `limit`.
|
|
38
|
+
*/
|
|
39
|
+
export declare function rubberBand(offset: number, limit: number): number;
|
|
40
|
+
//# sourceMappingURL=media-viewer-motion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-viewer-motion.d.ts","sourceRoot":"","sources":["../../src/lib/media-viewer-motion.ts"],"names":[],"mappings":"AAQA,iDAAiD;AACjD,eAAO,MAAM,SAAS,EAAE,QAIvB,CAAC;AAQF,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,EACpB,KAAK,EAAE,gBAAgB,GACtB,QAAQ,GAAG,IAAI,CAmCjB;AAED,qEAAqE;AACrE,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,qEAAqE;AACrE,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC,kEAAkE;AAClE,eAAO,MAAM,eAAe,MAAM,CAAC;AAKnC,eAAO,MAAM,WAAW,GAAI,UAAU,MAAM,EAAE,OAAO,MAAM;;;CAMzD,CAAC;AAKH;oEACoE;AACpE,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,qBAAqB,OAAO,CAAC;AAE1C;mDACmD;AACnD,eAAO,MAAM,YAAY,KAAK,CAAC;AAE/B,mEAAmE;AACnE,eAAO,MAAM,gBAAgB,MAAM,CAAC;AAEpC;+DAC+D;AAC/D,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;4DAE4D;AAC5D,eAAO,MAAM,kBAAkB,MAAM,CAAC;AACtC,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC;4EAC4E;AAC5E,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAIhE"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MOTION_EASE_DECELERATE as f } from "@brightlocal/ui-components/lib/motion";
|
|
2
|
+
var _ = {
|
|
3
|
+
transform: "none",
|
|
4
|
+
transformOrigin: "0 0",
|
|
5
|
+
clipPath: "inset(0px 0px 0px 0px round 0px)"
|
|
6
|
+
};
|
|
7
|
+
function w(o, r) {
|
|
8
|
+
const t = o.getBoundingClientRect(), n = r.getBoundingClientRect();
|
|
9
|
+
if (!t.width || !t.height || !n.width || !n.height || t.bottom <= 0 || t.right <= 0 || t.top >= window.innerHeight || t.left >= window.innerWidth) return null;
|
|
10
|
+
const i = Math.max(t.width / n.width, t.height / n.height), h = o.querySelector("img"), a = h && parseFloat(getComputedStyle(h).scale) || 1, e = i * a, s = t.left + t.width / 2, c = t.top + t.height / 2, l = (n.width - t.width / i) / 2 * i, p = s + a * (t.left - l - s), g = c + a * (t.top - c), d = (t.left - p) / e, E = (t.top - g) / e, u = n.width - d - t.width / e, m = n.height - E - t.height / e, x = (parseFloat(getComputedStyle(o).borderTopLeftRadius) || 0) / e;
|
|
11
|
+
return {
|
|
12
|
+
transform: `translate(${p - n.left}px, ${g - n.top}px) scale(${e})`,
|
|
13
|
+
transformOrigin: "0 0",
|
|
14
|
+
clipPath: `inset(${E}px ${u}px ${m}px ${d}px round ${x}px)`
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
var v = 0.2, A = 0.5, M = (o, r) => ({
|
|
18
|
+
duration: Math.min(320, Math.max(120, Math.abs(o) / Math.max(Math.abs(r), 0.6))),
|
|
19
|
+
easing: f
|
|
20
|
+
}), T = 0.1, R = 0.55, b = 0.2, B = 1.2;
|
|
21
|
+
function $(o, r) {
|
|
22
|
+
if (!r) return 0;
|
|
23
|
+
const t = 1 - 1 / (Math.abs(o) * R / r + 1);
|
|
24
|
+
return Math.sign(o) * t * r;
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
v as DRAG_STEP_SHARE,
|
|
28
|
+
A as DRAG_STEP_SPEED,
|
|
29
|
+
T as RUBBER_BAND_SHARE,
|
|
30
|
+
R as RUBBER_BAND_STIFFNESS,
|
|
31
|
+
B as WHEEL_INERTIA_RISE,
|
|
32
|
+
b as WHEEL_STEP_SHARE,
|
|
33
|
+
_ as ZOOM_REST,
|
|
34
|
+
M as glideTiming,
|
|
35
|
+
$ as rubberBand,
|
|
36
|
+
w as zoomKeyframe
|
|
37
|
+
};
|
package/dist/lib/motion.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const s=require("./spring-settle.cjs");var S={type:"spring",stiffness:500,damping:45},E={type:"spring",stiffness:180,damping:24,mass:1},T={type:"spring",stiffness:80,damping:20,mass:1},i={type:"spring",stiffness:30,damping:9,mass:.5};exports.SETTLE_REST_DELTA=s.SETTLE_REST_DELTA;exports.SPRING_GENTLE=T;exports.SPRING_SETTLE=i;exports.SPRING_SMOOTH=E;exports.SPRING_SNAPPY=S;
|
package/dist/lib/motion.d.ts
CHANGED
|
@@ -25,6 +25,14 @@ export { SETTLE_REST_DELTA } from './spring-settle';
|
|
|
25
25
|
export declare const MOTION_DURATION_FAST_MS = 150;
|
|
26
26
|
export declare const MOTION_DURATION_BASE_MS = 200;
|
|
27
27
|
export declare const MOTION_DURATION_SLOW_MS = 300;
|
|
28
|
+
/**
|
|
29
|
+
* Easing curves — mirror --ds-motion-ease-decelerate / -emphasized, for
|
|
30
|
+
* JS-driven animation (WAAPI `easing`) that cannot read the CSS tokens.
|
|
31
|
+
* decelerate: motion that carries on from a gesture and settles
|
|
32
|
+
* emphasized: entrances that land with a soft finish
|
|
33
|
+
*/
|
|
34
|
+
export declare const MOTION_EASE_DECELERATE = "cubic-bezier(0, 0, 0.2, 1)";
|
|
35
|
+
export declare const MOTION_EASE_EMPHASIZED = "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
28
36
|
/**
|
|
29
37
|
* Quick and controlled, no overshoot — list reorders and other
|
|
30
38
|
* small-element layout moves.
|
package/dist/lib/motion.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/lib/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX,0DAA0D;AAC1D,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC"}
|
|
1
|
+
{"version":3,"file":"motion.d.ts","sourceRoot":"","sources":["../../src/lib/motion.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,+BAA+B,CAAC;AACnE,eAAO,MAAM,sBAAsB,mCAAmC,CAAC;AAEvE;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;;;;CAIhB,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX,0DAA0D;AAC1D,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC"}
|
package/dist/lib/motion.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
|
|
1
|
+
import { SETTLE_REST_DELTA as p } from "./spring-settle.js";
|
|
2
|
+
var i = {
|
|
2
3
|
type: "spring",
|
|
3
4
|
stiffness: 500,
|
|
4
5
|
damping: 45
|
|
5
|
-
},
|
|
6
|
+
}, n = {
|
|
7
|
+
type: "spring",
|
|
6
8
|
stiffness: 180,
|
|
7
9
|
damping: 24,
|
|
8
10
|
mass: 1
|
|
9
|
-
},
|
|
11
|
+
}, a = {
|
|
10
12
|
type: "spring",
|
|
11
13
|
stiffness: 80,
|
|
12
14
|
damping: 20,
|
|
13
15
|
mass: 1
|
|
14
|
-
},
|
|
16
|
+
}, r = {
|
|
15
17
|
type: "spring",
|
|
16
18
|
stiffness: 30,
|
|
17
19
|
damping: 9,
|
|
18
20
|
mass: 0.5
|
|
19
21
|
};
|
|
20
22
|
export {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
i as
|
|
26
|
-
t as SPRING_SNAPPY
|
|
23
|
+
p as SETTLE_REST_DELTA,
|
|
24
|
+
a as SPRING_GENTLE,
|
|
25
|
+
r as SPRING_SETTLE,
|
|
26
|
+
n as SPRING_SMOOTH,
|
|
27
|
+
i as SPRING_SNAPPY
|
|
27
28
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
const i=require("../_virtual/_rolldown/runtime.cjs");let r=require("react");r=i.__toESM(r,1);let e=require("react/jsx-runtime");function a({children:t}){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("div",{"aria-hidden":"true",className:"flex-1"}),t,(0,e.jsx)("div",{"aria-hidden":"true",className:"flex-[1.6]"})]})}exports.OpticalCenter=a;
|
|
@@ -7,6 +7,6 @@ interface OpticalCenterProps {
|
|
|
7
7
|
* Two flexible spacers in a 38/62 ratio around the children. The parent must
|
|
8
8
|
* be a `flex flex-1 flex-col` box for the ratio to have room to work.
|
|
9
9
|
*/
|
|
10
|
-
declare function OpticalCenter({ children }: OpticalCenterProps):
|
|
10
|
+
declare function OpticalCenter({ children }: OpticalCenterProps): React.JSX.Element;
|
|
11
11
|
export { OpticalCenter };
|
|
12
12
|
//# sourceMappingURL=optical-center.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optical-center.d.ts","sourceRoot":"","sources":["../../src/lib/optical-center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,UAAU,kBAAkB;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"optical-center.d.ts","sourceRoot":"","sources":["../../src/lib/optical-center.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAyB/B,UAAU,kBAAkB;IAC1B,iDAAiD;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;GAGG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE,kBAAkB,qBAQtD;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import "react";
|
|
2
|
+
import { Fragment as i, jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
3
|
+
function d({ children: r }) {
|
|
3
4
|
return /* @__PURE__ */ a(i, { children: [
|
|
4
|
-
/* @__PURE__ */ e("div", {
|
|
5
|
+
/* @__PURE__ */ e("div", {
|
|
6
|
+
"aria-hidden": "true",
|
|
7
|
+
className: "flex-1"
|
|
8
|
+
}),
|
|
5
9
|
r,
|
|
6
|
-
/* @__PURE__ */ e("div", {
|
|
10
|
+
/* @__PURE__ */ e("div", {
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
className: "flex-[1.6]"
|
|
13
|
+
})
|
|
7
14
|
] });
|
|
8
15
|
}
|
|
9
16
|
export {
|
|
10
|
-
|
|
17
|
+
d as OpticalCenter
|
|
11
18
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var E=.005;exports.SETTLE_REST_DELTA=E;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const t=require("../_virtual/_rolldown/runtime.cjs");let e=require("react");e=t.__toESM(e,1);var l="[&_tr>*:first-child]:pl-[var(--content-inset,24px)] [&_tr>*:last-child]:pr-[var(--content-inset,24px)]",a={default:48,sm:40},n=e.createContext("default");function o(r){return{role:"region","aria-label":r??"Scrollable table",tabIndex:0}}exports.TABLE_CONTAINER_INSET=l;exports.TABLE_ROW_MIN_HEIGHT=a;exports.TableSizeContext=n;exports.scrollRegionProps=o;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Internals shared by `Table` and `DataTable` / `VirtualizedDataTable`.
|
|
4
|
+
* This module is not in the package `exports` map, so nothing here is public
|
|
5
|
+
* API — `components/table.tsx` re-exports only what consumers need
|
|
6
|
+
* (`TableSize`).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Table density. One axis on the root (DS-556): the Table sets the row
|
|
10
|
+
* min-height for every cell and head beneath it, so a table reads as one
|
|
11
|
+
* density and sized content (Input, Button, Checkbox) never fights a per-cell
|
|
12
|
+
* size.
|
|
13
|
+
* - `default` — rows `h-12` (48px), column headers `h-12` (48px). The
|
|
14
|
+
* physical default height is unchanged from before DS-556.
|
|
15
|
+
* - `sm` — rows `h-10` (40px), column headers `h-9` (36px).
|
|
16
|
+
*/
|
|
17
|
+
export type TableSize = "default" | "sm";
|
|
18
|
+
/**
|
|
19
|
+
* Where a table's frame comes from (DS-1103).
|
|
20
|
+
* - `own` — the table draws its own 1px `border-border` frame with `rounded-md`
|
|
21
|
+
* corners; every cell keeps its `p-2`.
|
|
22
|
+
* - `container` — no border, square corners; the first and last cell of every
|
|
23
|
+
* row (head, body, footer, empty and skeleton rows alike) pad to the
|
|
24
|
+
* surrounding container's gutter, `var(--content-inset)`, which `Card`
|
|
25
|
+
* publishes per density (24px for `data`); the `content` spacing token (24px)
|
|
26
|
+
* is the fallback outside any container. Use it inside `CardContent flush`,
|
|
27
|
+
* a Sheet or a dialog body so the page shows one box, not two.
|
|
28
|
+
*/
|
|
29
|
+
export type TableFrame = "own" | "container";
|
|
30
|
+
/**
|
|
31
|
+
* Edge-cell padding for `frame="container"` — applied on the `<table>` so it
|
|
32
|
+
* reaches `TableHead`, `TableCell`, `TableEmpty`, footer and skeleton cells in
|
|
33
|
+
* both scroll-owner modes. The compound selector outranks the cells' own
|
|
34
|
+
* `p-2` / `px-2`.
|
|
35
|
+
*/
|
|
36
|
+
export declare const TABLE_CONTAINER_INSET = "[&_tr>*:first-child]:pl-[var(--content-inset,24px)] [&_tr>*:last-child]:pr-[var(--content-inset,24px)]";
|
|
37
|
+
/**
|
|
38
|
+
* Row min-height per Table `size`, in px — the `h-12` / `h-10` the cells
|
|
39
|
+
* carry in `tableCellVariants`. Keep the two in step: DataTable's virtualizer
|
|
40
|
+
* uses this as its default row estimate.
|
|
41
|
+
*/
|
|
42
|
+
export declare const TABLE_ROW_MIN_HEIGHT: Record<TableSize, number>;
|
|
43
|
+
/** Density of the enclosing `Table`; cells and heads read it. */
|
|
44
|
+
export declare const TableSizeContext: React.Context<TableSize>;
|
|
45
|
+
/**
|
|
46
|
+
* Focusable scroll-region semantics for a table's scroll container:
|
|
47
|
+
* `role="region"` with an accessible name plus `tabIndex={0}`, so keyboard
|
|
48
|
+
* users can focus the container and scroll it (axe:
|
|
49
|
+
* scrollable-region-focusable).
|
|
50
|
+
*
|
|
51
|
+
* Single source of the contract and its "Scrollable table" default.
|
|
52
|
+
* `Table` applies it to its own wrapper (`scrollOwner="self"` + `minWidth`);
|
|
53
|
+
* `DataTable` / `VirtualizedDataTable` apply it to their outer wrapper,
|
|
54
|
+
* which owns scrolling instead. The caller decides *when* the container is
|
|
55
|
+
* a scroll region; this helper only says *what* that means.
|
|
56
|
+
*/
|
|
57
|
+
export declare function scrollRegionProps(scrollRegionLabel: string | undefined): {
|
|
58
|
+
readonly role: "region";
|
|
59
|
+
readonly "aria-label": string;
|
|
60
|
+
readonly tabIndex: 0;
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=table-internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"table-internal.d.ts","sourceRoot":"","sources":["../../src/lib/table-internal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;AAEzC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,WAAW,CAAC;AAE7C;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,2GACwE,CAAC;AAE3G;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,SAAS,EAAE,MAAM,CAG1D,CAAC;AAEF,iEAAiE;AACjE,eAAO,MAAM,gBAAgB,0BAA4C,CAAC;AAE1E;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,iBAAiB,EAAE,MAAM,GAAG,SAAS;;;;EAMtE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
var r = "[&_tr>*:first-child]:pl-[var(--content-inset,24px)] [&_tr>*:last-child]:pr-[var(--content-inset,24px)]", a = {
|
|
3
|
+
default: 48,
|
|
4
|
+
sm: 40
|
|
5
|
+
}, l = e.createContext("default");
|
|
6
|
+
function n(t) {
|
|
7
|
+
return {
|
|
8
|
+
role: "region",
|
|
9
|
+
"aria-label": t ?? "Scrollable table",
|
|
10
|
+
tabIndex: 0
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
r as TABLE_CONTAINER_INSET,
|
|
15
|
+
a as TABLE_ROW_MIN_HEIGHT,
|
|
16
|
+
l as TableSizeContext,
|
|
17
|
+
n as scrollRegionProps
|
|
18
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a=require("../_virtual/_rolldown/runtime.cjs");let e=require("react");e=a.__toESM(e,1);function v(t,i,u){const[l,f]=e.useState(i),n=t!==void 0?t:l,s=e.useRef(n);e.useEffect(()=>{s.current=n});const o=t!==void 0;return[n,e.useCallback(r=>{const c=typeof r=="function"?r(s.current):r;o||f(c),u?.(c)},[o,u])]}exports.useControllable=v;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controlled/uncontrolled state helper.
|
|
3
|
+
*
|
|
4
|
+
* Resolves a "controlled or internal" value and returns a setter that takes
|
|
5
|
+
* a value or an updater (`SetStateAction<T>`, as TanStack Table expects).
|
|
6
|
+
* When the `controlled` value is defined, the parent owns state and
|
|
7
|
+
* `onChange` is called with the next value. When undefined, state is kept
|
|
8
|
+
* internally and `onChange` is still invoked (the common "notify but
|
|
9
|
+
* self-manage" pattern). Shared by DataTable and MediaViewer.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useControllable<T>(controlled: T | undefined, initialValue: T, onChange?: (next: T) => void): [T, (updater: T | ((prev: T) => T)) => void];
|
|
12
|
+
//# sourceMappingURL=use-controllable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-controllable.d.ts","sourceRoot":"","sources":["../../src/lib/use-controllable.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,UAAU,EAAE,CAAC,GAAG,SAAS,EACzB,YAAY,EAAE,CAAC,EACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,GAC3B,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CA0B9C"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as t from "react";
|
|
2
|
+
function l(e, r, o) {
|
|
3
|
+
const [i, a] = t.useState(r), n = e !== void 0 ? e : i, c = t.useRef(n);
|
|
4
|
+
t.useEffect(() => {
|
|
5
|
+
c.current = n;
|
|
6
|
+
});
|
|
7
|
+
const u = e !== void 0;
|
|
8
|
+
return [n, t.useCallback((s) => {
|
|
9
|
+
const f = typeof s == "function" ? s(c.current) : s;
|
|
10
|
+
u || a(f), o?.(f);
|
|
11
|
+
}, [u, o])];
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
l as useControllable
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
let a=require("react");function i(e,n,r){process.env.NODE_ENV==="development"&&(0,a.useEffect)(()=>{const t=requestAnimationFrame(()=>{e()&&console.warn(`[BrightLocal DS] ${n}`)});return()=>cancelAnimationFrame(t)},r)}exports.useDevWarning=i;
|
package/dist/lib/utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
let t=require("clsx"),a=require("tailwind-merge");var d=(0,a.extendTailwindMerge)({extend:{classGroups:{duration:[{duration:["fast","base","slow"]}],ease:[{ease:["emphasized","overshoot"]}],"font-weight":[{text:["emphasis"]}],"font-size":[{text:["display","heading-page","heading-section","heading-subsection","heading-compact","body","body-sm","body-xs","label","label-sm","field","metric","code","code-inline"]}]}}});function s(...e){return d((0,t.clsx)(e))}var i="data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-base ease-out data-[state=closed]:duration-fast data-[state=closed]:ease-in";exports.FLOATING_CONTENT_ANIMATION=i;exports.cn=s;
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,41 +1,34 @@
|
|
|
1
1
|
import { clsx as t } from "clsx";
|
|
2
2
|
import { extendTailwindMerge as a } from "tailwind-merge";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"code-inline"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
3
|
+
var o = a({ extend: { classGroups: {
|
|
4
|
+
duration: [{ duration: [
|
|
5
|
+
"fast",
|
|
6
|
+
"base",
|
|
7
|
+
"slow"
|
|
8
|
+
] }],
|
|
9
|
+
ease: [{ ease: ["emphasized", "overshoot"] }],
|
|
10
|
+
"font-weight": [{ text: ["emphasis"] }],
|
|
11
|
+
"font-size": [{ text: [
|
|
12
|
+
"display",
|
|
13
|
+
"heading-page",
|
|
14
|
+
"heading-section",
|
|
15
|
+
"heading-subsection",
|
|
16
|
+
"heading-compact",
|
|
17
|
+
"body",
|
|
18
|
+
"body-sm",
|
|
19
|
+
"body-xs",
|
|
20
|
+
"label",
|
|
21
|
+
"label-sm",
|
|
22
|
+
"field",
|
|
23
|
+
"metric",
|
|
24
|
+
"code",
|
|
25
|
+
"code-inline"
|
|
26
|
+
] }]
|
|
27
|
+
} } });
|
|
35
28
|
function i(...e) {
|
|
36
29
|
return o(t(e));
|
|
37
30
|
}
|
|
38
|
-
|
|
31
|
+
var n = "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 duration-base ease-out data-[state=closed]:duration-fast data-[state=closed]:ease-in";
|
|
39
32
|
export {
|
|
40
33
|
n as FLOATING_CONTENT_ANIMATION,
|
|
41
34
|
i as cn
|
package/dist/link.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"
|
|
1
|
+
const m=require("./_virtual/_rolldown/runtime.cjs");let a=require("react");a=m.__toESM(a,1);let q=require("@brightlocal/icons"),n=require("@brightlocal/ui-components/lib/utils"),i=require("react/jsx-runtime"),u=require("@radix-ui/react-slot"),y=require("class-variance-authority"),j=require("@brightlocal/ui-components/button");var S=new Set(["aria-disabled:opacity-50","aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40","aria-invalid:border-destructive","data-[state=open]:bg-accent"]),t=r=>(0,n.cn)((0,j.ButtonVariants)({variant:r,size:"default"}).split(/\s+/).filter(e=>e&&!S.has(e)).join(" "),"no-underline"),L=(0,y.cva)("",{variants:{variant:{inline:["inline-flex","items-center","gap-2","cursor-pointer","outline-none","rounded-sm","text-link","dark:text-link-dark","no-underline","hover:underline","hover:underline-offset-4","active:text-link/80","visited:text-link-visited","visited:dark:text-link-visited-dark","transition-[text-decoration,text-decoration-color,text-underline-offset,color]","duration-fast","ease-out","focus-visible:shadow-default"],inherit:["inline","cursor-pointer","outline-none","rounded-sm","text-inherit","underline","underline-offset-4","decoration-current/60","hover:decoration-current","[&_svg]:ml-1","[&_svg]:inline","[&_svg]:align-text-bottom","transition-[text-decoration-color]","duration-fast","ease-out","focus-visible:shadow-default"],primary:t("primary"),filled:t("secondary"),outline:(0,n.cn)(t("outline"),"text-foreground"),ghost:t("ghost"),icon:(0,n.cn)(t("ghost"),"size-9 p-0")}},defaultVariants:{variant:"inline"}}),c=a.forwardRef(({className:r,variant:e="inline",dataHook:f,trackingEl:v,trackingLabel:_,asChild:k=!1,external:o=!1,showExternalIcon:x=!0,children:l,...g},h)=>{const b=o?{target:"_blank",rel:"noopener noreferrer"}:{},p=e==="inline"?"link-default":`link-${e}`,s={ref:h,className:(0,n.cn)(L({variant:e}),r),"data-hook":f,"data-slot":"link","data-tracking-el":v||p,"data-tracking-label":_,...b,...g},d=o&&x&&(0,i.jsx)(q.ExternalLink,{"aria-hidden":"true","data-slot":"external-icon"});return k?(0,i.jsxs)(u.Slot,{...s,children:[(0,i.jsx)(u.Slottable,{children:l}),d]}):(0,i.jsxs)("a",{...s,children:[l,d]})});c.displayName="Link";exports.Link=c;
|
package/dist/link.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const linkVariants: (props?: ({
|
|
4
|
-
variant?: "inherit" | "inline" | "ghost" | "filled" | "icon" | "
|
|
4
|
+
variant?: "inherit" | "inline" | "ghost" | "filled" | "icon" | "primary" | "outline" | null | undefined;
|
|
5
5
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
6
|
/** Supported visual style variants for the Link component. */
|
|
7
7
|
export type LinkVariant = NonNullable<VariantProps<typeof linkVariants>["variant"]>;
|