@code-coaching/vuetiful 0.23.1 → 0.24.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/dist/style.css +1 -1
- package/dist/types/components/VBootstrap.vue.d.ts +1 -1
- package/dist/types/components/atoms/VAvatar.vue.d.ts +1 -1
- package/dist/types/components/atoms/VLightSwitch.vue.d.ts +7 -3
- package/dist/types/components/atoms/index.d.ts +13 -13
- package/dist/types/components/index.d.ts +2 -2
- package/dist/types/components/molecules/VAlert.vue.d.ts +1 -1
- package/dist/types/components/molecules/VCodeBlock.vue.d.ts +2 -2
- package/dist/types/components/molecules/VDrawer.vue.d.ts +1 -1
- package/dist/types/components/molecules/VListbox/VListbox.vue.d.ts +1 -1
- package/dist/types/components/molecules/VRail/VRail.vue.d.ts +1 -1
- package/dist/types/components/molecules/VRail/VRailTile.vue.d.ts +1 -1
- package/dist/types/components/molecules/index.d.ts +21 -21
- package/dist/types/directives/clipboard.d.ts +1 -1
- package/dist/types/directives/index.d.ts +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/props/props.d.ts +1 -1
- package/dist/types/services/dark-mode.service.d.ts +13 -13
- package/dist/types/services/drawer.service.d.ts +1 -1
- package/dist/types/services/index.d.ts +6 -6
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/utils/colors/colors.service.d.ts +69 -0
- package/dist/types/utils/index.d.ts +7 -3
- package/dist/types/utils/theme/theme-switcher.vue.d.ts +1 -1
- package/dist/types/utils/theme/theme.service.d.ts +9 -24
- package/dist/types/utils/theme/themes.d.ts +35 -0
- package/dist/vuetiful.es.mjs +456 -161
- package/dist/vuetiful.umd.js +71 -16
- package/package.json +1 -1
- package/src/assets/main.css +6 -6
- package/src/components/VBootstrap.vue +43 -43
- package/src/components/atoms/VAvatar.test.ts +71 -71
- package/src/components/atoms/VAvatar.vue +22 -23
- package/src/components/atoms/VBadge.test.ts +11 -11
- package/src/components/atoms/VBadge.vue +2 -2
- package/src/components/atoms/VButton.test.ts +82 -82
- package/src/components/atoms/VButton.vue +20 -21
- package/src/components/atoms/VChip.test.ts +11 -11
- package/src/components/atoms/VChip.vue +3 -3
- package/src/components/atoms/VLightSwitch.test.ts +63 -14
- package/src/components/atoms/VLightSwitch.vue +35 -46
- package/src/components/atoms/VRadio/VRadioDescription.test.ts +13 -13
- package/src/components/atoms/VRadio/VRadioDescription.vue +2 -2
- package/src/components/atoms/VRadio/VRadioGroup.test.ts +40 -40
- package/src/components/atoms/VRadio/VRadioGroup.vue +19 -22
- package/src/components/atoms/VRadio/VRadioItem.test.ts +67 -67
- package/src/components/atoms/VRadio/VRadioItem.vue +10 -13
- package/src/components/atoms/VRadio/VRadioLabel.test.ts +13 -13
- package/src/components/atoms/VRadio/VRadioLabel.vue +5 -3
- package/src/components/atoms/VSwitch/VSwitch.test.ts +33 -33
- package/src/components/atoms/VSwitch/VSwitch.vue +24 -27
- package/src/components/atoms/VSwitch/VSwitchDescription.test.ts +13 -13
- package/src/components/atoms/VSwitch/VSwitchDescription.vue +2 -2
- package/src/components/atoms/VSwitch/VSwitchGroup.test.ts +9 -9
- package/src/components/atoms/VSwitch/VSwitchGroup.vue +2 -2
- package/src/components/atoms/VSwitch/VSwitchLabel.test.ts +19 -19
- package/src/components/atoms/VSwitch/VSwitchLabel.vue +2 -2
- package/src/components/atoms/index.ts +13 -13
- package/src/components/index.ts +2 -2
- package/src/components/molecules/VAccordion/VAccordion.test.ts +11 -17
- package/src/components/molecules/VAccordion/VAccordion.vue +3 -3
- package/src/components/molecules/VAccordion/VAccordionItem.test.ts +55 -55
- package/src/components/molecules/VAccordion/VAccordionItem.vue +9 -22
- package/src/components/molecules/VAlert.test.ts +38 -38
- package/src/components/molecules/VAlert.vue +25 -47
- package/src/components/molecules/VCard/VCard.test.ts +25 -25
- package/src/components/molecules/VCard/VCard.vue +13 -15
- package/src/components/molecules/VCard/VCardBody.test.ts +14 -14
- package/src/components/molecules/VCard/VCardBody.vue +4 -8
- package/src/components/molecules/VCard/VCardFooter.test.ts +22 -22
- package/src/components/molecules/VCard/VCardFooter.vue +10 -8
- package/src/components/molecules/VCard/VCardHeader.test.ts +25 -25
- package/src/components/molecules/VCard/VCardHeader.vue +7 -8
- package/src/components/molecules/VCodeBlock.test.ts +63 -63
- package/src/components/molecules/VCodeBlock.vue +27 -34
- package/src/components/molecules/VDrawer.test.ts +5 -5
- package/src/components/molecules/VDrawer.vue +10 -10
- package/src/components/molecules/VListbox/VListbox.test.ts +53 -53
- package/src/components/molecules/VListbox/VListbox.vue +31 -32
- package/src/components/molecules/VListbox/VListboxButton.test.ts +13 -13
- package/src/components/molecules/VListbox/VListboxButton.vue +5 -5
- package/src/components/molecules/VListbox/VListboxItem.test.ts +25 -25
- package/src/components/molecules/VListbox/VListboxItem.vue +7 -8
- package/src/components/molecules/VListbox/VListboxItems.test.ts +14 -14
- package/src/components/molecules/VListbox/VListboxItems.vue +9 -11
- package/src/components/molecules/VListbox/VListboxLabel.test.ts +10 -10
- package/src/components/molecules/VListbox/VListboxLabel.vue +2 -2
- package/src/components/molecules/VPreview.test.ts +26 -26
- package/src/components/molecules/VPreview.vue +22 -27
- package/src/components/molecules/VRail/VRail.test.ts +5 -5
- package/src/components/molecules/VRail/VRail.vue +7 -7
- package/src/components/molecules/VRail/VRailTile.test.ts +26 -28
- package/src/components/molecules/VRail/VRailTile.vue +13 -11
- package/src/components/molecules/VShell.test.ts +5 -5
- package/src/components/molecules/VShell.vue +11 -20
- package/src/components/molecules/VTabs/VTab.test.ts +69 -52
- package/src/components/molecules/VTabs/VTab.vue +13 -17
- package/src/components/molecules/VTabs/VTabPanel.test.ts +8 -8
- package/src/components/molecules/VTabs/VTabPanel.vue +1 -1
- package/src/components/molecules/VTabs/VTabs.test.ts +36 -36
- package/src/components/molecules/VTabs/VTabs.vue +18 -22
- package/src/components/molecules/index.ts +21 -21
- package/src/directives/clipboard.test.ts +9 -9
- package/src/directives/clipboard.ts +2 -2
- package/src/directives/index.ts +1 -1
- package/src/env.d.ts +2 -2
- package/src/index.ts +7 -7
- package/src/props/index.ts +1 -1
- package/src/props/props.ts +44 -44
- package/src/services/dark-mode.service.test.ts +64 -194
- package/src/services/dark-mode.service.ts +35 -54
- package/src/services/drawer.service.test.ts +21 -21
- package/src/services/drawer.service.ts +10 -10
- package/src/services/highlight.service.test.ts +12 -12
- package/src/services/highlight.service.ts +1 -1
- package/src/services/index.ts +6 -6
- package/src/services/rail.service.test.ts +7 -7
- package/src/services/rail.service.ts +2 -2
- package/src/services/settings.service.test.ts +5 -5
- package/src/services/settings.service.ts +1 -1
- package/src/styles/all.css +7 -7
- package/src/styles/elements/buttons.css +1 -1
- package/src/styles/elements/forms.css +7 -7
- package/src/styles/elements.css +13 -13
- package/src/styles/transitions.css +2 -2
- package/src/styles/typography.css +5 -5
- package/src/themes/theme-rocket.css +10 -10
- package/src/themes/theme-sahara.css +13 -13
- package/src/themes/theme-seafoam.css +13 -13
- package/src/themes/theme-seasonal.css +4 -4
- package/src/themes/theme-skeleton.css +7 -7
- package/src/themes/theme-vintage.css +12 -12
- package/src/themes/theme-vuetiful-0.0.1.css +13 -13
- package/src/types/index.ts +46 -46
- package/src/types/tailwind.ts +2 -21
- package/src/utils/colors/colors.service.ts +293 -0
- package/src/utils/index.ts +7 -3
- package/src/utils/platform/platform.service.test.ts +6 -6
- package/src/utils/platform/platform.service.ts +1 -1
- package/src/utils/theme/callback.test.ts +11 -7
- package/src/utils/theme/remove.test.ts +11 -9
- package/src/utils/theme/theme-switcher.vue +43 -49
- package/src/utils/theme/theme.service.test.ts +194 -84
- package/src/utils/theme/theme.service.ts +141 -81
- package/src/utils/theme/themes.ts +122 -0
- package/dist/types/components/index.test.d.ts +0 -1
- package/dist/types/index.test.d.ts +0 -1
- package/dist/types/utils/index.test.d.ts +0 -1
- package/src/components/index.test.ts +0 -10
- package/src/index.test.ts +0 -26
- package/src/utils/index.test.ts +0 -11
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.icon[data-v-
|
|
1
|
+
.icon[data-v-ef253f90],.icon[data-v-31089628]{@apply my-1 h-4 w-4 fill-current;}.icon[data-v-513d21fc]{@apply my-1 h-4 min-h-[1rem] w-4 min-w-[1rem] fill-current;}.icon[data-v-5d6982bd]{@apply my-1 h-6 min-h-[1.5rem] w-6 min-w-[1.5rem] fill-current;}.vuetiful-card-header{border-top-left-radius:inherit;border-top-right-radius:inherit}.vuetiful-card-header>*{border-top-left-radius:inherit;border-top-right-radius:inherit}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!
|
|
2
2
|
Theme: GitHub Dark
|
|
3
3
|
Description: Dark theme as seen on github.com
|
|
4
4
|
Author: github.com
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType } from
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
2
|
declare const _default: import("vue").DefineComponent<{
|
|
3
3
|
variant: {
|
|
4
4
|
type: PropType<"" | "variant-filled" | "variant-filled-surface" | "variant-filled-primary" | "variant-filled-secondary" | "variant-filled-tertiary" | "variant-filled-success" | "variant-filled-warning" | "variant-filled-error" | "variant-ringed" | "variant-ringed-primary" | "variant-ringed-secondary" | "variant-ringed-tertiary" | "variant-ringed-success" | "variant-ringed-warning" | "variant-ringed-error" | "variant-ringed-surface" | "variant-ghost" | "variant-ghost-primary" | "variant-ghost-secondary" | "variant-ghost-tertiary" | "variant-ghost-success" | "variant-ghost-warning" | "variant-ghost-error" | "variant-ghost-surface" | "variant-soft" | "variant-soft-primary" | "variant-soft-secondary" | "variant-soft-tertiary" | "variant-soft-success" | "variant-soft-warning" | "variant-soft-error" | "variant-soft-surface" | "variant-glass" | "variant-glass-primary" | "variant-glass-secondary" | "variant-glass-tertiary" | "variant-glass-success" | "variant-glass-warning" | "variant-glass-error" | "variant-glass-surface">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CssClasses } from
|
|
2
|
-
import { ComputedRef } from
|
|
1
|
+
import { CssClasses } from '@/index';
|
|
2
|
+
import { ComputedRef } from 'vue';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
bgLight: {
|
|
5
5
|
type: () => CssClasses;
|
|
@@ -43,8 +43,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
43
|
};
|
|
44
44
|
onToggleHandler: () => void;
|
|
45
45
|
onKeyDown: (event: KeyboardEvent) => void;
|
|
46
|
-
|
|
46
|
+
chosenMode: import("vue").Ref<string>;
|
|
47
47
|
iconFill: ComputedRef<string>;
|
|
48
|
+
MODE: {
|
|
49
|
+
LIGHT: string;
|
|
50
|
+
DARK: string;
|
|
51
|
+
};
|
|
48
52
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
53
|
bgLight: {
|
|
50
54
|
type: () => CssClasses;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import VAvatar from
|
|
2
|
-
import VBadge from
|
|
3
|
-
import VButton from
|
|
4
|
-
import VChip from
|
|
5
|
-
import VLightSwitch from
|
|
6
|
-
import VRadioDescription from
|
|
7
|
-
import VRadioGroup from
|
|
8
|
-
import VRadioItem from
|
|
9
|
-
import VRadioLabel from
|
|
10
|
-
import VSwitch from
|
|
11
|
-
import VSwitchDescription from
|
|
12
|
-
import VSwitchGroup from
|
|
13
|
-
import VSwitchLabel from
|
|
1
|
+
import VAvatar from './VAvatar.vue';
|
|
2
|
+
import VBadge from './VBadge.vue';
|
|
3
|
+
import VButton from './VButton.vue';
|
|
4
|
+
import VChip from './VChip.vue';
|
|
5
|
+
import VLightSwitch from './VLightSwitch.vue';
|
|
6
|
+
import VRadioDescription from './VRadio/VRadioDescription.vue';
|
|
7
|
+
import VRadioGroup from './VRadio/VRadioGroup.vue';
|
|
8
|
+
import VRadioItem from './VRadio/VRadioItem.vue';
|
|
9
|
+
import VRadioLabel from './VRadio/VRadioLabel.vue';
|
|
10
|
+
import VSwitch from './VSwitch/VSwitch.vue';
|
|
11
|
+
import VSwitchDescription from './VSwitch/VSwitchDescription.vue';
|
|
12
|
+
import VSwitchGroup from './VSwitch/VSwitchGroup.vue';
|
|
13
|
+
import VSwitchLabel from './VSwitch/VSwitchLabel.vue';
|
|
14
14
|
export { VAvatar, VButton, VBadge, VChip, VLightSwitch, VRadioGroup, VRadioItem, VRadioLabel, VRadioDescription, VSwitchGroup, VSwitchLabel, VSwitchDescription, VSwitch, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './atoms';
|
|
2
|
+
export * from './molecules';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CssClasses } from
|
|
2
|
-
import
|
|
1
|
+
import { CssClasses } from '@/index';
|
|
2
|
+
import 'highlight.js/styles/github-dark.css';
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
language: {
|
|
5
5
|
type: StringConstructor;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import VDrawer from
|
|
2
|
-
import VPreview from
|
|
3
|
-
import VRail from
|
|
4
|
-
import VRailTile from
|
|
5
|
-
import VShell from
|
|
6
|
-
import VListbox from
|
|
7
|
-
import VListboxButton from
|
|
8
|
-
import VListboxItem from
|
|
9
|
-
import VListboxItems from
|
|
10
|
-
import VListboxLabel from
|
|
11
|
-
import VTab from
|
|
12
|
-
import VTabPanel from
|
|
13
|
-
import VTabs from
|
|
14
|
-
import VAccordion from
|
|
15
|
-
import VAccordionItem from
|
|
16
|
-
import VAlert from
|
|
17
|
-
import VCard from
|
|
18
|
-
import VCardBody from
|
|
19
|
-
import VCardFooter from
|
|
20
|
-
import VCardHeader from
|
|
21
|
-
import VCodeBlock from
|
|
1
|
+
import VDrawer from './VDrawer.vue';
|
|
2
|
+
import VPreview from './VPreview.vue';
|
|
3
|
+
import VRail from './VRail/VRail.vue';
|
|
4
|
+
import VRailTile from './VRail/VRailTile.vue';
|
|
5
|
+
import VShell from './VShell.vue';
|
|
6
|
+
import VListbox from './VListbox/VListbox.vue';
|
|
7
|
+
import VListboxButton from './VListbox/VListboxButton.vue';
|
|
8
|
+
import VListboxItem from './VListbox/VListboxItem.vue';
|
|
9
|
+
import VListboxItems from './VListbox/VListboxItems.vue';
|
|
10
|
+
import VListboxLabel from './VListbox/VListboxLabel.vue';
|
|
11
|
+
import VTab from './VTabs/VTab.vue';
|
|
12
|
+
import VTabPanel from './VTabs/VTabPanel.vue';
|
|
13
|
+
import VTabs from './VTabs/VTabs.vue';
|
|
14
|
+
import VAccordion from './VAccordion/VAccordion.vue';
|
|
15
|
+
import VAccordionItem from './VAccordion/VAccordionItem.vue';
|
|
16
|
+
import VAlert from './VAlert.vue';
|
|
17
|
+
import VCard from './VCard/VCard.vue';
|
|
18
|
+
import VCardBody from './VCard/VCardBody.vue';
|
|
19
|
+
import VCardFooter from './VCard/VCardFooter.vue';
|
|
20
|
+
import VCardHeader from './VCard/VCardHeader.vue';
|
|
21
|
+
import VCodeBlock from './VCodeBlock.vue';
|
|
22
22
|
export { VAccordion, VAccordionItem, VAlert, VCard, VCardBody, VCardFooter, VCardHeader, VCodeBlock, VDrawer, VListbox, VListboxButton, VListboxItem, VListboxItems, VListboxLabel, VPreview, VRail, VRailTile, VShell, VTab, VTabPanel, VTabs, };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import vClipboard from
|
|
1
|
+
import vClipboard from './clipboard';
|
|
2
2
|
export { vClipboard };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
declare function install(app: any): void;
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import './assets/main.css';
|
|
3
|
+
import './styles/tailwind.css';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
install: typeof install;
|
|
6
6
|
};
|
|
7
7
|
export default _default;
|
|
8
|
-
export * from
|
|
9
|
-
export * from
|
|
10
|
-
export * from
|
|
11
|
-
export * from
|
|
8
|
+
export * from './components';
|
|
9
|
+
export * from './utils';
|
|
10
|
+
export * from './directives';
|
|
11
|
+
export * from './services';
|
|
12
12
|
export declare type CssClasses = string;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
declare const MODE: {
|
|
2
|
+
LIGHT: string;
|
|
3
|
+
DARK: string;
|
|
4
|
+
};
|
|
5
|
+
export declare type Mode = (typeof MODE)[keyof typeof MODE];
|
|
2
6
|
declare const useDarkMode: () => {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
currentMode: Readonly<Ref<boolean>>;
|
|
6
|
-
isDark: Readonly<Ref<boolean>>;
|
|
7
|
-
getModeOsPrefers: () => boolean;
|
|
8
|
-
getModeUserPrefers: () => boolean | undefined;
|
|
9
|
-
getModeAutoPrefers: () => boolean;
|
|
10
|
-
setModeUserPrefers: (value: boolean) => void;
|
|
11
|
-
setModeCurrent: (value: boolean) => void;
|
|
12
|
-
autoModeWatcher: () => void;
|
|
7
|
+
chosenMode: import("vue").Ref<string>;
|
|
8
|
+
isDark: Readonly<import("vue").Ref<boolean>>;
|
|
13
9
|
initializeMode: () => void;
|
|
10
|
+
applyMode: (value: Mode) => void;
|
|
11
|
+
autoModeWatcher: () => void;
|
|
12
|
+
applyModeSSR: (html: string, mode: Mode) => string;
|
|
13
|
+
getModeFromCookie: (cookies: string) => string;
|
|
14
14
|
MODE: {
|
|
15
|
-
LIGHT:
|
|
16
|
-
DARK:
|
|
15
|
+
LIGHT: string;
|
|
16
|
+
DARK: string;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
19
19
|
export { useDarkMode };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useDarkMode } from
|
|
2
|
-
import { useDrawer } from
|
|
3
|
-
import { useHighlight } from
|
|
4
|
-
import { useRail } from
|
|
5
|
-
import { useSettings, VuetifulSettings } from
|
|
1
|
+
import { useDarkMode, Mode } from './dark-mode.service';
|
|
2
|
+
import { useDrawer } from './drawer.service';
|
|
3
|
+
import { useHighlight } from './highlight.service';
|
|
4
|
+
import { useRail } from './rail.service';
|
|
5
|
+
import { useSettings, VuetifulSettings } from './settings.service';
|
|
6
6
|
export { useDarkMode, useDrawer, useHighlight, useRail, useSettings };
|
|
7
|
-
export type { VuetifulSettings };
|
|
7
|
+
export type { VuetifulSettings, Mode };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
declare type ContrastLevel = 'AA' | 'AAA';
|
|
2
|
+
declare type ContrastSize = 'small' | 'large';
|
|
3
|
+
export interface Report {
|
|
4
|
+
emoji: string;
|
|
5
|
+
note: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PassReport {
|
|
8
|
+
textColor: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
contrast: number;
|
|
11
|
+
report: Report;
|
|
12
|
+
smallAA: boolean;
|
|
13
|
+
smallAAA: boolean;
|
|
14
|
+
largeAA: boolean;
|
|
15
|
+
largeAAA: boolean;
|
|
16
|
+
fails: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare type Palette = {
|
|
19
|
+
[key: number]: {
|
|
20
|
+
hex: string;
|
|
21
|
+
rgb: string;
|
|
22
|
+
on: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const semanticNames: readonly ["primary", "secondary", "tertiary", "success", "warning", "error", "surface"];
|
|
26
|
+
export declare type SemanticNames = (typeof semanticNames)[number];
|
|
27
|
+
export interface ColorSettings {
|
|
28
|
+
key: SemanticNames;
|
|
29
|
+
label: string;
|
|
30
|
+
hex: string;
|
|
31
|
+
rgb: string;
|
|
32
|
+
on: string;
|
|
33
|
+
}
|
|
34
|
+
declare type Rgb = {
|
|
35
|
+
r: number;
|
|
36
|
+
g: number;
|
|
37
|
+
b: number;
|
|
38
|
+
};
|
|
39
|
+
declare const useColors: () => {
|
|
40
|
+
hexToRgb: (hex: string) => Rgb | null;
|
|
41
|
+
hexToTailwindRgbString: (hex: string) => string;
|
|
42
|
+
rgbToHex: (r: number, g: number, b: number) => string;
|
|
43
|
+
generateA11yOnColor: (hex: string) => '255 255 255' | '0 0 0';
|
|
44
|
+
lighten: (hex: string, intensity: number) => string;
|
|
45
|
+
darken: (hex: string, intensity: number) => string;
|
|
46
|
+
generatePalette: (baseColor: string) => Palette;
|
|
47
|
+
contrastLevels: Record<ContrastSize, {
|
|
48
|
+
AA: number;
|
|
49
|
+
AAA: number;
|
|
50
|
+
}>;
|
|
51
|
+
getLuminance: {
|
|
52
|
+
(r: Rgb): number;
|
|
53
|
+
(r: number, g: number, b: number): number;
|
|
54
|
+
};
|
|
55
|
+
destringRgb: (rgbString: string) => Rgb;
|
|
56
|
+
handleStringColor: {
|
|
57
|
+
(colorString: string): Rgb;
|
|
58
|
+
(colorString: string, returnType: 'rgb'): Rgb;
|
|
59
|
+
(colorString: string, returnType: 'hex'): string;
|
|
60
|
+
(colorString: string, returnType?: "rgb" | "hex" | undefined): string | Rgb;
|
|
61
|
+
};
|
|
62
|
+
calculateRatio: (luminance1: string | number, luminance2: string | number) => number;
|
|
63
|
+
textPasses: (textColor: string, backgroundColor: string, size: ContrastSize, level: ContrastLevel) => boolean;
|
|
64
|
+
hexValueIsValid: (textColor: string) => boolean;
|
|
65
|
+
getPassReport: (textColor: string, backgroundColor: string) => PassReport;
|
|
66
|
+
hexValuesAreValid: (colors: Array<ColorSettings>) => boolean;
|
|
67
|
+
semanticNames: readonly ["primary", "secondary", "tertiary", "success", "warning", "error", "surface"];
|
|
68
|
+
};
|
|
69
|
+
export { useColors };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import type { ColorSettings, Palette, PassReport, Report, SemanticNames } from './colors/colors.service';
|
|
2
|
+
import { useColors } from './colors/colors.service';
|
|
3
|
+
import { usePlatform } from './platform/platform.service';
|
|
4
|
+
import ThemeSwitcher from './theme/theme-switcher.vue';
|
|
5
|
+
import { useTheme } from './theme/theme.service';
|
|
6
|
+
export { ThemeSwitcher, useColors, usePlatform, useTheme };
|
|
7
|
+
export type { ColorSettings, Palette, PassReport, Report, SemanticNames };
|
|
@@ -1,28 +1,13 @@
|
|
|
1
|
-
import { Ref } from
|
|
2
|
-
|
|
3
|
-
name: string;
|
|
4
|
-
url: string;
|
|
5
|
-
}
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Theme } from './themes';
|
|
6
3
|
declare const useTheme: () => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
chosenTheme: Ref<Theme>;
|
|
5
|
+
themes: Theme[];
|
|
6
|
+
applyThemeSSR: (html: string, theme: Theme) => string;
|
|
7
|
+
applyTheme: (theme: Theme, callback?: Function | undefined) => void;
|
|
8
|
+
getThemeFromCookie: (cookies: string) => Theme;
|
|
12
9
|
initializeTheme: (callback?: Function | undefined) => void;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
THEMES: {
|
|
16
|
-
VUETIFUL: string;
|
|
17
|
-
ROCKET: string;
|
|
18
|
-
SAHARA: string;
|
|
19
|
-
SEAFOAM: string;
|
|
20
|
-
SEASONAL: string;
|
|
21
|
-
SKELETON: string;
|
|
22
|
-
VINTAGE: string;
|
|
23
|
-
};
|
|
24
|
-
overwriteThemes: (newThemes: Array<Theme>) => void;
|
|
25
|
-
registerAllBuiltInThemes: () => Array<Theme>;
|
|
26
|
-
registerTheme: (name: string, url: string) => Theme;
|
|
10
|
+
changeDataTheme: (name: string) => void;
|
|
11
|
+
registerTheme: (theme: Theme) => void;
|
|
27
12
|
};
|
|
28
13
|
export { useTheme };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ColorSettings } from '../colors/colors.service';
|
|
2
|
+
export declare const themes: Array<Theme>;
|
|
3
|
+
export interface Theme {
|
|
4
|
+
name: string;
|
|
5
|
+
gradients: Gradients;
|
|
6
|
+
colors: {
|
|
7
|
+
primary: ColorSettings;
|
|
8
|
+
secondary: ColorSettings;
|
|
9
|
+
tertiary: ColorSettings;
|
|
10
|
+
success: ColorSettings;
|
|
11
|
+
warning: ColorSettings;
|
|
12
|
+
error: ColorSettings;
|
|
13
|
+
surface: ColorSettings;
|
|
14
|
+
};
|
|
15
|
+
fonts: Fonts;
|
|
16
|
+
textColorLight: string;
|
|
17
|
+
textColorDark: string;
|
|
18
|
+
roundedBase: string;
|
|
19
|
+
roundedContainer: string;
|
|
20
|
+
borderBase: string;
|
|
21
|
+
customCss: string;
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
}
|
|
24
|
+
export interface Fonts {
|
|
25
|
+
base: string;
|
|
26
|
+
customBase: string;
|
|
27
|
+
baseImports: string;
|
|
28
|
+
headings: string;
|
|
29
|
+
customHeadings: string;
|
|
30
|
+
headingImports: string;
|
|
31
|
+
}
|
|
32
|
+
export interface Gradients {
|
|
33
|
+
light: string;
|
|
34
|
+
dark: string;
|
|
35
|
+
}
|