vueless 0.0.178 → 0.0.180

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 (38) hide show
  1. package/package.json +1 -1
  2. package/ui.data-table/configs/default.config.js +2 -2
  3. package/ui.form-calendar/components/DayView.vue +6 -6
  4. package/ui.form-calendar/components/MonthView.vue +9 -5
  5. package/ui.form-calendar/components/YearView.vue +8 -4
  6. package/ui.form-calendar/composables/attrs.composable.js +23 -18
  7. package/ui.form-calendar/configs/default.config.js +12 -17
  8. package/ui.form-calendar/index.vue +4 -4
  9. package/ui.form-checkbox-group/configs/default.config.js +2 -0
  10. package/ui.form-checkbox-group/index.vue +39 -22
  11. package/ui.form-color-picker/composables/attrs.composable.js +19 -14
  12. package/ui.form-color-picker/configs/default.config.js +21 -15
  13. package/ui.form-color-picker/index.stories.js +1 -1
  14. package/ui.form-color-picker/index.vue +78 -59
  15. package/ui.form-date-picker/index.vue +4 -3
  16. package/ui.form-date-picker-range/index.vue +16 -4
  17. package/ui.form-input/index.stories.js +15 -5
  18. package/ui.form-input/index.vue +56 -28
  19. package/ui.form-radio/index.stories.js +4 -4
  20. package/ui.form-radio/index.vue +8 -4
  21. package/ui.form-radio-group/composables/attrs.composable.js +2 -0
  22. package/ui.form-radio-group/configs/default.config.js +3 -3
  23. package/ui.form-radio-group/index.stories.js +3 -3
  24. package/ui.form-radio-group/index.vue +29 -8
  25. package/ui.loader-top/Docs.mdx +8 -10
  26. package/ui.loader-top/composables/useLoaderTop.js +22 -11
  27. package/ui.loader-top/index.vue +17 -35
  28. package/ui.loader-top/services/loaderTop.service.js +6 -0
  29. package/ui.navigation-progress/composables/attrs.composable.js +38 -2
  30. package/ui.navigation-progress/configs/default.config.js +32 -0
  31. package/ui.navigation-progress/index.stories.js +127 -2
  32. package/ui.navigation-progress/index.vue +53 -5
  33. package/ui.text-alert/configs/default.config.js +7 -7
  34. package/ui.text-block/composables/attrs.composable.js +2 -0
  35. package/ui.text-block/configs/default.config.js +7 -7
  36. package/ui.text-block/index.stories.js +16 -16
  37. package/ui.text-block/index.vue +4 -4
  38. package/web-types.json +111 -45
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.178",
3
+ "version": "0.0.180",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -1,14 +1,14 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: "relative",
3
3
  headerCellGeneral: {
4
- base: "p-4 first:p-5 text-sm font-normal text-gray-500 text-left",
4
+ base: "p-4 first:p-5 text-sm font-normal text-gray-500 text-left text-nowrap",
5
5
  variants: {
6
6
  compact: {
7
7
  true: "px-4 py-3 last:px-4 last:py-3 first:px-4 first:py-3",
8
8
  },
9
9
  },
10
10
  },
11
- headerCounterGeneral: "mr-3 font-medium text-sm text-gray-900",
11
+ headerCounterGeneral: "mr-1.5 pr-1.5 font-medium text-sm text-gray-900",
12
12
  stickyHeader: "fixed top-0 flex items-center z-30 overflow-hidden rounded-none border",
13
13
  stickyHeaderRow: "border-gray-200 bg-white",
14
14
  stickyHeaderCell: "flex-none whitespace-nowrap",
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div v-bind="dayViewWrapperAttrs">
3
- <div v-bind="weekDaysWrapperAttrs">
2
+ <div v-bind="dayViewAttrs">
3
+ <div v-bind="weekDaysAttrs">
4
4
  <span v-for="weekDay in weekdays" :key="weekDay" v-bind="weekDayAttrs" v-text="weekDay" />
5
5
  </div>
6
- <div v-bind="daysWrapperAttrs">
6
+ <div v-bind="daysAttrs">
7
7
  <button
8
8
  v-for="day in days"
9
9
  :key="day"
@@ -90,10 +90,10 @@ const props = defineProps({
90
90
  const emit = defineEmits(["input"]);
91
91
 
92
92
  const {
93
- dayViewWrapperAttrs,
94
- weekDaysWrapperAttrs,
93
+ dayViewAttrs,
94
+ weekDaysAttrs,
95
95
  weekDayAttrs,
96
- daysWrapperAttrs,
96
+ daysAttrs,
97
97
  activeDayAttrs,
98
98
  selectedDayAttrs,
99
99
  currentDayAttrs,
@@ -1,13 +1,15 @@
1
1
  <template>
2
- <div v-bind="monthViewWrapperAttrs">
3
- <button
2
+ <div v-bind="monthViewAttrs">
3
+ <UButton
4
4
  v-for="month in months"
5
5
  :key="month"
6
- :disabled="dateIsOutOfRange(month, minDate, maxDate, locale, dateFormat)"
6
+ variant="thirdary"
7
+ color="brand"
7
8
  v-bind="monthAttrs(getMonthClasses(month))"
9
+ :disabled="dateIsOutOfRange(month, minDate, maxDate, locale, dateFormat)"
10
+ :label="formatDate(month, 'M', props.locale)"
8
11
  @click="onClickMonth(month)"
9
12
  @mousedown.prevent.capture
10
- v-text="formatDate(month, 'M', props.locale)"
11
13
  />
12
14
  </div>
13
15
  </template>
@@ -21,6 +23,8 @@ import useAttrs from "../composables/attrs.composable";
21
23
 
22
24
  import { MONTHS_PER_VIEW } from "../constants";
23
25
 
26
+ import UButton from "../../ui.button";
27
+
24
28
  const props = defineProps({
25
29
  selectedDate: {
26
30
  type: [Date, null],
@@ -65,7 +69,7 @@ const props = defineProps({
65
69
 
66
70
  const emit = defineEmits(["input"]);
67
71
 
68
- const { monthViewWrapperAttrs, selectedMonthAttrs, activeMonthAttrs, monthAttrs } = useAttrs(props);
72
+ const { monthViewAttrs, selectedMonthAttrs, activeMonthAttrs, monthAttrs } = useAttrs(props);
69
73
 
70
74
  const localSelectedDate = computed(() => {
71
75
  return props.selectedDate === null ? getDateWithoutTime() : props.selectedDate;
@@ -1,13 +1,15 @@
1
1
  <template>
2
- <div v-bind="yearViewWrapperAttrs">
3
- <button
2
+ <div v-bind="yearViewAttrs">
3
+ <UButton
4
4
  v-for="year in years"
5
5
  :key="year"
6
+ variant="thirdary"
7
+ color="brand"
6
8
  :disabled="dateIsOutOfRange(year, minDate, maxDate, locale, dateFormat)"
7
9
  v-bind="yearAttrs(getYearClasses(year))"
10
+ :label="formatDate(year, 'Y', props.locale)"
8
11
  @mousedown.prevent.capture
9
12
  @click="onClickMonth(year)"
10
- v-text="formatDate(year, 'Y', props.locale)"
11
13
  />
12
14
  </div>
13
15
  </template>
@@ -21,6 +23,8 @@ import useAttrs from "../composables/attrs.composable";
21
23
 
22
24
  import { YEARS_PER_VIEW } from "../constants";
23
25
 
26
+ import UButton from "../../ui.button";
27
+
24
28
  const props = defineProps({
25
29
  selectedDate: {
26
30
  type: [Date, null],
@@ -65,7 +69,7 @@ const props = defineProps({
65
69
 
66
70
  const emit = defineEmits(["input"]);
67
71
 
68
- const { yearViewWrapperAttrs, selectedYearAttrs, activeYearAttrs, yearAttrs } = useAttrs(props);
72
+ const { yearViewAttrs, selectedYearAttrs, activeYearAttrs, yearAttrs } = useAttrs(props);
69
73
 
70
74
  const localSelectedDate = computed(() => {
71
75
  return props.selectedDate === null ? getDateWithoutTime() : props.selectedDate;
@@ -26,10 +26,10 @@ export default function useAttrs(props) {
26
26
  const nextPrevButtonAttrs = getAttrs("nextPrevButton");
27
27
  const nextIconAttrs = getAttrs("nextIcon");
28
28
  const prevIconAttrs = getAttrs("prevIcon");
29
- const dayViewWrapperAttrs = getAttrs("dayViewWrapper");
30
- const weekDaysWrapperAttrs = getAttrs("weekDaysWrapper");
29
+ const dayViewAttrs = getAttrs("dayView");
30
+ const weekDaysAttrs = getAttrs("weekDays");
31
31
  const weekDayAttrs = getAttrs("weekDay");
32
- const daysWrapperAttrs = getAttrs("daysWrapper");
32
+ const daysAttrs = getAttrs("days");
33
33
  const activeDayAttrs = getAttrs("activeDay");
34
34
  const selectedDayAttrs = getAttrs("selectedDay");
35
35
  const currentDayAttrs = getAttrs("currentDay");
@@ -37,18 +37,23 @@ export default function useAttrs(props) {
37
37
  const inRangeFirstDayAttrs = getAttrs("inRangeFirstDay");
38
38
  const inRangeLastDayAttrs = getAttrs("inRangeLastDay");
39
39
  const anotherMonthDayAttrs = getAttrs("anotherMonthDay");
40
- const monthViewWrapperAttrs = getAttrs("monthViewWrapper");
40
+ const monthViewAttrs = getAttrs("monthView");
41
41
  const selectedMonthAttrs = getAttrs("selectedMonth");
42
42
  const activeMonthAttrs = getAttrs("activeMonth");
43
- const yearViewWrapperAttrs = getAttrs("yearViewWrapper");
43
+ const yearViewAttrs = getAttrs("yearView");
44
44
  const selectedYearAttrs = getAttrs("selectedYear");
45
45
  const activeYearAttrs = getAttrs("activeYear");
46
- const timepickerWrapperAttrs = getAttrs("timepickerWrapper");
46
+ const timepickerAttrs = getAttrs("timepicker");
47
47
  const timepickerLabelAttrs = getAttrs("timepickerLabel");
48
+ const timepickerInput = getAttrs("timepickerInput");
48
49
  const timepickerInputWrapperAttrs = getAttrs("timepickerInputWrapper");
49
- const timepickerLeftInputAttrs = getAttrs("timepickerLeftInput");
50
- const timepickerRightInputAttrs = getAttrs("timepickerRightInput");
51
- const submitButtonAttrs = getAttrs("submitButton");
50
+ const timepickerLeftInputAttrs = getAttrs("timepickerLeftInput", {
51
+ classes: timepickerInput.value.class,
52
+ });
53
+ const timepickerRightInputAttrs = getAttrs("timepickerRightInput", {
54
+ classes: timepickerInput.value.class,
55
+ });
56
+ const timepickerSubmitButtonAttrs = getAttrs("timepickerSubmitButton");
52
57
 
53
58
  const nextPrevWrapperAttrs = getAttrs("nextPrevWrapper", { classes: optionClasses.value });
54
59
 
@@ -57,11 +62,11 @@ export default function useAttrs(props) {
57
62
  };
58
63
 
59
64
  const monthAttrs = (classes = []) => {
60
- return getAttrs("month", { classes }).value;
65
+ return getAttrs("month", { classes, isComponent: true }).value;
61
66
  };
62
67
 
63
68
  const yearAttrs = (classes = []) => {
64
- return getAttrs("year", { classes }).value;
69
+ return getAttrs("year", { classes, isComponent: true }).value;
65
70
  };
66
71
 
67
72
  return {
@@ -75,10 +80,10 @@ export default function useAttrs(props) {
75
80
  nextIconAttrs,
76
81
  nextPrevButtonAttrs,
77
82
  prevIconAttrs,
78
- dayViewWrapperAttrs,
79
- weekDaysWrapperAttrs,
83
+ dayViewAttrs,
84
+ weekDaysAttrs,
80
85
  weekDayAttrs,
81
- daysWrapperAttrs,
86
+ daysAttrs,
82
87
  activeDayAttrs,
83
88
  selectedDayAttrs,
84
89
  currentDayAttrs,
@@ -87,20 +92,20 @@ export default function useAttrs(props) {
87
92
  inRangeDayAttrs,
88
93
  inRangeFirstDayAttrs,
89
94
  inRangeLastDayAttrs,
90
- monthViewWrapperAttrs,
95
+ monthViewAttrs,
91
96
  selectedMonthAttrs,
92
97
  activeMonthAttrs,
93
98
  monthAttrs,
94
- yearViewWrapperAttrs,
99
+ yearViewAttrs,
95
100
  selectedYearAttrs,
96
101
  activeYearAttrs,
97
102
  yearAttrs,
98
- timepickerWrapperAttrs,
103
+ timepickerAttrs,
99
104
  timepickerLabelAttrs,
100
105
  timepickerInputWrapperAttrs,
101
106
  timepickerLeftInputAttrs,
102
107
  timepickerRightInputAttrs,
103
- submitButtonAttrs,
108
+ timepickerSubmitButtonAttrs,
104
109
  nextPrevWrapperAttrs,
105
110
  };
106
111
  }
@@ -19,10 +19,10 @@ export default /*tw*/ {
19
19
  nextIconName: "keyboard_arrow_right",
20
20
  prevIcon: "",
21
21
  prevIconName: "keyboard_arrow_left",
22
- dayViewWrapper: "",
23
- weekDaysWrapper: "grid grid-cols-7",
22
+ dayView: "",
23
+ weekDays: "grid grid-cols-7",
24
24
  weekDay: "flex size-8 items-center justify-center text-xs uppercase text-brand-500",
25
- daysWrapper: "grid grid-cols-7",
25
+ days: "grid grid-cols-7",
26
26
  day: "mx-auto size-8 rounded-lg text-sm hover:bg-brand-100 disabled:opacity-50 disabled:cursor-not-allowed",
27
27
  activeDay: "bg-brand-100 hover:bg-brand-100",
28
28
  inRangeFirstDay: "rounded-none rounded-l-lg bg-brand-200 text-brand-900 hover:bg-brand-200",
@@ -31,26 +31,21 @@ 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 grid-cols-4 items-center justify-center",
35
- month: `
36
- mx-auto flex h-12 w-full items-center justify-center rounded-lg text-sm hover:cursor-pointer hover:bg-brand-100
37
- disabled:opacity-50 disabled:cursor-not-allowed
38
- `,
34
+ monthView: "grid grid-cols-4 items-center justify-center",
35
+ month: "mx-auto flex h-12 w-full rounded-lg hover:!bg-brand-900 hover:text-white",
39
36
  selectedMonth: "bg-brand-900 hover:bg-brand-900 text-white",
40
37
  activeMonth: "bg-brand-100",
41
- yearViewWrapper: "grid grid-cols-4 items-center justify-center",
42
- year: `
43
- mx-auto flex h-12 w-full items-center justify-center rounded-lg text-sm hover:cursor-pointer hover:bg-brand-100
44
- disabled:opacity-50 disabled:cursor-not-allowed
45
- `,
38
+ yearView: "grid grid-cols-4 items-center justify-center",
39
+ year: "mx-auto flex h-12 w-full rounded-lg hover:!bg-brand-900 hover:text-white",
46
40
  selectedYear: "bg-brand-900 hover:bg-brand-900 text-white",
47
41
  activeYear: "bg-brand-100",
48
- timepickerWrapper: "mt-2 pl-1 pt-3 text-sm flex items-center justify-between gap-2 border-t border-brand-200",
42
+ timepicker: "mt-2 pl-1 pt-3 text-sm flex items-center justify-between gap-2 border-t border-brand-200",
49
43
  timepickerLabel: "w-full",
50
44
  timepickerInputWrapper: "flex items-center gap-px rounded-lg border border-brand-300",
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",
45
+ timepickerInput: "w-11 border-none px-2.5 py-1.5 text-center text-sm focus:ring-brand-500",
46
+ timepickerLeftInput: "rounded-l-lg",
47
+ timepickerRightInput: "rounded-r-lg",
48
+ timepickerSubmitButton: "py-2 focus:ring-0 border-0",
54
49
  i18n: {
55
50
  weekdays: {
56
51
  shorthand: {
@@ -118,7 +118,7 @@
118
118
  @input="onInput"
119
119
  />
120
120
 
121
- <div v-if="isTimepickerEnabled" v-bind="timepickerWrapperAttrs">
121
+ <div v-if="isTimepickerEnabled" v-bind="timepickerAttrs">
122
122
  <span v-bind="timepickerLabelAttrs" v-text="locale.timeLabel" />
123
123
 
124
124
  <div v-bind="timepickerInputWrapperAttrs">
@@ -144,7 +144,7 @@
144
144
  size="sm"
145
145
  square
146
146
  filled
147
- v-bind="submitButtonAttrs"
147
+ v-bind="timepickerSubmitButtonAttrs"
148
148
  @click="onClickSubmit"
149
149
  >
150
150
  {{ locale.okLabel }}
@@ -309,12 +309,12 @@ const {
309
309
  nextIconAttrs,
310
310
  nextPrevButtonAttrs,
311
311
  prevIconAttrs,
312
- timepickerWrapperAttrs,
312
+ timepickerAttrs,
313
313
  timepickerLabelAttrs,
314
314
  timepickerInputWrapperAttrs,
315
315
  timepickerLeftInputAttrs,
316
316
  timepickerRightInputAttrs,
317
- submitButtonAttrs,
317
+ timepickerSubmitButtonAttrs,
318
318
  nextPrevWrapperAttrs,
319
319
  } = useAttrs(props);
320
320
 
@@ -3,6 +3,8 @@ export default /*tw*/ {
3
3
  list: "ml-4 flex flex-col gap-4 relative",
4
4
  checkbox: "",
5
5
  defaultVariants: {
6
+ color: "brand",
7
+ size: "md",
6
8
  disabled: false,
7
9
  },
8
10
  };
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <ULabel
3
- :for="id"
3
+ :size="size"
4
4
  :label="label"
5
5
  :error="error"
6
- align="topWithDesc"
6
+ :description="description"
7
7
  :disabled="disabled"
8
+ align="topWithDesc"
8
9
  :data-cy="dataCy"
9
10
  v-bind="labelAttrs"
10
11
  >
11
- {{ option }}
12
12
  <div v-bind="listAttrs">
13
13
  <slot>
14
14
  <UCheckbox
@@ -33,7 +33,7 @@
33
33
  import { provide, ref, watch } from "vue";
34
34
  import { isEqual } from "lodash-es";
35
35
 
36
- import UIService, { getRandomId } from "../service.ui";
36
+ import UIService from "../service.ui";
37
37
 
38
38
  import ULabel from "../ui.form-label";
39
39
  import UCheckbox from "../ui.form-checkbox";
@@ -46,14 +46,6 @@ import { useAttrs } from "./composables/attrs.composable";
46
46
  defineOptions({ name: "UCheckboxGroup", inheritAttrs: false });
47
47
 
48
48
  const props = defineProps({
49
- /**
50
- * Checkbox group label.
51
- */
52
- label: {
53
- type: String,
54
- default: "",
55
- },
56
-
57
49
  /**
58
50
  * Checkbox group value.
59
51
  */
@@ -71,13 +63,47 @@ const props = defineProps({
71
63
  },
72
64
 
73
65
  /**
74
- * Error description.
66
+ * Checkbox group label.
67
+ */
68
+ label: {
69
+ type: String,
70
+ default: "",
71
+ },
72
+
73
+ /**
74
+ * Checkbox group description.
75
+ */
76
+ description: {
77
+ type: String,
78
+ default: "",
79
+ },
80
+
81
+ /**
82
+ * Checkbox group error message.
75
83
  */
76
84
  error: {
77
85
  type: String,
78
86
  default: "",
79
87
  },
80
88
 
89
+ /**
90
+ * Radio size.
91
+ * @values xs, sm, md, lg, xl
92
+ */
93
+ size: {
94
+ type: String,
95
+ default: UIService.get(defaultConfig, UCheckboxGroup).default.size,
96
+ },
97
+
98
+ /**
99
+ * Radio group color.
100
+ * @values brand, grayscale, gray, red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose
101
+ */
102
+ color: {
103
+ type: String,
104
+ default: UIService.get(defaultConfig, UCheckboxGroup).default.color,
105
+ },
106
+
81
107
  /**
82
108
  * Name for each checkbox.
83
109
  */
@@ -94,15 +120,6 @@ const props = defineProps({
94
120
  default: UIService.get(defaultConfig, UCheckboxGroup).default.disabled,
95
121
  },
96
122
 
97
- /**
98
- * Generates unique element id.
99
- * @ignore
100
- */
101
- id: {
102
- type: String,
103
- default: () => getRandomId(),
104
- },
105
-
106
123
  /**
107
124
  * Component ui config object.
108
125
  */
@@ -1,12 +1,18 @@
1
+ import { computed } from "vue";
1
2
  import useUI from "../../composable.ui";
3
+ import { cva } from "../../service.ui";
2
4
 
3
5
  import defaultConfig from "../configs/default.config";
4
- import { cva } from "../../service.ui";
5
- import { computed } from "vue";
6
6
 
7
7
  export function useAttrs(props) {
8
- const { config, getAttrs } = useUI(defaultConfig, () => props.config);
9
- const { radio } = config.value;
8
+ const { config, getAttrs, setColor } = useUI(defaultConfig, () => props.config);
9
+ const { list, radio } = config.value;
10
+
11
+ const cvaList = cva({
12
+ base: list.base,
13
+ variants: list.variants,
14
+ compoundVariants: list.compoundVariants,
15
+ });
10
16
 
11
17
  const cvaRadio = cva({
12
18
  base: radio.base,
@@ -14,24 +20,23 @@ export function useAttrs(props) {
14
20
  compoundVariants: radio.compoundVariants,
15
21
  });
16
22
 
17
- const radioClasses = computed(() => cvaRadio({ color: props.color }));
23
+ const listClasses = computed(() => cvaList({ size: props.size }));
24
+ const radioClasses = computed(() => setColor(cvaRadio({ color: props.color }), props.color));
18
25
 
19
- const wrapperAttrs = getAttrs("wrapper");
20
- const listAttrs = getAttrs("listAttrs");
21
26
  const labelAttrs = getAttrs("label");
27
+ const listAttrs = getAttrs("list", { classes: listClasses });
28
+ const unselectedAttrs = getAttrs("unselected");
29
+ const unselectedRadioAttrs = getAttrs("unselectedRadio", { isComponent: true });
30
+ const unselectedIconAttrs = getAttrs("unselectedIcon", { isComponent: true });
22
31
  const radioAttrs = getAttrs("radio", { classes: radioClasses, isComponent: true });
23
- const iconAttrs = getAttrs("icon");
24
- const uncoloredAttrs = getAttrs("uncolored", { isComponent: true });
25
- const uncoloredRadioAttrs = getAttrs("uncoloredRadio", { isComponent: true });
26
32
 
27
33
  return {
28
34
  config,
29
- wrapperAttrs,
30
35
  listAttrs,
31
36
  labelAttrs,
32
37
  radioAttrs,
33
- iconAttrs,
34
- uncoloredAttrs,
35
- uncoloredRadioAttrs,
38
+ unselectedIconAttrs,
39
+ unselectedAttrs,
40
+ unselectedRadioAttrs,
36
41
  };
37
42
  }
@@ -1,31 +1,39 @@
1
1
  export default /*tw*/ {
2
- wrapper: "",
3
- listAttrs: "mt-4 gap-4 flex flex-wrap",
4
2
  label: "",
3
+ list: {
4
+ base: "flex flex-wrap",
5
+ variants: {
6
+ size: {
7
+ xs: "gap-2",
8
+ sm: "gap-2",
9
+ md: "gap-3",
10
+ lg: "gap-3",
11
+ xl: "gap-4",
12
+ },
13
+ },
14
+ },
5
15
  radio: {
6
- base: "size-6 cursor-pointer ",
7
16
  radio: {
8
- base: "bg-{color}-500",
17
+ base: "cursor-pointer bg-{color}-500 border-{color}-500 hover:border-{color}-500",
9
18
  },
10
19
  },
11
- icon: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",
12
- iconName: "close",
13
- uncolored: "relative flex",
14
- uncoloredRadio: {
15
- base: "size-6",
20
+ unselected: "relative flex",
21
+ unselectedRadio: {
16
22
  radio: {
17
23
  compoundVariants: [
18
24
  {
19
25
  color: "grayscale",
20
- class: `
21
- text-white
22
- checked:border-gray-300
23
- `,
26
+ class: "text-white !border-gray-300 hover:!border-gray-400 focus:!border-gray-400 active:!border-gray-500",
24
27
  },
25
28
  ],
26
29
  },
27
30
  },
31
+ unselectedIcon: "absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",
32
+ unselectedIconName: "close",
28
33
  defaultVariants: {
34
+ name: "UColorPicker",
35
+ size: "md",
36
+ disabled: false,
29
37
  colorOptions: [
30
38
  "red",
31
39
  "orange",
@@ -45,8 +53,6 @@ export default /*tw*/ {
45
53
  "pink",
46
54
  "rose",
47
55
  ],
48
- disabled: false,
49
- size: "md",
50
56
  },
51
57
  safelist: (colors) => [{ pattern: `bg-(${colors})-500` }],
52
58
  };
@@ -11,7 +11,7 @@ export default {
11
11
  component: UColorPicker,
12
12
  args: {
13
13
  label: "Label",
14
- value: "red",
14
+ value: "",
15
15
  },
16
16
  argTypes: {
17
17
  ...getArgTypes(UColorPicker.name),