@zohodesk/components 1.0.0-temp-129 → 1.0.0-temp-130

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.
@@ -1,308 +0,0 @@
1
- .cover {
2
- height: 100%;
3
- width: 100%;
4
- }
5
-
6
- /* Container Props */
7
-
8
- .grid {
9
- display: grid;
10
- }
11
-
12
- .inlineGrid {
13
- display: inline-grid;
14
- }
15
-
16
- .row {
17
- grid-auto-flow: row;
18
- }
19
-
20
- .column {
21
- grid-auto-flow: column;
22
- }
23
-
24
- .dense {
25
- grid-auto-flow: dense;
26
- }
27
-
28
- .rowDense {
29
- grid-auto-flow: row dense;
30
- }
31
-
32
- .colDense {
33
- grid-auto-flow: column dense;
34
- }
35
-
36
- /* align-items props start */
37
-
38
- .alignItems_start {
39
- align-items: start;
40
- }
41
-
42
- .alignItems_end {
43
- align-items: end;
44
- }
45
-
46
- .alignItems_center {
47
- align-items: center;
48
- }
49
-
50
- .alignItems_stretch {
51
- align-items: stretch;
52
- }
53
-
54
- .alignItems_baseline {
55
- align-items: baseline;
56
- }
57
-
58
- /* align-items props end */
59
-
60
- /* align-self props start */
61
-
62
- .alignSelf_start {
63
- align-self: start;
64
- }
65
-
66
- .alignSelf_end {
67
- align-self: end;
68
- }
69
-
70
- .alignSelf_center {
71
- align-self: center;
72
- }
73
-
74
- .alignSelf_stretch {
75
- align-self: stretch;
76
- }
77
-
78
- .alignSelf_baseline {
79
- align-self: baseline;
80
- }
81
-
82
- /* align-self props End */
83
-
84
- /* align-content props start*/
85
-
86
- .alignContent_start {
87
- align-content: start;
88
- }
89
-
90
- .alignContent_end {
91
- align-content: end;
92
- }
93
-
94
- .alignContent_center {
95
- align-content: center;
96
- }
97
-
98
- .alignContent_stretch {
99
- align-content: stretch;
100
- }
101
-
102
- .alignContent_baseline {
103
- align-content: baseline;
104
- }
105
-
106
- .alignContent_spaceBetween {
107
- align-content: space-between;
108
- }
109
-
110
- .alignContent_spaceAround {
111
- align-content: space-around;
112
- }
113
-
114
- .alignContent_spaceEvenly {
115
- align-content: space-evenly;
116
- }
117
-
118
- /* align-content props end*/
119
-
120
-
121
- /* justify-items props start */
122
-
123
- .justifyItems_start {
124
- justify-items: start;
125
- }
126
-
127
- .justifyItems_end {
128
- justify-items: end;
129
- }
130
-
131
- .justifyItems_center {
132
- justify-items: center;
133
- }
134
-
135
- .justifyItems_stretch {
136
- justify-items: stretch;
137
- }
138
-
139
- .justifyItems_baseline {
140
- justify-items: baseline;
141
- }
142
-
143
- /* justify-items props end */
144
-
145
- /* justify-self props start */
146
-
147
- .justifySelf_start {
148
- justify-self: start;
149
- }
150
-
151
- .justifySelf_end {
152
- justify-self: end;
153
- }
154
-
155
- .justifySelf_center {
156
- justify-self: center;
157
- }
158
-
159
- .justifySelf_stretch {
160
- justify-self: stretch;
161
- }
162
-
163
- .justifySelf_baseline {
164
- justify-self: baseline;
165
- }
166
-
167
- /* justify-self props end */
168
-
169
- /* justify-content props start */
170
-
171
- .justifyContent_start {
172
- justify-content: start;
173
- }
174
-
175
- .justifyContent_end {
176
- justify-content: end;
177
- }
178
-
179
- .justifyContent_center {
180
- justify-content: center;
181
- }
182
-
183
- .justifyContent_stretch {
184
- justify-content: stretch;
185
- }
186
-
187
- .justifyContent_spaceBetween {
188
- justify-content: space-between;
189
- }
190
-
191
- .justifyContent_spaceAround {
192
- justify-content: space-around;
193
- }
194
-
195
- .justifyContent_spaceEvenly {
196
- justify-content: space-evenly;
197
- }
198
-
199
- /* justify-content props end */
200
-
201
- .scroll_y {
202
- overflow-y: auto;
203
- overflow-x: hidden;
204
- }
205
-
206
- .scroll_x {
207
- overflow-x: auto;
208
- overflow-y: hidden;
209
- }
210
-
211
- .scroll_none {
212
- overflow: hidden;
213
- }
214
-
215
- .scroll_both {
216
- overflow: auto;
217
- }
218
-
219
- /* Custom Grid Classes */
220
- .layout {
221
- grid-template-columns: repeat(var(--zdg_base_columns, 12), 1fr);
222
- grid-template-rows: repeat(var(--zdg_base_rows, 1), 1fr);
223
- gap: var(--zd_layout_gap, var(--zd_size15));
224
- }
225
-
226
- .layout_areas {
227
- grid-template-areas: var(--zdg_layout_areas, "content");
228
- gap: var(--zd_layout_gap, var(--zd_size15));
229
- }
230
-
231
- .auto_repeat {
232
- grid-template-columns: repeat(var(--zdg_auto_repeat, auto-fit), minmax(var(--zdg_auto_repeat_min, 0), var(--zdg_auto_repeat_max, 1fr)));
233
- /* grid-template-columns: repeat(var(--zdg_auto_grid_placement, auto-fill), minmax(var(--zdg_auto_grid_min_item_size, 16rem), 1fr)); */
234
- }
235
-
236
- .auto_repeat_fixed {
237
- grid-template-columns: repeat(var(--zdg_auto_repeat, auto-fit), var(--zdg_auto_repeat_val, 1fr));
238
- }
239
-
240
- .custom_columns {
241
- grid-template-columns: var(--zdg_custom_columns, 1fr);
242
- }
243
-
244
- .custom_rows {
245
- grid-template-rows: var(--zdg_custom_rows, auto);
246
- }
247
-
248
- .auto_columns {
249
- grid-auto-columns: var(--zdg_auto_columns, auto);
250
- }
251
-
252
- .auto_rows {
253
- grid-auto-rows: var(--zdg_auto_rows, auto);
254
- }
255
-
256
-
257
- /* Custom Grid Item Classes */
258
- .item_area {
259
- grid-area: var(--zdg_item_area, content);
260
- }
261
-
262
- .item_col_span1 {
263
- grid-column: auto/span 1
264
- }
265
-
266
- .item_col_span2 {
267
- grid-column: auto/span 2;
268
- }
269
-
270
- .item_col_span3 {
271
- grid-column: auto/span 3
272
- }
273
-
274
- .item_col_span4 {
275
- grid-column: auto/span 4
276
- }
277
-
278
- .item_col_span5 {
279
- grid-column: auto/span 5
280
- }
281
-
282
- .item_col_span6 {
283
- grid-column: auto/span 6
284
- }
285
-
286
- .item_col_span7 {
287
- grid-column: auto/span 7
288
- }
289
-
290
- .item_col_span8 {
291
- grid-column: auto/span 8
292
- }
293
-
294
- .item_col_span9 {
295
- grid-column: auto/span 9
296
- }
297
-
298
- .item_col_span10 {
299
- grid-column: auto/span 10
300
- }
301
-
302
- .item_col_span11 {
303
- grid-column: auto/span 11
304
- }
305
-
306
- .item_col_span12 {
307
- grid-column: auto/span 12
308
- }
@@ -1,45 +0,0 @@
1
- import { compileClassNames } from '@zohodesk/utils';
2
- import propConstants from '../props/propConstants';
3
- /**
4
- * container classname based on js state
5
- * @param {object} props flex props
6
- * @param {object} flex style object
7
- * @returns {string} classnames string with space separate
8
- */
9
- export default function (props, newStyle) {
10
- const {
11
- display,
12
- flow,
13
- alignItems,
14
- alignSelf,
15
- alignContent,
16
- justifyItems,
17
- justifySelf,
18
- justifyContent,
19
- overFlowScroll,
20
- isCover,
21
- className
22
- } = props;
23
- const alignItemsClassname = `alignItems_${alignItems}`;
24
- const alignSelfClassname = `alignSelf_${alignSelf}`;
25
- const alignContentClassname = `alignContent_${alignContent}`;
26
- const justifyItemsClassname = `justifyItems_${justifyItems}`;
27
- const justifySelfClassname = `justifySelf_${justifySelf}`;
28
- const justifyContentClassname = `justifyContent_${justifyContent}`;
29
- const overFlow = `scroll_${overFlowScroll}`;
30
- return compileClassNames({
31
- [newStyle.base]: true,
32
- [newStyle.grid]: display === propConstants.display.grid,
33
- [newStyle.inlineGrid]: display === propConstants.display.inline,
34
- [newStyle[flow]]: flow && display,
35
- [newStyle[alignItemsClassname]]: alignItems && display,
36
- [newStyle[justifyItemsClassname]]: justifyItems && display,
37
- [newStyle[alignContentClassname]]: alignContent && display,
38
- [newStyle[justifyContentClassname]]: justifyContent && display,
39
- [newStyle[alignSelfClassname]]: alignSelf,
40
- [newStyle[justifySelfClassname]]: justifySelf,
41
- [newStyle[overFlow]]: overFlowScroll,
42
- [newStyle.cover]: isCover,
43
- [className]: className
44
- });
45
- }
@@ -1,4 +0,0 @@
1
- export { default } from './Grid';
2
- // hooks and accessibility based on proptypes
3
- export { default as GridPropTypes } from './props/propTypes';
4
- export { default as GridPropConstants } from './props/propConstants';
@@ -1,7 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import generalAriaProps from '@zohodesk/utils/es/props/generalAriaProps';
3
- export default {
4
- a11y: PropTypes.shape({
5
- ...generalAriaProps
6
- })
7
- };
@@ -1,7 +0,0 @@
1
- export default {
2
- tagName: 'div',
3
- isCover: false,
4
- customStyle: {},
5
- tagAttributes: {},
6
- tagGeneralAttributes: {}
7
- };
@@ -1,66 +0,0 @@
1
- export default {
2
- display: {
3
- inline: "inline",
4
- grid: "grid"
5
- },
6
- flow: {
7
- row: "row",
8
- column: "column",
9
- dense: "dense",
10
- rowDense: "rowDense",
11
- colDense: "colDense"
12
- },
13
- alignItems: {
14
- start: "start",
15
- end: "end",
16
- center: "center",
17
- stretch: "stretch",
18
- baseline: "baseline"
19
- },
20
- alignSelf: {
21
- start: "start",
22
- end: "end",
23
- center: "center",
24
- stretch: "stretch",
25
- baseline: "baseline"
26
- },
27
- alignContent: {
28
- start: "start",
29
- end: "end",
30
- center: "center",
31
- stretch: "stretch",
32
- baseline: "baseline",
33
- spaceBetween: "spaceBetween",
34
- spaceAround: "spaceAround",
35
- spaceEvenly: "spaceEvenly"
36
- },
37
- justifyItems: {
38
- start: "start",
39
- end: "end",
40
- center: "center",
41
- stretch: "stretch",
42
- baseline: "baseline"
43
- },
44
- justifySelf: {
45
- start: "start",
46
- end: "end",
47
- center: "center",
48
- stretch: "stretch",
49
- baseline: "baseline"
50
- },
51
- justifyContent: {
52
- start: "start",
53
- end: "end",
54
- center: "center",
55
- stretch: "stretch",
56
- spaceBetween: "spaceBetween",
57
- spaceAround: "spaceAround",
58
- spaceEvenly: "spaceEvenly"
59
- },
60
- scroll: {
61
- x: "x",
62
- y: "y",
63
- both: "both",
64
- none: "none"
65
- }
66
- };
@@ -1,27 +0,0 @@
1
- import PropTypes from 'prop-types';
2
- import automationProps from '@zohodesk/utils/es/props/automationProps';
3
- import customStyleProps from '@zohodesk/utils/es/props/customStyleProps';
4
- import tagAttributeProps from '@zohodesk/utils/es/props/tagAttributeProps';
5
- import tagGeneralAttributeProps from '@zohodesk/utils/es/props/tagGeneralAttributeProps';
6
- import propConstants from './propConstants';
7
- import ariaPropTypes from './ariaPropTypes';
8
- export default {
9
- tagName: PropTypes.string,
10
- isCover: PropTypes.bool,
11
- alignItems: PropTypes.oneOf(Object.values(propConstants.alignItems)),
12
- alignSelf: PropTypes.oneOf(Object.values(propConstants.alignSelf)),
13
- alignContent: PropTypes.oneOf(Object.values(propConstants.alignContent)),
14
- justifyItems: PropTypes.oneOf(Object.values(propConstants.justifyItems)),
15
- justifySelf: PropTypes.oneOf(Object.values(propConstants.justifySelf)),
16
- justifyContent: PropTypes.oneOf(Object.values(propConstants.justifyContent)),
17
- flow: PropTypes.oneOf(Object.values(propConstants.flow)),
18
- overFlowScroll: PropTypes.oneOf(Object.values(propConstants.scroll)),
19
- display: PropTypes.oneOf(Object.values(propConstants.display)),
20
- children: PropTypes.node,
21
- className: PropTypes.string,
22
- ...automationProps,
23
- ...ariaPropTypes,
24
- ...customStyleProps,
25
- ...tagAttributeProps,
26
- ...tagGeneralAttributeProps
27
- };
@@ -1,48 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _useMergeStyle = _interopRequireDefault(require("@zohodesk/hooks/es/utils/useMergeStyle"));
9
- var _defaultProps = _interopRequireDefault(require("./props/defaultProps"));
10
- var _propTypes = _interopRequireDefault(require("./props/propTypes"));
11
- var _propConstants = _interopRequireDefault(require("./props/propConstants"));
12
- var _cssJSLogic = _interopRequireDefault(require("./css/cssJSLogic"));
13
- var _GridModule = _interopRequireDefault(require("./css/Grid.module.css"));
14
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
16
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
- var additionStyle = ['base'];
19
- var Grid = /*#__PURE__*/_react["default"].forwardRef(function (props, ref) {
20
- var tagName = props.tagName,
21
- customStyle = props.customStyle,
22
- customId = props.customId,
23
- tagAttributes = props.tagAttributes,
24
- tagGeneralAttributes = props.tagGeneralAttributes,
25
- children = props.children,
26
- a11y = props.a11y;
27
- // external customization - need memorize?
28
- var newStyle = (0, _useMergeStyle["default"])(_GridModule["default"], customStyle, additionStyle);
29
- // css classname added based on logic
30
- var className = (0, _cssJSLogic["default"])(props, newStyle);
31
- return /*#__PURE__*/_react["default"].createElement(tagName, _objectSpread(_objectSpread(_objectSpread({}, tagGeneralAttributes), {}, {
32
- 'data-id': customId,
33
- className: className,
34
- ref: ref
35
- }, tagAttributes), a11y), children);
36
- });
37
- Grid.displayName = 'Grid';
38
- Grid.defaultProps = _defaultProps["default"];
39
- Grid.propTypes = _propTypes["default"];
40
- Grid.constantProps = _propConstants["default"];
41
- var _default = Grid;
42
- exports["default"] = _default;
43
- Grid.docs = {
44
- componentGroup: 'Grid',
45
- folderName: 'Style Guide',
46
- description: ' ',
47
- external: false
48
- };