bonkers-ui 1.0.55 → 1.0.57

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 (48) hide show
  1. package/.eslintrc.js +15 -0
  2. package/package.json +21 -16
  3. package/src/components/ui-alert/ui-alert.stories.ts +6 -2
  4. package/src/components/ui-badge/ui-badge.stories.ts +12 -4
  5. package/src/components/ui-badge/ui-badge.vue +1 -1
  6. package/src/components/ui-ber-rank/ui-ber-rank.stories.ts +7 -3
  7. package/src/components/ui-ber-rank/ui-ber-rank.vue +2 -2
  8. package/src/components/ui-button/ui-button.stories.ts +38 -13
  9. package/src/components/ui-button/ui-button.vue +14 -14
  10. package/src/components/ui-card-cta/ui-card-cta.stories.ts +12 -4
  11. package/src/components/ui-card-result/ui-card-result.stories.ts +23 -4
  12. package/src/components/ui-card-result/ui-card-result.vue +2 -2
  13. package/src/components/ui-card-simple/ui-card-simple.stories.ts +6 -2
  14. package/src/components/ui-checkbox/ui-checkbox.stories.ts +19 -6
  15. package/src/components/ui-icon/index.ts +1 -1
  16. package/src/components/ui-icon/ui-icon.stories.ts +9 -3
  17. package/src/components/ui-icon-wrapper/ui-icon-wrapper.stories.ts +17 -4
  18. package/src/components/ui-input/ui-input.stories.ts +18 -10
  19. package/src/components/ui-input/ui-input.vue +2 -2
  20. package/src/components/ui-input-range/ui-input-range.stories.ts +19 -8
  21. package/src/components/ui-input-range/ui-input-range.vue +4 -4
  22. package/src/components/ui-list-item/ui-list-item.stories.ts +23 -8
  23. package/src/components/ui-modal/ui-modal.stories.ts +21 -6
  24. package/src/components/ui-notification-badge/ui-notification-badge.stories.ts +9 -3
  25. package/src/components/ui-order-card/ui-order-card.stories.ts +9 -3
  26. package/src/components/ui-order-card/ui-order-card.vue +1 -1
  27. package/src/components/ui-plain-radio/ui-plain-radio.stories.ts +21 -6
  28. package/src/components/ui-progress/ui-progress.stories.ts +9 -3
  29. package/src/components/ui-radio/ui-radio.stories.ts +16 -5
  30. package/src/components/ui-radio-fancy/_typings.ts +2 -1
  31. package/src/components/ui-radio-fancy/ui-radio-fancy.stories.ts +56 -27
  32. package/src/components/ui-radio-fancy/ui-radio-fancy.vue +11 -6
  33. package/src/components/ui-result-card-range/ui-result-card-range.stories.ts +21 -11
  34. package/src/components/ui-ripple/ui-ripple.stories.ts +14 -7
  35. package/src/components/ui-ripple/ui-ripple.vue +1 -1
  36. package/src/components/ui-select/ui-select.stories.ts +11 -3
  37. package/src/components/ui-snackbar/index.ts +1 -1
  38. package/src/components/ui-snackbar/ui-snackbar.stories.ts +6 -2
  39. package/src/components/ui-table/ui-table.stories.ts +6 -4
  40. package/src/components/ui-tabs/ui-tabs.stories.ts +8 -2
  41. package/src/components/ui-toggle/ui-toggle.stories.ts +16 -5
  42. package/src/components/ui-toggle/ui-toggle.vue +2 -1
  43. package/src/components/ui-typography/ui-typography.stories.ts +30 -10
  44. package/src/components/ui-verification-input/ui-verification-input.stories.ts +12 -5
  45. package/src/components/ui-verification-input/ui-verification-input.vue +5 -5
  46. package/src/stories/colors/colors.stories.ts +4 -2
  47. package/src/stories/font-sizes/font-sizes.stories.ts +3 -1
  48. package/src/stories/spacings/spacings.stories.ts +3 -1
package/.eslintrc.js CHANGED
@@ -18,6 +18,7 @@ module.exports = {
18
18
  parser: "vue-eslint-parser",
19
19
  plugins: [
20
20
  "tailwindcss",
21
+ "eslint-plugin-storybook"
21
22
  ],
22
23
  overrides: [
23
24
  {
@@ -88,5 +89,19 @@ module.exports = {
88
89
  ignorePattern: 'd="([\\s\\S]*?)"',
89
90
  }],
90
91
  "tailwindcss/no-custom-classname": "off",
92
+ "object-curly-newline": ["error", {
93
+ "ObjectExpression": {
94
+ "multiline": true,
95
+ "minProperties": 1,
96
+ },
97
+ "ImportDeclaration": {
98
+ "multiline": true,
99
+ "minProperties": 5,
100
+ }
101
+ }],
102
+ "object-property-newline": "error",
103
+ "space-before-blocks": ["error", "always"],
104
+ "keyword-spacing": "error",
105
+ "key-spacing": "error"
91
106
  },
92
107
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bonkers-ui",
3
- "version": "v1.0.55",
3
+ "version": "v1.0.57",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "storybook": "storybook dev -p 6006",
@@ -25,41 +25,46 @@
25
25
  "vue-router": "^4.2.4"
26
26
  },
27
27
  "devDependencies": {
28
- "@storybook/addon-essentials": "^7.0.27",
29
- "@storybook/addon-links": "^7.0.27",
30
- "@storybook/addon-mdx-gfm": "^7.0.27",
31
- "@storybook/vue3": "^7.0.27",
32
- "@storybook/vue3-vite": "^7.0.27",
28
+ "@storybook/addon-essentials": "^7.2.0",
29
+ "@storybook/addon-links": "^7.2.0",
30
+ "@storybook/addon-mdx-gfm": "^7.2.0",
31
+ "@storybook/vue3": "^7.2.0",
32
+ "@storybook/vue3-vite": "^7.2.0",
33
33
  "@typescript-eslint/eslint-plugin": "^5.59.9",
34
34
  "@typescript-eslint/parser": "^5.59.9",
35
35
  "@vitejs/plugin-vue": "^4.2.3",
36
36
  "@vue/eslint-config-typescript": "^11.0.3",
37
- "@vue/test-utils": "^2.4.0",
38
- "eslint": "8.44.0",
39
- "eslint-plugin-storybook": "^0.6.12",
40
- "eslint-plugin-vue": "^9.15.1",
37
+ "@vue/test-utils": "^2.4.1",
38
+ "eslint": "8.46.0",
39
+ "eslint-plugin-storybook": "^0.6.13",
40
+ "eslint-plugin-vue": "^9.16.1",
41
41
  "gh-pages": "^5.0.0",
42
42
  "husky": "4.3.8",
43
43
  "jsdom": "^22.1.0",
44
44
  "lint-staged": "^13.2.3",
45
- "postcss": "^8.4.26",
45
+ "postcss": "^8.4.27",
46
46
  "postcss-html": "^1.4.1",
47
47
  "react": "^18.2.0",
48
48
  "react-dom": "^18.2.0",
49
- "storybook": "^7.0.27",
49
+ "storybook": "^7.2.0",
50
50
  "storybook-tailwind-dark-mode": "^1.0.22",
51
- "stylelint": "^15.10.1",
51
+ "stylelint": "^15.10.2",
52
52
  "stylelint-config-recommended": "^13.0.0",
53
53
  "stylelint-config-recommended-vue": "^1.5.0",
54
54
  "stylelint-config-standard": "^34.0.0",
55
55
  "tailwindcss": "^3.3.3",
56
56
  "ts-node": "^10.9.1",
57
57
  "typescript": "^5.1.6",
58
- "vite": "^4.4.4",
59
- "vitest": "^0.33.0",
58
+ "vite": "^4.4.8",
59
+ "vitest": "^0.34.1",
60
60
  "vue-eslint-parser": "^9.3.1",
61
61
  "vue-loader": "^17.2.2",
62
- "vue-tsc": "^1.8.4"
62
+ "vue-tsc": "^1.8.8"
63
+ },
64
+ "resolutions": {
65
+ "strip-ansi": "^6.0.1",
66
+ "string-width": "^4.2.2",
67
+ "wrap-ansi": "^7.0.0"
63
68
  },
64
69
  "lint-staged": {
65
70
  "*.{ts,tsx,vue}": [
@@ -9,12 +9,16 @@ export default {
9
9
 
10
10
  argTypes: {
11
11
  kind: {
12
- control: { type: "select" },
12
+ control: {
13
+ type: "select"
14
+ },
13
15
  options: Object.values(EAlertTypes),
14
16
  description: "The button kinds",
15
17
  },
16
18
  default: {
17
- control: { type: "text" },
19
+ control: {
20
+ type: "text"
21
+ },
18
22
  }
19
23
  },
20
24
  } satisfies Meta<typeof UiAlert>;
@@ -7,12 +7,16 @@ export default {
7
7
  component: UiBadge,
8
8
  argTypes: {
9
9
  kind: {
10
- control: { type: "select" },
10
+ control: {
11
+ type: "select"
12
+ },
11
13
  options: Object.values(EBadgeKind),
12
14
  description: "The Element kinds",
13
15
  },
14
16
  size: {
15
- control: { type: "select" },
17
+ control: {
18
+ type: "select"
19
+ },
16
20
  options: Object.values(EBadgeSize),
17
21
  description: "The Element size",
18
22
  },
@@ -27,9 +31,13 @@ export default {
27
31
  type TComponentProps = InstanceType<typeof UiBadge>["$props"];
28
32
 
29
33
  const Template: Story<TComponentProps> = (args) => ({
30
- components: { UiBadge },
34
+ components: {
35
+ UiBadge
36
+ },
31
37
  setup() {
32
- return { args };
38
+ return {
39
+ args
40
+ };
33
41
  },
34
42
  template: /*html*/`
35
43
  <ui-badge :icon="['far', 'face-smile']" v-bind="args" class="inline-flex">
@@ -5,7 +5,7 @@
5
5
  <div class="relative z-[1] flex content-center items-center gap-xxs px-xs py-xxs">
6
6
  <ui-icon
7
7
  v-if="icon"
8
- :size="ESize.XS"
8
+ :size="ESize.SM"
9
9
  :icon-name="icon"
10
10
  />
11
11
 
@@ -7,12 +7,16 @@ export default {
7
7
  title: "Components/ui-ber-rank",
8
8
  component: UiBerRank,
9
9
  argTypes: {
10
- rank:{
11
- control: { type: "number" },
10
+ rank: {
11
+ control: {
12
+ type: "number"
13
+ },
12
14
  description: "The Element rank from 0 to 15",
13
15
  },
14
16
  size: {
15
- control: { type: "select" },
17
+ control: {
18
+ type: "select"
19
+ },
16
20
  options: Object.values(EBerSize),
17
21
  description: "The size of the rank",
18
22
  }
@@ -64,7 +64,7 @@
64
64
  import { computed } from "vue";
65
65
  import UiTypography, { ETextWeight, ETypographySizes, ETextTransform } from "../ui-typography";
66
66
  import { EColors } from "../../_types/colors";
67
- import { berRankDictionary, type TBerPropNumber, type TBerPropString, EBerSize }from"./_types";
67
+ import { berRankDictionary, type TBerPropNumber, type TBerPropString, EBerSize } from "./_types";
68
68
 
69
69
  const props = withDefaults(defineProps<{
70
70
  rank: TBerPropNumber | TBerPropString | number; // from 0 to 15
@@ -74,7 +74,7 @@
74
74
  });
75
75
 
76
76
  const textSize = computed(()=>{
77
- switch(props.size) {
77
+ switch (props.size) {
78
78
  case EBerSize.SMALL:
79
79
  return ETypographySizes.SM;
80
80
  case EBerSize.MEDIUM:
@@ -9,32 +9,46 @@ export default {
9
9
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
10
10
  argTypes: {
11
11
  kind: {
12
- control: { type: "select" },
12
+ control: {
13
+ type: "select"
14
+ },
13
15
  options: Object.values(EButtonTypes),
14
16
  description: "The button kinds",
15
17
  },
16
18
  size: {
17
- control: { type: "select" },
19
+ control: {
20
+ type: "select"
21
+ },
18
22
  options: Object.values(EButtonSizes),
19
23
  description: "The button sizes",
20
24
  },
21
25
  fullWidth: {
22
- control: { type: "boolean" },
26
+ control: {
27
+ type: "boolean"
28
+ },
23
29
  description: "The full width size",
24
30
  },
25
31
  disabled: {
26
- control: { type: "boolean" },
32
+ control: {
33
+ type: "boolean"
34
+ },
27
35
  description: "Disabled state",
28
36
  },
29
37
  slot: {
30
- control: { type: "text" },
38
+ control: {
39
+ type: "text"
40
+ },
31
41
  description: "The slot text or component",
32
42
  },
33
- hasPrefix:{
34
- control: { type: "boolean" },
43
+ hasPrefix: {
44
+ control: {
45
+ type: "boolean"
46
+ },
35
47
  },
36
- hasPostfix:{
37
- control: { type: "boolean" },
48
+ hasPostfix: {
49
+ control: {
50
+ type: "boolean"
51
+ },
38
52
  }
39
53
  },
40
54
  args: {
@@ -48,10 +62,16 @@ type TComponentProps = InstanceType<typeof UiButton>["$props"];
48
62
 
49
63
  const Template: Story<TComponentProps> = (args) => ({
50
64
  // Components used in your story `template` are defined in the `components` object
51
- components: { UiButton, UiIcon },
65
+ components: {
66
+ UiButton,
67
+ UiIcon
68
+ },
52
69
  // The story's `args` need to be mapped into the template through the `setup()` method
53
70
  setup() {
54
- return { args, ESize };
71
+ return {
72
+ args,
73
+ ESize
74
+ };
55
75
  },
56
76
  // And then the `args` are bound to your component with `v-bind="args"`
57
77
  template: /*html*/`
@@ -76,10 +96,15 @@ const Template: Story<TComponentProps> = (args) => ({
76
96
  </ui-button>`,
77
97
  });
78
98
  const TemplateAll: Story<TComponentProps> = () => ({
79
- components: { UiButton },
99
+ components: {
100
+ UiButton
101
+ },
80
102
 
81
103
  setup() {
82
- return { EButtonSizes, EButtonTypes };
104
+ return {
105
+ EButtonSizes,
106
+ EButtonTypes
107
+ };
83
108
  },
84
109
 
85
110
  template: /*html*/`
@@ -22,23 +22,23 @@
22
22
  kind === EButtonTypes.ERROR
23
23
  && 'bg-error text-white hover:bg-error-600 active:bg-error-700 disabled:bg-error-300',
24
24
  kind === EButtonTypes.PRIMARY_OVERLAY
25
- && 'border border-primary text-primary hover:border-transparent hover:bg-primary-600'
26
- + 'hover:text-white active:border-transparent active:bg-primary-700'
27
- + 'active:text-white disabled:border-primary-300 disabled:text-primary-300',
25
+ && `border border-primary text-primary hover:border-transparent hover:bg-primary-600
26
+ hover:text-white active:border-transparent active:bg-primary-700
27
+ active:text-white disabled:border-primary-300 disabled:text-primary-300`,
28
28
  kind === EButtonTypes.SECONDARY_OVERLAY
29
- && 'border border-secondary text-secondary hover:border-transparent hover:bg-secondary-600'
30
- + 'hover:text-white active:border-transparent active:bg-secondary-700'
31
- + 'active:text-white disabled:border-secondary-300 disabled:text-secondary-300',
29
+ && `border border-secondary text-secondary hover:border-transparent hover:bg-secondary-600
30
+ hover:text-white active:border-transparent active:bg-secondary-700
31
+ active:text-white disabled:border-secondary-300 disabled:text-secondary-300`,
32
32
  kind === EButtonTypes.WARNING_OVERLAY
33
- && 'border border-warning text-warning hover:border-transparent hover:bg-warning-600'
34
- + 'hover:text-white active:border-transparent active:bg-warning-700'
35
- + 'active:text-white disabled:border-warning-300 disabled:text-warning-300',
33
+ && `border border-warning text-warning hover:border-transparent hover:bg-warning-600
34
+ hover:text-white active:border-transparent active:bg-warning-700
35
+ active:text-white disabled:border-warning-300 disabled:text-warning-300`,
36
36
  kind === EButtonTypes.ERROR_OVERLAY
37
- && 'border border-error text-error hover:border-transparent hover:bg-error-600'
38
- +'hover:text-white active:border-transparent active:bg-error-700'
39
- +'active:text-white disabled:border-error-300 disabled:text-error-300',
40
- kind === EButtonTypes.LINK && 'hover:text-accent-alt-600 active:text-accent-alt-700'
41
- +'disabled:text-accent-alt-300 text-accent-alt',
37
+ && `border border-error text-error hover:border-transparent hover:bg-error-600
38
+ hover:text-white active:border-transparent active:bg-error-700
39
+ active:text-white disabled:border-error-300 disabled:text-error-300`,
40
+ kind === EButtonTypes.LINK && `hover:text-accent-alt-600 active:text-accent-alt-700
41
+ disabled:text-accent-alt-300 text-accent-alt`,
42
42
  (!size || size === EButtonSizes.DEFAULT) && 'px-md py-sm',
43
43
  size === EButtonSizes.SMALL && 'px-md py-xs',
44
44
  size === EButtonSizes.MEDIUM && 'p-sm',
@@ -7,11 +7,15 @@ export default {
7
7
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
8
8
  argTypes: {
9
9
  invertOrder: {
10
- control: { type: "boolean" },
10
+ control: {
11
+ type: "boolean"
12
+ },
11
13
  description: "The Element order",
12
14
  },
13
15
  disabled: {
14
- control: { type: "boolean" },
16
+ control: {
17
+ type: "boolean"
18
+ },
15
19
  description: "The full width size",
16
20
  },
17
21
  },
@@ -25,9 +29,13 @@ export default {
25
29
  type TComponentProps = InstanceType<typeof UiCardCta>["$props"];
26
30
 
27
31
  const Template: Story<TComponentProps> = (args) => ({
28
- components: { UiCardCta },
32
+ components: {
33
+ UiCardCta
34
+ },
29
35
  setup() {
30
- return { args };
36
+ return {
37
+ args
38
+ };
31
39
  },
32
40
  template: /*html*/ `
33
41
  <ui-card-cta v-bind="args" :icon-name="['far', 'face-smile']">
@@ -13,11 +13,15 @@ export default {
13
13
  component: UiCardResult,
14
14
  argTypes: {
15
15
  exclusiveText: {
16
- control: { type: "boolean" },
16
+ control: {
17
+ type: "boolean"
18
+ },
17
19
  description: "Whether to show the exclusive text",
18
20
  },
19
21
  exclusiveTextBottom: {
20
- control: { type: "boolean" },
22
+ control: {
23
+ type: "boolean"
24
+ },
21
25
  description: "Whether to show the exclusive text",
22
26
  },
23
27
  },
@@ -31,9 +35,24 @@ export default {
31
35
  type TComponentProps = InstanceType<typeof UiCardResult>["$props"];
32
36
 
33
37
  const Template: Story<TComponentProps> = (args) => ({
34
- components: { UiCardResult, UiTypography, UiBadge, UiListItem, UiButton, UiIcon },
38
+ components: {
39
+ UiCardResult,
40
+ UiTypography,
41
+ UiBadge,
42
+ UiListItem,
43
+ UiButton,
44
+ UiIcon
45
+ },
35
46
  setup() {
36
- return { args, ETypographySizes, ETextWeight, ETextAlign, EButtonTypes, ESize, EColors };
47
+ return {
48
+ args,
49
+ ETypographySizes,
50
+ ETextWeight,
51
+ ETextAlign,
52
+ EButtonTypes,
53
+ ESize,
54
+ EColors
55
+ };
37
56
  },
38
57
  template:
39
58
  /*html*/`
@@ -11,7 +11,7 @@
11
11
  :size="ETypographySizes.XXS"
12
12
  :kind="EColors.WHITE"
13
13
  :align="ETextAlign.CENTER"
14
- :weight="ETextWeight.BOLD"
14
+ :weight="ETextWeight.SEMI_BOLD"
15
15
  >
16
16
  {{ exclusiveText }}
17
17
  </ui-typography>
@@ -37,7 +37,7 @@
37
37
  line-height
38
38
  class="line-clamp flex-1"
39
39
  :size="ETypographySizes.SM"
40
- :weight="ETextWeight.SEMI_BOLD"
40
+ :weight="ETextWeight.BOLD "
41
41
  :kind="EColors.SECONDARY"
42
42
  >
43
43
  {{ header }}
@@ -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
 
@@ -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: `
@@ -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">
@@ -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
  };
@@ -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";