@bettercms-ai/kit 4.0.0 → 4.2.0-next.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/adapters/lossy.d.ts +4 -0
- package/dist/adapters/lossy.js +4 -0
- package/dist/adapters/lossy.js.map +1 -1
- package/dist/adapters/prod-types.d.ts +4 -0
- package/dist/adapters/prod-types.js +4 -1
- package/dist/adapters/prod-types.js.map +1 -1
- package/dist/adapters/schema.js +7 -0
- package/dist/adapters/schema.js.map +1 -1
- package/dist/context.d.ts +91 -0
- package/dist/context.js +58 -1
- package/dist/context.js.map +1 -1
- package/dist/controls/choice.d.ts +1 -1
- package/dist/controls/choice.js +21 -2
- package/dist/controls/choice.js.map +1 -1
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/index.js +3 -2
- package/dist/controls/index.js.map +1 -1
- package/dist/controls/link.d.ts +23 -2
- package/dist/controls/link.js +456 -4
- package/dist/controls/link.js.map +1 -1
- package/dist/controls/media-v16.d.ts +27 -0
- package/dist/controls/media-v16.js +261 -0
- package/dist/controls/media-v16.js.map +1 -0
- package/dist/controls/media.js +63 -1
- package/dist/controls/media.js.map +1 -1
- package/dist/controls/reference-services.d.ts +8 -0
- package/dist/controls/reference.js +78 -2
- package/dist/controls/reference.js.map +1 -1
- package/dist/controls/rich-text/ai-runs.d.ts +13 -0
- package/dist/controls/rich-text/ai-runs.js +71 -0
- package/dist/controls/rich-text/ai-runs.js.map +1 -0
- package/dist/controls/rich-text/block-tool.d.ts +31 -0
- package/dist/controls/rich-text/block-tool.js +62 -0
- package/dist/controls/rich-text/block-tool.js.map +1 -0
- package/dist/controls/rich-text/blocks.d.ts +6 -1
- package/dist/controls/rich-text/blocks.js +406 -24
- package/dist/controls/rich-text/blocks.js.map +1 -1
- package/dist/controls/rich-text/catalog.d.ts +45 -7
- package/dist/controls/rich-text/catalog.js +507 -37
- package/dist/controls/rich-text/catalog.js.map +1 -1
- package/dist/controls/rich-text/code-head.d.ts +30 -0
- package/dist/controls/rich-text/code-head.js +230 -0
- package/dist/controls/rich-text/code-head.js.map +1 -0
- package/dist/controls/rich-text/codec.d.ts +1 -1
- package/dist/controls/rich-text/codec.js +4 -1
- package/dist/controls/rich-text/codec.js.map +1 -1
- package/dist/controls/rich-text/dom.d.ts +27 -0
- package/dist/controls/rich-text/dom.js +77 -7
- package/dist/controls/rich-text/dom.js.map +1 -1
- package/dist/controls/rich-text/editor.js +243 -55
- package/dist/controls/rich-text/editor.js.map +1 -1
- package/dist/controls/rich-text/ops.js +1 -0
- package/dist/controls/rich-text/ops.js.map +1 -1
- package/dist/controls/rich-text/rewriteSelection.d.ts +25 -0
- package/dist/controls/rich-text/rewriteSelection.js +28 -0
- package/dist/controls/rich-text/rewriteSelection.js.map +1 -0
- package/dist/controls/rich-text/slash-preview.d.ts +8 -0
- package/dist/controls/rich-text/slash-preview.js +300 -0
- package/dist/controls/rich-text/slash-preview.js.map +1 -0
- package/dist/controls/rich-text/table-grid.d.ts +22 -0
- package/dist/controls/rich-text/table-grid.js +1057 -0
- package/dist/controls/rich-text/table-grid.js.map +1 -0
- package/dist/controls/rich-text/toolbar.js +61 -18
- package/dist/controls/rich-text/toolbar.js.map +1 -1
- package/dist/controls/text.d.ts +6 -0
- package/dist/controls/text.js +95 -5
- package/dist/controls/text.js.map +1 -1
- package/dist/core/facets.d.ts +1 -0
- package/dist/core/facets.js +1 -0
- package/dist/core/facets.js.map +1 -1
- package/dist/engine/array.d.ts +7 -0
- package/dist/engine/array.js +164 -45
- package/dist/engine/array.js.map +1 -1
- package/dist/engine/field-shell.d.ts +12 -0
- package/dist/engine/field-shell.js +222 -64
- package/dist/engine/field-shell.js.map +1 -1
- package/dist/engine/frame.js +42 -4
- package/dist/engine/frame.js.map +1 -1
- package/dist/engine/grouping.d.ts +71 -10
- package/dist/engine/grouping.js +227 -29
- package/dist/engine/grouping.js.map +1 -1
- package/dist/engine/item-list.js +2 -2
- package/dist/engine/item-list.js.map +1 -1
- package/dist/engine/kit-field.js +38 -4
- package/dist/engine/kit-field.js.map +1 -1
- package/dist/engine/schema-form.d.ts +2 -0
- package/dist/engine/schema-form.js +9 -2
- package/dist/engine/schema-form.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +13 -6
- package/dist/index.js.map +1 -1
- package/dist/kit.css +59 -0
- package/dist/lib/reduced-motion.d.ts +1 -0
- package/dist/lib/reduced-motion.js +19 -0
- package/dist/lib/reduced-motion.js.map +1 -0
- package/dist/schema/table.d.ts +2 -1
- package/dist/schema/table.js +5 -0
- package/dist/schema/table.js.map +1 -1
- package/dist/schema/types.d.ts +6 -0
- package/dist/schema/types.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +215 -0
- package/dist/tokens.css +274 -0
- package/dist/ui/block-icon-picker.d.ts +38 -0
- package/dist/ui/block-icon-picker.js +141 -0
- package/dist/ui/block-icon-picker.js.map +1 -0
- package/dist/ui/button.js +1 -0
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/code-language-menu.d.ts +24 -0
- package/dist/ui/code-language-menu.js +123 -0
- package/dist/ui/code-language-menu.js.map +1 -0
- package/dist/ui/content-fields.d.ts +47 -0
- package/dist/ui/content-fields.js +279 -0
- package/dist/ui/content-fields.js.map +1 -0
- package/dist/ui/controls.js +3 -2
- package/dist/ui/controls.js.map +1 -1
- package/dist/ui/floating-panel.js +3 -2
- package/dist/ui/floating-panel.js.map +1 -1
- package/dist/ui/foundations.d.ts +118 -0
- package/dist/ui/foundations.js +565 -0
- package/dist/ui/foundations.js.map +1 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +7 -1
- package/dist/ui/inspector.d.ts +412 -0
- package/dist/ui/inspector.js +1218 -0
- package/dist/ui/inspector.js.map +1 -0
- package/dist/ui/overlay.d.ts +7 -2
- package/dist/ui/overlay.js +55 -20
- package/dist/ui/overlay.js.map +1 -1
- package/dist/ui/shortcut-hint.js +1 -1
- package/dist/ui/shortcut-hint.js.map +1 -1
- package/dist/ui/tab.js +3 -2
- package/dist/ui/tab.js.map +1 -1
- package/dist/ui/toast.d.ts +5 -3
- package/dist/ui/toast.js +83 -11
- package/dist/ui/toast.js.map +1 -1
- package/dist/ui/tooltip-card.d.ts +45 -0
- package/dist/ui/tooltip-card.js +135 -0
- package/dist/ui/tooltip-card.js.map +1 -0
- package/package.json +1 -1
package/dist/ui/toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.js","names":[],"sources":["../../src/ui/toast.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Toast } from \"@base-ui/react/toast\";\nimport type { KitToast, KitToastOptions } from \"../context\";\nimport { cn } from \"../lib/cn\";\nimport { Spinner } from \"./spinner\";\nimport { KIT_SCOPE } from \"./surfaces\";\n\n/* ── Toast ───────────────────────────────────────────────────────────────\n V2's toaster (app/root.tsx:24-46: sonner bottom-right, 16px offsets, gap 8, the --toast-offset-bottom lift an\n ActionTray with clearToasts writes) rebuilt on Base UI Toast. kit-ports-spec.md §4.\n Kit code never mounts this on its own: it calls KitServices.toast. A host without a toaster of its own mounts\n <KitToaster /> once and passes `toast: kitToast`; a host with one (the dashboard's sonner) keeps it, so nothing\n renders twice.\n The success / error / warning / info glyphs are sonner's own SVG paths (sonner 2.0.8 dist/index.mjs:43-90), copied\n verbatim. sonner is MIT licensed, Copyright (c) 2023 Emil Kowalski (https://github.com/emilkowalski/sonner). */\n\nexport const kitToastManager = Toast.createToastManager();\n\ntype ToastType = \"default\" | \"success\" | \"error\" | \"warning\" | \"info\" | \"loading\";\nlet seq = 0;\n\nfunction add(type: ToastType, message: string, opts: KitToastOptions = {}): string {\n const id = `kit-toast-${++seq}`;\n const { action } = opts;\n return kitToastManager.add({\n id,\n type,\n title: message,\n description: opts.description,\n timeout: opts.duration,\n priority: type === \"error\" ? \"high\" : \"low\",\n data: { icon: opts.icon },\n // sonner closes the toast when its action runs; so does this\n actionProps: action ? { children: action.label, onClick: () => (action.onClick(), kitToastManager.close(id)) } : undefined,\n });\n}\n\n/** KitServices.toast backed by kitToastManager, plus V2's other sonner calls. */\nexport const kitToast: KitToast & {\n error: (message: string, opts?: KitToastOptions) => void;\n warning: (message: string, opts?: KitToastOptions) => void;\n info: (message: string, opts?: KitToastOptions) => void;\n /** stays until dismissed or updated; returns its id */\n loading: (message: string, opts?: KitToastOptions) => string;\n dismiss: (id?: string) => void;\n} = Object.assign((message: string, opts?: KitToastOptions) => void add(\"default\", message, opts), {\n success: (message: string, opts?: KitToastOptions) => void add(\"success\", message, opts),\n error: (message: string, opts?: KitToastOptions) => void add(\"error\", message, opts),\n warning: (message: string, opts?: KitToastOptions) => void add(\"warning\", message, opts),\n info: (message: string, opts?: KitToastOptions) => void add(\"info\", message, opts),\n loading: (message: string, opts?: KitToastOptions) => add(\"loading\", message, opts),\n dismiss: (id?: string) => kitToastManager.close(id),\n});\n\n/* sonner's type glyphs, drawn in the toast's text colour (V2 runs without richColors), at the 16px icon slot */\nfunction SonnerGlyph({ viewBox, d }: { viewBox: string; d: string }) {\n return (\n <svg viewBox={viewBox} fill=\"currentColor\" width=\"16\" height=\"16\" data-toast-glyph=\"\">\n <path fillRule=\"evenodd\" d={d} clipRule=\"evenodd\" />\n </svg>\n );\n}\nconst TYPE_ICON: Partial<Record<string, React.ReactNode>> = {\n success: (\n <SonnerGlyph\n viewBox=\"0 0 20 20\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z\"\n />\n ),\n warning: (\n <SonnerGlyph\n viewBox=\"0 0 24 24\"\n d=\"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z\"\n />\n ),\n info: (\n <SonnerGlyph\n viewBox=\"0 0 20 20\"\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z\"\n />\n ),\n error: (\n <SonnerGlyph\n viewBox=\"0 0 20 20\"\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\"\n />\n ),\n loading: <Spinner size=\"md\" />,\n};\n\n/* Viewport: bottom-right, 16px from the edges; the bottom offset follows an ActionTray's --toast-offset-bottom lift.\n Under 600px it spans the width less 16px a side (sonner's mobile layout). */\nconst VIEWPORT =\n \"fixed bottom-[var(--toast-offset-bottom,16px)] right-4 z-[var(--kit-z-toast)] w-[356px] outline-none max-[600px]:left-4 max-[600px]:w-auto\";\n\n/* sonner's motion in Base UI's stacked-toast variables: 400ms transform/opacity/height; enter and exit 100% down;\n collapsed, each toast behind the front lifts gap × index, shrinks 5% per index and takes the front toast's height;\n hovered or focused, the stack opens to full heights 8px apart. Reduced motion collapses it (kit base rule). */\nconst ROOT = cn(\n \"[--gap:8px] [--scale:calc(1-var(--toast-index)*0.05)] [--height:var(--toast-frontmost-height,var(--toast-height))]\",\n \"[--offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--gap)*-1+var(--toast-swipe-movement-y))]\",\n \"absolute bottom-0 right-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom select-none\",\n \"h-[var(--height)] [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-var(--toast-index)*var(--gap)))_scale(var(--scale))]\",\n \"data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]\",\n \"data-[starting-style]:opacity-0 data-[starting-style]:[transform:translateY(100%)]\",\n \"data-[ending-style]:opacity-0 data-[limited]:opacity-0\",\n \"[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(100%)]\",\n \"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+100%))]\",\n \"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+100%))_translateY(var(--offset-y))]\",\n \"[transition:transform_400ms_ease,opacity_400ms,height_400ms,box-shadow_200ms]\",\n // the hover bridge between stacked toasts, so the stack stays open while the pointer crosses a gap\n \"after:absolute after:left-0 after:top-full after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']\",\n // V2's effective look: --surface-raised, tray-line edge (line-strong in dark), 12px radius, sonner's own shadow\n \"flex items-center rounded-kit-xl border border-kit-tray-line bg-kit-surface-raised bg-clip-padding p-4 font-sans text-kit-sm text-kit-fg shadow-[0_4px_12px_rgba(0,0,0,0.1)] [.dark_&]:border-kit-floating-line\",\n);\n/* the toasts behind the front hide their content while the stack is collapsed (sonner data-front=false > * opacity 0) */\nconst CONTENT = \"flex min-w-0 flex-1 items-center gap-1.5 transition-opacity duration-[400ms] data-[behind]:opacity-0 data-[expanded]:opacity-100\";\nconst ACTION =\n \"ml-auto inline-flex h-6 shrink-0 cursor-pointer items-center rounded-kit-md bg-kit-inverse px-2 text-kit-xs font-medium text-kit-fg-inverse hover:bg-kit-inverse-hover [transition:opacity_400ms,box-shadow_200ms,background-color_150ms]\";\n\nfunction KitToastItem({ toast }: { toast: Toast.Root.ToastObject }) {\n const icon = (toast.data as { icon?: React.ReactNode } | undefined)?.icon ?? TYPE_ICON[toast.type ?? \"\"];\n return (\n <Toast.Root toast={toast} className={ROOT}>\n <Toast.Content className={CONTENT}>\n {icon ? (\n <span aria-hidden className=\"flex size-4 shrink-0 items-center [&_svg]:size-4\">\n {icon}\n </span>\n ) : null}\n <div className=\"min-w-0 flex-1\">\n <Toast.Title className=\"font-medium leading-[1.5]\" />\n {toast.description ? <Toast.Description className=\"leading-[1.4] text-kit-fg-2\" /> : null}\n </div>\n {toast.actionProps ? <Toast.Action className={ACTION} /> : null}\n </Toast.Content>\n </Toast.Root>\n );\n}\n\nfunction KitToastList() {\n const { toasts } = Toast.useToastManager();\n return toasts.map((t) => <KitToastItem key={t.id} toast={t} />);\n}\n\nexport interface KitToasterProps {\n /** toasts kept on screen (sonner visibleToasts) */\n limit?: number;\n /** ms before a toast closes; a toast's own `duration` wins; loading toasts stay */\n timeout?: number;\n className?: string;\n}\n\n/** Mount once per document, at the root. Its layer carries KIT_SCOPE (a portal sits outside every kit island). */\nexport function KitToaster({ limit = 3, timeout = 4000, className }: KitToasterProps) {\n return (\n <Toast.Provider toastManager={kitToastManager} limit={limit} timeout={timeout}>\n <Toast.Portal>\n <Toast.Viewport {...KIT_SCOPE} className={cn(VIEWPORT, className)}>\n <KitToastList />\n </Toast.Viewport>\n </Toast.Portal>\n </Toast.Provider>\n );\n}\n"],"mappings":";;;;;;;AAgBA,IAAa,kBAAkB,MAAM,mBAAmB;AAGxD,IAAI,MAAM;AAEV,SAAS,IAAI,MAAiB,SAAiB,OAAwB,CAAC,GAAW;CACjF,MAAM,KAAK,aAAa,EAAE;CAC1B,MAAM,EAAE,WAAW;CACnB,OAAO,gBAAgB,IAAI;EACzB;EACA;EACA,OAAO;EACP,aAAa,KAAK;EAClB,SAAS,KAAK;EACd,UAAU,SAAS,UAAU,SAAS;EACtC,MAAM,EAAE,MAAM,KAAK,KAAK;EAExB,aAAa,SAAS;GAAE,UAAU,OAAO;GAAO,gBAAgB,OAAO,QAAQ,GAAG,gBAAgB,MAAM,EAAE;EAAG,IAAI,KAAA;CACnH,CAAC;AACH;;AAGA,IAAa,WAOT,OAAO,QAA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W;GAA1B,UAAA;IACG,OACC,oBAAC,QAAD;KAAM,eAAA;KAAY,WAAU;KACzB,UAAA;IACG,CAAA,IACJ;IACJ,qBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACE,oBAAC,MAAM,OAAP,EAAa,WAAU,4BAA6B,CAAA,GACnD,MAAM,cAAc,oBAAC,MAAM,aAAP,EAAmB,WAAU,8BAA+B,CAAA,IAAI,IAClF;;IACJ,MAAM,cAAc,oBAAC,MAAM,QAAP,EAAc,WAAW,OAAS,CAAA,IAAI;GAC9C;;CACL,CAAA;AAEhB;AAEA,SAAS,eAAe;CACtB,MAAM,EAAE,WAAW,MAAM,gBAAgB;CACzC,OAAO,OAAO,KAAK,MAAM,oBAAC,cAAD,EAAyB,OAAO,EAAI,GAAjB,EAAE,EAAe,CAAC;AAChE;;AAWA,SAAgB,WAAW,EAAE,QAAQ,GAAG,UAAU,KAAM,aAA8B;CACpF,OACE,oBAAC,MAAM,UAAP;EAAgB,cAAc;EAAwB;EAAgB;EACpE,UAAA,oBAAC,MAAM,QAAP,EAAA,UACE,oBAAC,MAAM,UAAP;GAAgB,GAAI;GAAW,WAAW,GAAG,UAAU,SAAS;GAC9D,UAAA,oBAAC,cAAD,CAAe,CAAA;EACD,CAAA,EACJ,CAAA;CACA,CAAA;AAEpB"}
|
|
1
|
+
{"version":3,"file":"toast.js","names":[],"sources":["../../src/ui/toast.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Toast } from \"@base-ui/react/toast\";\nimport { useKitLook, type KitLook, type KitToast, type KitToastOptions } from \"../context\";\nimport { cn } from \"../lib/cn\";\nimport { StatusIcon } from \"./foundations\";\nimport { Spinner } from \"./spinner\";\nimport { KIT_SCOPE } from \"./surfaces\";\n\n/* ── Toast ───────────────────────────────────────────────────────────────\n V2's toaster (app/root.tsx:24-46: sonner bottom-right, 16px offsets, gap 8, the --toast-offset-bottom lift an\n ActionTray with clearToasts writes) rebuilt on Base UI Toast. kit-ports-spec.md §4.\n Kit code never mounts this on its own: it calls KitServices.toast. A host without a toaster of its own mounts\n <KitToaster /> once and passes `toast: kitToast`; a host with one (the dashboard's sonner) keeps it, so nothing\n renders twice.\n The success / error / warning / info glyphs are sonner's own SVG paths (sonner 2.0.8 dist/index.mjs:43-90), copied\n verbatim. sonner is MIT licensed, Copyright (c) 2023 Emil Kowalski (https://github.com/emilkowalski/sonner). */\n\nexport const kitToastManager = Toast.createToastManager();\n\ntype ToastType = \"default\" | \"success\" | \"error\" | \"warning\" | \"info\" | \"loading\";\nlet seq = 0;\n\nfunction add(type: ToastType, message: string, opts: KitToastOptions = {}): string {\n const id = `kit-toast-${++seq}`;\n const { action } = opts;\n const actions = opts.actions ?? (action ? [action] : undefined);\n return kitToastManager.add({\n id,\n type,\n title: message,\n description: opts.description,\n timeout: opts.duration,\n priority: type === \"error\" ? \"high\" : \"low\",\n data: { icon: opts.icon, actions },\n // sonner closes the toast when its action runs; so does this\n actionProps: actions?.[0] ? { children: actions[0].label, onClick: () => (actions[0]!.onClick(), kitToastManager.close(id)) } : undefined,\n });\n}\n\n/** KitServices.toast backed by kitToastManager, plus V2's other sonner calls. */\nexport const kitToast: KitToast & {\n error: (message: string, opts?: KitToastOptions) => void;\n warning: (message: string, opts?: KitToastOptions) => void;\n info: (message: string, opts?: KitToastOptions) => void;\n /** stays until dismissed or updated; returns its id */\n loading: (message: string, opts?: KitToastOptions) => string;\n dismiss: (id?: string) => void;\n} = Object.assign((message: string, opts?: KitToastOptions) => void add(\"default\", message, opts), {\n success: (message: string, opts?: KitToastOptions) => void add(\"success\", message, opts),\n error: (message: string, opts?: KitToastOptions) => void add(\"error\", message, opts),\n warning: (message: string, opts?: KitToastOptions) => void add(\"warning\", message, opts),\n info: (message: string, opts?: KitToastOptions) => void add(\"info\", message, opts),\n loading: (message: string, opts?: KitToastOptions) => add(\"loading\", message, opts),\n dismiss: (id?: string) => kitToastManager.close(id),\n});\n\n/* sonner's type glyphs, drawn in the toast's text colour (V2 runs without richColors), at the 16px icon slot */\nfunction SonnerGlyph({ viewBox, d }: { viewBox: string; d: string }) {\n return (\n <svg viewBox={viewBox} fill=\"currentColor\" width=\"16\" height=\"16\" data-toast-glyph=\"\">\n <path fillRule=\"evenodd\" d={d} clipRule=\"evenodd\" />\n </svg>\n );\n}\nconst TYPE_ICON: Partial<Record<string, React.ReactNode>> = {\n success: (\n <SonnerGlyph\n viewBox=\"0 0 20 20\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z\"\n />\n ),\n warning: (\n <SonnerGlyph\n viewBox=\"0 0 24 24\"\n d=\"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z\"\n />\n ),\n info: (\n <SonnerGlyph\n viewBox=\"0 0 20 20\"\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z\"\n />\n ),\n error: (\n <SonnerGlyph\n viewBox=\"0 0 20 20\"\n d=\"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z\"\n />\n ),\n loading: <Spinner size=\"md\" />,\n};\n\n/* Viewport: bottom-right, 16px from the edges; the bottom offset follows an ActionTray's --toast-offset-bottom lift.\n Under 600px it spans the width less 16px a side (sonner's mobile layout). */\nconst VIEWPORT =\n \"fixed bottom-[var(--toast-offset-bottom,16px)] right-4 z-[var(--kit-z-toast)] w-[356px] outline-none max-[600px]:left-4 max-[600px]:w-auto\";\n\n/* sonner's motion in Base UI's stacked-toast variables: 400ms transform/opacity/height; enter and exit 100% down;\n collapsed, each toast behind the front lifts gap × index, shrinks 5% per index and takes the front toast's height;\n hovered or focused, the stack opens to full heights 8px apart. Reduced motion collapses it (kit base rule). */\nconst ROOT_MOTION = cn(\n \"[--gap:8px] [--scale:calc(1-var(--toast-index)*0.05)] [--height:var(--toast-frontmost-height,var(--toast-height))]\",\n \"[--offset-y:calc(var(--toast-offset-y)*-1+var(--toast-index)*var(--gap)*-1+var(--toast-swipe-movement-y))]\",\n \"absolute bottom-0 right-0 z-[calc(1000-var(--toast-index))] w-full origin-bottom select-none\",\n \"h-[var(--height)] [transform:translateX(var(--toast-swipe-movement-x))_translateY(calc(var(--toast-swipe-movement-y)-var(--toast-index)*var(--gap)))_scale(var(--scale))]\",\n \"data-[expanded]:h-[var(--toast-height)] data-[expanded]:[transform:translateX(var(--toast-swipe-movement-x))_translateY(var(--offset-y))]\",\n \"data-[starting-style]:opacity-0 data-[starting-style]:[transform:translateY(100%)]\",\n \"data-[ending-style]:opacity-0 data-[limited]:opacity-0\",\n \"[&[data-ending-style]:not([data-limited]):not([data-swipe-direction])]:[transform:translateY(100%)]\",\n \"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y)+100%))]\",\n \"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x)+100%))_translateY(var(--offset-y))]\",\n \"[transition:transform_400ms_ease,opacity_400ms,height_400ms,box-shadow_200ms]\",\n // the hover bridge between stacked toasts, so the stack stays open while the pointer crosses a gap\n \"after:absolute after:left-0 after:top-full after:h-[calc(var(--gap)+1px)] after:w-full after:content-['']\",\n);\n// V2's effective look: --surface-raised, tray-line edge (line-strong in dark), 12px radius, sonner's own shadow\nconst ROOT = cn(\n ROOT_MOTION,\n \"flex items-center rounded-kit-xl border border-kit-tray-line bg-kit-surface-raised bg-clip-padding p-4 font-sans text-kit-sm text-kit-fg shadow-[0_4px_12px_rgba(0,0,0,0.1)] [.dark_&]:border-kit-floating-line\",\n);\n/* the toasts behind the front hide their content while the stack is collapsed (sonner data-front=false > * opacity 0) */\nconst CONTENT = \"flex min-w-0 flex-1 items-center gap-1.5 transition-opacity duration-[400ms] data-[behind]:opacity-0 data-[expanded]:opacity-100\";\nconst ACTION =\n \"ml-auto inline-flex h-6 shrink-0 cursor-pointer items-center rounded-kit-md bg-kit-inverse px-2 text-kit-xs font-medium text-kit-fg-inverse hover:bg-kit-inverse-hover [transition:opacity_400ms,box-shadow_200ms,background-color_150ms]\";\n\n/* Look \"v16\" (F1593, prototype ui.jsx:144-146 `notify`, BoardUI toast): 360 wide, white, 1px #e8e8e8, radius 12,\n two-layer shadow, padding 12/10/14/12, gap 12, 13/19.5 text; actions 26 high 12/15 500 on #f0f0f0 radius 6; the\n 20×20 \"Dismiss notification\" ✕ in #8a8a8a radius 4. Success / error draw the foundation status icon. */\nconst V16_VIEWPORT = \"w-[360px]\";\nconst V16_ROOT = cn(\n ROOT_MOTION,\n \"flex items-start rounded-[12px] border border-kit-insp-btn bg-kit-insp-tip-bg bg-clip-padding pb-3.5 pl-3 pr-2.5 pt-3 font-sans text-[13px] leading-[19.5px] text-kit-insp-tip-title shadow-[0_2px_4px_rgba(10,10,13,0.04),0_12px_28px_rgba(10,10,13,0.12)]\",\n);\nconst V16_CONTENT = \"flex min-w-0 flex-1 items-start gap-3 transition-opacity duration-[400ms] data-[behind]:opacity-0 data-[expanded]:opacity-100\";\nconst V16_ACTION =\n \"inline-flex h-[26px] shrink-0 cursor-pointer items-center rounded-[6px] bg-kit-insp-toast-action px-3 text-[12px] font-medium leading-[15px] text-kit-insp-tip-title outline-none transition-colors duration-150 hover:bg-kit-insp-btn-hover\";\nconst V16_DISMISS =\n \"inline-flex size-5 shrink-0 cursor-pointer items-center justify-center rounded-[4px] text-kit-insp-toast-dismiss outline-none transition-colors duration-150 hover:bg-kit-insp-card hover:text-kit-insp-label\";\n\ntype ToastData = { icon?: React.ReactNode; actions?: { label: string; onClick: () => void }[] } | undefined;\n\nfunction V16ToastItem({ toast }: { toast: Toast.Root.ToastObject }) {\n const data = toast.data as ToastData;\n const icon =\n data?.icon ??\n (toast.type === \"success\" ? <StatusIcon kind=\"success\" size={16} /> : toast.type === \"error\" ? <StatusIcon kind=\"error\" size={16} /> : toast.type === \"loading\" ? <Spinner size=\"md\" /> : null);\n return (\n <Toast.Root toast={toast} className={V16_ROOT} data-look=\"v16\">\n <Toast.Content className={V16_CONTENT}>\n {icon ? (\n <span aria-hidden className=\"flex h-[19.5px] w-4 shrink-0 items-center [&_svg]:size-4\">\n {icon}\n </span>\n ) : null}\n <div className=\"min-w-0 flex-1\">\n <Toast.Title className=\"font-normal\" />\n {toast.description ? <Toast.Description className=\"text-kit-insp-desc\" /> : null}\n </div>\n {data?.actions?.length ? (\n <div className=\"-my-[3px] flex shrink-0 items-center gap-1.5\">\n {data.actions.map((a) => (\n <button\n key={a.label}\n type=\"button\"\n className={V16_ACTION}\n onClick={() => {\n a.onClick();\n kitToastManager.close(toast.id);\n }}\n >\n {a.label}\n </button>\n ))}\n </div>\n ) : null}\n <Toast.Close aria-label=\"Dismiss notification\" className={V16_DISMISS}>\n <svg viewBox=\"0 0 16 16\" width=\"12\" height=\"12\" fill=\"none\" aria-hidden>\n <path d=\"M4 4l8 8M12 4l-8 8\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" />\n </svg>\n </Toast.Close>\n </Toast.Content>\n </Toast.Root>\n );\n}\n\nfunction KitToastItem({ toast }: { toast: Toast.Root.ToastObject }) {\n const icon = (toast.data as ToastData)?.icon ?? TYPE_ICON[toast.type ?? \"\"];\n return (\n <Toast.Root toast={toast} className={ROOT}>\n <Toast.Content className={CONTENT}>\n {icon ? (\n <span aria-hidden className=\"flex size-4 shrink-0 items-center [&_svg]:size-4\">\n {icon}\n </span>\n ) : null}\n <div className=\"min-w-0 flex-1\">\n <Toast.Title className=\"font-medium leading-[1.5]\" />\n {toast.description ? <Toast.Description className=\"leading-[1.4] text-kit-fg-2\" /> : null}\n </div>\n {toast.actionProps ? <Toast.Action className={ACTION} /> : null}\n </Toast.Content>\n </Toast.Root>\n );\n}\n\nfunction KitToastList({ v16 }: { v16: boolean }) {\n const { toasts } = Toast.useToastManager();\n return toasts.map((t) => (v16 ? <V16ToastItem key={t.id} toast={t} /> : <KitToastItem key={t.id} toast={t} />));\n}\n\nexport interface KitToasterProps {\n /** toasts kept on screen (sonner visibleToasts) */\n limit?: number;\n /** ms before a toast closes; a toast's own `duration` wins; loading toasts stay. Default 4000 (4500 in look \"v16\") */\n timeout?: number;\n className?: string;\n /** the toast look; defaults to the surrounding `KitLookProvider` (\"v2\" outside one) */\n look?: KitLook;\n}\n\n/** Mount once per document, at the root. Its layer carries KIT_SCOPE (a portal sits outside every kit island). */\nexport function KitToaster({ limit = 3, timeout, className, look }: KitToasterProps) {\n const ctxLook = useKitLook();\n const v16 = (look ?? ctxLook) === \"v16\";\n return (\n <Toast.Provider toastManager={kitToastManager} limit={limit} timeout={timeout ?? (v16 ? 4500 : 4000)}>\n <Toast.Portal>\n <Toast.Viewport {...KIT_SCOPE} className={cn(VIEWPORT, v16 && V16_VIEWPORT, className)}>\n <KitToastList v16={v16} />\n </Toast.Viewport>\n </Toast.Portal>\n </Toast.Provider>\n );\n}\n"],"mappings":";;;;;;;;;AAiBA,IAAa,kBAAkB,MAAM,mBAAmB;AAGxD,IAAI,MAAM;AAEV,SAAS,IAAI,MAAiB,SAAiB,OAAwB,CAAC,GAAW;CACjF,MAAM,KAAK,aAAa,EAAE;CAC1B,MAAM,EAAE,WAAW;CACnB,MAAM,UAAU,KAAK,YAAY,SAAS,CAAC,MAAM,IAAI,KAAA;CACrD,OAAO,gBA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AC,MAAM,UAAP;GAAgB,GAAI;GAAW,WAAW,GAAG,UAAU,OAAO,cAAc,SAAS;GACnF,UAAA,oBAAC,cAAD,EAAmB,IAAM,CAAA;EACX,CAAA,EACJ,CAAA;CACA,CAAA;AAEpB"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The white card tooltip of prototype editor-v16 (components/base/tooltip/tooltip.tsx:79-128, ui.jsx:149-167,
|
|
3
|
+
* kit.css:445-452): white surface, 1px edge, radius 8, a caret pointing at the trigger, 240 wide at most, 10 from the
|
|
4
|
+
* trigger, and a 200ms blur + scale in and out. Editor-scoped: the kit's own <Tooltip> (the ink surface) is unchanged;
|
|
5
|
+
* the Visual Editor uses these instead.
|
|
6
|
+
*
|
|
7
|
+
* <CardTooltip content="Full screen" shortcut="⇧F"> icon buttons: 12/16 medium, 6×10 padding, opens after 400ms
|
|
8
|
+
* <InfoTooltip title="Layout">…</InfoTooltip> the ⓘ after a label: title row + body, 12 padding, 250ms, below
|
|
9
|
+
*/
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
type Side = "top" | "bottom" | "left" | "right";
|
|
12
|
+
/** The card surface: also exported so a host tooltip of its own can wear it. */
|
|
13
|
+
export declare const CARD_TOOLTIP_CLASS: string;
|
|
14
|
+
export interface CardTooltipProps {
|
|
15
|
+
content: React.ReactNode;
|
|
16
|
+
/** the trigger: one element that forwards its ref and spreads props */
|
|
17
|
+
children: React.ReactElement;
|
|
18
|
+
side?: Side;
|
|
19
|
+
/** a key hint, always shown after a middle dot ("Full screen · ⇧F"), as the prototype writes it */
|
|
20
|
+
shortcut?: string;
|
|
21
|
+
/** ms before it opens (the prototype's Tip: 400) */
|
|
22
|
+
delay?: number;
|
|
23
|
+
/** the caret pointing at the trigger (default true) */
|
|
24
|
+
arrow?: boolean;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/** Tip on icon buttons (ui.jsx:160-167): one line, 12/16 medium, 0.15 tracking, 6×10 padding. */
|
|
29
|
+
export declare function CardTooltip({ content, children, side, shortcut, delay, arrow, disabled, className }: CardTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export interface InfoTooltipProps {
|
|
31
|
+
/** bold first line (the field's label) */
|
|
32
|
+
title: React.ReactNode;
|
|
33
|
+
/** the explanation */
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
/** accessible name of the ⓘ button: "About <label>" (defaults to the title when it is a string) */
|
|
36
|
+
label?: string;
|
|
37
|
+
side?: Side;
|
|
38
|
+
/** a trigger of the host's own instead of the ⓘ button */
|
|
39
|
+
trigger?: React.ReactElement;
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
/** Info icon next to a label (ui.jsx:149-158, kit.css:445-452): a 16 box with a 14 glyph; its card is 240 wide with a
|
|
43
|
+
* title row (glyph + 13/16 medium) and a 12/17 body, opens after 250ms, below. */
|
|
44
|
+
export declare function InfoTooltip({ title, children, label, side, trigger, className }: InfoTooltipProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { cn } from "../lib/cn.js";
|
|
2
|
+
import { KIT_SCOPE } from "./surfaces.js";
|
|
3
|
+
import { TooltipRoot } from "./tooltip-root.js";
|
|
4
|
+
import { platformKeys } from "./shortcut-hint.js";
|
|
5
|
+
import "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { IconInfoCircle } from "@tabler/icons-react";
|
|
8
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
9
|
+
//#region src/ui/tooltip-card.tsx
|
|
10
|
+
/** The card surface: also exported so a host tooltip of its own can wear it. */
|
|
11
|
+
var CARD_TOOLTIP_CLASS = "pointer-events-none max-w-[240px] select-none rounded-[8px] border border-kit-insp-tip-line bg-kit-insp-tip-bg text-kit-insp-tip-title shadow-[0_1px_1px_rgb(0_0_0/0.04),0_6px_24px_rgb(0_0_0/0.1)] origin-[var(--transform-origin)] transition-[opacity,scale,filter] duration-200 ease-out data-[starting-style]:scale-90 data-[starting-style]:opacity-0 data-[starting-style]:blur-[4px] data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[ending-style]:blur-[4px] data-[instant]:transition-none motion-reduce:transition-none";
|
|
12
|
+
var CARETS = {
|
|
13
|
+
top: {
|
|
14
|
+
w: 12,
|
|
15
|
+
h: 7,
|
|
16
|
+
d: "M0 0 L6 6 L12 0",
|
|
17
|
+
shadow: "0 1.5px 1px"
|
|
18
|
+
},
|
|
19
|
+
bottom: {
|
|
20
|
+
w: 12,
|
|
21
|
+
h: 7,
|
|
22
|
+
d: "M0 7 L6 1 L12 7",
|
|
23
|
+
shadow: "0 -1.5px 1px"
|
|
24
|
+
},
|
|
25
|
+
left: {
|
|
26
|
+
w: 7,
|
|
27
|
+
h: 12,
|
|
28
|
+
d: "M0 0 L6 6 L0 12",
|
|
29
|
+
shadow: "0 1.5px 1px"
|
|
30
|
+
},
|
|
31
|
+
right: {
|
|
32
|
+
w: 7,
|
|
33
|
+
h: 12,
|
|
34
|
+
d: "M7 0 L1 6 L7 12",
|
|
35
|
+
shadow: "0 1.5px 1px"
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
var CARET_SHOW = {
|
|
39
|
+
top: "hidden in-data-[side=top]:block",
|
|
40
|
+
bottom: "hidden in-data-[side=bottom]:block",
|
|
41
|
+
left: "hidden in-data-[side=left]:block",
|
|
42
|
+
right: "hidden in-data-[side=right]:block"
|
|
43
|
+
};
|
|
44
|
+
/** ONE arrow element (Base UI positions it); it sits just outside the edge that faces the trigger, 1px over the border. */
|
|
45
|
+
function Caret() {
|
|
46
|
+
return /* @__PURE__ */ jsx(Tooltip.Arrow, {
|
|
47
|
+
className: "absolute data-[side=bottom]:bottom-full data-[side=bottom]:-mb-px data-[side=left]:left-full data-[side=left]:-ml-px data-[side=right]:right-full data-[side=right]:-mr-px data-[side=top]:top-full data-[side=top]:-mt-px",
|
|
48
|
+
children: Object.keys(CARETS).map((side) => {
|
|
49
|
+
const c = CARETS[side];
|
|
50
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
51
|
+
"aria-hidden": true,
|
|
52
|
+
width: c.w,
|
|
53
|
+
height: c.h,
|
|
54
|
+
viewBox: `0 0 ${c.w} ${c.h}`,
|
|
55
|
+
className: `${CARET_SHOW[side]} overflow-visible fill-kit-insp-tip-bg stroke-kit-insp-tip-line`,
|
|
56
|
+
style: { filter: `drop-shadow(${c.shadow} rgb(0 0 0 / 0.05))` },
|
|
57
|
+
children: /* @__PURE__ */ jsx("path", { d: c.d })
|
|
58
|
+
}, side);
|
|
59
|
+
})
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function CardLayer({ side, arrow, className, children }) {
|
|
63
|
+
return /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
64
|
+
side,
|
|
65
|
+
sideOffset: 10,
|
|
66
|
+
collisionPadding: 8,
|
|
67
|
+
className: "z-[var(--kit-z-tooltip,90)]",
|
|
68
|
+
...KIT_SCOPE,
|
|
69
|
+
children: /* @__PURE__ */ jsxs(Tooltip.Popup, {
|
|
70
|
+
role: "tooltip",
|
|
71
|
+
"data-kit-tooltip": "card",
|
|
72
|
+
className: cn(CARD_TOOLTIP_CLASS, className),
|
|
73
|
+
children: [arrow ? /* @__PURE__ */ jsx(Caret, {}) : null, children]
|
|
74
|
+
})
|
|
75
|
+
}) });
|
|
76
|
+
}
|
|
77
|
+
/** Tip on icon buttons (ui.jsx:160-167): one line, 12/16 medium, 0.15 tracking, 6×10 padding. */
|
|
78
|
+
function CardTooltip({ content, children, side = "bottom", shortcut, delay = 400, arrow = true, disabled, className }) {
|
|
79
|
+
if (disabled || !content) return children;
|
|
80
|
+
return /* @__PURE__ */ jsxs(TooltipRoot, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
81
|
+
delay,
|
|
82
|
+
closeDelay: 0,
|
|
83
|
+
render: children
|
|
84
|
+
}), /* @__PURE__ */ jsxs(CardLayer, {
|
|
85
|
+
side,
|
|
86
|
+
arrow,
|
|
87
|
+
className: cn("px-2.5 py-1.5 text-[12px] font-medium leading-4 tracking-[0.15px]", className),
|
|
88
|
+
children: [content, shortcut ? /* @__PURE__ */ jsx("span", {
|
|
89
|
+
className: "text-kit-insp-quiet",
|
|
90
|
+
children: ` · ${platformKeys(shortcut)}`
|
|
91
|
+
}) : null]
|
|
92
|
+
})] });
|
|
93
|
+
}
|
|
94
|
+
/** Info icon next to a label (ui.jsx:149-158, kit.css:445-452): a 16 box with a 14 glyph; its card is 240 wide with a
|
|
95
|
+
* title row (glyph + 13/16 medium) and a 12/17 body, opens after 250ms, below. */
|
|
96
|
+
function InfoTooltip({ title, children, label, side = "bottom", trigger, className }) {
|
|
97
|
+
const name = label ?? (typeof title === "string" ? title : void 0);
|
|
98
|
+
return /* @__PURE__ */ jsxs(TooltipRoot, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
99
|
+
delay: 250,
|
|
100
|
+
closeDelay: 0,
|
|
101
|
+
render: trigger ?? /* @__PURE__ */ jsx("button", {
|
|
102
|
+
type: "button",
|
|
103
|
+
"aria-label": name ? `About ${name}` : "About this field",
|
|
104
|
+
"data-slot": "kit-info-tip",
|
|
105
|
+
className: "-ml-0.5 inline-grid size-4 shrink-0 place-items-center rounded-[4px] text-kit-insp-quiet opacity-85 outline-none transition-[opacity,background-color] duration-100 hover:bg-kit-insp-card-hover hover:opacity-100 focus-visible:bg-kit-insp-card-hover focus-visible:opacity-100",
|
|
106
|
+
children: /* @__PURE__ */ jsx(IconInfoCircle, {
|
|
107
|
+
"aria-hidden": true,
|
|
108
|
+
className: "size-3.5",
|
|
109
|
+
stroke: 1.6
|
|
110
|
+
})
|
|
111
|
+
})
|
|
112
|
+
}), /* @__PURE__ */ jsxs(CardLayer, {
|
|
113
|
+
side,
|
|
114
|
+
arrow: true,
|
|
115
|
+
className: cn("flex w-60 flex-col gap-1.5 p-3 text-left", className),
|
|
116
|
+
children: [/* @__PURE__ */ jsxs("span", {
|
|
117
|
+
className: "flex items-center gap-1.5",
|
|
118
|
+
children: [/* @__PURE__ */ jsx(IconInfoCircle, {
|
|
119
|
+
"aria-hidden": true,
|
|
120
|
+
className: "size-3.5 shrink-0 text-kit-insp-quiet",
|
|
121
|
+
stroke: 1.6
|
|
122
|
+
}), /* @__PURE__ */ jsx("b", {
|
|
123
|
+
className: "text-[13px] font-medium leading-4 text-kit-insp-tip-title",
|
|
124
|
+
children: title
|
|
125
|
+
})]
|
|
126
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
127
|
+
className: "text-[12px] font-normal leading-[17px] text-kit-insp-tip-body",
|
|
128
|
+
children
|
|
129
|
+
})]
|
|
130
|
+
})] });
|
|
131
|
+
}
|
|
132
|
+
//#endregion
|
|
133
|
+
export { CARD_TOOLTIP_CLASS, CardTooltip, InfoTooltip };
|
|
134
|
+
|
|
135
|
+
//# sourceMappingURL=tooltip-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-card.js","names":[],"sources":["../../src/ui/tooltip-card.tsx"],"sourcesContent":["/**\n * The white card tooltip of prototype editor-v16 (components/base/tooltip/tooltip.tsx:79-128, ui.jsx:149-167,\n * kit.css:445-452): white surface, 1px edge, radius 8, a caret pointing at the trigger, 240 wide at most, 10 from the\n * trigger, and a 200ms blur + scale in and out. Editor-scoped: the kit's own <Tooltip> (the ink surface) is unchanged;\n * the Visual Editor uses these instead.\n *\n * <CardTooltip content=\"Full screen\" shortcut=\"⇧F\"> icon buttons: 12/16 medium, 6×10 padding, opens after 400ms\n * <InfoTooltip title=\"Layout\">…</InfoTooltip> the ⓘ after a label: title row + body, 12 padding, 250ms, below\n */\nimport * as React from \"react\";\nimport { Tooltip as TooltipPrimitive } from \"@base-ui/react/tooltip\";\nimport { IconInfoCircle } from \"@tabler/icons-react\";\nimport { cn } from \"../lib/cn\";\nimport { platformKeys } from \"./shortcut-hint\";\nimport { KIT_SCOPE } from \"./surfaces\";\nimport { TooltipRoot } from \"./tooltip-root\";\n\ntype Side = \"top\" | \"bottom\" | \"left\" | \"right\";\n\n/** The card surface: also exported so a host tooltip of its own can wear it. */\nexport const CARD_TOOLTIP_CLASS =\n \"pointer-events-none max-w-[240px] select-none rounded-[8px] border border-kit-insp-tip-line bg-kit-insp-tip-bg text-kit-insp-tip-title shadow-[0_1px_1px_rgb(0_0_0/0.04),0_6px_24px_rgb(0_0_0/0.1)] \" +\n \"origin-[var(--transform-origin)] transition-[opacity,scale,filter] duration-200 ease-out data-[starting-style]:scale-90 data-[starting-style]:opacity-0 data-[starting-style]:blur-[4px] \" +\n \"data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[ending-style]:blur-[4px] data-[instant]:transition-none motion-reduce:transition-none\";\n\n/* the prototype's carets (tooltip.tsx:61-70): 12×7 pointing along the block axis, 7×12 along the inline axis */\nconst CARETS: Record<Side, { w: number; h: number; d: string; shadow: string }> = {\n top: { w: 12, h: 7, d: \"M0 0 L6 6 L12 0\", shadow: \"0 1.5px 1px\" },\n bottom: { w: 12, h: 7, d: \"M0 7 L6 1 L12 7\", shadow: \"0 -1.5px 1px\" },\n left: { w: 7, h: 12, d: \"M0 0 L6 6 L0 12\", shadow: \"0 1.5px 1px\" },\n right: { w: 7, h: 12, d: \"M7 0 L1 6 L7 12\", shadow: \"0 1.5px 1px\" },\n};\n/* literal class names (Tailwind reads them from source): each caret shows only on the side the positioner settled on */\nconst CARET_SHOW: Record<Side, string> = {\n top: \"hidden in-data-[side=top]:block\",\n bottom: \"hidden in-data-[side=bottom]:block\",\n left: \"hidden in-data-[side=left]:block\",\n right: \"hidden in-data-[side=right]:block\",\n};\n\n/** ONE arrow element (Base UI positions it); it sits just outside the edge that faces the trigger, 1px over the border. */\nfunction Caret() {\n return (\n <TooltipPrimitive.Arrow className=\"absolute data-[side=bottom]:bottom-full data-[side=bottom]:-mb-px data-[side=left]:left-full data-[side=left]:-ml-px data-[side=right]:right-full data-[side=right]:-mr-px data-[side=top]:top-full data-[side=top]:-mt-px\">\n {(Object.keys(CARETS) as Side[]).map((side) => {\n const c = CARETS[side];\n return (\n <svg key={side} aria-hidden width={c.w} height={c.h} viewBox={`0 0 ${c.w} ${c.h}`} className={`${CARET_SHOW[side]} overflow-visible fill-kit-insp-tip-bg stroke-kit-insp-tip-line`} style={{ filter: `drop-shadow(${c.shadow} rgb(0 0 0 / 0.05))` }}>\n <path d={c.d} />\n </svg>\n );\n })}\n </TooltipPrimitive.Arrow>\n );\n}\n\nfunction CardLayer({ side, arrow, className, children }: { side: Side; arrow: boolean; className?: string; children: React.ReactNode }) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Positioner side={side} sideOffset={10} collisionPadding={8} className=\"z-[var(--kit-z-tooltip,90)]\" {...KIT_SCOPE}>\n <TooltipPrimitive.Popup role=\"tooltip\" data-kit-tooltip=\"card\" className={cn(CARD_TOOLTIP_CLASS, className)}>\n {arrow ? <Caret /> : null}\n {children}\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport interface CardTooltipProps {\n content: React.ReactNode;\n /** the trigger: one element that forwards its ref and spreads props */\n children: React.ReactElement;\n side?: Side;\n /** a key hint, always shown after a middle dot (\"Full screen · ⇧F\"), as the prototype writes it */\n shortcut?: string;\n /** ms before it opens (the prototype's Tip: 400) */\n delay?: number;\n /** the caret pointing at the trigger (default true) */\n arrow?: boolean;\n disabled?: boolean;\n className?: string;\n}\n\n/** Tip on icon buttons (ui.jsx:160-167): one line, 12/16 medium, 0.15 tracking, 6×10 padding. */\nexport function CardTooltip({ content, children, side = \"bottom\", shortcut, delay = 400, arrow = true, disabled, className }: CardTooltipProps) {\n if (disabled || !content) return children;\n return (\n <TooltipRoot>\n <TooltipPrimitive.Trigger delay={delay} closeDelay={0} render={children} />\n <CardLayer side={side} arrow={arrow} className={cn(\"px-2.5 py-1.5 text-[12px] font-medium leading-4 tracking-[0.15px]\", className)}>\n {content}\n {shortcut ? <span className=\"text-kit-insp-quiet\">{` · ${platformKeys(shortcut)}`}</span> : null}\n </CardLayer>\n </TooltipRoot>\n );\n}\n\nexport interface InfoTooltipProps {\n /** bold first line (the field's label) */\n title: React.ReactNode;\n /** the explanation */\n children: React.ReactNode;\n /** accessible name of the ⓘ button: \"About <label>\" (defaults to the title when it is a string) */\n label?: string;\n side?: Side;\n /** a trigger of the host's own instead of the ⓘ button */\n trigger?: React.ReactElement;\n className?: string;\n}\n\n/** Info icon next to a label (ui.jsx:149-158, kit.css:445-452): a 16 box with a 14 glyph; its card is 240 wide with a\n * title row (glyph + 13/16 medium) and a 12/17 body, opens after 250ms, below. */\nexport function InfoTooltip({ title, children, label, side = \"bottom\", trigger, className }: InfoTooltipProps) {\n const name = label ?? (typeof title === \"string\" ? title : undefined);\n return (\n <TooltipRoot>\n <TooltipPrimitive.Trigger\n delay={250}\n closeDelay={0}\n render={\n trigger ?? (\n <button\n type=\"button\"\n aria-label={name ? `About ${name}` : \"About this field\"}\n data-slot=\"kit-info-tip\"\n className=\"-ml-0.5 inline-grid size-4 shrink-0 place-items-center rounded-[4px] text-kit-insp-quiet opacity-85 outline-none transition-[opacity,background-color] duration-100 hover:bg-kit-insp-card-hover hover:opacity-100 focus-visible:bg-kit-insp-card-hover focus-visible:opacity-100\"\n >\n <IconInfoCircle aria-hidden className=\"size-3.5\" stroke={1.6} />\n </button>\n )\n }\n />\n <CardLayer side={side} arrow className={cn(\"flex w-60 flex-col gap-1.5 p-3 text-left\", className)}>\n <span className=\"flex items-center gap-1.5\">\n <IconInfoCircle aria-hidden className=\"size-3.5 shrink-0 text-kit-insp-quiet\" stroke={1.6} />\n <b className=\"text-[13px] font-medium leading-4 text-kit-insp-tip-title\">{title}</b>\n </span>\n <span className=\"text-[12px] font-normal leading-[17px] text-kit-insp-tip-body\">{children}</span>\n </Card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