@code-coaching/vuetiful 0.22.0 → 0.23.1

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 (107) hide show
  1. package/README.md +1 -1
  2. package/dist/style.css +2 -2
  3. package/dist/types/components/VBootstrap.vue.d.ts +15 -0
  4. package/dist/types/components/atoms/VAvatar.vue.d.ts +37 -10
  5. package/dist/types/components/atoms/VBadge.vue.d.ts +22 -1
  6. package/dist/types/components/atoms/VButton.vue.d.ts +27 -0
  7. package/dist/types/components/atoms/VChip.vue.d.ts +22 -1
  8. package/dist/types/components/atoms/VRadio/VRadioGroup.vue.d.ts +10 -1
  9. package/dist/types/components/atoms/VRadio/VRadioItem.vue.d.ts +2 -2
  10. package/dist/types/components/atoms/VSwitch/VSwitch.vue.d.ts +24 -15
  11. package/dist/types/components/atoms/index.d.ts +1 -2
  12. package/dist/types/components/molecules/VAccordion/VAccordion.vue.d.ts +15 -6
  13. package/dist/types/components/molecules/VAccordion/VAccordionItem.vue.d.ts +11 -1
  14. package/dist/types/components/molecules/VAlert.vue.d.ts +39 -3
  15. package/dist/types/components/molecules/VCard/VCard.vue.d.ts +5 -5
  16. package/dist/types/components/molecules/VCard/VCardBody.vue.d.ts +13 -1
  17. package/dist/types/components/molecules/VCard/VCardFooter.vue.d.ts +22 -1
  18. package/dist/types/components/molecules/VCard/VCardHeader.vue.d.ts +22 -1
  19. package/dist/types/components/{atoms → molecules}/VCodeBlock.vue.d.ts +36 -9
  20. package/dist/types/components/molecules/VListbox/VListbox.vue.d.ts +51 -14
  21. package/dist/types/components/molecules/VListbox/VListboxItem.vue.d.ts +13 -3
  22. package/dist/types/components/molecules/VListbox/VListboxItems.vue.d.ts +9 -0
  23. package/dist/types/components/molecules/VTabs/VTab.vue.d.ts +9 -0
  24. package/dist/types/components/molecules/VTabs/VTabs.vue.d.ts +18 -0
  25. package/dist/types/components/molecules/index.d.ts +4 -3
  26. package/dist/types/props/index.d.ts +1 -0
  27. package/dist/types/props/props.d.ts +14 -0
  28. package/dist/types/services/index.d.ts +5 -3
  29. package/dist/types/services/settings.service.d.ts +132 -0
  30. package/dist/types/services/settings.service.test.d.ts +1 -0
  31. package/dist/types/types/index.d.ts +53 -0
  32. package/dist/types/utils/theme/theme-switcher.vue.d.ts +22 -62
  33. package/dist/vuetiful.es.mjs +981 -680
  34. package/dist/vuetiful.umd.js +21 -16
  35. package/package.json +1 -1
  36. package/src/components/VBootstrap.vue +62 -0
  37. package/src/components/atoms/VAvatar.test.ts +98 -28
  38. package/src/components/atoms/VAvatar.vue +46 -13
  39. package/src/components/atoms/VBadge.test.ts +10 -0
  40. package/src/components/atoms/VBadge.vue +13 -1
  41. package/src/components/atoms/VButton.test.ts +58 -0
  42. package/src/components/atoms/VButton.vue +31 -2
  43. package/src/components/atoms/VChip.test.ts +26 -11
  44. package/src/components/atoms/VChip.vue +13 -1
  45. package/src/components/atoms/VRadio/VRadioDescription.vue +1 -1
  46. package/src/components/atoms/VRadio/VRadioGroup.test.ts +7 -7
  47. package/src/components/atoms/VRadio/VRadioGroup.vue +16 -5
  48. package/src/components/atoms/VRadio/VRadioItem.vue +12 -8
  49. package/src/components/atoms/VRadio/VRadioLabel.vue +1 -1
  50. package/src/components/atoms/VSwitch/VSwitch.test.ts +20 -18
  51. package/src/components/atoms/VSwitch/VSwitch.vue +29 -17
  52. package/src/components/atoms/VSwitch/VSwitchDescription.vue +1 -1
  53. package/src/components/atoms/VSwitch/VSwitchGroup.vue +2 -2
  54. package/src/components/atoms/VSwitch/VSwitchLabel.vue +1 -1
  55. package/src/components/atoms/index.ts +0 -2
  56. package/src/components/molecules/VAccordion/VAccordion.test.ts +11 -0
  57. package/src/components/molecules/VAccordion/VAccordion.vue +16 -7
  58. package/src/components/molecules/VAccordion/VAccordionItem.test.ts +65 -16
  59. package/src/components/molecules/VAccordion/VAccordionItem.vue +53 -32
  60. package/src/components/molecules/VAlert.test.ts +11 -1
  61. package/src/components/molecules/VAlert.vue +33 -7
  62. package/src/components/molecules/VCard/VCard.test.ts +1 -1
  63. package/src/components/molecules/VCard/VCard.vue +12 -7
  64. package/src/components/molecules/VCard/VCardBody.test.ts +18 -0
  65. package/src/components/molecules/VCard/VCardBody.vue +16 -1
  66. package/src/components/molecules/VCard/VCardFooter.test.ts +18 -0
  67. package/src/components/molecules/VCard/VCardFooter.vue +21 -3
  68. package/src/components/molecules/VCard/VCardHeader.test.ts +18 -0
  69. package/src/components/molecules/VCard/VCardHeader.vue +26 -5
  70. package/src/components/molecules/VCodeBlock.test.ts +133 -0
  71. package/src/components/molecules/VCodeBlock.vue +120 -0
  72. package/src/components/molecules/VListbox/VListbox.test.ts +42 -15
  73. package/src/components/molecules/VListbox/VListbox.vue +44 -15
  74. package/src/components/molecules/VListbox/VListboxButton.test.ts +15 -6
  75. package/src/components/molecules/VListbox/VListboxButton.vue +10 -1
  76. package/src/components/molecules/VListbox/VListboxItem.test.ts +2 -2
  77. package/src/components/molecules/VListbox/VListboxItem.vue +18 -7
  78. package/src/components/molecules/VListbox/VListboxItems.test.ts +2 -2
  79. package/src/components/molecules/VListbox/VListboxItems.vue +18 -5
  80. package/src/components/molecules/VListbox/VListboxLabel.test.ts +1 -2
  81. package/src/components/molecules/VListbox/VListboxLabel.vue +1 -1
  82. package/src/components/molecules/VPreview.vue +9 -5
  83. package/src/components/molecules/{VRail.test.ts → VRail/VRail.test.ts} +1 -1
  84. package/src/components/molecules/{VRail.vue → VRail/VRail.vue} +6 -6
  85. package/src/components/molecules/VRail/VRailTile.test.ts +99 -0
  86. package/src/components/molecules/{VRailTile.vue → VRail/VRailTile.vue} +4 -6
  87. package/src/components/molecules/VTabs/VTab.test.ts +7 -3
  88. package/src/components/molecules/VTabs/VTab.vue +20 -5
  89. package/src/components/molecules/VTabs/VTabPanel.vue +2 -2
  90. package/src/components/molecules/VTabs/VTabs.test.ts +4 -2
  91. package/src/components/molecules/VTabs/VTabs.vue +32 -8
  92. package/src/components/molecules/index.ts +5 -2
  93. package/src/props/index.ts +1 -0
  94. package/src/props/props.ts +62 -0
  95. package/src/services/index.ts +5 -3
  96. package/src/services/settings.service.test.ts +17 -0
  97. package/src/services/settings.service.ts +136 -0
  98. package/src/types/index.ts +58 -0
  99. package/src/utils/theme/theme-switcher.vue +61 -131
  100. package/src/components/atoms/VCodeBlock.test.ts +0 -14
  101. package/src/components/atoms/VCodeBlock.vue +0 -92
  102. package/src/components/molecules/VRailTile.test.ts +0 -14
  103. /package/dist/types/components/{atoms → molecules}/VCodeBlock.test.d.ts +0 -0
  104. /package/dist/types/components/molecules/{VRail.test.d.ts → VRail/VRail.test.d.ts} +0 -0
  105. /package/dist/types/components/molecules/{VRail.vue.d.ts → VRail/VRail.vue.d.ts} +0 -0
  106. /package/dist/types/components/molecules/{VRailTile.test.d.ts → VRail/VRailTile.test.d.ts} +0 -0
  107. /package/dist/types/components/molecules/{VRailTile.vue.d.ts → VRail/VRailTile.vue.d.ts} +0 -0
@@ -1,12 +1,15 @@
1
1
  <script setup lang="ts">
2
+ import { unstyledProp } from "@/props";
3
+ import { useSettings } from "@/services";
2
4
  import { Tab } from "@headlessui/vue";
3
5
  import { computed, inject } from "vue";
4
6
 
5
- defineProps({
7
+ const props = defineProps({
6
8
  disabled: {
7
9
  type: Boolean,
8
10
  default: false,
9
11
  },
12
+ unstyled: unstyledProp,
10
13
  });
11
14
 
12
15
  const activeClass = inject("active") as string;
@@ -14,26 +17,38 @@ const hoverClass = inject("hover") as string;
14
17
  const vertical = inject("vertical") as boolean;
15
18
  const classTab = inject("classTab") as string;
16
19
  const hideSeparator = inject("hideSeparator") as boolean;
20
+ const classTabSeparator = inject("classTabSeparator") as string;
17
21
 
18
22
  const tabClass = computed(() => {
19
23
  return classTab ? classTab : "w-full px-4 py-2";
20
24
  });
25
+
26
+ const { settings } = useSettings();
27
+ const isUnstyled = settings.global.unstyled || settings.components.tab.unstyled || props.unstyled;
21
28
  </script>
22
29
 
23
30
  <template>
24
31
  <Tab
25
32
  :disabled="disabled"
26
33
  v-slot="{ selected }"
34
+ class="vuetiful-tab"
27
35
  :class="`flex ${vertical ? 'flex-row justify-between' : 'flex-col'}`"
28
36
  >
29
- <div data-test="slot-container" :class="`text-base rounded-token ${selected ? activeClass : hoverClass} ${tabClass}`">
37
+ <div
38
+ data-test="slot-container"
39
+ class="vuetiful-tab-content"
40
+ :class="`text-base ${isUnstyled ? '' : 'rounded-token'} ${
41
+ selected ? activeClass : hoverClass
42
+ } ${tabClass}`"
43
+ >
30
44
  <slot />
31
45
  </div>
32
46
  <div
33
47
  v-show="selected && !hideSeparator"
34
- :class="`z-10 border-surface-900-50-token ${
35
- vertical ? 'mr-[-2px] h-full border-r-2' : 'mb-[-2px] border-b-2'
36
- }`"
48
+ class="vuetiful-tab-separator"
49
+ :class="`z-10 ${
50
+ vertical ? 'mr-[-2px] h-full border-r-2' : 'mb-[-2px] w-full border-b-2'
51
+ } ${classTabSeparator}`"
37
52
  ></div>
38
53
  </Tab>
39
54
  </template>
@@ -1,9 +1,9 @@
1
1
  <script setup lang="ts">
2
- import { TabPanel } from '@headlessui/vue';
2
+ import { TabPanel } from "@headlessui/vue";
3
3
  </script>
4
4
 
5
5
  <template>
6
- <TabPanel>
6
+ <TabPanel class="vuetiful-tab-panel">
7
7
  <slot />
8
8
  </TabPanel>
9
9
  </template>
@@ -21,7 +21,7 @@ describe("VTabs", () => {
21
21
  const wrapper = mount({
22
22
  template: /*html*/ `
23
23
  <v-tabs>
24
- <template v-slot="tabs">
24
+ <template v-slot:tabs>
25
25
  <v-tab>John Duck</v-tab>
26
26
  </template>
27
27
  <v-tab-panel>John Duck Panel</v-tab-panel>
@@ -47,6 +47,7 @@ describe("VTabs", () => {
47
47
  const tabPanels = wrapper.find("[data-test='vuetiful-tab-panels']");
48
48
  expect(tabPanels.classes()).toEqual([
49
49
  "vuetiful-tab-panels",
50
+ "p-4",
50
51
  "!rounded-tl-none",
51
52
  "!rounded-tr-none",
52
53
  "rounded-container-token",
@@ -57,7 +58,7 @@ describe("VTabs", () => {
57
58
  const wrapper = mount({
58
59
  template: /*html*/ `
59
60
  <v-tabs vertical>
60
- <template v-slot="tabs">
61
+ <template v-slot:tabs>
61
62
  <v-tab>Tab 1</v-tab>
62
63
  </template>
63
64
  <v-tab-panel>Panel 1</v-tab-panel>
@@ -82,6 +83,7 @@ describe("VTabs", () => {
82
83
  const tabPanels = wrapper.find("[data-test='vuetiful-tab-panels']");
83
84
  expect(tabPanels.classes()).toEqual([
84
85
  "vuetiful-tab-panels",
86
+ "p-4",
85
87
  "!rounded-bl-none",
86
88
  "!rounded-tl-none",
87
89
  "rounded-container-token",
@@ -1,4 +1,6 @@
1
1
  <script setup lang="ts">
2
+ import { unstyledProp } from "@/props";
3
+ import { useSettings } from "@/services";
2
4
  import { TabGroup, TabList, TabPanels } from "@headlessui/vue";
3
5
  import { provide } from "vue";
4
6
 
@@ -36,13 +38,19 @@ const props = defineProps({
36
38
  },
37
39
  classSeparator: {
38
40
  type: String,
39
- default: "border border-surface-400-500-token",
41
+ default: "border-surface-400-500-token",
42
+ },
43
+ classTabSeparator: {
44
+ type: String,
45
+ default: "border-surface-900-50-token",
40
46
  },
41
47
 
42
48
  defaultIndex: {
43
49
  type: Number,
44
50
  default: 0,
45
51
  },
52
+
53
+ unstyled: unstyledProp,
46
54
  });
47
55
 
48
56
  provide("active", props.active);
@@ -50,6 +58,10 @@ provide("hover", props.hover);
50
58
  provide("vertical", props.vertical);
51
59
  provide("classTab", props.classTab);
52
60
  provide("hideSeparator", props.hideSeparator);
61
+ provide("classTabSeparator", props.classTabSeparator);
62
+
63
+ const { settings } = useSettings();
64
+ const isUnstyled = settings.global.unstyled || settings.components.tabs.unstyled || props.unstyled;
53
65
  </script>
54
66
 
55
67
  <template>
@@ -57,26 +69,38 @@ provide("hideSeparator", props.hideSeparator);
57
69
  as="div"
58
70
  :vertical="vertical"
59
71
  :defaultIndex="defaultIndex"
72
+ class="vuetiful-tab-group"
60
73
  :class="`${vertical ? 'flex' : ''}`"
61
74
  >
62
75
  <TabList
63
76
  data-test="vuetiful-tab-list"
64
- :class="`vuetiful-tab-list flex ${vertical ? 'flex-col' : ''} ${
65
- vertical ? '!rounded-br-none !rounded-tr-none' : '!rounded-bl-none !rounded-br-none'
66
- } rounded-container-token ${classTabs}`"
77
+ :class="`vuetiful-tab-list flex ${vertical ? 'flex-col' : ''}
78
+ ${
79
+ isUnstyled
80
+ ? ''
81
+ : `${
82
+ vertical ? '!rounded-br-none !rounded-tr-none' : '!rounded-bl-none !rounded-br-none'
83
+ } rounded-container-token `
84
+ }
85
+ ${classTabs}`"
67
86
  >
68
87
  <slot name="tabs" />
69
88
  </TabList>
70
89
  <div
71
90
  data-test="vuetiful-tab-separator"
72
91
  v-if="!hideSeparator"
73
- :class="`${classSeparator}`"
92
+ :class="`border ${classSeparator}`"
74
93
  ></div>
75
94
  <TabPanels
76
95
  data-test="vuetiful-tab-panels"
77
- :class="`vuetiful-tab-panels ${
78
- vertical ? '!rounded-bl-none !rounded-tl-none' : '!rounded-tl-none !rounded-tr-none'
79
- } rounded-container-token ${classPanels}`"
96
+ :class="`vuetiful-tab-panels
97
+ ${
98
+ isUnstyled
99
+ ? ''
100
+ : `p-4 ${
101
+ vertical ? '!rounded-bl-none !rounded-tl-none' : '!rounded-tl-none !rounded-tr-none'
102
+ } rounded-container-token`
103
+ } ${classPanels}`"
80
104
  >
81
105
  <slot />
82
106
  </TabPanels>
@@ -1,7 +1,7 @@
1
1
  import VDrawer from "./VDrawer.vue";
2
2
  import VPreview from "./VPreview.vue";
3
- import VRail from "./VRail.vue";
4
- import VRailTile from "./VRailTile.vue";
3
+ import VRail from "./VRail/VRail.vue";
4
+ import VRailTile from "./VRail/VRailTile.vue";
5
5
  import VShell from "./VShell.vue";
6
6
 
7
7
  import VListbox from "./VListbox/VListbox.vue";
@@ -24,6 +24,8 @@ import VCardBody from "./VCard/VCardBody.vue";
24
24
  import VCardFooter from "./VCard/VCardFooter.vue";
25
25
  import VCardHeader from "./VCard/VCardHeader.vue";
26
26
 
27
+ import VCodeBlock from "./VCodeBlock.vue";
28
+
27
29
  export {
28
30
  VAccordion,
29
31
  VAccordionItem,
@@ -32,6 +34,7 @@ export {
32
34
  VCardBody,
33
35
  VCardFooter,
34
36
  VCardHeader,
37
+ VCodeBlock,
35
38
  VDrawer,
36
39
  VListbox,
37
40
  VListboxButton,
@@ -0,0 +1 @@
1
+ export * from './props';
@@ -0,0 +1,62 @@
1
+ import { Size, Variant } from "@/types";
2
+ import { PropType } from "vue";
3
+
4
+ const sizeProp = {
5
+ type: String as PropType<"xs" | "sm" | "md" | "lg" | "xl">,
6
+ default: Size.MD,
7
+ };
8
+
9
+ const unstyledProp = {
10
+ type: Boolean,
11
+ default: false,
12
+ };
13
+
14
+ const variantProp = {
15
+ // explicit string union because TypeScript type won't throw error if invalid value is passed
16
+ type: String as PropType<
17
+ | ""
18
+ | "filled"
19
+ | "filled-primary"
20
+ | "filled-secondary"
21
+ | "filled-tertiary"
22
+ | "filled-success"
23
+ | "filled-warning"
24
+ | "filled-error"
25
+ | "filled-surface"
26
+ | "ringed"
27
+ | "ringed-primary"
28
+ | "ringed-secondary"
29
+ | "ringed-tertiary"
30
+ | "ringed-success"
31
+ | "ringed-warning"
32
+ | "ringed-error"
33
+ | "ringed-surface"
34
+ | "ghost"
35
+ | "ghost-primary"
36
+ | "ghost-secondary"
37
+ | "ghost-tertiary"
38
+ | "ghost-success"
39
+ | "ghost-warning"
40
+ | "ghost-error"
41
+ | "ghost-surface"
42
+ | "soft"
43
+ | "soft-primary"
44
+ | "soft-secondary"
45
+ | "soft-tertiary"
46
+ | "soft-success"
47
+ | "soft-warning"
48
+ | "soft-error"
49
+ | "soft-surface"
50
+ | "glass"
51
+ | "glass-primary"
52
+ | "glass-secondary"
53
+ | "glass-tertiary"
54
+ | "glass-success"
55
+ | "glass-warning"
56
+ | "glass-error"
57
+ | "glass-surface"
58
+ >,
59
+ default: Variant.Filled,
60
+ };
61
+
62
+ export { sizeProp, unstyledProp, variantProp };
@@ -1,6 +1,8 @@
1
- import { useRail } from "./rail.service";
1
+ import { useDarkMode } from "./dark-mode.service";
2
2
  import { useDrawer } from "./drawer.service";
3
3
  import { useHighlight } from "./highlight.service";
4
- import { useDarkMode } from "./dark-mode.service";
4
+ import { useRail } from "./rail.service";
5
+ import { useSettings, VuetifulSettings } from "./settings.service";
5
6
 
6
- export { useRail, useDrawer, useHighlight, useDarkMode };
7
+ export { useDarkMode, useDrawer, useHighlight, useRail, useSettings };
8
+ export type { VuetifulSettings };
@@ -0,0 +1,17 @@
1
+ import { afterEach, describe, expect, test, vi } from "vitest";
2
+
3
+ describe("useSettings", () => {
4
+ afterEach(() => {
5
+ vi.resetModules();
6
+ });
7
+ describe("updateSettings", () => {
8
+ test("should update settings", async () => {
9
+ const { useSettings } = await import("./settings.service");
10
+ const { updateSettings, settings } = useSettings();
11
+
12
+ expect(settings.global.unstyled).toBe(false);
13
+ updateSettings({ global: { unstyled: true } });
14
+ expect(settings.global.unstyled).toBe(true);
15
+ });
16
+ });
17
+ });
@@ -0,0 +1,136 @@
1
+ import { reactive } from "vue";
2
+
3
+ interface UnstyledSettings {
4
+ unstyled: boolean;
5
+ }
6
+
7
+ interface GlobalSettings extends UnstyledSettings {}
8
+ interface RadioGroupSettings extends UnstyledSettings {}
9
+ interface RadioItemSettings extends UnstyledSettings {}
10
+ interface AccordionSettings extends UnstyledSettings {}
11
+ interface AccordionItemSettings extends UnstyledSettings {}
12
+ interface AlertSettings extends UnstyledSettings {}
13
+ interface AvatarSettings extends UnstyledSettings {}
14
+ interface BadgeSettings extends UnstyledSettings {}
15
+ interface ButtonSettings extends UnstyledSettings {}
16
+ interface ListboxSettings extends UnstyledSettings {}
17
+ interface ListboxItemSettings extends UnstyledSettings {}
18
+ interface CodeBlockSettings extends UnstyledSettings {}
19
+ interface SwitchSettings extends UnstyledSettings {}
20
+ interface CardSettings extends UnstyledSettings {}
21
+ interface CardHeaderSettings extends UnstyledSettings {}
22
+ interface CardBodySettings extends UnstyledSettings {}
23
+ interface CardFooterSettings extends UnstyledSettings {}
24
+ interface TabsSettings extends UnstyledSettings {}
25
+ interface TabSettings extends UnstyledSettings {}
26
+
27
+ export interface VuetifulSettings {
28
+ global: GlobalSettings;
29
+ components: Partial<{
30
+ avatar: AvatarSettings;
31
+ alert: AlertSettings;
32
+ badge: BadgeSettings;
33
+ button: ButtonSettings;
34
+ codeBlock: CodeBlockSettings;
35
+ switch: SwitchSettings;
36
+
37
+ accordion: AccordionSettings;
38
+ accordionItem: AccordionItemSettings;
39
+
40
+ listbox: ListboxSettings;
41
+ listboxItem: ListboxItemSettings;
42
+
43
+ radioGroup: RadioGroupSettings;
44
+ radioItem: RadioItemSettings;
45
+
46
+ card: CardSettings;
47
+ cardHeader: CardHeaderSettings;
48
+ cardBody: CardBodySettings;
49
+ cardFooter: CardFooterSettings;
50
+
51
+ tabs: TabsSettings;
52
+ tab: TabSettings;
53
+ }>;
54
+ }
55
+
56
+ const settings = reactive({
57
+ global: {
58
+ unstyled: false,
59
+ },
60
+ components: {
61
+ radioGroup: {
62
+ unstyled: false,
63
+ },
64
+ radioItem: {
65
+ unstyled: false,
66
+ },
67
+ switch: {
68
+ unstyled: false,
69
+ },
70
+ avatar: {
71
+ unstyled: false,
72
+ },
73
+ badge: {
74
+ unstyled: false,
75
+ },
76
+ button: {
77
+ unstyled: false,
78
+ },
79
+ chip: {
80
+ unstyled: false,
81
+ },
82
+ codeBlock: {
83
+ unstyled: false,
84
+ },
85
+ listbox: {
86
+ unstyled: false,
87
+ },
88
+ listboxItem: {
89
+ unstyled: false,
90
+ },
91
+ accordion: {
92
+ unstyled: false,
93
+ },
94
+ accordionItem: {
95
+ unstyled: false,
96
+ },
97
+ alert: {
98
+ unstyled: false,
99
+ },
100
+ card: {
101
+ unstyled: false,
102
+ },
103
+ cardHeader: {
104
+ unstyled: false,
105
+ },
106
+ cardBody: {
107
+ unstyled: false,
108
+ },
109
+ cardFooter: {
110
+ unstyled: false,
111
+ },
112
+ tabs: {
113
+ unstyled: false,
114
+ },
115
+ tab: {
116
+ unstyled: false,
117
+ },
118
+ },
119
+ });
120
+
121
+ const useSettings = () => {
122
+ const updateSettings = (partialSettings: Partial<VuetifulSettings>) => {
123
+ for (const key in partialSettings) {
124
+ if (key in settings) {
125
+ Object.assign((settings as any)[key], (partialSettings as any)[key]);
126
+ }
127
+ }
128
+ };
129
+
130
+ return {
131
+ updateSettings,
132
+ settings,
133
+ };
134
+ };
135
+
136
+ export { useSettings };
@@ -1 +1,59 @@
1
1
  export * from "./tailwind";
2
+
3
+ /**
4
+ * The commented string unions are to use in PropType<> for Vue components,
5
+ * TypeScript types or enums do not give errors when using a string that is not in the union.
6
+ **/
7
+
8
+ export const Variant = {
9
+ Filled: "filled",
10
+ FilledPrimary: "filled-primary",
11
+ FilledSecondary: "filled-secondary",
12
+ FilledTertiary: "filled-tertiary",
13
+ FilledSuccess: "filled-success",
14
+ FilledWarning: "filled-warning",
15
+ FilledError: "filled-error",
16
+ FilledSurface: "filled-surface",
17
+ Ringed: "ringed",
18
+ RingedPrimary: "ringed-primary",
19
+ RingedSecondary: "ringed-secondary",
20
+ RingedTertiary: "ringed-tertiary",
21
+ RingedSuccess: "ringed-success",
22
+ RingedWarning: "ringed-warning",
23
+ RingedError: "ringed-error",
24
+ RingedSurface: "ringed-surface",
25
+ Ghost: "ghost",
26
+ GhostPrimary: "ghost-primary",
27
+ GhostSecondary: "ghost-secondary",
28
+ GhostTertiary: "ghost-tertiary",
29
+ GhostSuccess: "ghost-success",
30
+ GhostWarning: "ghost-warning",
31
+ GhostError: "ghost-error",
32
+ GhostSurface: "ghost-surface",
33
+ Soft: "soft",
34
+ SoftPrimary: "soft-primary",
35
+ SoftSecondary: "soft-secondary",
36
+ SoftTertiary: "soft-tertiary",
37
+ SoftSuccess: "soft-success",
38
+ SoftWarning: "soft-warning",
39
+ SoftError: "soft-error",
40
+ SoftSurface: "soft-surface",
41
+ Glass: "glass",
42
+ GlassPrimary: "glass-primary",
43
+ GlassSecondary: "glass-secondary",
44
+ GlassTertiary: "glass-tertiary",
45
+ GlassSuccess: "glass-success",
46
+ GlassWarning: "glass-warning",
47
+ GlassError: "glass-error",
48
+ GlassSurface: "glass-surface",
49
+ };
50
+ // "filled" | "filled-primary" | "filled-secondary" | "filled-tertiary" | "filled-success" | "filled-warning" | "filled-error" | "filled-surface" | "ringed" | "ringed-primary" | "ringed-secondary" | "ringed-tertiary" | "ringed-success" | "ringed-warning" | "ringed-error" | "ringed-surface" | "ghost" | "ghost-primary" | "ghost-secondary" | "ghost-tertiary" | "ghost-success" | "ghost-warning" | "ghost-error" | "ghost-surface" | "soft" | "soft-primary" | "soft-secondary" | "soft-tertiary" | "soft-success" | "soft-warning" | "soft-error" | "soft-surface" | "glass" | "glass-primary" | "glass-secondary" | "glass-tertiary" | "glass-success" | "glass-warning" | "glass-error" | "glass-surface" |
51
+
52
+ export const Size = {
53
+ XS: "xs",
54
+ SM: "sm",
55
+ MD: "md",
56
+ LG: "lg",
57
+ XL: "xl",
58
+ };
59
+ // "xs" | "sm" | "md" | "lg" | "xl"