@spaced-out/ui-design-system 0.0.39 → 0.0.41

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.
@@ -5,6 +5,7 @@ CODEOWNERS
5
5
  commitlint
6
6
  contributorsrc
7
7
  Crespo
8
+ datetime
8
9
  DEFAULTTEXT
9
10
  dismissable
10
11
  eqeqeq
package/CHANGELOG.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.0.41](https://github.com/spaced-out/ui-design-system/compare/v0.0.40...v0.0.41) (2023-03-07)
6
+
7
+
8
+ ### Features
9
+
10
+ * text highlighting ([b33fbdd](https://github.com/spaced-out/ui-design-system/commit/b33fbddbb1ac4a5dd00b19061568a6d20105e228))
11
+
12
+ ### [0.0.40](https://github.com/spaced-out/ui-design-system/compare/v0.0.39...v0.0.40) (2023-03-06)
13
+
14
+
15
+ ### Features
16
+
17
+ * base color swatches story with tertiary colors ([06ba3ef](https://github.com/spaced-out/ui-design-system/commit/06ba3efb8cb04513ae3e4f996bfca4801a102ef8))
18
+ * navite color and date pickers ([4924edc](https://github.com/spaced-out/ui-design-system/commit/4924edccb91ff0616c3ed644491221d29c0c70a8))
19
+
20
+
21
+ ### Bug Fixes
22
+
23
+ * added static images as personas ([a42bbd2](https://github.com/spaced-out/ui-design-system/commit/a42bbd2c9cf1a9390ab839bd8f489d3be63883e8))
24
+
5
25
  ### [0.0.39](https://github.com/spaced-out/ui-design-system/compare/v0.0.38...v0.0.39) (2023-03-03)
6
26
 
7
27
 
@@ -251,6 +251,134 @@
251
251
  "value": "#5f0c20"
252
252
  }
253
253
  },
254
+ "yellow": {
255
+ "50": {
256
+ "value": "#FCF8E7"
257
+ },
258
+ "100": {
259
+ "value": "#F5EBB4"
260
+ },
261
+ "200": {
262
+ "value": "#F0E190"
263
+ },
264
+ "300": {
265
+ "value": "#EAD35D"
266
+ },
267
+ "400": {
268
+ "value": "#E5CA3D"
269
+ },
270
+ "500": {
271
+ "value": "#DFBD0D"
272
+ },
273
+ "600": {
274
+ "value": "#CBAC0C"
275
+ },
276
+ "700": {
277
+ "value": "#9E8609"
278
+ },
279
+ "800": {
280
+ "value": "#7B6807"
281
+ },
282
+ "900": {
283
+ "value": "#5E4F05"
284
+ }
285
+ },
286
+ "teal": {
287
+ "50": {
288
+ "value": "#E6FAF6"
289
+ },
290
+ "100": {
291
+ "value": "#B0F0E3"
292
+ },
293
+ "200": {
294
+ "value": "#8AE9D6"
295
+ },
296
+ "300": {
297
+ "value": "#54E0C3"
298
+ },
299
+ "400": {
300
+ "value": "#33D9B8"
301
+ },
302
+ "500": {
303
+ "value": "#00D0A6"
304
+ },
305
+ "600": {
306
+ "value": "#00BD97"
307
+ },
308
+ "700": {
309
+ "value": "#009476"
310
+ },
311
+ "800": {
312
+ "value": "#00725B"
313
+ },
314
+ "900": {
315
+ "value": "#005746"
316
+ }
317
+ },
318
+ "violet": {
319
+ "50": {
320
+ "value": "#F7E9FB"
321
+ },
322
+ "100": {
323
+ "value": "#E7BCF2"
324
+ },
325
+ "200": {
326
+ "value": "#DC9CEB"
327
+ },
328
+ "300": {
329
+ "value": "#CC6EE2"
330
+ },
331
+ "400": {
332
+ "value": "#C252DD"
333
+ },
334
+ "500": {
335
+ "value": "#B327D4"
336
+ },
337
+ "600": {
338
+ "value": "#A323C1"
339
+ },
340
+ "700": {
341
+ "value": "#7F1C97"
342
+ },
343
+ "800": {
344
+ "value": "#621575"
345
+ },
346
+ "900": {
347
+ "value": "#4B1059"
348
+ }
349
+ },
350
+ "pink": {
351
+ "50": {
352
+ "value": "#FCE8F5"
353
+ },
354
+ "100": {
355
+ "value": "#F5B8E1"
356
+ },
357
+ "200": {
358
+ "value": "#F196D2"
359
+ },
360
+ "300": {
361
+ "value": "#EA66BD"
362
+ },
363
+ "400": {
364
+ "value": "#E648B1"
365
+ },
366
+ "500": {
367
+ "value": "#E01A9D"
368
+ },
369
+ "600": {
370
+ "value": "#CC188F"
371
+ },
372
+ "700": {
373
+ "value": "#9F126F"
374
+ },
375
+ "800": {
376
+ "value": "#7B0E56"
377
+ },
378
+ "900": {
379
+ "value": "#5E0B42"
380
+ }
381
+ },
254
382
  "white": {
255
383
  "100": {
256
384
  "value": "#ffffff"
@@ -60,6 +60,9 @@
60
60
  "60": {
61
61
  "value": "60px"
62
62
  },
63
+ "90": {
64
+ "value": "90px"
65
+ },
63
66
  "100": {
64
67
  "value": "100px"
65
68
  },
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Input = void 0;
6
+ exports.Input = exports.INPUT_TYPES = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = require("../../utils/classify");
9
9
  var _Icon = require("../Icon");
@@ -13,6 +13,22 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13
13
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
15
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
16
+ const INPUT_TYPES = Object.freeze({
17
+ text: 'text',
18
+ number: 'number',
19
+ password: 'password',
20
+ email: 'email',
21
+ tel: 'tel',
22
+ url: 'url',
23
+ date: 'date',
24
+ 'datetime-local': 'datetime-local',
25
+ time: 'time',
26
+ week: 'week',
27
+ month: 'month',
28
+ color: 'color',
29
+ search: 'search'
30
+ });
31
+ exports.INPUT_TYPES = INPUT_TYPES;
16
32
  const Input_ = (props, ref) => {
17
33
  const {
18
34
  value,
@@ -91,7 +107,11 @@ const Input_ = (props, ref) => {
91
107
  onBlur: onBlur,
92
108
  type: showPassword ? 'text' : type,
93
109
  readOnly: readOnly && 'readOnly'
94
- }, inputProps)), /*#__PURE__*/React.createElement(RightInputIcon, {
110
+ }, inputProps)), type === 'color' && /*#__PURE__*/React.createElement("div", {
111
+ className: (0, _classify.classify)(_InputModule.default.colorText, _InputModule.default[size], {
112
+ [_InputModule.default.hasValue]: value
113
+ })
114
+ }, value ? value : placeholder), /*#__PURE__*/React.createElement(RightInputIcon, {
95
115
  isEmail: type === 'email',
96
116
  isPassword: type === 'password',
97
117
  showPassword: showPassword,
@@ -15,6 +15,24 @@ type ClassNames = $ReadOnly<{
15
15
  iconRight?: string,
16
16
  }>;
17
17
 
18
+ export const INPUT_TYPES = Object.freeze({
19
+ text: 'text',
20
+ number: 'number',
21
+ password: 'password',
22
+ email: 'email',
23
+ tel: 'tel',
24
+ url: 'url',
25
+ date: 'date',
26
+ 'datetime-local': 'datetime-local',
27
+ time: 'time',
28
+ week: 'week',
29
+ month: 'month',
30
+ color: 'color',
31
+ search: 'search',
32
+ });
33
+
34
+ export type InputType = $Values<typeof INPUT_TYPES>;
35
+
18
36
  export type InputProps = {
19
37
  value?: string,
20
38
  onChange?: (
@@ -36,7 +54,7 @@ export type InputProps = {
36
54
  errorText?: string,
37
55
  label?: string | React.Node,
38
56
  helperText?: string | React.Node,
39
- type?: 'text' | 'number' | 'password' | 'email' | 'tel' | 'url',
57
+ type?: InputType,
40
58
  size?: 'medium' | 'small',
41
59
  iconLeftName?: string,
42
60
  iconLeftType?: IconType,
@@ -45,6 +63,15 @@ export type InputProps = {
45
63
  required?: boolean,
46
64
  readOnly?: boolean,
47
65
  boxRef?: (?HTMLElement) => mixed,
66
+ minLength?: string,
67
+ maxLength?: string,
68
+ pattern?: string,
69
+ min?: string,
70
+ max?: string,
71
+ /** The step attribute is a number that specifies the granularity that the value must adhere to, or the special value any.
72
+ * Only values which are equal to the basis for stepping (min if specified, value otherwise, and an
73
+ * appropriate default value if neither of those is provided) are valid. */
74
+ step?: string,
48
75
  };
49
76
 
50
77
  const Input_ = (props: InputProps, ref): React.Node => {
@@ -140,6 +167,15 @@ const Input_ = (props: InputProps, ref): React.Node => {
140
167
  readOnly={readOnly && 'readOnly'}
141
168
  {...inputProps}
142
169
  />
170
+ {type === 'color' && (
171
+ <div
172
+ className={classify(css.colorText, css[size], {
173
+ [css.hasValue]: value,
174
+ })}
175
+ >
176
+ {value ? value : placeholder}
177
+ </div>
178
+ )}
143
179
  <RightInputIcon
144
180
  isEmail={type === 'email'}
145
181
  isPassword={type === 'password'}
@@ -1,5 +1,6 @@
1
1
  @value (
2
2
  size42,
3
+ size30,
3
4
  size34,
4
5
  sizeFluid
5
6
  ) from '../../styles/variables/_size.css';
@@ -16,7 +17,8 @@
16
17
  borderRadiusSmall,
17
18
  borderWidthSecondary,
18
19
  borderWidthTertiary,
19
- borderWidthNone
20
+ borderWidthNone,
21
+ borderRadiusXSmall
20
22
  ) from '../../styles/variables/_border.css';
21
23
 
22
24
  @value (
@@ -56,6 +58,15 @@
56
58
  border-radius: borderRadiusMedium;
57
59
  }
58
60
 
61
+ .colorText {
62
+ composes: formInputMedium from '../../styles/typography.module.css';
63
+ color: colorTextSecondary;
64
+ }
65
+
66
+ .hasValue {
67
+ color: colorTextPrimary;
68
+ }
69
+
59
70
  .small {
60
71
  composes: formInputSmall from '../../styles/typography.module.css';
61
72
  height: size34;
@@ -120,3 +131,18 @@ input::placeholder {
120
131
  .rightClickableIcon.disabled {
121
132
  pointer-events: none;
122
133
  }
134
+
135
+ .box > input[type='color'] {
136
+ display: flex;
137
+ cursor: pointer;
138
+ align-items: center;
139
+ width: fit-content;
140
+ gap: spaceXSmall;
141
+ }
142
+
143
+ .box > input[type='color']::-webkit-color-swatch {
144
+ border: none;
145
+ min-width: size30;
146
+ max-width: size30;
147
+ border-radius: borderRadiusXSmall;
148
+ }
@@ -3,10 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- Object.defineProperty(exports, "Input", {
7
- enumerable: true,
8
- get: function () {
9
- return _Input.Input;
10
- }
11
- });
12
- var _Input = require("./Input");
6
+ var _Input = require("./Input");
7
+ Object.keys(_Input).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Input[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _Input[key];
14
+ }
15
+ });
16
+ });
@@ -1,4 +1,3 @@
1
1
  // @flow strict
2
2
 
3
- export type {InputProps} from './Input';
4
- export {Input} from './Input';
3
+ export * from './Input';
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.Menu = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
8
  var _classify = require("../../utils/classify");
9
- var _MenuOptionButton = require("./MenuOptionButton.js");
9
+ var _MenuOptionButton = require("./MenuOptionButton");
10
10
  var _MenuModule = _interopRequireDefault(require("./Menu.module.css"));
11
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -2,9 +2,9 @@
2
2
  import * as React from 'react';
3
3
 
4
4
  import {classify} from '../../utils/classify';
5
- import type {IconType} from '../Icon/Icon.js';
5
+ import type {IconType} from '../Icon/Icon';
6
6
 
7
- import {MenuOptionButton} from './MenuOptionButton.js';
7
+ import {MenuOptionButton} from './MenuOptionButton';
8
8
 
9
9
  import css from './Menu.module.css';
10
10
 
@@ -6,7 +6,7 @@ import {UnstyledButton} from '../Button';
6
6
  import {Icon} from '../Icon';
7
7
  import {Truncate} from '../Truncate';
8
8
 
9
- import type {MenuOption} from './Menu.js';
9
+ import type {MenuOption} from './Menu';
10
10
 
11
11
  import css from './Menu.module.css';
12
12
 
@@ -16,4 +16,4 @@ Object.defineProperty(exports, "MenuOptionButton", {
16
16
  }
17
17
  });
18
18
  var _Menu = require("./Menu");
19
- var _MenuOptionButton = require("./MenuOptionButton.js");
19
+ var _MenuOptionButton = require("./MenuOptionButton");
@@ -2,4 +2,4 @@
2
2
 
3
3
  export type {MenuOption, MenuProps} from './Menu';
4
4
  export {Menu} from './Menu';
5
- export {MenuOptionButton} from './MenuOptionButton.js';
5
+ export {MenuOptionButton} from './MenuOptionButton';
@@ -8,7 +8,7 @@ var React = _interopRequireWildcard(require("react"));
8
8
  var _size = require("../../../styles/variables/_size");
9
9
  var _space = require("../../../styles/variables/_space");
10
10
  var _classify = require("../../../utils/classify");
11
- var _TabDropdown = require("./TabDropdown.js");
11
+ var _TabDropdown = require("./TabDropdown");
12
12
  var _TabListModule = _interopRequireDefault(require("./TabList.module.css"));
13
13
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -6,7 +6,7 @@ import {size36, size100} from '../../../styles/variables/_size';
6
6
  import {spaceMedium} from '../../../styles/variables/_space';
7
7
  import {classify} from '../../../utils/classify';
8
8
 
9
- import {TabDropdown} from './TabDropdown.js';
9
+ import {TabDropdown} from './TabDropdown';
10
10
 
11
11
  import css from './TabList.module.css';
12
12