sdaia-ui 1.0.0 → 1.0.2

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 (2) hide show
  1. package/dist/index.js +9 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -371,10 +371,18 @@ function transformImports(source, componentDir, utilsDir, componentName) {
371
371
  /from\s+(['"])\.\.\/\.\.\/lib\/cn\1/g,
372
372
  `from '${cnImportPath}'`
373
373
  );
374
+ result = result.replace(
375
+ /^([ \t]*)import\s+([A-Za-z_$][\w$]*)\s+from\s+(['"])\.\.\/\.\.\/icons\/[^'"]+\3\s*;?/gm,
376
+ `$1import { $2 } from 'sdaia-ui/icons';`
377
+ );
374
378
  result = result.replace(
375
379
  /from\s+(['"])\.\.\/\.\.\/icons\/[^'"]+\1/g,
376
380
  `from 'sdaia-ui/icons'`
377
381
  );
382
+ result = result.replace(
383
+ /^([ \t]*)import\s+([A-Za-z_$][\w$]*)\s+from\s+(['"])\.\.\/\.\.\/hooks\/[^'"]+\3\s*;?/gm,
384
+ `$1import { $2 } from 'sdaia-ui/hooks';`
385
+ );
378
386
  result = result.replace(
379
387
  /from\s+(['"])\.\.\/\.\.\/hooks\/[^'"]+\1/g,
380
388
  `from 'sdaia-ui/hooks'`
@@ -511,7 +519,7 @@ async function add(componentSlugs, options) {
511
519
 
512
520
  // src/index.ts
513
521
  var program = new Command();
514
- program.name("sdaia-ui").description("Install SDAIA Design System components into your project").version("1.0.0");
522
+ program.name("sdaia-ui").description("Install SDAIA Design System components into your project").version("1.0.2");
515
523
  program.command("init").description("Initialize your project for SDAIA Design System components").action(init);
516
524
  program.command("add").description("Add components to your project").argument("<components...>", "Component names (e.g. button modal tag)").option("--overwrite", "Overwrite existing components", false).action((components, options) => {
517
525
  add(components, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdaia-ui",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI for installing SDAIA Design System components into your project",
5
5
  "type": "module",
6
6
  "bin": {