@salt-ds/core 1.35.0 → 1.36.0
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/css/salt-core.css +663 -412
- package/dist-cjs/button/Button.css.js +1 -1
- package/dist-cjs/button/Button.js +33 -1
- package/dist-cjs/button/Button.js.map +1 -1
- package/dist-cjs/checkbox/Checkbox.css.js +1 -1
- package/dist-cjs/checkbox/Checkbox.js.map +1 -1
- package/dist-cjs/checkbox/CheckboxIcon.css.js +1 -1
- package/dist-cjs/dialog/DialogContent.css.js +1 -1
- package/dist-cjs/dropdown/Dropdown.css.js +1 -1
- package/dist-cjs/dropdown/Dropdown.js.map +1 -1
- package/dist-cjs/index.js +2 -0
- package/dist-cjs/index.js.map +1 -1
- package/dist-cjs/input/Input.css.js +1 -1
- package/dist-cjs/input/Input.js.map +1 -1
- package/dist-cjs/multiline-input/MultilineInput.css.js +1 -1
- package/dist-cjs/multiline-input/MultilineInput.js.map +1 -1
- package/dist-cjs/panel/Panel.css.js +1 -1
- package/dist-cjs/pill-input/PillInput.css.js +1 -1
- package/dist-cjs/pill-input/PillInput.js.map +1 -1
- package/dist-cjs/radio-button/RadioButton.css.js +1 -1
- package/dist-cjs/radio-button/RadioButton.js +4 -4
- package/dist-cjs/radio-button/RadioButton.js.map +1 -1
- package/dist-cjs/radio-button/RadioButtonIcon.css.js +1 -1
- package/dist-cjs/switch/Switch.js +1 -1
- package/dist-cjs/switch/Switch.js.map +1 -1
- package/dist-cjs/tag/Tag.css.js +1 -1
- package/dist-cjs/utils/useControlled.js +1 -1
- package/dist-cjs/utils/useControlled.js.map +1 -1
- package/dist-es/button/Button.css.js +1 -1
- package/dist-es/button/Button.js +32 -2
- package/dist-es/button/Button.js.map +1 -1
- package/dist-es/checkbox/Checkbox.css.js +1 -1
- package/dist-es/checkbox/Checkbox.js.map +1 -1
- package/dist-es/checkbox/CheckboxIcon.css.js +1 -1
- package/dist-es/dialog/DialogContent.css.js +1 -1
- package/dist-es/dropdown/Dropdown.css.js +1 -1
- package/dist-es/dropdown/Dropdown.js.map +1 -1
- package/dist-es/index.js +1 -1
- package/dist-es/input/Input.css.js +1 -1
- package/dist-es/input/Input.js.map +1 -1
- package/dist-es/multiline-input/MultilineInput.css.js +1 -1
- package/dist-es/multiline-input/MultilineInput.js.map +1 -1
- package/dist-es/panel/Panel.css.js +1 -1
- package/dist-es/pill-input/PillInput.css.js +1 -1
- package/dist-es/pill-input/PillInput.js.map +1 -1
- package/dist-es/radio-button/RadioButton.css.js +1 -1
- package/dist-es/radio-button/RadioButton.js +4 -4
- package/dist-es/radio-button/RadioButton.js.map +1 -1
- package/dist-es/radio-button/RadioButtonIcon.css.js +1 -1
- package/dist-es/switch/Switch.js +1 -1
- package/dist-es/switch/Switch.js.map +1 -1
- package/dist-es/tag/Tag.css.js +1 -1
- package/dist-es/utils/useControlled.js +1 -1
- package/dist-es/utils/useControlled.js.map +1 -1
- package/dist-types/button/Button.d.ts +26 -0
- package/dist-types/checkbox/Checkbox.d.ts +2 -1
- package/dist-types/index.d.ts +1 -0
- package/dist-types/input/Input.d.ts +2 -1
- package/dist-types/multiline-input/MultilineInput.d.ts +2 -1
- package/dist-types/pill-input/PillInput.d.ts +2 -1
- package/dist-types/radio-button/RadioButton.d.ts +2 -1
- package/dist-types/switch/Switch.d.ts +2 -1
- package/dist-types/types.d.ts +8 -0
- package/package.json +1 -1
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef } from "react";
|
|
2
2
|
export declare const ButtonVariantValues: readonly ["primary", "secondary", "cta"];
|
|
3
|
+
export declare const ButtonAppearanceValues: readonly ["solid", "bordered", "transparent"];
|
|
4
|
+
export declare const ButtonSentimentValues: readonly ["accented", "neutral", "positive", "negative", "caution"];
|
|
3
5
|
export declare type ButtonVariant = (typeof ButtonVariantValues)[number];
|
|
6
|
+
export declare type ButtonAppearance = (typeof ButtonAppearanceValues)[number];
|
|
7
|
+
export declare type ButtonSentiment = (typeof ButtonSentimentValues)[number];
|
|
4
8
|
export interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
5
9
|
/**
|
|
6
10
|
* If `true`, the button will be disabled.
|
|
@@ -13,7 +17,29 @@ export interface ButtonProps extends ComponentPropsWithoutRef<"button"> {
|
|
|
13
17
|
/**
|
|
14
18
|
* The variant to use. Options are 'primary', 'secondary' and 'cta'.
|
|
15
19
|
* 'primary' is the default value.
|
|
20
|
+
*
|
|
21
|
+
* @deprecated Use `appearance` and `sentiment` instead.
|
|
22
|
+
*
|
|
23
|
+
* | variant | appearance | sentiment |
|
|
24
|
+
* | ----------- | ------------- | ----------- |
|
|
25
|
+
* | `cta` | `solid` | `accented` |
|
|
26
|
+
* | `primary` | `solid` | `neutral` |
|
|
27
|
+
* | `secondary` | `transparent` | `neutral` |
|
|
16
28
|
*/
|
|
17
29
|
variant?: ButtonVariant;
|
|
30
|
+
/**
|
|
31
|
+
* The appearance of the button. Options are 'solid', 'bordered', and 'transparent'.
|
|
32
|
+
* 'solid' is the default value.
|
|
33
|
+
*
|
|
34
|
+
* @since 1.36.0.
|
|
35
|
+
*/
|
|
36
|
+
appearance?: ButtonAppearance;
|
|
37
|
+
/**
|
|
38
|
+
* The sentiment of the button. Options are 'accented', 'neutral', 'positive', 'negative' and 'caution'.
|
|
39
|
+
* 'neutral' is the default value.
|
|
40
|
+
*
|
|
41
|
+
* @since 1.36.0.
|
|
42
|
+
*/
|
|
43
|
+
sentiment?: ButtonSentiment;
|
|
18
44
|
}
|
|
19
45
|
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ChangeEventHandler, type FocusEventHandler, type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
2
|
import type { AdornmentValidationStatus } from "../status-adornment";
|
|
3
|
+
import type { DataAttributes } from "../types";
|
|
3
4
|
export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLLabelElement>, "onChange" | "onBlur" | "onFocus"> {
|
|
4
5
|
/**
|
|
5
6
|
* If `true`, the checkbox will be checked.
|
|
@@ -26,7 +27,7 @@ export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLLabelElement
|
|
|
26
27
|
/**
|
|
27
28
|
* Properties applied to the input element.
|
|
28
29
|
*/
|
|
29
|
-
inputProps?: Partial<InputHTMLAttributes<HTMLInputElement
|
|
30
|
+
inputProps?: Partial<InputHTMLAttributes<HTMLInputElement>> & DataAttributes;
|
|
30
31
|
/**
|
|
31
32
|
* The label to be shown next to the checkbox.
|
|
32
33
|
*/
|
package/dist-types/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type InputHTMLAttributes, type ReactNode, type Ref } from "react";
|
|
2
|
+
import type { DataAttributes } from "../types";
|
|
2
3
|
export interface InputProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue">, Pick<ComponentPropsWithoutRef<"input">, "disabled" | "value" | "defaultValue" | "placeholder"> {
|
|
3
4
|
/**
|
|
4
5
|
* The marker to use in an empty read only Input.
|
|
@@ -12,7 +13,7 @@ export interface InputProps extends Omit<ComponentPropsWithoutRef<"div">, "defau
|
|
|
12
13
|
/**
|
|
13
14
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
14
15
|
*/
|
|
15
|
-
inputProps?: InputHTMLAttributes<HTMLInputElement
|
|
16
|
+
inputProps?: Partial<InputHTMLAttributes<HTMLInputElement>> & DataAttributes;
|
|
16
17
|
/**
|
|
17
18
|
* Optional ref for the input component
|
|
18
19
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type ReactNode, type Ref, type TextareaHTMLAttributes } from "react";
|
|
2
|
+
import type { DataAttributes } from "../types";
|
|
2
3
|
export interface MultilineInputProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue">, Pick<ComponentPropsWithoutRef<"textarea">, "disabled" | "value" | "defaultValue" | "placeholder"> {
|
|
3
4
|
/**
|
|
4
5
|
* Styling variant with full border. Defaults to false
|
|
@@ -23,7 +24,7 @@ export interface MultilineInputProps extends Omit<ComponentPropsWithoutRef<"div"
|
|
|
23
24
|
/**
|
|
24
25
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea#Attributes) applied to the `textarea` element.
|
|
25
26
|
*/
|
|
26
|
-
textAreaProps?: TextareaHTMLAttributes<HTMLTextAreaElement
|
|
27
|
+
textAreaProps?: Partial<TextareaHTMLAttributes<HTMLTextAreaElement>> & DataAttributes;
|
|
27
28
|
/**
|
|
28
29
|
* Optional ref for the textarea component
|
|
29
30
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type InputHTMLAttributes, type ReactNode, type Ref, type SyntheticEvent } from "react";
|
|
2
|
+
import type { DataAttributes } from "../types";
|
|
2
3
|
export interface PillInputProps extends Omit<ComponentPropsWithoutRef<"div">, "defaultValue">, Pick<ComponentPropsWithoutRef<"input">, "disabled" | "value" | "defaultValue" | "placeholder"> {
|
|
3
4
|
/**
|
|
4
5
|
* The marker to use in an empty read only Input.
|
|
@@ -12,7 +13,7 @@ export interface PillInputProps extends Omit<ComponentPropsWithoutRef<"div">, "d
|
|
|
12
13
|
/**
|
|
13
14
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
14
15
|
*/
|
|
15
|
-
inputProps?: InputHTMLAttributes<HTMLInputElement
|
|
16
|
+
inputProps?: Partial<InputHTMLAttributes<HTMLInputElement>> & DataAttributes;
|
|
16
17
|
/**
|
|
17
18
|
* Optional ref for the input component
|
|
18
19
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ChangeEventHandler, type ComponentPropsWithoutRef, type FocusEventHandler, type InputHTMLAttributes, type ReactNode } from "react";
|
|
2
2
|
import type { AdornmentValidationStatus } from "../status-adornment";
|
|
3
|
+
import type { DataAttributes } from "../types";
|
|
3
4
|
export interface RadioButtonProps extends Omit<ComponentPropsWithoutRef<"label">, "onChange" | "onBlur" | "onFocus"> {
|
|
4
5
|
/**
|
|
5
6
|
* Set the default selected radio button in the group
|
|
@@ -17,7 +18,7 @@ export interface RadioButtonProps extends Omit<ComponentPropsWithoutRef<"label">
|
|
|
17
18
|
/**
|
|
18
19
|
* Props to be passed to the radio input
|
|
19
20
|
*/
|
|
20
|
-
inputProps?: Partial<InputHTMLAttributes<HTMLInputElement
|
|
21
|
+
inputProps?: Partial<InputHTMLAttributes<HTMLInputElement>> & DataAttributes;
|
|
21
22
|
/**
|
|
22
23
|
* The label to be shown next to the radio icon
|
|
23
24
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ChangeEventHandler, type ComponentPropsWithoutRef, type FocusEventHandler, type ReactNode } from "react";
|
|
2
|
+
import type { DataAttributes } from "../types";
|
|
2
3
|
export interface SwitchProps extends Omit<ComponentPropsWithoutRef<"label">, "children" | "onFocus" | "onBlur" | "onChange"> {
|
|
3
4
|
/**
|
|
4
5
|
* If `true`, the checkbox will be checked.
|
|
@@ -16,7 +17,7 @@ export interface SwitchProps extends Omit<ComponentPropsWithoutRef<"label">, "ch
|
|
|
16
17
|
/**
|
|
17
18
|
* Properties applied to the input element.
|
|
18
19
|
*/
|
|
19
|
-
inputProps?: Partial<ComponentPropsWithoutRef<"input"
|
|
20
|
+
inputProps?: Partial<ComponentPropsWithoutRef<"input">> & DataAttributes;
|
|
20
21
|
/**
|
|
21
22
|
* The label to be shown next to the checkbox.
|
|
22
23
|
*/
|