@liner-fe/prism 2.6.6 → 2.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import { ToastProps } from '@radix-ui/react-toast';
8
8
  import * as _artsy_fresnel_dist_Media from '@artsy/fresnel/dist/Media';
9
9
  import { breakpointOrigin } from '@liner-fe/design-token';
10
10
  import { Popover as Popover$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, RadioGroup, Slider as Slider$1, Select as Select$1, Label as Label$1 } from 'radix-ui';
11
+ import * as recoil from 'recoil';
11
12
  import * as PopoverPrimitive from '@radix-ui/react-popover';
12
13
  import { PopoverProps, PopoverPortalProps } from '@radix-ui/react-popover';
13
14
  import { ImageProps } from 'next/image';
@@ -504,6 +505,11 @@ type SnackbarPropWithId = SnackbarProp & {
504
505
  declare const Snackbar: () => react_jsx_runtime.JSX.Element;
505
506
  declare const SingleSnackbar: (props: SnackbarPropWithId) => react_jsx_runtime.JSX.Element;
506
507
 
508
+ declare const snackbarAtom: recoil.RecoilState<SnackbarPropWithId[]>;
509
+ declare const useSnackbar: () => {
510
+ open: (info: SnackbarProp) => void;
511
+ };
512
+
507
513
  declare const defaultLabelVariants: (props?: ({
508
514
  level?: "primary" | "secondary" | undefined;
509
515
  position?: "top" | "right" | undefined;
@@ -675,4 +681,4 @@ interface TagProps extends Omit<IPropsNormalBold, 'type' | 'size' | 'weight'> {
675
681
  }
676
682
  declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLParagraphElement>>;
677
683
 
678
- export { type BaseCoachMarkContentProps, type BasicColorType, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, DefaultButton, type DefaultButtonProps, Display, type FillFalseLevelType, type FillLevelType, type FillType, Heading, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, Icon, IconButton, type IconButtonLevelType, type IconButtonProps, type IconColorType, type IconComponent, type IconComponentProps, type IconKey, type IconMapType, type IconProps, type IconSizeKey, type IconSizeType, type ItemProps, Label, List, Loading, Logo, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps, Radio, Select, type SelectItemProps, type SelectProps, SingleSnackbar, Slider, Snackbar, Tag, TextButton, type TextButtonProps, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, Toaster, Tooltip, Typography, arrayToStyleObject, getIconComponent, iconKeyOptions, iconMap, isEmptyObject, objectToArray, rootMediaStyle, useToast };
684
+ export { type BaseCoachMarkContentProps, type BasicColorType, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, DefaultButton, type DefaultButtonProps, Display, type FillFalseLevelType, type FillLevelType, type FillType, Heading, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, Icon, IconButton, type IconButtonLevelType, type IconButtonProps, type IconColorType, type IconComponent, type IconComponentProps, type IconKey, type IconMapType, type IconProps, type IconSizeKey, type IconSizeType, type ItemProps, Label, List, Loading, Logo, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps, Radio, Select, type SelectItemProps, type SelectProps, SingleSnackbar, Slider, Snackbar, Tag, TextButton, type TextButtonProps, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, Toaster, Tooltip, Typography, arrayToStyleObject, getIconComponent, iconKeyOptions, iconMap, isEmptyObject, objectToArray, rootMediaStyle, snackbarAtom, useSnackbar, useToast };
package/lib/index.js CHANGED
@@ -69,6 +69,8 @@ __export(index_exports, {
69
69
  isEmptyObject: () => isEmptyObject,
70
70
  objectToArray: () => objectToArray,
71
71
  rootMediaStyle: () => rootMediaStyle,
72
+ snackbarAtom: () => snackbarAtom,
73
+ useSnackbar: () => useSnackbar,
72
74
  useToast: () => useToast
73
75
  });
74
76
  module.exports = __toCommonJS(index_exports);
@@ -17632,6 +17634,15 @@ var snackbarAtom = (0, import_recoil3.atom)({
17632
17634
  key: "snackbarAtom",
17633
17635
  default: []
17634
17636
  });
17637
+ var useSnackbar = /* @__PURE__ */ __name(() => {
17638
+ const setSnackbar = (0, import_recoil3.useSetRecoilState)(snackbarAtom);
17639
+ return {
17640
+ open: /* @__PURE__ */ __name((info) => {
17641
+ const snackbarId = generateRandomId();
17642
+ setSnackbar((prev) => [...prev, { ...info, snackbarId }]);
17643
+ }, "open")
17644
+ };
17645
+ }, "useSnackbar");
17635
17646
 
17636
17647
  // src/components/Snackbar/SnackbarIcon/style.module.scss
17637
17648
  var style_module_default18 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liner-fe/prism",
3
- "version": "2.6.6",
3
+ "version": "2.6.7",
4
4
  "scripts": {
5
5
  "dev": "next dev",
6
6
  "start": "next start",