@nexxtmove/ui 1.20.0 → 1.22.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.
@@ -0,0 +1,75 @@
1
+ /**
2
+ * The heading levels the editor offers, in the order they are listed. The level
3
+ * is what the option shows -- its label and its `h1`..`h6` icon -- and the size
4
+ * is what the model carries. The sizes are Tailwind's default scale on purpose,
5
+ * not the theme's `heading-*` utilities: this value is data the editor stores
6
+ * and puts back on an element, so it has to be a class every consumer resolves.
7
+ */
8
+ declare const HEADING_LEVELS: readonly [{
9
+ readonly level: 1;
10
+ readonly size: "text-4xl";
11
+ }, {
12
+ readonly level: 2;
13
+ readonly size: "text-3xl";
14
+ }, {
15
+ readonly level: 3;
16
+ readonly size: "text-2xl";
17
+ }, {
18
+ readonly level: 4;
19
+ readonly size: "text-xl";
20
+ }, {
21
+ readonly level: 5;
22
+ readonly size: "text-lg";
23
+ }, {
24
+ readonly level: 6;
25
+ readonly size: "text-base";
26
+ }];
27
+ /**
28
+ * The heading as the editor needs it: the Tailwind font-size class itself, so
29
+ * the consumer can put the model value straight on the element it styles.
30
+ * Weight is deliberately not part of it -- that becomes a setting of its own.
31
+ */
32
+ export type EditorHeadingTypeValue = (typeof HEADING_LEVELS)[number]['size'];
33
+ /** Overridable copy for the six options. Every key is optional. */
34
+ export interface EditorHeadingTypeMessages {
35
+ /** Label of the `h1` option. Defaults to `'Heading 1'`. */
36
+ h1?: string;
37
+ /** Label of the `h2` option. Defaults to `'Heading 2'`. */
38
+ h2?: string;
39
+ /** Label of the `h3` option. Defaults to `'Heading 3'`. */
40
+ h3?: string;
41
+ /** Label of the `h4` option. Defaults to `'Heading 4'`. */
42
+ h4?: string;
43
+ /** Label of the `h5` option. Defaults to `'Heading 5'`. */
44
+ h5?: string;
45
+ /** Label of the `h6` option. Defaults to `'Heading 6'`. */
46
+ h6?: string;
47
+ }
48
+ export interface NexxtEditorHeadingTypeProps {
49
+ /**
50
+ * Header text of the settings block. Defaults to the Dutch `'Type'`; the
51
+ * library has no i18n layer, so a consumer in another language passes its
52
+ * own copy in.
53
+ */
54
+ label?: string;
55
+ /**
56
+ * Labels of the six options. The defaults use the English term "Heading",
57
+ * as the Dutch design in Figma does, and are merged per key, so overriding
58
+ * one label keeps the defaults of the others. Copy is never translated
59
+ * inside the component.
60
+ */
61
+ messages?: EditorHeadingTypeMessages;
62
+ }
63
+ declare const _default: typeof __VLS_export;
64
+ export default _default;
65
+ declare const __VLS_export: import('vue').DefineComponent<NexxtEditorHeadingTypeProps & {
66
+ /** The selected heading, as the Tailwind font-size class to apply. */
67
+ modelValue: EditorHeadingTypeValue;
68
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
69
+ "update:modelValue": (value: "text-lg" | "text-base" | "text-xl" | "text-2xl" | "text-4xl" | "text-3xl") => any;
70
+ }, string, import('vue').PublicProps, Readonly<NexxtEditorHeadingTypeProps & {
71
+ /** The selected heading, as the Tailwind font-size class to apply. */
72
+ modelValue: EditorHeadingTypeValue;
73
+ }> & Readonly<{
74
+ "onUpdate:modelValue"?: ((value: "text-lg" | "text-base" | "text-xl" | "text-2xl" | "text-4xl" | "text-3xl") => any) | undefined;
75
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -0,0 +1,84 @@
1
+ /**
2
+ * The steps the slider can land on: the radius scale the library actually has,
3
+ * which is the Figma theme tokens plus the Tailwind defaults that sit on top of
4
+ * them -- the theme adds no `--radius-*: initial`, so `rounded-2xl` through
5
+ * `rounded-4xl` and `rounded-full` resolve to Tailwind's own values. The px
6
+ * numbers mirror those values (rem × 16). Known limitation: the theme file is
7
+ * overwritten wholesale by the Figma token sync, and a sync that changes a
8
+ * radius does not reach this list -- it has to be updated by hand.
9
+ *
10
+ * `full` is last and carries no px: it is a pill, not a size on the scale, so
11
+ * the readout names it instead of measuring it.
12
+ */
13
+ declare const RADIUS_STEPS: readonly [{
14
+ readonly token: "none";
15
+ readonly px: 0;
16
+ }, {
17
+ readonly token: "xs";
18
+ readonly px: 2;
19
+ }, {
20
+ readonly token: "sm";
21
+ readonly px: 4;
22
+ }, {
23
+ readonly token: "md";
24
+ readonly px: 6;
25
+ }, {
26
+ readonly token: "lg";
27
+ readonly px: 8;
28
+ }, {
29
+ readonly token: "xl";
30
+ readonly px: 12;
31
+ }, {
32
+ readonly token: "2xl";
33
+ readonly px: 16;
34
+ }, {
35
+ readonly token: "3xl";
36
+ readonly px: 24;
37
+ }, {
38
+ readonly token: "4xl";
39
+ readonly px: 32;
40
+ }, {
41
+ readonly token: "full";
42
+ readonly px: null;
43
+ }];
44
+ /**
45
+ * The radius as the editor needs it: the Tailwind class itself, so the consumer
46
+ * can put the model value straight on the element it styles.
47
+ */
48
+ export type EditorRadiusValue = `rounded-${(typeof RADIUS_STEPS)[number]['token']}`;
49
+ /** Overridable copy of the value readout. Every key is optional. */
50
+ export interface EditorRadiusMessages {
51
+ /** Unit shown behind the value. Defaults to `'px'`. */
52
+ unit?: string;
53
+ /**
54
+ * Readout of the last step, `rounded-full`, which has no px size. Defaults to
55
+ * the Dutch `'Rond'`.
56
+ */
57
+ full?: string;
58
+ }
59
+ export interface NexxtEditorRadiusProps {
60
+ /**
61
+ * Header text of the settings block. Defaults to the Dutch
62
+ * `'Hoekafronding'`; the library has no i18n layer, so a consumer in another
63
+ * language passes its own copy in.
64
+ */
65
+ label?: string;
66
+ /**
67
+ * Copy of the value readout. Merged per key, so overriding one key keeps the
68
+ * defaults of the others. Copy is never translated inside the component.
69
+ */
70
+ messages?: EditorRadiusMessages;
71
+ }
72
+ declare const _default: typeof __VLS_export;
73
+ export default _default;
74
+ declare const __VLS_export: import('vue').DefineComponent<NexxtEditorRadiusProps & {
75
+ /** The selected radius, as the Tailwind class to apply. */
76
+ modelValue: EditorRadiusValue;
77
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
78
+ "update:modelValue": (value: "rounded-none" | "rounded-sm" | "rounded-md" | "rounded-lg" | "rounded-xs" | "rounded-xl" | "rounded-2xl" | "rounded-3xl" | "rounded-4xl" | "rounded-full") => any;
79
+ }, string, import('vue').PublicProps, Readonly<NexxtEditorRadiusProps & {
80
+ /** The selected radius, as the Tailwind class to apply. */
81
+ modelValue: EditorRadiusValue;
82
+ }> & Readonly<{
83
+ "onUpdate:modelValue"?: ((value: "rounded-none" | "rounded-sm" | "rounded-md" | "rounded-lg" | "rounded-xs" | "rounded-xl" | "rounded-2xl" | "rounded-3xl" | "rounded-4xl" | "rounded-full") => any) | undefined;
84
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,7 +1,13 @@
1
- import { default as Icon } from '../../atoms/Icon/Icon.vue';
1
+ import { default as Icon, NexxtIconName } from '../../atoms/Icon/Icon.vue';
2
2
  export type SelectOption = {
3
3
  label: string;
4
4
  value: string | number;
5
+ /**
6
+ * Icon rendered before the option's label in the list, and in the field
7
+ * while the option is selected. Optional; an explicit `leftIcon` on the
8
+ * field wins over it.
9
+ */
10
+ icon?: NexxtIconName;
5
11
  } | string;
6
12
  interface NexxtSelectProps {
7
13
  /** Options to choose from; plain strings or `{ label, value }` objects. */
@@ -18,6 +24,13 @@ interface NexxtSelectProps {
18
24
  leftIcon?: InstanceType<typeof Icon>['name'];
19
25
  /** Mark the field as required (renders an asterisk next to the label). */
20
26
  required?: boolean;
27
+ /**
28
+ * Accessible name of the field, for when it is labelled by something outside
29
+ * the component and `label` would duplicate that copy on screen. Lands on the
30
+ * combobox itself, which a fallthrough attribute cannot reach: the component
31
+ * root is the wrapper around it.
32
+ */
33
+ ariaLabel?: string;
21
34
  }
22
35
  type __VLS_Props = NexxtSelectProps;
23
36
  type __VLS_ModelProps = {
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export type { NexxtTabItem } from './components/molecules/Tabs/Tabs.vue';
8
8
  export type { EditorAlignItemsMessages, EditorAlignItemsValue, } from './components/editor/molecules/EditorAlignItems/EditorAlignItems.vue';
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
+ export type { EditorRadiusMessages, EditorRadiusValue, } from './components/editor/molecules/EditorRadius/EditorRadius.vue';
11
12
  export type { EditorJustifyContentMessages, EditorJustifyContentValue, } from './components/editor/molecules/EditorJustifyContent/EditorJustifyContent.vue';
12
13
  export type { EditorPaddingMessages } from './components/editor/molecules/EditorPadding/EditorPadding.vue';
13
14
  export type { NexxtTemplateCardContentFeature, NexxtTemplateCardProps, NexxtTemplateCardSlots, } from './components/molecules/TemplateCard/TemplateCard.vue';
@@ -31,8 +32,10 @@ export { default as NexxtDropdownButton } from './components/organisms/DropdownB
31
32
  export { default as NexxtEditorAlignItems } from './components/editor/molecules/EditorAlignItems/EditorAlignItems.vue';
32
33
  export { default as NexxtEditorFlexDirection } from './components/editor/molecules/EditorFlexDirection/EditorFlexDirection.vue';
33
34
  export { default as NexxtEditorGap } from './components/editor/molecules/EditorGap/EditorGap.vue';
35
+ export { default as NexxtEditorHeadingType } from './components/editor/molecules/EditorHeadingType/EditorHeadingType.vue';
34
36
  export { default as NexxtEditorJustifyContent } from './components/editor/molecules/EditorJustifyContent/EditorJustifyContent.vue';
35
37
  export { default as NexxtEditorPadding } from './components/editor/molecules/EditorPadding/EditorPadding.vue';
38
+ export { default as NexxtEditorRadius } from './components/editor/molecules/EditorRadius/EditorRadius.vue';
36
39
  export { default as NexxtEditorSettingsBlock } from './components/editor/atoms/EditorSettingsBlock/EditorSettingsBlock.vue';
37
40
  export { default as NexxtEnergyLabel } from './components/atoms/EnergyLabel/EnergyLabel.vue';
38
41
  export { default as NexxtFloatingPanel } from './components/atoms/FloatingPanel/FloatingPanel.vue';