@dt-dds/react-segmented-control 1.0.0-beta.31 → 1.0.0-beta.33

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/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @dt-ui/react-segmented-control
2
2
 
3
+ ## 1.0.0-beta.33
4
+
5
+ ### Patch Changes
6
+
7
+ - chore(dependencies): upgrade builders versions
8
+ - Updated dependencies
9
+ - @dt-dds/react-core@1.0.0-beta.45
10
+ - @dt-dds/react-icon@1.0.0-beta.46
11
+ - @dt-dds/react-tooltip@1.0.0-beta.53
12
+ - @dt-dds/themes@1.0.0-beta.5
13
+
14
+ ## 1.0.0-beta.32
15
+
16
+ ### Patch Changes
17
+
18
+ - refactor(themes): consolidate theme structure
19
+ - Updated dependencies
20
+ - @dt-dds/react-core@1.0.0-beta.44
21
+ - @dt-dds/react-icon@1.0.0-beta.45
22
+ - @dt-dds/react-tooltip@1.0.0-beta.52
23
+ - @dt-dds/themes@1.0.0-beta.4
24
+
3
25
  ## 1.0.0-beta.31
4
26
 
5
27
  ### Minor Changes
@@ -0,0 +1,29 @@
1
+ import { CustomTheme } from '@dt-dds/themes';
2
+ import { Code } from '@dt-dds/icons';
3
+ import { BaseProps } from '@dt-dds/react-core';
4
+ import * as react_jsx_runtime from 'react/jsx-runtime';
5
+ import { ComponentPropsWithoutRef } from 'react';
6
+
7
+ interface SegmentedControlProps$1 extends BaseProps {
8
+ label: string;
9
+ value: string;
10
+ iconCode?: Code;
11
+ disabled?: boolean;
12
+ }
13
+
14
+ interface SegmentedControlProps extends ComponentPropsWithoutRef<'div'>, BaseProps {
15
+ selectedValue?: string | undefined;
16
+ showLabel?: boolean;
17
+ onChangeControl?: (value: string) => void;
18
+ }
19
+ declare const SegmentedControl: {
20
+ ({ dataTestId, children, showLabel, selectedValue, onChangeControl, ...props }: SegmentedControlProps): react_jsx_runtime.JSX.Element;
21
+ Option: ({ label, iconCode, value, disabled, }: SegmentedControlProps$1) => react_jsx_runtime.JSX.Element;
22
+ };
23
+
24
+ declare module '@emotion/react' {
25
+ interface Theme extends CustomTheme {
26
+ }
27
+ }
28
+
29
+ export { SegmentedControl };
package/dist/index.js CHANGED
@@ -57,11 +57,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
57
57
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
58
 
59
59
  // index.ts
60
- var segmented_control_exports = {};
61
- __export(segmented_control_exports, {
60
+ var index_exports = {};
61
+ __export(index_exports, {
62
62
  SegmentedControl: () => SegmentedControl
63
63
  });
64
- module.exports = __toCommonJS(segmented_control_exports);
64
+ module.exports = __toCommonJS(index_exports);
65
65
 
66
66
  // src/components/SegmentedControlOption.tsx
67
67
  var import_react_icon = require("@dt-dds/react-icon");
@@ -118,17 +118,17 @@ var SegmentedControlProvider = ({
118
118
  var import_styled = __toESM(require("@emotion/styled"));
119
119
  var SegmentedControlOptionStyled = import_styled.default.button`
120
120
  ${({ theme, showLabel }) => `
121
- ${theme.fontStyles.body2};
121
+ ${theme.fontStyles.bodyMdRegular};
122
122
 
123
123
  display: flex;
124
124
  align-items: center;
125
- gap: ${theme.spacing["5xs"]};
125
+ gap: ${theme.spacing.spacing_20};
126
126
  cursor: pointer;
127
127
  background-color: ${theme.palette.surface.contrast};
128
128
  color: ${theme.palette.content.default};
129
129
  border: none;
130
130
  border-radius: ${theme.shape.button};
131
- padding: ${theme.spacing["5xs"]} ${theme.spacing[showLabel ? "3xs" : "5xs"]};
131
+ padding: ${theme.spacing.spacing_20} ${theme.spacing[showLabel ? "spacing_40" : "spacing_20"]};
132
132
 
133
133
  &:not(:disabled):hover {
134
134
  background-color: ${theme.palette.primary.light};
@@ -198,7 +198,7 @@ var SegmentedControlStyled = import_styled2.default.div`
198
198
  ${({ theme }) => `
199
199
  display: inline-flex;
200
200
  align-items: center;
201
- padding: ${theme.spacing["5xs"]};
201
+ padding: ${theme.spacing.spacing_20};
202
202
  border: 1px solid ${theme.palette.border.default};
203
203
  border-radius: ${theme.shape.segmentedControl};
204
204
  `}
package/dist/index.mjs CHANGED
@@ -90,17 +90,17 @@ var SegmentedControlProvider = ({
90
90
  import styled from "@emotion/styled";
91
91
  var SegmentedControlOptionStyled = styled.button`
92
92
  ${({ theme, showLabel }) => `
93
- ${theme.fontStyles.body2};
93
+ ${theme.fontStyles.bodyMdRegular};
94
94
 
95
95
  display: flex;
96
96
  align-items: center;
97
- gap: ${theme.spacing["5xs"]};
97
+ gap: ${theme.spacing.spacing_20};
98
98
  cursor: pointer;
99
99
  background-color: ${theme.palette.surface.contrast};
100
100
  color: ${theme.palette.content.default};
101
101
  border: none;
102
102
  border-radius: ${theme.shape.button};
103
- padding: ${theme.spacing["5xs"]} ${theme.spacing[showLabel ? "3xs" : "5xs"]};
103
+ padding: ${theme.spacing.spacing_20} ${theme.spacing[showLabel ? "spacing_40" : "spacing_20"]};
104
104
 
105
105
  &:not(:disabled):hover {
106
106
  background-color: ${theme.palette.primary.light};
@@ -170,7 +170,7 @@ var SegmentedControlStyled = styled2.div`
170
170
  ${({ theme }) => `
171
171
  display: inline-flex;
172
172
  align-items: center;
173
- padding: ${theme.spacing["5xs"]};
173
+ padding: ${theme.spacing.spacing_20};
174
174
  border: 1px solid ${theme.palette.border.default};
175
175
  border-radius: ${theme.shape.segmentedControl};
176
176
  `}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dt-dds/react-segmented-control",
3
- "version": "1.0.0-beta.31",
3
+ "version": "1.0.0-beta.33",
4
4
  "license": "MIT",
5
5
  "exports": {
6
6
  ".": "./dist/index.js"
@@ -20,10 +20,10 @@
20
20
  "test:update:snapshot": "jest -u"
21
21
  },
22
22
  "dependencies": {
23
- "@dt-dds/react-core": "1.0.0-beta.43",
24
- "@dt-dds/react-icon": "1.0.0-beta.44",
25
- "@dt-dds/react-tooltip": "1.0.0-beta.51",
26
- "@dt-dds/themes": "1.0.0-beta.3"
23
+ "@dt-dds/react-core": "1.0.0-beta.45",
24
+ "@dt-dds/react-icon": "1.0.0-beta.46",
25
+ "@dt-dds/react-tooltip": "1.0.0-beta.53",
26
+ "@dt-dds/themes": "1.0.0-beta.5"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@babel/core": "^7.22.9",
@@ -44,7 +44,7 @@
44
44
  "react": "^18.1.0",
45
45
  "react-dom": "^18.2.0",
46
46
  "tsconfig": "*",
47
- "tsup": "^6.6.3",
47
+ "tsup": "^8.5.0",
48
48
  "typescript": "^4.5.3"
49
49
  },
50
50
  "peerDependencies": {