dap-design-system 0.42.0 → 0.43.0

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/README.md CHANGED
@@ -35,6 +35,42 @@ Start using the components in your application:
35
35
 
36
36
  That's it! You're now ready to start building beautiful web applications with the DÁP Design System Component Library.
37
37
 
38
+ ## Importing Components
39
+
40
+ The design system supports multiple import strategies for optimal bundle sizes:
41
+
42
+ ### Tree-Shakeable Imports (Recommended)
43
+
44
+ Import only the components you need to minimize bundle size:
45
+
46
+ ```javascript
47
+ // Import components (excludes icons - saves ~130KB)
48
+ import { DapDSButton, DapDSInput } from 'dap-design-system/components'
49
+
50
+ // Import icons separately when needed (excludes components - saves ~1MB)
51
+ import { SystemAddLine, ArrowsArrowDownLine } from 'dap-design-system/icons'
52
+
53
+ // Import React wrappers
54
+ import { DapDSButton } from 'dap-design-system/react'
55
+ ```
56
+
57
+ ### Full Bundle Import (Backward Compatible)
58
+
59
+ Import everything (components + icons):
60
+
61
+ ```javascript
62
+ // Imports all components and icons (~1.1MB total)
63
+ import { DapDSButton, SystemAddLine } from 'dap-design-system'
64
+ ```
65
+
66
+ **Bundle Sizes:**
67
+ - **Main entry**: ~9KB (re-exports components and icons)
68
+ - **Components**: ~1MB (all components without icons)
69
+ - **Icons**: ~130KB (all icons without components)
70
+ - **React wrappers**: ~38KB
71
+
72
+ Using the tree-shakeable imports (`/components` and `/icons`) allows modern bundlers to optimize your final bundle size based on what you actually use.
73
+
38
74
  ## Benefits of web components
39
75
 
40
76
  Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. Custom components and widgets build on the Web Component standards, will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML.