@kumix/ui 0.3.6 → 0.3.8
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 +25 -24
- package/dist/cascader-types-BnH6wYD-.d.ts +183 -0
- package/dist/cascader-types-BnH6wYD-.d.ts.map +1 -0
- package/dist/components/agents/ai-sidebar.d.ts +17 -1
- package/dist/components/agents/ai-sidebar.d.ts.map +1 -1
- package/dist/components/agents/ai-sidebar.js +90 -14
- package/dist/components/agents/ai-sidebar.js.map +1 -1
- package/dist/components/agents/chat-app.d.ts +10 -5
- package/dist/components/agents/chat-app.d.ts.map +1 -1
- package/dist/components/agents/chat-app.js +54 -5
- package/dist/components/agents/chat-app.js.map +1 -1
- package/dist/components/agents/citations.d.ts.map +1 -1
- package/dist/components/agents/citations.js +5 -6
- package/dist/components/agents/citations.js.map +1 -1
- package/dist/components/agents/tool-approval.d.ts.map +1 -1
- package/dist/components/agents/tool-approval.js +1 -1
- package/dist/components/agents/tool-approval.js.map +1 -1
- package/dist/components/motion/action-swap.d.ts.map +1 -1
- package/dist/components/motion/action-swap.js +2 -2
- package/dist/components/motion/action-swap.js.map +1 -1
- package/dist/components/motion/animated-sidebar.d.ts.map +1 -1
- package/dist/components/motion/animated-sidebar.js +13 -3
- package/dist/components/motion/animated-sidebar.js.map +1 -1
- package/dist/components/motion/attachment-upload.d.ts.map +1 -1
- package/dist/components/motion/attachment-upload.js +9 -5
- package/dist/components/motion/attachment-upload.js.map +1 -1
- package/dist/components/motion/availability-scheduler/copy-menu.js +1 -1
- package/dist/components/motion/availability-scheduler/day-row.d.ts +5 -2
- package/dist/components/motion/availability-scheduler/day-row.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/day-row.js +18 -8
- package/dist/components/motion/availability-scheduler/day-row.js.map +1 -1
- package/dist/components/motion/availability-scheduler/index.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/index.js +27 -5
- package/dist/components/motion/availability-scheduler/index.js.map +1 -1
- package/dist/components/motion/availability-scheduler/time-select.d.ts +3 -1
- package/dist/components/motion/availability-scheduler/time-select.d.ts.map +1 -1
- package/dist/components/motion/availability-scheduler/time-select.js +3 -1
- package/dist/components/motion/availability-scheduler/time-select.js.map +1 -1
- package/dist/components/motion/bottom-sheet.d.ts.map +1 -1
- package/dist/components/motion/bottom-sheet.js +78 -74
- package/dist/components/motion/bottom-sheet.js.map +1 -1
- package/dist/components/motion/center-morph-modal.d.ts.map +1 -1
- package/dist/components/motion/center-morph-modal.js +82 -88
- package/dist/components/motion/center-morph-modal.js.map +1 -1
- package/dist/components/motion/command-palette.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +51 -27
- package/dist/components/motion/command-palette.js.map +1 -1
- package/dist/components/motion/context-menu.d.ts.map +1 -1
- package/dist/components/motion/context-menu.js +16 -6
- package/dist/components/motion/context-menu.js.map +1 -1
- package/dist/components/motion/cylinder-carousel.d.ts.map +1 -1
- package/dist/components/motion/cylinder-carousel.js +4 -3
- package/dist/components/motion/cylinder-carousel.js.map +1 -1
- package/dist/components/motion/drawer.d.ts.map +1 -1
- package/dist/components/motion/drawer.js +30 -30
- package/dist/components/motion/drawer.js.map +1 -1
- package/dist/components/motion/expandable-action-bar.d.ts +6 -0
- package/dist/components/motion/expandable-action-bar.d.ts.map +1 -1
- package/dist/components/motion/expandable-action-bar.js +38 -9
- package/dist/components/motion/expandable-action-bar.js.map +1 -1
- package/dist/components/motion/hold-action-button.d.ts +1 -1
- package/dist/components/motion/hold-action-button.d.ts.map +1 -1
- package/dist/components/motion/hold-action-button.js +64 -50
- package/dist/components/motion/hold-action-button.js.map +1 -1
- package/dist/components/motion/loader.js +20 -22
- package/dist/components/motion/loader.js.map +1 -1
- package/dist/components/motion/morphing-modal.d.ts.map +1 -1
- package/dist/components/motion/morphing-modal.js +83 -83
- package/dist/components/motion/morphing-modal.js.map +1 -1
- package/dist/components/motion/morphing-search.d.ts +28 -0
- package/dist/components/motion/morphing-search.d.ts.map +1 -0
- package/dist/components/motion/morphing-search.js +418 -0
- package/dist/components/motion/morphing-search.js.map +1 -0
- package/dist/components/motion/morphing-tabs.d.ts.map +1 -1
- package/dist/components/motion/morphing-tabs.js +59 -18
- package/dist/components/motion/morphing-tabs.js.map +1 -1
- package/dist/components/motion/notification-stack.d.ts.map +1 -1
- package/dist/components/motion/notification-stack.js +28 -11
- package/dist/components/motion/notification-stack.js.map +1 -1
- package/dist/components/motion/popover-morph.d.ts.map +1 -1
- package/dist/components/motion/popover-morph.js +26 -11
- package/dist/components/motion/popover-morph.js.map +1 -1
- package/dist/components/motion/popover.d.ts.map +1 -1
- package/dist/components/motion/popover.js +39 -28
- package/dist/components/motion/popover.js.map +1 -1
- package/dist/components/motion/preview-rail.d.ts.map +1 -1
- package/dist/components/motion/preview-rail.js +42 -13
- package/dist/components/motion/preview-rail.js.map +1 -1
- package/dist/components/motion/project-folder.js +20 -20
- package/dist/components/motion/project-folder.js.map +1 -1
- package/dist/components/motion/pull-to-refresh.d.ts.map +1 -1
- package/dist/components/motion/pull-to-refresh.js +8 -7
- package/dist/components/motion/pull-to-refresh.js.map +1 -1
- package/dist/components/motion/range-slider-bubble.d.ts.map +1 -1
- package/dist/components/motion/range-slider-bubble.js +2 -1
- package/dist/components/motion/range-slider-bubble.js.map +1 -1
- package/dist/components/motion/range-slider-fluid.d.ts.map +1 -1
- package/dist/components/motion/range-slider-fluid.js +2 -1
- package/dist/components/motion/range-slider-fluid.js.map +1 -1
- package/dist/components/motion/range-slider-ruler.d.ts.map +1 -1
- package/dist/components/motion/range-slider-ruler.js +2 -1
- package/dist/components/motion/range-slider-ruler.js.map +1 -1
- package/dist/components/motion/range-slider-wave.d.ts.map +1 -1
- package/dist/components/motion/range-slider-wave.js +2 -1
- package/dist/components/motion/range-slider-wave.js.map +1 -1
- package/dist/components/motion/range-slider.d.ts.map +1 -1
- package/dist/components/motion/range-slider.js +2 -1
- package/dist/components/motion/range-slider.js.map +1 -1
- package/dist/components/motion/select.d.ts +15 -1
- package/dist/components/motion/select.d.ts.map +1 -1
- package/dist/components/motion/select.js +15 -4
- package/dist/components/motion/select.js.map +1 -1
- package/dist/components/motion/slide-action-button.d.ts.map +1 -1
- package/dist/components/motion/slide-action-button.js +3 -2
- package/dist/components/motion/slide-action-button.js.map +1 -1
- package/dist/components/motion/swipeable-list.d.ts.map +1 -1
- package/dist/components/motion/swipeable-list.js +2 -1
- package/dist/components/motion/swipeable-list.js.map +1 -1
- package/dist/components/motion/table/index.d.ts.map +1 -1
- package/dist/components/motion/table/index.js +64 -6
- package/dist/components/motion/table/index.js.map +1 -1
- package/dist/components/motion/table/table-header.d.ts.map +1 -1
- package/dist/components/motion/table/table-header.js +3 -2
- package/dist/components/motion/table/table-header.js.map +1 -1
- package/dist/components/motion/text-reveal.d.ts.map +1 -1
- package/dist/components/motion/text-reveal.js +72 -48
- package/dist/components/motion/text-reveal.js.map +1 -1
- package/dist/components/motion/tooltip.d.ts.map +1 -1
- package/dist/components/motion/tooltip.js +35 -15
- package/dist/components/motion/tooltip.js.map +1 -1
- package/dist/components/motion/wheel-picker.d.ts.map +1 -1
- package/dist/components/motion/wheel-picker.js +4 -3
- package/dist/components/motion/wheel-picker.js.map +1 -1
- package/dist/components/reui/badge.d.ts +1 -1
- package/dist/components/reui/cascader/cascader-async.d.ts +90 -0
- package/dist/components/reui/cascader/cascader-async.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-async.js +549 -0
- package/dist/components/reui/cascader/cascader-async.js.map +1 -0
- package/dist/components/reui/cascader/cascader-columns.d.ts +29 -0
- package/dist/components/reui/cascader/cascader-columns.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-columns.js +135 -0
- package/dist/components/reui/cascader/cascader-columns.js.map +1 -0
- package/dist/components/reui/cascader/cascader-context.d.ts +193 -0
- package/dist/components/reui/cascader/cascader-context.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-context.js +59 -0
- package/dist/components/reui/cascader/cascader-context.js.map +1 -0
- package/dist/components/reui/cascader/cascader-footer.d.ts +85 -0
- package/dist/components/reui/cascader/cascader-footer.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-footer.js +456 -0
- package/dist/components/reui/cascader/cascader-footer.js.map +1 -0
- package/dist/components/reui/cascader/cascader-i18n.d.ts +17 -0
- package/dist/components/reui/cascader/cascader-i18n.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-i18n.js +68 -0
- package/dist/components/reui/cascader/cascader-i18n.js.map +1 -0
- package/dist/components/reui/cascader/cascader-item.d.ts +115 -0
- package/dist/components/reui/cascader/cascader-item.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-item.js +530 -0
- package/dist/components/reui/cascader/cascader-item.js.map +1 -0
- package/dist/components/reui/cascader/cascader-lib.d.ts +141 -0
- package/dist/components/reui/cascader/cascader-lib.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-lib.js +576 -0
- package/dist/components/reui/cascader/cascader-lib.js.map +1 -0
- package/dist/components/reui/cascader/cascader-nav.d.ts +59 -0
- package/dist/components/reui/cascader/cascader-nav.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-nav.js +312 -0
- package/dist/components/reui/cascader/cascader-nav.js.map +1 -0
- package/dist/components/reui/cascader/cascader-types.d.ts +2 -0
- package/dist/components/reui/cascader/cascader-types.js +2 -0
- package/dist/components/reui/cascader/cascader-virtual.d.ts +65 -0
- package/dist/components/reui/cascader/cascader-virtual.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader-virtual.js +240 -0
- package/dist/components/reui/cascader/cascader-virtual.js.map +1 -0
- package/dist/components/reui/cascader/cascader.d.ts +322 -0
- package/dist/components/reui/cascader/cascader.d.ts.map +1 -0
- package/dist/components/reui/cascader/cascader.js +1459 -0
- package/dist/components/reui/cascader/cascader.js.map +1 -0
- package/dist/components/reui/event-calendar/event-calendar-event.d.ts +28 -47
- package/dist/components/reui/event-calendar/event-calendar-event.d.ts.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-event.js +26 -44
- package/dist/components/reui/event-calendar/event-calendar-event.js.map +1 -1
- package/dist/components/reui/event-calendar/event-calendar-nav.js +1 -1
- package/dist/components/reui/event-calendar/event-calendar-types.d.ts +19 -57
- package/dist/components/reui/event-calendar/event-calendar-types.d.ts.map +1 -1
- package/dist/components/reui/filters/filters-advanced.d.ts +52 -0
- package/dist/components/reui/filters/filters-advanced.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-advanced.js +1191 -0
- package/dist/components/reui/filters/filters-advanced.js.map +1 -0
- package/dist/components/reui/filters/filters-builder.d.ts +43 -0
- package/dist/components/reui/filters/filters-builder.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-builder.js +152 -0
- package/dist/components/reui/filters/filters-builder.js.map +1 -0
- package/dist/components/reui/filters/filters-chip.d.ts +79 -0
- package/dist/components/reui/filters/filters-chip.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-chip.js +553 -0
- package/dist/components/reui/filters/filters-chip.js.map +1 -0
- package/dist/components/reui/filters/filters-context.d.ts +290 -0
- package/dist/components/reui/filters/filters-context.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-context.js +277 -0
- package/dist/components/reui/filters/filters-context.js.map +1 -0
- package/dist/components/reui/filters/filters-date.d.ts +43 -0
- package/dist/components/reui/filters/filters-date.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-date.js +143 -0
- package/dist/components/reui/filters/filters-date.js.map +1 -0
- package/dist/components/reui/filters/filters-dnd.d.ts +101 -0
- package/dist/components/reui/filters/filters-dnd.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-dnd.js +454 -0
- package/dist/components/reui/filters/filters-dnd.js.map +1 -0
- package/dist/components/reui/filters/filters-draft.d.ts +2 -0
- package/dist/components/reui/filters/filters-draft.js +128 -0
- package/dist/components/reui/filters/filters-draft.js.map +1 -0
- package/dist/components/reui/filters/filters-editors.d.ts +91 -0
- package/dist/components/reui/filters/filters-editors.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-editors.js +773 -0
- package/dist/components/reui/filters/filters-editors.js.map +1 -0
- package/dist/components/reui/filters/filters-i18n.d.ts +24 -0
- package/dist/components/reui/filters/filters-i18n.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-i18n.js +127 -0
- package/dist/components/reui/filters/filters-i18n.js.map +1 -0
- package/dist/components/reui/filters/filters-lib.d.ts +171 -0
- package/dist/components/reui/filters/filters-lib.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-lib.js +336 -0
- package/dist/components/reui/filters/filters-lib.js.map +1 -0
- package/dist/components/reui/filters/filters-operators.d.ts +49 -0
- package/dist/components/reui/filters/filters-operators.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-operators.js +300 -0
- package/dist/components/reui/filters/filters-operators.js.map +1 -0
- package/dist/components/reui/filters/filters-query.d.ts +132 -0
- package/dist/components/reui/filters/filters-query.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-query.js +476 -0
- package/dist/components/reui/filters/filters-query.js.map +1 -0
- package/dist/components/reui/filters/filters-types.d.ts +452 -0
- package/dist/components/reui/filters/filters-types.d.ts.map +1 -0
- package/dist/components/reui/filters/filters-types.js +2 -0
- package/dist/components/reui/filters/filters.d.ts +114 -0
- package/dist/components/reui/filters/filters.d.ts.map +1 -0
- package/dist/components/reui/filters/filters.js +638 -0
- package/dist/components/reui/filters/filters.js.map +1 -0
- package/dist/components/reui/frame.d.ts +1 -1
- package/dist/components/reui/gantt/gantt-bar.js +1 -1
- package/dist/components/reui/gantt/gantt-nav.js +1 -1
- package/dist/components/reui/gantt/gantt-types.d.ts +25 -71
- package/dist/components/reui/gantt/gantt-types.d.ts.map +1 -1
- package/dist/components/reui/gantt/gantt-view.js +1 -1
- package/dist/components/reui/icon-tile.d.ts +1 -1
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/bubble.d.ts +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/checkbox.js +1 -1
- package/dist/components/ui/checkbox.js.map +1 -1
- package/dist/components/ui/field.js +2 -2
- package/dist/components/ui/field.js.map +1 -1
- package/dist/components/ui/item.d.ts +2 -2
- package/dist/components/ui/marker.d.ts +1 -1
- package/dist/components/ui/radio-group.js +1 -1
- package/dist/components/ui/radio-group.js.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/switch.js +1 -1
- package/dist/components/ui/switch.js.map +1 -1
- package/dist/components/ui/tabs.d.ts +1 -1
- package/dist/components/ui/toggle.d.ts +1 -1
- package/dist/{copy-menu-Bk5GP9Gp.js → copy-menu-1FKoMc9o.js} +9 -2
- package/dist/copy-menu-1FKoMc9o.js.map +1 -0
- package/dist/filters-draft-DEAl3TO-.d.ts +70 -0
- package/dist/filters-draft-DEAl3TO-.d.ts.map +1 -0
- package/dist/hooks/use-dismiss.d.ts +34 -0
- package/dist/hooks/use-dismiss.d.ts.map +1 -0
- package/dist/hooks/use-dismiss.js +78 -0
- package/dist/hooks/use-dismiss.js.map +1 -0
- package/dist/hooks/use-favicon.d.ts +17 -0
- package/dist/hooks/use-favicon.d.ts.map +1 -0
- package/dist/hooks/use-favicon.js +35 -0
- package/dist/hooks/use-favicon.js.map +1 -0
- package/dist/hooks/use-hover-gesture.d.ts +38 -0
- package/dist/hooks/use-hover-gesture.d.ts.map +1 -0
- package/dist/hooks/use-hover-gesture.js +46 -0
- package/dist/hooks/use-hover-gesture.js.map +1 -0
- package/dist/hooks/use-slider.d.ts.map +1 -1
- package/dist/hooks/use-slider.js +3 -2
- package/dist/hooks/use-slider.js.map +1 -1
- package/dist/hooks/use-tap-gesture.d.ts +47 -0
- package/dist/hooks/use-tap-gesture.d.ts.map +1 -0
- package/dist/hooks/use-tap-gesture.js +51 -0
- package/dist/hooks/use-tap-gesture.js.map +1 -0
- package/dist/hooks/use-touch-capable.d.ts +15 -0
- package/dist/hooks/use-touch-capable.d.ts.map +1 -0
- package/dist/hooks/use-touch-capable.js +29 -0
- package/dist/hooks/use-touch-capable.js.map +1 -0
- package/dist/lib/text-shimmer.d.ts +2 -2
- package/dist/lib/text-shimmer.d.ts.map +1 -1
- package/dist/lib/text-shimmer.js +2 -2
- package/dist/lib/text-shimmer.js.map +1 -1
- package/dist/lib/touch.d.ts +66 -0
- package/dist/lib/touch.d.ts.map +1 -0
- package/dist/lib/touch.js +79 -0
- package/dist/lib/touch.js.map +1 -0
- package/dist/presence-gate-BekdC4Bo.js +24 -0
- package/dist/presence-gate-BekdC4Bo.js.map +1 -0
- package/dist/types-smkWN_7x.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/components/reui/filters.d.ts +0 -176
- package/dist/components/reui/filters.d.ts.map +0 -1
- package/dist/components/reui/filters.js +0 -1223
- package/dist/components/reui/filters.js.map +0 -1
- package/dist/copy-menu-Bk5GP9Gp.js.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo, useRef } from "react";
|
|
3
|
+
//#region src/hooks/use-tap-gesture.ts
|
|
4
|
+
/**
|
|
5
|
+
* The pointer gesture behind a click, recorded where the click cannot report
|
|
6
|
+
* it. A `click` carries no `pointerType` in the engines that matter, so the
|
|
7
|
+
* `pointerdown` before it is the only thing that says which input activated
|
|
8
|
+
* the control — and whether one did at all, since keyboard activation
|
|
9
|
+
* synthesizes a click with no pointer behind it.
|
|
10
|
+
*
|
|
11
|
+
* State goes in with the record because a click reports that no better: a
|
|
12
|
+
* browser that focuses a control on contact can open the very panel the tap
|
|
13
|
+
* was meant to open, and reading "is it open" at click time then undoes it.
|
|
14
|
+
* What the gesture started against is what it acts on.
|
|
15
|
+
*
|
|
16
|
+
* The record is spent by one click and dropped by everything else, because a
|
|
17
|
+
* record that outlives its gesture is worse than none:
|
|
18
|
+
*
|
|
19
|
+
* - A scroll or an OS gesture takes the touch away — `pointercancel`, no click
|
|
20
|
+
* ever — and the finger would sit in the record until some later click.
|
|
21
|
+
* - That later click is often `Enter` on a keyboard, which arrives with no
|
|
22
|
+
* pointerdown of its own and would inherit the abandoned finger. A keydown
|
|
23
|
+
* is the start of a keyboard activation and never part of a tap, so it drops
|
|
24
|
+
* the record too.
|
|
25
|
+
*
|
|
26
|
+
* Both ends have to be wired by the surface: `drop` on `onPointerCancel` and
|
|
27
|
+
* on `onKeyDown`.
|
|
28
|
+
*/
|
|
29
|
+
function useTapGesture() {
|
|
30
|
+
const record = useRef(null);
|
|
31
|
+
return useMemo(() => ({
|
|
32
|
+
start: (event, state) => {
|
|
33
|
+
record.current = {
|
|
34
|
+
pointerType: event.pointerType,
|
|
35
|
+
state
|
|
36
|
+
};
|
|
37
|
+
},
|
|
38
|
+
take: () => {
|
|
39
|
+
const spent = record.current;
|
|
40
|
+
record.current = null;
|
|
41
|
+
return spent;
|
|
42
|
+
},
|
|
43
|
+
drop: () => {
|
|
44
|
+
record.current = null;
|
|
45
|
+
}
|
|
46
|
+
}), []);
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { useTapGesture };
|
|
50
|
+
|
|
51
|
+
//# sourceMappingURL=use-tap-gesture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-tap-gesture.js","names":[],"sources":["../../src/hooks/use-tap-gesture.ts"],"sourcesContent":["\"use client\";\n\nimport { useMemo, useRef } from \"react\";\n\n/** What a pointerdown recorded, read back by the click that ends its gesture. */\nexport interface TapRecord<S> {\n /** Which input started the gesture. */\n pointerType: string;\n /** What the surface was showing when it started. */\n state: S;\n}\n\nexport interface TapGesture<S> {\n /** Record the gesture a pointerdown starts, with the state it starts in. */\n start: (event: { pointerType: string }, state: S) => void;\n /** Read the record and clear it. `null` when no pointer is behind this click. */\n take: () => TapRecord<S> | null;\n /** Drop the record: this gesture will never spend it on a click. */\n drop: () => void;\n}\n\n/**\n * The pointer gesture behind a click, recorded where the click cannot report\n * it. A `click` carries no `pointerType` in the engines that matter, so the\n * `pointerdown` before it is the only thing that says which input activated\n * the control — and whether one did at all, since keyboard activation\n * synthesizes a click with no pointer behind it.\n *\n * State goes in with the record because a click reports that no better: a\n * browser that focuses a control on contact can open the very panel the tap\n * was meant to open, and reading \"is it open\" at click time then undoes it.\n * What the gesture started against is what it acts on.\n *\n * The record is spent by one click and dropped by everything else, because a\n * record that outlives its gesture is worse than none:\n *\n * - A scroll or an OS gesture takes the touch away — `pointercancel`, no click\n * ever — and the finger would sit in the record until some later click.\n * - That later click is often `Enter` on a keyboard, which arrives with no\n * pointerdown of its own and would inherit the abandoned finger. A keydown\n * is the start of a keyboard activation and never part of a tap, so it drops\n * the record too.\n *\n * Both ends have to be wired by the surface: `drop` on `onPointerCancel` and\n * on `onKeyDown`.\n */\nexport function useTapGesture<S>(): TapGesture<S> {\n const record = useRef<TapRecord<S> | null>(null);\n\n return useMemo(\n () => ({\n start: (event, state) => {\n record.current = { pointerType: event.pointerType, state };\n },\n take: () => {\n const spent = record.current;\n record.current = null;\n return spent;\n },\n drop: () => {\n record.current = null;\n },\n }),\n [],\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,SAAgB,gBAAkC;CAChD,MAAM,SAAS,OAA4B,IAAI;CAE/C,OAAO,eACE;EACL,QAAQ,OAAO,UAAU;GACvB,OAAO,UAAU;IAAE,aAAa,MAAM;IAAa;GAAM;EAC3D;EACA,YAAY;GACV,MAAM,QAAQ,OAAO;GACrB,OAAO,UAAU;GACjB,OAAO;EACT;EACA,YAAY;GACV,OAAO,UAAU;EACnB;CACF,IACA,CAAC,CACH;AACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/hooks/use-touch-capable.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Returns true on devices that can be touched, whatever else they claim.
|
|
4
|
+
*
|
|
5
|
+
* This is not the inverse of `useHoverCapable`: iPadOS Safari browses
|
|
6
|
+
* desktop-class and answers `(hover: hover) and (pointer: fine)` with true
|
|
7
|
+
* while a finger is the only input there is, so anything that treats
|
|
8
|
+
* hover-capable as "no touch here" strands every iPad. Gate the *touch path*
|
|
9
|
+
* of an interaction on this hook and leave hover-only polish on
|
|
10
|
+
* `useHoverCapable`, so a component that opens on hover also opens on tap.
|
|
11
|
+
*/
|
|
12
|
+
declare function useTouchCapable(): boolean;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { useTouchCapable };
|
|
15
|
+
//# sourceMappingURL=use-touch-capable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-touch-capable.d.ts","names":[],"sources":["../../src/hooks/use-touch-capable.ts"],"mappings":";;;;;;;;;;;iBAcgB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
//#region src/hooks/use-touch-capable.ts
|
|
4
|
+
/**
|
|
5
|
+
* Returns true on devices that can be touched, whatever else they claim.
|
|
6
|
+
*
|
|
7
|
+
* This is not the inverse of `useHoverCapable`: iPadOS Safari browses
|
|
8
|
+
* desktop-class and answers `(hover: hover) and (pointer: fine)` with true
|
|
9
|
+
* while a finger is the only input there is, so anything that treats
|
|
10
|
+
* hover-capable as "no touch here" strands every iPad. Gate the *touch path*
|
|
11
|
+
* of an interaction on this hook and leave hover-only polish on
|
|
12
|
+
* `useHoverCapable`, so a component that opens on hover also opens on tap.
|
|
13
|
+
*/
|
|
14
|
+
function useTouchCapable() {
|
|
15
|
+
const [canTouch, setCanTouch] = useState(false);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (typeof window === "undefined") return;
|
|
18
|
+
const mq = window.matchMedia?.("(any-pointer: coarse)");
|
|
19
|
+
const update = () => setCanTouch(Boolean(mq?.matches) || navigator.maxTouchPoints > 0);
|
|
20
|
+
update();
|
|
21
|
+
mq?.addEventListener?.("change", update);
|
|
22
|
+
return () => mq?.removeEventListener?.("change", update);
|
|
23
|
+
}, []);
|
|
24
|
+
return canTouch;
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { useTouchCapable };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=use-touch-capable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-touch-capable.js","names":[],"sources":["../../src/hooks/use-touch-capable.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\n\n/**\n * Returns true on devices that can be touched, whatever else they claim.\n *\n * This is not the inverse of `useHoverCapable`: iPadOS Safari browses\n * desktop-class and answers `(hover: hover) and (pointer: fine)` with true\n * while a finger is the only input there is, so anything that treats\n * hover-capable as \"no touch here\" strands every iPad. Gate the *touch path*\n * of an interaction on this hook and leave hover-only polish on\n * `useHoverCapable`, so a component that opens on hover also opens on tap.\n */\nexport function useTouchCapable() {\n const [canTouch, setCanTouch] = useState(false);\n\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n const mq = window.matchMedia?.(\"(any-pointer: coarse)\");\n // iPadOS disguises its pointer media queries; maxTouchPoints it reports\n // honestly, which is what makes it the standard iPad tell.\n const update = () => setCanTouch(Boolean(mq?.matches) || navigator.maxTouchPoints > 0);\n update();\n mq?.addEventListener?.(\"change\", update);\n return () => mq?.removeEventListener?.(\"change\", update);\n }, []);\n\n return canTouch;\n}\n"],"mappings":";;;;;;;;;;;;;AAcA,SAAgB,kBAAkB;CAChC,MAAM,CAAC,UAAU,eAAe,SAAS,KAAK;CAE9C,gBAAgB;EACd,IAAI,OAAO,WAAW,aAAa;EACnC,MAAM,KAAK,OAAO,aAAa,uBAAuB;EAGtD,MAAM,eAAe,YAAY,QAAQ,IAAI,OAAO,KAAK,UAAU,iBAAiB,CAAC;EACrF,OAAO;EACP,IAAI,mBAAmB,UAAU,MAAM;EACvC,aAAa,IAAI,sBAAsB,UAAU,MAAM;CACzD,GAAG,CAAC,CAAC;CAEL,OAAO;AACT"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
//#region src/lib/text-shimmer.d.ts
|
|
3
|
-
declare const TEXT_SHIMMER_KEYFRAMES
|
|
4
|
-
declare const TEXT_SHIMMER_CLASS_NAME = "bg-[length:200%_100%] bg-clip-text text-transparent bg-[linear-gradient(110deg,var(--muted-foreground)_30%,var(--foreground)_50%,var(--muted-foreground)_70%)]";
|
|
3
|
+
declare const TEXT_SHIMMER_KEYFRAMES: string;
|
|
4
|
+
declare const TEXT_SHIMMER_CLASS_NAME = "beui-text-shimmer bg-[length:200%_100%] bg-clip-text text-transparent bg-[linear-gradient(110deg,var(--muted-foreground)_30%,var(--foreground)_50%,var(--muted-foreground)_70%)]";
|
|
5
5
|
declare function textShimmerStyle(duration: number): CSSProperties;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { TEXT_SHIMMER_CLASS_NAME, TEXT_SHIMMER_KEYFRAMES, textShimmerStyle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-shimmer.d.ts","names":[],"sources":["../../src/lib/text-shimmer.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"text-shimmer.d.ts","names":[],"sources":["../../src/lib/text-shimmer.ts"],"mappings":";;cASa;cAIA;iBAGG,iBAAiB,mBAAmB"}
|
package/dist/lib/text-shimmer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/lib/text-shimmer.ts
|
|
2
|
-
const TEXT_SHIMMER_KEYFRAMES = "@keyframes beui-text-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}";
|
|
3
|
-
const TEXT_SHIMMER_CLASS_NAME = "bg-[length:200%_100%] bg-clip-text text-transparent bg-[linear-gradient(110deg,var(--muted-foreground)_30%,var(--foreground)_50%,var(--muted-foreground)_70%)]";
|
|
2
|
+
const TEXT_SHIMMER_KEYFRAMES = "@keyframes beui-text-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion: reduce){.beui-text-shimmer{animation:none !important}}";
|
|
3
|
+
const TEXT_SHIMMER_CLASS_NAME = "beui-text-shimmer bg-[length:200%_100%] bg-clip-text text-transparent bg-[linear-gradient(110deg,var(--muted-foreground)_30%,var(--foreground)_50%,var(--muted-foreground)_70%)]";
|
|
4
4
|
function textShimmerStyle(duration) {
|
|
5
5
|
return { animation: `beui-text-shimmer ${duration}s linear infinite` };
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-shimmer.js","names":[],"sources":["../../src/lib/text-shimmer.ts"],"sourcesContent":["import type { CSSProperties } from \"react\";\n\nexport const TEXT_SHIMMER_KEYFRAMES =\n \"@keyframes beui-text-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}\";\n\nexport const TEXT_SHIMMER_CLASS_NAME =\n \"bg-[length:200%_100%] bg-clip-text text-transparent bg-[linear-gradient(110deg,var(--muted-foreground)_30%,var(--foreground)_50%,var(--muted-foreground)_70%)]\";\n\nexport function textShimmerStyle(duration: number): CSSProperties {\n return {\n animation: `beui-text-shimmer ${duration}s linear infinite`,\n };\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"text-shimmer.js","names":[],"sources":["../../src/lib/text-shimmer.ts"],"sourcesContent":["import type { CSSProperties } from \"react\";\n\n// The reduced-motion rule travels with the component. app/globals.css calms CSS\n// animation globally, but the registry bundles imports only, so an installed\n// copy never receives that reset.\n//\n// `!important` because the sweep is an inline style, which outranks a plain rule\n// in a media query. It selects a marker class carried by TEXT_SHIMMER_CLASS_NAME\n// so it also reaches consumers that build their own span out of these exports.\nexport const TEXT_SHIMMER_KEYFRAMES =\n \"@keyframes beui-text-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}\" +\n \"@media (prefers-reduced-motion: reduce){.beui-text-shimmer{animation:none !important}}\";\n\nexport const TEXT_SHIMMER_CLASS_NAME =\n \"beui-text-shimmer bg-[length:200%_100%] bg-clip-text text-transparent bg-[linear-gradient(110deg,var(--muted-foreground)_30%,var(--foreground)_50%,var(--muted-foreground)_70%)]\";\n\nexport function textShimmerStyle(duration: number): CSSProperties {\n return {\n animation: `beui-text-shimmer ${duration}s linear infinite`,\n };\n}\n"],"mappings":";AASA,MAAa,yBACX;AAGF,MAAa,0BACX;AAEF,SAAgB,iBAAiB,UAAiC;CAChE,OAAO,EACL,WAAW,qBAAqB,SAAS,mBAC3C;AACF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//#region src/lib/touch.d.ts
|
|
2
|
+
declare const TOUCH_GESTURE_CLASS = "select-none [-webkit-touch-callout:none]";
|
|
3
|
+
/**
|
|
4
|
+
* The same opt-out for a gesture surface that wraps content the consumer owns:
|
|
5
|
+
* a scroller, a context-menu trigger, a sheet header, a list row. Selection is
|
|
6
|
+
* suppressed only where the platform runs its own press gestures — a coarse
|
|
7
|
+
* pointer — so a mouse user can still select and copy that content. If the
|
|
8
|
+
* gesture itself would paint a selection under the cursor, add `select-none`
|
|
9
|
+
* for the duration of the gesture rather than reaching for
|
|
10
|
+
* `TOUCH_GESTURE_CLASS`.
|
|
11
|
+
*
|
|
12
|
+
* `pointer: coarse` describes the *primary* pointer and nothing else, so a
|
|
13
|
+
* hybrid machine reads it wrong in both directions: a tablet with a mouse
|
|
14
|
+
* plugged in keeps touch as primary and loses mouse selection, and a laptop
|
|
15
|
+
* with a touchscreen keeps the mouse as primary and leaves selection live
|
|
16
|
+
* under a finger. No media query can answer per interaction — the query is
|
|
17
|
+
* about the device, and the question is about the gesture in progress. The
|
|
18
|
+
* default stays here because it is right on the machines that are one thing or
|
|
19
|
+
* the other, and losing a selection is a nuisance; where the miss costs a
|
|
20
|
+
* *gesture* instead, the surface pairs it with `holdSelection` on the press.
|
|
21
|
+
*/
|
|
22
|
+
declare const TOUCH_GESTURE_CONTENT_CLASS = "[-webkit-touch-callout:none] pointer-coarse:select-none";
|
|
23
|
+
/**
|
|
24
|
+
* Suppress selection on `element` for as long as a gesture is running on it,
|
|
25
|
+
* whatever the primary pointer of the machine happens to be. Returns the
|
|
26
|
+
* release. Inline, so it wins over the class above and is gone again the
|
|
27
|
+
* moment the gesture ends.
|
|
28
|
+
*
|
|
29
|
+
* For the press gestures a native selection would otherwise steal — a
|
|
30
|
+
* long-press that opens a menu. Elsewhere prefer the classes: a surface that
|
|
31
|
+
* takes selection away for the whole session is a surface whose text nobody
|
|
32
|
+
* can copy.
|
|
33
|
+
*/
|
|
34
|
+
declare function holdSelection(element: HTMLElement): () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Pointer capture, best effort. WebKit throws `NotFoundError` when the pointer
|
|
37
|
+
* is already gone by the time the handler runs — routine on iOS, where the
|
|
38
|
+
* system can claim the touch first — and an uncaught throw takes the rest of
|
|
39
|
+
* the handler, the gesture included, down with it. Touch pointers carry
|
|
40
|
+
* implicit capture anyway, so losing it is never fatal.
|
|
41
|
+
*/
|
|
42
|
+
declare function capturePointer(element: Element, pointerId: number): void;
|
|
43
|
+
/** Release a capture taken with `capturePointer`, ignoring a stale pointer. */
|
|
44
|
+
declare function releasePointer(element: Element, pointerId: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Whether this event came from a pointer that is *hovering*: not a touch, and
|
|
47
|
+
* not currently pressed. Which input the user is holding right now is not
|
|
48
|
+
* something a device capability can answer — a touchscreen laptop hovers and
|
|
49
|
+
* taps, and iPadOS reports a fine hovering pointer for a finger — so both
|
|
50
|
+
* paths stay live and each handler branches on the event it was given.
|
|
51
|
+
*
|
|
52
|
+
* A pen resting on the glass is making contact, not hovering: `buttons` is the
|
|
53
|
+
* tell, and it sends a pen tap down the same route a finger takes.
|
|
54
|
+
*
|
|
55
|
+
* This answers what an *enter* asks. A leave is the other half of a pair and
|
|
56
|
+
* has to be read against the enter that started it — `useHoverGesture` in
|
|
57
|
+
* `lib/hooks/use-hover-gesture` does that, and hover surfaces should use it
|
|
58
|
+
* rather than asking this question twice.
|
|
59
|
+
*/
|
|
60
|
+
declare const isHoveringPointer: (event: {
|
|
61
|
+
pointerType: string;
|
|
62
|
+
buttons: number;
|
|
63
|
+
}) => boolean;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { TOUCH_GESTURE_CLASS, TOUCH_GESTURE_CONTENT_CLASS, capturePointer, holdSelection, isHoveringPointer, releasePointer };
|
|
66
|
+
//# sourceMappingURL=touch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touch.d.ts","names":[],"sources":["../../src/lib/touch.ts"],"mappings":";cAAa;;;;;;;;;;;;;;;;;;;;cAqBA;;;;;;;;;;;;iBAcG,cAAc,SAAS;;;;;;;;iBAgBvB,eAAe,SAAS,SAAS;;iBASjC,eAAe,SAAS,SAAS;;;;;;;;;;;;;;;;cAyBpC,oBAAqB;EAAS;EAAqB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//#region src/lib/touch.ts
|
|
2
|
+
const TOUCH_GESTURE_CLASS = "select-none [-webkit-touch-callout:none]";
|
|
3
|
+
/**
|
|
4
|
+
* The same opt-out for a gesture surface that wraps content the consumer owns:
|
|
5
|
+
* a scroller, a context-menu trigger, a sheet header, a list row. Selection is
|
|
6
|
+
* suppressed only where the platform runs its own press gestures — a coarse
|
|
7
|
+
* pointer — so a mouse user can still select and copy that content. If the
|
|
8
|
+
* gesture itself would paint a selection under the cursor, add `select-none`
|
|
9
|
+
* for the duration of the gesture rather than reaching for
|
|
10
|
+
* `TOUCH_GESTURE_CLASS`.
|
|
11
|
+
*
|
|
12
|
+
* `pointer: coarse` describes the *primary* pointer and nothing else, so a
|
|
13
|
+
* hybrid machine reads it wrong in both directions: a tablet with a mouse
|
|
14
|
+
* plugged in keeps touch as primary and loses mouse selection, and a laptop
|
|
15
|
+
* with a touchscreen keeps the mouse as primary and leaves selection live
|
|
16
|
+
* under a finger. No media query can answer per interaction — the query is
|
|
17
|
+
* about the device, and the question is about the gesture in progress. The
|
|
18
|
+
* default stays here because it is right on the machines that are one thing or
|
|
19
|
+
* the other, and losing a selection is a nuisance; where the miss costs a
|
|
20
|
+
* *gesture* instead, the surface pairs it with `holdSelection` on the press.
|
|
21
|
+
*/
|
|
22
|
+
const TOUCH_GESTURE_CONTENT_CLASS = "[-webkit-touch-callout:none] pointer-coarse:select-none";
|
|
23
|
+
/**
|
|
24
|
+
* Suppress selection on `element` for as long as a gesture is running on it,
|
|
25
|
+
* whatever the primary pointer of the machine happens to be. Returns the
|
|
26
|
+
* release. Inline, so it wins over the class above and is gone again the
|
|
27
|
+
* moment the gesture ends.
|
|
28
|
+
*
|
|
29
|
+
* For the press gestures a native selection would otherwise steal — a
|
|
30
|
+
* long-press that opens a menu. Elsewhere prefer the classes: a surface that
|
|
31
|
+
* takes selection away for the whole session is a surface whose text nobody
|
|
32
|
+
* can copy.
|
|
33
|
+
*/
|
|
34
|
+
function holdSelection(element) {
|
|
35
|
+
element.style.setProperty("user-select", "none");
|
|
36
|
+
element.style.setProperty("-webkit-user-select", "none");
|
|
37
|
+
return () => {
|
|
38
|
+
element.style.removeProperty("user-select");
|
|
39
|
+
element.style.removeProperty("-webkit-user-select");
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Pointer capture, best effort. WebKit throws `NotFoundError` when the pointer
|
|
44
|
+
* is already gone by the time the handler runs — routine on iOS, where the
|
|
45
|
+
* system can claim the touch first — and an uncaught throw takes the rest of
|
|
46
|
+
* the handler, the gesture included, down with it. Touch pointers carry
|
|
47
|
+
* implicit capture anyway, so losing it is never fatal.
|
|
48
|
+
*/
|
|
49
|
+
function capturePointer(element, pointerId) {
|
|
50
|
+
try {
|
|
51
|
+
element.setPointerCapture(pointerId);
|
|
52
|
+
} catch {}
|
|
53
|
+
}
|
|
54
|
+
/** Release a capture taken with `capturePointer`, ignoring a stale pointer. */
|
|
55
|
+
function releasePointer(element, pointerId) {
|
|
56
|
+
try {
|
|
57
|
+
if (element.hasPointerCapture(pointerId)) element.releasePointerCapture(pointerId);
|
|
58
|
+
} catch {}
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Whether this event came from a pointer that is *hovering*: not a touch, and
|
|
62
|
+
* not currently pressed. Which input the user is holding right now is not
|
|
63
|
+
* something a device capability can answer — a touchscreen laptop hovers and
|
|
64
|
+
* taps, and iPadOS reports a fine hovering pointer for a finger — so both
|
|
65
|
+
* paths stay live and each handler branches on the event it was given.
|
|
66
|
+
*
|
|
67
|
+
* A pen resting on the glass is making contact, not hovering: `buttons` is the
|
|
68
|
+
* tell, and it sends a pen tap down the same route a finger takes.
|
|
69
|
+
*
|
|
70
|
+
* This answers what an *enter* asks. A leave is the other half of a pair and
|
|
71
|
+
* has to be read against the enter that started it — `useHoverGesture` in
|
|
72
|
+
* `lib/hooks/use-hover-gesture` does that, and hover surfaces should use it
|
|
73
|
+
* rather than asking this question twice.
|
|
74
|
+
*/
|
|
75
|
+
const isHoveringPointer = (event) => event.pointerType !== "touch" && event.buttons === 0;
|
|
76
|
+
//#endregion
|
|
77
|
+
export { TOUCH_GESTURE_CLASS, TOUCH_GESTURE_CONTENT_CLASS, capturePointer, holdSelection, isHoveringPointer, releasePointer };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=touch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"touch.js","names":[],"sources":["../../src/lib/touch.ts"],"sourcesContent":["export const TOUCH_GESTURE_CLASS = \"select-none [-webkit-touch-callout:none]\";\n\n/**\n * The same opt-out for a gesture surface that wraps content the consumer owns:\n * a scroller, a context-menu trigger, a sheet header, a list row. Selection is\n * suppressed only where the platform runs its own press gestures — a coarse\n * pointer — so a mouse user can still select and copy that content. If the\n * gesture itself would paint a selection under the cursor, add `select-none`\n * for the duration of the gesture rather than reaching for\n * `TOUCH_GESTURE_CLASS`.\n *\n * `pointer: coarse` describes the *primary* pointer and nothing else, so a\n * hybrid machine reads it wrong in both directions: a tablet with a mouse\n * plugged in keeps touch as primary and loses mouse selection, and a laptop\n * with a touchscreen keeps the mouse as primary and leaves selection live\n * under a finger. No media query can answer per interaction — the query is\n * about the device, and the question is about the gesture in progress. The\n * default stays here because it is right on the machines that are one thing or\n * the other, and losing a selection is a nuisance; where the miss costs a\n * *gesture* instead, the surface pairs it with `holdSelection` on the press.\n */\nexport const TOUCH_GESTURE_CONTENT_CLASS =\n \"[-webkit-touch-callout:none] pointer-coarse:select-none\";\n\n/**\n * Suppress selection on `element` for as long as a gesture is running on it,\n * whatever the primary pointer of the machine happens to be. Returns the\n * release. Inline, so it wins over the class above and is gone again the\n * moment the gesture ends.\n *\n * For the press gestures a native selection would otherwise steal — a\n * long-press that opens a menu. Elsewhere prefer the classes: a surface that\n * takes selection away for the whole session is a surface whose text nobody\n * can copy.\n */\nexport function holdSelection(element: HTMLElement) {\n element.style.setProperty(\"user-select\", \"none\");\n element.style.setProperty(\"-webkit-user-select\", \"none\");\n return () => {\n element.style.removeProperty(\"user-select\");\n element.style.removeProperty(\"-webkit-user-select\");\n };\n}\n\n/**\n * Pointer capture, best effort. WebKit throws `NotFoundError` when the pointer\n * is already gone by the time the handler runs — routine on iOS, where the\n * system can claim the touch first — and an uncaught throw takes the rest of\n * the handler, the gesture included, down with it. Touch pointers carry\n * implicit capture anyway, so losing it is never fatal.\n */\nexport function capturePointer(element: Element, pointerId: number) {\n try {\n element.setPointerCapture(pointerId);\n } catch {\n // Pointer is no longer active — implicit capture still applies on touch.\n }\n}\n\n/** Release a capture taken with `capturePointer`, ignoring a stale pointer. */\nexport function releasePointer(element: Element, pointerId: number) {\n try {\n if (element.hasPointerCapture(pointerId)) {\n element.releasePointerCapture(pointerId);\n }\n } catch {\n // Capture was already dropped by the browser.\n }\n}\n\n/**\n * Whether this event came from a pointer that is *hovering*: not a touch, and\n * not currently pressed. Which input the user is holding right now is not\n * something a device capability can answer — a touchscreen laptop hovers and\n * taps, and iPadOS reports a fine hovering pointer for a finger — so both\n * paths stay live and each handler branches on the event it was given.\n *\n * A pen resting on the glass is making contact, not hovering: `buttons` is the\n * tell, and it sends a pen tap down the same route a finger takes.\n *\n * This answers what an *enter* asks. A leave is the other half of a pair and\n * has to be read against the enter that started it — `useHoverGesture` in\n * `lib/hooks/use-hover-gesture` does that, and hover surfaces should use it\n * rather than asking this question twice.\n */\nexport const isHoveringPointer = (event: { pointerType: string; buttons: number }) =>\n event.pointerType !== \"touch\" && event.buttons === 0;\n"],"mappings":";AAAA,MAAa,sBAAsB;;;;;;;;;;;;;;;;;;;;AAqBnC,MAAa,8BACX;;;;;;;;;;;;AAaF,SAAgB,cAAc,SAAsB;CAClD,QAAQ,MAAM,YAAY,eAAe,MAAM;CAC/C,QAAQ,MAAM,YAAY,uBAAuB,MAAM;CACvD,aAAa;EACX,QAAQ,MAAM,eAAe,aAAa;EAC1C,QAAQ,MAAM,eAAe,qBAAqB;CACpD;AACF;;;;;;;;AASA,SAAgB,eAAe,SAAkB,WAAmB;CAClE,IAAI;EACF,QAAQ,kBAAkB,SAAS;CACrC,QAAQ,CAER;AACF;;AAGA,SAAgB,eAAe,SAAkB,WAAmB;CAClE,IAAI;EACF,IAAI,QAAQ,kBAAkB,SAAS,GACrC,QAAQ,sBAAsB,SAAS;CAE3C,QAAQ,CAER;AACF;;;;;;;;;;;;;;;;AAiBA,MAAa,qBAAqB,UAChC,MAAM,gBAAgB,WAAW,MAAM,YAAY"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useIsPresent } from "motion/react";
|
|
2
|
+
//#region src/lib/presence-gate.tsx
|
|
3
|
+
/**
|
|
4
|
+
* Reads the presence of the subtree it renders and hands it down.
|
|
5
|
+
*
|
|
6
|
+
* `useIsPresent` only answers inside the `AnimatePresence` subtree, and the
|
|
7
|
+
* components that own an overlay render the `AnimatePresence` themselves, so
|
|
8
|
+
* the boolean has to be read one component further down: this is that
|
|
9
|
+
* component, and the render prop is how it reaches the layers.
|
|
10
|
+
*/
|
|
11
|
+
function PresenceGate({ children }) {
|
|
12
|
+
const isPresent = useIsPresent();
|
|
13
|
+
return children({
|
|
14
|
+
isPresent,
|
|
15
|
+
gate: {
|
|
16
|
+
inert: !isPresent,
|
|
17
|
+
style: { pointerEvents: isPresent ? "auto" : "none" }
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { PresenceGate as t };
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=presence-gate-BekdC4Bo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presence-gate-BekdC4Bo.js","names":[],"sources":["../src/lib/presence-gate.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { useIsPresent } from \"motion/react\";\n\nexport interface PresenceGateRenderProps {\n /**\n * False from the render that starts the exit animation onward. An overlay\n * kept in the tree by `AnimatePresence` is still the topmost thing on the\n * page, so anything it decides from `open` alone stays true for the whole\n * exit — this is the boolean that already knows the overlay is leaving.\n */\n isPresent: boolean;\n /**\n * Spread onto every layer that takes pointer events while the overlay is\n * open. Interaction releases in the same commit that starts the exit while\n * the visual exit keeps playing: pointer events stop landing, and `inert`\n * drops the subtree from focus order, from tab order and from the\n * accessibility tree — an exiting dialog is not a dialog you can still type\n * into. A layer that never takes pointer events (a wrapper that only centres\n * the panel) takes `inert={!isPresent}` alone, so its own\n * `pointer-events-none` is not overwritten.\n */\n gate: {\n inert: boolean;\n style: { pointerEvents: \"auto\" | \"none\" };\n };\n}\n\nexport interface PresenceGateProps {\n children: (props: PresenceGateRenderProps) => ReactNode;\n}\n\n/**\n * Reads the presence of the subtree it renders and hands it down.\n *\n * `useIsPresent` only answers inside the `AnimatePresence` subtree, and the\n * components that own an overlay render the `AnimatePresence` themselves, so\n * the boolean has to be read one component further down: this is that\n * component, and the render prop is how it reaches the layers.\n */\nexport function PresenceGate({ children }: PresenceGateProps) {\n const isPresent = useIsPresent();\n\n return children({\n isPresent,\n gate: {\n inert: !isPresent,\n style: { pointerEvents: isPresent ? \"auto\" : \"none\" },\n },\n });\n}\n"],"mappings":";;;;;;;;;;AAyCA,SAAgB,aAAa,EAAE,YAA+B;CAC5D,MAAM,YAAY,aAAa;CAE/B,OAAO,SAAS;EACd;EACA,MAAM;GACJ,OAAO,CAAC;GACR,OAAO,EAAE,eAAe,YAAY,SAAS,OAAO;EACtD;CACF,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types-smkWN_7x.d.ts","names":[],"sources":["../src/components/motion/availability-scheduler/types.ts"],"mappings":";KAAY;KAEA;EAAc;EAAY;EAAe;;KACzC;EAAoB;EAAkB,QAAQ;;KAC9C,mBAAmB,OAAO,QAAQ;KAClC;EAAe;EAAe;;
|
|
1
|
+
{"version":3,"file":"types-smkWN_7x.d.ts","names":[],"sources":["../src/components/motion/availability-scheduler/types.ts"],"mappings":";KAAY;KAEA;EAAc;EAAY;EAAe;;KACzC;EAAoB;EAAkB,QAAQ;;KAC9C,mBAAmB,OAAO,QAAQ;KAClC;EAAe;EAAe;;iBAuD1B,eAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumix/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Kumix React UI kit: shadcn/ui (Base UI, base-nova) + ReUI components, Tailwind tokens, and hooks. Per-file ESM exports.",
|
|
5
5
|
"author": "Kumix Labs <hai@kumix.io>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"build": "rimraf dist && mkdir -p dist && bun run build:css && tsdown && publint",
|
|
39
39
|
"types:check": "tsc --noEmit",
|
|
40
40
|
"add:shadcn": "shadcn add --all --overwrite",
|
|
41
|
-
"add:reui": "shadcn add @reui/alert @reui/autocomplete @reui/badge @reui/data-grid @reui/date-selector @reui/event-calendar @reui/use-file-upload @reui/filters @reui/frame @reui/gantt @reui/icon-stack @reui/icon-tile @reui/kanban @reui/number-field @reui/phone-input @reui/rating @reui/scrollspy @reui/sortable @reui/stepper @reui/timeline @reui/tree --overwrite",
|
|
41
|
+
"add:reui": "shadcn add @reui/alert @reui/autocomplete @reui/badge @reui/cascader @reui/data-grid @reui/date-selector @reui/event-calendar @reui/use-file-upload @reui/filters @reui/frame @reui/gantt @reui/icon-stack @reui/icon-tile @reui/kanban @reui/number-field @reui/phone-input @reui/rating @reui/scrollspy @reui/sortable @reui/stepper @reui/timeline @reui/tree --overwrite",
|
|
42
42
|
"add:beui:ai-agents": "shadcn add @beui/prompt-input @beui/todo-list @beui/code-block @beui/approval-card @beui/file-diff @beui/tool-result @beui/streaming-response @beui/image-generation @beui/tool-approval @beui/citations @beui/agent-activity @beui/reasoning-text @beui/thinking-shimmer @beui/agent-progress @beui/ai-sidebar @beui/chat-app @beui/message-bubble @beui/message @beui/message-scroller --overwrite",
|
|
43
43
|
"add:beui:components": "shadcn add @beui/marquee @beui/tabs @beui/switch @beui/input @beui/select @beui/select-morph @beui/combobox @beui/checkbox @beui/radio @beui/bottom-sheet @beui/pull-to-refresh @beui/shared-layout-bg @beui/bounce-sidebar @beui/animated-sidebar @beui/preview-rail @beui/dock @beui/tooltip @beui/context-menu @beui/popover @beui/popover-morph @beui/morphing-modal @beui/center-morph-modal @beui/chromatic-text-reveal @beui/text-reveal @beui/text-shimmer @beui/text-cascade @beui/number-ticker @beui/animated-number @beui/animated-badge @beui/action-swap-cascade @beui/action-swap-blur @beui/action-swap-roll @beui/animated-toast-stack @beui/theme-toggle @beui/bouncy-accordion @beui/drawer @beui/smooth-scroll @beui/scroll-progress @beui/parallax @beui/scroll-to @beui/scroll-reveal @beui/range-slider @beui/range-slider-fluid @beui/range-slider-wave @beui/range-slider-bubble @beui/range-slider-ruler @beui/wheel-picker @beui/table @beui/table-editable @beui/table-async @beui/shader-background @beui/cylinder-carousel @beui/loader @beui/tilt-card @beui/button-base @beui/button-stateful @beui/button-magnetic @beui/hold-action-button @beui/slide-action-button --overwrite",
|
|
44
|
-
"add:beui:blocks": "shadcn add @beui/availability-scheduler @beui/dynamic-island @beui/command-palette @beui/expandable-action-bar @beui/overflow-actions @beui/expandable-tabs @beui/morphing-tabs @beui/swipeable-list @beui/attachment-upload @beui/file-upload @beui/otp-input @beui/signup-form @beui/bloom-menu @beui/feedback-widget @beui/not-found-glitch @beui/not-found-magnetic @beui/not-found-spotlight @beui/not-found-stacked @beui/not-found-terminal @beui/infinite-masonry @beui/notification-stack @beui/project-folder --overwrite",
|
|
44
|
+
"add:beui:blocks": "shadcn add @beui/availability-scheduler @beui/dynamic-island @beui/command-palette @beui/morphing-search @beui/expandable-action-bar @beui/overflow-actions @beui/expandable-tabs @beui/morphing-tabs @beui/swipeable-list @beui/attachment-upload @beui/file-upload @beui/otp-input @beui/signup-form @beui/bloom-menu @beui/feedback-widget @beui/not-found-glitch @beui/not-found-magnetic @beui/not-found-spotlight @beui/not-found-stacked @beui/not-found-terminal @beui/infinite-masonry @beui/notification-stack @beui/project-folder --overwrite",
|
|
45
45
|
"add:beui": "bun run add:beui:ai-agents && bun run add:beui:components && bun run add:beui:blocks"
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/kumixlabs/ui",
|
|
@@ -84,21 +84,21 @@
|
|
|
84
84
|
"@paper-design/shaders-react": "^0.0.80",
|
|
85
85
|
"@shadcn/react": "^0.3.0",
|
|
86
86
|
"@tanstack/react-table": "^9.1.2",
|
|
87
|
-
"@tanstack/react-virtual": "^3.14.
|
|
87
|
+
"@tanstack/react-virtual": "^3.14.10",
|
|
88
88
|
"@types/react": "^19.2.18",
|
|
89
89
|
"class-variance-authority": "^0.7.1",
|
|
90
90
|
"clsx": "^2.1.1",
|
|
91
91
|
"cmdk": "^1.1.1",
|
|
92
92
|
"date-fns": "^4.4.0",
|
|
93
93
|
"embla-carousel-react": "^8.6.0",
|
|
94
|
-
"input-otp": "^1.
|
|
94
|
+
"input-otp": "^1.5.0",
|
|
95
95
|
"lenis": "^1.3.26",
|
|
96
|
-
"lucide-react": "^1.
|
|
97
|
-
"motion": "^13.1.
|
|
96
|
+
"lucide-react": "^1.33.0",
|
|
97
|
+
"motion": "^13.1.1",
|
|
98
98
|
"next-themes": "^0.4.6",
|
|
99
99
|
"react": "^19.2.8",
|
|
100
100
|
"react-day-picker": "^10.0.1",
|
|
101
|
-
"react-phone-number-input": "^3.4.
|
|
101
|
+
"react-phone-number-input": "^3.4.18",
|
|
102
102
|
"react-resizable-panels": "^4.12.3",
|
|
103
103
|
"recharts": "3.10.1",
|
|
104
104
|
"shiki": "^4.4.3",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"cmdk": ">=1.1.0",
|
|
124
124
|
"date-fns": ">=4.4.0",
|
|
125
125
|
"embla-carousel-react": ">=8.6.0",
|
|
126
|
-
"input-otp": ">=1.
|
|
126
|
+
"input-otp": ">=1.5.0",
|
|
127
127
|
"lenis": ">=1.3.0",
|
|
128
128
|
"lucide-react": ">=1.30.0",
|
|
129
129
|
"motion": ">=13.0.0",
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
//#region src/components/reui/filters.d.ts
|
|
3
|
-
interface FilterI18nConfig {
|
|
4
|
-
addFilter: string;
|
|
5
|
-
searchFields: string;
|
|
6
|
-
noFieldsFound: string;
|
|
7
|
-
noResultsFound: string;
|
|
8
|
-
select: string;
|
|
9
|
-
true: string;
|
|
10
|
-
false: string;
|
|
11
|
-
min: string;
|
|
12
|
-
max: string;
|
|
13
|
-
to: string;
|
|
14
|
-
typeAndPressEnter: string;
|
|
15
|
-
selected: string;
|
|
16
|
-
selectedCount: string;
|
|
17
|
-
percent: string;
|
|
18
|
-
defaultCurrency: string;
|
|
19
|
-
defaultColor: string;
|
|
20
|
-
addFilterTitle: string;
|
|
21
|
-
loadingOptions?: string;
|
|
22
|
-
errorLoadingOptions?: string;
|
|
23
|
-
operators: {
|
|
24
|
-
is: string;
|
|
25
|
-
isNot: string;
|
|
26
|
-
isAnyOf: string;
|
|
27
|
-
isNotAnyOf: string;
|
|
28
|
-
includesAll: string;
|
|
29
|
-
excludesAll: string;
|
|
30
|
-
before: string;
|
|
31
|
-
after: string;
|
|
32
|
-
between: string;
|
|
33
|
-
notBetween: string;
|
|
34
|
-
contains: string;
|
|
35
|
-
notContains: string;
|
|
36
|
-
startsWith: string;
|
|
37
|
-
endsWith: string;
|
|
38
|
-
isExactly: string;
|
|
39
|
-
equals: string;
|
|
40
|
-
notEquals: string;
|
|
41
|
-
greaterThan: string;
|
|
42
|
-
lessThan: string;
|
|
43
|
-
overlaps: string;
|
|
44
|
-
includes: string;
|
|
45
|
-
excludes: string;
|
|
46
|
-
includesAllOf: string;
|
|
47
|
-
includesAnyOf: string;
|
|
48
|
-
empty: string;
|
|
49
|
-
notEmpty: string;
|
|
50
|
-
};
|
|
51
|
-
placeholders: {
|
|
52
|
-
enterField: (fieldType: string) => string;
|
|
53
|
-
selectField: string;
|
|
54
|
-
searchField: (fieldName: string) => string;
|
|
55
|
-
enterKey: string;
|
|
56
|
-
enterValue: string;
|
|
57
|
-
};
|
|
58
|
-
helpers: {
|
|
59
|
-
formatOperator: (operator: string) => string;
|
|
60
|
-
};
|
|
61
|
-
validation: {
|
|
62
|
-
invalidEmail: string;
|
|
63
|
-
invalidUrl: string;
|
|
64
|
-
invalidTel: string;
|
|
65
|
-
invalid: string;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
declare const DEFAULT_I18N: FilterI18nConfig;
|
|
69
|
-
interface FilterOption<T = unknown> {
|
|
70
|
-
value: T;
|
|
71
|
-
label: string;
|
|
72
|
-
icon?: React.ReactNode;
|
|
73
|
-
metadata?: Record<string, unknown>;
|
|
74
|
-
className?: string;
|
|
75
|
-
}
|
|
76
|
-
interface FilterOperator {
|
|
77
|
-
value: string;
|
|
78
|
-
label: string;
|
|
79
|
-
supportsMultiple?: boolean;
|
|
80
|
-
}
|
|
81
|
-
interface CustomRendererProps<T = unknown> {
|
|
82
|
-
field: FilterFieldConfig<T>;
|
|
83
|
-
values: T[];
|
|
84
|
-
onChange: (values: T[]) => void;
|
|
85
|
-
operator: string;
|
|
86
|
-
}
|
|
87
|
-
interface FilterOptionListRenderProps<T = unknown> {
|
|
88
|
-
options: FilterOption<T>[];
|
|
89
|
-
highlightedIndex: number;
|
|
90
|
-
renderOption: (option: FilterOption<T>, index: number) => React.ReactNode;
|
|
91
|
-
}
|
|
92
|
-
interface FilterFieldGroup<T = unknown> {
|
|
93
|
-
group?: string;
|
|
94
|
-
fields: FilterFieldConfig<T>[];
|
|
95
|
-
}
|
|
96
|
-
type FilterFieldsConfig<T = unknown> = FilterFieldConfig<T>[] | FilterFieldGroup<T>[];
|
|
97
|
-
interface FilterFieldConfig<T = unknown> {
|
|
98
|
-
key?: string;
|
|
99
|
-
label?: string;
|
|
100
|
-
icon?: React.ReactNode;
|
|
101
|
-
type?: "select" | "multiselect" | "text" | "custom" | "separator";
|
|
102
|
-
group?: string;
|
|
103
|
-
fields?: FilterFieldConfig<T>[];
|
|
104
|
-
options?: FilterOption<T>[];
|
|
105
|
-
loadOptions?: (query: string) => FilterOption<T>[] | Promise<FilterOption<T>[]>;
|
|
106
|
-
renderOptionList?: (props: FilterOptionListRenderProps<T>) => React.ReactNode;
|
|
107
|
-
operators?: FilterOperator[];
|
|
108
|
-
customRenderer?: (props: CustomRendererProps<T>) => React.ReactNode;
|
|
109
|
-
customValueRenderer?: (values: T[], options: FilterOption<T>[]) => React.ReactNode;
|
|
110
|
-
placeholder?: string;
|
|
111
|
-
searchable?: boolean;
|
|
112
|
-
maxSelections?: number;
|
|
113
|
-
min?: number;
|
|
114
|
-
max?: number;
|
|
115
|
-
step?: number;
|
|
116
|
-
prefix?: string | React.ReactNode;
|
|
117
|
-
suffix?: string | React.ReactNode;
|
|
118
|
-
pattern?: string;
|
|
119
|
-
validation?: (value: unknown) => boolean | {
|
|
120
|
-
valid: boolean;
|
|
121
|
-
message?: string;
|
|
122
|
-
};
|
|
123
|
-
allowCustomValues?: boolean;
|
|
124
|
-
className?: string;
|
|
125
|
-
menuPopupClassName?: string;
|
|
126
|
-
groupLabel?: string;
|
|
127
|
-
onLabel?: string;
|
|
128
|
-
offLabel?: string;
|
|
129
|
-
onInputChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
130
|
-
defaultOperator?: string;
|
|
131
|
-
value?: T[];
|
|
132
|
-
onValueChange?: (values: T[]) => void;
|
|
133
|
-
}
|
|
134
|
-
declare const DEFAULT_OPERATORS: Record<string, FilterOperator[]>;
|
|
135
|
-
interface Filter<T = unknown> {
|
|
136
|
-
id: string;
|
|
137
|
-
field: string;
|
|
138
|
-
operator: string;
|
|
139
|
-
values: T[];
|
|
140
|
-
}
|
|
141
|
-
interface FilterGroup<T = unknown> {
|
|
142
|
-
id: string;
|
|
143
|
-
label?: string;
|
|
144
|
-
filters: Filter<T>[];
|
|
145
|
-
fields: FilterFieldConfig<T>[];
|
|
146
|
-
}
|
|
147
|
-
interface FiltersContentProps<T = unknown> {
|
|
148
|
-
filters: Filter<T>[];
|
|
149
|
-
fields: FilterFieldsConfig<T>;
|
|
150
|
-
onChange: (filters: Filter<T>[]) => void;
|
|
151
|
-
}
|
|
152
|
-
declare const FiltersContent: <T = unknown>({ filters, fields, onChange }: FiltersContentProps<T>) => React.JSX.Element;
|
|
153
|
-
interface FiltersProps<T = unknown> {
|
|
154
|
-
filters: Filter<T>[];
|
|
155
|
-
fields: FilterFieldsConfig<T>;
|
|
156
|
-
onChange: (filters: Filter<T>[]) => void;
|
|
157
|
-
className?: string;
|
|
158
|
-
variant?: "solid" | "default";
|
|
159
|
-
size?: "sm" | "default" | "lg";
|
|
160
|
-
radius?: "default" | "full";
|
|
161
|
-
i18n?: Partial<FilterI18nConfig>;
|
|
162
|
-
showSearchInput?: boolean;
|
|
163
|
-
trigger?: React.ReactNode;
|
|
164
|
-
allowMultiple?: boolean;
|
|
165
|
-
menuPopupClassName?: string;
|
|
166
|
-
collapseAddButton?: boolean;
|
|
167
|
-
enableShortcut?: boolean;
|
|
168
|
-
shortcutKey?: string;
|
|
169
|
-
shortcutLabel?: string;
|
|
170
|
-
}
|
|
171
|
-
declare function Filters<T = unknown>({ filters, fields, onChange, className, variant, size, radius, i18n, showSearchInput, trigger, allowMultiple, menuPopupClassName, enableShortcut, shortcutKey, shortcutLabel }: FiltersProps<T>): React.JSX.Element;
|
|
172
|
-
declare const createFilter: <T = unknown>(field: string, operator?: string, values?: T[]) => Filter<T>;
|
|
173
|
-
declare const createFilterGroup: <T = unknown>(id: string, label: string, fields: FilterFieldConfig<T>[], initialFilters?: Filter<T>[]) => FilterGroup<T>;
|
|
174
|
-
//#endregion
|
|
175
|
-
export { CustomRendererProps, DEFAULT_I18N, DEFAULT_OPERATORS, Filter, FilterFieldConfig, FilterFieldGroup, FilterFieldsConfig, FilterGroup, FilterI18nConfig, FilterOperator, FilterOption, FilterOptionListRenderProps, Filters, FiltersContent, createFilter, createFilterGroup };
|
|
176
|
-
//# sourceMappingURL=filters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","names":[],"sources":["../../../src/components/reui/filters.tsx"],"mappings":";;UA8CiB;EAEf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EAGA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;;EAIF;IACE,aAAa;IACb;IACA,cAAc;IACd;IACA;;EAIF;IACE,iBAAiB;;EAInB;IACE;IACA;IACA;IACA;;;cAKS,cAAc;UA0RV,aAAa;EAC5B,OAAO;EACP;EACA,OAAO,MAAM;EACb,WAAW;EACX;;UAGe;EACf;EACA;EACA;;UAIe,oBAAoB;EACnC,OAAO,kBAAkB;EACzB,QAAQ;EACR,WAAW,QAAQ;EACnB;;UAOe,4BAA4B;EAE3C,SAAS,aAAa;EAItB;EAGA,eAAe,QAAQ,aAAa,IAAI,kBAAkB,MAAM;;UAIjD,iBAAiB;EAChC;EACA,QAAQ,kBAAkB;;KAIhB,mBAAmB,eAAe,kBAAkB,OAAO,iBAAiB;UAEvE,kBAAkB;EACjC;EACA;EACA,OAAO,MAAM;EACb;EAEA;EACA,SAAS,kBAAkB;EAE3B,UAAU,aAAa;EAMvB,eAAe,kBAAkB,aAAa,OAAO,QAAQ,aAAa;EAK1E,oBAAoB,OAAO,4BAA4B,OAAO,MAAM;EACpE,YAAY;EACZ,kBAAkB,OAAO,oBAAoB,OAAO,MAAM;EAC1D,uBAAuB,QAAQ,KAAK,SAAS,aAAa,SAAS,MAAM;EACzE;EACA;EACA;EACA;EACA;EACA;EACA,kBAAkB,MAAM;EACxB,kBAAkB,MAAM;EACxB;EACA,cAAc;IAA+B;IAAgB;;EAC7D;EACA;EACA;EAEA;EAEA;EACA;EAEA,iBAAiB,GAAG,MAAM,YAAY;EAEtC;EAEA,QAAQ;EACR,iBAAiB,QAAQ;;cAgNd,mBAAmB,eAAe;UA8b9B,OAAO;EACtB;EACA;EACA;EACA,QAAQ;;UAGO,YAAY;EAC3B;EACA;EACA,SAAS,OAAO;EAChB,QAAQ,kBAAkB;;UAGlB,oBAAoB;EAC5B,SAAS,OAAO;EAChB,QAAQ,mBAAmB;EAC3B,WAAW,SAAS,OAAO;;cAGhB,iBAAkB,eAAa,SAAA,QAAA,YAIzC,oBAAoB,OAAE,MAAA,IAAA;UAgFf,aAAa;EACrB,SAAS,OAAO;EAChB,QAAQ,mBAAmB;EAC3B,WAAW,SAAS,OAAO;EAC3B;EACA;EACA;EACA;EACA,OAAO,QAAQ;EACf;EACA,UAAU,MAAM;EAChB;EACA;EACA;EACA;EACA;EACA;;iBAuPc,QAAQ,eACtB,SACA,QACA,UACA,WACA,SACA,MACA,QACA,MACA,iBACA,SACA,eACA,oBACA,gBACA,aACA,iBACC,aAAa,KAAE,MAAA,IAAA;cAudL,eAAgB,aAC3B,eACA,mBACA,SAAQ,QACP,OAAO;cAOG,oBAAqB,aAChC,YACA,eACA,QAAQ,kBAAkB,MAC1B,iBAAgB,OAAO,SACtB,YAAY"}
|