freemium-ui 2.0.0-beta.34 → 2.0.0-beta.35

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.
@@ -1804,7 +1804,7 @@ name:i.name,ref:d,onCheck:()=>i.onValueChange(o.value),onKeyDown:rr((e=>{
1804
1804
  }
1805
1805
  &:hover:not([data-disabled]) {
1806
1806
  box-shadow: 0 0 0 5px
1807
- ${({theme:e,disabled:t})=>t?"transparent":`${e.colors.border.hover}30`};
1807
+ ${({theme:e,disabled:t})=>t?"transparent":e.colors.fill.hover};
1808
1808
  }
1809
1809
  &:focus-within {
1810
1810
  box-shadow: ${({theme:e,isErrored:t})=>t?e.colors.border.error:e.colors.border.active}
@@ -16034,18 +16034,18 @@ fill:u.colors.text.semantic.warning
16034
16034
  target:"_blank",rel:"noreferrer",href:i?.href??"#"
16035
16035
  },i.linkText)),t&&e.createElement(Mn,{onClick:()=>{h(!1),n?.()}
16036
16036
  },e.createElement(qn,{fill:u.colors.text.primary}))):null
16037
- },exports.BoxedRadio=({options:t,defaultValue:n,idAccessor:r="id",onChange:a,isErrored:o,errorText:i,disabled:l=!1,getTextContent:c,className:s,id:u,isRequired:d,readOnly:h,itemComponent:p,label:f,value:m,...v})=>e.createElement(ic,{
16037
+ },exports.BoxedRadio=({options:t,defaultValue:n,idAccessor:r="id",onChange:a,isErrored:o,errorText:i,disabled:l=!1,getTextContent:c,className:s,id:u,isRequired:d,readOnly:h,itemComponent:p,label:f,value:m,customIndicator:v,...g})=>e.createElement(ic,{
16038
16038
  className:"StyledBoxedRadio"},f&&e.createElement(wn,{htmlFor:u,
16039
16039
  className:"input-label"},f,d&&e.createElement(zn,null,"*")),e.createElement(lc,{
16040
16040
  defaultValue:n,value:m,onValueChange:e=>a?.(e),"aria-readonly":h,id:u,
16041
16041
  "aria-label":f,"aria-labelledby":u,"aria-invalid":o,
16042
- className:`BoxedRadioGroupRoot ${s??""}`.trim(),...v},t?.map((t=>{
16042
+ className:`BoxedRadioGroupRoot ${s??""}`.trim(),...g},t?.map((t=>{
16043
16043
  const n=c?.(t,"name")??"",a=c?.(t,"description")??"";return e.createElement(dc,{
16044
16044
  isErrored:!1,disabled:t.disabled||l,key:t?.[r],className:"BoxedRadioContainer"
16045
16045
  },e.createElement(uc,{className:"BoxedRadioGroupItem",disabled:t.disabled||l,
16046
16046
  value:t?.[r],id:t?.[r],"aria-label":n,hasDescription:!!a},e.createElement(cc,{
16047
16047
  hasDescription:!!a,className:"BoxedRadioGroupIndicatorHolder"
16048
- },e.createElement(sc,{className:"BoxedRadioGroupIndicator"
16048
+ },v??e.createElement(sc,{className:"BoxedRadioGroupIndicator"
16049
16049
  }))),e.createElement(fc,{className:"BoxedRadioLabel",htmlFor:t?.[r]
16050
16050
  },p?p(t):e.createElement(e.Fragment,null,a?e.createElement(hc,{
16051
16051
  className:"BoxedRadioLabelHeading"
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import * as react from 'react';
3
- import react__default, { HTMLAttributes } from 'react';
3
+ import react__default, { ReactNode, 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';
@@ -196,6 +196,7 @@ type BoxedRadioProps<T extends BoxedRadioItemProps = BoxedRadioItemProps> = Omit
196
196
  errorText?: string;
197
197
  isRequired?: boolean;
198
198
  isErrored?: boolean;
199
+ customIndicator?: ReactNode;
199
200
  /**
200
201
  * The description of the content
201
202
  */
@@ -209,7 +210,7 @@ type BoxedRadioProps<T extends BoxedRadioItemProps = BoxedRadioItemProps> = Omit
209
210
  /**
210
211
  * BoxedRadio displays a group of options with radio buttons and enables selection of one option from the list.
211
212
  */
212
- declare const BoxedRadio: <T extends BoxedRadioItemProps>({ options, defaultValue, idAccessor, onChange, isErrored, errorText, disabled, getTextContent, className, id, isRequired, readOnly, itemComponent, label, value, ...props }: BoxedRadioProps<T>) => react__default.JSX.Element;
213
+ declare const BoxedRadio: <T extends BoxedRadioItemProps>({ options, defaultValue, idAccessor, onChange, isErrored, errorText, disabled, getTextContent, className, id, isRequired, readOnly, itemComponent, label, value, customIndicator, ...props }: BoxedRadioProps<T>) => react__default.JSX.Element;
213
214
 
214
215
  interface CheckboxProps extends CheckboxProps$1 {
215
216
  /**
@@ -1792,7 +1792,7 @@ onCheck:()=>l.onValueChange(o.value),onKeyDown:xr((e=>{
1792
1792
  }
1793
1793
  &:hover:not([data-disabled]) {
1794
1794
  box-shadow: 0 0 0 5px
1795
- ${({theme:e,disabled:t})=>t?"transparent":`${e.colors.border.hover}30`};
1795
+ ${({theme:e,disabled:t})=>t?"transparent":e.colors.fill.hover};
1796
1796
  }
1797
1797
  &:focus-within {
1798
1798
  box-shadow: ${({theme:e,isErrored:t})=>t?e.colors.border.error:e.colors.border.active}
@@ -1833,18 +1833,18 @@ onCheck:()=>l.onValueChange(o.value),onKeyDown:xr((e=>{
1833
1833
  line-height: 20px;
1834
1834
  `,Oc=e=>t.createElement(Rc,{...e,
1835
1835
  className:`input-helper ${e.className??""}`.trim()
1836
- },e.children),Nc=({options:e,defaultValue:n,idAccessor:r="id",onChange:a,isErrored:o,errorText:i,disabled:l=!1,getTextContent:c,className:s,id:u,isRequired:d,readOnly:h,itemComponent:p,label:f,value:m,...v})=>t.createElement(Hc,{
1836
+ },e.children),Nc=({options:e,defaultValue:n,idAccessor:r="id",onChange:a,isErrored:o,errorText:i,disabled:l=!1,getTextContent:c,className:s,id:u,isRequired:d,readOnly:h,itemComponent:p,label:f,value:m,customIndicator:v,...g})=>t.createElement(Hc,{
1837
1837
  className:"StyledBoxedRadio"},f&&t.createElement(Fn,{htmlFor:u,
1838
1838
  className:"input-label"},f,d&&t.createElement(jn,null,"*")),t.createElement(Dc,{
1839
1839
  defaultValue:n,value:m,onValueChange:e=>a?.(e),"aria-readonly":h,id:u,
1840
1840
  "aria-label":f,"aria-labelledby":u,"aria-invalid":o,
1841
- className:`BoxedRadioGroupRoot ${s??""}`.trim(),...v},e?.map((e=>{
1841
+ className:`BoxedRadioGroupRoot ${s??""}`.trim(),...g},e?.map((e=>{
1842
1842
  const n=c?.(e,"name")??"",a=c?.(e,"description")??"";return t.createElement(kc,{
1843
1843
  isErrored:!1,disabled:e.disabled||l,key:e?.[r],className:"BoxedRadioContainer"
1844
1844
  },t.createElement(Ac,{className:"BoxedRadioGroupItem",disabled:e.disabled||l,
1845
1845
  value:e?.[r],id:e?.[r],"aria-label":n,hasDescription:!!a},t.createElement(Lc,{
1846
1846
  hasDescription:!!a,className:"BoxedRadioGroupIndicatorHolder"
1847
- },t.createElement(Vc,{className:"BoxedRadioGroupIndicator"
1847
+ },v??t.createElement(Vc,{className:"BoxedRadioGroupIndicator"
1848
1848
  }))),t.createElement(Ic,{className:"BoxedRadioLabel",htmlFor:e?.[r]
1849
1849
  },p?p(e):t.createElement(t.Fragment,null,a?t.createElement(Tc,{
1850
1850
  className:"BoxedRadioLabelHeading"
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "freemium-ui",
3
- "version": "2.0.0-beta.34",
3
+ "version": "2.0.0-beta.35",
4
4
  "description": "React Ui Components for Freemium Apps",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.js",
7
- "typings": "dist/index.d.ts",
5
+ "main": "./index.js",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
8
  "dependencies": {
9
9
  "@blueprintjs/datetime2": "^2.3.2",
10
10
  "@dnd-kit/core": "^6.1.0",
@@ -34,65 +34,6 @@
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
- },
96
37
  "repository": {
97
38
  "type": "git",
98
39
  "url": "git+https://github.com/freshdesk/freemium-ui.git"
@@ -129,5 +70,6 @@
129
70
  "last 1 firefox version",
130
71
  "last 1 safari version"
131
72
  ]
132
- }
133
- }
73
+ },
74
+ "private": false
75
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
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 DELETED
@@ -1,86 +0,0 @@
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
- ```
package/dist/package.json DELETED
@@ -1,75 +0,0 @@
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