@itwin/itwinui-react 3.5.0 → 3.6.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/cjs/core/Carousel/Carousel.d.ts +4 -4
  3. package/cjs/core/Carousel/CarouselNavigation.d.ts +4 -4
  4. package/cjs/core/Dialog/Dialog.js +19 -17
  5. package/cjs/core/Dialog/DialogContext.d.ts +4 -0
  6. package/cjs/core/Dialog/DialogMain.js +1 -1
  7. package/cjs/core/Dialog/DialogTitleBar.js +1 -1
  8. package/cjs/core/InputGroup/InputGroup.d.ts +4 -0
  9. package/cjs/core/InputGroup/InputGroup.js +20 -4
  10. package/cjs/core/InputWithDecorations/InputWithDecorations.d.ts +18 -62
  11. package/cjs/core/InputWithDecorations/InputWithDecorations.js +21 -6
  12. package/cjs/core/LabeledSelect/LabeledSelect.d.ts +376 -4
  13. package/cjs/core/LabeledSelect/LabeledSelect.js +1 -1
  14. package/cjs/core/Popover/Popover.d.ts +6 -3
  15. package/cjs/core/SearchBox/SearchBox.js +4 -6
  16. package/cjs/core/Select/Select.d.ts +194 -101
  17. package/cjs/core/Select/Select.js +71 -18
  18. package/cjs/core/Table/Table.js +2 -1
  19. package/cjs/core/Tabs/Tabs.js +19 -3
  20. package/cjs/core/Tile/Tile.d.ts +2 -2
  21. package/cjs/core/utils/components/InputFlexContainer.d.ts +25 -0
  22. package/cjs/core/utils/components/InputFlexContainer.js +19 -1
  23. package/cjs/core/utils/components/LineClamp.d.ts +5 -0
  24. package/cjs/core/utils/components/LineClamp.js +49 -0
  25. package/cjs/core/utils/components/index.d.ts +1 -0
  26. package/cjs/core/utils/components/index.js +1 -0
  27. package/cjs/core/utils/icons/SvgStatusError.js +1 -1
  28. package/esm/core/Carousel/Carousel.d.ts +4 -4
  29. package/esm/core/Carousel/CarouselNavigation.d.ts +4 -4
  30. package/esm/core/Dialog/Dialog.js +19 -17
  31. package/esm/core/Dialog/DialogContext.d.ts +4 -0
  32. package/esm/core/Dialog/DialogMain.js +1 -1
  33. package/esm/core/Dialog/DialogTitleBar.js +1 -1
  34. package/esm/core/InputGroup/InputGroup.d.ts +4 -0
  35. package/esm/core/InputGroup/InputGroup.js +20 -4
  36. package/esm/core/InputWithDecorations/InputWithDecorations.d.ts +18 -62
  37. package/esm/core/InputWithDecorations/InputWithDecorations.js +22 -7
  38. package/esm/core/LabeledSelect/LabeledSelect.d.ts +376 -4
  39. package/esm/core/LabeledSelect/LabeledSelect.js +1 -1
  40. package/esm/core/Popover/Popover.d.ts +6 -3
  41. package/esm/core/SearchBox/SearchBox.js +5 -7
  42. package/esm/core/Select/Select.d.ts +194 -101
  43. package/esm/core/Select/Select.js +72 -19
  44. package/esm/core/Table/Table.js +2 -1
  45. package/esm/core/Tabs/Tabs.js +19 -3
  46. package/esm/core/Tile/Tile.d.ts +2 -2
  47. package/esm/core/utils/components/InputFlexContainer.d.ts +25 -0
  48. package/esm/core/utils/components/InputFlexContainer.js +18 -0
  49. package/esm/core/utils/components/LineClamp.d.ts +5 -0
  50. package/esm/core/utils/components/LineClamp.js +23 -0
  51. package/esm/core/utils/components/index.d.ts +1 -0
  52. package/esm/core/utils/components/index.js +1 -0
  53. package/esm/core/utils/icons/SvgStatusError.js +1 -1
  54. package/package.json +24 -26
  55. package/styles.css +23 -23
@@ -0,0 +1,23 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import * as React from 'react';
6
+ import { Box } from './Box.js';
7
+ import { ShadowRoot } from './ShadowRoot.js';
8
+ /** @private */
9
+ export const LineClamp = React.forwardRef((props, forwardedRef) => {
10
+ const { lines, children, ...rest } = props;
11
+ return (React.createElement(Box, { ref: forwardedRef, ...rest, style: { '--_iui-line-clamp': lines, ...props.style } },
12
+ React.createElement(ShadowRoot, { css: css },
13
+ React.createElement("slot", null)),
14
+ children));
15
+ });
16
+ const css = /* css */ `
17
+ :host {
18
+ overflow: hidden;
19
+ display: -webkit-box;
20
+ -webkit-line-clamp: var(--_iui-line-clamp, 3);
21
+ -webkit-box-orient: vertical;
22
+ }
23
+ `;
@@ -11,3 +11,4 @@ export * from './Box.js';
11
11
  export * from './ButtonBase.js';
12
12
  export * from './Portal.js';
13
13
  export * from './ShadowRoot.js';
14
+ export * from './LineClamp.js';
@@ -15,3 +15,4 @@ export * from './Box.js';
15
15
  export * from './ButtonBase.js';
16
16
  export * from './Portal.js';
17
17
  export * from './ShadowRoot.js';
18
+ export * from './LineClamp.js';
@@ -6,5 +6,5 @@ import * as React from 'react';
6
6
  import { Svg } from './Svg.js';
7
7
  export const SvgStatusError = (props) => {
8
8
  return (React.createElement(Svg, { ...props },
9
- React.createElement("path", { d: 'm8 0a8 8 0 1 0 8 8 8 8 0 0 0 -8-8zm1 12h-2v-2h2zm0-3h-2v-5h2z' })));
9
+ React.createElement("path", { d: 'M9 12H7v-2h2v2Zm0-3H7V4h2v5Zm2.314-9H4.686L0 4.686v6.628L4.686 16h6.628L16 11.314V4.686L11.314 0Z' })));
10
10
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itwin/itwinui-react",
3
- "version": "3.5.0",
3
+ "version": "3.6.1",
4
4
  "author": "Bentley Systems",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -55,27 +55,6 @@
55
55
  "ui",
56
56
  "ux"
57
57
  ],
58
- "scripts": {
59
- "build": "yarn clean:build && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && tsc -p tsconfig.react-table.json && yarn build:styles && yarn build:post",
60
- "build:styles": "vite build src/styles.js",
61
- "build:watch": "concurrently \"tsc -p tsconfig.cjs.json --watch\" \"tsc -p tsconfig.esm.json --watch\"",
62
- "build:post": "node ./scripts/postBuild.mjs",
63
- "clean:build": "rimraf esm && rimraf cjs && rimraf react-table.d.ts",
64
- "clean:coverage": "rimraf coverage",
65
- "clean": "rimraf .turbo && yarn clean:coverage && yarn clean:build && rimraf node_modules",
66
- "test": "yarn test:types && yarn test:unit",
67
- "test:unit": "vitest run",
68
- "test:unit:watch": "yarn test:unit --watch",
69
- "test:types": "tsc -p tsconfig.test.json --noEmit",
70
- "format": "prettier --config .prettierrc **/*.{tsx,ts,js} --ignore-path .gitignore --write",
71
- "lint": "eslint \"**/*.{js,ts,tsx}\" --max-warnings=0",
72
- "lint:fix": "yarn lint --fix && node ../../scripts/copyrightLinter.js --fix \"*/**/*.{js,ts,tsx}\"",
73
- "dev": "yarn clean:build && concurrently \"yarn dev:esm\" \"yarn dev:cjs\" \"yarn build:styles --watch\" \"yarn dev:types\"",
74
- "dev:esm": "swc src -d esm --watch",
75
- "dev:cjs": "swc src -d cjs --watch -C module.type=commonjs",
76
- "dev:types": "concurrently \"tsc -p tsconfig.cjs.json --emitDeclarationOnly --watch --preserveWatchOutput\" \"tsc -p tsconfig.esm.json --emitDeclarationOnly --watch --preserveWatchOutput\" \"tsc -p tsconfig.react-table.json --watch --preserveWatchOutput\"",
77
- "dev:styles": "yarn build:styles --watch"
78
- },
79
58
  "dependencies": {
80
59
  "@floating-ui/react": "^0.26.3",
81
60
  "@itwin/itwinui-illustrations-react": "^2.1.0",
@@ -85,8 +64,6 @@
85
64
  "tslib": "^2.6.0"
86
65
  },
87
66
  "devDependencies": {
88
- "@itwin/itwinui-css": "^2.4.0",
89
- "@itwin/itwinui-variables": "3.1.0",
90
67
  "@swc/cli": "^0.1.62",
91
68
  "@swc/core": "^1.3.68",
92
69
  "@testing-library/jest-dom": "^6.3.0",
@@ -123,5 +100,26 @@
123
100
  "prettier": "configs/prettier-config",
124
101
  "sideEffects": [
125
102
  "styles.css"
126
- ]
127
- }
103
+ ],
104
+ "scripts": {
105
+ "build": "pnpm clean:build && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && tsc -p tsconfig.react-table.json && pnpm build:styles && pnpm build:post",
106
+ "build:styles": "vite build src/styles.js",
107
+ "build:watch": "concurrently \"tsc -p tsconfig.cjs.json --watch\" \"tsc -p tsconfig.esm.json --watch\"",
108
+ "build:post": "node ./scripts/postBuild.mjs",
109
+ "clean:build": "rimraf esm && rimraf cjs && rimraf react-table.d.ts",
110
+ "clean:coverage": "rimraf coverage",
111
+ "clean": "rimraf .turbo && pnpm clean:coverage && pnpm clean:build && rimraf node_modules",
112
+ "test": "pnpm test:types && pnpm test:unit",
113
+ "test:unit": "vitest run",
114
+ "test:unit:watch": "pnpm test:unit --watch",
115
+ "test:types": "tsc -p tsconfig.test.json --noEmit",
116
+ "format": "prettier --config .prettierrc **/*.{tsx,ts,js} --ignore-path .gitignore --write",
117
+ "lint": "eslint \"**/*.{js,ts,tsx}\" --max-warnings=0",
118
+ "lint:fix": "pnpm lint --fix && node ../../scripts/copyrightLinter.js --fix \"*/**/*.{js,ts,tsx}\"",
119
+ "dev": "pnpm clean:build && concurrently \"pnpm dev:esm\" \"pnpm dev:cjs\" \"pnpm build:styles --watch\" \"pnpm dev:types\"",
120
+ "dev:esm": "swc src -d esm --watch",
121
+ "dev:cjs": "swc src -d cjs --watch -C module.type=commonjs",
122
+ "dev:types": "concurrently \"tsc -p tsconfig.cjs.json --emitDeclarationOnly --watch --preserveWatchOutput\" \"tsc -p tsconfig.esm.json --emitDeclarationOnly --watch --preserveWatchOutput\" \"tsc -p tsconfig.react-table.json --watch --preserveWatchOutput\"",
123
+ "dev:styles": "pnpm build:styles --watch"
124
+ }
125
+ }