@nexxtmove/ui 2.0.0 → 2.2.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/components/editor/atoms/EditorSettingsBlock/EditorSettingsBlock.vue.d.ts +6 -0
- package/dist/components/editor/molecules/EditorBlur/EditorBlur.vue.d.ts +106 -0
- package/dist/components/editor/molecules/EditorColor/EditorColor.vue.d.ts +15 -0
- package/dist/components/molecules/ToggleGroup/ToggleGroup.vue.d.ts +7 -0
- package/dist/components/organisms/ColorPicker/ColorPicker.vue.d.ts +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2021 -1906
- package/dist/nuxt.js +1 -0
- package/package.json +1 -1
- package/src/components/editor/atoms/EditorSettingsBlock/EditorSettingsBlock.vue +15 -2
- package/src/components/editor/molecules/EditorBlur/EditorBlur.vue +160 -0
- package/src/components/editor/molecules/EditorColor/EditorColor.vue +42 -6
- package/src/components/molecules/ToggleGroup/ToggleGroup.vue +12 -1
- package/src/components/organisms/ColorPicker/ColorPicker.vue +70 -25
- package/src/components.json +1 -0
- package/src/index.ts +7 -0
|
@@ -6,6 +6,12 @@ interface NexxtEditorSettingsBlockProps {
|
|
|
6
6
|
* When `false` the content is always visible and the model is ignored.
|
|
7
7
|
*/
|
|
8
8
|
switchable?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Id(s) of an element that describes the setting, set as `aria-describedby`
|
|
11
|
+
* on the switch. Only has an effect when `switchable` is `true`; without it
|
|
12
|
+
* no attribute is rendered.
|
|
13
|
+
*/
|
|
14
|
+
describedby?: string;
|
|
9
15
|
}
|
|
10
16
|
type __VLS_Props = NexxtEditorSettingsBlockProps;
|
|
11
17
|
type __VLS_ModelProps = {
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The blur steps the editor offers, in the order they are shown. `token` is the
|
|
3
|
+
* class without its fixed `backdrop-blur-` prefix, so the class is
|
|
4
|
+
* `backdrop-blur-` plus the token -- the same shape as `EDITOR_SHADOW_OPTIONS`.
|
|
5
|
+
* "No blur" is not a step: it is the switch being off. The labels are not in
|
|
6
|
+
* here; they arrive through `messages`, keyed by token.
|
|
7
|
+
*/
|
|
8
|
+
export declare const EDITOR_BLUR_OPTIONS: readonly [{
|
|
9
|
+
readonly token: "xs";
|
|
10
|
+
}, {
|
|
11
|
+
readonly token: "sm";
|
|
12
|
+
}, {
|
|
13
|
+
readonly token: "md";
|
|
14
|
+
}, {
|
|
15
|
+
readonly token: "lg";
|
|
16
|
+
}, {
|
|
17
|
+
readonly token: "xl";
|
|
18
|
+
}];
|
|
19
|
+
/**
|
|
20
|
+
* The blur as the editor needs it: the Tailwind class itself, so the consumer
|
|
21
|
+
* can put the model value straight on the group it styles.
|
|
22
|
+
*/
|
|
23
|
+
export type EditorBlurValue = `backdrop-blur-${(typeof EDITOR_BLUR_OPTIONS)[number]['token']}`;
|
|
24
|
+
/** Overridable copy of the step control. Every key is optional. */
|
|
25
|
+
export interface EditorBlurMessages {
|
|
26
|
+
/**
|
|
27
|
+
* Accessible name of the group of steps. Visually hidden: the block label
|
|
28
|
+
* already says what the steps are. Defaults to the Dutch `'Sterkte'`.
|
|
29
|
+
*/
|
|
30
|
+
strength?: string;
|
|
31
|
+
/** Name of the `backdrop-blur-xs` option. Defaults to `'XS'`. */
|
|
32
|
+
xs?: string;
|
|
33
|
+
/** Name of the `backdrop-blur-sm` option. Defaults to `'S'`. */
|
|
34
|
+
sm?: string;
|
|
35
|
+
/** Name of the `backdrop-blur-md` option. Defaults to `'M'`. */
|
|
36
|
+
md?: string;
|
|
37
|
+
/** Name of the `backdrop-blur-lg` option. Defaults to `'L'`. */
|
|
38
|
+
lg?: string;
|
|
39
|
+
/** Name of the `backdrop-blur-xl` option. Defaults to `'XL'`. */
|
|
40
|
+
xl?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface NexxtEditorBlurProps {
|
|
43
|
+
/**
|
|
44
|
+
* Header text of the settings block. Defaults to the Dutch `'Vervagen'`; the
|
|
45
|
+
* library has no i18n layer, so a consumer in another language passes its own
|
|
46
|
+
* copy in.
|
|
47
|
+
*/
|
|
48
|
+
label?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Render a switch next to the label that collapses and expands the steps.
|
|
51
|
+
* Defaults to `true`: there is no "none" step, so the switch is the only way
|
|
52
|
+
* to turn the blur off. The switch state is the `enabled` model; switching
|
|
53
|
+
* off leaves the step alone.
|
|
54
|
+
*/
|
|
55
|
+
switchable?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Copy of the step control. Merged per key, so overriding one key keeps the
|
|
58
|
+
* defaults of the others. Copy is never translated inside the component.
|
|
59
|
+
*/
|
|
60
|
+
messages?: EditorBlurMessages;
|
|
61
|
+
/**
|
|
62
|
+
* Id(s) of an element that describes the setting, such as a hint the
|
|
63
|
+
* consumer renders itself. Set as `aria-describedby` on the switch (when
|
|
64
|
+
* `switchable`) and on the group of steps. Without it no attribute is set.
|
|
65
|
+
*/
|
|
66
|
+
describedby?: string;
|
|
67
|
+
}
|
|
68
|
+
declare const _default: typeof __VLS_export;
|
|
69
|
+
export default _default;
|
|
70
|
+
declare const __VLS_export: import('vue').DefineComponent<NexxtEditorBlurProps & {
|
|
71
|
+
/**
|
|
72
|
+
* The selected blur, as the Tailwind class to apply (`backdrop-blur-md`).
|
|
73
|
+
* Optional: a consumer may have no class stored yet. Without a valid class the
|
|
74
|
+
* control shows `md` but writes nothing, so the consumer has to assume
|
|
75
|
+
* `backdrop-blur-md` itself. Only a switch from off to on (when `switchable`)
|
|
76
|
+
* writes `backdrop-blur-md` back; mounting never emits.
|
|
77
|
+
*/
|
|
78
|
+
modelValue?: EditorBlurValue;
|
|
79
|
+
/**
|
|
80
|
+
* Open state of the block. Only has an effect when `switchable` is `true`; then
|
|
81
|
+
* off is the way to express "no blur". With `switchable` set to `false` the
|
|
82
|
+
* steps are always active, whatever this model says.
|
|
83
|
+
*/
|
|
84
|
+
enabled?: boolean;
|
|
85
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
86
|
+
"update:modelValue": (value: "backdrop-blur-sm" | "backdrop-blur-md" | "backdrop-blur-lg" | "backdrop-blur-xs" | "backdrop-blur-xl" | undefined) => any;
|
|
87
|
+
"update:enabled": (value: boolean) => any;
|
|
88
|
+
}, string, import('vue').PublicProps, Readonly<NexxtEditorBlurProps & {
|
|
89
|
+
/**
|
|
90
|
+
* The selected blur, as the Tailwind class to apply (`backdrop-blur-md`).
|
|
91
|
+
* Optional: a consumer may have no class stored yet. Without a valid class the
|
|
92
|
+
* control shows `md` but writes nothing, so the consumer has to assume
|
|
93
|
+
* `backdrop-blur-md` itself. Only a switch from off to on (when `switchable`)
|
|
94
|
+
* writes `backdrop-blur-md` back; mounting never emits.
|
|
95
|
+
*/
|
|
96
|
+
modelValue?: EditorBlurValue;
|
|
97
|
+
/**
|
|
98
|
+
* Open state of the block. Only has an effect when `switchable` is `true`; then
|
|
99
|
+
* off is the way to express "no blur". With `switchable` set to `false` the
|
|
100
|
+
* steps are always active, whatever this model says.
|
|
101
|
+
*/
|
|
102
|
+
enabled?: boolean;
|
|
103
|
+
}> & Readonly<{
|
|
104
|
+
"onUpdate:modelValue"?: ((value: "backdrop-blur-sm" | "backdrop-blur-md" | "backdrop-blur-lg" | "backdrop-blur-xs" | "backdrop-blur-xl" | undefined) => any) | undefined;
|
|
105
|
+
"onUpdate:enabled"?: ((value: boolean) => any) | undefined;
|
|
106
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -40,6 +40,11 @@ export interface EditorColorMessages {
|
|
|
40
40
|
suggestionsLabel?: string;
|
|
41
41
|
/** Label shown above the theme roles. Defaults to `'Huisstijl'`. */
|
|
42
42
|
themeLabel?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Label above the opacity slider, and its accessible name. Defaults to
|
|
45
|
+
* `'Dekking'`. Only shown with `showAlpha`.
|
|
46
|
+
*/
|
|
47
|
+
alphaLabel?: string;
|
|
43
48
|
}
|
|
44
49
|
export interface NexxtEditorColorProps {
|
|
45
50
|
/**
|
|
@@ -74,6 +79,16 @@ export interface NexxtEditorColorProps {
|
|
|
74
79
|
* 8-digit hex is left out. Without roles the section is not rendered.
|
|
75
80
|
*/
|
|
76
81
|
themeRoles?: EditorColorThemeRole[];
|
|
82
|
+
/**
|
|
83
|
+
* Offer an opacity slider in the picker. A colour picked below full opacity is
|
|
84
|
+
* written as an 8-digit hex (`bg-[#1777ea80]`); a fully opaque one keeps the
|
|
85
|
+
* 6-digit form. The slider is hidden while a theme role is selected: a role
|
|
86
|
+
* class carries no opacity. Off by default, in which case a stored 8-digit hex
|
|
87
|
+
* is shown opaque and only replaced once a new colour is picked. Turning it off
|
|
88
|
+
* while a translucent colour is set does write at once: the picker drops the
|
|
89
|
+
* alpha and the model gets the opaque 6-digit hex.
|
|
90
|
+
*/
|
|
91
|
+
showAlpha?: boolean;
|
|
77
92
|
}
|
|
78
93
|
declare const _default: typeof __VLS_export;
|
|
79
94
|
export default _default;
|
|
@@ -17,6 +17,12 @@ interface NexxtToggleGroupProps {
|
|
|
17
17
|
options: NexxtToggleGroupOption[];
|
|
18
18
|
label?: string;
|
|
19
19
|
equalWidth?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Hide `label` visually while it stays the group's accessible name, for a
|
|
22
|
+
* group whose purpose is already clear from a heading around it. Defaults to
|
|
23
|
+
* `false`. Has no effect without a `label`.
|
|
24
|
+
*/
|
|
25
|
+
labelHidden?: boolean;
|
|
20
26
|
}
|
|
21
27
|
type __VLS_Props = NexxtToggleGroupProps;
|
|
22
28
|
type __VLS_Slots = {
|
|
@@ -44,6 +50,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
44
50
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
45
51
|
}>, {
|
|
46
52
|
equalWidth: boolean;
|
|
53
|
+
labelHidden: boolean;
|
|
47
54
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
48
55
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
49
56
|
declare const _default: typeof __VLS_export;
|
|
@@ -6,6 +6,11 @@ export interface NexxtColorPickerProps {
|
|
|
6
6
|
error?: boolean;
|
|
7
7
|
errorMessage?: string;
|
|
8
8
|
required?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Offer an opacity slider and accept colours below full opacity. Turning it
|
|
11
|
+
* off while the colour is translucent writes the opaque colour to the model
|
|
12
|
+
* at once.
|
|
13
|
+
*/
|
|
9
14
|
showAlpha?: boolean;
|
|
10
15
|
formats?: ColorFormat[];
|
|
11
16
|
fullWidth?: boolean;
|
|
@@ -14,6 +19,8 @@ export interface NexxtColorPickerProps {
|
|
|
14
19
|
suggestions?: ColorSuggestions;
|
|
15
20
|
/** Accessible and visible label for the suggestions. */
|
|
16
21
|
suggestionsLabel?: string;
|
|
22
|
+
/** Visible label of the opacity slider, and the slider's accessible name. */
|
|
23
|
+
alphaLabel?: string;
|
|
17
24
|
/**
|
|
18
25
|
* Text shown in the trigger in place of the formatted colour, for a value that has a name of
|
|
19
26
|
* its own, such as a theme role. Only shown while a colour is set.
|
|
@@ -41,6 +48,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {
|
|
|
41
48
|
formats: ColorFormat[];
|
|
42
49
|
suggestions: ColorSuggestions;
|
|
43
50
|
suggestionsLabel: string;
|
|
51
|
+
alphaLabel: string;
|
|
44
52
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
45
53
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
54
|
declare const _default: typeof __VLS_export;
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export { EDITOR_ANCHOR_OPTIONS } from './components/editor/molecules/EditorAncho
|
|
|
22
22
|
export type { EditorAnchorMessages, EditorAnchorValue, EditorAnchorX, EditorAnchorY, } from './components/editor/molecules/EditorAnchor/EditorAnchor.vue';
|
|
23
23
|
export { EDITOR_BACKGROUND_SIZE_OPTIONS } from './components/editor/molecules/EditorBackgroundSize/EditorBackgroundSize.vue';
|
|
24
24
|
export type { EditorBackgroundSizeMessages, EditorBackgroundSizeValue, } from './components/editor/molecules/EditorBackgroundSize/EditorBackgroundSize.vue';
|
|
25
|
+
export { EDITOR_BLUR_OPTIONS } from './components/editor/molecules/EditorBlur/EditorBlur.vue';
|
|
26
|
+
export type { EditorBlurMessages, EditorBlurValue, NexxtEditorBlurProps, } from './components/editor/molecules/EditorBlur/EditorBlur.vue';
|
|
25
27
|
export { EDITOR_FLEX_DIRECTION_OPTIONS } from './components/editor/molecules/EditorFlexDirection/EditorFlexDirection.vue';
|
|
26
28
|
export type { EditorFlexDirectionMessages, EditorFlexDirectionValue, } from './components/editor/molecules/EditorFlexDirection/EditorFlexDirection.vue';
|
|
27
29
|
export { EDITOR_GAP_STEPS } from './components/editor/molecules/EditorGap/EditorGap.vue';
|
|
@@ -86,6 +88,7 @@ export { default as NexxtEditorAlignItems } from './components/editor/molecules/
|
|
|
86
88
|
export { default as NexxtEditorAlignmentGrid } from './components/editor/molecules/EditorAlignmentGrid/EditorAlignmentGrid.vue';
|
|
87
89
|
export { default as NexxtEditorAnchor } from './components/editor/molecules/EditorAnchor/EditorAnchor.vue';
|
|
88
90
|
export { default as NexxtEditorBackgroundSize } from './components/editor/molecules/EditorBackgroundSize/EditorBackgroundSize.vue';
|
|
91
|
+
export { default as NexxtEditorBlur } from './components/editor/molecules/EditorBlur/EditorBlur.vue';
|
|
89
92
|
export { default as NexxtEditorBorder } from './components/editor/molecules/EditorBorder/EditorBorder.vue';
|
|
90
93
|
export { default as NexxtEditorColor } from './components/editor/molecules/EditorColor/EditorColor.vue';
|
|
91
94
|
export { default as NexxtEditorDashPattern } from './components/editor/molecules/EditorDashPattern/EditorDashPattern.vue';
|