@platformatic/ui-components 0.1.131 → 0.1.133

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.
package/dist/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <title>Platformatic UI Components</title>
7
- <script type="module" crossorigin src="/assets/index-e93dce3e.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-a9744c3f.js"></script>
8
8
  <link rel="stylesheet" href="/assets/index-89e9ad97.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@platformatic/ui-components",
3
3
  "description": "Platformatic UI Components",
4
- "version": "0.1.131",
4
+ "version": "0.1.133",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -1,5 +1,5 @@
1
1
  .button {
2
- @apply rounded text-center cursor-pointer font-normal rounded-md border border-solid box-border flex items-center justify-center gap-x-2;
2
+ @apply rounded text-center cursor-pointer font-normal border border-solid box-border flex items-center justify-center gap-x-2;
3
3
  }
4
4
  .fontBold {
5
5
  @apply font-semibold;
@@ -2,7 +2,7 @@
2
2
  import React from 'react'
3
3
  import PropTypes from 'prop-types'
4
4
  import styles from './Checkbox.module.css'
5
- import { MAIN_DARK_BLUE, WHITE } from './constants'
5
+ import { MAIN_DARK_BLUE, RICH_BLACK, WHITE } from './constants'
6
6
  function Checkbox ({ disabled, color, ...rest }) {
7
7
  let className = `${styles.checkbox} `
8
8
  className += styles[`checkbox--${color}`]
@@ -20,7 +20,7 @@ Checkbox.propTypes = {
20
20
  /**
21
21
  * color
22
22
  */
23
- color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE])
23
+ color: PropTypes.oneOf([WHITE, MAIN_DARK_BLUE, RICH_BLACK])
24
24
  }
25
25
 
26
26
  Checkbox.defaultProps = {
@@ -1,26 +1,26 @@
1
1
  .checkbox {
2
- @apply border p-2 rounded-sm relative inline-block h-2 w-2;
2
+ @apply border border-solid p-2 rounded-sm relative inline-block h-2 w-2 m-0;
3
3
  -webkit-appearance: none;
4
4
  }
5
5
 
6
6
  .checkbox--main-dark-blue {
7
7
  @apply border-light-green bg-main-dark-blue
8
8
  }
9
+ .checkbox--main-dark-blue:checked {
10
+ @apply bg-light-green text-main-dark-blue;
11
+ }
9
12
 
10
13
  .checkbox--white {
11
14
  @apply border-main-dark-blue bg-white
12
15
  }
13
-
14
16
  .checkbox--white:checked {
15
17
  @apply bg-main-dark-blue text-white;
16
18
  }
17
19
 
18
- .checkbox--main-dark-blue:checked {
19
- @apply bg-light-green text-main-dark-blue;
20
- }
21
-
22
- .checkbox:checked:after {
23
- @apply absolute top-[-4px] left-[1px] h-full w-full;
20
+ .checkbox--main-dark-blue:checked:after,
21
+ .checkbox--white:checked:after {
22
+ @apply absolute top-[50%] left-[50%] h-full w-full;
23
+ transform: translate(-50%, -50%);
24
24
  content: url('data:image/svg+xml,%3Csvg%20width=%2213%22%20height=%229%22%20viewBox=%220%200%2013%209%22%20fill=%22none%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M1%204L5%208L12%201%22%20stroke=%22white%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E');
25
25
  }
26
26
 
@@ -28,3 +28,15 @@
28
28
  @apply border-white;
29
29
  }
30
30
 
31
+ .checkbox--rich-black {
32
+ @apply border-white bg-rich-black
33
+ }
34
+ .checkbox--rich-black:checked {
35
+ @apply bg-white text-rich-black;
36
+ }
37
+ .checkbox--rich-black:checked:after {
38
+ @apply absolute top-[50%] left-[50%] h-full w-full;
39
+ transform: translate(-50%, -50%);
40
+
41
+ content: url('data:image/svg+xml,%3Csvg%20width=%2213%22%20height=%229%22%20viewBox=%220%200%2013%209%22%20fill=%22none%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cpath%20d=%22M1%204L5%208L12%201%22%20stroke%3D%22%2300050B%22%20stroke-width=%222%22%20stroke-linecap=%22round%22%20stroke-linejoin=%22round%22/%3E%3C/svg%3E');
42
+ }
@@ -1,5 +1,9 @@
1
1
  .style {
2
2
  @apply border-b-0 border-t w-full;
3
+ margin-block-start: 0;
4
+ margin-block-end: 0;
5
+ margin-inline-start: 0;
6
+ margin-inline-end: 0;
3
7
  }
4
8
  .marginY-4 {
5
9
  @apply my-4;
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
4
4
  import commonStyles from './Common.module.css'
5
5
  import styles from './SearchBarV2.module.css'
6
6
  import PlatformaticIcon from './PlatformaticIcon'
7
- import { MEDIUM, RICH_BLACK, TRANSPARENT, WHITE } from './constants'
7
+ import { RICH_BLACK, SMALL, TRANSPARENT, WHITE } from './constants'
8
8
  function SearchBarV2 ({
9
9
  onSubmit,
10
10
  onChange,
@@ -67,11 +67,11 @@ function SearchBarV2 ({
67
67
 
68
68
  return (
69
69
  <div className={wrapperClassName} {...dataProps}>
70
- <PlatformaticIcon iconName='LensIcon' color={color} disabled={!isOnFocus} size={MEDIUM} onClick={handleSearch} />
70
+ <PlatformaticIcon iconName='LensIcon' color={color} disabled={!isOnFocus} size={SMALL} onClick={handleSearch} />
71
71
  <input type='text' placeholder={placeholder} className={styles.input} ref={inputRef} onChange={handleChange} onFocus={onFocus} onBlur={onBlur} />
72
72
  {showClear && (
73
73
  <div className={styles.clearContainer}>
74
- <PlatformaticIcon iconName='CircleCloseIcon' color={color} size={MEDIUM} onClick={handleClear} />
74
+ <PlatformaticIcon iconName='CircleCloseIcon' color={color} size={SMALL} onClick={handleClear} />
75
75
  </div>
76
76
  )}
77
77
  </div>
@@ -1,5 +1,5 @@
1
1
  .tag {
2
- @apply rounded-md px-4 py-2 w-fit;
2
+ @apply rounded-md px-3 py-1 w-fit;
3
3
  }
4
4
  .bordered {
5
5
  @apply border border-solid;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react'
2
2
  import PropTypes from 'prop-types'
3
3
  import styles from './Icons.module.css'
4
- import { COLORS_ICON, SIZES, MEDIUM, LARGE, MAIN_DARK_BLUE } from '../constants'
4
+ import { COLORS_ICON, SIZES, MEDIUM, LARGE, MAIN_DARK_BLUE, SMALL } from '../constants'
5
5
 
6
6
  const CircleCloseIcon = ({ color, size, disabled }) => {
7
7
  let className = `${styles.svgClassName} ` + styles[`${color}`]
@@ -11,6 +11,24 @@ const CircleCloseIcon = ({ color, size, disabled }) => {
11
11
  let icon = <></>
12
12
 
13
13
  switch (size) {
14
+ case SMALL:
15
+ icon = (
16
+ <svg
17
+ width={16}
18
+ height={16}
19
+ viewBox='0 0 16 16'
20
+ fill='none'
21
+ xmlns='http://www.w3.org/2000/svg'
22
+ className={className}
23
+ >
24
+ <circle cx={8} cy={8} r={7.5} stroke='none' />
25
+ <path d='M4 4L12 12' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
26
+ <path d='M4 12L12 4' stroke='none' strokeLinecap='round' strokeLinejoin='round' />
27
+
28
+ </svg>
29
+ )
30
+ break
31
+
14
32
  case MEDIUM:
15
33
  icon = (
16
34
  <svg