sprintify-ui 0.10.75 → 0.10.76

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.
@@ -494,8 +494,8 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
494
494
  type: PropType<SelectConfiguration | undefined>;
495
495
  };
496
496
  icon: {
497
- default: string;
498
- type: StringConstructor;
497
+ default(): string;
498
+ type: PropType<string>;
499
499
  };
500
500
  twInput: {
501
501
  default: undefined;
@@ -638,8 +638,8 @@ declare const __VLS_self: import("vue").DefineComponent<import("vue").ExtractPro
638
638
  type: PropType<SelectConfiguration | undefined>;
639
639
  };
640
640
  icon: {
641
- default: string;
642
- type: StringConstructor;
641
+ default(): string;
642
+ type: PropType<string>;
643
643
  };
644
644
  twInput: {
645
645
  default: undefined;
@@ -773,8 +773,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
773
773
  type: PropType<SelectConfiguration | undefined>;
774
774
  };
775
775
  icon: {
776
- default: string;
777
- type: StringConstructor;
776
+ default(): string;
777
+ type: PropType<string>;
778
778
  };
779
779
  twInput: {
780
780
  default: undefined;
@@ -890,8 +890,8 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
890
890
  type: PropType<SelectConfiguration | undefined>;
891
891
  };
892
892
  icon: {
893
- default: string;
894
- type: StringConstructor;
893
+ default(): string;
894
+ type: PropType<string>;
895
895
  };
896
896
  twInput: {
897
897
  default: undefined;
@@ -172,8 +172,8 @@ declare const autocomplete: import("vue").Ref<({
172
172
  type: PropType<SelectConfiguration | undefined>;
173
173
  };
174
174
  icon: {
175
- default: string;
176
- type: StringConstructor;
175
+ default(): string;
176
+ type: PropType<string>;
177
177
  };
178
178
  twInput: {
179
179
  default: undefined;
@@ -361,8 +361,8 @@ declare const autocomplete: import("vue").Ref<({
361
361
  type: PropType<SelectConfiguration | undefined>;
362
362
  };
363
363
  icon: {
364
- default: string;
365
- type: StringConstructor;
364
+ default(): string;
365
+ type: PropType<string>;
366
366
  };
367
367
  twInput: {
368
368
  default: undefined;
@@ -580,8 +580,8 @@ declare const autocomplete: import("vue").Ref<({
580
580
  type: PropType<SelectConfiguration | undefined>;
581
581
  };
582
582
  icon: {
583
- default: string;
584
- type: StringConstructor;
583
+ default(): string;
584
+ type: PropType<string>;
585
585
  };
586
586
  twInput: {
587
587
  default: undefined;
@@ -769,8 +769,8 @@ declare const autocomplete: import("vue").Ref<({
769
769
  type: PropType<SelectConfiguration | undefined>;
770
770
  };
771
771
  icon: {
772
- default: string;
773
- type: StringConstructor;
772
+ default(): string;
773
+ type: PropType<string>;
774
774
  };
775
775
  twInput: {
776
776
  default: undefined;
@@ -166,8 +166,8 @@ declare const autocomplete: import("vue").Ref<({
166
166
  type: PropType<SelectConfiguration | undefined>;
167
167
  };
168
168
  icon: {
169
- default: string;
170
- type: StringConstructor;
169
+ default(): string;
170
+ type: PropType<string>;
171
171
  };
172
172
  twInput: {
173
173
  default: undefined;
@@ -355,8 +355,8 @@ declare const autocomplete: import("vue").Ref<({
355
355
  type: PropType<SelectConfiguration | undefined>;
356
356
  };
357
357
  icon: {
358
- default: string;
359
- type: StringConstructor;
358
+ default(): string;
359
+ type: PropType<string>;
360
360
  };
361
361
  twInput: {
362
362
  default: undefined;
@@ -574,8 +574,8 @@ declare const autocomplete: import("vue").Ref<({
574
574
  type: PropType<SelectConfiguration | undefined>;
575
575
  };
576
576
  icon: {
577
- default: string;
578
- type: StringConstructor;
577
+ default(): string;
578
+ type: PropType<string>;
579
579
  };
580
580
  twInput: {
581
581
  default: undefined;
@@ -763,8 +763,8 @@ declare const autocomplete: import("vue").Ref<({
763
763
  type: PropType<SelectConfiguration | undefined>;
764
764
  };
765
765
  icon: {
766
- default: string;
767
- type: StringConstructor;
766
+ default(): string;
767
+ type: PropType<string>;
768
768
  };
769
769
  twInput: {
770
770
  default: undefined;
@@ -1,5 +1,6 @@
1
1
  type __VLS_Props = {
2
2
  size?: 'xs' | 'sm' | 'md' | 'lg';
3
+ orientation?: 'left' | 'right';
3
4
  };
4
5
  declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
5
6
  declare var __VLS_1: {};
@@ -8,9 +9,11 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
8
9
  }>;
9
10
  declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
11
  size: "xs" | "sm" | "md" | "lg";
12
+ orientation: "left" | "right";
11
13
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
14
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
15
  size: "xs" | "sm" | "md" | "lg";
16
+ orientation: "left" | "right";
14
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
18
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
16
19
  export default _default;
@@ -4,6 +4,7 @@ type __VLS_Props = {
4
4
  disabled?: boolean;
5
5
  activeStrategy?: 'default' | 'exact';
6
6
  };
7
+ declare const orientation: import("vue").Ref<"left" | "right", "left" | "right">;
7
8
  declare function onClick(navigate: () => Promise<void | NavigationFailure>): Promise<void | NavigationFailure> | undefined;
8
9
  declare function isActiveInternal(isActive: boolean, isExactActive: boolean): boolean;
9
10
  declare const sizeClassOuter: import("vue").ComputedRef<"" | "py-0.5" | "py-1" | "py-2">;
@@ -16,6 +17,7 @@ type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$
16
17
  default?: (props: typeof __VLS_6) => any;
17
18
  }>;
18
19
  declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
20
+ orientation: typeof orientation;
19
21
  onClick: typeof onClick;
20
22
  isActiveInternal: typeof isActiveInternal;
21
23
  sizeClassOuter: typeof sizeClassOuter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.10.75",
3
+ "version": "0.10.76",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rimraf dist && vue-tsc && vite build",
@@ -226,8 +226,10 @@ const props = defineProps({
226
226
  type: Object as PropType<SelectConfiguration | undefined>,
227
227
  },
228
228
  icon: {
229
- default: 'heroicons:magnifying-glass-solid',
230
- type: String,
229
+ default() {
230
+ return 'heroicons:magnifying-glass-solid';
231
+ },
232
+ type: [String] as PropType<string>,
231
233
  },
232
234
  twInput: {
233
235
  default: undefined,
@@ -8,7 +8,16 @@ import BaseCounter from "./BaseCounter.vue";
8
8
  export default {
9
9
  title: "Navigation/BaseSideNavigation",
10
10
  component: BaseSideNavigation,
11
- args: {},
11
+ argTypes: {
12
+ size: {
13
+ control: { type: "select" },
14
+ options: ["xs", "sm", "md", "lg"],
15
+ },
16
+ orientation: {
17
+ control: { type: "select" },
18
+ options: ["left", "right"],
19
+ },
20
+ },
12
21
  };
13
22
 
14
23
  const Template = (args) => ({
@@ -3,7 +3,10 @@
3
3
  aria-label="Sidebar"
4
4
  class="relative"
5
5
  >
6
- <div class="absolute bottom-0 left-0 h-full w-px bg-slate-300" />
6
+ <div
7
+ class="absolute bottom-0 h-full w-px bg-slate-300"
8
+ :class="[orientation == 'left' ? 'left-0' : 'right-0']"
9
+ />
7
10
  <div
8
11
  class="relative overflow-x-auto overflow-y-hidden"
9
12
  data-scroll-lock-scrollable
@@ -19,9 +22,11 @@
19
22
  const props = withDefaults(
20
23
  defineProps<{
21
24
  size?: 'xs' | 'sm' | 'md' | 'lg';
25
+ orientation?: 'left' | 'right';
22
26
  }>(),
23
27
  {
24
28
  size: 'md',
29
+ orientation: 'left',
25
30
  }
26
31
  );
27
32
 
@@ -29,4 +34,10 @@ provide(
29
34
  'sideNavigation:size',
30
35
  computed(() => props.size)
31
36
  );
37
+
38
+ provide(
39
+ 'sideNavigation:orientation',
40
+ computed(() => props.orientation)
41
+ );
42
+
32
43
  </script>
@@ -22,8 +22,9 @@
22
22
  :class="[sizeClassInner]"
23
23
  >
24
24
  <div
25
- class="absolute left-0 top-0 h-full"
25
+ class="absolute top-0 h-full"
26
26
  :class="[
27
+ orientation == 'left' ? 'left-0' : 'right-0',
27
28
  isActiveInternal(isActive, isExactActive)
28
29
  ? 'w-[2px] bg-primary-600'
29
30
  : 'group-hover:w-px group-hover:bg-slate-700',
@@ -55,6 +56,11 @@ const size = inject(
55
56
  ref<'xs' | 'sm' | 'md' | 'lg'>('md')
56
57
  );
57
58
 
59
+ const orientation = inject(
60
+ 'sideNavigation:orientation',
61
+ ref<'left' | 'right'>('left')
62
+ );
63
+
58
64
  function onClick(navigate: () => Promise<void | NavigationFailure>) {
59
65
  if (props.disabled) {
60
66
  return;