@devalok/shilp-sutra 0.31.0 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/badge-group.js +123 -172
- package/dist/_chunks/document-preview.js +92 -0
- package/dist/_chunks/file-preview.js +511 -0
- package/dist/_chunks/image-preview.js +90 -0
- package/dist/_chunks/primitives.js +109 -109
- package/dist/_chunks/stat-row.js +144 -124
- package/dist/_chunks/use-calendar.js +558 -490
- package/dist/ai/block-renderer.d.ts +2 -1
- package/dist/ai/block-renderer.d.ts.map +1 -1
- package/dist/ai/block-renderer.js +30 -29
- package/dist/ai/blocks/block-table.d.ts.map +1 -1
- package/dist/ai/blocks/confirm.d.ts.map +1 -1
- package/dist/ai/blocks/divider.d.ts.map +1 -1
- package/dist/ai/blocks/error.d.ts.map +1 -1
- package/dist/ai/blocks/info.d.ts.map +1 -1
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/blocks/stat-row.d.ts.map +1 -1
- package/dist/ai/blocks/success.d.ts.map +1 -1
- package/dist/ai/blocks/text.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts +18 -0
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +126 -125
- package/dist/ai/conversation.d.ts +13 -1
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +78 -78
- package/dist/ai/types.d.ts +0 -1
- package/dist/ai/types.d.ts.map +1 -1
- package/dist/ai/types.js +0 -1
- package/dist/composed/bulk-action-bar.d.ts +6 -4
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +102 -58
- package/dist/composed/command-palette.d.ts +9 -0
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +68 -68
- package/dist/composed/confirm-dialog.d.ts +1 -1
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js +10 -10
- package/dist/composed/date-picker/date-picker.d.ts +11 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +39 -36
- package/dist/composed/emoji-picker.d.ts +6 -0
- package/dist/composed/emoji-picker.d.ts.map +1 -1
- package/dist/composed/emoji-picker.js +22 -20
- package/dist/composed/error-boundary.d.ts +21 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +47 -32
- package/dist/composed/file-preview/audio-preview.d.ts +7 -0
- package/dist/composed/file-preview/audio-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/document-preview.d.ts +7 -0
- package/dist/composed/file-preview/document-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/embed-preview.d.ts +7 -0
- package/dist/composed/file-preview/embed-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/image-preview.d.ts +7 -0
- package/dist/composed/file-preview/image-preview.d.ts.map +1 -0
- package/dist/composed/file-preview/shared.d.ts +20 -0
- package/dist/composed/file-preview/shared.d.ts.map +1 -0
- package/dist/composed/file-preview/video-preview.d.ts +6 -0
- package/dist/composed/file-preview/video-preview.d.ts.map +1 -0
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +10 -662
- package/dist/composed/filter-bar.d.ts +10 -2
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +42 -43
- package/dist/composed/form-section.d.ts +1 -1
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +22 -21
- package/dist/composed/index.d.ts +2 -2
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +58 -57
- package/dist/composed/inline-edit.d.ts +1 -1
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +33 -32
- package/dist/composed/markdown-viewer.d.ts +1 -1
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +60 -59
- package/dist/composed/master-detail.d.ts +11 -7
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +123 -84
- package/dist/composed/responsive-overlay.d.ts +8 -0
- package/dist/composed/responsive-overlay.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.d.ts +11 -3
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +21 -20
- package/dist/composed/schedule-view.d.ts +9 -1
- package/dist/composed/schedule-view.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +8 -4
- package/dist/hooks/use-touch-device.d.ts +12 -0
- package/dist/hooks/use-touch-device.d.ts.map +1 -0
- package/dist/hooks/use-touch-device.js +13 -0
- package/dist/hooks/use-viewport-height.d.ts +11 -0
- package/dist/hooks/use-viewport-height.d.ts.map +1 -0
- package/dist/hooks/use-viewport-height.js +16 -0
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +72 -63
- package/dist/shell/command-registry.d.ts.map +1 -1
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +77 -77
- package/dist/shell/top-bar.d.ts +2 -2
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +61 -60
- package/dist/tailwind/index.cjs +51 -7
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +51 -7
- package/dist/tokens/primitives.css +3 -1
- package/dist/tokens/semantic.css +16 -13
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +38 -39
- package/dist/ui/badge.d.ts +104 -2
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +8 -7
- package/dist/ui/button.d.ts +2 -2
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +54 -74
- package/dist/ui/card.js +24 -24
- package/dist/ui/charts/area-chart.d.ts +2 -0
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +2 -0
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -0
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/index.js +583 -577
- package/dist/ui/charts/line-chart.d.ts +2 -0
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts +2 -0
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts +2 -0
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts +2 -0
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +36 -27
- package/dist/ui/color-input.js +5 -5
- package/dist/ui/combobox.d.ts +6 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +1 -1
- package/dist/ui/context-menu.js +1 -1
- package/dist/ui/data-table-body.d.ts +12 -0
- package/dist/ui/data-table-body.d.ts.map +1 -0
- package/dist/ui/data-table-body.js +219 -0
- package/dist/ui/data-table-bulk-actions.d.ts +19 -0
- package/dist/ui/data-table-bulk-actions.d.ts.map +1 -0
- package/dist/ui/data-table-bulk-actions.js +61 -0
- package/dist/ui/data-table-card.d.ts +9 -0
- package/dist/ui/data-table-card.d.ts.map +1 -0
- package/dist/ui/data-table-card.js +73 -0
- package/dist/ui/data-table-context.d.ts +62 -0
- package/dist/ui/data-table-context.d.ts.map +1 -0
- package/dist/ui/data-table-context.js +48 -0
- package/dist/ui/data-table-header.d.ts +10 -0
- package/dist/ui/data-table-header.d.ts.map +1 -0
- package/dist/ui/data-table-header.js +141 -0
- package/dist/ui/data-table-pagination.d.ts +13 -0
- package/dist/ui/data-table-pagination.d.ts.map +1 -0
- package/dist/ui/data-table-pagination.js +84 -0
- package/dist/ui/data-table.d.ts +11 -9
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +258 -573
- package/dist/ui/dialog.d.ts +6 -2
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +84 -82
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/hover-card.d.ts +7 -0
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +3 -3
- package/dist/ui/icon-group.d.ts +2 -4
- package/dist/ui/icon-group.d.ts.map +1 -1
- package/dist/ui/icon-group.js +22 -23
- package/dist/ui/index.d.ts +1 -2
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +94 -99
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/bottom-sheet.d.ts +16 -0
- package/dist/ui/lib/bottom-sheet.d.ts.map +1 -0
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +64 -73
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +40 -44
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +19 -17
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +107 -32
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +80 -80
- package/dist/ui/progress.js +4 -4
- package/dist/ui/radio.d.ts +5 -2
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +29 -20
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +13 -12
- package/dist/ui/segmented-control.d.ts +6 -108
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +86 -272
- package/dist/ui/select.js +5 -5
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts +2 -0
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +102 -84
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +200 -175
- package/dist/ui/slider.js +14 -14
- package/dist/ui/status-dot.js +8 -8
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +33 -31
- package/dist/ui/switch.js +3 -3
- package/dist/ui/tabs.js +6 -6
- package/dist/ui/toast-types.d.ts +0 -1
- package/dist/ui/toast-types.d.ts.map +1 -1
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +156 -150
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +1 -1
- package/dist/ui/tooltip.js +3 -3
- package/docs/components/ui/data-table-body.md +13 -0
- package/docs/components/ui/data-table-bulk-actions.md +13 -0
- package/docs/components/ui/data-table-card.md +13 -0
- package/docs/components/ui/data-table-context.md +13 -0
- package/docs/components/ui/data-table-header.md +13 -0
- package/docs/components/ui/data-table-pagination.md +13 -0
- package/llms-full.txt +79 -48
- package/llms.txt +32 -0
- package/package.json +1 -6
- package/dist/ui/chip.d.ts +0 -19
- package/dist/ui/chip.d.ts.map +0 -1
- package/dist/ui/chip.js +0 -14
- package/dist/ui/lib/use-ripple.d.ts +0 -14
- package/dist/ui/lib/use-ripple.d.ts.map +0 -1
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { jsx as n, jsxs as p } from "react/jsx-runtime";
|
|
3
3
|
import * as c from "react";
|
|
4
4
|
import { N as Z, R as ee, m as te, a as ne, E as re, S as se, u as M, U as P, T as U, b as K, P as ie, H as $, c as q, d as O, L as V, I as F, M as W, e as G } from "../_chunks/tiptap.js";
|
|
5
|
-
import { IconFile as oe, IconDownload as le, IconBold as ae, IconItalic as ce, IconUnderline as ue, IconStrikethrough as de, IconHighlight as fe, IconH2 as me, IconH3 as he, IconBlockquote as ge, IconList as be, IconListNumbers as pe, IconListCheck as
|
|
5
|
+
import { IconFile as oe, IconDownload as le, IconBold as ae, IconItalic as ce, IconUnderline as ue, IconStrikethrough as de, IconHighlight as fe, IconH2 as me, IconH3 as he, IconBlockquote as ge, IconList as be, IconListNumbers as pe, IconListCheck as xe, IconCode as ke, IconPhoto as ve, IconPaperclip as ye, IconLineDashed as we, IconAlignLeft as Ae, IconAlignCenter as _e, IconAlignRight as Le, IconMoodSmile as Ie, IconArrowBackUp as Ce, IconArrowForwardUp as Re, IconLink as Ee } from "@tabler/icons-react";
|
|
6
6
|
import { Icon as u } from "../ui/icon.js";
|
|
7
7
|
import { createRoot as J } from "react-dom/client";
|
|
8
|
-
import { cn as
|
|
8
|
+
import { cn as k } from "../ui/lib/utils.js";
|
|
9
9
|
import { useColorMode as ze } from "../hooks/use-color-mode.js";
|
|
10
10
|
function Ne(e) {
|
|
11
11
|
return e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
@@ -65,7 +65,7 @@ const Q = Z.create({
|
|
|
65
65
|
role: "option",
|
|
66
66
|
"aria-selected": l === o,
|
|
67
67
|
onClick: () => r(t),
|
|
68
|
-
className:
|
|
68
|
+
className: k(
|
|
69
69
|
"flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm",
|
|
70
70
|
l === o ? "bg-surface-raised text-surface-fg" : "text-surface-fg-muted hover:bg-surface-raised"
|
|
71
71
|
),
|
|
@@ -148,7 +148,7 @@ const j = c.forwardRef(
|
|
|
148
148
|
role: "option",
|
|
149
149
|
"aria-selected": l === o,
|
|
150
150
|
onClick: () => r(t),
|
|
151
|
-
className:
|
|
151
|
+
className: k(
|
|
152
152
|
"flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left text-ds-sm",
|
|
153
153
|
l === o ? "bg-surface-raised text-surface-fg" : "text-surface-fg-muted hover:bg-surface-raised"
|
|
154
154
|
),
|
|
@@ -262,8 +262,9 @@ function d({
|
|
|
262
262
|
onClick: e,
|
|
263
263
|
disabled: s,
|
|
264
264
|
title: o,
|
|
265
|
+
"aria-label": o,
|
|
265
266
|
"aria-pressed": r,
|
|
266
|
-
className:
|
|
267
|
+
className: k(
|
|
267
268
|
"inline-flex h-ds-xs-plus w-ds-xs-plus items-center justify-center rounded-ds-md transition-colors duration-fast-01 ease-productive-standard",
|
|
268
269
|
"hover:bg-surface-raised-hover",
|
|
269
270
|
"disabled:pointer-events-none disabled:opacity-action-disabled",
|
|
@@ -281,7 +282,7 @@ function De({ editor: e }) {
|
|
|
281
282
|
}
|
|
282
283
|
const h = e.getAttributes("link").href || "";
|
|
283
284
|
i(h), s(!0), setTimeout(() => t.current?.focus(), 0);
|
|
284
|
-
},
|
|
285
|
+
}, x = (h) => {
|
|
285
286
|
h.preventDefault(), o.trim() && e.chain().focus().setLink({ href: o.trim() }).run(), s(!1), i("");
|
|
286
287
|
}, g = (h) => {
|
|
287
288
|
h.key === "Escape" && (s(!1), i(""), e.commands.focus());
|
|
@@ -291,7 +292,7 @@ function De({ editor: e }) {
|
|
|
291
292
|
r && /* @__PURE__ */ p(
|
|
292
293
|
"form",
|
|
293
294
|
{
|
|
294
|
-
onSubmit:
|
|
295
|
+
onSubmit: x,
|
|
295
296
|
"aria-label": "Edit link URL",
|
|
296
297
|
className: "absolute left-0 top-full z-popover mt-ds-01 flex items-center gap-ds-02 rounded-ds-md border border-surface-border-strong bg-surface-overlay p-ds-02 shadow-raised-hover",
|
|
297
298
|
children: [
|
|
@@ -317,22 +318,22 @@ function y() {
|
|
|
317
318
|
return /* @__PURE__ */ n("div", { className: "mx-ds-02 h-[16px] w-px bg-surface-border" });
|
|
318
319
|
}
|
|
319
320
|
function Me({ editor: e, toolbar: r, onImageClick: s, onFileClick: o, onEmojiClick: i }) {
|
|
320
|
-
const t = (C) => !r || r.includes(C), l = t("bold") || t("italic") || t("underline") || t("strike") || t("highlight"),
|
|
321
|
-
return /* @__PURE__ */ p("div", { className: "flex flex-wrap items-center gap-ds-01 border-b border-surface-border-strong px-ds-04 py-ds-02b", children: [
|
|
321
|
+
const t = (C) => !r || r.includes(C), l = t("bold") || t("italic") || t("underline") || t("strike") || t("highlight"), x = t("h2") || t("h3") || t("blockquote"), g = t("bulletList") || t("orderedList") || t("taskList") || t("codeBlock"), h = t("link") || !!s && t("image") || !!o && t("file") || t("hr"), v = t("alignLeft") || t("alignCenter") || t("alignRight"), L = !!i && t("emoji"), I = t("undo") || t("redo");
|
|
322
|
+
return /* @__PURE__ */ p("div", { role: "toolbar", "aria-label": "Text formatting", className: "flex flex-wrap items-center gap-ds-01 border-b border-surface-border-strong px-ds-04 py-ds-02b", children: [
|
|
322
323
|
t("bold") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleBold().run(), isActive: e.isActive("bold"), title: "Bold", children: /* @__PURE__ */ n(u, { icon: ae, size: "sm", stroke: "bold" }) }),
|
|
323
324
|
t("italic") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleItalic().run(), isActive: e.isActive("italic"), title: "Italic", children: /* @__PURE__ */ n(u, { icon: ce, size: "sm", stroke: "bold" }) }),
|
|
324
325
|
t("underline") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleUnderline().run(), isActive: e.isActive("underline"), title: "Underline", children: /* @__PURE__ */ n(u, { icon: ue, size: "sm", stroke: "bold" }) }),
|
|
325
326
|
t("strike") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleStrike().run(), isActive: e.isActive("strike"), title: "Strikethrough", children: /* @__PURE__ */ n(u, { icon: de, size: "sm", stroke: "bold" }) }),
|
|
326
327
|
t("highlight") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleHighlight().run(), isActive: e.isActive("highlight"), title: "Highlight", children: /* @__PURE__ */ n(u, { icon: fe, size: "sm", stroke: "bold" }) }),
|
|
327
|
-
l &&
|
|
328
|
+
l && x && /* @__PURE__ */ n(y, {}),
|
|
328
329
|
t("h2") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleHeading({ level: 2 }).run(), isActive: e.isActive("heading", { level: 2 }), title: "Heading 2", children: /* @__PURE__ */ n(u, { icon: me, size: "sm", stroke: "bold" }) }),
|
|
329
330
|
t("h3") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleHeading({ level: 3 }).run(), isActive: e.isActive("heading", { level: 3 }), title: "Heading 3", children: /* @__PURE__ */ n(u, { icon: he, size: "sm", stroke: "bold" }) }),
|
|
330
331
|
t("blockquote") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleBlockquote().run(), isActive: e.isActive("blockquote"), title: "Blockquote", children: /* @__PURE__ */ n(u, { icon: ge, size: "sm", stroke: "bold" }) }),
|
|
331
|
-
|
|
332
|
+
x && g && /* @__PURE__ */ n(y, {}),
|
|
332
333
|
t("bulletList") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleBulletList().run(), isActive: e.isActive("bulletList"), title: "Bullet list", children: /* @__PURE__ */ n(u, { icon: be, size: "sm", stroke: "bold" }) }),
|
|
333
334
|
t("orderedList") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleOrderedList().run(), isActive: e.isActive("orderedList"), title: "Ordered list", children: /* @__PURE__ */ n(u, { icon: pe, size: "sm", stroke: "bold" }) }),
|
|
334
|
-
t("taskList") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleTaskList().run(), isActive: e.isActive("taskList"), title: "Task list", children: /* @__PURE__ */ n(u, { icon:
|
|
335
|
-
t("codeBlock") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleCodeBlock().run(), isActive: e.isActive("codeBlock"), title: "Code block", children: /* @__PURE__ */ n(u, { icon:
|
|
335
|
+
t("taskList") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleTaskList().run(), isActive: e.isActive("taskList"), title: "Task list", children: /* @__PURE__ */ n(u, { icon: xe, size: "sm", stroke: "bold" }) }),
|
|
336
|
+
t("codeBlock") && /* @__PURE__ */ n(d, { onClick: () => e.chain().focus().toggleCodeBlock().run(), isActive: e.isActive("codeBlock"), title: "Code block", children: /* @__PURE__ */ n(u, { icon: ke, size: "sm", stroke: "bold" }) }),
|
|
336
337
|
g && h && /* @__PURE__ */ n(y, {}),
|
|
337
338
|
t("link") && /* @__PURE__ */ n(De, { editor: e }),
|
|
338
339
|
s && t("image") && /* @__PURE__ */ n(d, { onClick: s, title: "Insert image", children: /* @__PURE__ */ n(u, { icon: ve, size: "sm" }) }),
|
|
@@ -374,7 +375,7 @@ const Ke = c.forwardRef(
|
|
|
374
375
|
className: i,
|
|
375
376
|
editable: t = !0,
|
|
376
377
|
toolbar: l,
|
|
377
|
-
onImageUpload:
|
|
378
|
+
onImageUpload: x,
|
|
378
379
|
onFileUpload: g,
|
|
379
380
|
mentions: h,
|
|
380
381
|
onMentionSearch: v,
|
|
@@ -384,8 +385,8 @@ const Ke = c.forwardRef(
|
|
|
384
385
|
const R = c.useRef(null), E = c.useRef(!1), [z, w] = c.useState(!1), N = c.useRef(null), B = c.useRef(null), D = c.useRef(null), T = async (a) => {
|
|
385
386
|
const f = R.current;
|
|
386
387
|
if (f)
|
|
387
|
-
if (
|
|
388
|
-
const m = await
|
|
388
|
+
if (x) {
|
|
389
|
+
const m = await x(a);
|
|
389
390
|
m && /^https?:\/\//i.test(m) && f.chain().focus().setImage({ src: m }).run();
|
|
390
391
|
} else {
|
|
391
392
|
const m = new FileReader();
|
|
@@ -455,7 +456,7 @@ const Ke = c.forwardRef(
|
|
|
455
456
|
return m ? m.type.startsWith("image/") ? (T(m), !0) : g ? (S(m), !0) : !1 : !1;
|
|
456
457
|
},
|
|
457
458
|
attributes: {
|
|
458
|
-
class:
|
|
459
|
+
class: k(
|
|
459
460
|
...X,
|
|
460
461
|
"focus:outline-none",
|
|
461
462
|
"min-h-[120px] px-ds-04 py-ds-04"
|
|
@@ -478,7 +479,7 @@ const Ke = c.forwardRef(
|
|
|
478
479
|
return document.addEventListener("mousedown", a), () => document.removeEventListener("mousedown", a);
|
|
479
480
|
}, [z]), c.useEffect(() => {
|
|
480
481
|
E.current || b && r !== b.getHTML() && b.commands.setContent(r, !1);
|
|
481
|
-
}, [b, r]), b ? /* @__PURE__ */ p("div", { ref: C, ...I, className:
|
|
482
|
+
}, [b, r]), b ? /* @__PURE__ */ p("div", { ref: C, ...I, className: k("relative", i), children: [
|
|
482
483
|
z && /* @__PURE__ */ n(
|
|
483
484
|
"div",
|
|
484
485
|
{
|
|
@@ -500,7 +501,7 @@ const Ke = c.forwardRef(
|
|
|
500
501
|
/* @__PURE__ */ p(
|
|
501
502
|
"div",
|
|
502
503
|
{
|
|
503
|
-
className:
|
|
504
|
+
className: k(
|
|
504
505
|
"overflow-hidden rounded-ds-lg border border-surface-border-strong bg-surface-raised",
|
|
505
506
|
"transition-colors ease-productive-standard focus-within:border-surface-border-strong"
|
|
506
507
|
),
|
|
@@ -586,7 +587,7 @@ const $e = c.forwardRef(
|
|
|
586
587
|
editable: !1,
|
|
587
588
|
editorProps: {
|
|
588
589
|
attributes: {
|
|
589
|
-
class:
|
|
590
|
+
class: k(...X)
|
|
590
591
|
}
|
|
591
592
|
}
|
|
592
593
|
});
|
|
@@ -7,16 +7,24 @@ export interface ScheduleEvent {
|
|
|
7
7
|
end: Date;
|
|
8
8
|
color?: 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* A day/week calendar schedule grid. Renders time-slotted events with
|
|
12
|
+
* proportional height, color coding, click handlers, and a current-time indicator.
|
|
13
|
+
*/
|
|
10
14
|
export interface ScheduleViewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
/** Display mode: single-day column or full-week (7 columns). */
|
|
11
16
|
view: 'day' | 'week';
|
|
12
17
|
/** Current day (day view) or any date within the target week (week view). */
|
|
13
18
|
date: Date;
|
|
19
|
+
/** Events to display on the calendar grid. */
|
|
14
20
|
events: ScheduleEvent[];
|
|
21
|
+
/** Called when an event block is clicked. */
|
|
15
22
|
onEventClick?: (event: ScheduleEvent) => void;
|
|
23
|
+
/** Called when an empty time slot is clicked, with the slot's start and end times. */
|
|
16
24
|
onSlotClick?: (start: Date, end: Date) => void;
|
|
17
25
|
/** First visible hour (default 8). */
|
|
18
26
|
startHour?: number;
|
|
19
|
-
/** Last visible hour
|
|
27
|
+
/** Last visible hour -- exclusive (default 18). */
|
|
20
28
|
endHour?: number;
|
|
21
29
|
/** Slot duration in minutes (default 30). */
|
|
22
30
|
slotDuration?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-view.d.ts","sourceRoot":"","sources":["../../src/composed/schedule-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAkB9B,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,EAAE,IAAI,CAAA;IACT,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CACzE;AAED,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;IACpB,6EAA6E;IAC7E,IAAI,EAAE,IAAI,CAAA;IACV,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAC7C,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK,IAAI,CAAA;IAC9C,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,
|
|
1
|
+
{"version":3,"file":"schedule-view.d.ts","sourceRoot":"","sources":["../../src/composed/schedule-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAkB9B,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,EAAE,IAAI,CAAA;IACT,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CACzE;AAED;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,gEAAgE;IAChE,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;IACpB,6EAA6E;IAC7E,IAAI,EAAE,IAAI,CAAA;IACV,8CAA8C;IAC9C,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IAC7C,sFAAsF;IACtF,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,KAAK,IAAI,CAAA;IAC9C,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,mDAAmD;IACnD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6CAA6C;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAkND,QAAA,MAAM,YAAY,0FAyDjB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
export { useColorMode, type ColorMode } from './use-color-mode';
|
|
3
3
|
export { useIsMobile } from './use-mobile';
|
|
4
|
+
export { useTouchDevice } from './use-touch-device';
|
|
5
|
+
export { useViewportHeight } from './use-viewport-height';
|
|
4
6
|
export { toast } from './use-toast';
|
|
5
7
|
export type { UploadFile, ToastActionOptions, ToastUndoOptions, ToastUploadOptions, ToastOptions, ToastType, } from './use-toast';
|
|
6
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,SAAS,GACV,MAAM,aAAa,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AACnC,YAAY,EACV,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,SAAS,GACV,MAAM,aAAa,CAAA"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useColorMode as r } from "./use-color-mode.js";
|
|
3
|
-
import { useIsMobile as
|
|
4
|
-
import {
|
|
3
|
+
import { useIsMobile as p } from "./use-mobile.js";
|
|
4
|
+
import { useTouchDevice as f } from "./use-touch-device.js";
|
|
5
|
+
import { useViewportHeight as u } from "./use-viewport-height.js";
|
|
6
|
+
import { toast as i } from "../ui/toast.js";
|
|
5
7
|
export {
|
|
6
|
-
|
|
8
|
+
i as toast,
|
|
7
9
|
r as useColorMode,
|
|
8
|
-
|
|
10
|
+
p as useIsMobile,
|
|
11
|
+
f as useTouchDevice,
|
|
12
|
+
u as useViewportHeight
|
|
9
13
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/**
|
|
3
|
+
* Detects whether the device supports touch input.
|
|
4
|
+
*
|
|
5
|
+
* Use `useIsMobile()` for layout decisions (viewport width).
|
|
6
|
+
* Use `useTouchDevice()` for interaction decisions (hover vs touch).
|
|
7
|
+
*
|
|
8
|
+
* SSR-safe: returns false on server.
|
|
9
|
+
* Stable: only checks on mount, doesn't change on resize.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useTouchDevice(): boolean;
|
|
12
|
+
//# sourceMappingURL=use-touch-device.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-touch-device.d.ts","sourceRoot":"","sources":["../../src/hooks/use-touch-device.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAUxC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the current dynamic viewport height in pixels.
|
|
4
|
+
*
|
|
5
|
+
* Unlike CSS `100vh`, this accounts for mobile browser toolbar
|
|
6
|
+
* show/hide and virtual keyboard appearance via the Visual Viewport API.
|
|
7
|
+
*
|
|
8
|
+
* SSR-safe: returns 0 on server (check for 0 to detect SSR).
|
|
9
|
+
*/
|
|
10
|
+
export declare function useViewportHeight(): number;
|
|
11
|
+
//# sourceMappingURL=use-viewport-height.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-viewport-height.d.ts","sourceRoot":"","sources":["../../src/hooks/use-viewport-height.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAqB1C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
function s() {
|
|
4
|
+
const [n, r] = i.useState(0);
|
|
5
|
+
return i.useEffect(() => {
|
|
6
|
+
const e = () => {
|
|
7
|
+
r(window.visualViewport?.height ?? window.innerHeight);
|
|
8
|
+
};
|
|
9
|
+
e();
|
|
10
|
+
const t = window.visualViewport;
|
|
11
|
+
return t ? (t.addEventListener("resize", e), () => t.removeEventListener("resize", e)) : (window.addEventListener("resize", e), () => window.removeEventListener("resize", e));
|
|
12
|
+
}, []), n;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
s as useViewportHeight
|
|
16
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bottom-navbar.d.ts","sourceRoot":"","sources":["../../src/shell/bottom-navbar.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACzC,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC9B,6EAA6E;IAC7E,YAAY,CAAC,EAAE,aAAa,EAAE,CAAA;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,aAAa,EAAE,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;
|
|
1
|
+
{"version":3,"file":"bottom-navbar.d.ts","sourceRoot":"","sources":["../../src/shell/bottom-navbar.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,uEAAuE;IACvE,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IACzC,gCAAgC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,IAAI,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAA;IAC9B,6EAA6E;IAC7E,YAAY,CAAC,EAAE,aAAa,EAAE,CAAA;IAC9B,yDAAyD;IACzD,SAAS,CAAC,EAAE,aAAa,EAAE,CAAA;IAC3B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4ED,QAAA,MAAM,YAAY,uFA6JjB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,116 +1,125 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as t, Fragment as
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { IconX as
|
|
6
|
-
import { Icon as
|
|
7
|
-
import { cn as
|
|
8
|
-
import { springs as
|
|
9
|
-
import { u as
|
|
10
|
-
import { A as
|
|
11
|
-
function
|
|
2
|
+
import { jsxs as t, Fragment as C, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import * as R from "react";
|
|
4
|
+
import { useState as j, useRef as z, useCallback as B, useEffect as L } from "react";
|
|
5
|
+
import { IconX as S, IconDots as A } from "@tabler/icons-react";
|
|
6
|
+
import { Icon as x } from "../ui/icon.js";
|
|
7
|
+
import { cn as d } from "../ui/lib/utils.js";
|
|
8
|
+
import { springs as f } from "../ui/lib/motion.js";
|
|
9
|
+
import { u as g } from "../_chunks/link-context.js";
|
|
10
|
+
import { u as v, A as D, m as u } from "../_chunks/framer.js";
|
|
11
|
+
function F({ count: a }) {
|
|
12
12
|
if (!a || a <= 0) return null;
|
|
13
|
-
const
|
|
13
|
+
const o = a > 99 ? "99+" : String(a), i = a >= 10;
|
|
14
14
|
return /* @__PURE__ */ s(
|
|
15
15
|
"span",
|
|
16
16
|
{
|
|
17
17
|
"aria-label": `${a} notifications`,
|
|
18
|
-
className:
|
|
18
|
+
className: d(
|
|
19
19
|
"absolute -right-1 -top-0.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-error-9 text-[10px] font-semibold leading-none text-accent-fg animate-in zoom-in-75",
|
|
20
20
|
i ? "px-0.5" : ""
|
|
21
21
|
),
|
|
22
|
-
children:
|
|
22
|
+
children: o
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function I({
|
|
27
27
|
item: a,
|
|
28
|
-
isActive:
|
|
28
|
+
isActive: o,
|
|
29
29
|
onClick: i
|
|
30
30
|
}) {
|
|
31
|
-
const n =
|
|
32
|
-
return /* @__PURE__ */ s(
|
|
31
|
+
const n = g(), l = v();
|
|
32
|
+
return /* @__PURE__ */ s(u.div, { whileTap: l ? void 0 : { y: -2 }, transition: l ? { duration: 0 } : f.snappy, className: "flex max-w-[70px] flex-1", children: /* @__PURE__ */ s(
|
|
33
33
|
n,
|
|
34
34
|
{
|
|
35
35
|
href: a.href,
|
|
36
36
|
onClick: i,
|
|
37
37
|
"aria-label": a.title,
|
|
38
|
-
"aria-current":
|
|
39
|
-
className:
|
|
38
|
+
"aria-current": o ? "page" : void 0,
|
|
39
|
+
className: d(
|
|
40
40
|
"flex h-16 w-full cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm transition-colors duration-fast-02 ease-productive-standard",
|
|
41
|
-
|
|
41
|
+
o ? "font-semibold text-accent-11" : "text-surface-fg-subtle"
|
|
42
42
|
),
|
|
43
43
|
children: /* @__PURE__ */ t("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
o && /* @__PURE__ */ s(
|
|
45
|
+
u.div,
|
|
46
46
|
{
|
|
47
47
|
layoutId: "bottom-nav-indicator",
|
|
48
48
|
className: "absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-accent-9 p-0",
|
|
49
49
|
"aria-hidden": "true",
|
|
50
|
-
transition:
|
|
50
|
+
transition: l ? { duration: 0 } : f.snappy
|
|
51
51
|
}
|
|
52
52
|
),
|
|
53
53
|
/* @__PURE__ */ t("div", { className: "relative p-ds-03", children: [
|
|
54
54
|
/* @__PURE__ */ s("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md", "aria-hidden": "true", children: a.icon }),
|
|
55
|
-
a.badge != null && /* @__PURE__ */ s(
|
|
55
|
+
a.badge != null && /* @__PURE__ */ s(F, { count: a.badge })
|
|
56
56
|
] }),
|
|
57
57
|
/* @__PURE__ */ s("span", { className: "text-center", children: a.title })
|
|
58
58
|
] })
|
|
59
59
|
}
|
|
60
60
|
) });
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const E = R.forwardRef(
|
|
63
63
|
({
|
|
64
64
|
currentPath: a = "/",
|
|
65
|
-
user:
|
|
65
|
+
user: o,
|
|
66
66
|
primaryItems: i = [],
|
|
67
67
|
moreItems: n = [],
|
|
68
|
-
className:
|
|
69
|
-
...
|
|
70
|
-
},
|
|
71
|
-
const
|
|
72
|
-
|
|
68
|
+
className: l,
|
|
69
|
+
...N
|
|
70
|
+
}, y) => {
|
|
71
|
+
const w = g(), m = v(), [r, c] = j(!1), p = z(null), M = B(() => c(!1), []);
|
|
72
|
+
L(() => {
|
|
73
|
+
r && p.current && p.current.querySelector("a, button")?.focus();
|
|
74
|
+
}, [r]);
|
|
75
|
+
const b = (e, k = !1) => k || e === "/" ? a === e : a.startsWith(e), h = n.some(
|
|
76
|
+
(e) => b(e.href, e.exact)
|
|
73
77
|
);
|
|
74
|
-
return /* @__PURE__ */ t(
|
|
75
|
-
/* @__PURE__ */ s(
|
|
78
|
+
return /* @__PURE__ */ t(C, { children: [
|
|
79
|
+
/* @__PURE__ */ s(D, { children: r && // eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events -- backdrop overlay, dismiss via mouse only; keyboard users close via Escape
|
|
76
80
|
/* @__PURE__ */ t(
|
|
77
81
|
"div",
|
|
78
82
|
{
|
|
79
83
|
className: "fixed inset-0 z-overlay md:hidden",
|
|
80
|
-
onClick: () =>
|
|
84
|
+
onClick: () => c(!1),
|
|
81
85
|
children: [
|
|
82
86
|
/* @__PURE__ */ s("div", { className: "absolute inset-0 bg-overlay" }),
|
|
83
87
|
/* @__PURE__ */ t(
|
|
84
|
-
|
|
88
|
+
u.div,
|
|
85
89
|
{
|
|
90
|
+
ref: p,
|
|
91
|
+
role: "dialog",
|
|
92
|
+
"aria-label": "More navigation",
|
|
86
93
|
initial: { y: "100%" },
|
|
87
94
|
animate: { y: 0 },
|
|
88
95
|
exit: { y: "100%" },
|
|
89
|
-
transition:
|
|
96
|
+
transition: m ? { duration: 0 } : f.smooth,
|
|
90
97
|
className: "absolute bottom-[72px] left-0 right-0 rounded-t-ds-2xl border-t border-surface-border-strong bg-surface-overlay p-ds-05 pb-ds-03",
|
|
91
98
|
onClick: (e) => e.stopPropagation(),
|
|
92
|
-
onKeyDown: (e) =>
|
|
99
|
+
onKeyDown: (e) => {
|
|
100
|
+
e.stopPropagation(), e.key === "Escape" && M();
|
|
101
|
+
},
|
|
93
102
|
children: [
|
|
94
103
|
/* @__PURE__ */ t("div", { className: "mb-ds-04 flex items-center justify-between", children: [
|
|
95
104
|
/* @__PURE__ */ s("span", { className: "text-ds-md font-semibold text-surface-fg", children: "More" }),
|
|
96
105
|
/* @__PURE__ */ s(
|
|
97
106
|
"button",
|
|
98
107
|
{
|
|
99
|
-
onClick: () =>
|
|
108
|
+
onClick: () => c(!1),
|
|
100
109
|
"aria-label": "Close more menu",
|
|
101
110
|
className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-full hover:bg-surface-raised-hover",
|
|
102
|
-
children: /* @__PURE__ */ s(
|
|
111
|
+
children: /* @__PURE__ */ s(x, { icon: S, size: "sm", className: "text-surface-fg-muted" })
|
|
103
112
|
}
|
|
104
113
|
)
|
|
105
114
|
] }),
|
|
106
115
|
/* @__PURE__ */ s("div", { className: "grid grid-cols-4 gap-ds-03", children: n.map((e) => /* @__PURE__ */ t(
|
|
107
|
-
|
|
116
|
+
w,
|
|
108
117
|
{
|
|
109
118
|
href: e.href,
|
|
110
|
-
onClick: () =>
|
|
111
|
-
className:
|
|
119
|
+
onClick: () => c(!1),
|
|
120
|
+
className: d(
|
|
112
121
|
"flex flex-col items-center gap-ds-02b rounded-ds-xl p-ds-04 text-ds-sm transition-colors ease-productive-standard",
|
|
113
|
-
|
|
122
|
+
b(e.href, e.exact) ? "bg-surface-raised-hover text-accent-11" : "text-surface-fg-subtle hover:bg-surface-raised-hover"
|
|
114
123
|
),
|
|
115
124
|
children: [
|
|
116
125
|
/* @__PURE__ */ s("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md", children: e.icon }),
|
|
@@ -128,46 +137,46 @@ const L = w.forwardRef(
|
|
|
128
137
|
/* @__PURE__ */ t(
|
|
129
138
|
"nav",
|
|
130
139
|
{
|
|
131
|
-
...
|
|
132
|
-
ref:
|
|
140
|
+
...N,
|
|
141
|
+
ref: y,
|
|
133
142
|
"aria-label": "Mobile navigation",
|
|
134
|
-
className:
|
|
135
|
-
"fixed bottom-0 left-0 right-0 z-sticky flex w-full flex-row items-start justify-between border-t border-surface-border-strong bg-surface-raised px-ds-05 pb-
|
|
136
|
-
|
|
143
|
+
className: d(
|
|
144
|
+
"fixed bottom-0 left-0 right-0 z-sticky flex w-full flex-row items-start justify-between border-t border-surface-border-strong bg-surface-raised px-ds-05 pb-safe pt-0 md:hidden",
|
|
145
|
+
l
|
|
137
146
|
),
|
|
138
147
|
children: [
|
|
139
148
|
i.map((e) => /* @__PURE__ */ s(
|
|
140
|
-
|
|
149
|
+
I,
|
|
141
150
|
{
|
|
142
151
|
item: e,
|
|
143
|
-
isActive:
|
|
152
|
+
isActive: b(e.href, e.exact)
|
|
144
153
|
},
|
|
145
154
|
e.href
|
|
146
155
|
)),
|
|
147
156
|
n.length > 0 && /* @__PURE__ */ s(
|
|
148
|
-
|
|
157
|
+
u.button,
|
|
149
158
|
{
|
|
150
159
|
type: "button",
|
|
151
|
-
onClick: () =>
|
|
160
|
+
onClick: () => c(!r),
|
|
152
161
|
"aria-label": "More navigation options",
|
|
153
|
-
"aria-expanded":
|
|
154
|
-
whileTap: { y: -2 },
|
|
155
|
-
transition:
|
|
156
|
-
className:
|
|
162
|
+
"aria-expanded": r,
|
|
163
|
+
whileTap: m ? void 0 : { y: -2 },
|
|
164
|
+
transition: m ? { duration: 0 } : f.snappy,
|
|
165
|
+
className: d(
|
|
157
166
|
"flex h-16 max-w-[70px] flex-1 cursor-pointer flex-col items-center gap-ds-02 p-ds-02 pt-0 text-ds-sm",
|
|
158
|
-
|
|
167
|
+
r || h ? "font-semibold text-accent-11" : "text-surface-fg-subtle"
|
|
159
168
|
),
|
|
160
169
|
children: /* @__PURE__ */ t("div", { className: "relative flex w-full flex-col items-center gap-ds-02", children: [
|
|
161
|
-
(
|
|
162
|
-
|
|
170
|
+
(r || h) && /* @__PURE__ */ s(
|
|
171
|
+
u.div,
|
|
163
172
|
{
|
|
164
173
|
layoutId: "bottom-nav-indicator",
|
|
165
174
|
className: "absolute top-0 h-[3px] w-full rounded-b-ds-sm bg-accent-9 p-0",
|
|
166
175
|
"aria-hidden": "true",
|
|
167
|
-
transition:
|
|
176
|
+
transition: m ? { duration: 0 } : f.snappy
|
|
168
177
|
}
|
|
169
178
|
),
|
|
170
|
-
/* @__PURE__ */ s("div", { className: "p-ds-03", children: /* @__PURE__ */ s(
|
|
179
|
+
/* @__PURE__ */ s("div", { className: "p-ds-03", children: /* @__PURE__ */ s(x, { icon: A }) }),
|
|
171
180
|
/* @__PURE__ */ s("span", { className: "text-center", children: "More" })
|
|
172
181
|
] })
|
|
173
182
|
}
|
|
@@ -178,7 +187,7 @@ const L = w.forwardRef(
|
|
|
178
187
|
] });
|
|
179
188
|
}
|
|
180
189
|
);
|
|
181
|
-
|
|
190
|
+
E.displayName = "BottomNavbar";
|
|
182
191
|
export {
|
|
183
|
-
|
|
192
|
+
E as BottomNavbar
|
|
184
193
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-registry.d.ts","sourceRoot":"","sources":["../../src/shell/command-registry.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"command-registry.d.ts","sourceRoot":"","sources":["../../src/shell/command-registry.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AAYD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,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