@nonsuch/component-library 0.4.0 → 0.6.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.
- package/README.md +34 -21
- package/dist/components/NsAvatar/NsAvatar.vue.d.ts +40 -0
- package/dist/components/NsAvatar/index.d.ts +1 -0
- package/dist/components/NsBanner/NsBanner.vue.d.ts +30 -0
- package/dist/components/NsBanner/index.d.ts +1 -0
- package/dist/components/NsButton/NsButton.vue.d.ts +42 -0
- package/dist/components/NsButton/index.d.ts +1 -0
- package/dist/components/NsCard/NsCard.vue.d.ts +35 -0
- package/dist/components/NsCard/index.d.ts +1 -0
- package/dist/components/NsCheckbox/NsCheckbox.vue.d.ts +30 -0
- package/dist/components/NsCheckbox/index.d.ts +1 -0
- package/dist/components/NsChip/NsChip.vue.d.ts +44 -0
- package/dist/components/NsChip/index.d.ts +1 -0
- package/dist/components/NsDialog/NsDialog.vue.d.ts +42 -0
- package/dist/components/NsDialog/index.d.ts +1 -0
- package/dist/components/NsForm/NsForm.vue.d.ts +34 -0
- package/dist/components/NsForm/index.d.ts +1 -0
- package/dist/components/NsInput/NsInput.vue.d.ts +42 -0
- package/dist/components/NsInput/index.d.ts +1 -0
- package/dist/components/NsList/NsList.vue.d.ts +34 -0
- package/dist/components/NsList/index.d.ts +1 -0
- package/dist/components/NsSelect/NsSelect.vue.d.ts +59 -0
- package/dist/components/NsSelect/index.d.ts +1 -0
- package/dist/components/NsSkeleton/NsSkeleton.vue.d.ts +33 -0
- package/dist/components/NsSkeleton/index.d.ts +2 -0
- package/dist/components/NsThemeProvider/NsThemeProvider.vue.d.ts +36 -0
- package/dist/components/NsThemeProvider/index.d.ts +1 -0
- package/dist/components/NsToggle/NsToggle.vue.d.ts +30 -0
- package/dist/components/NsToggle/index.d.ts +1 -0
- package/dist/components/NsTooltip/NsTooltip.vue.d.ts +35 -0
- package/dist/components/NsTooltip/index.d.ts +1 -0
- package/dist/composables/index.d.ts +4 -0
- package/dist/composables/useNsDarkMode.d.ts +37 -0
- package/dist/composables/useNsDefaults.d.ts +25 -0
- package/dist/composables/useNsLocale.d.ts +28 -0
- package/dist/index.d.ts +43 -0
- package/dist/locale/NsLocaleMessages.d.ts +58 -0
- package/dist/locale/en-CA.d.ts +8 -0
- package/dist/locale/fr-CA.d.ts +5 -0
- package/dist/locale/index.d.ts +3 -0
- package/dist/nonsuch-components.css +1 -1
- package/dist/nonsuch-components.js +473 -132
- package/dist/plugin.d.ts +42 -0
- package/dist/quasarConfig.d.ts +41 -0
- package/dist/tokens/index.d.ts +20 -0
- package/package.json +16 -6
package/README.md
CHANGED
|
@@ -35,8 +35,8 @@ import '@nonsuch/component-library/tokens.css'
|
|
|
35
35
|
import 'quasar/src/css/index.sass'
|
|
36
36
|
|
|
37
37
|
const app = createApp(App)
|
|
38
|
-
app.use(Quasar, createQuasarConfig())
|
|
39
|
-
app.use(createNonsuch())
|
|
38
|
+
app.use(Quasar, createQuasarConfig()) // Token-aligned Quasar brand colours
|
|
39
|
+
app.use(createNonsuch()) // Locale + library setup
|
|
40
40
|
app.mount('#app')
|
|
41
41
|
```
|
|
42
42
|
|
|
@@ -74,10 +74,13 @@ app.use(createNonsuch({ locale: nsLocaleFrCA }))
|
|
|
74
74
|
```ts
|
|
75
75
|
import { createQuasarConfig } from '@nonsuch/component-library'
|
|
76
76
|
|
|
77
|
-
app.use(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
77
|
+
app.use(
|
|
78
|
+
Quasar,
|
|
79
|
+
createQuasarConfig({
|
|
80
|
+
brand: { primary: '#1a73e8' },
|
|
81
|
+
plugins: { Notify: {} },
|
|
82
|
+
}),
|
|
83
|
+
)
|
|
81
84
|
```
|
|
82
85
|
|
|
83
86
|
### Dark Mode
|
|
@@ -243,24 +246,34 @@ pnpm build:storybook
|
|
|
243
246
|
|
|
244
247
|
## Project Structure
|
|
245
248
|
|
|
246
|
-
```
|
|
249
|
+
```text
|
|
247
250
|
src/
|
|
248
|
-
index.ts
|
|
249
|
-
plugin.ts
|
|
250
|
-
quasarConfig.ts
|
|
251
|
+
index.ts # Library entry — exports all public API
|
|
252
|
+
plugin.ts # createNonsuch() Vue plugin
|
|
253
|
+
quasarConfig.ts # createQuasarConfig() helper
|
|
251
254
|
components/
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
NsAvatar/ # Avatar with size presets
|
|
256
|
+
NsBanner/ # Info/success/warning/error banners
|
|
257
|
+
NsButton/ # Styled QBtn wrapper
|
|
258
|
+
NsCard/ # Card with title/subtitle/actions slots
|
|
259
|
+
NsCheckbox/ # Styled QCheckbox wrapper
|
|
260
|
+
NsChip/ # Tag/filter chip
|
|
261
|
+
NsDialog/ # Modal dialog with header/body/actions
|
|
262
|
+
NsForm/ # Form wrapper with validation
|
|
263
|
+
NsInput/ # Styled QInput wrapper
|
|
264
|
+
NsList/ # List with separator defaults
|
|
265
|
+
NsSelect/ # Styled QSelect dropdown
|
|
266
|
+
NsSkeleton/ # Loading skeleton with animation
|
|
267
|
+
NsThemeProvider/ # Renderless locale provider
|
|
268
|
+
NsToggle/ # Styled QToggle switch
|
|
269
|
+
NsTooltip/ # Tooltip with consistent delays
|
|
257
270
|
composables/
|
|
258
|
-
useNsLocale.ts
|
|
259
|
-
useNsDarkMode.ts
|
|
260
|
-
useNsDefaults.ts
|
|
261
|
-
locale/
|
|
262
|
-
tokens/
|
|
263
|
-
fonts/
|
|
271
|
+
useNsLocale.ts # Locale injection/provision
|
|
272
|
+
useNsDarkMode.ts # Dark mode with persistence
|
|
273
|
+
useNsDefaults.ts # Default value helper
|
|
274
|
+
locale/ # en-CA, fr-CA string packs
|
|
275
|
+
tokens/ # Design token CSS + TS helpers
|
|
276
|
+
fonts/ # Fixel font files + CSS
|
|
264
277
|
```
|
|
265
278
|
|
|
266
279
|
Each custom component lives in its own directory with co-located story and test files. The `Ns` prefix distinguishes library components from Quasar's `Q` prefix.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsAvatar — A styled avatar wrapping Quasar's QAvatar.
|
|
3
|
+
*
|
|
4
|
+
* Provides Nonsuch size presets and token-based colours.
|
|
5
|
+
*/
|
|
6
|
+
export type NsAvatarSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
+
export interface NsAvatarProps {
|
|
8
|
+
/** Avatar size preset */
|
|
9
|
+
size?: NsAvatarSize;
|
|
10
|
+
/** Background colour */
|
|
11
|
+
color?: string;
|
|
12
|
+
/** Text/icon colour */
|
|
13
|
+
textColor?: string;
|
|
14
|
+
/** Apply rounded (circle) shape */
|
|
15
|
+
rounded?: boolean;
|
|
16
|
+
/** Apply square shape */
|
|
17
|
+
square?: boolean;
|
|
18
|
+
/** Accessible label — omit for decorative avatars (hides from screen readers) */
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
}
|
|
21
|
+
declare var __VLS_8: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_8) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<NsAvatarProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NsAvatarProps> & Readonly<{}>, {
|
|
26
|
+
color: string;
|
|
27
|
+
size: NsAvatarSize;
|
|
28
|
+
rounded: boolean;
|
|
29
|
+
square: boolean;
|
|
30
|
+
ariaLabel: string;
|
|
31
|
+
textColor: string;
|
|
32
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
|
+
declare const _default: typeof __VLS_export;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsAvatar } from './NsAvatar.vue';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type NsBannerType = 'info' | 'success' | 'warning' | 'error';
|
|
2
|
+
export interface NsBannerProps {
|
|
3
|
+
/** Semantic type controlling the banner colour */
|
|
4
|
+
type?: NsBannerType;
|
|
5
|
+
/** Use dense (compact) layout */
|
|
6
|
+
dense?: boolean;
|
|
7
|
+
/** Apply rounded border-radius */
|
|
8
|
+
rounded?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare var __VLS_9: {}, __VLS_11: {}, __VLS_14: {};
|
|
11
|
+
type __VLS_Slots = {} & {
|
|
12
|
+
avatar?: (props: typeof __VLS_9) => any;
|
|
13
|
+
} & {
|
|
14
|
+
default?: (props: typeof __VLS_11) => any;
|
|
15
|
+
} & {
|
|
16
|
+
action?: (props: typeof __VLS_14) => any;
|
|
17
|
+
};
|
|
18
|
+
declare const __VLS_base: import("vue").DefineComponent<NsBannerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NsBannerProps> & Readonly<{}>, {
|
|
19
|
+
rounded: boolean;
|
|
20
|
+
type: NsBannerType;
|
|
21
|
+
dense: boolean;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsBanner } from './NsBanner.vue';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsButton - A styled button wrapping Quasar's QBtn.
|
|
3
|
+
*
|
|
4
|
+
* Provides opinionated defaults: no uppercase text,
|
|
5
|
+
* unelevated style, and rounded edges.
|
|
6
|
+
*/
|
|
7
|
+
export interface NsButtonProps {
|
|
8
|
+
/** Quasar color name (from the palette) */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Button size: xs | sm | md | lg | xl */
|
|
11
|
+
size?: string;
|
|
12
|
+
/** Remove box-shadow elevation */
|
|
13
|
+
unelevated?: boolean;
|
|
14
|
+
/** Disable uppercase text transform */
|
|
15
|
+
noCaps?: boolean;
|
|
16
|
+
/** Apply rounded border-radius */
|
|
17
|
+
rounded?: boolean;
|
|
18
|
+
/** Show a loading spinner overlay */
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare var __VLS_8: {}, __VLS_11: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_8) => any;
|
|
24
|
+
} & {
|
|
25
|
+
loading?: (props: typeof __VLS_11) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_base: import("vue").DefineComponent<NsButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NsButtonProps> & Readonly<{}>, {
|
|
28
|
+
color: string;
|
|
29
|
+
size: string;
|
|
30
|
+
unelevated: boolean;
|
|
31
|
+
noCaps: boolean;
|
|
32
|
+
rounded: boolean;
|
|
33
|
+
loading: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsButton } from './NsButton.vue';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsCard — A styled card wrapping Quasar's QCard.
|
|
3
|
+
*
|
|
4
|
+
* Provides opinionated defaults: rounded corners via design tokens,
|
|
5
|
+
* subtle shadow, and standard header/body/actions slot layout.
|
|
6
|
+
*/
|
|
7
|
+
export interface NsCardProps {
|
|
8
|
+
/** Card title shown in the header section */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** Subtitle shown below the title */
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
/** Remove box-shadow for a flat appearance */
|
|
13
|
+
flat?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_14: {}, __VLS_22: {}, __VLS_30: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
header?: (props: typeof __VLS_14) => any;
|
|
18
|
+
} & {
|
|
19
|
+
default?: (props: typeof __VLS_22) => any;
|
|
20
|
+
} & {
|
|
21
|
+
actions?: (props: typeof __VLS_30) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_base: import("vue").DefineComponent<NsCardProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NsCardProps> & Readonly<{}>, {
|
|
24
|
+
flat: boolean;
|
|
25
|
+
title: string;
|
|
26
|
+
subtitle: string;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
31
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
32
|
+
new (): {
|
|
33
|
+
$slots: S;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsCard } from './NsCard.vue';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsCheckbox — A styled checkbox wrapping Quasar's QCheckbox.
|
|
3
|
+
*
|
|
4
|
+
* Provides opinionated defaults: token-based colours and font styling.
|
|
5
|
+
*/
|
|
6
|
+
export interface NsCheckboxProps {
|
|
7
|
+
/** Checkbox label text */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** v-model value */
|
|
10
|
+
modelValue?: boolean;
|
|
11
|
+
/** Quasar colour name */
|
|
12
|
+
color?: string;
|
|
13
|
+
/** Use dense (compact) size */
|
|
14
|
+
dense?: boolean;
|
|
15
|
+
/** Disable the checkbox */
|
|
16
|
+
disable?: boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const __VLS_export: import("vue").DefineComponent<NsCheckboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
19
|
+
"update:modelValue": (value: boolean) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<NsCheckboxProps> & Readonly<{
|
|
21
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
|
+
}>, {
|
|
23
|
+
color: string;
|
|
24
|
+
label: string;
|
|
25
|
+
modelValue: boolean;
|
|
26
|
+
dense: boolean;
|
|
27
|
+
disable: boolean;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const _default: typeof __VLS_export;
|
|
30
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsCheckbox } from './NsCheckbox.vue';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsChip — A styled chip wrapping Quasar's QChip.
|
|
3
|
+
*
|
|
4
|
+
* Useful for tags, filters, and selections with
|
|
5
|
+
* token-based styling.
|
|
6
|
+
*/
|
|
7
|
+
export interface NsChipProps {
|
|
8
|
+
/** Background colour */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** Text colour */
|
|
11
|
+
textColor?: string;
|
|
12
|
+
/** Use outline style */
|
|
13
|
+
outline?: boolean;
|
|
14
|
+
/** Use dense (compact) size */
|
|
15
|
+
dense?: boolean;
|
|
16
|
+
/** Show a remove button */
|
|
17
|
+
removable?: boolean;
|
|
18
|
+
/** Make the chip clickable */
|
|
19
|
+
clickable?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare var __VLS_10: {};
|
|
22
|
+
type __VLS_Slots = {} & {
|
|
23
|
+
default?: (props: typeof __VLS_10) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<NsChipProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
remove: () => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<NsChipProps> & Readonly<{
|
|
28
|
+
onRemove?: (() => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
color: string;
|
|
31
|
+
dense: boolean;
|
|
32
|
+
textColor: string;
|
|
33
|
+
outline: boolean;
|
|
34
|
+
removable: boolean;
|
|
35
|
+
clickable: boolean;
|
|
36
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
40
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsChip } from './NsChip.vue';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsDialog — A styled dialog wrapping Quasar's QDialog.
|
|
3
|
+
*
|
|
4
|
+
* Provides a consistent header/body/actions layout with
|
|
5
|
+
* token-based styling. Uses a QCard internally for structure.
|
|
6
|
+
*/
|
|
7
|
+
export interface NsDialogProps {
|
|
8
|
+
/** v-model to show/hide the dialog */
|
|
9
|
+
modelValue?: boolean;
|
|
10
|
+
/** Dialog title shown in the header */
|
|
11
|
+
title?: string;
|
|
12
|
+
/** Prevent closing by pressing Escape */
|
|
13
|
+
persistent?: boolean;
|
|
14
|
+
/** Prevent closing by clicking backdrop */
|
|
15
|
+
noBackdropDismiss?: boolean;
|
|
16
|
+
}
|
|
17
|
+
declare var __VLS_22: {}, __VLS_30: {}, __VLS_38: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
header?: (props: typeof __VLS_22) => any;
|
|
20
|
+
} & {
|
|
21
|
+
default?: (props: typeof __VLS_30) => any;
|
|
22
|
+
} & {
|
|
23
|
+
actions?: (props: typeof __VLS_38) => any;
|
|
24
|
+
};
|
|
25
|
+
declare const __VLS_base: import("vue").DefineComponent<NsDialogProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
26
|
+
"update:modelValue": (value: boolean) => any;
|
|
27
|
+
}, string, import("vue").PublicProps, Readonly<NsDialogProps> & Readonly<{
|
|
28
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
modelValue: boolean;
|
|
31
|
+
title: string;
|
|
32
|
+
persistent: boolean;
|
|
33
|
+
noBackdropDismiss: boolean;
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsDialog } from './NsDialog.vue';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsForm — A lightweight form wrapper around Quasar's QForm.
|
|
3
|
+
*
|
|
4
|
+
* Provides validation orchestration with a greedy default
|
|
5
|
+
* (validates all fields, not just until the first error).
|
|
6
|
+
*/
|
|
7
|
+
export interface NsFormProps {
|
|
8
|
+
/** Validate all fields even after the first error */
|
|
9
|
+
greedy?: boolean;
|
|
10
|
+
/** Accessible label for the form */
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
}
|
|
13
|
+
declare var __VLS_11: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_11) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<NsFormProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
|
+
submit: (event: Event) => any;
|
|
19
|
+
validationError: (ref: unknown) => any;
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<NsFormProps> & Readonly<{
|
|
21
|
+
onSubmit?: ((event: Event) => any) | undefined;
|
|
22
|
+
onValidationError?: ((ref: unknown) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
greedy: boolean;
|
|
25
|
+
ariaLabel: string;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsForm } from './NsForm.vue';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsInput — A styled text input wrapping Quasar's QInput.
|
|
3
|
+
*
|
|
4
|
+
* Provides opinionated defaults: outlined style, rounded corners,
|
|
5
|
+
* and Fixel font via design tokens.
|
|
6
|
+
*/
|
|
7
|
+
import type { ValidationRule } from 'quasar';
|
|
8
|
+
export interface NsInputProps {
|
|
9
|
+
/** Input label text */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** v-model value */
|
|
12
|
+
modelValue?: string;
|
|
13
|
+
/** Use outlined style */
|
|
14
|
+
outlined?: boolean;
|
|
15
|
+
/** Use dense (compact) size */
|
|
16
|
+
dense?: boolean;
|
|
17
|
+
/** Validation rules — array of Quasar validation rules */
|
|
18
|
+
rules?: ValidationRule[];
|
|
19
|
+
}
|
|
20
|
+
declare var __VLS_12: string, __VLS_13: any;
|
|
21
|
+
type __VLS_Slots = {} & {
|
|
22
|
+
[K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any;
|
|
23
|
+
};
|
|
24
|
+
declare const __VLS_base: import("vue").DefineComponent<NsInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
25
|
+
"update:modelValue": (value: string | number | null) => any;
|
|
26
|
+
}, string, import("vue").PublicProps, Readonly<NsInputProps> & Readonly<{
|
|
27
|
+
"onUpdate:modelValue"?: ((value: string | number | null) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
label: string;
|
|
30
|
+
modelValue: string;
|
|
31
|
+
outlined: boolean;
|
|
32
|
+
dense: boolean;
|
|
33
|
+
rules: ValidationRule[];
|
|
34
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
35
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsInput } from './NsInput.vue';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsList — A styled list wrapping Quasar's QList.
|
|
3
|
+
*
|
|
4
|
+
* Provides opinionated defaults: separator enabled for visual clarity,
|
|
5
|
+
* token-based font styling. Use with QItem/QItemSection from Quasar directly.
|
|
6
|
+
*/
|
|
7
|
+
export interface NsListProps {
|
|
8
|
+
/** Show a border around the list */
|
|
9
|
+
bordered?: boolean;
|
|
10
|
+
/** Show separators between items */
|
|
11
|
+
separator?: boolean;
|
|
12
|
+
/** Use dense (compact) spacing */
|
|
13
|
+
dense?: boolean;
|
|
14
|
+
/** Accessible label for the list */
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
}
|
|
17
|
+
declare var __VLS_8: {};
|
|
18
|
+
type __VLS_Slots = {} & {
|
|
19
|
+
default?: (props: typeof __VLS_8) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_base: import("vue").DefineComponent<NsListProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NsListProps> & Readonly<{}>, {
|
|
22
|
+
bordered: boolean;
|
|
23
|
+
dense: boolean;
|
|
24
|
+
ariaLabel: string;
|
|
25
|
+
separator: boolean;
|
|
26
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsList } from './NsList.vue';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsSelect — A styled select/dropdown wrapping Quasar's QSelect.
|
|
3
|
+
*
|
|
4
|
+
* Provides opinionated defaults: outlined style, rounded corners,
|
|
5
|
+
* and Fixel font via design tokens.
|
|
6
|
+
*/
|
|
7
|
+
import type { ValidationRule } from 'quasar';
|
|
8
|
+
export type NsSelectOption = string | {
|
|
9
|
+
label: string;
|
|
10
|
+
value: unknown;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export interface NsSelectProps {
|
|
14
|
+
/** Select label text */
|
|
15
|
+
label?: string;
|
|
16
|
+
/** v-model value */
|
|
17
|
+
modelValue?: unknown;
|
|
18
|
+
/** Dropdown options */
|
|
19
|
+
options?: NsSelectOption[];
|
|
20
|
+
/** Use outlined style */
|
|
21
|
+
outlined?: boolean;
|
|
22
|
+
/** Use dense (compact) size */
|
|
23
|
+
dense?: boolean;
|
|
24
|
+
/** Allow multiple selections */
|
|
25
|
+
multiple?: boolean;
|
|
26
|
+
/** Emit only the value instead of the full option object */
|
|
27
|
+
emitValue?: boolean;
|
|
28
|
+
/** Map values to labels when using emit-value */
|
|
29
|
+
mapOptions?: boolean;
|
|
30
|
+
/** Validation rules — array of Quasar validation rules */
|
|
31
|
+
rules?: ValidationRule[];
|
|
32
|
+
}
|
|
33
|
+
declare var __VLS_12: string, __VLS_13: any;
|
|
34
|
+
type __VLS_Slots = {} & {
|
|
35
|
+
[K in NonNullable<typeof __VLS_12>]?: (props: typeof __VLS_13) => any;
|
|
36
|
+
};
|
|
37
|
+
declare const __VLS_base: import("vue").DefineComponent<NsSelectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
+
"update:modelValue": (value: unknown) => any;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<NsSelectProps> & Readonly<{
|
|
40
|
+
"onUpdate:modelValue"?: ((value: unknown) => any) | undefined;
|
|
41
|
+
}>, {
|
|
42
|
+
label: string;
|
|
43
|
+
modelValue: undefined;
|
|
44
|
+
outlined: boolean;
|
|
45
|
+
dense: boolean;
|
|
46
|
+
rules: ValidationRule[];
|
|
47
|
+
options: NsSelectOption[];
|
|
48
|
+
multiple: boolean;
|
|
49
|
+
emitValue: boolean;
|
|
50
|
+
mapOptions: boolean;
|
|
51
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
52
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
53
|
+
declare const _default: typeof __VLS_export;
|
|
54
|
+
export default _default;
|
|
55
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
56
|
+
new (): {
|
|
57
|
+
$slots: S;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsSelect } from './NsSelect.vue';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NsSkeleton - A placeholder skeleton wrapping Quasar's QSkeleton.
|
|
3
|
+
*
|
|
4
|
+
* Shows animated placeholder shapes while content is loading.
|
|
5
|
+
* Supports all QSkeleton types including component-matched shapes
|
|
6
|
+
* (QBtn, QInput, QAvatar, etc.).
|
|
7
|
+
*/
|
|
8
|
+
export type NsSkeletonType = 'text' | 'rect' | 'circle' | 'QBtn' | 'QBadge' | 'QChip' | 'QToolbar' | 'QCheckbox' | 'QRadio' | 'QToggle' | 'QSlider' | 'QRange' | 'QInput' | 'QAvatar';
|
|
9
|
+
export type NsSkeletonAnimation = 'wave' | 'pulse' | 'pulse-x' | 'pulse-y' | 'fade' | 'blink' | 'none';
|
|
10
|
+
export interface NsSkeletonProps {
|
|
11
|
+
/** Shape type — use component names for accurate matching */
|
|
12
|
+
type?: NsSkeletonType;
|
|
13
|
+
/** Animation style */
|
|
14
|
+
animation?: NsSkeletonAnimation;
|
|
15
|
+
/** Remove border-radius */
|
|
16
|
+
square?: boolean;
|
|
17
|
+
/** Add a border */
|
|
18
|
+
bordered?: boolean;
|
|
19
|
+
/** Custom width (CSS value) */
|
|
20
|
+
width?: string;
|
|
21
|
+
/** Custom height (CSS value) */
|
|
22
|
+
height?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const __VLS_export: import("vue").DefineComponent<NsSkeletonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NsSkeletonProps> & Readonly<{}>, {
|
|
25
|
+
type: NsSkeletonType;
|
|
26
|
+
animation: NsSkeletonAnimation;
|
|
27
|
+
square: boolean;
|
|
28
|
+
bordered: boolean;
|
|
29
|
+
width: string;
|
|
30
|
+
height: string;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
declare const _default: typeof __VLS_export;
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { NsLocaleMessages } from '../../locale/NsLocaleMessages';
|
|
2
|
+
/**
|
|
3
|
+
* NsThemeProvider — Renderless wrapper that provides locale context
|
|
4
|
+
* to a subtree of Ns components.
|
|
5
|
+
*
|
|
6
|
+
* Useful for:
|
|
7
|
+
* - Micro-frontends embedding Ns components in a section
|
|
8
|
+
* - Overriding locale for a specific part of the page
|
|
9
|
+
* - Testing components with different locales
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```vue
|
|
13
|
+
* <NsThemeProvider :locale="frCA">
|
|
14
|
+
* <NsButton>{{ $t('checkout') }}</NsButton>
|
|
15
|
+
* </NsThemeProvider>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export interface NsThemeProviderProps {
|
|
19
|
+
/** Locale messages to provide to descendant Ns components */
|
|
20
|
+
locale?: NsLocaleMessages;
|
|
21
|
+
}
|
|
22
|
+
declare var __VLS_1: {};
|
|
23
|
+
type __VLS_Slots = {} & {
|
|
24
|
+
default?: (props: typeof __VLS_1) => any;
|
|
25
|
+
};
|
|
26
|
+
declare const __VLS_base: import("vue").DefineComponent<NsThemeProviderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<NsThemeProviderProps> & Readonly<{}>, {
|
|
27
|
+
locale: NsLocaleMessages;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
30
|
+
declare const _default: typeof __VLS_export;
|
|
31
|
+
export default _default;
|
|
32
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
33
|
+
new (): {
|
|
34
|
+
$slots: S;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NsThemeProvider } from './NsThemeProvider.vue';
|