@dhis2-ui/select 8.13.12 → 8.13.14

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.WithPrefixAndSelection = exports.WithPrefix = exports.WithPlaceholderAndSelection = exports.WithPlaceholder = exports.WithOptionsLoadingAndLoadingText = exports.WithOptionsAndOnChange = exports.WithOptionsAndMultipleSelections = exports.WithOptionsAndLoading = exports.WithOptionsAndDisabled = exports.WithOptionsAndASelection = exports.WithOptionsASelectionAndDisabled = exports.WithOnFocus = exports.WithOnBlur = exports.WithMultipleSelectionsWrapped = exports.WithMoreThanThreeOptionsAndA100PxMaxHeight = exports.WithMoreThanTenOptions = exports.WithInvalidOptions = exports.WithInvalidFilterableOptions = exports.WithInitialFocus = exports.WithFilterField = exports.WithDisabledOptionAndOnChange = exports.WithCustomOptionsAndOnChange = exports.WithClearButtonSelectionAndOnChange = exports.ShiftedIntoView = exports.FlippedPosition = exports.EmptyWithEmptyText = exports.EmptyWithEmptyComponent = exports.Empty = exports.DefaultPosition = void 0;
6
+ exports.default = exports.WithPrefixAndSelection = exports.WithPrefix = exports.WithPlaceholderAndSelection = exports.WithPlaceholder = exports.WithOptionsLoadingAndLoadingText = exports.WithOptionsAndOnChange = exports.WithOptionsAndMultipleSelections = exports.WithOptionsAndLoading = exports.WithOptionsAndDisabled = exports.WithOptionsAndASelection = exports.WithOptionsASelectionAndDisabled = exports.WithOnFocus = exports.WithOnBlur = exports.WithMultipleSelectionsWrapped = exports.WithMoreThanThreeOptionsAndA100PxMaxHeight = exports.WithMoreThanTenOptions = exports.WithInvalidOptions = exports.WithInvalidFilterableOptions = exports.WithInitialFocus = exports.WithFilterField = exports.WithDisabledOptionAndOnChange = exports.WithCustomOptionsAndOnChange = exports.WithClearButtonSelectionAndOnChange = exports.ShiftedIntoView = exports.FlippedPosition = exports.EmptyWithEmptyText = exports.EmptyWithEmptyComponent = exports.Empty = exports.DenseWithSelections = exports.Dense = exports.DefaultPosition = void 0;
7
7
 
8
8
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
9
 
@@ -185,6 +185,20 @@ WithInitialFocus.parameters = {
185
185
  }
186
186
  };
187
187
  WithInitialFocus.storyName = 'With initialFocus';
188
+ const Dense = WithOptionsTemplate.bind({});
189
+ exports.Dense = Dense;
190
+ Dense.args = {
191
+ dense: true,
192
+ placeholder: 'Dense sized multi select'
193
+ };
194
+ Dense.storyName = 'Dense';
195
+ const DenseWithSelections = WithOptionsTemplate.bind({});
196
+ exports.DenseWithSelections = DenseWithSelections;
197
+ DenseWithSelections.args = {
198
+ dense: true,
199
+ selected: ['1', '2']
200
+ };
201
+ DenseWithSelections.storyName = 'Dense with selections';
188
202
  const Empty = EmptyTemplate.bind({});
189
203
  exports.Empty = Empty;
190
204
  const EmptyWithEmptyText = EmptyTemplate.bind({});
@@ -45,15 +45,15 @@ const InputWrapper = _ref => {
45
45
  tabIndex: tabIndex,
46
46
  ref: inputRef,
47
47
  "data-test": dataTest,
48
- className: _style.default.dynamic([["248041060", [_uiConstants.colors.grey500, _uiConstants.theme.focus, _uiConstants.theme.focus, _uiConstants.theme.valid, _uiConstants.theme.warning, _uiConstants.theme.error, _uiConstants.colors.grey100, _uiConstants.colors.grey500, _uiConstants.theme.disabled]]]) + " " + (classNames || "")
48
+ className: _style.default.dynamic([["2041994571", [_uiConstants.colors.grey500, _uiConstants.theme.focus, _uiConstants.theme.focus, _uiConstants.theme.valid, _uiConstants.theme.warning, _uiConstants.theme.error, _uiConstants.colors.grey100, _uiConstants.colors.grey500, _uiConstants.theme.disabled]]]) + " " + (classNames || "")
49
49
  }, /*#__PURE__*/_react.default.createElement("div", {
50
- className: _style.default.dynamic([["248041060", [_uiConstants.colors.grey500, _uiConstants.theme.focus, _uiConstants.theme.focus, _uiConstants.theme.valid, _uiConstants.theme.warning, _uiConstants.theme.error, _uiConstants.colors.grey100, _uiConstants.colors.grey500, _uiConstants.theme.disabled]]]) + " " + "root-children"
50
+ className: _style.default.dynamic([["2041994571", [_uiConstants.colors.grey500, _uiConstants.theme.focus, _uiConstants.theme.focus, _uiConstants.theme.valid, _uiConstants.theme.warning, _uiConstants.theme.error, _uiConstants.colors.grey100, _uiConstants.colors.grey500, _uiConstants.theme.disabled]]]) + " " + "root-children"
51
51
  }, children), /*#__PURE__*/_react.default.createElement("div", {
52
- className: _style.default.dynamic([["248041060", [_uiConstants.colors.grey500, _uiConstants.theme.focus, _uiConstants.theme.focus, _uiConstants.theme.valid, _uiConstants.theme.warning, _uiConstants.theme.error, _uiConstants.colors.grey100, _uiConstants.colors.grey500, _uiConstants.theme.disabled]]]) + " " + "root-right"
52
+ className: _style.default.dynamic([["2041994571", [_uiConstants.colors.grey500, _uiConstants.theme.focus, _uiConstants.theme.focus, _uiConstants.theme.valid, _uiConstants.theme.warning, _uiConstants.theme.error, _uiConstants.colors.grey100, _uiConstants.colors.grey500, _uiConstants.theme.disabled]]]) + " " + "root-right"
53
53
  }, /*#__PURE__*/_react.default.createElement(_uiIcons.IconChevronDown16, null)), /*#__PURE__*/_react.default.createElement(_style.default, {
54
- id: "248041060",
54
+ id: "2041994571",
55
55
  dynamic: [_uiConstants.colors.grey500, _uiConstants.theme.focus, _uiConstants.theme.focus, _uiConstants.theme.valid, _uiConstants.theme.warning, _uiConstants.theme.error, _uiConstants.colors.grey100, _uiConstants.colors.grey500, _uiConstants.theme.disabled]
56
- }, [".root.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:white;border-radius:3px;border:1px solid ".concat(_uiConstants.colors.grey500, ";box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:40px;padding:6px 12px;box-shadow:inset 0 1px 2px 0 rgba(48,54,60,0.1);}"), ".root.__jsx-style-dynamic-selector:not(.disabled):focus,.root.__jsx-style-dynamic-selector:not(.disabled):active{outline:none;box-shadow:inset 0 0 0 2px ".concat(_uiConstants.theme.focus, ";border-color:").concat(_uiConstants.theme.focus, ";}"), ".root.valid.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.valid, ";}"), ".root.warning.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.warning, ";}"), ".root.error.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.error, ";}"), ".root.disabled.__jsx-style-dynamic-selector{background-color:".concat(_uiConstants.colors.grey100, ";border-color:").concat(_uiConstants.colors.grey500, ";color:").concat(_uiConstants.theme.disabled, ";cursor:not-allowed;}"), ".root.dense.__jsx-style-dynamic-selector{padding:4px 8px;min-height:32px;}", ".root-children.__jsx-style-dynamic-selector{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".root-right.__jsx-style-dynamic-selector{margin:4px 0px 0px 8px;}"]));
56
+ }, [".root.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:white;border-radius:3px;border:1px solid ".concat(_uiConstants.colors.grey500, ";box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:40px;padding:6px 12px;box-shadow:inset 0 0 1px 0 rgba(48,54,60,0.1);}"), ".root.__jsx-style-dynamic-selector:not(.disabled):focus,.root.__jsx-style-dynamic-selector:not(.disabled):active{outline:none;box-shadow:inset 0 0 0 2px ".concat(_uiConstants.theme.focus, ";border-color:").concat(_uiConstants.theme.focus, ";}"), ".root.valid.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.valid, ";}"), ".root.warning.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.warning, ";}"), ".root.error.__jsx-style-dynamic-selector{border-color:".concat(_uiConstants.theme.error, ";}"), ".root.disabled.__jsx-style-dynamic-selector{background-color:".concat(_uiConstants.colors.grey100, ";border-color:").concat(_uiConstants.colors.grey500, ";color:").concat(_uiConstants.theme.disabled, ";cursor:not-allowed;}"), ".root.dense.__jsx-style-dynamic-selector{padding:2px 8px;min-height:32px;}", ".root-children.__jsx-style-dynamic-selector{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".root-right.__jsx-style-dynamic-selector{margin:4px 0px 0px 8px;}"]));
57
57
  };
58
58
 
59
59
  exports.InputWrapper = InputWrapper;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = exports.WithPrefixAndSelection = exports.WithPrefix = exports.WithPlaceholderAndSelection = exports.WithPlaceholder = exports.WithOptionsLoadingAndLoadingText = exports.WithOptionsAndOnChange = exports.WithOptionsAndLoading = exports.WithOptionsAndDisabled = exports.WithOptionsAndASelection = exports.WithOptionsASelectionAndDisabled = exports.WithOnFocus = exports.WithOnBlur = exports.WithMoreThanThreeOptionsAndA100PxMaxHeight = exports.WithMoreThanTenOptions = exports.WithInvalidOptions = exports.WithInvalidFilterableOptions = exports.WithInitialFocus = exports.WithFilterField = exports.WithDisabledOptionAndOnChange = exports.WithCustomOptionsAndOnChange = exports.WithClearButtonSelectionAndOnChange = exports.ShiftedIntoView = exports.FlippedPosition = exports.EmptyWithEmptyText = exports.EmptyWithEmptyComponent = exports.Empty = exports.DefaultPosition = void 0;
6
+ exports.default = exports.WithPrefixAndSelection = exports.WithPrefix = exports.WithPlaceholderAndSelection = exports.WithPlaceholder = exports.WithOptionsLoadingAndLoadingText = exports.WithOptionsAndOnChange = exports.WithOptionsAndLoading = exports.WithOptionsAndDisabled = exports.WithOptionsAndASelection = exports.WithOptionsASelectionAndDisabled = exports.WithOnFocus = exports.WithOnBlur = exports.WithMoreThanThreeOptionsAndA100PxMaxHeight = exports.WithMoreThanTenOptions = exports.WithInvalidOptions = exports.WithInvalidFilterableOptions = exports.WithInitialFocus = exports.WithFilterField = exports.WithDisabledOptionAndOnChange = exports.WithCustomOptionsAndOnChange = exports.WithClearButtonSelectionAndOnChange = exports.ShiftedIntoView = exports.FlippedPosition = exports.EmptyWithEmptyText = exports.EmptyWithEmptyComponent = exports.Empty = exports.Dense = exports.DefaultPosition = void 0;
7
7
 
8
8
  var _style = _interopRequireDefault(require("styled-jsx/style"));
9
9
 
@@ -185,6 +185,13 @@ WithInitialFocus.parameters = {
185
185
  }
186
186
  };
187
187
  WithInitialFocus.storyName = 'With initialFocus';
188
+ const Dense = WithOptionsTemplate.bind({});
189
+ exports.Dense = Dense;
190
+ Dense.args = {
191
+ dense: true,
192
+ placeholder: 'Dense sized select'
193
+ };
194
+ Dense.storyName = 'Dense';
188
195
  const Empty = EmptyTemplate.bind({});
189
196
  exports.Empty = Empty;
190
197
  const EmptyWithEmptyText = EmptyTemplate.bind({});
@@ -155,6 +155,18 @@ WithInitialFocus.parameters = {
155
155
  }
156
156
  };
157
157
  WithInitialFocus.storyName = 'With initialFocus';
158
+ export const Dense = WithOptionsTemplate.bind({});
159
+ Dense.args = {
160
+ dense: true,
161
+ placeholder: 'Dense sized multi select'
162
+ };
163
+ Dense.storyName = 'Dense';
164
+ export const DenseWithSelections = WithOptionsTemplate.bind({});
165
+ DenseWithSelections.args = {
166
+ dense: true,
167
+ selected: ['1', '2']
168
+ };
169
+ DenseWithSelections.storyName = 'Dense with selections';
158
170
  export const Empty = EmptyTemplate.bind({});
159
171
  export const EmptyWithEmptyText = EmptyTemplate.bind({});
160
172
  EmptyWithEmptyText.args = {
@@ -31,15 +31,15 @@ const InputWrapper = _ref => {
31
31
  tabIndex: tabIndex,
32
32
  ref: inputRef,
33
33
  "data-test": dataTest,
34
- className: _JSXStyle.dynamic([["248041060", [colors.grey500, theme.focus, theme.focus, theme.valid, theme.warning, theme.error, colors.grey100, colors.grey500, theme.disabled]]]) + " " + (classNames || "")
34
+ className: _JSXStyle.dynamic([["2041994571", [colors.grey500, theme.focus, theme.focus, theme.valid, theme.warning, theme.error, colors.grey100, colors.grey500, theme.disabled]]]) + " " + (classNames || "")
35
35
  }, /*#__PURE__*/React.createElement("div", {
36
- className: _JSXStyle.dynamic([["248041060", [colors.grey500, theme.focus, theme.focus, theme.valid, theme.warning, theme.error, colors.grey100, colors.grey500, theme.disabled]]]) + " " + "root-children"
36
+ className: _JSXStyle.dynamic([["2041994571", [colors.grey500, theme.focus, theme.focus, theme.valid, theme.warning, theme.error, colors.grey100, colors.grey500, theme.disabled]]]) + " " + "root-children"
37
37
  }, children), /*#__PURE__*/React.createElement("div", {
38
- className: _JSXStyle.dynamic([["248041060", [colors.grey500, theme.focus, theme.focus, theme.valid, theme.warning, theme.error, colors.grey100, colors.grey500, theme.disabled]]]) + " " + "root-right"
38
+ className: _JSXStyle.dynamic([["2041994571", [colors.grey500, theme.focus, theme.focus, theme.valid, theme.warning, theme.error, colors.grey100, colors.grey500, theme.disabled]]]) + " " + "root-right"
39
39
  }, /*#__PURE__*/React.createElement(IconChevronDown16, null)), /*#__PURE__*/React.createElement(_JSXStyle, {
40
- id: "248041060",
40
+ id: "2041994571",
41
41
  dynamic: [colors.grey500, theme.focus, theme.focus, theme.valid, theme.warning, theme.error, colors.grey100, colors.grey500, theme.disabled]
42
- }, [".root.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:white;border-radius:3px;border:1px solid ".concat(colors.grey500, ";box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:40px;padding:6px 12px;box-shadow:inset 0 1px 2px 0 rgba(48,54,60,0.1);}"), ".root.__jsx-style-dynamic-selector:not(.disabled):focus,.root.__jsx-style-dynamic-selector:not(.disabled):active{outline:none;box-shadow:inset 0 0 0 2px ".concat(theme.focus, ";border-color:").concat(theme.focus, ";}"), ".root.valid.__jsx-style-dynamic-selector{border-color:".concat(theme.valid, ";}"), ".root.warning.__jsx-style-dynamic-selector{border-color:".concat(theme.warning, ";}"), ".root.error.__jsx-style-dynamic-selector{border-color:".concat(theme.error, ";}"), ".root.disabled.__jsx-style-dynamic-selector{background-color:".concat(colors.grey100, ";border-color:").concat(colors.grey500, ";color:").concat(theme.disabled, ";cursor:not-allowed;}"), ".root.dense.__jsx-style-dynamic-selector{padding:4px 8px;min-height:32px;}", ".root-children.__jsx-style-dynamic-selector{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".root-right.__jsx-style-dynamic-selector{margin:4px 0px 0px 8px;}"]));
42
+ }, [".root.__jsx-style-dynamic-selector{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:white;border-radius:3px;border:1px solid ".concat(colors.grey500, ";box-sizing:border-box;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;min-height:40px;padding:6px 12px;box-shadow:inset 0 0 1px 0 rgba(48,54,60,0.1);}"), ".root.__jsx-style-dynamic-selector:not(.disabled):focus,.root.__jsx-style-dynamic-selector:not(.disabled):active{outline:none;box-shadow:inset 0 0 0 2px ".concat(theme.focus, ";border-color:").concat(theme.focus, ";}"), ".root.valid.__jsx-style-dynamic-selector{border-color:".concat(theme.valid, ";}"), ".root.warning.__jsx-style-dynamic-selector{border-color:".concat(theme.warning, ";}"), ".root.error.__jsx-style-dynamic-selector{border-color:".concat(theme.error, ";}"), ".root.disabled.__jsx-style-dynamic-selector{background-color:".concat(colors.grey100, ";border-color:").concat(colors.grey500, ";color:").concat(theme.disabled, ";cursor:not-allowed;}"), ".root.dense.__jsx-style-dynamic-selector{padding:2px 8px;min-height:32px;}", ".root-children.__jsx-style-dynamic-selector{-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;}", ".root-right.__jsx-style-dynamic-selector{margin:4px 0px 0px 8px;}"]));
43
43
  };
44
44
 
45
45
  InputWrapper.defaultProps = {
@@ -155,6 +155,12 @@ WithInitialFocus.parameters = {
155
155
  }
156
156
  };
157
157
  WithInitialFocus.storyName = 'With initialFocus';
158
+ export const Dense = WithOptionsTemplate.bind({});
159
+ Dense.args = {
160
+ dense: true,
161
+ placeholder: 'Dense sized select'
162
+ };
163
+ Dense.storyName = 'Dense';
158
164
  export const Empty = EmptyTemplate.bind({});
159
165
  export const EmptyWithEmptyText = EmptyTemplate.bind({});
160
166
  EmptyWithEmptyText.args = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dhis2-ui/select",
3
- "version": "8.13.12",
3
+ "version": "8.13.14",
4
4
  "description": "UI Select",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,19 +33,19 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@dhis2/prop-types": "^3.1.2",
36
- "@dhis2-ui/box": "8.13.12",
37
- "@dhis2-ui/button": "8.13.12",
38
- "@dhis2-ui/card": "8.13.12",
39
- "@dhis2-ui/checkbox": "8.13.12",
40
- "@dhis2-ui/chip": "8.13.12",
41
- "@dhis2-ui/field": "8.13.12",
42
- "@dhis2-ui/input": "8.13.12",
43
- "@dhis2-ui/layer": "8.13.12",
44
- "@dhis2-ui/loader": "8.13.12",
45
- "@dhis2-ui/popper": "8.13.12",
46
- "@dhis2-ui/status-icon": "8.13.12",
47
- "@dhis2/ui-constants": "8.13.12",
48
- "@dhis2/ui-icons": "8.13.12",
36
+ "@dhis2-ui/box": "8.13.14",
37
+ "@dhis2-ui/button": "8.13.14",
38
+ "@dhis2-ui/card": "8.13.14",
39
+ "@dhis2-ui/checkbox": "8.13.14",
40
+ "@dhis2-ui/chip": "8.13.14",
41
+ "@dhis2-ui/field": "8.13.14",
42
+ "@dhis2-ui/input": "8.13.14",
43
+ "@dhis2-ui/layer": "8.13.14",
44
+ "@dhis2-ui/loader": "8.13.14",
45
+ "@dhis2-ui/popper": "8.13.14",
46
+ "@dhis2-ui/status-icon": "8.13.14",
47
+ "@dhis2/ui-constants": "8.13.14",
48
+ "@dhis2/ui-icons": "8.13.14",
49
49
  "classnames": "^2.3.1",
50
50
  "prop-types": "^15.7.2"
51
51
  },