sprintify-ui 0.6.46 → 0.6.48

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.
@@ -70,9 +70,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
70
70
  }, {
71
71
  size: "xs" | "sm" | "md";
72
72
  options: NormalizedOption[];
73
+ loading: boolean;
73
74
  selected: NormalizedOption | NormalizedOption[] | null | undefined;
74
75
  keywords: string;
75
- loading: boolean;
76
76
  loadingBottom: boolean;
77
77
  twDrawer: string;
78
78
  }, {}>, {
@@ -29,14 +29,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
29
29
  type: import("vue").PropType<boolean>;
30
30
  default: boolean;
31
31
  };
32
- loading: {
33
- type: import("vue").PropType<boolean>;
34
- default: boolean;
35
- };
36
32
  as: {
37
33
  type: import("vue").PropType<string>;
38
34
  default: string;
39
35
  };
36
+ loading: {
37
+ type: import("vue").PropType<boolean>;
38
+ default: boolean;
39
+ };
40
40
  iconPosition: {
41
41
  type: import("vue").PropType<"start" | "end">;
42
42
  default: string;
@@ -72,14 +72,14 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
72
72
  type: import("vue").PropType<boolean>;
73
73
  default: boolean;
74
74
  };
75
- loading: {
76
- type: import("vue").PropType<boolean>;
77
- default: boolean;
78
- };
79
75
  as: {
80
76
  type: import("vue").PropType<string>;
81
77
  default: string;
82
78
  };
79
+ loading: {
80
+ type: import("vue").PropType<boolean>;
81
+ default: boolean;
82
+ };
83
83
  iconPosition: {
84
84
  type: import("vue").PropType<"start" | "end">;
85
85
  default: string;
@@ -94,8 +94,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
94
94
  icon: string;
95
95
  size: "xs" | "sm" | "md" | "lg" | "xl";
96
96
  disabled: boolean;
97
- loading: boolean;
98
97
  as: string;
98
+ loading: boolean;
99
99
  iconPosition: "start" | "end";
100
100
  }, {}>, {
101
101
  default?(_: {}): any;
@@ -33,8 +33,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
33
33
  type: StringConstructor;
34
34
  };
35
35
  }>>, {
36
- tooltip: boolean;
37
36
  as: string;
37
+ tooltip: boolean;
38
38
  timeZone: string;
39
39
  }, {}>, {
40
40
  default?(_: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.6.46",
3
+ "version": "0.6.48",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -4,7 +4,7 @@
4
4
  :style="colorStyle"
5
5
  >
6
6
  <div
7
- v-if="showIcon"
7
+ v-if="showIcon && iconInternal"
8
8
  class="shrink-0"
9
9
  >
10
10
  <BaseIcon
@@ -27,7 +27,7 @@ const Template = (args) => ({
27
27
 
28
28
  export const Demo = Template.bind({});
29
29
  Demo.args = {
30
- count: 355,
30
+ count: 0.01,
31
31
  maxDigit: 2,
32
32
  };
33
33
 
@@ -34,12 +34,13 @@ const props = defineProps({
34
34
  const countLabel = computed((): string => {
35
35
  const realMaxDigit = Math.max(1, props.maxDigit);
36
36
 
37
- const countString = props.count + '';
37
+ // Should work with 0.01
38
+ const countString = Math.round(props.count) + '';
38
39
  const numberOfDigit = countString.length;
39
40
  if (numberOfDigit > realMaxDigit) {
40
41
  return padStart('+', realMaxDigit + 1, '9');
41
42
  }
42
- return countString;
43
+ return props.count + '';
43
44
  });
44
45
 
45
46
  const sizeClass = computed((): string => {
@@ -1,5 +1,7 @@
1
1
  import BaseDialog from './BaseDialog.vue';
2
2
 
3
+ const colors = ['info', 'success', 'warning', 'danger'];
4
+
3
5
  export default {
4
6
  title: 'Components/BaseDialog',
5
7
  component: BaseDialog,
@@ -10,6 +12,7 @@ export default {
10
12
  },
11
13
  },
12
14
  args: {
15
+ color: 'info',
13
16
  message:
14
17
  'Nisi Lorem sunt amet aliqua dolor ullamco deserunt enim irure non ad. Excepteur culpa consectetur dolore culpa sunt aliquip proident quis.',
15
18
  },
@@ -29,23 +32,23 @@ const Template = (args) => ({
29
32
  export const Demo = Template.bind({});
30
33
  Demo.args = {
31
34
  title: 'Be careful',
32
- color: 'warning',
33
- };
34
-
35
- export const Success = Template.bind({});
36
- Success.args = {
37
- title: 'Success',
38
- color: 'success',
39
35
  };
40
36
 
41
- export const Danger = Template.bind({});
42
- Danger.args = {
43
- title: 'Error',
44
- color: 'danger',
45
- };
37
+ const ColorsTemplate = (args) => ({
38
+ components: { BaseDialog },
39
+ setup() {
40
+ return { args, colors };
41
+ },
42
+ template: `
43
+ <div v-for="color in colors" :key="color" class="mb-1">
44
+ <p class="text-xs text-slate-600 leading-tight">{{ color }}</p>
45
+ <BaseDialog v-bind="args" :color="color">
46
+ </BaseDialog>
47
+ </div>
48
+ `,
49
+ });
46
50
 
47
- export const Info = Template.bind({});
48
- Info.args = {
49
- title: 'Information',
50
- color: 'info',
51
+ export const Colors = ColorsTemplate.bind({});
52
+ Colors.args = {
53
+ title: 'Be careful',
51
54
  };
@@ -1,8 +1,8 @@
1
1
  <template>
2
2
  <div
3
- class="relative transform overflow-hidden rounded-lg bg-white ring-1 ring-black ring-opacity-10 p-4 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"
3
+ class="relative transform overflow-hidden rounded-lg bg-white ring-1 ring-black ring-opacity-10 p-4 text-left shadow-xl transition-all || sm:my-8 sm:w-full sm:max-w-lg"
4
4
  >
5
- <div class="sm:flex sm:items-start">
5
+ <div class="sm:flex sm:items-start || sm:gap-4">
6
6
  <div
7
7
  class="mx-auto flex h-12 w-12 flex-shrink-0 items-center justify-center rounded-full sm:mx-0 sm:h-10 sm:w-10"
8
8
  :class="{
@@ -33,7 +33,7 @@
33
33
  icon="heroicons:information-circle-20-solid"
34
34
  />
35
35
  </div>
36
- <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
36
+ <div class="mt-3 text-center || sm:mt-0 sm:text-left">
37
37
  <slot>
38
38
  <h3
39
39
  id="modal-title"
@@ -49,28 +49,25 @@
49
49
  </slot>
50
50
  </div>
51
51
  </div>
52
- <div class="mt-5 sm:mt-4 sm:flex sm:flex-row-reverse">
53
- <button
52
+ <div class="mt-5 || sm:mt-4 sm:flex sm:flex-row-reverse">
53
+ <BaseButton
54
54
  ref="confirm"
55
55
  type="button"
56
- class="btn btn-sm mb-2 w-full sm:mb-0 sm:w-auto"
57
- :class="{
58
- 'btn-primary': color == 'info',
59
- 'btn-danger': color == 'danger',
60
- 'btn-warning': color == 'warning',
61
- 'btn-success': color == 'success',
62
- }"
56
+ size="sm"
57
+ class="mb-2 w-full sm:mb-0 sm:w-auto"
58
+ :color="color"
63
59
  @click="$emit('confirm')"
64
60
  >
65
61
  {{ confirmText ?? t('sui.confirm') }}
66
- </button>
67
- <button
62
+ </BaseButton>
63
+ <BaseButton
68
64
  type="button"
69
- class="btn btn-sm w-full sm:mr-2 sm:w-auto"
65
+ size="sm"
66
+ class="w-full sm:mr-2 sm:w-auto"
70
67
  @click="$emit('cancel')"
71
68
  >
72
69
  {{ cancelText ?? t('sui.cancel') }}
73
- </button>
70
+ </BaseButton>
74
71
  </div>
75
72
  </div>
76
73
  </template>
@@ -79,6 +76,7 @@
79
76
  import { PropType } from 'vue';
80
77
  import { Icon as BaseIcon } from '@iconify/vue';
81
78
  import { t } from '@/i18n';
79
+ import BaseButton from './BaseButton.vue';
82
80
 
83
81
  defineProps({
84
82
  color: {