@platformatic/ui-components 0.1.146 → 0.1.147

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/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.146",
4
+ "version": "0.1.147",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
@@ -83,9 +83,8 @@ function Modal ({
83
83
  switch (layout) {
84
84
  case MODAL_POPUP_V2:
85
85
  whichModal = (
86
- <>
87
- <div className={`${styles['blur-fixed']}`} onClick={() => setIsOpen(false)} />
88
- <div className={`${styles.container} ${styles.centered}`}>
86
+ <div className={`${styles['blur-fixed']}`} onClick={() => setIsOpen(false)}>
87
+ <div className={styles.content}>
89
88
  <div className={modalClassName}>
90
89
  <div className={headerClassName}>
91
90
  <div className={titleClassName}>{title}</div>
@@ -96,7 +95,7 @@ function Modal ({
96
95
  </div>
97
96
  </div>
98
97
  </div>
99
- </>
98
+ </div>
100
99
  )
101
100
  break
102
101
  case MODAL_POPUP:
@@ -1,12 +1,18 @@
1
1
  .blur {
2
- @apply fixed top-[50%] left-[50%] w-full h-screen translate-x-[-50%] translate-y-[-50%] z-10;
2
+ @apply fixed top-0 left-0 w-full h-screen z-20;
3
3
  background-color: rgba(0, 0, 0, 0.75);
4
4
  }
5
5
  .blur-absolute {
6
6
  @apply absolute top-0 left-0 w-full h-full z-10 bg-rich-black/75;
7
7
  }
8
8
  .blur-fixed {
9
- @apply fixed top-0 left-0 w-screen h-full z-10 bg-rich-black/75;
9
+ @apply fixed top-0 left-0 w-screen h-full z-20 bg-rich-black/75 flex justify-center items-center;
10
+ }
11
+ .fixedContainer {
12
+ @apply fixed top-0 left-0 w-full h-screen z-20 ;
13
+ }
14
+ .content {
15
+ @apply fixed top-0 h-[100vH] flex justify-center items-center ;
10
16
  }
11
17
 
12
18
  .container {
@@ -52,7 +58,7 @@
52
58
  @apply inline-flex items-center;
53
59
  }
54
60
  .modal--small {
55
- @apply w-[calc(100vW-2rem)] md:min-w-[480px] md:max-w-[480px];
61
+ @apply w-auto md:min-w-[480px] md:max-w-[480px];
56
62
  }
57
63
  .modal--medium {
58
64
  @apply w-[calc(100vW-2rem)] md:min-w-[480px] md:max-w-[480px] lg:min-w-[880px] lg:max-w-[880px];
@@ -1,5 +1,5 @@
1
1
  .blur {
2
- @apply absolute top-0 left-0 w-full h-full z-10 bg-rich-black/75;
2
+ @apply fixed top-0 left-0 w-full h-full z-10 bg-rich-black/75;
3
3
  }
4
4
  .container {
5
5
  @apply z-20 fixed top-0 -right-[100%] min-h-full h-full bg-rich-black border-solid border-white border-l;
@@ -23,7 +23,7 @@
23
23
  @apply flex items-center gap-x-2 pb-4;
24
24
  }
25
25
  .modalLefty {
26
- @apply p-5 lg:py-20 lg:px-[7.5rem] h-[calc(100%-42px)] lg:h-[calc(100%-10rem)];
26
+ @apply p-5 xl:py-20 xl:px-[7.5rem] h-[calc(100%-2rem)] xl:h-[calc(100%-10rem)];
27
27
  }
28
28
 
29
29
  @keyframes come-in {
@@ -28,13 +28,20 @@ export default {
28
28
 
29
29
  const Template = (args) => {
30
30
  const [isOpen, setIsOpen] = useState(false)
31
+ const [isOpenInside, setIsOpenInside] = useState(false)
31
32
  const { text, ...rest } = args
32
33
  return (
33
- <main>
34
+ <main style={{ height: '1440px', overflow: 'scroll' }}>
34
35
  <BorderedBox>This Is another Content</BorderedBox>
35
- <ContentThatLoads />
36
36
  <Button color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpen(true)} label='Open Modal' />
37
37
  {isOpen && <Modal setIsOpen={setIsOpen} {...rest}>{text}</Modal>}
38
+
39
+ <BorderedBox style={{ position: 'relative' }}>
40
+ <p>This Is another Component with Modal inside</p>
41
+
42
+ <Button color={MAIN_GREEN} backgroundColor={MAIN_DARK_BLUE} onClick={() => setIsOpenInside(true)} label='Open Modal Inside' />
43
+ {isOpenInside && <Modal setIsOpen={setIsOpenInside} {...rest}>{text}</Modal>}
44
+ </BorderedBox>
38
45
  </main>
39
46
  )
40
47
  }