@dpa-id-components/dpa-shared-components 22.0.0-next.9 → 22.0.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 (143) hide show
  1. package/dist/assets/icons/bot.vue.d.ts +3 -0
  2. package/dist/bot-C103nFwL.js +19 -0
  3. package/dist/components/UiCheckbox/UiCheckbox.vue.d.ts +1 -1
  4. package/dist/components/UiIcon/icons.d.ts +1 -0
  5. package/dist/components/UiInput/UiInput.vue.d.ts +1 -1
  6. package/dist/components/UiMenu/UiMenu.vue.d.ts +1 -1
  7. package/dist/components/index.d.ts +1 -18
  8. package/dist/dpa-shared-components.js +3326 -3978
  9. package/dist/eslint.base.config.js +1 -4
  10. package/dist/src/assets/icons/bot.vue +14 -0
  11. package/dist/src/components/UiChip/UiChip.spec.ts +1 -1
  12. package/dist/src/components/UiChip/UiChip.vue +2 -2
  13. package/dist/src/components/UiDatePicker/UiDatePicker.vue +11 -8
  14. package/dist/src/components/UiDialog/UiDialog.vue +10 -7
  15. package/dist/src/components/UiFilterBadge/UiFilterBadge.stories.ts +1 -3
  16. package/dist/src/components/UiIcon/UiIcon.stories.ts +1 -1
  17. package/dist/src/components/UiIcon/icons.ts +1 -0
  18. package/dist/src/components/UiListItem/README.md +13 -12
  19. package/dist/src/components/UiListItem/UiListItem.stories.ts +0 -26
  20. package/dist/src/components/UiListItem/UiListItem.vue +1 -1
  21. package/dist/src/components/UiMediaTypeIcon/UiMediaTypeIcon.stories.ts +1 -1
  22. package/dist/src/components/UiMenu/UiMenu.stories.ts +85 -2
  23. package/dist/src/components/UiMenu/UiMenu.vue +7 -8
  24. package/dist/src/components/UiSelect/UiSelect.vue +1 -1
  25. package/dist/src/components/index.ts +0 -33
  26. package/dist/src/tailwindPreset.css +70 -62
  27. package/dist/style.css +2 -2
  28. package/dist/tailwindPreset.css +70 -62
  29. package/package.json +19 -19
  30. package/src/assets/icons/bot.vue +14 -0
  31. package/src/components/UiChip/UiChip.vue +2 -2
  32. package/src/components/UiDatePicker/UiDatePicker.vue +11 -8
  33. package/src/components/UiDialog/UiDialog.vue +10 -7
  34. package/src/components/UiIcon/icons.ts +1 -0
  35. package/src/components/UiListItem/README.md +13 -12
  36. package/src/components/UiListItem/UiListItem.vue +1 -1
  37. package/src/components/UiMenu/UiMenu.vue +7 -8
  38. package/src/components/UiSelect/UiSelect.vue +1 -1
  39. package/src/tailwindPreset.css +70 -62
  40. package/dist/components/DpaMediaItem/DpaMediaItem.vue.d.ts +0 -43
  41. package/dist/components/UiButtonGroup/UiButtonGroup.vue.d.ts +0 -7
  42. package/dist/components/UiCard/UiCard.vue.d.ts +0 -7
  43. package/dist/components/UiCheckBoxGroup/UiCheckBoxGroup.vue.d.ts +0 -33
  44. package/dist/components/UiCollapseNavigation/UiCollapseNavigation.vue.d.ts +0 -28
  45. package/dist/components/UiFilterButton/UiFilterButton.vue.d.ts +0 -54
  46. package/dist/components/UiIconButton/UiIconButton.vue.d.ts +0 -30
  47. package/dist/components/UiList/UiList.vue.d.ts +0 -7
  48. package/dist/components/UiMenu/UiMenuItem.vue.d.ts +0 -35
  49. package/dist/components/UiMenu/UiMenuList.vue.d.ts +0 -20
  50. package/dist/components/UiOverlay/UiOverlay.vue.d.ts +0 -18
  51. package/dist/components/UiOverlayMenu/UiOverlayMenu.vue.d.ts +0 -24
  52. package/dist/components/UiRadioInputGroup/UiRadioInputGroup.vue.d.ts +0 -35
  53. package/dist/components/UiSection/UiSection.vue.d.ts +0 -29
  54. package/dist/components/UiSectionDivider/UiSectionDivider.vue.d.ts +0 -16
  55. package/dist/components/UiTextButton/UiTextButton.vue.d.ts +0 -42
  56. package/dist/src/components/DpaMediaItem/DpaMediaItem.spec.ts +0 -123
  57. package/dist/src/components/DpaMediaItem/DpaMediaItem.stories.ts +0 -140
  58. package/dist/src/components/DpaMediaItem/DpaMediaItem.vue +0 -146
  59. package/dist/src/components/DpaMediaItem/README.md +0 -42
  60. package/dist/src/components/UiButtonGroup/README.md +0 -29
  61. package/dist/src/components/UiButtonGroup/UiButtonGroup.spec.ts +0 -16
  62. package/dist/src/components/UiButtonGroup/UiButtonGroup.stories.ts +0 -53
  63. package/dist/src/components/UiButtonGroup/UiButtonGroup.vue +0 -29
  64. package/dist/src/components/UiCard/README.md +0 -32
  65. package/dist/src/components/UiCard/UiCard.spec.ts +0 -16
  66. package/dist/src/components/UiCard/UiCard.stories.ts +0 -30
  67. package/dist/src/components/UiCard/UiCard.vue +0 -28
  68. package/dist/src/components/UiCheckBoxGroup/README.md +0 -35
  69. package/dist/src/components/UiCheckBoxGroup/UiCheckBoxGroup.spec.ts +0 -70
  70. package/dist/src/components/UiCheckBoxGroup/UiCheckBoxGroup.stories.ts +0 -59
  71. package/dist/src/components/UiCheckBoxGroup/UiCheckBoxGroup.vue +0 -106
  72. package/dist/src/components/UiCollapseNavigation/README.md +0 -37
  73. package/dist/src/components/UiCollapseNavigation/UiCollapseNavigation.spec.ts +0 -21
  74. package/dist/src/components/UiCollapseNavigation/UiCollapseNavigation.stories.ts +0 -67
  75. package/dist/src/components/UiCollapseNavigation/UiCollapseNavigation.vue +0 -79
  76. package/dist/src/components/UiFilterButton/README.md +0 -37
  77. package/dist/src/components/UiFilterButton/UiFilterButton.spec.ts +0 -79
  78. package/dist/src/components/UiFilterButton/UiFilterButton.stories.ts +0 -90
  79. package/dist/src/components/UiFilterButton/UiFilterButton.vue +0 -170
  80. package/dist/src/components/UiIconButton/README.md +0 -31
  81. package/dist/src/components/UiIconButton/UiIconButton.spec.ts +0 -78
  82. package/dist/src/components/UiIconButton/UiIconButton.stories.ts +0 -65
  83. package/dist/src/components/UiIconButton/UiIconButton.vue +0 -112
  84. package/dist/src/components/UiList/README.md +0 -31
  85. package/dist/src/components/UiList/UiList.spec.ts +0 -23
  86. package/dist/src/components/UiList/UiList.stories.ts +0 -66
  87. package/dist/src/components/UiList/UiList.vue +0 -29
  88. package/dist/src/components/UiMenu/UiMenuItem.vue +0 -71
  89. package/dist/src/components/UiMenu/UiMenuList.vue +0 -40
  90. package/dist/src/components/UiOverlay/README.md +0 -38
  91. package/dist/src/components/UiOverlay/UiOverlay.spec.ts +0 -16
  92. package/dist/src/components/UiOverlay/UiOverlay.stories.ts +0 -22
  93. package/dist/src/components/UiOverlay/UiOverlay.vue +0 -36
  94. package/dist/src/components/UiOverlayMenu/README.md +0 -40
  95. package/dist/src/components/UiOverlayMenu/UiOverlayMenu.spec.ts +0 -33
  96. package/dist/src/components/UiOverlayMenu/UiOverlayMenu.stories.ts +0 -40
  97. package/dist/src/components/UiOverlayMenu/UiOverlayMenu.vue +0 -51
  98. package/dist/src/components/UiRadioInputGroup/README.md +0 -51
  99. package/dist/src/components/UiRadioInputGroup/UiRadioInputGroup.spec.ts +0 -66
  100. package/dist/src/components/UiRadioInputGroup/UiRadioInputGroup.stories.ts +0 -45
  101. package/dist/src/components/UiRadioInputGroup/UiRadioInputGroup.vue +0 -76
  102. package/dist/src/components/UiSection/README.md +0 -33
  103. package/dist/src/components/UiSection/UiSection.spec.ts +0 -49
  104. package/dist/src/components/UiSection/UiSection.stories.ts +0 -61
  105. package/dist/src/components/UiSection/UiSection.vue +0 -63
  106. package/dist/src/components/UiSectionDivider/README.md +0 -29
  107. package/dist/src/components/UiSectionDivider/UiSectionDivider.spec.ts +0 -19
  108. package/dist/src/components/UiSectionDivider/UiSectionDivider.stories.ts +0 -49
  109. package/dist/src/components/UiSectionDivider/UiSectionDivider.vue +0 -44
  110. package/dist/src/components/UiTextButton/README.md +0 -41
  111. package/dist/src/components/UiTextButton/UiTextButton.spec.ts +0 -99
  112. package/dist/src/components/UiTextButton/UiTextButton.stories.ts +0 -62
  113. package/dist/src/components/UiTextButton/UiTextButton.vue +0 -173
  114. package/src/components/DpaMediaItem/DpaMediaItem.vue +0 -146
  115. package/src/components/DpaMediaItem/README.md +0 -42
  116. package/src/components/UiButtonGroup/README.md +0 -29
  117. package/src/components/UiButtonGroup/UiButtonGroup.vue +0 -29
  118. package/src/components/UiCard/README.md +0 -32
  119. package/src/components/UiCard/UiCard.vue +0 -28
  120. package/src/components/UiCheckBoxGroup/README.md +0 -35
  121. package/src/components/UiCheckBoxGroup/UiCheckBoxGroup.vue +0 -106
  122. package/src/components/UiCollapseNavigation/README.md +0 -37
  123. package/src/components/UiCollapseNavigation/UiCollapseNavigation.vue +0 -79
  124. package/src/components/UiFilterButton/README.md +0 -37
  125. package/src/components/UiFilterButton/UiFilterButton.vue +0 -170
  126. package/src/components/UiIconButton/README.md +0 -31
  127. package/src/components/UiIconButton/UiIconButton.vue +0 -112
  128. package/src/components/UiList/README.md +0 -31
  129. package/src/components/UiList/UiList.vue +0 -29
  130. package/src/components/UiMenu/UiMenuItem.vue +0 -71
  131. package/src/components/UiMenu/UiMenuList.vue +0 -40
  132. package/src/components/UiOverlay/README.md +0 -38
  133. package/src/components/UiOverlay/UiOverlay.vue +0 -36
  134. package/src/components/UiOverlayMenu/README.md +0 -40
  135. package/src/components/UiOverlayMenu/UiOverlayMenu.vue +0 -51
  136. package/src/components/UiRadioInputGroup/README.md +0 -51
  137. package/src/components/UiRadioInputGroup/UiRadioInputGroup.vue +0 -76
  138. package/src/components/UiSection/README.md +0 -33
  139. package/src/components/UiSection/UiSection.vue +0 -63
  140. package/src/components/UiSectionDivider/README.md +0 -29
  141. package/src/components/UiSectionDivider/UiSectionDivider.vue +0 -44
  142. package/src/components/UiTextButton/README.md +0 -41
  143. package/src/components/UiTextButton/UiTextButton.vue +0 -173
@@ -30,10 +30,7 @@ export default defineConfigWithVueTs(
30
30
  "vue/no-v-html": "off",
31
31
  },
32
32
  languageOptions: {
33
- globals: {
34
- ...globals.node,
35
- ...globals.browser,
36
- },
33
+ globals: globals.browser,
37
34
  },
38
35
  },
39
36
 
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <svg
3
+ width="24"
4
+ height="24"
5
+ viewBox="0 0 24 24"
6
+ fill="none"
7
+ xmlns="http://www.w3.org/2000/svg"
8
+ >
9
+ <path
10
+ d="M12 3C12.5523 3 13 3.44772 13 4V7H18C19.6569 7 21 8.34315 21 10V13H22C22.5523 13 23 13.4477 23 14C23 14.5523 22.5523 15 22 15H21V18C21 19.6569 19.6569 21 18 21H6C4.34315 21 3 19.6569 3 18V15H2C1.44772 15 1 14.5523 1 14C1 13.4477 1.44772 13 2 13H3V10C3 8.34315 4.34315 7 6 7H11V5H8C7.44772 5 7 4.55228 7 4C7 3.44772 7.44772 3 8 3H12ZM6 9C5.44772 9 5 9.44772 5 10V18C5 18.5523 5.44772 19 6 19H18C18.5523 19 19 18.5523 19 18V10C19 9.44772 18.5523 9 18 9H6ZM9 12C9.55228 12 10 12.4477 10 13V15C10 15.5523 9.55228 16 9 16C8.44772 16 8 15.5523 8 15V13C8 12.4477 8.44772 12 9 12ZM15 12C15.5523 12 16 12.4477 16 13V15C16 15.5523 15.5523 16 15 16C14.4477 16 14 15.5523 14 15V13C14 12.4477 14.4477 12 15 12Z"
11
+ fill="currentColor"
12
+ />
13
+ </svg>
14
+ </template>
@@ -6,7 +6,7 @@ import UiChip from "./UiChip.vue";
6
6
  describe("UiChip", () => {
7
7
  test("renders sm size by default", () => {
8
8
  const wrapper = mount(UiChip);
9
- expect(wrapper.classes("text-sm/5.5")).toBe(true);
9
+ expect(wrapper.classes("text-sm/6")).toBe(true);
10
10
  });
11
11
  test("renders md size", () => {
12
12
  const wrapper = mount(UiChip, {
@@ -31,8 +31,8 @@ defineEmits<{
31
31
  }>();
32
32
 
33
33
  const CHIP_SIZES: Record<Extract<Size, "xs" | "sm" | "md">, string> = {
34
- xs: "text-xs",
35
- sm: "text-sm/5.5",
34
+ xs: "text-xs/5",
35
+ sm: "text-sm/6",
36
36
  md: "text-sm/8",
37
37
  };
38
38
 
@@ -152,10 +152,7 @@ export interface PresetRange {
152
152
  name?: string;
153
153
  }
154
154
  export type DateType =
155
- | Date
156
- | [Date, Date]
157
- | string
158
- | { month: number; year: number };
155
+ Date | [Date, Date] | string | { month: number; year: number };
159
156
 
160
157
  const datePicker =
161
158
  useTemplateRef<InstanceType<typeof VueDatePicker>>("datePicker");
@@ -405,11 +402,17 @@ function formatInput(date: Date | [Date, Date]): string {
405
402
  --dp-hover-icon-color: var(--color-neutral);
406
403
  --dp-primary-disabled-color: var(--color-neutral-soft);
407
404
  --dp-primary-text-color: var(--color-neutral);
408
- --dp-secondary-color: #c0c4cc;
405
+ --dp-secondary-color: oklch(0.82 0.012 264.559);
409
406
  --dp-border-color: var(--color-neutral-pale);
410
407
  --dp-menu-border-color: var(--color-neutral-pale);
411
- --dp-range-between-dates-background-color: var(--dp-hover-color, #f3f3f3);
412
- --dp-range-between-dates-text-color: var(--dp-hover-text-color, #212121);
413
- --dp-range-between-border-color: var(--dp-hover-color, #f3f3f3);
408
+ --dp-range-between-dates-background-color: var(
409
+ --dp-hover-color,
410
+ oklch(0.964 0 0)
411
+ );
412
+ --dp-range-between-dates-text-color: var(
413
+ --dp-hover-text-color,
414
+ var(--color-neutral-primary)
415
+ );
416
+ --dp-range-between-border-color: var(--dp-hover-color, oklch(0.964 0 0));
414
417
  }
415
418
  </style>
@@ -13,9 +13,12 @@
13
13
  >
14
14
  <header
15
15
  v-if="$slots.header || hasCloseButton"
16
- class="flex flex-wrap items-center justify-between gap-4 rounded-t-2xl bg-neutral-whisper px-4 py-2"
16
+ class="flex flex-wrap items-center justify-between gap-4 rounded-t-2xl bg-neutral-whisper py-2 pr-2 pl-4"
17
17
  >
18
- <div v-if="$slots.header" class="text-lg font-semibold">
18
+ <div
19
+ v-if="$slots.header"
20
+ class="text-lg font-medium text-neutral-primary"
21
+ >
19
22
  <slot name="header" v-bind="{ close, requestClose }" />
20
23
  </div>
21
24
 
@@ -31,13 +34,13 @@
31
34
  </UiButton>
32
35
  </header>
33
36
 
34
- <div v-if="$slots.default" class="space-y-2 px-4 py-3">
37
+ <div v-if="$slots.default" class="space-y-2 p-6">
35
38
  <slot />
36
39
  </div>
37
40
 
38
41
  <footer
39
42
  v-if="$slots.footer"
40
- class="flex flex-wrap items-center justify-between gap-2 px-4 py-3"
43
+ class="flex flex-wrap items-center justify-between gap-2 px-4 pt-2 pb-4"
41
44
  >
42
45
  <slot name="footer" v-bind="{ close, requestClose }" />
43
46
  </footer>
@@ -98,7 +101,7 @@ defineExpose({
98
101
  @media (prefers-reduced-motion: no-preference) {
99
102
  /* Backdrop */
100
103
  .animate::backdrop {
101
- background: rgb(0 0 0 / 0%);
104
+ background: oklch(0 0 0 / 0);
102
105
  transition:
103
106
  background 0.3s ease,
104
107
  display 0.2s ease allow-discrete,
@@ -106,10 +109,10 @@ defineExpose({
106
109
  }
107
110
 
108
111
  .animate[open]::backdrop {
109
- background: rgb(0 0 0 / 50%);
112
+ background: oklch(0 0 0 / 0.5);
110
113
 
111
114
  @starting-style {
112
- background: rgb(0 0 0 / 0%);
115
+ background: oklch(0 0 0 / 0);
113
116
  }
114
117
  }
115
118
 
@@ -1,7 +1,5 @@
1
1
  import type { Meta, StoryObj } from "@storybook/vue3-vite";
2
2
 
3
- import UiIconButton from "../UiIconButton/UiIconButton.vue";
4
-
5
3
  import UiFilterBadge from "./UiFilterBadge.vue";
6
4
 
7
5
  const meta = {
@@ -17,7 +15,7 @@ const meta = {
17
15
  setup() {
18
16
  return { args };
19
17
  },
20
- components: { UiFilterBadge, UiIconButton },
18
+ components: { UiFilterBadge },
21
19
  template: "<UiFilterBadge v-bind='args'> slot </UiFilterBadge>",
22
20
  }),
23
21
  } satisfies Meta<typeof UiFilterBadge>;
@@ -58,7 +58,7 @@ export const Overview: Story = {
58
58
  <UiIcon
59
59
  class="shrink-0"
60
60
  :class="{
61
- 'outline outline-alert-red-default': args.outline,
61
+ 'outline outline-error': args.outline,
62
62
  }"
63
63
  v-bind="args"
64
64
  :name="icon"
@@ -25,6 +25,7 @@ export const icons = {
25
25
  "book": () => import("../../assets/icons/book.vue"),
26
26
  "bookmark": () => import("../../assets/icons/bookmark.vue"),
27
27
  "bookmark-filled": () => import("../../assets/icons/bookmark-filled.vue"),
28
+ "bot": () => import('../../assets/icons/bot.vue'),
28
29
  "box": () => import("../../assets/icons/box.vue"),
29
30
  "bulb": () => import("../../assets/icons/bulb.vue"),
30
31
  "call": () => import("../../assets/icons/call.vue"),
@@ -19,18 +19,19 @@
19
19
 
20
20
  ### Props
21
21
 
22
- | Name | Type | Default | Description |
23
- |-------------------|-----------------------------|------------|----------------------------------------------------------|
24
- | `value` | `string` | `""` | Sets the value which gets emitted with the click event |
25
- | `checkBoxMenu` | `Boolean` | `false` | Displays checkbox on the beginning of list item |
26
- | `isChecked` | `Boolean` | `false` | Checked attribute of checkbox, if displayed |
27
- | `selectable` | `Boolean` | `false` | Makes the list item selectable |
28
- | `selected` | `Boolean` | `false` | Displays checkmark at the end of the list item |
29
- | `overrideClasses` | `String` | `false` | Adds classes to the inner of the list item |
30
- | `iconName` | `UiIconName` | | Icon to be displayed at the beginning of the list item |
31
- | `imageSrc` | `String` | `""` | Image to be displayed at the beginning of the list item. |
32
- | `imageShape` | `"rounded" &#124; "square"` | `"square"` | Shape pf the image to be displayed. |
33
- | `checkboxColor` | `"blue" &#124; "gray"` | `"blue"` | Checkbox color style. |
22
+ | Name | Type | Default | Description |
23
+ |-------------------|-----------------------------|------------|---------------------------------------------------------------------|
24
+ | `value` | `string` | `""` | Sets the value which gets emitted with the click event |
25
+ | `checkBoxMenu` | `Boolean` | `false` | Displays checkbox on the beginning of list item |
26
+ | `isChecked` | `Boolean` | `false` | Checked attribute of checkbox, if displayed |
27
+ | `selectable` | `Boolean` | `false` | Makes the list item selectable |
28
+ | `selected` | `Boolean` | `false` | Displays checkmark at the end of the list item |
29
+ | `overrideClasses` | `String` | `false` | Adds classes to the inner of the list item |
30
+ | `iconName` | `UiIconName` | | Icon to be displayed at the beginning of the list item |
31
+ | `iconSize` | `sm` `md` `lg` | | Size of the checkmark icon when selected and selectable is set true |
32
+ | `imageSrc` | `String` | `""` | Image to be displayed at the beginning of the list item. |
33
+ | `imageShape` | `"rounded" &#124; "square"` | `"square"` | Shape pf the image to be displayed. |
34
+ | `checkboxColor` | `"blue" &#124; "gray"` | `"blue"` | Checkbox color style. |
34
35
 
35
36
  ### Events
36
37
 
@@ -1,36 +1,10 @@
1
1
  import type { Meta, StoryObj } from "@storybook/vue3-vite";
2
2
 
3
- import { icons } from "../UiIcon/icons.ts";
4
-
5
3
  import UiListItem from "./UiListItem.vue";
6
4
 
7
5
  const meta = {
8
6
  title: "Ui/UiListItem",
9
7
  component: UiListItem,
10
- argTypes: {
11
- iconName: {
12
- control: "select",
13
- options: Object.keys(icons),
14
- },
15
- iconSize: {
16
- control: "select",
17
- options: ["small", "medium", "large"],
18
- },
19
- imageSrc: {
20
- control: "text",
21
- },
22
- imageShape: {
23
- control: "select",
24
- options: ["rounded", "square"],
25
- },
26
- value: { control: false },
27
- checkBoxMenu: { control: "boolean" },
28
- isChecked: { control: "boolean" },
29
- selected: { control: "boolean" },
30
- selectable: { control: "boolean" },
31
- disabled: { control: "boolean" },
32
- overrideClasses: { control: "text" },
33
- },
34
8
  args: {
35
9
  iconName: undefined,
36
10
  iconSize: "md",
@@ -2,7 +2,7 @@
2
2
  <li
3
3
  :class="
4
4
  cn(
5
- 'flex cursor-pointer list-none items-center gap-2 px-4 py-1.5 text-sm/normal text-neutral-emphasis select-none hover:text-primary focus:outline-hidden focus-visible:focus-outline focus-visible:-outline-offset-2',
5
+ 'flex cursor-pointer list-none items-center gap-2 p-2 text-sm/4 text-neutral-primary select-none hover:bg-neutral-whisper hover:text-primary focus:bg-neutral-faint focus:outline-hidden focus-visible:focus-outline focus-visible:-outline-offset-2',
6
6
  {
7
7
  'cursor-default text-neutral-medium': disabled,
8
8
  'is-selected': selected,
@@ -58,7 +58,7 @@ export const Overview: Story = {
58
58
  <UiMediaTypeIcon
59
59
  class="shrink-0"
60
60
  :class="{
61
- 'outline outline-alert-red-default': args.outline,
61
+ 'outline outline-error': args.outline,
62
62
  }"
63
63
  v-bind="args"
64
64
  :name="icon"
@@ -57,6 +57,9 @@ export default meta;
57
57
  type Story = StoryObj<typeof meta>;
58
58
 
59
59
  export const Default: Story = {
60
+ args: {
61
+ buttonAppearance: "fill-emphasis",
62
+ },
60
63
  render: (args) => ({
61
64
  setup() {
62
65
  const options = ref<UiMenuOptionType<string>[]>([
@@ -111,7 +114,7 @@ export const Default: Story = {
111
114
  },
112
115
  components: { UiMenu },
113
116
  template: /*html*/ `
114
- <aside class="w-50 h-200 p-4 bg-accent-green">
117
+ <aside>
115
118
  <UiMenu
116
119
  v-bind="args"
117
120
  v-model:query="args.query"
@@ -128,6 +131,87 @@ export const Default: Story = {
128
131
  }),
129
132
  };
130
133
 
134
+ export const WidthOverride: Story = {
135
+ args: {
136
+ buttonAppearance: "fill-emphasis",
137
+ },
138
+ render: (args) => ({
139
+ setup() {
140
+ const options = ref<UiMenuOptionType<string>[]>([
141
+ {
142
+ label: "Option 1",
143
+ value: "value 1",
144
+ selected: true,
145
+ iconName: "info",
146
+ },
147
+ {
148
+ label: "Option 2 is really long, much longer than the rest",
149
+ value: "value 2",
150
+ selected: false,
151
+ iconName: "alert",
152
+ hasDividerAbove: true,
153
+ },
154
+ {
155
+ label: "Option 3",
156
+ value: "value 3",
157
+ selected: false,
158
+ iconName: "bulb",
159
+ },
160
+ {
161
+ label: "Option 4",
162
+ value: "value 4",
163
+ selected: false,
164
+ iconName: "language",
165
+ },
166
+ ]);
167
+ const filteredOptions = ref(Array.from(options.value));
168
+
169
+ const onSelect = (selectedOption: UiMenuSelectedOption<string>) => {
170
+ for (const option of filteredOptions.value) {
171
+ option.selected =
172
+ option.value === selectedOption.value ? true : false;
173
+ }
174
+ };
175
+
176
+ const onUpdateQuery = (value: string) => {
177
+ filteredOptions.value = options.value.filter((option) =>
178
+ option.label.toLowerCase().includes(value.toLowerCase()),
179
+ );
180
+ };
181
+
182
+ return {
183
+ args,
184
+ onSelect,
185
+ onUpdateQuery,
186
+ filteredOptions,
187
+ options,
188
+ };
189
+ },
190
+ components: { UiMenu },
191
+ template: /*html*/ `
192
+ <aside class="w-70 h-200 p-4 bg-neutral-pale space-y-4">
193
+ <UiMenu
194
+ class="w-full"
195
+ v-bind="args"
196
+ v-model:query="args.query"
197
+ :options="filteredOptions"
198
+ @option-selected="(option)=> { onSelect(option); optionSelected(option); }"
199
+ @update:query="(value) => { onUpdateQuery(value); updateQuery(value); }"
200
+ />
201
+ <UiMenu
202
+ class="w-full"
203
+ v-bind="args"
204
+ :disabled="true"
205
+ />
206
+ </aside>
207
+ `,
208
+ methods: {
209
+ optionSelected: action("option-selected"),
210
+ updateQuery: action("update:query"),
211
+ },
212
+ }),
213
+ };
214
+
131
215
  export const GroupedOptions: Story = {
132
216
  args: {
133
217
  hasResetOption: true,
@@ -251,7 +335,6 @@ export const GroupedOptions: Story = {
251
335
  v-bind="args"
252
336
  v-model:query="args.query"
253
337
  :grouped-options="filteredOptions"
254
- has-search
255
338
  @option-selected="(option)=> { onSelect(option); optionSelected(option); }"
256
339
  @update:query="(value) => { onUpdateQuery(value); updateQuery(value); }"
257
340
  />
@@ -17,11 +17,11 @@
17
17
  data-testid="menu-button"
18
18
  @click="toggle"
19
19
  >
20
- <div class="flex items-center gap-2">
21
- <UiIcon v-if="iconLeft" :name="iconLeft" size="sm" />
22
- {{ selectedOptionLabel }}
20
+ <div class="flex min-w-0 items-center gap-2 overflow-hidden">
21
+ <UiIcon v-if="iconLeft" class="shrink-0" :name="iconLeft" size="sm" />
22
+ <span class="truncate">{{ selectedOptionLabel }}</span>
23
23
  </div>
24
- <UiIcon name="chevron-down" size="sm" />
24
+ <UiIcon class="shrink-0" name="chevron-down" size="sm" />
25
25
  </UiButton>
26
26
  </template>
27
27
 
@@ -30,7 +30,7 @@
30
30
  >
31
31
  <div
32
32
  v-if="hasSearch"
33
- class="flex items-center gap-2 rounded-t-lg px-4 pt-2.5 pb-1.5 text-neutral-primary [&:has(>input:focus-visible)]:focus-outline [&:has(>input:focus-visible)]:-outline-offset-2"
33
+ class="flex items-center gap-2 rounded-t-lg p-2 text-neutral-primary [&:has(>input:focus-visible)]:focus-outline [&:has(>input:focus-visible)]:-outline-offset-2"
34
34
  >
35
35
  <UiIcon
36
36
  class="shrink-0 text-neutral-emphasis"
@@ -42,7 +42,7 @@
42
42
  v-model="queryModel"
43
43
  type="text"
44
44
  spellcheck="false"
45
- class="w-full text-sm focus:outline-hidden"
45
+ class="w-full text-sm/4 focus:outline-hidden"
46
46
  :placeholder="searchPlaceholder"
47
47
  data-testid="menu-search-input"
48
48
  />
@@ -70,7 +70,7 @@
70
70
  <template v-if="group.options.length > 0">
71
71
  <li
72
72
  v-if="group.groupLabel"
73
- class="flex h-6 items-center bg-neutral-faint px-4 text-xs font-semibold tracking-wider text-neutral-subtle uppercase"
73
+ class="flex h-6 items-center bg-neutral-faint px-2 text-xs font-semibold tracking-wider text-neutral-subtle uppercase"
74
74
  >
75
75
  {{ group.groupLabel }}
76
76
  </li>
@@ -87,7 +87,6 @@
87
87
  :image-src="option.imageSrc"
88
88
  :icon-name="option.iconName"
89
89
  :checkbox-appearance="checkboxAppearance"
90
- class="hover:bg-neutral-whisper focus:bg-neutral-faint"
91
90
  :class="{
92
91
  'border-t': option.hasDividerAbove,
93
92
  }"
@@ -89,7 +89,7 @@ select,
89
89
  }
90
90
 
91
91
  ::picker(select) {
92
- @apply mt-1 overscroll-none rounded-lg border border-neutral-faint shadow-md;
92
+ @apply my-1 overscroll-none rounded-lg border border-neutral-faint shadow-md;
93
93
  }
94
94
 
95
95
  select::picker-icon {
@@ -1,24 +1,16 @@
1
- import DpaMediaItem from "./DpaMediaItem/DpaMediaItem.vue";
2
1
  import UiBadge from "./UiBadge/UiBadge.vue";
3
2
  import UiButton from "./UiButton/UiButton.vue";
4
- import UiButtonGroup from "./UiButtonGroup/UiButtonGroup.vue";
5
- import UiCard from "./UiCard/UiCard.vue";
6
3
  import UiCheckbox from "./UiCheckbox/UiCheckbox.vue";
7
- import UiCheckBoxGroup from "./UiCheckBoxGroup/UiCheckBoxGroup.vue";
8
4
  import UiChip from "./UiChip/UiChip.vue";
9
- import UiCollapseNavigation from "./UiCollapseNavigation/UiCollapseNavigation.vue";
10
5
  import UiColorPicker from "./UiColorPicker/UiColorPicker.vue";
11
6
  import UiDatePicker from "./UiDatePicker/UiDatePicker.vue";
12
7
  import UiDialog from "./UiDialog/UiDialog.vue";
13
8
  import UiFilterBadge from "./UiFilterBadge/UiFilterBadge.vue";
14
- import UiFilterButton from "./UiFilterButton/UiFilterButton.vue";
15
9
  import UiIcon from "./UiIcon/UiIcon.vue";
16
10
  export type { UiIconName } from "./UiIcon/UiIcon.vue";
17
- import UiIconButton from "./UiIconButton/UiIconButton.vue";
18
11
  import UiInfoContent from "./UiInfoContent/UiInfoContent.vue";
19
12
  import UiInput from "./UiInput/UiInput.vue";
20
13
  import UiLabel from "./UiLabel/UiLabel.vue";
21
- import UiList from "./UiList/UiList.vue";
22
14
  import UiListItem from "./UiListItem/UiListItem.vue";
23
15
  import UiMediaTypeIcon from "./UiMediaTypeIcon/UiMediaTypeIcon.vue";
24
16
  export type { UiMediaTypeIconName } from "./UiMediaTypeIcon/UiMediaTypeIcon.vue";
@@ -28,66 +20,41 @@ export type {
28
20
  UiMenuOptionType,
29
21
  UiMenuSelectedOption,
30
22
  } from "./UiMenu/UiMenu.vue";
31
- import UiMenuItem from "./UiMenu/UiMenuItem.vue";
32
- import UiMenuList from "./UiMenu/UiMenuList.vue";
33
- import UiOverlay from "./UiOverlay/UiOverlay.vue";
34
- import UiOverlayMenu from "./UiOverlayMenu/UiOverlayMenu.vue";
35
23
  import UiPopover from "./UiPopover/UiPopover.vue";
36
24
  import UiRadioButton from "./UiRadioButton/UiRadioButton.vue";
37
- import UiRadioInputGroup from "./UiRadioInputGroup/UiRadioInputGroup.vue";
38
- export type { UiRadioInputGroupOption } from "./UiRadioInputGroup/UiRadioInputGroup.vue";
39
25
  import UiSearchBar from "./UiSearchBar/UiSearchBar.vue";
40
26
  import UiSearchInput from "./UiSearchInput/UiSearchInput.vue";
41
- import UiSection from "./UiSection/UiSection.vue";
42
- import UiSectionDivider from "./UiSectionDivider/UiSectionDivider.vue";
43
27
  import UiSelect from "./UiSelect/UiSelect.vue";
44
28
  import UiSkeletonBox from "./UiSkeletonBox/UiSkeletonBox.vue";
45
29
  import UiSnackbar from "./UiSnackbar/UiSnackbar.vue";
46
30
  import UiSpinner from "./UiSpinner/UiSpinner.vue";
47
- import UiTextButton from "./UiTextButton/UiTextButton.vue";
48
31
  import UiToggleButton from "./UiToggleButton/UiToggleButton.vue";
49
32
  import UiTooltip from "./UiTooltip/UiTooltip.vue";
50
33
 
51
34
  export {
52
- DpaMediaItem,
53
35
  UiBadge,
54
36
  UiButton,
55
- UiButtonGroup,
56
- UiCard,
57
37
  UiCheckbox,
58
- UiCheckBoxGroup,
59
38
  UiChip,
60
- UiCollapseNavigation,
61
39
  UiColorPicker,
62
40
  UiDatePicker,
63
41
  UiDialog,
64
42
  UiFilterBadge,
65
- UiFilterButton,
66
43
  UiIcon,
67
- UiIconButton,
68
44
  UiInfoContent,
69
45
  UiInput,
70
46
  UiLabel,
71
- UiList,
72
47
  UiListItem,
73
48
  UiMediaTypeIcon,
74
49
  UiMenu,
75
- UiMenuItem,
76
- UiMenuList,
77
- UiOverlay,
78
- UiOverlayMenu,
79
50
  UiPopover,
80
51
  UiRadioButton,
81
- UiRadioInputGroup,
82
52
  UiSearchBar,
83
53
  UiSearchInput,
84
- UiSection,
85
- UiSectionDivider,
86
54
  UiSelect,
87
55
  UiSkeletonBox,
88
56
  UiSnackbar,
89
57
  UiSpinner,
90
- UiTextButton,
91
58
  UiToggleButton,
92
59
  UiTooltip,
93
60
  };