@webx-ui/core 0.28.0 → 0.30.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.
@@ -62,6 +62,8 @@ export declare const builtinIcons: {
62
62
  readonly mail: "<rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2.5\"/><path d=\"m4 7.5 6.9 5a2 2 0 0 0 2.2 0l6.9-5\"/>";
63
63
  readonly phone: "<path d=\"M7 3.5 9.5 4l1.2 3.4-1.9 1.6a11 11 0 0 0 5.2 5.2l1.6-1.9 3.4 1.2.5 2.5a2 2 0 0 1-2 2.3A15.5 15.5 0 0 1 4.7 5.5a2 2 0 0 1 2.3-2Z\"/>";
64
64
  readonly bell: "<path d=\"M7 10a5 5 0 0 1 10 0c0 4 1.5 5.5 1.5 5.5h-13S7 14 7 10Z\"/><path d=\"M10.2 18.5a2 2 0 0 0 3.6 0\"/>";
65
+ readonly 'map-pin': "<path d=\"M12 21s6.5-6 6.5-10.5a6.5 6.5 0 0 0-13 0C5.5 15 12 21 12 21Z\"/><circle cx=\"12\" cy=\"10.3\" r=\"2.4\"/>";
66
+ readonly megaphone: "<path d=\"M4.5 10.2v3.6a1.6 1.6 0 0 0 1.6 1.6h2.2l8.4 4.1a1 1 0 0 0 1.4-.9V5.4a1 1 0 0 0-1.4-.9L8.3 8.6H6.1a1.6 1.6 0 0 0-1.6 1.6Z\"/><path d=\"M8.3 15.4v2.8a2 2 0 0 0 2 2h.4a1 1 0 0 0 1-1.2l-.7-3.2\"/>";
65
67
  readonly cart: "<path d=\"M3 4.5h2.2l2.3 10.2a1.6 1.6 0 0 0 1.6 1.3h7.4a1.6 1.6 0 0 0 1.6-1.2L20 8H6\"/><circle cx=\"10\" cy=\"19.5\" r=\"1.5\"/><circle cx=\"17\" cy=\"19.5\" r=\"1.5\"/>";
66
68
  readonly tag: "<path d=\"M4 11.2V5.5A1.5 1.5 0 0 1 5.5 4h5.7a2 2 0 0 1 1.4.6l7 7a2 2 0 0 1 0 2.8l-5.2 5.2a2 2 0 0 1-2.8 0l-7-7a2 2 0 0 1-.6-1.4Z\"/><circle cx=\"8.5\" cy=\"8.5\" r=\"1.4\" fill=\"currentColor\" stroke=\"none\"/>";
67
69
  readonly link: "<path d=\"M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7L11.5 7\"/><path d=\"M14 10a4 4 0 0 0-5.7 0l-3 3A4 4 0 0 0 11 18.7L12.5 17\"/>";
@@ -0,0 +1,40 @@
1
+ import { IconPickerProps } from './types';
2
+ /**
3
+ * The icon set, picked from rather than typed into.
4
+ *
5
+ * An icon is a name in a set of a hundred and fifty, and a name that is not in it draws
6
+ * nothing at all — no warning, no placeholder, just a label that has quietly moved to where
7
+ * the picture should have been. A text field cannot say that; a grid of every icon there is
8
+ * can only say it.
9
+ *
10
+ * So the box is the search and the panel is the answer: typing filters, clicking chooses, and
11
+ * the value only ever becomes a name the set has.
12
+ */
13
+ type __VLS_Props = IconPickerProps;
14
+ type __VLS_PublicProps = {
15
+ modelValue?: string | null;
16
+ } & __VLS_Props;
17
+ declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
18
+ change: (value: string | null) => any;
19
+ "update:modelValue": (value: string | null) => any;
20
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
+ onChange?: ((value: string | null) => any) | undefined;
22
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
23
+ }>, {
24
+ name: string;
25
+ size: import('../..').ControlSize;
26
+ disabled: boolean;
27
+ placeholder: string;
28
+ teleport: boolean;
29
+ ariaLabel: string;
30
+ emptyText: string;
31
+ clearable: boolean;
32
+ status: import('../..').ControlStatus;
33
+ id: string;
34
+ unknownText: string;
35
+ clearLabel: string;
36
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
37
+ input: HTMLInputElement;
38
+ grid: HTMLDivElement;
39
+ }, any>;
40
+ export default _default;
@@ -0,0 +1,2 @@
1
+ export { default as WxIconPicker } from './IconPicker';
2
+ export type * from './types';
@@ -0,0 +1,24 @@
1
+ import { ControlSize, ControlStatus } from '../../composables/useFormField';
2
+ export interface IconPickerProps {
3
+ /** Show a button that empties the field. */
4
+ clearable?: boolean;
5
+ placeholder?: string;
6
+ /** What the field says when the name it holds is not in the set. */
7
+ unknownText?: string;
8
+ /** What the panel says when nothing matches what was typed. */
9
+ emptyText?: string;
10
+ /** Label of the button that empties the field, for screen readers. */
11
+ clearLabel?: string;
12
+ /** Render the panel in a portal so it escapes `overflow: hidden`. */
13
+ teleport?: boolean;
14
+ disabled?: boolean;
15
+ size?: ControlSize;
16
+ status?: ControlStatus;
17
+ id?: string;
18
+ name?: string;
19
+ /** Accessible label used when the field has no visible `<label>`. */
20
+ ariaLabel?: string;
21
+ }
22
+ export interface IconPickerEmits {
23
+ change: [value: string | null];
24
+ }
@@ -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,2 @@
1
+ export { default as WxThemeSwitch } from './ThemeSwitch';
2
+ export type * from './types';
@@ -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
+ }
@@ -43,6 +43,7 @@ export * from './FormItem';
43
43
  export * from './Header';
44
44
  export * from './Heading';
45
45
  export * from './Icon';
46
+ export * from './IconPicker';
46
47
  export * from './Image';
47
48
  export * from './ImageEditor';
48
49
  export * from './Indicator';
@@ -89,6 +90,7 @@ export * from './Tabs';
89
90
  export * from './TagsInput';
90
91
  export * from './Text';
91
92
  export * from './Textarea';
93
+ export * from './ThemeSwitch';
92
94
  export * from './Timeline';
93
95
  export * from './TimelineItem';
94
96
  export * from './TimePicker';