@doist/reactist 17.5.0 → 17.7.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/README.md CHANGED
@@ -140,16 +140,60 @@ MacOS users might need to upgrade watchman with `brew install watchman` when exp
140
140
 
141
141
  A new version of reactist is published both on npm and GitHub Package Registry whenever a new release on GitHub is created.
142
142
 
143
- To begin the process, update CHANGELOG.md with the new version and its changes
143
+ ## Before merging your changes
144
144
 
145
- To update the version in both `package.json` and `package-lock.json`:
145
+ In the GitHub PR that contains your new changes, make sure that you also include the following:
146
+
147
+ 1. Add tests for bugs and new feature
148
+
149
+ 2. Update relevant docs (storybooks, readme)
150
+
151
+ 3. Execute:
152
+
153
+ ```sh
154
+ npm run validate
155
+ ```
156
+
157
+ and make sure no errors nor warnings are shown
158
+
159
+ 4. Describe your changes in [`CHANGELOG.md`](CHANGELOG.md)
160
+
161
+ 5. Bump the version in [`package.json`](package.json) and [`package-lock.json`](package-lock.json) by running:
146
162
 
147
163
  ```sh
148
164
  npm --no-git-tag-version version <major|minor|patch>
149
165
  ```
150
166
 
151
- Once these changes have been pushed and merged, create a release.
167
+ [ref](https://docs.npmjs.com/cli/v6/commands/npm-version)
168
+
169
+ 6. Update all static build artifacts:
170
+
171
+ ```sh
172
+ npm run build-all
173
+ ```
174
+
175
+ Note that the steps above are also documented in the [PR template](.github/PULL_REQUEST_TEMPLATE.md) that you will be prompted with whenever you open a new reactist GitHub PR.
176
+
177
+ ## After merging your changes
178
+
179
+ Once your changes have been merged to `main`, create a new GitHub release:
180
+
181
+ 1. Visit https://github.com/Doist/reactist/releases/new
182
+
183
+ 2. In the "Choose a tag" dropdown, type the new release version (i.e. vX.Y.Z) and select "Create new tag: vX.Y.Z on publish"
184
+
185
+ 3. In the "Release title" field, type the new release version (i.e. vX.Y.Z)
186
+
187
+ 4. In the "Describe the release" box, paste the same content you added to the [`CHANGELOG.md`](CHANGELOG.md), but without the title header
188
+
189
+ 5. Make sure the "Set as the latest release" checkbox is checked
190
+
191
+ 6. Click "Publish release"
192
+
193
+ 7. Visit https://github.com/Doist/reactist/actions
194
+
195
+ 8. Make sure that a new GitHub action is now running (this will automatically perform all the necessary steps to publish the package)
152
196
 
153
- A GitHub Action will automatically perform all the necessary steps and will release the version number that's specified inside the `package.json`'s `version` field so make sure that the release tag reflects the version you want to publish.
197
+ 9. Once the action is complete, check https://npmjs.com/package/@doist/reactist and verify that there's a new public release
154
198
 
155
- Finally, once the release has been created be sure to update both [todoist-web](https://github.com/Doist/todoist-web) and [twist-web](https://github.com/Doist/twist-web) to use the new version.
199
+ Finally, be sure to update both [todoist-web](https://github.com/Doist/todoist-web) and [twist-web](https://github.com/Doist/twist-web) to use the new reactist version you just published.
@@ -11,6 +11,7 @@ var flattenChildren = _interopDefault(require('react-keyed-flatten-children'));
11
11
  var tooltip = require('ariakit/tooltip');
12
12
  var portal = require('ariakit/portal');
13
13
  var ariakitUtils = require('ariakit-utils');
14
+ var useCallbackRef = require('use-callback-ref');
14
15
  var FocusLock = _interopDefault(require('react-focus-lock'));
15
16
  var ariaHidden = require('aria-hidden');
16
17
  var dialog = require('ariakit/dialog');
@@ -1713,7 +1714,7 @@ function PasswordHiddenIcon(props) {
1713
1714
 
1714
1715
  var modules_3f03ead6 = {"inputWrapper":"_66b448b3"};
1715
1716
 
1716
- var modules_aaf25250 = {"inputWrapper":"_9d172ece","bordered":"c59d0239","error":"_7e63ee20"};
1717
+ var modules_aaf25250 = {"inputWrapper":"fb09cd05","bordered":"f65f40dd","error":"_29118bf0","startIcon":"a40eb111"};
1717
1718
 
1718
1719
  const _excluded$j = ["variant", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "maxWidth", "togglePasswordLabel", "hidden", "aria-describedby"];
1719
1720
  const PasswordField = /*#__PURE__*/React.forwardRef(function PasswordField(_ref, ref) {
@@ -1946,7 +1947,7 @@ function TextArea(_ref) {
1946
1947
  }, /*#__PURE__*/React.createElement("textarea", _objectSpread2(_objectSpread2({}, props), extraProps))));
1947
1948
  }
1948
1949
 
1949
- const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby"];
1950
+ const _excluded$n = ["variant", "id", "label", "secondaryLabel", "auxiliaryLabel", "hint", "message", "tone", "type", "maxWidth", "hidden", "aria-describedby", "startIcon"];
1950
1951
  const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1951
1952
  let {
1952
1953
  variant = 'default',
@@ -1960,10 +1961,20 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1960
1961
  type = 'text',
1961
1962
  maxWidth,
1962
1963
  hidden,
1963
- 'aria-describedby': ariaDescribedBy
1964
+ 'aria-describedby': ariaDescribedBy,
1965
+ startIcon
1964
1966
  } = _ref,
1965
1967
  props = _objectWithoutProperties(_ref, _excluded$n);
1966
1968
 
1969
+ const internalRef = React.useRef(null);
1970
+ const combinedRef = useCallbackRef.useMergeRefs([ref, internalRef]);
1971
+
1972
+ function focusOnIconClick() {
1973
+ var _internalRef$current;
1974
+
1975
+ (_internalRef$current = internalRef.current) == null ? void 0 : _internalRef$current.focus();
1976
+ }
1977
+
1967
1978
  return /*#__PURE__*/React.createElement(BaseField, {
1968
1979
  variant: variant,
1969
1980
  id: id,
@@ -1977,10 +1988,19 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(_ref, ref) {
1977
1988
  hidden: hidden,
1978
1989
  "aria-describedby": ariaDescribedBy
1979
1990
  }, extraProps => /*#__PURE__*/React.createElement(Box, {
1991
+ display: "flex",
1992
+ alignItems: "center",
1980
1993
  className: [modules_aaf25250.inputWrapper, tone === 'error' ? modules_aaf25250.error : null, variant === 'bordered' ? modules_aaf25250.bordered : null]
1981
- }, /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
1994
+ }, startIcon ? /*#__PURE__*/React.createElement(Box, {
1995
+ display: "flex",
1996
+ className: modules_aaf25250.startIcon,
1997
+ onClick: focusOnIconClick,
1998
+ marginRight: "-xsmall",
1999
+ marginLeft: "small",
2000
+ "aria-hidden": true
2001
+ }, startIcon) : null, /*#__PURE__*/React.createElement("input", _objectSpread2(_objectSpread2(_objectSpread2({}, props), extraProps), {}, {
1982
2002
  type: type,
1983
- ref: ref
2003
+ ref: combinedRef
1984
2004
  }))));
1985
2005
  });
1986
2006