@woodylab/payload 0.0.130 → 0.0.132

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 (272) hide show
  1. package/dist/LayoutRenderer-B1IoWb16.js +2 -0
  2. package/dist/LayoutRenderer-B1IoWb16.js.map +1 -0
  3. package/dist/LayoutRenderer-Ba6ITI7O.js +2 -0
  4. package/dist/LayoutRenderer-Ba6ITI7O.js.map +1 -0
  5. package/dist/config/blocks/blockCard.d.ts +2 -0
  6. package/dist/config/blocks/blockCard.js +101 -0
  7. package/dist/config/blocks/blockReference.d.ts +2 -0
  8. package/dist/config/blocks/blockReference.js +11 -0
  9. package/dist/config/{blockView.js → blocks/blockView.js} +35 -91
  10. package/dist/config/collections/collectionBlocks.d.ts +2 -0
  11. package/dist/config/collections/collectionBlocks.js +35 -0
  12. package/dist/config/{collectionComponentDefinitions.d.ts → collections/collectionComponentDefinitions.d.ts} +1 -1
  13. package/dist/config/collections/collectionComponentDefinitions.js +40 -0
  14. package/dist/config/collections/collectionMenus.d.ts +2 -0
  15. package/dist/config/{collectionMenus.js → collections/collectionMenus.js} +18 -16
  16. package/dist/config/collections/collectionStyles.d.ts +2 -0
  17. package/dist/config/collections/collectionStyles.js +25 -0
  18. package/dist/config/{collectionViewModes.d.ts → collections/collectionViewModes.d.ts} +1 -1
  19. package/dist/config/collections/collectionViewModes.js +106 -0
  20. package/dist/config/fields/fieldCss.js +537 -0
  21. package/dist/config/fields/fieldRoles.d.ts +2 -0
  22. package/dist/{fields/utils → config/fields}/fieldRoles.js +7 -11
  23. package/dist/config/fields/tailwindFieldSelectors.d.ts +2 -1
  24. package/dist/config/fields/tailwindFieldSelectors.js +1547 -1
  25. package/dist/config/fields/tailwindSelectorVariants.js +45 -45
  26. package/dist/config/{configFooter.js → globals/configFooter.js} +11 -9
  27. package/dist/config/{configHeader.js → globals/configHeader.js} +11 -10
  28. package/dist/config/{configSettings.js → globals/configSettings.js} +48 -26
  29. package/dist/{hooks → config/hooks}/fields/populateSiblingClassName.js +0 -2
  30. package/dist/{hooks → config/hooks}/fields/populateSiblingClassNameAfterChange.js +0 -1
  31. package/dist/config/hooks/fields/resolveComponentFromRef.d.ts +2 -0
  32. package/dist/config/hooks/fields/resolveComponentFromRef.js +30 -0
  33. package/dist/config/hooks/fields/resolveStyleFromRef.d.ts +2 -0
  34. package/dist/config/hooks/fields/resolveStyleFromRef.js +35 -0
  35. package/dist/config/hooks/fields/resolveViewModeFromRef.d.ts +2 -0
  36. package/dist/config/hooks/fields/resolveViewModeFromRef.js +23 -0
  37. package/dist/config/index.cjs.js +1 -1
  38. package/dist/config/index.cjs.js.map +1 -1
  39. package/dist/config/index.d.ts +15 -9
  40. package/dist/config/index.esm.js +1 -1
  41. package/dist/config/index.esm.js.map +1 -1
  42. package/dist/config/index.js +15 -9
  43. package/dist/index.cjs.js +1 -1
  44. package/dist/index.d.ts +1 -0
  45. package/dist/index.esm.js +1 -1
  46. package/dist/index.js +2 -0
  47. package/dist/react/ComponentRenderer.js +1 -1
  48. package/dist/react/LayoutRenderer.d.ts +5 -0
  49. package/dist/react/LayoutRenderer.js +19 -0
  50. package/dist/react/componentRegistry.js +7 -0
  51. package/dist/react/components/Card.d.ts +19 -0
  52. package/dist/react/components/Card.js +6 -0
  53. package/dist/react/components/Container.d.ts +5 -0
  54. package/dist/react/components/Container.js +4 -0
  55. package/dist/react/components/View.d.ts +1 -0
  56. package/dist/react/components/View.js +9 -0
  57. package/dist/react/index.cjs.js +1 -1
  58. package/dist/react/index.d.ts +5 -5
  59. package/dist/react/index.esm.js +1 -1
  60. package/dist/react/index.js +5 -5
  61. package/dist/resolveLayout-DlRnQBn8.js +2 -0
  62. package/dist/resolveLayout-DlRnQBn8.js.map +1 -0
  63. package/dist/resolveLayout-DryOXHEy.js +2 -0
  64. package/dist/resolveLayout-DryOXHEy.js.map +1 -0
  65. package/dist/seeders/UIMSSeeder.d.ts +7 -0
  66. package/dist/seeders/UIMSSeeder.js +14 -0
  67. package/dist/seeders/clearCollection.d.ts +2 -0
  68. package/dist/seeders/clearCollection.js +18 -0
  69. package/dist/seeders/components.d.ts +1 -0
  70. package/dist/seeders/components.js +3 -0
  71. package/dist/seeders/generateTailwindStyles.d.ts +6 -0
  72. package/dist/seeders/generateTailwindStyles.js +18 -0
  73. package/dist/seeders/index.cjs.js +2 -0
  74. package/dist/seeders/index.cjs.js.map +1 -0
  75. package/dist/seeders/index.d.ts +2 -0
  76. package/dist/seeders/index.esm.js +2 -0
  77. package/dist/seeders/index.esm.js.map +1 -0
  78. package/dist/seeders/index.js +2 -0
  79. package/dist/seeders/styles.d.ts +1 -0
  80. package/dist/seeders/styles.js +27 -0
  81. package/dist/seeders/viewModes.d.ts +1 -0
  82. package/dist/seeders/viewModes.js +3 -0
  83. package/dist/tailwind/index.cjs.js +2 -0
  84. package/dist/tailwind/index.cjs.js.map +1 -0
  85. package/dist/tailwind/index.d.ts +2 -94
  86. package/dist/tailwind/index.esm.js +2 -0
  87. package/dist/tailwind/index.esm.js.map +1 -0
  88. package/dist/tailwind/index.js +2 -2692
  89. package/dist/tailwind/tailwindFieldSelectors.d.ts +181 -0
  90. package/dist/tailwind/tailwindFieldSelectors.js +1184 -0
  91. package/dist/tailwind/tailwindSelectorVariants.d.ts +4 -0
  92. package/dist/tailwind/tailwindSelectorVariants.js +69 -0
  93. package/dist/uims/index.cjs.js +2 -0
  94. package/dist/uims/index.cjs.js.map +1 -0
  95. package/dist/uims/index.d.ts +6 -0
  96. package/dist/uims/index.esm.js +2 -0
  97. package/dist/uims/index.esm.js.map +1 -0
  98. package/dist/uims/index.js +9 -0
  99. package/dist/uims/mapper/applyStylesToProps.d.ts +4 -0
  100. package/dist/uims/mapper/applyStylesToProps.js +18 -0
  101. package/dist/uims/mapper/getValueByPath.d.ts +1 -0
  102. package/dist/uims/mapper/getValueByPath.js +3 -0
  103. package/dist/uims/mapper/mapDataToProps.d.ts +6 -0
  104. package/dist/uims/mapper/mapDataToProps.js +26 -0
  105. package/dist/uims/mapper/mapInlineBlockToProps.d.ts +6 -0
  106. package/dist/uims/mapper/mapInlineBlockToProps.js +16 -0
  107. package/dist/uims/registry/componentRegistry.d.ts +4 -0
  108. package/dist/uims/registry/componentRegistry.js +20 -0
  109. package/dist/uims/registry/styleRegistry.d.ts +4 -0
  110. package/dist/uims/registry/styleRegistry.js +20 -0
  111. package/dist/uims/registry/viewModeRegistry.d.ts +4 -0
  112. package/dist/uims/registry/viewModeRegistry.js +20 -0
  113. package/dist/uims/resolver/createUIMSContext.d.ts +3 -0
  114. package/dist/uims/resolver/createUIMSContext.js +13 -0
  115. package/dist/uims/resolver/resolveInlineBlock.d.ts +8 -0
  116. package/dist/uims/resolver/resolveInlineBlock.js +22 -0
  117. package/dist/uims/resolver/resolveInlineStylesBySlot.d.ts +1 -0
  118. package/dist/uims/resolver/resolveInlineStylesBySlot.js +15 -0
  119. package/dist/uims/resolver/resolveLayout.d.ts +5 -0
  120. package/dist/uims/resolver/resolveLayout.js +24 -0
  121. package/dist/uims/resolver/resolveStylesBySlot.d.ts +11 -0
  122. package/dist/uims/resolver/resolveStylesBySlot.js +12 -0
  123. package/dist/uims/resolver/resolveViewBlock.d.ts +12 -0
  124. package/dist/uims/resolver/resolveViewBlock.js +26 -0
  125. package/dist/{utils → uims/resolver}/resolveViewData.d.ts +3 -1
  126. package/dist/uims/resolver/resolveViewData.js +56 -0
  127. package/dist/uims/types/UIMSContext.d.ts +18 -0
  128. package/dist/uims/types/UIMSContext.js +1 -0
  129. package/dist/utils/getPropsKeys.d.ts +1 -0
  130. package/dist/utils/getPropsKeys.js +3 -0
  131. package/dist/utils/index.cjs.js +1 -1
  132. package/dist/utils/index.cjs.js.map +1 -1
  133. package/dist/utils/index.d.ts +0 -1
  134. package/dist/utils/index.esm.js +1 -1
  135. package/dist/utils/index.esm.js.map +1 -1
  136. package/dist/utils/index.js +0 -1
  137. package/dist/utils/normalizeStyles.d.ts +1 -0
  138. package/dist/utils/normalizeStyles.js +12 -0
  139. package/dist/utils/pickProps.d.ts +1 -0
  140. package/dist/utils/pickProps.js +9 -0
  141. package/package.json +12 -4
  142. package/dist/PageRenderer-BiZflIhY.js +0 -2
  143. package/dist/PageRenderer-BiZflIhY.js.map +0 -1
  144. package/dist/PageRenderer-DX3iEA8n.js +0 -2
  145. package/dist/PageRenderer-DX3iEA8n.js.map +0 -1
  146. package/dist/config/blockComponentInstance.d.ts +0 -2
  147. package/dist/config/blockComponentInstance.js +0 -84
  148. package/dist/config/blocks/blockCarousel.d.ts +0 -3
  149. package/dist/config/blocks/blockCarousel.js +0 -102
  150. package/dist/config/blocks/blockDisclosureList.d.ts +0 -3
  151. package/dist/config/blocks/blockDisclosureList.js +0 -58
  152. package/dist/config/blocks/blockGrid.d.ts +0 -6
  153. package/dist/config/blocks/blockGrid.js +0 -161
  154. package/dist/config/blocks/blockGridContent.d.ts +0 -6
  155. package/dist/config/blocks/blockGridContent.js +0 -195
  156. package/dist/config/blocks/blockHtmlElement.d.ts +0 -6
  157. package/dist/config/blocks/blockHtmlElement.js +0 -13
  158. package/dist/config/blocks/blockImage.d.ts +0 -3
  159. package/dist/config/blocks/blockImage.js +0 -15
  160. package/dist/config/blocks/blockParallax.d.ts +0 -3
  161. package/dist/config/blocks/blockParallax.js +0 -76
  162. package/dist/config/blocks/blockTabs.d.ts +0 -3
  163. package/dist/config/blocks/blockTabs.js +0 -24
  164. package/dist/config/collectionComponentDefinitions.js +0 -33
  165. package/dist/config/collectionMenus.d.ts +0 -6
  166. package/dist/config/collectionViewModes.js +0 -20
  167. package/dist/config/fieldCss.js +0 -543
  168. package/dist/config/utils/resolveInlineComponent.d.ts +0 -4
  169. package/dist/config/utils/resolveInlineComponent.js +0 -35
  170. package/dist/config/utils/resolveViewRow.d.ts +0 -4
  171. package/dist/config/utils/resolveViewRow.js +0 -15
  172. package/dist/fields/fieldArray.d.ts +0 -4
  173. package/dist/fields/fieldArray.js +0 -9
  174. package/dist/fields/fieldBlocks.d.ts +0 -4
  175. package/dist/fields/fieldBlocks.js +0 -9
  176. package/dist/fields/fieldCheckbox.d.ts +0 -4
  177. package/dist/fields/fieldCheckbox.js +0 -11
  178. package/dist/fields/fieldCode.d.ts +0 -4
  179. package/dist/fields/fieldCode.js +0 -8
  180. package/dist/fields/fieldDate.d.ts +0 -4
  181. package/dist/fields/fieldDate.js +0 -15
  182. package/dist/fields/fieldEmail.d.ts +0 -4
  183. package/dist/fields/fieldEmail.js +0 -8
  184. package/dist/fields/fieldJoin.d.ts +0 -4
  185. package/dist/fields/fieldJoin.js +0 -9
  186. package/dist/fields/fieldNumber.d.ts +0 -4
  187. package/dist/fields/fieldNumber.js +0 -8
  188. package/dist/fields/fieldPoint.d.ts +0 -4
  189. package/dist/fields/fieldPoint.js +0 -8
  190. package/dist/fields/fieldRadioGroup.d.ts +0 -4
  191. package/dist/fields/fieldRadioGroup.js +0 -18
  192. package/dist/fields/fieldRelationship.d.ts +0 -4
  193. package/dist/fields/fieldRelationship.js +0 -9
  194. package/dist/fields/fieldRichText.d.ts +0 -4
  195. package/dist/fields/fieldRichText.js +0 -12
  196. package/dist/fields/fieldSelect.d.ts +0 -4
  197. package/dist/fields/fieldSelect.js +0 -9
  198. package/dist/fields/fieldText.d.ts +0 -4
  199. package/dist/fields/fieldText.js +0 -8
  200. package/dist/fields/fieldTextArea.d.ts +0 -4
  201. package/dist/fields/fieldTextArea.js +0 -8
  202. package/dist/fields/fieldUpload.d.ts +0 -4
  203. package/dist/fields/fieldUpload.js +0 -9
  204. package/dist/fields/index.cjs.js +0 -2
  205. package/dist/fields/index.cjs.js.map +0 -1
  206. package/dist/fields/index.d.ts +0 -31
  207. package/dist/fields/index.esm.js +0 -2
  208. package/dist/fields/index.esm.js.map +0 -1
  209. package/dist/fields/index.js +0 -37
  210. package/dist/fields/layout/fieldContainerProps.d.ts +0 -3
  211. package/dist/fields/layout/fieldContainerProps.js +0 -74
  212. package/dist/fields/section/fieldAction.d.ts +0 -6
  213. package/dist/fields/section/fieldAction.js +0 -236
  214. package/dist/fields/section/fieldConfigProps.d.ts +0 -3
  215. package/dist/fields/section/fieldConfigProps.js +0 -11
  216. package/dist/fields/section/fieldContentProps.d.ts +0 -3
  217. package/dist/fields/section/fieldContentProps.js +0 -11
  218. package/dist/fields/section/fieldSectionProps.d.ts +0 -3
  219. package/dist/fields/section/fieldSectionProps.js +0 -15
  220. package/dist/fields/section/fieldSectionTabs.d.ts +0 -13
  221. package/dist/fields/section/fieldSectionTabs.js +0 -40
  222. package/dist/fields/style/fieldColor.d.ts +0 -4
  223. package/dist/fields/style/fieldColor.js +0 -21
  224. package/dist/fields/style/fieldContainerWidths.d.ts +0 -7
  225. package/dist/fields/style/fieldContainerWidths.js +0 -17
  226. package/dist/fields/style/fieldCss.d.ts +0 -3
  227. package/dist/fields/style/fieldCss.js +0 -65
  228. package/dist/fields/style/fieldFontSizes.d.ts +0 -3
  229. package/dist/fields/style/fieldFontSizes.js +0 -14
  230. package/dist/fields/style/fieldHeights.d.ts +0 -7
  231. package/dist/fields/style/fieldHeights.js +0 -23
  232. package/dist/fields/style/fieldMargins.d.ts +0 -7
  233. package/dist/fields/style/fieldMargins.js +0 -138
  234. package/dist/fields/style/fieldPaddings.d.ts +0 -7
  235. package/dist/fields/style/fieldPaddings.js +0 -114
  236. package/dist/fields/style/fieldViewportHeights.d.ts +0 -7
  237. package/dist/fields/style/fieldViewportHeights.js +0 -22
  238. package/dist/fields/utils/fieldRoles.d.ts +0 -4
  239. package/dist/react/Card.d.ts +0 -6
  240. package/dist/react/Card.js +0 -4
  241. package/dist/react/PageRenderer.d.ts +0 -4
  242. package/dist/react/PageRenderer.js +0 -34
  243. package/dist/react/ViewBlock.d.ts +0 -1
  244. package/dist/react/ViewBlock.js +0 -62
  245. package/dist/react/registry.js +0 -5
  246. package/dist/userRoles-BqQg1D6Q.js +0 -2
  247. package/dist/userRoles-BqQg1D6Q.js.map +0 -1
  248. package/dist/userRoles-CL8SQUFs.js +0 -2
  249. package/dist/userRoles-CL8SQUFs.js.map +0 -1
  250. package/dist/utils/resolveViewData.js +0 -26
  251. /package/dist/{acl → config/acl}/hasRoles.d.ts +0 -0
  252. /package/dist/{acl → config/acl}/hasRoles.js +0 -0
  253. /package/dist/{acl → config/acl}/index.d.ts +0 -0
  254. /package/dist/{acl → config/acl}/index.js +0 -0
  255. /package/dist/config/{blockView.d.ts → blocks/blockView.d.ts} +0 -0
  256. /package/dist/{enums → config/enums}/index.d.ts +0 -0
  257. /package/dist/{enums → config/enums}/index.js +0 -0
  258. /package/dist/{enums → config/enums}/userRoles.d.ts +0 -0
  259. /package/dist/{enums → config/enums}/userRoles.js +0 -0
  260. /package/dist/config/{fieldCss.d.ts → fields/fieldCss.d.ts} +0 -0
  261. /package/dist/config/{configFooter.d.ts → globals/configFooter.d.ts} +0 -0
  262. /package/dist/config/{configHeader.d.ts → globals/configHeader.d.ts} +0 -0
  263. /package/dist/config/{configSettings.d.ts → globals/configSettings.d.ts} +0 -0
  264. /package/dist/{hooks → config/hooks}/fields/getNumberValueFromClassNameString.d.ts +0 -0
  265. /package/dist/{hooks → config/hooks}/fields/getNumberValueFromClassNameString.js +0 -0
  266. /package/dist/{hooks → config/hooks}/fields/populateSiblingClassName.d.ts +0 -0
  267. /package/dist/{hooks → config/hooks}/fields/populateSiblingClassNameAfterChange.d.ts +0 -0
  268. /package/dist/{hooks → config/hooks}/fields/updateClassNameAfterRead.d.ts +0 -0
  269. /package/dist/{hooks → config/hooks}/fields/updateClassNameAfterRead.js +0 -0
  270. /package/dist/{hooks → config/hooks}/index.d.ts +0 -0
  271. /package/dist/{hooks → config/hooks}/index.js +0 -0
  272. /package/dist/react/{registry.d.ts → componentRegistry.d.ts} +0 -0
@@ -1,24 +0,0 @@
1
- // config/blockCarousel.ts
2
- import { fieldArray, fieldRichText, fieldSectionTabs, fieldText } from '../../fields';
3
- const blockTabs = {
4
- slug: 'tabs',
5
- labels: {
6
- singular: 'tabs',
7
- plural: 'tabs',
8
- },
9
- fields: [
10
- fieldSectionTabs({
11
- contentFields: [
12
- fieldArray({
13
- name: 'tab',
14
- label: 'tab',
15
- fields: [
16
- fieldText({ name: 'title', label: 'Titolo tab' }),
17
- fieldRichText({ name: 'body', label: 'Contenuto tab' }),
18
- ],
19
- }),
20
- ],
21
- }),
22
- ],
23
- };
24
- export default blockTabs;
@@ -1,33 +0,0 @@
1
- export const collectionComponentDefinitions = {
2
- slug: 'component-definitions',
3
- labels: {
4
- singular: 'Component Definition',
5
- plural: 'Component Definitions',
6
- },
7
- admin: {
8
- useAsTitle: 'name',
9
- },
10
- fields: [
11
- {
12
- name: 'name',
13
- type: 'text',
14
- required: true,
15
- unique: true,
16
- },
17
- {
18
- name: 'componentName',
19
- type: 'text',
20
- required: true,
21
- unique: true,
22
- },
23
- {
24
- name: 'defaultStyle',
25
- type: 'text',
26
- },
27
- {
28
- name: 'propsSchema',
29
- type: 'json',
30
- required: false,
31
- },
32
- ],
33
- };
@@ -1,6 +0,0 @@
1
- import type { CollectionConfig, CollectionSlug } from 'payload';
2
- interface MenusCollectionConfig {
3
- relationToOptions: CollectionSlug | CollectionSlug[];
4
- }
5
- export declare const collectionMenus: ({ relationToOptions, }: MenusCollectionConfig) => CollectionConfig;
6
- export {};
@@ -1,20 +0,0 @@
1
- import { fieldCss } from './fieldCss';
2
- export const collectionViewModes = {
3
- slug: 'view-modes',
4
- labels: {
5
- plural: 'View Modes',
6
- singular: 'View Mode',
7
- },
8
- admin: {
9
- useAsTitle: 'name',
10
- },
11
- fields: [
12
- {
13
- name: 'name',
14
- type: 'text',
15
- required: true,
16
- unique: true,
17
- },
18
- fieldCss(false),
19
- ],
20
- };
@@ -1,543 +0,0 @@
1
- // #TODO cambiare gestione recupero valore campi se pureSelectors o meno D: MALEDIZIONE!!!
2
- //#TODO aggiungere elenco campi e relativi valori per permettere recupero e binding dopo recupero valori form.
3
- export const concatCssFields = (args) => {
4
- const { siblingData, operation } = args;
5
- if (operation !== 'create' && operation !== 'update') {
6
- return;
7
- }
8
- const classes = [];
9
- Object.entries(siblingData || {}).forEach(([key, val]) => {
10
- if (key === 'className')
11
- return;
12
- if (val === null || val === undefined)
13
- return;
14
- if (typeof val === 'string' && val.trim() === '')
15
- return;
16
- classes.push(val);
17
- });
18
- return classes.join(' ');
19
- };
20
- export const fieldCss = (enableTabs = false) => {
21
- return {
22
- name: 'css',
23
- type: 'group',
24
- label: 'Regole di stile',
25
- fields: [
26
- {
27
- type: 'text',
28
- name: 'className',
29
- label: 'className',
30
- required: false,
31
- hooks: {
32
- beforeValidate: [concatCssFields],
33
- },
34
- },
35
- {
36
- type: 'tabs',
37
- tabs: [],
38
- /*enableTabs
39
- ? [
40
- {
41
- label: 'Box',
42
- fields: [
43
- {
44
- type: 'tabs',
45
- tabs: tailwindSelectorVariants.map((bp) => {
46
- return {
47
- label: bp.label,
48
- fields: [
49
- {
50
- type: 'row',
51
- fields: [
52
- tailwindField('width', bp.value),
53
- tailwindField('minWidth', bp.value),
54
- tailwindField('maxWidth', bp.value),
55
- tailwindField('height', bp.value),
56
- tailwindField('minHeight', bp.value),
57
- tailwindField('maxHeight', bp.value),
58
- tailwindField('aspectRatio', bp.value),
59
- {
60
- type: 'collapsible',
61
- label: 'Margins',
62
- admin: {
63
- width: '50%',
64
- },
65
- fields: [
66
- tailwindField('margin', bp.value),
67
- tailwindField('marginX', bp.value),
68
- tailwindField('marginY', bp.value),
69
- tailwindField('marginTop', bp.value),
70
- tailwindField('marginEnd', bp.value),
71
- tailwindField('marginBottom', bp.value),
72
- tailwindField('marginStart', bp.value),
73
- ],
74
- },
75
- {
76
- type: 'collapsible',
77
- label: 'Paddings',
78
- admin: {
79
- width: '50%',
80
- },
81
- fields: [
82
- tailwindField('padding', bp.value),
83
- tailwindField('paddingX', bp.value),
84
- tailwindField('paddingY', bp.value),
85
- tailwindField('paddingTop', bp.value),
86
- tailwindField('paddingEnd', bp.value),
87
- tailwindField('paddingBottom', bp.value),
88
- tailwindField('paddingStart', bp.value),
89
- // # TODO OK funzionalità in aggiunta dei tab
90
- // GESTIRE LAYOUT DECENTE UNA VOLTA PER TUTTI I BP
91
- ],
92
- },
93
- ],
94
- },
95
- ],
96
- }
97
- }),
98
- },
99
- ],
100
- },
101
- {
102
- label: 'Display',
103
- fields: [
104
- {
105
- type: 'tabs',
106
- tabs: tailwindSelectorVariants.map((bp) => {
107
- return {
108
- label: bp.label,
109
- fields: [
110
- {
111
- type: 'row',
112
- fields: [
113
- // BASE DISPLAY
114
- tailwindField('display', bp.value),
115
- tailwindField('visibility', bp.value),
116
- tailwindField('isolation', bp.value),
117
-
118
- // FLOW / OVERFLOW
119
- tailwindField('overflow', bp.value),
120
- tailwindField('overflowX', bp.value),
121
- tailwindField('overflowY', bp.value),
122
-
123
- // FLOAT / CLEAR
124
- tailwindField('float', bp.value),
125
- tailwindField('clear', bp.value),
126
-
127
- // FLEX
128
- tailwindField('flexWrap', bp.value),
129
- tailwindField('justifyContent', bp.value),
130
- tailwindField('alignItems', bp.value),
131
- tailwindField('alignContent', bp.value),
132
- tailwindField('alignSelf', bp.value),
133
- tailwindField('flexGrow', bp.value),
134
- tailwindField('flexShrink', bp.value),
135
- tailwindField('flexBasis', bp.value),
136
- tailwindField('order', bp.value),
137
- tailwindField('gap', bp.value),
138
- //tailwindField('rowGap', bp.value),
139
- tailwindField('columnGap', bp.value),
140
-
141
- // GRID
142
- tailwindField('gridTemplateColumns', bp.value),
143
- tailwindField('gridTemplateRows', bp.value),
144
- tailwindField('gridColumn', bp.value),
145
- tailwindField('gridRow', bp.value),
146
- tailwindField('gridAutoFlow', bp.value),
147
- tailwindField('gridAutoColumns', bp.value),
148
- tailwindField('gridAutoRows', bp.value),
149
- tailwindField('justifyItems', bp.value),
150
- tailwindField('justifySelf', bp.value),
151
- tailwindField('placeItems', bp.value),
152
- tailwindField('placeContent', bp.value),
153
-
154
- // TABLE
155
- tailwindField('tableLayout', bp.value),
156
- tailwindField('captionSide', bp.value),
157
-
158
- // OBJECT / MEDIA
159
- tailwindField('objectFit', bp.value),
160
- tailwindField('objectPosition', bp.value),
161
-
162
- // COLUMNS
163
- tailwindField('columns', bp.value),
164
- tailwindField('breakBefore', bp.value),
165
- tailwindField('breakAfter', bp.value),
166
- tailwindField('breakInside', bp.value),
167
- ],
168
- },
169
- ],
170
- }
171
- }),
172
- },
173
- ],
174
- },
175
- {
176
- label: 'Position',
177
- fields: [
178
- {
179
- type: 'tabs',
180
- tabs: tailwindSelectorVariants.map((bp) => {
181
- return {
182
- label: bp.label,
183
- fields: [
184
- {
185
- type: 'row',
186
- fields: [
187
- tailwindField('position', bp.value),
188
- // inset / offsets
189
- // #TODO Aggiungere ipotetico campo tailwindNumeric per selezione valore numerico tipo gli offset delle position
190
- //tailwindField('top', bp.value),
191
- //tailwindField('right', bp.value),
192
- //tailwindField('bottom', bp.value),
193
- //tailwindField('left', bp.value),
194
- //tailwindField('inset', bp.value),
195
- //tailwindField('insetX', bp.value),
196
- //tailwindField('insetY', bp.value),
197
-
198
- // z-index / stacking
199
- tailwindField('zIndex', bp.value),
200
-
201
- // translate (layout-related movement)
202
- //tailwindField('translateX', bp.value),
203
- //tailwindField('translateY', bp.value),
204
- ],
205
- },
206
- ],
207
- }
208
- }),
209
- },
210
- ],
211
- },
212
- {
213
- label: 'Typography',
214
- fields: [
215
- {
216
- type: 'tabs',
217
- tabs: tailwindSelectorVariants.map((bp) => {
218
- return {
219
- label: bp.label,
220
- fields: [
221
- {
222
- type: 'row',
223
- fields: [
224
- tailwindField('fontFamily', bp.value),
225
- tailwindField('fontSize', bp.value),
226
- tailwindField('fontWeight', bp.value),
227
- tailwindField('fontStyle', bp.value),
228
-
229
- // text layout
230
- tailwindField('lineHeight', bp.value),
231
- tailwindField('letterSpacing', bp.value),
232
- tailwindField('textAlign', bp.value),
233
- tailwindField('verticalAlign', bp.value),
234
-
235
- // text transform & decoration
236
- tailwindField('textTransform', bp.value),
237
- tailwindField('textDecoration', bp.value),
238
- tailwindField('textDecorationStyle', bp.value),
239
- tailwindField('textDecorationThickness', bp.value),
240
- tailwindField('textUnderlineOffset', bp.value),
241
-
242
- // text behavior
243
- tailwindField('textOverflow', bp.value),
244
- tailwindField('whiteSpace', bp.value),
245
- tailwindField('wordBreak', bp.value),
246
- tailwindField('hyphens', bp.value),
247
-
248
- // list
249
- tailwindField('listStyleType', bp.value),
250
- tailwindField('listStylePosition', bp.value),
251
- ],
252
- },
253
- ],
254
- }
255
- }),
256
- },
257
- ],
258
- },
259
- {
260
- label: 'Color',
261
- fields: [
262
- {
263
- type: 'tabs',
264
- tabs: tailwindSelectorVariants.map((bp) => {
265
- return {
266
- label: bp.label,
267
- fields: [
268
- {
269
- type: 'row',
270
- fields: [
271
- tailwindField('textColor', bp.value),
272
- //tailwindField('placeholderColor', bp.value),
273
- tailwindField('caretColor', bp.value),
274
-
275
- // background
276
- tailwindField('backgroundColor', bp.value),
277
-
278
- // border & divide
279
- tailwindField('borderColor', bp.value),
280
- tailwindField('divideColor', bp.value),
281
-
282
- // accents
283
- tailwindField('accentColor', bp.value),
284
- ],
285
- },
286
- ],
287
- }
288
- }),
289
- },
290
- ],
291
- },
292
- {
293
- label: 'Background',
294
- fields: [
295
- {
296
- type: 'tabs',
297
- tabs: tailwindSelectorVariants.map((bp) => {
298
- return {
299
- label: bp.label,
300
- fields: [
301
- {
302
- type: 'row',
303
- fields: [
304
- // background image & gradients
305
- tailwindField('backgroundImage', bp.value),
306
- // #TODO gestire possibilità di caricare una immagine (capire quindi gestione url dell'immagine da referenziare)
307
- //tailwindField('backgroundGradientFrom', bp.value),
308
- //tailwindField('backgroundGradientVia', bp.value),
309
- //tailwindField('backgroundGradientTo', bp.value),
310
-
311
- // background behavior
312
- tailwindField('backgroundSize', bp.value),
313
- tailwindField('backgroundPosition', bp.value),
314
- tailwindField('backgroundRepeat', bp.value),
315
- tailwindField('backgroundAttachment', bp.value),
316
-
317
- // clipping & origin
318
- tailwindField('backgroundClip', bp.value),
319
- tailwindField('backgroundOrigin', bp.value),
320
- ],
321
- },
322
- ],
323
- }
324
- }),
325
- },
326
- ],
327
- },
328
- {
329
- label: 'Border',
330
- fields: [
331
- {
332
- type: 'tabs',
333
- tabs: tailwindSelectorVariants.map((bp) => {
334
- return {
335
- label: bp.label,
336
- fields: [
337
- {
338
- type: 'row',
339
- fields: [
340
- // border width
341
- tailwindField('borderWidth', bp.value),
342
- // #TODO ADD
343
- //tailwindField('borderWidthX', bp.value),
344
- //tailwindField('borderWidthY', bp.value),
345
- //tailwindField('borderWidthTop', bp.value),
346
- //tailwindField('borderWidthRight', bp.value),
347
- //tailwindField('borderWidthBottom', bp.value),
348
- //tailwindField('borderWidthLeft', bp.value),
349
-
350
- // border style & radius
351
- tailwindField('borderStyle', bp.value),
352
- tailwindField('borderRadius', bp.value),
353
- // #TODO ADD
354
- //tailwindField('borderRadiusTop', bp.value),
355
- //tailwindField('borderRadiusRight', bp.value),
356
- //tailwindField('borderRadiusBottom', bp.value),
357
- //tailwindField('borderRadiusLeft', bp.value),
358
-
359
- // divide
360
- tailwindField('divideWidth', bp.value),
361
- tailwindField('divideStyle', bp.value),
362
-
363
- // outline & ring
364
- tailwindField('outline', bp.value),
365
- tailwindField('outlineOffset', bp.value),
366
- tailwindField('ringWidth', bp.value),
367
- tailwindField('ringOffsetWidth', bp.value),
368
- ],
369
- },
370
- ],
371
- }
372
- }),
373
- },
374
- ],
375
- },
376
- {
377
- label: 'Shadow',
378
- fields: [
379
- {
380
- type: 'tabs',
381
- tabs: tailwindSelectorVariants.map((bp) => {
382
- return {
383
- label: bp.label,
384
- fields: [
385
- {
386
- type: 'row',
387
- fields: [
388
- tailwindField('boxShadow', bp.value),
389
- //tailwindField('dropShadow', bp.value),
390
- ],
391
- },
392
- ],
393
- }
394
- }),
395
- },
396
- ],
397
- },
398
- {
399
- label: 'Effects',
400
- fields: [
401
- {
402
- type: 'tabs',
403
- tabs: tailwindSelectorVariants.map((bp) => {
404
- return {
405
- label: bp.label,
406
- fields: [
407
- {
408
- type: 'row',
409
- fields: [
410
- // opacity & blending
411
- tailwindField('opacity', bp.value),
412
- tailwindField('mixBlendMode', bp.value),
413
- //tailwindField('backgroundBlendMode', bp.value),
414
-
415
- // filters
416
- //tailwindField('blur', bp.value),
417
- //tailwindField('brightness', bp.value),
418
- //tailwindField('contrast', bp.value),
419
- //tailwindField('grayscale', bp.value),
420
- //tailwindField('hueRotate', bp.value),
421
- //tailwindField('invert', bp.value),
422
- //tailwindField('saturate', bp.value),
423
- //tailwindField('sepia', bp.value),
424
-
425
- // backdrop filters
426
- tailwindField('backdropBlur', bp.value),
427
- tailwindField('backdropBrightness', bp.value),
428
- tailwindField('backdropContrast', bp.value),
429
- tailwindField('backdropGrayscale', bp.value),
430
- tailwindField('backdropHueRotate', bp.value),
431
- tailwindField('backdropInvert', bp.value),
432
- tailwindField('backdropOpacity', bp.value),
433
- tailwindField('backdropSaturate', bp.value),
434
- tailwindField('backdropSepia', bp.value),
435
- ],
436
- },
437
- ],
438
- }
439
- }),
440
- },
441
- ],
442
- },
443
- {
444
- label: 'Transform',
445
- fields: [
446
- {
447
- type: 'tabs',
448
- tabs: tailwindSelectorVariants.map((bp) => {
449
- return {
450
- label: bp.label,
451
- fields: [
452
- {
453
- type: 'row',
454
- fields: [
455
- tailwindField('scale', bp.value),
456
- // #TODO ADD
457
- //tailwindField('scaleX', bp.value),
458
- //tailwindField('scaleY', bp.value),
459
-
460
- tailwindField('rotate', bp.value),
461
-
462
- //tailwindField('translateX', bp.value),
463
- //tailwindField('translateY', bp.value),
464
-
465
- //tailwindField('skewX', bp.value),
466
- //tailwindField('skewY', bp.value),
467
-
468
- tailwindField('transformOrigin', bp.value),
469
- ],
470
- },
471
- ],
472
- }
473
- }),
474
- },
475
- ],
476
- },
477
- {
478
- label: 'Animation',
479
- fields: [
480
- {
481
- type: 'tabs',
482
- tabs: tailwindSelectorVariants.map((bp) => {
483
- return {
484
- label: bp.label,
485
- fields: [
486
- {
487
- type: 'row',
488
- fields: [
489
- // transition
490
- tailwindField('transitionProperty', bp.value),
491
- tailwindField('transitionDuration', bp.value),
492
- tailwindField('transitionTimingFunction', bp.value),
493
- tailwindField('transitionDelay', bp.value),
494
-
495
- // animation
496
- tailwindField('animation', bp.value),
497
- ],
498
- },
499
- ],
500
- }
501
- }),
502
- },
503
- ],
504
- },
505
- {
506
- label: 'Interaction',
507
- fields: [
508
- {
509
- type: 'tabs',
510
- tabs: tailwindSelectorVariants.map((bp) => {
511
- return {
512
- label: bp.label,
513
- fields: [
514
- {
515
- type: 'row',
516
- fields: [
517
- tailwindField('cursor', bp.value),
518
- tailwindField('pointerEvents', bp.value),
519
- tailwindField('userSelect', bp.value),
520
-
521
- tailwindField('resize', bp.value),
522
-
523
- tailwindField('scrollBehavior', bp.value),
524
- tailwindField('scrollMargin', bp.value),
525
- tailwindField('scrollPadding', bp.value),
526
- tailwindField('scrollSnapType', bp.value),
527
- tailwindField('scrollSnapAlign', bp.value),
528
- tailwindField('scrollSnapStop', bp.value),
529
- ],
530
- },
531
- ],
532
- }
533
- }),
534
- },
535
- ],
536
- },
537
- ]
538
- : [],
539
- */
540
- },
541
- ],
542
- };
543
- };
@@ -1,4 +0,0 @@
1
- export declare function resolveInlineComponent(block: any): {
2
- Component: any;
3
- props: any;
4
- } | null;
@@ -1,35 +0,0 @@
1
- // uims/resolveInlineComponent.ts
2
- import { componentRegistry } from '../../react';
3
- export function resolveInlineComponent(block) {
4
- const { definition, viewMode } = block;
5
- if (!definition)
6
- return null;
7
- const Component = componentRegistry[definition.componentName];
8
- if (!Component)
9
- return null;
10
- /* Caso CTA (inline typed) */
11
- if (block.blockType === 'cta-block') {
12
- return {
13
- Component,
14
- props: {
15
- title: block.title,
16
- description: block.description,
17
- action: block.actionLabel
18
- ? {
19
- label: block.actionLabel,
20
- href: block.actionHref,
21
- }
22
- : undefined,
23
- className: viewMode?.css.className ?? definition.defaultStyle,
24
- },
25
- };
26
- }
27
- /* Caso component-instance generico */
28
- return {
29
- Component,
30
- props: {
31
- ...(block.props ?? {}),
32
- className: viewMode?.css.className ?? definition.defaultStyle,
33
- },
34
- };
35
- }
@@ -1,4 +0,0 @@
1
- export declare function resolveViewRow({ item, rowComponent, rowViewMode, rowPropsMapping }: any): {
2
- Row: any;
3
- props: Record<string, any>;
4
- } | null;