@xenide-io/the-old-ui-theme 0.10.0 → 0.11.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/{Chip-DKT-82Lf.d.mts → Chip-Dw2g2t8D.d.mts} +14 -2
- package/dist/{Chip-DKT-82Lf.d.ts → Chip-Dw2g2t8D.d.ts} +14 -2
- package/dist/{chunk-LHE4ROON.mjs → chunk-RIPGN6FG.mjs} +412 -61
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +355 -23
- package/dist/index.mjs +11 -3
- package/dist/suite-analytics--Mf1RZbw.d.mts +29 -0
- package/dist/suite-analytics--Mf1RZbw.d.ts +29 -0
- package/dist/suite.d.mts +14 -4
- package/dist/suite.d.ts +14 -4
- package/dist/suite.js +920 -513
- package/dist/suite.mjs +898 -523
- package/dist/ui.d.mts +2 -2
- package/dist/ui.d.ts +2 -2
- package/dist/ui.js +401 -66
- package/dist/ui.mjs +3 -1
- package/package.json +1 -1
- package/src/app/globals.css +57 -1
- package/src/components/ui/BrandSpinner.tsx +256 -0
- package/src/components/ui/CodeBlock.tsx +11 -1
- package/src/components/ui/Marketing.tsx +17 -1
- package/src/components/ui/SettingsLayout.tsx +4 -0
- package/src/components/ui/Table.tsx +32 -9
- package/src/components/ui/brand-spinner.test.tsx +62 -0
- package/src/components/ui/index.ts +7 -0
- package/src/components/ui/table.test.tsx +31 -4
- package/src/styles/suite-skin.css +78 -46
- package/src/suite/components/ai-draft-editor.tsx +184 -0
- package/src/suite/components/ai-panel-workflows.test.tsx +179 -0
- package/src/suite/components/ai-panel.tsx +184 -14
- package/src/suite/components/app-switcher.tsx +13 -0
- package/src/suite/components/command-palette-host.tsx +20 -2
- package/src/suite/components/suite-notification-bell.tsx +23 -2
- package/src/suite/components/suite-notification-settings.tsx +11 -0
- package/src/suite/components/suite-settings-layout.tsx +1 -1
- package/src/suite/components/suite-settings-mobile-nav.tsx +5 -1
- package/src/suite/components/suite-sidebar.tsx +2 -2
- package/src/suite/components/theme-provider.tsx +2 -0
- package/src/suite/components/today-ui.tsx +33 -28
- package/src/suite/index.ts +8 -0
- package/src/suite/lib/suite-notifications.tsx +5 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as Accordion, a as AccordionItem, b as AccordionProps, c as Alert, d as AlertProps, e as AlertStatus, f as AuthCard, g as AuthCardProps, h as AuthDivider, i as AuthDividerProps, j as AuthLayout, k as AuthLayoutProps, l as Avatar, m as AvatarGroup, n as AvatarGroupProps, o as AvatarProps, p as AvatarSize, q as AvatarStatus, B as Badge, r as BadgeProps, s as BadgeSize, t as BadgeVariant, u as
|
|
1
|
+
import { bq as IconProps } from './Chip-Dw2g2t8D.mjs';
|
|
2
|
+
export { A as Accordion, a as AccordionItem, b as AccordionProps, c as Alert, d as AlertProps, e as AlertStatus, f as AuthCard, g as AuthCardProps, h as AuthDivider, i as AuthDividerProps, j as AuthLayout, k as AuthLayoutProps, l as Avatar, m as AvatarGroup, n as AvatarGroupProps, o as AvatarProps, p as AvatarSize, q as AvatarStatus, B as Badge, r as BadgeProps, s as BadgeSize, t as BadgeVariant, u as BrandSpinner, v as BrandSpinnerProps, w as BrandSpinnerSize, x as BrandSpinnerVariant, y as Button, z as ButtonChrome, C as ButtonChromeProps, D as ButtonProps, E as ButtonShape, F as ButtonSize, G as ButtonVariant, H as CANONICAL_ICONS, I as Calendar, J as CalendarProps, K as CanonicalIconName, L as Caption, M as CaptionProps, N as Card, O as CardProps, P as CardVariant, Q as Checkbox, R as CheckboxProps, S as Chip, T as ChipProps, U as CommandItem, V as CommandPalette, W as CommandPaletteProps, X as Display, Y as DisplayProps, Z as Dot, _ as DotProps, $ as DropdownAlign, a0 as DropdownButton, a1 as DropdownButtonProps, a2 as DropdownItem, a3 as DropdownItemProps, a4 as DropdownMenu, a5 as DropdownMenuProps, a6 as DropdownRadioGroup, a7 as DropdownRadioGroupProps, a8 as DropdownRadioItem, a9 as DropdownRadioItemProps, aa as DropdownSide, ab as EmptyState, ac as EmptyStateProps, ad as FileUpload, ae as FileUploadProps, af as FilterBar, ag as FilterBarProps, ah as FilterChip, ai as FilterChips, aj as FilterChipsProps, ak as FilterMenu, al as FilterMenuOption, am as FilterMenuProps, an as FormField, ao as FormFieldControlProps, ap as FormFieldProps, aq as H1, ar as H1Props, as as H2, at as H2Props, au as H3, av as H3Props, aw as H4, ax as H4Props, ay as H5, az as H5Props, aF as Icon, aA as IconActivity, aB as IconAliasName, aC as IconAreaChart, aD as IconArrowDown, aE as IconArrowUp, aF as IconBase, aG as IconBell, aH as IconBellOff, aI as IconBolt, aJ as IconBox, aK as IconByName, aL as IconCancel, aM as IconCheck, aN as IconCheckCircle, aO as IconChevronDown, aP as IconChevronLeft, aQ as IconChevronRight, aR as IconClipboardEdit, aS as IconClose, aT as IconCodePreview, aU as IconCohort, aV as IconCommandCursor, aW as IconCopy, aX as IconCumulativeChart, aY as IconDataReel, aZ as IconDatabase, a_ as IconDownload, a$ as IconEdit, b0 as IconErrorOutline, b1 as IconEventStream, b2 as IconExclamation, b3 as IconExperimentSplit, b4 as IconFeatureGate, b5 as IconFlag, b6 as IconFlare, b7 as IconFlask, b8 as IconGift, b9 as IconGridView, ba as IconHandClick, bb as IconHome, bc as IconInfo, bd as IconInsightBoard, be as IconLayers, bf as IconListView, bg as IconLogout, bh as IconMail, bi as IconMoon, bj as IconName, bk as IconOldWindow, bl as IconPanelRight, bm as IconPerson, bn as IconPlayCircle, bo as IconPlus, bp as IconPremium, br as IconQueryEditor, bs as IconQueryStack, bt as IconRadar, bu as IconRecording, bv as IconReplayFrame, bw as IconRobot, bx as IconRocket, by as IconSave, bz as IconSearch, bA as IconSelectEvents, bB as IconShoppingCart, bC as IconSpinner, bD as IconStar, bE as IconSubArrowRight, bF as IconSun, bG as IconSurveyCard, bH as IconSurveys, bI as IconSync, bJ as IconTableChart, bK as IconTerminal, bL as IconToggle, bM as IconTrash, bN as IconTuning, bO as IconUpload, bP as IconVolume, bQ as IconVolumeOff, bR as Input, bS as InputProps, bT as InputSize, bU as InputVariant, bV as Kbd, bW as KbdPlatform, bX as KbdProps, bY as KbdVariant, bZ as Label, b_ as LabelProps, b$ as Lead, c0 as LeadProps, c1 as Link, c2 as LinkProps, c3 as Loader, c4 as LoaderProps, c5 as LoaderSize, c6 as LoaderVariant, c7 as LoadingState, c8 as LoadingStateProps, c9 as Modal, ca as ModalProps, cb as ModalSize, cc as Mono, cd as MonoProps, ce as OLD_UI_ICONS, cf as Overline, cg as OverlineProps, ch as P, ci as PH_ICONS, cj as PH_ICON_ALIASES, ck as PProps, cl as Panel, cm as PanelProps, cn as Progress, co as ProgressProps, cp as Radio, cq as RadioProps, cv as SearchInput, cw as SearchInputProps, cx as SectionTitle, cy as SectionTitleProps, cz as SegmentedControl, cA as SegmentedControlOption, cB as SegmentedControlProps, cC as Select, cD as SelectProps, cE as SettingsLayout, cF as SettingsLayoutProps, cG as SettingsNav, cH as SettingsNavGroup, cI as SettingsNavItem, cJ as SettingsNavProps, cK as Skeleton, cL as SkeletonProps, cM as SkeletonShape, cN as Small, cO as SmallProps, cP as SortMenu, cQ as SortMenuProps, cR as Spinner, cS as SpinnerProps, cT as Stat, cU as StatProps, cV as StatTone, cW as Table, cX as TableColumn, cY as TableProps, cZ as TableVariant, c_ as TextBaseProps, c$ as TextTone, d0 as TextWeight, d1 as Textarea, d2 as TextareaProps, d3 as ThemeDomSync, d4 as ThemeSwitcher, d5 as ThemeSwitcherProps, d6 as Toggle, d7 as ToggleProps, d8 as Tooltip, d9 as TooltipAlign, da as TooltipProps, db as TooltipProvider, dc as TooltipProviderProps, dd as TooltipSide } from './Chip-Dw2g2t8D.mjs';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
+
export { S as SUITE_ANALYTICS_EVENT, a as SuiteAnalyticsEventDetail, b as SuiteAnalyticsProperties, s as subscribeSuiteAnalytics, t as trackSuiteEvent } from './suite-analytics--Mf1RZbw.mjs';
|
|
5
6
|
import '@radix-ui/react-dropdown-menu';
|
|
6
7
|
|
|
7
8
|
interface IconBaseDefinition {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as Accordion, a as AccordionItem, b as AccordionProps, c as Alert, d as AlertProps, e as AlertStatus, f as AuthCard, g as AuthCardProps, h as AuthDivider, i as AuthDividerProps, j as AuthLayout, k as AuthLayoutProps, l as Avatar, m as AvatarGroup, n as AvatarGroupProps, o as AvatarProps, p as AvatarSize, q as AvatarStatus, B as Badge, r as BadgeProps, s as BadgeSize, t as BadgeVariant, u as
|
|
1
|
+
import { bq as IconProps } from './Chip-Dw2g2t8D.js';
|
|
2
|
+
export { A as Accordion, a as AccordionItem, b as AccordionProps, c as Alert, d as AlertProps, e as AlertStatus, f as AuthCard, g as AuthCardProps, h as AuthDivider, i as AuthDividerProps, j as AuthLayout, k as AuthLayoutProps, l as Avatar, m as AvatarGroup, n as AvatarGroupProps, o as AvatarProps, p as AvatarSize, q as AvatarStatus, B as Badge, r as BadgeProps, s as BadgeSize, t as BadgeVariant, u as BrandSpinner, v as BrandSpinnerProps, w as BrandSpinnerSize, x as BrandSpinnerVariant, y as Button, z as ButtonChrome, C as ButtonChromeProps, D as ButtonProps, E as ButtonShape, F as ButtonSize, G as ButtonVariant, H as CANONICAL_ICONS, I as Calendar, J as CalendarProps, K as CanonicalIconName, L as Caption, M as CaptionProps, N as Card, O as CardProps, P as CardVariant, Q as Checkbox, R as CheckboxProps, S as Chip, T as ChipProps, U as CommandItem, V as CommandPalette, W as CommandPaletteProps, X as Display, Y as DisplayProps, Z as Dot, _ as DotProps, $ as DropdownAlign, a0 as DropdownButton, a1 as DropdownButtonProps, a2 as DropdownItem, a3 as DropdownItemProps, a4 as DropdownMenu, a5 as DropdownMenuProps, a6 as DropdownRadioGroup, a7 as DropdownRadioGroupProps, a8 as DropdownRadioItem, a9 as DropdownRadioItemProps, aa as DropdownSide, ab as EmptyState, ac as EmptyStateProps, ad as FileUpload, ae as FileUploadProps, af as FilterBar, ag as FilterBarProps, ah as FilterChip, ai as FilterChips, aj as FilterChipsProps, ak as FilterMenu, al as FilterMenuOption, am as FilterMenuProps, an as FormField, ao as FormFieldControlProps, ap as FormFieldProps, aq as H1, ar as H1Props, as as H2, at as H2Props, au as H3, av as H3Props, aw as H4, ax as H4Props, ay as H5, az as H5Props, aF as Icon, aA as IconActivity, aB as IconAliasName, aC as IconAreaChart, aD as IconArrowDown, aE as IconArrowUp, aF as IconBase, aG as IconBell, aH as IconBellOff, aI as IconBolt, aJ as IconBox, aK as IconByName, aL as IconCancel, aM as IconCheck, aN as IconCheckCircle, aO as IconChevronDown, aP as IconChevronLeft, aQ as IconChevronRight, aR as IconClipboardEdit, aS as IconClose, aT as IconCodePreview, aU as IconCohort, aV as IconCommandCursor, aW as IconCopy, aX as IconCumulativeChart, aY as IconDataReel, aZ as IconDatabase, a_ as IconDownload, a$ as IconEdit, b0 as IconErrorOutline, b1 as IconEventStream, b2 as IconExclamation, b3 as IconExperimentSplit, b4 as IconFeatureGate, b5 as IconFlag, b6 as IconFlare, b7 as IconFlask, b8 as IconGift, b9 as IconGridView, ba as IconHandClick, bb as IconHome, bc as IconInfo, bd as IconInsightBoard, be as IconLayers, bf as IconListView, bg as IconLogout, bh as IconMail, bi as IconMoon, bj as IconName, bk as IconOldWindow, bl as IconPanelRight, bm as IconPerson, bn as IconPlayCircle, bo as IconPlus, bp as IconPremium, br as IconQueryEditor, bs as IconQueryStack, bt as IconRadar, bu as IconRecording, bv as IconReplayFrame, bw as IconRobot, bx as IconRocket, by as IconSave, bz as IconSearch, bA as IconSelectEvents, bB as IconShoppingCart, bC as IconSpinner, bD as IconStar, bE as IconSubArrowRight, bF as IconSun, bG as IconSurveyCard, bH as IconSurveys, bI as IconSync, bJ as IconTableChart, bK as IconTerminal, bL as IconToggle, bM as IconTrash, bN as IconTuning, bO as IconUpload, bP as IconVolume, bQ as IconVolumeOff, bR as Input, bS as InputProps, bT as InputSize, bU as InputVariant, bV as Kbd, bW as KbdPlatform, bX as KbdProps, bY as KbdVariant, bZ as Label, b_ as LabelProps, b$ as Lead, c0 as LeadProps, c1 as Link, c2 as LinkProps, c3 as Loader, c4 as LoaderProps, c5 as LoaderSize, c6 as LoaderVariant, c7 as LoadingState, c8 as LoadingStateProps, c9 as Modal, ca as ModalProps, cb as ModalSize, cc as Mono, cd as MonoProps, ce as OLD_UI_ICONS, cf as Overline, cg as OverlineProps, ch as P, ci as PH_ICONS, cj as PH_ICON_ALIASES, ck as PProps, cl as Panel, cm as PanelProps, cn as Progress, co as ProgressProps, cp as Radio, cq as RadioProps, cv as SearchInput, cw as SearchInputProps, cx as SectionTitle, cy as SectionTitleProps, cz as SegmentedControl, cA as SegmentedControlOption, cB as SegmentedControlProps, cC as Select, cD as SelectProps, cE as SettingsLayout, cF as SettingsLayoutProps, cG as SettingsNav, cH as SettingsNavGroup, cI as SettingsNavItem, cJ as SettingsNavProps, cK as Skeleton, cL as SkeletonProps, cM as SkeletonShape, cN as Small, cO as SmallProps, cP as SortMenu, cQ as SortMenuProps, cR as Spinner, cS as SpinnerProps, cT as Stat, cU as StatProps, cV as StatTone, cW as Table, cX as TableColumn, cY as TableProps, cZ as TableVariant, c_ as TextBaseProps, c$ as TextTone, d0 as TextWeight, d1 as Textarea, d2 as TextareaProps, d3 as ThemeDomSync, d4 as ThemeSwitcher, d5 as ThemeSwitcherProps, d6 as Toggle, d7 as ToggleProps, d8 as Tooltip, d9 as TooltipAlign, da as TooltipProps, db as TooltipProvider, dc as TooltipProviderProps, dd as TooltipSide } from './Chip-Dw2g2t8D.js';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
+
export { S as SUITE_ANALYTICS_EVENT, a as SuiteAnalyticsEventDetail, b as SuiteAnalyticsProperties, s as subscribeSuiteAnalytics, t as trackSuiteEvent } from './suite-analytics--Mf1RZbw.js';
|
|
5
6
|
import '@radix-ui/react-dropdown-menu';
|
|
6
7
|
|
|
7
8
|
interface IconBaseDefinition {
|
package/dist/index.js
CHANGED
|
@@ -68,6 +68,7 @@ __export(src_exports, {
|
|
|
68
68
|
Avatar: () => Avatar,
|
|
69
69
|
AvatarGroup: () => AvatarGroup,
|
|
70
70
|
Badge: () => Badge,
|
|
71
|
+
BrandSpinner: () => BrandSpinner,
|
|
71
72
|
Button: () => Button,
|
|
72
73
|
ButtonChrome: () => ButtonChrome,
|
|
73
74
|
CANONICAL_ICONS: () => CANONICAL_ICONS,
|
|
@@ -192,6 +193,7 @@ __export(src_exports, {
|
|
|
192
193
|
Panel: () => Panel,
|
|
193
194
|
Progress: () => Progress,
|
|
194
195
|
Radio: () => Radio,
|
|
196
|
+
SUITE_ANALYTICS_EVENT: () => SUITE_ANALYTICS_EVENT,
|
|
195
197
|
SearchInput: () => SearchInput,
|
|
196
198
|
SectionTitle: () => SectionTitle,
|
|
197
199
|
SegmentedControl: () => SegmentedControl,
|
|
@@ -218,7 +220,9 @@ __export(src_exports, {
|
|
|
218
220
|
getTheme: () => getTheme,
|
|
219
221
|
isThemeId: () => isThemeId,
|
|
220
222
|
persistTheme: () => persistTheme,
|
|
221
|
-
readStoredTheme: () => readStoredTheme
|
|
223
|
+
readStoredTheme: () => readStoredTheme,
|
|
224
|
+
subscribeSuiteAnalytics: () => subscribeSuiteAnalytics,
|
|
225
|
+
trackSuiteEvent: () => trackSuiteEvent
|
|
222
226
|
});
|
|
223
227
|
module.exports = __toCommonJS(src_exports);
|
|
224
228
|
|
|
@@ -1312,6 +1316,34 @@ function AuthDivider(_a) {
|
|
|
1312
1316
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-divider", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children }) }));
|
|
1313
1317
|
}
|
|
1314
1318
|
|
|
1319
|
+
// src/lib/suite-analytics.ts
|
|
1320
|
+
var SUITE_ANALYTICS_EVENT = "shellstack:analytics";
|
|
1321
|
+
function trackSuiteEvent(event, properties) {
|
|
1322
|
+
if (typeof window === "undefined" || !event) return;
|
|
1323
|
+
try {
|
|
1324
|
+
window.dispatchEvent(
|
|
1325
|
+
new CustomEvent(SUITE_ANALYTICS_EVENT, {
|
|
1326
|
+
detail: { event, properties }
|
|
1327
|
+
})
|
|
1328
|
+
);
|
|
1329
|
+
} catch (e) {
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
function subscribeSuiteAnalytics(handler) {
|
|
1333
|
+
if (typeof window === "undefined") return () => {
|
|
1334
|
+
};
|
|
1335
|
+
const listener = (raw) => {
|
|
1336
|
+
const detail = raw.detail;
|
|
1337
|
+
if (!(detail == null ? void 0 : detail.event)) return;
|
|
1338
|
+
try {
|
|
1339
|
+
handler(detail.event, detail.properties);
|
|
1340
|
+
} catch (e) {
|
|
1341
|
+
}
|
|
1342
|
+
};
|
|
1343
|
+
window.addEventListener(SUITE_ANALYTICS_EVENT, listener);
|
|
1344
|
+
return () => window.removeEventListener(SUITE_ANALYTICS_EVENT, listener);
|
|
1345
|
+
}
|
|
1346
|
+
|
|
1315
1347
|
// src/components/ui/SettingsLayout.tsx
|
|
1316
1348
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1317
1349
|
function SettingsNav(_a) {
|
|
@@ -1329,6 +1361,7 @@ function SettingsNav(_a) {
|
|
|
1329
1361
|
item.active && "ph-settings-nav__item--active"
|
|
1330
1362
|
),
|
|
1331
1363
|
"aria-current": item.active ? "page" : void 0,
|
|
1364
|
+
onClick: () => trackSuiteEvent("Tab Viewed", { tab: item.id }),
|
|
1332
1365
|
children: [
|
|
1333
1366
|
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
|
|
1334
1367
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: item.label }),
|
|
@@ -2251,24 +2284,41 @@ function Table({
|
|
|
2251
2284
|
getRowStyle,
|
|
2252
2285
|
getRowKey,
|
|
2253
2286
|
className,
|
|
2287
|
+
tableClassName,
|
|
2288
|
+
variant = "default",
|
|
2254
2289
|
caption,
|
|
2255
2290
|
emptyState = "No data available."
|
|
2256
2291
|
}) {
|
|
2257
2292
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
2258
2293
|
"div",
|
|
2259
2294
|
{
|
|
2260
|
-
className: cn(
|
|
2295
|
+
className: cn(
|
|
2296
|
+
variant === "report" ? "ph-table-report-wrap" : "ph-table-wrap",
|
|
2297
|
+
compact && "ph-table-compact",
|
|
2298
|
+
className
|
|
2299
|
+
),
|
|
2261
2300
|
role: "region",
|
|
2262
2301
|
"aria-label": caption != null ? caption : "Data table",
|
|
2263
2302
|
tabIndex: 0,
|
|
2264
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
2304
|
+
"table",
|
|
2305
|
+
{
|
|
2306
|
+
className: cn(
|
|
2307
|
+
variant === "report" ? "ph-table-report" : "ph-table",
|
|
2308
|
+
zebra && "ph-table-zebra",
|
|
2309
|
+
ribbon && "ph-table--ribbon",
|
|
2310
|
+
tableClassName
|
|
2311
|
+
),
|
|
2312
|
+
children: [
|
|
2313
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("caption", { className: "sr-only", children: caption }),
|
|
2314
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tr", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("th", { scope: "col", className: col.className, children: col.header }, col.key)) }) }),
|
|
2315
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tbody", { children: data.length === 0 ? emptyState === null ? null : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("td", { colSpan: columns.length, className: "ph-table-empty", children: emptyState }) }) : data.map((row, i) => {
|
|
2316
|
+
var _a;
|
|
2317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tr", { style: getRowStyle == null ? void 0 : getRowStyle(row), children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("td", { className: col.className, children: col.cell(row) }, col.key)) }, (_a = getRowKey == null ? void 0 : getRowKey(row, i)) != null ? _a : i);
|
|
2318
|
+
}) })
|
|
2319
|
+
]
|
|
2320
|
+
}
|
|
2321
|
+
)
|
|
2272
2322
|
}
|
|
2273
2323
|
);
|
|
2274
2324
|
}
|
|
@@ -3614,8 +3664,286 @@ function Spinner(_a) {
|
|
|
3614
3664
|
}
|
|
3615
3665
|
Spinner.displayName = "Spinner";
|
|
3616
3666
|
|
|
3617
|
-
// src/components/ui/
|
|
3667
|
+
// src/components/ui/BrandSpinner.tsx
|
|
3668
|
+
var import_react24 = require("react");
|
|
3618
3669
|
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3670
|
+
var sizes = { sm: 20, md: 40, lg: 56 };
|
|
3671
|
+
var reducedMotionQuery = "(prefers-reduced-motion: reduce)";
|
|
3672
|
+
function subscribeMotion(onChange) {
|
|
3673
|
+
var _a;
|
|
3674
|
+
const media = (_a = window.matchMedia) == null ? void 0 : _a.call(window, reducedMotionQuery);
|
|
3675
|
+
media == null ? void 0 : media.addEventListener("change", onChange);
|
|
3676
|
+
return () => media == null ? void 0 : media.removeEventListener("change", onChange);
|
|
3677
|
+
}
|
|
3678
|
+
function readReducedMotion() {
|
|
3679
|
+
var _a, _b;
|
|
3680
|
+
return (_b = (_a = window.matchMedia) == null ? void 0 : _a.call(window, reducedMotionQuery).matches) != null ? _b : false;
|
|
3681
|
+
}
|
|
3682
|
+
function BrandSpinner(_a) {
|
|
3683
|
+
var _b = _a, {
|
|
3684
|
+
variant = "ring",
|
|
3685
|
+
size = "md",
|
|
3686
|
+
label = "Loading",
|
|
3687
|
+
className
|
|
3688
|
+
} = _b, props = __objRest(_b, [
|
|
3689
|
+
"variant",
|
|
3690
|
+
"size",
|
|
3691
|
+
"label",
|
|
3692
|
+
"className"
|
|
3693
|
+
]);
|
|
3694
|
+
const gradientId = `ph-spinner-${(0, import_react24.useId)().replace(/:/g, "")}`;
|
|
3695
|
+
const reducedMotion = (0, import_react24.useSyncExternalStore)(
|
|
3696
|
+
subscribeMotion,
|
|
3697
|
+
readReducedMotion,
|
|
3698
|
+
() => true
|
|
3699
|
+
);
|
|
3700
|
+
const dimension = sizes[size];
|
|
3701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3702
|
+
"div",
|
|
3703
|
+
__spreadProps(__spreadValues({
|
|
3704
|
+
role: "status",
|
|
3705
|
+
"aria-label": label,
|
|
3706
|
+
"data-test": "app-spinner",
|
|
3707
|
+
className: cn(
|
|
3708
|
+
"inline-flex shrink-0",
|
|
3709
|
+
variant !== "orbit" && "text-ph-brand",
|
|
3710
|
+
className
|
|
3711
|
+
)
|
|
3712
|
+
}, props), {
|
|
3713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3714
|
+
"svg",
|
|
3715
|
+
{
|
|
3716
|
+
width: dimension,
|
|
3717
|
+
height: dimension,
|
|
3718
|
+
viewBox: variant === "ring" ? "0 0 24 24" : "0 0 40 40",
|
|
3719
|
+
"aria-hidden": true,
|
|
3720
|
+
className: variant === "timer" || variant === "ring" ? "animate-spin motion-reduce:animate-none" : void 0,
|
|
3721
|
+
children: variant === "ring" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3722
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3723
|
+
"circle",
|
|
3724
|
+
{
|
|
3725
|
+
cx: "12",
|
|
3726
|
+
cy: "12",
|
|
3727
|
+
r: "10",
|
|
3728
|
+
fill: "none",
|
|
3729
|
+
stroke: "currentColor",
|
|
3730
|
+
strokeWidth: "3",
|
|
3731
|
+
opacity: "0.2"
|
|
3732
|
+
}
|
|
3733
|
+
),
|
|
3734
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3735
|
+
"path",
|
|
3736
|
+
{
|
|
3737
|
+
d: "M12 2a10 10 0 0 1 10 10",
|
|
3738
|
+
fill: "none",
|
|
3739
|
+
stroke: "currentColor",
|
|
3740
|
+
strokeWidth: "3",
|
|
3741
|
+
strokeLinecap: "round"
|
|
3742
|
+
}
|
|
3743
|
+
)
|
|
3744
|
+
] }) : variant === "timer" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3745
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3746
|
+
"circle",
|
|
3747
|
+
{
|
|
3748
|
+
cx: "20",
|
|
3749
|
+
cy: "20",
|
|
3750
|
+
r: "15",
|
|
3751
|
+
fill: "none",
|
|
3752
|
+
stroke: "currentColor",
|
|
3753
|
+
strokeOpacity: "0.18",
|
|
3754
|
+
strokeWidth: "2.5"
|
|
3755
|
+
}
|
|
3756
|
+
),
|
|
3757
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3758
|
+
"circle",
|
|
3759
|
+
{
|
|
3760
|
+
cx: "20",
|
|
3761
|
+
cy: "20",
|
|
3762
|
+
r: "15",
|
|
3763
|
+
fill: "none",
|
|
3764
|
+
stroke: "currentColor",
|
|
3765
|
+
strokeWidth: "2.5",
|
|
3766
|
+
strokeLinecap: "round",
|
|
3767
|
+
strokeDasharray: "24 70"
|
|
3768
|
+
}
|
|
3769
|
+
),
|
|
3770
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("circle", { cx: "20", cy: "5", r: "2.25", fill: "currentColor" })
|
|
3771
|
+
] }) : variant === "columns" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3772
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3773
|
+
"rect",
|
|
3774
|
+
{
|
|
3775
|
+
x: "9",
|
|
3776
|
+
y: "16",
|
|
3777
|
+
width: "6",
|
|
3778
|
+
height: "14",
|
|
3779
|
+
rx: "2",
|
|
3780
|
+
fill: "currentColor",
|
|
3781
|
+
fillOpacity: "0.35",
|
|
3782
|
+
className: "ph-brand-spinner__column"
|
|
3783
|
+
}
|
|
3784
|
+
),
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3786
|
+
"rect",
|
|
3787
|
+
{
|
|
3788
|
+
x: "17",
|
|
3789
|
+
y: "11",
|
|
3790
|
+
width: "6",
|
|
3791
|
+
height: "19",
|
|
3792
|
+
rx: "2",
|
|
3793
|
+
fill: "currentColor",
|
|
3794
|
+
className: "ph-brand-spinner__column",
|
|
3795
|
+
style: { animationDelay: "0.14s" }
|
|
3796
|
+
}
|
|
3797
|
+
),
|
|
3798
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3799
|
+
"rect",
|
|
3800
|
+
{
|
|
3801
|
+
x: "25",
|
|
3802
|
+
y: "14",
|
|
3803
|
+
width: "6",
|
|
3804
|
+
height: "16",
|
|
3805
|
+
rx: "2",
|
|
3806
|
+
fill: "currentColor",
|
|
3807
|
+
fillOpacity: "0.55",
|
|
3808
|
+
className: "ph-brand-spinner__column",
|
|
3809
|
+
style: { animationDelay: "0.28s" }
|
|
3810
|
+
}
|
|
3811
|
+
)
|
|
3812
|
+
] }) : variant === "orbit" ? /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3813
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3814
|
+
"linearGradient",
|
|
3815
|
+
{
|
|
3816
|
+
id: gradientId,
|
|
3817
|
+
x1: "0%",
|
|
3818
|
+
y1: "0%",
|
|
3819
|
+
x2: "100%",
|
|
3820
|
+
y2: "100%",
|
|
3821
|
+
children: [
|
|
3822
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("stop", { offset: "0%", stopColor: "#1877f2" }),
|
|
3823
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("stop", { offset: "100%", stopColor: "#ebbcba" })
|
|
3824
|
+
]
|
|
3825
|
+
}
|
|
3826
|
+
) }),
|
|
3827
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3828
|
+
"circle",
|
|
3829
|
+
{
|
|
3830
|
+
cx: "20",
|
|
3831
|
+
cy: "20",
|
|
3832
|
+
r: "15",
|
|
3833
|
+
fill: "none",
|
|
3834
|
+
stroke: `url(#${gradientId})`,
|
|
3835
|
+
strokeOpacity: "0.25",
|
|
3836
|
+
strokeWidth: "2"
|
|
3837
|
+
}
|
|
3838
|
+
),
|
|
3839
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("g", { className: "origin-[20px_20px] animate-spin motion-reduce:animate-none", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3840
|
+
"circle",
|
|
3841
|
+
{
|
|
3842
|
+
cx: "20",
|
|
3843
|
+
cy: "20",
|
|
3844
|
+
r: "15",
|
|
3845
|
+
fill: "none",
|
|
3846
|
+
stroke: `url(#${gradientId})`,
|
|
3847
|
+
strokeWidth: "2.5",
|
|
3848
|
+
strokeLinecap: "round",
|
|
3849
|
+
strokeDasharray: "22 72"
|
|
3850
|
+
}
|
|
3851
|
+
) }),
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("g", { className: "origin-[20px_20px] animate-[spin_1.6s_linear_infinite_reverse] motion-reduce:animate-none", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3853
|
+
"circle",
|
|
3854
|
+
{
|
|
3855
|
+
cx: "20",
|
|
3856
|
+
cy: "20",
|
|
3857
|
+
r: "9",
|
|
3858
|
+
fill: "none",
|
|
3859
|
+
stroke: "#ebbcba",
|
|
3860
|
+
strokeWidth: "2",
|
|
3861
|
+
strokeLinecap: "round",
|
|
3862
|
+
strokeDasharray: "12 45",
|
|
3863
|
+
strokeOpacity: "0.9"
|
|
3864
|
+
}
|
|
3865
|
+
) }),
|
|
3866
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3867
|
+
"circle",
|
|
3868
|
+
{
|
|
3869
|
+
cx: "20",
|
|
3870
|
+
cy: "20",
|
|
3871
|
+
r: "2.5",
|
|
3872
|
+
fill: "#1877f2",
|
|
3873
|
+
className: "animate-pulse motion-reduce:animate-none"
|
|
3874
|
+
}
|
|
3875
|
+
)
|
|
3876
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3877
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("g", { children: [
|
|
3878
|
+
!reducedMotion ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3879
|
+
"animateTransform",
|
|
3880
|
+
{
|
|
3881
|
+
attributeName: "transform",
|
|
3882
|
+
type: "rotate",
|
|
3883
|
+
from: "0 20 20",
|
|
3884
|
+
to: "360 20 20",
|
|
3885
|
+
dur: "2.4s",
|
|
3886
|
+
repeatCount: "indefinite"
|
|
3887
|
+
}
|
|
3888
|
+
) : null,
|
|
3889
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3890
|
+
"circle",
|
|
3891
|
+
{
|
|
3892
|
+
cx: "20",
|
|
3893
|
+
cy: "20",
|
|
3894
|
+
r: "16",
|
|
3895
|
+
fill: "none",
|
|
3896
|
+
stroke: "currentColor",
|
|
3897
|
+
strokeOpacity: "0.2",
|
|
3898
|
+
strokeWidth: "1.5",
|
|
3899
|
+
strokeDasharray: "3 5"
|
|
3900
|
+
}
|
|
3901
|
+
)
|
|
3902
|
+
] }),
|
|
3903
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("g", { children: [
|
|
3904
|
+
!reducedMotion ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3905
|
+
"animateTransform",
|
|
3906
|
+
{
|
|
3907
|
+
attributeName: "transform",
|
|
3908
|
+
type: "rotate",
|
|
3909
|
+
from: "360 20 20",
|
|
3910
|
+
to: "0 20 20",
|
|
3911
|
+
dur: "1.1s",
|
|
3912
|
+
repeatCount: "indefinite"
|
|
3913
|
+
}
|
|
3914
|
+
) : null,
|
|
3915
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3916
|
+
"circle",
|
|
3917
|
+
{
|
|
3918
|
+
cx: "20",
|
|
3919
|
+
cy: "20",
|
|
3920
|
+
r: "11",
|
|
3921
|
+
fill: "none",
|
|
3922
|
+
stroke: "currentColor",
|
|
3923
|
+
strokeWidth: "2",
|
|
3924
|
+
strokeLinecap: "round",
|
|
3925
|
+
strokeDasharray: "18 52"
|
|
3926
|
+
}
|
|
3927
|
+
)
|
|
3928
|
+
] }),
|
|
3929
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3930
|
+
"path",
|
|
3931
|
+
{
|
|
3932
|
+
d: "M16 14h8v12a1 1 0 0 1-1.4.9L20 25.5l-2.6 1.4A1 1 0 0 1 16 26V14z",
|
|
3933
|
+
fill: "currentColor",
|
|
3934
|
+
fillOpacity: "0.85",
|
|
3935
|
+
className: "animate-pulse motion-reduce:animate-none"
|
|
3936
|
+
}
|
|
3937
|
+
)
|
|
3938
|
+
] })
|
|
3939
|
+
}
|
|
3940
|
+
)
|
|
3941
|
+
})
|
|
3942
|
+
);
|
|
3943
|
+
}
|
|
3944
|
+
|
|
3945
|
+
// src/components/ui/Dot.tsx
|
|
3946
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3619
3947
|
var colorMap = {
|
|
3620
3948
|
green: "bg-ph-success",
|
|
3621
3949
|
yellow: "bg-ph-warning",
|
|
@@ -3625,7 +3953,7 @@ var colorMap = {
|
|
|
3625
3953
|
};
|
|
3626
3954
|
function Dot(_a) {
|
|
3627
3955
|
var _b = _a, { color = "gray", size = "md", className } = _b, props = __objRest(_b, ["color", "size", "className"]);
|
|
3628
|
-
return /* @__PURE__ */ (0,
|
|
3956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3629
3957
|
"span",
|
|
3630
3958
|
__spreadValues({
|
|
3631
3959
|
className: cn(
|
|
@@ -3641,9 +3969,9 @@ function Dot(_a) {
|
|
|
3641
3969
|
Dot.displayName = "Dot";
|
|
3642
3970
|
|
|
3643
3971
|
// src/components/ui/Chip.tsx
|
|
3644
|
-
var
|
|
3645
|
-
var
|
|
3646
|
-
var Chip = (0,
|
|
3972
|
+
var import_react25 = require("react");
|
|
3973
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3974
|
+
var Chip = (0, import_react25.forwardRef)(function Chip2(_a, ref) {
|
|
3647
3975
|
var _b = _a, {
|
|
3648
3976
|
selected = false,
|
|
3649
3977
|
onRemove,
|
|
@@ -3662,18 +3990,18 @@ var Chip = (0, import_react24.forwardRef)(function Chip2(_a, ref) {
|
|
|
3662
3990
|
);
|
|
3663
3991
|
if (onRemove) {
|
|
3664
3992
|
const removeLabel = typeof children === "string" ? `Remove ${children}` : "Remove";
|
|
3665
|
-
return /* @__PURE__ */ (0,
|
|
3666
|
-
/* @__PURE__ */ (0,
|
|
3993
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: chipClassName, children: [
|
|
3994
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3667
3995
|
"button",
|
|
3668
3996
|
__spreadProps(__spreadValues({
|
|
3669
3997
|
ref,
|
|
3670
3998
|
type: "button",
|
|
3671
3999
|
className: "min-w-0 bg-transparent p-0 text-inherit"
|
|
3672
4000
|
}, props), {
|
|
3673
|
-
children: /* @__PURE__ */ (0,
|
|
4001
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-chip__text", children })
|
|
3674
4002
|
})
|
|
3675
4003
|
),
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
4004
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3677
4005
|
"button",
|
|
3678
4006
|
{
|
|
3679
4007
|
type: "button",
|
|
@@ -3681,19 +4009,19 @@ var Chip = (0, import_react24.forwardRef)(function Chip2(_a, ref) {
|
|
|
3681
4009
|
disabled: props.disabled,
|
|
3682
4010
|
className: "ph-chip__remove",
|
|
3683
4011
|
"aria-label": removeLabel,
|
|
3684
|
-
children: /* @__PURE__ */ (0,
|
|
4012
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { d: "M2 2l6 6M8 2l-6 6" }) })
|
|
3685
4013
|
}
|
|
3686
4014
|
)
|
|
3687
4015
|
] });
|
|
3688
4016
|
}
|
|
3689
|
-
return /* @__PURE__ */ (0,
|
|
4017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3690
4018
|
"button",
|
|
3691
4019
|
__spreadProps(__spreadValues({
|
|
3692
4020
|
ref,
|
|
3693
4021
|
type: "button",
|
|
3694
4022
|
className: chipClassName
|
|
3695
4023
|
}, props), {
|
|
3696
|
-
children: /* @__PURE__ */ (0,
|
|
4024
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-chip__text", children })
|
|
3697
4025
|
})
|
|
3698
4026
|
);
|
|
3699
4027
|
});
|
|
@@ -3708,6 +4036,7 @@ Chip.displayName = "Chip";
|
|
|
3708
4036
|
Avatar,
|
|
3709
4037
|
AvatarGroup,
|
|
3710
4038
|
Badge,
|
|
4039
|
+
BrandSpinner,
|
|
3711
4040
|
Button,
|
|
3712
4041
|
ButtonChrome,
|
|
3713
4042
|
CANONICAL_ICONS,
|
|
@@ -3832,6 +4161,7 @@ Chip.displayName = "Chip";
|
|
|
3832
4161
|
Panel,
|
|
3833
4162
|
Progress,
|
|
3834
4163
|
Radio,
|
|
4164
|
+
SUITE_ANALYTICS_EVENT,
|
|
3835
4165
|
SearchInput,
|
|
3836
4166
|
SectionTitle,
|
|
3837
4167
|
SegmentedControl,
|
|
@@ -3858,5 +4188,7 @@ Chip.displayName = "Chip";
|
|
|
3858
4188
|
getTheme,
|
|
3859
4189
|
isThemeId,
|
|
3860
4190
|
persistTheme,
|
|
3861
|
-
readStoredTheme
|
|
4191
|
+
readStoredTheme,
|
|
4192
|
+
subscribeSuiteAnalytics,
|
|
4193
|
+
trackSuiteEvent
|
|
3862
4194
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
Avatar,
|
|
9
9
|
AvatarGroup,
|
|
10
10
|
Badge,
|
|
11
|
+
BrandSpinner,
|
|
11
12
|
Button,
|
|
12
13
|
ButtonChrome,
|
|
13
14
|
CANONICAL_ICONS,
|
|
@@ -131,6 +132,7 @@ import {
|
|
|
131
132
|
Panel,
|
|
132
133
|
Progress,
|
|
133
134
|
Radio,
|
|
135
|
+
SUITE_ANALYTICS_EVENT,
|
|
134
136
|
SearchInput,
|
|
135
137
|
SectionTitle,
|
|
136
138
|
SegmentedControl,
|
|
@@ -157,8 +159,10 @@ import {
|
|
|
157
159
|
getTheme,
|
|
158
160
|
isThemeId,
|
|
159
161
|
persistTheme,
|
|
160
|
-
readStoredTheme
|
|
161
|
-
|
|
162
|
+
readStoredTheme,
|
|
163
|
+
subscribeSuiteAnalytics,
|
|
164
|
+
trackSuiteEvent
|
|
165
|
+
} from "./chunk-RIPGN6FG.mjs";
|
|
162
166
|
import "./chunk-FWCSY2DS.mjs";
|
|
163
167
|
export {
|
|
164
168
|
Accordion,
|
|
@@ -169,6 +173,7 @@ export {
|
|
|
169
173
|
Avatar,
|
|
170
174
|
AvatarGroup,
|
|
171
175
|
Badge,
|
|
176
|
+
BrandSpinner,
|
|
172
177
|
Button,
|
|
173
178
|
ButtonChrome,
|
|
174
179
|
CANONICAL_ICONS,
|
|
@@ -293,6 +298,7 @@ export {
|
|
|
293
298
|
Panel,
|
|
294
299
|
Progress,
|
|
295
300
|
Radio,
|
|
301
|
+
SUITE_ANALYTICS_EVENT,
|
|
296
302
|
SearchInput,
|
|
297
303
|
SectionTitle,
|
|
298
304
|
SegmentedControl,
|
|
@@ -319,5 +325,7 @@ export {
|
|
|
319
325
|
getTheme,
|
|
320
326
|
isThemeId,
|
|
321
327
|
persistTheme,
|
|
322
|
-
readStoredTheme
|
|
328
|
+
readStoredTheme,
|
|
329
|
+
subscribeSuiteAnalytics,
|
|
330
|
+
trackSuiteEvent
|
|
323
331
|
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Analytics bridge for shared `the-old-ui` components.
|
|
3
|
+
*
|
|
4
|
+
* The shared package must not depend on `@xenide-io/suite-client`, so instead
|
|
5
|
+
* of importing an analytics client it emits a browser CustomEvent that each
|
|
6
|
+
* host app forwards to its own client (e.g. `analytics.capture`). This mirrors
|
|
7
|
+
* the existing `suite-mutated` / `tt-timer-mutated` window-event pattern and
|
|
8
|
+
* works across the package's separate `index` / `ui` / `suite` bundles because
|
|
9
|
+
* `window` is the single shared instance.
|
|
10
|
+
*/
|
|
11
|
+
/** Window event apps subscribe to in order to forward suite analytics. */
|
|
12
|
+
declare const SUITE_ANALYTICS_EVENT = "shellstack:analytics";
|
|
13
|
+
type SuiteAnalyticsProperties = Record<string, unknown>;
|
|
14
|
+
interface SuiteAnalyticsEventDetail {
|
|
15
|
+
event: string;
|
|
16
|
+
properties?: SuiteAnalyticsProperties;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Emit a shared-component analytics event. Safe to call during SSR and never
|
|
20
|
+
* throws into the UI: analytics must never break an interaction.
|
|
21
|
+
*/
|
|
22
|
+
declare function trackSuiteEvent(event: string, properties?: SuiteAnalyticsProperties): void;
|
|
23
|
+
/**
|
|
24
|
+
* Subscribe to suite analytics emitted by shared components. Returns an
|
|
25
|
+
* unsubscribe function. Host apps wire this once in their analytics provider.
|
|
26
|
+
*/
|
|
27
|
+
declare function subscribeSuiteAnalytics(handler: (event: string, properties?: SuiteAnalyticsProperties) => void): () => void;
|
|
28
|
+
|
|
29
|
+
export { SUITE_ANALYTICS_EVENT as S, type SuiteAnalyticsEventDetail as a, type SuiteAnalyticsProperties as b, subscribeSuiteAnalytics as s, trackSuiteEvent as t };
|