react-timezone-select 2.1.2 → 2.1.5

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/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
package/dist/index.cjs CHANGED
@@ -183,6 +183,9 @@ function useTimezoneSelect({
183
183
  case "abbrev":
184
184
  label = `${prefix} (${abbr.substring(0, maxAbbrLength)})`;
185
185
  break;
186
+ case "offsetHidden":
187
+ label = `${prefix.replace(/^\(.*?\)\s*/, "")}`;
188
+ break;
186
189
  default:
187
190
  label = `${prefix}`;
188
191
  }
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { Props as Props$1 } from 'react-select';
3
3
  declare type ICustomTimezone = {
4
4
  [key: string]: string;
5
5
  };
6
- declare type ILabelStyle = 'original' | 'altName' | 'abbrev';
6
+ declare type ILabelStyle = 'original' | 'altName' | 'abbrev' | 'offsetHidden';
7
7
  declare type IDisplayValue = 'GMT' | 'UTC';
8
8
  declare type ITimezoneOption = {
9
9
  value: string;
@@ -21,7 +21,7 @@ declare type TimezoneSelectOptions = {
21
21
  };
22
22
  declare type Props = Omit<Props$1<ITimezone, false>, 'onChange'> & TimezoneSelectOptions & {
23
23
  value: ITimezone;
24
- onChange?: (timezone: ITimezoneOption) => void;
24
+ onChange?: (timezone: ITimezone) => void;
25
25
  };
26
26
 
27
27
  declare const allTimezones: ICustomTimezone;
@@ -0,0 +1,43 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7
+ <meta name="theme-color" content="#000000">
8
+ <!--
9
+ manifest.json provides metadata used when your web app is added to the
10
+ homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
11
+ -->
12
+ <link rel="manifest" href="%PUBLIC_URL%/manifest.json">
13
+ <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
14
+ <!--
15
+ Notice the use of %PUBLIC_URL% in the tags above.
16
+ It will be replaced with the URL of the `public` folder during the build.
17
+ Only files inside the `public` folder can be referenced from the HTML.
18
+
19
+ Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
20
+ work correctly both with client-side routing and a non-root public URL.
21
+ Learn how to configure a non-root public URL by running `npm run build`.
22
+ -->
23
+ <title>React App</title>
24
+ </head>
25
+
26
+ <body>
27
+ <noscript>
28
+ You need to enable JavaScript to run this app.
29
+ </noscript>
30
+ <div id="root"></div>
31
+ <!--
32
+ This HTML file is a template.
33
+ If you open it directly in the browser, you will see an empty page.
34
+
35
+ You can add webfonts, meta tags, or analytics to this file.
36
+ The build step will place the bundled scripts into the <body> tag.
37
+
38
+ To begin the development, run `npm start` or `yarn start`.
39
+ To create a production bundle, use `npm run build` or `yarn build`.
40
+ -->
41
+ </body>
42
+
43
+ </html>
package/dist/index.js CHANGED
@@ -151,6 +151,9 @@ function useTimezoneSelect({
151
151
  case "abbrev":
152
152
  label = `${prefix} (${abbr.substring(0, maxAbbrLength)})`;
153
153
  break;
154
+ case "offsetHidden":
155
+ label = `${prefix.replace(/^\(.*?\)\s*/, "")}`;
156
+ break;
154
157
  default:
155
158
  label = `${prefix}`;
156
159
  }
@@ -0,0 +1,26 @@
1
+ * {
2
+ font-family: Helvetica;
3
+ }
4
+
5
+ .App {
6
+ display: flex;
7
+ align-items: center;
8
+ flex-direction: column;
9
+ }
10
+
11
+ .select-wrapper {
12
+ margin-top: 50px;
13
+ width: 500px;
14
+ }
15
+
16
+ .code,
17
+ .code span {
18
+ background-color: #efefef;
19
+ font-family: monospace;
20
+ }
21
+
22
+ .code {
23
+ padding: 10px;
24
+ line-height: 2;
25
+ font-size: 1.4rem;
26
+ }
package/package.json CHANGED
@@ -1,7 +1,20 @@
1
1
  {
2
2
  "name": "react-timezone-select",
3
- "version": "2.1.2",
3
+ "version": "2.1.5",
4
4
  "description": "Usable, dynamic React Timezone Select",
5
+ "scripts": {
6
+ "dev": "concurrently \"tsup src/index.tsx --format esm --watch\" \"cd example && pnpm dev\"",
7
+ "prepublishOnly": "pnpm run build",
8
+ "postpublish": "pnpm run build:example && npm run deploy",
9
+ "build": "tsup src/index.tsx --format cjs,esm --dts",
10
+ "build:example": "cd example && pnpm run build",
11
+ "deploy": "gh-pages -d example/dist",
12
+ "pretest": "pnpm run build",
13
+ "test": "jest",
14
+ "test:watch": "jest --watch",
15
+ "test:ci": "pnpm run build && jest --ci ",
16
+ "tsc": "tsc"
17
+ },
5
18
  "author": "Nico Domino <yo@ndo.dev>",
6
19
  "homepage": "https://github.com/ndom91/react-timezone-select",
7
20
  "repository": {
@@ -101,16 +114,5 @@
101
114
  "*.{js,jsx}": [
102
115
  "eslint --fix"
103
116
  ]
104
- },
105
- "scripts": {
106
- "dev": "concurrently \"tsup src/index.tsx --format esm --watch\" \"cd example && pnpm dev\"",
107
- "build": "tsup src/index.tsx --format cjs,esm --dts",
108
- "build:example": "cd example && pnpm run build",
109
- "deploy": "gh-pages -d example/dist",
110
- "pretest": "pnpm run build",
111
- "test": "jest",
112
- "test:watch": "jest --watch",
113
- "test:ci": "pnpm run build && jest --ci ",
114
- "tsc": "tsc"
115
117
  }
116
- }
118
+ }