@semcore/fullscreen-modal 3.49.0-prerelease.9 → 3.49.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/CHANGELOG.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
- ## [3.49.0] - 2025-02-28
5
+ ## [3.49.0] - 2025-03-14
6
6
 
7
- ### Changed
7
+ ### Added
8
8
 
9
- - Version minor update due to children dependencies update (`@semcore/utils` [4.45.1 ~> 4.47.1], `@semcore/icon` [4.57.1 ~> 4.58.0], `@semcore/flex-box` [5.40.1 ~> 5.41.0], `@semcore/button` [5.41.2 ~> 5.42.0], `@semcore/core` [2.38.1 ~> 2.39.0]).
9
+ - Build for ESM.
10
10
 
11
11
  ## [3.48.2] - 2025-02-05
12
12
 
@@ -0,0 +1,180 @@
1
+ import _ from "@babel/runtime/helpers/esm/objectSpread2";
2
+ import z from "@babel/runtime/helpers/esm/classCallCheck";
3
+ import D from "@babel/runtime/helpers/esm/createClass";
4
+ import v from "@babel/runtime/helpers/esm/assertThisInitialized";
5
+ import I from "@babel/runtime/helpers/esm/inherits";
6
+ import O from "@babel/runtime/helpers/esm/createSuper";
7
+ import f from "@babel/runtime/helpers/esm/defineProperty";
8
+ import { sstyled as A } from "@semcore/utils/lib/core/index";
9
+ import R, { sstyled as s, assignProps as g, Component as L } from "@semcore/core";
10
+ import i from "react";
11
+ import p from "@semcore/modal";
12
+ import { Box as m, Flex as $ } from "@semcore/flex-box";
13
+ import j from "@semcore/icon/Close/l";
14
+ import q from "@semcore/icon/ArrowLeft/m";
15
+ import { Text as h } from "@semcore/typography";
16
+ import k from "@semcore/button";
17
+ import N from "@semcore/utils/lib/fire";
18
+ import { localizedMessages as y } from "./translations/__intergalactic-dynamic-locales.mjs";
19
+ import W from "@semcore/utils/lib/enhances/i18nEnhance";
20
+ import G from "@semcore/utils/lib/uniqueID";
21
+ import J from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
22
+ var K = (
23
+ /*__reshadow_css_start__*/
24
+ (A.insert(
25
+ /*__inner_css_start__*/
26
+ '.___SFullscreenOverlay_1k7if_gg_{padding:0}.___SFullscreenModal_1k7if_gg_{height:100%;display:flex;flex-direction:column;width:100%;background:var(--intergalactic-bg-primary-neutral, #ffffff);border-radius:0;padding:0}.___SClose_1k7if_gg_{position:absolute;top:17px;right:24px}.___SBack_1k7if_gg_{cursor:pointer;position:absolute;z-index:1;top:8px;left:32px;display:flex;align-items:center;margin-bottom:var(--intergalactic-spacing-3x, 12px);color:var(--intergalactic-icon-primary-neutral, #6c6e79);font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);background:0 0;padding:0;border:0;outline:0}@media (hover:hover){.___SBack_1k7if_gg_:hover{color:var(--intergalactic-icon-primary-neutral-hover-active, #565861)}}.___SBack_1k7if_gg_.__keyboardFocused_1k7if_gg_{box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5))}.___SBackText_1k7if_gg_{margin-left:var(--intergalactic-spacing-1x, 4px);font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SBackText_1k7if_gg_,.___SDescription_1k7if_gg_,.___STitle_1k7if_gg_{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.___STitle_1k7if_gg_{font-size:var(--intergalactic-fs-500, 24px);line-height:var(--intergalactic-lh-500, 117%);font-weight:var(--intergalactic-bold, 700);color:var(--intergalactic-text-primary, #191b23)}.___SDescription_1k7if_gg_{display:flex;align-items:baseline;font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);color:var(--intergalactic-text-secondary, #6c6e79)}.___SDescription_1k7if_gg_::before{content:"";position:relative;top:var(--intergalactic-spacing-1x, 4px);display:block;margin-left:var(--intergalactic-spacing-3x, 12px);margin-right:var(--intergalactic-spacing-3x, 12px);height:24px;width:1px;background-color:var(--intergalactic-border-primary, #c4c7cf)}.___SHeader_1k7if_gg_{display:flex;align-items:baseline;padding-left:var(--intergalactic-spacing-8x, 32px);padding-bottom:var(--intergalactic-spacing-2x, 8px);padding-right:calc(var(--intergalactic-spacing-20x, 80px) - var(--intergalactic-spacing-2x, 8px));padding-top:var(--intergalactic-spacing-10x, 40px);min-height:76px;box-shadow:inset 0-1px 0 var(--intergalactic-border-primary, #c4c7cf);box-sizing:border-box}.___SFooter_1k7if_gg_{min-height:52px;box-shadow:inset 0 1px 1px 0 var(--intergalactic-border-primary, #c4c7cf);box-sizing:border-box}.___SBody_1k7if_gg_{display:flex;height:100%;overflow:auto}.___SSection_1k7if_gg_{padding-top:var(--intergalactic-spacing-6x, 24px);padding-bottom:var(--intergalactic-spacing-6x, 24px);padding-left:var(--intergalactic-spacing-8x, 32px);padding-right:var(--intergalactic-spacing-8x, 32px);flex:1 1 auto}@media (prefers-reduced-motion){.___SBackText_1k7if_gg_{transition:none}}',
27
+ "1k7if_gg_"
28
+ ), {
29
+ __SFullscreenOverlay: "___SFullscreenOverlay_1k7if_gg_",
30
+ __SFullscreenModal: "___SFullscreenModal_1k7if_gg_",
31
+ __SClose: "___SClose_1k7if_gg_",
32
+ __SBack: "___SBack_1k7if_gg_",
33
+ _keyboardFocused: "__keyboardFocused_1k7if_gg_",
34
+ __SBackText: "___SBackText_1k7if_gg_",
35
+ __STitle: "___STitle_1k7if_gg_",
36
+ __SDescription: "___SDescription_1k7if_gg_",
37
+ __SHeader: "___SHeader_1k7if_gg_",
38
+ __SFooter: "___SFooter_1k7if_gg_",
39
+ __SBody: "___SBody_1k7if_gg_",
40
+ __SSection: "___SSection_1k7if_gg_"
41
+ })
42
+ ), d = /* @__PURE__ */ function(r) {
43
+ I(e, r);
44
+ var a = O(e);
45
+ function e() {
46
+ var t;
47
+ z(this, e);
48
+ for (var n = arguments.length, o = new Array(n), c = 0; c < n; c++)
49
+ o[c] = arguments[c];
50
+ return t = a.call.apply(a, [this].concat(o)), f(v(t), "state", {
51
+ hasTitle: !1
52
+ }), f(v(t), "bindHandlerClose", function(l) {
53
+ return function(u) {
54
+ N(v(t), "onClose", l, u);
55
+ };
56
+ }), t;
57
+ }
58
+ return D(e, [{
59
+ key: "getCloseProps",
60
+ value: function() {
61
+ var n = this.asProps.getI18nText;
62
+ return {
63
+ onClick: this.bindHandlerClose("onCloseClick"),
64
+ getI18nText: n
65
+ };
66
+ }
67
+ }, {
68
+ key: "getBackProps",
69
+ value: function() {
70
+ return {
71
+ onClick: this.bindHandlerClose("onBackClick")
72
+ };
73
+ }
74
+ }, {
75
+ key: "getTitleProps",
76
+ value: function() {
77
+ var n = this, o = this.asProps.uid, c = function() {
78
+ return n.setState({
79
+ hasTitle: !0
80
+ });
81
+ };
82
+ return {
83
+ id: "igc-".concat(o, "-title"),
84
+ setHasTitle: c
85
+ };
86
+ }
87
+ }, {
88
+ key: "render",
89
+ value: function() {
90
+ var n = this.asProps, o, c = p.Window, l = this.asProps, u = l.styles, C = l.Children, T = l.onClose, B = l.visible, E = l.closable, F = l.duration, P = l.disablePortal, w = l.getI18nText, H = l.uid, S = this.state.hasTitle, M = p.Overlay;
91
+ return o = s(u), /* @__PURE__ */ i.createElement(p, o.cn("Modal", {
92
+ closable: !1,
93
+ visible: B,
94
+ onClose: T,
95
+ duration: F,
96
+ disablePortal: P
97
+ }), /* @__PURE__ */ i.createElement(M, o.cn("SFullscreenOverlay", {}), /* @__PURE__ */ i.createElement(c, o.cn("SFullscreenModal", _({}, g({
98
+ "aria-label": S ? void 0 : w("title"),
99
+ "aria-labelledby": S ? "igc-".concat(H, "-title") : void 0
100
+ }, n))), E && /* @__PURE__ */ i.createElement(x.Close, null), /* @__PURE__ */ i.createElement(C, o.cn("Children", {})))));
101
+ }
102
+ }]), e;
103
+ }(L);
104
+ f(d, "displayName", "FullscreenModal");
105
+ f(d, "style", K);
106
+ f(d, "enhance", [W(y), G()]);
107
+ f(d, "defaultProps", {
108
+ i18n: y,
109
+ locale: "en"
110
+ });
111
+ function Q(r) {
112
+ var a = arguments[0], e, t = m, n = r.Children, o = r.styles, c = r.title, l = r.description;
113
+ return e = s(o), /* @__PURE__ */ i.createElement(t, e.cn("SHeader", _({}, g({}, a))), c && /* @__PURE__ */ i.createElement(x.Title, {
114
+ children: c
115
+ }), l && /* @__PURE__ */ i.createElement(x.Description, {
116
+ children: l
117
+ }), /* @__PURE__ */ i.createElement(n, e.cn("Children", {})));
118
+ }
119
+ function U(r) {
120
+ var a = arguments[0], e, t = m;
121
+ return e = s(r.styles), /* @__PURE__ */ i.createElement(t, e.cn("SBody", _({}, g({}, a))));
122
+ }
123
+ function V(r) {
124
+ var a = arguments[0], e, t = m;
125
+ return e = s(r.styles), /* @__PURE__ */ i.createElement(t, e.cn("SSection", _({}, g({
126
+ tag: "section"
127
+ }, a))));
128
+ }
129
+ function X(r) {
130
+ var a = arguments[0], e, t = $;
131
+ return e = s(r.styles), /* @__PURE__ */ i.createElement(t, e.cn("SFooter", _({}, g({}, a))));
132
+ }
133
+ function Y(r) {
134
+ var a = arguments[0], e, t = k, n = r.getI18nText;
135
+ return e = s(r.styles), /* @__PURE__ */ i.createElement(t, e.cn("SClose", _({}, g({
136
+ use: "tertiary",
137
+ size: "l",
138
+ theme: "muted",
139
+ "aria-label": n("close")
140
+ }, a))), /* @__PURE__ */ i.createElement(k.Addon, {
141
+ ml: "7px",
142
+ mr: "7px"
143
+ }, /* @__PURE__ */ i.createElement(j, e.cn("CloseIcon", {
144
+ title: n("close")
145
+ }))));
146
+ }
147
+ function Z(r) {
148
+ var a = arguments[0], e, t = h, n = r.setHasTitle;
149
+ return i.useEffect(function() {
150
+ return n();
151
+ }), e = s(r.styles), /* @__PURE__ */ i.createElement(t, e.cn("STitle", _({}, g({
152
+ tag: "h2"
153
+ }, a))));
154
+ }
155
+ function ee(r) {
156
+ var a = arguments[0], e, t = h;
157
+ return e = s(r.styles), /* @__PURE__ */ i.createElement(t, e.cn("SDescription", _({}, g({}, a))));
158
+ }
159
+ function b(r) {
160
+ var a = arguments[0], e, t = m, n = h, o = r.Children, c = r.styles;
161
+ return e = s(c), /* @__PURE__ */ i.createElement(t, e.cn("SBack", _({}, g({
162
+ tag: "button"
163
+ }, a))), /* @__PURE__ */ i.createElement(q, e.cn("ArrowLeft", {})), /* @__PURE__ */ i.createElement(n, e.cn("SBackText", {}), /* @__PURE__ */ i.createElement(o, e.cn("Children", {}))));
164
+ }
165
+ b.enhance = [J()];
166
+ var x = R(d, {
167
+ Header: Q,
168
+ Footer: X,
169
+ Close: Y,
170
+ Back: b,
171
+ Body: U,
172
+ Section: V,
173
+ Title: Z,
174
+ Description: ee
175
+ }, {
176
+ parent: p
177
+ });
178
+ export {
179
+ x as default
180
+ };
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./FullscreenModal.mjs";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,33 @@
1
+ import r from "./de.json.mjs";
2
+ import o from "./en.json.mjs";
3
+ import m from "./es.json.mjs";
4
+ import t from "./fr.json.mjs";
5
+ import i from "./it.json.mjs";
6
+ import p from "./ja.json.mjs";
7
+ import f from "./ko.json.mjs";
8
+ import e from "./nl.json.mjs";
9
+ import s from "./pt.json.mjs";
10
+ import a from "./tr.json.mjs";
11
+ import l from "./vi.json.mjs";
12
+ import v from "./zh.json.mjs";
13
+ import d from "./pl.json.mjs";
14
+ import n from "./sv.json.mjs";
15
+ var B = {
16
+ de: r,
17
+ en: o,
18
+ es: m,
19
+ fr: t,
20
+ it: i,
21
+ ja: p,
22
+ ko: f,
23
+ nl: e,
24
+ pt: s,
25
+ tr: a,
26
+ vi: l,
27
+ zh: v,
28
+ pl: d,
29
+ sv: n
30
+ };
31
+ export {
32
+ B as localizedMessages
33
+ };
@@ -0,0 +1,9 @@
1
+ const e = "Dialogfenster", t = "Schließen", l = {
2
+ title: e,
3
+ close: t
4
+ };
5
+ export {
6
+ t as close,
7
+ l as default,
8
+ e as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const o = "Modal window", t = "Close", e = {
2
+ title: o,
3
+ close: t
4
+ };
5
+ export {
6
+ t as close,
7
+ e as default,
8
+ o as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "Ventana modal", e = "Cerrar", o = {
2
+ title: t,
3
+ close: e
4
+ };
5
+ export {
6
+ e as close,
7
+ o as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const e = "Fenêtre modale", t = "Fermer", o = {
2
+ title: e,
3
+ close: t
4
+ };
5
+ export {
6
+ t as close,
7
+ o as default,
8
+ e as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "Finestra modale", e = "Chiudi", o = {
2
+ title: t,
3
+ close: e
4
+ };
5
+ export {
6
+ e as close,
7
+ o as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "モーダルウィンドウ", e = "閉じる", o = {
2
+ title: t,
3
+ close: e
4
+ };
5
+ export {
6
+ e as close,
7
+ o as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "대화상자 창", o = "닫기", e = {
2
+ title: t,
3
+ close: o
4
+ };
5
+ export {
6
+ o as close,
7
+ e as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "Modaal venster", e = "Sluiten", l = {
2
+ title: t,
3
+ close: e
4
+ };
5
+ export {
6
+ e as close,
7
+ l as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "Okno modalne", o = "Zamknij", e = {
2
+ title: t,
3
+ close: o
4
+ };
5
+ export {
6
+ o as close,
7
+ e as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "Janela modal", e = "Fechar", l = {
2
+ title: t,
3
+ close: e
4
+ };
5
+ export {
6
+ e as close,
7
+ l as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "Modalt fönster", s = "Stäng", e = {
2
+ title: t,
3
+ close: s
4
+ };
5
+ export {
6
+ s as close,
7
+ e as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "Modal pencere", e = "Kapat", o = {
2
+ title: t,
3
+ close: e
4
+ };
5
+ export {
6
+ e as close,
7
+ o as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "Cửa sổ phương thức", s = "Đóng", c = {
2
+ title: t,
3
+ close: s
4
+ };
5
+ export {
6
+ s as close,
7
+ c as default,
8
+ t as title
9
+ };
@@ -0,0 +1,9 @@
1
+ const t = "模态窗口", e = "关闭", o = {
2
+ title: t,
3
+ close: e
4
+ };
5
+ export {
6
+ e as close,
7
+ o as default,
8
+ t as title
9
+ };
package/package.json CHANGED
@@ -1,23 +1,28 @@
1
1
  {
2
2
  "name": "@semcore/fullscreen-modal",
3
3
  "description": "Semrush FullscreenModal Component",
4
- "version": "3.49.0-prerelease.9",
4
+ "version": "3.49.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
+ "exports": {
12
+ "require": "./lib/cjs/index.js",
13
+ "import": "./lib/esm/index.mjs",
14
+ "types": "./lib/types/index.d.ts"
15
+ },
11
16
  "dependencies": {
12
- "@semcore/utils": "4.47.1-prerelease.9",
13
- "@semcore/icon": "4.58.0-prerelease.9",
14
- "@semcore/modal": "4.54.0-prerelease.9",
15
- "@semcore/typography": "5.52.0-prerelease.9",
16
- "@semcore/flex-box": "5.41.0-prerelease.9",
17
- "@semcore/button": "5.42.0-prerelease.9"
17
+ "@semcore/utils": "4.48.0",
18
+ "@semcore/icon": "4.60.0",
19
+ "@semcore/modal": "4.54.0",
20
+ "@semcore/typography": "5.52.0",
21
+ "@semcore/flex-box": "5.41.0",
22
+ "@semcore/button": "5.42.0"
18
23
  },
19
24
  "peerDependencies": {
20
- "@semcore/core": "^2.39.0-prerelease.9",
25
+ "@semcore/core": "^2.17.5",
21
26
  "react": "16.8 - 18",
22
27
  "react-dom": "16.8 - 18"
23
28
  },
@@ -31,6 +36,6 @@
31
36
  "@semcore/testing-utils": "1.0.0"
32
37
  },
33
38
  "scripts": {
34
- "build": "pnpm semcore-builder --source=js"
39
+ "build": "pnpm semcore-builder --source=js && pnpm vite build"
35
40
  }
36
41
  }
package/vite.config.ts ADDED
@@ -0,0 +1,17 @@
1
+ import { defineConfig, mergeConfig } from 'vite';
2
+
3
+ import viteConfig from '../../commonVite.config';
4
+
5
+ export default mergeConfig(
6
+ viteConfig,
7
+ defineConfig({
8
+ build: {
9
+ lib: {
10
+ entry: './src/index.js',
11
+ },
12
+ rollupOptions: {
13
+ external: ['react', 'react-dom', 'react/jsx-runtime', /@babel\/runtime\/*/, /@semcore\/*/],
14
+ },
15
+ },
16
+ }),
17
+ );