@gobolt/genesis 0.2.6 → 0.2.7

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 +1 @@
1
- "use strict";const r=require("./_commonjsHelpers.cjs"),e=require("../node_modules/copy-to-clipboard/index.cjs");var o=e.__require();const s=r.getDefaultExportFromCjs(o);module.exports=s;
1
+ "use strict";const e=require("./_commonjsHelpers.cjs"),r=require("../node_modules/debounce/index.cjs");var o=r.__require();const s=e.getDefaultExportFromCjs(o);module.exports=s;
@@ -1,7 +1,7 @@
1
- import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
2
- import { __require as r } from "../node_modules/copy-to-clipboard/index.js";
3
- var p = r();
4
- const a = /* @__PURE__ */ o(p);
1
+ import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
2
+ import { __require as r } from "../node_modules/debounce/index.js";
3
+ var o = /* @__PURE__ */ r();
4
+ const a = /* @__PURE__ */ e(o);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -1 +1 @@
1
- "use strict";const e=require("./_commonjsHelpers.cjs"),r=require("../node_modules/debounce/index.cjs");var o=r.__require();const s=e.getDefaultExportFromCjs(o);module.exports=s;
1
+ "use strict";const r=require("./_commonjsHelpers.cjs"),e=require("../node_modules/copy-to-clipboard/index.cjs");var o=e.__require();const s=r.getDefaultExportFromCjs(o);module.exports=s;
@@ -1,7 +1,7 @@
1
- import { getDefaultExportFromCjs as e } from "./_commonjsHelpers.js";
2
- import { __require as r } from "../node_modules/debounce/index.js";
3
- var o = /* @__PURE__ */ r();
4
- const a = /* @__PURE__ */ e(o);
1
+ import { getDefaultExportFromCjs as o } from "./_commonjsHelpers.js";
2
+ import { __require as r } from "../node_modules/copy-to-clipboard/index.js";
3
+ var p = r();
4
+ const a = /* @__PURE__ */ o(p);
5
5
  export {
6
6
  a as default
7
7
  };
@@ -8,3 +8,4 @@ export declare const Filled: Story;
8
8
  export declare const Focussed: Story;
9
9
  export declare const Disabled: Story;
10
10
  export declare const Simple: Story;
11
+ export declare const MultiSelect: Story;
@@ -6,8 +6,8 @@
6
6
  padding: 1px;
7
7
  width: auto;
8
8
 
9
- ${({$isFocused:e,theme:o,type:t="primary"})=>e&&`
10
- border: 2px solid ${o.colors[t].focussed.ringColor};
9
+ ${({$isFocused:e,theme:o,type:r="primary"})=>e&&`
10
+ border: 2px solid ${o.colors[r].focussed.ringColor};
11
11
  background-color: transparent;
12
12
  border-radius: 8px;
13
13
  padding: 1px;
@@ -16,7 +16,7 @@
16
16
  .ant-select-dropdown {
17
17
  animation-duration: ${({theme:e})=>`${e.motion.veryfast}s`} !important;
18
18
  }
19
- `,l=e=>`all ${e.motion.veryfast}s ease-in-out`,p=(e,o,t,r)=>`
19
+ `,l=e=>`all ${e.motion.veryfast}s ease-in-out`,p=(e,o,r,t)=>`
20
20
  &.ant-select {
21
21
  background-color: ${e.surface.secondary};
22
22
  border-color: ${e.surface.secondary};
@@ -25,11 +25,11 @@
25
25
  .ant-select-selector {
26
26
  background-color: ${e.surface.secondary};
27
27
  border-color: ${e.surface.secondary};
28
- border-radius: ${r.BorderRadiusSm}px;
28
+ border-radius: ${t.BorderRadiusSm}px;
29
29
  margin: 0px;
30
30
  }
31
31
  }
32
- `,u=({colors:e,sizing:o,typography:t,borderRadius:r},n,i,s)=>s==="simple"?p(e,n,i,r):`
32
+ `,u=({colors:e,sizing:o,typography:r,borderRadius:t},n,i,s)=>s==="simple"?p(e,n,i,t):`
33
33
  &.ant-select {
34
34
  color: ${e.input};
35
35
  font-size: ${o.Size4}px;
@@ -40,16 +40,30 @@
40
40
 
41
41
  width: 100%;
42
42
  min-width: 250px;
43
- height: 32px;
43
+ height: auto;
44
+ min-height: 32px;
44
45
 
45
46
  background-color: ${e[n][i].backgroundColor}
46
47
 
47
- border-radius: ${r.BorderRadiusMd}px;
48
+ border-radius: ${t.BorderRadiusMd}px;
48
49
  gap: ${o.Size2}px;
49
50
 
50
51
  .ant-select-selector {
51
52
  border-color: ${e.inputs.surface.border};
52
53
  padding-left: 4px;
54
+ height: auto !important;
55
+ min-height: 32px !important;
56
+
57
+ .ant-select-selection-overflow {
58
+ flex-wrap: wrap;
59
+ gap: 4px;
60
+ padding: 4px 0;
61
+ }
62
+
63
+ .ant-select-selection-item {
64
+ margin-top: 0;
65
+ margin-bottom: 0;
66
+ }
53
67
  }
54
68
 
55
69
  .ant-select-selection-item {
@@ -138,5 +152,5 @@
138
152
  animation-duration: ${({theme:e})=>`${e.motion.veryfast}s`} !important;
139
153
  }
140
154
  `,g=a(d)`
141
- ${({theme:e,type:o="primary",state:t="active",$variant:r="none"})=>u(e,o,t,r)}
155
+ ${({theme:e,type:o="primary",state:r="active",$variant:t="none"})=>u(e,o,r,t)}
142
156
  `;exports.Select=g;exports.SelectDropdown=b;exports.SelectWrapper=c;exports.StyledMenuItem=m;
@@ -8,8 +8,8 @@ const b = a.div`
8
8
  padding: 1px;
9
9
  width: auto;
10
10
 
11
- ${({ $isFocused: e, theme: o, type: t = "primary" }) => e && `
12
- border: 2px solid ${o.colors[t].focussed.ringColor};
11
+ ${({ $isFocused: e, theme: o, type: r = "primary" }) => e && `
12
+ border: 2px solid ${o.colors[r].focussed.ringColor};
13
13
  background-color: transparent;
14
14
  border-radius: 8px;
15
15
  padding: 1px;
@@ -18,7 +18,7 @@ const b = a.div`
18
18
  .ant-select-dropdown {
19
19
  animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
20
20
  }
21
- `, c = (e) => `all ${e.motion.veryfast}s ease-in-out`, l = (e, o, t, r) => `
21
+ `, c = (e) => `all ${e.motion.veryfast}s ease-in-out`, l = (e, o, r, t) => `
22
22
  &.ant-select {
23
23
  background-color: ${e.surface.secondary};
24
24
  border-color: ${e.surface.secondary};
@@ -27,11 +27,11 @@ const b = a.div`
27
27
  .ant-select-selector {
28
28
  background-color: ${e.surface.secondary};
29
29
  border-color: ${e.surface.secondary};
30
- border-radius: ${r.BorderRadiusSm}px;
30
+ border-radius: ${t.BorderRadiusSm}px;
31
31
  margin: 0px;
32
32
  }
33
33
  }
34
- `, p = ({ colors: e, sizing: o, typography: t, borderRadius: r }, n, i, s) => s === "simple" ? l(e, n, i, r) : `
34
+ `, p = ({ colors: e, sizing: o, typography: r, borderRadius: t }, n, i, s) => s === "simple" ? l(e, n, i, t) : `
35
35
  &.ant-select {
36
36
  color: ${e.input};
37
37
  font-size: ${o.Size4}px;
@@ -42,16 +42,30 @@ const b = a.div`
42
42
 
43
43
  width: 100%;
44
44
  min-width: 250px;
45
- height: 32px;
45
+ height: auto;
46
+ min-height: 32px;
46
47
 
47
48
  background-color: ${e[n][i].backgroundColor}
48
49
 
49
- border-radius: ${r.BorderRadiusMd}px;
50
+ border-radius: ${t.BorderRadiusMd}px;
50
51
  gap: ${o.Size2}px;
51
52
 
52
53
  .ant-select-selector {
53
54
  border-color: ${e.inputs.surface.border};
54
55
  padding-left: 4px;
56
+ height: auto !important;
57
+ min-height: 32px !important;
58
+
59
+ .ant-select-selection-overflow {
60
+ flex-wrap: wrap;
61
+ gap: 4px;
62
+ padding: 4px 0;
63
+ }
64
+
65
+ .ant-select-selection-item {
66
+ margin-top: 0;
67
+ margin-bottom: 0;
68
+ }
55
69
  }
56
70
 
57
71
  .ant-select-selection-item {
@@ -97,7 +111,7 @@ const b = a.div`
97
111
  }
98
112
  }
99
113
  }
100
- `, $ = a.div`
114
+ `, g = a.div`
101
115
  .ant-select-item-option {
102
116
  transition: ${({ theme: e, type: o }) => c(e)};
103
117
  border-radius: 0px;
@@ -120,7 +134,7 @@ const b = a.div`
120
134
  }
121
135
  }
122
136
  }
123
- `, g = a.div`
137
+ `, $ = a.div`
124
138
  .ant-select-dropdown {
125
139
  animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
126
140
  transition: all ${({ theme: e }) => `${e.motion.veryfast}s`}
@@ -140,11 +154,11 @@ const b = a.div`
140
154
  animation-duration: ${({ theme: e }) => `${e.motion.veryfast}s`} !important;
141
155
  }
142
156
  `, h = a(d)`
143
- ${({ theme: e, type: o = "primary", state: t = "active", $variant: r = "none" }) => p(e, o, t, r)}
157
+ ${({ theme: e, type: o = "primary", state: r = "active", $variant: t = "none" }) => p(e, o, r, t)}
144
158
  `;
145
159
  export {
146
160
  h as Select,
147
- g as SelectDropdown,
161
+ $ as SelectDropdown,
148
162
  b as SelectWrapper,
149
- $ as StyledMenuItem
163
+ g as StyledMenuItem
150
164
  };
@@ -1 +1 @@
1
- "use strict";const e=require("react/jsx-runtime"),j=require("../../../node_modules/react-icons/hi2/index.cjs"),c=require("../../../node_modules/react-icons/hi/index.cjs"),m=require("../../../node_modules/react-icons/fi/index.cjs"),q=require("../../../_virtual/index6.cjs"),I=require("../../Input/Input.cjs"),d=require("../../Button/UtilityButton.cjs"),f=require("../../Typography/Typography.cjs"),k=require("../../Select/Select.cjs"),S=require("../../Button/IconButton.cjs"),b=({sortOptions:s,searchByPlaceholder:p="",searchField:x="address",isSortedAscending:n=!0,onChange:t})=>{const a=i=>{const v={event:"inputChange",payload:{value:i.target.value,field:x}};q(()=>{t==null||t(v)},200)()},r=i=>{const u={event:"primaryChange",payload:{value:i}};t==null||t(u)},l=()=>{const i={event:"filterClick",payload:{}};t==null||t(i)},o=()=>{const i={event:"settingsClick",payload:{}};t==null||t(i)},y=()=>{const i={event:"orderClick",payload:{value:n?"desc":"asc"}};t==null||t(i)};return e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",minWidth:800},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(I,{size:"normal",placeholder:p,prefix:e.jsx(c.HiSearch,{}),style:{padding:"5px 8px"},onChange:a}),l&&e.jsx(d,{isIconButton:!0,icon:e.jsx(j.HiMiniAdjustmentsVertical,{}),onClick:l}),o&&e.jsx(d,{isIconButton:!0,icon:e.jsx(m.FiSettings,{}),onClick:o})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsx(f,{variant:"body3",color:"#6C6C6C",children:"Sort by"}),s&&r?e.jsx(k,{options:s,defaultValue:s[0].value,variant:"simple",onChange:r}):null,e.jsx(S,{icon:n?e.jsx(c.HiOutlineSortDescending,{}):e.jsx(c.HiOutlineSortAscending,{}),onClick:y})]})]})};module.exports=b;
1
+ "use strict";const e=require("react/jsx-runtime"),j=require("../../../node_modules/react-icons/hi2/index.cjs"),c=require("../../../node_modules/react-icons/hi/index.cjs"),m=require("../../../node_modules/react-icons/fi/index.cjs"),q=require("../../../_virtual/index5.cjs"),I=require("../../Input/Input.cjs"),d=require("../../Button/UtilityButton.cjs"),f=require("../../Typography/Typography.cjs"),k=require("../../Select/Select.cjs"),S=require("../../Button/IconButton.cjs"),b=({sortOptions:s,searchByPlaceholder:p="",searchField:x="address",isSortedAscending:n=!0,onChange:t})=>{const a=i=>{const v={event:"inputChange",payload:{value:i.target.value,field:x}};q(()=>{t==null||t(v)},200)()},r=i=>{const u={event:"primaryChange",payload:{value:i}};t==null||t(u)},l=()=>{const i={event:"filterClick",payload:{}};t==null||t(i)},o=()=>{const i={event:"settingsClick",payload:{}};t==null||t(i)},y=()=>{const i={event:"orderClick",payload:{value:n?"desc":"asc"}};t==null||t(i)};return e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",minWidth:800},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[e.jsx(I,{size:"normal",placeholder:p,prefix:e.jsx(c.HiSearch,{}),style:{padding:"5px 8px"},onChange:a}),l&&e.jsx(d,{isIconButton:!0,icon:e.jsx(j.HiMiniAdjustmentsVertical,{}),onClick:l}),o&&e.jsx(d,{isIconButton:!0,icon:e.jsx(m.FiSettings,{}),onClick:o})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[e.jsx(f,{variant:"body3",color:"#6C6C6C",children:"Sort by"}),s&&r?e.jsx(k,{options:s,defaultValue:s[0].value,variant:"simple",onChange:r}):null,e.jsx(S,{icon:n?e.jsx(c.HiOutlineSortDescending,{}):e.jsx(c.HiOutlineSortAscending,{}),onClick:y})]})]})};module.exports=b;
@@ -2,7 +2,7 @@ import { jsxs as r, jsx as i } from "react/jsx-runtime";
2
2
  import { HiMiniAdjustmentsVertical as v } from "../../../node_modules/react-icons/hi2/index.js";
3
3
  import { HiSearch as I, HiOutlineSortDescending as k, HiOutlineSortAscending as x } from "../../../node_modules/react-icons/hi/index.js";
4
4
  import { FiSettings as b } from "../../../node_modules/react-icons/fi/index.js";
5
- import S from "../../../_virtual/index6.js";
5
+ import S from "../../../_virtual/index5.js";
6
6
  import A from "../../Input/Input.js";
7
7
  import d from "../../Button/UtilityButton.js";
8
8
  import E from "../../Typography/Typography.js";
@@ -1 +1 @@
1
- "use strict";const v=require("react"),m=require("../../../../../_virtual/index5.cjs"),x=require("../../../../rc-util/es/hooks/useEvent.cjs"),C=require("../../_util/toList.cjs");function _(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const c=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,c.get?c:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const d=_(v);var h=function(o,t,e,c){function s(u){return u instanceof e?u:new e(function(r){r(u)})}return new(e||(e=Promise))(function(u,r){function f(i){try{a(c.next(i))}catch(n){r(n)}}function l(i){try{a(c.throw(i))}catch(n){r(n)}}function a(i){i.done?u(i.value):s(i.value).then(f,l)}a((c=c.apply(o,t||[])).next())})};const w=o=>{let{copyConfig:t,children:e}=o;const[c,s]=d.useState(!1),[u,r]=d.useState(!1),f=d.useRef(null),l=()=>{f.current&&clearTimeout(f.current)},a={};t.format&&(a.format=t.format),d.useEffect(()=>l,[]);const i=x(n=>h(void 0,void 0,void 0,function*(){var p;n==null||n.preventDefault(),n==null||n.stopPropagation(),r(!0);try{const y=typeof t.text=="function"?yield t.text():t.text;m(y||C(e,!0).join("")||"",a),r(!1),s(!0),l(),f.current=setTimeout(()=>{s(!1)},3e3),(p=t.onCopy)===null||p===void 0||p.call(t,n)}catch(y){throw r(!1),y}}));return{copied:c,copyLoading:u,onClick:i}};module.exports=w;
1
+ "use strict";const v=require("react"),m=require("../../../../../_virtual/index6.cjs"),x=require("../../../../rc-util/es/hooks/useEvent.cjs"),C=require("../../_util/toList.cjs");function _(o){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const e in o)if(e!=="default"){const c=Object.getOwnPropertyDescriptor(o,e);Object.defineProperty(t,e,c.get?c:{enumerable:!0,get:()=>o[e]})}}return t.default=o,Object.freeze(t)}const d=_(v);var h=function(o,t,e,c){function s(u){return u instanceof e?u:new e(function(r){r(u)})}return new(e||(e=Promise))(function(u,r){function f(i){try{a(c.next(i))}catch(n){r(n)}}function l(i){try{a(c.throw(i))}catch(n){r(n)}}function a(i){i.done?u(i.value):s(i.value).then(f,l)}a((c=c.apply(o,t||[])).next())})};const w=o=>{let{copyConfig:t,children:e}=o;const[c,s]=d.useState(!1),[u,r]=d.useState(!1),f=d.useRef(null),l=()=>{f.current&&clearTimeout(f.current)},a={};t.format&&(a.format=t.format),d.useEffect(()=>l,[]);const i=x(n=>h(void 0,void 0,void 0,function*(){var p;n==null||n.preventDefault(),n==null||n.stopPropagation(),r(!0);try{const y=typeof t.text=="function"?yield t.text():t.text;m(y||C(e,!0).join("")||"",a),r(!1),s(!0),l(),f.current=setTimeout(()=>{s(!1)},3e3),(p=t.onCopy)===null||p===void 0||p.call(t,n)}catch(y){throw r(!1),y}}));return{copied:c,copyLoading:u,onClick:i}};module.exports=w;
@@ -1,5 +1,5 @@
1
1
  import * as d from "react";
2
- import m from "../../../../../_virtual/index5.js";
2
+ import m from "../../../../../_virtual/index6.js";
3
3
  import v from "../../../../rc-util/es/hooks/useEvent.js";
4
4
  import C from "../../_util/toList.js";
5
5
  var h = function(l, o, c, f) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobolt/genesis",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "genesis design system",
5
5
  "author": "gobolt",
6
6
  "license": "MIT",