@brightspot/ui 1.0.0-alpha.2 → 1.0.0-alpha.4

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/dist/LucideDynamicLoader.js +21 -0
  2. package/dist/LucideDynamicLoader.ts +23 -0
  3. package/dist/storybook/342.9186a774.iframe.bundle.js +2 -0
  4. package/dist/storybook/342.9186a774.iframe.bundle.js.LICENSE.txt +6 -0
  5. package/dist/storybook/{648.0f0c2ea1.iframe.bundle.js → 648.0f339b09.iframe.bundle.js} +1 -1
  6. package/dist/storybook/689.bf58321f.iframe.bundle.js +95 -0
  7. package/dist/storybook/689.bf58321f.iframe.bundle.js.map +1 -0
  8. package/dist/storybook/906.0b06b831.iframe.bundle.js +405 -0
  9. package/dist/storybook/{906.c7ad56cf.iframe.bundle.js.map → 906.0b06b831.iframe.bundle.js.map} +1 -1
  10. package/dist/storybook/936.9ad0e832.iframe.bundle.js +1 -0
  11. package/dist/storybook/iframe.html +3 -3
  12. package/dist/storybook/index.json +1 -1
  13. package/dist/storybook/main.60eb2a33.iframe.bundle.js +1 -0
  14. package/dist/storybook/project.json +1 -1
  15. package/dist/storybook/runtime~main.0d0d1d44.iframe.bundle.js +1 -0
  16. package/dist/storybook/sb-addons/essentials-backgrounds-4/manager-bundle.js +1 -1
  17. package/dist/storybook/sb-addons/essentials-controls-1/manager-bundle.js +8 -8
  18. package/dist/storybook/sb-addons/essentials-docs-3/manager-bundle.js +4 -4
  19. package/dist/storybook/sb-addons/essentials-measure-7/manager-bundle.js +1 -1
  20. package/dist/storybook/sb-addons/essentials-outline-8/manager-bundle.js +1 -1
  21. package/dist/storybook/sb-addons/essentials-viewport-5/manager-bundle.js +1 -1
  22. package/dist/storybook/sb-manager/globals-module-info.js +1 -0
  23. package/dist/storybook/sb-manager/globals-runtime.js +10372 -9836
  24. package/dist/storybook/sb-manager/runtime.js +119 -119
  25. package/dist/storybook/stories-Badge-stories.52b61cf3.iframe.bundle.js.map +1 -1
  26. package/dist/storybook/stories-Button-stories.777d0529.iframe.bundle.js.map +1 -1
  27. package/dist/storybook/{stories-Colors-stories.324d20d0.iframe.bundle.js → stories-Colors-stories.927fecc8.iframe.bundle.js} +2 -2
  28. package/dist/storybook/{stories-Colors-stories.324d20d0.iframe.bundle.js.map → stories-Colors-stories.927fecc8.iframe.bundle.js.map} +1 -1
  29. package/dist/storybook/stories-Icon-stories.f2eb249f.iframe.bundle.js +8 -0
  30. package/dist/storybook/stories-Icon-stories.f2eb249f.iframe.bundle.js.map +1 -0
  31. package/dist/storybook/{stories-ScrollShadow-stories.252ec9e7.iframe.bundle.js → stories-ScrollShadow-stories.ddf1e99b.iframe.bundle.js} +4 -4
  32. package/dist/storybook/stories-ScrollShadow-stories.ddf1e99b.iframe.bundle.js.map +1 -0
  33. package/dist/tailwind-plugin-icon.js +4 -133
  34. package/dist/tailwind-plugin-icon.ts +4 -147
  35. package/dist/tailwind.config.js +6 -1
  36. package/dist/tailwind.config.ts +6 -1
  37. package/dist/util/string.js +14 -0
  38. package/dist/util/svg.js +13 -0
  39. package/package.json +1 -1
  40. package/dist/storybook/689.b6901a43.iframe.bundle.js +0 -95
  41. package/dist/storybook/689.b6901a43.iframe.bundle.js.map +0 -1
  42. package/dist/storybook/906.c7ad56cf.iframe.bundle.js +0 -405
  43. package/dist/storybook/936.7e4d4897.iframe.bundle.js +0 -1
  44. package/dist/storybook/main.7b0cb99d.iframe.bundle.js +0 -1
  45. package/dist/storybook/runtime~main.a1926d89.iframe.bundle.js +0 -1
  46. package/dist/storybook/stories-ScrollShadow-stories.252ec9e7.iframe.bundle.js.map +0 -1
  47. /package/dist/storybook/{689.b6901a43.iframe.bundle.js.LICENSE.txt → 689.bf58321f.iframe.bundle.js.LICENSE.txt} +0 -0
  48. /package/dist/storybook/{906.c7ad56cf.iframe.bundle.js.LICENSE.txt → 906.0b06b831.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -0,0 +1,21 @@
1
+ import * as LucideIcons from 'lucide-static';
2
+ import icons from 'lucide-static/font/info.json';
3
+ import { kebabToPascal } from '../src/util/string';
4
+ import { addNameSpaceXML, encodeSVG } from '../src/util/svg';
5
+ export function getIcon(iconName) {
6
+ try {
7
+ const kebabName = iconName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
8
+ const pascalName = kebabToPascal(kebabName);
9
+ if (LucideIcons[pascalName]) {
10
+ const svg = LucideIcons[pascalName];
11
+ const encodedSvg = encodeSVG(addNameSpaceXML(svg));
12
+ return {
13
+ compat: icons[kebabName]?.encodedCode || '',
14
+ iconSvg: encodedSvg,
15
+ };
16
+ }
17
+ }
18
+ catch (e) {
19
+ console.error('Error loading Lucide icon ${iconName}:', e);
20
+ }
21
+ }
@@ -0,0 +1,23 @@
1
+ import * as LucideIcons from 'lucide-static'
2
+ import icons from 'lucide-static/font/info.json'
3
+ import { kebabToPascal } from '../src/util/string'
4
+ import { addNameSpaceXML, encodeSVG } from '../src/util/svg'
5
+
6
+ export function getIcon(iconName: string) {
7
+ try {
8
+ const kebabName = iconName.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
9
+ const pascalName = kebabToPascal(kebabName)
10
+
11
+ if (LucideIcons[pascalName as keyof typeof LucideIcons]) {
12
+ const svg = LucideIcons[pascalName as keyof typeof LucideIcons] as string
13
+ const encodedSvg = encodeSVG(addNameSpaceXML(svg))
14
+
15
+ return {
16
+ compat: icons[kebabName as keyof typeof icons]?.encodedCode || '',
17
+ iconSvg: encodedSvg,
18
+ }
19
+ }
20
+ } catch (e) {
21
+ console.error('Error loading Lucide icon ${iconName}:', e)
22
+ }
23
+ }