@nexxtmove/ui 1.45.0 → 1.46.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.
Files changed (27) hide show
  1. package/dist/components/editor/atoms/EditorSettingsBlock/EditorSettingsBlock.vue.d.ts +2 -2
  2. package/dist/components/editor/atoms/EditorSettingsGroup/EditorSettingsGroup.vue.d.ts +45 -0
  3. package/dist/components/editor/atoms/EditorSettingsGroup/editorSettingsGroupContext.d.ts +23 -0
  4. package/dist/components/editor/molecules/EditorAlignItems/EditorAlignItems.vue.d.ts +6 -0
  5. package/dist/components/editor/molecules/EditorDashPattern/EditorDashPattern.vue.d.ts +61 -0
  6. package/dist/components/editor/molecules/EditorJustifyContent/EditorJustifyContent.vue.d.ts +6 -0
  7. package/dist/components/editor/molecules/EditorLineStyle/EditorLineStyle.vue.d.ts +78 -0
  8. package/dist/components/editor/molecules/EditorPadding/EditorPadding.vue.d.ts +11 -0
  9. package/dist/components/editor/molecules/EditorTextAlign/EditorTextAlign.vue.d.ts +8 -0
  10. package/dist/components/molecules/ToggleGroup/ToggleGroup.vue.d.ts +22 -1
  11. package/dist/index.d.ts +9 -0
  12. package/dist/index.js +2201 -1873
  13. package/dist/nuxt.js +3 -0
  14. package/package.json +1 -1
  15. package/src/components/editor/atoms/EditorSettingsBlock/EditorSettingsBlock.vue +36 -5
  16. package/src/components/editor/atoms/EditorSettingsGroup/EditorSettingsGroup.vue +228 -0
  17. package/src/components/editor/atoms/EditorSettingsGroup/editorSettingsGroupContext.ts +27 -0
  18. package/src/components/editor/molecules/EditorAlignItems/EditorAlignItems.vue +16 -2
  19. package/src/components/editor/molecules/EditorDashPattern/EditorDashPattern.vue +139 -0
  20. package/src/components/editor/molecules/EditorJustifyContent/EditorJustifyContent.vue +16 -2
  21. package/src/components/editor/molecules/EditorLineStyle/EditorLineStyle.vue +230 -0
  22. package/src/components/editor/molecules/EditorPadding/EditorPadding.vue +102 -17
  23. package/src/components/editor/molecules/EditorTextAlign/EditorTextAlign.vue +18 -2
  24. package/src/components/molecules/ToggleGroup/ToggleGroup.vue +30 -8
  25. package/src/components.json +3 -0
  26. package/src/index.ts +22 -0
  27. package/tailwind/nexxtmove.tailwind.custom.css +6 -0
@@ -16,9 +16,9 @@ type __VLS_ModelProps = {
16
16
  modelValue?: boolean;
17
17
  };
18
18
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
19
- declare var __VLS_7: {};
19
+ declare var __VLS_13: {};
20
20
  type __VLS_Slots = {} & {
21
- default?: (props: typeof __VLS_7) => any;
21
+ default?: (props: typeof __VLS_13) => any;
22
22
  };
23
23
  declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
24
  "update:modelValue": (value: boolean) => any;
@@ -0,0 +1,45 @@
1
+ import { EditorSettingsHeadingLevel } from './editorSettingsGroupContext';
2
+ export interface NexxtEditorSettingsGroupProps {
3
+ /**
4
+ * Heading of the group. Omit it for a section that holds exactly one
5
+ * setting: that setting's own label is then promoted to the group's
6
+ * typography and heading level, so it does not say the same thing twice.
7
+ */
8
+ label?: string;
9
+ /** Heading level of the label. Defaults to 3: the settings panel's own heading is an h2. */
10
+ headingLevel?: EditorSettingsHeadingLevel;
11
+ /**
12
+ * Let the user fold the group away with a button in its heading. Only takes
13
+ * effect together with `label`: a group without a heading has nothing to
14
+ * click, so it stays an ordinary, always-open group and warns in
15
+ * development. The open state is `v-model:open`. Defaults to `false`.
16
+ */
17
+ collapsible?: boolean;
18
+ }
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ declare const __VLS_export: __VLS_WithSlots<import('vue').DefineComponent<NexxtEditorSettingsGroupProps & {
22
+ /**
23
+ * Whether a collapsible group is open. Ignored unless the group is both
24
+ * `collapsible` and labelled; the parent owns the state.
25
+ */
26
+ open?: boolean;
27
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
28
+ "update:open": (value: boolean) => any;
29
+ }, string, import('vue').PublicProps, Readonly<NexxtEditorSettingsGroupProps & {
30
+ /**
31
+ * Whether a collapsible group is open. Ignored unless the group is both
32
+ * `collapsible` and labelled; the parent owns the state.
33
+ */
34
+ open?: boolean;
35
+ }> & Readonly<{
36
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
37
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
38
+ /** The settings: EditorSettingsBlocks, possibly wrapped in a reveal or a mobile marker. */
39
+ default?: () => unknown;
40
+ }>;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,23 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ /** The heading levels a group label can take. The settings panel's own heading is an h2. */
3
+ export type EditorSettingsHeadingLevel = 2 | 3 | 4 | 5 | 6;
4
+ /**
5
+ * What a NexxtEditorSettingsGroup tells the settings blocks inside it. Library
6
+ * internal: the group and the block are the only two that read or write it.
7
+ */
8
+ export interface EditorSettingsGroupContext {
9
+ /** Always `true`: the block is inside a group, so the group owns the line and the bottom space. */
10
+ grouped: true;
11
+ /**
12
+ * The group has no label of its own, so the label of the one setting in it
13
+ * is promoted to the group's typography and heading level.
14
+ */
15
+ promoted: boolean;
16
+ /** Heading level of the group label, and of a promoted setting label. */
17
+ headingLevel: EditorSettingsHeadingLevel;
18
+ }
19
+ /**
20
+ * Provided as a computed, so a label or heading level that changes after mount
21
+ * reaches the blocks without them having to remount.
22
+ */
23
+ export declare const EDITOR_SETTINGS_GROUP_KEY: InjectionKey<ComputedRef<EditorSettingsGroupContext>>;
@@ -43,6 +43,12 @@ export interface NexxtEditorAlignItemsProps {
43
43
  * Copy is never translated inside the component.
44
44
  */
45
45
  messages?: EditorAlignItemsMessages;
46
+ /**
47
+ * The options to offer, as a subset of the four. They are always shown in
48
+ * the order of `EDITOR_ALIGN_ITEMS_OPTIONS`, whatever order this list is in;
49
+ * values not on that list are ignored. Defaults to all four.
50
+ */
51
+ options?: EditorAlignItemsValue[];
46
52
  }
47
53
  declare const _default: typeof __VLS_export;
48
54
  export default _default;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * A dash pattern in whole px: the length of one dash and the space between two.
3
+ * Numbers rather than classes, the same as `EditorDimensionValue`: the consumer
4
+ * writes them into CSS variables.
5
+ */
6
+ export interface EditorDashPatternValue {
7
+ dash: number;
8
+ gap: number;
9
+ }
10
+ /**
11
+ * The range each value is clamped to, in px. Exported so the consumer's class
12
+ * matcher knows the same bounds.
13
+ */
14
+ export declare const EDITOR_DASH_PATTERN_LIMITS: {
15
+ readonly dash: {
16
+ readonly min: 1;
17
+ readonly max: 64;
18
+ };
19
+ readonly gap: {
20
+ readonly min: 1;
21
+ readonly max: 64;
22
+ };
23
+ };
24
+ /** Overridable copy of the two fields. Every key is optional. */
25
+ export interface EditorDashPatternMessages {
26
+ /** Caption and accessible name of the dash length field. Defaults to `'Lengte'`. */
27
+ dash?: string;
28
+ /** Caption and accessible name of the gap field. Defaults to `'Tussenruimte'`. */
29
+ gap?: string;
30
+ /** How the px unit is written in both fields. Defaults to `'px'`. */
31
+ unit?: string;
32
+ }
33
+ export interface NexxtEditorDashPatternProps {
34
+ /**
35
+ * Header text of the settings block. Defaults to the Dutch `'Streep'`; the
36
+ * library has no i18n layer, so a consumer in another language passes its
37
+ * own copy in.
38
+ */
39
+ label?: string;
40
+ /**
41
+ * Captions of the fields and the unit. Defaults are Dutch and are merged per
42
+ * key, so overriding one keeps the defaults of the others. Copy is never
43
+ * translated inside the component.
44
+ */
45
+ messages?: EditorDashPatternMessages;
46
+ }
47
+ declare const _default: typeof __VLS_export;
48
+ export default _default;
49
+ declare const __VLS_export: import('vue').DefineComponent<NexxtEditorDashPatternProps & {
50
+ /** The dash pattern, in whole px. */
51
+ modelValue: EditorDashPatternValue;
52
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
53
+ "update:modelValue": (value: EditorDashPatternValue) => any;
54
+ commit: () => any;
55
+ }, string, import('vue').PublicProps, Readonly<NexxtEditorDashPatternProps & {
56
+ /** The dash pattern, in whole px. */
57
+ modelValue: EditorDashPatternValue;
58
+ }> & Readonly<{
59
+ "onUpdate:modelValue"?: ((value: EditorDashPatternValue) => any) | undefined;
60
+ onCommit?: (() => any) | undefined;
61
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -43,6 +43,12 @@ export interface NexxtEditorJustifyContentProps {
43
43
  * Copy is never translated inside the component.
44
44
  */
45
45
  messages?: EditorJustifyContentMessages;
46
+ /**
47
+ * The options to offer, as a subset of the four. They are always shown in
48
+ * the order of `EDITOR_JUSTIFY_CONTENT_OPTIONS`, whatever order this list is
49
+ * in. Defaults to all four.
50
+ */
51
+ options?: EditorJustifyContentValue[];
46
52
  }
47
53
  declare const _default: typeof __VLS_export;
48
54
  export default _default;
@@ -0,0 +1,78 @@
1
+ /**
2
+ * The line styles the editor offers, in the order they are shown. The model is
3
+ * the token itself, not a class: what a style puts on the element is more than
4
+ * one class and depends on the thickness and the breakpoint, so that
5
+ * translation belongs to the consumer. The labels arrive through `messages`,
6
+ * keyed by token.
7
+ */
8
+ export declare const EDITOR_LINE_STYLE_OPTIONS: readonly [{
9
+ readonly token: "none";
10
+ }, {
11
+ readonly token: "solid";
12
+ }, {
13
+ readonly token: "dashed";
14
+ }, {
15
+ readonly token: "dotted";
16
+ }];
17
+ /** A line style, as one of the tokens of `EDITOR_LINE_STYLE_OPTIONS`. */
18
+ export type EditorLineStyleValue = (typeof EDITOR_LINE_STYLE_OPTIONS)[number]['token'];
19
+ /**
20
+ * The thicknesses the slider can land on, in px. There is no Tailwind token
21
+ * behind them: the consumer writes the value into a CSS variable.
22
+ */
23
+ export declare const EDITOR_LINE_THICKNESS_STEPS: readonly [1, 2, 3, 4, 6, 8];
24
+ /** A line thickness in px, as one of `EDITOR_LINE_THICKNESS_STEPS`. */
25
+ export type EditorLineThickness = (typeof EDITOR_LINE_THICKNESS_STEPS)[number];
26
+ /**
27
+ * The smallest thickness per style. A style that is not in here starts at the
28
+ * first step. Dotted starts at 2: at 1 px a round dot is a blurred pixel.
29
+ */
30
+ export declare const EDITOR_LINE_MIN_THICKNESS: Partial<Record<EditorLineStyleValue, EditorLineThickness>>;
31
+ /** Overridable copy of the options and the thickness row. Every key is optional. */
32
+ export interface EditorLineStyleMessages {
33
+ /** Name of the `none` option. Defaults to `'Geen'`. */
34
+ none?: string;
35
+ /** Name of the `solid` option. Defaults to `'Doorgetrokken'`. */
36
+ solid?: string;
37
+ /** Name of the `dashed` option. Defaults to `'Gestreept'`. */
38
+ dashed?: string;
39
+ /** Name of the `dotted` option. Defaults to `'Gestippeld'`. */
40
+ dotted?: string;
41
+ /** Heading above the slider, and the accessible name of its thumb. Defaults to `'Dikte'`. */
42
+ thickness?: string;
43
+ /** Unit shown behind the thickness. Defaults to `'px'`. */
44
+ unit?: string;
45
+ }
46
+ export interface NexxtEditorLineStyleProps {
47
+ /**
48
+ * Header text of the settings block, and with it the name of the option
49
+ * group. Defaults to the Dutch `'Lijn'`; the library has no i18n layer, so a
50
+ * consumer in another language passes its own copy in.
51
+ */
52
+ label?: string;
53
+ /**
54
+ * Copy of the options and the thickness row. Defaults are Dutch and are
55
+ * merged per key, so overriding one keeps the defaults of the others. Copy is
56
+ * never translated inside the component.
57
+ */
58
+ messages?: EditorLineStyleMessages;
59
+ }
60
+ declare const _default: typeof __VLS_export;
61
+ export default _default;
62
+ declare const __VLS_export: import('vue').DefineComponent<NexxtEditorLineStyleProps & {
63
+ /** The selected line style, as a token. */
64
+ modelValue: EditorLineStyleValue;
65
+ /** The line thickness in px. */
66
+ thickness: EditorLineThickness;
67
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
68
+ "update:modelValue": (value: "solid" | "none" | "dashed" | "dotted") => any;
69
+ "update:thickness": (value: 1 | 2 | 3 | 4 | 6 | 8) => any;
70
+ }, string, import('vue').PublicProps, Readonly<NexxtEditorLineStyleProps & {
71
+ /** The selected line style, as a token. */
72
+ modelValue: EditorLineStyleValue;
73
+ /** The line thickness in px. */
74
+ thickness: EditorLineThickness;
75
+ }> & Readonly<{
76
+ "onUpdate:modelValue"?: ((value: "solid" | "none" | "dashed" | "dotted") => any) | undefined;
77
+ "onUpdate:thickness"?: ((value: 1 | 2 | 3 | 4 | 6 | 8) => any) | undefined;
78
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -143,6 +143,17 @@ export interface NexxtEditorPaddingProps {
143
143
  * is never translated inside the component.
144
144
  */
145
145
  messages?: EditorPaddingMessages;
146
+ /**
147
+ * Which sides the block edits. `'all'` offers all four. `'vertical'` offers
148
+ * top and bottom only, for an element where horizontal padding has no
149
+ * sensible effect: collapsed it is one field that writes `py-N`, expanded it
150
+ * is Boven and Onder in the same row, written as `pt-N pb-N`. Horizontal
151
+ * padding in the incoming value is ignored there and drops out on the first
152
+ * write. `'horizontal'` is the mirror image: one field writing `px-N`, or
153
+ * Links and Rechts in one row written as `pl-N pr-N`, with incoming vertical
154
+ * padding ignored. Defaults to `'all'`.
155
+ */
156
+ sides?: 'all' | 'vertical' | 'horizontal';
146
157
  }
147
158
  declare const _default: typeof __VLS_export;
148
159
  export default _default;
@@ -43,6 +43,14 @@ export interface NexxtEditorTextAlignProps {
43
43
  * Copy is never translated inside the component.
44
44
  */
45
45
  messages?: EditorTextAlignMessages;
46
+ /**
47
+ * The options to offer, as a subset of the four. They are always shown in
48
+ * the order of `EDITOR_TEXT_ALIGN_OPTIONS`, whatever order this list is in.
49
+ * Defaults to all four. A consumer that writes alignment as something other
50
+ * than `text-*` -- auto margins, say -- passes the three it can translate and
51
+ * maps the value itself.
52
+ */
53
+ options?: EditorTextAlignValue[];
46
54
  }
47
55
  declare const _default: typeof __VLS_export;
48
56
  export default _default;
@@ -19,16 +19,37 @@ interface NexxtToggleGroupProps {
19
19
  equalWidth?: boolean;
20
20
  }
21
21
  type __VLS_Props = NexxtToggleGroupProps;
22
+ type __VLS_Slots = {
23
+ /**
24
+ * Content of one option, replacing the default icon and label. Rendered
25
+ * twice per option -- once on the button and once in the clipped overlay
26
+ * that shows the active colour -- so it should draw in `currentColor` and
27
+ * carry no state or ids of its own. The button keeps its `ariaLabel` /
28
+ * `tooltip` naming, so content without text still needs `ariaLabel`.
29
+ */
30
+ option?: (props: {
31
+ /** The option being rendered. */
32
+ option: NexxtToggleGroupOption;
33
+ /** Whether this option is the selected value. */
34
+ selected: boolean;
35
+ }) => unknown;
36
+ };
22
37
  type __VLS_ModelProps = {
23
38
  modelValue: string;
24
39
  };
25
40
  type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
26
- declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
41
+ declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
27
42
  "update:modelValue": (value: string) => any;
28
43
  }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
29
44
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
30
45
  }>, {
31
46
  equalWidth: boolean;
32
47
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
48
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
33
49
  declare const _default: typeof __VLS_export;
34
50
  export default _default;
51
+ type __VLS_WithSlots<T, S> = T & {
52
+ new (): {
53
+ $slots: S;
54
+ };
55
+ };
package/dist/index.d.ts CHANGED
@@ -46,6 +46,12 @@ export type { EditorDimensionFieldMessages, EditorDimensionUnit, EditorDimension
46
46
  export { EDITOR_SIZE_OPTIONS } from './components/editor/molecules/EditorSize/EditorSize.vue';
47
47
  export type { EditorSizeMessages, EditorSizeMode, EditorSizeValue, } from './components/editor/molecules/EditorSize/EditorSize.vue';
48
48
  export type { EditorSizeLimitMessages } from './components/editor/molecules/EditorSizeLimit/EditorSizeLimit.vue';
49
+ export { EDITOR_LINE_MIN_THICKNESS, EDITOR_LINE_STYLE_OPTIONS, EDITOR_LINE_THICKNESS_STEPS, } from './components/editor/molecules/EditorLineStyle/EditorLineStyle.vue';
50
+ export type { EditorLineStyleMessages, EditorLineStyleValue, EditorLineThickness, NexxtEditorLineStyleProps, } from './components/editor/molecules/EditorLineStyle/EditorLineStyle.vue';
51
+ export type { NexxtEditorSettingsGroupProps } from './components/editor/atoms/EditorSettingsGroup/EditorSettingsGroup.vue';
52
+ export type { EditorSettingsHeadingLevel } from './components/editor/atoms/EditorSettingsGroup/editorSettingsGroupContext';
53
+ export { EDITOR_DASH_PATTERN_LIMITS } from './components/editor/molecules/EditorDashPattern/EditorDashPattern.vue';
54
+ export type { EditorDashPatternMessages, EditorDashPatternValue, NexxtEditorDashPatternProps, } from './components/editor/molecules/EditorDashPattern/EditorDashPattern.vue';
49
55
  export type { NexxtTemplateCardContentFeature, NexxtTemplateCardProps, NexxtTemplateCardSlots, } from './components/molecules/TemplateCard/TemplateCard.vue';
50
56
  export { default as NexxtAnimatedNumber } from './components/atoms/AnimatedNumber/AnimatedNumber.vue';
51
57
  export { default as NexxtAnnouncement } from './components/molecules/Announcement/Announcement.vue';
@@ -68,6 +74,7 @@ export { default as NexxtEditorAlignItems } from './components/editor/molecules/
68
74
  export { default as NexxtEditorBackgroundSize } from './components/editor/molecules/EditorBackgroundSize/EditorBackgroundSize.vue';
69
75
  export { default as NexxtEditorBorder } from './components/editor/molecules/EditorBorder/EditorBorder.vue';
70
76
  export { default as NexxtEditorColor } from './components/editor/molecules/EditorColor/EditorColor.vue';
77
+ export { default as NexxtEditorDashPattern } from './components/editor/molecules/EditorDashPattern/EditorDashPattern.vue';
71
78
  export { default as NexxtEditorDimensionField } from './components/editor/atoms/EditorDimensionField/EditorDimensionField.vue';
72
79
  export { default as NexxtEditorFlexDirection } from './components/editor/molecules/EditorFlexDirection/EditorFlexDirection.vue';
73
80
  export { default as NexxtEditorFontSize } from './components/editor/molecules/EditorFontSize/EditorFontSize.vue';
@@ -76,10 +83,12 @@ export { default as NexxtEditorHeadingType } from './components/editor/molecules
76
83
  export { default as NexxtEditorJustifyContent } from './components/editor/molecules/EditorJustifyContent/EditorJustifyContent.vue';
77
84
  export { default as NexxtEditorLetterSpacing } from './components/editor/molecules/EditorLetterSpacing/EditorLetterSpacing.vue';
78
85
  export { default as NexxtEditorLineHeight } from './components/editor/molecules/EditorLineHeight/EditorLineHeight.vue';
86
+ export { default as NexxtEditorLineStyle } from './components/editor/molecules/EditorLineStyle/EditorLineStyle.vue';
79
87
  export { default as NexxtEditorMaxWidth } from './components/editor/molecules/EditorMaxWidth/EditorMaxWidth.vue';
80
88
  export { default as NexxtEditorPadding } from './components/editor/molecules/EditorPadding/EditorPadding.vue';
81
89
  export { default as NexxtEditorRadius } from './components/editor/molecules/EditorRadius/EditorRadius.vue';
82
90
  export { default as NexxtEditorSettingsBlock } from './components/editor/atoms/EditorSettingsBlock/EditorSettingsBlock.vue';
91
+ export { default as NexxtEditorSettingsGroup } from './components/editor/atoms/EditorSettingsGroup/EditorSettingsGroup.vue';
83
92
  export { default as NexxtEditorSize } from './components/editor/molecules/EditorSize/EditorSize.vue';
84
93
  export { default as NexxtEditorSizeLimit } from './components/editor/molecules/EditorSizeLimit/EditorSizeLimit.vue';
85
94
  export { default as NexxtEditorTextAlign } from './components/editor/molecules/EditorTextAlign/EditorTextAlign.vue';