= createContext` + validateMsg + ' ' + 'Claim your free account'
+ innerHTML: `` + validateMsg + ' ' + 'Claim your free account'
});
errorDiv.setAttribute('style', `position: fixed;
top: 10px;
diff --git a/components/base/styles/common/_core.scss b/components/base/styles/common/_core.scss
index 263307a..a03f90c 100644
--- a/components/base/styles/common/_core.scss
+++ b/components/base/styles/common/_core.scss
@@ -1,111 +1,112 @@
@include export-module('base-core') {
- .sf-control,
- .sf-css,
- .sf-error {
- font-family: $font-family;
- font-size: $font-size;
- font-weight: $font-weight;
- }
-
- $white: #fff;
- $background: #e82824;
- $warning: #ffd800;
- $yellow: #ff0;
- .sf-error {
- @if $skin-name == 'Material3' {
- color: rgba($error-font-color);
+ .sf-control,
+ .sf-css,
+ .sf-error {
+ font-family: $font-family;
+ font-size: $font-size;
+ font-weight: $font-weight;
}
- @else {
- color: $error-font-color;
+
+ $white: #fff;
+ $background: #e82824;
+ $warning: #ffd800;
+ $yellow: #ff0;
+ .sf-error {
+ @if $skin-name == 'Material3' {
+ color: rgba($error-font-color);
+ }
+ @else {
+ color: $error-font-color;
+ }
}
- }
-
- .sf-control,
- .sf-control [class ^= 'sf-'],
- .sf-control [class *= ' sf-'] {
- box-sizing: border-box;
- }
-
- .sf-control:focus,
- .sf-control *:focus {
- outline: none;
- }
-
- .sf-rtl {
- direction: rtl;
- text-align: right;
- }
-
- .sf-overlay {
- background-color: $overlay-bg-color;
- height: 100%;
- opacity: .5;
- pointer-events: none;
- touch-action: none;
- width: 100%;
- }
-
- .sf-hidden {
- display: none;
- }
-
- .sf-blazor-hidden {
- visibility: hidden;
- }
-
- .sf-disabled {
- background-image: none;
- cursor: default;
- opacity: .35;
- }
-
- .sf-ul {
- list-style-type: none;
- }
-
- .sf-prevent-select {
- user-select: none;
- }
-
- .sf-warning {
- @if $skin-name == 'Material3' {
- color: rgba($warning-font-color);
+
+ .sf-control,
+ .sf-control [class ^= 'sf-'],
+ .sf-control [class *= ' sf-'] {
+ box-sizing: border-box;
}
- @else {
- color: $warning-font-color;
+
+ .sf-control:focus,
+ .sf-control *:focus {
+ outline: none;
}
- }
-
- .sf-success {
- @if $skin-name == 'Material3' {
- color: rgba($success-font-color);
+
+ .sf-rtl {
+ direction: rtl;
+ text-align: right;
}
- @else {
- color: $success-font-color;
+
+ .sf-overlay {
+ background-color: $overlay-bg-color;
+ height: 100%;
+ opacity: .5;
+ pointer-events: none;
+ touch-action: none;
+ width: 100%;
}
- }
-
- .sf-information {
- @if $skin-name == 'Material3' {
- color: rgba($information-font-color);
+
+ .sf-hidden {
+ display: none;
}
- @else {
- color: $information-font-color;
+
+ .sf-blazor-hidden {
+ visibility: hidden;
+ }
+
+ .sf-disabled {
+ background-image: none;
+ cursor: default;
+ opacity: .35;
+ }
+
+ .sf-ul {
+ list-style-type: none;
+ }
+
+ .sf-prevent-select {
+ user-select: none;
+ }
+
+ .sf-warning {
+ @if $skin-name == 'Material3' {
+ color: rgba($warning-font-color);
+ }
+ @else {
+ color: $warning-font-color;
+ }
+ }
+
+ .sf-success {
+ @if $skin-name == 'Material3' {
+ color: rgba($success-font-color);
+ }
+ @else {
+ color: $success-font-color;
+ }
+ }
+
+ .sf-information {
+ @if $skin-name == 'Material3' {
+ color: rgba($information-font-color);
+ }
+ @else {
+ color: $information-font-color;
+ }
+ }
+
+ .sf-block-touch {
+ touch-action: pinch-zoom;
+ }
+ .sf-license {
+ color: $yellow;
+ text-decoration: none;
+ }
+ .sf-license-banner {
+ position: absolute;
+ right: 10px;
+ top: 27%;
+ cursor: pointer;
}
}
-
- .sf-block-touch {
- touch-action: pinch-zoom;
- }
- .sf-license {
- color: $yellow;
- text-decoration: none;
- }
- .sf-license-banner {
- position: absolute;
- right: 10px;
- top: 27%;
- cursor: pointer;
- }
-}
+
\ No newline at end of file
diff --git a/components/base/styles/definition/_material3-dark.scss b/components/base/styles/definition/_material3-dark.scss
index 994eb2d..a049add 100644
--- a/components/base/styles/definition/_material3-dark.scss
+++ b/components/base/styles/definition/_material3-dark.scss
@@ -2,8 +2,6 @@
@use 'sass:color';
@use 'sass:meta';
@use 'sass:list';
-@import '../common/mixin.scss';
-
@function mapcolorvariable($pallete-name){
@return var(#{'--color-sf-'+ $pallete-name});
}
@@ -605,7 +603,7 @@ $rating-pressed-color: darken-color(rgba($primary), 10%) !default;
$skeleton-wave-color: rgba(73, 69, 79, 1) !default;
-$splitbtn-right-border: linear-gradient(to right, rgba($content-bg-color, 1) 25%, rgba($border-light, 1) 75%) 1 !default;
+$splitbtn-right-border: linear-gradient(to right, rgba(190, 162, 255, 1) 25%, rgba(190, 162, 255, 1) 75%) 1 !default;
$splitbtn-right-border-rtl: linear-gradient(to left, rgba($content-bg-color, 1) 25%, rgba($border-light, 1) 75%) 1 !default;
$splitbtn-right-border-vertical: linear-gradient(to bottom, rgba($content-bg-color, 1) 25%, rgba($border-light, 1) 75%) 1 !default;
diff --git a/components/base/styles/definition/_material3.scss b/components/base/styles/definition/_material3.scss
index 1ab6536..7576b7d 100644
--- a/components/base/styles/definition/_material3.scss
+++ b/components/base/styles/definition/_material3.scss
@@ -2,8 +2,6 @@
@use 'sass:color';
@use 'sass:meta';
@use 'sass:list';
-@import '../common/mixin.scss';
-
@function mapcolorvariable($pallete-name){
@return var(#{'--color-sf-'+ $pallete-name});
}
@@ -44,7 +42,7 @@
@return rgba($r, $g, $b, $opacity);
}
-:root {
+:root, .sf-light-mode {
--color-sf-black: 0, 0, 0;
--color-sf-white: 255, 255, 255;
--color-sf-primary: 103, 80, 164;
@@ -619,7 +617,7 @@ $rating-pressed-color: darken-color(rgba($primary), 10%) !default;
$skeleton-wave-color: rgba(255, 255, 255, 1) !default;
-$splitbtn-right-border: linear-gradient(to right, rgba($content-bg-color, 1) 25%, rgba($border-light, 1) 75%) 1 !default;
+$splitbtn-right-border: linear-gradient(to right, rgba(92, 72, 147, 1) 25%, rgba(92, 72, 147, 1) 75%) 1 !default;
$splitbtn-right-border-rtl: linear-gradient(to left, rgba($content-bg-color, 1) 25%, rgba($border-light, 1) 75%) 1 !default;
$splitbtn-right-border-vertical: linear-gradient(to bottom, rgba($content-bg-color, 1) 25%, rgba($border-light, 1) 75%) 1 !default;
diff --git a/components/base/styles/material3-dark.scss b/components/base/styles/material3-dark.scss
index c14a867..63defcb 100644
--- a/components/base/styles/material3-dark.scss
+++ b/components/base/styles/material3-dark.scss
@@ -1,2 +1,2 @@
@import 'material3-dark-definition.scss';
-@import 'all.scss';
+@import 'all.scss';
\ No newline at end of file
diff --git a/components/base/styles/material3.scss b/components/base/styles/material3.scss
index 9eeb62e..2e9c602 100644
--- a/components/base/styles/material3.scss
+++ b/components/base/styles/material3.scss
@@ -1,2 +1,2 @@
@import 'material3-definition.scss';
-@import 'all.scss';
+@import 'all.scss';
\ No newline at end of file
diff --git a/components/buttons/README.md b/components/buttons/README.md
index d0a7925..619744c 100644
--- a/components/buttons/README.md
+++ b/components/buttons/README.md
@@ -2,7 +2,7 @@
## What's Included in the React Button Package
-The React Button package includes the following list of components.
+The React Button package includes the following list of components.
### React Button
@@ -106,6 +106,7 @@ Explore the demo [here](https://react.syncfusion.com/radio-button).
- **Form Integration:** The value attribute of the RadioButton can be included as part of form data submitted to the server, facilitating efficient data processing.
+
Trusted by the world's leading companies
diff --git a/components/buttons/package.json b/components/buttons/package.json
index 2412a7c..74ed541 100644
--- a/components/buttons/package.json
+++ b/components/buttons/package.json
@@ -1,7 +1,7 @@
{
"name": "@syncfusion/react-buttons",
- "version": "29.2.4",
- "description": "A package of feature-rich native React Pure components such as Button, CheckBox and RadioButton.",
+ "version": "30.1.37",
+ "description": "A package of feature-rich Pure React components such as Button, CheckBox and RadioButton.",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
"keywords": [
@@ -23,8 +23,6 @@
"flat button",
"round button",
"icon button",
- "togglebutton",
- "toggle button",
"form control",
"form controls",
"input",
@@ -40,7 +38,7 @@
"module": "./index.js",
"readme": "README.md",
"dependencies": {
- "@syncfusion/react-base": "~29.2.4"
+ "@syncfusion/react-base": "~30.1.37"
},
"devDependencies": {
"gulp": "4.0.2",
diff --git a/components/buttons/src/button/button.tsx b/components/buttons/src/button/button.tsx
index ebd38db..eb967db 100644
--- a/components/buttons/src/button/button.tsx
+++ b/components/buttons/src/button/button.tsx
@@ -9,7 +9,7 @@ import * as React from 'react';
* Before :- When the label is positioned Before, it appears to the left of the component.
* ```
*/
-export type LabelPlacement = 'After' | 'Before';
+export type LabelPlacement = 'After' | 'Before' | 'Bottom';
/**
* Specifies the position of an icon relative to text content in a button component.
@@ -207,8 +207,8 @@ export const Button: React.ForwardRefExoticComponent
)}
- {children}
+ <>
+ {icon && children ? (
+ {children}
+ ) : (
+ children
+ )}
+ >
{children && icon && (iconPosition === 'Right' || iconPosition === 'Bottom') && (
{typeof icon !== 'string' && icon}
diff --git a/components/buttons/src/check-box/check-box.tsx b/components/buttons/src/check-box/check-box.tsx
index 3025058..d9fecfa 100644
--- a/components/buttons/src/check-box/check-box.tsx
+++ b/components/buttons/src/check-box/check-box.tsx
@@ -1,6 +1,6 @@
import { useState, useEffect, useCallback, useImperativeHandle, useRef, forwardRef, Ref, JSX, InputHTMLAttributes, ChangeEvent } from 'react';
import { preRender, useProviderContext, SvgIcon, useRippleEffect } from '@syncfusion/react-base';
-import {LabelPlacement} from '../button/button';
+import {Color, LabelPlacement, Size} from '../button/button';
const CHECK: string = 'sf-check';
const DISABLED: string = 'sf-checkbox-disabled';
@@ -30,6 +30,17 @@ export interface CheckBoxProps {
*/
label?: string;
+ /**
+ * Specifies the size style of the checkbox. Options include 'Small', 'Medium' and 'Large'.
+ *
+ * @default Size.Medium
+ */
+ size?: Size;
+
+ icon?: React.ReactNode;
+
+ checkedIcon?: React.ReactNode;
+
/**
* Specifies the position of the label relative to the CheckBox. It determines whether the label appears before or after the checkbox element in the UI.
*
@@ -44,6 +55,13 @@ export interface CheckBoxProps {
*/
checked?: boolean;
+ /**
+ * Specifies the Color style of the button. Options include 'Primary', 'Secondary', 'Warning', 'Success', 'Danger', and 'Info'.
+ *
+ * @default -
+ */
+ color?: Color;
+
/**
* Defines `value` attribute for the CheckBox. It is a form data passed to the server when submitting the form.
*
@@ -89,12 +107,16 @@ export const Checkbox: React.ForwardRefExoticComponent = {
checked,
indeterminate,
- value
+ value,
+ color,
+ size,
+ icon,
+ checkedIcon
};
useImperativeHandle(ref, () => ({
@@ -155,6 +181,7 @@ export const Checkbox: React.ForwardRefExoticComponent): void => {
const newChecked: boolean = event.target.checked;
setIsIndeterminate(false);
+ setIsFocused(false);
if (!isControlled) {
setCheckedState(newChecked);
}
@@ -187,22 +214,13 @@ export const Checkbox: React.ForwardRefExoticComponent JSX.Element = () => (
-
- {isIndeterminate && (
-
- )}
- {checkedState && !isIndeterminate && (
-
- )}
-
- );
-
const renderRipple: () => JSX.Element = () => (
{ripple && }
@@ -210,9 +228,40 @@ export const Checkbox: React.ForwardRefExoticComponent JSX.Element = (label: string) => (
- {label}
+ {label}
);
+ const renderIcons: () => JSX.Element = () => {
+ const sizeDimensions: any = {
+ Small: { width: '12', height: '12', viewBox: '0 0 26 20' },
+ Medium: { width: '12', height: '12', viewBox: '0 0 25 20' },
+ Large: { width: '16', height: '16', viewBox: '0 0 26 20' }
+ };
+ const dimensions: any = sizeDimensions[size as keyof typeof sizeDimensions] || sizeDimensions.Medium;
+ return (
+
+ {isIndeterminate && (
+
+ )}
+ {checkedState && !isIndeterminate && (
+
+ )}
+
+ );
+ };
+
return (
{storedLabelPosition === 'Before' && renderLabel(storedLabel)}
- {storedLabelPosition === 'After' && renderRipple()}
- {renderIcons()}
+ {(storedLabelPosition === 'After' || storedLabelPosition === 'Bottom' || (checkedIcon && icon)) && renderRipple()}
+ {checkedState ? checkedIcon : icon}
+ {!checkedIcon && !icon && renderIcons()}
{storedLabelPosition === 'Before' && renderRipple()}
- {storedLabelPosition === 'After' && renderLabel(storedLabel)}
+ {(storedLabelPosition === 'After' || storedLabelPosition === 'Bottom') && renderLabel(storedLabel)}
);
diff --git a/components/buttons/src/radio-button/radio-button.tsx b/components/buttons/src/radio-button/radio-button.tsx
index 4a87e2e..4a29d73 100644
--- a/components/buttons/src/radio-button/radio-button.tsx
+++ b/components/buttons/src/radio-button/radio-button.tsx
@@ -1,7 +1,7 @@
import * as React from 'react';
import { useRef, useImperativeHandle, useState, useEffect, forwardRef, Ref, ChangeEvent, InputHTMLAttributes } from 'react';
import { preRender, useProviderContext, useRippleEffect } from '@syncfusion/react-base';
-import {LabelPlacement} from '../button/button';
+import {Color, LabelPlacement, Size} from '../button/button';
/**
* Defines the properties for the RadioButton component.
@@ -21,6 +21,20 @@ export interface RadioButtonProps {
*/
label?: string;
+ /**
+ * Specifies the size style of the checkbox. Options include 'Small', 'Medium' and 'Large'.
+ *
+ * @default Size.Medium
+ */
+ size?: Size;
+
+ /**
+ * Specifies the Color style of the radio-button. Options include 'Primary', 'Secondary', 'Warning', 'Success', 'Danger', and 'Info'.
+ *
+ * @default -
+ */
+ color?: Color;
+
/**
* Specifies the position of the label relative to the RadioButton. It determines whether the label appears before or after the radio button element in the UI.
*
@@ -69,6 +83,8 @@ export const RadioButton: React.ForwardRefExoticComponent ({
@@ -115,18 +133,21 @@ export const RadioButton: React.ForwardRefExoticComponent
-