@nexxtmove/ui 1.24.0 → 1.25.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/EditorBorder/EditorBorder.vue.d.ts +98 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +549 -451
- package/dist/nuxt.js +1 -0
- package/package.json +1 -1
- package/src/components/editor/molecules/EditorBorder/EditorBorder.vue +215 -0
- package/src/components.json +1 -0
- package/src/index.ts +5 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The widths the slider can land on: the Tailwind class and the pixels it
|
|
3
|
+
* renders. These are Tailwind's own defaults (`border` is 1px, then 2, 4 and 8)
|
|
4
|
+
* rather than theme tokens -- the theme defines no border-width scale, so
|
|
5
|
+
* stepping over arbitrary integers would produce classes with no CSS behind
|
|
6
|
+
* them.
|
|
7
|
+
*/
|
|
8
|
+
declare const BORDER_STEPS: readonly [{
|
|
9
|
+
readonly class: "border";
|
|
10
|
+
readonly px: 1;
|
|
11
|
+
}, {
|
|
12
|
+
readonly class: "border-2";
|
|
13
|
+
readonly px: 2;
|
|
14
|
+
}, {
|
|
15
|
+
readonly class: "border-4";
|
|
16
|
+
readonly px: 4;
|
|
17
|
+
}, {
|
|
18
|
+
readonly class: "border-8";
|
|
19
|
+
readonly px: 8;
|
|
20
|
+
}];
|
|
21
|
+
/** The width part of the model value, as the Tailwind class itself. */
|
|
22
|
+
export type EditorBorderWidth = (typeof BORDER_STEPS)[number]['class'];
|
|
23
|
+
/** Overridable copy of the readout and the picker. Every key is optional. */
|
|
24
|
+
export interface EditorBorderMessages {
|
|
25
|
+
/** Unit shown behind the width. Defaults to `'px'`. */
|
|
26
|
+
unit?: string;
|
|
27
|
+
/** Text shown while no colour is set. Defaults to `'Kies kleur...'`. */
|
|
28
|
+
placeholder?: string;
|
|
29
|
+
/** Accessible name of the width slider. Defaults to `'Dikte'`. */
|
|
30
|
+
width?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface NexxtEditorBorderProps {
|
|
33
|
+
/**
|
|
34
|
+
* Header text of the settings block. Defaults to the Dutch `'Rand'`; the
|
|
35
|
+
* library has no i18n layer, so a consumer in another language passes its own
|
|
36
|
+
* copy in.
|
|
37
|
+
*/
|
|
38
|
+
label?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Render a switch next to the label that collapses and expands the controls.
|
|
41
|
+
* Defaults to `true`: a border is the kind of setting that is off as often as
|
|
42
|
+
* it is on, so turning it off is part of the control rather than an extra.
|
|
43
|
+
* The switch state is the `enabled` model; the width and the colour are kept
|
|
44
|
+
* while the block is collapsed.
|
|
45
|
+
*/
|
|
46
|
+
switchable?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Copy of the readout and the picker. Merged per key, so overriding one key
|
|
49
|
+
* keeps the defaults of the others. Copy is never translated inside the
|
|
50
|
+
* component.
|
|
51
|
+
*/
|
|
52
|
+
messages?: EditorBorderMessages;
|
|
53
|
+
}
|
|
54
|
+
declare const _default: typeof __VLS_export;
|
|
55
|
+
export default _default;
|
|
56
|
+
declare const __VLS_export: import('vue').DefineComponent<NexxtEditorBorderProps & {
|
|
57
|
+
/**
|
|
58
|
+
* The border as the editor needs it: one class string that carries both halves
|
|
59
|
+
* of the setting -- a width class, a space, and a `border-[#hex]` colour class,
|
|
60
|
+
* as in `'border-2 border-[#1777EA]'`. Either half may be missing on read and
|
|
61
|
+
* the two may arrive in any order; a change always writes the width first.
|
|
62
|
+
* Tokens this component does not own are dropped by that rewrite.
|
|
63
|
+
*
|
|
64
|
+
* Beware: Tailwind only generates an arbitrary class for text it finds in the
|
|
65
|
+
* source at build time. A value that arrives at runtime -- from a database,
|
|
66
|
+
* say -- therefore gets no CSS of its own; the consumer either translates it
|
|
67
|
+
* into an inline style or safelists the classes it can produce. The hex is
|
|
68
|
+
* always parseable out of the string, which is what makes that translation
|
|
69
|
+
* possible.
|
|
70
|
+
*/
|
|
71
|
+
modelValue: string;
|
|
72
|
+
/** Open state of the block. Only has an effect when `switchable` is `true`. */
|
|
73
|
+
enabled?: boolean;
|
|
74
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
75
|
+
"update:modelValue": (value: string) => any;
|
|
76
|
+
"update:enabled": (value: boolean) => any;
|
|
77
|
+
}, string, import('vue').PublicProps, Readonly<NexxtEditorBorderProps & {
|
|
78
|
+
/**
|
|
79
|
+
* The border as the editor needs it: one class string that carries both halves
|
|
80
|
+
* of the setting -- a width class, a space, and a `border-[#hex]` colour class,
|
|
81
|
+
* as in `'border-2 border-[#1777EA]'`. Either half may be missing on read and
|
|
82
|
+
* the two may arrive in any order; a change always writes the width first.
|
|
83
|
+
* Tokens this component does not own are dropped by that rewrite.
|
|
84
|
+
*
|
|
85
|
+
* Beware: Tailwind only generates an arbitrary class for text it finds in the
|
|
86
|
+
* source at build time. A value that arrives at runtime -- from a database,
|
|
87
|
+
* say -- therefore gets no CSS of its own; the consumer either translates it
|
|
88
|
+
* into an inline style or safelists the classes it can produce. The hex is
|
|
89
|
+
* always parseable out of the string, which is what makes that translation
|
|
90
|
+
* possible.
|
|
91
|
+
*/
|
|
92
|
+
modelValue: string;
|
|
93
|
+
/** Open state of the block. Only has an effect when `switchable` is `true`. */
|
|
94
|
+
enabled?: boolean;
|
|
95
|
+
}> & Readonly<{
|
|
96
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
97
|
+
"onUpdate:enabled"?: ((value: boolean) => any) | undefined;
|
|
98
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export type { EditorAlignItemsMessages, EditorAlignItemsValue, } from './compone
|
|
|
9
9
|
export type { EditorFlexDirectionMessages, EditorFlexDirectionValue, } from './components/editor/molecules/EditorFlexDirection/EditorFlexDirection.vue';
|
|
10
10
|
export type { EditorGapMessages, EditorGapValue, } from './components/editor/molecules/EditorGap/EditorGap.vue';
|
|
11
11
|
export type { EditorColorMessages, EditorColorProperty, EditorColorValue, } from './components/editor/molecules/EditorColor/EditorColor.vue';
|
|
12
|
+
export type { EditorBorderMessages, EditorBorderWidth, } from './components/editor/molecules/EditorBorder/EditorBorder.vue';
|
|
12
13
|
export type { EditorHeadingTypeMessages, EditorHeadingTypeValue, } from './components/editor/molecules/EditorHeadingType/EditorHeadingType.vue';
|
|
13
14
|
export type { EditorRadiusMessages, EditorRadiusValue, } from './components/editor/molecules/EditorRadius/EditorRadius.vue';
|
|
14
15
|
export type { EditorTextAlignMessages, EditorTextAlignValue, } from './components/editor/molecules/EditorTextAlign/EditorTextAlign.vue';
|
|
@@ -33,6 +34,7 @@ export { default as NexxtDatePicker } from './components/organisms/DatePicker/Da
|
|
|
33
34
|
export { default as NexxtDoughnutChart } from './components/molecules/DoughnutChart/DoughnutChart.vue';
|
|
34
35
|
export { default as NexxtDropdownButton } from './components/organisms/DropdownButton/DropdownButton.vue';
|
|
35
36
|
export { default as NexxtEditorAlignItems } from './components/editor/molecules/EditorAlignItems/EditorAlignItems.vue';
|
|
37
|
+
export { default as NexxtEditorBorder } from './components/editor/molecules/EditorBorder/EditorBorder.vue';
|
|
36
38
|
export { default as NexxtEditorColor } from './components/editor/molecules/EditorColor/EditorColor.vue';
|
|
37
39
|
export { default as NexxtEditorFlexDirection } from './components/editor/molecules/EditorFlexDirection/EditorFlexDirection.vue';
|
|
38
40
|
export { default as NexxtEditorGap } from './components/editor/molecules/EditorGap/EditorGap.vue';
|