vueless 0.0.266 → 0.0.268

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.266",
3
+ "version": "0.0.268",
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",
@@ -218,7 +218,9 @@ export default class UIService {
218
218
  @returns { String }
219
219
  */
220
220
  getColor(color) {
221
- return brand === GRAYSCALE_COLOR && color === BRAND_COLOR ? GRAYSCALE_COLOR : color;
221
+ return (brand ?? DEFAULT_BRAND_COLOR) === GRAYSCALE_COLOR && color === BRAND_COLOR
222
+ ? GRAYSCALE_COLOR
223
+ : color;
222
224
  }
223
225
 
224
226
  /**
@@ -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>
@@ -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`"
@@ -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: {
@@ -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>
@@ -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')" />
@@ -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
  },
@@ -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
  },
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.266",
4
+ "version": "0.0.268",
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"