@una-ui/nuxt 0.2.0-beta.6 → 0.4.0-beta.0

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 (62) hide show
  1. package/README.md +10 -1
  2. package/dist/module.d.mts +35 -0
  3. package/dist/module.d.ts +11 -7
  4. package/dist/module.json +1 -1
  5. package/dist/module.mjs +12 -40
  6. package/dist/runtime/components/elements/Link.vue +34 -3
  7. package/dist/runtime/components/elements/Link.vue.d.ts +8 -0
  8. package/dist/runtime/components/forms/Checkbox.vue +84 -0
  9. package/dist/runtime/components/forms/Input.vue +49 -9
  10. package/dist/runtime/components/forms/Radio.vue +12 -17
  11. package/dist/runtime/components/misc/ThemeSwitcher.vue +43 -40
  12. package/dist/runtime/components/navigation/NavLink.vue +36 -8
  13. package/dist/runtime/composables/useUnaSettings.d.ts +1 -0
  14. package/dist/runtime/composables/useUnaSettings.mjs +30 -0
  15. package/dist/runtime/composables/useUnaThemes.d.ts +7 -0
  16. package/dist/runtime/composables/{themes.mjs → useUnaThemes.mjs} +31 -17
  17. package/dist/runtime/plugins/theme.client.d.ts +0 -3
  18. package/dist/runtime/plugins/theme.client.mjs +4 -9
  19. package/dist/runtime/plugins/theme.server.mjs +6 -1
  20. package/dist/runtime/types/accordion.d.ts +15 -15
  21. package/dist/runtime/types/alert.d.ts +6 -6
  22. package/dist/runtime/types/avatar-group.d.ts +3 -3
  23. package/dist/runtime/types/avatar.d.ts +9 -9
  24. package/dist/runtime/types/badge.d.ts +4 -4
  25. package/dist/runtime/types/button.d.ts +10 -10
  26. package/dist/runtime/types/checkbox.d.ts +69 -0
  27. package/dist/runtime/types/checkbox.mjs +0 -0
  28. package/dist/runtime/types/form-group.d.ts +10 -10
  29. package/dist/runtime/types/icon.d.ts +1 -1
  30. package/dist/runtime/types/index.d.ts +24 -0
  31. package/dist/runtime/types/index.mjs +1 -0
  32. package/dist/runtime/types/indicator.d.ts +9 -9
  33. package/dist/runtime/types/input.d.ts +42 -13
  34. package/dist/runtime/types/kbd.d.ts +3 -3
  35. package/dist/runtime/types/link.d.ts +13 -4
  36. package/dist/runtime/types/nav-link.d.ts +10 -1
  37. package/dist/runtime/types/radio.d.ts +11 -12
  38. package/dist/runtime/types/switch.d.ts +8 -8
  39. package/dist/runtime/utils/index.d.ts +12 -12
  40. package/dist/types.d.mts +16 -0
  41. package/dist/types.d.ts +3 -2
  42. package/dist/una.config.d.mts +5 -0
  43. package/dist/una.config.d.ts +5 -0
  44. package/dist/una.config.mjs +35 -0
  45. package/package.json +24 -20
  46. package/playground/.nuxt/components.d.ts +208 -0
  47. package/playground/.nuxt/imports.d.ts +28 -0
  48. package/playground/.nuxt/nuxt.d.ts +18 -0
  49. package/playground/.nuxt/schema/nuxt.schema.d.ts +17 -0
  50. package/playground/.nuxt/types/app.config.d.ts +37 -0
  51. package/playground/.nuxt/types/imports.d.ts +1069 -0
  52. package/playground/.nuxt/types/nitro-config.d.ts +14 -0
  53. package/playground/.nuxt/types/nitro-imports.d.ts +121 -0
  54. package/playground/.nuxt/types/nitro-nuxt.d.ts +26 -0
  55. package/playground/.nuxt/types/nitro-routes.d.ts +11 -0
  56. package/playground/.nuxt/types/nitro.d.ts +3 -0
  57. package/playground/.nuxt/types/plugins.d.ts +30 -0
  58. package/playground/.nuxt/types/schema.d.ts +29 -0
  59. package/playground/.nuxt/types/vue-shim.d.ts +5 -0
  60. package/playground/.nuxt/vue-router-stub.d.ts +1 -0
  61. package/una.config.d.ts +1 -0
  62. package/dist/runtime/composables/themes.d.ts +0 -7
@@ -3,13 +3,13 @@ export interface NFormGroupProps {
3
3
  * Update the form group status.
4
4
  *
5
5
  * @default null
6
- */
6
+ */
7
7
  status?: 'info' | 'success' | 'warning' | 'error';
8
8
  /**
9
9
  * Add a required indicator to the form group.
10
10
  *
11
11
  * @default false
12
- */
12
+ */
13
13
  required?: boolean;
14
14
  /**
15
15
  * Manually set the for attribute.
@@ -20,7 +20,7 @@ export interface NFormGroupProps {
20
20
  * @default randomId
21
21
  * @example
22
22
  * for="email"
23
- */
23
+ */
24
24
  for?: string | boolean;
25
25
  /**
26
26
  * Manually set the id attribute.
@@ -30,28 +30,28 @@ export interface NFormGroupProps {
30
30
  * @default randomId
31
31
  * @example
32
32
  * id="email"
33
- */
33
+ */
34
34
  id?: string;
35
35
  /**
36
36
  * Label for the form group.
37
37
  *
38
38
  * @example
39
39
  * label="Email"
40
- */
40
+ */
41
41
  label?: string;
42
42
  /**
43
43
  * Display `hint` message for the form group.
44
44
  *
45
45
  * @example
46
46
  * hint="Enter your email address"
47
- */
47
+ */
48
48
  hint?: string;
49
49
  /**
50
50
  * Display `Description` message for the form group.
51
51
  *
52
52
  * @example
53
53
  * description="We will never share your email with anyone else."
54
- */
54
+ */
55
55
  description?: string;
56
56
  /**
57
57
  * Display `Message` for the form group.
@@ -59,7 +59,7 @@ export interface NFormGroupProps {
59
59
  *
60
60
  * @example
61
61
  * message="Email is required"
62
- */
62
+ */
63
63
  message?: string;
64
64
  /**
65
65
  * Display `counter` for the form group.
@@ -67,7 +67,7 @@ export interface NFormGroupProps {
67
67
  *
68
68
  * @example
69
69
  * counter="{ value: 0, max: 100 }"
70
- */
70
+ */
71
71
  counter?: {
72
72
  value: number;
73
73
  max?: number;
@@ -76,7 +76,7 @@ export interface NFormGroupProps {
76
76
  * `UnaUI` preset configuration
77
77
  *
78
78
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/form-group.ts
79
- */
79
+ */
80
80
  una?: {
81
81
  formGroupTopWrapper?: string;
82
82
  formGroupTopWrapperInner?: string;
@@ -4,6 +4,6 @@ export interface NIconProps {
4
4
  *
5
5
  * @example
6
6
  * 'i-heroicons-chevron-up'
7
- */
7
+ */
8
8
  name: string;
9
9
  }
@@ -14,3 +14,27 @@ export * from './nav-link';
14
14
  export * from './nav-link-group';
15
15
  export * from './link';
16
16
  export * from './radio';
17
+ export * from './checkbox';
18
+ export interface Colors {
19
+ [key: string]: string;
20
+ }
21
+ export interface ColorPalette {
22
+ 50: string;
23
+ 100: string;
24
+ 200: string;
25
+ 300: string;
26
+ 400: string;
27
+ 500: string;
28
+ 600: string;
29
+ 700: string;
30
+ 800: string;
31
+ 900: string;
32
+ 950: string;
33
+ }
34
+ export interface UnaSettings {
35
+ primaryColors: Colors;
36
+ grayColors: Colors;
37
+ primary: string;
38
+ gray: string;
39
+ fontSize: number;
40
+ }
@@ -14,3 +14,4 @@ export * from "./nav-link.mjs";
14
14
  export * from "./nav-link-group.mjs";
15
15
  export * from "./link.mjs";
16
16
  export * from "./radio.mjs";
17
+ export * from "./checkbox.mjs";
@@ -3,7 +3,7 @@ export interface NIndicatorProps {
3
3
  * Set the size of the indicator.
4
4
  *
5
5
  * @default 'md'
6
- */
6
+ */
7
7
  size?: string;
8
8
  /**
9
9
  * Allows you to add `UnaUI` button preset properties,
@@ -12,32 +12,32 @@ export interface NIndicatorProps {
12
12
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/indicator.ts
13
13
  * @example
14
14
  * indicator="solid-green top-right"
15
- */
15
+ */
16
16
  indicator?: string;
17
17
  /**
18
18
  * Add a label to the indicator.
19
19
  *
20
20
  * @example
21
21
  * label="new"
22
- */
22
+ */
23
23
  label?: string;
24
24
  /**
25
25
  * Add ping animation to the indicator.
26
26
  *
27
27
  * @default false
28
- */
28
+ */
29
29
  ping?: boolean;
30
30
  /**
31
31
  * Set visibility of the indicator.
32
32
  *
33
33
  * @default true
34
- */
34
+ */
35
35
  visible?: boolean;
36
36
  /**
37
- * `UnaUI` preset configuration
38
- *
39
- * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/indicator.ts
40
- */
37
+ * `UnaUI` preset configuration
38
+ *
39
+ * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/indicator.ts
40
+ */
41
41
  una?: {
42
42
  indicator?: string;
43
43
  indicatorWrapper?: string;
@@ -2,44 +2,44 @@ export interface NInputProps {
2
2
  /**
3
3
  *
4
4
  * @default null
5
- */
6
- type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
5
+ */
6
+ type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url' | 'textarea' | '';
7
7
  /**
8
8
  * Update the input status.
9
9
  * Useful for validations.
10
10
  *
11
11
  * @default null
12
- */
12
+ */
13
13
  status?: 'info' | 'success' | 'warning' | 'error';
14
14
  /**
15
15
  * Add loading state to the input.
16
16
  *
17
17
  * @default false
18
- */
18
+ */
19
19
  loading?: boolean;
20
20
  /**
21
21
  * Swap the position of the leading and trailing icons.
22
22
  *
23
23
  * @default false
24
- */
24
+ */
25
25
  reverse?: boolean;
26
26
  /**
27
27
  * Value of the input.
28
28
  *
29
29
  * @default null
30
- */
30
+ */
31
31
  modelValue?: string | number;
32
32
  /**
33
33
  * Display leading icon.
34
34
  *
35
35
  * @default null
36
- */
36
+ */
37
37
  leading?: string;
38
38
  /**
39
39
  * Display trailing icon.
40
40
  *
41
41
  * @default null
42
- */
42
+ */
43
43
  trailing?: string;
44
44
  /**
45
45
  * Allows you to add `UnaUI` input preset properties,
@@ -48,16 +48,16 @@ export interface NInputProps {
48
48
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/input.ts
49
49
  * @example
50
50
  * input="solid-green"
51
- */
51
+ */
52
52
  input?: string;
53
53
  /**
54
54
  * Allows you to change the size of the input.
55
55
  *
56
- * @default size="sm"
56
+ * @default sm
57
57
  *
58
58
  * @example
59
59
  * size="sm" | size="2cm" | size="2rem" | size="2px"
60
- */
60
+ */
61
61
  size?: string;
62
62
  /**
63
63
  * Manually set the id attribute.
@@ -67,13 +67,42 @@ export interface NInputProps {
67
67
  * @default randomId
68
68
  * @example
69
69
  * id="email"
70
- */
70
+ */
71
71
  id?: string;
72
+ /**
73
+ * Automatically resize the textarea to fit the content.
74
+ * This property only works with the `textarea` type.
75
+ *
76
+ * @default false
77
+ */
78
+ autoresize?: boolean | number;
79
+ /**
80
+ * This property only works with the `textarea` type.
81
+ * You can add your own resize preset or use the default one.
82
+ *
83
+ * @default none
84
+ *
85
+ * @example
86
+ * resize="x" | resize="y" | resize="none" | null
87
+ */
88
+ resize?: string | null;
89
+ /**
90
+ * This property only works with the `textarea` type.
91
+ *
92
+ * @default 3
93
+ */
94
+ rows?: number;
95
+ /**
96
+ * This property only works with the `textarea` type.
97
+ *
98
+ * @default 3
99
+ */
100
+ cols?: number;
72
101
  /**
73
102
  * `UnaUI` preset configuration
74
103
  *
75
104
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/input.ts
76
- */
105
+ */
77
106
  una?: {
78
107
  input?: string;
79
108
  inputLoading?: string;
@@ -6,20 +6,20 @@ export interface NKbdProps {
6
6
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/kbd.ts
7
7
  * @example
8
8
  * kbd="solid-error"
9
- */
9
+ */
10
10
  kbd?: string;
11
11
  /**
12
12
  * Add a label to the kbd.
13
13
  *
14
14
  * @example
15
15
  * label="Ctrl"
16
- */
16
+ */
17
17
  label?: string;
18
18
  /**
19
19
  * `UnaUI` preset configuration
20
20
  *
21
21
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/kbd.ts
22
- */
22
+ */
23
23
  una?: {
24
24
  kbd?: string;
25
25
  };
@@ -3,24 +3,33 @@ export interface NLinkProps {
3
3
  * Manually enable/disable the exact match
4
4
  *
5
5
  * @default false
6
- */
6
+ */
7
7
  exact?: boolean;
8
8
  /**
9
9
  * Manually enable/disable the exact match for the query string
10
10
  *
11
11
  * @default false
12
- */
12
+ */
13
13
  exactQuery?: boolean;
14
14
  /**
15
15
  * Manually enable/disable the exact match for the hash
16
16
  *
17
17
  * @default false
18
- */
18
+ */
19
19
  exactHash?: boolean;
20
20
  /**
21
21
  * Active classes to apply when the link is inactive
22
22
  *
23
23
  * @example 'text-primary'
24
- */
24
+ */
25
25
  inactiveClass?: string;
26
+ /**
27
+ * Useful in combination with `NavLink` to apply the active class to the parent element
28
+ *
29
+ */
30
+ navLinkActive?: string;
31
+ /**
32
+ * Useful in combination with `NavLink` to apply the inactive class to the parent element
33
+ */
34
+ navLinkInactive?: string;
26
35
  }
@@ -1,5 +1,14 @@
1
1
  import type { NBadgeProps } from './badge';
2
2
  import type { NButtonProps } from './button';
3
- export interface NNavLinkProps extends NButtonProps {
3
+ export interface NNavLinkProps extends Omit<NButtonProps, 'una'> {
4
+ navLink?: string;
5
+ navLinkInactive?: string;
6
+ navLinkActive?: string;
4
7
  badge?: NBadgeProps;
8
+ una?: {
9
+ navLinkDefaultVariant?: string;
10
+ navLink?: string;
11
+ navLinkActive?: string;
12
+ navLinkInactive?: string;
13
+ } & NButtonProps['una'];
5
14
  }
@@ -3,13 +3,13 @@ export interface NRadioProps {
3
3
  * Disable the radio.
4
4
  *
5
5
  * @default false
6
- */
6
+ */
7
7
  disabled?: boolean;
8
8
  /**
9
9
  * Switch the position of label and radio.
10
10
  *
11
11
  * @default false
12
- */
12
+ */
13
13
  reverse?: boolean;
14
14
  /**
15
15
  * Allows you to add `UnaUI` radio preset properties,
@@ -18,19 +18,19 @@ export interface NRadioProps {
18
18
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/radio.ts
19
19
  * @example
20
20
  * radio="green"
21
- */
21
+ */
22
22
  radio?: string;
23
23
  /**
24
24
  * v-model binding value if the radio is checked.
25
25
  *
26
26
  * @default null
27
- */
27
+ */
28
28
  modelValue?: string | number | boolean | Record<string, any>;
29
29
  /**
30
30
  * Add name attribute to the radio.
31
31
  *
32
32
  * @default null
33
- */
33
+ */
34
34
  name?: string;
35
35
  /**
36
36
  * Manually set the id attribute.
@@ -40,7 +40,7 @@ export interface NRadioProps {
40
40
  * @default randomId
41
41
  * @example
42
42
  * id="options"
43
- */
43
+ */
44
44
  id?: string;
45
45
  /**
46
46
  * Manually set the for attribute.
@@ -50,20 +50,20 @@ export interface NRadioProps {
50
50
  * @default randomId
51
51
  * @example
52
52
  * for="options"
53
- */
53
+ */
54
54
  for?: string;
55
55
  /**
56
56
  * Value of the radio.
57
57
  *
58
58
  * @example
59
59
  * value="1"
60
- */
60
+ */
61
61
  value?: string;
62
62
  /**
63
63
  * Display label of the radio.
64
64
  *
65
65
  * @default null
66
- */
66
+ */
67
67
  label?: string;
68
68
  /**
69
69
  * Allows you to change the size of the radio.
@@ -72,18 +72,17 @@ export interface NRadioProps {
72
72
  *
73
73
  * @example
74
74
  * size="sm" | size="2cm" | size="2rem" | size="2px"
75
- */
75
+ */
76
76
  size?: string;
77
77
  /**
78
78
  * `UnaUI` preset configuration
79
79
  *
80
80
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/radio.ts
81
- */
81
+ */
82
82
  una?: {
83
83
  radio?: string;
84
84
  radioWrapper?: string;
85
85
  radioLabel?: string;
86
- radioPeerFocus?: string;
87
86
  radioIconBase?: string;
88
87
  radioIcon?: string;
89
88
  };
@@ -3,26 +3,26 @@ export interface NSwitchProps {
3
3
  * Value of the switch.
4
4
  *
5
5
  * @default null
6
- */
6
+ */
7
7
  modelValue?: boolean;
8
8
  /**
9
9
  * Disable the switch from being clicked.
10
10
  *
11
11
  * @default false
12
- */
12
+ */
13
13
  disabled?: boolean;
14
14
  /**
15
15
  * Add a loading indicator to the switch.
16
16
  * This will also disable the switch.
17
17
  *
18
18
  * @default false
19
- */
19
+ */
20
20
  loading?: boolean;
21
21
  /**
22
22
  * Display the slider thumb outside of the track.
23
23
  *
24
24
  * @default false
25
- */
25
+ */
26
26
  outset?: boolean;
27
27
  /**
28
28
  * Allows you to add `UnaUI` switch preset properties,
@@ -30,7 +30,7 @@ export interface NSwitchProps {
30
30
  *
31
31
  * @example
32
32
  * switch="xl green focus"
33
- */
33
+ */
34
34
  switch?: string;
35
35
  /**
36
36
  * Allows you to display an icon when the switch is on.
@@ -38,7 +38,7 @@ export interface NSwitchProps {
38
38
  *
39
39
  * @example
40
40
  * icon="i-heroicons-check-20-solid text-white"
41
- */
41
+ */
42
42
  onIcon?: string;
43
43
  /**
44
44
  * Allows you to display an icon when the switch is off.
@@ -46,13 +46,13 @@ export interface NSwitchProps {
46
46
  *
47
47
  * @example
48
48
  * icon="i-heroicons-x-mark-20-solid text-white"
49
- */
49
+ */
50
50
  offIcon?: string;
51
51
  /**
52
52
  * `UnaUI` preset configuration
53
53
  *
54
54
  * @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/switch.ts
55
- */
55
+ */
56
56
  una?: {
57
57
  switchThumb?: string;
58
58
  switchThumbOn?: string;
@@ -4,16 +4,16 @@ export declare function randomId(prefix: string): string;
4
4
  export declare function omitProps<T extends Record<string, any>>(obj: T, propsToOmit: Array<keyof T>): Partial<T>;
5
5
  export declare function pickProps<T extends Record<string, any>>(obj: T, propsToPick: Array<keyof T>): Partial<T>;
6
6
  /**
7
- * We want to get the first non-undefined value,
8
- * useful for arguments with multiple sources (local, global, default),
9
- * this is basically an alternative for `local ?? global ?? default`.
10
- * I prefer this approach because it's more readable and easier to extend for more sources.
11
- *
12
- * @param args - values to check
13
- * @example
14
- * ```ts
15
- * const value = getPriority(specificValue, globalValue, defaultValue)
16
- * ```
17
- * @returns first non-undefined value
18
- */
7
+ * We want to get the first non-undefined value,
8
+ * useful for arguments with multiple sources (local, global, default),
9
+ * this is basically an alternative for `local ?? global ?? default`.
10
+ * I prefer this approach because it's more readable and easier to extend for more sources.
11
+ *
12
+ * @param args - values to check
13
+ * @example
14
+ * ```ts
15
+ * const value = getPriority(specificValue, globalValue, defaultValue)
16
+ * ```
17
+ * @returns first non-undefined value
18
+ */
19
19
  export declare function getPriority<T>(...args: (T | undefined)[]): T | undefined;
@@ -0,0 +1,16 @@
1
+
2
+ import type { ModuleOptions } from './module'
3
+
4
+
5
+ declare module '@nuxt/schema' {
6
+ interface NuxtConfig { ['una']?: Partial<ModuleOptions> }
7
+ interface NuxtOptions { ['una']?: ModuleOptions }
8
+ }
9
+
10
+ declare module 'nuxt/schema' {
11
+ interface NuxtConfig { ['una']?: Partial<ModuleOptions> }
12
+ interface NuxtOptions { ['una']?: ModuleOptions }
13
+ }
14
+
15
+
16
+ export type { ModuleOptions, default } from './module'
package/dist/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
 
2
- import { ModuleOptions } from './module'
2
+ import type { ModuleOptions } from './module'
3
+
3
4
 
4
5
  declare module '@nuxt/schema' {
5
6
  interface NuxtConfig { ['una']?: Partial<ModuleOptions> }
@@ -12,4 +13,4 @@ declare module 'nuxt/schema' {
12
13
  }
13
14
 
14
15
 
15
- export { ModuleOptions, default } from './module'
16
+ export type { ModuleOptions, default } from './module'
@@ -0,0 +1,5 @@
1
+ import { UnocssNuxtOptions } from '@unocss/nuxt';
2
+
3
+ declare function extendUnocssOptions(user?: UnocssNuxtOptions): UnocssNuxtOptions;
4
+
5
+ export { extendUnocssOptions as default };
@@ -0,0 +1,5 @@
1
+ import { UnocssNuxtOptions } from '@unocss/nuxt';
2
+
3
+ declare function extendUnocssOptions(user?: UnocssNuxtOptions): UnocssNuxtOptions;
4
+
5
+ export { extendUnocssOptions as default };
@@ -0,0 +1,35 @@
1
+ import { presetUno, presetAttributify, presetIcons, transformerDirectives, transformerVariantGroup } from 'unocss';
2
+ import presetUna from '@una-ui/preset';
3
+ import prefixes from '@una-ui/preset/prefixes';
4
+ import extratorUna from '@una-ui/extractor-vue-script';
5
+
6
+ function extendUnocssOptions(user = {}) {
7
+ return {
8
+ ...user,
9
+ preflight: false,
10
+ presets: [
11
+ presetUno(),
12
+ presetAttributify(),
13
+ presetIcons({
14
+ scale: 1.2,
15
+ extraProperties: {
16
+ "display": "inline-block",
17
+ "vertical-align": "middle"
18
+ }
19
+ }),
20
+ presetUna(),
21
+ ...user.presets || []
22
+ ],
23
+ extractors: [
24
+ extratorUna({
25
+ prefixes
26
+ })
27
+ ],
28
+ transformers: [
29
+ transformerDirectives(),
30
+ transformerVariantGroup()
31
+ ]
32
+ };
33
+ }
34
+
35
+ export { extendUnocssOptions as default };