@cntrl-site/components 1.0.118-alpha.3 → 1.0.118-alpha.4

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 (69) hide show
  1. package/dist/{Burger-C3yVbQcq.js → Burger-B4kXX9aY.js} +1 -1
  2. package/dist/{Burger-BkVgNMGU.mjs → Burger-DyORh_vF.mjs} +1 -1
  3. package/dist/{ChroniclesComponent-DD3tqNNm.mjs → ChroniclesComponent-DVoJ0kdT.mjs} +442 -512
  4. package/dist/ChroniclesComponent-Nm_yIRmr.js +1 -0
  5. package/dist/Components/Grid/Grid.d.ts +7 -25
  6. package/dist/Components/PopupMenu/PopupMenu.d.ts +73 -0
  7. package/dist/Components/PopupMenu/PopupMenuComponent.d.ts +594 -0
  8. package/dist/Components/PopupMenu/popupMenuLayout.d.ts +203 -0
  9. package/dist/Components/PopupMenu/popupMenuSnap.d.ts +61 -0
  10. package/dist/Components/helpers/SvgImage/loadSvgMaskUrl.d.ts +7 -0
  11. package/dist/{ControlSlider-BBAXRDLP.mjs → ControlSlider-3w-bHQEg.mjs} +4 -3
  12. package/dist/ControlSlider-DB4nbVLT.js +1 -0
  13. package/dist/{FAQ-DLh63Utr.js → FAQ-7HEkaoU6.js} +1 -1
  14. package/dist/{FAQ-CJHCMSBa.mjs → FAQ-GmiwRdFq.mjs} +1 -1
  15. package/dist/Grid-BuRdth9A.mjs +1622 -0
  16. package/dist/Grid-tqSSYh2-.js +408 -0
  17. package/dist/{Hive-CzabuuCc.js → Hive-34KvKNsa.js} +1 -1
  18. package/dist/{Hive-DyxYd5eg.mjs → Hive-7xHXyMM1.mjs} +1 -1
  19. package/dist/{HiveLightboxTitles-DhEeFKWs.mjs → HiveLightboxTitles-BCoL46-V.mjs} +1 -1
  20. package/dist/{HiveLightboxTitles-DlyptAaK.js → HiveLightboxTitles-DEeyQGcf.js} +1 -1
  21. package/dist/{Lightbox-DZckgBzK.js → Lightbox-Cb7lyaNt.js} +1 -1
  22. package/dist/{Lightbox-BY99NS14.mjs → Lightbox-DzPqgKP4.mjs} +1 -1
  23. package/dist/{LightboxJournal-Bf_rZzmz.js → LightboxJournal-B-vul_be.js} +1 -1
  24. package/dist/{LightboxJournal-BDUs6T0B.mjs → LightboxJournal-DisD2DLv.mjs} +1 -1
  25. package/dist/{LightboxStrip-RA4ABUC-.js → LightboxStrip-YDyEPEb6.js} +1 -1
  26. package/dist/{LightboxStrip-Cuhb2fIR.mjs → LightboxStrip-wCHUhAqN.mjs} +1 -1
  27. package/dist/{Mercury-B-s2Kvuq.js → Mercury-BmhtFYOw.js} +1 -1
  28. package/dist/{Mercury-CCW0Es-s.mjs → Mercury-Q788wrYQ.mjs} +1 -1
  29. package/dist/{OnelinerForm-C2Y_XMCY.js → OnelinerForm-CUmY-bXL.js} +1 -1
  30. package/dist/{OnelinerForm-BEu7_sho.mjs → OnelinerForm-D8WIB9Qy.mjs} +1 -1
  31. package/dist/PopupMenu-CYdDyzEt.mjs +1372 -0
  32. package/dist/PopupMenu-Di1fHgho.js +409 -0
  33. package/dist/{SimpleButton-C-o2W9bS.mjs → SimpleButton-DTpzfmb6.mjs} +1 -1
  34. package/dist/{SimpleButton-nGEcO2gB.js → SimpleButton-DtaCYa3y.js} +1 -1
  35. package/dist/{Slider20-DUi6qwnd.mjs → Slider20-CKngROrc.mjs} +1 -1
  36. package/dist/{Slider20-BOmjDRf2.js → Slider20-q0iGgnE3.js} +1 -1
  37. package/dist/SvgImage-CwRq9-ec.mjs +56 -0
  38. package/dist/SvgImage-_QN8ngad.js +1 -0
  39. package/dist/{TestimonialSingle-DrnyReim.mjs → TestimonialSingle-Bax71Hyo.mjs} +1 -1
  40. package/dist/{TestimonialSingle-BORQom3u.js → TestimonialSingle-CpEUendN.js} +1 -1
  41. package/dist/{Waterfall-DII4-WV5.js → Waterfall-B9YWMhrg.js} +1 -1
  42. package/dist/{Waterfall-3kKioKh2.mjs → Waterfall-znaoynn5.mjs} +1 -1
  43. package/dist/components-BYoTPJk3.js +1 -0
  44. package/dist/{components-BwAmTGJp.mjs → components-eK82xypT.mjs} +653 -30
  45. package/dist/components.css +1 -1
  46. package/dist/elements.js +1 -1
  47. package/dist/elements.mjs +24 -24
  48. package/dist/elements.node.js +1 -1
  49. package/dist/elements.node.mjs +1 -1
  50. package/dist/index.d.ts +3 -1
  51. package/dist/index.js +1 -1
  52. package/dist/index.mjs +63 -36
  53. package/dist/loadSvgMaskUrl-B6kHUyof.js +1 -0
  54. package/dist/loadSvgMaskUrl-DUhCVvpl.mjs +39 -0
  55. package/dist/sources.js +233 -514
  56. package/dist/sources.mjs +273 -555
  57. package/dist/types/Component.d.ts +7 -0
  58. package/dist/types/SchemaV1.d.ts +3 -0
  59. package/package.json +1 -1
  60. package/dist/ChroniclesComponent-BMbUwzk6.js +0 -1
  61. package/dist/Components/Grid/CustomGridComponent.d.ts +0 -41
  62. package/dist/ControlSlider-BCkVFl4w.js +0 -1
  63. package/dist/Grid-CUaVUaRa.js +0 -441
  64. package/dist/Grid-D19xZ_mh.mjs +0 -1800
  65. package/dist/SvgImage-B5mR9y6q.mjs +0 -51
  66. package/dist/SvgImage-DFlmxAoL.js +0 -1
  67. package/dist/components-D8RelPGE.js +0 -1
  68. package/dist/loadSvgMaskUrl-DfF7ay6h.js +0 -1
  69. package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +0 -20
@@ -19,34 +19,17 @@ type GridLayoutConfig = {
19
19
  columnsCount: number;
20
20
  lockedParam?: 'wrapperWidth' | 'entryWidth' | 'horizontalGap' | null;
21
21
  };
22
- type CustomGridBlock = {
23
- column: number;
24
- span: number;
25
- top: number;
26
- height: number;
27
- };
28
- type CustomGridLayout = {
29
- columnsCount: number;
30
- columnWidth: number;
31
- gutterWidth: number;
32
- maxWidth: number | null;
33
- verticalGap?: number;
34
- beat?: number;
35
- repeatHeight?: number;
36
- blocks: CustomGridBlock[];
37
- };
38
22
  type GridSettings = {
39
23
  type: 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
40
- gridLayout?: GridLayoutConfig;
41
- customGrid?: CustomGridLayout;
24
+ gridLayout: GridLayoutConfig;
42
25
  textBoxWidth: number;
43
- verticalGap?: number;
44
- entriesCount?: number;
26
+ verticalGap: number;
27
+ entriesCount: number;
45
28
  lightbox: 'on' | 'off';
46
- imageDisplay: 'fit' | 'cover' | {
29
+ imageDisplay: {
47
30
  display: 'fit' | 'cover';
48
- ratioValue?: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
49
- reversed?: boolean;
31
+ ratioValue: '1:1' | '2:3' | '3:4' | '4:5' | '16:9';
32
+ reversed: boolean;
50
33
  };
51
34
  imageCorners?: number;
52
35
  lightboxImageDisplay?: 'fit' | 'cover' | {
@@ -58,9 +41,8 @@ type GridSettings = {
58
41
  transition: 'fade' | 'slide';
59
42
  showText: 'always' | 'on hover';
60
43
  hover?: 'none' | 'zoom-in' | 'greyscale' | 'scale-down';
61
- alignEntries?: 'on' | 'off';
44
+ alignEntries: 'on' | 'off';
62
45
  align?: 'top' | 'center' | 'bottom';
63
- textGrowth?: 'inside' | 'outside';
64
46
  titleMarginTop: number;
65
47
  subtitleMarginTop: number;
66
48
  titleColor: string;
@@ -0,0 +1,73 @@
1
+ import { CommonComponentProps } from '../props';
2
+ import { EmbedMediaLike } from '../utils/embedMedia';
3
+ import { PopupMenuAlign, PopupMenuBlockType, PopupMenuGridSettings, PopupMenuSidesSetting, PopupMenuSavedLayout } from './popupMenuLayout';
4
+ /** How the popup comes in as it opens and goes as it closes; the overlay behind it fades with it, but for 'none'. */
5
+ export declare const POPUP_MENU_TRANSITIONS: readonly ["slide down", "slide up", "fade", "scale", "none"];
6
+ export type PopupMenuTransition = (typeof POPUP_MENU_TRANSITIONS)[number];
7
+ export declare const POPUP_MENU_TRIGGER_TYPES: readonly ["burger", "plus", "icon", "text"];
8
+ export type PopupMenuTriggerType = (typeof POPUP_MENU_TRIGGER_TYPES)[number];
9
+ /** An image, an uploaded video, or a Vimeo or YouTube one, as a media item holds it. */
10
+ type PopupMenuImage = EmbedMediaLike & {
11
+ assetId: string;
12
+ name?: string;
13
+ };
14
+ export type PopupMenuBlock = {
15
+ /** 'list' is from before lists had two styles, and reads as 'listA'. */
16
+ type?: PopupMenuBlockType | 'list';
17
+ title?: string;
18
+ text?: any[];
19
+ images?: PopupMenuImage[];
20
+ };
21
+ type PopupMenuColorKey = 'barBackgroundColor' | 'triggerColor' | 'overlayColor' | 'popupBackgroundColor' | 'titleColor' | 'textColor' | 'listAColor' | 'listBColor';
22
+ type PopupMenuSettings = PopupMenuGridSettings & {
23
+ /** Saved as it was drawn; one saved before blocks were placed freely has its placements in whole columns. */
24
+ menuLayout?: PopupMenuSavedLayout | null;
25
+ /** None, as in a menu saved before there was a choice, is a text trigger. */
26
+ triggerType?: PopupMenuTriggerType;
27
+ triggerLabel?: string;
28
+ triggerIcon?: string | null;
29
+ triggerIconSize?: number;
30
+ /** The room round the trigger's icon or text; a menu saved before it had one has none. */
31
+ triggerPadding?: PopupMenuSidesSetting;
32
+ /** A percentage of the screen's height, 100 at most. */
33
+ popupHeight?: number;
34
+ /** Where the popup sits across the screen; none is the centre. */
35
+ popupAlign?: PopupMenuAlign;
36
+ /** How far the popup is moved right from where it is aligned, or left where negative, in fractions of the layout width. */
37
+ popupOffset?: number;
38
+ /** How far the popup is moved down from the screen's top, or up where negative, in fractions of the layout width. */
39
+ popupOffsetTop?: number;
40
+ titleGap?: number;
41
+ popupRadius?: number;
42
+ imageRadius?: number;
43
+ /** How the popup shows and hides; none, as in a menu saved before there was a choice, slides down. */
44
+ popupTransition?: PopupMenuTransition;
45
+ /** How far the page behind the open popup is blurred, in fractions of the layout width; none, not at all. */
46
+ overlayBlur?: number;
47
+ barBackgroundColor?: string;
48
+ triggerColor?: string;
49
+ overlayColor?: string;
50
+ popupBackgroundColor?: string;
51
+ titleColor?: string;
52
+ textColor?: string;
53
+ listAColor?: string;
54
+ listBColor?: string;
55
+ /** Colours picked in a state's panel, by state, over the ones above. */
56
+ stateOverrides?: Record<string, Partial<Record<PopupMenuColorKey, string>>>;
57
+ [key: string]: unknown;
58
+ };
59
+ type PopupMenuProps = {
60
+ settings: PopupMenuSettings;
61
+ /** Given in the editor, the open popup's blocks can be dragged across its columns and down its height. */
62
+ onUpdateSettings?: (settings: PopupMenuSettings) => void;
63
+ content?: PopupMenuBlock[];
64
+ isEditor?: boolean;
65
+ isEditMode?: boolean;
66
+ isPreviewMode?: boolean;
67
+ layoutId?: string;
68
+ /** Where the open popup is portalled to, so that it covers the screen rather than the element; none, the body. */
69
+ portalId?: string;
70
+ onOpenChange?: (isOpen: boolean) => void;
71
+ } & CommonComponentProps;
72
+ export declare function PopupMenu({ settings, content, isEditor, isEditMode, isPreviewMode, portalId, currentState, unavailableStates, onOpenChange, onUpdateSettings, }: PopupMenuProps): import("react/jsx-runtime").JSX.Element;
73
+ export {};