@instructure/ui-truncate-text 11.7.3 → 11.7.4-pr-snapshot-1781695314229
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 +44 -0
- package/LICENSE.md +1 -0
- package/{lib/TruncateText/v1/props.js → babel.config.cjs} +12 -7
- package/es/TruncateText/v1/index.js +5 -5
- package/es/TruncateText/v1/utils/truncate.js +3 -3
- package/es/TruncateText/v2/index.js +4 -7
- package/es/TruncateText/v2/utils/truncate.js +3 -3
- package/es/exports/a.js +1 -1
- package/es/exports/b.js +1 -1
- package/package.json +15 -20
- package/src/TruncateText/v1/index.tsx +5 -4
- package/src/TruncateText/v1/utils/truncate.ts +4 -4
- package/src/TruncateText/v2/index.tsx +4 -10
- package/src/TruncateText/v2/utils/truncate.ts +4 -4
- package/src/exports/a.ts +1 -1
- package/src/exports/b.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/TruncateText/v1/index.d.ts +3 -2
- package/types/TruncateText/v1/index.d.ts.map +1 -1
- package/types/TruncateText/v1/utils/truncate.d.ts +1 -1
- package/types/TruncateText/v1/utils/truncate.d.ts.map +1 -1
- package/types/TruncateText/v2/index.d.ts +3 -3
- package/types/TruncateText/v2/index.d.ts.map +1 -1
- package/types/TruncateText/v2/utils/truncate.d.ts +1 -1
- package/types/TruncateText/v2/utils/truncate.d.ts.map +1 -1
- package/types/exports/a.d.ts +1 -1
- package/types/exports/a.d.ts.map +1 -1
- package/types/exports/b.d.ts +1 -1
- package/types/exports/b.d.ts.map +1 -1
- package/lib/TruncateText/v1/index.js +0 -278
- package/lib/TruncateText/v1/styles.js +0 -64
- package/lib/TruncateText/v1/theme.js +0 -48
- package/lib/TruncateText/v1/utils/cleanData.js +0 -166
- package/lib/TruncateText/v1/utils/cleanString.js +0 -59
- package/lib/TruncateText/v1/utils/measureText.js +0 -79
- package/lib/TruncateText/v1/utils/truncate.js +0 -355
- package/lib/TruncateText/v2/index.js +0 -279
- package/lib/TruncateText/v2/props.js +0 -31
- package/lib/TruncateText/v2/styles.js +0 -64
- package/lib/TruncateText/v2/utils/cleanData.js +0 -166
- package/lib/TruncateText/v2/utils/cleanString.js +0 -59
- package/lib/TruncateText/v2/utils/measureText.js +0 -79
- package/lib/TruncateText/v2/utils/truncate.js +0 -355
- package/lib/exports/a.js +0 -12
- package/lib/exports/b.js +0 -12
- package/lib/package.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,50 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [11.7.4-pr-snapshot-1781695314229](https://github.com/instructure/instructure-ui/compare/v11.7.3...v11.7.4-pr-snapshot-1781695314229) (2026-06-17)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **many:** remove deprecated v2 items ([eaf8876](https://github.com/instructure/instructure-ui/commit/eaf88767c9beb95c4e09ee5705c387dfd79e4cb7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### BREAKING CHANGES
|
|
15
|
+
|
|
16
|
+
* **many:** Removed FormFieldLabel component
|
|
17
|
+
|
|
18
|
+
Removed _content prop from DrawerLayout.Tray and DrawerLayout.Content
|
|
19
|
+
|
|
20
|
+
Removed _link prop from Link
|
|
21
|
+
|
|
22
|
+
Removed _node prop from Menu.Item
|
|
23
|
+
|
|
24
|
+
Removed _root prop from Pagination, TreeBrowser
|
|
25
|
+
|
|
26
|
+
Removed _select prop from SimpleSelect and TimeSelect
|
|
27
|
+
|
|
28
|
+
Removed _ref prop from TruncateText
|
|
29
|
+
|
|
30
|
+
Removed _element prop from View
|
|
31
|
+
|
|
32
|
+
Removed color="ai" from Heading
|
|
33
|
+
|
|
34
|
+
Removed variant="inline-small" and variant="standalone-small" from Link
|
|
35
|
+
|
|
36
|
+
Removed title prop from Tag
|
|
37
|
+
|
|
38
|
+
Removed focusRingBorderRadius prop from View
|
|
39
|
+
|
|
40
|
+
Removed hideActionsUserSeparator prop from TopNavBar.Layout
|
|
41
|
+
|
|
42
|
+
Removed handleFocusOutlineColor, handleFocusOutlineWidth, handleShadowColor from RangeInput
|
|
43
|
+
|
|
44
|
+
INSTUI-5025
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
6
50
|
## [11.7.3](https://github.com/instructure/instructure-ui/compare/v11.7.2...v11.7.3) (2026-05-07)
|
|
7
51
|
|
|
8
52
|
|
package/LICENSE.md
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.allowedProps = void 0;
|
|
7
1
|
/*
|
|
8
2
|
* The MIT License (MIT)
|
|
9
3
|
*
|
|
@@ -28,4 +22,15 @@ exports.allowedProps = void 0;
|
|
|
28
22
|
* SOFTWARE.
|
|
29
23
|
*/
|
|
30
24
|
|
|
31
|
-
|
|
25
|
+
module.exports = {
|
|
26
|
+
presets: [
|
|
27
|
+
[
|
|
28
|
+
require('@instructure/ui-babel-preset'),
|
|
29
|
+
{
|
|
30
|
+
esModules: Boolean(process.env.ES_MODULES),
|
|
31
|
+
removeConsole: process.env.NODE_ENV === 'production',
|
|
32
|
+
transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
]
|
|
36
|
+
}
|
|
@@ -29,10 +29,10 @@ import { canUseDOM, getBoundingClientRect } from '@instructure/ui-dom-utils';
|
|
|
29
29
|
import { safeCloneElement, ensureSingleChild } from '@instructure/ui-react-utils';
|
|
30
30
|
import { logError as error } from '@instructure/console';
|
|
31
31
|
import { withStyle } from '@instructure/emotion';
|
|
32
|
-
import generateStyle from
|
|
33
|
-
import generateComponentTheme from
|
|
34
|
-
import truncate from
|
|
35
|
-
import { allowedProps } from
|
|
32
|
+
import generateStyle from './styles.js';
|
|
33
|
+
import generateComponentTheme from './theme.js';
|
|
34
|
+
import truncate from './utils/truncate.js';
|
|
35
|
+
import { allowedProps } from './props.js';
|
|
36
36
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
37
37
|
/**
|
|
38
38
|
---
|
|
@@ -40,7 +40,7 @@ category: components
|
|
|
40
40
|
---
|
|
41
41
|
**/
|
|
42
42
|
let TruncateText = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = class TruncateText extends Component {
|
|
43
|
-
static displayName =
|
|
43
|
+
static displayName = 'TruncateText';
|
|
44
44
|
static componentId = 'TruncateText';
|
|
45
45
|
static allowedProps = allowedProps;
|
|
46
46
|
static defaultProps = {
|
|
@@ -26,9 +26,9 @@ import escapeHtml from 'escape-html';
|
|
|
26
26
|
import { cloneArray } from '@instructure/ui-utils';
|
|
27
27
|
import { logError as error } from '@instructure/console';
|
|
28
28
|
import { getCSSStyleDeclaration, getBoundingClientRect, isVisible } from '@instructure/ui-dom-utils';
|
|
29
|
-
import measureText from
|
|
30
|
-
import cleanString from
|
|
31
|
-
import cleanData from
|
|
29
|
+
import measureText from './measureText.js';
|
|
30
|
+
import cleanString from './cleanString.js';
|
|
31
|
+
import cleanData from './cleanData.js';
|
|
32
32
|
/**
|
|
33
33
|
* ---
|
|
34
34
|
* parent: TruncateText
|
|
@@ -29,9 +29,9 @@ import { canUseDOM, getBoundingClientRect } from '@instructure/ui-dom-utils';
|
|
|
29
29
|
import { safeCloneElement, ensureSingleChild } from '@instructure/ui-react-utils';
|
|
30
30
|
import { logError as error } from '@instructure/console';
|
|
31
31
|
import { withStyleNew } from '@instructure/emotion';
|
|
32
|
-
import generateStyle from
|
|
33
|
-
import truncate from
|
|
34
|
-
import { allowedProps } from
|
|
32
|
+
import generateStyle from './styles.js';
|
|
33
|
+
import truncate from './utils/truncate.js';
|
|
34
|
+
import { allowedProps } from './props.js';
|
|
35
35
|
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
36
36
|
/**
|
|
37
37
|
---
|
|
@@ -39,7 +39,7 @@ category: components
|
|
|
39
39
|
---
|
|
40
40
|
**/
|
|
41
41
|
let TruncateText = (_dec = withStyleNew(generateStyle), _dec(_class = class TruncateText extends Component {
|
|
42
|
-
static displayName =
|
|
42
|
+
static displayName = 'TruncateText';
|
|
43
43
|
static componentId = 'TruncateText';
|
|
44
44
|
static allowedProps = allowedProps;
|
|
45
45
|
static defaultProps = {
|
|
@@ -61,9 +61,6 @@ let TruncateText = (_dec = withStyleNew(generateStyle), _dec(_class = class Trun
|
|
|
61
61
|
super(props);
|
|
62
62
|
this.state = this.initialState;
|
|
63
63
|
}
|
|
64
|
-
get _ref() {
|
|
65
|
-
return this.ref;
|
|
66
|
-
}
|
|
67
64
|
get initialState() {
|
|
68
65
|
return {
|
|
69
66
|
isTruncated: false,
|
|
@@ -26,9 +26,9 @@ import escapeHtml from 'escape-html';
|
|
|
26
26
|
import { cloneArray } from '@instructure/ui-utils';
|
|
27
27
|
import { logError as error } from '@instructure/console';
|
|
28
28
|
import { getCSSStyleDeclaration, getBoundingClientRect, isVisible } from '@instructure/ui-dom-utils';
|
|
29
|
-
import measureText from
|
|
30
|
-
import cleanString from
|
|
31
|
-
import cleanData from
|
|
29
|
+
import measureText from './measureText.js';
|
|
30
|
+
import cleanString from './cleanString.js';
|
|
31
|
+
import cleanData from './cleanData.js';
|
|
32
32
|
/**
|
|
33
33
|
* ---
|
|
34
34
|
* parent: TruncateText
|
package/es/exports/a.js
CHANGED
package/es/exports/b.js
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-truncate-text",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.4-pr-snapshot-1781695314229",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "A TruncateText component made by Instructure Inc.",
|
|
5
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
7
|
"module": "./es/index.js",
|
|
7
|
-
"main": "./lib/index.js",
|
|
8
8
|
"types": "./types/index.d.ts",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -16,24 +16,24 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.2",
|
|
18
18
|
"escape-html": "^1.0.3",
|
|
19
|
-
"@instructure/console": "11.7.
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/
|
|
22
|
-
"@instructure/
|
|
23
|
-
"@instructure/
|
|
24
|
-
"@instructure/ui-themes": "11.7.
|
|
25
|
-
"@instructure/ui-react-utils": "11.7.
|
|
26
|
-
"@instructure/ui-utils": "11.7.
|
|
19
|
+
"@instructure/console": "11.7.4-pr-snapshot-1781695314229",
|
|
20
|
+
"@instructure/emotion": "11.7.4-pr-snapshot-1781695314229",
|
|
21
|
+
"@instructure/debounce": "11.7.4-pr-snapshot-1781695314229",
|
|
22
|
+
"@instructure/ui-dom-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
23
|
+
"@instructure/shared-types": "11.7.4-pr-snapshot-1781695314229",
|
|
24
|
+
"@instructure/ui-themes": "11.7.4-pr-snapshot-1781695314229",
|
|
25
|
+
"@instructure/ui-react-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
26
|
+
"@instructure/ui-utils": "11.7.4-pr-snapshot-1781695314229"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@testing-library/jest-dom": "^6.6.3",
|
|
30
30
|
"@testing-library/react": "15.0.7",
|
|
31
31
|
"@types/escape-html": "^1.0.4",
|
|
32
32
|
"vitest": "^3.2.2",
|
|
33
|
-
"@instructure/ui-axe-check": "11.7.
|
|
34
|
-
"@instructure/ui-babel-preset": "11.7.
|
|
35
|
-
"@instructure/ui-color-utils": "11.7.
|
|
36
|
-
"@instructure/ui-text": "11.7.
|
|
33
|
+
"@instructure/ui-axe-check": "11.7.4-pr-snapshot-1781695314229",
|
|
34
|
+
"@instructure/ui-babel-preset": "11.7.4-pr-snapshot-1781695314229",
|
|
35
|
+
"@instructure/ui-color-utils": "11.7.4-pr-snapshot-1781695314229",
|
|
36
|
+
"@instructure/ui-text": "11.7.4-pr-snapshot-1781695314229"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": ">=18 <=19"
|
|
@@ -43,7 +43,6 @@
|
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"exports": {
|
|
46
|
-
"./lib/*": "./lib/*",
|
|
47
46
|
"./es/*": "./es/*",
|
|
48
47
|
"./types/*": "./types/*",
|
|
49
48
|
"./package.json": "./package.json",
|
|
@@ -52,28 +51,24 @@
|
|
|
52
51
|
"src": "./src/exports/a.ts",
|
|
53
52
|
"types": "./types/exports/a.d.ts",
|
|
54
53
|
"import": "./es/exports/a.js",
|
|
55
|
-
"require": "./lib/exports/a.js",
|
|
56
54
|
"default": "./es/exports/a.js"
|
|
57
55
|
},
|
|
58
56
|
"./v11_6": {
|
|
59
57
|
"src": "./src/exports/a.ts",
|
|
60
58
|
"types": "./types/exports/a.d.ts",
|
|
61
59
|
"import": "./es/exports/a.js",
|
|
62
|
-
"require": "./lib/exports/a.js",
|
|
63
60
|
"default": "./es/exports/a.js"
|
|
64
61
|
},
|
|
65
62
|
"./v11_7": {
|
|
66
63
|
"src": "./src/exports/b.ts",
|
|
67
64
|
"types": "./types/exports/b.d.ts",
|
|
68
65
|
"import": "./es/exports/b.js",
|
|
69
|
-
"require": "./lib/exports/b.js",
|
|
70
66
|
"default": "./es/exports/b.js"
|
|
71
67
|
},
|
|
72
68
|
"./latest": {
|
|
73
69
|
"src": "./src/exports/b.ts",
|
|
74
70
|
"types": "./types/exports/b.d.ts",
|
|
75
71
|
"import": "./es/exports/b.js",
|
|
76
|
-
"require": "./lib/exports/b.js",
|
|
77
72
|
"default": "./es/exports/b.js"
|
|
78
73
|
}
|
|
79
74
|
},
|
|
@@ -81,7 +76,7 @@
|
|
|
81
76
|
"lint": "ui-scripts lint",
|
|
82
77
|
"lint:fix": "ui-scripts lint --fix",
|
|
83
78
|
"clean": "ui-scripts clean",
|
|
84
|
-
"build": "ui-scripts build
|
|
79
|
+
"build": "ui-scripts build",
|
|
85
80
|
"build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
|
|
86
81
|
"build:types": "tsc -p tsconfig.build.json",
|
|
87
82
|
"ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
|
|
@@ -34,11 +34,11 @@ import {
|
|
|
34
34
|
import { logError as error } from '@instructure/console'
|
|
35
35
|
import { withStyle } from '@instructure/emotion'
|
|
36
36
|
|
|
37
|
-
import generateStyle from './styles'
|
|
38
|
-
import generateComponentTheme from './theme'
|
|
37
|
+
import generateStyle from './styles.js'
|
|
38
|
+
import generateComponentTheme from './theme.js'
|
|
39
39
|
|
|
40
|
-
import truncate from './utils/truncate'
|
|
41
|
-
import { allowedProps, TruncateTextState } from './props'
|
|
40
|
+
import truncate from './utils/truncate.js'
|
|
41
|
+
import { allowedProps, TruncateTextState } from './props.js'
|
|
42
42
|
import type { TruncateTextProps } from './props'
|
|
43
43
|
|
|
44
44
|
/**
|
|
@@ -48,6 +48,7 @@ category: components
|
|
|
48
48
|
**/
|
|
49
49
|
@withStyle(generateStyle, generateComponentTheme)
|
|
50
50
|
class TruncateText extends Component<TruncateTextProps, TruncateTextState> {
|
|
51
|
+
static displayName = 'TruncateText'
|
|
51
52
|
static readonly componentId = 'TruncateText'
|
|
52
53
|
|
|
53
54
|
static allowedProps = allowedProps
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
isVisible
|
|
33
33
|
} from '@instructure/ui-dom-utils'
|
|
34
34
|
|
|
35
|
-
import measureText from './measureText'
|
|
36
|
-
import cleanString from './cleanString'
|
|
37
|
-
import cleanData from './cleanData'
|
|
38
|
-
import { TruncateTextCommonProps } from '../props'
|
|
35
|
+
import measureText from './measureText.js'
|
|
36
|
+
import cleanString from './cleanString.js'
|
|
37
|
+
import cleanData from './cleanData.js'
|
|
38
|
+
import { TruncateTextCommonProps } from '../props.js'
|
|
39
39
|
|
|
40
40
|
export type TruncatorOptions = {
|
|
41
41
|
parent?: Node
|
|
@@ -34,10 +34,10 @@ import {
|
|
|
34
34
|
import { logError as error } from '@instructure/console'
|
|
35
35
|
import { withStyleNew } from '@instructure/emotion'
|
|
36
36
|
|
|
37
|
-
import generateStyle from './styles'
|
|
37
|
+
import generateStyle from './styles.js'
|
|
38
38
|
|
|
39
|
-
import truncate from './utils/truncate'
|
|
40
|
-
import { allowedProps, TruncateTextState } from './props'
|
|
39
|
+
import truncate from './utils/truncate.js'
|
|
40
|
+
import { allowedProps, TruncateTextState } from './props.js'
|
|
41
41
|
import type { TruncateTextProps } from './props'
|
|
42
42
|
|
|
43
43
|
/**
|
|
@@ -47,6 +47,7 @@ category: components
|
|
|
47
47
|
**/
|
|
48
48
|
@withStyleNew(generateStyle)
|
|
49
49
|
class TruncateText extends Component<TruncateTextProps, TruncateTextState> {
|
|
50
|
+
static displayName = 'TruncateText'
|
|
50
51
|
static readonly componentId = 'TruncateText'
|
|
51
52
|
|
|
52
53
|
static allowedProps = allowedProps
|
|
@@ -73,13 +74,6 @@ class TruncateText extends Component<TruncateTextProps, TruncateTextState> {
|
|
|
73
74
|
this.state = this.initialState
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
get _ref() {
|
|
77
|
-
console.warn(
|
|
78
|
-
'_ref property is deprecated and will be removed in v9, please use ref instead'
|
|
79
|
-
)
|
|
80
|
-
return this.ref
|
|
81
|
-
}
|
|
82
|
-
|
|
83
77
|
get initialState() {
|
|
84
78
|
return {
|
|
85
79
|
isTruncated: false,
|
|
@@ -32,10 +32,10 @@ import {
|
|
|
32
32
|
isVisible
|
|
33
33
|
} from '@instructure/ui-dom-utils'
|
|
34
34
|
|
|
35
|
-
import measureText from './measureText'
|
|
36
|
-
import cleanString from './cleanString'
|
|
37
|
-
import cleanData from './cleanData'
|
|
38
|
-
import { TruncateTextCommonProps } from '../props'
|
|
35
|
+
import measureText from './measureText.js'
|
|
36
|
+
import cleanString from './cleanString.js'
|
|
37
|
+
import cleanData from './cleanData.js'
|
|
38
|
+
import { TruncateTextCommonProps } from '../props.js'
|
|
39
39
|
|
|
40
40
|
export type TruncatorOptions = {
|
|
41
41
|
parent?: Node
|
package/src/exports/a.ts
CHANGED
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
export { TruncateText } from '../TruncateText/v1'
|
|
24
|
+
export { TruncateText } from '../TruncateText/v1/index.js'
|
|
25
25
|
export type { TruncateTextProps } from '../TruncateText/v1/props'
|
package/src/exports/b.ts
CHANGED
|
@@ -21,5 +21,5 @@
|
|
|
21
21
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
|
-
export { TruncateText } from '../TruncateText/v2'
|
|
24
|
+
export { TruncateText } from '../TruncateText/v2/index.js'
|
|
25
25
|
export type { TruncateTextProps } from '../TruncateText/v2/props'
|