@synerise/ds-context-selector 1.3.16 → 1.3.18

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/dist/constants.js CHANGED
@@ -1,10 +1,23 @@
1
- var _ITEM_SIZE;
2
- import { itemSizes } from '@synerise/ds-list-item';
3
- export var NO_GROUP_NAME = 'NO_GROUP_NAME';
4
- export var ITEM_SIZE = (_ITEM_SIZE = {}, _ITEM_SIZE[itemSizes.LARGE] = 50, _ITEM_SIZE[itemSizes.DEFAULT] = 32, _ITEM_SIZE.title = 32, _ITEM_SIZE);
5
- export var DROPDOWN_HEIGHT = 420;
6
- export var DROPDOWN_HEIGHT_BELOW_THRESHOLD = 350;
7
- export var DROPDOWN_HEIGHT_THRESHOLD = 900;
8
- export var SEARCH_HEIGHT = 53;
9
- export var TABS_HEIGHT = 50;
10
- export var SUBGROUP_HEADER_HEIGHT = 53;
1
+ import { itemSizes } from "@synerise/ds-list-item";
2
+ const NO_GROUP_NAME = "NO_GROUP_NAME";
3
+ const ITEM_SIZE = {
4
+ [itemSizes.LARGE]: 50,
5
+ [itemSizes.DEFAULT]: 32,
6
+ title: 32
7
+ };
8
+ const DROPDOWN_HEIGHT = 420;
9
+ const DROPDOWN_HEIGHT_BELOW_THRESHOLD = 350;
10
+ const DROPDOWN_HEIGHT_THRESHOLD = 900;
11
+ const SEARCH_HEIGHT = 53;
12
+ const TABS_HEIGHT = 50;
13
+ const SUBGROUP_HEADER_HEIGHT = 53;
14
+ export {
15
+ DROPDOWN_HEIGHT,
16
+ DROPDOWN_HEIGHT_BELOW_THRESHOLD,
17
+ DROPDOWN_HEIGHT_THRESHOLD,
18
+ ITEM_SIZE,
19
+ NO_GROUP_NAME,
20
+ SEARCH_HEIGHT,
21
+ SUBGROUP_HEADER_HEIGHT,
22
+ TABS_HEIGHT
23
+ };
@@ -1,2 +1,2 @@
1
- import type { ContextTexts } from '../ContextSelector.types';
1
+ import { ContextTexts } from '../ContextSelector.types';
2
2
  export declare const useTexts: (defaultTexts?: Partial<ContextTexts>) => ContextTexts;
@@ -1,36 +1,38 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import { useMemo } from 'react';
3
- import { useIntl } from 'react-intl';
4
- export var useTexts = function useTexts(defaultTexts) {
5
- var _useIntl = useIntl(),
6
- formatMessage = _useIntl.formatMessage;
7
- var texts = useMemo(function () {
8
- return _extends({
9
- buttonLabel: formatMessage({
10
- id: 'DS.CONTEXT-SELECTOR.BUTTON_LABEL',
11
- defaultMessage: 'Choose'
12
- }),
13
- searchPlaceholder: formatMessage({
14
- id: 'DS.CONTEXT-SELECTOR.SEARCH_PLACEHOLDER',
15
- defaultMessage: 'Search'
16
- }),
17
- noResults: formatMessage({
18
- id: 'DS.CONTEXT-SELECTOR.NO_RESULTS',
19
- defaultMessage: 'No results'
20
- }),
21
- showMore: formatMessage({
22
- id: 'DS.CONTEXT-SELECTOR.SHOW_MORE',
23
- defaultMessage: 'Show more'
24
- }),
25
- recentItemsGroupName: formatMessage({
26
- id: 'DS.CONTEXT-SELECTOR.RECENT',
27
- defaultMessage: 'Recent'
28
- }),
29
- allItemsGroupName: formatMessage({
30
- id: 'DS.CONTEXT-SELECTOR.ALL',
31
- defaultMessage: 'All'
32
- })
33
- }, defaultTexts);
34
- }, [defaultTexts, formatMessage]);
1
+ import { useMemo } from "react";
2
+ import { useIntl } from "react-intl";
3
+ const useTexts = (defaultTexts) => {
4
+ const {
5
+ formatMessage
6
+ } = useIntl();
7
+ const texts = useMemo(() => ({
8
+ buttonLabel: formatMessage({
9
+ id: "DS.CONTEXT-SELECTOR.BUTTON_LABEL",
10
+ defaultMessage: "Choose"
11
+ }),
12
+ searchPlaceholder: formatMessage({
13
+ id: "DS.CONTEXT-SELECTOR.SEARCH_PLACEHOLDER",
14
+ defaultMessage: "Search"
15
+ }),
16
+ noResults: formatMessage({
17
+ id: "DS.CONTEXT-SELECTOR.NO_RESULTS",
18
+ defaultMessage: "No results"
19
+ }),
20
+ showMore: formatMessage({
21
+ id: "DS.CONTEXT-SELECTOR.SHOW_MORE",
22
+ defaultMessage: "Show more"
23
+ }),
24
+ recentItemsGroupName: formatMessage({
25
+ id: "DS.CONTEXT-SELECTOR.RECENT",
26
+ defaultMessage: "Recent"
27
+ }),
28
+ allItemsGroupName: formatMessage({
29
+ id: "DS.CONTEXT-SELECTOR.ALL",
30
+ defaultMessage: "All"
31
+ }),
32
+ ...defaultTexts
33
+ }), [defaultTexts, formatMessage]);
35
34
  return texts;
36
- };
35
+ };
36
+ export {
37
+ useTexts
38
+ };
package/dist/index.js CHANGED
@@ -1 +1,4 @@
1
- export { default } from './ContextSelector';
1
+ import { default as default2 } from "./ContextSelector.js";
2
+ export {
3
+ default2 as default
4
+ };
package/dist/modules.d.js CHANGED
@@ -1 +1 @@
1
- import '@testing-library/jest-dom';
1
+ import "@testing-library/jest-dom";
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-context-selector",
3
- "version": "1.3.16",
3
+ "version": "1.3.18",
4
4
  "description": "ContextSelector UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -16,10 +16,10 @@
16
16
  "access": "public"
17
17
  },
18
18
  "scripts": {
19
- "build": "pnpm run build:js && pnpm run build:css && pnpm run defs",
19
+ "build": "vite build",
20
20
  "build:css": "node ../../../scripts/style/less.js",
21
21
  "build:js": "babel --delete-dir-on-start --root-mode upward src --out-dir dist --extensions '.js,.ts,.tsx'",
22
- "build:watch": "pnpm run build:js -- --watch",
22
+ "build:watch": "vite build --watch",
23
23
  "defs": "tsc --declaration --outDir dist/ --emitDeclarationOnly",
24
24
  "pack:ci": "pnpm pack --pack-destination ../../storybook/storybook-static/static",
25
25
  "prepublish": "pnpm run build",
@@ -29,26 +29,27 @@
29
29
  "check:circular-dependencies": "madge --circular --extensions ts,tsx,js,jsx --ts-config tsconfig.json src/ --exclude '/dist/'",
30
30
  "upgrade:ds": "ncu -f \"@synerise/ds-*\" -u"
31
31
  },
32
- "gitHead": "8efc031fa688c0b87c7b3915bae93546bb63bcac",
32
+ "gitHead": "c2384982c3533a31eb5e5e0408f8dcecb2b0f399",
33
33
  "sideEffects": [
34
34
  "dist/style/*",
35
35
  "*.less"
36
36
  ],
37
37
  "types": "dist/index.d.ts",
38
38
  "dependencies": {
39
- "@synerise/ds-button": "^1.5.17",
40
- "@synerise/ds-divider": "^1.3.1",
41
- "@synerise/ds-dropdown": "^1.3.1",
42
- "@synerise/ds-factors": "^1.11.11",
43
- "@synerise/ds-icon": "^1.15.0",
44
- "@synerise/ds-information-card": "^1.6.4",
45
- "@synerise/ds-list-item": "^1.4.9",
46
- "@synerise/ds-popover": "^1.5.2",
47
- "@synerise/ds-result": "^1.0.48",
48
- "@synerise/ds-scrollbar": "^1.2.16",
49
- "@synerise/ds-skeleton": "^1.0.44",
50
- "@synerise/ds-tabs": "^1.1.23",
51
- "@synerise/ds-utils": "^1.7.0",
39
+ "@synerise/ds-button": "^1.5.19",
40
+ "@synerise/ds-divider": "^1.3.3",
41
+ "@synerise/ds-dropdown": "^1.3.3",
42
+ "@synerise/ds-factors": "^1.11.13",
43
+ "@synerise/ds-icon": "^1.15.2",
44
+ "@synerise/ds-information-card": "^1.6.6",
45
+ "@synerise/ds-list-item": "^1.4.11",
46
+ "@synerise/ds-popover": "^1.5.3",
47
+ "@synerise/ds-result": "^1.0.50",
48
+ "@synerise/ds-scrollbar": "^1.2.18",
49
+ "@synerise/ds-skeleton": "^1.0.46",
50
+ "@synerise/ds-tabs": "^1.1.25",
51
+ "@synerise/ds-utils": "^1.7.1",
52
+ "react-intl": "^6.8.7",
52
53
  "react-window": "1.8.11",
53
54
  "uuid": "^8.3.2"
54
55
  },