@moser-inc/moser-labs-react 7.1.3 → 7.2.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/index.d.ts CHANGED
@@ -159,6 +159,28 @@ declare const LabsMain: <TDirectoryValue extends DirectoryValueBase = DirectoryV
159
159
  ...rest
160
160
  }: LabsMainProps<TDirectoryValue>) => react_jsx_runtime0.JSX.Element;
161
161
  //#endregion
162
+ //#region src/components/LabsMainHeader.d.ts
163
+ interface LabsMainHeaderProps extends ComponentProps<'div'> {
164
+ title: string;
165
+ prepend?: ReactNode;
166
+ titleContent?: ReactNode;
167
+ prependTitle?: ReactNode;
168
+ appendTitle?: ReactNode;
169
+ append?: ReactNode;
170
+ actions?: ReactNode;
171
+ }
172
+ declare const LabsMainHeader: ({
173
+ title,
174
+ prepend,
175
+ titleContent,
176
+ prependTitle,
177
+ appendTitle,
178
+ append,
179
+ actions,
180
+ className,
181
+ ...rest
182
+ }: LabsMainHeaderProps) => react_jsx_runtime0.JSX.Element;
183
+ //#endregion
162
184
  //#region src/components/LabsMenuNav.d.ts
163
185
  interface LabsMenuNavProps<TDirectoryValue extends DirectoryValueBase = DirectoryValueBase> extends MenuProps {
164
186
  items: Readonly<TDirectoryValue[]>;
@@ -20651,17 +20673,28 @@ type ControllerRenderParams<TValues extends FieldValues = FieldValues, TName ext
20651
20673
  };
20652
20674
  //#endregion
20653
20675
  //#region src/utils/animations.d.ts
20654
- declare const DEFAULT_TRANSITION_MS = 150;
20676
+ declare const DEFAULT_TRANSITION_MS = 100;
20655
20677
  declare const DEFAULT_TRANSITION_SECONDS: number;
20678
+ declare const DEFAULT_TRANSITION: {
20679
+ readonly duration: number;
20680
+ };
20656
20681
  declare const fadeAnimation: {
20657
20682
  readonly transition: {
20658
20683
  readonly duration: number;
20659
20684
  };
20660
20685
  readonly variants: {
20661
20686
  readonly enter: {
20687
+ readonly transition: {
20688
+ readonly ease: "easeOut";
20689
+ readonly duration: number;
20690
+ };
20662
20691
  readonly opacity: 1;
20663
20692
  };
20664
20693
  readonly exit: {
20694
+ readonly transition: {
20695
+ readonly ease: "easeIn";
20696
+ readonly duration: number;
20697
+ };
20665
20698
  readonly opacity: 0;
20666
20699
  };
20667
20700
  };
@@ -20675,10 +20708,18 @@ declare const slideYFadeAnimation: {
20675
20708
  };
20676
20709
  readonly variants: {
20677
20710
  readonly enter: {
20711
+ readonly transition: {
20712
+ readonly ease: "easeOut";
20713
+ readonly duration: number;
20714
+ };
20678
20715
  readonly y: "0rem";
20679
20716
  readonly opacity: 1;
20680
20717
  };
20681
20718
  readonly exit: {
20719
+ readonly transition: {
20720
+ readonly ease: "easeIn";
20721
+ readonly duration: number;
20722
+ };
20682
20723
  readonly y: "-0.25rem";
20683
20724
  readonly opacity: 0;
20684
20725
  };
@@ -20693,10 +20734,18 @@ declare const slideYFadeReverseAnimation: {
20693
20734
  };
20694
20735
  readonly variants: {
20695
20736
  readonly enter: {
20737
+ readonly transition: {
20738
+ readonly ease: "easeOut";
20739
+ readonly duration: number;
20740
+ };
20696
20741
  readonly y: "0rem";
20697
20742
  readonly opacity: 1;
20698
20743
  };
20699
20744
  readonly exit: {
20745
+ readonly transition: {
20746
+ readonly ease: "easeIn";
20747
+ readonly duration: number;
20748
+ };
20700
20749
  readonly y: "0.25rem";
20701
20750
  readonly opacity: 0;
20702
20751
  };
@@ -20711,10 +20760,18 @@ declare const scaleFadeAnimation: {
20711
20760
  };
20712
20761
  readonly variants: {
20713
20762
  readonly enter: {
20763
+ readonly transition: {
20764
+ readonly ease: "easeOut";
20765
+ readonly duration: number;
20766
+ };
20714
20767
  readonly scale: 1;
20715
20768
  readonly opacity: 1;
20716
20769
  };
20717
20770
  readonly exit: {
20771
+ readonly transition: {
20772
+ readonly ease: "easeIn";
20773
+ readonly duration: number;
20774
+ };
20718
20775
  readonly scale: 0;
20719
20776
  readonly opacity: 0;
20720
20777
  };
@@ -20729,10 +20786,18 @@ declare const scaleFadeSubtleAnimation: {
20729
20786
  };
20730
20787
  readonly variants: {
20731
20788
  readonly enter: {
20789
+ readonly transition: {
20790
+ readonly ease: "easeOut";
20791
+ readonly duration: number;
20792
+ };
20732
20793
  readonly scale: 1;
20733
20794
  readonly opacity: 1;
20734
20795
  };
20735
20796
  readonly exit: {
20797
+ readonly transition: {
20798
+ readonly ease: "easeIn";
20799
+ readonly duration: number;
20800
+ };
20736
20801
  readonly scale: 0.98;
20737
20802
  readonly opacity: 0;
20738
20803
  };
@@ -20900,4 +20965,4 @@ declare const toLabsTextareaProps: <TValues extends FieldValues = FieldValues, T
20900
20965
  name: TName;
20901
20966
  };
20902
20967
  //#endregion
20903
- export { ControllerRenderParams, DEFAULT_TRANSITION_MS, DEFAULT_TRANSITION_SECONDS, DirectoryValueBase, KeycloakUser, LabsAnalyticsContext, LabsAnalyticsInstance, LabsAnalyticsProvider, LabsAnalyticsProviderProps, LabsAuthContext, LabsAuthContextValue, LabsAuthGate, LabsAuthGateProps, LabsAuthProvider, LabsAuthProviderProps, LabsButton, LabsButtonProps, LabsCalendar, LabsCalendarBase, LabsCalendarProps, LabsCheckbox, LabsCheckboxProps, LabsContext, LabsContextValue, LabsCount, LabsDate, LabsDateProps, LabsEmpty, LabsEmptyProps, LabsHeadProvider, LabsHeadProviderProps, LabsLoader, LabsLoaderProps, LabsLogoutTimer, LabsLogoutTimerProps, LabsMain, LabsMainDesktopNav, LabsMainDesktopNavProps, LabsMainHeaderActions, LabsMainMobileNav, LabsMainMobileNavProps, LabsMainProps, LabsMenuNav, LabsMenuNavProps, LabsMultiSelect, LabsMultiSelectChangeEvent, LabsMultiSelectOption, LabsMultiSelectProps, LabsPrimeProvider, LabsPrimeProviderProps, LabsProvider, LabsProviderProps, LabsSelect, LabsSelectCascade, LabsSelectCascadeOption, LabsSelectCascadeProps, LabsSelectOption, LabsSelectProps, LabsSpeedDialNav, LabsSpeedDialNavProps, LabsText, LabsTextCurrency, LabsTextCurrencyProps, LabsTextElement, LabsTextProps, LabsTextSearch, LabsTextSearchProps, LabsTextarea, LabsTextareaElement, LabsTextareaProps, LabsToggle, LabsToggleProps, LayoutBase, LayoutBaseProps, LayoutCentered, LayoutCenteredProps, LayoutMain, LayoutMainProps, Role, VERSION, auth, fadeAnimation, getParsedUserInfo, pluralize, refreshToken, scaleFadeAnimation, scaleFadeSubtleAnimation, slideYFadeAnimation, slideYFadeReverseAnimation, toCurrency, toFieldContainerProps, toLabsCheckboxProps, toLabsDateProps, toLabsMultiSelectProps, toLabsSelectCascadeProps, toLabsSelectProps, toLabsTextCurrencyProps, toLabsTextProps, toLabsTextSearchProps, toLabsTextareaProps, toPrecision, useAnalytics, useAuth, useBreakpoints, useLabs, withAuthHeader };
20968
+ export { ControllerRenderParams, DEFAULT_TRANSITION, DEFAULT_TRANSITION_MS, DEFAULT_TRANSITION_SECONDS, DirectoryValueBase, KeycloakUser, LabsAnalyticsContext, LabsAnalyticsInstance, LabsAnalyticsProvider, LabsAnalyticsProviderProps, LabsAuthContext, LabsAuthContextValue, LabsAuthGate, LabsAuthGateProps, LabsAuthProvider, LabsAuthProviderProps, LabsButton, LabsButtonProps, LabsCalendar, LabsCalendarBase, LabsCalendarProps, LabsCheckbox, LabsCheckboxProps, LabsContext, LabsContextValue, LabsCount, LabsDate, LabsDateProps, LabsEmpty, LabsEmptyProps, LabsHeadProvider, LabsHeadProviderProps, LabsLoader, LabsLoaderProps, LabsLogoutTimer, LabsLogoutTimerProps, LabsMain, LabsMainDesktopNav, LabsMainDesktopNavProps, LabsMainHeader, LabsMainHeaderActions, LabsMainHeaderProps, LabsMainMobileNav, LabsMainMobileNavProps, LabsMainProps, LabsMenuNav, LabsMenuNavProps, LabsMultiSelect, LabsMultiSelectChangeEvent, LabsMultiSelectOption, LabsMultiSelectProps, LabsPrimeProvider, LabsPrimeProviderProps, LabsProvider, LabsProviderProps, LabsSelect, LabsSelectCascade, LabsSelectCascadeOption, LabsSelectCascadeProps, LabsSelectOption, LabsSelectProps, LabsSpeedDialNav, LabsSpeedDialNavProps, LabsText, LabsTextCurrency, LabsTextCurrencyProps, LabsTextElement, LabsTextProps, LabsTextSearch, LabsTextSearchProps, LabsTextarea, LabsTextareaElement, LabsTextareaProps, LabsToggle, LabsToggleProps, LayoutBase, LayoutBaseProps, LayoutCentered, LayoutCenteredProps, LayoutMain, LayoutMainProps, Role, VERSION, auth, fadeAnimation, getParsedUserInfo, pluralize, refreshToken, scaleFadeAnimation, scaleFadeSubtleAnimation, slideYFadeAnimation, slideYFadeReverseAnimation, toCurrency, toFieldContainerProps, toLabsCheckboxProps, toLabsDateProps, toLabsMultiSelectProps, toLabsSelectCascadeProps, toLabsSelectProps, toLabsTextCurrencyProps, toLabsTextProps, toLabsTextSearchProps, toLabsTextareaProps, toPrecision, useAnalytics, useAuth, useBreakpoints, useLabs, withAuthHeader };
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import { InputTextarea } from "primereact/inputtextarea";
29
29
  import { Panel } from "primereact/panel";
30
30
  //#endregion
31
31
  //#region src/constants/app.ts
32
- const VERSION = "7.1.3";
32
+ const VERSION = "7.2.0";
33
33
  //#endregion
34
34
  //#region src/lib/head/headContext.tsx
35
35
  const head = createHead();
@@ -376,27 +376,47 @@ const FieldContainerLabel = ({ id, labelId = `${id}-label`, label, solo = false,
376
376
  };
377
377
  //#endregion
378
378
  //#region src/utils/animations.ts
379
- const DEFAULT_TRANSITION_MS = 150;
380
- const DEFAULT_TRANSITION_SECONDS = 150 / 1e3;
381
- const transition = { duration: DEFAULT_TRANSITION_SECONDS };
379
+ const DEFAULT_TRANSITION_MS = 100;
380
+ const DEFAULT_TRANSITION_SECONDS = 100 / 1e3;
381
+ const DEFAULT_TRANSITION = { duration: DEFAULT_TRANSITION_SECONDS };
382
382
  const fadeAnimation = {
383
- transition,
383
+ transition: DEFAULT_TRANSITION,
384
384
  variants: {
385
- enter: { opacity: 1 },
386
- exit: { opacity: 0 }
385
+ enter: {
386
+ transition: {
387
+ ...DEFAULT_TRANSITION,
388
+ ease: "easeOut"
389
+ },
390
+ opacity: 1
391
+ },
392
+ exit: {
393
+ transition: {
394
+ ...DEFAULT_TRANSITION,
395
+ ease: "easeIn"
396
+ },
397
+ opacity: 0
398
+ }
387
399
  },
388
400
  initial: "exit",
389
401
  animate: "enter",
390
402
  exit: "exit"
391
403
  };
392
404
  const slideYFadeAnimation = {
393
- transition,
405
+ transition: DEFAULT_TRANSITION,
394
406
  variants: {
395
407
  enter: {
408
+ transition: {
409
+ ...DEFAULT_TRANSITION,
410
+ ease: "easeOut"
411
+ },
396
412
  y: "0rem",
397
413
  opacity: 1
398
414
  },
399
415
  exit: {
416
+ transition: {
417
+ ...DEFAULT_TRANSITION,
418
+ ease: "easeIn"
419
+ },
400
420
  y: "-0.25rem",
401
421
  opacity: 0
402
422
  }
@@ -406,13 +426,21 @@ const slideYFadeAnimation = {
406
426
  exit: "exit"
407
427
  };
408
428
  const slideYFadeReverseAnimation = {
409
- transition,
429
+ transition: DEFAULT_TRANSITION,
410
430
  variants: {
411
431
  enter: {
432
+ transition: {
433
+ ...DEFAULT_TRANSITION,
434
+ ease: "easeOut"
435
+ },
412
436
  y: "0rem",
413
437
  opacity: 1
414
438
  },
415
439
  exit: {
440
+ transition: {
441
+ ...DEFAULT_TRANSITION,
442
+ ease: "easeIn"
443
+ },
416
444
  y: "0.25rem",
417
445
  opacity: 0
418
446
  }
@@ -422,13 +450,21 @@ const slideYFadeReverseAnimation = {
422
450
  exit: "exit"
423
451
  };
424
452
  const scaleFadeAnimation = {
425
- transition,
453
+ transition: DEFAULT_TRANSITION,
426
454
  variants: {
427
455
  enter: {
456
+ transition: {
457
+ ...DEFAULT_TRANSITION,
458
+ ease: "easeOut"
459
+ },
428
460
  scale: 1,
429
461
  opacity: 1
430
462
  },
431
463
  exit: {
464
+ transition: {
465
+ ...DEFAULT_TRANSITION,
466
+ ease: "easeIn"
467
+ },
432
468
  scale: 0,
433
469
  opacity: 0
434
470
  }
@@ -438,13 +474,21 @@ const scaleFadeAnimation = {
438
474
  exit: "exit"
439
475
  };
440
476
  const scaleFadeSubtleAnimation = {
441
- transition,
477
+ transition: DEFAULT_TRANSITION,
442
478
  variants: {
443
479
  enter: {
480
+ transition: {
481
+ ...DEFAULT_TRANSITION,
482
+ ease: "easeOut"
483
+ },
444
484
  scale: 1,
445
485
  opacity: 1
446
486
  },
447
487
  exit: {
488
+ transition: {
489
+ ...DEFAULT_TRANSITION,
490
+ ease: "easeIn"
491
+ },
448
492
  scale: .98,
449
493
  opacity: 0
450
494
  }
@@ -662,6 +706,36 @@ const LabsMain = ({ item, className, children, ...rest }) => {
662
706
  });
663
707
  };
664
708
  //#endregion
709
+ //#region src/components/LabsMainHeader.tsx
710
+ const LabsMainHeader = ({ title, prepend, titleContent, prependTitle, appendTitle, append, actions, className, ...rest }) => {
711
+ return /* @__PURE__ */ jsxs("div", {
712
+ className: clsx(className, "labs-main-header"),
713
+ ...rest,
714
+ children: [/* @__PURE__ */ jsxs("div", {
715
+ className: "labs-main-header-content",
716
+ children: [
717
+ prepend,
718
+ titleContent ?? /* @__PURE__ */ jsxs("div", {
719
+ className: "labs-main-header-title-content",
720
+ children: [
721
+ prependTitle,
722
+ /* @__PURE__ */ jsx("h2", {
723
+ title,
724
+ className: "labs-main-header-title",
725
+ children: title
726
+ }),
727
+ appendTitle
728
+ ]
729
+ }),
730
+ append
731
+ ]
732
+ }), actions ? /* @__PURE__ */ jsx("div", {
733
+ className: "labs-main-header-actions",
734
+ children: actions
735
+ }) : null]
736
+ });
737
+ };
738
+ //#endregion
665
739
  //#region src/components/LabsMenuNav.tsx
666
740
  const LabsMenuNav = ({ items, renderItem, model, role = "navigation", ...rest }) => {
667
741
  const modelItems = useMemo(() => items.map(renderItem), [items, renderItem]);
@@ -1101,4 +1175,4 @@ const toLabsTextareaProps = ({ field: { ref, value, ...field }, fieldState }) =>
1101
1175
  value
1102
1176
  });
1103
1177
  //#endregion
1104
- export { DEFAULT_TRANSITION_MS, DEFAULT_TRANSITION_SECONDS, LabsAnalyticsContext, LabsAnalyticsProvider, LabsAuthContext, LabsAuthGate, LabsAuthProvider, LabsButton, LabsCalendar, LabsCalendarBase, LabsCheckbox, LabsContext, LabsCount, LabsDate, LabsEmpty, LabsHeadProvider, LabsLoader, LabsLogoutTimer, LabsMain, LabsMainDesktopNav, LabsMainHeaderActions, LabsMainMobileNav, LabsMenuNav, LabsMultiSelect, LabsPrimeProvider, LabsProvider, LabsSelect, LabsSelectCascade, LabsSpeedDialNav, LabsText, LabsTextCurrency, LabsTextSearch, LabsTextarea, LabsToggle, LayoutBase, LayoutCentered, LayoutMain, VERSION, auth, fadeAnimation, getParsedUserInfo, pluralize, refreshToken, scaleFadeAnimation, scaleFadeSubtleAnimation, slideYFadeAnimation, slideYFadeReverseAnimation, toCurrency, toFieldContainerProps, toLabsCheckboxProps, toLabsDateProps, toLabsMultiSelectProps, toLabsSelectCascadeProps, toLabsSelectProps, toLabsTextCurrencyProps, toLabsTextProps, toLabsTextSearchProps, toLabsTextareaProps, toPrecision, useAnalytics, useAuth, useBreakpoints, useLabs, withAuthHeader };
1178
+ export { DEFAULT_TRANSITION, DEFAULT_TRANSITION_MS, DEFAULT_TRANSITION_SECONDS, LabsAnalyticsContext, LabsAnalyticsProvider, LabsAuthContext, LabsAuthGate, LabsAuthProvider, LabsButton, LabsCalendar, LabsCalendarBase, LabsCheckbox, LabsContext, LabsCount, LabsDate, LabsEmpty, LabsHeadProvider, LabsLoader, LabsLogoutTimer, LabsMain, LabsMainDesktopNav, LabsMainHeader, LabsMainHeaderActions, LabsMainMobileNav, LabsMenuNav, LabsMultiSelect, LabsPrimeProvider, LabsProvider, LabsSelect, LabsSelectCascade, LabsSpeedDialNav, LabsText, LabsTextCurrency, LabsTextSearch, LabsTextarea, LabsToggle, LayoutBase, LayoutCentered, LayoutMain, VERSION, auth, fadeAnimation, getParsedUserInfo, pluralize, refreshToken, scaleFadeAnimation, scaleFadeSubtleAnimation, slideYFadeAnimation, slideYFadeReverseAnimation, toCurrency, toFieldContainerProps, toLabsCheckboxProps, toLabsDateProps, toLabsMultiSelectProps, toLabsSelectCascadeProps, toLabsSelectProps, toLabsTextCurrencyProps, toLabsTextProps, toLabsTextSearchProps, toLabsTextareaProps, toPrecision, useAnalytics, useAuth, useBreakpoints, useLabs, withAuthHeader };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moser-inc/moser-labs-react",
3
- "version": "7.1.3",
3
+ "version": "7.2.0",
4
4
  "description": "React components for the Moser Labs suite of applications.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Moser Consulting",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@analytics/mixpanel": "^0.4.0",
39
- "@moser-inc/moser-labs-custom-elements": "3.1.5",
39
+ "@moser-inc/moser-labs-custom-elements": "3.1.6",
40
40
  "@react-hookz/web": "^25.2.0",
41
41
  "analytics": "^0.8.19",
42
42
  "clsx": "^2.1.1",
@@ -49,7 +49,7 @@
49
49
  "@hookform/resolvers": "^5.2.2",
50
50
  "@moser-inc/eslint-config-react": "^5.1.5",
51
51
  "@moser-inc/moser-labs-themes": "1.4.3",
52
- "@moser-inc/unocss-preset-moser-labs": "6.3.7",
52
+ "@moser-inc/unocss-preset-moser-labs": "6.4.0",
53
53
  "@tsconfig/node24": "^24.0.4",
54
54
  "@tsconfig/vite-react": "^7.0.2",
55
55
  "@types/node": "~24.10.15",