@kumix/ui 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/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 +11 -16
- package/dist/components/motion/action-swap.js.map +1 -1
- package/dist/components/motion/animated-sidebar.js +1 -0
- package/dist/components/motion/animated-sidebar.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 +26 -7
- package/dist/components/motion/bottom-sheet.js.map +1 -1
- package/dist/components/motion/combobox/list.js +2 -2
- package/dist/components/motion/combobox/list.js.map +1 -1
- package/dist/components/motion/command-palette.d.ts.map +1 -1
- package/dist/components/motion/command-palette.js +3 -1
- 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/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/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.d.ts +27 -0
- package/dist/components/motion/project-folder.d.ts.map +1 -0
- package/dist/components/motion/project-folder.js +310 -0
- package/dist/components/motion/project-folder.js.map +1 -0
- 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/tabs.d.ts.map +1 -1
- package/dist/components/motion/tabs.js +2 -0
- package/dist/components/motion/tabs.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/alert.d.ts +1 -1
- package/dist/components/reui/badge.d.ts +2 -2
- package/dist/components/reui/frame.d.ts +2 -2
- package/dist/components/reui/icon-tile.d.ts +2 -2
- package/dist/components/ui/attachment.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-group.d.ts +1 -1
- package/dist/components/ui/button.d.ts +2 -2
- package/dist/components/ui/field.d.ts +1 -1
- package/dist/components/ui/item.d.ts +1 -1
- package/dist/components/ui/sidebar.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/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/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/types-smkWN_7x.d.ts.map +1 -1
- package/package.json +3 -3
- 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"}
|
|
@@ -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"}
|
|
@@ -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.7",
|
|
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",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
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",
|
|
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 --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",
|
|
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",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"react": "^19.2.8",
|
|
100
100
|
"react-day-picker": "^10.0.1",
|
|
101
101
|
"react-phone-number-input": "^3.4.17",
|
|
102
|
-
"react-resizable-panels": "^4.12.
|
|
102
|
+
"react-resizable-panels": "^4.12.3",
|
|
103
103
|
"recharts": "3.10.1",
|
|
104
104
|
"shiki": "^4.4.3",
|
|
105
105
|
"tailwind-merge": "^3.6.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"copy-menu-Bk5GP9Gp.js","names":[],"sources":["../src/components/motion/availability-scheduler/types.ts","../src/components/motion/availability-scheduler/copy-menu.tsx"],"sourcesContent":["export type DayKey = \"mon\" | \"tue\" | \"wed\" | \"thu\" | \"fri\" | \"sat\" | \"sun\";\n\nexport type TimeRange = { id: string; start: string; end: string };\nexport type DayAvailability = { enabled: boolean; ranges: TimeRange[] };\nexport type WeekAvailability = Record<DayKey, DayAvailability>;\nexport type TimeOption = { value: string; label: string };\n\nexport const WEEKDAYS: { key: DayKey; label: string }[] = [\n { key: \"mon\", label: \"Monday\" },\n { key: \"tue\", label: \"Tuesday\" },\n { key: \"wed\", label: \"Wednesday\" },\n { key: \"thu\", label: \"Thursday\" },\n { key: \"fri\", label: \"Friday\" },\n { key: \"sat\", label: \"Saturday\" },\n { key: \"sun\", label: \"Sunday\" },\n];\n\n// ─── time helpers ────────────────────────────────────────────────────────────\n\nexport const toMinutes = (v: string) => {\n const [h, m] = v.split(\":\").map(Number);\n return h * 60 + m;\n};\n\nexport const toValue = (mins: number) => {\n const clamped = Math.max(0, Math.min(24 * 60 - 1, mins));\n const h = Math.floor(clamped / 60);\n const m = clamped % 60;\n return `${String(h).padStart(2, \"0\")}:${String(m).padStart(2, \"0\")}`;\n};\n\nexport const label12 = (v: string) => {\n const [h, m] = v.split(\":\").map(Number);\n const ap = h < 12 ? \"AM\" : \"PM\";\n const h12 = h % 12 === 0 ? 12 : h % 12;\n return `${h12}:${String(m).padStart(2, \"0\")} ${ap}`;\n};\n\nexport function buildOptions(step: number): TimeOption[] {\n const out: TimeOption[] = [];\n for (let m = 0; m < 24 * 60; m += step) {\n const value = toValue(m);\n out.push({ value, label: label12(value) });\n }\n return out;\n}\n\n// Default: Mon–Fri 9–5, weekend off. Fixed ids so SSR and first client render\n// agree (new ranges get counter ids afterwards).\nexport function defaultWeek(): WeekAvailability {\n const workday = (day: DayKey): DayAvailability => ({\n enabled: true,\n ranges: [{ id: `${day}-0`, start: \"09:00\", end: \"17:00\" }],\n });\n const off = (day: DayKey): DayAvailability => ({\n enabled: false,\n ranges: [{ id: `${day}-0`, start: \"09:00\", end: \"17:00\" }],\n });\n return {\n mon: workday(\"mon\"),\n tue: workday(\"tue\"),\n wed: workday(\"wed\"),\n thu: workday(\"thu\"),\n fri: workday(\"fri\"),\n sat: off(\"sat\"),\n sun: off(\"sun\"),\n };\n}\n","\"use client\";\n\nimport { useState } from \"react\";\nimport { Check, Copy } from \"lucide-react\";\nimport { AnimatePresence, motion } from \"motion/react\";\n\nimport { SPRING_PRESS } from \"../../../lib/ease\";\nimport { Checkbox } from \"../checkbox\";\nimport { MorphPopover, MorphPopoverContent } from \"../popover-morph\";\nimport { Tooltip } from \"../tooltip\";\nimport { IconButton } from \"./icon-button\";\nimport { type DayKey, WEEKDAYS } from \"./types\";\n\n// Copy this day's hours to other days: a morph popover with a day picker.\nexport function CopyMenu({\n fromLabel,\n reduce,\n onApply,\n}: {\n fromLabel: string;\n reduce: boolean;\n onApply: (targets: DayKey[]) => void;\n}) {\n const [open, setOpen] = useState(false);\n const [copied, setCopied] = useState(false);\n const [picked, setPicked] = useState<Set<DayKey>>(new Set());\n const others = WEEKDAYS.filter((d) => d.label !== fromLabel);\n\n const toggle = (k: DayKey) =>\n setPicked((prev) => {\n const next = new Set(prev);\n if (next.has(k)) next.delete(k);\n else next.add(k);\n return next;\n });\n\n const apply = (targets: DayKey[]) => {\n if (!targets.length) return;\n onApply(targets);\n setOpen(false);\n setPicked(new Set());\n setCopied(true);\n window.setTimeout(() => setCopied(false), 1200);\n };\n\n return (\n <MorphPopover open={open} onOpenChange={setOpen}>\n <Tooltip content=\"Copy times\">\n <IconButton\n label={`Copy ${fromLabel} hours to other days`}\n reduce={reduce}\n expanded={open}\n onClick={() => setOpen(!open)}\n >\n <AnimatePresence mode=\"popLayout\" initial={false}>\n {copied ? (\n <motion.span\n key=\"done\"\n initial={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.5 }}\n transition={SPRING_PRESS}\n className=\"text-foreground\"\n >\n <Check className=\"h-4 w-4\" />\n </motion.span>\n ) : (\n <motion.span\n key=\"copy\"\n initial={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.5 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={reduce ? { opacity: 0 } : { opacity: 0, scale: 0.5 }}\n transition={SPRING_PRESS}\n >\n <Copy className=\"h-4 w-4\" />\n </motion.span>\n )}\n </AnimatePresence>\n </IconButton>\n </Tooltip>\n\n <MorphPopoverContent align=\"end\" className=\"w-52 p-2\">\n <p className=\"px-2 py-1.5 font-medium text-muted-foreground text-xs\">Copy times to</p>\n <div className=\"flex flex-col\">\n {others.map((d) => (\n <Checkbox\n key={d.key}\n checked={picked.has(d.key)}\n onCheckedChange={() => toggle(d.key)}\n label={d.label}\n className=\"w-full flex-row-reverse justify-between rounded-lg px-2 py-1.5 transition-colors hover:bg-muted [&_button[data-state=unchecked]]:border-border-strong [&_button]:size-4 [&_button]:rounded-[5px] [&_button]:border\"\n />\n ))}\n </div>\n <div className=\"mt-1 flex items-center gap-2 border-border border-t px-1 pt-2\">\n <button\n type=\"button\"\n onClick={() => apply(others.map((d) => d.key))}\n className=\"flex-1 rounded-lg px-2 py-1.5 font-medium text-muted-foreground text-xs outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:bg-muted\"\n >\n Every day\n </button>\n <button\n type=\"button\"\n onClick={() => apply([...picked])}\n disabled={picked.size === 0}\n className=\"flex-1 rounded-lg bg-primary px-2 py-1.5 font-semibold text-primary-foreground text-xs outline-none transition-opacity hover:opacity-90 focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40\"\n >\n Apply\n </button>\n </div>\n </MorphPopoverContent>\n </MorphPopover>\n );\n}\n"],"mappings":";;;;;;;;;;AAOA,MAAa,WAA6C;CACxD;EAAE,KAAK;EAAO,OAAO;CAAS;CAC9B;EAAE,KAAK;EAAO,OAAO;CAAU;CAC/B;EAAE,KAAK;EAAO,OAAO;CAAY;CACjC;EAAE,KAAK;EAAO,OAAO;CAAW;CAChC;EAAE,KAAK;EAAO,OAAO;CAAS;CAC9B;EAAE,KAAK;EAAO,OAAO;CAAW;CAChC;EAAE,KAAK;EAAO,OAAO;CAAS;AAChC;AAIA,MAAa,aAAa,MAAc;CACtC,MAAM,CAAC,GAAG,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM;CACtC,OAAO,IAAI,KAAK;AAClB;AAEA,MAAa,WAAW,SAAiB;CACvC,MAAM,UAAU,KAAK,IAA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