@homecode/ui 4.26.5 → 4.26.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.
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+
3
+ var _path;
4
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ var SvgAttach = function SvgAttach(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: 24,
9
+ height: 24,
10
+ fill: "none"
11
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
12
+ stroke: "currentColor",
13
+ strokeLinecap: "round",
14
+ strokeLinejoin: "round",
15
+ strokeWidth: 2.11,
16
+ d: "m14.085 8.968-7.702 6.734c-.893.782-.893 2.05 0 2.832.892.781 2.34.781 3.232 0l12.012-10.51c1.785-1.564 1.785-4.1 0-5.663s-4.68-1.564-6.464 0L3.15 12.87c-2.678 2.346-2.678 6.15 0 8.495 2.677 2.346 7.018 2.346 9.696 0l8.78-7.677"
17
+ })));
18
+ };
19
+
20
+ export { SvgAttach as default };
@@ -1,4 +1,5 @@
1
1
  var ICONS = {
2
+ attach: () => import('./attach.svg.js'),
2
3
  arrowRight: () => import('./arrowRight.svg.js'),
3
4
  arrowLeft: () => import('./arrowLeft.svg.js'),
4
5
  arrowUp: () => import('./arrowUp.svg.js'),
@@ -48,6 +49,8 @@ var ICONS = {
48
49
  layers: () => import('./layers.svg.js'),
49
50
  link: () => import('./link.svg.js'),
50
51
  loader: () => import('./loader.svg.js'),
52
+ lock: () => import('./lock.svg.js'),
53
+ lockOpen: () => import('./lockOpen.svg.js'),
51
54
  map: () => import('./map.svg.js'),
52
55
  menu: () => import('./menu.svg.js'),
53
56
  mic: () => import('./mic.svg.js'),
@@ -72,6 +75,7 @@ var ICONS = {
72
75
  send: () => import('./send.svg.js'),
73
76
  settings: () => import('./settings.svg.js'),
74
77
  shoppingBag: () => import('./shoppingBag.svg.js'),
78
+ smile: () => import('./smile.svg.js'),
75
79
  soundWave: () => import('./soundWave.svg.js'),
76
80
  sparks: () => import('./sparks.svg.js'),
77
81
  star: () => import('./star.svg.js'),
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+
3
+ var _path;
4
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
5
+ var SvgLock = function SvgLock(props) {
6
+ return /*#__PURE__*/React.createElement("svg", _extends({
7
+ xmlns: "http://www.w3.org/2000/svg",
8
+ width: 24,
9
+ height: 24,
10
+ fill: "none"
11
+ }, props), _path || (_path = /*#__PURE__*/React.createElement("path", {
12
+ stroke: "currentColor",
13
+ strokeLinecap: "round",
14
+ strokeLinejoin: "round",
15
+ strokeWidth: 1.975,
16
+ d: "M12.045 18.083v-2.418m4.821-4.835V5.996a4.83 4.83 0 0 0-4.821-4.835 4.83 4.83 0 0 0-4.821 4.835v4.834M4.813 22.917h14.464a3.62 3.62 0 0 0 3.616-3.626v-4.834a3.62 3.62 0 0 0-3.616-3.627H4.813a3.62 3.62 0 0 0-3.616 3.627v4.834a3.62 3.62 0 0 0 3.616 3.626"
17
+ })));
18
+ };
19
+
20
+ export { SvgLock as default };
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ var SvgLockOpen = function SvgLockOpen(props) {
5
+ return /*#__PURE__*/React.createElement("svg", _extends({
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ width: 24,
8
+ height: 24,
9
+ fill: "none"
10
+ }, props), /*#__PURE__*/React.createElement("path", {
11
+ stroke: "currentColor",
12
+ strokeLinecap: "round",
13
+ strokeLinejoin: "round",
14
+ strokeWidth: 1.969,
15
+ d: "M13.199 16.784h-2.408m-3.613-6.01V5.966a4.81 4.81 0 0 1 4.817-4.808 4.81 4.81 0 0 1 4.816 4.808M4.771 22.794H19.22a3.61 3.61 0 0 0 3.612-3.606V14.38a3.61 3.61 0 0 0-3.612-3.606H4.77a3.61 3.61 0 0 0-3.612 3.606v4.808a3.61 3.61 0 0 0 3.612 3.606",
16
+ style: {
17
+ stroke: "currentColor",
18
+ strokeOpacity: 1
19
+ }
20
+ }));
21
+ };
22
+
23
+ export { SvgLockOpen as default };
@@ -0,0 +1,30 @@
1
+ import * as React from 'react';
2
+
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ var SvgSmile = function SvgSmile(props) {
5
+ return /*#__PURE__*/React.createElement("svg", _extends({
6
+ xmlns: "http://www.w3.org/2000/svg",
7
+ fill: "currentColor",
8
+ viewBox: "0 0 24 24"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ d: "M9.262 9.898h.848a2.122 2.122 0 0 0-4.241 0h.848a1.273 1.273 0 0 1 2.545 0m6.786-2.12c-1.169 0-2.12.95-2.12 2.12h.848a1.273 1.273 0 0 1 2.545 0h.848c0-1.17-.951-2.12-2.12-2.12",
11
+ style: {
12
+ strokeWidth: 0.424,
13
+ strokeDasharray: "none"
14
+ }
15
+ }), /*#__PURE__*/React.createElement("path", {
16
+ d: "M12.019.143C5.471.143.143 5.47.143 12.019S5.47 23.895 12.019 23.895s11.876-5.328 11.876-11.876S18.567.143 12.02.143m0 22.904C5.938 23.047.991 18.1.991 12.019.991 5.939 5.938.991 12.02.991S23.047 5.938 23.047 12.02c0 6.08-4.947 11.028-11.028 11.028",
17
+ style: {
18
+ strokeWidth: 0.424,
19
+ strokeDasharray: "none"
20
+ }
21
+ }), /*#__PURE__*/React.createElement("path", {
22
+ d: "M12.019 16.685c-1.54-.001-3.817-.407-3.817-1.273h-.849c0 2.061 4.188 2.12 4.666 2.12s4.666-.059 4.666-2.12h-.849c0 .866-2.278 1.272-3.817 1.273",
23
+ style: {
24
+ strokeWidth: 0.424,
25
+ strokeDasharray: "none"
26
+ }
27
+ }));
28
+ };
29
+
30
+ export { SvgSmile as default };
@@ -1,19 +1,33 @@
1
1
  import { jsx, Fragment } from 'react/jsx-runtime';
2
- import { useState, useEffect } from 'react';
2
+ import { useState, useLayoutEffect, useMemo } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { config } from '../../tools/config.js';
5
+ import { isBrowser } from '../../tools/env.js';
5
6
 
6
7
  const DEFAULT_SELECTOR = `#${config.appOverlayId}`;
7
8
  function Portal(props) {
8
9
  const { selector = DEFAULT_SELECTOR, children } = props;
9
- const [isMounted, setMounted] = useState(false);
10
- useEffect(() => {
11
- // prevent HTML mismatch between server and client
10
+ // Start with immediate rendering if we're in browser
11
+ const [isMounted, setMounted] = useState(isBrowser);
12
+ useLayoutEffect(() => {
13
+ // Ensure we're mounted on client side (handles SSR edge cases)
12
14
  setMounted(true);
13
15
  }, []);
16
+ // Cache target element to avoid DOM queries on every render
17
+ const targetElement = useMemo(() => {
18
+ if (!isMounted)
19
+ return null;
20
+ return document.querySelector(selector);
21
+ }, [selector, isMounted]);
22
+ // Don't render if not mounted (prevents SSR hydration mismatch)
14
23
  if (!isMounted)
15
24
  return null;
16
- return createPortal(jsx(Fragment, { children: children }), document.querySelector(selector));
25
+ // Check if target element exists before rendering
26
+ if (!targetElement) {
27
+ console.warn(`Portal target element not found: ${selector}`);
28
+ return null;
29
+ }
30
+ return createPortal(jsx(Fragment, { children: children }), targetElement);
17
31
  }
18
32
 
19
33
  export { Portal };
@@ -1,4 +1,5 @@
1
1
  declare const _default: {
2
+ attach: () => Promise<any>;
2
3
  arrowRight: () => Promise<any>;
3
4
  arrowLeft: () => Promise<any>;
4
5
  arrowUp: () => Promise<any>;
@@ -48,6 +49,8 @@ declare const _default: {
48
49
  layers: () => Promise<any>;
49
50
  link: () => Promise<any>;
50
51
  loader: () => Promise<any>;
52
+ lock: () => Promise<any>;
53
+ lockOpen: () => Promise<any>;
51
54
  map: () => Promise<any>;
52
55
  menu: () => Promise<any>;
53
56
  mic: () => Promise<any>;
@@ -72,6 +75,7 @@ declare const _default: {
72
75
  send: () => Promise<any>;
73
76
  settings: () => Promise<any>;
74
77
  shoppingBag: () => Promise<any>;
78
+ smile: () => Promise<any>;
75
79
  soundWave: () => Promise<any>;
76
80
  sparks: () => Promise<any>;
77
81
  star: () => Promise<any>;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homecode/ui",
3
- "version": "4.26.5",
3
+ "version": "4.26.7",
4
4
  "description": "React UI components library",
5
5
  "scripts": {
6
6
  "tests": "jest",