@baloise/ds-styles 16.0.1 → 16.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.
package/bin/index.mjs CHANGED
@@ -177,19 +177,22 @@ async function migrateComponentStylesSheet({ log, isDirectory, directoryPath, fi
177
177
  const files = []
178
178
  if (isDirectory) {
179
179
  const relativePath = path.relative(process.cwd(), directoryPath)
180
- files.push(path.join(relativePath, '**', '*.scss').replace(/\\/g, '/'))
181
- files.push(path.join(relativePath, '**', '*.sass').replace(/\\/g, '/'))
180
+ files.push(path.join(relativePath, '**', '*.scss'))
181
+ files.push(path.join(relativePath, '**', '*.sass'))
182
182
  } else {
183
183
  const relativePath = path.relative(process.cwd(), filePath)
184
- files.push(relativePath.replace(/\\/g, '/'))
184
+ files.push(relativePath)
185
185
  }
186
186
 
187
187
  try {
188
188
  const result = await replace({
189
- files,
189
+ files: files.map(f => path.normalize(f)),
190
190
  from: [new RegExp(`@baloise/(ds-css|design-system-css)/sass/mixins`, 'g')],
191
191
  to: ['@baloise/ds-styles/sass/mixins'],
192
192
  allowEmptyPaths: true,
193
+ glob: {
194
+ windowsPathsNoEscape: true,
195
+ },
193
196
  })
194
197
  printResult({ result, log })
195
198
  } catch (error) {
@@ -205,16 +208,16 @@ async function migrateCSSVariables({ log, isDirectory, directoryPath, filePath }
205
208
  const files = []
206
209
  if (isDirectory) {
207
210
  const relativePath = path.relative(process.cwd(), directoryPath)
208
- files.push(path.join(relativePath, '**', '*.sass').replace(/\\/g, '/'))
209
- files.push(path.join(relativePath, '**', '*.scss').replace(/\\/g, '/'))
211
+ files.push(path.join(relativePath, '**', '*.sass'))
212
+ files.push(path.join(relativePath, '**', '*.scss'))
210
213
  } else {
211
214
  const relativePath = path.relative(process.cwd(), filePath)
212
- files.push(relativePath.replace(/\\/g, '/'))
215
+ files.push(relativePath)
213
216
  }
214
217
 
215
218
  try {
216
219
  const result = await replace({
217
- files,
220
+ files: files.map(f => path.normalize(f)),
218
221
  from: [
219
222
  ...replacementsCSSVariablesColors.from,
220
223
  ...replacementsCSSVariablesVarious.from,
@@ -232,6 +235,9 @@ async function migrateCSSVariables({ log, isDirectory, directoryPath, filePath }
232
235
  ...replacementsCSSVariablesInvertedPrimary.to,
233
236
  ],
234
237
  allowEmptyPaths: true,
238
+ glob: {
239
+ windowsPathsNoEscape: true,
240
+ },
235
241
  })
236
242
  printResult({ result, log })
237
243
  } catch (error) {
@@ -244,7 +250,7 @@ async function migrateCSSVariables({ log, isDirectory, directoryPath, filePath }
244
250
  }
245
251
 
246
252
  async function migrateGlobalStyleSheet({ globalStyleSheetPath, log }) {
247
- const files = globalStyleSheetPath.replace(/\\/g, '/')
253
+ const files = path.normalize(globalStyleSheetPath)
248
254
  try {
249
255
  const result = await replace({
250
256
  files,
@@ -271,6 +277,8 @@ async function migrateGlobalStyleSheet({ globalStyleSheetPath, log }) {
271
277
  new RegExp(`@baloise/(ds-css|design-system-css)/(sass|css)/radius`, 'g'),
272
278
  new RegExp(`@baloise/(ds-css|design-system-css)/(sass|css)/opacity`, 'g'),
273
279
  new RegExp(`@baloise/(ds-css|design-system-css)/(sass|css)/shadow`, 'g'),
280
+
281
+ new RegExp(`@baloise/(ds-css|design-system-css)/(sass|css)/theme-compact`, 'g'),
274
282
  ],
275
283
  to: [
276
284
  '@baloise/ds-styles/sass/all',
@@ -293,11 +301,16 @@ async function migrateGlobalStyleSheet({ globalStyleSheetPath, log }) {
293
301
  '@baloise/ds-styles/css/utilities/border',
294
302
  '@baloise/ds-styles/css/utilities/elevation',
295
303
  '@baloise/ds-styles/css/utilities/elevation',
304
+ '@baloise/ds-styles/css/themes/compact',
296
305
  ],
297
306
  allowEmptyPaths: true,
307
+ glob: {
308
+ windowsPathsNoEscape: true,
309
+ },
298
310
  })
299
311
  printResult({ result, log })
300
- let lines = (await fsp.readFile(files, 'utf-8')).split(/\r?\n/)
312
+ const content = await fsp.readFile(files, 'utf-8')
313
+ let lines = content.split(/\r?\n/)
301
314
  lines.push(`@import '@baloise/ds-styles/css/utilities/interaction';`)
302
315
  lines.push(`@import '@baloise/ds-styles/css/utilities/sizing';`)
303
316
  lines = lines.reduce((acc, line) => {
@@ -370,15 +383,15 @@ async function migrateInlineTemplates({ filePath, log, utilReplacers }) {
370
383
  async function migrateHtmlFiles({ filePath, log, utilReplacers }) {
371
384
  // check if path is directly one file
372
385
  const isFile = filePath.trim().endsWith('.html')
373
- let files = filePath.replace(/\\/g, '/')
386
+ let files = filePath
374
387
  if (!isFile) {
375
- files = path.join(`${files}`, '**', '*.html'.replace(/\\/g, '/'))
388
+ files = path.join(`${files}`, '**', '*.html')
376
389
  }
377
390
 
378
391
  try {
379
392
  const results = [
380
393
  await replace({
381
- files,
394
+ files: path.normalize(files),
382
395
  processor: input => {
383
396
  const $ = load(input)
384
397
  let content = input
@@ -402,6 +415,9 @@ async function migrateHtmlFiles({ filePath, log, utilReplacers }) {
402
415
  return content
403
416
  },
404
417
  allowEmptyPaths: true,
418
+ glob: {
419
+ windowsPathsNoEscape: true,
420
+ },
405
421
  }),
406
422
  ]
407
423
 
package/css/all.css CHANGED
@@ -600,7 +600,7 @@ fieldset {
600
600
  }
601
601
  /**
602
602
  * Do not edit directly
603
- * Generated on Wed, 13 Mar 2024 12:48:50 GMT
603
+ * Generated on Tue, 19 Mar 2024 12:56:36 GMT
604
604
  */
605
605
  :root {
606
606
  --bal-text-shadow-normal: 0px 0px 4px rgba(0, 0, 0, 0.15), 0px 4px 12px rgba(0, 0, 0, 0.25), 0px 0px 80px rgba(0, 0, 0, 0.5); /* Increases readability when used on a image background. */