oneslash-design-system 1.1.4 → 1.1.5

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.
@@ -55,9 +55,9 @@ export default function Modal({
55
55
  aria-labelledby="modal-title"
56
56
  aria-modal="true"
57
57
  tabIndex={-1}
58
- >
58
+ >
59
59
  <div
60
- className={`bg-light-background-default dark:bg-dark-background-default p-6 rounded-[8px] space-y-4 ${modalWidth}`}
60
+ className={`flex flex-col bg-light-background-default dark:bg-dark-background-default p-6 rounded-[8px] space-y-4 ${modalWidth}`}
61
61
  style={{
62
62
  maxWidth,
63
63
  width: 'calc(100vw - 64px)',
@@ -65,18 +65,20 @@ export default function Modal({
65
65
  height: 'auto',
66
66
  overflowY: 'auto',
67
67
  }}
68
- >
68
+ >
69
69
  {title && (
70
70
  <h2 id="modal-title" className="text-h6">
71
71
  {title}
72
72
  </h2>
73
73
  )}
74
- <div className="text-body1 space-y-4">
74
+ <div className="text-body1">
75
75
  {children}
76
76
  </div>
77
77
  {actions && (
78
- <div className="flex justify-between">
79
- {actions}
78
+ <div className='pt-6 border-t border-light-misc-divider dark:border-dark-misc-divider'>
79
+ <div className="flex justify-between" >
80
+ {actions}
81
+ </div>
80
82
  </div>
81
83
  )}
82
84
  </div>
@@ -57,7 +57,11 @@ export default function Popover({
57
57
  <div
58
58
  id={id}
59
59
  ref={setPopoverElement}
60
- style={{ ...styles.popper, display: open ? 'block' : 'none' }}
60
+ style={{
61
+ ...styles.popper,
62
+ display: open ? 'block' : 'none',
63
+ zIndex: 10000,
64
+ }}
61
65
  {...attributes.popper}
62
66
  className="bg-light-background-accent100 dark:bg-dark-background-accent100 rounded-[8px] shadow-lg p-2"
63
67
  role="dialog"
@@ -26,7 +26,7 @@ export default function Modal(_a) {
26
26
  var modalWidth = size === 'large' ? 'w-[1200px]' : 'w-[600px]';
27
27
  var maxWidth = size === 'large' ? '1200px' : '600px';
28
28
  return (<div className="fixed inset-[-32px] bg-black bg-opacity-50 flex items-center justify-center z-50" onClick={handleOverlayClick} role="dialog" aria-labelledby="modal-title" aria-modal="true" tabIndex={-1}>
29
- <div className={"bg-light-background-default dark:bg-dark-background-default p-6 rounded-[8px] space-y-4 ".concat(modalWidth)} style={{
29
+ <div className={"flex flex-col bg-light-background-default dark:bg-dark-background-default p-6 rounded-[8px] space-y-4 ".concat(modalWidth)} style={{
30
30
  maxWidth: maxWidth,
31
31
  width: 'calc(100vw - 64px)',
32
32
  maxHeight: '800px',
@@ -36,11 +36,13 @@ export default function Modal(_a) {
36
36
  {title && (<h2 id="modal-title" className="text-h6">
37
37
  {title}
38
38
  </h2>)}
39
- <div className="text-body1 space-y-4">
39
+ <div className="text-body1">
40
40
  {children}
41
41
  </div>
42
- {actions && (<div className="flex justify-between">
43
- {actions}
42
+ {actions && (<div className='pt-6 border-t border-light-misc-divider dark:border-dark-misc-divider'>
43
+ <div className="flex justify-between">
44
+ {actions}
45
+ </div>
44
46
  </div>)}
45
47
  </div>
46
48
  </div>);
@@ -45,7 +45,7 @@ export default function Popover(_a) {
45
45
  if (!open || !hasMounted || !anchorEl)
46
46
  return null;
47
47
  // Render popover in a portal to prevent layout shifts and positioning issues
48
- return createPortal(<div id={id} ref={setPopoverElement} style={__assign(__assign({}, styles.popper), { display: open ? 'block' : 'none' })} {...attributes.popper} className="bg-light-background-accent100 dark:bg-dark-background-accent100 rounded-[8px] shadow-lg p-2" role="dialog">
48
+ return createPortal(<div id={id} ref={setPopoverElement} style={__assign(__assign({}, styles.popper), { display: open ? 'block' : 'none', zIndex: 10000 })} {...attributes.popper} className="bg-light-background-accent100 dark:bg-dark-background-accent100 rounded-[8px] shadow-lg p-2" role="dialog">
49
49
  {children}
50
50
  </div>, document.body // Mounting the popover in the document body for isolation
51
51
  );
package/dist/output.css CHANGED
@@ -702,6 +702,9 @@ video {
702
702
  .border-4 {
703
703
  border-width: 4px;
704
704
  }
705
+ .border-t {
706
+ border-top-width: 1px;
707
+ }
705
708
  .border-none {
706
709
  border-style: none;
707
710
  }
@@ -713,6 +716,10 @@ video {
713
716
  --tw-border-opacity: 1;
714
717
  border-color: rgb(238 174 3 / var(--tw-border-opacity));
715
718
  }
719
+ .border-light-misc-divider {
720
+ --tw-border-opacity: 1;
721
+ border-color: rgb(209 209 209 / var(--tw-border-opacity));
722
+ }
716
723
  .border-light-text-secondary {
717
724
  --tw-border-opacity: 1;
718
725
  border-color: rgb(109 109 109 / var(--tw-border-opacity));
@@ -823,6 +830,9 @@ video {
823
830
  .pr-3 {
824
831
  padding-right: 0.75rem;
825
832
  }
833
+ .pt-6 {
834
+ padding-top: 1.5rem;
835
+ }
826
836
  .text-center {
827
837
  text-align: center;
828
838
  }
@@ -1000,6 +1010,11 @@ body {
1000
1010
 
1001
1011
  @media (prefers-color-scheme: dark) {
1002
1012
 
1013
+ .dark\:border-dark-misc-divider {
1014
+ --tw-border-opacity: 1;
1015
+ border-color: rgb(64 64 64 / var(--tw-border-opacity));
1016
+ }
1017
+
1003
1018
  .dark\:border-dark-text-secondary {
1004
1019
  --tw-border-opacity: 1;
1005
1020
  border-color: rgb(176 176 176 / var(--tw-border-opacity));
@@ -1,7 +1,20 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
1
12
  var designTokens = require('./designTokens');
2
13
  var config = {
3
14
  content: [
4
- "./components/**/*.{js,ts,jsx,tsx,mdx}",
15
+ "./app/**/*.{js,ts,jsx,tsx}",
16
+ "./components/**/*.{js,ts,jsx,tsx}",
17
+ "./pages/**/*.{js,ts,jsx,tsx}",
5
18
  ],
6
19
  theme: {
7
20
  extend: {
@@ -125,10 +138,9 @@ var config = {
125
138
  'dark-misc-scrollbar-bg': designTokens.colors.dark.background.default,
126
139
  'dark-misc-scrollbar-thumb': designTokens.colors.dark.background.accent200,
127
140
  },
128
- spacing: {
129
- small: designTokens.spacing.small,
130
- medium: designTokens.spacing.medium,
131
- large: designTokens.spacing.large,
141
+ spacing: function (_a) {
142
+ var theme = _a.theme;
143
+ return (__assign(__assign({}, theme('spacing')), { small: designTokens.spacing.small, medium: designTokens.spacing.medium, large: designTokens.spacing.large }));
132
144
  },
133
145
  fontSize: {
134
146
  h1: designTokens.typography.h1.size,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "oneslash-design-system",
3
3
  "description": "A design system for the Oneslash projects",
4
- "version": "1.1.4",
4
+ "version": "1.1.5",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -4,7 +4,9 @@ const designTokens = require('./designTokens');
4
4
 
5
5
  const config: Config = {
6
6
  content: [
7
- "./components/**/*.{js,ts,jsx,tsx,mdx}",
7
+ "./app/**/*.{js,ts,jsx,tsx}",
8
+ "./components/**/*.{js,ts,jsx,tsx}",
9
+ "./pages/**/*.{js,ts,jsx,tsx}",
8
10
  ],
9
11
  theme: {
10
12
  extend: {
@@ -154,11 +156,12 @@ const config: Config = {
154
156
  'dark-misc-scrollbar-bg': designTokens.colors.dark.background.default,
155
157
  'dark-misc-scrollbar-thumb': designTokens.colors.dark.background.accent200,
156
158
  },
157
- spacing: {
159
+ spacing: ({ theme }) => ({
160
+ ...theme('spacing'), // Retain default spacing
158
161
  small: designTokens.spacing.small,
159
162
  medium: designTokens.spacing.medium,
160
163
  large: designTokens.spacing.large,
161
- },
164
+ }),
162
165
  fontSize: {
163
166
  h1: designTokens.typography.h1.size,
164
167
  h2: designTokens.typography.h2.size,