@dhis2-ui/segmented-control 7.10.3 → 7.11.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.
@@ -44,7 +44,7 @@ const SegmentedControl = ({
44
44
  }
45
45
 
46
46
  return /*#__PURE__*/_react.default.createElement("div", {
47
- className: _style.default.dynamic([["3671059937", [_uiConstants.colors.grey400, _uiConstants.colors.grey050, _uiConstants.colors.grey600, _uiConstants.spacers.dp8, _uiConstants.spacers.dp16, _uiConstants.theme.focus, _uiConstants.colors.grey100, _uiConstants.colors.grey700, _uiConstants.colors.teal800, _uiConstants.colors.teal600]]]) + " " + "segmented-control"
47
+ className: _style.default.dynamic([["1782675663", [_uiConstants.colors.grey400, _uiConstants.colors.grey050, _uiConstants.colors.grey600, _uiConstants.spacers.dp8, _uiConstants.spacers.dp16, _uiConstants.theme.focus, _uiConstants.colors.grey100, _uiConstants.colors.grey700, _uiConstants.colors.teal800, _uiConstants.colors.teal600, _uiConstants.colors.teal700]]]) + " " + "segmented-control"
48
48
  }, options.map(({
49
49
  label,
50
50
  value,
@@ -56,14 +56,14 @@ const SegmentedControl = ({
56
56
  value
57
57
  }, e),
58
58
  disabled: disabled,
59
- className: _style.default.dynamic([["3671059937", [_uiConstants.colors.grey400, _uiConstants.colors.grey050, _uiConstants.colors.grey600, _uiConstants.spacers.dp8, _uiConstants.spacers.dp16, _uiConstants.theme.focus, _uiConstants.colors.grey100, _uiConstants.colors.grey700, _uiConstants.colors.teal800, _uiConstants.colors.teal600]]]) + " " + ((0, _classnames.default)('segment', {
59
+ className: _style.default.dynamic([["1782675663", [_uiConstants.colors.grey400, _uiConstants.colors.grey050, _uiConstants.colors.grey600, _uiConstants.spacers.dp8, _uiConstants.spacers.dp16, _uiConstants.theme.focus, _uiConstants.colors.grey100, _uiConstants.colors.grey700, _uiConstants.colors.teal800, _uiConstants.colors.teal600, _uiConstants.colors.teal700]]]) + " " + ((0, _classnames.default)('segment', {
60
60
  selected: value === selected,
61
61
  disabled
62
62
  }) || "")
63
63
  }, label)), /*#__PURE__*/_react.default.createElement(_style.default, {
64
- id: "3671059937",
65
- dynamic: [_uiConstants.colors.grey400, _uiConstants.colors.grey050, _uiConstants.colors.grey600, _uiConstants.spacers.dp8, _uiConstants.spacers.dp16, _uiConstants.theme.focus, _uiConstants.colors.grey100, _uiConstants.colors.grey700, _uiConstants.colors.teal800, _uiConstants.colors.teal600]
66
- }, [".segmented-control.__jsx-style-dynamic-selector{position:relative;z-index:0;}", `.segment.__jsx-style-dynamic-selector{all:unset;box-sizing:border-box;display:inline-block;position:relative;cursor:pointer;font-size:14px;text-align:center;border:1px solid ${_uiConstants.colors.grey400};border-right-width:0;background:${_uiConstants.colors.grey050};color:${_uiConstants.colors.grey600};min-width:72px;max-width:320px;padding:${_uiConstants.spacers.dp8} ${_uiConstants.spacers.dp16};}`, `.segment.__jsx-style-dynamic-selector:focus{z-index:1;outline:3px solid ${_uiConstants.theme.focus};outline-offset:2px;}`, ".segment.__jsx-style-dynamic-selector:focus.__jsx-style-dynamic-selector:not(:focus-visible){outline:none;}", `.segment.__jsx-style-dynamic-selector:not(.selected):hover,.segment.__jsx-style-dynamic-selector:not(.selected):focus{background:${_uiConstants.colors.grey100};color:${_uiConstants.colors.grey700};}`, ".segment.__jsx-style-dynamic-selector:first-of-type{border-radius:3px 0 0 3px;}", ".segment.__jsx-style-dynamic-selector:last-of-type{border-right-width:1px;border-radius:0 3px 3px 0;}", `.segment.selected.__jsx-style-dynamic-selector{cursor:default;font-weight:600;border:1px solid ${_uiConstants.colors.teal800};background:${_uiConstants.colors.teal600};color:white;}`, ".segment.selected.__jsx-style-dynamic-selector:not(:last-of-type){z-index:1;margin-right:-1px;}", ".segment.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;opacity:0.5;}"]));
64
+ id: "1782675663",
65
+ dynamic: [_uiConstants.colors.grey400, _uiConstants.colors.grey050, _uiConstants.colors.grey600, _uiConstants.spacers.dp8, _uiConstants.spacers.dp16, _uiConstants.theme.focus, _uiConstants.colors.grey100, _uiConstants.colors.grey700, _uiConstants.colors.teal800, _uiConstants.colors.teal600, _uiConstants.colors.teal700]
66
+ }, [".segmented-control.__jsx-style-dynamic-selector{position:relative;z-index:0;}", `.segment.__jsx-style-dynamic-selector{all:unset;box-sizing:border-box;display:inline-block;position:relative;cursor:pointer;font-size:14px;text-align:center;border:1px solid ${_uiConstants.colors.grey400};border-right-width:0;background:${_uiConstants.colors.grey050};color:${_uiConstants.colors.grey600};min-width:72px;max-width:320px;padding:${_uiConstants.spacers.dp8} ${_uiConstants.spacers.dp16};}`, `.segment.__jsx-style-dynamic-selector:focus{outline:3px solid ${_uiConstants.theme.focus};outline-offset:-3px;}`, ".segment.__jsx-style-dynamic-selector:focus.__jsx-style-dynamic-selector:not(:focus-visible){outline:none;}", `.segment.__jsx-style-dynamic-selector:not(.selected):hover,.segment.__jsx-style-dynamic-selector:not(.selected):focus{background:${_uiConstants.colors.grey100};color:${_uiConstants.colors.grey700};}`, ".segment.__jsx-style-dynamic-selector:first-of-type{border-radius:3px 0 0 3px;}", ".segment.__jsx-style-dynamic-selector:last-of-type{border-right-width:1px;border-radius:0 3px 3px 0;}", `.segment.selected.__jsx-style-dynamic-selector{cursor:default;font-weight:600;border:1px solid ${_uiConstants.colors.teal800};background:${_uiConstants.colors.teal600};color:white;}`, ".segment.selected.__jsx-style-dynamic-selector:not(:last-of-type){z-index:1;margin-right:-1px;}", `.segment.selected.__jsx-style-dynamic-selector:focus{background:${_uiConstants.colors.teal700};}`, ".segment.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;opacity:0.5;}"]));
67
67
  };
68
68
 
69
69
  exports.SegmentedControl = SegmentedControl;
@@ -31,7 +31,7 @@ export const SegmentedControl = ({
31
31
  }
32
32
 
33
33
  return /*#__PURE__*/React.createElement("div", {
34
- className: _JSXStyle.dynamic([["3671059937", [colors.grey400, colors.grey050, colors.grey600, spacers.dp8, spacers.dp16, theme.focus, colors.grey100, colors.grey700, colors.teal800, colors.teal600]]]) + " " + "segmented-control"
34
+ className: _JSXStyle.dynamic([["1782675663", [colors.grey400, colors.grey050, colors.grey600, spacers.dp8, spacers.dp16, theme.focus, colors.grey100, colors.grey700, colors.teal800, colors.teal600, colors.teal700]]]) + " " + "segmented-control"
35
35
  }, options.map(({
36
36
  label,
37
37
  value,
@@ -43,14 +43,14 @@ export const SegmentedControl = ({
43
43
  value
44
44
  }, e),
45
45
  disabled: disabled,
46
- className: _JSXStyle.dynamic([["3671059937", [colors.grey400, colors.grey050, colors.grey600, spacers.dp8, spacers.dp16, theme.focus, colors.grey100, colors.grey700, colors.teal800, colors.teal600]]]) + " " + (cx('segment', {
46
+ className: _JSXStyle.dynamic([["1782675663", [colors.grey400, colors.grey050, colors.grey600, spacers.dp8, spacers.dp16, theme.focus, colors.grey100, colors.grey700, colors.teal800, colors.teal600, colors.teal700]]]) + " " + (cx('segment', {
47
47
  selected: value === selected,
48
48
  disabled
49
49
  }) || "")
50
50
  }, label)), /*#__PURE__*/React.createElement(_JSXStyle, {
51
- id: "3671059937",
52
- dynamic: [colors.grey400, colors.grey050, colors.grey600, spacers.dp8, spacers.dp16, theme.focus, colors.grey100, colors.grey700, colors.teal800, colors.teal600]
53
- }, [".segmented-control.__jsx-style-dynamic-selector{position:relative;z-index:0;}", `.segment.__jsx-style-dynamic-selector{all:unset;box-sizing:border-box;display:inline-block;position:relative;cursor:pointer;font-size:14px;text-align:center;border:1px solid ${colors.grey400};border-right-width:0;background:${colors.grey050};color:${colors.grey600};min-width:72px;max-width:320px;padding:${spacers.dp8} ${spacers.dp16};}`, `.segment.__jsx-style-dynamic-selector:focus{z-index:1;outline:3px solid ${theme.focus};outline-offset:2px;}`, ".segment.__jsx-style-dynamic-selector:focus.__jsx-style-dynamic-selector:not(:focus-visible){outline:none;}", `.segment.__jsx-style-dynamic-selector:not(.selected):hover,.segment.__jsx-style-dynamic-selector:not(.selected):focus{background:${colors.grey100};color:${colors.grey700};}`, ".segment.__jsx-style-dynamic-selector:first-of-type{border-radius:3px 0 0 3px;}", ".segment.__jsx-style-dynamic-selector:last-of-type{border-right-width:1px;border-radius:0 3px 3px 0;}", `.segment.selected.__jsx-style-dynamic-selector{cursor:default;font-weight:600;border:1px solid ${colors.teal800};background:${colors.teal600};color:white;}`, ".segment.selected.__jsx-style-dynamic-selector:not(:last-of-type){z-index:1;margin-right:-1px;}", ".segment.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;opacity:0.5;}"]));
51
+ id: "1782675663",
52
+ dynamic: [colors.grey400, colors.grey050, colors.grey600, spacers.dp8, spacers.dp16, theme.focus, colors.grey100, colors.grey700, colors.teal800, colors.teal600, colors.teal700]
53
+ }, [".segmented-control.__jsx-style-dynamic-selector{position:relative;z-index:0;}", `.segment.__jsx-style-dynamic-selector{all:unset;box-sizing:border-box;display:inline-block;position:relative;cursor:pointer;font-size:14px;text-align:center;border:1px solid ${colors.grey400};border-right-width:0;background:${colors.grey050};color:${colors.grey600};min-width:72px;max-width:320px;padding:${spacers.dp8} ${spacers.dp16};}`, `.segment.__jsx-style-dynamic-selector:focus{outline:3px solid ${theme.focus};outline-offset:-3px;}`, ".segment.__jsx-style-dynamic-selector:focus.__jsx-style-dynamic-selector:not(:focus-visible){outline:none;}", `.segment.__jsx-style-dynamic-selector:not(.selected):hover,.segment.__jsx-style-dynamic-selector:not(.selected):focus{background:${colors.grey100};color:${colors.grey700};}`, ".segment.__jsx-style-dynamic-selector:first-of-type{border-radius:3px 0 0 3px;}", ".segment.__jsx-style-dynamic-selector:last-of-type{border-right-width:1px;border-radius:0 3px 3px 0;}", `.segment.selected.__jsx-style-dynamic-selector{cursor:default;font-weight:600;border:1px solid ${colors.teal800};background:${colors.teal600};color:white;}`, ".segment.selected.__jsx-style-dynamic-selector:not(:last-of-type){z-index:1;margin-right:-1px;}", `.segment.selected.__jsx-style-dynamic-selector:focus{background:${colors.teal700};}`, ".segment.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;opacity:0.5;}"]));
54
54
  };
55
55
  SegmentedControl.propTypes = {
56
56
  /** Options to populate the segmented control */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/segmented-control",
3
- "version": "7.10.3",
3
+ "version": "7.11.1",
4
4
  "description": "UI Segmented Control",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@dhis2/prop-types": "^3.0.0-beta.1",
35
- "@dhis2/ui-constants": "7.10.3",
35
+ "@dhis2/ui-constants": "7.11.1",
36
36
  "classnames": "^2.3.1",
37
37
  "prop-types": "^15.7.2"
38
38
  },