@itwin/itwinui-react 3.16.1 → 3.17.0-dev.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2378](https://github.com/iTwin/iTwinUI/pull/2378): Fixed folder variant `Tile`'s broken layout when it has a long name.
8
+
3
9
  ## 3.16.1
4
10
 
5
11
  ### Patch Changes
@@ -21,7 +21,7 @@ const _meta = require('../../utils/meta.js');
21
21
  const versionWithoutDots = _meta.meta.version.replace(/\./g, '');
22
22
  const ownerDocumentAtom = (0, _jotai.atom)(void 0);
23
23
  const ThemeProvider = _react.forwardRef((props, forwardedRef) => {
24
- var _themeOptions, _themeOptions1;
24
+ var _themeOptions, _themeOptions1, _themeOptions2;
25
25
  let {
26
26
  theme: themeProp = 'inherit',
27
27
  children,
@@ -39,6 +39,11 @@ const ThemeProvider = _react.forwardRef((props, forwardedRef) => {
39
39
  (_themeOptions1 = themeOptions).highContrast ??
40
40
  (_themeOptions1.highContrast =
41
41
  'inherit' === themeProp ? parent.highContrast : void 0);
42
+ (_themeOptions2 = themeOptions).bridgeToFutureVersions ??
43
+ (_themeOptions2.bridgeToFutureVersions =
44
+ 'inherit' === themeProp
45
+ ? parent.context?.themeOptions?.bridgeToFutureVersions
46
+ : void 0);
42
47
  let [portalContainerFromParent] = (0, _index.useScopedAtom)(
43
48
  _index.portalContainerAtom,
44
49
  );
@@ -134,6 +139,7 @@ const Root = _react.forwardRef((props, forwardedRef) => {
134
139
  ),
135
140
  'data-iui-theme': shouldApplyDark ? 'dark' : 'light',
136
141
  'data-iui-contrast': shouldApplyHC ? 'high' : 'default',
142
+ 'data-iui-bridge': !!themeOptions?.bridgeToFutureVersions || void 0,
137
143
  ref: forwardedRef,
138
144
  ...rest,
139
145
  },
package/DEV-cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.16.1';
3
+ const e = '3.17.0-dev.0';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -23,7 +23,7 @@ import { meta } from '../../utils/meta.js';
23
23
  let versionWithoutDots = meta.version.replace(/\./g, '');
24
24
  let ownerDocumentAtom = atom(void 0);
25
25
  export const ThemeProvider = React.forwardRef((props, forwardedRef) => {
26
- var _themeOptions, _themeOptions1;
26
+ var _themeOptions, _themeOptions1, _themeOptions2;
27
27
  let {
28
28
  theme: themeProp = 'inherit',
29
29
  children,
@@ -41,6 +41,11 @@ export const ThemeProvider = React.forwardRef((props, forwardedRef) => {
41
41
  (_themeOptions1 = themeOptions).highContrast ??
42
42
  (_themeOptions1.highContrast =
43
43
  'inherit' === themeProp ? parent.highContrast : void 0);
44
+ (_themeOptions2 = themeOptions).bridgeToFutureVersions ??
45
+ (_themeOptions2.bridgeToFutureVersions =
46
+ 'inherit' === themeProp
47
+ ? parent.context?.themeOptions?.bridgeToFutureVersions
48
+ : void 0);
44
49
  let [portalContainerFromParent] = useScopedAtom(portalContainerAtom);
45
50
  let contextValue = React.useMemo(
46
51
  () => ({
@@ -126,6 +131,7 @@ let Root = React.forwardRef((props, forwardedRef) => {
126
131
  ),
127
132
  'data-iui-theme': shouldApplyDark ? 'dark' : 'light',
128
133
  'data-iui-contrast': shouldApplyHC ? 'high' : 'default',
134
+ 'data-iui-bridge': !!themeOptions?.bridgeToFutureVersions || void 0,
129
135
  ref: forwardedRef,
130
136
  ...rest,
131
137
  },
package/DEV-esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.16.1';
1
+ const t = '3.17.0-dev.0';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
@@ -6,6 +6,14 @@ export type ThemeOptions = {
6
6
  * Will default to user preference if browser supports it.
7
7
  */
8
8
  highContrast?: boolean;
9
+ /**
10
+ * If enabled, the theme resembles the future iTwinUI version's theme (including alphas) *whenever possible*.
11
+ *
12
+ * This is useful in making apps looks like future versions of iTwinUI to help with incremental adoption.
13
+ *
14
+ * **NOTE**: Since this is a theme bridge to *future* versions, the theme could have breaking changes.
15
+ */
16
+ bridgeToFutureVersions?: boolean;
9
17
  };
10
18
  export type ThemeType = 'light' | 'dark' | 'os';
11
19
  type RootProps = {
@@ -24,7 +32,7 @@ type RootProps = {
24
32
  * @default 'inherit'
25
33
  */
26
34
  theme?: ThemeType | 'inherit';
27
- themeOptions?: Pick<ThemeOptions, 'highContrast'> & {
35
+ themeOptions?: Pick<ThemeOptions, 'highContrast' | 'bridgeToFutureVersions'> & {
28
36
  /**
29
37
  * Whether or not the element should apply the recommended `background-color` on itself.
30
38
  *
@@ -21,7 +21,7 @@ const _meta = require('../../utils/meta.js');
21
21
  const versionWithoutDots = _meta.meta.version.replace(/\./g, '');
22
22
  const ownerDocumentAtom = (0, _jotai.atom)(void 0);
23
23
  const ThemeProvider = _react.forwardRef((props, forwardedRef) => {
24
- var _themeOptions, _themeOptions1;
24
+ var _themeOptions, _themeOptions1, _themeOptions2;
25
25
  let {
26
26
  theme: themeProp = 'inherit',
27
27
  children,
@@ -39,6 +39,11 @@ const ThemeProvider = _react.forwardRef((props, forwardedRef) => {
39
39
  (_themeOptions1 = themeOptions).highContrast ??
40
40
  (_themeOptions1.highContrast =
41
41
  'inherit' === themeProp ? parent.highContrast : void 0);
42
+ (_themeOptions2 = themeOptions).bridgeToFutureVersions ??
43
+ (_themeOptions2.bridgeToFutureVersions =
44
+ 'inherit' === themeProp
45
+ ? parent.context?.themeOptions?.bridgeToFutureVersions
46
+ : void 0);
42
47
  let [portalContainerFromParent] = (0, _index.useScopedAtom)(
43
48
  _index.portalContainerAtom,
44
49
  );
@@ -133,6 +138,7 @@ const Root = _react.forwardRef((props, forwardedRef) => {
133
138
  ),
134
139
  'data-iui-theme': shouldApplyDark ? 'dark' : 'light',
135
140
  'data-iui-contrast': shouldApplyHC ? 'high' : 'default',
141
+ 'data-iui-bridge': !!themeOptions?.bridgeToFutureVersions || void 0,
136
142
  ref: forwardedRef,
137
143
  ...rest,
138
144
  },
package/cjs/styles.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
3
- const e = '3.16.1';
3
+ const e = '3.17.0-dev.0';
4
4
  const u = new Proxy(
5
5
  {},
6
6
  {
@@ -6,6 +6,14 @@ export type ThemeOptions = {
6
6
  * Will default to user preference if browser supports it.
7
7
  */
8
8
  highContrast?: boolean;
9
+ /**
10
+ * If enabled, the theme resembles the future iTwinUI version's theme (including alphas) *whenever possible*.
11
+ *
12
+ * This is useful in making apps looks like future versions of iTwinUI to help with incremental adoption.
13
+ *
14
+ * **NOTE**: Since this is a theme bridge to *future* versions, the theme could have breaking changes.
15
+ */
16
+ bridgeToFutureVersions?: boolean;
9
17
  };
10
18
  export type ThemeType = 'light' | 'dark' | 'os';
11
19
  type RootProps = {
@@ -24,7 +32,7 @@ type RootProps = {
24
32
  * @default 'inherit'
25
33
  */
26
34
  theme?: ThemeType | 'inherit';
27
- themeOptions?: Pick<ThemeOptions, 'highContrast'> & {
35
+ themeOptions?: Pick<ThemeOptions, 'highContrast' | 'bridgeToFutureVersions'> & {
28
36
  /**
29
37
  * Whether or not the element should apply the recommended `background-color` on itself.
30
38
  *
@@ -23,7 +23,7 @@ import { meta } from '../../utils/meta.js';
23
23
  let versionWithoutDots = meta.version.replace(/\./g, '');
24
24
  let ownerDocumentAtom = atom(void 0);
25
25
  export const ThemeProvider = React.forwardRef((props, forwardedRef) => {
26
- var _themeOptions, _themeOptions1;
26
+ var _themeOptions, _themeOptions1, _themeOptions2;
27
27
  let {
28
28
  theme: themeProp = 'inherit',
29
29
  children,
@@ -41,6 +41,11 @@ export const ThemeProvider = React.forwardRef((props, forwardedRef) => {
41
41
  (_themeOptions1 = themeOptions).highContrast ??
42
42
  (_themeOptions1.highContrast =
43
43
  'inherit' === themeProp ? parent.highContrast : void 0);
44
+ (_themeOptions2 = themeOptions).bridgeToFutureVersions ??
45
+ (_themeOptions2.bridgeToFutureVersions =
46
+ 'inherit' === themeProp
47
+ ? parent.context?.themeOptions?.bridgeToFutureVersions
48
+ : void 0);
44
49
  let [portalContainerFromParent] = useScopedAtom(portalContainerAtom);
45
50
  let contextValue = React.useMemo(
46
51
  () => ({
@@ -125,6 +130,7 @@ let Root = React.forwardRef((props, forwardedRef) => {
125
130
  ),
126
131
  'data-iui-theme': shouldApplyDark ? 'dark' : 'light',
127
132
  'data-iui-contrast': shouldApplyHC ? 'high' : 'default',
133
+ 'data-iui-bridge': !!themeOptions?.bridgeToFutureVersions || void 0,
128
134
  ref: forwardedRef,
129
135
  ...rest,
130
136
  },
package/esm/styles.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = '3.16.1';
1
+ const t = '3.17.0-dev.0';
2
2
  const u = new Proxy(
3
3
  {},
4
4
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "3.16.1",
3
+ "version": "3.17.0-dev.0",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -78,6 +78,30 @@
78
78
  "ui",
79
79
  "ux"
80
80
  ],
81
+ "scripts": {
82
+ "build": "pnpm clean:build && pnpm build:js && pnpm build:styles && pnpm build:types && pnpm build:post",
83
+ "build:js": "node ./scripts/build.mjs",
84
+ "build:types": "tsc -p tsconfig.build.json --outDir esm && tsc -p tsconfig.build.json --outDir cjs",
85
+ "build:styles": "vite build src/styles.js",
86
+ "build:post": "node ./scripts/postBuild.mjs",
87
+ "clean:build": "rimraf esm && rimraf cjs && rimraf DEV-esm && rimraf DEV-cjs && rimraf styles.css",
88
+ "clean:coverage": "rimraf coverage",
89
+ "clean": "rimraf .turbo && pnpm clean:coverage && pnpm clean:build && rimraf node_modules",
90
+ "test": "pnpm test:types && pnpm test:unit",
91
+ "test:unit": "vitest run",
92
+ "test:unit:watch": "pnpm test:unit --watch",
93
+ "test:types": "tsc -p tsconfig.test.json --noEmit",
94
+ "format": "prettier --config .prettierrc **/*.{tsx,ts,js} --ignore-path .gitignore --write",
95
+ "lint": "eslint \"**/*.{js,ts,tsx}\" --max-warnings=0",
96
+ "lint:fix": "pnpm lint --fix && node ../../scripts/copyrightLinter.js --fix \"*/**/*.{js,ts,tsx}\"",
97
+ "dev": "pnpm clean:build && concurrently \"pnpm dev:esm\" \"pnpm dev:dev-esm\" \"pnpm dev:cjs\" \"pnpm dev:dev-cjs\" \"pnpm dev:styles\" \"pnpm dev:types\"",
98
+ "dev:esm": "swc src -d esm --env-name='production' --watch --strip-leading-paths",
99
+ "dev:dev-esm": "swc src -d DEV-esm --env-name='development' --watch --strip-leading-paths",
100
+ "dev:cjs": "swc src -d cjs --env-name='production' --watch --strip-leading-paths -C module.type=commonjs",
101
+ "dev:dev-cjs": "swc src -d DEV-cjs --env-name='development' --watch --strip-leading-paths -C module.type=commonjs",
102
+ "dev:types": "concurrently \"tsc -p tsconfig.build.json --outDir esm --watch --preserveWatchOutput\" \"tsc -p tsconfig.build.json --outDir cjs --watch --preserveWatchOutput\"",
103
+ "dev:styles": "pnpm build:styles --watch"
104
+ },
81
105
  "dependencies": {
82
106
  "@floating-ui/react": "^0.26.23",
83
107
  "@itwin/itwinui-illustrations-react": "^2.1.0",
@@ -123,29 +147,5 @@
123
147
  "prettier": "configs/prettier-config",
124
148
  "sideEffects": [
125
149
  "styles.css"
126
- ],
127
- "scripts": {
128
- "build": "pnpm clean:build && pnpm build:js && pnpm build:styles && pnpm build:types && pnpm build:post",
129
- "build:js": "node ./scripts/build.mjs",
130
- "build:types": "tsc -p tsconfig.build.json --outDir esm && tsc -p tsconfig.build.json --outDir cjs",
131
- "build:styles": "vite build src/styles.js",
132
- "build:post": "node ./scripts/postBuild.mjs",
133
- "clean:build": "rimraf esm && rimraf cjs && rimraf DEV-esm && rimraf DEV-cjs && rimraf styles.css",
134
- "clean:coverage": "rimraf coverage",
135
- "clean": "rimraf .turbo && pnpm clean:coverage && pnpm clean:build && rimraf node_modules",
136
- "test": "pnpm test:types && pnpm test:unit",
137
- "test:unit": "vitest run",
138
- "test:unit:watch": "pnpm test:unit --watch",
139
- "test:types": "tsc -p tsconfig.test.json --noEmit",
140
- "format": "prettier --config .prettierrc **/*.{tsx,ts,js} --ignore-path .gitignore --write",
141
- "lint": "eslint \"**/*.{js,ts,tsx}\" --max-warnings=0",
142
- "lint:fix": "pnpm lint --fix && node ../../scripts/copyrightLinter.js --fix \"*/**/*.{js,ts,tsx}\"",
143
- "dev": "pnpm clean:build && concurrently \"pnpm dev:esm\" \"pnpm dev:dev-esm\" \"pnpm dev:cjs\" \"pnpm dev:dev-cjs\" \"pnpm dev:styles\" \"pnpm dev:types\"",
144
- "dev:esm": "swc src -d esm --env-name='production' --watch --strip-leading-paths",
145
- "dev:dev-esm": "swc src -d DEV-esm --env-name='development' --watch --strip-leading-paths",
146
- "dev:cjs": "swc src -d cjs --env-name='production' --watch --strip-leading-paths -C module.type=commonjs",
147
- "dev:dev-cjs": "swc src -d DEV-cjs --env-name='development' --watch --strip-leading-paths -C module.type=commonjs",
148
- "dev:types": "concurrently \"tsc -p tsconfig.build.json --outDir esm --watch --preserveWatchOutput\" \"tsc -p tsconfig.build.json --outDir cjs --watch --preserveWatchOutput\"",
149
- "dev:styles": "pnpm build:styles --watch"
150
- }
151
- }
150
+ ]
151
+ }