@nysds/components 1.11.3 → 1.12.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/dist/.vscode/vscode.css-custom-data.json +6 -0
- package/dist/.vscode/vscode.html-custom-data.json +616 -0
- package/dist/custom-elements.json +279 -568
- package/dist/nysds.es.js +1197 -1317
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +124 -129
- package/dist/nysds.js.map +1 -1
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +0 -2
- package/dist/packages/nys-accordion/src/nys-accordion.figma.d.ts +1 -0
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +0 -2
- package/dist/packages/nys-alert/src/nys-alert.d.ts +1 -7
- package/dist/packages/nys-alert/src/nys-alert.figma.d.ts +1 -0
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +0 -2
- package/dist/packages/nys-avatar/src/nys-avatar.figma.d.ts +1 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.figma.d.ts +1 -0
- package/dist/packages/nys-badge/src/nys-badge.d.ts +2 -8
- package/dist/packages/nys-badge/src/nys-badge.figma.d.ts +1 -0
- package/dist/packages/nys-button/src/nys-button.d.ts +4 -20
- package/dist/packages/nys-button/src/nys-button.figma.d.ts +1 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +2 -8
- package/dist/packages/nys-checkbox/src/nys-checkbox.figma.d.ts +1 -0
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +2 -8
- package/dist/packages/nys-divider/src/nys-divider.figma.d.ts +1 -0
- package/dist/packages/nys-errormessage/src/nys-errormessage.d.ts +0 -1
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +1 -5
- package/dist/packages/nys-fileinput/src/nys-fileinput.figma.d.ts +1 -0
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +0 -3
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.figma.d.ts +1 -0
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +0 -3
- package/dist/packages/nys-globalheader/src/nys-globalheader.figma.d.ts +1 -0
- package/dist/packages/nys-icon/src/nys-icon.d.ts +1 -4
- package/dist/packages/nys-icon/src/nys-icon.figma.d.ts +1 -0
- package/dist/packages/nys-modal/src/nys-modal.d.ts +1 -7
- package/dist/packages/nys-modal/src/nys-modal.figma.d.ts +1 -0
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +0 -3
- package/dist/packages/nys-pagination/src/nys-pagination.figma.d.ts +1 -0
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +1 -7
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.figma.d.ts +1 -0
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +2 -10
- package/dist/packages/nys-select/src/nys-select.d.ts +2 -9
- package/dist/packages/nys-select/src/nys-select.figma.d.ts +1 -0
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +0 -1
- package/dist/packages/nys-skipnav/src/nys-skipnav.figma.d.ts +1 -0
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +3 -11
- package/dist/packages/nys-textarea/src/nys-textarea.figma.d.ts +1 -0
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +3 -11
- package/dist/packages/nys-textinput/src/nys-textinput.figma.d.ts +1 -0
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +1 -7
- package/dist/packages/nys-toggle/src/nys-toggle.figma.d.ts +1 -0
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +21 -9
- package/dist/packages/nys-tooltip/src/nys-tooltip.figma.d.ts +1 -0
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +0 -1
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.figma.d.ts +1 -0
- package/dist/packages/nys-unavheader/src/nys-unavheader.figma.d.ts +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,34 +4,46 @@ export declare class NysTooltip extends LitElement {
|
|
|
4
4
|
id: string;
|
|
5
5
|
text: string;
|
|
6
6
|
inverted: boolean;
|
|
7
|
-
|
|
7
|
+
for: string;
|
|
8
8
|
private _active;
|
|
9
9
|
private _userHasSetPosition;
|
|
10
10
|
private _originalUserPosition;
|
|
11
11
|
private _internallyUpdatingPosition;
|
|
12
|
-
|
|
12
|
+
private _hideTimeout;
|
|
13
13
|
private _position;
|
|
14
14
|
get position(): "right" | "top" | "bottom" | "left" | null;
|
|
15
15
|
set position(value: "right" | "top" | "bottom" | "left" | null);
|
|
16
|
-
/**************** Lifecycle Methods ****************/
|
|
17
16
|
constructor();
|
|
18
17
|
connectedCallback(): void;
|
|
19
18
|
disconnectedCallback(): void;
|
|
20
|
-
|
|
21
|
-
firstUpdated(): void;
|
|
19
|
+
firstUpdated(): Promise<void>;
|
|
22
20
|
updated(changedProps: Map<string, unknown>): void;
|
|
23
|
-
|
|
24
|
-
private _handleTooltipEnter;
|
|
21
|
+
private _showTooltip;
|
|
25
22
|
private _handleBlurOrMouseLeave;
|
|
23
|
+
private _triggerFadeOut;
|
|
24
|
+
private _cancelFadeOut;
|
|
26
25
|
private _addScrollListeners;
|
|
27
26
|
private _removeScrollListeners;
|
|
28
27
|
private _handleScrollOrResize;
|
|
29
28
|
private _handleEscapeKey;
|
|
30
|
-
|
|
29
|
+
private _getReferenceElement;
|
|
31
30
|
private _passAria;
|
|
31
|
+
/**
|
|
32
|
+
* In React, the reference element found is often the native HTML element within the nys-component.
|
|
33
|
+
* Therefore, this function accounts for the closest NYS component ancestor that supports a tooltip prop.
|
|
34
|
+
*/
|
|
35
|
+
private _applyTooltipPropToFormComponent;
|
|
32
36
|
private _applyFocusBehavior;
|
|
37
|
+
/**
|
|
38
|
+
* Checks if the tooltip fits inside the viewport on the given side of the trigger.
|
|
39
|
+
* Used for auto-positioning. Ignores text overflow for now.
|
|
40
|
+
*/
|
|
33
41
|
private _doesPositionFit;
|
|
34
|
-
private
|
|
42
|
+
private _userPositionTooltip;
|
|
43
|
+
private _autoPositionTooltip;
|
|
44
|
+
private _positionStartingBase;
|
|
45
|
+
private _positionTooltipElement;
|
|
46
|
+
private applyInverseTransform;
|
|
35
47
|
private _setInternalPosition;
|
|
36
48
|
private _shiftTooltipIntoViewport;
|
|
37
49
|
private _resetTooltipPositioningStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "New York State's design system and code component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"scripts": {
|
|
24
24
|
"dev": "vite",
|
|
25
25
|
"gen": "plop",
|
|
26
|
-
"build": "
|
|
26
|
+
"build": "tsc --emitDeclarationOnly && vite build",
|
|
27
27
|
"build:umd": "tsc --emitDeclarationOnly && vite build --config vite.config.umd.js",
|
|
28
|
-
"build:packages": "
|
|
29
|
-
"build:all": "npm run clean:dist && NODE_ENV=production npm run build:packages && NODE_ENV=production npm run build && NODE_ENV=production npm run build:umd && npm run cem",
|
|
28
|
+
"build:packages": "node src/scripts/build-order.js",
|
|
29
|
+
"build:all": "npm run clean:dist && npm run lit-analyze && npm run lint && NODE_ENV=production npm run build:packages && NODE_ENV=production npm run build && NODE_ENV=production npm run build:umd && npm run cem",
|
|
30
30
|
"build:link": "npm run build:all && npm link",
|
|
31
|
-
"lint": "eslint
|
|
32
|
-
"lint:fix": "eslint
|
|
31
|
+
"lint": "eslint",
|
|
32
|
+
"lint:fix": "eslint --fix",
|
|
33
33
|
"lit-analyze": "lit-analyzer $(find ./packages -name '*.ts' ! -name '*.figma.*')",
|
|
34
34
|
"release": "NODE_ENV=production npm run build:all && NODE_ENV=production npm run test && npm run cem && NODE_ENV=production npm publish --workspaces --access public && NODE_ENV=production npm publish --access public",
|
|
35
35
|
"release:dry-run": "NODE_ENV=production npm run build:all && NODE_ENV=production npm run test && npm run cem && node src/scripts/publish-dry-run.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"storybook:build:all": "NODE_ENV=production npm run build:all && npm run storybook",
|
|
41
41
|
"build-storybook": "npm run build:packages && storybook build",
|
|
42
42
|
"storybook:cibuild": "storybook build",
|
|
43
|
-
"clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules",
|
|
44
|
-
"clean:dist": "rm -rf dist && rm -rf packages/*/dist",
|
|
43
|
+
"clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules && rm -rf packages/**/*/node_modules",
|
|
44
|
+
"clean:dist": "rm -rf storybook-static && rm -rf coverage && rm -rf packages/*/coverage && rm -rf dist && rm -rf packages/*/dist && rm -rf packages/**/*/dist",
|
|
45
45
|
"clean:all": "npm run clean:dist && npm run clean:node",
|
|
46
46
|
"code-connect": "dotenv -- npx figma connect publish",
|
|
47
47
|
"cem": "npx cem analyze --config 'custom-elements-manifest.config.mjs'"
|