@webx-ui/core 0.29.0 → 0.30.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.
- package/dist/components/ThemeSwitch/ThemeSwitch.d.ts +29 -0
- package/dist/components/ThemeSwitch/index.d.ts +2 -0
- package/dist/components/ThemeSwitch/types.d.ts +22 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +4342 -4259
- package/dist/index.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ThemePreference, ThemeSwitchProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Light, whatever the machine says, dark.
|
|
4
|
+
*
|
|
5
|
+
* It only reports the choice: applying it is `applyTheme()`'s job, and remembering it belongs
|
|
6
|
+
* to whoever knows where this person's settings live. Three states rather than two because
|
|
7
|
+
* "follow the machine" is a real answer and cannot be spelled with a toggle — a two-way
|
|
8
|
+
* switch can only ever guess which side of it means "I have not decided".
|
|
9
|
+
*/
|
|
10
|
+
type __VLS_Props = ThemeSwitchProps;
|
|
11
|
+
type __VLS_PublicProps = {
|
|
12
|
+
modelValue?: ThemePreference;
|
|
13
|
+
} & __VLS_Props;
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
change: (value: ThemePreference) => any;
|
|
16
|
+
"update:modelValue": (value: ThemePreference) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
onChange?: ((value: ThemePreference) => any) | undefined;
|
|
19
|
+
"onUpdate:modelValue"?: ((value: ThemePreference) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
size: import('../..').ControlSize;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
ariaLabel: string;
|
|
24
|
+
block: boolean;
|
|
25
|
+
lightLabel: string;
|
|
26
|
+
darkLabel: string;
|
|
27
|
+
systemLabel: string;
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ThemePreference } from '@webx-ui/tokens';
|
|
2
|
+
import { ControlSize } from '../../composables/useFormField';
|
|
3
|
+
export type { ThemePreference };
|
|
4
|
+
export interface ThemeSwitchProps {
|
|
5
|
+
size?: ControlSize;
|
|
6
|
+
/** Stretches to the width it is given, the three sharing it equally. */
|
|
7
|
+
block?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
/** Accessible name for the group. */
|
|
10
|
+
ariaLabel?: string;
|
|
11
|
+
/**
|
|
12
|
+
* The three names. They are read out, shown on hover and nowhere else — the pictures are
|
|
13
|
+
* the control — but they are the only thing that says what "system" means, so they are
|
|
14
|
+
* worth translating.
|
|
15
|
+
*/
|
|
16
|
+
lightLabel?: string;
|
|
17
|
+
darkLabel?: string;
|
|
18
|
+
systemLabel?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface ThemeSwitchEmits {
|
|
21
|
+
change: [value: ThemePreference];
|
|
22
|
+
}
|