@cntrl-site/components 1.0.42 → 1.0.43-alpha.1

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,70 @@
1
+ import { CommonComponentProps } from '../props';
2
+ type Padding = {
3
+ top: number;
4
+ right: number;
5
+ bottom: number;
6
+ left: number;
7
+ };
8
+ type CornerRadius = {
9
+ top: number;
10
+ right: number;
11
+ bottom: number;
12
+ left: number;
13
+ };
14
+ type BoxShadow = {
15
+ top: number;
16
+ left: number;
17
+ right: number;
18
+ bottom: number;
19
+ };
20
+ type HoverEffect = 'none' | 'scale-up' | 'lift' | 'blinds' | 'reveal' | 'swipe' | 'content-roll';
21
+ type SimpleButtonSettings = {
22
+ type?: 'a' | 'b' | 'c';
23
+ label?: string;
24
+ icon?: string | null;
25
+ alignment?: 'left' | 'center' | 'right';
26
+ alignA?: 'left' | 'center' | 'right';
27
+ order?: 'text-icon' | 'icon-text';
28
+ gap?: number;
29
+ iconScale?: number;
30
+ iconSize?: number;
31
+ iconColor?: string;
32
+ dimensions?: boolean;
33
+ padding?: Padding;
34
+ cornerRadius?: CornerRadius;
35
+ boxShadow?: BoxShadow;
36
+ boxShadowColor?: string;
37
+ innerBoxShadow?: BoxShadow;
38
+ innerBoxShadowColor?: string;
39
+ stroke?: number;
40
+ backgroundColor?: string;
41
+ textColor?: string;
42
+ borderColor?: string;
43
+ hoverEffect?: HoverEffect;
44
+ fontFamily?: string;
45
+ fontSettings?: {
46
+ fontWeight?: number;
47
+ fontStyle?: string;
48
+ };
49
+ fontSize?: number;
50
+ lineHeight?: number;
51
+ letterSpacing?: number;
52
+ wordSpacing?: number;
53
+ textAppearance?: {
54
+ textTransform?: string;
55
+ textDecoration?: string;
56
+ fontVariant?: string;
57
+ };
58
+ stateOverrides?: Record<string, Partial<Record<ColorKeys, string>>>;
59
+ minWidth?: number;
60
+ minHeight?: number;
61
+ };
62
+ type ColorKeys = 'backgroundColor' | 'textColor' | 'borderColor' | 'iconColor' | 'boxShadowColor' | 'innerBoxShadowColor';
63
+ type SimpleButtonProps = {
64
+ settings: SimpleButtonSettings;
65
+ isEditor?: boolean;
66
+ isPreviewMode?: boolean;
67
+ activeEvent?: string;
68
+ } & CommonComponentProps;
69
+ export declare function SimpleButton({ settings, isEditor, isPreviewMode, activeEvent }: SimpleButtonProps): import("react/jsx-runtime").JSX.Element;
70
+ export {};
@@ -0,0 +1,516 @@
1
+ import { SimpleButton } from './SimpleButton';
2
+ export declare const SimpleButtonComponent: {
3
+ element: typeof SimpleButton;
4
+ id: string;
5
+ name: string;
6
+ category: string;
7
+ version: number;
8
+ defaultSize: {
9
+ d: {
10
+ width: number;
11
+ height: number;
12
+ };
13
+ m: {
14
+ width: number;
15
+ height: number;
16
+ };
17
+ };
18
+ schema: {
19
+ type: "object";
20
+ version: 1;
21
+ settings: {
22
+ sizing: string;
23
+ properties: {
24
+ type: {
25
+ type: "string";
26
+ scope: "layout";
27
+ title: string;
28
+ display: {
29
+ type: string;
30
+ };
31
+ enum: string[];
32
+ };
33
+ label: {
34
+ type: "string";
35
+ scope: "common";
36
+ title: string;
37
+ display: {
38
+ type: string;
39
+ };
40
+ };
41
+ icon: {
42
+ type: readonly ["string", "null"];
43
+ scope: "common";
44
+ title: string;
45
+ display: {
46
+ type: string;
47
+ visible: boolean;
48
+ };
49
+ };
50
+ alignment: {
51
+ type: "string";
52
+ scope: "layout";
53
+ title: string;
54
+ display: {
55
+ type: string;
56
+ enum: string[];
57
+ };
58
+ };
59
+ alignA: {
60
+ type: "string";
61
+ scope: "layout";
62
+ title: string;
63
+ display: {
64
+ type: string;
65
+ enum: string[];
66
+ visible: boolean;
67
+ };
68
+ };
69
+ order: {
70
+ type: "string";
71
+ scope: "layout";
72
+ title: string;
73
+ display: {
74
+ type: string;
75
+ enum: string[];
76
+ visible: boolean;
77
+ };
78
+ };
79
+ gap: {
80
+ type: "number";
81
+ scope: "layout";
82
+ title: string;
83
+ display: {
84
+ type: string;
85
+ visible: boolean;
86
+ };
87
+ min: number;
88
+ max: number;
89
+ };
90
+ iconScale: {
91
+ type: "number";
92
+ scope: "layout";
93
+ title: string;
94
+ display: {
95
+ type: string;
96
+ visible: boolean;
97
+ };
98
+ min: number;
99
+ max: number;
100
+ };
101
+ iconSize: {
102
+ type: "number";
103
+ scope: "layout";
104
+ title: string;
105
+ display: {
106
+ type: string;
107
+ visible: boolean;
108
+ };
109
+ min: number;
110
+ max: number;
111
+ };
112
+ dimensions: {
113
+ type: "boolean";
114
+ scope: "layout";
115
+ title: string;
116
+ display: {
117
+ type: string;
118
+ enum: string[];
119
+ };
120
+ };
121
+ padding: {
122
+ type: "object";
123
+ scope: "layout";
124
+ title: string;
125
+ display: {
126
+ type: string;
127
+ };
128
+ };
129
+ cornerRadius: {
130
+ type: "object";
131
+ scope: "layout";
132
+ title: string;
133
+ display: {
134
+ type: string;
135
+ };
136
+ };
137
+ boxShadow: {
138
+ type: "object";
139
+ scope: "layout";
140
+ title: string;
141
+ display: {
142
+ type: string;
143
+ step: number;
144
+ decimal: boolean;
145
+ allowNegative: boolean;
146
+ nonNegativeSides: string[];
147
+ sideLetters: {
148
+ top: string;
149
+ left: string;
150
+ right: string;
151
+ bottom: string;
152
+ };
153
+ };
154
+ };
155
+ boxShadowColor: {
156
+ type: "string";
157
+ scope: "common";
158
+ title: string;
159
+ display: {
160
+ type: string;
161
+ };
162
+ };
163
+ innerBoxShadow: {
164
+ type: "object";
165
+ scope: "layout";
166
+ title: string;
167
+ display: {
168
+ type: string;
169
+ step: number;
170
+ decimal: boolean;
171
+ allowNegative: boolean;
172
+ nonNegativeSides: string[];
173
+ sideLetters: {
174
+ top: string;
175
+ left: string;
176
+ right: string;
177
+ bottom: string;
178
+ };
179
+ };
180
+ };
181
+ innerBoxShadowColor: {
182
+ type: "string";
183
+ scope: "common";
184
+ title: string;
185
+ display: {
186
+ type: string;
187
+ };
188
+ };
189
+ stroke: {
190
+ type: "number";
191
+ scope: "layout";
192
+ title: string;
193
+ display: {
194
+ type: string;
195
+ };
196
+ min: number;
197
+ max: number;
198
+ };
199
+ backgroundColor: {
200
+ type: "string";
201
+ scope: "common";
202
+ title: string;
203
+ display: {
204
+ type: string;
205
+ };
206
+ };
207
+ textColor: {
208
+ type: "string";
209
+ scope: "common";
210
+ title: string;
211
+ display: {
212
+ type: string;
213
+ };
214
+ };
215
+ borderColor: {
216
+ type: "string";
217
+ scope: "common";
218
+ title: string;
219
+ display: {
220
+ type: string;
221
+ };
222
+ };
223
+ iconColor: {
224
+ type: "string";
225
+ scope: "common";
226
+ title: string;
227
+ display: {
228
+ type: string;
229
+ };
230
+ };
231
+ stateOverrides: {
232
+ type: "object";
233
+ scope: "common";
234
+ };
235
+ hoverEffect: {
236
+ type: "string";
237
+ scope: "layout";
238
+ title: string;
239
+ display: {
240
+ type: string;
241
+ enum: string[];
242
+ };
243
+ };
244
+ fontFamily: {
245
+ type: "string";
246
+ scope: "common";
247
+ title: string;
248
+ display: {
249
+ type: string;
250
+ };
251
+ };
252
+ fontSettings: {
253
+ scope: "common";
254
+ title: string;
255
+ display: {
256
+ type: string;
257
+ };
258
+ type: "object";
259
+ properties: {
260
+ fontWeight: {
261
+ type: "number";
262
+ };
263
+ fontStyle: {
264
+ type: "string";
265
+ };
266
+ };
267
+ };
268
+ fontSize: {
269
+ type: "number";
270
+ scope: "layout";
271
+ title: string;
272
+ display: {
273
+ type: string;
274
+ };
275
+ };
276
+ lineHeight: {
277
+ type: "number";
278
+ scope: "layout";
279
+ title: string;
280
+ display: {
281
+ type: string;
282
+ };
283
+ };
284
+ letterSpacing: {
285
+ type: "number";
286
+ scope: "layout";
287
+ title: string;
288
+ display: {
289
+ type: string;
290
+ };
291
+ };
292
+ wordSpacing: {
293
+ type: "number";
294
+ scope: "layout";
295
+ title: string;
296
+ display: {
297
+ type: string;
298
+ };
299
+ };
300
+ textAppearance: {
301
+ type: "object";
302
+ scope: "layout";
303
+ title: string;
304
+ display: {
305
+ type: string;
306
+ };
307
+ };
308
+ minWidth: {
309
+ type: "number";
310
+ scope: "layout";
311
+ title: string;
312
+ display: {
313
+ type: string;
314
+ };
315
+ min: number;
316
+ max: number;
317
+ };
318
+ minHeight: {
319
+ type: "number";
320
+ scope: "layout";
321
+ title: string;
322
+ display: {
323
+ type: string;
324
+ };
325
+ min: number;
326
+ max: number;
327
+ };
328
+ };
329
+ defaults: {
330
+ type: string;
331
+ label: string;
332
+ icon: string;
333
+ alignment: string;
334
+ alignA: string;
335
+ order: string;
336
+ gap: number;
337
+ iconScale: number;
338
+ iconSize: number;
339
+ dimensions: boolean;
340
+ padding: {
341
+ top: number;
342
+ right: number;
343
+ bottom: number;
344
+ left: number;
345
+ };
346
+ cornerRadius: {
347
+ top: number;
348
+ right: number;
349
+ bottom: number;
350
+ left: number;
351
+ };
352
+ boxShadow: {
353
+ top: number;
354
+ left: number;
355
+ right: number;
356
+ bottom: number;
357
+ };
358
+ boxShadowColor: string;
359
+ innerBoxShadow: {
360
+ top: number;
361
+ left: number;
362
+ right: number;
363
+ bottom: number;
364
+ };
365
+ innerBoxShadowColor: string;
366
+ stroke: number;
367
+ backgroundColor: string;
368
+ textColor: string;
369
+ borderColor: string;
370
+ iconColor: string;
371
+ hoverEffect: string;
372
+ fontFamily: string;
373
+ fontSettings: {
374
+ fontWeight: number;
375
+ fontStyle: string;
376
+ };
377
+ letterSpacing: number;
378
+ wordSpacing: number;
379
+ textAppearance: {
380
+ textTransform: string;
381
+ textDecoration: string;
382
+ fontVariant: string;
383
+ };
384
+ stateOverrides: {
385
+ hover: {
386
+ backgroundColor: string;
387
+ };
388
+ active: {
389
+ backgroundColor: string;
390
+ };
391
+ };
392
+ minWidth: number;
393
+ minHeight: number;
394
+ };
395
+ layoutDefaults: {
396
+ m: {
397
+ dimensions: boolean;
398
+ padding: {
399
+ top: number;
400
+ right: number;
401
+ bottom: number;
402
+ left: number;
403
+ };
404
+ minWidth: number;
405
+ minHeight: number;
406
+ iconSize: number;
407
+ fontSize: number;
408
+ lineHeight: number;
409
+ };
410
+ t: {
411
+ dimensions: boolean;
412
+ padding: {
413
+ top: number;
414
+ right: number;
415
+ bottom: number;
416
+ left: number;
417
+ };
418
+ minWidth: number;
419
+ minHeight: number;
420
+ iconSize: number;
421
+ fontSize: number;
422
+ lineHeight: number;
423
+ };
424
+ d: {
425
+ dimensions: boolean;
426
+ padding: {
427
+ top: number;
428
+ right: number;
429
+ bottom: number;
430
+ left: number;
431
+ };
432
+ minWidth: number;
433
+ minHeight: number;
434
+ iconSize: number;
435
+ fontSize: number;
436
+ lineHeight: number;
437
+ };
438
+ };
439
+ layout: (string | {
440
+ type: "row";
441
+ title: string;
442
+ items: string[];
443
+ })[];
444
+ displayRules: ({
445
+ if: {
446
+ name: string;
447
+ value: string;
448
+ };
449
+ then: {
450
+ name: string;
451
+ value: boolean;
452
+ };
453
+ } | {
454
+ if: {
455
+ name: string;
456
+ value: number;
457
+ };
458
+ then: {
459
+ name: string;
460
+ value: boolean;
461
+ };
462
+ } | {
463
+ if: {
464
+ name: string;
465
+ value: boolean;
466
+ };
467
+ then: {
468
+ name: string;
469
+ value: boolean;
470
+ };
471
+ })[];
472
+ };
473
+ panels: {
474
+ id: string;
475
+ icon: string;
476
+ title: string;
477
+ tooltip: string;
478
+ layout: (string | {
479
+ type: "row";
480
+ title: string;
481
+ items: string[];
482
+ })[];
483
+ }[];
484
+ paletteBookmark: {
485
+ items: ("backgroundColor" | "borderColor" | "textColor" | "iconColor" | "boxShadowColor" | "innerBoxShadowColor")[];
486
+ panelIds: string[];
487
+ stateItems: {
488
+ default: string[];
489
+ hover: string[];
490
+ active: string[];
491
+ };
492
+ };
493
+ states: string[];
494
+ statesByLayout: {
495
+ m: string[];
496
+ t: string[];
497
+ };
498
+ };
499
+ sourceCode: string;
500
+ assetsPaths: {
501
+ content: never[];
502
+ parameters: {
503
+ path: string;
504
+ placeholderEnabled: boolean;
505
+ }[];
506
+ };
507
+ fontSettingsPaths: {
508
+ content: never[];
509
+ parameters: {
510
+ path: string;
511
+ }[];
512
+ };
513
+ fontRelations: {
514
+ fontSettings: string;
515
+ };
516
+ };