vueless 0.0.234 → 0.0.236

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.234",
3
+ "version": "0.0.236",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -42,6 +42,10 @@ export default /*tw*/ {
42
42
  disabled:text-{color}-300
43
43
  `,
44
44
  },
45
+ color: {
46
+ grayscale: "focus:ring-gray-800 focus-within:ring-gray-800 disabled:text-gray-400",
47
+ white: "focus:ring-gray-800 focus-within:ring-gray-800 disabled:text-gray-400",
48
+ },
45
49
  loading: {
46
50
  true: "pointer-events-none gap-0",
47
51
  },
@@ -52,9 +56,8 @@ export default /*tw*/ {
52
56
  block: {
53
57
  true: "w-full",
54
58
  },
55
- color: {
56
- grayscale: "focus:ring-gray-800 focus-within:ring-gray-800 disabled:text-gray-400",
57
- white: "focus:ring-gray-800 focus-within:ring-gray-800 disabled:text-gray-400",
59
+ noRing: {
60
+ true: "focus:ring-0 focus:ring-offset-0 focus-within:ring-0 focus-within:ring-offset-0",
58
61
  },
59
62
  },
60
63
  compoundVariants: [
@@ -160,6 +163,7 @@ export default /*tw*/ {
160
163
  block: false,
161
164
  square: false,
162
165
  filled: false,
166
+ noRing: false,
163
167
  loading: false,
164
168
  disabled: false,
165
169
  },
@@ -116,6 +116,9 @@ pilled.args = { pill: true };
116
116
  export const disabled = VariantsTemplate.bind({});
117
117
  disabled.args = { disabled: true };
118
118
 
119
+ export const noRing = DefaultTemplate.bind({});
120
+ noRing.args = { noRing: true };
121
+
119
122
  export const colors = ColorTemplate.bind({});
120
123
  colors.args = {};
121
124
 
@@ -200,6 +200,14 @@ const props = defineProps({
200
200
  default: UIService.get(defaultConfig, UButton).default.loading,
201
201
  },
202
202
 
203
+ /**
204
+ * Remove outline ring on focus.
205
+ */
206
+ noRing: {
207
+ type: Boolean,
208
+ default: UIService.get(defaultConfig, UButton).default.noRing,
209
+ },
210
+
203
211
  /**
204
212
  * Generates unique element id.
205
213
  * @ignore
@@ -12,12 +12,12 @@ export default /*tw*/ {
12
12
  disabled: {
13
13
  true: "pointer-events-none opacity-70",
14
14
  },
15
- noRing: {
16
- true: "focus-within:ring-0 focus-within:ring-offset-0",
17
- },
18
15
  block: {
19
16
  true: "w-full",
20
17
  },
18
+ noRing: {
19
+ true: "focus-within:ring-0 focus-within:ring-offset-0",
20
+ },
21
21
  },
22
22
  },
23
23
  link: {
@@ -26,7 +26,7 @@ export default /*tw*/ {
26
26
  text-{color}-500 decoration-{color}-500 underline-offset-4
27
27
  hover:text-opacity-80
28
28
  active:text-opacity-70
29
- focus:ring-offset-0 focus:ring-0
29
+ focus:ring-0 focus:ring-offset-0
30
30
  `,
31
31
  variants: {
32
32
  size: {
@@ -49,7 +49,7 @@ export default /*tw*/ {
49
49
  },
50
50
  },
51
51
  text: "w-full",
52
- withSlots: "flex items-center no-underline hover:no-underline focus-within:ring-offset-0 focus-within:ring-0",
52
+ withSlots: "flex items-center no-underline hover:no-underline focus-within:ring-0 focus-within:ring-offset-0",
53
53
  leftSlot: "mr-1",
54
54
  rightSlot: "ml-1",
55
55
  defaultVariants: {
@@ -5,6 +5,7 @@
5
5
  :key="month"
6
6
  variant="thirdary"
7
7
  color="brand"
8
+ no-ring
8
9
  v-bind="monthAttrs(getMonthClasses(month))"
9
10
  :disabled="dateIsOutOfRange(month, minDate, maxDate, locale, dateFormat)"
10
11
  :label="formatDate(month, 'M', props.locale)"
@@ -3,8 +3,9 @@
3
3
  <UButton
4
4
  v-for="year in years"
5
5
  :key="year"
6
- variant="thirdary"
6
+ no-ring
7
7
  color="brand"
8
+ variant="thirdary"
8
9
  :disabled="dateIsOutOfRange(year, minDate, maxDate, locale, dateFormat)"
9
10
  v-bind="yearAttrs(getYearClasses(year))"
10
11
  :label="formatDate(year, 'Y', props.locale)"
@@ -47,7 +47,7 @@ export default /*tw*/ {
47
47
  timepickerInput: " w-11 border-none px-2.5 py-1.5 text-center text-sm focus:ring-brand-500",
48
48
  timepickerLeftInput: "rounded-l-dynamic",
49
49
  timepickerRightInput: " rounded-r-dynamic",
50
- timepickerSubmitButton: "py-2 focus:ring-0 border-0",
50
+ timepickerSubmitButton: "{UButton} py-2 border-0",
51
51
  i18n: {
52
52
  weekdays: {
53
53
  shorthand: {
@@ -11,6 +11,7 @@
11
11
  color="gray"
12
12
  square
13
13
  variant="thirdary"
14
+ no-ring
14
15
  v-bind="navigationSwitchViewButtonAttrs"
15
16
  @mousedown.prevent.capture
16
17
  @click="onClickViewSwitch"
@@ -41,6 +42,7 @@
41
42
  size="xs"
42
43
  square
43
44
  variant="thirdary"
45
+ no-ring
44
46
  v-bind="nextPrevButtonAttrs"
45
47
  @mousedown.prevent.capture
46
48
  @click="onClickPrevButton"
@@ -61,6 +63,7 @@
61
63
  size="xs"
62
64
  square
63
65
  variant="thirdary"
66
+ no-ring
64
67
  v-bind="nextPrevButtonAttrs"
65
68
  @mousedown.prevent.capture
66
69
  @click="onClickNextButton"
@@ -144,6 +147,7 @@
144
147
  size="sm"
145
148
  square
146
149
  filled
150
+ no-ring
147
151
  v-bind="timepickerSubmitButtonAttrs"
148
152
  @click="onClickSubmit"
149
153
  >
@@ -5,13 +5,12 @@ export default /*tw*/ {
5
5
  flex rounded-dynamic max-md:justify-between
6
6
  focus-within:ring-dynamic focus-within:ring-offset-dynamic focus-within:ring-brand-700 focus-within:ring-opacity-20
7
7
  `,
8
- button: "{UButton} shrink-0 grow rounded-none !ring-0 !ring-offset-0",
8
+ button: "{UButton} shrink-0 grow rounded-none",
9
9
  buttonActive: "",
10
10
  buttonWrapperActive: "ring-dynamic ring-offset-dynamic ring-brand-700 ring-opacity-20",
11
11
  shiftRangeButton: `
12
12
  first:rounded-dynamic first:rounded-r-none
13
13
  last:rounded-dynamic last:rounded-l-none
14
- focus:ring-0 focus:ring-offset-0
15
14
  `,
16
15
  nextIconName: "keyboard_arrow_right",
17
16
  prevIconName: "keyboard_arrow_left",
@@ -36,7 +35,7 @@ export default /*tw*/ {
36
35
  leaveToClass: "opacity-0 scale-95",
37
36
  },
38
37
  periodsRow: "mb-1 flex min-w-64 gap-1",
39
- periodButton: "{UButton} h-[3.125rem] w-full !ring-0",
38
+ periodButton: "{UButton} h-[3.125rem] w-full",
40
39
  periodButtonIconName: "apps",
41
40
  periodButtonActive: "!bg-opacity-20",
42
41
  rangeSwitchWrapper: "flex items-center justify-between py-2",
@@ -32,10 +32,11 @@
32
32
  <UButton
33
33
  ref="buttonPrevRef"
34
34
  square
35
+ filled
36
+ no-ring
35
37
  :size="size"
36
38
  :disabled="disabled"
37
39
  variant="thirdary"
38
- filled
39
40
  :icon-left="config.prevIconName"
40
41
  v-bind="shiftRangeButtonAttrs"
41
42
  @click="onClickShiftRange('prev')"
@@ -46,6 +47,7 @@
46
47
  ref="buttonRef"
47
48
  square
48
49
  filled
50
+ no-ring
49
51
  :size="size"
50
52
  :disabled="disabled"
51
53
  :label="userFormatDate"
@@ -58,6 +60,7 @@
58
60
  ref="buttonNextRef"
59
61
  square
60
62
  filled
63
+ no-ring
61
64
  :size="size"
62
65
  :disabled="disabled"
63
66
  variant="thirdary"
@@ -82,6 +85,7 @@
82
85
  :key="periodButton.name"
83
86
  square
84
87
  filled
88
+ no-ring
85
89
  size="xs"
86
90
  variant="thirdary"
87
91
  :label="periodButton.title"
@@ -95,6 +99,7 @@
95
99
  v-if="customRangeButton.range.to && customRangeButton.range.from"
96
100
  square
97
101
  filled
102
+ no-ring
98
103
  size="xs"
99
104
  variant="thirdary"
100
105
  v-bind="periodButtonAttrs(getPeriodButtonsClasses(PERIOD.custom))"
@@ -107,6 +112,7 @@
107
112
  <UButton
108
113
  square
109
114
  filled
115
+ no-ring
110
116
  size="xs"
111
117
  variant="thirdary"
112
118
  :label="locale.ownRange"
@@ -120,6 +126,7 @@
120
126
  <div v-bind="rangeSwitchWrapperAttrs">
121
127
  <UButton
122
128
  square
129
+ no-ring
123
130
  size="xs"
124
131
  color="gray"
125
132
  variant="thirdary"
@@ -134,6 +141,7 @@
134
141
 
135
142
  <UButton
136
143
  square
144
+ no-ring
137
145
  size="xs"
138
146
  color="gray"
139
147
  variant="thirdary"
@@ -147,6 +155,7 @@
147
155
  <UButton
148
156
  v-for="date in periodDateList"
149
157
  :key="date.title"
158
+ no-ring
150
159
  size="sm"
151
160
  variant="thirdary"
152
161
  :disabled="isDatePeriodOutOfRange(date)"
@@ -1,8 +1,8 @@
1
1
  export default /*tw*/ {
2
2
  label: "{ULabel}",
3
3
  inputWrapper: "flex relative w-full",
4
- rightIconSlot: "flex items-center justify-end whitespace-nowrap pr-3 gap-1 rounded-dynamic rounded-l-none",
5
- leftIconSlot: "flex items-center justify-end whitespace-nowrap pl-3 gap-1 rounded-dynamic rounded-r-none",
4
+ rightIconSlot: "flex items-center justify-end whitespace-nowrap pr-2 gap-1 rounded-dynamic rounded-l-none",
5
+ leftIconSlot: "flex items-center justify-end whitespace-nowrap pl-2 gap-1 rounded-dynamic rounded-r-none",
6
6
  passwordIcon: "",
7
7
  passwordVisibleIconName: "visibility-fill",
8
8
  passwordHiddenIconName: "visibility_off-fill",
@@ -12,6 +12,11 @@
12
12
  v-bind="labelAttrs"
13
13
  >
14
14
  <label :for="id" v-bind="blockAttrs">
15
+ <span v-if="hasSlotContent($slots['left'])" ref="leftSlotWrapper">
16
+ <!-- @slot Use it to add something before the text. -->
17
+ <slot name="left" />
18
+ </span>
19
+
15
20
  <span
16
21
  v-if="hasSlotContent($slots['icon-left']) || iconLeft"
17
22
  ref="leftSlotWrapper"
@@ -27,11 +32,6 @@
27
32
  </slot>
28
33
  </span>
29
34
 
30
- <span v-if="hasSlotContent($slots['left'])" ref="leftSlotWrapper">
31
- <!-- @slot Use it to add something before the text. -->
32
- <slot name="left" />
33
- </span>
34
-
35
35
  <span v-bind="inputWrapperAttrs">
36
36
  <input
37
37
  :id="id"
@@ -67,9 +67,6 @@
67
67
  />
68
68
  </label>
69
69
 
70
- <!-- @slot Use it to add something after the text. -->
71
- <slot name="right" />
72
-
73
70
  <span v-if="hasSlotContent($slots['icon-right']) || iconRight" v-bind="rightIconSlotAttrs">
74
71
  <!--
75
72
  @slot Use it to add icon after the text.
@@ -80,6 +77,9 @@
80
77
  <UIcon v-if="iconRight" :name="iconRight" :size="iconSize" internal />
81
78
  </slot>
82
79
  </span>
80
+
81
+ <!-- @slot Use it to add something after the text. -->
82
+ <slot name="right" />
83
83
  </label>
84
84
  </ULabel>
85
85
  </template>
@@ -7,11 +7,11 @@ export default /*tw*/ {
7
7
  rightSlot: "pr-0",
8
8
  leftSlot: "pl-0",
9
9
  },
10
- closeIcon: "{UIcon} flex h-full items-center",
11
- closeIconName: "close",
10
+ clearIcon: "{UIcon} flex h-full items-center",
11
+ clearIconName: "close",
12
12
  searchIcon: "{UIcon}",
13
13
  searchIconName: "search",
14
- button: "{UButton} rounded-l-none ml-1 !ring-0 outline outline-1 outline-gray-900",
14
+ button: "{UButton} rounded-l-none ml-1 outline outline-1 outline-gray-900",
15
15
  defaultVariants: {
16
16
  size: "md",
17
17
  labelAlign: "topInside",
@@ -86,7 +86,8 @@ slotLeft.args = {
86
86
  label="filter"
87
87
  variant="thirdary"
88
88
  filled
89
- class="rounded-r-none !ring-0"
89
+ no-ring
90
+ class="rounded-r-none"
90
91
  />
91
92
  </template>
92
93
  `,
@@ -27,13 +27,14 @@
27
27
 
28
28
  <template #icon-right>
29
29
  <UIcon
30
+ v-if="modelValue"
30
31
  internal
31
32
  interactive
32
33
  color="gray"
33
- :name="config.closeIconName"
34
+ :name="config.clearIconName"
34
35
  :data-cy="`${dataCy}-close`"
35
36
  :size="iconSize"
36
- v-bind="closeIconAttrs"
37
+ v-bind="clearIconAttrs"
37
38
  @click="onClickClear"
38
39
  />
39
40
 
@@ -63,6 +64,7 @@
63
64
  <UButton
64
65
  v-if="searchButtonLabel"
65
66
  :label="searchButtonLabel"
67
+ no-ring
66
68
  v-bind="buttonAttrs"
67
69
  :data-cy="`${dataCy}-right`"
68
70
  @click="onClickSearch"
@@ -209,7 +211,7 @@ const emit = defineEmits([
209
211
 
210
212
  const localValue = ref("");
211
213
 
212
- const { config, inputAttrs, searchIconAttrs, closeIconAttrs, buttonAttrs } = useAttrs(props);
214
+ const { config, inputAttrs, searchIconAttrs, clearIconAttrs, buttonAttrs } = useAttrs(props);
213
215
 
214
216
  const search = computed({
215
217
  get: () => props.modelValue,
@@ -35,10 +35,11 @@
35
35
 
36
36
  <UButton
37
37
  v-if="closable"
38
+ square
39
+ no-ring
38
40
  size="sm"
39
- variant="thirdary"
40
41
  :color="color"
41
- square
42
+ variant="thirdary"
42
43
  v-bind="buttonAttrs"
43
44
  @click="onClickClose"
44
45
  >
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.234",
4
+ "version": "0.0.236",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -890,6 +890,15 @@
890
890
  },
891
891
  "default": "false"
892
892
  },
893
+ {
894
+ "name": "noRing",
895
+ "description": "Remove outline ring on focus.",
896
+ "value": {
897
+ "kind": "expression",
898
+ "type": "boolean"
899
+ },
900
+ "default": "false"
901
+ },
893
902
  {
894
903
  "name": "id",
895
904
  "description": "@ignore: Generates unique element id.",
@@ -4175,6 +4184,10 @@
4175
4184
  }
4176
4185
  ],
4177
4186
  "slots": [
4187
+ {
4188
+ "name": "left",
4189
+ "description": "Use it to add something before the text."
4190
+ },
4178
4191
  {
4179
4192
  "name": "icon-left",
4180
4193
  "scoped": true,
@@ -4190,14 +4203,6 @@
4190
4203
  }
4191
4204
  ]
4192
4205
  },
4193
- {
4194
- "name": "left",
4195
- "description": "Use it to add something before the text."
4196
- },
4197
- {
4198
- "name": "right",
4199
- "description": "Use it to add something after the text."
4200
- },
4201
4206
  {
4202
4207
  "name": "icon-right",
4203
4208
  "scoped": true,
@@ -4212,6 +4217,10 @@
4212
4217
  "name": "icon-size"
4213
4218
  }
4214
4219
  ]
4220
+ },
4221
+ {
4222
+ "name": "right",
4223
+ "description": "Use it to add something after the text."
4215
4224
  }
4216
4225
  ],
4217
4226
  "source": {