@bolttech/atoms-segmented-control 0.21.0 → 0.22.1

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 (2) hide show
  1. package/index.cjs +16 -10
  2. package/package.json +5 -5
package/index.cjs CHANGED
@@ -243,9 +243,9 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$a(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$2 = getBuiltIn$3;
251
251
  var isCallable$a = isCallable$d;
@@ -330,10 +330,10 @@ var SHARED = '__core-js_shared__';
330
330
  var store$3 = sharedStore.exports = globalThis$9[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
 
@@ -1824,7 +1824,7 @@ const tokenToInteger = token => Number(token.replace('px', ''));
1824
1824
  const Option = /*#__PURE__*/styled__default["default"].button.withConfig({
1825
1825
  displayName: "atoms-segmented-controlstyles__Option",
1826
1826
  componentId: "sc-1lpqq2u-0"
1827
- })(["background-color:", ";border:", " solid ", ";padding:", ";cursor:pointer;", " *{cursor:pointer;}", ";"], ({
1827
+ })(["background-color:", ";border:", " solid ", ";padding:", ";cursor:pointer;&:first-of-type{border-top-left-radius:", ";border-bottom-left-radius:", ";}&:last-of-type{border-top-right-radius:", ";border-bottom-right-radius:", ";}", " *{cursor:pointer;}", ";"], ({
1828
1828
  theme,
1829
1829
  $pressed,
1830
1830
  $hasError
@@ -1838,6 +1838,14 @@ const Option = /*#__PURE__*/styled__default["default"].button.withConfig({
1838
1838
  theme
1839
1839
  }) => `${theme.components.segmentControl.paddingVertical} ${theme.components.segmentControl.paddingVertical}`, ({
1840
1840
  theme
1841
+ }) => theme.components.segmentControl.borderRadius.default, ({
1842
+ theme
1843
+ }) => theme.components.segmentControl.borderRadius.default, ({
1844
+ theme
1845
+ }) => theme.components.segmentControl.borderRadius.default, ({
1846
+ theme
1847
+ }) => theme.components.segmentControl.borderRadius.default, ({
1848
+ theme
1841
1849
  }) => tokenToInteger(theme.components.segmentControl.gap) === 0 && styled.css(["&:last-of-type{border-left:0;}&:first-of-type:nth-last-child(3){border-right:0;}&:not(:first-of-type) + &:not(:last-of-type){border-right:0;border-left:0;}"]), ({
1842
1850
  disabled,
1843
1851
  $pressed
@@ -1857,9 +1865,7 @@ const SegmentedControlContainer = /*#__PURE__*/styled__default["default"].div.wi
1857
1865
  const SegmentedControlWrapper = /*#__PURE__*/styled__default["default"].div.withConfig({
1858
1866
  displayName: "atoms-segmented-controlstyles__SegmentedControlWrapper",
1859
1867
  componentId: "sc-1lpqq2u-2"
1860
- })(["border-radius:", ";box-shadow:", ";display:flex;flex-direction:row;gap:", ";"], ({
1861
- theme
1862
- }) => theme.spacing.borderRadius.none, ({
1868
+ })(["box-shadow:", ";display:flex;flex-direction:row;gap:", ";"], ({
1863
1869
  theme: {
1864
1870
  effects: {
1865
1871
  shadow
@@ -1933,7 +1939,7 @@ const SegmentedControl = /*#__PURE__*/react.forwardRef((_a, ref) => {
1933
1939
  children: "Two options at minimum are required."
1934
1940
  });
1935
1941
  return options.map(option => jsxRuntime.jsx(Option, Object.assign({
1936
- "data-testid": `segmentedcontrol-option-${option.value}`,
1942
+ "data-testid": `segmentedcontrol-option-${option.value}${option.value === value ? '-active' : ''}`,
1937
1943
  onClick: () => {
1938
1944
  if (!option.disabled) {
1939
1945
  onClick(option.value);
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@bolttech/atoms-segmented-control",
3
- "version": "0.21.0",
3
+ "version": "0.22.1",
4
4
  "main": "./index.cjs",
5
5
  "type": "commonjs",
6
6
  "types": "./src/index.d.ts",
7
7
  "dependencies": {
8
- "@bolttech/default-theme": "0.8.0",
9
- "@bolttech/form-engine": "3.0.1-beta.5",
10
- "@bolttech/frontend-foundations": "0.9.0",
11
- "@bolttech/ui-utils": "0.4.0",
8
+ "@bolttech/default-theme": "0.15.0",
9
+ "@bolttech/form-engine": "3.1.0-beta.23",
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
  },