@adyen/bento-mcp 0.3.0 → 0.4.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 (35) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/assets/components/data-grid/components/data-grid-cell-actions/data-grid-cell-actions.vue +1 -1
  3. package/dist/assets/components/data-grid/components/data-grid-row/data-grid-row.vue +1 -1
  4. package/dist/assets/components/data-grid/data-grid.docs.mdx +1 -1
  5. package/dist/assets/components/data-grid/data-grid.vue +1 -1
  6. package/dist/assets/components/date-picker/date-picker.vue +1 -1
  7. package/dist/assets/components/date-range-picker/components/date-range-picker-calendar/date-range-picker-calendar.vue +1 -1
  8. package/dist/assets/components/draggable/components/draggable-handle/draggable-handle.stories.ts +1 -0
  9. package/dist/assets/components/draggable/components/draggable-handle/draggable-handle.types.ts +1 -0
  10. package/dist/assets/components/draggable/components/draggable-handle/draggable-handle.vue +1 -0
  11. package/dist/assets/components/draggable/draggable.docs.mdx +178 -0
  12. package/dist/assets/components/draggable/draggable.stories.ts +1 -0
  13. package/dist/assets/components/draggable/draggable.types.ts +1 -0
  14. package/dist/assets/components/draggable/draggable.vue +1 -0
  15. package/dist/assets/components/filter-bar/components/date-filter/date-filter.vue +1 -1
  16. package/dist/assets/components/filter-bar/filter-bar.docs.mdx +1 -0
  17. package/dist/assets/components/filter-bar/filter-bar.stories.ts +1 -1
  18. package/dist/assets/components/filter-bar/filter-bar.types.ts +1 -1
  19. package/dist/assets/components/filter-bar/filter-bar.vue +1 -1
  20. package/dist/assets/components/form-layout/components/form-layout-group/form-layout-group.vue +1 -1
  21. package/dist/assets/components/form-layout/form-layout.docs.mdx +33 -20
  22. package/dist/assets/components/form-layout/form-layout.stories.ts +1 -1
  23. package/dist/assets/components/input-field/input-field.vue +1 -1
  24. package/dist/assets/components/input-time/input-time.vue +1 -1
  25. package/dist/assets/components/internal/listbox/components/listbox-multi-select/listbox-multi-select.vue +1 -1
  26. package/dist/assets/components.json +101 -100
  27. package/dist/assets/deprecations.md +196 -196
  28. package/dist/assets/index.ts +1 -1
  29. package/dist/assets/tailwind/README.md +45 -5
  30. package/dist/main.js +2 -3
  31. package/package.json +2 -3
  32. package/dist/assets/components/draggable-handle/draggable-handle.stories.ts +0 -1
  33. package/dist/assets/components/draggable-handle/draggable-handle.types.ts +0 -1
  34. package/dist/assets/components/draggable-handle/draggable-handle.vue +0 -1
  35. /package/dist/assets/components/{draggable-handle → draggable/components/draggable-handle}/draggable-handle.docs.mdx +0 -0
@@ -3,12 +3,13 @@
3
3
  This package provides a convenient [Tailwind CSS](https://tailwindcss.com/) preset designed to seamlessly integrate
4
4
  Adyen's Bento design system into your projects through the use of utility classes.
5
5
 
6
- By using this preset, you get the best of both worlds:
6
+ By using this preset, you get:
7
7
 
8
- 1. **Full Tailwind Power:** Access to **all** the default Tailwind CSS utility classes you know and love. Nothing is
9
- removed or fundamentally changed from the standard Tailwind experience.
10
- 2. **Bento Integration:** Adds utility classes derived from Bento's alias tokens—covering colors, spacing, animations,
11
- borders, shadows, and more enabling you to apply Bento's defined styles using familiar Tailwind syntax.
8
+ 1. **Bento-First Utilities:** Utility classes derived from Bento's alias tokens covering colors, spacing, animations,
9
+ borders, shadows, and more enabling you to apply Bento's defined styles using familiar Tailwind syntax.
10
+ 2. **Tailwind Utilities:** Access to Tailwind CSS utility classes for layout, flexbox, grid, and other non-themed
11
+ categories. Categories that are fully managed by Bento (see below) have their Tailwind defaults removed to prevent
12
+ conflicts.
12
13
 
13
14
  **Important:** This preset is designed to **complement**, not replace, the primary Bento UI component library (e.g.,
14
15
  `@adyen/bento-vue2`, `@adyen/bento-vue3`).
@@ -23,6 +24,30 @@ Think of these utilities as tools for:
23
24
  For implementing standard interface patterns (buttons, inputs, cards, etc.), using the pre-built components from the
24
25
  main Bento library is generally recommended for consistency and accessibility.
25
26
 
27
+ ### What's customized?
28
+
29
+ This preset removes default Tailwind values for categories that are fully managed by Bento:
30
+
31
+ | Category | Tailwind defaults removed | Bento alternative | Example utility classes |
32
+ | ---------------------------------------------------------------------------------------------- | -------------------------------- | ---------------------------------------------------------------- | --------------------------------------------------------------------- |
33
+ | Colors | `red-500`, `blue-300`, etc. | `colors` and `backgroundColor` from `@adyen/bento-design-tokens` | `text-label-primary`, `bg-secondary-active`, `border-outline-primary` |
34
+ | Spacing | `1`, `2`, `4`, `8`, etc. | `spacer` from `@adyen/bento-design-tokens` | `p-070`, `m-040`, `gap-060` |
35
+ | Border radius | `rounded-sm`, `rounded-md`, etc. | `borderRadius` from `@adyen/bento-design-tokens` | `rounded-s`, `rounded-m`, `rounded-l` |
36
+ | Border width | `border`, `border-2`, etc. | `borderWidth` from `@adyen/bento-design-tokens` | `border-s`, `border-m`, `border-attention` |
37
+ | Box shadows | `shadow-sm`, `shadow-lg`, etc. | `shadow` from `@adyen/bento-design-tokens` | `shadow-low`, `shadow-medium`, `shadow-high` |
38
+ | Breakpoints | `sm`, `md`, `lg`, `xl`, `2xl` | `screens` from `@adyen/bento-design-tokens` | `xs-min:`, `s-min:`, `m-min:`, `l-min:`, `xl-min:` |
39
+ | Typography (font-size, font-weight, font-family, line-height, letter-spacing, text-decoration) | All removed | Managed by the `bento-typography` component | N/A |
40
+
41
+ The following categories are **extended** with Bento tokens while keeping Tailwind defaults available:
42
+
43
+ | Category | Bento tokens added | Example utility classes |
44
+ | ------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
45
+ | Transition duration | `animationDuration` from `@adyen/bento-design-tokens` | `duration-slow`, `duration-moderate`, `duration-fast` |
46
+ | Transition timing | `animationEasing` from `@adyen/bento-design-tokens` | `ease-standard`, `ease-enter`, `ease-exit` |
47
+ | Z-index | `zIndex` from `@adyen/bento-design-tokens` | `z-global-elevated`, `z-global-navigation` |
48
+
49
+ All other Tailwind utilities (layout, flexbox, grid, transforms, etc.) remain available with their defaults.
50
+
26
51
  ## Installation
27
52
 
28
53
  Install the package using npm (or your preferred package manager):
@@ -87,3 +112,18 @@ colors like `bg-secondary-active`, spacing units, etc.), please explore our
87
112
  **Default Tailwind Utilities:** For documentation on the standard utility classes like `flex`, `grid`, `pt-4`,
88
113
  `text-center`, `rounded-lg`, etc., which are all included and work as expected, please refer to the official
89
114
  **[Tailwind CSS Documentation](https://v3.tailwindcss.com/docs/utility-first)**.
115
+
116
+ ## Migrating from Tailwind CSS v3
117
+
118
+ If you are migrating from a previous version that used Tailwind CSS v3, see the [MIGRATION.md](./MIGRATION.md) file for
119
+ a full list of breaking changes and before/after mappings.
120
+
121
+ To automate the migration, use the `@adyen/eslint-plugin-bento` Tailwind config:
122
+
123
+ ```javascript
124
+ const bento = require('@adyen/eslint-plugin-bento');
125
+
126
+ module.exports = [...bento.configs['tailwind']];
127
+ ```
128
+
129
+ Then run `eslint --fix` to auto-migrate Tailwind v3 classes to their Bento equivalents.
package/dist/main.js CHANGED
@@ -30400,7 +30400,7 @@ function addGetIcons(server) {
30400
30400
  var package_default = {
30401
30401
  name: "@adyen/bento-mcp",
30402
30402
  mcpName: "io.github.adyen/bento-mcp",
30403
- version: "0.3.0",
30403
+ version: "0.4.0",
30404
30404
  type: "module",
30405
30405
  description: "A Model Context Protocol server implementation for Bento",
30406
30406
  license: "MIT",
@@ -30451,8 +30451,7 @@ var package_default = {
30451
30451
  "@modelcontextprotocol/inspector": "0.21.1",
30452
30452
  "@playwright/test": "catalog:",
30453
30453
  "@nx/playwright": "catalog:nx",
30454
- "@swc/cli": "0.8.0",
30455
- "@swc/core": "^1.15.0"
30454
+ "@swc/core": "catalog:"
30456
30455
  }
30457
30456
  };
30458
30457
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adyen/bento-mcp",
3
3
  "mcpName": "io.github.adyen/bento-mcp",
4
- "version": "0.3.0",
4
+ "version": "0.4.0",
5
5
  "type": "module",
6
6
  "description": "A Model Context Protocol server implementation for Bento",
7
7
  "license": "MIT",
@@ -46,8 +46,7 @@
46
46
  "@modelcontextprotocol/inspector": "0.21.1",
47
47
  "@playwright/test": "1.42.1",
48
48
  "@nx/playwright": "22.4.0",
49
- "@swc/cli": "0.8.0",
50
- "@swc/core": "^1.15.0"
49
+ "@swc/core": "^1.15.11"
51
50
  },
52
51
  "scripts": {
53
52
  "add-skill": "node bin/add-skill.js",
@@ -1 +0,0 @@
1
- import { action } from '@storybook/addon-actions'; import { isVue2 } from 'vue-demi'; import { storybookDocsParameter } from '@/utils/ts/storybook'; import type { Meta, StoryObj } from '@storybook/vue'; import BentoDraggableHandle from './draggable-handle.vue'; import DraggableHandleDefaultExample from './__tests__/draggable-handle-default-example.vue?raw'; const meta: Meta = { title: 'Draggable handle', component: BentoDraggableHandle, argTypes: { condensed: { control: 'boolean', }, }, }; export default meta; type Story = StoryObj<typeof BentoDraggableHandle>; const DEFAULT_LABEL = 'Draggable element'; export const Default: Story = { render: (_args, { argTypes }) => ({ components: { BentoDraggableHandle }, props: Object.keys(argTypes), template: ` <bento-draggable-handle v-bind="args" @move-up="clickedAction('move-up')" @move-down="clickedAction('move-down')" @move-right="clickedAction('move-right')" @move-left="clickedAction('move-left')" @move-top="clickedAction('move-top')" @move-bottom="clickedAction('move-bottom')" /> `, setup(props) { const clickedAction = (actionName: string) => action(actionName)(); return { // Values args: isVue2 ? props : _args, // Events clickedAction, }; }, }), args: { label: DEFAULT_LABEL, }, parameters: storybookDocsParameter(DraggableHandleDefaultExample), };
@@ -1 +0,0 @@
1
- import { type BentoMenuProps } from '../menu/menu.types'; export interface BentoDraggableHandleProps { /** * Reduces the size of the handle * @default false */ condensed?: BentoMenuProps['button']['condensed']; /** * Allows to disable the menus individually * @default {} */ disabledMenus?: { bottom?: boolean; down?: boolean; left?: boolean; right?: boolean; top?: boolean; up?: boolean; }; /** * Title or label used to describe the element being dragged. * Used for accessibility. */ label: string; /** * Determines the set of directional actions available in the handle's context menu. * * - `'all-directions'`: Includes 'Move up', 'Move down', 'Move left', 'Move right', 'Move to top', and 'Move to bottom'. * - `'up-and-down'`: Includes 'Move up', 'Move down', 'Move to top', and 'Move to bottom'. * * @default 'up-and-down' */ variant?: 'all-directions' | 'up-and-down'; }
@@ -1 +0,0 @@
1
- <template> <bento-menu class="b-draggable-handle" :data="menuData" :menu-width="250" :button="buttonComputedProps"> <template #iconLeft> <span class="b-draggable-handle__icon"> <grab-icon aria-hidden="true" /> </span> </template> </bento-menu> </template> <script setup lang="ts"> import { computed } from 'vue'; import { BentoMenu, type BentoMenuItem, type BentoMenuProps } from '@/components/menu'; import { type BentoDraggableHandleProps } from './draggable-handle.types'; import { useI18n } from '@/utils/ts/i18n'; import GrabIcon from '@adyen/ui-assets-icons-16/vue/grab'; import ArrowTopIcon from '@adyen/ui-assets-icons-16/vue/arrow-top'; import ArrowLeftIcon from '@adyen/ui-assets-icons-16/vue/arrow-left'; import ArrowRightIcon from '@adyen/ui-assets-icons-16/vue/arrow-right'; import ArrowBottomIcon from '@adyen/ui-assets-icons-16/vue/arrow-bottom'; import messages from './messages.json'; type MessageSchema = (typeof messages)['en-US']; const { t } = useI18n<{ message: MessageSchema }>({ messages }); const props = withDefaults(defineProps<BentoDraggableHandleProps>(), { condensed: false, disabledMenus: () => ({}), variant: 'up-and-down', }); const emit = defineEmits<{ /** * Emitted when the "Move to bottom" action is fired. */ (e: 'move-bottom'): void; /** * Emitted when the "Move down" action is fired. */ (e: 'move-down'): void; /** * Emitted when the "Move left" action is fired. (Only in `all-directions` variant) */ (e: 'move-left'): void; /** * Emitted when the "Move right" action is fired. (Only in `all-directions` variant) */ (e: 'move-right'): void; /** * Emitted when the "Move to top" action is fired. */ (e: 'move-top'): void; /** * Emitted when the "Move up" action is fired. */ (e: 'move-up'): void; }>(); const buttonComputedProps = computed( () => ({ 'aria-label': t('reorderLabel', { label: props.label }), condensed: props.condensed, variant: 'tertiary', }) as BentoMenuProps['button'] ); /** * Renders the menus for the draggable handle. */ const menuData = computed(() => { const MENUS: { [key: string]: BentoMenuItem; } = { up: { text: t('moveUp'), handler: () => emit('move-up'), disabled: props.disabledMenus.up, icon: ArrowTopIcon, }, down: { text: t('moveDown'), handler: () => emit('move-down'), disabled: props.disabledMenus.down, icon: ArrowBottomIcon, }, left: { text: t('moveLeft'), handler: () => emit('move-left'), disabled: props.disabledMenus.left, icon: ArrowLeftIcon, }, right: { text: t('moveRight'), handler: () => emit('move-right'), disabled: props.disabledMenus.right, icon: ArrowRightIcon, }, top: { text: t('moveToTheTop'), handler: () => emit('move-top'), disabled: props.disabledMenus.top, icon: ArrowTopIcon, }, bottom: { text: t('moveToTheBottom'), handler: () => emit('move-bottom'), disabled: props.disabledMenus.bottom, icon: ArrowBottomIcon, }, }; // Render the menus and dividers according to the variant return props.variant === 'up-and-down' ? [ MENUS.up, // Divider added after "Move down" { ...MENUS.down, addDivider: true, }, MENUS.top, MENUS.bottom, ] : [ MENUS.up, MENUS.down, MENUS.left, // Divider added after "Move right" { ...MENUS.right, addDivider: true, }, MENUS.top, MENUS.bottom, ]; }); </script> <script lang="ts"> /** * Bento drag and drop handle component. * * @example * import { BentoDraggableHandle } from '@adyen/bento-vue2'; * * export default { * components: { BentoDraggableHandle }, * template: ` * <bento-draggable-handle * bottom * condensed * down * left * right * top * up * \@move-bottom="moveBottom(index)" * \@move-down="moveDown(index)" * \@move-left="moveLeft(index)" * \@move-right="moveRight(index)" * \@move-top="moveTop(index)" * \@move-up="moveUp(index)" * /> * `, * setup() { * const moveBottom = () => {} * const moveDown = () => {} * const moveLeft = () => {} * const moveRight = () => {} * const moveTop = () => {} * const moveUp = () => {} * } * } */ export default { i18n: { messages }, name: 'bento-draggable-handle', }; </script> <style lang="scss" scoped src="./draggable-handle.scss" />