@vygruppen/spor-react 3.4.4 → 3.5.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.
@@ -1,21 +1,22 @@
1
1
 
2
- > @vygruppen/spor-react@3.4.4 build
2
+ > @vygruppen/spor-react@3.5.1 build
3
3
  > tsup src/index.tsx --dts --treeshake --format cjs,esm
4
4
 
5
5
  CLI Building entry: src/index.tsx
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v6.7.0
8
- CLI Target: node14
7
+ CLI tsup v7.2.0
8
+ CLI Target: node16
9
9
  CJS Build start
10
10
  ESM Build start
11
11
  DTS Build start
12
+ "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-HZ6V7HFA.mjs".
12
13
  "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/index.js".
13
- "toZoned" and "toTime" are imported from external module "@internationalized/date" but never used in "dist/chunk-QBIZVUPL.mjs".
14
- CJS dist/index.js 903.84 KB
15
- CJS ⚡️ Build success in 6056ms
16
- ESM dist/index.mjs 2.01 KB
17
- ESM dist/CountryCodeSelect-7GGNROZW.mjs 350.82 KB
18
- ESM dist/chunk-QBIZVUPL.mjs 420.97 KB
19
- ESM ⚡️ Build success in 6061ms
20
- DTS ⚡️ Build success in 22140ms
21
- DTS dist/index.d.ts 252.53 KB
14
+ ESM dist/index.mjs 2.06 KB
15
+ ESM dist/CountryCodeSelect-IS3VUSPZ.mjs 1.19 KB
16
+ ESM dist/chunk-HZ6V7HFA.mjs 425.35 KB
17
+ ESM ⚡️ Build success in 5965ms
18
+ CJS dist/index.js 531.62 KB
19
+ CJS ⚡️ Build success in 5966ms
20
+ DTS ⚡️ Build success in 23687ms
21
+ DTS dist/index.d.ts 253.60 KB
22
+ DTS dist/index.d.mts 253.60 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 3.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6ca2f865: Update internal dependencies"
8
+ - 01f4a68c: FloatingActionButton: Enable server rendering
9
+ - Updated dependencies [6ca2f865]
10
+ - @vygruppen/spor-icon-react@3.2.1
11
+ - @vygruppen/spor-loader@0.3.2
12
+
13
+ ## 3.5.0
14
+
15
+ ### Minor Changes
16
+
17
+ - e05d6093: New components: Breadcrumb, BreadcrumbItem and BreadcrumbLink
18
+
3
19
  ## 3.4.4
4
20
 
5
21
  ### Patch Changes
@@ -0,0 +1,40 @@
1
+ import { createTexts, useTranslation, InfoSelect, Item } from './chunk-HZ6V7HFA.mjs';
2
+ import React from 'react';
3
+ import { getSupportedCallingCodes } from 'awesome-phonenumber';
4
+
5
+ var prioritizedCountryCodes = [
6
+ { key: "+47", value: "+47" },
7
+ { key: "+46", value: "+46" },
8
+ { key: "+45", value: "+45" }
9
+ ];
10
+ var sortedCallingCodes = getSupportedCallingCodes().sort((a, b) => Number(a) - Number(b)).map((code) => ({
11
+ key: `+${code}`,
12
+ value: `+${code}`
13
+ })).filter(
14
+ (code) => !prioritizedCountryCodes.some((pCode) => pCode.key === code.key)
15
+ );
16
+ var callingCodes = [...prioritizedCountryCodes, ...sortedCallingCodes];
17
+ var CountryCodeSelect = (props) => {
18
+ const { t } = useTranslation();
19
+ return /* @__PURE__ */ React.createElement(
20
+ InfoSelect,
21
+ {
22
+ label: t(texts.countryCode),
23
+ isLabelSrOnly: true,
24
+ items: callingCodes,
25
+ ...props
26
+ },
27
+ (item) => /* @__PURE__ */ React.createElement(Item, { key: item.key }, item.key)
28
+ );
29
+ };
30
+ var CountryCodeSelect_default = CountryCodeSelect;
31
+ var texts = createTexts({
32
+ countryCode: {
33
+ nb: "Landkode",
34
+ nn: "Landskode",
35
+ en: "Country code",
36
+ sv: "Landskod"
37
+ }
38
+ });
39
+
40
+ export { CountryCodeSelect, CountryCodeSelect_default as default };