bonkers-ui 1.0.4 → 1.0.7

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 (71) hide show
  1. package/.storybook/preview.js +1 -2
  2. package/package.json +1 -1
  3. package/src/{_colors.json → _styles/classTypes/_colors.json} +2 -2
  4. package/src/{_font-sizes.json → _styles/classTypes/_font-sizes.json} +1 -1
  5. package/src/{_shadow.json → _styles/classTypes/_shadow.json} +1 -1
  6. package/src/{_spacing.json → _styles/classTypes/_spacing.json} +1 -0
  7. package/src/_styles/{colors.css → variables/colors.css} +0 -0
  8. package/src/_styles/{font-sizes.css → variables/font-sizes.css} +1 -1
  9. package/src/_styles/variables/shadow.css +8 -0
  10. package/src/_styles/{spacing.css → variables/spacing.css} +1 -0
  11. package/src/components/ui-badge/_typings.ts +11 -0
  12. package/src/components/ui-badge/index.ts +2 -0
  13. package/src/components/ui-badge/ui-badge.stories.ts +41 -0
  14. package/src/components/ui-badge/ui-badge.vue +57 -0
  15. package/src/components/ui-ber-rank/index.ts +1 -0
  16. package/src/components/ui-ber-rank/ui-ber-rank.stories.ts +30 -0
  17. package/src/components/ui-ber-rank/ui-ber-rank.vue +142 -0
  18. package/src/components/ui-button/ui-button.stories.ts +27 -13
  19. package/src/components/ui-button/ui-button.test.ts +5 -3
  20. package/src/components/ui-button/ui-button.vue +34 -8
  21. package/src/components/ui-card-cta/ui-card-cta.stories.ts +3 -13
  22. package/src/components/ui-card-cta/ui-card-cta.vue +3 -10
  23. package/src/components/ui-card-result/index.ts +1 -0
  24. package/src/components/ui-card-result/ui-card-result.stories.ts +103 -0
  25. package/src/components/ui-card-result/ui-card-result.vue +70 -0
  26. package/src/components/ui-card-simple/ui-card-simple.stories.ts +2 -8
  27. package/src/components/ui-card-simple/ui-card-simple.vue +1 -6
  28. package/src/components/ui-checkbox/ui-checkbox.stories.ts +1 -5
  29. package/src/components/ui-checkbox/ui-checkbox.vue +0 -2
  30. package/src/components/ui-icon/_typings.ts +9 -2
  31. package/src/components/ui-icon/ui-icon.stories.ts +2 -6
  32. package/src/components/ui-icon/ui-icon.vue +0 -2
  33. package/src/components/ui-input/_typings.ts +0 -2
  34. package/src/components/ui-input/ui-input.stories.ts +9 -7
  35. package/src/components/ui-input/ui-input.vue +48 -21
  36. package/src/components/ui-input-range/index.ts +1 -0
  37. package/src/components/ui-input-range/ui-input-range.stories.ts +44 -0
  38. package/src/components/ui-input-range/ui-input-range.vue +60 -0
  39. package/src/components/ui-list-item/index.ts +1 -0
  40. package/src/components/ui-list-item/ui-list-item.stories.ts +35 -0
  41. package/src/components/ui-list-item/ui-list-item.vue +29 -0
  42. package/src/components/ui-radio/ui-radio.stories.ts +8 -7
  43. package/src/components/ui-radio/ui-radio.vue +35 -4
  44. package/src/components/ui-radio-list-fancy/ui-radio-item/ui-radio-item.vue +3 -4
  45. package/src/components/ui-radio-list-fancy/ui-radio-list-fancy.stories.ts +2 -8
  46. package/src/components/ui-radio-list-fancy/ui-radio-list-fancy.vue +5 -6
  47. package/src/components/ui-ripple/ui-ripple.stories.ts +3 -8
  48. package/src/components/ui-ripple/ui-ripple.vue +0 -5
  49. package/src/components/ui-select/index.ts +1 -0
  50. package/src/components/ui-select/ui-select.stories.ts +41 -0
  51. package/src/components/ui-select/ui-select.vue +68 -0
  52. package/src/components/ui-tabs/index.ts +1 -0
  53. package/src/components/ui-tabs/ui-tabs.stories.ts +27 -0
  54. package/src/components/ui-tabs/ui-tabs.vue +58 -0
  55. package/src/components/ui-toggle/index.ts +1 -0
  56. package/src/components/ui-toggle/ui-toggle.stories.ts +39 -0
  57. package/src/components/ui-toggle/ui-toggle.vue +127 -0
  58. package/src/components/ui-typography/_typings.ts +5 -31
  59. package/src/components/ui-typography/index.ts +1 -1
  60. package/src/components/ui-typography/ui-typography.stories.ts +7 -6
  61. package/src/components/ui-typography/ui-typography.vue +4 -6
  62. package/src/components/ui-verification-input/ui-verification-input.stories.ts +1 -6
  63. package/src/components/ui-verification-input/ui-verification-input.vue +0 -2
  64. package/src/main.css +6 -5
  65. package/src/stories/colors/ui-colors.vue +1 -1
  66. package/src/stories/font-sizes/font-sizes.stories.ts +13 -0
  67. package/src/stories/font-sizes/ui-font-sizes.vue +28 -0
  68. package/src/stories/spacings/ui-spacings.vue +1 -1
  69. package/tailwind.config.js +4 -4
  70. package/vite.config.ts +5 -3
  71. package/src/_styles/shadow.css +0 -7
@@ -0,0 +1,103 @@
1
+ import UiCardResult from "./ui-card-result.vue";
2
+ import UiTypography, { ETypographySizes, ETextWeight, ETextAlign } from "../ui-typography";
3
+ import UiBadge from "../ui-badge";
4
+ import UiListItem from "../ui-list-item";
5
+ import UiButton, { EButtonTypes } from "../ui-button";
6
+ import UiIcon from "../ui-icon";
7
+ import { ESize } from "../../_types/sizing";
8
+ import type { Story } from "@storybook/vue3";
9
+
10
+ export default {
11
+ title: "Components/ui-card-result",
12
+ component: UiCardResult,
13
+ argTypes: {
14
+ exclusiveText: {
15
+ control: { type: "boolean" },
16
+ description: "Whether to show the exclusive text",
17
+ },
18
+ exclusiveTextBottom: {
19
+ control: { type: "boolean" },
20
+ description: "Whether to show the exclusive text",
21
+ },
22
+ },
23
+ args: {
24
+ slot: "default text",
25
+ exclusiveText: true,
26
+ exclusiveTextBottom: true,
27
+ },
28
+ };
29
+
30
+ type TComponentProps = InstanceType<typeof UiCardResult>["$props"];
31
+
32
+ const Template: Story<TComponentProps> = (args) => ({
33
+ components: { UiCardResult, UiTypography, UiBadge, UiListItem, UiButton, UiIcon },
34
+ setup() {
35
+ return { args, ETypographySizes, ETextWeight, ETextAlign, EButtonTypes, ESize };
36
+ },
37
+ template: `
38
+ <ui-card-result
39
+ v-bind="args"
40
+ header="Some header"
41
+ :exclusive-text="args.exclusiveText
42
+ ? 'Only available on bonkers.ie'
43
+ : undefined"
44
+ :exclusive-text-bottom="args.exclusiveTextBottom
45
+ ? 'The price changes made available on 04/04/2022 has been factored into your results'
46
+ : undefined"
47
+ >
48
+ <template #sidebar>
49
+ <ui-typography :size='ETypographySizes.XXS' line-height>
50
+ Special offer text
51
+ </ui-typography>
52
+ </template>
53
+
54
+ <template #default>
55
+ <div class="flex flex-wrap gap-xs mb-xs">
56
+ <ui-badge
57
+ v-for="item in ['10% annual overpayment allowance', 'Flexibility built in', 'Flexibility built in!', 'Flexibility built inas', 'lorem5 aslijdhsdoi ashjd oiahsjdoi ']"
58
+ :icon="['far', 'face-smile']"
59
+ :key="item"
60
+ >
61
+ {{ item }}
62
+ </ui-badge>
63
+ </div>
64
+
65
+ <ul>
66
+ <ui-list-item
67
+ v-for="item in 5"
68
+ class="mb-xs"
69
+ :key="item"
70
+ :icon="['far', 'face-smile']"
71
+ >
72
+ Feature item {{ item }}
73
+ </ui-list-item>
74
+ </ul>
75
+
76
+ <ui-typography
77
+ :weight="ETextWeight.BOLD"
78
+ :size="ETypographySizes.LG"
79
+ :align="ETextAlign.RIGHT"
80
+ class="mb-xs"
81
+ >
82
+ €1004.63 p/m
83
+ </ui-typography>
84
+
85
+ <div class="flex gap-sm">
86
+ <ui-button :kind="EButtonTypes.SECONDARY_OVERLAY">
87
+ <template #prefix>
88
+ <ui-icon
89
+ :icon-name="['far', 'face-smile']"
90
+ :size="ESize.SM"
91
+ />
92
+ </template>
93
+ </ui-button>
94
+
95
+ <ui-button full-width>Some text</ui-button>
96
+ </div>
97
+
98
+ </template>
99
+ </ui-card-result>
100
+ `,
101
+ });
102
+
103
+ export const Default = Template.bind({});
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <div class="ui-card-result__wrapper">
3
+ <div
4
+ v-if="exclusiveText"
5
+ class="ui-card-result__exclusive bg-primary rounded-2xl px-sm pb-lg -mb-lg"
6
+ >
7
+ <ui-typography
8
+ class="py-xs"
9
+ line-height
10
+ :size="ETypographySizes.XXS"
11
+ :kind="EColors.WHITE"
12
+ :align="ETextAlign.CENTER"
13
+ :weight="ETextWeight.SEMI_BOLD"
14
+ >
15
+ {{ exclusiveText }}
16
+ </ui-typography>
17
+ </div>
18
+
19
+ <div class="ui-card-result flex border border-secondary-alt rounded-2xl overflow-hidden">
20
+ <div
21
+ v-if="slots.sidebar"
22
+ class="ui-card-result__sidebar bg-secondary-alt-200 p-sm w-xl border-r border-secondary-alt flex items-center justify-center text-center"
23
+ >
24
+ <slot name="sidebar" />
25
+ </div>
26
+
27
+ <main class="p-sm bg-white w-full">
28
+ <ui-typography
29
+ v-if="header"
30
+ class="mb-xs"
31
+ :size="ETypographySizes.SM"
32
+ :weight="ETextWeight.SEMI_BOLD"
33
+ >
34
+ {{ header }}
35
+ </ui-typography>
36
+ <slot />
37
+ </main>
38
+ </div>
39
+
40
+ <div
41
+ v-if="exclusiveTextBottom"
42
+ class="ui-card-result__exclusive_bottom bg-secondary rounded-2xl px-sm pt-lg -mt-lg"
43
+ >
44
+ <ui-typography
45
+ class="py-xs"
46
+ :size="ETypographySizes.XXS"
47
+ :kind="EColors.WHITE"
48
+ :align="ETextAlign.CENTER"
49
+ line-height
50
+ >
51
+ {{ exclusiveTextBottom }}
52
+ </ui-typography>
53
+ </div>
54
+ </div>
55
+ </template>
56
+
57
+ <script lang="ts" setup>
58
+ import UiTypography, { ETypographySizes, ETextWeight, ETextAlign } from "../ui-typography";
59
+ import { EColors } from "../../_types/colors";
60
+ import { useSlots } from "vue";
61
+
62
+ const slots = useSlots();
63
+
64
+ defineProps<{
65
+ header?: string;
66
+ exclusiveText?: string;
67
+ exclusiveTextBottom?: string;
68
+ }>();
69
+
70
+ </script>
@@ -1,16 +1,10 @@
1
1
  import UiCardSimple from "./ui-card-simple.vue";
2
- import { Story } from "@storybook/vue3";
2
+ import type { Story } from "@storybook/vue3";
3
3
 
4
4
  export default {
5
5
  title: "Components/ui-card-simple",
6
6
  component: UiCardSimple,
7
- argTypes: {
8
- className: {
9
- control: { type: "text" },
10
- description: "The Element classes",
11
- },
12
-
13
- },
7
+ argTypes: {},
14
8
  args: {
15
9
  slot: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
16
10
  },
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="ui-card-simple rounded-3xl shadow-m py-md px-sm"
4
- :class="className"
3
+ class="ui-card-simple rounded-3xl shadow-md py-md px-sm bg-white"
5
4
  >
6
5
  <ui-typography
7
6
  v-if="slots.title"
@@ -28,8 +27,4 @@
28
27
  import { useSlots } from "vue";
29
28
 
30
29
  const slots = useSlots();
31
-
32
- defineProps<{
33
- className? : string;
34
- }>();
35
30
  </script>
@@ -1,5 +1,5 @@
1
1
  import UiCheckbox from "./ui-checkbox.vue";
2
- import { Story } from "@storybook/vue3";
2
+ import type { Story } from "@storybook/vue3";
3
3
  import { ref } from "vue";
4
4
  import { EJustify } from "../../_types/align";
5
5
 
@@ -8,10 +8,6 @@ export default {
8
8
  component: UiCheckbox,
9
9
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
10
10
  argTypes: {
11
- className: {
12
- control: { type: "text" },
13
- description: "The Element classes",
14
- },
15
11
  justify: {
16
12
  control: { type: "select" },
17
13
  options: Object.values(EJustify),
@@ -10,7 +10,6 @@
10
10
  justify === EJustify.EVENLY && 'justify-evenly',
11
11
  justify === EJustify.CENTER && 'justify-center',
12
12
  disabled && 'ui-checkbox_disabled',
13
- className
14
13
  ]"
15
14
  >
16
15
  <input
@@ -58,7 +57,6 @@
58
57
 
59
58
  defineProps<{
60
59
  modelValue: boolean;
61
- className?: string;
62
60
  justify?: EJustify;
63
61
  invertOrder?: boolean;
64
62
  disabled?: boolean;
@@ -1,3 +1,10 @@
1
- export type TIconPrefix = "fab" | "far" | "fas" | "fal" | "fad" | "fat";
1
+ export enum EIconType {
2
+ FAR = "far",
3
+ FAS = "fas",
4
+ FAB = "fab",
5
+ FAL = "fal",
6
+ FAD = "fad",
7
+ FAT = "fat",
8
+ }
2
9
 
3
- export type TIconName = [TIconPrefix, string];
10
+ export type TIconName = [EIconType, string];
@@ -1,5 +1,5 @@
1
1
  import UiIcon from "./ui-icon.vue";
2
- import { Story } from "@storybook/vue3";
2
+ import type { Story } from "@storybook/vue3";
3
3
  import { ESize } from "../../_types/sizing";
4
4
 
5
5
  export default {
@@ -7,10 +7,6 @@ export default {
7
7
  component: UiIcon,
8
8
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
9
9
  argTypes: {
10
- className: {
11
- control: { type: "text" },
12
- description: "The Element classes",
13
- },
14
10
  hasWrapper:{
15
11
  control: { type: "boolean" },
16
12
  description: "The Icon show wrapper",
@@ -39,7 +35,7 @@ const Template: Story<TComponentProps> = (args) => ({
39
35
  },
40
36
  // And then the `args` are bound to your component with `v-bind="args"`
41
37
  template: `
42
- <ui-icon v-bind="args" :icon-name="['fas', 'fa-user-secret']" />
38
+ <ui-icon v-bind="args" :icon-name="['far', 'fa-face-smile']" />
43
39
  `,
44
40
  });
45
41
 
@@ -11,7 +11,6 @@
11
11
  size === ESize.XL && 'h-xl w-xl',
12
12
  size === ESize.XXL && 'h-xxl w-xxl',
13
13
  hasWrapper && 'p-sm bg-primary rounded-2xl',
14
- className
15
14
  ]"
16
15
  />
17
16
  </template>
@@ -21,7 +20,6 @@
21
20
  import type { TIconName } from "./_typings";
22
21
 
23
22
  defineProps<{
24
- className?: string;
25
23
  hasWrapper?: boolean;
26
24
  size: ESize;
27
25
  iconName: TIconName;
@@ -1,6 +1,4 @@
1
1
  export enum EInputTypes {
2
2
  PRIMARY = "primary",
3
- SECONDARY = "secondary",
4
3
  ERROR = "error",
5
- WARNING = "warning",
6
4
  }
@@ -1,4 +1,4 @@
1
- import { Story } from "@storybook/vue3";
1
+ import type { Story } from "@storybook/vue3";
2
2
  import UiInput from "./ui-input.vue";
3
3
  import Icon from "../../_samples/icon.vue";
4
4
  import { ref } from "vue";
@@ -9,10 +9,6 @@ export default {
9
9
  component: UiInput,
10
10
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
11
11
  argTypes: {
12
- className: {
13
- control: { type: "text" },
14
- description: "Custom class",
15
- },
16
12
  placeholder: {
17
13
  control: { type: "text" },
18
14
  description: "Placeholder",
@@ -26,10 +22,16 @@ export default {
26
22
  control: { type: "boolean" },
27
23
  description: "The full width size",
28
24
  },
25
+ disabled: {
26
+ control: { type: "boolean" },
27
+ description: "The Element disabled state",
28
+ },
29
29
  },
30
30
  args: {
31
31
  placeholder: "Placeholder",
32
- fullWidth: false
32
+ fullWidth: false,
33
+ kind: undefined,
34
+ disabled: false,
33
35
  }
34
36
  };
35
37
 
@@ -47,7 +49,7 @@ const Template: Story<MyComponentProps> = (args: MyComponentProps) => ({
47
49
  };
48
50
  },
49
51
  template: `
50
- <ui-input v-bind="args" v-model="valueModel" />
52
+ <ui-input v-bind="args" v-model="valueModel" heading="heading" sub-label="subLabel" />
51
53
  `
52
54
  });
53
55
 
@@ -1,30 +1,51 @@
1
1
  <template>
2
- <div
3
- class="ui-input grid rounded-md border border-secondary-alt-500 bg-white max-w-xs items-center p-xs gap-xs"
4
- :class="[
5
- kind === EInputTypes.PRIMARY && 'border-primary',
6
- fullWidth && 'max-w-full',
7
- className,
8
- ]"
9
- >
10
- <div class="icon-wrapper">
11
- <slot name="prefix-icon" />
12
- </div>
13
- <input
14
- class="bg-transparent border-0 outline-0"
15
- type="text"
16
- :placeholder="placeholder"
17
- :value="modelValue"
18
- @input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement)?.value)"
2
+ <div class="ui-input">
3
+ <ui-typography
4
+ v-if="heading"
5
+ :weight="ETextWeight.BOLD"
6
+ class="mb-sm"
7
+ >
8
+ {{ heading }}
9
+ </ui-typography>
10
+ <div
11
+ class="ui-input__wrapper grid rounded-lg border bg-white max-w-xs items-center p-sm gap-xs"
12
+ :class="[
13
+ !kind && 'border-secondary-alt-500 hover:border-secondary-alt-700',
14
+ kind === EInputTypes.PRIMARY && 'border-primary',
15
+ kind === EInputTypes.ERROR && 'border-error',
16
+
17
+ disabled && 'border-secondary-alt-300 bg-secondary-alt-200',
18
+
19
+ fullWidth && 'max-w-full',
20
+ ]"
19
21
  >
20
- <div class="icon-wrapper">
21
- <slot name="postfix-icon" />
22
+ <div class="icon-wrapper">
23
+ <slot name="prefix-icon" />
24
+ </div>
25
+ <input
26
+ class="bg-transparent border-0 outline-0"
27
+ type="text"
28
+ :placeholder="placeholder"
29
+ :value="modelValue"
30
+ @input="$emit('update:modelValue', ($event.target as HTMLTextAreaElement)?.value)"
31
+ >
32
+ <div class="icon-wrapper">
33
+ <slot name="postfix-icon" />
34
+ </div>
22
35
  </div>
36
+ <ui-typography
37
+ v-if="subLabel"
38
+ :size="ETypographySizes.SM"
39
+ class="mt-sm"
40
+ >
41
+ {{ subLabel }}
42
+ </ui-typography>
23
43
  </div>
24
44
  </template>
25
45
 
26
46
  <script lang="ts" setup>
27
47
  import { EInputTypes } from "./_typings";
48
+ import UiTypography, { ETypographySizes, ETextWeight } from "../ui-typography";
28
49
 
29
50
  defineProps<{
30
51
  placeholder?: string;
@@ -32,14 +53,20 @@
32
53
  disabled?: boolean;
33
54
  fullWidth?: boolean;
34
55
  kind?: EInputTypes;
35
- className?: string;
56
+ heading?: string;
57
+ subLabel?: string;
36
58
  }>();
37
59
 
38
60
  defineEmits(["update:modelValue"]);
39
61
  </script>
40
62
 
41
63
  <style scoped>
42
- .ui-input {
64
+ .ui-input__wrapper {
43
65
  grid-template-columns: auto 1fr auto;
44
66
  }
67
+
68
+ .ui-input__wrapper input::placeholder {
69
+ color: var(--color-secondary-alt-500);
70
+ font-style: italic;
71
+ }
45
72
  </style>
@@ -0,0 +1 @@
1
+ export { default } from "./ui-input-range.vue";
@@ -0,0 +1,44 @@
1
+ import { ref } from "vue";
2
+ import UiInputRange from "./ui-input-range.vue";
3
+ import type { Story } from "@storybook/vue3";
4
+
5
+ export default {
6
+ title: "Components/ui-input-range",
7
+ component: UiInputRange,
8
+ argTypes: {
9
+ min:{
10
+ control: { type: "number" },
11
+ description: "The Element min value",
12
+ },
13
+ max:{
14
+ control: { type: "number" },
15
+ description: "The Element max value",
16
+ },
17
+ step:{
18
+ control: { type: "number" },
19
+ description: "The Element max value",
20
+ }
21
+ },
22
+ args: {
23
+ min: 0,
24
+ max: 100,
25
+ step: 1,
26
+ },
27
+ };
28
+
29
+ type TComponentProps = InstanceType<typeof UiInputRange>["$props"];
30
+
31
+ const Template: Story<TComponentProps> = (args) => ({
32
+ components: { UiInputRange },
33
+ setup() {
34
+ const modelValue = ref(50);
35
+
36
+ return { args, modelValue };
37
+ },
38
+ template: `
39
+ <ui-input-range v-bind="args" v-model:modelValue="modelValue"/>
40
+ <div>{{ modelValue }}</div>
41
+ `,
42
+ });
43
+
44
+ export const Default = Template.bind({});
@@ -0,0 +1,60 @@
1
+ <template>
2
+ <div
3
+ class="ui-input-range relative h-lg"
4
+ >
5
+ <input
6
+ class="appearance-none cursor-pointer bg-transparent w-full h-full"
7
+ type="range"
8
+ :min="min"
9
+ :max="max"
10
+ :value="modelValue"
11
+ :step="step"
12
+ @input="$emit('update:modelValue', ($event.target as HTMLInputElement).value)"
13
+ >
14
+ <div class="ui-input-range__line h-xs w-full bg-secondary-alt rounded absolute left-0 -z-10" />
15
+ <div
16
+ class="ui-input-range__line h-xs bg-primary rounded absolute left-0 -z-10"
17
+ :style="{
18
+ width: getPercentage + '%',
19
+ }"
20
+ />
21
+ </div>
22
+ </template>
23
+
24
+ <script lang="ts" setup>
25
+ import { computed } from "vue";
26
+
27
+ const props = defineProps<{
28
+ modelValue: string | number;
29
+ min: string | number;
30
+ max: string | number;
31
+ step: string | number;
32
+ }>();
33
+
34
+ defineEmits<{
35
+ (e: "update:modelValue", state: string | number): void
36
+ }>();
37
+
38
+ const getPercentage = computed(() => {
39
+ return Math.round(((+props.modelValue - +props.min) / (+props.max - +props.min)) * 100);
40
+ });
41
+ </script>
42
+
43
+ <style scoped>
44
+ input[type="range"]::-webkit-slider-thumb {
45
+ appearance: none;
46
+ background-color: var(--color-primary);
47
+ height: 13px;
48
+ width: 13px;
49
+ border-radius: 50%;
50
+ border: var(--xs) solid var(--color-white);
51
+ box-shadow: 0 0 0 4px var(--color-primary);
52
+ box-sizing: content-box;
53
+ z-index: 1;
54
+ }
55
+
56
+ .ui-input-range__line {
57
+ top: 50%;
58
+ transform: translate3d(0, -50%, 0);
59
+ }
60
+ </style>
@@ -0,0 +1 @@
1
+ export { default } from "./ui-list-item.vue";
@@ -0,0 +1,35 @@
1
+ import UiIconList from "./ui-list-item.vue";
2
+ import type { Story } from "@storybook/vue3";
3
+
4
+ export default {
5
+ title: "Components/ui-list-item",
6
+ component: UiIconList,
7
+ argTypes: {},
8
+ args: {
9
+ slot: "default text",
10
+ }
11
+ };
12
+
13
+ type TComponentProps = InstanceType<typeof UiIconList>["$props"];
14
+
15
+ const Template: Story<TComponentProps> = (args) => ({
16
+ components: { UiIconList },
17
+ setup() {
18
+ return { args };
19
+ },
20
+ template: `
21
+ <ul>
22
+ <ui-icon-list :icon="['far', 'face-smile']">
23
+ {{args.slot}}
24
+ </ui-icon-list>
25
+ <ui-icon-list :icon="['far', 'face-smile']">
26
+ {{args.slot}}
27
+ </ui-icon-list>
28
+ <ui-icon-list :icon="['far', 'face-smile']">
29
+ {{args.slot}}
30
+ </ui-icon-list>
31
+ </ul>
32
+ `
33
+ });
34
+
35
+ export const Default = Template.bind({});
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <li class="ui-icon-list">
3
+ <ui-icon
4
+ v-if="icon"
5
+ class="mr-xs"
6
+ :size="ESize.SM"
7
+ :icon-name="icon"
8
+ />
9
+
10
+ <ui-typography
11
+ is="span"
12
+ :weight="ETextWeight.SEMI_BOLD"
13
+ :size="ETypographySizes.SM"
14
+ >
15
+ <slot />
16
+ </ui-typography>
17
+ </li>
18
+ </template>
19
+
20
+ <script lang="ts" setup>
21
+ import UiIcon, { type TIconName } from "../ui-icon";
22
+ import { ESize } from "../../_types/sizing";
23
+ import UiTypography, { ETypographySizes, ETextWeight } from "../ui-typography";
24
+
25
+ defineProps<{
26
+ icon?: TIconName;
27
+ }>();
28
+
29
+ </script>
@@ -1,5 +1,5 @@
1
1
  import UiRadio from "./ui-radio.vue";
2
- import { Story } from "@storybook/vue3";
2
+ import type { Story } from "@storybook/vue3";
3
3
  import { ref } from "vue";
4
4
  import { EJustify } from "../../_types/align";
5
5
 
@@ -8,10 +8,6 @@ export default {
8
8
  component: UiRadio,
9
9
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
10
10
  argTypes: {
11
- className: {
12
- control: { type: "text" },
13
- description: "The Element classes",
14
- },
15
11
  justify: {
16
12
  control: { type: "select" },
17
13
  options: Object.values(EJustify),
@@ -21,11 +17,16 @@ export default {
21
17
  control: { type: "boolean" },
22
18
  description: "The Element order",
23
19
  },
20
+ disabled: {
21
+ control: { type: "boolean" },
22
+ description: "The Element disabled state",
23
+ },
24
24
  },
25
25
  args: {
26
26
  slot: "Some text",
27
27
  justify: EJustify.START,
28
28
  invertOrder: false,
29
+ disabled: false,
29
30
  },
30
31
  };
31
32
 
@@ -36,7 +37,7 @@ const Template: Story<TComponentProps> = (args) => ({
36
37
  components: { UiRadio },
37
38
  // The story's `args` need to be mapped into the template through the `setup()` method
38
39
  setup() {
39
- const modelValue = ref("value2");
40
+ const modelValue = ref("value4");
40
41
 
41
42
  return { args, modelValue };
42
43
  },
@@ -52,7 +53,7 @@ const Template: Story<TComponentProps> = (args) => ({
52
53
  <ui-radio v-bind="args" name="radio" value="value3" v-model="modelValue">
53
54
  {{args.slot}}
54
55
  </ui-radio>
55
- <ui-radio v-bind="args" name="radio" value="value4" v-model="modelValue">
56
+ <ui-radio v-bind="args" name="radio" disabled value="value4" v-model="modelValue">
56
57
  {{args.slot}}
57
58
  </ui-radio>
58
59
  </div>