vueless 0.0.265 → 0.0.267

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 (43) hide show
  1. package/composable.ui/index.js +3 -4
  2. package/constants/index.js +1 -1
  3. package/package.json +2 -2
  4. package/service.ui/index.js +4 -0
  5. package/ui.button/configs/default.config.js +4 -8
  6. package/ui.button-toggle-item/configs/default.config.js +3 -3
  7. package/ui.container-card/index.vue +1 -1
  8. package/ui.data-list/composables/attrs.composable.js +5 -5
  9. package/ui.data-list/index.vue +1 -1
  10. package/ui.data-table/composables/attrs.composable.js +5 -5
  11. package/ui.dropdown-badge/composables/attrs.composable.js +1 -2
  12. package/ui.dropdown-button/composables/attrs.composable.js +1 -2
  13. package/ui.dropdown-button/configs/default.config.js +2 -2
  14. package/ui.dropdown-link/composables/attrs.composable.js +1 -2
  15. package/ui.dropdown-list/configs/default.config.js +4 -4
  16. package/ui.form-calendar/configs/default.config.js +12 -14
  17. package/ui.form-calendar/index.vue +11 -44
  18. package/ui.form-checkbox-multi-state/index.stories.js +0 -1
  19. package/ui.form-checkbox-multi-state/index.vue +1 -1
  20. package/ui.form-date-picker-range/index.vue +2 -2
  21. package/ui.form-input/configs/default.config.js +2 -2
  22. package/ui.form-input-file/index.vue +2 -1
  23. package/ui.form-input-rating/index.vue +1 -1
  24. package/ui.form-textarea/configs/default.config.js +2 -2
  25. package/ui.image-avatar/composables/attrs.composable.js +10 -12
  26. package/ui.image-icon/composables/attrs.composable.js +10 -12
  27. package/ui.image-icon/configs/default.config.js +1 -1
  28. package/ui.image-icon/index.vue +2 -2
  29. package/ui.loader/composables/attrs.composable.js +10 -12
  30. package/ui.loader-rendering/composables/attrs.composable.js +10 -12
  31. package/ui.loader-top/composables/attrs.composable.js +10 -12
  32. package/ui.loader-top/index.stories.js +1 -1
  33. package/ui.navigation-pagination/composables/attrs.composable.js +9 -5
  34. package/ui.navigation-progress/composables/attrs.composable.js +10 -12
  35. package/ui.navigation-progress/index.stories.js +10 -13
  36. package/ui.navigation-progress/index.vue +1 -1
  37. package/ui.navigation-tab/composables/attrs.composable.js +9 -5
  38. package/ui.navigation-tab/configs/default.config.js +1 -1
  39. package/ui.navigation-tabs/composables/attrs.composable.js +9 -5
  40. package/ui.navigation-tabs/configs/default.config.js +1 -1
  41. package/ui.other-dot/composables/attrs.composable.js +10 -12
  42. package/ui.other-dot/index.stories.js +1 -1
  43. package/web-types.json +2 -2
@@ -198,7 +198,6 @@ function mergeConfigs({
198
198
  safelistColors,
199
199
  defaultVariants,
200
200
  compoundVariants,
201
- iconNameCapitalize,
202
201
  iconName,
203
202
  } = SYSTEM_CONFIG_KEY;
204
203
 
@@ -235,7 +234,7 @@ function mergeConfigs({
235
234
 
236
235
  const isObject = isObjectComposedConfig || isObjectGlobalConfig || isObjectPropsConfig;
237
236
  const isEmpty = composedConfig[key] === null;
238
- const isIconName = key.includes(iconName) || key.includes(iconNameCapitalize);
237
+ const isIconName = key.toLowerCase().includes(iconName.toLowerCase());
239
238
  const isI18n = key === i18n;
240
239
 
241
240
  if (key === "variants" && !isVariants) {
@@ -403,8 +402,8 @@ function isSystemKey(key) {
403
402
 
404
403
  return (
405
404
  isExactKey ||
406
- key.includes(SYSTEM_CONFIG_KEY.iconName) ||
407
- key.includes(SYSTEM_CONFIG_KEY.iconNameCapitalize)
405
+ key.toLowerCase().includes(SYSTEM_CONFIG_KEY.iconName.toLowerCase()) ||
406
+ key.toLowerCase().includes(SYSTEM_CONFIG_KEY.transition.toLowerCase())
408
407
  );
409
408
  }
410
409
 
@@ -60,7 +60,7 @@ export const SYSTEM_CONFIG_KEY = {
60
60
  safelist: "safelist",
61
61
  component: "component",
62
62
  safelistColors: "safelistColors",
63
- iconNameCapitalize: "IconName",
63
+ transition: "transition",
64
64
  iconName: "iconName",
65
65
  ...CVA_CONFIG_KEY,
66
66
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.265",
3
+ "version": "0.0.267",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -37,7 +37,7 @@
37
37
  "@release-it/bumper": "^6.0.1",
38
38
  "@vitejs/plugin-vue": "^5.0.5",
39
39
  "@vue/eslint-config-prettier": "^9.0.0",
40
- "@vueless/plugin-vite": "^0.0.45",
40
+ "@vueless/plugin-vite": "^0.0.49",
41
41
  "@vueless/storybook": "^0.0.34",
42
42
  "@vueless/web-types": "^0.0.13",
43
43
  "autoprefixer": "^10.4.19",
@@ -228,6 +228,10 @@ export default class UIService {
228
228
  @returns { String }
229
229
  */
230
230
  setColor(classes, color) {
231
+ if (typeof classes !== "string") {
232
+ return "";
233
+ }
234
+
231
235
  return classes?.replaceAll("{color}", color);
232
236
  }
233
237
 
@@ -24,14 +24,14 @@ export default /*tw*/ {
24
24
  hover:bg-{color}-700 hover:border-{color}-700
25
25
  focus:bg-{color}-700 focus:border-{color}-700
26
26
  active:bg-{color}-800 active:border-{color}-800
27
- disabled:bg-{color}-300 disabled:border-{color}-300 disabled:text-white
27
+ disabled:bg-gray-400 disabled:border-gray-400 disabled:text-white
28
28
  `,
29
29
  secondary: `
30
30
  text-{color}-600 border-{color}-600
31
31
  hover:text-{color}-700 hover:border-{color}-700
32
32
  focus:text-{color}-700 focus:border-{color}-700
33
33
  active:text-{color}-800 active:border-{color}-800
34
- disabled:text-{color}-300 disabled:border-{color}-300
34
+ disabled:text-gray-400 disabled:border-gray-400
35
35
  `,
36
36
  thirdary: `
37
37
  border-transparent
@@ -39,7 +39,7 @@ export default /*tw*/ {
39
39
  hover:text-{color}-700 hover:bg-{color}-700/10
40
40
  focus:text-{color}-700 focus:bg-{color}-700/10
41
41
  active:text-{color}-800 active:bg-{color}-800/15
42
- disabled:text-{color}-300
42
+ disabled:text-gray-400 disabled:bg-transparent
43
43
  `,
44
44
  },
45
45
  color: {
@@ -69,7 +69,6 @@ export default /*tw*/ {
69
69
  hover:bg-gray-800 hover:border-gray-800
70
70
  focus:bg-gray-800 focus:border-gray-800
71
71
  active:bg-gray-700 active:border-gray-700
72
- disabled:bg-gray-400 disabled:border-gray-400 disabled:text-white
73
72
  `,
74
73
  },
75
74
  {
@@ -80,7 +79,6 @@ export default /*tw*/ {
80
79
  hover:text-gray-800 hover:border-gray-800
81
80
  focus:text-gray-800 focus:border-gray-800
82
81
  active:text-gray-700 active:border-gray-700
83
- disabled:border-gray-400
84
82
  `,
85
83
  },
86
84
  {
@@ -91,7 +89,6 @@ export default /*tw*/ {
91
89
  hover:text-gray-800 hover:bg-gray-800/15
92
90
  focus:text-gray-800 focus:bg-gray-800/15
93
91
  active:text-gray-700 active:bg-gray-700/20
94
- disabled:bg-transparent
95
92
  `,
96
93
  },
97
94
  {
@@ -122,10 +119,9 @@ export default /*tw*/ {
122
119
  hover:text-gray-800 hover:bg-white
123
120
  focus:text-gray-800 focus:bg-white
124
121
  active:text-gray-700 active:bg-white
125
- disabled:bg-transparent
126
122
  `,
127
123
  },
128
- { filled: true, variant: "thirdary", class: "bg-{color}-700/10" },
124
+ { filled: true, variant: "thirdary", class: "bg-{color}-600/10" },
129
125
  { filled: true, variant: "thirdary", color: "grayscale", class: "bg-gray-900/10" },
130
126
  { filled: true, variant: "thirdary", color: "white", class: "bg-gray-50" },
131
127
  { iconLeft: true, size: "2xs", class: "pl-1" },
@@ -6,7 +6,7 @@ export default /*tw*/ {
6
6
  hover:text-brand-600 hover:border-brand-600 hover:relative hover:z-10
7
7
  focus:text-brand-600 focus:border-brand-600 focus:relative focus:z-10 focus:ring-brand-700/15 focus-within:ring-brand-700/15
8
8
  active:text-brand-700 active:border-brand-700 active:relative active:z-10
9
- disabled:border-brand-300 disabled:z-0
9
+ disabled:z-0
10
10
  `,
11
11
  variants: {
12
12
  separated: {
@@ -27,12 +27,12 @@ export default /*tw*/ {
27
27
  {
28
28
  selected: true,
29
29
  variant: "primary",
30
- class: "!text-white bg-brand-600 border-brand-600 disabled:border-brand-600",
30
+ class: "!text-white bg-brand-600 border-brand-600 ",
31
31
  },
32
32
  {
33
33
  selected: true,
34
34
  variant: "secondary",
35
- class: "text-brand-600 border-brand-600 disabled:border-brand-600 bg-brand-600/10",
35
+ class: "text-brand-600 border-brand-600 bg-brand-600/10",
36
36
  },
37
37
  {
38
38
  selected: true,
@@ -8,7 +8,7 @@
8
8
  <!-- @slot Use it to customise left side of the header. -->
9
9
  <slot name="header-left">
10
10
  <div v-bind="headerLeftFallbackAttrs">
11
- <UHeader :label="title" size="md" color="brand" v-bind="titleAttrs" />
11
+ <UHeader :label="title" size="md" v-bind="titleAttrs" />
12
12
  <div v-if="description" v-bind="descriptionAttrs" v-text="description" />
13
13
  </div>
14
14
  </slot>
@@ -4,7 +4,7 @@ import { computed } from "vue";
4
4
  import { cva, cx } from "../../service.ui";
5
5
 
6
6
  export default function useAttrs(props) {
7
- const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
7
+ const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
8
8
  defaultConfig,
9
9
  () => props.config,
10
10
  );
@@ -14,15 +14,15 @@ export default function useAttrs(props) {
14
14
  if (isSystemKey(key)) continue;
15
15
 
16
16
  const classes = computed(() => {
17
- const value = config.value[key];
17
+ let value = config.value[key];
18
18
 
19
- if (value.variants || value.compoundVariants) {
20
- return cva(value)({
19
+ if (isCVA(value)) {
20
+ value = cva(value)({
21
21
  ...props,
22
22
  });
23
23
  }
24
24
 
25
- return "";
25
+ return value;
26
26
  });
27
27
 
28
28
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -59,7 +59,7 @@
59
59
  v-if="!element.isHiddenDelete"
60
60
  internal
61
61
  interactive
62
- color="gray"
62
+ color="red"
63
63
  :size="iconSize"
64
64
  :name="config.deleteIconName"
65
65
  :data-cy="`${dataCy}-delete`"
@@ -7,7 +7,7 @@ export default function useAttrs(
7
7
  props,
8
8
  { tableRows, isShownActionsHeader, isHeaderSticky, isFooterSticky },
9
9
  ) {
10
- const { config, getAttrs, hasSlotContent, isSystemKey } = useUI(
10
+ const { config, getAttrs, hasSlotContent, isSystemKey, isCVA } = useUI(
11
11
  defaultConfig,
12
12
  () => props.config,
13
13
  );
@@ -31,16 +31,16 @@ export default function useAttrs(
31
31
  if (isSystemKey(key)) continue;
32
32
 
33
33
  const classes = computed(() => {
34
- const value = config.value[key];
34
+ let value = config.value[key];
35
35
 
36
- if (value.variants || value.compoundVariants) {
37
- return cva(value)({
36
+ if (isCVA(value)) {
37
+ value = cva(value)({
38
38
  ...props,
39
39
  compact: Boolean(props.compact),
40
40
  });
41
41
  }
42
42
 
43
- return "";
43
+ return value;
44
44
  });
45
45
 
46
46
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -30,11 +30,10 @@ export default function useAttrs(props, { isShownOptions }) {
30
30
 
31
31
  if (key === "icon") {
32
32
  const iconAttrs = attrs[`${key}Attrs`];
33
- const rotateClasses = isShownOptions.value && config.value.iconRotate;
34
33
 
35
34
  attrs[`${key}Attrs`] = computed(() => ({
36
35
  ...iconAttrs.value,
37
- class: cx([iconAttrs.value.class, rotateClasses]),
36
+ class: cx([iconAttrs.value.class, isShownOptions.value && config.value.iconRotate]),
38
37
  }));
39
38
  }
40
39
 
@@ -30,11 +30,10 @@ export default function useAttrs(props, { isShownOptions }) {
30
30
 
31
31
  if (key === "icon") {
32
32
  const iconAttrs = attrs[`${key}Attrs`];
33
- const rotateClasses = isShownOptions.value && config.value.iconRotate;
34
33
 
35
34
  attrs[`${key}Attrs`] = computed(() => ({
36
35
  ...iconAttrs.value,
37
- class: cx([iconAttrs.value.class, rotateClasses]),
36
+ class: cx([iconAttrs.value.class, isShownOptions.value && config.value.iconRotate]),
38
37
  }));
39
38
  }
40
39
 
@@ -12,8 +12,8 @@ export default /*tw*/ {
12
12
  `,
13
13
  variants: {
14
14
  listYPosition: {
15
- top: "bottom-full mb-4",
16
- bottom: "top-full mt-4",
15
+ top: "bottom-full mb-2",
16
+ bottom: "top-full mt-2",
17
17
  },
18
18
  listXPosition: {
19
19
  left: "left-0",
@@ -30,11 +30,10 @@ export default function useAttrs(props, { isShownOptions }) {
30
30
 
31
31
  if (key === "icon") {
32
32
  const iconAttrs = attrs[`${key}Attrs`];
33
- const rotateClasses = isShownOptions.value && config.value.iconRotate;
34
33
 
35
34
  attrs[`${key}Attrs`] = computed(() => ({
36
35
  ...iconAttrs.value,
37
- class: cx([iconAttrs.value.class, rotateClasses]),
36
+ class: cx([iconAttrs.value.class, isShownOptions.value && config.value.iconRotate]),
38
37
  }));
39
38
  }
40
39
 
@@ -30,7 +30,7 @@ export default /*tw*/ {
30
30
  base: `
31
31
  rounded px-2 py-2.5 flex items-center align-middle whitespace-nowrap cursor-pointer
32
32
  font-normal !leading-none normal-case text-gray-900
33
- hover:bg-gray-100
33
+ hover:bg-brand-50
34
34
  overflow-hidden text-ellipsis
35
35
  `,
36
36
  variants: {
@@ -44,13 +44,13 @@ export default /*tw*/ {
44
44
  },
45
45
  },
46
46
  },
47
- optionHighlight: "bg-gray-100",
47
+ optionHighlight: "bg-brand-50",
48
48
  optionSelected: "font-bold",
49
49
  optionItem: "group/item block",
50
50
  optionContent: "overflow-hidden text-ellipsis",
51
51
  addTitleWrapper: `
52
- flex items-center justify-between cursor-pointer p-3 hover:bg-gray-100
53
- active:bg-gray-200 active:font-medium -mb-6
52
+ flex items-center justify-between cursor-pointer p-3 hover:bg-brand-50
53
+ active:bg-brand-100 active:font-medium -mb-6
54
54
  `,
55
55
  addTitle: "text-sm font-medium text-gray-900",
56
56
  addTitleHotkey: "text-gray-500",
@@ -1,9 +1,9 @@
1
1
  export default /*tw*/ {
2
- wrapper: "p-3 pb-4 w-64 border border-brand-300 rounded-dynamic bg-white shadow overflow-hidden focus:outline-none",
2
+ wrapper: "p-3 pb-4 w-64 border border-gray-300 rounded-dynamic bg-white shadow overflow-hidden focus:outline-none",
3
3
  navigation: "mb-2 pb-2 border-b flex items-center justify-between",
4
- navigationSwitchViewButton: "-ml-3 pl-3 text-sm rounded-l-none",
4
+ navigationSwitchViewButton: "{UButton} -ml-3 pl-3 text-sm rounded-l-none",
5
5
  dayViewSwitchLabel: "flex gap-1",
6
- dayViewSwitchLabelMonth: "text-brand-900",
6
+ dayViewSwitchLabelMonth: "",
7
7
  dayViewSwitchLabelIcon: "",
8
8
  dayViewSwitchLabelIconName: "keyboard_arrow_right",
9
9
  nextPrevWrapper: {
@@ -15,36 +15,34 @@ export default /*tw*/ {
15
15
  },
16
16
  },
17
17
  nextPrevButton: "{UButton}",
18
- nextIcon: "{UIcon}",
19
18
  nextIconName: "keyboard_arrow_right",
20
- prevIcon: "{UIcon}",
21
19
  prevIconName: "keyboard_arrow_left",
22
20
  dayView: "",
23
21
  weekDays: "grid grid-cols-7",
24
- weekDay: "flex size-8 items-center justify-center text-xs uppercase text-brand-500",
22
+ weekDay: "flex size-8 items-center justify-center text-xs uppercase text-gray-500",
25
23
  days: "grid grid-cols-7",
26
- day: "mx-auto size-8 rounded-dynamic text-sm hover:bg-brand-100 disabled:opacity-50 disabled:cursor-not-allowed",
24
+ day: "mx-auto size-8 rounded-dynamic text-sm hover:bg-brand-100 hover:text-brand-600 disabled:opacity-50 disabled:cursor-not-allowed",
27
25
  activeDay: "bg-brand-100 hover:bg-brand-100",
28
26
  inRangeFirstDay: "rounded-dynamic rounded-r-none bg-brand-200 text-brand-900 hover:bg-brand-200",
29
27
  inRangeLastDay: "rounded-dynamic rounded-l-none bg-brand-200 text-brand-900 hover:bg-brand-200",
30
28
  inRangeDay: "bg-brand-100 text-brand-900 hover:!bg-brand-200 rounded-none",
31
- selectedDay: "bg-brand-900 text-white hover:bg-brand-900",
32
- currentDay: "hover:bg-brand-100 border-2 border-brand-900",
33
- anotherMonthDay: "hover:bg-brand-100 text-brand-400",
29
+ selectedDay: "bg-brand-600 text-white hover:bg-brand-600 hover:text-white",
30
+ currentDay: "hover:bg-brand-100 border-2 border-brand-600",
31
+ anotherMonthDay: "hover:bg-brand-100 text-gray-400",
34
32
  monthView: "grid grid-cols-4 items-center justify-center",
35
- month: "{UButton} mx-auto flex h-12 w-full rounded-dynamic hover:!bg-brand-900 hover:text-white",
33
+ month: "{UButton} mx-auto flex h-12 w-full rounded-dynamic",
36
34
  selectedMonth: "bg-brand-900 hover:bg-brand-900 text-white",
37
35
  activeMonth: "bg-brand-100",
38
36
  currentMoth: "border-2 border-brand-900",
39
37
  yearView: "grid grid-cols-4 items-center justify-center",
40
- year: "{UButton} mx-auto flex h-12 w-full rounded-dynamic hover:!bg-brand-900 hover:text-white",
38
+ year: "{UButton} mx-auto flex h-12 w-full rounded-dynamic",
41
39
  currentYear: "border-2 border-brand-900",
42
- selectedYear: "bg-brand-900 hover:bg-brand-900 text-white",
40
+ selectedYear: "bg-brand-600 hover:bg-brand-600 text-white",
43
41
  activeYear: "bg-brand-100",
44
42
  timepicker: "mt-2 pl-1 pt-3 text-sm flex items-center justify-between gap-2 border-t border-brand-200",
45
43
  timepickerLabel: "w-full",
46
44
  timepickerInputWrapper: "flex items-center gap-px rounded-dynamic border border-brand-300",
47
- timepickerInput: " w-11 border-none px-2.5 py-1.5 text-center text-sm focus:ring-brand-700/15",
45
+ timepickerInput: "w-11 border-none px-2.5 py-1.5 text-center text-sm focus:ring-brand-700/15",
48
46
  timepickerLeftInput: "rounded-l-dynamic",
49
47
  timepickerRightInput: " rounded-r-dynamic",
50
48
  timepickerSubmitButton: "{UButton} py-2 border-0",
@@ -7,11 +7,11 @@
7
7
  :disabled="!range"
8
8
  >
9
9
  <UButton
10
- size="xs"
11
- color="gray"
12
10
  square
13
- variant="thirdary"
14
11
  no-ring
12
+ size="sm"
13
+ variant="thirdary"
14
+ :icon-right="config.dayViewSwitchLabelIconName"
15
15
  v-bind="navigationSwitchViewButtonAttrs"
16
16
  @mousedown.prevent.capture
17
17
  @click="onClickViewSwitch"
@@ -22,61 +22,33 @@
22
22
  </span>
23
23
  <span v-if="isCurrentView.month" v-text="viewSwitchLabel.year" />
24
24
  <span v-if="isCurrentView.year" v-text="viewSwitchLabel.yearsRange" />
25
-
26
- <template #right>
27
- <UIcon
28
- v-if="!range"
29
- internal
30
- size="sm"
31
- color="gray"
32
- variant="light"
33
- :name="config.dayViewSwitchLabelIconName"
34
- v-bind="dayViewSwitchLabelIconAttrs"
35
- />
36
- </template>
37
25
  </UButton>
38
26
  </Teleport>
39
27
 
40
28
  <div v-bind="nextPrevWrapperAttrs">
41
29
  <UButton
42
- size="xs"
43
30
  square
44
- variant="thirdary"
45
31
  no-ring
32
+ size="sm"
33
+ variant="thirdary"
34
+ :icon-left="config.prevIconName"
46
35
  v-bind="nextPrevButtonAttrs"
47
36
  @mousedown.prevent.capture
48
37
  @click="onClickPrevButton"
49
- >
50
- <UIcon
51
- internal
52
- size="sm"
53
- color="gray"
54
- variant="light"
55
- :name="config.prevIconName"
56
- v-bind="prevIconAttrs"
57
- />
58
- </UButton>
38
+ />
59
39
 
60
40
  <div ref="rangeSwitchViewContainerRef" />
61
41
 
62
42
  <UButton
63
- size="xs"
64
43
  square
65
- variant="thirdary"
66
44
  no-ring
45
+ size="sm"
46
+ variant="thirdary"
47
+ :icon-left="config.nextIconName"
67
48
  v-bind="nextPrevButtonAttrs"
68
49
  @mousedown.prevent.capture
69
50
  @click="onClickNextButton"
70
- >
71
- <UIcon
72
- internal
73
- size="sm"
74
- color="gray"
75
- variant="light"
76
- :name="config.nextIconName"
77
- v-bind="nextIconAttrs"
78
- />
79
- </UButton>
51
+ />
80
52
  </div>
81
53
  </div>
82
54
 
@@ -161,9 +133,7 @@
161
133
  import { computed, onMounted, ref, watch } from "vue";
162
134
  import { merge } from "lodash-es";
163
135
 
164
- import UIcon from "../ui.image-icon";
165
136
  import UButton from "../ui.button";
166
-
167
137
  import UIService from "../service.ui";
168
138
 
169
139
  import {
@@ -341,10 +311,7 @@ const {
341
311
  navigationSwitchViewButtonAttrs,
342
312
  dayViewSwitchLabelAttrs,
343
313
  dayViewSwitchLabelMonthAttrs,
344
- dayViewSwitchLabelIconAttrs,
345
- nextIconAttrs,
346
314
  nextPrevButtonAttrs,
347
- prevIconAttrs,
348
315
  timepickerAttrs,
349
316
  timepickerLabelAttrs,
350
317
  timepickerInputWrapperAttrs,
@@ -19,7 +19,6 @@ export default {
19
19
  },
20
20
  argTypes: {
21
21
  ...getArgTypes(UCheckboxMultiState.name),
22
- modelValue: { control: { type: "boolean" } },
23
22
  },
24
23
  };
25
24
 
@@ -8,7 +8,7 @@
8
8
  :color="color"
9
9
  :placement="placement"
10
10
  v-bind="checkboxAttrs"
11
- @click.self="onClickCheckbox"
11
+ @input="onClickCheckbox"
12
12
  />
13
13
  </template>
14
14
 
@@ -1082,13 +1082,13 @@ function onMouseoverCalendar() {
1082
1082
  calendarInnerValue.value.from && !calendarInnerValue.value.to && !inputRangeFromError.value;
1083
1083
 
1084
1084
  if (hasValues || !rangeStart.value) {
1085
- rangeInputStartRef.value.input.focus();
1085
+ rangeInputStartRef.value.inputRef.focus();
1086
1086
 
1087
1087
  return;
1088
1088
  }
1089
1089
 
1090
1090
  if (hasOnlyFromValue) {
1091
- rangeInputEndRef.value.input.focus();
1091
+ rangeInputEndRef.value.inputRef.focus();
1092
1092
 
1093
1093
  return;
1094
1094
  }
@@ -43,8 +43,8 @@ export default /*tw*/ {
43
43
  },
44
44
  error: {
45
45
  true: `
46
- bg-red-50 hover:border-red-400 focus:border-red-500 focus:ring-red-700/15
47
- focus-within:border-red-500 focus-within:ring-red-700/15
46
+ bg-red-50 hover:border-red-400 focus:border-red-500 focus:ring-red-500/15
47
+ focus-within:border-red-500 focus-within:ring-red-500/15
48
48
  `,
49
49
  },
50
50
  },
@@ -28,6 +28,7 @@
28
28
  pill
29
29
  internal
30
30
  interactive
31
+ color="brand"
31
32
  :size="removeItemIconSize"
32
33
  :name="config.removeItemIconName"
33
34
  :data-cy="`${dataCy}-remove-item`"
@@ -143,7 +144,7 @@ const props = defineProps({
143
144
  },
144
145
 
145
146
  /**
146
- * Allow select multiple files.
147
+ * Allow selecting multiple files.
147
148
  */
148
149
  multiple: {
149
150
  type: Boolean,
@@ -25,7 +25,7 @@
25
25
  v-for="star in stars"
26
26
  :key="star"
27
27
  internal
28
- color="yellow"
28
+ :color="error ? 'red' : 'brand'"
29
29
  :size="iconSize"
30
30
  :interactive="selectable"
31
31
  :name="star <= counterValue ? config.selectedIconName : config.unselectedIconName"
@@ -5,8 +5,8 @@ export default /*tw*/ {
5
5
  textareaWrapper: {
6
6
  base: `
7
7
  px-3 py-2 bg-white transition
8
- rounded-dynamic border border-gray-300 hover:border-gray-400 hover:focus-within:border-gray-500 focus-within:border-gray-500
9
- focus-within:ring-dynamic focus-within:ring-offset-dynamic focus-within:ring-gray-700/15 focus-within:outline-none
8
+ rounded-dynamic border border-gray-300 hover:border-gray-400 hover:focus-within:border-brand-500 focus-within:border-brand-500
9
+ focus-within:ring-dynamic focus-within:ring-offset-dynamic focus-within:ring-brand-700/15 focus-within:outline-none
10
10
  `,
11
11
  variants: {
12
12
  error: {
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
8
+ const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
9
9
  defaultConfig,
10
10
  () => props.config,
11
11
  );
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
15
15
  if (isSystemKey(key)) continue;
16
16
 
17
17
  const classes = computed(() => {
18
- const value = config.value[key];
19
-
20
- if (value.variants || value.compoundVariants) {
21
- return setColor(
22
- cva(value)({
23
- ...props,
24
- color: getColor(props.color),
25
- }),
26
- props.color,
27
- );
18
+ let value = config.value[key];
19
+
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
22
+ ...props,
23
+ color: getColor(props.color),
24
+ });
28
25
  }
29
26
 
30
- return "";
27
+ return setColor(value, props.color);
31
28
  });
32
29
 
33
30
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
36
33
  return {
37
34
  ...attrs,
38
35
  config,
36
+ hasSlotContent,
39
37
  };
40
38
  }
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
8
+ const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
9
9
  defaultConfig,
10
10
  () => props.config,
11
11
  );
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
15
15
  if (isSystemKey(key)) continue;
16
16
 
17
17
  const classes = computed(() => {
18
- const value = config.value[key];
19
-
20
- if (value.variants || value.compoundVariants) {
21
- return setColor(
22
- cva(value)({
23
- ...props,
24
- color: getColor(props.color),
25
- }),
26
- props.color,
27
- );
18
+ let value = config.value[key];
19
+
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
22
+ ...props,
23
+ color: getColor(props.color),
24
+ });
28
25
  }
29
26
 
30
- return "";
27
+ return setColor(value, props.color);
31
28
  });
32
29
 
33
30
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
36
33
  return {
37
34
  ...attrs,
38
35
  config,
36
+ hasSlotContent,
39
37
  };
40
38
  }
@@ -1,6 +1,6 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: {
3
- base: "",
3
+ base: "flex",
4
4
  variants: {
5
5
  pill: {
6
6
  true: "rounded-full bg-{color}-600/5",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <span
2
+ <div
3
3
  v-tooltip="tooltipConfig"
4
4
  :data-cy="dataCy"
5
5
  v-bind="wrapperAttrs"
@@ -10,7 +10,7 @@
10
10
  <div v-bind="containerAttrs">
11
11
  <component :is="dynamicComponent" v-bind="iconAttrs" />
12
12
  </div>
13
- </span>
13
+ </div>
14
14
  </template>
15
15
 
16
16
  <script setup>
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
8
+ const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
9
9
  defaultConfig,
10
10
  () => props.config,
11
11
  );
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
15
15
  if (isSystemKey(key)) continue;
16
16
 
17
17
  const classes = computed(() => {
18
- const value = config.value[key];
19
-
20
- if (value.variants || value.compoundVariants) {
21
- return setColor(
22
- cva(value)({
23
- ...props,
24
- color: getColor(props.color),
25
- }),
26
- props.color,
27
- );
18
+ let value = config.value[key];
19
+
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
22
+ ...props,
23
+ color: getColor(props.color),
24
+ });
28
25
  }
29
26
 
30
- return "";
27
+ return setColor(value, props.color);
31
28
  });
32
29
 
33
30
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -45,5 +42,6 @@ export default function useAttrs(props) {
45
42
  return {
46
43
  ...attrs,
47
44
  config,
45
+ hasSlotContent,
48
46
  };
49
47
  }
@@ -5,7 +5,7 @@ import { cva } from "../../service.ui";
5
5
  import defaultConfig from "../configs/default.config";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
8
+ const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
9
9
  defaultConfig,
10
10
  () => props.config,
11
11
  );
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
15
15
  if (isSystemKey(key)) continue;
16
16
 
17
17
  const classes = computed(() => {
18
- const value = config.value[key];
19
-
20
- if (value.variants || value.compoundVariants) {
21
- return setColor(
22
- cva(value)({
23
- ...props,
24
- color: getColor(props.color),
25
- }),
26
- props.color,
27
- );
18
+ let value = config.value[key];
19
+
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
22
+ ...props,
23
+ color: getColor(props.color),
24
+ });
28
25
  }
29
26
 
30
- return "";
27
+ return setColor(value, props.color);
31
28
  });
32
29
 
33
30
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
36
33
  return {
37
34
  ...attrs,
38
35
  config,
36
+ hasSlotContent,
39
37
  };
40
38
  }
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
8
+ const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
9
9
  defaultConfig,
10
10
  () => props.config,
11
11
  );
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
15
15
  if (isSystemKey(key)) continue;
16
16
 
17
17
  const classes = computed(() => {
18
- const value = config.value[key];
19
-
20
- if (value.variants || value.compoundVariants) {
21
- return setColor(
22
- cva(value)({
23
- ...props,
24
- color: getColor(props.color),
25
- }),
26
- props.color,
27
- );
18
+ let value = config.value[key];
19
+
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
22
+ ...props,
23
+ color: getColor(props.color),
24
+ });
28
25
  }
29
26
 
30
- return "";
27
+ return setColor(value, props.color);
31
28
  });
32
29
 
33
30
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
36
33
  return {
37
34
  ...attrs,
38
35
  config,
36
+ hasSlotContent,
39
37
  };
40
38
  }
@@ -31,7 +31,7 @@ const DefaultTemplate = (args) => ({
31
31
  return { args, slots, loaderTopOn, loaderTopOff };
32
32
  },
33
33
  template: `
34
- <ULoaderTop color="blue" v-bind="args" resources="https://api.publicapis.org/entries"/>
34
+ <ULoaderTop v-bind="args" resources="https://api.publicapis.org/entries"/>
35
35
 
36
36
  <URow gap="sm">
37
37
  <UButton label="On" size="sm" @click="loaderTopOn('https://api.publicapis.org/entries')" />
@@ -5,22 +5,25 @@ import { cva, cx } from "../../service.ui";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, isSystemKey } = useUI(defaultConfig, () => props.config);
8
+ const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
9
+ defaultConfig,
10
+ () => props.config,
11
+ );
9
12
  const attrs = {};
10
13
 
11
14
  for (const key in defaultConfig) {
12
15
  if (isSystemKey(key)) continue;
13
16
 
14
17
  const classes = computed(() => {
15
- const value = config.value[key];
18
+ let value = config.value[key];
16
19
 
17
- if (value.variants || value.compoundVariants) {
18
- return cva(value)({
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
19
22
  ...props,
20
23
  });
21
24
  }
22
25
 
23
- return "";
26
+ return value;
24
27
  });
25
28
 
26
29
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -51,5 +54,6 @@ export default function useAttrs(props) {
51
54
  return {
52
55
  ...attrs,
53
56
  config,
57
+ hasSlotContent,
54
58
  };
55
59
  }
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
8
+ const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
9
9
  defaultConfig,
10
10
  () => props.config,
11
11
  );
@@ -16,19 +16,16 @@ export default function useAttrs(props) {
16
16
  if (isSystemKey(key)) continue;
17
17
 
18
18
  const classes = computed(() => {
19
- const value = config.value[key];
20
-
21
- if (value.variants || value.compoundVariants) {
22
- return setColor(
23
- cva(value)({
24
- ...props,
25
- color: getColor(props.color),
26
- }),
27
- props.color,
28
- );
19
+ let value = config.value[key];
20
+
21
+ if (isCVA(value)) {
22
+ value = cva(value)({
23
+ ...props,
24
+ color: getColor(props.color),
25
+ });
29
26
  }
30
27
 
31
- return "";
28
+ return setColor(value, props.color);
32
29
  });
33
30
 
34
31
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -46,5 +43,6 @@ export default function useAttrs(props) {
46
43
  return {
47
44
  ...attrs,
48
45
  config,
46
+ hasSlotContent,
49
47
  };
50
48
  }
@@ -51,19 +51,16 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
51
51
  return { args, updateProgress, options: argTypes[args.enum].options };
52
52
  },
53
53
  template: `
54
- <UCol align="start">
55
- <UCol>
56
- <UProgress
57
- v-for="(option, index) in options"
58
- :key="index"
59
- v-bind="args"
60
- :[args.enum]="option"
61
- :value="args.progress"
62
- />
63
- </UCol>
64
-
65
- <UButton label="Next →" size="sm" variant="thirdary" filled @click="updateProgress" />
66
- </UCol>
54
+ <UCol>
55
+ <UProgress
56
+ v-for="(option, index) in options"
57
+ :key="index"
58
+ v-bind="args"
59
+ :[args.enum]="option"
60
+ :value="args.progress"
61
+ />
62
+ <UButton label="Next →" size="sm" variant="thirdary" filled @click="updateProgress" />
63
+ </UCol>
67
64
  `,
68
65
  });
69
66
 
@@ -164,6 +164,6 @@ const progressPercent = computed(() => {
164
164
  });
165
165
 
166
166
  function isActiveStep(index) {
167
- return index === props.value;
167
+ return index === props.value - 1;
168
168
  }
169
169
  </script>
@@ -5,24 +5,27 @@ import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props, { selected, size }) {
8
- const { config, getAttrs, isSystemKey } = useUI(defaultConfig, () => props.config);
8
+ const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
9
+ defaultConfig,
10
+ () => props.config,
11
+ );
9
12
  const attrs = {};
10
13
 
11
14
  for (const key in defaultConfig) {
12
15
  if (isSystemKey(key)) continue;
13
16
 
14
17
  const classes = computed(() => {
15
- const value = config.value[key];
18
+ let value = config.value[key];
16
19
 
17
- if (value.variants || value.compoundVariants) {
18
- return cva(value)({
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
19
22
  ...props,
20
23
  size: size.value,
21
24
  selected: selected.value,
22
25
  });
23
26
  }
24
27
 
25
- return "";
28
+ return value;
26
29
  });
27
30
 
28
31
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -31,5 +34,6 @@ export default function useAttrs(props, { selected, size }) {
31
34
  return {
32
35
  ...attrs,
33
36
  config,
37
+ hasSlotContent,
34
38
  };
35
39
  }
@@ -11,7 +11,7 @@ export default /*tw*/ {
11
11
  true: "text-gray-500 cursor-not-allowed",
12
12
  },
13
13
  selected: {
14
- true: "border-b-2 border-gray-900",
14
+ true: "border-b-2 text-brand-600 border-brand-600",
15
15
  },
16
16
  },
17
17
  },
@@ -5,22 +5,25 @@ import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, isSystemKey } = useUI(defaultConfig, () => props.config);
8
+ const { config, getAttrs, isSystemKey, hasSlotContent, isCVA } = useUI(
9
+ defaultConfig,
10
+ () => props.config,
11
+ );
9
12
  const attrs = {};
10
13
 
11
14
  for (const key in defaultConfig) {
12
15
  if (isSystemKey(key)) continue;
13
16
 
14
17
  const classes = computed(() => {
15
- const value = config.value[key];
18
+ let value = config.value[key];
16
19
 
17
- if (value.variants || value.compoundVariants) {
18
- return cva(value)({
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
19
22
  ...props,
20
23
  });
21
24
  }
22
25
 
23
- return "";
26
+ return value;
24
27
  });
25
28
 
26
29
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -29,5 +32,6 @@ export default function useAttrs(props) {
29
32
  return {
30
33
  ...attrs,
31
34
  config,
35
+ hasSlotContent,
32
36
  };
33
37
  }
@@ -3,7 +3,7 @@ export default /*tw*/ {
3
3
  base: "mb-6 flex gap-8",
4
4
  variants: {
5
5
  underlined: {
6
- true: "border-b border-gray-100",
6
+ true: "border-b border-brand-100",
7
7
  },
8
8
  },
9
9
  },
@@ -5,7 +5,7 @@ import defaultConfig from "../configs/default.config";
5
5
  import { computed } from "vue";
6
6
 
7
7
  export default function useAttrs(props) {
8
- const { config, getAttrs, getColor, setColor, isSystemKey } = useUI(
8
+ const { config, getAttrs, getColor, setColor, isSystemKey, hasSlotContent, isCVA } = useUI(
9
9
  defaultConfig,
10
10
  () => props.config,
11
11
  );
@@ -15,19 +15,16 @@ export default function useAttrs(props) {
15
15
  if (isSystemKey(key)) continue;
16
16
 
17
17
  const classes = computed(() => {
18
- const value = config.value[key];
19
-
20
- if (value.variants || value.compoundVariants) {
21
- return setColor(
22
- cva(value)({
23
- ...props,
24
- color: getColor(props.color),
25
- }),
26
- props.color,
27
- );
18
+ let value = config.value[key];
19
+
20
+ if (isCVA(value)) {
21
+ value = cva(value)({
22
+ ...props,
23
+ color: getColor(props.color),
24
+ });
28
25
  }
29
26
 
30
- return "";
27
+ return setColor(value, props.color);
31
28
  });
32
29
 
33
30
  attrs[`${key}Attrs`] = getAttrs(key, { classes });
@@ -36,5 +33,6 @@ export default function useAttrs(props) {
36
33
  return {
37
34
  ...attrs,
38
35
  config,
36
+ hasSlotContent,
39
37
  };
40
38
  }
@@ -42,7 +42,7 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
42
42
  template: `
43
43
  <UCol>
44
44
  <URow
45
- v-for="(color, index) in colors"
45
+ v-for="(option, index) in options"
46
46
  :key="index"
47
47
  gap="none"
48
48
  align="center"
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.265",
4
+ "version": "0.0.267",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -4269,7 +4269,7 @@
4269
4269
  },
4270
4270
  {
4271
4271
  "name": "multiple",
4272
- "description": "Allow select multiple files.",
4272
+ "description": "Allow selecting multiple files.",
4273
4273
  "value": {
4274
4274
  "kind": "expression",
4275
4275
  "type": "boolean"