@aleph-alpha/ui-library 5.4.0 → 5.5.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.
Files changed (33) hide show
  1. package/config.d.ts +9 -0
  2. package/config.js +12 -3
  3. package/dist/system/lib.js +6461 -6397
  4. package/dist/system/patterns/UiFloatActions/UiFloatActionItems.vue.d.ts +173 -2
  5. package/dist/system/patterns/UiFloatActions/floatActionItemContext.d.ts +15 -1
  6. package/dist/system/patterns/UiFloatActions/types.d.ts +25 -1
  7. package/dist/system/story-sidebar-icons.json +5 -1
  8. package/package.json +5 -3
  9. package/src/components/UiAutocomplete/UiAutocomplete.stories.ts +1 -0
  10. package/src/components/UiButton/UiButton.stories.ts +9 -9
  11. package/src/components/UiCheckbox/UiCheckbox.stories.ts +253 -0
  12. package/src/components/UiCheckbox/__tests__/UiCheckbox.test.ts +3 -18
  13. package/src/components/UiField/UiField.stories.ts +608 -1
  14. package/src/components/UiField/UiFieldDescription.vue +7 -2
  15. package/src/components/UiInput/UiInput.stories.ts +336 -2
  16. package/src/components/UiInput/__tests__/UiInput.test.ts +20 -28
  17. package/src/components/UiItem/UiItem.stories.ts +236 -1
  18. package/src/components/UiItem/__tests__/UiItem.test.ts +11 -72
  19. package/src/components/UiSnackbar/UiSnackbar.stories.ts +6 -6
  20. package/src/components/UiSnackbar/UiSnackbar.vue +4 -4
  21. package/src/components/UiSnackbar/UiSnackbarContent.vue +4 -4
  22. package/src/components/core/checkbox/Checkbox.vue +0 -1
  23. package/src/components/core/tabs/TabsTrigger.vue +1 -1
  24. package/src/patterns/UiDataTable/UiDataTable.stories.ts +495 -8
  25. package/src/patterns/UiDataTable/UiDataTableFilterMenu.vue +1 -1
  26. package/src/patterns/UiDataTable/__tests__/UiDataTable.test.ts +7 -184
  27. package/src/patterns/UiFloatActions/UiFloatActionItems.vue +138 -11
  28. package/src/patterns/UiFloatActions/UiFloatActions.stories.ts +890 -3
  29. package/src/patterns/UiFloatActions/__tests__/UiFloatActionItems.test.ts +46 -24
  30. package/src/patterns/UiFloatActions/floatActionItemContext.ts +16 -1
  31. package/src/patterns/UiFloatActions/types.ts +28 -1
  32. package/src/components/UiField/__tests__/UiFieldError.test.ts +0 -39
  33. package/src/patterns/UiFloatActions/__tests__/UiFloatActions.a11y.test.ts +0 -152
package/config.d.ts CHANGED
@@ -304,6 +304,15 @@ export declare const getSparkTokenPresetWithoutUiLibraryTypography: () => Preset
304
304
  * Combines theme customization with additional UnoCSS config.
305
305
  */
306
306
  export interface UiLibraryConfigOptions extends UiLibraryPresetOptions {
307
+ /**
308
+ * Include the legacy Spark design-system token preset (emits `--core-*`,
309
+ * `--brand-*`, `--semantic-*`, `--primitives-*` plus Spark spacing/shadow
310
+ * vars and utilities). Enabled by default for coexistence with
311
+ * `ds-components-vue`. Pure ui-library apps can set this to `false` so only
312
+ * ui-library theme tokens are emitted.
313
+ * @default true
314
+ */
315
+ includeSparkTokens?: boolean;
307
316
  /** Additional UnoCSS presets to append after the built-in ones */
308
317
  presets?: Preset[];
309
318
  /** Additional UnoCSS rules */
package/config.js CHANGED
@@ -646,6 +646,9 @@ const getBorderRadiusExactUtilityRules = () => {
646
646
  const className = key === 'DEFAULT' ? 'rounded' : `rounded-${key}`;
647
647
  entries.push([className, { 'border-radius': value }]);
648
648
  }
649
+ // Manual intermediate radius between the `xl` and `2xl` tokens; not sourced
650
+ // from Figma, so it's declared here rather than in tokens.json.
651
+ entries.push(['rounded-xl-2xl', { 'border-radius': '1.375rem' }]);
649
652
  return entriesToRules(entries);
650
653
  };
651
654
 
@@ -1255,6 +1258,7 @@ export const defineUiLibraryConfig = (options = {}) => {
1255
1258
  extend,
1256
1259
  theme,
1257
1260
  includeAllTokens,
1261
+ includeSparkTokens = true,
1258
1262
  themeMode,
1259
1263
  accessible,
1260
1264
  accessibleTheme,
@@ -1290,9 +1294,14 @@ export const defineUiLibraryConfig = (options = {}) => {
1290
1294
  color: 'neutral',
1291
1295
  darkSelector: darkSelector ?? 'html.dark',
1292
1296
  }),
1293
- // Spark Colors / Spacings / Box-shadow tokens. Typography utilities are
1294
- // filtered out where ui-library owns the same class names.
1295
- getSparkTokenPresetWithoutUiLibraryTypography(),
1297
+ // Legacy Spark Colors / Spacings / Box-shadow tokens, bundled for
1298
+ // coexistence with ds-components-vue. Typography utilities are filtered
1299
+ // out where ui-library owns the same class names. Pure ui-library apps
1300
+ // can opt out via `includeSparkTokens: false` so only ui-library theme
1301
+ // tokens are emitted.
1302
+ ...(includeSparkTokens
1303
+ ? [getSparkTokenPresetWithoutUiLibraryTypography()]
1304
+ : []),
1296
1305
  presetUiLibraryThemeFromTokens(themeOptions),
1297
1306
  presetUiLibraryUtils(),
1298
1307
  ...extraPresets,