@autoafleveren/ui 0.1.1 → 0.1.2

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.
@@ -30,6 +30,13 @@ if (variableIndex > -1) {
30
30
  });
31
31
  }
32
32
 
33
+ const testOverrideRules = {
34
+ '@typescript-eslint/explicit-function-return-type': 'off',
35
+ '@typescript-eslint/explicit-module-boundary-types': 'off',
36
+ '@programic/typescript-explicit-module-boundary-types': 'off',
37
+ '@programic/typescript-explicit-function-return-type': 'off',
38
+ };
39
+
33
40
  /** @type {import('eslint').Config} */
34
41
  module.exports = {
35
42
  root: true,
@@ -53,6 +60,42 @@ module.exports = {
53
60
  tailwindcss: {
54
61
  config: tailwindConfigPath,
55
62
  },
63
+ programic: {
64
+ vue: {
65
+ extendedComputedProperties: {
66
+ vueuse: [
67
+ 'computedAsync',
68
+ 'computedEager',
69
+ 'computedInject',
70
+ 'computedWithControl',
71
+ 'reactiveComputed',
72
+ ],
73
+ },
74
+ extendedWatchers: {
75
+ vueuse: [
76
+ 'until',
77
+ 'watchArray',
78
+ 'watchAtMost',
79
+ 'watchDebounced',
80
+ 'watchDeep',
81
+ 'watchIgnorable',
82
+ 'watchImmediate',
83
+ 'watchOnce',
84
+ 'watchPausable',
85
+ 'watchThrottled',
86
+ 'watchTriggerable',
87
+ 'watchWithFilter',
88
+ 'whenever',
89
+ ],
90
+ },
91
+ extendedHooks: {
92
+ 'vue-router': [
93
+ 'onBeforeRouteLeave',
94
+ 'onBeforeRouteUpdate',
95
+ ],
96
+ },
97
+ },
98
+ },
56
99
  },
57
100
  parserOptions: {
58
101
  ecmaVersion: 2020,
@@ -66,6 +109,7 @@ module.exports = {
66
109
  files: ['**/*.spec.ts'],
67
110
  rules: {
68
111
  ...typescriptOverride.rules,
112
+ ...testOverrideRules,
69
113
  'no-promise-executor-return': 'off',
70
114
  '@typescript-eslint/naming-convention': namingConventionsTestFileRule,
71
115
  'unicorn/prevent-abbreviations': ['error', {
@@ -78,6 +122,7 @@ module.exports = {
78
122
  ],
79
123
  }],
80
124
  'vue/one-component-per-file': 'off',
125
+ '@typescript-eslint/no-unsafe-member-access': 'off',
81
126
  'vitest/consistent-test-it': 'error',
82
127
  'vitest/no-alias-methods': 'error',
83
128
  'vitest/no-conditional-expect': 'error',
@@ -112,8 +157,24 @@ module.exports = {
112
157
  }],
113
158
  },
114
159
  },
160
+ {
161
+ ...defaultTypescriptOverride,
162
+ files: ['**/__mocks__/*.ts', '**/mocks/**/*.ts'],
163
+ rules: {
164
+ ...typescriptOverride.rules,
165
+ ...testOverrideRules,
166
+ },
167
+ }
115
168
  ],
116
169
  rules: {
170
+ 'id-length': ['error', {
171
+ min: 2,
172
+ properties: 'always',
173
+ exceptions: ['t', 'rt', 'd', 'n', 'te', 'tm'],
174
+ }],
175
+ 'import/no-extraneous-dependencies': ['error', {
176
+ devDependencies: ["**/tests/**", "**/__tests__/**"],
177
+ }],
117
178
  'tailwindcss/no-custom-classname': ['error', {
118
179
  whitelist: ['^app-.+$'],
119
180
  }],
@@ -121,20 +182,5 @@ module.exports = {
121
182
  pattern: '.*\\.spec\\.[tj]sx?$',
122
183
  allTestPattern: '.*\\.(test|spec)\\.[tj]sx?$',
123
184
  }],
124
- 'import/no-extraneous-dependencies': ['error', {
125
- devDependencies: ["**/tests/**", "**/__tests__/**"],
126
- }],
127
- 'id-length': ['error', {
128
- min: 2,
129
- properties: 'always',
130
- exceptions: [
131
- 't',
132
- 'rt',
133
- 'd',
134
- 'n',
135
- 'te',
136
- 'tm',
137
- ]
138
- }]
139
185
  },
140
186
  };
@@ -1,8 +1,9 @@
1
1
  import type { Component } from 'vue';
2
- import type { NavigationItem, Logo, MaybeRef } from './index.d';
2
+ import type { MaybeRef } from '~/modules/typings/reactivity';
3
+ import type { NavigationItem, Logo } from './index.d';
3
4
  export declare function useNavigation(): {
4
5
  setNavigationItems: (items: MaybeRef<NavigationItem[]>) => void;
5
- setNavigationComponent: (component: Component) => void;
6
+ setNavigationComponent: (value: 'a' | Component) => void;
6
7
  setLogo: (logo: Logo) => void;
7
8
  openMainMenu: () => void;
8
9
  closeMainMenu: () => void;
@@ -131,6 +132,7 @@ export declare function useNavigation(): {
131
132
  __name?: string | undefined;
132
133
  };
133
134
  to?: unknown;
135
+ href?: string | undefined;
134
136
  active?: boolean | undefined;
135
137
  rounded?: boolean | undefined;
136
138
  bottom?: boolean | undefined;
@@ -138,7 +140,7 @@ export declare function useNavigation(): {
138
140
  }[]>;
139
141
  mainMenuOpen: import("vue").Ref<boolean>;
140
142
  mobileMenuOpen: import("vue").Ref<boolean>;
141
- navigationComponent: import("vue").ShallowRef<string | Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>>;
143
+ navigationComponent: import("vue").ShallowRef<Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | "a">;
142
144
  logo: import("vue").Ref<string | import("vue").FunctionalComponent<any, any> | {
143
145
  new (...args: any[]): any;
144
146
  __isFragment?: undefined;
@@ -1,3 +1,3 @@
1
1
  @import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");
2
2
 
3
- /*! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:Inter;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--color-primary:#e25c2a;--color-primary-active:#c2410c;--color-secondary:#1e243b;--color-secondary-active:#1e243b}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.\!static{position:static!important}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-5{bottom:1.25rem}.right-5{right:1.25rem}.top-0{top:0}.top-20{top:5rem}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-auto{margin-bottom:auto}.ml-3{margin-left:.75rem}.mr-3{margin-right:.75rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.\!h-6{height:1.5rem!important}.h-0{height:0}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.\!w-20{width:5rem!important}.w-0{width:0}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-full{width:100%}.flex-1{flex:1 1 0%}.grow{flex-grow:1}.-translate-y-2{--tw-translate-y:-0.5rem}.-translate-y-2,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-full{--tw-translate-y:100%}.transform,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-primary{border-color:var(--color-primary)}.border-transparent{border-color:#0000}.bg-primary{background-color:var(--color-primary)}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.object-fill{-o-object-fit:fill;object-fit:fill}.\!p-2{padding:.5rem!important}.p-4{padding:1rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-7{padding-left:1.75rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.text-black{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity))}.text-primary{color:var(--color-primary)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity))}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-primary-active:hover{background-color:var(--color-primary-active)}.hover\:text-primary:hover{color:var(--color-primary)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.enabled\:hover\:bg-primary:hover:enabled{background-color:var(--color-primary)}.enabled\:hover\:bg-primary-active:hover:enabled{background-color:var(--color-primary-active)}.enabled\:hover\:text-white:hover:enabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:select-none:disabled{-webkit-user-select:none;-moz-user-select:none;user-select:none}@media (min-width:992px){.md\:block{display:block}.md\:\!flex{display:flex!important}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:\!w-20{width:5rem!important}.md\:w-1\/2{width:50%}.md\:w-10{width:2.5rem}.md\:max-w-lg{max-width:32rem}.md\:grow-0{flex-grow:0}.md\:flex-row{flex-direction:row}.md\:justify-center{justify-content:center}.md\:rounded-l-2xl{border-top-left-radius:1rem;border-bottom-left-radius:1rem}.md\:bg-primary{background-color:var(--color-primary)}.md\:bg-secondary{background-color:var(--color-secondary)}.md\:px-24{padding-left:6rem;padding-right:6rem}.md\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.md\:hover\:bg-primary-active:hover{background-color:var(--color-primary-active)}}@media (min-width:1200px){.lg\:hidden{display:none}}
3
+ /*! tailwindcss v3.3.1 | MIT License | https://tailwindcss.com*/*,:after,:before{box-sizing:border-box;border:0 solid}:after,:before{--tw-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter;font-feature-settings:normal;font-variation-settings:normal}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:Inter;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:initial}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:initial;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:initial}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}:root{--color-primary:#e25c2a;--color-primary-active:#c2410c;--color-secondary:#1e243b;--color-secondary-active:#1e243b}*,::backdrop,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#3b82f680;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.visible{visibility:visible}.\!static{position:static!important}.fixed{position:fixed}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.bottom-5{bottom:1.25rem}.right-5{right:1.25rem}.top-0{top:0}.top-20{top:5rem}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-auto{margin-bottom:auto}.ml-3{margin-left:.75rem}.mr-3{margin-right:.75rem}.mt-2{margin-top:.5rem}.mt-5{margin-top:1.25rem}.mt-auto{margin-top:auto}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.\!h-6{height:1.5rem!important}.h-0{height:0}.h-10{height:2.5rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.\!w-20{width:5rem!important}.w-0{width:0}.w-1\/2{width:50%}.w-1\/3{width:33.333333%}.w-10{width:2.5rem}.w-4{width:1rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-7{width:1.75rem}.w-full{width:100%}.flex-1{flex:1 1 0%}.grow{flex-grow:1}.-translate-y-2{--tw-translate-y:-0.5rem}.-translate-y-2,.translate-y-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y:0px}.translate-y-full{--tw-translate-y:100%}.transform,.translate-y-full{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-3{gap:.75rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.whitespace-nowrap{white-space:nowrap}.\!rounded-full{border-radius:9999px!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-0{border-width:0}.border-primary{border-color:var(--color-primary)}.border-transparent{border-color:#0000}.bg-primary{background-color:var(--color-primary)}.bg-transparent{background-color:initial}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.bg-zinc-50{--tw-bg-opacity:1;background-color:rgb(250 250 250/var(--tw-bg-opacity))}.object-fill{-o-object-fit:fill;object-fit:fill}.\!p-2{padding:.5rem!important}.p-4{padding:1rem}.px-10{padding-left:2.5rem;padding-right:2.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.pl-7{padding-left:1.75rem}.text-center{text-align:center}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-semibold{font-weight:600}.capitalize{text-transform:capitalize}.text-black{--tw-text-opacity:1;color:rgb(30 30 30/var(--tw-text-opacity))}.text-primary{color:var(--color-primary)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.text-zinc-900{--tw-text-opacity:1;color:rgb(24 24 27/var(--tw-text-opacity))}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-primary-active:hover{background-color:var(--color-primary-active)}.hover\:text-primary:hover{color:var(--color-primary)}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.enabled\:hover\:bg-primary:hover:enabled{background-color:var(--color-primary)}.enabled\:hover\:bg-primary-active:hover:enabled{background-color:var(--color-primary-active)}.enabled\:hover\:text-white:hover:enabled{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:select-none:disabled{-webkit-user-select:none;-moz-user-select:none;user-select:none}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:992px){.md\:block{display:block}.md\:\!flex{display:flex!important}.md\:flex{display:flex}.md\:hidden{display:none}.md\:h-auto{height:auto}.md\:\!w-20{width:5rem!important}.md\:w-1\/2{width:50%}.md\:w-10{width:2.5rem}.md\:max-w-lg{max-width:32rem}.md\:grow-0{flex-grow:0}.md\:flex-row{flex-direction:row}.md\:justify-center{justify-content:center}.md\:rounded-l-2xl{border-top-left-radius:1rem;border-bottom-left-radius:1rem}.md\:bg-primary{background-color:var(--color-primary)}.md\:bg-secondary{background-color:var(--color-secondary)}.md\:px-24{padding-left:6rem;padding-right:6rem}.md\:text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.md\:hover\:bg-primary-active:hover{background-color:var(--color-primary-active)}}@media (min-width:1200px){.lg\:hidden{display:none}}
package/dist/ui.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("@headlessui/vue"),w={small:["h-5","w-5"],medium:["h-7","w-7"],large:["h-10","w-10"]},x=e.createElementVNode("circle",{stroke:"currentColor",class:"opacity-25","stroke-width":"4",cx:"12",cy:"12",r:"10"},null,-1),C=e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962
2
- 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`},null,-1),b=[x,C],v=e.defineComponent({__name:"AppLoader",props:{size:{default:"medium"}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass([e.unref(w)[t.size],"animate-spin"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},b,2))}}),B={class:"app-button__icon h-4"},N=e.defineComponent({__name:"ButtonIconSlot",props:{loading:{type:Boolean}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("span",B,[t.loading?(e.openBlock(),e.createBlock(v,{key:0,class:"w-4"})):e.renderSlot(n.$slots,"default",{key:1},void 0,!0)]))}});const M=(t,n)=>{const o=t.__vccOpts||t;for(const[a,l]of n)o[a]=l;return o},g=M(N,[["__scopeId","data-v-04d5f165"]]),E={primary:["text-white","bg-primary","border-transparent","enabled:hover:bg-primary-active"],secondary:["text-primary","bg-transparent","border-primary","enabled:hover:text-white","enabled:hover:bg-primary"]},V={small:["px-5","py-2"],medium:["px-5","py-3"],large:["px-5","py-4"]},$=["type","disabled"],I=e.defineComponent({__name:"AppButton",props:{size:{default:"medium"},type:{default:"button"},colorType:{default:"primary"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("button",{type:t.type,disabled:t.disabled||t.loading,class:e.normalizeClass([[...e.unref(E)[t.colorType],...e.unref(V)[t.size]],"app-button inline-flex items-center whitespace-nowrap rounded-lg border text-sm font-semibold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:select-none"])},[n.$slots.leadingIcon||t.loading?(e.openBlock(),e.createBlock(g,{key:0,loading:t.loading,class:"mr-3","data-test-leading-icon":""},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"leadingIcon")]),_:3},8,["loading"])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),n.$slots.trailingIcon?(e.openBlock(),e.createBlock(g,{key:1,class:"ml-3","data-test-trailing-icon":""},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"trailingIcon")]),_:3})):e.createCommentVNode("",!0)],10,$))}}),s={navigationItems:e.ref([]),mainMenuOpen:e.ref(!1),mobileMenuOpen:e.ref(!1),navigationComponent:e.shallowRef("a"),logo:e.ref(null),contactRoute:e.ref()};function u(){function t(i){s.navigationItems.value=e.isRef(i)?i==null?void 0:i.value:i}function n(i){s.navigationComponent.value=i}function o(i){s.logo.value=i}function a(){s.mainMenuOpen.value=!0}function l(){s.mainMenuOpen.value=!1}function r(){s.mainMenuOpen.value=!s.mainMenuOpen.value}function m(){s.mobileMenuOpen.value=!0}function y(){s.mobileMenuOpen.value=!1}function d(){s.mobileMenuOpen.value=!s.mobileMenuOpen.value}return{...s,setNavigationItems:t,setNavigationComponent:n,setLogo:o,openMainMenu:a,closeMainMenu:l,toggleMainMenu:r,openMobileMenu:m,closeMobileMenu:y,toggleMobileMenu:d}}const c={layoutImage:e.ref(null),colors:{primaryColor:e.ref(null),primaryColorActive:e.ref(null),secondaryColor:e.ref(null),secondaryColorActive:e.ref(null)}};function _(){function t(a){c.layoutImage.value=a}function n(a,l){c.colors.primaryColor.value=a,c.colors.primaryColorActive.value=l,document.documentElement.style.setProperty("--color-primary",a),document.documentElement.style.setProperty("--color-primary-active",l)}function o(a,l){c.colors.secondaryColor.value=a,c.colors.secondaryColorActive.value=l,document.documentElement.style.setProperty("--color-secondary",a),document.documentElement.style.setProperty("--color-secondary-active",l)}return{...c,setLayoutImage:t,setPrimaryColors:n,setSecondaryColors:o}}function z(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})])}function S(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])}const O={class:"pl-7 text-lg font-semibold text-zinc-900 md:hidden","data-test-name":""},f=e.defineComponent({__name:"NavigationItem",props:{item:null},setup(t){const n=t,{navigationComponent:o}=u(),a=e.computed(()=>typeof n.item.icon!="string");return(l,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o)),{to:t.item.to,href:e.unref(o)==="a"?t.item.to:void 0,class:e.normalizeClass([{"md:bg-primary":t.item.active??!1,"!rounded-full":t.item.rounded??!1,"mb-2":!t.item.bottom,"mt-2":t.item.bottom??!1},"flex h-10 w-full cursor-pointer items-center rounded-lg text-center transition-colors md:w-10 md:justify-center md:hover:bg-primary-active"]),onClick:t.item.onClick},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)?t.item.icon:"span"),{class:e.normalizeClass([{"!h-6":!e.unref(a)},"h-4 w-4 text-zinc-900 md:text-white"]),"data-test-icon":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.icon),1)]),_:1},8,["class"])),e.createElementVNode("span",O,e.toDisplayString(t.item.name),1)]),_:1},8,["to","href","class","onClick"]))}}),h=e.defineComponent({__name:"SupportItem",setup(t){const{contactRoute:n,navigationComponent:o}=u();return(a,l)=>e.unref(n)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o)),{key:0,to:e.unref(n),href:e.unref(n),class:"fixed bottom-5 right-5 z-50 flex h-10 w-10 justify-center rounded-full bg-primary py-2 text-white transition-colors hover:bg-primary-active","data-test-help-icon":""},{default:e.withCtx(()=>[e.createTextVNode(" ? ")]),_:1},8,["to","href"])):e.createCommentVNode("",!0)}}),L={class:"flex items-center justify-between bg-zinc-50 px-2 py-4 text-black md:hidden"},A=["innerHTML"],j=e.createElementVNode("div",{class:"w-1/3"},null,-1),T={class:"relative flex h-full w-full flex-1 flex-col bg-white focus:outline-none","data-test-navigation-wrapper":""},P={class:"h-0 flex-1 overflow-y-auto p-4","data-test-navigation-links-wrapper":""},D={"aria-label":"MainMenu",class:"mt-5"},R={class:"mb-auto"},F=e.defineComponent({__name:"Mobile",setup(t){const{logo:n,navigationItems:o,mobileMenuOpen:a,toggleMobileMenu:l,closeMobileMenu:r}=u(),m=e.computed(()=>a.value?S:z);return(y,d)=>(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",{class:"inline-flex w-1/3 cursor-pointer items-center justify-start rounded-sm !p-2 hover:text-primary focus:outline-none","data-test-menu-icon-wrapper":"",onClick:d[0]||(d[0]=(...i)=>e.unref(l)&&e.unref(l)(...i))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(m)),{class:"block h-6 w-6 text-black","aria-hidden":"true"}))]),e.createElementVNode("div",{class:"w-1/3","data-test-logo-wrapper":"",innerHTML:e.unref(n)},null,8,A),j,e.createVNode(e.unref(p.TransitionRoot),{show:e.unref(a),as:"template"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.Dialog),{as:"div",class:"fixed inset-0 top-20 z-50 flex -translate-y-2 lg:hidden",onClose:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(e.unref(p.TransitionChild),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"translate-y-full","enter-to":"translate-y-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-y-0","leave-to":"translate-y-full"},{default:e.withCtx(()=>[e.createElementVNode("div",T,[e.createElementVNode("div",P,[e.createElementVNode("nav",D,[e.createElementVNode("ul",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),i=>(e.openBlock(),e.createElementBlock("li",{key:i.name,"data-test-navigation-item":""},[e.createVNode(f,{item:i},null,8,["item"])]))),128))])]),e.createVNode(h)])])]),_:1})]),_:1},8,["onClose"])]),_:1},8,["show"]),e.createVNode(h)]))}}),H={class:"mx-auto mb-auto"},q={class:"mx-auto mt-auto"},k=e.defineComponent({__name:"AppNavigationMenu",setup(t){const{navigationItems:n,mainMenuOpen:o}=u();return(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("aside",{class:e.normalizeClass([{"px-3 md:!w-20":e.unref(o)},"sticky top-0 hidden h-screen w-0 flex-col justify-center overflow-hidden py-5 transition-all duration-500 md:flex"]),"data-test-main-menu":""},[e.createElementVNode("ul",H,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n).filter(r=>r.bottom!==!0),r=>(e.openBlock(),e.createElementBlock("li",{key:r.name,"data-test-navigation-item":""},[e.createVNode(f,{item:r},null,8,["item"])]))),128))]),e.createElementVNode("ul",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n).filter(r=>r.bottom),r=>(e.openBlock(),e.createElementBlock("li",{key:r.name,"data-test-navigation-item":""},[e.createVNode(f,{item:r},null,8,["item"])]))),128)),e.createElementVNode("li",null,[e.createVNode(h,{class:"!static"})])])],2),e.createVNode(F)]))}}),G={class:"flex min-h-screen flex-col md:flex-row md:bg-secondary"},J={class:"flex h-full grow items-center justify-center bg-white px-10 transition-all md:h-auto md:w-1/2 md:grow-0 md:rounded-l-2xl md:px-24"},K={class:"mx-auto md:max-w-lg"},Q={class:"hidden w-1/2 md:block","data-test-layout-image-wrapper":""},U=["src"],W=e.defineComponent({__name:"Auth",setup(t){const{layoutImage:n}=_();return(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(e.unref(k)),e.createElementVNode("main",J,[e.createElementVNode("div",K,[e.renderSlot(o.$slots,"default")])]),e.createElementVNode("div",Q,[e.unref(n)?(e.openBlock(),e.createElementBlock("img",{key:0,src:e.unref(n),class:"h-screen w-full object-fill"},null,8,U)):e.createCommentVNode("",!0)])]))}});exports.AppButton=I;exports.AppLoader=v;exports.AppNavigationMenu=k;exports.AuthLayout=W;exports.useLayout=_;exports.useNavigation=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),p=require("@headlessui/vue"),w={small:["h-5","w-5"],medium:["h-7","w-7"],large:["h-10","w-10"]},x=e.createElementVNode("circle",{stroke:"currentColor",class:"opacity-25","stroke-width":"4",cx:"12",cy:"12",r:"10"},null,-1),b=e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:`M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962
2
+ 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z`},null,-1),C=[x,b],g=e.defineComponent({__name:"AppLoader",props:{size:{default:"medium"}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("svg",{class:e.normalizeClass([e.unref(w)[t.size],"animate-spin"]),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none"},C,2))}}),B={class:"app-button__icon h-4"},N=e.defineComponent({__name:"ButtonIconSlot",props:{loading:{type:Boolean}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("span",B,[t.loading?(e.openBlock(),e.createBlock(g,{key:0,class:"w-4"})):e.renderSlot(n.$slots,"default",{key:1},void 0,!0)]))}});const M=(t,n)=>{const o=t.__vccOpts||t;for(const[a,l]of n)o[a]=l;return o},v=M(N,[["__scopeId","data-v-04d5f165"]]),E={plain:["text-primary","border-0"],primary:["text-white","bg-primary","border-transparent","enabled:hover:bg-primary-active"],secondary:["text-primary","bg-transparent","border-primary","enabled:hover:text-white","enabled:hover:bg-primary"]},V={small:["px-5","py-2"],medium:["px-5","py-3"],large:["px-5","py-4"]},$=["type","disabled"],I=e.defineComponent({__name:"AppButton",props:{size:{default:"medium"},type:{default:"button"},colorType:{default:"primary"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("button",{type:t.type,disabled:t.disabled||t.loading,class:e.normalizeClass([[...e.unref(E)[t.colorType],...e.unref(V)[t.size]],"app-button inline-flex items-center whitespace-nowrap rounded-lg border text-sm font-semibold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:select-none disabled:opacity-50"])},[n.$slots.leadingIcon||t.loading?(e.openBlock(),e.createBlock(v,{key:0,loading:t.loading,class:"mr-3","data-test-leading-icon":""},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"leadingIcon")]),_:3},8,["loading"])):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default"),n.$slots.trailingIcon?(e.openBlock(),e.createBlock(v,{key:1,class:"ml-3","data-test-trailing-icon":""},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"trailingIcon")]),_:3})):e.createCommentVNode("",!0)],10,$))}}),s={navigationItems:e.ref([]),mainMenuOpen:e.ref(!1),mobileMenuOpen:e.ref(!1),navigationComponent:e.shallowRef("a"),logo:e.ref(null),contactRoute:e.ref()};function u(){function t(i){s.navigationItems.value=e.isRef(i)?i==null?void 0:i.value:i}function n(i){s.navigationComponent.value=i}function o(i){s.logo.value=i}function a(){s.mainMenuOpen.value=!0}function l(){s.mainMenuOpen.value=!1}function r(){s.mainMenuOpen.value=!s.mainMenuOpen.value}function m(){s.mobileMenuOpen.value=!0}function y(){s.mobileMenuOpen.value=!1}function d(){s.mobileMenuOpen.value=!s.mobileMenuOpen.value}return{...s,setNavigationItems:t,setNavigationComponent:n,setLogo:o,openMainMenu:a,closeMainMenu:l,toggleMainMenu:r,openMobileMenu:m,closeMobileMenu:y,toggleMobileMenu:d}}const c={layoutImage:e.ref(null),colors:{primaryColor:e.ref(null),primaryColorActive:e.ref(null),secondaryColor:e.ref(null),secondaryColorActive:e.ref(null)}};function _(){function t(a){c.layoutImage.value=a}function n(a,l){c.colors.primaryColor.value=a,c.colors.primaryColorActive.value=l,document.documentElement.style.setProperty("--color-primary",a),document.documentElement.style.setProperty("--color-primary-active",l)}function o(a,l){c.colors.secondaryColor.value=a,c.colors.secondaryColorActive.value=l,document.documentElement.style.setProperty("--color-secondary",a),document.documentElement.style.setProperty("--color-secondary-active",l)}return{...c,setLayoutImage:t,setPrimaryColors:n,setSecondaryColors:o}}function z(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})])}function S(t,n){return e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})])}const O={class:"pl-7 text-lg font-semibold text-zinc-900 md:hidden","data-test-name":""},f=e.defineComponent({__name:"NavigationItem",props:{item:null},setup(t){const n=t,{navigationComponent:o}=u(),a=e.computed(()=>typeof n.item.icon!="string");return(l,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o)),{to:t.item.to,href:t.item.href,class:e.normalizeClass([{"md:bg-primary":t.item.active??!1,"!rounded-full":t.item.rounded??!1,"mb-2":!t.item.bottom,"mt-2":t.item.bottom??!1},"flex h-10 w-full cursor-pointer items-center rounded-lg text-center transition-colors md:w-10 md:justify-center md:hover:bg-primary-active"]),onClick:t.item.onClick},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(a)?t.item.icon:"span"),{class:e.normalizeClass([{"!h-6":!e.unref(a)},"h-4 w-4 text-zinc-900 md:text-white"]),"data-test-icon":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.item.icon),1)]),_:1},8,["class"])),e.createElementVNode("span",O,e.toDisplayString(t.item.name),1)]),_:1},8,["to","href","class","onClick"]))}}),h=e.defineComponent({__name:"SupportItem",setup(t){const{contactRoute:n,navigationComponent:o}=u();return(a,l)=>e.unref(n)?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(o)),{key:0,to:e.unref(o)!=="a"?e.unref(n):void 0,href:e.unref(o)?e.unref(n):void 0,class:"fixed bottom-5 right-5 z-50 flex h-10 w-10 justify-center rounded-full bg-primary py-2 text-white transition-colors hover:bg-primary-active","data-test-help-icon":""},{default:e.withCtx(()=>[e.createTextVNode(" ? ")]),_:1},8,["to","href"])):e.createCommentVNode("",!0)}}),L={class:"flex items-center justify-between bg-zinc-50 px-2 py-4 text-black md:hidden"},A=["innerHTML"],j=e.createElementVNode("div",{class:"w-1/3"},null,-1),T={class:"relative flex h-full w-full flex-1 flex-col bg-white focus:outline-none","data-test-navigation-wrapper":""},P={class:"h-0 flex-1 overflow-y-auto p-4","data-test-navigation-links-wrapper":""},D={"aria-label":"MainMenu",class:"mt-5"},R={class:"mb-auto"},F=e.defineComponent({__name:"Mobile",setup(t){const{logo:n,navigationItems:o,mobileMenuOpen:a,toggleMobileMenu:l,closeMobileMenu:r}=u(),m=e.computed(()=>a.value?S:z);return(y,d)=>(e.openBlock(),e.createElementBlock("div",L,[e.createElementVNode("div",{class:"inline-flex w-1/3 cursor-pointer items-center justify-start rounded-sm !p-2 hover:text-primary focus:outline-none","data-test-menu-icon-wrapper":"",onClick:d[0]||(d[0]=(...i)=>e.unref(l)&&e.unref(l)(...i))},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(m)),{class:"block h-6 w-6 text-black","aria-hidden":"true"}))]),e.createElementVNode("div",{class:"w-1/3","data-test-logo-wrapper":"",innerHTML:e.unref(n)},null,8,A),j,e.createVNode(e.unref(p.TransitionRoot),{show:e.unref(a),as:"template"},{default:e.withCtx(()=>[e.createVNode(e.unref(p.Dialog),{as:"div",class:"fixed inset-0 top-20 z-50 flex -translate-y-2 lg:hidden",onClose:e.unref(r)},{default:e.withCtx(()=>[e.createVNode(e.unref(p.TransitionChild),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"translate-y-full","enter-to":"translate-y-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-y-0","leave-to":"translate-y-full"},{default:e.withCtx(()=>[e.createElementVNode("div",T,[e.createElementVNode("div",P,[e.createElementVNode("nav",D,[e.createElementVNode("ul",R,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),i=>(e.openBlock(),e.createElementBlock("li",{key:i.name,"data-test-navigation-item":""},[e.createVNode(f,{item:i},null,8,["item"])]))),128))])]),e.createVNode(h)])])]),_:1})]),_:1},8,["onClose"])]),_:1},8,["show"]),e.createVNode(h)]))}}),H={class:"mx-auto mb-auto"},q={class:"mx-auto mt-auto"},k=e.defineComponent({__name:"AppNavigationMenu",setup(t){const{navigationItems:n,mainMenuOpen:o}=u();return(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("aside",{class:e.normalizeClass([{"px-3 md:!w-20":e.unref(o)},"sticky top-0 hidden h-screen w-0 flex-col justify-center overflow-hidden py-5 transition-all duration-500 md:flex"]),"data-test-main-menu":""},[e.createElementVNode("ul",H,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n).filter(r=>r.bottom!==!0),r=>(e.openBlock(),e.createElementBlock("li",{key:r.name,"data-test-top-navigation-item":""},[e.createVNode(f,{item:r},null,8,["item"])]))),128))]),e.createElementVNode("ul",q,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(n).filter(r=>r.bottom),r=>(e.openBlock(),e.createElementBlock("li",{key:r.name,"data-test-bottom-navigation-item":""},[e.createVNode(f,{item:r},null,8,["item"])]))),128)),e.createElementVNode("li",null,[e.createVNode(h,{class:"!static"})])])],2),e.createVNode(F)]))}}),G={class:"flex min-h-screen flex-col md:flex-row md:bg-secondary"},J={class:"flex h-full grow items-center justify-center bg-white px-10 transition-all md:h-auto md:w-1/2 md:grow-0 md:rounded-l-2xl md:px-24"},K={class:"mx-auto md:max-w-lg"},Q={class:"hidden w-1/2 md:block","data-test-layout-image-wrapper":""},U=["src"],W=e.defineComponent({__name:"Auth",setup(t){const{layoutImage:n}=_();return(o,a)=>(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(e.unref(k)),e.createElementVNode("main",J,[e.createElementVNode("div",K,[e.renderSlot(o.$slots,"default")])]),e.createElementVNode("div",Q,[e.unref(n)?(e.openBlock(),e.createElementBlock("img",{key:0,src:e.unref(n),class:"h-screen w-full object-fill"},null,8,U)):e.createCommentVNode("",!0)])]))}});exports.AppButton=I;exports.AppLoader=g;exports.AppNavigationMenu=k;exports.AuthLayout=W;exports.useLayout=_;exports.useNavigation=u;
package/dist/ui.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, openBlock as o, createElementBlock as r, normalizeClass as _, unref as n, createElementVNode as s, createBlock as y, renderSlot as v, withCtx as f, createCommentVNode as x, ref as p, shallowRef as j, isRef as S, computed as L, resolveDynamicComponent as b, createTextVNode as N, toDisplayString as O, createVNode as m, Fragment as k, renderList as $ } from "vue";
1
+ import { defineComponent as h, openBlock as o, createElementBlock as r, normalizeClass as _, unref as n, createElementVNode as s, createBlock as y, renderSlot as v, withCtx as f, createCommentVNode as b, ref as p, shallowRef as j, isRef as S, computed as L, resolveDynamicComponent as x, createTextVNode as N, toDisplayString as O, createVNode as m, Fragment as k, renderList as $ } from "vue";
2
2
  import { TransitionRoot as P, Dialog as T, TransitionChild as E } from "@headlessui/vue";
3
3
  const R = {
4
4
  small: ["h-5", "w-5"],
@@ -52,6 +52,10 @@ const J = (e, t) => {
52
52
  a[l] = i;
53
53
  return a;
54
54
  }, A = /* @__PURE__ */ J(G, [["__scopeId", "data-v-04d5f165"]]), K = {
55
+ plain: [
56
+ "text-primary",
57
+ "border-0"
58
+ ],
55
59
  primary: [
56
60
  "text-white",
57
61
  "bg-primary",
@@ -85,7 +89,7 @@ const J = (e, t) => {
85
89
  class: _([[
86
90
  ...n(K)[e.colorType],
87
91
  ...n(Q)[e.size]
88
- ], "app-button inline-flex items-center whitespace-nowrap rounded-lg border text-sm font-semibold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:select-none"])
92
+ ], "app-button inline-flex items-center whitespace-nowrap rounded-lg border text-sm font-semibold transition-colors focus:outline-none disabled:cursor-not-allowed disabled:select-none disabled:opacity-50"])
89
93
  }, [
90
94
  t.$slots.leadingIcon || e.loading ? (o(), y(A, {
91
95
  key: 0,
@@ -97,7 +101,7 @@ const J = (e, t) => {
97
101
  v(t.$slots, "leadingIcon")
98
102
  ]),
99
103
  _: 3
100
- }, 8, ["loading"])) : x("", !0),
104
+ }, 8, ["loading"])) : b("", !0),
101
105
  v(t.$slots, "default"),
102
106
  t.$slots.trailingIcon ? (o(), y(A, {
103
107
  key: 1,
@@ -108,7 +112,7 @@ const J = (e, t) => {
108
112
  v(t.$slots, "trailingIcon")
109
113
  ]),
110
114
  _: 3
111
- })) : x("", !0)
115
+ })) : b("", !0)
112
116
  ], 10, U));
113
117
  }
114
118
  }), d = {
@@ -228,9 +232,9 @@ const Z = {
228
232
  },
229
233
  setup(e) {
230
234
  const t = e, { navigationComponent: a } = M(), l = L(() => typeof t.item.icon != "string");
231
- return (i, c) => (o(), y(b(n(a)), {
235
+ return (i, c) => (o(), y(x(n(a)), {
232
236
  to: e.item.to,
233
- href: n(a) === "a" ? e.item.to : void 0,
237
+ href: e.item.href,
234
238
  class: _([{
235
239
  "md:bg-primary": e.item.active ?? !1,
236
240
  "!rounded-full": e.item.rounded ?? !1,
@@ -240,7 +244,7 @@ const Z = {
240
244
  onClick: e.item.onClick
241
245
  }, {
242
246
  default: f(() => [
243
- (o(), y(b(n(l) ? e.item.icon : "span"), {
247
+ (o(), y(x(n(l) ? e.item.icon : "span"), {
244
248
  class: _([{ "!h-6": !n(l) }, "h-4 w-4 text-zinc-900 md:text-white"]),
245
249
  "data-test-icon": ""
246
250
  }, {
@@ -258,10 +262,10 @@ const Z = {
258
262
  __name: "SupportItem",
259
263
  setup(e) {
260
264
  const { contactRoute: t, navigationComponent: a } = M();
261
- return (l, i) => n(t) ? (o(), y(b(n(a)), {
265
+ return (l, i) => n(t) ? (o(), y(x(n(a)), {
262
266
  key: 0,
263
- to: n(t),
264
- href: n(t),
267
+ to: n(a) !== "a" ? n(t) : void 0,
268
+ href: n(a) ? n(t) : void 0,
265
269
  class: "fixed bottom-5 right-5 z-50 flex h-10 w-10 justify-center rounded-full bg-primary py-2 text-white transition-colors hover:bg-primary-active",
266
270
  "data-test-help-icon": ""
267
271
  }, {
@@ -269,7 +273,7 @@ const Z = {
269
273
  N(" ? ")
270
274
  ]),
271
275
  _: 1
272
- }, 8, ["to", "href"])) : x("", !0);
276
+ }, 8, ["to", "href"])) : b("", !0);
273
277
  }
274
278
  }), ee = { class: "flex items-center justify-between bg-zinc-50 px-2 py-4 text-black md:hidden" }, te = ["innerHTML"], ne = /* @__PURE__ */ s("div", { class: "w-1/3" }, null, -1), oe = {
275
279
  class: "relative flex h-full w-full flex-1 flex-col bg-white focus:outline-none",
@@ -297,7 +301,7 @@ const Z = {
297
301
  onClick: w[0] || (w[0] = //@ts-ignore
298
302
  (...u) => n(i) && n(i)(...u))
299
303
  }, [
300
- (o(), y(b(n(C)), {
304
+ (o(), y(x(n(C)), {
301
305
  class: "block h-6 w-6 text-black",
302
306
  "aria-hidden": "true"
303
307
  }))
@@ -368,7 +372,7 @@ const Z = {
368
372
  s("ul", re, [
369
373
  (o(!0), r(k, null, $(n(t).filter((c) => c.bottom !== !0), (c) => (o(), r("li", {
370
374
  key: c.name,
371
- "data-test-navigation-item": ""
375
+ "data-test-top-navigation-item": ""
372
376
  }, [
373
377
  m(I, { item: c }, null, 8, ["item"])
374
378
  ]))), 128))
@@ -376,7 +380,7 @@ const Z = {
376
380
  s("ul", ce, [
377
381
  (o(!0), r(k, null, $(n(t).filter((c) => c.bottom), (c) => (o(), r("li", {
378
382
  key: c.name,
379
- "data-test-navigation-item": ""
383
+ "data-test-bottom-navigation-item": ""
380
384
  }, [
381
385
  m(I, { item: c }, null, 8, ["item"])
382
386
  ]))), 128)),
@@ -407,7 +411,7 @@ const Z = {
407
411
  key: 0,
408
412
  src: n(t),
409
413
  class: "h-screen w-full object-fill"
410
- }, null, 8, he)) : x("", !0)
414
+ }, null, 8, he)) : b("", !0)
411
415
  ])
412
416
  ]));
413
417
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autoafleveren/ui",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist/*",
@@ -59,7 +59,7 @@
59
59
  "@vitejs/plugin-vue": "^4.1.0",
60
60
  "autoprefixer": "^10.4.14",
61
61
  "tailwindcss": "^3.3.1",
62
- "vite": "^4.2.2",
62
+ "vite": "^4.3.1",
63
63
  "vue": "^3.2.47",
64
64
  "vue-docgen-api": "^4.67.0"
65
65
  },
@@ -67,7 +67,7 @@
67
67
  "@babel/core": "^7.21.4",
68
68
  "@babel/preset-typescript": "^7.21.4",
69
69
  "@mdx-js/react": "^2.3.0",
70
- "@programic/eslint-plugin": "^6.1.0",
70
+ "@programic/eslint-plugin": "^6.2.0",
71
71
  "@rushstack/eslint-patch": "^1.2.0",
72
72
  "@storybook/addon-actions": "^7.0.6",
73
73
  "@storybook/addon-docs": "^7.0.6",
@@ -89,20 +89,20 @@
89
89
  "@types/node": "^18.15.11",
90
90
  "@types/react": "^18.0.37",
91
91
  "@types/react-dom": "^18.0.11",
92
- "@typescript-eslint/eslint-plugin": "^5.57.1",
93
- "@typescript-eslint/parser": "^5.57.1",
92
+ "@typescript-eslint/eslint-plugin": "^5.59.1",
93
+ "@typescript-eslint/parser": "^5.59.1",
94
94
  "@vue/test-utils": "^2.3.2",
95
95
  "@vue/tsconfig": "^0.1.3",
96
96
  "babel-loader": "^9.1.2",
97
- "eslint": "^8.37.0",
97
+ "eslint": "^8.39.0",
98
98
  "eslint-config-airbnb-base": "^15.0.0",
99
99
  "eslint-import-resolver-typescript": "^3.5.5",
100
100
  "eslint-plugin-import": "^2.27.5",
101
101
  "eslint-plugin-import-newlines": "^1.3.1",
102
102
  "eslint-plugin-tailwindcss": "^3.11.0",
103
103
  "eslint-plugin-unicorn": "^46.0.0",
104
- "eslint-plugin-vitest": "^0.0.57",
105
- "eslint-plugin-vue": "^9.10.0",
104
+ "eslint-plugin-vitest": "^0.1.4",
105
+ "eslint-plugin-vue": "^9.11.0",
106
106
  "jsdom": "^21.1.1",
107
107
  "postcss": "^8.4.22",
108
108
  "react": "^18.2.0",