bonkers-ui 1.0.55 → 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 (46) hide show
  1. package/.eslintrc.js +14 -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/ui-radio-fancy.stories.ts +18 -5
  31. package/src/components/ui-result-card-range/ui-result-card-range.stories.ts +21 -11
  32. package/src/components/ui-ripple/ui-ripple.stories.ts +14 -7
  33. package/src/components/ui-ripple/ui-ripple.vue +1 -1
  34. package/src/components/ui-select/ui-select.stories.ts +11 -3
  35. package/src/components/ui-snackbar/index.ts +1 -1
  36. package/src/components/ui-snackbar/ui-snackbar.stories.ts +6 -2
  37. package/src/components/ui-table/ui-table.stories.ts +6 -4
  38. package/src/components/ui-tabs/ui-tabs.stories.ts +8 -2
  39. package/src/components/ui-toggle/ui-toggle.stories.ts +16 -5
  40. package/src/components/ui-toggle/ui-toggle.vue +2 -1
  41. package/src/components/ui-typography/ui-typography.stories.ts +30 -10
  42. package/src/components/ui-verification-input/ui-verification-input.stories.ts +12 -5
  43. package/src/components/ui-verification-input/ui-verification-input.vue +5 -5
  44. package/src/stories/colors/colors.stories.ts +4 -2
  45. package/src/stories/font-sizes/font-sizes.stories.ts +3 -1
  46. package/src/stories/spacings/spacings.stories.ts +3 -1
@@ -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'}">
@@ -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
 
@@ -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"
@@ -8,7 +8,9 @@ export default {
8
8
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
9
9
  argTypes: {
10
10
  origin: {
11
- control: { type: "select" },
11
+ control: {
12
+ type: "select"
13
+ },
12
14
  options: Object.values(EBadgeOrigin),
13
15
  description: "The Element origin",
14
16
  }
@@ -22,9 +24,13 @@ export default {
22
24
  type TComponentProps = InstanceType<typeof UiNotificationBadge>["$props"];
23
25
 
24
26
  const Template: Story<TComponentProps> = (args) => ({
25
- components: { UiNotificationBadge },
27
+ components: {
28
+ UiNotificationBadge
29
+ },
26
30
  setup() {
27
- return { args };
31
+ return {
32
+ args
33
+ };
28
34
  },
29
35
  template: /*html*/`
30
36
  <div class="relative rounded-full bg-primary w-lg h-lg">
@@ -8,7 +8,9 @@ export default {
8
8
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
9
9
  argTypes: {
10
10
  kind: {
11
- control: { type: "select" },
11
+ control: {
12
+ type: "select"
13
+ },
12
14
  options: Object.values(EOrderCardTypes),
13
15
  description: "The Element kinds",
14
16
  },
@@ -23,10 +25,14 @@ export default {
23
25
  type TComponentProps = InstanceType<typeof UiOrderCard>["$props"];
24
26
 
25
27
  const Template: Story<TComponentProps> = (args) => ({
26
- components: { UiOrderCard },
28
+ components: {
29
+ UiOrderCard
30
+ },
27
31
  setup() {
28
32
 
29
- return { args };
33
+ return {
34
+ args
35
+ };
30
36
  },
31
37
 
32
38
  template: /*html*/`
@@ -74,7 +74,7 @@
74
74
  });
75
75
 
76
76
  const pickKind = computed(()=>{
77
- switch(props.kind){
77
+ switch (props.kind) {
78
78
  case EOrderCardTypes.WARNING: return EColors.WARNING_700;
79
79
  default: return EColors.PRIMARY_700;
80
80
  }
@@ -6,17 +6,25 @@ import { ref } from "vue";
6
6
 
7
7
  export default {
8
8
  title: "Components/ui-plain-radio",
9
- component: UiPlainRadio, ETypographySizes, EColors,
9
+ component: UiPlainRadio,
10
+ ETypographySizes,
11
+ EColors,
10
12
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
11
13
  argTypes: {
12
14
  disabled: {
13
- control: { type: "boolean" },
15
+ control: {
16
+ type: "boolean"
17
+ },
14
18
  },
15
19
  header: {
16
- control: { type: "text" },
20
+ control: {
21
+ type: "text"
22
+ },
17
23
  },
18
24
  subHeader: {
19
- control: { type: "text" },
25
+ control: {
26
+ type: "text"
27
+ },
20
28
  }
21
29
  },
22
30
  args: {
@@ -29,12 +37,19 @@ export default {
29
37
  type TComponentProps = InstanceType<typeof UiPlainRadio>["$props"];
30
38
 
31
39
  const Template: Story<TComponentProps> = (args) => ({
32
- components: { UiPlainRadio },
40
+ components: {
41
+ UiPlainRadio
42
+ },
33
43
 
34
44
  setup() {
35
45
  const modelValue = ref("1");
36
46
 
37
- return { modelValue, args, ETypographySizes, EColors };
47
+ return {
48
+ modelValue,
49
+ args,
50
+ ETypographySizes,
51
+ EColors
52
+ };
38
53
 
39
54
  },
40
55
 
@@ -12,15 +12,21 @@ export default {
12
12
  // description: "The button kinds",
13
13
  // },
14
14
  min: {
15
- control: { type: "number" },
15
+ control: {
16
+ type: "number"
17
+ },
16
18
  description: "The minimum value",
17
19
  },
18
20
  max: {
19
- control: { type: "number" },
21
+ control: {
22
+ type: "number"
23
+ },
20
24
  description: "The maximum value",
21
25
  },
22
26
  current: {
23
- control: { type: "number" },
27
+ control: {
28
+ type: "number"
29
+ },
24
30
  }
25
31
  },
26
32
  } satisfies Meta<typeof UiProgress>;
@@ -9,16 +9,22 @@ 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
  },
@@ -34,12 +40,17 @@ type TComponentProps = InstanceType<typeof UiRadio>["$props"];
34
40
 
35
41
  const Template: Story<TComponentProps> = (args) => ({
36
42
  // Components used in your story `template` are defined in the `components` object
37
- components: { UiRadio },
43
+ components: {
44
+ UiRadio
45
+ },
38
46
  // The story's `args` need to be mapped into the template through the `setup()` method
39
47
  setup() {
40
48
  const modelValue = ref("value4");
41
49
 
42
- return { args, modelValue };
50
+ return {
51
+ args,
52
+ modelValue
53
+ };
43
54
  },
44
55
  // And then the `args` are bound to your component with `v-bind="args"`
45
56
  template: `
@@ -10,15 +10,21 @@ export default {
10
10
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
11
11
  argTypes: {
12
12
  invertOrder: {
13
- control: { type: "boolean" },
13
+ control: {
14
+ type: "boolean"
15
+ },
14
16
  description: "The Element order",
15
17
  },
16
18
  disabled: {
17
- control: { type: "boolean" },
19
+ control: {
20
+ type: "boolean"
21
+ },
18
22
  description: "The full width size",
19
23
  },
20
24
  radioSize: {
21
- control: { type: "select" },
25
+ control: {
26
+ type: "select"
27
+ },
22
28
  options: Object.values(ERadioSizes),
23
29
  description: "The radio kinds",
24
30
  },
@@ -34,11 +40,18 @@ export default {
34
40
  type TComponentProps = InstanceType<typeof UiRadioFancy>["$props"];
35
41
 
36
42
  const Template: Story<TComponentProps> = (args) => ({
37
- components: { UiRadioFancy },
43
+ components: {
44
+ UiRadioFancy
45
+ },
38
46
  setup() {
39
47
  const modelValue = ref("1");
40
48
 
41
- return { modelValue, EIconType, args, ERadioSizes };
49
+ return {
50
+ modelValue,
51
+ EIconType,
52
+ args,
53
+ ERadioSizes
54
+ };
42
55
  },
43
56
  template: /*html*/`
44
57
  <div class="grid gap-sm" :style="{'grid-template-columns': 'repeat(auto-fit, minmax(160px, 1fr))'}">
@@ -5,11 +5,15 @@ export default {
5
5
  component: UiResultCardRange,
6
6
  argTypes: {
7
7
  slot: {
8
- control: { type: "text" },
8
+ control: {
9
+ type: "text"
10
+ },
9
11
  description: "The slot text or component",
10
12
  },
11
13
  title: {
12
- control: { type: "text" },
14
+ control: {
15
+ type: "text"
16
+ },
13
17
  description: "The title text",
14
18
  },
15
19
  },
@@ -20,11 +24,15 @@ export default {
20
24
  };
21
25
 
22
26
  const Template = (args) => ({
23
- components: { UiResultCardRange },
27
+ components: {
28
+ UiResultCardRange
29
+ },
24
30
  setup() {
25
- return { args };
31
+ return {
32
+ args
33
+ };
26
34
  },
27
- template:/*html*/`
35
+ template: /*html*/`
28
36
  <ui-result-card-range :icon-name="['far', 'face-smile']" :title="args.title">
29
37
  {{args.slot}}
30
38
  </ui-result-card-range>
@@ -32,11 +40,15 @@ const Template = (args) => ({
32
40
  });
33
41
 
34
42
  const TemplateAll = (args) => ({
35
- components: { UiResultCardRange },
43
+ components: {
44
+ UiResultCardRange
45
+ },
36
46
  setup() {
37
- return { args };
47
+ return {
48
+ args
49
+ };
38
50
  },
39
- template:/*html*/`
51
+ template: /*html*/`
40
52
  <div class="ui-result-card-range grid gap-sm w-full">
41
53
 
42
54
  <ui-result-card-range style="grid-column: 1 / 1"
@@ -61,8 +73,6 @@ const TemplateAll = (args) => ({
61
73
  `,
62
74
  });
63
75
 
64
- export const singleCard = Template.bind({
65
-
66
- });
76
+ export const SingleCard = Template.bind({});
67
77
 
68
78
  export const FullCard = TemplateAll.bind({});
@@ -9,17 +9,18 @@ export default {
9
9
  component: UiRipple,
10
10
  // More on argTypes: https://storybook.js.org/docs/vue/api/argtypes
11
11
  argTypes: {},
12
- args: {
13
- // slot: "Some text",
14
- },
15
12
  };
16
13
 
17
14
  type TComponentProps = InstanceType<typeof UiRipple>["$props"];
18
15
 
19
16
  const Template: Story<TComponentProps> = (args) => ({
20
- components: { UiRipple },
17
+ components: {
18
+ UiRipple
19
+ },
21
20
  setup() {
22
- return { args };
21
+ return {
22
+ args
23
+ };
23
24
  },
24
25
  template: `
25
26
  <div
@@ -34,9 +35,15 @@ const Template: Story<TComponentProps> = (args) => ({
34
35
  `,
35
36
  });
36
37
  const Template2: Story<TComponentProps> = (args) => ({
37
- components: { UiRipple, UiButton, UiTypography },
38
+ components: {
39
+ UiRipple,
40
+ UiButton,
41
+ UiTypography
42
+ },
38
43
  setup() {
39
- return { args };
44
+ return {
45
+ args
46
+ };
40
47
  },
41
48
  template: `
42
49
  <div class="flex">
@@ -36,7 +36,7 @@
36
36
  const inputsRefs = ref<VNodeRef>();
37
37
 
38
38
  const animateRipple = (e:MouseEvent)=> {
39
- if(tiBtn.value){
39
+ if (tiBtn.value) {
40
40
  const pos = tiBtn.value.getBoundingClientRect();
41
41
 
42
42
  ripples.value.push({
@@ -7,7 +7,9 @@ export default {
7
7
  component: UiSelect,
8
8
  argTypes: {
9
9
  disabled: {
10
- control: { type: "boolean" },
10
+ control: {
11
+ type: "boolean"
12
+ },
11
13
  description: "The Element disabled state",
12
14
  }
13
15
  },
@@ -19,11 +21,17 @@ export default {
19
21
  type TComponentProps = InstanceType<typeof UiSelect>["$props"];
20
22
 
21
23
  const Template: Story<TComponentProps> = (args) => ({
22
- components: { UiSelect },
24
+ components: {
25
+ UiSelect
26
+ },
23
27
  setup() {
24
28
  const list = ["Option 1", "Option 2", "Option 3"];
25
29
  const valueModel = ref(list[0]);
26
- return { args, valueModel, list };
30
+ return {
31
+ args,
32
+ valueModel,
33
+ list
34
+ };
27
35
  },
28
36
  template: /*html*/`
29
37
  <ui-select v-bind="args" v-model="valueModel" heading="Heading" subLabel="Sub Label">
@@ -1,2 +1,2 @@
1
1
  export { default } from "./ui-snackbar.vue";
2
- export { ESnackbarTypes }from "./_types";
2
+ export { ESnackbarTypes } from "./_types";
@@ -8,12 +8,16 @@ export default {
8
8
 
9
9
  argTypes: {
10
10
  kind: {
11
- control: { type: "select" },
11
+ control: {
12
+ type: "select"
13
+ },
12
14
  options: Object.values(ESnackbarTypes),
13
15
  description: "The button kinds",
14
16
  },
15
17
  title: {
16
- controls: { type: "text" },
18
+ controls: {
19
+ type: "text"
20
+ },
17
21
  },
18
22
  }
19
23
  } satisfies Meta<typeof UiSnackbar>;
@@ -8,7 +8,9 @@ export default {
8
8
  title: "Components/ui-table",
9
9
  argTypes: {
10
10
  kind: {
11
- control: { type: "select" },
11
+ control: {
12
+ type: "select"
13
+ },
12
14
  options: Object.values(ETableKind),
13
15
  description: "The row kind",
14
16
  },
@@ -21,14 +23,14 @@ export default {
21
23
  type MyComponentProps = InstanceType<typeof UiTableRow>["$props"];
22
24
 
23
25
  const Template = (args: MyComponentProps) => ({
24
- components:{
26
+ components: {
25
27
  // UiTable,
26
28
  UiTableRow,
27
29
  UiTableCell,
28
30
  UiTypography,
29
31
  UiTable
30
32
  },
31
- setup(){
33
+ setup() {
32
34
 
33
35
  const defaultList = {
34
36
  text1: "some text",
@@ -48,7 +50,7 @@ const Template = (args: MyComponentProps) => ({
48
50
  }
49
51
  ];
50
52
 
51
- return{
53
+ return {
52
54
  ETextWeight,
53
55
  ETypographySizes,
54
56
  args,
@@ -11,11 +11,17 @@ export default {
11
11
  type TComponentProps = InstanceType<typeof UiTabs>["$props"];
12
12
 
13
13
  const Template: Story<TComponentProps> = (args) => ({
14
- components: { UiTabs },
14
+ components: {
15
+ UiTabs
16
+ },
15
17
  setup() {
16
18
  const value = ref("Tab1");
17
19
  const value2 = ref("Tab1");
18
- return { args, value, value2 };
20
+ return {
21
+ args,
22
+ value,
23
+ value2
24
+ };
19
25
  },
20
26
  template: `
21
27
  <ui-tabs v-bind="args" :tabs="['Tab1', 'Tab2', 'Tab3']" v-model:modelValue="value" />