@0xsquid/ui 0.7.5 → 0.7.6

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/cjs/index.js CHANGED
@@ -3132,7 +3132,7 @@ function DropdownMenuItem({ label, imageUrl, icon, labelClassName, }) {
3132
3132
  }
3133
3133
 
3134
3134
  function useModal(props) {
3135
- const [isModalOpen, setIsModalOpen] = react.useState(Boolean(void 0 ));
3135
+ const [isModalOpen, setIsModalOpen] = react.useState(Boolean(props === null || props === void 0 ? void 0 : props.initialIsModalOpen));
3136
3136
  const modalRef = react.useRef(null);
3137
3137
  const openModalButtonRef = react.useRef(null);
3138
3138
  react.useEffect(() => {
@@ -3411,7 +3411,7 @@ function getHexColorFromOpacityPercentage(color, opacity) {
3411
3411
 
3412
3412
  function SquidConfigProvider({ theme, children, themeType = 'light', }) {
3413
3413
  const parsedStyle = getParsedStyle(theme);
3414
- return (jsxRuntime.jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: clsx('tw-text-base-content tw-group tw-relative tw-font-geist'), children: children }));
3414
+ return (jsxRuntime.jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: "tw-group tw-relative tw-font-geist", children: children }));
3415
3415
  }
3416
3416
 
3417
3417
  exports.AddressButton = AddressButton;
@@ -3453,3 +3453,4 @@ exports.Switch = Switch;
3453
3453
  exports.TokenPair = TokenPair;
3454
3454
  exports.Tooltip = Tooltip;
3455
3455
  exports.UsdAmount = UsdAmount;
3456
+ exports.useModal = useModal;
@@ -1,4 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './providers';
3
- export * from './providers';
3
+ export * from './hooks';
4
4
  export * from './types';
package/dist/esm/index.js CHANGED
@@ -3130,7 +3130,7 @@ function DropdownMenuItem({ label, imageUrl, icon, labelClassName, }) {
3130
3130
  }
3131
3131
 
3132
3132
  function useModal(props) {
3133
- const [isModalOpen, setIsModalOpen] = useState(Boolean(void 0 ));
3133
+ const [isModalOpen, setIsModalOpen] = useState(Boolean(props === null || props === void 0 ? void 0 : props.initialIsModalOpen));
3134
3134
  const modalRef = useRef(null);
3135
3135
  const openModalButtonRef = useRef(null);
3136
3136
  useEffect(() => {
@@ -3409,7 +3409,7 @@ function getHexColorFromOpacityPercentage(color, opacity) {
3409
3409
 
3410
3410
  function SquidConfigProvider({ theme, children, themeType = 'light', }) {
3411
3411
  const parsedStyle = getParsedStyle(theme);
3412
- return (jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: clsx('tw-text-base-content tw-group tw-relative tw-font-geist'), children: children }));
3412
+ return (jsx("div", { style: parsedStyle, "data-squid-theme-type": themeType, className: "tw-group tw-relative tw-font-geist", children: children }));
3413
3413
  }
3414
3414
 
3415
- export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, ErrorMessage, FeeButton, HeadingText, HistoryItem, Input, ListItem, Menu, MenuItem, Modal, NavigationBar, NumericInput, ProductCard, SectionTitle, SettingsButton, SettingsItem, SettingsSlider, SquidConfigProvider, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, UsdAmount };
3415
+ export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, ErrorMessage, FeeButton, HeadingText, HistoryItem, Input, ListItem, Menu, MenuItem, Modal, NavigationBar, NumericInput, ProductCard, SectionTitle, SettingsButton, SettingsItem, SettingsSlider, SquidConfigProvider, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, UsdAmount, useModal };
@@ -1,4 +1,4 @@
1
1
  export * from './components';
2
2
  export * from './providers';
3
- export * from './providers';
3
+ export * from './hooks';
4
4
  export * from './types';
package/dist/index.d.ts CHANGED
@@ -411,4 +411,14 @@ declare function SquidConfigProvider({ theme, children, themeType, }: {
411
411
  themeType?: ThemeType;
412
412
  }): react_jsx_runtime.JSX.Element;
413
413
 
414
- export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, ErrorMessage, FeeButton, HeadingText, HistoryItem, Input, ListItem, Menu, MenuItem, Modal, NavigationBar, NumericInput, ProductCard, SectionTitle, SettingsButton, type SettingsButtonProps, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, SquidConfigProvider, type SquidTheme, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, type TooltipThreshold, type TooltipWidth, UsdAmount };
414
+ declare function useModal(props?: {
415
+ initialIsModalOpen?: boolean;
416
+ }): {
417
+ isModalOpen: boolean;
418
+ openModal: () => void;
419
+ closeModal: () => void;
420
+ modalRef: React.RefObject<HTMLDivElement>;
421
+ openModalButtonRef: React.RefObject<HTMLButtonElement>;
422
+ };
423
+
424
+ export { AddressButton, ArrowButton, AssetsButton, BadgeImage, BodyText, Boost, BoostButton, Button, CaptionText, Chip, DetailsToolbar, DropdownMenu, DropdownMenuItem, type DropdownMenuItemProps, ErrorMessage, FeeButton, HeadingText, HistoryItem, Input, ListItem, Menu, MenuItem, Modal, NavigationBar, NumericInput, ProductCard, SectionTitle, SettingsButton, type SettingsButtonProps, SettingsItem, type SettingsItemProps, SettingsSlider, type SettingsSliderProps, SquidConfigProvider, type SquidTheme, SwapConfiguration, SwapDetailListItem, SwapProgressViewHeader, SwapStepItem, SwapStepsCollapsed, Switch, TokenPair, Tooltip, type TooltipThreshold, type TooltipWidth, UsdAmount, useModal };
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "url": "git+https://github.com/0xsquid/squid-ui.git"
6
6
  },
7
7
  "description": "Squid's UI components",
8
- "version": "0.7.5",
8
+ "version": "0.7.6",
9
9
  "author": "",
10
10
  "license": "MIT",
11
11
  "scripts": {