@woodylab/payload 0.0.111 → 0.0.113

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 (32) hide show
  1. package/dist/config/fieldCss.js +34 -3
  2. package/dist/config/fields/fieldAlignContent.d.ts +2 -0
  3. package/dist/config/fields/fieldAlignContent.js +20 -0
  4. package/dist/config/fields/fieldAlignItems.d.ts +2 -0
  5. package/dist/config/fields/fieldAlignItems.js +19 -0
  6. package/dist/config/fields/fieldFlexBasis.d.ts +2 -0
  7. package/dist/config/fields/fieldFlexBasis.js +19 -0
  8. package/dist/config/fields/fieldFlexDirection.d.ts +2 -0
  9. package/dist/config/fields/fieldFlexDirection.js +18 -0
  10. package/dist/config/fields/fieldFlexGap.d.ts +2 -0
  11. package/dist/config/fields/fieldFlexGap.js +22 -0
  12. package/dist/config/fields/fieldFlexGrow.d.ts +2 -0
  13. package/dist/config/fields/fieldFlexGrow.js +16 -0
  14. package/dist/config/fields/fieldFlexShrink.d.ts +2 -0
  15. package/dist/config/fields/fieldFlexShrink.js +16 -0
  16. package/dist/config/fields/fieldFlexWrap.d.ts +2 -0
  17. package/dist/config/fields/fieldFlexWrap.js +17 -0
  18. package/dist/config/fields/fieldHeight.js +1 -1
  19. package/dist/config/fields/fieldJustifyContent.d.ts +2 -0
  20. package/dist/config/fields/fieldJustifyContent.js +20 -0
  21. package/dist/config/fields/fieldMaxHeight.js +1 -1
  22. package/dist/config/fields/fieldMaxWidth.js +1 -1
  23. package/dist/config/fields/fieldMinHeight.js +1 -1
  24. package/dist/config/fields/fieldMinWidth.js +1 -1
  25. package/dist/config/fields/fieldOrder.d.ts +2 -0
  26. package/dist/config/fields/fieldOrder.js +21 -0
  27. package/dist/config/fields/fieldWidth.js +1 -1
  28. package/dist/config/index.cjs.js +1 -1
  29. package/dist/config/index.cjs.js.map +1 -1
  30. package/dist/config/index.esm.js +1 -1
  31. package/dist/config/index.esm.js.map +1 -1
  32. package/package.json +1 -1
@@ -12,6 +12,16 @@ import { fieldDisplay } from './fields/fieldDisplay';
12
12
  import { fieldPosition } from './fields/fieldPosition';
13
13
  import { fieldZIndex } from './fields/fieldZIndex';
14
14
  import { fieldIsolation } from './fields/fieldIsolation';
15
+ import { fieldFlexDirection } from './fields/fieldFlexDirection';
16
+ import { fieldFlexWrap } from './fields/fieldFlexWrap';
17
+ import { fieldJustifyContent } from './fields/fieldJustifyContent';
18
+ import { fieldAlignItems } from './fields/fieldAlignItems';
19
+ import { fieldAlignContent } from './fields/fieldAlignContent';
20
+ import { fieldFlexGap } from './fields/fieldFlexGap';
21
+ import { fieldFlexGrow } from './fields/fieldFlexGrow';
22
+ import { fieldFlexShrink } from './fields/fieldFlexShrink';
23
+ import { fieldFlexBasis } from './fields/fieldFlexBasis';
24
+ import { fieldOrder } from './fields/fieldOrder';
15
25
  const concatCssFields = (args) => {
16
26
  const { value, siblingData, operation } = args;
17
27
  if (operation === 'create' || operation === 'update') {
@@ -51,9 +61,9 @@ export const fieldCss = () => {
51
61
  fieldMargins,
52
62
  fieldPaddings,
53
63
  fieldWidth,
54
- fieldHeight,
55
64
  fieldMinWidth,
56
65
  fieldMaxWidth,
66
+ fieldHeight,
57
67
  fieldMinHeight,
58
68
  fieldMaxHeight,
59
69
  fieldAspectRatio,
@@ -63,11 +73,32 @@ export const fieldCss = () => {
63
73
  },
64
74
  {
65
75
  label: 'Layout',
66
- fields: [fieldDisplay, fieldPosition, fieldZIndex, fieldOverflow, fieldIsolation],
76
+ fields: [
77
+ {
78
+ type: 'row',
79
+ fields: [fieldDisplay, fieldPosition, fieldZIndex, fieldOverflow, fieldIsolation],
80
+ },
81
+ ],
67
82
  },
68
83
  {
69
84
  label: 'Flex',
70
- fields: [],
85
+ fields: [
86
+ {
87
+ type: 'row',
88
+ fields: [
89
+ fieldFlexDirection,
90
+ fieldFlexWrap,
91
+ fieldJustifyContent,
92
+ fieldAlignItems,
93
+ fieldAlignContent,
94
+ fieldFlexGap,
95
+ fieldFlexGrow,
96
+ fieldFlexShrink,
97
+ fieldFlexBasis,
98
+ fieldOrder,
99
+ ],
100
+ },
101
+ ],
71
102
  },
72
103
  {
73
104
  label: 'Grid',
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldAlignContent: Field;
@@ -0,0 +1,20 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldAlignContent = {
3
+ name: 'content',
4
+ label: 'Align Content',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'Start', value: 'start' },
11
+ { label: 'Center', value: 'center' },
12
+ { label: 'End', value: 'end' },
13
+ { label: 'Between', value: 'between' },
14
+ { label: 'Around', value: 'around' },
15
+ { label: 'Evenly', value: 'evenly' },
16
+ ],
17
+ hooks: {
18
+ afterRead: [getValueFromClassNameString],
19
+ },
20
+ };
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldAlignItems: Field;
@@ -0,0 +1,19 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldAlignItems = {
3
+ name: 'items',
4
+ label: 'Align Items',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'Start', value: 'start' },
11
+ { label: 'Center', value: 'center' },
12
+ { label: 'End', value: 'end' },
13
+ { label: 'Stretch', value: 'stretch' },
14
+ { label: 'Baseline', value: 'baseline' },
15
+ ],
16
+ hooks: {
17
+ afterRead: [getValueFromClassNameString],
18
+ },
19
+ };
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldFlexBasis: Field;
@@ -0,0 +1,19 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldFlexBasis = {
3
+ name: 'basis',
4
+ label: 'Flex Basis',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'Auto', value: 'auto' },
11
+ { label: 'Full', value: 'full' },
12
+ { label: '1/2', value: '1/2' },
13
+ { label: '1/3', value: '1/3' },
14
+ { label: '1/4', value: '1/4' },
15
+ ],
16
+ hooks: {
17
+ afterRead: [getValueFromClassNameString],
18
+ },
19
+ };
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldFlexDirection: Field;
@@ -0,0 +1,18 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldFlexDirection = {
3
+ name: 'flex',
4
+ label: 'Flex Direction',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'Row', value: 'row' },
11
+ { label: 'Row Reverse', value: 'row-reverse' },
12
+ { label: 'Column', value: 'col' },
13
+ { label: 'Column Reverse', value: 'col-reverse' },
14
+ ],
15
+ hooks: {
16
+ afterRead: [getValueFromClassNameString],
17
+ },
18
+ };
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldFlexGap: Field;
@@ -0,0 +1,22 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldFlexGap = {
3
+ name: 'gap',
4
+ label: 'Gap',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: '0', value: '0' },
11
+ { label: '1', value: '1' },
12
+ { label: '2', value: '2' },
13
+ { label: '3', value: '3' },
14
+ { label: '4', value: '4' },
15
+ { label: '6', value: '6' },
16
+ { label: '8', value: '8' },
17
+ { label: '10', value: '10' },
18
+ ],
19
+ hooks: {
20
+ afterRead: [getValueFromClassNameString],
21
+ },
22
+ };
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldFlexGrow: Field;
@@ -0,0 +1,16 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldFlexGrow = {
3
+ name: 'grow',
4
+ label: 'Flex Grow',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'Grow', value: '1' },
11
+ { label: 'No Grow', value: '0' },
12
+ ],
13
+ hooks: {
14
+ afterRead: [getValueFromClassNameString],
15
+ },
16
+ };
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldFlexShrink: Field;
@@ -0,0 +1,16 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldFlexShrink = {
3
+ name: 'shrink',
4
+ label: 'Flex Shrink',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'Shrink', value: '1' },
11
+ { label: 'No Shrink', value: '0' },
12
+ ],
13
+ hooks: {
14
+ afterRead: [getValueFromClassNameString],
15
+ },
16
+ };
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldFlexWrap: Field;
@@ -0,0 +1,17 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldFlexWrap = {
3
+ name: 'flex-wrap',
4
+ label: 'Flex Wrap',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'No Wrap', value: 'nowrap' },
11
+ { label: 'Wrap', value: 'wrap' },
12
+ { label: 'Wrap Reverse', value: 'wrap-reverse' },
13
+ ],
14
+ hooks: {
15
+ afterRead: [getValueFromClassNameString],
16
+ },
17
+ };
@@ -12,7 +12,7 @@ export const fieldHeight = {
12
12
  options: heightValues,
13
13
  virtual: true,
14
14
  admin: {
15
- width: '25%',
15
+ width: '33%',
16
16
  },
17
17
  hooks: {
18
18
  afterRead: [getValueFromClassNameString],
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldJustifyContent: Field;
@@ -0,0 +1,20 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldJustifyContent = {
3
+ name: 'justify',
4
+ label: 'Justify Content',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'Start', value: 'start' },
11
+ { label: 'Center', value: 'center' },
12
+ { label: 'End', value: 'end' },
13
+ { label: 'Between', value: 'between' },
14
+ { label: 'Around', value: 'around' },
15
+ { label: 'Evenly', value: 'evenly' },
16
+ ],
17
+ hooks: {
18
+ afterRead: [getValueFromClassNameString],
19
+ },
20
+ };
@@ -13,7 +13,7 @@ export const fieldMaxHeight = {
13
13
  options: values,
14
14
  virtual: true,
15
15
  admin: {
16
- width: '25%',
16
+ width: '33%',
17
17
  },
18
18
  hooks: {
19
19
  afterRead: [getValueFromClassNameString],
@@ -13,7 +13,7 @@ export const fieldMaxWidth = {
13
13
  options: values,
14
14
  virtual: true,
15
15
  admin: {
16
- width: '25%',
16
+ width: '33%',
17
17
  },
18
18
  hooks: {
19
19
  afterRead: [getValueFromClassNameString],
@@ -13,7 +13,7 @@ export const fieldMinHeight = {
13
13
  options: values,
14
14
  virtual: true,
15
15
  admin: {
16
- width: '25%',
16
+ width: '33%',
17
17
  },
18
18
  hooks: {
19
19
  afterRead: [getValueFromClassNameString],
@@ -13,7 +13,7 @@ export const fieldMinWidth = {
13
13
  options: values,
14
14
  virtual: true,
15
15
  admin: {
16
- width: '25%',
16
+ width: '33%',
17
17
  },
18
18
  hooks: {
19
19
  afterRead: [getValueFromClassNameString],
@@ -0,0 +1,2 @@
1
+ import type { Field } from 'payload';
2
+ export declare const fieldOrder: Field;
@@ -0,0 +1,21 @@
1
+ import { getValueFromClassNameString } from '../utils/getValueFromClassNameField';
2
+ export const fieldOrder = {
3
+ name: 'order',
4
+ label: 'Order',
5
+ type: 'select',
6
+ virtual: true,
7
+ admin: { width: '25%' },
8
+ options: [
9
+ { label: '—', value: '' },
10
+ { label: 'First', value: 'first' },
11
+ { label: 'Last', value: 'last' },
12
+ { label: 'None', value: 'none' },
13
+ { label: '0', value: '0' },
14
+ { label: '1', value: '1' },
15
+ { label: '2', value: '2' },
16
+ { label: '3', value: '3' },
17
+ ],
18
+ hooks: {
19
+ afterRead: [getValueFromClassNameString],
20
+ },
21
+ };
@@ -15,7 +15,7 @@ export const fieldWidth = {
15
15
  options: widthValues,
16
16
  virtual: true,
17
17
  admin: {
18
- width: '25%',
18
+ width: '33%',
19
19
  },
20
20
  hooks: {
21
21
  afterRead: [getValueFromClassNameString],