@nexxtmove/ui 1.27.0 → 1.29.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/molecules/EditorMaxWidth/EditorMaxWidth.vue.d.ts +99 -0
- package/dist/components/editor/molecules/EditorPadding/EditorPadding.vue.d.ts +6 -0
- package/dist/components/editor/molecules/EditorPadding/_PaddingField.vue.d.ts +10 -8
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1238 -1081
- package/dist/nuxt.js +1 -0
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Switch/Switch.vue +6 -1
- package/src/components/editor/molecules/EditorMaxWidth/EditorMaxWidth.vue +146 -0
- package/src/components/editor/molecules/EditorPadding/EditorPadding.vue +74 -30
- package/src/components/editor/molecules/EditorPadding/_PaddingField.vue +208 -21
- package/src/components.json +1 -0
- package/src/index.ts +6 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The steps the slider can land on: the `max-w-*` sizes, with the px numbers
|
|
3
|
+
* mirroring their values (rem × 16). These are Tailwind's own container sizes,
|
|
4
|
+
* not Figma tokens -- `tailwind/` defines no `--container-*`, so the token sync
|
|
5
|
+
* cannot move them. The desync to watch for is a Tailwind major that renames or
|
|
6
|
+
* renumbers the scale: nothing here fails when that happens, the numbers just
|
|
7
|
+
* stop matching the CSS, so this list has to be checked by hand on an upgrade.
|
|
8
|
+
*/
|
|
9
|
+
export declare const EDITOR_MAX_WIDTH_STEPS: readonly [{
|
|
10
|
+
readonly token: "xs";
|
|
11
|
+
readonly px: 320;
|
|
12
|
+
}, {
|
|
13
|
+
readonly token: "sm";
|
|
14
|
+
readonly px: 384;
|
|
15
|
+
}, {
|
|
16
|
+
readonly token: "md";
|
|
17
|
+
readonly px: 448;
|
|
18
|
+
}, {
|
|
19
|
+
readonly token: "lg";
|
|
20
|
+
readonly px: 512;
|
|
21
|
+
}, {
|
|
22
|
+
readonly token: "xl";
|
|
23
|
+
readonly px: 576;
|
|
24
|
+
}, {
|
|
25
|
+
readonly token: "2xl";
|
|
26
|
+
readonly px: 672;
|
|
27
|
+
}, {
|
|
28
|
+
readonly token: "3xl";
|
|
29
|
+
readonly px: 768;
|
|
30
|
+
}, {
|
|
31
|
+
readonly token: "4xl";
|
|
32
|
+
readonly px: 896;
|
|
33
|
+
}, {
|
|
34
|
+
readonly token: "5xl";
|
|
35
|
+
readonly px: 1024;
|
|
36
|
+
}, {
|
|
37
|
+
readonly token: "6xl";
|
|
38
|
+
readonly px: 1152;
|
|
39
|
+
}, {
|
|
40
|
+
readonly token: "7xl";
|
|
41
|
+
readonly px: 1280;
|
|
42
|
+
}];
|
|
43
|
+
/**
|
|
44
|
+
* The maximum width as the editor needs it: the Tailwind class itself, so the
|
|
45
|
+
* consumer can put the model value straight on the element it styles.
|
|
46
|
+
*/
|
|
47
|
+
export type EditorMaxWidthValue = `max-w-${(typeof EDITOR_MAX_WIDTH_STEPS)[number]['token']}`;
|
|
48
|
+
/** Overridable copy of the value readout. Every key is optional. */
|
|
49
|
+
export interface EditorMaxWidthMessages {
|
|
50
|
+
/**
|
|
51
|
+
* Unit shown behind the value. Defaults to `'px'`. Keep it to a short symbol
|
|
52
|
+
* such as `'px'` or `'pt'`: the readout is only as wide as `1280 px` needs,
|
|
53
|
+
* and a spelled-out unit grows it and pushes the slider in.
|
|
54
|
+
*/
|
|
55
|
+
unit?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface NexxtEditorMaxWidthProps {
|
|
58
|
+
/**
|
|
59
|
+
* Header text of the settings block. Defaults to the Dutch
|
|
60
|
+
* `'Vaste breedte'` -- switched off the page runs full width, so the setting
|
|
61
|
+
* is the fixed width, not a maximum. The library has no i18n layer, so a
|
|
62
|
+
* consumer in another language passes its own copy in.
|
|
63
|
+
*/
|
|
64
|
+
label?: string;
|
|
65
|
+
/**
|
|
66
|
+
* Copy of the value readout. Merged per key, so overriding one key keeps the
|
|
67
|
+
* defaults of the others. Copy is never translated inside the component.
|
|
68
|
+
*/
|
|
69
|
+
messages?: EditorMaxWidthMessages;
|
|
70
|
+
}
|
|
71
|
+
declare const _default: typeof __VLS_export;
|
|
72
|
+
export default _default;
|
|
73
|
+
declare const __VLS_export: import('vue').DefineComponent<NexxtEditorMaxWidthProps & {
|
|
74
|
+
/** The selected maximum width, as the Tailwind class to apply. */
|
|
75
|
+
modelValue: EditorMaxWidthValue;
|
|
76
|
+
/**
|
|
77
|
+
* Open state of the block. Switched off means the page runs full width, which
|
|
78
|
+
* is the absence of a class rather than a value of its own: the consumer simply
|
|
79
|
+
* writes no `max-w-*` then. The chosen width is kept while the block is
|
|
80
|
+
* collapsed, so switching back on restores it.
|
|
81
|
+
*/
|
|
82
|
+
enabled?: boolean;
|
|
83
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
84
|
+
"update:modelValue": (value: "max-w-sm" | "max-w-md" | "max-w-lg" | "max-w-xs" | "max-w-xl" | "max-w-2xl" | "max-w-3xl" | "max-w-4xl" | "max-w-5xl" | "max-w-6xl" | "max-w-7xl") => any;
|
|
85
|
+
"update:enabled": (value: boolean) => any;
|
|
86
|
+
}, string, import('vue').PublicProps, Readonly<NexxtEditorMaxWidthProps & {
|
|
87
|
+
/** The selected maximum width, as the Tailwind class to apply. */
|
|
88
|
+
modelValue: EditorMaxWidthValue;
|
|
89
|
+
/**
|
|
90
|
+
* Open state of the block. Switched off means the page runs full width, which
|
|
91
|
+
* is the absence of a class rather than a value of its own: the consumer simply
|
|
92
|
+
* writes no `max-w-*` then. The chosen width is kept while the block is
|
|
93
|
+
* collapsed, so switching back on restores it.
|
|
94
|
+
*/
|
|
95
|
+
enabled?: boolean;
|
|
96
|
+
}> & Readonly<{
|
|
97
|
+
"onUpdate:modelValue"?: ((value: "max-w-sm" | "max-w-md" | "max-w-lg" | "max-w-xs" | "max-w-xl" | "max-w-2xl" | "max-w-3xl" | "max-w-4xl" | "max-w-5xl" | "max-w-6xl" | "max-w-7xl") => any) | undefined;
|
|
98
|
+
"onUpdate:enabled"?: ((value: boolean) => any) | undefined;
|
|
99
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -17,6 +17,12 @@ export interface EditorPaddingMessages {
|
|
|
17
17
|
* fields. Defaults to `'Padding per zijde'`.
|
|
18
18
|
*/
|
|
19
19
|
toggle?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Unit the fields show and read, appended to every accessible name. The
|
|
22
|
+
* values themselves are px whatever this says, so it is copy, not a
|
|
23
|
+
* conversion. Defaults to `'px'`.
|
|
24
|
+
*/
|
|
25
|
+
unit?: string;
|
|
20
26
|
}
|
|
21
27
|
export interface NexxtEditorPaddingProps {
|
|
22
28
|
/**
|
|
@@ -2,17 +2,19 @@ import { PaddingIconSide } from './_PaddingIcon.vue';
|
|
|
2
2
|
export interface NexxtEditorPaddingFieldProps {
|
|
3
3
|
/** Sides the icon marks, which is also what this field edits. */
|
|
4
4
|
sides: PaddingIconSide[];
|
|
5
|
-
/**
|
|
5
|
+
/** Name of the field; the unit is appended to it for the accessible name. */
|
|
6
6
|
label: string;
|
|
7
|
-
/** Value as shown,
|
|
7
|
+
/** Value as shown, in the unit below. An empty string falls back to the `0` placeholder. */
|
|
8
8
|
value: string;
|
|
9
|
-
/**
|
|
10
|
-
|
|
9
|
+
/** Unit of the value, shown behind the input and part of the accessible name. */
|
|
10
|
+
unit: string;
|
|
11
11
|
}
|
|
12
|
+
declare const _default: typeof __VLS_export;
|
|
13
|
+
export default _default;
|
|
12
14
|
declare const __VLS_export: import('vue').DefineComponent<NexxtEditorPaddingFieldProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
-
|
|
15
|
+
step: (direction: 1 | -1) => any;
|
|
16
|
+
commit: (value: number) => any;
|
|
14
17
|
}, string, import('vue').PublicProps, Readonly<NexxtEditorPaddingFieldProps> & Readonly<{
|
|
15
|
-
|
|
18
|
+
onStep?: ((direction: 1 | -1) => any) | undefined;
|
|
19
|
+
onCommit?: ((value: number) => any) | undefined;
|
|
16
20
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
declare const _default: typeof __VLS_export;
|
|
18
|
-
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,8 @@ export type { EditorHeadingTypeMessages, EditorHeadingTypeValue, } from './compo
|
|
|
17
17
|
export type { EditorRadiusMessages, EditorRadiusValue, } from './components/editor/molecules/EditorRadius/EditorRadius.vue';
|
|
18
18
|
export type { EditorTextAlignMessages, EditorTextAlignValue, } from './components/editor/molecules/EditorTextAlign/EditorTextAlign.vue';
|
|
19
19
|
export type { EditorJustifyContentMessages, EditorJustifyContentValue, } from './components/editor/molecules/EditorJustifyContent/EditorJustifyContent.vue';
|
|
20
|
+
export { EDITOR_MAX_WIDTH_STEPS } from './components/editor/molecules/EditorMaxWidth/EditorMaxWidth.vue';
|
|
21
|
+
export type { EditorMaxWidthMessages, EditorMaxWidthValue, } from './components/editor/molecules/EditorMaxWidth/EditorMaxWidth.vue';
|
|
20
22
|
export type { EditorPaddingMessages } from './components/editor/molecules/EditorPadding/EditorPadding.vue';
|
|
21
23
|
export type { NexxtTemplateCardContentFeature, NexxtTemplateCardProps, NexxtTemplateCardSlots, } from './components/molecules/TemplateCard/TemplateCard.vue';
|
|
22
24
|
export { default as NexxtAnimatedNumber } from './components/atoms/AnimatedNumber/AnimatedNumber.vue';
|
|
@@ -43,6 +45,7 @@ export { default as NexxtEditorFlexDirection } from './components/editor/molecul
|
|
|
43
45
|
export { default as NexxtEditorGap } from './components/editor/molecules/EditorGap/EditorGap.vue';
|
|
44
46
|
export { default as NexxtEditorHeadingType } from './components/editor/molecules/EditorHeadingType/EditorHeadingType.vue';
|
|
45
47
|
export { default as NexxtEditorJustifyContent } from './components/editor/molecules/EditorJustifyContent/EditorJustifyContent.vue';
|
|
48
|
+
export { default as NexxtEditorMaxWidth } from './components/editor/molecules/EditorMaxWidth/EditorMaxWidth.vue';
|
|
46
49
|
export { default as NexxtEditorPadding } from './components/editor/molecules/EditorPadding/EditorPadding.vue';
|
|
47
50
|
export { default as NexxtEditorRadius } from './components/editor/molecules/EditorRadius/EditorRadius.vue';
|
|
48
51
|
export { default as NexxtEditorSettingsBlock } from './components/editor/atoms/EditorSettingsBlock/EditorSettingsBlock.vue';
|