@publicapps/icons 0.3.3 → 0.3.5

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/Icon.js CHANGED
@@ -1 +1 @@
1
- "use strict";"use client";var e=require("@babel/runtime/helpers/interopRequireDefault").default;var t=require("@babel/runtime/helpers/interopRequireWildcard").default;Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var i=t(require("react"));var s=require("@publicapps/styles");var n=e(require("./IconStyle"));var r=e(require("./IconBody"));var c=require("react/jsx-runtime");const o=(0,i.forwardRef)(((e,t)=>{const{icon:o,color:l,size:u,title:a,sx:d,hidden:f,disabled:h,dir:m,id:y,className:p,...x}=e;const v=y||String((0,i.useId)()).slice(1,-1)+"icon";const b=(0,i.useContext)(s.ContextThemeProvider);const{classesName:g,style:C,styleSx:k}=(0,n.default)(b);const q=C();const F=k({sx:d,color:l,disabled:h,onClick:e?.onClick?true:false});const I=s.styleFunction.getClassName(q?.[g?.icon_container],F?.[g?.icon_container],F?.[g?.sx],s.styleFunction.CheckDirectionItem(m),s.styleFunction.CheckDisabledItem(h),s.styleFunction.CheckHiddenItem(f),s.styleFunction.checkExistsMargin(x),s.styleFunction.checkExistsPadding(x),p);const j=(0,i.useMemo)((()=>{const e=(0,s.getSpecificCssRule)(["fontSize"],d,((e,t)=>({height:t,width:t})));if(!Object.keys(e||{})?.length)return null;return e}),[d]);return e?.onClick?(0,c.jsx)("button",{className:I,title:a||"",id:v,...s.styleFunction?.getRestProps(x),ref:t,children:typeof o==="string"?(0,c.jsx)(r.default,{icon:o,theTheme:b,comID:v,size:u,fontSize:j}):null}):(0,c.jsx)("div",{className:I,title:a||"",id:v,...s.styleFunction?.getRestProps(x),ref:t,children:typeof o==="string"?(0,c.jsx)(r.default,{icon:o,theTheme:b,comID:v,size:u,fontSize:j}):null})}));var l=exports.default=o;
1
+ "use strict";"use client";var e=require("@babel/runtime/helpers/interopRequireDefault").default;var t=require("@babel/runtime/helpers/interopRequireWildcard").default;Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var i=t(require("react"));var s=require("@publicapps/styles");var n=e(require("./IconStyle"));var r=e(require("./IconBody"));var c=require("react/jsx-runtime");const o=(0,i.forwardRef)((e,t)=>{const{icon:o,color:l,size:u,title:a,sx:d,hidden:f,disabled:h,dir:m,id:y,className:p,...x}=e;const v=y||String((0,i.useId)()).slice(1,-1)+"icon";const b=(0,i.useContext)(s.ContextThemeProvider);const{classesName:g,style:C,styleSx:k}=(0,n.default)(b);const q=C();const F=k({sx:d,color:l,disabled:h,onClick:e?.onClick?true:false});const I=s.styleFunction.getClassName(q?.[g?.icon_container],F?.[g?.icon_container],F?.[g?.sx],s.styleFunction.CheckDirectionItem(m),s.styleFunction.CheckDisabledItem(h),s.styleFunction.CheckHiddenItem(f),s.styleFunction.checkExistsMargin(x),s.styleFunction.checkExistsPadding(x),p);const j=(0,i.useMemo)(()=>{const e=(0,s.getSpecificCssRule)(["fontSize"],d,(e,t)=>({height:t,width:t}));if(!Object.keys(e||{})?.length)return null;return e},[d]);return e?.onClick?(0,c.jsx)("button",{className:I,title:a||"",id:v,...s.styleFunction?.getRestProps(x),ref:t,children:typeof o==="string"?(0,c.jsx)(r.default,{icon:o,theTheme:b,comID:v,size:u,fontSize:j}):null}):(0,c.jsx)("div",{className:I,title:a||"",id:v,...s.styleFunction?.getRestProps(x),ref:t,children:typeof o==="string"?(0,c.jsx)(r.default,{icon:o,theTheme:b,comID:v,size:u,fontSize:j}):null})});var l=exports.default=o;
package/IconBody.js CHANGED
@@ -1 +1 @@
1
- "use strict";"use client";var e=require("@babel/runtime/helpers/interopRequireWildcard").default;var n=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var r=n(require("@babel/runtime/helpers/interopRequireWildcard"));var t=e(require("react"));var o=require("./index");var s=n(require("./IconStyle"));var c=require("react/jsx-runtime");function l({icon:e,theTheme:n,comID:l,size:i,fontSize:u}){const a=(0,t.useRef)({strIconName:null});const[d,f]=(0,t.useState)(null);const{classesName:p,styleIconBody:h,styleSxIconBody:g}=(0,s.default)(n);const m=h();const I=g({size:i,fontSize:u});(0,t.useEffect)((()=>{const n=()=>{try{const n=String(e).toLowerCase().trim();if(a?.current?.strIconName===n)return;const t=(e=>new Promise((n=>n(`${e}`))).then((e=>(0,r.default)(require(e)))))("node"==="node"?`./icons.json`:`../icons.json`);return t.then((e=>{let r=e?.default||e;r=typeof r==="string"?JSON.parse(r):r;let t=r?.[n];a.current.strIconName=n;f(t)})).catch((t=>{if(o.pkgConfigIcon?.blnIsTestingMode)if(typeof"node"==="undefined")try{return(e=>new Promise((n=>n(e))).then((e=>(0,r.default)(require(e)))))(`./icons.json`).then((e=>{let r=e?.default||e;r=typeof r==="string"?JSON.parse(r):r;let t=r?.[n];f(t)})).catch((n=>{if(o.pkgConfigIcon?.blnIsTestingMode){console.log(n);console.error("Icon ( "+e+" ) not found.")}f(null)}))}catch(t){if(o.pkgConfigIcon?.blnIsTestingMode){console.log(t);console.error("Icon ( "+e+" ) not found.")}f(null)}console.log(t);console.error("Icon ( "+e+" ) not found.");a.current.strIconName=n;f(null)}))}catch(n){if(o.pkgConfigIcon?.blnIsTestingMode)console.error("Icon ( "+e+" ) not found.");a.current.strIconName=null;f(null)}};n()}),[e]);return(0,c.jsx)(t.default.Fragment,{children:(0,c.jsx)("svg",{className:`${m?.[p?.icon]} ${I?.[p?.icon]}`,viewBox:"0 0 24 24",children:!d?null:(0,c.jsxs)(c.Fragment,{children:[d?.["circle"]?d?.["circle"].map(((e,n)=>(0,c.jsx)("circle",{cx:e["cx"],cy:e["cy"],r:e["r"]},n))):null,d?.["path"]?d?.["path"].map(((e,n)=>(0,c.jsx)("path",{d:e},n))):null,d?.["line"]?d["line"].map(((e,n)=>(0,c.jsx)("line",{x1:e["x1"],y1:e["y1"],x2:e["x2"],y2:e["y2"],strokeWidth:e["strokeWidth"]?e["strokeWidth"]:"",strokeLinecap:e["strokeLinecap"]?e["strokeLinecap"]:"",stroke:"currentColor"},n))):null]})})})}var i=exports.default=l;
1
+ "use strict";"use client";var e=require("@babel/runtime/helpers/interopRequireWildcard").default;var n=require("@babel/runtime/helpers/interopRequireDefault").default;Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var r=n(require("@babel/runtime/helpers/interopRequireWildcard"));var t=e(require("react"));var o=require("./index");var s=n(require("./IconStyle"));var c=require("react/jsx-runtime");function l({icon:e,theTheme:n,comID:l,size:i,fontSize:u}){const a=(0,t.useRef)({strIconName:null});const[d,f]=(0,t.useState)(null);const{classesName:p,styleIconBody:h,styleSxIconBody:g}=(0,s.default)(n);const m=h();const I=g({size:i,fontSize:u});(0,t.useEffect)(()=>{const n=()=>{try{const n=String(e).toLowerCase().trim();if(a?.current?.strIconName===n)return;const t=(e=>new Promise(n=>n(`${e}`)).then(e=>(0,r.default)(require(e))))("node"==="node"?`./icons.json`:`../icons.json`);return t.then(e=>{let r=e?.default||e;r=typeof r==="string"?JSON.parse(r):r;let t=r?.[n];a.current.strIconName=n;f(t)}).catch(t=>{if(o.pkgConfigIcon?.blnIsTestingMode)if(typeof"node"==="undefined")try{return(e=>new Promise(n=>n(e)).then(e=>(0,r.default)(require(e))))(`./icons.json`).then(e=>{let r=e?.default||e;r=typeof r==="string"?JSON.parse(r):r;let t=r?.[n];f(t)}).catch(n=>{if(o.pkgConfigIcon?.blnIsTestingMode){console.log(n);console.error("Icon ( "+e+" ) not found.")}f(null)})}catch(t){if(o.pkgConfigIcon?.blnIsTestingMode){console.log(t);console.error("Icon ( "+e+" ) not found.")}f(null)}console.log(t);console.error("Icon ( "+e+" ) not found.");a.current.strIconName=n;f(null)})}catch(n){if(o.pkgConfigIcon?.blnIsTestingMode)console.error("Icon ( "+e+" ) not found.");a.current.strIconName=null;f(null)}};n()},[e]);return(0,c.jsx)(t.default.Fragment,{children:(0,c.jsx)("svg",{className:`${m?.[p?.icon]} ${I?.[p?.icon]}`,viewBox:"0 0 24 24",children:!d?null:(0,c.jsxs)(c.Fragment,{children:[d?.["circle"]?d?.["circle"].map((e,n)=>(0,c.jsx)("circle",{cx:e["cx"],cy:e["cy"],r:e["r"]},n)):null,d?.["path"]?d?.["path"].map((e,n)=>(0,c.jsx)("path",{d:e},n)):null,d?.["line"]?d["line"].map((e,n)=>(0,c.jsx)("line",{x1:e["x1"],y1:e["y1"],x2:e["x2"],y2:e["y2"],strokeWidth:e["strokeWidth"]?e["strokeWidth"]:"",strokeLinecap:e["strokeLinecap"]?e["strokeLinecap"]:"",stroke:"currentColor"},n)):null]})})})}var i=exports.default=l;
package/LazyLoader.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/interopRequireWildcard").default;Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var r=e(require("react"));const t=({icon:e})=>{(0,r.useEffect)((()=>()=>{}),[e])};var u=exports.default=t;
1
+ "use strict";var e=require("@babel/runtime/helpers/interopRequireWildcard").default;Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var r=e(require("react"));const t=({icon:e})=>{(0,r.useEffect)(()=>()=>{},[e])};var u=exports.default=t;
package/esm/Icon.js CHANGED
@@ -1 +1 @@
1
- "use client";import e,{forwardRef as t,useContext as i,useId as s,useMemo as o}from"react";import{styleFunction as n,ContextThemeProvider as c,getSpecificCssRule as r}from"@publicapps/styles";import l from"./IconStyle";import a from"./IconBody";import{jsx as m}from"react/jsx-runtime";const d=t(((e,t)=>{const{icon:d,color:h,size:f,title:p,sx:u,hidden:g,disabled:k,dir:x,id:y,className:C,...I}=e;const b=y||String(s()).slice(1,-1)+"icon";const z=i(c);const{classesName:S,style:N,styleSx:D}=l(z);const j=N();const P=D({sx:u,color:h,disabled:k,onClick:e?.onClick?true:false});const E=n.getClassName(j?.[S?.icon_container],P?.[S?.icon_container],P?.[S?.sx],n.CheckDirectionItem(x),n.CheckDisabledItem(k),n.CheckHiddenItem(g),n.checkExistsMargin(I),n.checkExistsPadding(I),C);const R=o((()=>{const e=r(["fontSize"],u,((e,t)=>({height:t,width:t})));if(!Object.keys(e||{})?.length)return null;return e}),[u]);return e?.onClick?m("button",{className:E,title:p||"",id:b,...n?.getRestProps(I),ref:t,children:typeof d==="string"?m(a,{icon:d,theTheme:z,comID:b,size:f,fontSize:R}):null}):m("div",{className:E,title:p||"",id:b,...n?.getRestProps(I),ref:t,children:typeof d==="string"?m(a,{icon:d,theTheme:z,comID:b,size:f,fontSize:R}):null})}));export default d;
1
+ "use client";import e,{forwardRef as t,useContext as i,useId as s,useMemo as o}from"react";import{styleFunction as n,ContextThemeProvider as c,getSpecificCssRule as r}from"@publicapps/styles";import l from"./IconStyle";import a from"./IconBody";import{jsx as m}from"react/jsx-runtime";const d=t((e,t)=>{const{icon:d,color:h,size:f,title:p,sx:u,hidden:g,disabled:k,dir:x,id:y,className:C,...I}=e;const b=y||String(s()).slice(1,-1)+"icon";const z=i(c);const{classesName:S,style:N,styleSx:D}=l(z);const j=N();const P=D({sx:u,color:h,disabled:k,onClick:e?.onClick?true:false});const E=n.getClassName(j?.[S?.icon_container],P?.[S?.icon_container],P?.[S?.sx],n.CheckDirectionItem(x),n.CheckDisabledItem(k),n.CheckHiddenItem(g),n.checkExistsMargin(I),n.checkExistsPadding(I),C);const R=o(()=>{const e=r(["fontSize"],u,(e,t)=>({height:t,width:t}));if(!Object.keys(e||{})?.length)return null;return e},[u]);return e?.onClick?m("button",{className:E,title:p||"",id:b,...n?.getRestProps(I),ref:t,children:typeof d==="string"?m(a,{icon:d,theTheme:z,comID:b,size:f,fontSize:R}):null}):m("div",{className:E,title:p||"",id:b,...n?.getRestProps(I),ref:t,children:typeof d==="string"?m(a,{icon:d,theTheme:z,comID:b,size:f,fontSize:R}):null})});export default d;
package/esm/IconBody.js CHANGED
@@ -1 +1 @@
1
- "use client";import n,{useEffect as e,useRef as o,useState as t}from"react";import{pkgConfigIcon as r}from"./index";import c from"./IconStyle";import{jsx as s,Fragment as l,jsxs as i}from"react/jsx-runtime";function a({icon:a,theTheme:u,comID:m,size:d,fontSize:f}){const p=o({strIconName:null});const[h,I]=t(null);const{classesName:y,styleIconBody:g,styleSxIconBody:x}=c(u);const N=g();const k=x({size:d,fontSize:f});e((()=>{const n=()=>{try{const n=String(a).toLowerCase().trim();if(p?.current?.strIconName===n)return;const e=import("stable"==="node"?`./icons.json`:`../icons.json`);return e.then((e=>{let o=e?.default||e;o=typeof o==="string"?JSON.parse(o):o;let t=o?.[n];p.current.strIconName=n;I(t)})).catch((e=>{if(r?.blnIsTestingMode)if(typeof"stable"==="undefined")try{return import(`./icons.json`).then((e=>{let o=e?.default||e;o=typeof o==="string"?JSON.parse(o):o;let t=o?.[n];I(t)})).catch((n=>{if(r?.blnIsTestingMode){console.log(n);console.error("Icon ( "+a+" ) not found.")}I(null)}))}catch(e){if(r?.blnIsTestingMode){console.log(e);console.error("Icon ( "+a+" ) not found.")}I(null)}console.log(e);console.error("Icon ( "+a+" ) not found.");p.current.strIconName=n;I(null)}))}catch(n){if(r?.blnIsTestingMode)console.error("Icon ( "+a+" ) not found.");p.current.strIconName=null;I(null)}};n()}),[a]);return s(n.Fragment,{children:s("svg",{className:`${N?.[y?.icon]} ${k?.[y?.icon]}`,viewBox:"0 0 24 24",children:!h?null:i(l,{children:[h?.["circle"]?h?.["circle"].map(((n,e)=>s("circle",{cx:n["cx"],cy:n["cy"],r:n["r"]},e))):null,h?.["path"]?h?.["path"].map(((n,e)=>s("path",{d:n},e))):null,h?.["line"]?h["line"].map(((n,e)=>s("line",{x1:n["x1"],y1:n["y1"],x2:n["x2"],y2:n["y2"],strokeWidth:n["strokeWidth"]?n["strokeWidth"]:"",strokeLinecap:n["strokeLinecap"]?n["strokeLinecap"]:"",stroke:"currentColor"},e))):null]})})})}export default a;
1
+ "use client";import n,{useEffect as e,useRef as o,useState as t}from"react";import{pkgConfigIcon as r}from"./index";import c from"./IconStyle";import{jsx as s,Fragment as l,jsxs as i}from"react/jsx-runtime";function a({icon:a,theTheme:u,comID:m,size:d,fontSize:f}){const p=o({strIconName:null});const[h,I]=t(null);const{classesName:y,styleIconBody:g,styleSxIconBody:x}=c(u);const N=g();const k=x({size:d,fontSize:f});e(()=>{const n=()=>{try{const n=String(a).toLowerCase().trim();if(p?.current?.strIconName===n)return;const e=import("stable"==="node"?`./icons.json`:`../icons.json`);return e.then(e=>{let o=e?.default||e;o=typeof o==="string"?JSON.parse(o):o;let t=o?.[n];p.current.strIconName=n;I(t)}).catch(e=>{if(r?.blnIsTestingMode)if(typeof"stable"==="undefined")try{return import(`./icons.json`).then(e=>{let o=e?.default||e;o=typeof o==="string"?JSON.parse(o):o;let t=o?.[n];I(t)}).catch(n=>{if(r?.blnIsTestingMode){console.log(n);console.error("Icon ( "+a+" ) not found.")}I(null)})}catch(e){if(r?.blnIsTestingMode){console.log(e);console.error("Icon ( "+a+" ) not found.")}I(null)}console.log(e);console.error("Icon ( "+a+" ) not found.");p.current.strIconName=n;I(null)})}catch(n){if(r?.blnIsTestingMode)console.error("Icon ( "+a+" ) not found.");p.current.strIconName=null;I(null)}};n()},[a]);return s(n.Fragment,{children:s("svg",{className:`${N?.[y?.icon]} ${k?.[y?.icon]}`,viewBox:"0 0 24 24",children:!h?null:i(l,{children:[h?.["circle"]?h?.["circle"].map((n,e)=>s("circle",{cx:n["cx"],cy:n["cy"],r:n["r"]},e)):null,h?.["path"]?h?.["path"].map((n,e)=>s("path",{d:n},e)):null,h?.["line"]?h["line"].map((n,e)=>s("line",{x1:n["x1"],y1:n["y1"],x2:n["x2"],y2:n["y2"],strokeWidth:n["strokeWidth"]?n["strokeWidth"]:"",strokeLinecap:n["strokeLinecap"]?n["strokeLinecap"]:"",stroke:"currentColor"},e)):null]})})})}export default a;
package/esm/LazyLoader.js CHANGED
@@ -1 +1 @@
1
- import o,{useEffect as t}from"react";const r=({icon:o})=>{t((()=>()=>{}),[o])};export default r;
1
+ import o,{useEffect as t}from"react";const r=({icon:o})=>{t(()=>()=>{},[o])};export default r;
package/icons.json CHANGED
@@ -7260,7 +7260,7 @@
7260
7260
  },
7261
7261
  "minimize": {
7262
7262
  "path": [
7263
- "M6 11h12v2H6z"
7263
+ "M6 12h12v2H6z"
7264
7264
  ]
7265
7265
  },
7266
7266
  "miscellaneousservices": {
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { IconType } from "./IconType";
2
- import { DivBasedCompTypeMap, OverridableComponent, StandardColorType, DirectionType } from "../styles";
2
+ import { DivBasedCompTypeMap, OverridableComponent, StandardColorType, DirectionType } from "@publicapps/styles";
3
3
 
4
4
  /***** * Icon * start *****/
5
5
  export const Icon: OverridableComponent<
@@ -19,7 +19,7 @@ export const Icon: OverridableComponent<
19
19
  export { IconType } from "./IconType";
20
20
 
21
21
  type pkgConfigIconType = {
22
- blnIsTestingMode: boolean;
22
+ blnIsTestingMode?: boolean;
23
23
  };
24
24
 
25
25
  export var pkgConfigIcon: pkgConfigIconType;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @publicapps/icons v0.3.3
2
+ * @publicapps/icons v0.3.5
3
3
  *
4
4
  * @license ISC
5
5
  * This source code is licensed under the ISC license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@publicapps/icons",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "",
5
5
  "private": false,
6
6
  "author": "cbmis-client",
@@ -15,9 +15,16 @@
15
15
  "directory": "builds/public"
16
16
  },
17
17
  "dependencies": {
18
- "@babel/runtime": "^7.26.0"
18
+ "@babel/runtime": "^7.28.2"
19
+ },
20
+ "peerDependencies": {
21
+ "@publicapps/styles": "*"
22
+ },
23
+ "peerDependenciesMeta": {
24
+ "@publicapps/styles": {
25
+ "optional": true
26
+ }
19
27
  },
20
- "peerDependencies": {},
21
28
  "module": "./esm/index.js",
22
29
  "types": "./index.d.ts"
23
30
  }