bonkers-ui 1.0.54 → 1.0.56

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 (69) hide show
  1. package/.eslintrc.js +95 -40
  2. package/package.json +31 -25
  3. package/src/components/ui-alert/ui-alert.stories.ts +6 -2
  4. package/src/components/ui-alert/ui-alert.vue +1 -1
  5. package/src/components/ui-badge/ui-badge.stories.ts +12 -4
  6. package/src/components/ui-badge/ui-badge.vue +5 -5
  7. package/src/components/ui-ber-rank/ui-ber-rank.stories.ts +7 -3
  8. package/src/components/ui-ber-rank/ui-ber-rank.vue +4 -4
  9. package/src/components/ui-button/ui-button.stories.ts +38 -13
  10. package/src/components/ui-button/ui-button.test.ts +1 -1
  11. package/src/components/ui-button/ui-button.vue +35 -13
  12. package/src/components/ui-card-cta/ui-card-cta.stories.ts +12 -4
  13. package/src/components/ui-card-cta/ui-card-cta.vue +6 -6
  14. package/src/components/ui-card-result/ui-card-result.stories.ts +23 -4
  15. package/src/components/ui-card-result/ui-card-result.vue +20 -7
  16. package/src/components/ui-card-simple/ui-card-simple.stories.ts +6 -2
  17. package/src/components/ui-card-simple/ui-card-simple.vue +1 -1
  18. package/src/components/ui-checkbox/ui-checkbox.stories.ts +19 -6
  19. package/src/components/ui-checkbox/ui-checkbox.vue +15 -3
  20. package/src/components/ui-icon/index.ts +1 -1
  21. package/src/components/ui-icon/ui-icon.stories.ts +9 -3
  22. package/src/components/ui-icon-wrapper/ui-icon-wrapper.stories.ts +17 -4
  23. package/src/components/ui-icon-wrapper/ui-icon-wrapper.vue +8 -8
  24. package/src/components/ui-input/ui-input.stories.ts +18 -10
  25. package/src/components/ui-input/ui-input.vue +4 -4
  26. package/src/components/ui-input-range/ui-input-range.stories.ts +19 -8
  27. package/src/components/ui-input-range/ui-input-range.vue +15 -15
  28. package/src/components/ui-list-item/ui-list-item.stories.ts +23 -8
  29. package/src/components/ui-list-item/ui-list-item.vue +14 -3
  30. package/src/components/ui-modal/ui-backdrop/ui-backdrop.vue +2 -2
  31. package/src/components/ui-modal/ui-modal.stories.ts +21 -6
  32. package/src/components/ui-modal/ui-modal.vue +12 -12
  33. package/src/components/ui-notification-badge/ui-notification-badge.stories.ts +9 -3
  34. package/src/components/ui-notification-badge/ui-notification-badge.vue +17 -3
  35. package/src/components/ui-order-card/ui-order-card.stories.ts +9 -3
  36. package/src/components/ui-order-card/ui-order-card.vue +5 -5
  37. package/src/components/ui-plain-radio/ui-plain-radio.stories.ts +21 -6
  38. package/src/components/ui-plain-radio/ui-plain-radio.vue +22 -23
  39. package/src/components/ui-progress/_types.ts +0 -0
  40. package/src/components/ui-progress/index.ts +1 -0
  41. package/src/components/ui-progress/ui-progress.stories.ts +40 -0
  42. package/src/components/ui-progress/ui-progress.vue +43 -0
  43. package/src/components/ui-radio/ui-radio.stories.ts +16 -5
  44. package/src/components/ui-radio/ui-radio.vue +14 -14
  45. package/src/components/ui-radio-fancy/ui-radio-fancy.stories.ts +18 -5
  46. package/src/components/ui-radio-fancy/ui-radio-fancy.vue +22 -20
  47. package/src/components/ui-result-card-range/ui-result-card-range.stories.ts +21 -11
  48. package/src/components/ui-result-card-range/ui-result-card-range.vue +3 -3
  49. package/src/components/ui-ripple/ui-ripple.stories.ts +14 -7
  50. package/src/components/ui-ripple/ui-ripple.vue +1 -1
  51. package/src/components/ui-select/ui-select.stories.ts +11 -3
  52. package/src/components/ui-select/ui-select.vue +14 -3
  53. package/src/components/ui-snackbar/index.ts +1 -1
  54. package/src/components/ui-snackbar/ui-snackbar.stories.ts +6 -2
  55. package/src/components/ui-snackbar/ui-snackbar.vue +1 -1
  56. package/src/components/ui-table/index.ts +2 -0
  57. package/src/components/ui-table/ui-table.stories.ts +6 -4
  58. package/src/components/ui-table/ui-table.vue +3 -5
  59. package/src/components/ui-tabs/ui-tabs.stories.ts +8 -2
  60. package/src/components/ui-tabs/ui-tabs.vue +3 -3
  61. package/src/components/ui-toggle/ui-toggle.stories.ts +16 -5
  62. package/src/components/ui-toggle/ui-toggle.vue +7 -6
  63. package/src/components/ui-typography/ui-typography.stories.ts +30 -10
  64. package/src/components/ui-verification-input/ui-verification-input.stories.ts +12 -5
  65. package/src/components/ui-verification-input/ui-verification-input.vue +5 -5
  66. package/src/stories/colors/colors.stories.ts +4 -2
  67. package/src/stories/colors/ui-colors.vue +2 -2
  68. package/src/stories/font-sizes/font-sizes.stories.ts +3 -1
  69. package/src/stories/spacings/spacings.stories.ts +3 -1
@@ -2,7 +2,7 @@
2
2
  <div class="ui-card-result">
3
3
  <div
4
4
  v-if="exclusiveText"
5
- class="bg-primary rounded-2xl px-sm pb-lg -mb-lg"
5
+ class="-mb-lg rounded-2xl bg-primary px-sm pb-lg"
6
6
  @click="exclusiveClickAction"
7
7
  >
8
8
  <ui-typography
@@ -17,14 +17,27 @@
17
17
  </ui-typography>
18
18
  </div>
19
19
 
20
- <div class="grid relative border border-secondary-alt-400 rounded-2xl overflow-hidden bg-white">
21
- <div class="ui-card-result__header grid gap-xs justify-between items-center rounded-lg bg-secondary-alt-200 p-xs m-xs mb-sm">
20
+ <div class="relative grid overflow-hidden rounded-2xl border border-secondary-alt-400 bg-white">
21
+ <div
22
+ class="
23
+ ui-card-result__header
24
+ m-xs
25
+ mb-sm
26
+ grid
27
+ items-center
28
+ justify-between
29
+ gap-xs
30
+ rounded-lg
31
+ bg-secondary-alt-200
32
+ p-xs
33
+ "
34
+ >
22
35
  <ui-typography
23
36
  v-if="header"
24
37
  line-height
25
- class="flex-1 line-clamp"
38
+ class="line-clamp flex-1"
26
39
  :size="ETypographySizes.SM"
27
- :weight="ETextWeight.SEMI_BOLD"
40
+ :weight="ETextWeight.BOLD "
28
41
  :kind="EColors.SECONDARY"
29
42
  >
30
43
  {{ header }}
@@ -33,14 +46,14 @@
33
46
  <slot name="sidebar" />
34
47
  </div>
35
48
 
36
- <main class="p-sm pt-0 w-full overflow-hidden bg-white">
49
+ <main class="w-full overflow-hidden bg-white p-sm pt-0">
37
50
  <slot />
38
51
  </main>
39
52
  </div>
40
53
 
41
54
  <div
42
55
  v-if="exclusiveTextBottom"
43
- class="bg-secondary-alt-200 rounded-2xl px-sm pt-lg -mt-lg border border-secondary-alt-400"
56
+ class="-mt-lg rounded-2xl border border-secondary-alt-400 bg-secondary-alt-200 px-sm pt-lg"
44
57
  @click="exclusiveBottomClickAction"
45
58
  >
46
59
  <ui-typography
@@ -13,9 +13,13 @@ export default {
13
13
  type TComponentProps = InstanceType<typeof UiCardSimple>["$props"];
14
14
 
15
15
  const Template: Story<TComponentProps> = (args) => ({
16
- components: { UiCardSimple },
16
+ components: {
17
+ UiCardSimple
18
+ },
17
19
  setup() {
18
- return { args };
20
+ return {
21
+ args
22
+ };
19
23
  },
20
24
  template: /*html*/`
21
25
 
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="ui-card-simple rounded-3xl shadow-md py-md px-sm bg-white"
3
+ class="ui-card-simple rounded-3xl bg-white px-sm py-md shadow-md"
4
4
  >
5
5
  <ui-typography
6
6
  v-if="slots.title"
@@ -9,20 +9,28 @@ export default {
9
9
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
10
10
  argTypes: {
11
11
  justify: {
12
- control: { type: "select" },
12
+ control: {
13
+ type: "select"
14
+ },
13
15
  options: Object.values(EJustify),
14
16
  description: "The Element justify",
15
17
  },
16
18
  invertOrder: {
17
- control: { type: "boolean" },
19
+ control: {
20
+ type: "boolean"
21
+ },
18
22
  description: "The Element order",
19
23
  },
20
24
  disabled: {
21
- control: { type: "boolean" },
25
+ control: {
26
+ type: "boolean"
27
+ },
22
28
  description: "The Element disabled state",
23
29
  },
24
30
  modelValue: {
25
- control: { type: "boolean" },
31
+ control: {
32
+ type: "boolean"
33
+ },
26
34
  description: "The Element disabled state",
27
35
  },
28
36
 
@@ -40,12 +48,17 @@ type TComponentProps = InstanceType<typeof UiCheckbox>["$props"];
40
48
 
41
49
  const Template: Story<TComponentProps> = (args) => ({
42
50
  // Components used in your story `template` are defined in the `components` object
43
- components: { UiCheckbox },
51
+ components: {
52
+ UiCheckbox
53
+ },
44
54
  // The story's `args` need to be mapped into the template through the `setup()` method
45
55
  setup() {
46
56
  const modelValue = ref(true);
47
57
 
48
- return { args, modelValue };
58
+ return {
59
+ args,
60
+ modelValue
61
+ };
49
62
  },
50
63
  // And then the `args` are bound to your component with `v-bind="args"`
51
64
  template: `
@@ -14,13 +14,25 @@
14
14
  >
15
15
  <input
16
16
  v-model="checkboxModel"
17
- class="appearance-none absolute"
17
+ class="absolute appearance-none"
18
18
  type="checkbox"
19
19
  :value="value"
20
20
  :disabled="disabled"
21
21
  >
22
22
  <span
23
- class="ui-checkbox_custom w-md h-md flex items-center justify-center border border-secondary-alt-500 rounded relative hover:border-secondary-alt-700"
23
+ class="
24
+ ui-checkbox_custom
25
+ relative
26
+ flex
27
+ h-md
28
+ w-md
29
+ items-center
30
+ justify-center
31
+ rounded
32
+ border
33
+ border-secondary-alt-500
34
+ hover:border-secondary-alt-700
35
+ "
24
36
  :class="invertOrder && 'order-last'"
25
37
  >
26
38
  <svg
@@ -64,7 +76,7 @@
64
76
  }>();
65
77
 
66
78
  const emit = defineEmits<{
67
- (e: "update:modelValue", state: unknown): void
79
+ (e: "update:modelValue", state: typeof props.modelValue): void
68
80
  }>();
69
81
 
70
82
  const checkboxModel = computed({
@@ -1,3 +1,3 @@
1
1
  export { default } from "./ui-icon.vue";
2
2
  export { ESize } from "../../_types/sizing";
3
- export type { TIconName }from "./_typings";
3
+ export type { TIconName } from "./_typings";
@@ -8,7 +8,9 @@ export default {
8
8
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
9
9
  argTypes: {
10
10
  size: {
11
- control: { type: "select" },
11
+ control: {
12
+ type: "select"
13
+ },
12
14
  options: Object.values(ESize),
13
15
  description: "The Element size",
14
16
  }
@@ -23,10 +25,14 @@ type TComponentProps = InstanceType<typeof UiIcon>["$props"];
23
25
 
24
26
  const Template: Story<TComponentProps> = (args) => ({
25
27
  // Components used in your story `template` are defined in the `components` object
26
- components: { UiIcon },
28
+ components: {
29
+ UiIcon
30
+ },
27
31
  // The story's `args` need to be mapped into the template through the `setup()` method
28
32
  setup() {
29
- return { args };
33
+ return {
34
+ args
35
+ };
30
36
  },
31
37
  // And then the `args` are bound to your component with `v-bind="args"`
32
38
  template: `
@@ -10,12 +10,16 @@ export default {
10
10
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
11
11
  argTypes: {
12
12
  kind: {
13
- control: { type: "select" },
13
+ control: {
14
+ type: "select"
15
+ },
14
16
  options: Object.values(EIconWrapperTypes),
15
17
  description: "The Icon Wrapper kinds",
16
18
  },
17
19
  size: {
18
- control: { type: "select" },
20
+ control: {
21
+ type: "select"
22
+ },
19
23
  options: Object.values(EIconWrapperSizes),
20
24
  description: "The Icon Wrapper sizes",
21
25
  }
@@ -28,9 +32,18 @@ export default {
28
32
  type TComponentProps = InstanceType<typeof UiIconWrapper>["$props"];
29
33
 
30
34
  const Template: Story<TComponentProps> = (args) => ({
31
- components: { UiIconWrapper, UiIcon, UiNotificationBadge },
35
+ components: {
36
+ UiIconWrapper,
37
+ UiIcon,
38
+ UiNotificationBadge
39
+ },
32
40
  setup() {
33
- return { args, EBadgeOrigin, EIconWrapperSizes, EIconWrapperTypes };
41
+ return {
42
+ args,
43
+ EBadgeOrigin,
44
+ EIconWrapperSizes,
45
+ EIconWrapperTypes
46
+ };
34
47
  },
35
48
  template: /*html*/`
36
49
  <ui-icon-wrapper :kind="EIconWrapperTypes.PRIMARY" v-bind="args" class="mb-sm">
@@ -1,15 +1,15 @@
1
1
  <template>
2
2
  <div
3
- class="icon-wrapper w-fit h-fit grid place-items-center relative rounded-2xl"
3
+ class="icon-wrapper relative grid h-fit w-fit place-items-center rounded-2xl"
4
4
  :class="[
5
- kind === EIconWrapperTypes.PRIMARY && 'text-white bg-primary',
6
- kind === EIconWrapperTypes.SECONDARY && 'text-black bg-secondary-alt-200',
7
- kind === EIconWrapperTypes.DEFAULT && 'text-primary bg-white border-2 border-primary ',
5
+ kind === EIconWrapperTypes.PRIMARY && 'bg-primary text-white',
6
+ kind === EIconWrapperTypes.SECONDARY && 'bg-secondary-alt-200 text-black',
7
+ kind === EIconWrapperTypes.DEFAULT && 'border-2 border-primary bg-white text-primary ',
8
8
 
9
- size === EIconWrapperSizes.DEFAULT && 'py-sm px-sm',
10
- size === EIconWrapperSizes.SMALL && 'py-xs px-xs',
11
- size === EIconWrapperSizes.MEDIUM && 'py-md px-md icon-wrapper_offset-md',
12
- size === EIconWrapperSizes.LARGE && 'py-lg px-lg icon-wrapper_offset-lg',
9
+ size === EIconWrapperSizes.DEFAULT && 'p-sm',
10
+ size === EIconWrapperSizes.SMALL && 'p-xs',
11
+ size === EIconWrapperSizes.MEDIUM && 'icon-wrapper_offset-md p-md',
12
+ size === EIconWrapperSizes.LARGE && 'icon-wrapper_offset-lg p-lg',
13
13
  ]"
14
14
  >
15
15
  <slot />
@@ -10,21 +10,29 @@ export default {
10
10
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
11
11
  argTypes: {
12
12
  placeholder: {
13
- control: { type: "text" },
13
+ control: {
14
+ type: "text"
15
+ },
14
16
  description: "Placeholder",
15
17
  },
16
18
  kind: {
17
- control: { type: "select" },
19
+ control: {
20
+ type: "select"
21
+ },
18
22
  options: Object.values(EInputKinds),
19
23
  description: "The input kinds",
20
24
  },
21
25
  type: {
22
- control: { type: "select" },
26
+ control: {
27
+ type: "select"
28
+ },
23
29
  options: Object.values(EInputType),
24
30
  description: "The input type",
25
31
  },
26
32
  disabled: {
27
- control: { type: "boolean" },
33
+ control: {
34
+ type: "boolean"
35
+ },
28
36
  description: "The Element disabled state",
29
37
  },
30
38
  },
@@ -39,12 +47,12 @@ export default {
39
47
  type MyComponentProps = InstanceType<typeof UiInput>["$props"];
40
48
 
41
49
  const Template: Story<MyComponentProps> = (args: MyComponentProps) => ({
42
- components:{
50
+ components: {
43
51
  UiInput
44
52
  },
45
- setup(){
53
+ setup() {
46
54
  const valueModel = ref("");
47
- return{
55
+ return {
48
56
  args,
49
57
  valueModel
50
58
  };
@@ -55,14 +63,14 @@ const Template: Story<MyComponentProps> = (args: MyComponentProps) => ({
55
63
  });
56
64
 
57
65
  const TemplateAll: Story<MyComponentProps> = (args: MyComponentProps) => ({
58
- components:{
66
+ components: {
59
67
  UiInput,
60
68
  Icon
61
69
  },
62
- setup(){
70
+ setup() {
63
71
  const valueModel = ref("");
64
72
 
65
- return{
73
+ return {
66
74
  args,
67
75
  valueModel
68
76
  };
@@ -10,7 +10,7 @@
10
10
  </ui-typography>
11
11
  </slot>
12
12
  <label
13
- class="ui-input__wrapper flex w-full rounded-lg border bg-white items-center p-sm gap-xs"
13
+ class="ui-input__wrapper flex w-full items-center gap-xs rounded-lg border bg-white p-sm"
14
14
  :class="[
15
15
  kind === EInputKinds.SECONDARY && 'border-secondary-alt-500 hover:border-secondary-alt-700',
16
16
  kind === EInputKinds.PRIMARY && 'border-primary',
@@ -25,7 +25,7 @@
25
25
  :autocomplete="getAutoComplete()"
26
26
  :value="modelValue"
27
27
  :pattern="pattern"
28
- class="bg-transparent border-0 outline-none w-full placeholder:text-secondary-alt placeholder:italic"
28
+ class="w-full border-0 bg-transparent outline-none placeholder:italic placeholder:text-secondary-alt"
29
29
  :type="type"
30
30
  :placeholder="placeholder"
31
31
  :maxlength="maxlength"
@@ -85,8 +85,8 @@
85
85
  defineEmits(["update:modelValue"]);
86
86
 
87
87
  const getAutoComplete =()=> {
88
- if(props.autocomplete !== "") return props.autocomplete;
89
- switch(props.type) {
88
+ if (props.autocomplete !== "") return props.autocomplete;
89
+ switch (props.type) {
90
90
  case EInputType.PASSWORD: return "current-password";
91
91
  case EInputType.EMAIL: return "email";
92
92
  default: return "off";
@@ -6,16 +6,22 @@ export default {
6
6
  title: "Components/ui-input-range",
7
7
  component: UiInputRange,
8
8
  argTypes: {
9
- min:{
10
- control: { type: "number" },
9
+ min: {
10
+ control: {
11
+ type: "number"
12
+ },
11
13
  description: "The Element min value",
12
14
  },
13
- max:{
14
- control: { type: "number" },
15
+ max: {
16
+ control: {
17
+ type: "number"
18
+ },
15
19
  description: "The Element max value",
16
20
  },
17
- step:{
18
- control: { type: "number" },
21
+ step: {
22
+ control: {
23
+ type: "number"
24
+ },
19
25
  description: "The Element max value",
20
26
  }
21
27
  },
@@ -29,11 +35,16 @@ export default {
29
35
  type TComponentProps = InstanceType<typeof UiInputRange>["$props"];
30
36
 
31
37
  const Template: Story<TComponentProps> = (args) => ({
32
- components: { UiInputRange },
38
+ components: {
39
+ UiInputRange
40
+ },
33
41
  setup() {
34
42
  const modelValue = ref(50);
35
43
 
36
- return { args, modelValue };
44
+ return {
45
+ args,
46
+ modelValue
47
+ };
37
48
  },
38
49
  template: /*html*/`
39
50
  <div :style="{border: '1px solid'}">
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <div
3
- class="ui-input-range relative h-lg py-xs box-content"
3
+ class="ui-input-range relative box-content h-lg py-xs"
4
4
  >
5
5
  <input
6
6
  ref="track"
7
7
  v-model.number="rangeModel"
8
- class="appearance-none absolute top-0 left-0 cursor-pointer bg-transparent w-full h-full"
8
+ class="absolute left-0 top-0 h-full w-full cursor-pointer appearance-none bg-transparent"
9
9
  type="range"
10
10
  :min="min"
11
11
  :max="max"
@@ -14,11 +14,11 @@
14
14
  >
15
15
 
16
16
  <div
17
- class="h-xs w-full bg-secondary-alt rounded absolute top-1/2 left-0 -translate-y-1/2 pointer-events-none"
17
+ class="pointer-events-none absolute left-0 top-1/2 h-xs w-full -translate-y-1/2 rounded bg-secondary-alt"
18
18
  />
19
19
 
20
20
  <div
21
- class="h-xs bg-primary rounded absolute top-1/2 left-0 -translate-y-1/2 pointer-events-none"
21
+ class="pointer-events-none absolute left-0 top-1/2 h-xs -translate-y-1/2 rounded bg-primary"
22
22
  :style="{
23
23
  width: getPercentage + '%',
24
24
  }"
@@ -27,16 +27,16 @@
27
27
  <div
28
28
  class="
29
29
  ui-input-range__thumb
30
- w-xs
31
- h-xs
32
- bg-primary
30
+ pointer-events-none
33
31
  absolute
34
- border-white
35
- rounded-full
36
32
  box-content
37
- -translate-y-1/2
33
+ h-xs
34
+ w-xs
38
35
  -translate-x-1/2
39
- pointer-events-none
36
+ -translate-y-1/2
37
+ rounded-full
38
+ border-white
39
+ bg-primary
40
40
  "
41
41
  :style="{left: getPercentage + '%'}"
42
42
  />
@@ -67,9 +67,9 @@
67
67
  });
68
68
 
69
69
  watch(()=>[props.min, props.max], () => {
70
- if(rangeModel.value < +props.min){
70
+ if (rangeModel.value < +props.min) {
71
71
  rangeModel.value = +props.min;
72
- }else if(rangeModel.value > +props.max){
72
+ } else if (rangeModel.value > +props.max) {
73
73
  rangeModel.value = +props.max;
74
74
  }
75
75
  });
@@ -81,7 +81,7 @@
81
81
  });
82
82
 
83
83
  const parseMouseMove = (e: MouseEvent | TouchEvent) => {
84
- if(track.value){
84
+ if (track.value) {
85
85
  const CLICK = "clientX";
86
86
 
87
87
  const {
@@ -105,7 +105,7 @@
105
105
  const moveHandler = (e: MouseEvent | TouchEvent) => {
106
106
  const newValue = parseMouseMove(e);
107
107
 
108
- if(newValue){
108
+ if (newValue) {
109
109
  rangeModel.value = newValue;
110
110
  }
111
111
  };
@@ -7,26 +7,36 @@ export default {
7
7
  component: UiListItem,
8
8
  argTypes: {
9
9
  kind: {
10
- control: { type: "select" },
10
+ control: {
11
+ type: "select"
12
+ },
11
13
  options: Object.values(EListItemTypes),
12
14
  description: "The Element kind",
13
15
  },
14
16
  size: {
15
- control: { type: "select" },
17
+ control: {
18
+ type: "select"
19
+ },
16
20
  options: Object.values(EListItemSize),
17
21
  description: "The Element size"
18
22
  },
19
23
  spacing: {
20
- control: { type: "select" },
24
+ control: {
25
+ type: "select"
26
+ },
21
27
  options: Object.values(EListItemSpacing),
22
28
  description: "The Element spacing"
23
29
  },
24
30
  title: {
25
- control: { type: "text" },
31
+ control: {
32
+ type: "text"
33
+ },
26
34
  description: "The Element title"
27
35
  },
28
36
  slot: {
29
- control: { type: "text" },
37
+ control: {
38
+ type: "text"
39
+ },
30
40
  description: "The slot text or component",
31
41
  },
32
42
  },
@@ -40,11 +50,16 @@ export default {
40
50
  };
41
51
 
42
52
  export const Default = (args) => ({
43
- components: { UiListItem },
53
+ components: {
54
+ UiListItem
55
+ },
44
56
  setup() {
45
- return { args, ICON_DEFAULT };
57
+ return {
58
+ args,
59
+ ICON_DEFAULT
60
+ };
46
61
  },
47
- template:/*html*/`
62
+ template: /*html*/`
48
63
  <ul>
49
64
  <ui-list-item v-bind="args" :icon="ICON_DEFAULT" title="title only" icon-class="text-secondary-alt" />
50
65
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  <template>
3
3
  <li
4
- class="ui-list-item grid grid-flow-col justify-start gap-xs relative group text-secondary"
4
+ class="ui-list-item group relative grid grid-flow-col justify-start gap-xs text-secondary"
5
5
  :class="[
6
6
  size === EListItemSize.SM && 'text-sm',
7
7
  size === EListItemSize.MD && 'text-md',
@@ -11,7 +11,17 @@
11
11
  >
12
12
  <div
13
13
  v-if="kind === EListItemTypes.PROGRESS"
14
- class="ui-list-item__line bg-primary-300 h-full absolute w-xxs left-xs -translate-x-2/4 top-sm group-last:hidden"
14
+ class="
15
+ ui-list-item__line
16
+ absolute
17
+ left-xs
18
+ top-sm
19
+ h-full
20
+ w-xxs
21
+ -translate-x-2/4
22
+ bg-primary-300
23
+ group-last:hidden
24
+ "
15
25
  />
16
26
 
17
27
  <slot name="icon">
@@ -48,6 +58,7 @@
48
58
  import UiTypography, { ETextWeight } from "../ui-typography";
49
59
  import { ESize } from "../../_types/sizing";
50
60
  import { EListItemTypes, EListItemSpacing, EListItemSize } from "./_types";
61
+ import { HTMLAttributes } from "vue";
51
62
 
52
63
  withDefaults(defineProps<{
53
64
  icon?: TIconName
@@ -55,7 +66,7 @@
55
66
  kind?: EListItemTypes
56
67
  size?: EListItemSize
57
68
  spacing?: EListItemSpacing
58
- iconClass?: string
69
+ iconClass?: HTMLAttributes["class"]
59
70
  }>(), {
60
71
  kind: EListItemTypes.DEFAULT,
61
72
  size: EListItemSize.SM,
@@ -4,10 +4,10 @@
4
4
  class="
5
5
  backdrop-color
6
6
  fixed
7
- backdrop-blur-sm
8
- transition-all
9
7
  inset-0
10
8
  z-0
9
+ backdrop-blur-sm
10
+ transition-all
11
11
  "
12
12
  />
13
13
 
@@ -12,16 +12,22 @@ export default {
12
12
  component: UiModal,
13
13
  argTypes: {
14
14
  title: {
15
- control: { type: "text" },
15
+ control: {
16
+ type: "text"
17
+ },
16
18
  description: "The modal title text",
17
19
  },
18
20
  modalSize: {
19
- control: { type: "select" },
21
+ control: {
22
+ type: "select"
23
+ },
20
24
  options: Object.values(EModalSizes),
21
25
  description: "The modal kinds",
22
26
  },
23
27
  modalVisible: {
24
- control: { type: "boolean" },
28
+ control: {
29
+ type: "boolean"
30
+ },
25
31
  description: "Control Modal Visibility",
26
32
  },
27
33
 
@@ -36,11 +42,20 @@ export default {
36
42
  type TComponentProps = InstanceType<typeof UiModal>["$props"];
37
43
 
38
44
  const Template: Story<TComponentProps> = (args) => ({
39
- components: { UiModal, UiBackdrop, UiButton, UiIcon, UiTypography },
45
+ components: {
46
+ UiModal,
47
+ UiBackdrop,
48
+ UiButton,
49
+ UiIcon,
50
+ UiTypography
51
+ },
40
52
  setup() {
41
- return { args, ESize };
53
+ return {
54
+ args,
55
+ ESize
56
+ };
42
57
  },
43
- template:/*html*/`
58
+ template: /*html*/`
44
59
  <ui-modal
45
60
  class="absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2"
46
61
  :title="args.title"