vueless 0.0.277 → 0.0.279

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.277",
3
+ "version": "0.0.279",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <ULabel
3
3
  :for="id"
4
- :size="checkboxSize"
5
4
  :label="label"
5
+ :error="error"
6
+ :size="checkboxSize"
6
7
  :align="labelAlign"
7
8
  :disabled="disabled"
8
- :error="error"
9
9
  :description="description"
10
10
  v-bind="labelAttrs"
11
11
  :data-cy="`${dataCy}-label`"
@@ -3,6 +3,7 @@ import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storyboo
3
3
  import UCheckboxGroup from "../ui.form-checkbox-group";
4
4
  import UCheckbox from "../ui.form-checkbox";
5
5
  import UAlert from "../ui.text-alert";
6
+ import UCol from "../ui.container-col";
6
7
  import URow from "../ui.container-row";
7
8
 
8
9
  /**
@@ -27,7 +28,7 @@ export default {
27
28
  };
28
29
 
29
30
  const DefaultTemplate = (args) => ({
30
- components: { UCheckboxGroup, UCheckbox, UAlert, URow },
31
+ components: { UCheckboxGroup, UCheckbox, UAlert, URow, UCol },
31
32
  setup() {
32
33
  const slots = getSlotNames(UCheckboxGroup.name);
33
34
 
@@ -39,22 +40,22 @@ const DefaultTemplate = (args) => ({
39
40
  };
40
41
  },
41
42
  template: `
42
- <URow class="!flex-col">
43
+ <UCol>
43
44
  <UCheckboxGroup v-bind="args" v-model="value">
44
45
  ${args.slotTemplate || getSlotsFragment()}
45
46
  </UCheckboxGroup>
46
47
 
47
48
  <URow>
48
- <UAlert size="sm" color="blue">
49
+ <UAlert size="sm" color="gray">
49
50
  <p>Selected value: {{ value }}</p>
50
51
  </UAlert>
51
52
  </URow>
52
- </URow>
53
+ </UCol>
53
54
  `,
54
55
  });
55
56
 
56
57
  const EnumVariantTemplate = (args, { argTypes } = {}) => ({
57
- components: { UCheckboxGroup, URow },
58
+ components: { UCheckboxGroup, UCol },
58
59
  setup() {
59
60
  return { args };
60
61
  },
@@ -65,10 +66,10 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
65
66
  };
66
67
  },
67
68
  template: `
68
- <URow class="!flex-col">
69
+ <UCol>
69
70
  <UCheckboxGroup
70
71
  v-for="(option, index) in options"
71
- :key="option"
72
+ :key="index"
72
73
  v-bind="args"
73
74
  v-model="value"
74
75
  :label="option"
@@ -76,7 +77,7 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
76
77
  :options="args.options"
77
78
  name="option"
78
79
  />
79
- </URow>
80
+ </UCol>
80
81
  `,
81
82
  });
82
83
 
@@ -15,11 +15,14 @@ export default /*tw*/ {
15
15
  unselectedIconName: "close",
16
16
  unselectedRadio: {
17
17
  component: "{URadio}",
18
- radio: "checked:text-white !border-gray-400",
18
+ radio: "checked:text-white !border-gray-300",
19
19
  },
20
20
  radio: {
21
21
  component: "{URadio}",
22
- radio: "bg-{color}-500 border-{color}-500 hover:border-{color}-500 disabled:border-{color}-400 disabled:bg-{color}-400",
22
+ radio: `
23
+ bg-{color}-600 border-{color}-600 hover:border-{color}-600 active:bg-{color}-800
24
+ disabled:border-{color}-400 disabled:bg-{color}-400
25
+ `,
23
26
  },
24
27
  defaultVariants: {
25
28
  size: "md",
@@ -46,9 +49,10 @@ export default /*tw*/ {
46
49
  ],
47
50
  },
48
51
  safelist: (colors) => [
49
- { pattern: `bg-(${colors})-500` },
50
- { pattern: `border-(${colors})-500` },
51
52
  { pattern: `bg-(${colors})-400`, variants: ["disabled"] },
53
+ { pattern: `bg-(${colors})-600` },
54
+ { pattern: `bg-(${colors})-800`, variants: ["active"] },
52
55
  { pattern: `border-(${colors})-400`, variants: ["disabled"] },
56
+ { pattern: `border-(${colors})-600`, variants: ["hover"] },
53
57
  ],
54
58
  };
@@ -55,16 +55,16 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
55
55
  });
56
56
 
57
57
  export const Default = DefaultTemplate.bind({});
58
- Default.args = {};
58
+ Default.args = { name: "Default" };
59
59
 
60
60
  export const Sizes = EnumVariantTemplate.bind({});
61
- Sizes.args = { enum: "size" };
61
+ Sizes.args = { name: "Sizes", enum: "size" };
62
62
 
63
63
  export const Description = DefaultTemplate.bind({});
64
- Description.args = { description: "Description" };
64
+ Description.args = { name: "Description", description: "Description" };
65
65
 
66
66
  export const Error = DefaultTemplate.bind({});
67
- Error.args = { error: "some error" };
67
+ Error.args = { name: "Error", error: "some error" };
68
68
 
69
69
  export const Disabled = DefaultTemplate.bind({});
70
- Disabled.args = { disabled: true };
70
+ Disabled.args = { name: "Disabled", disabled: true };
@@ -2,28 +2,26 @@
2
2
  <ULabel
3
3
  :for="id"
4
4
  :label="label"
5
+ :error="error"
5
6
  :size="radioSize"
6
7
  :align="labelAlign"
7
- :error="error"
8
- :description="description"
9
8
  :disabled="disabled"
9
+ :description="description"
10
10
  v-bind="labelAttrs"
11
11
  :data-cy="`${dataCy}-label`"
12
12
  >
13
13
  <input
14
14
  :id="id"
15
15
  type="radio"
16
- :disabled="disabled"
17
- :name="radioName"
18
16
  :value="radioValue"
17
+ :name="radioName"
19
18
  :checked="checked || isChecked"
19
+ :disabled="disabled"
20
20
  v-bind="radioAttrs"
21
21
  :data-cy="dataCy"
22
22
  @change="onChange"
23
23
  />
24
24
 
25
- <slot />
26
-
27
25
  <template #footer>
28
26
  <slot name="footer" />
29
27
  </template>
@@ -3,7 +3,6 @@ import { getArgTypes, getSlotNames, getSlotsFragment } from "../service.storyboo
3
3
  import URadioGroup from "../ui.form-radio-group";
4
4
  import URadio from "../ui.form-radio";
5
5
  import UAlert from "../ui.text-alert";
6
- import URow from "../ui.container-row";
7
6
  import UCol from "../ui.container-col";
8
7
 
9
8
  /**
@@ -14,41 +13,40 @@ export default {
14
13
  title: "Form Inputs & Controls / Radio Group",
15
14
  component: URadioGroup,
16
15
  args: {
16
+ label: "Radio Group",
17
17
  modelValue: "One",
18
+ options: [
19
+ { label: "Boolean", value: false },
20
+ { label: "String", value: "One" },
21
+ { label: "Number", value: 3 },
22
+ { label: "Object", value: { key: "value" } },
23
+ { label: "Array", value: ["Array", 1] },
24
+ ],
18
25
  },
19
26
  argTypes: {
20
27
  ...getArgTypes(URadioGroup.name),
21
28
  },
22
29
  };
23
30
 
24
- const defaultRadios = [
25
- { name: "slotValues", label: "Boolean", value: false },
26
- { name: "slotValues", label: "String", value: "One" },
27
- { name: "slotValues", label: "Number", value: 3 },
28
- { name: "slotValues", label: "Object", value: { key: "value" } },
29
- { name: "slotValues", label: "Array", value: ["Array", 1] },
30
- ];
31
-
32
31
  const DefaultTemplate = (args) => ({
33
- components: { URadioGroup, URadio, UAlert, URow, UCol },
32
+ components: { URadioGroup, URadio, UAlert, UCol },
34
33
  setup() {
35
34
  const slots = getSlotNames(URadioGroup.name);
36
35
 
37
- const radios = args.radios ? args.radios : defaultRadios;
38
-
39
- return { args, slots, radios };
36
+ return { args, slots };
40
37
  },
41
38
  template: `
42
39
  <UCol gap="2xl">
43
40
  <URadioGroup v-bind="args" v-model="args.modelValue">
44
41
  <URadio
45
- v-for="(radio, index) in radios"
42
+ v-for="(radio, index) in args.options"
46
43
  :key="index"
47
44
  v-bind="radio"
48
45
  >
49
46
  ${args.slotTemplate || getSlotsFragment()}
50
47
  </URadio>
51
48
  </URadioGroup>
49
+
52
50
  <UAlert color="gray" size="xs">
53
51
  <code>Selected value: <b>{{ args.modelValue }}</b></code>
54
52
  </UAlert>
@@ -57,18 +55,15 @@ const DefaultTemplate = (args) => ({
57
55
  });
58
56
 
59
57
  const EnumVariantTemplate = (args, { argTypes } = {}) => ({
60
- components: { URadioGroup, URow },
58
+ components: { URadioGroup, UCol },
61
59
  setup() {
62
- const radios = defaultRadios;
63
-
64
60
  return {
65
61
  args,
66
62
  options: argTypes[args.enum].options,
67
- radios,
68
63
  };
69
64
  },
70
65
  template: `
71
- <URow class="!flex-col">
66
+ <UCol>
72
67
  <URadioGroup
73
68
  v-for="(option, index) in options"
74
69
  :key="index"
@@ -76,10 +71,10 @@ const EnumVariantTemplate = (args, { argTypes } = {}) => ({
76
71
  v-model="args.modelValue"
77
72
  :[args.enum]="option"
78
73
  :label="option"
79
- :options="radios"
74
+ :options="args.options"
80
75
  :name="option"
81
76
  />
82
- </URow>
77
+ </UCol>
83
78
  `,
84
79
  });
85
80
 
@@ -91,12 +86,13 @@ Default.args = {
91
86
  export const Options = DefaultTemplate.bind({});
92
87
  Options.args = {
93
88
  name: "Options",
94
- radios: [
95
- { name: "radioValues", label: "Boolean", value: false },
96
- { name: "radioValues", label: "String", value: "Custom string value" },
97
- { name: "radioValues", label: "Number", value: 4 },
98
- { name: "radioValues", label: "Object", value: { key: "Custom object value" } },
99
- { name: "radioValues", label: "Array", value: ["Custom array value", 2] },
89
+ modelValue: "Custom string value",
90
+ options: [
91
+ { label: "Boolean", value: false },
92
+ { label: "String", value: "Custom string value" },
93
+ { label: "Number", value: 4 },
94
+ { label: "Object", value: { key: "Custom object value" } },
95
+ { label: "Array", value: ["Custom array value", 2] },
100
96
  ],
101
97
  };
102
98
 
@@ -84,9 +84,9 @@ export default /*tw*/ {
84
84
  pill: false,
85
85
  },
86
86
  safelist: (colors) => [
87
+ { pattern: `bg-(${colors})-600` },
87
88
  { pattern: `text-(${colors})-400` },
88
- { pattern: `text-(${colors})-500` },
89
- { pattern: `text-(${colors})-700` },
90
- { pattern: `bg-(${colors})-500` },
89
+ { pattern: `text-(${colors})-600` },
90
+ { pattern: `text-(${colors})-800` },
91
91
  ],
92
92
  };
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.277",
4
+ "version": "0.0.279",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",
@@ -6629,9 +6629,6 @@
6629
6629
  }
6630
6630
  ],
6631
6631
  "slots": [
6632
- {
6633
- "name": "default"
6634
- },
6635
6632
  {
6636
6633
  "name": "footer"
6637
6634
  }