@itcase/ui 1.8.112 → 1.8.113

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.
@@ -3,6 +3,7 @@
3
3
  var tslib_es6 = require('../../tslib.es6_cjs_CCZ3TN_7.js');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var React = require('react');
6
+ var clsx = require('clsx');
6
7
  var reactModalSheet = require('react-modal-sheet');
7
8
  var useAppearanceConfig = require('../hooks/useAppearanceConfig/useAppearanceConfig.js');
8
9
  var useDevicePropsGenerator = require('../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js');
@@ -21,7 +22,6 @@ require('../utils/setViewportProperty.js');
21
22
  require('../hooks.js');
22
23
  require('../hooks/useStyles/styleAttributes.js');
23
24
  require('lodash/maxBy');
24
- require('clsx');
25
25
  require('react-inlinesvg');
26
26
  require('../hoc/urlWithAssetPrefix.js');
27
27
  require('../context/UrlAssetPrefix.js');
@@ -63,10 +63,10 @@ var ModalSheetBottom = React.forwardRef(function Modal(props, ref) {
63
63
  }); }, [isOpen, openModalSheetBottom, closeModalSheetBottom]);
64
64
  var appearanceConfig = useAppearanceConfig.useAppearanceConfig(appearance, modalSheetBottomConfig, isDisabled);
65
65
  var propsGenerator = useDevicePropsGenerator.useDevicePropsGenerator(props, appearanceConfig);
66
- var titleTextColor = propsGenerator.titleTextColor, titleTextColorHover = propsGenerator.titleTextColorHover, titleTextSize = propsGenerator.titleTextSize, titleTextTruncate = propsGenerator.titleTextTruncate, titleTextWeight = propsGenerator.titleTextWeight, titleTextWidth = propsGenerator.titleTextWidth, titleTextWrap = propsGenerator.titleTextWrap;
66
+ var titleTextColor = propsGenerator.titleTextColor, titleTextColorHover = propsGenerator.titleTextColorHover, titleTextSize = propsGenerator.titleTextSize, titleTextTruncate = propsGenerator.titleTextTruncate, titleTextWeight = propsGenerator.titleTextWeight, titleTextWidth = propsGenerator.titleTextWidth, titleTextWrap = propsGenerator.titleTextWrap, zeroPadding = propsGenerator.zeroPadding;
67
67
  // @ts-expect-error
68
68
  var styles = useStyles.useStyles(props).styles;
69
- return (jsxRuntime.jsxs(reactModalSheet.Sheet, tslib_es6.__assign({ dataTestId: dataTestId, dataTour: dataTour, className: "modal-sheet-bottom", isOpen: isOpen, onClose: closeModalSheetBottom }, props, { children: [jsxRuntime.jsxs(reactModalSheet.Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [jsxRuntime.jsx(reactModalSheet.Sheet.Header, { className: "modal-sheet-bottom__header" }), (closeButton || title) && (jsxRuntime.jsxs("div", { className: "modal-sheet-bottom__header", children: [title && (jsxRuntime.jsx(Icon.Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), jsxRuntime.jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })] })), jsxRuntime.jsx(reactModalSheet.Sheet.Content, { className: "modal-sheet-bottom__content", children: jsxRuntime.jsx("div", { className: "modal-sheet-bottom__content-wrapper", children: children }) })] }), jsxRuntime.jsx(reactModalSheet.Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] })));
69
+ return (jsxRuntime.jsxs(reactModalSheet.Sheet, tslib_es6.__assign({ dataTestId: dataTestId, dataTour: dataTour, className: "modal-sheet-bottom", isOpen: isOpen, onClose: closeModalSheetBottom }, props, { children: [jsxRuntime.jsxs(reactModalSheet.Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [jsxRuntime.jsx(reactModalSheet.Sheet.Header, { className: "modal-sheet-bottom__header" }), (closeButton || title) && (jsxRuntime.jsxs("div", { className: "modal-sheet-bottom__header", children: [title && (jsxRuntime.jsx(Icon.Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), jsxRuntime.jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })] })), jsxRuntime.jsx(reactModalSheet.Sheet.Content, { className: clsx('modal-sheet-bottom__content', zeroPadding && 'modal-sheet-bottom-padding'), children: jsxRuntime.jsx("div", { className: "modal-sheet-bottom__content-wrapper", children: children }) })] }), jsxRuntime.jsx(reactModalSheet.Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] })));
70
70
  });
71
71
 
72
72
  exports.ModalSheetBottom = ModalSheetBottom;
@@ -1,6 +1,7 @@
1
1
  import { _ as __assign } from '../tslib.es6_es_Bwu1Cn-t.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import React, { useState, useCallback, useImperativeHandle } from 'react';
4
+ import clsx from 'clsx';
4
5
  import { Sheet } from 'react-modal-sheet';
5
6
  import { useAppearanceConfig } from '../hooks/useAppearanceConfig/useAppearanceConfig.js';
6
7
  import { useDevicePropsGenerator } from '../hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
@@ -19,7 +20,6 @@ import '../utils/setViewportProperty.js';
19
20
  import '../hooks.js';
20
21
  import '../hooks/useStyles/styleAttributes.js';
21
22
  import 'lodash/maxBy';
22
- import 'clsx';
23
23
  import 'react-inlinesvg';
24
24
  import '../hoc/urlWithAssetPrefix.js';
25
25
  import '../context/UrlAssetPrefix.js';
@@ -61,10 +61,10 @@ var ModalSheetBottom = React.forwardRef(function Modal(props, ref) {
61
61
  }); }, [isOpen, openModalSheetBottom, closeModalSheetBottom]);
62
62
  var appearanceConfig = useAppearanceConfig(appearance, modalSheetBottomConfig, isDisabled);
63
63
  var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
64
- var titleTextColor = propsGenerator.titleTextColor, titleTextColorHover = propsGenerator.titleTextColorHover, titleTextSize = propsGenerator.titleTextSize, titleTextTruncate = propsGenerator.titleTextTruncate, titleTextWeight = propsGenerator.titleTextWeight, titleTextWidth = propsGenerator.titleTextWidth, titleTextWrap = propsGenerator.titleTextWrap;
64
+ var titleTextColor = propsGenerator.titleTextColor, titleTextColorHover = propsGenerator.titleTextColorHover, titleTextSize = propsGenerator.titleTextSize, titleTextTruncate = propsGenerator.titleTextTruncate, titleTextWeight = propsGenerator.titleTextWeight, titleTextWidth = propsGenerator.titleTextWidth, titleTextWrap = propsGenerator.titleTextWrap, zeroPadding = propsGenerator.zeroPadding;
65
65
  // @ts-expect-error
66
66
  var styles = useStyles(props).styles;
67
- return (jsxs(Sheet, __assign({ dataTestId: dataTestId, dataTour: dataTour, className: "modal-sheet-bottom", isOpen: isOpen, onClose: closeModalSheetBottom }, props, { children: [jsxs(Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [jsx(Sheet.Header, { className: "modal-sheet-bottom__header" }), (closeButton || title) && (jsxs("div", { className: "modal-sheet-bottom__header", children: [title && (jsx(Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })] })), jsx(Sheet.Content, { className: "modal-sheet-bottom__content", children: jsx("div", { className: "modal-sheet-bottom__content-wrapper", children: children }) })] }), jsx(Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] })));
67
+ return (jsxs(Sheet, __assign({ dataTestId: dataTestId, dataTour: dataTour, className: "modal-sheet-bottom", isOpen: isOpen, onClose: closeModalSheetBottom }, props, { children: [jsxs(Sheet.Container, { className: "modal-sheet-bottom__container", style: styles, children: [jsx(Sheet.Header, { className: "modal-sheet-bottom__header" }), (closeButton || title) && (jsxs("div", { className: "modal-sheet-bottom__header", children: [title && (jsx(Title, { className: "modal__title", width: titleTextWidth, size: titleTextSize, textColor: titleTextColor, textColorHover: titleTextColorHover, textTruncate: titleTextTruncate, textWeight: titleTextWeight, textWrap: titleTextWrap, children: title })), jsx("div", { className: "modal-sheet-bottom__close", onClick: closeModalSheetBottom, children: closeButton })] })), jsx(Sheet.Content, { className: clsx('modal-sheet-bottom__content', zeroPadding && 'modal-sheet-bottom-padding'), children: jsx("div", { className: "modal-sheet-bottom__content-wrapper", children: children }) })] }), jsx(Sheet.Backdrop, { className: "modal-sheet-bottom__backdrop", onClick: closeModalSheetBottom })] })));
68
68
  });
69
69
 
70
70
  export { ModalSheetBottom, modalSheetBottomAppearance };
@@ -35,6 +35,11 @@
35
35
  right: 8px;
36
36
  }
37
37
  }
38
+
39
+ .modal-sheet-bottom-padding {
40
+ padding: 0;
41
+ }
42
+
38
43
  :root {
39
44
  --modal-sheet-bottom-container-border-radius: 0;
40
45
  --modal-sheet-bottom-header-grabber: none;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/ui",
3
- "version": "1.8.112",
3
+ "version": "1.8.113",
4
4
  "description": "UI components (Modal, Loader, Popup, etc)",
5
5
  "keywords": [
6
6
  "Modal",