@bcc-code/component-library-vue 0.5.0 → 0.6.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
@@ -135,6 +135,50 @@ pnpm run build # Typecheck, types, and Vite build
135
135
  pnpm run build:vite # Vite build only (includes theme.css)
136
136
  ```
137
137
 
138
+ ### Patching PrimeVue icons
139
+
140
+ Some PrimeVue icons are replaced with [@bcc-code/icons-vue](https://www.npmjs.com/package/@bcc-code/icons-vue) so the library uses BCC iconography. The patch is maintained with pnpm’s built-in patching.
141
+
142
+ **1. Start or re-enter the patch**
143
+
144
+ ```bash
145
+ pnpm patch @primevue/icons
146
+ ```
147
+
148
+ pnpm will print a path to a writable copy of the package (e.g. `node_modules/.pnpm_patches/@primevue/icons@4.5.4`).
149
+
150
+ **2. Edit the icon mappings**
151
+
152
+ - **Main barrel:** Edit `index.mjs` in that folder. Each line that re-exports from `@bcc-code/icons-vue` defines one override, e.g.:
153
+
154
+ ```js
155
+ export { ExpandMoreIcon as ChevronDownIcon } from '@bcc-code/icons-vue';
156
+ ```
157
+
158
+ - **Per-icon files:** After changing the main `index.mjs`, run the sync script so each icon’s own `index.mjs` (e.g. `chevrondown/index.mjs`) is updated to use the same BCC component:
159
+
160
+ ```bash
161
+ pnpm run sync:primevue-icon-patches
162
+ ```
163
+
164
+ That way both `@primevue/icons` and `@primevue/icons/chevrondown` (and other overridden icons) use the BCC icon.
165
+
166
+ **3. Save the patch**
167
+
168
+ From the **project root** (where `package.json` lives), run:
169
+
170
+ ```bash
171
+ pnpm patch-commit <path-pnpm-printed-in-step-1>
172
+ ```
173
+
174
+ Example, if pnpm printed `~/Projects/bcc-design/component-library/node_modules/.pnpm_patches/@primevue/icons@4.5.4`:
175
+
176
+ ```bash
177
+ pnpm patch-commit node_modules/.pnpm_patches/@primevue/icons@4.5.4
178
+ ```
179
+
180
+ The patch is written to `patches/@primevue__icons.patch` and applied automatically on `pnpm install`.
181
+
138
182
  ## License
139
183
 
140
184
  Apache-2.0