vueless 0.0.601 → 0.0.603

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.601",
3
+ "version": "0.0.603",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless UI Component Library, powered by Tailwind CSS.",
6
6
  "keywords": [
@@ -151,7 +151,7 @@ function optionHighlight(index: number, option: Option) {
151
151
  return classes;
152
152
  }
153
153
 
154
- function addPointerElement(keyCode: string) {
154
+ function addPointerElement(keyCode?: string) {
155
155
  if (props.options.length > 0) {
156
156
  select(props.options[pointer.value], keyCode);
157
157
  onClickOption(props.options[pointer.value]);
@@ -142,6 +142,7 @@ const { config, checkboxAttrs, iconWrapperAttrs, checkboxLabelAttrs, checkedIcon
142
142
  :align="labelAlign"
143
143
  :disabled="disabled"
144
144
  :description="description"
145
+ interactive
145
146
  v-bind="checkboxLabelAttrs"
146
147
  :data-test="`${dataTest}-label`"
147
148
  >
@@ -5,7 +5,7 @@ export default /*tw*/ {
5
5
  border rounded bg-white cursor-pointer transition checked:text-{color}-600
6
6
  border-gray-300 hover:border-gray-400 focus:border-{color}-500 active:border-{color}-800
7
7
  focus:ring-{color}-700/15 focus:ring-dynamic focus:ring-offset-dynamic
8
- disabled:border-gray-300 disabled:bg-gray-100
8
+ disabled:border-gray-300 disabled:bg-gray-100 disabled:cursor-not-allowed
9
9
  `,
10
10
  variants: {
11
11
  size: {
@@ -273,6 +273,7 @@ const {
273
273
  :size="size"
274
274
  :align="labelAlign"
275
275
  centred
276
+ interactive
276
277
  v-bind="inputLabelAttrs"
277
278
  >
278
279
  <label :for="elementId" v-bind="wrapperAttrs">
@@ -15,7 +15,10 @@ export default /*tw*/ {
15
15
  `,
16
16
  },
17
17
  disabled: {
18
- true: "focus-within:ring-0 focus-within:ring-offset-0 pointer-events-none",
18
+ true: `
19
+ focus-within:ring-0 focus-within:ring-offset-0 bg-gray-100
20
+ hover:border-gray-300 focus-within:border-gray-300 hover:focus-within:border-gray-300
21
+ `,
19
22
  },
20
23
  },
21
24
  },
@@ -26,10 +29,10 @@ export default /*tw*/ {
26
29
  passwordIcon: "{UIcon}",
27
30
  input: {
28
31
  base: `
29
- block w-full py-2 px-3 font-normal !leading-none text-gray-900 bg-white
32
+ block w-full py-2 px-3 font-normal !leading-none text-gray-900 bg-transparent
30
33
  border-none rounded-dynamic transition focus:ring-0
31
34
  placeholder:font-normal placeholder-gray-400
32
- disabled:text-gray-700 disabled:bg-gray-100
35
+ disabled:text-gray-700 disabled:cursor-not-allowed
33
36
  `,
34
37
  variants: {
35
38
  size: {
@@ -127,6 +127,7 @@ RightIconSlot.args = {
127
127
  slotTemplate: `
128
128
  <template #right-icon>
129
129
  <UIcon
130
+ interactive
130
131
  name="star"
131
132
  color="green"
132
133
  />
@@ -281,6 +281,7 @@ const {
281
281
  :align="labelAlign"
282
282
  :disabled="disabled"
283
283
  :description="description"
284
+ interactive
284
285
  v-bind="inputLabelAttrs"
285
286
  >
286
287
  <div ref="dropZoneRef" :ondrop="onDrop" v-bind="dropzoneAttrs">
@@ -24,14 +24,7 @@ export default /*tw*/ {
24
24
  { align: "right", centred: true, class: "items-center justify-start w-auto" },
25
25
  ],
26
26
  },
27
- content: {
28
- base: "flex",
29
- variants: {
30
- disabled: {
31
- true: "pointer-events-none",
32
- },
33
- },
34
- },
27
+ content: "flex",
35
28
  label: {
36
29
  base: "text-gray-900 z-10 block !leading-none w-max",
37
30
  variants: {
@@ -51,10 +44,11 @@ export default /*tw*/ {
51
44
  true: "text-red-500",
52
45
  },
53
46
  disabled: {
54
- true: "text-gray-500 pointer-events-none",
47
+ true: "text-gray-500 cursor-not-allowed",
55
48
  },
56
49
  },
57
50
  compoundVariants: [
51
+ { interactive: true, disabled: false, class: "hover:cursor-pointer" },
58
52
  { align: "topInside", size: "sm", class: "top-2 text-2xs" },
59
53
  { align: "topInside", size: "md", class: "top-2.5 text-xs" },
60
54
  { align: "topInside", size: "lg", class: "top-2.5 text-sm" },
@@ -101,5 +95,6 @@ export default /*tw*/ {
101
95
  size: "md",
102
96
  centred: false,
103
97
  disabled: false,
98
+ interactive: false,
104
99
  },
105
100
  };
@@ -25,6 +25,11 @@ export interface Props {
25
25
  */
26
26
  error?: string;
27
27
 
28
+ /**
29
+ * Make the label interactive (cursor pointer on hover).
30
+ */
31
+ interactive?: boolean;
32
+
28
33
  /**
29
34
  * Label align.
30
35
  */
@@ -103,6 +103,7 @@ const { radioAttrs, radioLabelAttrs } = useUI<Config>(defaultConfig, mutatedProp
103
103
  :align="labelAlign"
104
104
  :disabled="disabled"
105
105
  :description="description"
106
+ interactive
106
107
  v-bind="radioLabelAttrs"
107
108
  :data-test="`${dataTest}-label`"
108
109
  >
@@ -6,7 +6,7 @@ export default /*tw*/ {
6
6
  border-gray-300 hover:border-gray-400 focus:border-{color}-500 active:border-{color}-800
7
7
  focus:ring-{color}-700/15 focus:ring-dynamic focus:ring-offset-dynamic
8
8
  disabled:border-gray-300 disabled:text-gray-100
9
- checked:disabled:border-gray-400 checked:disabled:text-gray-400
9
+ checked:disabled:border-gray-400 checked:disabled:text-gray-400 disabled:cursor-not-allowed
10
10
  `,
11
11
  variants: {
12
12
  size: {
@@ -465,6 +465,7 @@ const {
465
465
  :align="labelAlign"
466
466
  :disabled="disabled"
467
467
  centred
468
+ interactive
468
469
  v-bind="selectLabelAttrs"
469
470
  :data-test="dataTest"
470
471
  :tabindex="-1"
@@ -479,7 +480,7 @@ const {
479
480
  @blur="deactivate"
480
481
  @keydown.self.down.prevent="dropdownListRef?.pointerForward"
481
482
  @keydown.self.up.prevent="dropdownListRef?.pointerBackward"
482
- @keydown.enter.tab.stop.self="dropdownListRef?.addPointerElement"
483
+ @keydown.enter.tab.stop.self="dropdownListRef?.addPointerElement()"
483
484
  @keyup.esc="deactivate"
484
485
  >
485
486
  <!-- @slot Use it to add something right. -->
@@ -677,7 +678,7 @@ const {
677
678
  @keyup.esc="deactivate"
678
679
  @keydown.down.prevent="dropdownListRef?.pointerForward"
679
680
  @keydown.up.prevent="dropdownListRef?.pointerBackward"
680
- @keydown.enter.prevent.stop.self="dropdownListRef?.addPointerElement"
681
+ @keydown.enter.prevent.stop.self="dropdownListRef?.addPointerElement()"
681
682
  />
682
683
  </div>
683
684
 
@@ -105,6 +105,7 @@ const {
105
105
  :description="description"
106
106
  :align="labelAlign"
107
107
  :disabled="disabled"
108
+ interactive
108
109
  v-bind="switchLabelAttrs"
109
110
  :data-test="dataTest"
110
111
  @click="onClickToggle"
@@ -200,6 +200,7 @@ const { textareaAttrs, textareaLabelAttrs, textareaWrapperAttrs, leftSlotAttrs,
200
200
  :size="size"
201
201
  :disabled="disabled"
202
202
  :align="labelAlign"
203
+ interactive
203
204
  v-bind="textareaLabelAttrs"
204
205
  :data-test="dataTest"
205
206
  >
@@ -18,7 +18,10 @@ export default /*tw*/ {
18
18
  `,
19
19
  },
20
20
  disabled: {
21
- true: "focus-within:ring-0 focus-within:ring-offset-0 bg-gray-100 pointer-events-none",
21
+ true: `
22
+ focus-within:ring-0 focus-within:ring-offset-0 bg-gray-100
23
+ hover:border-gray-300 focus-within:border-gray-300 hover:focus-within:border-gray-300
24
+ `,
22
25
  },
23
26
  },
24
27
  compoundVariants: [
@@ -31,7 +34,7 @@ export default /*tw*/ {
31
34
  base: `
32
35
  p-0 block w-full bg-transparent border-none !leading-none font-normal text-gray-900
33
36
  placeholder:text-gray-400 placeholder:font-normal placeholder:leading-none
34
- focus:border-none focus:outline-none focus:ring-0
37
+ focus:border-none focus:outline-none focus:ring-0 disabled:cursor-not-allowed
35
38
  `,
36
39
  variants: {
37
40
  size: {
@@ -1,6 +1,6 @@
1
1
  export default /*tw*/ {
2
2
  icon: {
3
- base: "fill-current outline-0 shrink-0 grow-0",
3
+ base: "fill-current shrink-0 grow-0 focus:outline-0",
4
4
  variants: {
5
5
  variant: {
6
6
  light: "text-{color}-400 dark:text-{color}-200",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.601",
4
+ "version": "0.0.603",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -7178,6 +7178,16 @@
7178
7178
  "type": "string"
7179
7179
  }
7180
7180
  },
7181
+ {
7182
+ "name": "interactive",
7183
+ "required": false,
7184
+ "description": "Make the label interactive (cursor pointer on hover).",
7185
+ "value": {
7186
+ "kind": "expression",
7187
+ "type": "boolean"
7188
+ },
7189
+ "default": "false"
7190
+ },
7181
7191
  {
7182
7192
  "name": "align",
7183
7193
  "required": false,