@salt-ds/core 1.34.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.
Files changed (101) hide show
  1. package/css/salt-core.css +753 -483
  2. package/dist-cjs/accordion/Accordion.css.js +1 -1
  3. package/dist-cjs/accordion/Accordion.js +4 -1
  4. package/dist-cjs/accordion/Accordion.js.map +1 -1
  5. package/dist-cjs/accordion/AccordionHeader.css.js +1 -1
  6. package/dist-cjs/accordion/AccordionHeader.js +2 -2
  7. package/dist-cjs/accordion/AccordionHeader.js.map +1 -1
  8. package/dist-cjs/accordion/AccordionPanel.js +1 -1
  9. package/dist-cjs/accordion/AccordionPanel.js.map +1 -1
  10. package/dist-cjs/badge/Badge.css.js +1 -1
  11. package/dist-cjs/badge/Badge.js +3 -1
  12. package/dist-cjs/badge/Badge.js.map +1 -1
  13. package/dist-cjs/button/Button.css.js +1 -1
  14. package/dist-cjs/button/Button.js +33 -1
  15. package/dist-cjs/button/Button.js.map +1 -1
  16. package/dist-cjs/checkbox/Checkbox.css.js +1 -1
  17. package/dist-cjs/checkbox/Checkbox.js.map +1 -1
  18. package/dist-cjs/checkbox/CheckboxIcon.css.js +1 -1
  19. package/dist-cjs/combo-box/ComboBox.css.js +1 -1
  20. package/dist-cjs/combo-box/ComboBox.js +6 -2
  21. package/dist-cjs/combo-box/ComboBox.js.map +1 -1
  22. package/dist-cjs/dialog/Dialog.css.js +1 -1
  23. package/dist-cjs/dialog/DialogContent.css.js +1 -1
  24. package/dist-cjs/dropdown/Dropdown.css.js +1 -1
  25. package/dist-cjs/dropdown/Dropdown.js +3 -1
  26. package/dist-cjs/dropdown/Dropdown.js.map +1 -1
  27. package/dist-cjs/index.js +2 -0
  28. package/dist-cjs/index.js.map +1 -1
  29. package/dist-cjs/input/Input.css.js +1 -1
  30. package/dist-cjs/input/Input.js.map +1 -1
  31. package/dist-cjs/multiline-input/MultilineInput.css.js +1 -1
  32. package/dist-cjs/multiline-input/MultilineInput.js.map +1 -1
  33. package/dist-cjs/navigation-item/NavigationItem.css.js +1 -1
  34. package/dist-cjs/panel/Panel.css.js +1 -1
  35. package/dist-cjs/pill-input/PillInput.css.js +1 -1
  36. package/dist-cjs/pill-input/PillInput.js +19 -2
  37. package/dist-cjs/pill-input/PillInput.js.map +1 -1
  38. package/dist-cjs/radio-button/RadioButton.css.js +1 -1
  39. package/dist-cjs/radio-button/RadioButton.js +4 -4
  40. package/dist-cjs/radio-button/RadioButton.js.map +1 -1
  41. package/dist-cjs/radio-button/RadioButtonIcon.css.js +1 -1
  42. package/dist-cjs/switch/Switch.js +1 -1
  43. package/dist-cjs/switch/Switch.js.map +1 -1
  44. package/dist-cjs/tag/Tag.css.js +1 -1
  45. package/dist-cjs/utils/useControlled.js +1 -1
  46. package/dist-cjs/utils/useControlled.js.map +1 -1
  47. package/dist-es/accordion/Accordion.css.js +1 -1
  48. package/dist-es/accordion/Accordion.js +4 -1
  49. package/dist-es/accordion/Accordion.js.map +1 -1
  50. package/dist-es/accordion/AccordionHeader.css.js +1 -1
  51. package/dist-es/accordion/AccordionHeader.js +2 -2
  52. package/dist-es/accordion/AccordionHeader.js.map +1 -1
  53. package/dist-es/accordion/AccordionPanel.js +1 -1
  54. package/dist-es/accordion/AccordionPanel.js.map +1 -1
  55. package/dist-es/badge/Badge.css.js +1 -1
  56. package/dist-es/badge/Badge.js +3 -1
  57. package/dist-es/badge/Badge.js.map +1 -1
  58. package/dist-es/button/Button.css.js +1 -1
  59. package/dist-es/button/Button.js +32 -2
  60. package/dist-es/button/Button.js.map +1 -1
  61. package/dist-es/checkbox/Checkbox.css.js +1 -1
  62. package/dist-es/checkbox/Checkbox.js.map +1 -1
  63. package/dist-es/checkbox/CheckboxIcon.css.js +1 -1
  64. package/dist-es/combo-box/ComboBox.css.js +1 -1
  65. package/dist-es/combo-box/ComboBox.js +6 -2
  66. package/dist-es/combo-box/ComboBox.js.map +1 -1
  67. package/dist-es/dialog/Dialog.css.js +1 -1
  68. package/dist-es/dialog/DialogContent.css.js +1 -1
  69. package/dist-es/dropdown/Dropdown.css.js +1 -1
  70. package/dist-es/dropdown/Dropdown.js +3 -1
  71. package/dist-es/dropdown/Dropdown.js.map +1 -1
  72. package/dist-es/index.js +1 -1
  73. package/dist-es/input/Input.css.js +1 -1
  74. package/dist-es/input/Input.js.map +1 -1
  75. package/dist-es/multiline-input/MultilineInput.css.js +1 -1
  76. package/dist-es/multiline-input/MultilineInput.js.map +1 -1
  77. package/dist-es/navigation-item/NavigationItem.css.js +1 -1
  78. package/dist-es/panel/Panel.css.js +1 -1
  79. package/dist-es/pill-input/PillInput.css.js +1 -1
  80. package/dist-es/pill-input/PillInput.js +19 -2
  81. package/dist-es/pill-input/PillInput.js.map +1 -1
  82. package/dist-es/radio-button/RadioButton.css.js +1 -1
  83. package/dist-es/radio-button/RadioButton.js +4 -4
  84. package/dist-es/radio-button/RadioButton.js.map +1 -1
  85. package/dist-es/radio-button/RadioButtonIcon.css.js +1 -1
  86. package/dist-es/switch/Switch.js +1 -1
  87. package/dist-es/switch/Switch.js.map +1 -1
  88. package/dist-es/tag/Tag.css.js +1 -1
  89. package/dist-es/utils/useControlled.js +1 -1
  90. package/dist-es/utils/useControlled.js.map +1 -1
  91. package/dist-types/badge/Badge.d.ts +3 -2
  92. package/dist-types/button/Button.d.ts +26 -0
  93. package/dist-types/checkbox/Checkbox.d.ts +2 -1
  94. package/dist-types/index.d.ts +1 -0
  95. package/dist-types/input/Input.d.ts +2 -1
  96. package/dist-types/multiline-input/MultilineInput.d.ts +2 -1
  97. package/dist-types/pill-input/PillInput.d.ts +2 -1
  98. package/dist-types/radio-button/RadioButton.d.ts +2 -1
  99. package/dist-types/switch/Switch.d.ts +2 -1
  100. package/dist-types/types.d.ts +8 -0
  101. package/package.json +1 -1
@@ -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
  */
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Support data-* attributes for pass through props, e.g. `Input.inputProps`.
3
+ *
4
+ * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/data-%2A
5
+ */
6
+ export declare type DataAttributes = {
7
+ [dataAttribute: `data-${string}`]: string;
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salt-ds/core",
3
- "version": "1.34.0",
3
+ "version": "1.36.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",