vueless 0.0.657 → 0.0.659

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 (39) hide show
  1. package/package.json +1 -1
  2. package/ui.button/config.ts +3 -3
  3. package/ui.button/storybook/stories.ts +1 -1
  4. package/ui.button/types.ts +2 -2
  5. package/ui.button-link/config.ts +3 -3
  6. package/ui.button-link/storybook/stories.ts +1 -1
  7. package/ui.button-link/types.ts +2 -2
  8. package/ui.button-toggle/UToggle.vue +2 -1
  9. package/ui.button-toggle/storybook/stories.ts +63 -29
  10. package/ui.button-toggle/types.ts +7 -2
  11. package/ui.button-toggle-item/UToggleItem.vue +2 -2
  12. package/ui.button-toggle-item/storybook/stories.ts +28 -21
  13. package/ui.container-divider/config.ts +3 -3
  14. package/ui.container-divider/storybook/stories.ts +1 -1
  15. package/ui.container-divider/types.ts +2 -2
  16. package/ui.container-group/UGroup.vue +1 -1
  17. package/ui.container-modal/UModal.vue +7 -4
  18. package/ui.container-modal/config.ts +2 -3
  19. package/ui.container-modal/types.ts +1 -1
  20. package/ui.container-page/UPage.vue +1 -1
  21. package/ui.dropdown-button/UDropdownButton.vue +1 -1
  22. package/ui.dropdown-button/storybook/stories.ts +30 -13
  23. package/ui.dropdown-link/UDropdownLink.vue +1 -1
  24. package/ui.dropdown-link/config.ts +1 -1
  25. package/ui.dropdown-link/types.ts +2 -2
  26. package/ui.form-calendar/UCalendar.vue +6 -6
  27. package/ui.form-calendar/UCalendarDayView.vue +13 -13
  28. package/ui.form-calendar/UCalendarMonthView.vue +12 -12
  29. package/ui.form-calendar/UCalendarYearView.vue +12 -12
  30. package/ui.form-date-picker-range/UDatePickerRange.vue +3 -3
  31. package/ui.form-date-picker-range/UDatePickerRangePeriodMenu.vue +18 -18
  32. package/ui.form-input-file/UInputFile.vue +2 -2
  33. package/ui.form-input-search/UInputSearch.vue +1 -1
  34. package/ui.form-select/USelect.vue +15 -11
  35. package/ui.form-select/config.ts +6 -6
  36. package/ui.form-select/storybook/stories.ts +6 -6
  37. package/ui.navigation-pagination/UPagination.vue +7 -7
  38. package/ui.text-alert/UAlert.vue +1 -1
  39. package/ui.text-file/UFile.vue +9 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.657",
3
+ "version": "0.0.659",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -47,8 +47,8 @@ export default /*tw*/ {
47
47
  false: "rounded-dynamic",
48
48
  true: "rounded-full",
49
49
  },
50
- noRing: {
51
- true: "!ring-0 !ring-offset-0",
50
+ ring: {
51
+ false: "!ring-0 !ring-offset-0",
52
52
  },
53
53
  loading: {
54
54
  true: "gap-0 pointer-events-none",
@@ -187,7 +187,7 @@ export default /*tw*/ {
187
187
  block: false,
188
188
  square: false,
189
189
  filled: false,
190
- noRing: false,
190
+ ring: true,
191
191
  loading: false,
192
192
  disabled: false,
193
193
  },
@@ -156,7 +156,7 @@ export const Disabled = EnumVariantTemplate.bind({});
156
156
  Disabled.args = { enum: "variant", disabled: true };
157
157
 
158
158
  export const NoRing = DefaultTemplate.bind({});
159
- NoRing.args = { noRing: true };
159
+ NoRing.args = { ring: false };
160
160
 
161
161
  export const Colors = ColorTemplate.bind({});
162
162
  Colors.args = {};
@@ -101,9 +101,9 @@ export interface Props {
101
101
  loading?: boolean;
102
102
 
103
103
  /**
104
- * Remove button ring on focus.
104
+ * Show button ring on focus.
105
105
  */
106
- noRing?: boolean;
106
+ ring?: boolean;
107
107
 
108
108
  /**
109
109
  * Unique element id.
@@ -20,8 +20,8 @@ export default /*tw*/ {
20
20
  defaultSlot: {
21
21
  true: "flex items-center focus-within:ring-0 focus-within:ring-offset-0",
22
22
  },
23
- noRing: {
24
- true: "!ring-0 !ring-offset-0",
23
+ ring: {
24
+ false: "!ring-0 !ring-offset-0",
25
25
  },
26
26
  block: {
27
27
  true: "w-full",
@@ -87,7 +87,7 @@ export default /*tw*/ {
87
87
  wrapperExactActiveClass: "",
88
88
  underlined: undefined,
89
89
  block: false,
90
- noRing: false,
90
+ ring: true,
91
91
  dashed: false,
92
92
  disabled: false,
93
93
  targetBlank: false,
@@ -183,7 +183,7 @@ export const Disabled = DefaultTemplate.bind({});
183
183
  Disabled.args = { disabled: true };
184
184
 
185
185
  export const NoRing = DefaultTemplate.bind({});
186
- NoRing.args = { noRing: true };
186
+ NoRing.args = { ring: false };
187
187
 
188
188
  export const Block = DefaultTemplate.bind({});
189
189
  Block.args = { block: true };
@@ -118,9 +118,9 @@ export interface Props {
118
118
  block?: boolean;
119
119
 
120
120
  /**
121
- * Remove outline ring on focus.
121
+ * Show link ring on focus.
122
122
  */
123
- noRing?: boolean;
123
+ ring?: boolean;
124
124
 
125
125
  /**
126
126
  * Component config object.
@@ -61,7 +61,7 @@ provide("getToggleRound", () => props.round);
61
61
  provide("getToggleBlock", () => props.block);
62
62
  provide("getToggleSquare", () => props.square);
63
63
  provide("getToggleDisabled", () => props.disabled);
64
- provide("getToggleNoRing", () => props.noRing);
64
+ provide("getToggleRing", () => props.ring);
65
65
  provide("getToggleSplit", () => props.split);
66
66
 
67
67
  provide("toggleSelectedValue", {
@@ -82,6 +82,7 @@ const { toggleLabelAttrs, itemsAttrs, itemAttrs } = useUI<Config>(defaultConfig)
82
82
  :description="description"
83
83
  :align="labelAlign"
84
84
  :disabled="disabled"
85
+ :error="error"
85
86
  centred
86
87
  v-bind="toggleLabelAttrs"
87
88
  :data-test="dataTest"
@@ -1,4 +1,4 @@
1
- import { ref } from "vue";
1
+ import { ref, computed } from "vue";
2
2
  import {
3
3
  getArgTypes,
4
4
  getSlotNames,
@@ -10,6 +10,7 @@ import UToggle from "../../ui.button-toggle/UToggle.vue";
10
10
  import UIcon from "../../ui.image-icon/UIcon.vue";
11
11
  import UToggleItem from "../../ui.button-toggle-item/UToggleItem.vue";
12
12
  import URow from "../../ui.container-row/URow.vue";
13
+ import UBadge from "../../ui.text-badge/UBadge.vue";
13
14
 
14
15
  import type { Meta, StoryFn } from "@storybook/vue3";
15
16
  import type { Props } from "../types.ts";
@@ -24,12 +25,13 @@ export default {
24
25
  title: "Buttons & Links / Toggle",
25
26
  component: UToggle,
26
27
  args: {
28
+ label: "Please choose an option",
27
29
  modelValue: "11",
28
30
  options: [
29
- { value: "11", label: "label 1" },
30
- { value: "12", label: "label 2" },
31
- { value: "13", label: "label 3" },
32
- { value: "14", label: "label 4" },
31
+ { value: "11", label: "Admin" },
32
+ { value: "12", label: "Editor" },
33
+ { value: "13", label: "Viewer" },
34
+ { value: "14", label: "Guest" },
33
35
  ],
34
36
  },
35
37
  argTypes: {
@@ -44,14 +46,26 @@ export default {
44
46
  } as Meta;
45
47
 
46
48
  const DefaultTemplate: StoryFn<UToggleArgs> = (args: UToggleArgs) => ({
47
- components: { UToggle, UIcon, UToggleItem },
49
+ components: { UToggle, UIcon, UToggleItem, UBadge },
48
50
  setup() {
49
51
  const slots = getSlotNames(UToggle.__name);
52
+ const modelValueRef = ref(args.modelValue);
53
+ const error = computed(() => {
54
+ if (args.name === "error" && Array.isArray(modelValueRef.value)) {
55
+ return modelValueRef.value?.length === 0 ? "Please select at least one option" : "";
56
+ }
50
57
 
51
- return { args, slots };
58
+ return "";
59
+ });
60
+
61
+ return { args, slots, modelValueRef, error };
52
62
  },
53
63
  template: `
54
- <UToggle v-bind="args" v-model="args.modelValue">
64
+ <UToggle
65
+ v-bind="args"
66
+ v-model="modelValueRef"
67
+ :error="error"
68
+ >
55
69
  ${args.slotTemplate || getSlotsFragment("")}
56
70
  </UToggle>
57
71
  `,
@@ -60,11 +74,11 @@ const DefaultTemplate: StoryFn<UToggleArgs> = (args: UToggleArgs) => ({
60
74
  const EnumVariantTemplate: StoryFn<UToggleArgs> = (args: UToggleArgs, { argTypes }) => ({
61
75
  components: { UToggle, URow },
62
76
  setup() {
63
- const value = ref("");
77
+ const values = ref(["2xs", "xs", "sm", "md", "lg", "xl"]);
64
78
 
65
79
  return {
66
80
  args,
67
- value,
81
+ values,
68
82
  options: argTypes?.[args.enum]?.options,
69
83
  };
70
84
  },
@@ -74,13 +88,14 @@ const EnumVariantTemplate: StoryFn<UToggleArgs> = (args: UToggleArgs, { argTypes
74
88
  v-for="(option, index) in options"
75
89
  :key="index"
76
90
  v-bind="args"
77
- v-model="value"
91
+ v-model="values[option]"
78
92
  :[args.enum]="option"
79
93
  :label="option"
80
94
  :options="[
81
95
  { value: option + 1, label: option },
82
96
  { value: option + 2, label: option },
83
97
  ]"
98
+ class="w-auto"
84
99
  />
85
100
  </URow>
86
101
  `,
@@ -94,24 +109,35 @@ Default.args = {
94
109
  export const Disabled = DefaultTemplate.bind({});
95
110
  Disabled.args = {
96
111
  name: "Disabled",
97
- disabled: true,
112
+ label: "You can disable the whole toggle or specific items",
113
+ options: [
114
+ { value: "11", label: "Admin" },
115
+ { value: "12", label: "Editor", disabled: true },
116
+ { value: "13", label: "Viewer" },
117
+ { value: "14", label: "Guest", disabled: true },
118
+ ],
98
119
  };
99
120
 
100
- export const Label = DefaultTemplate.bind({});
101
- Label.args = {
102
- name: "Label",
103
- label: "Label",
104
- description: "description",
105
- };
121
+ export const Description = DefaultTemplate.bind({});
122
+ Description.args = { name: "Description", description: "You can also add description" };
106
123
 
107
124
  export const Sizes = EnumVariantTemplate.bind({});
108
- Sizes.args = {
109
- name: "sizeTemplate",
110
- enum: "size",
111
- };
125
+ Sizes.args = { name: "sizeTemplate", enum: "size" };
112
126
 
113
127
  export const Multiple = DefaultTemplate.bind({});
114
- Multiple.args = { name: "multipleTemplate", multiple: true };
128
+ Multiple.args = {
129
+ name: "multiple",
130
+ multiple: true,
131
+ label: "You can choose more than one option",
132
+ };
133
+
134
+ export const Error = DefaultTemplate.bind({});
135
+ Error.args = {
136
+ name: "error",
137
+ multiple: true,
138
+ modelValue: [],
139
+ label: "If no option is selected, error message is displayed",
140
+ };
115
141
 
116
142
  export const Block = DefaultTemplate.bind({});
117
143
  Block.args = { name: "block", block: true };
@@ -126,6 +152,7 @@ export const Square = DefaultTemplate.bind({});
126
152
  Square.args = {
127
153
  name: "square",
128
154
  square: true,
155
+ label: "Square prop is useful when icons are present",
129
156
  slotTemplate: `
130
157
  <template #default>
131
158
  <UToggleItem value="1">
@@ -143,14 +170,21 @@ Square.args = {
143
170
  `,
144
171
  };
145
172
 
146
- export const SlotDefault = DefaultTemplate.bind({});
147
- SlotDefault.args = {
148
- name: "slotDefault",
173
+ export const DefaultSlot = DefaultTemplate.bind({});
174
+ DefaultSlot.args = {
175
+ name: "defaultSlot",
176
+ label: "Please select an operation to proceed",
149
177
  slotTemplate: `
150
178
  <template #default>
151
- <UToggleItem label="label 1" value="1" />
152
- <UToggleItem label="label 2" value="2" />
153
- <UToggleItem label="label 3" value="3" />
179
+ <UToggleItem value="1">
180
+ <UBadge label="Download" color="green" right-icon="download" />
181
+ </UToggleItem>
182
+ <UToggleItem value="2">
183
+ <UBadge label="Edit" color="amber" right-icon="edit" />
184
+ </UToggleItem>
185
+ <UToggleItem value="3">
186
+ <UBadge label="Delete" color="red" right-icon="delete" />
187
+ </UToggleItem>
154
188
  </template>
155
189
  `,
156
190
  };
@@ -26,6 +26,11 @@ export interface Props {
26
26
  */
27
27
  size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl";
28
28
 
29
+ /**
30
+ * Error message.
31
+ */
32
+ error?: string;
33
+
29
34
  /**
30
35
  * Label placement.
31
36
  */
@@ -77,9 +82,9 @@ export interface Props {
77
82
  square?: boolean;
78
83
 
79
84
  /**
80
- * Remove button ring on focus.
85
+ * Show button ring on focus.
81
86
  */
82
- noRing?: boolean;
87
+ ring?: boolean;
83
88
 
84
89
  /**
85
90
  * Component config object.
@@ -37,7 +37,7 @@ const getToggleSize = inject<() => ButtonSize>("getToggleSize", () => "md" as Bu
37
37
  const getToggleRound = inject<() => boolean>("getToggleRound", () => false);
38
38
  const getToggleBlock = inject<() => boolean>("getToggleBlock", () => false);
39
39
  const getToggleSquare = inject<() => boolean>("getToggleSquare", () => false);
40
- const getToggleNoRing = inject<() => boolean>("getToggleNoRing", () => true);
40
+ const getToggleRing = inject<() => boolean>("getToggleRing", () => false);
41
41
  const getToggleSplit = inject<() => boolean>("getToggleSplit", () => true);
42
42
 
43
43
  const getToggleDisabled = inject<() => boolean>(
@@ -109,7 +109,7 @@ const { toggleButtonInactiveAttrs, toggleButtonActiveAttrs, toggleInputAttrs } =
109
109
  :block="getToggleBlock()"
110
110
  :square="getToggleSquare()"
111
111
  :disabled="getToggleDisabled() || disabled"
112
- :no-ring="getToggleNoRing() || !getToggleSplit()"
112
+ :ring="getToggleRing() || getToggleSplit()"
113
113
  v-bind="isSelected ? toggleButtonActiveAttrs : toggleButtonInactiveAttrs"
114
114
  @click="onClickSetValue"
115
115
  >
@@ -7,6 +7,7 @@ import {
7
7
 
8
8
  import UToggleItem from "../../ui.button-toggle-item/UToggleItem.vue";
9
9
  import UIcon from "../../ui.image-icon/UIcon.vue";
10
+ import URow from "../../ui.container-row/URow.vue";
10
11
 
11
12
  import type { Meta, StoryFn } from "@storybook/vue3";
12
13
  import type { Props } from "../types.ts";
@@ -58,26 +59,32 @@ Default.args = {};
58
59
  export const Disabled = DefaultTemplate.bind({});
59
60
  Disabled.args = { disabled: true };
60
61
 
61
- export const SlotLeft = DefaultTemplate.bind({});
62
- SlotLeft.args = {
63
- slotTemplate: `
64
- <template #left>
65
- <UIcon
66
- name="star"
67
- color="green"
68
- />
69
- </template>
70
- `,
71
- };
62
+ export const Slots: StoryFn<UToggleItemArgs> = (args) => ({
63
+ components: { UToggleItem, UIcon, URow },
64
+ setup() {
65
+ return { args };
66
+ },
67
+ template: `
68
+ <URow>
69
+ <UToggleItem label="Download">
70
+ <template #left>
71
+ <UIcon
72
+ name="download"
73
+ color="green"
74
+ size="sm"
75
+ />
76
+ </template>
77
+ </UToggleItem>
72
78
 
73
- export const SlotRight = DefaultTemplate.bind({});
74
- SlotRight.args = {
75
- slotTemplate: `
76
- <template #right>
77
- <UIcon
78
- name="star"
79
- color="green"
80
- />
81
- </template>
79
+ <UToggleItem label="Edit">
80
+ <template #right>
81
+ <UIcon
82
+ name="edit"
83
+ color="orange"
84
+ size="sm"
85
+ />
86
+ </template>
87
+ </UToggleItem>
88
+ </URow>
82
89
  `,
83
- };
90
+ });
@@ -46,8 +46,8 @@ export default /*tw*/ {
46
46
  dotted: {
47
47
  true: "border-dotted",
48
48
  },
49
- noBorder: {
50
- true: "border-transparent",
49
+ border: {
50
+ false: "border-transparent",
51
51
  },
52
52
  },
53
53
  },
@@ -68,9 +68,9 @@ export default /*tw*/ {
68
68
  variant: "default",
69
69
  padding: "all",
70
70
  size: "md",
71
+ border: true,
71
72
  dashed: false,
72
73
  dotted: false,
73
74
  vertical: false,
74
- noBorder: false,
75
75
  },
76
76
  };
@@ -93,4 +93,4 @@ Vertical.args = {
93
93
  };
94
94
 
95
95
  export const NoBorder = DefaultTemplate.bind({});
96
- NoBorder.args = { label: "label", noBorder: true };
96
+ NoBorder.args = { label: "label", border: false };
@@ -41,9 +41,9 @@ export interface Props {
41
41
  vertical?: boolean;
42
42
 
43
43
  /**
44
- * Remove border (keeps only spacings).
44
+ * Show divider border (or keeps only spacings).
45
45
  */
46
- noBorder?: boolean;
46
+ border?: boolean;
47
47
 
48
48
  /**
49
49
  * Component config object.
@@ -53,7 +53,7 @@ const {
53
53
  <slot name="header-right" />
54
54
  </div>
55
55
 
56
- <UDivider size="xl" padding="after" :no-border="!underlined" v-bind="underlineAttrs" />
56
+ <UDivider size="xl" padding="after" :border="underlined" v-bind="underlineAttrs" />
57
57
  </template>
58
58
 
59
59
  <div v-bind="contentAttrs">
@@ -117,7 +117,6 @@ const {
117
117
  backLinkIconAttrs,
118
118
  closeIconAttrs,
119
119
  modalDividerAttrs,
120
- dividerSpacingAttrs,
121
120
  overlayAttrs,
122
121
  wrapperAttrs,
123
122
  innerWrapperAttrs,
@@ -216,11 +215,15 @@ const {
216
215
  <slot />
217
216
  </div>
218
217
 
219
- <UDivider v-if="!isExistFooter || !noDivider" no-border v-bind="dividerSpacingAttrs" />
218
+ <UDivider
219
+ v-if="divider || !isExistFooter"
220
+ :border="divider && isExistFooter"
221
+ variant="dark"
222
+ padding="before"
223
+ v-bind="modalDividerAttrs"
224
+ />
220
225
 
221
226
  <template v-if="isExistFooter">
222
- <UDivider v-if="!noDivider" variant="dark" padding="none" v-bind="modalDividerAttrs" />
223
-
224
227
  <div v-bind="footerAttrs">
225
228
  <div v-if="hasSlotContent($slots['footer-left'])" v-bind="footerLeftAttrs">
226
229
  <!-- @slot Use it to add something to the left side of the footer. -->
@@ -28,8 +28,7 @@ export default /*tw*/ {
28
28
  headerRight: "",
29
29
  closeIcon: "{UIcon}",
30
30
  body: "space-y-4 px-4 md:px-8 text-sm",
31
- modalDivider: "{UDivider}",
32
- dividerSpacing: "{UDivider}",
31
+ modalDivider: "{UDivider} pt-8",
33
32
  footer: "flex justify-between px-4 md:px-8 py-8 max-md:flex-col max-md:gap-4",
34
33
  footerLeft: "flex flex-col md:flex-row space-y-4 md:space-x-4 md:space-y-0 w-full",
35
34
  footerRight: "flex flex-col md:flex-row space-y-4 md:space-x-4 md:space-y-0 w-full justify-end",
@@ -55,7 +54,7 @@ export default /*tw*/ {
55
54
  defaults: {
56
55
  size: "sm",
57
56
  inner: false,
58
- noDivider: false,
57
+ divider: true,
59
58
  closeOnEsc: true,
60
59
  closeOnCross: true,
61
60
  closeOnOverlay: true,
@@ -60,7 +60,7 @@ export interface Props {
60
60
  /**
61
61
  * Hide divider between content end footer.
62
62
  */
63
- noDivider?: boolean;
63
+ divider?: boolean;
64
64
 
65
65
  /**
66
66
  * Attach small modal to the bottom of the screen (mobile version only).
@@ -97,7 +97,7 @@ const {
97
97
  <div v-bind="headerLeftFallbackAttrs">
98
98
  <ULink
99
99
  v-if="isShownArrowButton"
100
- no-ring
100
+ :ring="false"
101
101
  size="sm"
102
102
  color="gray"
103
103
  :to="backTo"
@@ -110,7 +110,7 @@ const { config, dropdownButtonAttrs, dropdownListAttrs, dropdownIconAttrs, wrapp
110
110
  @slot Use it to add something after the label.
111
111
  @binding {boolean} opened
112
112
  -->
113
- <slot name="right" :opened="isShownOptions">
113
+ <slot name="toggle" :opened="isShownOptions">
114
114
  <UIcon
115
115
  v-if="!noIcon"
116
116
  internal
@@ -9,6 +9,7 @@ import UDropdownButton from "../../ui.dropdown-button/UDropdownButton.vue";
9
9
  import URow from "../../ui.container-row/URow.vue";
10
10
  import UCol from "../../ui.container-col/UCol.vue";
11
11
  import UIcon from "../../ui.image-icon/UIcon.vue";
12
+ import ULink from "../../ui.button-link/ULink.vue";
12
13
 
13
14
  import type { Meta, StoryFn } from "@storybook/vue3";
14
15
  import type { Props } from "../types.ts";
@@ -18,7 +19,7 @@ interface DefaultUDropdownButtonArgs extends Props {
18
19
  }
19
20
 
20
21
  interface EnumUDropdownButtonArgs extends DefaultUDropdownButtonArgs {
21
- enum: keyof Pick<Props, "size" | "variant">;
22
+ enum: keyof Pick<Props, "size" | "variant" | "xPosition" | "yPosition">;
22
23
  }
23
24
 
24
25
  export default {
@@ -36,7 +37,7 @@ export default {
36
37
  docs: {
37
38
  ...getDocsDescription(UDropdownButton.__name),
38
39
  story: {
39
- height: "200px",
40
+ height: "250px",
40
41
  },
41
42
  },
42
43
  },
@@ -45,7 +46,7 @@ export default {
45
46
  const DefaultTemplate: StoryFn<DefaultUDropdownButtonArgs> = (
46
47
  args: DefaultUDropdownButtonArgs,
47
48
  ) => ({
48
- components: { UDropdownButton, UIcon },
49
+ components: { UDropdownButton, UIcon, ULink },
49
50
  setup() {
50
51
  const slots = getSlotNames(UDropdownButton.__name);
51
52
 
@@ -122,19 +123,35 @@ Variants.args = { enum: "variant" };
122
123
  export const Sizes = EnumVariantTemplate.bind({});
123
124
  Sizes.args = { enum: "size" };
124
125
 
126
+ export const DropdownListXPosition = EnumVariantTemplate.bind({});
127
+ DropdownListXPosition.args = { enum: "xPosition" };
128
+
129
+ export const DropdownListYPosition = EnumVariantTemplate.bind({});
130
+ DropdownListYPosition.args = { enum: "yPosition" };
131
+
125
132
  export const VariantColors = VariantColorsTemplate.bind({});
126
133
  VariantColors.args = {};
127
134
 
128
135
  export const WithoutDropdownIcon = EnumVariantTemplate.bind({});
129
136
  WithoutDropdownIcon.args = { enum: "variant", noIcon: true };
130
137
 
138
+ export const CustomDropdownIcon = DefaultTemplate.bind({});
139
+ CustomDropdownIcon.args = {
140
+ config: {
141
+ defaults: {
142
+ dropdownIcon: "expand_circle_down",
143
+ },
144
+ },
145
+ };
146
+
131
147
  export const DefaultSlot = DefaultTemplate.bind({});
132
148
  DefaultSlot.args = {
133
149
  slotTemplate: `
134
150
  <template #default>
135
- Custom label
151
+ <UIcon name="unfold_more" color="white" />
136
152
  </template>
137
153
  `,
154
+ noIcon: true,
138
155
  };
139
156
 
140
157
  export const LeftSlot = DefaultTemplate.bind({});
@@ -142,22 +159,22 @@ LeftSlot.args = {
142
159
  slotTemplate: `
143
160
  <template #left>
144
161
  <UIcon
145
- name="archive"
146
- color="red"
162
+ name="heart_plus"
147
163
  size="sm"
164
+ color="green"
148
165
  />
149
166
  </template>
150
167
  `,
151
168
  };
152
169
 
153
- export const RightSlot = DefaultTemplate.bind({});
154
- RightSlot.args = {
170
+ export const SlotToggle = DefaultTemplate.bind({});
171
+ SlotToggle.args = {
155
172
  slotTemplate: `
156
- <template #right>
157
- <UIcon
158
- name="archive"
159
- color="red"
160
- size="sm"
173
+ <template #toggle="{ opened }">
174
+ <ULink
175
+ :label="opened ? 'collapse' : 'expand'"
176
+ color="green"
177
+ :ring=false
161
178
  />
162
179
  </template>
163
180
  `,
@@ -76,11 +76,11 @@ const { config, wrapperAttrs, dropdownLinkAttrs, dropdownListAttrs, dropdownIcon
76
76
  <div v-click-outside="hideOptions" v-bind="wrapperAttrs">
77
77
  <ULink
78
78
  :id="elementId"
79
+ :ring="ring"
79
80
  :size="size"
80
81
  :label="label"
81
82
  :color="color"
82
83
  :dashed="dashed"
83
- :no-ring="noRing"
84
84
  :disabled="disabled"
85
85
  :underlined="underlined"
86
86
  v-bind="dropdownLinkAttrs"
@@ -39,7 +39,7 @@ export default /*tw*/ {
39
39
  xPosition: "left",
40
40
  underlined: undefined,
41
41
  dashed: true,
42
- noRing: true,
42
+ ring: false,
43
43
  noIcon: false,
44
44
  disabled: false,
45
45
  /* icons */
@@ -68,9 +68,9 @@ export interface Props {
68
68
  disabled?: boolean;
69
69
 
70
70
  /**
71
- * Hide focus ring.
71
+ * Show link focus ring.
72
72
  */
73
- noRing?: boolean;
73
+ ring?: boolean;
74
74
 
75
75
  /**
76
76
  * Hide dropdown icon.