@orfium/ictinus 5.6.0 → 5.6.1

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.
Files changed (48) hide show
  1. package/bin/migrate.mjs +1 -1
  2. package/dist/codemods/avatarCodemod.cjs +1 -0
  3. package/dist/codemods/buttonCodemod.cjs +1 -0
  4. package/dist/codemods/checkboxCodemod.cjs +1 -0
  5. package/dist/codemods/chipCodemode.cjs +1 -0
  6. package/dist/codemods/drawerCodemod.cjs +1 -0
  7. package/dist/codemods/filterCodemod.cjs +1 -0
  8. package/dist/codemods/globalsCodemod.cjs +1 -0
  9. package/dist/codemods/iconButtonCodemod.cjs +1 -0
  10. package/dist/codemods/iconCodemod.cjs +1 -0
  11. package/dist/codemods/loaderCodemod.cjs +1 -0
  12. package/dist/codemods/menuCodemod.cjs +1 -0
  13. package/dist/codemods/notificationsCodemod.cjs +1 -0
  14. package/dist/codemods/paginationCodemod.cjs +1 -0
  15. package/dist/codemods/radioCodemod.cjs +1 -0
  16. package/dist/codemods/radioGroupCodemod.cjs +1 -0
  17. package/dist/codemods/searchCodemod.cjs +1 -0
  18. package/dist/codemods/selectCodemod.cjs +1 -0
  19. package/dist/codemods/switchCodemod.cjs +1 -0
  20. package/dist/codemods/tableCodemod.cjs +1 -0
  21. package/dist/codemods/textareaCodemod.cjs +1 -0
  22. package/dist/codemods/textfieldCodemod.cjs +1 -0
  23. package/dist/codemods/tooltipCodemod.cjs +1 -0
  24. package/dist/codemods/unchangedIconsCodemod.cjs +1 -0
  25. package/package.json +1 -1
  26. package/dist/codemods/avatarCodemod.js +0 -1
  27. package/dist/codemods/buttonCodemod.js +0 -1
  28. package/dist/codemods/checkboxCodemod.js +0 -1
  29. package/dist/codemods/chipCodemode.js +0 -1
  30. package/dist/codemods/drawerCodemod.js +0 -1
  31. package/dist/codemods/filterCodemod.js +0 -1
  32. package/dist/codemods/globalsCodemod.js +0 -1
  33. package/dist/codemods/iconButtonCodemod.js +0 -1
  34. package/dist/codemods/iconCodemod.js +0 -1
  35. package/dist/codemods/loaderCodemod.js +0 -1
  36. package/dist/codemods/menuCodemod.js +0 -1
  37. package/dist/codemods/notificationsCodemod.js +0 -1
  38. package/dist/codemods/paginationCodemod.js +0 -1
  39. package/dist/codemods/radioCodemod.js +0 -1
  40. package/dist/codemods/radioGroupCodemod.js +0 -1
  41. package/dist/codemods/searchCodemod.js +0 -1
  42. package/dist/codemods/selectCodemod.js +0 -1
  43. package/dist/codemods/switchCodemod.js +0 -1
  44. package/dist/codemods/tableCodemod.js +0 -1
  45. package/dist/codemods/textareaCodemod.js +0 -1
  46. package/dist/codemods/textfieldCodemod.js +0 -1
  47. package/dist/codemods/tooltipCodemod.js +0 -1
  48. package/dist/codemods/unchangedIconsCodemod.js +0 -1
package/bin/migrate.mjs CHANGED
@@ -12,7 +12,7 @@ const runCodemods = (targetPath) => {
12
12
  const codemodsPath = path.join(dirname, '../dist/codemods');
13
13
 
14
14
  const codemods = fs.readdirSync(codemodsPath)
15
- .filter(file => file.endsWith('.js'));
15
+ .filter(file => file.endsWith('.cjs'));
16
16
 
17
17
  codemods.forEach(codemod => {
18
18
  const codemodPath = path.join(codemodsPath, codemod);
@@ -0,0 +1 @@
1
+ "use strict";const i=(s,a)=>{const l=a.jscodeshift,n=l(s.source);return n.findJSXElements("Avatar").forEach(c=>{l(c).find(l.JSXAttribute).forEach(e=>{const o=e.node.name;if(o.name==="size")switch(e.node.value.value){case"xs":e.node.value.value="1";break;case"sm":case"md":e.node.value.value="2";break;case"lg":e.node.value.value="4";break}if(o.name==="color"){const u=e.node.value.value;e.node.value.value=u.split("-")[0]}const v=e.node.value.value;["blue","teal","purple","red","orange"].includes(v)||(e.node.value.value="blue"),o.name==="iconName"&&(o.name="src")})}),n.toSource()};module.exports=i;
@@ -0,0 +1 @@
1
+ "use strict";const m=(l,s)=>{const o=s.jscodeshift,i=o(l.source);return i.findJSXElements("Button").forEach(a=>{o(a).find(o.JSXAttribute).forEach(e=>{const n=e.node.name;["color","transparent","filled"].includes(n.name)&&o(e).remove(),n.name==="size"&&(e.node.value.value==="sm"&&e.node.value.type==="StringLiteral"?e.node.value.value="compact":e.node.value.type==="JSXExpressionContainer"&&e.node.value.expression.value==="sm"?e.node.value.expression.value="compact":e.node.value.type==="StringLiteral"?e.node.value.value="normal":e.node.value.type==="JSXExpressionContainer"&&(e.node.value.expression.value="normal")),n.name==="type"&&e.node.value.value==="link"&&e.node.value.type==="Literal"&&(e.node.value.value="tertiary"),n.name==="loading"&&(n.name="isLoading"),n.name==="disabled"&&(n.name="isDisabled"),n.name==="buttonType"&&(n.name="htmlType"),n.name==="iconLeft"&&(n.name="iconLeftName"),n.name==="iconRight"&&(n.name="iconRightName")})}),i.toSource()};module.exports=m;
@@ -0,0 +1 @@
1
+ "use strict";const c=(s,r)=>{const e=r.jscodeshift,i=e(s.source);return i.findJSXElements("CheckBox").forEach(t=>{e(t).find(e.JSXAttribute).forEach(o=>{const n=o.node.name;n.name==="filled"&&e(o).remove(),n.name==="label"&&(n.name="labelConfig",o.node.value=e.jsxExpressionContainer(e.objectExpression([e.property("init",e.identifier("helpText"),o.node.value.expression||e.stringLiteral(""))]))),n.name==="checked"&&(n.name="isSelected")})}),i.toSource({quote:"single"})};module.exports=c;
@@ -0,0 +1 @@
1
+ "use strict";const i=(r,c)=>{const a=c.jscodeshift,m=a(r.source);return m.find(a.ImportDeclaration).filter(n=>n.node.source.value==="@orfium/ictinus").forEach(n=>{n.node.specifiers.forEach(e=>{e.imported&&e.imported.name==="Chip"&&(e.imported.name="Tag")})}),m.find(a.JSXElement).forEach(n=>{const e=n.node.openingElement,l=n.node.closingElement;e.name.name==="Chip"&&(e.name.name="Tag",l&&l.name&&(l.name.name="Tag"),e.attributes.forEach(o=>{o.name&&o.name.name==="fill"&&(o.value.value==="neutralWhite"&&(o.value.value="neutral"),o.name.name="color")}))}),m.toSource({quote:"single"})};module.exports=i;
@@ -0,0 +1 @@
1
+ "use strict";const c=(m,r)=>{const o=r.jscodeshift,a=o(m.source);return a.find(o.ImportDeclaration).filter(n=>n.node.source.value.includes("@orfium/ictinus")).forEach(n=>{n.node.specifiers.forEach(e=>{e.imported&&e.imported.name==="MenuItem"&&(e.imported.name="NavigationMenuItem"),e.local&&e.local.name==="MenuItem"&&(e.local.name="NavigationMenuItem")})}),a.find(o.Identifier,{name:"MenuItem"}).forEach(n=>{const e=n.parentPath;e&&e.node.type==="ImportSpecifier"&&e.parentPath.node.source.value.includes("@orfium/ictinus")&&(n.node.name="NavigationMenuItem")}),a.find(o.ImportDeclaration).filter(n=>n.node.source.value==="@orfium/ictinus").forEach(n=>{n.node.specifiers.forEach(e=>{e.imported&&e.imported.name==="Drawer"&&(e.imported.name="Navigation")})}),a.find(o.JSXElement).forEach(n=>{const e=n.node.openingElement,t=n.node.closingElement;e.name.name==="Drawer"&&(e.name.name="Navigation",t&&t.name&&(t.name.name="Navigation"),e.attributes.forEach(i=>{i.name&&i.name.name==="expanded"&&(i.name.name="isExpanded")}))}),a.toSource({quote:"single"})};module.exports=c;
@@ -0,0 +1 @@
1
+ "use strict";const m=(i,o)=>{const n=o.jscodeshift,t=n(i.source);return t.findJSXElements("Filter").forEach(a=>{n(a).find(n.JSXAttribute).forEach(s=>{const e=s.node.name;["styleType"].includes(e.name)&&n(s).remove(),e.name==="multi"&&(e.name="isMulti"),e.name==="disabled"&&(e.name="isDisabled"),e.name==="selectedItem"&&(e.name="selectedFilter"),e.name==="onSelect"&&(e.name="onChange")})}),t.toSource()};module.exports=m;
@@ -0,0 +1 @@
1
+ "use strict";const S=(a,l)=>{const e=l.jscodeshift,g=e(a.source),r={"theme.spacing.xsm":"theme.globals.spacing.get('3')","theme.spacing.sm":"theme.globals.spacing.get('4')","theme.spacing.md":"theme.globals.spacing.get('6')","theme.spacing.lg":"theme.globals.spacing.get('8')","theme.spacing.xl":"theme.globals.spacing.get('9')","props.theme.spacing.xsm":"props.theme.globals.spacing.get('3')","props.theme.spacing.sm":"props.theme.globals.spacing.get('4')","props.theme.spacing.md":"props.theme.globals.spacing.get('6')","props.theme.spacing.lg":"props.theme.globals.spacing.get('8')","props.theme.spacing.xl":"props.theme.globals.spacing.get('9')","theme.typography.weights.regular":"theme.globals.typography.fontWeight.get('regular')","theme.typography.weights.medium":"theme.globals.typography.fontWeight.get('medium')","theme.typography.weights.bold":"theme.globals.typography.fontWeight.get('bold')","props.theme.typography.weights.regular":"props.theme.globals.typography.fontWeight.get('regular')","props.theme.typography.weights.medium":"props.theme.globals.typography.fontWeight.get('medium')","props.theme.typography.weights.bold":"props.theme.globals.typography.fontWeight.get('bold')","theme.typography.fontSizes['10']":"theme.globals.typography.fontSize.get('1')","theme.typography.fontSizes['11']":"theme.globals.typography.fontSize.get('1')","theme.typography.fontSizes['12']":"theme.globals.typography.fontSize.get('2')","theme.typography.fontSizes['13']":"theme.globals.typography.fontSize.get('3')","theme.typography.fontSizes['14']":"theme.globals.typography.fontSize.get('3')","theme.typography.fontSizes['15']":"theme.globals.typography.fontSize.get('4')","theme.typography.fontSizes['16']":"theme.globals.typography.fontSize.get('4')","theme.typography.fontSizes['20']":"theme.globals.typography.fontSize.get('7')","theme.typography.fontSizes['22']":"theme.globals.typography.fontSize.get('7')","theme.typography.fontSizes['24']":"theme.globals.typography.fontSize.get('8')","theme.typography.fontSizes['28']":"theme.globals.typography.fontSize.get('9')","theme.typography.fontSizes['32']":"theme.globals.typography.fontSize.get('10')","theme.typography.fontSizes[10]":"theme.globals.typography.fontSize.get('1')","theme.typography.fontSizes[11]":"theme.globals.typography.fontSize.get('1')","theme.typography.fontSizes[12]":"theme.globals.typography.fontSize.get('2')","theme.typography.fontSizes[13]":"theme.globals.typography.fontSize.get('3')","theme.typography.fontSizes[14]":"theme.globals.typography.fontSize.get('3')","theme.typography.fontSizes[15]":"theme.globals.typography.fontSize.get('4')","theme.typography.fontSizes[16]":"theme.globals.typography.fontSize.get('4')","theme.typography.fontSizes[20]":"theme.globals.typography.fontSize.get('7')","theme.typography.fontSizes[22]":"theme.globals.typography.fontSize.get('7')","theme.typography.fontSizes[24]":"theme.globals.typography.fontSize.get('8')","theme.typography.fontSizes[28]":"theme.globals.typography.fontSize.get('9')","theme.typography.fontSizes[32]":"theme.globals.typography.fontSize.get('10')","props.theme.typography.fontSizes['10']":"props.theme.globals.typography.fontSize.get('1')","props.theme.typography.fontSizes['11']":"props.theme.globals.typography.fontSize.get('1')","props.theme.typography.fontSizes['12']":"props.theme.globals.typography.fontSize.get('2')","props.theme.typography.fontSizes['13']":"props.theme.globals.typography.fontSize.get('3')","props.theme.typography.fontSizes['14']":"props.theme.globals.typography.fontSize.get('3')","props.theme.typography.fontSizes['15']":"props.theme.globals.typography.fontSize.get('4')","props.theme.typography.fontSizes['16']":"props.theme.globals.typography.fontSize.get('4')","props.theme.typography.fontSizes['20']":"props.theme.globals.typography.fontSize.get('7')","props.theme.typography.fontSizes['22']":"props.theme.globals.typography.fontSize.get('7')","props.theme.typography.fontSizes['24']":"props.theme.globals.typography.fontSize.get('8')","props.theme.typography.fontSizes['28']":"props.theme.globals.typography.fontSize.get('9')","props.theme.typography.fontSizes['32']":"props.theme.globals.typography.fontSize.get('10')","props.theme.typography.fontSizes[10]":"props.theme.globals.typography.fontSize.get('1')","props.theme.typography.fontSizes[11]":"props.theme.globals.typography.fontSize.get('1')","props.theme.typography.fontSizes[12]":"props.theme.globals.typography.fontSize.get('2')","props.theme.typography.fontSizes[13]":"props.theme.globals.typography.fontSize.get('3')","props.theme.typography.fontSizes[14]":"props.theme.globals.typography.fontSize.get('3')","props.theme.typography.fontSizes[15]":"props.theme.globals.typography.fontSize.get('4')","props.theme.typography.fontSizes[16]":"props.theme.globals.typography.fontSize.get('4')","props.theme.typography.fontSizes[20]":"props.theme.globals.typography.fontSize.get('7')","props.theme.typography.fontSizes[22]":"props.theme.globals.typography.fontSize.get('7')","props.theme.typography.fontSizes[24]":"props.theme.globals.typography.fontSize.get('8')","props.theme.typography.fontSizes[28]":"props.theme.globals.typography.fontSize.get('9')","props.theme.typography.fontSizes[32]":"props.theme.globals.typography.fontSize.get('10')","theme.elevation['01']":"theme.globals.elevation['01']","theme.elevation['02']":"theme.globals.elevation['02']","theme.elevation['03']":"theme.globals.elevation['03']","props.theme.elevation['01']":"props.theme.globals.elevation['01']","props.theme.elevation['02']":"props.theme.globals.elevation['02']","props.theme.elevation['03']":"props.theme.globals.elevation['03']","theme.palette.white":"theme.globals.oldColors.white","theme.palette.black":"theme.globals.oldColors.black","theme.palette['white']":"theme.globals.oldColors['white']","theme.palette['black']":"theme.globals.oldColors['black']","theme.palette.primary[400]":"theme.globals.oldColors.primary[400]","props.theme.palette.white":"props.theme.globals.oldColors.white","props.theme.palette.black":"props.theme.globals.oldColors.black","props.theme.palette['white']":"props.theme.globals.oldColors['white']","props.theme.palette['black']":"props.theme.globals.oldColors['black']","props.theme.palette.primary[400]":"props.theme.globals.oldColors.primary[400]"},y=t=>{const o=t.split(".");let p=e.identifier(o[0]);for(let h=1;h<o.length;h++){const s=o[h];if(s.includes("(")){const i=s.substring(0,s.indexOf("(")),m=s.substring(s.indexOf("(")+1,s.lastIndexOf(")")).split(",").map(n=>{const f=n.trim().replace(/^['"]|['"]$/g,"");return e.literal(f)});p=e.callExpression(e.memberExpression(p,e.identifier(i)),m)}else p=e.memberExpression(p,e.identifier(s))}return p};return g.find(e.MemberExpression).forEach(t=>{let o=e(t).toSource();if(t.node.property.type==="Literal"&&!isNaN(t.node.property.value)&&(o=`${e(t.node.object).toSource()}[${t.node.property.value}]`),r[o]){const p=y(r[o]);e(t).replaceWith(p)}}),g.find(e.ImportDeclaration).forEach(t=>{t.node.source.value.startsWith("@orfium/ictinus/")&&(t.node.source.value="@orfium/ictinus")}),g.toSource()};module.exports=S;
@@ -0,0 +1 @@
1
+ "use strict";const m=(l,s)=>{const o=s.jscodeshift,i=o(l.source);return i.findJSXElements("IconButton").forEach(u=>{o(u).find(o.JSXAttribute).forEach(e=>{const n=e.node.name;["color","transparent","filled","iconSize"].includes(n.name)&&o(e).remove(),n.name==="size"&&(e.node.value.value==="sm"&&e.node.value.type==="StringLiteral"?e.node.value.value="compact":e.node.value.type==="JSXExpressionContainer"&&e.node.value.expression.value==="sm"?e.node.value.expression.value="compact":e.node.value.type==="StringLiteral"?e.node.value.value="normal":e.node.value.type==="JSXExpressionContainer"&&(e.node.value.expression.value="normal")),n.name==="type"&&e.node.value.value==="link"&&e.node.value.type==="Literal"&&(e.node.value.value="tertiary"),n.name==="loading"&&(n.name="isLoading"),n.name==="disabled"&&(n.name="isDisabled"),n.name==="name"&&(n.name="iconName"),n.name==="buttonType"&&(n.name="htmlType"),n.name==="type"&&(n.name="buttonType")})}),i.toSource()};module.exports=m;
@@ -0,0 +1 @@
1
+ "use strict";const i=(n,r)=>{const o=r.jscodeshift,t=o(n.source);return t.findJSXElements("Icon").forEach(s=>{o(s).find(o.JSXAttribute).forEach(e=>{const c=e.node.name;["variant"].includes(c.name)&&o(e).remove()})}),t.toSource()};module.exports=i;
@@ -0,0 +1 @@
1
+ "use strict";const i=(m,c)=>{const r=c.jscodeshift,a=r(m.source);return a.find(r.ImportDeclaration).filter(o=>o.node.source.value==="@orfium/ictinus").forEach(o=>{o.node.specifiers.forEach(n=>{n.imported&&n.imported.name==="Loader"&&(n.imported.name="ProgressIndicator")})}),a.find(r.JSXElement).forEach(o=>{const n=o.node.openingElement;n.name.name==="Loader"&&(n.name.name="ProgressIndicator",n.attributes.forEach(e=>{if(e.name&&e.name.name==="type"){const s=e.value.value;s==="dots"||s==="indeterminate"?e.value.value="linear":s==="spinner"&&(e.value.value="circular")}else e.name&&e.name.name==="color"&&r(e).remove()}))}),a.toSource({quote:"single"})};module.exports=i;
@@ -0,0 +1 @@
1
+ "use strict";const d=(i,c)=>{const e=c.jscodeshift,o=e(i.source);return o.findJSXElements("Menu").forEach(n=>{e(n).find(e.JSXAttribute).forEach(t=>{const s=t.node.name.name;["color","buttonText","items"].includes(s)&&e(t).remove(),s==="onSelect"&&(t.node.name.name="onAction")});const r=e.jsxElement(e.jsxOpeningElement(e.jsxIdentifier("ListItem"),[],!0),e.jsxClosingElement(e.jsxIdentifier("ListItem")),[e.jsxText("Static Item")]);n.node.children||(n.node.children=[]),n.node.children.push(r),console.log("Updated Menu Component:",n.node)}),o.toSource({quote:"single"})};module.exports=d;
@@ -0,0 +1 @@
1
+ "use strict";const i=(e,c)=>{const t=c.jscodeshift,o=t(e.source);return o.findJSXElements("InlineNotification").forEach(r=>{t(r).find(t.JSXAttribute).forEach(s=>{const n=s.node.name;n.name==="withIcon"&&(n.name="hasIcon")})}),o.toSource()};module.exports=i;
@@ -0,0 +1 @@
1
+ "use strict";const m=(o,l)=>{const n=l.jscodeshift,a=n(o.source);return a.find(n.JSXElement).forEach(i=>{const s=i.node.openingElement;s.name.name==="Pagination"&&s.attributes.forEach(e=>{e.name&&e.name.name==="nextPageDisabled"?e.name.name="isNextPageDisabled":e.name&&e.name.name==="prevPageDisabled"?e.name.name="isPrevPageDisabled":e.name&&e.name.name==="hideEnhancedPaginationButtons"&&(e.name.name="isEnhancedPaginationVisible",e.value.type==="JSXExpressionContainer"?e.value=n.jsxExpressionContainer(n.logicalExpression("!",e.value.expression)):e.value.type==="BooleanLiteral"&&(e.value=n.booleanLiteral(!e.value.value)))})}),a.toSource({quote:"single"})};module.exports=m;
@@ -0,0 +1 @@
1
+ "use strict";const i=(n,r)=>{const e=r.jscodeshift,o=e(n.source);return o.findJSXElements("Radio").forEach(s=>{e(s).find(e.JSXAttribute).forEach(t=>{const c=t.node.name;["filled","name","required"].includes(c.name)&&e(t).remove()})}),o.toSource({quote:"single"})};module.exports=i;
@@ -0,0 +1 @@
1
+ "use strict";const u=(n,r)=>{const e=r.jscodeshift,o=e(n.source);return o.findJSXElements("RadioGroup").forEach(s=>{e(s).find(e.JSXAttribute).forEach(t=>{const c=t.node.name;["defaultValue","name"].includes(c.name)&&e(t).remove()})}),o.toSource({quote:"single"})};module.exports=u;
@@ -0,0 +1 @@
1
+ "use strict";const i=(c,a)=>{const o=a.jscodeshift,t=o(c.source);return t.find(o.ImportDeclaration).filter(e=>e.node.source.value==="@orfium/ictinus").forEach(e=>{e.node.specifiers.forEach(n=>{n.imported&&n.imported.name==="SearchField"&&(n.imported.name="Search")})}),t.find(o.JSXElement).forEach(e=>{const n=e.node.openingElement,r=e.node.closingElement;n.name.name==="SearchField"&&(n.name.name="Search",r&&r.name&&(r.name.name="Search"))}),t.toSource({quote:"single"})};module.exports=i;
@@ -0,0 +1 @@
1
+ "use strict";const c=(r,u)=>{const e=u.jscodeshift,l=e(r.source);return l.findJSXElements("Select").forEach(o=>{let s=null,n=null;if(e(o).find(e.JSXAttribute).forEach(t=>{const i=t.node.name.name;["defaultValue","rightIcon","leftIcon","locked","lean","styleType","dark","status","hasMinWidthCompat","onClearAllValues","multiValues","hintMsg"].includes(i)&&(i==="status"&&(n=t.node.value),i==="hintMsg"&&(s=t.node.value),e(t).remove());const a={highlightSearch:"hasHighlightSearch",multi:"isMulti",disabled:"isDisabled",creatable:"isCreatable",handleSelectedOption:"onChange",selectedOptions:"selectedOption"};i in a&&(t.node.name.name=a[i])}),s||n){const t=e.jsxAttribute(e.jsxIdentifier("status"),e.jsxExpressionContainer(e.objectExpression([e.objectProperty(e.identifier("type"),n.value==="hint"||n.value==="success"?e.literal("normal"):n||e.literal(null)),e.objectProperty(e.identifier("hintMessage"),s||e.literal(null))])));o.node.openingElement.attributes.push(t)}}),l.toSource({quote:"single"})};module.exports=c;
@@ -0,0 +1 @@
1
+ "use strict";const r=(i,l)=>{const e=l.jscodeshift,s=e(i.source);return s.findJSXElements("Switch").forEach(t=>{let o=null;e(t).find(e.JSXAttribute).forEach(n=>{const c=n.node.name.name;c==="labelPlacement"&&(o=n.node.value,n.node.name.name="labelConfig",n.node.value=e.jsxExpressionContainer(e.objectExpression([e.objectProperty(e.identifier("placement"),o.expression||o)]))),c==="checked"&&(n.node.name.name="isSelected")})}),s.toSource({quote:"single"})};module.exports=r;
@@ -0,0 +1 @@
1
+ "use strict";const o=(d,i)=>{const a=i.jscodeshift,n=a(d.source);return n.findJSXElements("Table").forEach(t=>{a(t).find(a.JSXAttribute).forEach(s=>{const e=s.node.name;e.name==="padded"&&(e.name="isPadded"),e.name==="fixedHeader"&&(e.name="hasFixedHeader"),e.name==="fixedCTA"&&(e.name="hasFixedCTA"),e.name==="initialExpanded"&&(e.name="isInitiallyExpanded")})}),n.toSource()};module.exports=o;
@@ -0,0 +1 @@
1
+ "use strict";const u=(d,l)=>{const e=l.jscodeshift,t=e(d.source);return t.findJSXElements("TextArea").forEach(o=>{let s=null;if(e(o).find(e.JSXAttribute).forEach(n=>{const i=n.node.name.name;i==="hintMsg"?(s=n.node.value.expression||n.node.value,e(n).remove()):["styleType","status"].includes(i)&&e(n).remove();const r={required:"isRequired",disabled:"isDisabled",resizeEnabled:"isResizeEnabled"};i in r&&(n.node.name.name=r[i])}),s){const n=e.jsxAttribute(e.jsxIdentifier("hint"),e.jsxExpressionContainer(e.objectExpression([e.objectProperty(e.identifier("type"),e.literal("normal")),e.objectProperty(e.identifier("hintMessage"),s)])));o.node.openingElement.attributes.push(n)}}),t.toSource({quote:"single"})};module.exports=u;
@@ -0,0 +1 @@
1
+ "use strict";const c=(r,d)=>{const e=d.jscodeshift,o=e(r.source);return o.findJSXElements("TextField").forEach(u=>{let i=null;e(u).find(e.JSXAttribute).forEach(n=>{const s=n.node.name.name;s==="status"&&(i=n.node.value.expression||n.node.value,e(n).remove()),["rightIcon","leftIcon","locked","lean","styleType"].includes(s)&&e(n).remove();const l={multi:"isMulti",disabled:"isDisabled",readOnly:"isReadOnly",required:"isRequired"};if(s in l&&(n.node.name.name=l[s]),s==="hintMsg"){const t=n.node.value.expression||n.node.value;n.node.name.name="status",n.node.value=e.jsxExpressionContainer(e.objectExpression([e.objectProperty(e.identifier("type"),i||e.literal(null)),e.objectProperty(e.identifier("hintMessage"),t)]))}})}),o.toSource({quote:"single"})};module.exports=c;
@@ -0,0 +1 @@
1
+ "use strict";const m=(r,a)=>{const t=a.jscodeshift,o=t(r.source);return o.find(t.JSXElement,{openingElement:{name:{name:"Tooltip"}}}).forEach(s=>{const i=["size","isTransparent"];s.node.openingElement.attributes=s.node.openingElement.attributes.filter(e=>{if(!e.name||!e.name.name)return!0;const n=e.name.name;return n==="interactive"?e.name.name="isInteractive":n==="delay"&&(e.name.name="delayIn"),!i.includes(n)})}),o.toSource({quote:"single"})};module.exports=m;
@@ -0,0 +1 @@
1
+ "use strict";const i={chevronLargeRight:"chevronRight",chevronSmallRight:"chevronRight",arrowDown:"chevronDown",arrowRight:"chevronRight",dotsVertical:"moreOptions",restart:"redo",alert:"warning",auto:"settings",calendarFilled:"calendar",conflicts:"conflict",digitalUse:"digital",earnings2:"earnings",entity:"entities",externalLinkV2:"link",fatArrowLeft:"arrowLeft",fatArrowRight:"arrowRight",globalItem:"review",infoFilled:"info",licence:"license",musicNote:"asset",triangleWarning:"warning",view:"eye"},t=(a,l)=>{const o=l.jscodeshift,r=o(a.source),s=e=>{if(e&&e.name&&e.name.name==="name")if(e.value.type==="JSXExpressionContainer"){const n=e.value.expression;n.type==="StringLiteral"&&i[n.value]?e.value.expression=o.stringLiteral(i[n.value]):n.type==="Literal"&&i[n.value]&&(e.value.expression=o.literal(i[n.value]))}else e.value.type==="StringLiteral"&&i[e.value.value]&&(e.value=o.stringLiteral(i[e.value.value]))};return r.find(o.JSXElement,{openingElement:{name:{name:e=>["Icon","IconButton"].includes(e)}}}).forEach(e=>{e.node.openingElement.attributes.forEach(s)}),r.toSource({quote:"single"})};module.exports=t;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orfium/ictinus",
3
- "version": "5.6.0",
3
+ "version": "5.6.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.umd.cjs",
6
6
  "module": "./dist/index.js",
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
-