vueless 0.0.171 → 0.0.173

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.171",
3
+ "version": "0.0.173",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -124,7 +124,12 @@ export default /*tw*/ {
124
124
  `,
125
125
  },
126
126
  { filled: true, variant: "thirdary", class: "bg-{color}-700 bg-opacity-10" },
127
- { filled: true, variant: "thirdary", color: "grayscale", class: "bg-gray-800 bg-opacity-10" },
127
+ {
128
+ filled: true,
129
+ variant: "thirdary",
130
+ color: "grayscale",
131
+ class: "bg-gray-800 bg-opacity-10 hover:bg-opacity-15 focus:bg-opacity-15 active:bg-opacity-20",
132
+ },
128
133
  { filled: true, variant: "thirdary", color: "white", class: "bg-gray-50" },
129
134
  { square: true, size: "xs", class: "p-1" },
130
135
  { square: true, size: "xs", class: "p-1.5" },
@@ -1,7 +1,7 @@
1
1
  export default /*tw*/ {
2
- wrapper: "w-fit overflow-hidden rounded-lg border focus:outline-none border-brand-300 bg-white px-1 pb-4 shadow",
3
- navigation: "flex items-center justify-between px-3 pt-2",
4
- navigationSwitchViewButton: "",
2
+ wrapper: "p-3 pb-4 w-64 border border-brand-300 rounded-lg bg-white shadow overflow-hidden focus:outline-none",
3
+ navigation: "mb-2 pb-2 border-b flex items-center justify-between",
4
+ navigationSwitchViewButton: "-ml-3 pl-3 text-sm rounded-l-none",
5
5
  dayViewSwitchLabel: "flex gap-1",
6
6
  dayViewSwitchLabelMonth: "text-brand-900",
7
7
  dayViewSwitchLabelIcon: "",
@@ -19,7 +19,7 @@ export default /*tw*/ {
19
19
  nextIconName: "keyboard_arrow_right",
20
20
  prevIcon: "",
21
21
  prevIconName: "keyboard_arrow_left",
22
- dayViewWrapper: "w-64 px-3 pt-2",
22
+ dayViewWrapper: "",
23
23
  weekDaysWrapper: "grid grid-cols-7",
24
24
  weekDay: "flex size-8 items-center justify-center text-xs uppercase text-brand-500",
25
25
  daysWrapper: "grid grid-cols-7",
@@ -31,35 +31,26 @@ export default /*tw*/ {
31
31
  selectedDay: "bg-brand-900 text-white hover:bg-brand-900",
32
32
  currentDay: "hover:bg-brand-100 border-2 border-brand-900",
33
33
  anotherMonthDay: "hover:bg-brand-100 text-brand-400",
34
- monthViewWrapper: "grid w-64 grid-cols-4 items-center justify-center px-3 pt-2",
34
+ monthViewWrapper: "grid grid-cols-4 items-center justify-center",
35
35
  month: `
36
36
  mx-auto flex h-12 w-full items-center justify-center rounded-lg text-sm hover:cursor-pointer hover:bg-brand-100
37
37
  disabled:opacity-50 disabled:cursor-not-allowed
38
38
  `,
39
39
  selectedMonth: "bg-brand-900 hover:bg-brand-900 text-white",
40
40
  activeMonth: "bg-brand-100",
41
- yearViewWrapper: "grid w-64 grid-cols-4 items-center justify-center px-3 pt-2",
41
+ yearViewWrapper: "grid grid-cols-4 items-center justify-center",
42
42
  year: `
43
43
  mx-auto flex h-12 w-full items-center justify-center rounded-lg text-sm hover:cursor-pointer hover:bg-brand-100
44
44
  disabled:opacity-50 disabled:cursor-not-allowed
45
45
  `,
46
46
  selectedYear: "bg-brand-900 hover:bg-brand-900 text-white",
47
47
  activeYear: "bg-brand-100",
48
- timepickerWrapper: `
49
- mx-2 -mb-1 mt-2 flex items-center justify-between gap-2 border-t border-brand-200 pl-2 pr-1 pt-3 text-sm
50
- `,
48
+ timepickerWrapper: "mt-2 pl-1 pt-3 text-sm flex items-center justify-between gap-2 border-t border-brand-200",
51
49
  timepickerLabel: "w-full",
52
50
  timepickerInputWrapper: "flex items-center gap-px rounded-lg border border-brand-300",
53
- timepickerLeftInput: `
54
- w-11 rounded-l-lg border-none px-2.5 py-1.5 text-center text-sm focus:border-none focus:outline-none
55
- `,
56
- timepickerRightInput: `
57
- w-11 rounded-r-lg border-none px-2.5 py-1.5 text-center text-sm focus:border-none focus:outline-none
58
- `,
59
- submitButton: `
60
- rounded-lg border-none bg-brand-900/10 px-2.5 py-1.5 text-sm font-normal text-brand-900 outline-none
61
- focus:ring-0 hover:bg-brand-900/10
62
- `,
51
+ timepickerLeftInput: "w-11 rounded-l-lg border-none px-2.5 py-1.5 text-center text-sm focus:ring-brand-500",
52
+ timepickerRightInput: "w-11 rounded-r-lg border-none px-2.5 py-1.5 text-center text-sm focus:ring-brand-500",
53
+ submitButton: "py-2 focus:ring-0 border-0",
63
54
  i18n: {
64
55
  weekdays: {
65
56
  shorthand: {
@@ -7,9 +7,8 @@
7
7
  :disabled="!range"
8
8
  >
9
9
  <UButton
10
- size="sm"
10
+ size="xs"
11
11
  color="gray"
12
- pill
13
12
  square
14
13
  variant="thirdary"
15
14
  v-bind="navigationSwitchViewButtonAttrs"
@@ -39,8 +38,7 @@
39
38
 
40
39
  <div v-bind="nextPrevWrapperAttrs">
41
40
  <UButton
42
- pill
43
- size="sm"
41
+ size="xs"
44
42
  square
45
43
  variant="thirdary"
46
44
  v-bind="nextPrevButtonAttrs"
@@ -60,8 +58,7 @@
60
58
  <div ref="rangeSwitchViewContainerRef" />
61
59
 
62
60
  <UButton
63
- pill
64
- size="sm"
61
+ size="xs"
65
62
  square
66
63
  variant="thirdary"
67
64
  v-bind="nextPrevButtonAttrs"
@@ -142,7 +139,14 @@
142
139
  />
143
140
  </div>
144
141
 
145
- <UButton v-bind="submitButtonAttrs" @click="onClickSubmit">
142
+ <UButton
143
+ variant="thirdary"
144
+ size="sm"
145
+ square
146
+ filled
147
+ v-bind="submitButtonAttrs"
148
+ @click="onClickSubmit"
149
+ >
146
150
  {{ locale.okLabel }}
147
151
  </UButton>
148
152
  </div>
@@ -20,7 +20,7 @@ export default {
20
20
  parameters: {
21
21
  docs: {
22
22
  story: {
23
- height: "380px",
23
+ height: "480px",
24
24
  },
25
25
  },
26
26
  },
@@ -2,23 +2,16 @@ export default /*tw*/ {
2
2
  wrapper: "relative",
3
3
  input: "",
4
4
  inputActive: {
5
- block: {
6
- base: "ring-4 ring-brand-600/[.15] border-brand-500 hover:border-brand-500",
7
- },
5
+ block: "ring-4 ring-brand-700 ring-opacity-20 border-brand-500 hover:border-brand-500",
8
6
  },
9
- buttonWrapper: "flex h-full rounded-lg focus-within:ring-4 focus-within:ring-brand-600/[.15] max-md:justify-between",
10
- button: `
11
- shrink-0 grow rounded-none border-0 bg-zinc-100 py-2 text-base font-medium text-gray-900 shadow-none
12
- hover:bg-zinc-200 hover:ring-brand-600/[.15] focus:border-0 focus:bg-zinc-200 focus:ring-0 focus:ring-brand-600/[.15]
13
- active:bg-zinc-200 disabled:cursor-not-allowed
14
- `,
15
- buttonActive: "border-0 hover:bg-zinc-200 ring-0 ring-brand-600/[.15] bg-zinc-200",
16
- buttonWrapperActive: "ring-4 ring-brand-600/[.15]",
17
- shiftRangeButton: `
18
- focus:bg-bg-zinc-200 flex items-center border-0 bg-zinc-100 py-[0.71875rem] shadow-none
19
- hover:bg-zinc-200 hover:ring-brand-600/[.15] focus:border-0 focus:ring-0 focus:ring-brand-600/[.15] active:bg-zinc-200
20
- disabled:cursor-not-allowed last:rounded-l-none last:rounded-r-lg first:rounded-l-lg first:rounded-r-none
7
+ buttonWrapper: `
8
+ flex rounded-lg max-md:justify-between
9
+ focus-within:ring-4 focus-within:ring-brand-700 focus-within:ring-opacity-20
21
10
  `,
11
+ button: "shrink-0 grow rounded-none focus:ring-0",
12
+ buttonActive: "ring-0",
13
+ buttonWrapperActive: "ring-4 ring-brand-700 ring-opacity-20",
14
+ shiftRangeButton: "focus:ring-0 last:rounded-l-none last:rounded-r-lg first:rounded-l-lg first:rounded-r-none",
22
15
  menu: {
23
16
  base: "absolute z-40 my-2 w-80 overflow-hidden rounded-lg border border-brand-300 bg-white p-2 shadow focus:outline-none",
24
17
  variants: {
@@ -41,13 +34,13 @@ export default /*tw*/ {
41
34
  },
42
35
  periodsRow: "mb-1 flex min-w-64 gap-1",
43
36
  periodButton: `
44
- flex h-[3.125rem] w-full cursor-pointer flex-col items-center justify-center rounded-lg bg-zinc-100
37
+ flex h-[3.125rem] w-full cursor-pointer flex-col items-center justify-center rounded-lg bg-gray-100
45
38
  px-1.5 py-2.5 text-center text-xs font-medium text-brand-900 hover:bg-brand-200
46
39
  [&_span]:block [&_span]:font-normal [&_span]:text-brand-500
47
40
  `,
48
41
  periodButtonIcon: "",
49
42
  periodButtonIconName: "apps",
50
- periodButtonActive: "bg-zinc-200",
43
+ periodButtonActive: "bg-gray-200",
51
44
  rangeSwitchWrapper: "mb-2.5 mt-4 flex items-center justify-between py-2",
52
45
  rangeSwitchTitle: "font-medium text-sm",
53
46
  nextIcon: "",
@@ -63,7 +56,7 @@ export default /*tw*/ {
63
56
  cursor-pointer block w-full rounded-lg py-3 text-center text-sm font-medium text-gray-900 hover:rounded-lg hover:bg-brand-50
64
57
  disabled:opacity-50 disabled:cursor-not-allowed
65
58
  `,
66
- periodDateActive: "bg-zinc-100",
59
+ periodDateActive: "bg-gray-100",
67
60
  rangeInputWrapper: "flex mt-4",
68
61
  rangeInput: {
69
62
  block: `focus-within:z-10 group-first/range-input-wrapper:rounded-r-none group-last/range-input-wrapper:rounded-l-none`,
@@ -83,43 +76,21 @@ export default /*tw*/ {
83
76
  inputRangeError: "text-xs font-normal !leading-none mt-2 text-center text-red-500",
84
77
  calendar: {
85
78
  wrapper: "p-0 mt-2 w-full border-none shadow-none",
86
- dayViewWrapper: "p-0 w-full",
87
- monthViewWrapper: "p-0 w-full",
88
- yearViewWrapper: "p-0 w-full",
89
- dayViewSwitchLabel: "font-medium text-brand-900",
90
- nextPrevButton: "p-0 py-2 hover:bg-transparent",
91
- navigation: "px-0 w-full",
92
- nextIcon: {
93
- defaultVariants: {
94
- variant: "grayscale",
95
- size: "sm",
96
- },
97
- },
98
- prevIcon: {
99
- defaultVariants: {
100
- variant: "grayscale",
101
- size: "sm",
102
- },
103
- },
104
- day: "font-medium w-full h-10 text-sm mb-0.5",
105
- weekDay: "text-sm size-10",
106
- month: "font-medium",
107
- selectedMonth: "bg-zinc-100 text-brand-900 hover:text-white",
108
- year: "font-medium",
109
- selectedYear: "bg-zinc-100 text-brand-900 hover:text-white",
79
+ navigation: "mb-0 border-none",
80
+ navigationSwitchViewButton: "rounded-lg px-3",
81
+ day: "w-full h-10 mb-0.5",
110
82
  },
111
83
  i18n: {
112
- lastThirtyDays: "Last 30 days <span> and 2 next two weeks </span>",
113
84
  ownRange: "Own range",
114
85
  week: "Week",
115
86
  month: "Month",
116
87
  quarter: "Quarter",
117
88
  year: "Year",
118
- dateFormatWithDot: "Date should be in format 'dd.mm.yyyy'.",
89
+ dateFormatWithDot: "The date should be in format 'dd.mm.yyyy'.",
119
90
  notCorrectMonthNumber: "Wrong month number.",
120
91
  notCorrectDayNumber: "Wrong day in month.",
121
- fromDateGraterThanSecond: "The first date should be less than the second.",
122
- toDateSmallerThanFirst: "The second date should be greater than the first.",
92
+ fromDateGraterThanSecond: "The 'from' date should be less than the 'to' date.",
93
+ toDateSmallerThanFirst: "The 'to' date should be greater than the 'from' date.",
123
94
  weekdays: {
124
95
  shorthand: {
125
96
  sunday: "Sun",
@@ -24,7 +24,7 @@ export default {
24
24
  parameters: {
25
25
  docs: {
26
26
  story: {
27
- height: "580px",
27
+ height: "620px",
28
28
  },
29
29
  },
30
30
  },
@@ -33,6 +33,8 @@
33
33
  square
34
34
  :size="size"
35
35
  :disabled="disabled"
36
+ variant="thirdary"
37
+ filled
36
38
  v-bind="shiftRangeButtonAttrs"
37
39
  @click="onClickShiftRange('prev')"
38
40
  >
@@ -45,6 +47,8 @@
45
47
  :size="size"
46
48
  :disabled="disabled"
47
49
  :label="userFormatDate"
50
+ variant="thirdary"
51
+ filled
48
52
  v-bind="buttonAttrs"
49
53
  @click="activate"
50
54
  />
@@ -54,6 +58,8 @@
54
58
  square
55
59
  :size="size"
56
60
  :disabled="disabled"
61
+ variant="thirdary"
62
+ filled
57
63
  v-bind="shiftRangeButtonAttrs"
58
64
  @click="onClickShiftRange('next')"
59
65
  >
@@ -35,7 +35,7 @@ export default /*tw*/ {
35
35
  },
36
36
  },
37
37
  placeholder: {
38
- base: "pr-4 text-gray-700 flex-grow",
38
+ base: "pr-4 text-gray-700 flex-grow w-full",
39
39
  variants: {
40
40
  size: {
41
41
  sm: "text-sm",
@@ -49,12 +49,13 @@ export default /*tw*/ {
49
49
  chooseFileIconName: "attach_file",
50
50
  clearIcon: "",
51
51
  clearIconName: "close",
52
- removeItemIcon: "",
52
+ removeItemIcon: "ml-2",
53
53
  removeItemIconName: "close",
54
54
  dropzoneWrapperHover: "border-gray-400 border-dashed",
55
55
  dropzoneWrapperError: "hover:border-red-400 border-dashed border-red-300",
56
56
  input: "sr-only pointer-events-none size-0 opacity-0",
57
57
  buttonWrapper: "flex gap-4 items-center",
58
+ fileList: "w-full",
58
59
  i18n: {
59
60
  sizeError: "File size is too big.",
60
61
  formatError: "Format is not supported.",
@@ -40,6 +40,28 @@ const DefaultTemplate = (args) => ({
40
40
  `,
41
41
  });
42
42
 
43
+ const SlotTemplate = (args) => ({
44
+ components: { UInputFile },
45
+ setup() {
46
+ return { args };
47
+ },
48
+ data() {
49
+ return {
50
+ files: [],
51
+ error: args.error || "",
52
+ };
53
+ },
54
+ template: `
55
+ <UInputFile
56
+ v-bind="args"
57
+ v-model="files"
58
+ v-model:error="error"
59
+ >
60
+ ${args.slotTemplate}
61
+ </UInputFile>
62
+ `,
63
+ });
64
+
43
65
  const LabelAlignTemplate = (args, { argTypes } = {}) => ({
44
66
  components: { UInputFile, URow },
45
67
  setup() {
@@ -98,3 +120,12 @@ sizes.args = {};
98
120
 
99
121
  export const labelAlign = LabelAlignTemplate.bind({});
100
122
  labelAlign.args = {};
123
+
124
+ export const slotLeft = SlotTemplate.bind({});
125
+ slotLeft.args = {
126
+ slotTemplate: `
127
+ <template #left>
128
+ 🥸
129
+ </template>
130
+ `,
131
+ };
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.171",
4
+ "version": "0.0.173",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",