@bolttech/atoms-button 0.27.0 → 0.28.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/index.cjs CHANGED
@@ -243,9 +243,9 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(func
243
243
  /* eslint-disable es/no-symbol -- required for testing */
244
244
  var NATIVE_SYMBOL$1 = symbolConstructorDetection;
245
245
 
246
- var useSymbolAsUid = NATIVE_SYMBOL$1
247
- && !Symbol.sham
248
- && typeof Symbol.iterator == 'symbol';
246
+ var useSymbolAsUid = NATIVE_SYMBOL$1 &&
247
+ !Symbol.sham &&
248
+ typeof Symbol.iterator == 'symbol';
249
249
 
250
250
  var getBuiltIn$1 = getBuiltIn$2;
251
251
  var isCallable$7 = isCallable$a;
@@ -330,10 +330,10 @@ var SHARED = '__core-js_shared__';
330
330
  var store$3 = sharedStore.exports = globalThis$6[SHARED] || defineGlobalProperty$2(SHARED, {});
331
331
 
332
332
  (store$3.versions || (store$3.versions = [])).push({
333
- version: '3.38.1',
333
+ version: '3.39.0',
334
334
  mode: 'global',
335
335
  copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
336
- license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
336
+ license: 'https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE',
337
337
  source: 'https://github.com/zloirock/core-js'
338
338
  });
339
339
 
@@ -1143,7 +1143,7 @@ const Container = /*#__PURE__*/styled__default["default"].div.withConfig({
1143
1143
  const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
1144
1144
  displayName: "atoms-buttonstyles__Button",
1145
1145
  componentId: "sc-i4bzba-1"
1146
- })(["height:fit-content;background-color:", ";border-radius:", ";border:", " solid ", ";box-shadow:", ";color:", ";padding:", ";label.material-symbols-sharp{color:", ";}&:disabled{background-color:", ";border:1px solid ", ";color:", ";label.material-symbols-sharp{color:", ";}}&:active:enabled{background-color:", ";border:1px solid ", ";color:", ";label.material-symbols-sharp{color:", ";}}&:hover:enabled{background-color:", ";border:1px solid ", ";color:", ";label.material-symbols-sharp{color:", ";}}", ""], ({
1146
+ })(["height:fit-content;background-color:", ";border-radius:", ";border:", " solid ", ";box-shadow:", ";color:", ";padding:", ";label.material-symbols-sharp{color:", ";}&:disabled{background-color:", ";border:", ";color:", ";label.material-symbols-sharp{color:", ";}}&:active:enabled{background-color:", ";border:", ";color:", ";label.material-symbols-sharp{color:", ";}}&:hover:enabled{background-color:", ";border:", ";color:", ";label.material-symbols-sharp{color:", ";}}", ""], ({
1147
1147
  theme,
1148
1148
  $variant
1149
1149
  }) => theme.components.button[$variant].container.color.default, ({
@@ -1177,7 +1177,8 @@ const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
1177
1177
  }) => theme.components.button[$variant].container.color.disable, ({
1178
1178
  theme,
1179
1179
  $variant
1180
- }) => theme.components.button[$variant].container.border.disable, ({
1180
+ }) => `${theme.components.button.borderWidth.default} solid
1181
+ ${theme.components.button[$variant].container.border.disable}`, ({
1181
1182
  theme,
1182
1183
  $variant
1183
1184
  }) => theme.components.button[$variant].text.color.disable, ({
@@ -1189,7 +1190,8 @@ const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
1189
1190
  }) => theme.components.button[$variant].container.color.active, ({
1190
1191
  theme,
1191
1192
  $variant
1192
- }) => theme.components.button[$variant].container.border.active, ({
1193
+ }) => `${theme.components.button.borderWidth.default} solid
1194
+ ${theme.components.button[$variant].container.border.active}`, ({
1193
1195
  theme,
1194
1196
  $variant
1195
1197
  }) => theme.components.button[$variant].text.color.active, ({
@@ -1201,7 +1203,8 @@ const Button$1 = /*#__PURE__*/styled__default["default"].button.withConfig({
1201
1203
  }) => theme.components.button[$variant].container.color.hover, ({
1202
1204
  theme,
1203
1205
  $variant
1204
- }) => theme.components.button[$variant].container.border.hover, ({
1206
+ }) => `${theme.components.button.borderWidth.default} solid
1207
+ ${theme.components.button[$variant].container.border.hover}`, ({
1205
1208
  theme,
1206
1209
  $variant
1207
1210
  }) => theme.components.button[$variant].text.color.hover, ({
@@ -1245,6 +1248,7 @@ const ButtonTitle = /*#__PURE__*/styled__default["default"].span.withConfig({
1245
1248
 
1246
1249
  const Button = /*#__PURE__*/react.forwardRef((_a, ref) => {
1247
1250
  var {
1251
+ id,
1248
1252
  dataTestId,
1249
1253
  disabled = false,
1250
1254
  title = '',
@@ -1256,8 +1260,9 @@ const Button = /*#__PURE__*/react.forwardRef((_a, ref) => {
1256
1260
  type = 'button',
1257
1261
  onClick
1258
1262
  } = _a,
1259
- props = __rest(_a, ["dataTestId", "disabled", "title", "variant", "size", "iconRight", "iconLeft", "fullWidth", "type", "onClick"]);
1263
+ props = __rest(_a, ["id", "dataTestId", "disabled", "title", "variant", "size", "iconRight", "iconLeft", "fullWidth", "type", "onClick"]);
1260
1264
  return jsxRuntime.jsx(Button$1, Object.assign({
1265
+ id: id,
1261
1266
  "data-testid": dataTestId,
1262
1267
  "$variant": variant,
1263
1268
  "$size": size,
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@bolttech/atoms-button",
3
- "version": "0.27.0",
3
+ "version": "0.28.0",
4
4
  "main": "./index.cjs",
5
5
  "type": "commonjs",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
- "@bolttech/atoms-icon": "0.23.0",
9
- "@bolttech/default-theme": "0.8.0",
10
- "@bolttech/frontend-foundations": "0.9.0",
11
- "@bolttech/ui-utils": "0.4.0",
8
+ "@bolttech/atoms-icon": "0.24.0",
9
+ "@bolttech/default-theme": "0.15.0",
10
+ "@bolttech/frontend-foundations": "0.10.0",
11
+ "@bolttech/ui-utils": "0.5.0",
12
12
  "react": "18.2.0",
13
13
  "styled-components": "6.1.1"
14
14
  },
@@ -5,6 +5,7 @@ export declare const Button: React.ForwardRefExoticComponent<import("@bolttech/u
5
5
  title?: string | undefined;
6
6
  variant: import("./atoms-button.type").ButtonVariants;
7
7
  size: import("./atoms-button.type").ButtonSizes;
8
+ id?: string | undefined;
8
9
  iconRight?: string | undefined;
9
10
  iconLeft?: string | undefined;
10
11
  type?: import("./atoms-button.type").ButtonTypes | undefined;
@@ -9,6 +9,17 @@ export type ButtonProps = DefaultProps & {
9
9
  title?: string;
10
10
  variant: ButtonVariants;
11
11
  size: ButtonSizes;
12
+ /**
13
+ * The HTML `id` attribute for the button.
14
+ *
15
+ * Must be unique within the document and conform to
16
+ * HTML `id` naming rules (no spaces, not starting with a digit, etc.).
17
+ * Useful for targeting the button in scripts, automated tests,
18
+ * or associating it with a `<label>` for accessibility.
19
+ *
20
+ * @defaultValue - no `id` attribute is rendered
21
+ */
22
+ id?: string;
12
23
  iconRight?: string;
13
24
  iconLeft?: string;
14
25
  type?: ButtonTypes;