vueless 0.0.394 → 0.0.395

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 (58) hide show
  1. package/package.json +1 -1
  2. package/ui.button/UButton.vue +1 -1
  3. package/ui.button-link/ULink.vue +1 -1
  4. package/ui.button-toggle/UToggle.vue +1 -1
  5. package/ui.button-toggle-item/UToggleItem.vue +1 -1
  6. package/ui.container-card/UCard.vue +2 -2
  7. package/ui.container-col/UCol.vue +1 -1
  8. package/ui.container-divider/UDivider.vue +12 -46
  9. package/ui.container-divider/config.js +19 -20
  10. package/ui.container-divider/storybook/stories.js +6 -32
  11. package/ui.container-divider/useAttrs.js +6 -1
  12. package/ui.container-group/UGroup.vue +2 -2
  13. package/ui.container-modal/UModal.vue +2 -8
  14. package/ui.container-modal-confirm/UModalConfirm.vue +1 -1
  15. package/ui.container-page/UPage.vue +1 -1
  16. package/ui.container-row/URow.vue +1 -1
  17. package/ui.data-list/UDataList.vue +2 -2
  18. package/ui.data-table/UTable.vue +1 -1
  19. package/ui.dropdown-badge/UDropdownBadge.vue +1 -1
  20. package/ui.dropdown-button/UDropdownButton.vue +1 -1
  21. package/ui.dropdown-link/UDropdownLink.vue +1 -1
  22. package/ui.dropdown-list/UDropdownList.vue +1 -1
  23. package/ui.form-calendar/UCalendar.vue +1 -1
  24. package/ui.form-checkbox/UCheckbox.vue +1 -1
  25. package/ui.form-checkbox-group/UCheckboxGroup.vue +1 -1
  26. package/ui.form-checkbox-multi-state/UCheckboxMultiState.vue +1 -1
  27. package/ui.form-color-picker/UColorPicker.vue +1 -1
  28. package/ui.form-date-picker/UDatePicker.vue +1 -1
  29. package/ui.form-date-picker-range/UDatePickerRange.vue +1 -1
  30. package/ui.form-input/UInput.vue +1 -1
  31. package/ui.form-input-file/UInputFile.vue +1 -1
  32. package/ui.form-input-money/UInputMoney.vue +1 -1
  33. package/ui.form-input-number/UInputNumber.vue +1 -1
  34. package/ui.form-input-rating/UInputRating.vue +1 -1
  35. package/ui.form-input-search/UInputSearch.vue +1 -1
  36. package/ui.form-label/ULabel.vue +1 -1
  37. package/ui.form-radio/URadio.vue +1 -1
  38. package/ui.form-radio-group/URadioGroup.vue +1 -1
  39. package/ui.form-select/USelect.vue +1 -1
  40. package/ui.form-switch/USwitch.vue +1 -1
  41. package/ui.form-textarea/UTextarea.vue +1 -1
  42. package/ui.image-avatar/UAvatar.vue +1 -1
  43. package/ui.image-icon/UIcon.vue +1 -1
  44. package/ui.navigation-pagination/UPagination.vue +1 -1
  45. package/ui.navigation-progress/UProgress.vue +1 -1
  46. package/ui.navigation-tab/UTab.vue +1 -1
  47. package/ui.navigation-tabs/UTabs.vue +1 -1
  48. package/ui.other-dot/UDot.vue +1 -1
  49. package/ui.text-alert/UAlert.vue +1 -1
  50. package/ui.text-badge/UBadge.vue +1 -1
  51. package/ui.text-block/UText.vue +1 -1
  52. package/ui.text-empty/UEmpty.vue +1 -1
  53. package/ui.text-file/UFile.vue +1 -1
  54. package/ui.text-files/UFiles.vue +1 -1
  55. package/ui.text-header/UHeader.vue +1 -1
  56. package/ui.text-money/UMoney.vue +1 -1
  57. package/ui.text-notify/UNotify.vue +1 -1
  58. package/web-types.json +64 -100
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.394",
3
+ "version": "0.0.395",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -233,7 +233,7 @@ const props = defineProps({
233
233
  },
234
234
 
235
235
  /**
236
- * Component ui config object.
236
+ * Component config object.
237
237
  */
238
238
  config: {
239
239
  type: Object,
@@ -239,7 +239,7 @@ const props = defineProps({
239
239
  },
240
240
 
241
241
  /**
242
- * Component ui config object.
242
+ * Component config object.
243
243
  */
244
244
  config: {
245
245
  type: Object,
@@ -158,7 +158,7 @@ const props = defineProps({
158
158
  },
159
159
 
160
160
  /**
161
- * Component ui config object.
161
+ * Component config object.
162
162
  */
163
163
  config: {
164
164
  type: Object,
@@ -103,7 +103,7 @@ const props = defineProps({
103
103
  },
104
104
 
105
105
  /**
106
- * Component ui config object.
106
+ * Component config object.
107
107
  */
108
108
  config: {
109
109
  type: Object,
@@ -26,7 +26,7 @@
26
26
  <slot />
27
27
  </div>
28
28
 
29
- <UDivider v-if="isShownFooter" no-padding v-bind="dividerAttrs" />
29
+ <UDivider v-if="isShownFooter" padding="none" v-bind="dividerAttrs" />
30
30
 
31
31
  <div v-if="isShownFooter" v-bind="footerAttrs">
32
32
  <!-- @slot Use it to add something to the left side of the footer. -->
@@ -68,7 +68,7 @@ const props = defineProps({
68
68
  },
69
69
 
70
70
  /**
71
- * Component ui config object.
71
+ * Component config object.
72
72
  */
73
73
  config: {
74
74
  type: Object,
@@ -68,7 +68,7 @@ const props = defineProps({
68
68
  },
69
69
 
70
70
  /**
71
- *Component ui config object.
71
+ * Component config object.
72
72
  */
73
73
  config: {
74
74
  type: Object,
@@ -1,10 +1,7 @@
1
1
  <template>
2
2
  <div :data-test="dataTest" v-bind="wrapperAttrs">
3
3
  <div v-bind="dividerAttrs" />
4
- <template v-if="label && !vertical">
5
- <span v-bind="labelAttrs" v-text="label" />
6
- <div v-bind="dividerAttrs" />
7
- </template>
4
+ <span v-if="label" v-bind="labelAttrs" v-text="label" />
8
5
  </div>
9
6
  </template>
10
7
 
@@ -44,6 +41,15 @@ const props = defineProps({
44
41
  default: getDefault(defaultConfig, UDivider).variant,
45
42
  },
46
43
 
44
+ /**
45
+ * Set padding around the Divider.
46
+ * @values none, before, after, all
47
+ */
48
+ padding: {
49
+ type: Boolean,
50
+ default: getDefault(defaultConfig, UDivider).padding,
51
+ },
52
+
47
53
  /**
48
54
  * Set line dashed.
49
55
  */
@@ -61,7 +67,7 @@ const props = defineProps({
61
67
  },
62
68
 
63
69
  /**
64
- * Set divider orientation to vertical.
70
+ * Set divider vertically orientated.
65
71
  */
66
72
  vertical: {
67
73
  type: Boolean,
@@ -77,47 +83,7 @@ const props = defineProps({
77
83
  },
78
84
 
79
85
  /**
80
- * Remove all paddings.
81
- */
82
- noPadding: {
83
- type: Boolean,
84
- default: getDefault(defaultConfig, UDivider).noPadding,
85
- },
86
-
87
- /**
88
- * Remove top padding.
89
- */
90
- noTopPadding: {
91
- type: Boolean,
92
- default: getDefault(defaultConfig, UDivider).noTopPadding,
93
- },
94
-
95
- /**
96
- * Remove bottom padding.
97
- */
98
- noBottomPadding: {
99
- type: Boolean,
100
- default: getDefault(defaultConfig, UDivider).noBottomPadding,
101
- },
102
-
103
- /**
104
- * Remove left padding.
105
- */
106
- noLeftPadding: {
107
- type: Boolean,
108
- default: getDefault(defaultConfig, UDivider).noLeftPadding,
109
- },
110
-
111
- /**
112
- * Remove right padding.
113
- */
114
- noRightPadding: {
115
- type: Boolean,
116
- default: getDefault(defaultConfig, UDivider).noRightPadding,
117
- },
118
-
119
- /**
120
- * Component ui config object.
86
+ * Component config object.
121
87
  */
122
88
  config: {
123
89
  type: Object,
@@ -1,12 +1,16 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: {
3
+ base: "flex",
3
4
  variants: {
4
5
  vertical: {
5
- true: "h-full flex",
6
- false: "w-full",
6
+ true: "h-full w-fit",
7
+ false: "w-full h-fit",
7
8
  },
8
9
  label: {
9
- true: "flex items-center",
10
+ true: "items-center justify-center",
11
+ },
12
+ padding: {
13
+ none: "p-0",
10
14
  },
11
15
  },
12
16
  compoundVariants: [
@@ -15,16 +19,15 @@ export default /*tw*/ {
15
19
  { vertical: false, size: "md", class: "py-4" },
16
20
  { vertical: false, size: "lg", class: "py-5" },
17
21
  { vertical: false, size: "xl", class: "py-6" },
22
+ { vertical: false, padding: "after", class: "pt-0" },
23
+ { vertical: false, padding: "before", class: "pb-0" },
18
24
  { vertical: true, size: "xs", class: "px-2" },
19
25
  { vertical: true, size: "sm", class: "px-3" },
20
26
  { vertical: true, size: "md", class: "px-4" },
21
27
  { vertical: true, size: "lg", class: "px-5" },
22
28
  { vertical: true, size: "xl", class: "px-6" },
23
- { noPadding: true, class: "p-0" },
24
- { noTopPadding: true, class: "pt-0" },
25
- { noLeftPadding: true, class: "pl-0" },
26
- { noRightPadding: true, class: "pr-0" },
27
- { noBottomPadding: true, class: "pb-0" },
29
+ { vertical: true, padding: "after", class: "pl-0" },
30
+ { vertical: true, padding: "before", class: "pr-0" },
28
31
  ],
29
32
  },
30
33
  divider: {
@@ -35,12 +38,9 @@ export default /*tw*/ {
35
38
  default: "border-gray-200",
36
39
  dark: "border-gray-300",
37
40
  },
38
- label: {
39
- true: "w-full",
40
- },
41
41
  vertical: {
42
- true: "border-l",
43
- false: "border-t",
42
+ true: "border-l h-full",
43
+ false: "border-t w-full",
44
44
  },
45
45
  dashed: {
46
46
  true: "border-dashed",
@@ -49,31 +49,30 @@ export default /*tw*/ {
49
49
  true: "border-dotted",
50
50
  },
51
51
  noBorder: {
52
- true: "border-0",
52
+ true: "border-transparent",
53
53
  },
54
54
  },
55
55
  },
56
56
  label: {
57
- base: "px-2 shrink-0 text-sm",
57
+ base: "absolute p-2 rounded-dynamic bg-white shrink-0 text-sm w-fit",
58
58
  variants: {
59
59
  variant: {
60
60
  light: "text-gray-400",
61
61
  default: "text-gray-500",
62
62
  dark: "text-gray-600",
63
63
  },
64
+ vertical: {
65
+ true: "transform origin-center rotate-90",
66
+ },
64
67
  },
65
68
  },
66
69
  defaults: {
67
70
  variant: "default",
71
+ padding: "all",
68
72
  size: "md",
69
73
  dashed: false,
70
74
  dotted: false,
71
75
  vertical: false,
72
76
  noBorder: false,
73
- noPadding: false,
74
- noTopPadding: false,
75
- noBottomPadding: false,
76
- noLeftPadding: false,
77
- noRightPadding: false,
78
77
  },
79
78
  };
@@ -59,6 +59,9 @@ Sizes.args = { enum: "size" };
59
59
  export const Variants = EnumVariantTemplate.bind({});
60
60
  Variants.args = { enum: "variant" };
61
61
 
62
+ export const Padding = EnumVariantTemplate.bind({});
63
+ Padding.args = { enum: "padding" };
64
+
62
65
  export const Dashed = DefaultTemplate.bind({});
63
66
  Dashed.args = { dashed: true };
64
67
 
@@ -68,40 +71,11 @@ Dotted.args = { dotted: true };
68
71
  export const Vertical = DefaultTemplate.bind({});
69
72
  Vertical.args = {
70
73
  vertical: true,
74
+ label: "label",
71
75
  config: {
72
- wrapper: {
73
- base: "min-h-8",
74
- },
76
+ wrapper: "!h-32",
75
77
  },
76
78
  };
77
79
 
78
80
  export const NoBorder = DefaultTemplate.bind({});
79
- NoBorder.args = { noBorder: true };
80
-
81
- export const NoTopPadding = DefaultTemplate.bind({});
82
- NoTopPadding.args = { noTopPadding: true };
83
-
84
- export const NoBottomPadding = DefaultTemplate.bind({});
85
- NoBottomPadding.args = { noBottomPadding: true };
86
-
87
- export const NoRightPadding = DefaultTemplate.bind({});
88
- NoRightPadding.args = {
89
- noRightPadding: true,
90
- vertical: true,
91
- config: {
92
- wrapper: {
93
- base: "min-h-8",
94
- },
95
- },
96
- };
97
-
98
- export const NoLeftPadding = DefaultTemplate.bind({});
99
- NoLeftPadding.args = {
100
- noLeftPadding: true,
101
- vertical: true,
102
- config: {
103
- wrapper: {
104
- base: "min-h-8",
105
- },
106
- },
107
- };
81
+ NoBorder.args = { label: "label", noBorder: true };
@@ -1,3 +1,4 @@
1
+ import { computed } from "vue";
1
2
  import useUI from "../composables/useUI.js";
2
3
 
3
4
  import defaultConfig from "./config.js";
@@ -5,7 +6,11 @@ import defaultConfig from "./config.js";
5
6
  export default function useAttrs(props) {
6
7
  const { config, getKeysAttrs, hasSlotContent } = useUI(defaultConfig, () => props.config);
7
8
 
8
- const keysAttrs = getKeysAttrs();
9
+ const mutatedProps = computed(() => ({
10
+ label: Boolean(props.label),
11
+ }));
12
+
13
+ const keysAttrs = getKeysAttrs(mutatedProps);
9
14
 
10
15
  return {
11
16
  config,
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div v-bind="wrapperAttrs" :data-test="dataTest">
3
3
  <template v-if="title">
4
- <UDivider v-if="upperlined" size="xl" no-top-padding v-bind="upperlineAttrs" />
4
+ <UDivider v-if="upperlined" size="xl" padding="after" v-bind="upperlineAttrs" />
5
5
 
6
6
  <div v-bind="headerAttrs">
7
7
  <!-- @slot Use it to add something left side of the header. -->
@@ -77,7 +77,7 @@ const props = defineProps({
77
77
  },
78
78
 
79
79
  /**
80
- *Component ui config object.
80
+ *Component config object.
81
81
  */
82
82
  config: {
83
83
  type: Object,
@@ -82,13 +82,7 @@
82
82
  <UDivider v-if="!isExistFooter || !noDivider" no-border v-bind="dividerSpacingAttrs" />
83
83
 
84
84
  <template v-if="isExistFooter">
85
- <UDivider
86
- v-if="!noDivider"
87
- variant="dark"
88
- no-bottom-padding
89
- no-top-padding
90
- v-bind="dividerAttrs"
91
- />
85
+ <UDivider v-if="!noDivider" variant="dark" padding="none" v-bind="dividerAttrs" />
92
86
 
93
87
  <div v-bind="footerAttrs">
94
88
  <div v-if="hasSlotContent($slots['footer-left'])" v-bind="footerLeftAttrs">
@@ -226,7 +220,7 @@ const props = defineProps({
226
220
  },
227
221
 
228
222
  /**
229
- * Set component ui config object.
223
+ * Component config object.
230
224
  */
231
225
  config: {
232
226
  type: Object,
@@ -136,7 +136,7 @@ const props = defineProps({
136
136
  },
137
137
 
138
138
  /**
139
- * Component ui config object.
139
+ * Component config object.
140
140
  */
141
141
  config: {
142
142
  type: Object,
@@ -175,7 +175,7 @@ const props = defineProps({
175
175
  },
176
176
 
177
177
  /**
178
- * Sets component ui config object.
178
+ * Component config object.
179
179
  */
180
180
  config: {
181
181
  type: Object,
@@ -76,7 +76,7 @@ const props = defineProps({
76
76
  },
77
77
 
78
78
  /**
79
- * Component ui config object.
79
+ * Component config object.
80
80
  */
81
81
  config: {
82
82
  type: Object,
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div v-bind="wrapperAttrs">
3
- <UDivider v-if="upperlined" size="xl" no-top-padding v-bind="dividerAttrs" />
3
+ <UDivider v-if="upperlined" size="xl" padding="after" v-bind="dividerAttrs" />
4
4
 
5
5
  <UEmpty
6
6
  v-if="!hideEmptyStateForNesting && !list?.length"
@@ -242,7 +242,7 @@ const props = defineProps({
242
242
  },
243
243
 
244
244
  /**
245
- * Component ui config object.
245
+ * Component config object.
246
246
  */
247
247
  config: {
248
248
  type: Object,
@@ -362,7 +362,7 @@ const props = defineProps({
362
362
  },
363
363
 
364
364
  /**
365
- * Component ui config object.
365
+ * Component config object.
366
366
  */
367
367
  config: {
368
368
  type: Object,
@@ -174,7 +174,7 @@ const props = defineProps({
174
174
  },
175
175
 
176
176
  /**
177
- * Component ui config object.
177
+ * Component config object.
178
178
  */
179
179
  config: {
180
180
  type: Object,
@@ -200,7 +200,7 @@ const props = defineProps({
200
200
  },
201
201
 
202
202
  /**
203
- * Component ui config object.
203
+ * Component config object.
204
204
  */
205
205
  config: {
206
206
  type: Object,
@@ -194,7 +194,7 @@ const props = defineProps({
194
194
  },
195
195
 
196
196
  /**
197
- * Component ui config object.
197
+ * Component config object.
198
198
  */
199
199
  config: {
200
200
  type: Object,
@@ -186,7 +186,7 @@ const props = defineProps({
186
186
  },
187
187
 
188
188
  /**
189
- * Component ui config object.
189
+ * Component config object.
190
190
  */
191
191
  config: {
192
192
  type: Object,
@@ -270,7 +270,7 @@ const props = defineProps({
270
270
  },
271
271
 
272
272
  /**
273
- * Component ui config object.
273
+ * Component config object.
274
274
  */
275
275
  config: {
276
276
  type: Object,
@@ -178,7 +178,7 @@ const props = defineProps({
178
178
  },
179
179
 
180
180
  /**
181
- * Component ui config object.
181
+ * Component config object.
182
182
  */
183
183
  config: {
184
184
  type: Object,
@@ -120,7 +120,7 @@ const props = defineProps({
120
120
  },
121
121
 
122
122
  /**
123
- * Component ui config object.
123
+ * Component config object.
124
124
  */
125
125
  config: {
126
126
  type: Object,
@@ -85,7 +85,7 @@ const props = defineProps({
85
85
  },
86
86
 
87
87
  /**
88
- * Component ui config object.
88
+ * Component config object.
89
89
  */
90
90
  config: {
91
91
  type: Object,
@@ -139,7 +139,7 @@ const props = defineProps({
139
139
  },
140
140
 
141
141
  /**
142
- * Component ui config object.
142
+ * Component config object.
143
143
  */
144
144
  config: {
145
145
  type: Object,
@@ -251,7 +251,7 @@ const props = defineProps({
251
251
  },
252
252
 
253
253
  /**
254
- * Component ui config object.
254
+ * Component config object.
255
255
  */
256
256
  config: {
257
257
  type: Object,
@@ -345,7 +345,7 @@ const props = defineProps({
345
345
  },
346
346
 
347
347
  /**
348
- * Component ui config object.
348
+ * Component config object.
349
349
  */
350
350
  config: {
351
351
  type: Object,
@@ -311,7 +311,7 @@ const props = defineProps({
311
311
  },
312
312
 
313
313
  /**
314
- * Component ui config object.
314
+ * Component config object.
315
315
  */
316
316
  config: {
317
317
  type: Object,
@@ -201,7 +201,7 @@ const props = defineProps({
201
201
  default: "",
202
202
  },
203
203
  /**
204
- * Sets component ui config object.
204
+ * Component config object.
205
205
  */
206
206
  config: {
207
207
  type: Object,
@@ -210,7 +210,7 @@ const props = defineProps({
210
210
  },
211
211
 
212
212
  /**
213
- * Component ui config object.
213
+ * Component config object.
214
214
  */
215
215
  config: {
216
216
  type: Object,
@@ -111,7 +111,7 @@ const props = defineProps({
111
111
  },
112
112
 
113
113
  /**
114
- * Component ui config object.
114
+ * Component config object.
115
115
  */
116
116
  config: {
117
117
  type: Object,
@@ -148,7 +148,7 @@ const props = defineProps({
148
148
  },
149
149
 
150
150
  /**
151
- * Component ui config object.
151
+ * Component config object.
152
152
  */
153
153
  config: {
154
154
  type: Object,
@@ -213,7 +213,7 @@ const props = defineProps({
213
213
  },
214
214
 
215
215
  /**
216
- * Component ui config object.
216
+ * Component config object.
217
217
  */
218
218
  config: {
219
219
  type: Object,
@@ -150,7 +150,7 @@ const props = defineProps({
150
150
  },
151
151
 
152
152
  /**
153
- * Sets component ui config object.
153
+ * Component config object.
154
154
  */
155
155
  config: {
156
156
  type: Object,
@@ -147,7 +147,7 @@ const props = defineProps({
147
147
  },
148
148
 
149
149
  /**
150
- * Component ui config object.
150
+ * Component config object.
151
151
  */
152
152
  config: {
153
153
  type: Object,
@@ -116,7 +116,7 @@ const props = defineProps({
116
116
  },
117
117
 
118
118
  /**
119
- * Component ui config object.
119
+ * Component config object.
120
120
  */
121
121
  config: {
122
122
  type: Object,
@@ -518,7 +518,7 @@ const props = defineProps({
518
518
  },
519
519
 
520
520
  /**
521
- * Component ui config object.
521
+ * Component config object.
522
522
  */
523
523
  config: {
524
524
  type: Object,
@@ -136,7 +136,7 @@ const props = defineProps({
136
136
  },
137
137
 
138
138
  /**
139
- * Sets component ui config object.
139
+ * Component config object.
140
140
  */
141
141
  config: {
142
142
  type: Object,
@@ -179,7 +179,7 @@ const props = defineProps({
179
179
  },
180
180
 
181
181
  /**
182
- * Sets component ui config object.
182
+ * Component config object.
183
183
  */
184
184
  config: {
185
185
  type: Object,