@hobui/viui-cli 0.0.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.
Files changed (72) hide show
  1. package/README.md +136 -0
  2. package/dist/assets/cursor/.design-system-version +1 -0
  3. package/dist/assets/cursor/commands/audit-accessibility.md +25 -0
  4. package/dist/assets/cursor/commands/audit-ui.md +35 -0
  5. package/dist/assets/cursor/commands/component.md +18 -0
  6. package/dist/assets/cursor/commands/fix-storybook.md +24 -0
  7. package/dist/assets/cursor/commands/generate-component-from-figma.md +26 -0
  8. package/dist/assets/cursor/commands/generate-page-from-figma.md +26 -0
  9. package/dist/assets/cursor/plans/DESIGN_SYSTEM_PLAN.md +177 -0
  10. package/dist/assets/cursor/plans/PLANS_INDEX.md +35 -0
  11. package/dist/assets/cursor/rules/accessibility-contrast.mdc +38 -0
  12. package/dist/assets/cursor/rules/bem-class-style.mdc +107 -0
  13. package/dist/assets/cursor/rules/component-naming.mdc +57 -0
  14. package/dist/assets/cursor/rules/design-system-component-library.mdc +59 -0
  15. package/dist/assets/cursor/rules/design-system-workflow.mdc +48 -0
  16. package/dist/assets/cursor/rules/figma-mapping.mdc +37 -0
  17. package/dist/assets/cursor/rules/icons.mdc +42 -0
  18. package/dist/assets/cursor/rules/project-structure.mdc +137 -0
  19. package/dist/assets/cursor/rules/storybook-component-template.mdc +103 -0
  20. package/dist/assets/cursor/rules/storybook.mdc +68 -0
  21. package/dist/assets/cursor/rules/tokens.mdc +32 -0
  22. package/dist/assets/cursor/rules/viui-themes.mdc +53 -0
  23. package/dist/assets/cursor/rules/vuetify-layout.mdc +52 -0
  24. package/dist/assets/cursor/skills/accessibility.md +75 -0
  25. package/dist/assets/cursor/skills/design-system-thinking.md +40 -0
  26. package/dist/assets/cursor/skills/figma-interpretation.md +38 -0
  27. package/dist/assets/cursor/skills/vue-vuetify-design-system-architect.md +60 -0
  28. package/dist/assets/cursor/sync-manifest.json +6 -0
  29. package/dist/assets/plugins/viui-conf/defaults/README.md +27 -0
  30. package/dist/assets/plugins/viui-conf/defaults/alerts.ts +13 -0
  31. package/dist/assets/plugins/viui-conf/defaults/app-bar.ts +14 -0
  32. package/dist/assets/plugins/viui-conf/defaults/avatars.ts +14 -0
  33. package/dist/assets/plugins/viui-conf/defaults/buttons.ts +15 -0
  34. package/dist/assets/plugins/viui-conf/defaults/by-theme/index.ts +30 -0
  35. package/dist/assets/plugins/viui-conf/defaults/by-theme/material.ts +15 -0
  36. package/dist/assets/plugins/viui-conf/defaults/by-theme/minimalist-2.ts +15 -0
  37. package/dist/assets/plugins/viui-conf/defaults/by-theme/neo-brutalism.ts +15 -0
  38. package/dist/assets/plugins/viui-conf/defaults/cards.ts +12 -0
  39. package/dist/assets/plugins/viui-conf/defaults/chips.ts +15 -0
  40. package/dist/assets/plugins/viui-conf/defaults/data-tables.ts +11 -0
  41. package/dist/assets/plugins/viui-conf/defaults/dialogs.ts +13 -0
  42. package/dist/assets/plugins/viui-conf/defaults/global.ts +12 -0
  43. package/dist/assets/plugins/viui-conf/defaults/index.ts +93 -0
  44. package/dist/assets/plugins/viui-conf/defaults/inputs.ts +42 -0
  45. package/dist/assets/plugins/viui-conf/defaults/lists.ts +17 -0
  46. package/dist/assets/plugins/viui-conf/defaults/main.ts +12 -0
  47. package/dist/assets/plugins/viui-conf/defaults/menus.ts +14 -0
  48. package/dist/assets/plugins/viui-conf/defaults/navigation-drawer.ts +14 -0
  49. package/dist/assets/plugins/viui-conf/defaults/pagination.ts +13 -0
  50. package/dist/assets/plugins/viui-conf/defaults/snackbars.ts +13 -0
  51. package/dist/assets/plugins/viui-conf/theme-base.ts +34 -0
  52. package/dist/assets/plugins/viui-conf/v-dark.ts +38 -0
  53. package/dist/assets/plugins/viui-conf/v-light.ts +41 -0
  54. package/dist/assets/plugins/vuetifies/defaults/buttons.ts +15 -0
  55. package/dist/assets/plugins/vuetifies/defaults/cards.ts +12 -0
  56. package/dist/assets/plugins/vuetifies/defaults/global.ts +12 -0
  57. package/dist/assets/plugins/vuetifies/defaults/index.ts +45 -0
  58. package/dist/assets/plugins/vuetifies/defaults/inputs.ts +42 -0
  59. package/dist/assets/plugins/vuetifies/defaults/lists.ts +17 -0
  60. package/dist/assets/plugins/vuetifies/theme-base.ts +34 -0
  61. package/dist/assets/plugins/vuetifies/v-dark.ts +38 -0
  62. package/dist/assets/plugins/vuetifies/v-light.ts +41 -0
  63. package/dist/assets/plugins/vuetify-defaults/buttons.ts +15 -0
  64. package/dist/assets/plugins/vuetify-defaults/cards.ts +12 -0
  65. package/dist/assets/plugins/vuetify-defaults/global.ts +12 -0
  66. package/dist/assets/plugins/vuetify-defaults/index.ts +45 -0
  67. package/dist/assets/plugins/vuetify-defaults/inputs.ts +42 -0
  68. package/dist/assets/plugins/vuetify-defaults/lists.ts +17 -0
  69. package/dist/cli.d.ts +3 -0
  70. package/dist/cli.d.ts.map +1 -0
  71. package/dist/cli.js +402 -0
  72. package/package.json +27 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho VDataTable (ViDataTable).
3
+ */
4
+
5
+ import type { VuetifyOptions } from 'vuetify'
6
+
7
+ export const dataTableDefaults: NonNullable<VuetifyOptions['defaults']> = {
8
+ VDataTable: {
9
+ density: 'default',
10
+ },
11
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho VDialog (ViDialog).
3
+ */
4
+
5
+ import type { VuetifyOptions } from 'vuetify'
6
+
7
+ export const dialogDefaults: NonNullable<VuetifyOptions['defaults']> = {
8
+ VDialog: {
9
+ persistent: false,
10
+ transition: 'dialog-transition',
11
+ maxWidth: 500,
12
+ },
13
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * iNET Design System — Vuetify global defaults.
3
+ * Áp cho mọi component; dùng design tokens qua theme (colors, border-radius-root).
4
+ */
5
+
6
+ /** Global defaults (ripple, density) — class/style không dùng trong global. */
7
+ export const globalDefaults: Record<string, unknown> = {
8
+ // Ripple: bật mặc định theo Material; tắt nếu design system yêu cầu giảm motion
9
+ ripple: true,
10
+ // Density: 'default' | 'comfortable' | 'compact'
11
+ density: 'default',
12
+ }
@@ -0,0 +1,93 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults (global + từng element).
3
+ * Merge base + theme override; theme mặc định Minimalist 2.0 (minimalist-2).
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+ import { globalDefaults } from './global'
8
+ import { buttonDefaults } from './buttons'
9
+ import { cardDefaults } from './cards'
10
+ import { inputDefaults } from './inputs'
11
+ import { listDefaults } from './lists'
12
+ import { snackbarDefaults } from './snackbars'
13
+ import { dialogDefaults } from './dialogs'
14
+ import { alertDefaults } from './alerts'
15
+ import { dataTableDefaults } from './data-tables'
16
+ import { paginationDefaults } from './pagination'
17
+ import { appBarDefaults } from './app-bar'
18
+ import { navigationDrawerDefaults } from './navigation-drawer'
19
+ import { mainDefaults } from './main'
20
+ import { chipDefaults } from './chips'
21
+ import { avatarDefaults } from './avatars'
22
+ import { menuDefaults } from './menus'
23
+ import { getThemeDefaults } from './by-theme'
24
+
25
+ type DefaultsConfig = NonNullable<VuetifyOptions['defaults']>
26
+
27
+ function mergeDefaults (...sources: DefaultsConfig[]): DefaultsConfig {
28
+ const result: Record<string, unknown> = { global: { ...globalDefaults } }
29
+ for (const src of sources) {
30
+ if (!src) continue
31
+ const srcObj = src as Record<string, unknown>
32
+ if (srcObj.global && typeof srcObj.global === 'object') {
33
+ result.global = { ...(result.global as Record<string, unknown>), ...srcObj.global }
34
+ }
35
+ for (const key of Object.keys(srcObj)) {
36
+ if (key === 'global') continue
37
+ const existing = result[key] as Record<string, unknown> | undefined
38
+ const incoming = srcObj[key] as Record<string, unknown> | undefined
39
+ result[key] = existing && incoming ? { ...existing, ...incoming } : (incoming ?? existing)
40
+ }
41
+ }
42
+ return result as DefaultsConfig
43
+ }
44
+
45
+ const baseDefaults: DefaultsConfig = mergeDefaults(
46
+ { global: globalDefaults },
47
+ buttonDefaults,
48
+ cardDefaults,
49
+ inputDefaults,
50
+ listDefaults,
51
+ snackbarDefaults,
52
+ dialogDefaults,
53
+ alertDefaults,
54
+ dataTableDefaults,
55
+ paginationDefaults,
56
+ appBarDefaults,
57
+ navigationDrawerDefaults,
58
+ mainDefaults,
59
+ chipDefaults,
60
+ avatarDefaults,
61
+ menuDefaults,
62
+ )
63
+
64
+ /**
65
+ * Trả về defaults đã merge base + override theo theme.
66
+ * themeId không set hoặc không nhận dạng → Minimalist 2.0 (minimalist-2).
67
+ */
68
+ export function getDefaults (themeId?: string): DefaultsConfig {
69
+ const themeOverride = getThemeDefaults(themeId)
70
+ return mergeDefaults(baseDefaults, themeOverride)
71
+ }
72
+
73
+ /** Defaults với theme mặc định (Minimalist 2.0). Giữ tương thích khi gọi getDefaults() không tham số. */
74
+ export const defaults: DefaultsConfig = getDefaults()
75
+
76
+ export { globalDefaults } from './global'
77
+ export { buttonDefaults } from './buttons'
78
+ export { cardDefaults } from './cards'
79
+ export { inputDefaults } from './inputs'
80
+ export { listDefaults } from './lists'
81
+ export { snackbarDefaults } from './snackbars'
82
+ export { dialogDefaults } from './dialogs'
83
+ export { alertDefaults } from './alerts'
84
+ export { dataTableDefaults } from './data-tables'
85
+ export { paginationDefaults } from './pagination'
86
+ export { appBarDefaults } from './app-bar'
87
+ export { navigationDrawerDefaults } from './navigation-drawer'
88
+ export { mainDefaults } from './main'
89
+ export { chipDefaults } from './chips'
90
+ export { avatarDefaults } from './avatars'
91
+ export { menuDefaults } from './menus'
92
+ export { getThemeDefaults, VIUI_DEFAULT_THEME_ID } from './by-theme'
93
+ export type { ViuiThemeId } from './by-theme'
@@ -0,0 +1,42 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho form inputs:
3
+ * VTextField, VTextarea, VSelect, VAutocomplete, VCheckbox, VRadioGroup, VSwitch.
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+
8
+ export const inputDefaults: NonNullable<VuetifyOptions['defaults']> = {
9
+ VTextField: {
10
+ variant: 'outlined',
11
+ density: 'default',
12
+ hideDetails: 'auto',
13
+ rounded: 'lg',
14
+ },
15
+ VTextarea: {
16
+ variant: 'outlined',
17
+ density: 'default',
18
+ hideDetails: 'auto',
19
+ rounded: 'lg',
20
+ },
21
+ VSelect: {
22
+ variant: 'outlined',
23
+ density: 'default',
24
+ hideDetails: 'auto',
25
+ rounded: 'lg',
26
+ },
27
+ VAutocomplete: {
28
+ variant: 'outlined',
29
+ density: 'default',
30
+ hideDetails: 'auto',
31
+ rounded: 'lg',
32
+ },
33
+ VCheckbox: {
34
+ hideDetails: true,
35
+ },
36
+ VRadioGroup: {
37
+ hideDetails: 'auto',
38
+ },
39
+ VSwitch: {
40
+ hideDetails: true,
41
+ },
42
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho Lists (VList, VListItem, VListGroup).
3
+ */
4
+
5
+ import type { VuetifyOptions } from 'vuetify'
6
+
7
+ export const listDefaults: NonNullable<VuetifyOptions['defaults']> = {
8
+ VList: {
9
+ density: 'default',
10
+ },
11
+ VListItem: {
12
+ density: 'default',
13
+ },
14
+ VListGroup: {
15
+ density: 'default',
16
+ },
17
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho VMain (ViMain).
3
+ * Padding theo 8pt grid cho content area.
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+
8
+ export const mainDefaults: NonNullable<VuetifyOptions['defaults']> = {
9
+ VMain: {
10
+ scrollable: true,
11
+ },
12
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho VMenu (ViMenu).
3
+ * Location, transition, elevation từ tokens.
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+
8
+ export const menuDefaults: NonNullable<VuetifyOptions['defaults']> = {
9
+ VMenu: {
10
+ location: 'bottom',
11
+ transition: 'scale-transition',
12
+ eager: false,
13
+ },
14
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho VNavigationDrawer (ViNavigationDrawer).
3
+ * Sidebar layout: width, rail, border.
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+
8
+ export const navigationDrawerDefaults: NonNullable<VuetifyOptions['defaults']> = {
9
+ VNavigationDrawer: {
10
+ width: 256,
11
+ railWidth: 56,
12
+ border: 'end',
13
+ },
14
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho VPagination (ViPagination).
3
+ */
4
+
5
+ import type { VuetifyOptions } from 'vuetify'
6
+
7
+ export const paginationDefaults: NonNullable<VuetifyOptions['defaults']> = {
8
+ VPagination: {
9
+ density: 'comfortable',
10
+ totalVisible: 7,
11
+ rounded: 'circle',
12
+ },
13
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho VSnackbar (ViToast).
3
+ */
4
+
5
+ import type { VuetifyOptions } from 'vuetify'
6
+
7
+ export const snackbarDefaults: NonNullable<VuetifyOptions['defaults']> = {
8
+ VSnackbar: {
9
+ location: 'bottom',
10
+ variant: 'flat',
11
+ timeout: 4000,
12
+ },
13
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * iNET Design System - Vuetify Theme Configuration
3
+ * Extended theme using design tokens as single source of truth
4
+ */
5
+
6
+ import { colorTokens } from '@/tokens/design-tokens'
7
+
8
+ /**
9
+ * Base theme colors shared between light and dark themes
10
+ * All colors are derived from design tokens.
11
+ * Semantic on-colors (on-success, on-warning) are overridden in v-light/v-dark from inet-design-tokens for WCAG AA contrast on tinted surfaces.
12
+ */
13
+ const themeBase: Record<string, string> = {
14
+ // Brand colors
15
+ primary: colorTokens.brand.primary,
16
+ secondary: colorTokens.brand.secondary,
17
+ accent: colorTokens.brand.accent,
18
+
19
+ // Semantic colors
20
+ success: colorTokens.semantic.success,
21
+ warning: colorTokens.semantic.warning,
22
+ error: colorTokens.semantic.error,
23
+ info: colorTokens.semantic.info,
24
+
25
+ // On-colors (text on colored backgrounds)
26
+ 'on-primary': colorTokens.neutral[0],
27
+ 'on-secondary': colorTokens.neutral[0],
28
+ 'on-success': colorTokens.neutral[950],
29
+ 'on-warning': colorTokens.neutral[950],
30
+ 'on-error': colorTokens.neutral[0],
31
+ 'on-info': colorTokens.neutral[0],
32
+ } as const
33
+
34
+ export default themeBase
@@ -0,0 +1,38 @@
1
+ /**
2
+ * iNET Design System - Vuetify Dark Theme
3
+ * Dark theme configuration using design tokens
4
+ */
5
+
6
+ import type { ThemeDefinition } from 'vuetify'
7
+ import ThemeBase from './theme-base.ts'
8
+ import { colorTokens } from '@/tokens/design-tokens'
9
+ import { shapeTokens } from '@/tokens/design-tokens'
10
+ import inetDesignTokens from '@/tokens/inet-design-tokens'
11
+
12
+ const DarkTheme: ThemeDefinition = {
13
+ dark: true,
14
+ colors: {
15
+ ...ThemeBase,
16
+ background: colorTokens.surface.background,
17
+ surface: colorTokens.surface.card,
18
+ 'surface-variant': colorTokens.surface.elevated,
19
+ 'surface-bright': colorTokens.neutral[700],
20
+ 'surface-light': colorTokens.neutral[800],
21
+ 'on-background': colorTokens.text.primary,
22
+ 'on-surface': colorTokens.text.primary,
23
+ 'on-surface-variant': colorTokens.text.secondary,
24
+ 'on-success': inetDesignTokens.colors.success?.dark?.text ?? colorTokens.neutral[0],
25
+ 'on-warning': inetDesignTokens.colors.warning?.dark?.text ?? colorTokens.neutral[0],
26
+ outline: colorTokens.border.default,
27
+ 'outline-variant': colorTokens.border.subtle,
28
+ },
29
+ variables: {
30
+ 'border-opacity': 0.2,
31
+ 'high-emphasis-opacity': 0.87,
32
+ 'medium-emphasis-opacity': 0.60,
33
+ 'disabled-opacity': 0.38,
34
+ 'border-radius-root': shapeTokens.borderRadius.base,
35
+ },
36
+ }
37
+
38
+ export default DarkTheme
@@ -0,0 +1,41 @@
1
+ /**
2
+ * iNET Design System - Vuetify Light Theme
3
+ * Light theme configuration using design tokens
4
+ */
5
+
6
+ import type { ThemeDefinition } from 'vuetify'
7
+ import ThemeBase from './theme-base.ts'
8
+ import { colorTokens } from '@/tokens/design-tokens'
9
+ import { shapeTokens } from '@/tokens/design-tokens'
10
+ import inetDesignTokens from '@/tokens/inet-design-tokens'
11
+
12
+ const LightTheme: ThemeDefinition = {
13
+ dark: false,
14
+ colors: {
15
+ ...ThemeBase,
16
+ // Surface colors for light theme (tokens only)
17
+ background: colorTokens.neutral[50],
18
+ surface: colorTokens.neutral[0],
19
+ 'surface-variant': colorTokens.neutral[100],
20
+ 'surface-bright': colorTokens.neutral[0],
21
+ 'surface-light': colorTokens.neutral[50],
22
+ 'on-background': colorTokens.neutral[900],
23
+ 'on-surface': colorTokens.neutral[900],
24
+ 'on-surface-variant': colorTokens.neutral[600],
25
+ 'on-success': inetDesignTokens.colors.success?.light?.text ?? colorTokens.neutral[950],
26
+ 'on-warning': inetDesignTokens.colors.warning?.light?.text ?? colorTokens.neutral[950],
27
+ outline: colorTokens.neutral[300],
28
+ 'outline-variant': colorTokens.neutral[200],
29
+ secondary: colorTokens.neutral[600],
30
+ accent: colorTokens.brand.accent,
31
+ },
32
+ variables: {
33
+ 'border-opacity': 0.12,
34
+ 'high-emphasis-opacity': 0.87,
35
+ 'medium-emphasis-opacity': 0.60,
36
+ 'disabled-opacity': 0.38,
37
+ 'border-radius-root': shapeTokens.borderRadius.base,
38
+ },
39
+ }
40
+
41
+ export default LightTheme
@@ -0,0 +1,15 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho Buttons (VBtn).
3
+ * Đồng bộ với design tokens (shape, elevation); variant/color dùng theme.
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+
8
+ export const buttonDefaults: NonNullable<VuetifyOptions['defaults']> = {
9
+ VBtn: {
10
+ variant: 'elevated',
11
+ elevation: 1,
12
+ rounded: 'lg',
13
+ size: 'default',
14
+ },
15
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho Cards (VCard, VCardText, VCardActions).
3
+ */
4
+
5
+ import type { VuetifyOptions } from 'vuetify'
6
+
7
+ export const cardDefaults: NonNullable<VuetifyOptions['defaults']> = {
8
+ VCard: {
9
+ elevation: 1,
10
+ rounded: 'lg',
11
+ },
12
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * iNET Design System — Vuetify global defaults.
3
+ * Áp cho mọi component; dùng design tokens qua theme (colors, border-radius-root).
4
+ */
5
+
6
+ /** Global defaults (ripple, density) — class/style không dùng trong global. */
7
+ export const globalDefaults: Record<string, unknown> = {
8
+ // Ripple: bật mặc định theo Material; tắt nếu design system yêu cầu giảm motion
9
+ ripple: true,
10
+ // Density: 'default' | 'comfortable' | 'compact'
11
+ density: 'default',
12
+ }
@@ -0,0 +1,45 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults (global + từng element).
3
+ * Merge tất cả và export cho createVuetify({ defaults }).
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+ import { globalDefaults } from './global'
8
+ import { buttonDefaults } from './buttons'
9
+ import { cardDefaults } from './cards'
10
+ import { inputDefaults } from './inputs'
11
+ import { listDefaults } from './lists'
12
+
13
+ type DefaultsConfig = NonNullable<VuetifyOptions['defaults']>
14
+
15
+ function mergeDefaults (...sources: DefaultsConfig[]): DefaultsConfig {
16
+ const result: Record<string, unknown> = { global: { ...globalDefaults } }
17
+ for (const src of sources) {
18
+ if (!src) continue
19
+ const srcObj = src as Record<string, unknown>
20
+ if (srcObj.global && typeof srcObj.global === 'object') {
21
+ result.global = { ...(result.global as Record<string, unknown>), ...srcObj.global }
22
+ }
23
+ for (const key of Object.keys(srcObj)) {
24
+ if (key === 'global') continue
25
+ const existing = result[key] as Record<string, unknown> | undefined
26
+ const incoming = srcObj[key] as Record<string, unknown> | undefined
27
+ result[key] = existing && incoming ? { ...existing, ...incoming } : (incoming ?? existing)
28
+ }
29
+ }
30
+ return result as DefaultsConfig
31
+ }
32
+
33
+ export const defaults: DefaultsConfig = mergeDefaults(
34
+ { global: globalDefaults },
35
+ buttonDefaults,
36
+ cardDefaults,
37
+ inputDefaults,
38
+ listDefaults,
39
+ )
40
+
41
+ export { globalDefaults } from './global'
42
+ export { buttonDefaults } from './buttons'
43
+ export { cardDefaults } from './cards'
44
+ export { inputDefaults } from './inputs'
45
+ export { listDefaults } from './lists'
@@ -0,0 +1,42 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho form inputs:
3
+ * VTextField, VTextarea, VSelect, VAutocomplete, VCheckbox, VRadioGroup, VSwitch.
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+
8
+ export const inputDefaults: NonNullable<VuetifyOptions['defaults']> = {
9
+ VTextField: {
10
+ variant: 'outlined',
11
+ density: 'default',
12
+ hideDetails: 'auto',
13
+ rounded: 'lg',
14
+ },
15
+ VTextarea: {
16
+ variant: 'outlined',
17
+ density: 'default',
18
+ hideDetails: 'auto',
19
+ rounded: 'lg',
20
+ },
21
+ VSelect: {
22
+ variant: 'outlined',
23
+ density: 'default',
24
+ hideDetails: 'auto',
25
+ rounded: 'lg',
26
+ },
27
+ VAutocomplete: {
28
+ variant: 'outlined',
29
+ density: 'default',
30
+ hideDetails: 'auto',
31
+ rounded: 'lg',
32
+ },
33
+ VCheckbox: {
34
+ hideDetails: true,
35
+ },
36
+ VRadioGroup: {
37
+ hideDetails: 'auto',
38
+ },
39
+ VSwitch: {
40
+ hideDetails: true,
41
+ },
42
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho Lists (VList, VListItem, VListGroup).
3
+ */
4
+
5
+ import type { VuetifyOptions } from 'vuetify'
6
+
7
+ export const listDefaults: NonNullable<VuetifyOptions['defaults']> = {
8
+ VList: {
9
+ density: 'default',
10
+ },
11
+ VListItem: {
12
+ density: 'default',
13
+ },
14
+ VListGroup: {
15
+ density: 'default',
16
+ },
17
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * iNET Design System - Vuetify Theme Configuration
3
+ * Extended theme using design tokens as single source of truth
4
+ */
5
+
6
+ import { colorTokens } from '@/tokens/design-tokens'
7
+
8
+ /**
9
+ * Base theme colors shared between light and dark themes
10
+ * All colors are derived from design tokens.
11
+ * Semantic on-colors (on-success, on-warning) are overridden in v-light/v-dark from inet-design-tokens for WCAG AA contrast on tinted surfaces.
12
+ */
13
+ const themeBase: Record<string, string> = {
14
+ // Brand colors
15
+ primary: colorTokens.brand.primary,
16
+ secondary: colorTokens.brand.secondary,
17
+ accent: colorTokens.brand.accent,
18
+
19
+ // Semantic colors
20
+ success: colorTokens.semantic.success,
21
+ warning: colorTokens.semantic.warning,
22
+ error: colorTokens.semantic.error,
23
+ info: colorTokens.semantic.info,
24
+
25
+ // On-colors (text on colored backgrounds)
26
+ 'on-primary': colorTokens.neutral[0],
27
+ 'on-secondary': colorTokens.neutral[0],
28
+ 'on-success': colorTokens.neutral[950],
29
+ 'on-warning': colorTokens.neutral[950],
30
+ 'on-error': colorTokens.neutral[0],
31
+ 'on-info': colorTokens.neutral[0],
32
+ } as const
33
+
34
+ export default themeBase
@@ -0,0 +1,38 @@
1
+ /**
2
+ * iNET Design System - Vuetify Dark Theme
3
+ * Dark theme configuration using design tokens
4
+ */
5
+
6
+ import type { ThemeDefinition } from 'vuetify'
7
+ import ThemeBase from './theme-base.ts'
8
+ import { colorTokens } from '@/tokens/design-tokens'
9
+ import { shapeTokens } from '@/tokens/design-tokens'
10
+ import inetDesignTokens from '@/tokens/inet-design-tokens'
11
+
12
+ const DarkTheme: ThemeDefinition = {
13
+ dark: true,
14
+ colors: {
15
+ ...ThemeBase,
16
+ background: colorTokens.surface.background,
17
+ surface: colorTokens.surface.card,
18
+ 'surface-variant': colorTokens.surface.elevated,
19
+ 'surface-bright': colorTokens.neutral[700],
20
+ 'surface-light': colorTokens.neutral[800],
21
+ 'on-background': colorTokens.text.primary,
22
+ 'on-surface': colorTokens.text.primary,
23
+ 'on-surface-variant': colorTokens.text.secondary,
24
+ 'on-success': inetDesignTokens.colors.success?.dark?.text ?? colorTokens.neutral[0],
25
+ 'on-warning': inetDesignTokens.colors.warning?.dark?.text ?? colorTokens.neutral[0],
26
+ outline: colorTokens.border.default,
27
+ 'outline-variant': colorTokens.border.subtle,
28
+ },
29
+ variables: {
30
+ 'border-opacity': 0.2,
31
+ 'high-emphasis-opacity': 0.87,
32
+ 'medium-emphasis-opacity': 0.60,
33
+ 'disabled-opacity': 0.38,
34
+ 'border-radius-root': shapeTokens.borderRadius.base,
35
+ },
36
+ }
37
+
38
+ export default DarkTheme
@@ -0,0 +1,41 @@
1
+ /**
2
+ * iNET Design System - Vuetify Light Theme
3
+ * Light theme configuration using design tokens
4
+ */
5
+
6
+ import type { ThemeDefinition } from 'vuetify'
7
+ import ThemeBase from './theme-base.ts'
8
+ import { colorTokens } from '@/tokens/design-tokens'
9
+ import { shapeTokens } from '@/tokens/design-tokens'
10
+ import inetDesignTokens from '@/tokens/inet-design-tokens'
11
+
12
+ const LightTheme: ThemeDefinition = {
13
+ dark: false,
14
+ colors: {
15
+ ...ThemeBase,
16
+ // Surface colors for light theme (tokens only)
17
+ background: colorTokens.neutral[50],
18
+ surface: colorTokens.neutral[0],
19
+ 'surface-variant': colorTokens.neutral[100],
20
+ 'surface-bright': colorTokens.neutral[0],
21
+ 'surface-light': colorTokens.neutral[50],
22
+ 'on-background': colorTokens.neutral[900],
23
+ 'on-surface': colorTokens.neutral[900],
24
+ 'on-surface-variant': colorTokens.neutral[600],
25
+ 'on-success': inetDesignTokens.colors.success?.light?.text ?? colorTokens.neutral[950],
26
+ 'on-warning': inetDesignTokens.colors.warning?.light?.text ?? colorTokens.neutral[950],
27
+ outline: colorTokens.neutral[300],
28
+ 'outline-variant': colorTokens.neutral[200],
29
+ secondary: colorTokens.neutral[600],
30
+ accent: colorTokens.brand.accent,
31
+ },
32
+ variables: {
33
+ 'border-opacity': 0.12,
34
+ 'high-emphasis-opacity': 0.87,
35
+ 'medium-emphasis-opacity': 0.60,
36
+ 'disabled-opacity': 0.38,
37
+ 'border-radius-root': shapeTokens.borderRadius.base,
38
+ },
39
+ }
40
+
41
+ export default LightTheme
@@ -0,0 +1,15 @@
1
+ /**
2
+ * iNET Design System — Vuetify defaults cho Buttons (VBtn).
3
+ * Đồng bộ với design tokens (shape, elevation); variant/color dùng theme.
4
+ */
5
+
6
+ import type { VuetifyOptions } from 'vuetify'
7
+
8
+ export const buttonDefaults: NonNullable<VuetifyOptions['defaults']> = {
9
+ VBtn: {
10
+ variant: 'elevated',
11
+ elevation: 1,
12
+ rounded: 'lg',
13
+ size: 'default',
14
+ },
15
+ }