freemium-ui 2.0.0-beta.32 → 2.0.0-beta.34
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/LICENSE +21 -0
- package/dist/README.md +86 -0
- package/{index.cjs.js → dist/index.cjs.js} +56 -56
- package/{index.d.ts → dist/index.d.ts} +4 -2
- package/{index.js → dist/index.js} +56 -56
- package/dist/package.json +75 -0
- package/freemium-ui-1.0.335.tgz +0 -0
- package/package.json +65 -7
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Freshworks
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<h1 align="center">Freemium Ui</h1>
|
|
2
|
+
|
|
3
|
+
## [DEMO](https://freemium-ui.netlify.app)
|
|
4
|
+
|
|
5
|
+
[React](https://reactjs.org/) based light weight ui components based on [Styled Components](https://styled-components.com/)
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Peer Dependencies to be installed
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
npm install styled-components
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Install the package
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
npm install freemium-ui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Please note that `@next` will only point to pre-releases; to get the latest stable release use `@latest` instead.
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
Here is a quick example to get you started, **it's all you need**:
|
|
26
|
+
|
|
27
|
+
```jsx
|
|
28
|
+
import React from 'react';
|
|
29
|
+
import ReactDOM from 'react-dom';
|
|
30
|
+
import { Button } from 'freemium-ui';
|
|
31
|
+
// import { Button } from 'freemium-ui/Button';
|
|
32
|
+
|
|
33
|
+
function App() {
|
|
34
|
+
return <Button>Freemium Button</Button>;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
ReactDOM.render(<App />, document.querySelector('#app'));
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Contribution
|
|
41
|
+
|
|
42
|
+
Install Dependencies
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
npm install
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Start the app using storybook
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
npm run storybook
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Build Freemium Ui Core Components
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
npm run build
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
JavaScript heap out of memory could lead to build failure. Check the [official docs](https://rollupjs.org/troubleshooting/#error-javascript-heap-out-of-memory). Or execute any of the required below config
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
export NODE_OPTIONS="--max-old-space-size=8192"
|
|
64
|
+
export NODE_OPTIONS="--max-old-space-size=12288"
|
|
65
|
+
export NODE_OPTIONS="--max-old-space-size=16384"
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
To check the heap size in MB
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
node -e 'console.log(v8.getHeapStatistics().heap_size_limit/(1024*1024))'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Generate a PAT with `admin:org`, `write:packages`, `read:packages`, `delete:packages`
|
|
75
|
+
|
|
76
|
+
Authenticate to npm github package
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
npm login --registry=https://registry.npmjs.org/
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Publish the package to npm
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
npm publish
|
|
86
|
+
```
|
|
@@ -3625,7 +3625,7 @@ className:"end-adornment"},i)),o&&e.createElement("div",{className:"end-label"
|
|
|
3625
3625
|
className:"fui-loader",speed:r,size:n})
|
|
3626
3626
|
},nm=({type:t="button",...n})=>"button"===t?e.createElement(rm,{...n,
|
|
3627
3627
|
type:"button"}):e.createElement(am,{...n,type:"input"}),rm=t=>{
|
|
3628
|
-
const n=qt(),{itemIdentifier:r="id",label:a,id:o,items:i=[],onChange:l,placeholder:c,readOnly:s=!1,disabled:u=!1,isRequired:d=!1,showTick:h=!0,itemToString:p,name:f,itemComponent:m,width:v,className:g,style:y,defaultSelectedItem:b=null,isErrored:w,isMenuLoading:C,errorText:z,defaultIsOpen:M,isOpen:x}=t,
|
|
3628
|
+
const n=qt(),{itemIdentifier:r="id",label:a,id:o,items:i=[],onChange:l,placeholder:c,readOnly:s=!1,disabled:u=!1,isRequired:d=!1,showTick:h=!0,itemToString:p,name:f,itemComponent:m,width:v,className:g,style:y,defaultSelectedItem:b=null,isErrored:w,isMenuLoading:C,errorText:z,defaultIsOpen:M,isOpen:x,contentProps:E}=t,S=e.useMemo((()=>{
|
|
3629
3629
|
const e=i.reduce(((e,t)=>{const n=t.group??"default"
|
|
3630
3630
|
;return e[n]?e[n].push(t):e[n]=[t],e}),{})
|
|
3631
3631
|
;return Object.keys(e).sort(((e,t)=>"default"!==e?1:-1)).map((t=>({key:t,
|
|
@@ -3640,11 +3640,11 @@ isErrored:!!w,"aria-invalid":!!w,width:v,style:y},e.createElement(gd,{
|
|
|
3640
3640
|
className:"SelectValue",placeholder:c}),e.createElement(Hd,{
|
|
3641
3641
|
className:"SelectIcon"},e.createElement(Rl,{fill:n.colors.text.primary
|
|
3642
3642
|
}))),e.createElement(yd,null,e.createElement(zd,{className:"SelectContent",
|
|
3643
|
-
position:"popper",side:"bottom",sideOffset:4,sticky:"partial"
|
|
3643
|
+
position:"popper",side:"bottom",sideOffset:4,sticky:"partial",...E
|
|
3644
3644
|
},C?e.createElement(hd,null,e.createElement(tm,null)):e.createElement(e.Fragment,null,e.createElement(Sd,{
|
|
3645
3645
|
className:"SelectScrollButton"},e.createElement(Rl,{fill:n.colors.text.primary
|
|
3646
3646
|
})),e.createElement(xd,{className:"SelectViewport"
|
|
3647
|
-
},
|
|
3647
|
+
},S.map((t=>e.createElement(vd,{key:t.key,className:"SelectGroup"
|
|
3648
3648
|
},"default"!==t.key&&e.createElement(Cd,{className:"SelectLabel"
|
|
3649
3649
|
},t.key,e.createElement(wd,null)),t.items.map(((t,n)=>{
|
|
3650
3650
|
const a="string"==typeof t?t:t?.[r],o=t?.[r]??""
|
|
@@ -3654,35 +3654,35 @@ showTick:h}):e.createElement(om,{key:a,value:o||a,disabled:!!t.disabled,
|
|
|
3654
3654
|
showTick:h},p(t,"list-item")))})))))),e.createElement(_d,{
|
|
3655
3655
|
className:"SelectScrollButton"},e.createElement(Rl,{fill:n.colors.text.primary
|
|
3656
3656
|
})))))),w&&z&&e.createElement(vc,null,z))
|
|
3657
|
-
},am=({itemIdentifier:t="id",label:n,id:r,items:a=[],placeholder:o,readOnly:i=!1,disabled:l=!1,isRequired:c=!1,hideClear:s=!1,itemToString:u,name:d,filterKey:h,width:p,customValues:f,onCustomValueAdd:m,itemComponent:v,emptyItemsText:g,getCustomMessage:y,onChange:b,useComboboxProps:w,isErrored:C,errorText:z,defaultSelectedItem:M,isMenuLoading:x})=>{
|
|
3658
|
-
const
|
|
3659
|
-
selectedItem:M,items:
|
|
3657
|
+
},am=({itemIdentifier:t="id",label:n,id:r,items:a=[],placeholder:o,readOnly:i=!1,disabled:l=!1,isRequired:c=!1,hideClear:s=!1,itemToString:u,name:d,filterKey:h,width:p,customValues:f,onCustomValueAdd:m,itemComponent:v,emptyItemsText:g,getCustomMessage:y,onChange:b,useComboboxProps:w,isErrored:C,errorText:z,defaultSelectedItem:M,isMenuLoading:x,contentProps:E})=>{
|
|
3658
|
+
const S=qt(),[_,H]=e.useState(a),{isOpen:D,selectedItem:L,getToggleButtonProps:V,getLabelProps:A,getMenuProps:k,openMenu:T,highlightedIndex:R,setHighlightedIndex:P,setInputValue:I,inputValue:O,getItemProps:N,getInputProps:F}=ff({
|
|
3659
|
+
selectedItem:M,items:_,onSelectedItemChange:({selectedItem:e})=>{
|
|
3660
3660
|
console.log("onSelectedItemChange",{sI:e}),b?.(e??null)},
|
|
3661
3661
|
onIsOpenChange:({isOpen:e})=>{
|
|
3662
|
-
if(e&&(""===
|
|
3663
|
-
|
|
3662
|
+
if(e&&(""===O||L&&h&&(O||"").toLowerCase()===`${L?.[h||t]||""}`.toLowerCase()))H(a),
|
|
3663
|
+
P(L?a.indexOf(L):-1);else{const t=L?u(L):"";L&&!e&&t!==O&&I(t)}e||H(a)},
|
|
3664
3664
|
onInputValueChange:({inputValue:e})=>{
|
|
3665
|
-
|
|
3666
|
-
},itemToString:e=>e?u(e,"downshift"):"",...w}),
|
|
3667
|
-
;return e.createElement(ld,{width:p,isOpen:
|
|
3668
|
-
className:"input-label",...
|
|
3669
|
-
},n,c&&e.createElement(zn,null,"*")),e.createElement(Kf,{...
|
|
3665
|
+
D&&(""===e||L&&h&&(e||"").toLowerCase()===`${L?.[h||t]||""}`.toLowerCase())?H(a):H((n=>n.filter((n=>!e||("string"==typeof n?n:n?.[h||t]).toLowerCase().includes(e.toLowerCase())))))
|
|
3666
|
+
},itemToString:e=>e?u(e,"downshift"):"",...w}),B=!l&&!i&&D
|
|
3667
|
+
;return e.createElement(ld,{width:p,isOpen:B},e.createElement(wn,{
|
|
3668
|
+
className:"input-label",...A({disabled:l,readOnly:i})
|
|
3669
|
+
},n,c&&e.createElement(zn,null,"*")),e.createElement(Kf,{...F({name:d,
|
|
3670
3670
|
readOnly:i,disabled:l,id:r}),placeholder:o,
|
|
3671
|
-
endAdornment:e.createElement(pd,null,!l&&!i&&!s&&
|
|
3671
|
+
endAdornment:e.createElement(pd,null,!l&&!i&&!s&&L&&e.createElement(Mn,{
|
|
3672
3672
|
onClick:e=>{
|
|
3673
|
-
console.log("onClick WORKING"),
|
|
3674
|
-
borderRadius:"50%"}},e.createElement(qn,{fill:
|
|
3675
|
-
})),e.createElement(Mn,{...
|
|
3676
|
-
isOpen:
|
|
3677
|
-
}),!i&&!l&&e.createElement(sd,{isOpen:
|
|
3678
|
-
},x?e.createElement(hd,null,e.createElement(tm,null)):e.createElement(e.Fragment,null,
|
|
3679
|
-
onClick:e=>{e.stopPropagation(),m&&m({inputValue:
|
|
3680
|
-
},y?.(
|
|
3681
|
-
},g||"No items")),
|
|
3682
|
-
;return e.createElement(e.Fragment,null,v?v(n,{isHilighted:
|
|
3683
|
-
isSelected:
|
|
3684
|
-
isHilighted:
|
|
3685
|
-
},u(n),
|
|
3673
|
+
console.log("onClick WORKING"),I(""),b?.(null),T(),e.stopPropagation()},style:{
|
|
3674
|
+
borderRadius:"50%"}},e.createElement(qn,{fill:S.colors.text.primary
|
|
3675
|
+
})),e.createElement(Mn,{...V({disabled:l,readOnly:i})},e.createElement(id,{
|
|
3676
|
+
isOpen:B,fill:S.colors.text.primary,width:8,height:8})))
|
|
3677
|
+
}),!i&&!l&&e.createElement(sd,{isOpen:D,...E,...k({disabled:l,readOnly:i})
|
|
3678
|
+
},x?e.createElement(hd,null,e.createElement(tm,null)):e.createElement(e.Fragment,null,D&&0===_.length&&e.createElement(e.Fragment,null,f?e.createElement(ud,null,e.createElement(dd,{
|
|
3679
|
+
onClick:e=>{e.stopPropagation(),m&&m({inputValue:O,customValues:!0}),I("")}
|
|
3680
|
+
},y?.(O)||"Click to add")):e.createElement(ud,{readOnly:!0
|
|
3681
|
+
},g||"No items")),D&&_.map(((n,r)=>{const a="string"==typeof n?n:n?.[t]
|
|
3682
|
+
;return e.createElement(e.Fragment,null,v?v(n,{isHilighted:R===r,
|
|
3683
|
+
isSelected:L===n,key:a,...N({item:n,index:r})}):e.createElement(ud,{
|
|
3684
|
+
isHilighted:R===r,isSelected:L===n,key:a,...N({item:n,index:r})
|
|
3685
|
+
},u(n),L===n&&e.createElement(Lc,{fill:S.colors.common.accent})))
|
|
3686
3686
|
})))),C&&z&&e.createElement(vc,null,z))
|
|
3687
3687
|
},om=e.forwardRef((({children:t,showTick:n=!0,...r},a)=>{const o=qt()
|
|
3688
3688
|
;return e.createElement(bd,{className:"SelectItem",...r,ref:a
|
|
@@ -16154,51 +16154,51 @@ open:t,onOpenChange:e=>{e||l?.()}},e.createElement(um,null,e.createElement(dm,{
|
|
|
16154
16154
|
forceMount:!0,className:"DialogOverlay",onClick:()=>l?.()}),e.createElement(hm,{
|
|
16155
16155
|
forceMount:!0,className:`DialogContent ${a??""}`.trim(),size:s??"default",
|
|
16156
16156
|
fullWidth:o,align:r,position:c,style:i
|
|
16157
|
-
},n))),exports.MoreVertical=od,exports.MultiSelectDropdown=({itemIdentifier:t="id",label:n,id:r,items:a=[],onChange:o,placeholder:i,readOnly:l=!1,disabled:c=!1,isRequired:s=!1,itemToString:u,name:d,filterKey:h,width:p,useComboboxProps:f,useMultipleSelectionProps:m,emptyItemsText:v,getCustomMessage:g,onCustomValueAdd:y,customValues:b,inputValue:w,hideClear:C,removeSelectedItem:z,defaultSelectedItems:M=[],handleInputChange:x,isErrored:E,isMenuLoading:S,errorText:_,InputProps:H,itemComponent:D,isDynamicMenu:L,locale:V,maxAllowedLength:A,minAllowedLength:k,onBackSpace:
|
|
16158
|
-
const
|
|
16159
|
-
selectedItems:
|
|
16157
|
+
},n))),exports.MoreVertical=od,exports.MultiSelectDropdown=({itemIdentifier:t="id",label:n,id:r,items:a=[],onChange:o,placeholder:i,readOnly:l=!1,disabled:c=!1,isRequired:s=!1,itemToString:u,name:d,filterKey:h,width:p,useComboboxProps:f,useMultipleSelectionProps:m,emptyItemsText:v,getCustomMessage:g,onCustomValueAdd:y,customValues:b,inputValue:w,hideClear:C,removeSelectedItem:z,defaultSelectedItems:M=[],handleInputChange:x,isErrored:E,isMenuLoading:S,errorText:_,InputProps:H,itemComponent:D,isDynamicMenu:L,locale:V,maxAllowedLength:A,minAllowedLength:k,hideChips:T=!1,onBackSpace:R})=>{
|
|
16158
|
+
const P=qt(),[I,O]=e.useState(""),[N,F]=e.useState([...M]),B=e.useMemo((()=>a.filter((e=>!I||("string"==typeof e?e:e?.[h||t]).toLowerCase().includes(I.toLowerCase())))),[a,h,t,I]),{getSelectedItemProps:j,getDropdownProps:U,removeSelectedItem:$,setSelectedItems:Y}=Bf({
|
|
16159
|
+
selectedItems:N,onStateChange:({selectedItems:e,type:t})=>{switch(t){
|
|
16160
16160
|
case Bf.stateChangeTypes.SelectedItemKeyDownBackspace:
|
|
16161
16161
|
case Bf.stateChangeTypes.SelectedItemKeyDownDelete:
|
|
16162
16162
|
case Bf.stateChangeTypes.DropdownKeyDownBackspace:
|
|
16163
|
-
case Bf.stateChangeTypes.FunctionRemoveSelectedItem:e&&
|
|
16164
|
-
}),{isOpen:
|
|
16165
|
-
items:
|
|
16163
|
+
case Bf.stateChangeTypes.FunctionRemoveSelectedItem:e&&F(e)}},...m
|
|
16164
|
+
}),{isOpen:W,getToggleButtonProps:G,getLabelProps:K,getMenuProps:q,getInputProps:Z,highlightedIndex:X,getItemProps:Q}=ff({
|
|
16165
|
+
items:B,itemToString:e=>e&&u?u(e,"downshift"):"",selectedItem:null,inputValue:I,
|
|
16166
16166
|
stateReducer:(e,t)=>{const{changes:n,type:r}=t;switch(r){
|
|
16167
16167
|
case ff.stateChangeTypes.InputKeyDownEnter:case ff.stateChangeTypes.ItemClick:
|
|
16168
16168
|
return{...n,isOpen:!0};default:return n}},
|
|
16169
16169
|
onStateChange({inputValue:e,type:n,selectedItem:r}){switch(n){
|
|
16170
16170
|
case ff.stateChangeTypes.InputKeyDownEnter:case ff.stateChangeTypes.ItemClick:
|
|
16171
16171
|
case ff.stateChangeTypes.InputBlur:
|
|
16172
|
-
r&&(
|
|
16173
|
-
;case ff.stateChangeTypes.InputChange:
|
|
16174
|
-
}),[x,
|
|
16175
|
-
}),[M]),e.useEffect((()=>{
|
|
16176
|
-
;return e.createElement(ld,{width:p,isOpen:
|
|
16177
|
-
className:"input-label",...
|
|
16172
|
+
r&&(N.indexOf(r)>-1?F(N.filter((e=>e?.[t]!==r?.[t]))):F([...N,r]),O(""));break
|
|
16173
|
+
;case ff.stateChangeTypes.InputChange:O(e||"")}},...f});e.useEffect((()=>{x?.(I)
|
|
16174
|
+
}),[x,I]),e.useEffect((()=>{o?.(N)}),[o,N]),e.useEffect((()=>{
|
|
16175
|
+
M.length>0&&Y([...M])}),[M]),e.useEffect((()=>{O(w??"")}),[w]);const J=!c&&!l&&W
|
|
16176
|
+
;return e.createElement(ld,{width:p,isOpen:J},e.createElement(wn,{
|
|
16177
|
+
className:"input-label",...K({disabled:c,readOnly:l})
|
|
16178
16178
|
},n,s&&e.createElement(zn,null,"*")),e.createElement(cd,{disabled:c,
|
|
16179
16179
|
isErrored:!!E,"aria-invalid":E
|
|
16180
|
-
},e.createElement(pm,null
|
|
16181
|
-
key:`selected-item-${n}`,...
|
|
16180
|
+
},e.createElement(pm,null,!T&&N.map(((t,n)=>e.createElement(_m,{
|
|
16181
|
+
key:`selected-item-${n}`,...j({selectedItem:t,index:n}),"aria-disabled":c,
|
|
16182
16182
|
"aria-readonly":l,iconProps:{"aria-disabled":c,disabled:c},onClose:e=>{
|
|
16183
|
-
c||l||(e.stopPropagation()
|
|
16184
|
-
},u?.(t)??""))),e.createElement("input",{placeholder:i,...
|
|
16185
|
-
preventKeyAction:
|
|
16186
|
-
"Backspace"!==e.key||
|
|
16187
|
-
|
|
16183
|
+
c||l||(e.stopPropagation(),$(t),z?.(t,n))}
|
|
16184
|
+
},u?.(t)??""))),e.createElement("input",{placeholder:i,...Z(U({
|
|
16185
|
+
preventKeyAction:W,name:d,id:r,disabled:c,readOnly:l})),onKeyDown:e=>{
|
|
16186
|
+
"Backspace"!==e.key||I||($(N[N.length-1]),
|
|
16187
|
+
R?.()),"Enter"===e.key&&I&&b&&X<0&&y?.({inputValue:I,customValues:!0})},...H
|
|
16188
16188
|
})),!C&&e.createElement(Mn,{onClick:e=>{
|
|
16189
|
-
|
|
16190
|
-
fill:
|
|
16191
|
-
},e.createElement(id,{isOpen:
|
|
16192
|
-
}))),!l&&!c&&e.createElement(sd,{isOpen:
|
|
16193
|
-
},S?e.createElement(hd,null,e.createElement(tm,null)):e.createElement(e.Fragment,null,
|
|
16189
|
+
Y([]),e.stopPropagation(),e.preventDefault()}},e.createElement(qn,{
|
|
16190
|
+
fill:P.colors.text.primary})),e.createElement(Mn,{...G({disabled:c,readOnly:l})
|
|
16191
|
+
},e.createElement(id,{isOpen:J,fill:P.colors.text.primary,width:8,height:8
|
|
16192
|
+
}))),!l&&!c&&e.createElement(sd,{isOpen:W,...q({disabled:c,readOnly:l})
|
|
16193
|
+
},S?e.createElement(hd,null,e.createElement(tm,null)):e.createElement(e.Fragment,null,W&&(0===B.length||b)&&e.createElement(ud,{
|
|
16194
16194
|
readOnly:!0},b?e.createElement(dd,{tabIndex:0,onClick:e=>{
|
|
16195
|
-
e.stopPropagation(),y&&y({inputValue:
|
|
16196
|
-
},g?.(
|
|
16197
|
-
const a="string"==typeof n?n:n?.[t],o=
|
|
16198
|
-
;return e.createElement(ud,{isHilighted:
|
|
16195
|
+
e.stopPropagation(),y&&y({inputValue:I,customValues:!0})}
|
|
16196
|
+
},g?.(I)||"Click to add"):v||"No items"),W&&B.map(((n,r)=>{
|
|
16197
|
+
const a="string"==typeof n?n:n?.[t],o=N.indexOf(n)>-1
|
|
16198
|
+
;return e.createElement(ud,{isHilighted:X===r,isSelected:o,key:a,...Q({item:n,
|
|
16199
16199
|
index:r})
|
|
16200
16200
|
},D?D(n):e.createElement(e.Fragment,null,u?.(n)??"",o&&e.createElement(Lc,{
|
|
16201
|
-
fill:
|
|
16201
|
+
fill:P.colors.common.accent})))})))),E&&_&&e.createElement(vc,null,_))
|
|
16202
16202
|
},exports.Popover=bP,
|
|
16203
16203
|
exports.PopoverClose=yP,exports.Radio=({checked:t,className:n,disabled:r,id:a,isRequired:o,label:i,name:l,readOnly:c,...s})=>e.createElement(CP,{
|
|
16204
16204
|
className:`RadioGroupRoot ${n??""}`.trim(),id:a,name:l,"aria-label":i,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as react from 'react';
|
|
3
|
-
import react__default from 'react';
|
|
3
|
+
import react__default, { HTMLAttributes } from 'react';
|
|
4
4
|
import * as Popover$1 from '@radix-ui/react-popover';
|
|
5
5
|
import { PopperContentProps } from '@radix-ui/react-popover';
|
|
6
6
|
import { RadioGroupProps as RadioGroupProps$1, RadioGroupContextValue } from '@radix-ui/react-radio-group';
|
|
@@ -470,6 +470,7 @@ interface DropdownProps<T extends DefaultDropdownItem = DefaultDropdownItem> ext
|
|
|
470
470
|
*/
|
|
471
471
|
useComboboxProps?: UseComboboxProps<T>;
|
|
472
472
|
itemComponent?: (item: T, props?: DropdownItemProps | DropdownInputItemProps) => React.ReactNode | string;
|
|
473
|
+
contentProps?: Pick<HTMLAttributes<HTMLElement>, 'style' | 'className'>;
|
|
473
474
|
}
|
|
474
475
|
interface DropdownButtonProps<T extends DefaultDropdownItem = DefaultDropdownItem> extends DropdownProps<T> {
|
|
475
476
|
}
|
|
@@ -790,12 +791,13 @@ interface MultiSelectDropdownProps<T extends DefaultMultiSelectDropdownItem = De
|
|
|
790
791
|
createText: string;
|
|
791
792
|
deleteText: string;
|
|
792
793
|
};
|
|
794
|
+
hideChips?: boolean;
|
|
793
795
|
}
|
|
794
796
|
|
|
795
797
|
/**
|
|
796
798
|
* MultiSelectDropdown displays a list or drop-down box that enables selection of an option or multiple options from an available list of values.
|
|
797
799
|
*/
|
|
798
|
-
declare const MultiSelectDropdown: <T extends DefaultMultiSelectDropdownItem>({ itemIdentifier, label, id, items, onChange, placeholder, readOnly, disabled, isRequired, itemToString, name, filterKey, width, useComboboxProps, useMultipleSelectionProps, emptyItemsText, getCustomMessage, onCustomValueAdd, customValues, inputValue: iV, hideClear, removeSelectedItem: rSelectedItem, defaultSelectedItems, handleInputChange, isErrored, isMenuLoading, errorText, InputProps, itemComponent, isDynamicMenu, locale, maxAllowedLength, minAllowedLength, onBackSpace, }: MultiSelectDropdownProps<T>) => react__default.JSX.Element;
|
|
800
|
+
declare const MultiSelectDropdown: <T extends DefaultMultiSelectDropdownItem>({ itemIdentifier, label, id, items, onChange, placeholder, readOnly, disabled, isRequired, itemToString, name, filterKey, width, useComboboxProps, useMultipleSelectionProps, emptyItemsText, getCustomMessage, onCustomValueAdd, customValues, inputValue: iV, hideClear, removeSelectedItem: rSelectedItem, defaultSelectedItems, handleInputChange, isErrored, isMenuLoading, errorText, InputProps, itemComponent, isDynamicMenu, locale, maxAllowedLength, minAllowedLength, hideChips, onBackSpace, }: MultiSelectDropdownProps<T>) => react__default.JSX.Element;
|
|
799
801
|
|
|
800
802
|
type DefaultProps = {
|
|
801
803
|
/**
|
|
@@ -3604,7 +3604,7 @@ className:"end-adornment"},i)),o&&t.createElement("div",{className:"end-label"
|
|
|
3604
3604
|
className:"fui-loader",speed:r,size:n})
|
|
3605
3605
|
},_m=({type:e="button",...n})=>"button"===e?t.createElement(Hm,{...n,
|
|
3606
3606
|
type:"button"}):t.createElement(Dm,{...n,type:"input"}),Hm=e=>{
|
|
3607
|
-
const n=vn(),{itemIdentifier:r="id",label:a,id:o,items:i=[],onChange:l,placeholder:c,readOnly:s=!1,disabled:u=!1,isRequired:d=!1,showTick:h=!0,itemToString:p,name:f,itemComponent:m,width:v,className:g,style:y,defaultSelectedItem:b=null,isErrored:w,isMenuLoading:C,errorText:z,defaultIsOpen:M,isOpen:x}=e,
|
|
3607
|
+
const n=vn(),{itemIdentifier:r="id",label:a,id:o,items:i=[],onChange:l,placeholder:c,readOnly:s=!1,disabled:u=!1,isRequired:d=!1,showTick:h=!0,itemToString:p,name:f,itemComponent:m,width:v,className:g,style:y,defaultSelectedItem:b=null,isErrored:w,isMenuLoading:C,errorText:z,defaultIsOpen:M,isOpen:x,contentProps:S}=e,E=t.useMemo((()=>{
|
|
3608
3608
|
const e=i.reduce(((e,t)=>{const n=t.group??"default"
|
|
3609
3609
|
;return e[n]?e[n].push(t):e[n]=[t],e}),{})
|
|
3610
3610
|
;return Object.keys(e).sort(((e,t)=>"default"!==e?1:-1)).map((t=>({key:t,
|
|
@@ -3619,11 +3619,11 @@ isErrored:!!w,"aria-invalid":!!w,width:v,style:y},t.createElement(jd,{
|
|
|
3619
3619
|
className:"SelectValue",placeholder:c}),t.createElement(Jd,{
|
|
3620
3620
|
className:"SelectIcon"},t.createElement(nc,{fill:n.colors.text.primary
|
|
3621
3621
|
}))),t.createElement(Ud,null,t.createElement(Gd,{className:"SelectContent",
|
|
3622
|
-
position:"popper",side:"bottom",sideOffset:4,sticky:"partial"
|
|
3622
|
+
position:"popper",side:"bottom",sideOffset:4,sticky:"partial",...S
|
|
3623
3623
|
},C?t.createElement(Rd,null,t.createElement(Em,null)):t.createElement(t.Fragment,null,t.createElement(Xd,{
|
|
3624
3624
|
className:"SelectScrollButton"},t.createElement(nc,{fill:n.colors.text.primary
|
|
3625
3625
|
})),t.createElement(qd,{className:"SelectViewport"
|
|
3626
|
-
},
|
|
3626
|
+
},E.map((e=>t.createElement(Bd,{key:e.key,className:"SelectGroup"
|
|
3627
3627
|
},"default"!==e.key&&t.createElement(Wd,{className:"SelectLabel"
|
|
3628
3628
|
},e.key,t.createElement(Yd,null)),e.items.map(((e,n)=>{
|
|
3629
3629
|
const a="string"==typeof e?e:e?.[r],o=e?.[r]??""
|
|
@@ -3633,35 +3633,35 @@ showTick:h}):t.createElement(Lm,{key:a,value:o||a,disabled:!!e.disabled,
|
|
|
3633
3633
|
showTick:h},p(e,"list-item")))})))))),t.createElement(Qd,{
|
|
3634
3634
|
className:"SelectScrollButton"},t.createElement(nc,{fill:n.colors.text.primary
|
|
3635
3635
|
})))))),w&&z&&t.createElement(Oc,null,z))
|
|
3636
|
-
},Dm=({itemIdentifier:e="id",label:n,id:r,items:a=[],placeholder:o,readOnly:i=!1,disabled:l=!1,isRequired:c=!1,hideClear:s=!1,itemToString:u,name:d,filterKey:h,width:p,customValues:f,onCustomValueAdd:m,itemComponent:v,emptyItemsText:g,getCustomMessage:y,onChange:b,useComboboxProps:w,isErrored:C,errorText:z,defaultSelectedItem:M,isMenuLoading:x})=>{
|
|
3637
|
-
const
|
|
3638
|
-
selectedItem:M,items:
|
|
3636
|
+
},Dm=({itemIdentifier:e="id",label:n,id:r,items:a=[],placeholder:o,readOnly:i=!1,disabled:l=!1,isRequired:c=!1,hideClear:s=!1,itemToString:u,name:d,filterKey:h,width:p,customValues:f,onCustomValueAdd:m,itemComponent:v,emptyItemsText:g,getCustomMessage:y,onChange:b,useComboboxProps:w,isErrored:C,errorText:z,defaultSelectedItem:M,isMenuLoading:x,contentProps:S})=>{
|
|
3637
|
+
const E=vn(),[_,H]=t.useState(a),{isOpen:D,selectedItem:L,getToggleButtonProps:V,getLabelProps:A,getMenuProps:k,openMenu:T,highlightedIndex:P,setHighlightedIndex:I,setInputValue:R,inputValue:O,getItemProps:N,getInputProps:F}=Nf({
|
|
3638
|
+
selectedItem:M,items:_,onSelectedItemChange:({selectedItem:e})=>{
|
|
3639
3639
|
console.log("onSelectedItemChange",{sI:e}),b?.(e??null)},
|
|
3640
3640
|
onIsOpenChange:({isOpen:t})=>{
|
|
3641
|
-
if(t&&(""===
|
|
3642
|
-
|
|
3641
|
+
if(t&&(""===O||L&&h&&(O||"").toLowerCase()===`${L?.[h||e]||""}`.toLowerCase()))H(a),
|
|
3642
|
+
I(L?a.indexOf(L):-1);else{const e=L?u(L):"";L&&!t&&e!==O&&R(e)}t||H(a)},
|
|
3643
3643
|
onInputValueChange:({inputValue:t})=>{
|
|
3644
|
-
|
|
3645
|
-
},itemToString:e=>e?u(e,"downshift"):"",...w}),
|
|
3646
|
-
;return t.createElement(Ad,{width:p,isOpen:
|
|
3647
|
-
className:"input-label",...
|
|
3648
|
-
},n,c&&t.createElement(jn,null,"*")),t.createElement(bm,{...
|
|
3644
|
+
D&&(""===t||L&&h&&(t||"").toLowerCase()===`${L?.[h||e]||""}`.toLowerCase())?H(a):H((n=>n.filter((n=>!t||("string"==typeof n?n:n?.[h||e]).toLowerCase().includes(t.toLowerCase())))))
|
|
3645
|
+
},itemToString:e=>e?u(e,"downshift"):"",...w}),B=!l&&!i&&D
|
|
3646
|
+
;return t.createElement(Ad,{width:p,isOpen:B},t.createElement(Fn,{
|
|
3647
|
+
className:"input-label",...A({disabled:l,readOnly:i})
|
|
3648
|
+
},n,c&&t.createElement(jn,null,"*")),t.createElement(bm,{...F({name:d,
|
|
3649
3649
|
readOnly:i,disabled:l,id:r}),placeholder:o,
|
|
3650
|
-
endAdornment:t.createElement(Od,null,!l&&!i&&!s&&
|
|
3650
|
+
endAdornment:t.createElement(Od,null,!l&&!i&&!s&&L&&t.createElement(Un,{
|
|
3651
3651
|
onClick:e=>{
|
|
3652
|
-
console.log("onClick WORKING"),
|
|
3653
|
-
borderRadius:"50%"}},t.createElement(mr,{fill:
|
|
3654
|
-
})),t.createElement(Un,{...
|
|
3655
|
-
isOpen:
|
|
3656
|
-
}),!i&&!l&&t.createElement(Td,{isOpen:
|
|
3657
|
-
},x?t.createElement(Rd,null,t.createElement(Em,null)):t.createElement(t.Fragment,null,
|
|
3658
|
-
onClick:e=>{e.stopPropagation(),m&&m({inputValue:
|
|
3659
|
-
},y?.(
|
|
3660
|
-
},g||"No items")),
|
|
3661
|
-
;return t.createElement(t.Fragment,null,v?v(n,{isHilighted:
|
|
3662
|
-
isSelected:
|
|
3663
|
-
isHilighted:
|
|
3664
|
-
},u(n),
|
|
3652
|
+
console.log("onClick WORKING"),R(""),b?.(null),T(),e.stopPropagation()},style:{
|
|
3653
|
+
borderRadius:"50%"}},t.createElement(mr,{fill:E.colors.text.primary
|
|
3654
|
+
})),t.createElement(Un,{...V({disabled:l,readOnly:i})},t.createElement(Vd,{
|
|
3655
|
+
isOpen:B,fill:E.colors.text.primary,width:8,height:8})))
|
|
3656
|
+
}),!i&&!l&&t.createElement(Td,{isOpen:D,...S,...k({disabled:l,readOnly:i})
|
|
3657
|
+
},x?t.createElement(Rd,null,t.createElement(Em,null)):t.createElement(t.Fragment,null,D&&0===_.length&&t.createElement(t.Fragment,null,f?t.createElement(Pd,null,t.createElement(Id,{
|
|
3658
|
+
onClick:e=>{e.stopPropagation(),m&&m({inputValue:O,customValues:!0}),R("")}
|
|
3659
|
+
},y?.(O)||"Click to add")):t.createElement(Pd,{readOnly:!0
|
|
3660
|
+
},g||"No items")),D&&_.map(((n,r)=>{const a="string"==typeof n?n:n?.[e]
|
|
3661
|
+
;return t.createElement(t.Fragment,null,v?v(n,{isHilighted:P===r,
|
|
3662
|
+
isSelected:L===n,key:a,...N({item:n,index:r})}):t.createElement(Pd,{
|
|
3663
|
+
isHilighted:P===r,isSelected:L===n,key:a,...N({item:n,index:r})
|
|
3664
|
+
},u(n),L===n&&t.createElement(Jc,{fill:E.colors.common.accent})))
|
|
3665
3665
|
})))),C&&z&&t.createElement(Oc,null,z))
|
|
3666
3666
|
},Lm=t.forwardRef((({children:e,showTick:n=!0,...r},a)=>{const o=vn()
|
|
3667
3667
|
;return t.createElement($d,{className:"SelectItem",...r,ref:a
|
|
@@ -3889,51 +3889,51 @@ className:"StyledTag"},i||l?t.createElement(Km,{className:"AvatarRoot"
|
|
|
3889
3889
|
className:"AvatarFallback",delayMs:600
|
|
3890
3890
|
},l)):t.createElement("div",null),e,t.createElement(Xm,{...n,onClick:r
|
|
3891
3891
|
},t.createElement(mr,{fill:u.colors.text.primary})))
|
|
3892
|
-
},ev=({itemIdentifier:e="id",label:n,id:r,items:a=[],onChange:o,placeholder:i,readOnly:l=!1,disabled:c=!1,isRequired:s=!1,itemToString:u,name:d,filterKey:h,width:p,useComboboxProps:f,useMultipleSelectionProps:m,emptyItemsText:v,getCustomMessage:g,onCustomValueAdd:y,customValues:b,inputValue:w,hideClear:C,removeSelectedItem:z,defaultSelectedItems:M=[],handleInputChange:x,isErrored:S,isMenuLoading:E,errorText:_,InputProps:H,itemComponent:D,isDynamicMenu:L,locale:V,maxAllowedLength:A,minAllowedLength:k,onBackSpace:
|
|
3893
|
-
const
|
|
3894
|
-
selectedItems:
|
|
3892
|
+
},ev=({itemIdentifier:e="id",label:n,id:r,items:a=[],onChange:o,placeholder:i,readOnly:l=!1,disabled:c=!1,isRequired:s=!1,itemToString:u,name:d,filterKey:h,width:p,useComboboxProps:f,useMultipleSelectionProps:m,emptyItemsText:v,getCustomMessage:g,onCustomValueAdd:y,customValues:b,inputValue:w,hideClear:C,removeSelectedItem:z,defaultSelectedItems:M=[],handleInputChange:x,isErrored:S,isMenuLoading:E,errorText:_,InputProps:H,itemComponent:D,isDynamicMenu:L,locale:V,maxAllowedLength:A,minAllowedLength:k,hideChips:T=!1,onBackSpace:P})=>{
|
|
3893
|
+
const I=vn(),[R,O]=t.useState(""),[N,F]=t.useState([...M]),B=t.useMemo((()=>a.filter((t=>!R||("string"==typeof t?t:t?.[h||e]).toLowerCase().includes(R.toLowerCase())))),[a,h,e,R]),{getSelectedItemProps:j,getDropdownProps:U,removeSelectedItem:$,setSelectedItems:Y}=hm({
|
|
3894
|
+
selectedItems:N,onStateChange:({selectedItems:e,type:t})=>{switch(t){
|
|
3895
3895
|
case hm.stateChangeTypes.SelectedItemKeyDownBackspace:
|
|
3896
3896
|
case hm.stateChangeTypes.SelectedItemKeyDownDelete:
|
|
3897
3897
|
case hm.stateChangeTypes.DropdownKeyDownBackspace:
|
|
3898
|
-
case hm.stateChangeTypes.FunctionRemoveSelectedItem:e&&
|
|
3899
|
-
}),{isOpen:
|
|
3900
|
-
items:
|
|
3898
|
+
case hm.stateChangeTypes.FunctionRemoveSelectedItem:e&&F(e)}},...m
|
|
3899
|
+
}),{isOpen:W,getToggleButtonProps:G,getLabelProps:K,getMenuProps:q,getInputProps:Z,highlightedIndex:X,getItemProps:Q}=Nf({
|
|
3900
|
+
items:B,itemToString:e=>e&&u?u(e,"downshift"):"",selectedItem:null,inputValue:R,
|
|
3901
3901
|
stateReducer:(e,t)=>{const{changes:n,type:r}=t;switch(r){
|
|
3902
3902
|
case Nf.stateChangeTypes.InputKeyDownEnter:case Nf.stateChangeTypes.ItemClick:
|
|
3903
3903
|
return{...n,isOpen:!0};default:return n}},
|
|
3904
3904
|
onStateChange({inputValue:t,type:n,selectedItem:r}){switch(n){
|
|
3905
3905
|
case Nf.stateChangeTypes.InputKeyDownEnter:case Nf.stateChangeTypes.ItemClick:
|
|
3906
3906
|
case Nf.stateChangeTypes.InputBlur:
|
|
3907
|
-
r&&(
|
|
3908
|
-
;case Nf.stateChangeTypes.InputChange:
|
|
3909
|
-
}),[x,
|
|
3910
|
-
}),[M]),t.useEffect((()=>{
|
|
3911
|
-
;return t.createElement(Ad,{width:p,isOpen:
|
|
3912
|
-
className:"input-label",...
|
|
3907
|
+
r&&(N.indexOf(r)>-1?F(N.filter((t=>t?.[e]!==r?.[e]))):F([...N,r]),O(""));break
|
|
3908
|
+
;case Nf.stateChangeTypes.InputChange:O(t||"")}},...f});t.useEffect((()=>{x?.(R)
|
|
3909
|
+
}),[x,R]),t.useEffect((()=>{o?.(N)}),[o,N]),t.useEffect((()=>{
|
|
3910
|
+
M.length>0&&Y([...M])}),[M]),t.useEffect((()=>{O(w??"")}),[w]);const J=!c&&!l&&W
|
|
3911
|
+
;return t.createElement(Ad,{width:p,isOpen:J},t.createElement(Fn,{
|
|
3912
|
+
className:"input-label",...K({disabled:c,readOnly:l})
|
|
3913
3913
|
},n,s&&t.createElement(jn,null,"*")),t.createElement(kd,{disabled:c,
|
|
3914
3914
|
isErrored:!!S,"aria-invalid":S
|
|
3915
|
-
},t.createElement(Nm,null
|
|
3916
|
-
key:`selected-item-${n}`,...
|
|
3915
|
+
},t.createElement(Nm,null,!T&&N.map(((e,n)=>t.createElement(Jm,{
|
|
3916
|
+
key:`selected-item-${n}`,...j({selectedItem:e,index:n}),"aria-disabled":c,
|
|
3917
3917
|
"aria-readonly":l,iconProps:{"aria-disabled":c,disabled:c},onClose:t=>{
|
|
3918
|
-
c||l||(t.stopPropagation()
|
|
3919
|
-
},u?.(e)??""))),t.createElement("input",{placeholder:i,...
|
|
3920
|
-
preventKeyAction:
|
|
3921
|
-
"Backspace"!==e.key||
|
|
3922
|
-
|
|
3918
|
+
c||l||(t.stopPropagation(),$(e),z?.(e,n))}
|
|
3919
|
+
},u?.(e)??""))),t.createElement("input",{placeholder:i,...Z(U({
|
|
3920
|
+
preventKeyAction:W,name:d,id:r,disabled:c,readOnly:l})),onKeyDown:e=>{
|
|
3921
|
+
"Backspace"!==e.key||R||($(N[N.length-1]),
|
|
3922
|
+
P?.()),"Enter"===e.key&&R&&b&&X<0&&y?.({inputValue:R,customValues:!0})},...H
|
|
3923
3923
|
})),!C&&t.createElement(Un,{onClick:e=>{
|
|
3924
|
-
|
|
3925
|
-
fill:
|
|
3926
|
-
},t.createElement(Vd,{isOpen:
|
|
3927
|
-
}))),!l&&!c&&t.createElement(Td,{isOpen:
|
|
3928
|
-
},E?t.createElement(Rd,null,t.createElement(Em,null)):t.createElement(t.Fragment,null,
|
|
3924
|
+
Y([]),e.stopPropagation(),e.preventDefault()}},t.createElement(mr,{
|
|
3925
|
+
fill:I.colors.text.primary})),t.createElement(Un,{...G({disabled:c,readOnly:l})
|
|
3926
|
+
},t.createElement(Vd,{isOpen:J,fill:I.colors.text.primary,width:8,height:8
|
|
3927
|
+
}))),!l&&!c&&t.createElement(Td,{isOpen:W,...q({disabled:c,readOnly:l})
|
|
3928
|
+
},E?t.createElement(Rd,null,t.createElement(Em,null)):t.createElement(t.Fragment,null,W&&(0===B.length||b)&&t.createElement(Pd,{
|
|
3929
3929
|
readOnly:!0},b?t.createElement(Id,{tabIndex:0,onClick:e=>{
|
|
3930
|
-
e.stopPropagation(),y&&y({inputValue:
|
|
3931
|
-
},g?.(
|
|
3932
|
-
const a="string"==typeof n?n:n?.[e],o=
|
|
3933
|
-
;return t.createElement(Pd,{isHilighted:
|
|
3930
|
+
e.stopPropagation(),y&&y({inputValue:R,customValues:!0})}
|
|
3931
|
+
},g?.(R)||"Click to add"):v||"No items"),W&&B.map(((n,r)=>{
|
|
3932
|
+
const a="string"==typeof n?n:n?.[e],o=N.indexOf(n)>-1
|
|
3933
|
+
;return t.createElement(Pd,{isHilighted:X===r,isSelected:o,key:a,...Q({item:n,
|
|
3934
3934
|
index:r})
|
|
3935
3935
|
},D?D(n):t.createElement(t.Fragment,null,u?.(n)??"",o&&t.createElement(Jc,{
|
|
3936
|
-
fill:
|
|
3936
|
+
fill:I.colors.common.accent})))})))),S&&_&&t.createElement(Oc,null,_))}
|
|
3937
3937
|
;function tv(e){
|
|
3938
3938
|
throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')
|
|
3939
3939
|
}var nv,rv={exports:{}};(nv=rv).exports=function(){var e,t;function n(){
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "freemium-ui",
|
|
3
|
+
"version": "2.0.0-beta.34",
|
|
4
|
+
"description": "React Ui Components for Freemium Apps",
|
|
5
|
+
"main": "./index.js",
|
|
6
|
+
"module": "./index.js",
|
|
7
|
+
"typings": "./index.d.ts",
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@blueprintjs/datetime2": "^2.3.2",
|
|
10
|
+
"@dnd-kit/core": "^6.1.0",
|
|
11
|
+
"@dnd-kit/modifiers": "^7.0.0",
|
|
12
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
13
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
14
|
+
"@radix-ui/react-alert-dialog": "^1.0.5",
|
|
15
|
+
"@radix-ui/react-avatar": "^1.0.4",
|
|
16
|
+
"@radix-ui/react-checkbox": "^1.0.4",
|
|
17
|
+
"@radix-ui/react-dropdown-menu": "^2.0.6",
|
|
18
|
+
"@radix-ui/react-label": "^2.0.2",
|
|
19
|
+
"@radix-ui/react-popover": "^1.0.7",
|
|
20
|
+
"@radix-ui/react-radio-group": "^1.1.3",
|
|
21
|
+
"@radix-ui/react-select": "^2.0.0",
|
|
22
|
+
"@radix-ui/react-switch": "^1.0.3",
|
|
23
|
+
"@radix-ui/react-tabs": "^1.0.4",
|
|
24
|
+
"@radix-ui/react-toast": "^1.1.5",
|
|
25
|
+
"@radix-ui/react-tooltip": "^1.0.7",
|
|
26
|
+
"@tanstack/react-table": "^8.13.2",
|
|
27
|
+
"downshift": "^8.4.0",
|
|
28
|
+
"moment": "^2.30.1",
|
|
29
|
+
"react": "^18.2.0",
|
|
30
|
+
"react-dom": "^18.2.0",
|
|
31
|
+
"react-scripts": "5.0.1",
|
|
32
|
+
"react-transition-group": "^4.4.5",
|
|
33
|
+
"styled-components": "^6.1.8",
|
|
34
|
+
"typescript": "^4.9.5",
|
|
35
|
+
"web-vitals": "^2.1.4"
|
|
36
|
+
},
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "git+https://github.com/freshdesk/freemium-ui.git"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"registry": "https://registry.npmjs.org/"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"Freemiui",
|
|
46
|
+
"React",
|
|
47
|
+
"UI",
|
|
48
|
+
"Material"
|
|
49
|
+
],
|
|
50
|
+
"author": "Freshworks",
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/freshdesk/freemium-ui/issues"
|
|
53
|
+
},
|
|
54
|
+
"homepage": "https://github.com/freshdesk/freemium-ui#readme",
|
|
55
|
+
"eslintConfig": {
|
|
56
|
+
"extends": [
|
|
57
|
+
"react-app",
|
|
58
|
+
"react-app/jest",
|
|
59
|
+
"plugin:storybook/recommended"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"browserslist": {
|
|
63
|
+
"production": [
|
|
64
|
+
">0.2%",
|
|
65
|
+
"not dead",
|
|
66
|
+
"not op_mini all"
|
|
67
|
+
],
|
|
68
|
+
"development": [
|
|
69
|
+
"last 1 chrome version",
|
|
70
|
+
"last 1 firefox version",
|
|
71
|
+
"last 1 safari version"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"private": false
|
|
75
|
+
}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "freemium-ui",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.34",
|
|
4
4
|
"description": "React Ui Components for Freemium Apps",
|
|
5
|
-
"main": "
|
|
6
|
-
"module": "
|
|
7
|
-
"typings": "
|
|
5
|
+
"main": "dist/index.cjs.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"typings": "dist/index.d.ts",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@blueprintjs/datetime2": "^2.3.2",
|
|
10
10
|
"@dnd-kit/core": "^6.1.0",
|
|
@@ -34,6 +34,65 @@
|
|
|
34
34
|
"typescript": "^4.9.5",
|
|
35
35
|
"web-vitals": "^2.1.4"
|
|
36
36
|
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
39
|
+
"@rollup/plugin-commonjs": "^25.0.7",
|
|
40
|
+
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
41
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
42
|
+
"@rollup/plugin-typescript": "^11.1.6",
|
|
43
|
+
"@storybook/addon-essentials": "^8.0.0",
|
|
44
|
+
"@storybook/addon-interactions": "^8.0.0",
|
|
45
|
+
"@storybook/addon-links": "^8.0.0",
|
|
46
|
+
"@storybook/addon-onboarding": "^8.0.0",
|
|
47
|
+
"@storybook/blocks": "^8.0.0",
|
|
48
|
+
"@storybook/preset-create-react-app": "^8.0.0",
|
|
49
|
+
"@storybook/preview-api": "^8.0.0",
|
|
50
|
+
"@storybook/react": "^8.0.0",
|
|
51
|
+
"@storybook/react-webpack5": "^8.0.0",
|
|
52
|
+
"@storybook/test": "^8.0.0",
|
|
53
|
+
"@testing-library/jest-dom": "^5.17.0",
|
|
54
|
+
"@testing-library/react": "^13.4.0",
|
|
55
|
+
"@testing-library/user-event": "^13.5.0",
|
|
56
|
+
"@types/jest": "^27.5.2",
|
|
57
|
+
"@types/node": "^16.18.64",
|
|
58
|
+
"@types/react": "^18.2.63",
|
|
59
|
+
"@types/react-dom": "^18.2.19",
|
|
60
|
+
"@types/react-transition-group": "^4.4.10",
|
|
61
|
+
"@types/rollup-plugin-generate-package-json": "^3.2.8",
|
|
62
|
+
"@types/rollup-plugin-peer-deps-external": "^2.2.5",
|
|
63
|
+
"@types/styled-components": "^5.1.34",
|
|
64
|
+
"babel-plugin-named-exports-order": "^0.0.2",
|
|
65
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
66
|
+
"husky": "^8.0.3",
|
|
67
|
+
"postcss": "^8.4.35",
|
|
68
|
+
"prettier": "^3.2.5",
|
|
69
|
+
"prop-types": "^15.8.1",
|
|
70
|
+
"rollup": "^4.12.0",
|
|
71
|
+
"rollup-plugin-dts": "^6.1.0",
|
|
72
|
+
"rollup-plugin-generate-package-json": "^3.2.0",
|
|
73
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
74
|
+
"storybook": "^8.0.0",
|
|
75
|
+
"webpack": "^5.90.3"
|
|
76
|
+
},
|
|
77
|
+
"scripts": {
|
|
78
|
+
"version:beta": "npm version prerelease --preid=beta",
|
|
79
|
+
"publish:beta": "npm publish ./dist --tag beta",
|
|
80
|
+
"publish": "npm publish ./dist",
|
|
81
|
+
"prepublishOnly": "npm run build",
|
|
82
|
+
"start": "react-scripts start",
|
|
83
|
+
"build:react-app": "react-scripts build",
|
|
84
|
+
"build": "npm run rollup && npm run post:build",
|
|
85
|
+
"post:build": "node ./scripts/frankBuild.js",
|
|
86
|
+
"rollup": "rm -rf dist && rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
|
|
87
|
+
"test": "react-scripts test",
|
|
88
|
+
"eject": "react-scripts eject",
|
|
89
|
+
"check": "prettier --check .",
|
|
90
|
+
"format": "prettier --write .",
|
|
91
|
+
"storybook": "storybook dev -p 6006",
|
|
92
|
+
"build-storybook": "storybook build",
|
|
93
|
+
"typescript": "tsc -p tsconfig.json",
|
|
94
|
+
"prepare": "husky install"
|
|
95
|
+
},
|
|
37
96
|
"repository": {
|
|
38
97
|
"type": "git",
|
|
39
98
|
"url": "git+https://github.com/freshdesk/freemium-ui.git"
|
|
@@ -70,6 +129,5 @@
|
|
|
70
129
|
"last 1 firefox version",
|
|
71
130
|
"last 1 safari version"
|
|
72
131
|
]
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
}
|
|
132
|
+
}
|
|
133
|
+
}
|