@nysds/components 1.21.1 → 1.22.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.
- package/custom-elements.json +1562 -1029
- package/dist/.vscode/vscode.css-custom-data.json +75 -0
- package/dist/.vscode/vscode.html-custom-data.json +129 -60
- package/dist/custom-elements.json +1562 -1029
- package/dist/{nys-icon.library-BxwfG3ym-D4Dl8jc_.js → nys-icon.library-715cAMBp-BmiCym2_.js} +3 -3
- package/dist/{nys-icon.library-BxwfG3ym-D4Dl8jc_.js.map → nys-icon.library-715cAMBp-BmiCym2_.js.map} +1 -1
- package/dist/{nys-icon.library-C02yNW9R.js → nys-icon.library-C0_LOBWi.js} +2 -2
- package/dist/{nys-icon.library-C02yNW9R.js.map → nys-icon.library-C0_LOBWi.js.map} +1 -1
- package/dist/nysds.es.js +5074 -3645
- package/dist/nysds.es.js.map +1 -1
- package/dist/nysds.js +252 -248
- package/dist/nysds.js.map +1 -1
- package/dist/packages/codegen/src/index.d.ts +16 -0
- package/dist/packages/codegen/src/manifest/components.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/filters.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/form-control.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/load.d.ts +10 -0
- package/dist/packages/codegen/src/manifest/naming.d.ts +6 -0
- package/dist/packages/codegen/src/manifest/packages.d.ts +5 -0
- package/dist/packages/codegen/src/manifest/types.d.ts +6 -0
- package/dist/packages/codegen/src/transform/index.d.ts +19 -0
- package/dist/packages/codegen/src/transform/parse.d.ts +18 -0
- package/dist/packages/codegen/src/transform/shared.d.ts +61 -0
- package/dist/packages/codegen/src/transform/to-angular.d.ts +6 -0
- package/dist/packages/codegen/src/transform/to-jsx.d.ts +6 -0
- package/dist/packages/internals/src/form-control-mixin.d.ts +16 -0
- package/dist/packages/internals/src/form-events.d.ts +22 -0
- package/dist/packages/internals/src/index.d.ts +2 -1
- package/dist/packages/internals/src/types.d.ts +6 -0
- package/dist/packages/mcp-server/src/lib/cem-parser.d.ts +12 -0
- package/dist/packages/mcp-server/src/lib/framework-snippets.d.ts +35 -0
- package/dist/packages/mcp-server/src/lib/framework-usage.d.ts +19 -0
- package/dist/packages/mcp-server/src/lib/frameworks-data.d.ts +18 -0
- package/dist/packages/mcp-server/src/resources/frameworks.d.ts +14 -0
- package/dist/packages/nys-accordion/src/nys-accordion.d.ts +12 -0
- package/dist/packages/nys-accordion/src/nys-accordionitem.d.ts +9 -1
- package/dist/packages/nys-alert/src/nys-alert.d.ts +39 -1
- package/dist/packages/nys-avatar/src/nys-avatar.d.ts +16 -0
- package/dist/packages/nys-backtotop/src/nys-backtotop.d.ts +12 -0
- package/dist/packages/nys-badge/src/nys-badge.d.ts +18 -0
- package/dist/packages/nys-breadcrumbs/src/nys-breadcrumbs.d.ts +22 -1
- package/dist/packages/nys-button/src/nys-button.d.ts +35 -4
- package/dist/packages/nys-card/src/nys-card.d.ts +20 -0
- package/dist/packages/nys-checkbox/src/nys-checkbox.d.ts +77 -7
- package/dist/packages/nys-checkbox/src/nys-checkboxgroup.d.ts +46 -0
- package/dist/packages/nys-combobox/src/nys-combobox.d.ts +51 -6
- package/dist/packages/nys-datepicker/src/nys-datepicker.d.ts +44 -2
- package/dist/packages/nys-divider/src/nys-divider.d.ts +9 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenu.d.ts +43 -0
- package/dist/packages/nys-dropdownmenu/src/nys-dropdownmenuitem.d.ts +21 -1
- package/dist/packages/nys-fileinput/src/index.d.ts +1 -0
- package/dist/packages/nys-fileinput/src/nys-fileinput.d.ts +42 -6
- package/dist/packages/nys-fileinput/src/nys-fileitem.d.ts +9 -1
- package/dist/packages/nys-globalfooter/src/nys-globalfooter.d.ts +17 -0
- package/dist/packages/nys-globalheader/src/nys-globalheader.d.ts +18 -0
- package/dist/packages/nys-icon/src/nys-icon.d.ts +18 -0
- package/dist/packages/nys-iconlist/src/nys-iconlist.d.ts +16 -0
- package/dist/packages/nys-label/src/nys-label.d.ts +3 -1
- package/dist/packages/nys-modal/src/nys-modal.d.ts +26 -2
- package/dist/packages/nys-pagination/src/nys-pagination.d.ts +21 -2
- package/dist/packages/nys-processlist/src/nys-processlist.d.ts +16 -0
- package/dist/packages/nys-processlist/src/nys-processlistitem.d.ts +1 -1
- package/dist/packages/nys-radiobutton/src/nys-radiobutton.d.ts +29 -5
- package/dist/packages/nys-radiobutton/src/nys-radiogroup.d.ts +66 -4
- package/dist/packages/nys-select/src/nys-select.d.ts +22 -4
- package/dist/packages/nys-skipnav/src/nys-skipnav.d.ts +8 -0
- package/dist/packages/nys-stepper/src/nys-step.d.ts +8 -1
- package/dist/packages/nys-stepper/src/nys-stepper.d.ts +8 -0
- package/dist/packages/nys-tab/src/nys-tab.d.ts +22 -3
- package/dist/packages/nys-tab/src/nys-tabgroup.d.ts +12 -0
- package/dist/packages/nys-tab/src/nys-tabpanel.d.ts +2 -0
- package/dist/packages/nys-table/src/nys-table.d.ts +39 -2
- package/dist/packages/nys-textarea/src/nys-textarea.d.ts +47 -4
- package/dist/packages/nys-textinput/src/nys-textinput.d.ts +42 -4
- package/dist/packages/nys-toggle/src/nys-toggle.d.ts +37 -3
- package/dist/packages/nys-tooltip/src/nys-tooltip.d.ts +13 -0
- package/dist/packages/nys-unavfooter/src/nys-unavfooter.d.ts +13 -0
- package/dist/packages/nys-unavheader/src/nys-unavheader.d.ts +26 -4
- package/dist/packages/nys-verticalnav/src/nys-verticalnav.d.ts +14 -0
- package/dist/packages/nys-verticalnav/src/nys-verticalnavgroup.d.ts +11 -0
- package/dist/packages/nys-video/src/nys-video.d.ts +14 -1
- package/package.json +31 -26
- package/packages/react/.turbo/turbo-build.log +0 -59
- package/packages/react/NysAccordion.d.ts +0 -75
- package/packages/react/NysAccordion.js +0 -24
- package/packages/react/NysAccordionItem.d.ts +0 -82
- package/packages/react/NysAccordionItem.js +0 -43
- package/packages/react/NysAlert.d.ts +0 -102
- package/packages/react/NysAlert.js +0 -61
- package/packages/react/NysAvatar.d.ts +0 -88
- package/packages/react/NysAvatar.js +0 -40
- package/packages/react/NysBacktotop.d.ts +0 -57
- package/packages/react/NysBacktotop.js +0 -23
- package/packages/react/NysBadge.d.ts +0 -78
- package/packages/react/NysBadge.js +0 -42
- package/packages/react/NysBreadcrumbItem.d.ts +0 -72
- package/packages/react/NysBreadcrumbItem.js +0 -42
- package/packages/react/NysBreadcrumbs.d.ts +0 -89
- package/packages/react/NysBreadcrumbs.js +0 -50
- package/packages/react/NysButton.d.ts +0 -171
- package/packages/react/NysButton.js +0 -83
- package/packages/react/NysCard.d.ts +0 -121
- package/packages/react/NysCard.js +0 -63
- package/packages/react/NysCheckbox.d.ts +0 -145
- package/packages/react/NysCheckbox.js +0 -78
- package/packages/react/NysCheckboxgroup.d.ts +0 -88
- package/packages/react/NysCheckboxgroup.js +0 -46
- package/packages/react/NysCombobox.d.ts +0 -126
- package/packages/react/NysCombobox.js +0 -66
- package/packages/react/NysDatepicker.d.ts +0 -128
- package/packages/react/NysDatepicker.js +0 -76
- package/packages/react/NysDivider.d.ts +0 -54
- package/packages/react/NysDivider.js +0 -22
- package/packages/react/NysDropdownMenu.d.ts +0 -59
- package/packages/react/NysDropdownMenu.js +0 -23
- package/packages/react/NysDropdownMenuItem.d.ts +0 -75
- package/packages/react/NysDropdownMenuItem.js +0 -47
- package/packages/react/NysErrorMessage.d.ts +0 -60
- package/packages/react/NysErrorMessage.js +0 -24
- package/packages/react/NysFileItem.d.ts +0 -69
- package/packages/react/NysFileItem.js +0 -37
- package/packages/react/NysFileinput.d.ts +0 -130
- package/packages/react/NysFileinput.js +0 -74
- package/packages/react/NysGlobalFooter.d.ts +0 -77
- package/packages/react/NysGlobalFooter.js +0 -32
- package/packages/react/NysGlobalHeader.d.ts +0 -82
- package/packages/react/NysGlobalHeader.js +0 -32
- package/packages/react/NysIcon.d.ts +0 -75
- package/packages/react/NysIcon.js +0 -50
- package/packages/react/NysIconlist.d.ts +0 -57
- package/packages/react/NysIconlist.js +0 -23
- package/packages/react/NysIconlistitem.d.ts +0 -63
- package/packages/react/NysIconlistitem.js +0 -23
- package/packages/react/NysLabel.d.ts +0 -81
- package/packages/react/NysLabel.js +0 -40
- package/packages/react/NysModal.d.ts +0 -90
- package/packages/react/NysModal.js +0 -50
- package/packages/react/NysOption.d.ts +0 -66
- package/packages/react/NysOption.js +0 -25
- package/packages/react/NysPagination.d.ts +0 -72
- package/packages/react/NysPagination.js +0 -45
- package/packages/react/NysProcesslist.d.ts +0 -65
- package/packages/react/NysProcesslist.js +0 -25
- package/packages/react/NysProcesslistitem.d.ts +0 -61
- package/packages/react/NysProcesslistitem.js +0 -35
- package/packages/react/NysRadiobutton.d.ts +0 -132
- package/packages/react/NysRadiobutton.js +0 -72
- package/packages/react/NysRadiogroup.d.ts +0 -104
- package/packages/react/NysRadiogroup.js +0 -62
- package/packages/react/NysSelect.d.ts +0 -119
- package/packages/react/NysSelect.js +0 -67
- package/packages/react/NysSkipnav.d.ts +0 -54
- package/packages/react/NysSkipnav.js +0 -22
- package/packages/react/NysStep.d.ts +0 -73
- package/packages/react/NysStep.js +0 -40
- package/packages/react/NysStepper.d.ts +0 -67
- package/packages/react/NysStepper.js +0 -26
- package/packages/react/NysTab.d.ts +0 -90
- package/packages/react/NysTab.js +0 -39
- package/packages/react/NysTabgroup.d.ts +0 -76
- package/packages/react/NysTabgroup.js +0 -22
- package/packages/react/NysTable.d.ts +0 -80
- package/packages/react/NysTable.js +0 -41
- package/packages/react/NysTabpanel.d.ts +0 -70
- package/packages/react/NysTabpanel.js +0 -21
- package/packages/react/NysTextarea.d.ts +0 -141
- package/packages/react/NysTextarea.js +0 -79
- package/packages/react/NysTextinput.d.ts +0 -144
- package/packages/react/NysTextinput.js +0 -83
- package/packages/react/NysToggle.d.ts +0 -102
- package/packages/react/NysToggle.js +0 -59
- package/packages/react/NysTooltip.d.ts +0 -60
- package/packages/react/NysTooltip.js +0 -24
- package/packages/react/NysUnavFooter.d.ts +0 -61
- package/packages/react/NysUnavFooter.js +0 -21
- package/packages/react/NysUnavHeader.d.ts +0 -95
- package/packages/react/NysUnavHeader.js +0 -54
- package/packages/react/NysVerticalnav.d.ts +0 -67
- package/packages/react/NysVerticalnav.js +0 -26
- package/packages/react/NysVerticalnavGroup.d.ts +0 -76
- package/packages/react/NysVerticalnavGroup.js +0 -43
- package/packages/react/NysVideo.d.ts +0 -83
- package/packages/react/NysVideo.js +0 -53
- package/packages/react/README.md +0 -92
- package/packages/react/index.d.ts +0 -49
- package/packages/react/index.js +0 -49
- package/packages/react/nysds-jsx.d.ts +0 -2009
- package/packages/react/react-utils.js +0 -40
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.1",
|
|
4
4
|
"description": "New York State's design system and code component library.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"workspaces": [
|
|
7
|
-
"packages/*"
|
|
7
|
+
"packages/*",
|
|
8
|
+
"framework-examples/*"
|
|
8
9
|
],
|
|
9
10
|
"files": [
|
|
10
11
|
"dist/",
|
|
11
|
-
"custom-elements.json"
|
|
12
|
-
"packages/react/"
|
|
12
|
+
"custom-elements.json"
|
|
13
13
|
],
|
|
14
14
|
"main": "dist/nysds.js",
|
|
15
15
|
"module": "dist/nysds.es.js",
|
|
@@ -20,53 +20,54 @@
|
|
|
20
20
|
"import": "./dist/nysds.es.js",
|
|
21
21
|
"require": "./dist/nysds.js"
|
|
22
22
|
},
|
|
23
|
-
"./
|
|
24
|
-
"import": "./packages/react/index.js",
|
|
25
|
-
"types": "./packages/react/index.d.ts"
|
|
26
|
-
}
|
|
23
|
+
"./custom-elements.json": "./dist/custom-elements.json"
|
|
27
24
|
},
|
|
28
25
|
"customElements": "custom-elements.json",
|
|
29
26
|
"scripts": {
|
|
30
27
|
"dev": "vite",
|
|
31
|
-
"gen": "plop",
|
|
32
|
-
"gen
|
|
33
|
-
"gen
|
|
28
|
+
"gen:new-comp": "plop && npm i",
|
|
29
|
+
"gen:stories": "npm run cem && node src/scripts/generate-stories.mjs",
|
|
30
|
+
"gen:stories:component": "sh -c 'node src/scripts/generate-stories.mjs \"$@\" && npm run lint:fix' --",
|
|
34
31
|
"build": "tsc --emitDeclarationOnly && vite build",
|
|
35
32
|
"build:umd": "cross-env BUILD_FORMAT=umd vite build",
|
|
36
33
|
"tsc:packages": "tsc -b tsconfig.build.json",
|
|
37
|
-
"build:packages": "npm run tsc:packages && turbo run build --filter='./packages/*' --log-order=grouped",
|
|
34
|
+
"build:packages": "npm run tsc:packages && turbo run build --filter='./packages/*' --filter='!@nysds/codegen' --filter='!@nysds/react' --filter='!@nysds/angular' --filter='!@nysds/vue' --log-order=grouped",
|
|
38
35
|
"build:root": "cross-env NODE_ENV=production npm run build && cross-env NODE_ENV=production npm run build:umd",
|
|
39
|
-
"build:all": "npm run clean:dist && npm run lit-analyze || true && cross-env NODE_ENV=production npm run build:packages && npm run build:root && npm run cem && npm run
|
|
40
|
-
"build:
|
|
36
|
+
"build:all": "npm run clean:dist && npm run lit-analyze || true && cross-env NODE_ENV=production npm run build:packages && npm run build:root && npm run cem && npm run build:frameworks && node src/scripts/generate-stories.mjs && npm run build:mcp && npm run lint:fix",
|
|
37
|
+
"build:frameworks": "cross-env NODE_ENV=production turbo run build --filter=@nysds/codegen --filter=@nysds/react --filter=@nysds/angular --filter=@nysds/vue --only",
|
|
38
|
+
"build:examples": "npm run build -w framework-examples/react-vite -w framework-examples/vue-vite -w framework-examples/next-app -w framework-examples/angular-app -w framework-examples/angular-ngmodule",
|
|
39
|
+
"build:mcp": "cross-env NODE_ENV=production npm run build -w @nysds/mcp-server",
|
|
41
40
|
"build:link": "npm run build:all && npm link && cd packages/styles && npm link",
|
|
42
41
|
"lint": "eslint --cache --cache-strategy=content --cache-location node_modules/.cache/eslint && (stylelint \"**/*.scss\" || true)",
|
|
43
42
|
"lint:fix": "bash src/scripts/lint-fix.sh",
|
|
44
43
|
"lit-analyze": "find ./packages/nys-*/ -name '*.ts' ! -name '*.figma.*' | xargs lit-analyzer {}",
|
|
45
|
-
"playwright:install": "
|
|
44
|
+
"playwright:install": "node node_modules/playwright/cli.js install --with-deps",
|
|
46
45
|
"release": "cross-env NODE_ENV=production npm run build:all && cross-env NODE_ENV=production npm run test && npm run cem && cross-env NODE_ENV=production npm publish --workspaces --access public && cross-env NODE_ENV=production npm publish --access public",
|
|
47
46
|
"release:dry-run": "cross-env NODE_ENV=production npm run build:all && cross-env NODE_ENV=production npm run test && npm run cem && node src/scripts/publish-dry-run.js",
|
|
48
47
|
"release:alpha": "npm run build && npm run build:umd && npm publish --tag next",
|
|
49
48
|
"release:zip": "npm run build:all && node src/scripts/create-release-zip.js",
|
|
50
|
-
"pretest": "
|
|
49
|
+
"pretest": "node node_modules/playwright/cli.js install",
|
|
51
50
|
"test": "wtr --node-resolve || true",
|
|
52
51
|
"test:ssr": "node src/scripts/test-ssr.mjs && npm run audit:dist",
|
|
53
52
|
"audit:dist": "node src/scripts/audit-dist.mjs",
|
|
54
|
-
"test:build": "npm run build:all && npm run test",
|
|
53
|
+
"test:build": "npm run build:all && npm run test && npm run build:examples && npm run test:examples",
|
|
54
|
+
"test:examples": "npm run test -w framework-examples/react-vite -w framework-examples/vue-vite -w framework-examples/next-app -w framework-examples/angular-app -w framework-examples/angular-ngmodule && npm run test:zoneless -w framework-examples/angular-app",
|
|
55
55
|
"test:report": "wtr --node-resolve || true && open coverage/lcov-report/index.html",
|
|
56
56
|
"test:compact": "export NYSDS_TEST_OUTPUT=compact && wtr --node-resolve",
|
|
57
57
|
"test:ai": "export NYSDS_TEST_OUTPUT=ai && wtr --node-resolve",
|
|
58
|
+
"test:all": "npm run test && npm run test:examples",
|
|
58
59
|
"storybook": "cross-env NODE_ENV=production storybook dev -p 6006",
|
|
59
60
|
"storybook:build:all": "cross-env NODE_ENV=production npm run build:all && npm run storybook",
|
|
60
61
|
"build-storybook": "npm run build:packages && storybook build",
|
|
61
62
|
"storybook:cibuild": "storybook build",
|
|
62
|
-
"mcp-server:build": "turbo run build --filter=@nysds/mcp-server",
|
|
63
|
+
"mcp-server:build": "cross-env NODE_ENV=production turbo run build --filter=@nysds/mcp-server",
|
|
63
64
|
"clean:node": "rm -rf node_modules && rm -rf packages/*/node_modules && rm -rf packages/**/*/node_modules",
|
|
64
|
-
"clean:dist": "rm -rf storybook-static && rm -rf coverage && rm -rf packages/*/coverage && rm -rf dist && find packages -type d -name dist ! -path '*/mcp-server/dist' -exec rm -rf {} + 2>/dev/null && find packages -name '*.tsbuildinfo' ! -path '*/mcp-server/*' -delete 2>/dev/null && rm -f ./*.tsbuildinfo 2>/dev/null || true",
|
|
65
|
+
"clean:dist": "rm -rf packages/angular/.ngbuild && rm -rf storybook-static && rm -rf coverage && rm -rf packages/*/coverage && rm -rf dist && find packages -type d -name dist ! -path '*/mcp-server/dist' -exec rm -rf {} + 2>/dev/null && find packages -name '*.tsbuildinfo' ! -path '*/mcp-server/*' -delete 2>/dev/null && rm -f ./*.tsbuildinfo 2>/dev/null || true && rm -rf release && rm NYSDS-*.zip 2>/dev/null || true",
|
|
65
66
|
"clean:turbo": "find packages -type d -name '.turbo' -exec rm -rf {} + && rm -rf .turbo",
|
|
66
67
|
"clean:cache": "rm -rf node_modules/.cache",
|
|
67
68
|
"clean:all": "npm run clean:dist && npm run clean:node && npm run clean:cache && find packages -name '*.tsbuildinfo' -delete 2>/dev/null || true && npm run clean:turbo",
|
|
68
69
|
"code-connect": "dotenv -- npx figma connect publish",
|
|
69
|
-
"cem": "npx cem analyze --config src/scripts/custom-elements-manifest.config.mjs && cp ./custom-elements.json dist/
|
|
70
|
+
"cem": "npx cem analyze --config src/scripts/custom-elements-manifest.config.mjs && node src/scripts/verify-form-contract.mjs && mkdir -p dist && cp ./custom-elements.json dist/",
|
|
70
71
|
"verify:a11y-names": "node src/scripts/verify-a11y-names.mjs",
|
|
71
72
|
"verify:utility-docs": "npm run build:mcp && node src/scripts/verify-utility-docs.mjs"
|
|
72
73
|
},
|
|
@@ -80,12 +81,13 @@
|
|
|
80
81
|
"url": "https://github.com/ITS-HCD/nysds/issues"
|
|
81
82
|
},
|
|
82
83
|
"homepage": "https://designsystem.ny.gov/",
|
|
83
|
-
"packageManager": "npm@
|
|
84
|
+
"packageManager": "npm@12.1.0",
|
|
84
85
|
"devDependencies": {
|
|
85
86
|
"@chromatic-com/storybook": "^5.1.2",
|
|
86
87
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
87
88
|
"@figma/code-connect": "^1.4.0",
|
|
88
89
|
"@floating-ui/dom": "^1.7.4",
|
|
90
|
+
"@nysds/cem-plugin-examples": "^1.1.0",
|
|
89
91
|
"@open-wc/testing": "^4.0.0",
|
|
90
92
|
"@storybook/addon-a11y": "10.3.5",
|
|
91
93
|
"@storybook/addon-docs": "10.3.5",
|
|
@@ -99,10 +101,7 @@
|
|
|
99
101
|
"@web/test-runner": "^1.0.0",
|
|
100
102
|
"@web/test-runner-commands": "^1.0.1",
|
|
101
103
|
"@web/test-runner-playwright": "^1.0.0",
|
|
102
|
-
"cem-plugin-examples": "github:its-hcd/cem-plugin-examples",
|
|
103
104
|
"cross-env": "^10.1.0",
|
|
104
|
-
"custom-element-jsx-integration": "^1.6.0",
|
|
105
|
-
"custom-element-react-wrappers": "^1.7.3",
|
|
106
105
|
"custom-element-vs-code-integration": "^1.5.0",
|
|
107
106
|
"dotenv-cli": "^10.0.0",
|
|
108
107
|
"eslint": "^10.0.0",
|
|
@@ -135,8 +134,7 @@
|
|
|
135
134
|
]
|
|
136
135
|
},
|
|
137
136
|
"overrides": {
|
|
138
|
-
"storybook": "$storybook"
|
|
139
|
-
"playwright": "1.61.0"
|
|
137
|
+
"storybook": "$storybook"
|
|
140
138
|
},
|
|
141
139
|
"dependencies": {
|
|
142
140
|
"dompurify": "^3.4.7",
|
|
@@ -145,5 +143,12 @@
|
|
|
145
143
|
"sideEffects": true,
|
|
146
144
|
"peerDependencies": {
|
|
147
145
|
"lit": "^3.3.1"
|
|
146
|
+
},
|
|
147
|
+
"allowScripts": {
|
|
148
|
+
"esbuild": true,
|
|
149
|
+
"@parcel/watcher": true,
|
|
150
|
+
"lmdb@3.4.2": true,
|
|
151
|
+
"msgpackr-extract@3.0.4": true,
|
|
152
|
+
"rs-module-lexer": true
|
|
148
153
|
}
|
|
149
154
|
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
> @nysds/react@1.22.0-alpha-7 build
|
|
3
|
-
> rm -rf dist && tsc --emitDeclarationOnly && vite build
|
|
4
|
-
|
|
5
|
-
[36mvite v7.3.5 [32mbuilding client environment for production...[36m[39m
|
|
6
|
-
[2K[1Gtransforming (1) [2msrc/index.ts[22m[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[2K[1G[32m✓[39m 52 modules transformed.
|
|
7
|
-
[2K[1Grendering chunks (1)...[2K[1Grendering chunks (2)...[2K[1Grendering chunks (3)...[2K[1Grendering chunks (4)...[2K[1Grendering chunks (5)...[2K[1Grendering chunks (6)...[2K[1Grendering chunks (7)...[2K[1Grendering chunks (8)...[2K[1Grendering chunks (9)...[2K[1Grendering chunks (10)...[2K[1Grendering chunks (11)...[2K[1Grendering chunks (12)...[2K[1Grendering chunks (13)...[2K[1Grendering chunks (14)...[2K[1Grendering chunks (15)...[2K[1Grendering chunks (16)...[2K[1Grendering chunks (17)...[2K[1Grendering chunks (18)...[2K[1Grendering chunks (19)...[2K[1Grendering chunks (20)...[2K[1Grendering chunks (21)...[2K[1Grendering chunks (22)...[2K[1Grendering chunks (23)...[2K[1Grendering chunks (24)...[2K[1Grendering chunks (25)...[2K[1Grendering chunks (26)...[2K[1Grendering chunks (27)...[2K[1Grendering chunks (28)...[2K[1Grendering chunks (29)...[2K[1Grendering chunks (30)...[2K[1Grendering chunks (31)...[2K[1Grendering chunks (32)...[2K[1Grendering chunks (33)...[2K[1Grendering chunks (34)...[2K[1Grendering chunks (35)...[2K[1Grendering chunks (36)...[2K[1Grendering chunks (37)...[2K[1Grendering chunks (38)...[2K[1Grendering chunks (39)...[2K[1Grendering chunks (40)...[2K[1Grendering chunks (41)...[2K[1Grendering chunks (42)...[2K[1Grendering chunks (43)...[2K[1Grendering chunks (44)...[2K[1Grendering chunks (45)...[2K[1Grendering chunks (46)...[2K[1Grendering chunks (47)...[2K[1Grendering chunks (48)...[2K[1Grendering chunks (49)...[2K[1Grendering chunks (50)...[2K[1Grendering chunks (51)...[2K[1G[2K[1Gcomputing gzip size (0)...[2K[1Gcomputing gzip size (1)...[2K[1Gcomputing gzip size (2)...[2K[1Gcomputing gzip size (3)...[2K[1Gcomputing gzip size (4)...[2K[1Gcomputing gzip size (5)...[2K[1Gcomputing gzip size (6)...[2K[1Gcomputing gzip size (7)...[2K[1Gcomputing gzip size (8)...[2K[1Gcomputing gzip size (9)...[2K[1Gcomputing gzip size (10)...[2K[1Gcomputing gzip size (11)...[2K[1Gcomputing gzip size (12)...[2K[1Gcomputing gzip size (13)...[2K[1Gcomputing gzip size (14)...[2K[1Gcomputing gzip size (15)...[2K[1Gcomputing gzip size (16)...[2K[1Gcomputing gzip size (17)...[2K[1Gcomputing gzip size (18)...[2K[1Gcomputing gzip size (19)...[2K[1Gcomputing gzip size (20)...[2K[1Gcomputing gzip size (21)...[2K[1Gcomputing gzip size (22)...[2K[1Gcomputing gzip size (23)...[2K[1Gcomputing gzip size (24)...[2K[1Gcomputing gzip size (25)...[2K[1Gcomputing gzip size (26)...[2K[1Gcomputing gzip size (27)...[2K[1Gcomputing gzip size (28)...[2K[1Gcomputing gzip size (29)...[2K[1Gcomputing gzip size (30)...[2K[1Gcomputing gzip size (31)...[2K[1Gcomputing gzip size (32)...[2K[1Gcomputing gzip size (33)...[2K[1Gcomputing gzip size (34)...[2K[1Gcomputing gzip size (35)...[2K[1Gcomputing gzip size (36)...[2K[1Gcomputing gzip size (37)...[2K[1Gcomputing gzip size (38)...[2K[1Gcomputing gzip size (39)...[2K[1Gcomputing gzip size (40)...[2K[1Gcomputing gzip size (41)...[2K[1Gcomputing gzip size (42)...[2K[1Gcomputing gzip size (43)...[2K[1Gcomputing gzip size (44)...[2K[1Gcomputing gzip size (45)...[2K[1Gcomputing gzip size (46)...[2K[1Gcomputing gzip size (47)...[2K[1Gcomputing gzip size (48)...[2K[1Gcomputing gzip size (49)...[2K[1Gcomputing gzip size (50)...[2K[1Gcomputing gzip size (51)...[2K[1G[2mdist/[22m[36mgenerated/NysIcon.js [39m[1m[2m0.27 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
8
|
-
[2mdist/[22m[36mgenerated/NysBadge.js [39m[1m[2m0.27 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
9
|
-
[2mdist/[22m[36mgenerated/NysVideo.js [39m[1m[2m0.27 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
10
|
-
[2mdist/[22m[36mgenerated/NysAvatar.js [39m[1m[2m0.28 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
11
|
-
[2mdist/[22m[36mgenerated/NysOption.js [39m[1m[2m0.28 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
12
|
-
[2mdist/[22m[36mgenerated/NysDivider.js [39m[1m[2m0.28 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
13
|
-
[2mdist/[22m[36mgenerated/NysSkipnav.js [39m[1m[2m0.28 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
14
|
-
[2mdist/[22m[36mgenerated/NysStepper.js [39m[1m[2m0.28 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
15
|
-
[2mdist/[22m[36mgenerated/NysTabgroup.js [39m[1m[2m0.28 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
16
|
-
[2mdist/[22m[36mgenerated/NysTabpanel.js [39m[1m[2m0.28 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
17
|
-
[2mdist/[22m[36mgenerated/NysTooltip.js [39m[1m[2m0.28 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
18
|
-
[2mdist/[22m[36mgenerated/NysIconlist.js [39m[1m[2m0.29 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
19
|
-
[2mdist/[22m[36mgenerated/NysAccordion.js [39m[1m[2m0.29 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
20
|
-
[2mdist/[22m[36mgenerated/NysBacktotop.js [39m[1m[2m0.29 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
21
|
-
[2mdist/[22m[36mgenerated/NysUnavFooter.js [39m[1m[2m0.30 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
22
|
-
[2mdist/[22m[36mgenerated/NysProcesslist.js [39m[1m[2m0.30 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
23
|
-
[2mdist/[22m[36mgenerated/NysVerticalnav.js [39m[1m[2m0.30 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
24
|
-
[2mdist/[22m[36mgenerated/NysIconlistitem.js [39m[1m[2m0.30 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
25
|
-
[2mdist/[22m[36mgenerated/NysDropdownMenu.js [39m[1m[2m0.31 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
26
|
-
[2mdist/[22m[36mgenerated/NysErrorMessage.js [39m[1m[2m0.31 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
27
|
-
[2mdist/[22m[36mgenerated/NysGlobalFooter.js [39m[1m[2m0.31 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
28
|
-
[2mdist/[22m[36mgenerated/NysGlobalHeader.js [39m[1m[2m0.31 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
29
|
-
[2mdist/[22m[36mgenerated/NysAlert.js [39m[1m[2m0.32 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
30
|
-
[2mdist/[22m[36mgenerated/NysProcesslistitem.js [39m[1m[2m0.32 kB[22m[1m[22m[2m │ gzip: 0.19 kB[22m
|
|
31
|
-
[2mdist/[22m[36mgenerated/NysStep.js [39m[1m[2m0.32 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
32
|
-
[2mdist/[22m[36mgenerated/NysLabel.js [39m[1m[2m0.33 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
33
|
-
[2mdist/[22m[36mgenerated/NysFileItem.js [39m[1m[2m0.34 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
34
|
-
[2mdist/[22m[36mgenerated/NysModal.js [39m[1m[2m0.34 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
35
|
-
[2mdist/[22m[36mgenerated/NysPagination.js [39m[1m[2m0.34 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
36
|
-
[2mdist/[22m[36mgenerated/NysBreadcrumbs.js [39m[1m[2m0.35 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
37
|
-
[2mdist/[22m[36mgenerated/NysRadiobutton.js [39m[1m[2m0.35 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
38
|
-
[2mdist/[22m[36mgenerated/NysTable.js [39m[1m[2m0.36 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
39
|
-
[2mdist/[22m[36mgenerated/NysCard.js [39m[1m[2m0.37 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
40
|
-
[2mdist/[22m[36mgenerated/NysDropdownMenuItem.js [39m[1m[2m0.37 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
41
|
-
[2mdist/[22m[36mgenerated/NysButton.js [39m[1m[2m0.38 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
42
|
-
[2mdist/[22m[36mgenerated/NysSelect.js [39m[1m[2m0.38 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
43
|
-
[2mdist/[22m[36mgenerated/NysToggle.js [39m[1m[2m0.38 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
44
|
-
[2mdist/[22m[36mgenerated/NysAccordionItem.js [39m[1m[2m0.38 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
45
|
-
[2mdist/[22m[36mgenerated/NysTab.js [39m[1m[2m0.38 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
46
|
-
[2mdist/[22m[36mgenerated/NysFileinput.js [39m[1m[2m0.39 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
47
|
-
[2mdist/[22m[36mgenerated/NysUnavHeader.js [39m[1m[2m0.40 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m
|
|
48
|
-
[2mdist/[22m[36mgenerated/NysCheckboxgroup.js [39m[1m[2m0.41 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m
|
|
49
|
-
[2mdist/[22m[36mgenerated/NysCombobox.js [39m[1m[2m0.42 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m
|
|
50
|
-
[2mdist/[22m[36mgenerated/NysTextinput.js [39m[1m[2m0.42 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m
|
|
51
|
-
[2mdist/[22m[36mgenerated/NysDatepicker.js [39m[1m[2m0.43 kB[22m[1m[22m[2m │ gzip: 0.24 kB[22m
|
|
52
|
-
[2mdist/[22m[36mgenerated/NysRadiogroup.js [39m[1m[2m0.44 kB[22m[1m[22m[2m │ gzip: 0.26 kB[22m
|
|
53
|
-
[2mdist/[22m[36mgenerated/NysVerticalnavGroup.js [39m[1m[2m0.44 kB[22m[1m[22m[2m │ gzip: 0.25 kB[22m
|
|
54
|
-
[2mdist/[22m[36mgenerated/NysCheckbox.js [39m[1m[2m0.50 kB[22m[1m[22m[2m │ gzip: 0.26 kB[22m
|
|
55
|
-
[2mdist/[22m[36mgenerated/NysTextarea.js [39m[1m[2m0.50 kB[22m[1m[22m[2m │ gzip: 0.26 kB[22m
|
|
56
|
-
[2mdist/[22m[36mhooks/useNysField.js [39m[1m[2m0.51 kB[22m[1m[22m[2m │ gzip: 0.25 kB[22m
|
|
57
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m4.31 kB[22m[1m[22m[2m │ gzip: 0.97 kB[22m
|
|
58
|
-
[32m✓ built in 104ms[39m
|
|
59
|
-
⠙[1G[0K
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { NysAccordion as NysAccordionElement } from "../../dist/nysds.es.js";
|
|
3
|
-
|
|
4
|
-
export type { NysAccordionElement };
|
|
5
|
-
|
|
6
|
-
export interface NysAccordionProps extends Pick<
|
|
7
|
-
React.AllHTMLAttributes<HTMLElement>,
|
|
8
|
-
| "children"
|
|
9
|
-
| "dir"
|
|
10
|
-
| "hidden"
|
|
11
|
-
| "id"
|
|
12
|
-
| "lang"
|
|
13
|
-
| "slot"
|
|
14
|
-
| "style"
|
|
15
|
-
| "title"
|
|
16
|
-
| "translate"
|
|
17
|
-
| "onClick"
|
|
18
|
-
| "onFocus"
|
|
19
|
-
| "onBlur"
|
|
20
|
-
> {
|
|
21
|
-
/** Only one item can be expanded at a time. Expanding one collapses others. */
|
|
22
|
-
singleSelect?: boolean;
|
|
23
|
-
|
|
24
|
-
/** Adds borders around each accordion item. Propagates to all children. */
|
|
25
|
-
bordered?: boolean;
|
|
26
|
-
|
|
27
|
-
/** Unique identifier. Auto-generated if not provided. */
|
|
28
|
-
id?: NysAccordionElement["id"];
|
|
29
|
-
|
|
30
|
-
/** Heading element wrapping every item's toggle button (`h2` through `h6`).
|
|
31
|
-
|
|
32
|
-
Each item's trigger is a real heading, so this is what places the accordion
|
|
33
|
-
in the page outline: choose one level below the heading that introduces the
|
|
34
|
-
accordion (an accordion under an `h2` section heading uses the `h3`
|
|
35
|
-
default). An individual `nys-accordionitem` can override it with its own
|
|
36
|
-
`headingLevel`. `h1` is not offered because an accordion trigger is never
|
|
37
|
-
the page title. */
|
|
38
|
-
headingLevel?: NysAccordionElement["headingLevel"];
|
|
39
|
-
|
|
40
|
-
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
41
|
-
className?: string;
|
|
42
|
-
|
|
43
|
-
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
44
|
-
exportparts?: string;
|
|
45
|
-
|
|
46
|
-
/** Used for labels to link them with their inputs (using input id). */
|
|
47
|
-
htmlFor?: string;
|
|
48
|
-
|
|
49
|
-
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
50
|
-
key?: number | string;
|
|
51
|
-
|
|
52
|
-
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
53
|
-
part?: string;
|
|
54
|
-
|
|
55
|
-
/** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
|
|
56
|
-
ref?: any;
|
|
57
|
-
|
|
58
|
-
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
59
|
-
tabIndex?: number;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Container for accordion items with optional single-select and bordered styling.
|
|
64
|
-
* ---
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* ### **Slots:**
|
|
68
|
-
* - _default_ - Default slot for `nys-accordionitem` elements.
|
|
69
|
-
*
|
|
70
|
-
* ### **CSS Properties:**
|
|
71
|
-
* - **--nys-accordion-background-color--header** - Background color of the accordion header. _(default: undefined)_
|
|
72
|
-
* - **--nys-accordion-background-color--header--hover** - Background hover color of the accordion header. _(default: undefined)_
|
|
73
|
-
* - **--nys-accordion-content-max-width** - Maximum readable width of accordion content. Defaults to a character-based width (80ch) for readability. _(default: undefined)_
|
|
74
|
-
*/
|
|
75
|
-
export const NysAccordion: React.ForwardRefExoticComponent<NysAccordionProps>;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from "react";
|
|
2
|
-
import "../../dist/nysds.es.js";
|
|
3
|
-
|
|
4
|
-
export const NysAccordion = forwardRef((props, forwardedRef) => {
|
|
5
|
-
const { singleSelect, bordered, id, headingLevel, ...filteredProps } = props;
|
|
6
|
-
|
|
7
|
-
return React.createElement(
|
|
8
|
-
"nys-accordion",
|
|
9
|
-
{
|
|
10
|
-
...filteredProps,
|
|
11
|
-
id: props.id,
|
|
12
|
-
headingLevel: props.headingLevel,
|
|
13
|
-
class: props.className,
|
|
14
|
-
exportparts: props.exportparts,
|
|
15
|
-
for: props.htmlFor,
|
|
16
|
-
part: props.part,
|
|
17
|
-
tabindex: props.tabIndex,
|
|
18
|
-
singleSelect: props.singleSelect ? true : undefined,
|
|
19
|
-
bordered: props.bordered ? true : undefined,
|
|
20
|
-
style: { ...props.style },
|
|
21
|
-
},
|
|
22
|
-
props.children,
|
|
23
|
-
);
|
|
24
|
-
});
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
NysAccordionItem as NysAccordionItemElement,
|
|
4
|
-
CustomEvent,
|
|
5
|
-
} from "../../dist/nysds.es.js";
|
|
6
|
-
|
|
7
|
-
export type { NysAccordionItemElement, CustomEvent };
|
|
8
|
-
|
|
9
|
-
export interface NysAccordionItemProps extends Pick<
|
|
10
|
-
React.AllHTMLAttributes<HTMLElement>,
|
|
11
|
-
| "children"
|
|
12
|
-
| "dir"
|
|
13
|
-
| "hidden"
|
|
14
|
-
| "id"
|
|
15
|
-
| "lang"
|
|
16
|
-
| "slot"
|
|
17
|
-
| "style"
|
|
18
|
-
| "title"
|
|
19
|
-
| "translate"
|
|
20
|
-
| "onClick"
|
|
21
|
-
| "onFocus"
|
|
22
|
-
| "onBlur"
|
|
23
|
-
> {
|
|
24
|
-
/** Whether the content panel is visible. Toggle via click or keyboard. */
|
|
25
|
-
expanded?: boolean;
|
|
26
|
-
|
|
27
|
-
/** Adds border styling. Set by parent `nys-accordion`, not directly. */
|
|
28
|
-
bordered?: boolean;
|
|
29
|
-
|
|
30
|
-
/** Unique identifier. Auto-generated if not provided. */
|
|
31
|
-
id?: NysAccordionItemElement["id"];
|
|
32
|
-
|
|
33
|
-
/** Heading text displayed in the clickable toggle button. */
|
|
34
|
-
heading?: NysAccordionItemElement["heading"];
|
|
35
|
-
|
|
36
|
-
/** Heading element that wraps the toggle button (`h2` through `h6`).
|
|
37
|
-
|
|
38
|
-
Pick the level that puts the trigger in the right place in the page
|
|
39
|
-
outline — one level below the heading that introduces the accordion. Leave
|
|
40
|
-
it empty to follow the `headingLevel` of the enclosing `nys-accordion`,
|
|
41
|
-
which is the usual way to set it for a whole group; `h3` applies when
|
|
42
|
-
neither is specified. `h1` is not offered because an accordion trigger is
|
|
43
|
-
never the page title. */
|
|
44
|
-
headingLevel?: NysAccordionItemElement["headingLevel"];
|
|
45
|
-
|
|
46
|
-
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
47
|
-
className?: string;
|
|
48
|
-
|
|
49
|
-
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
50
|
-
exportparts?: string;
|
|
51
|
-
|
|
52
|
-
/** Used for labels to link them with their inputs (using input id). */
|
|
53
|
-
htmlFor?: string;
|
|
54
|
-
|
|
55
|
-
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
56
|
-
key?: number | string;
|
|
57
|
-
|
|
58
|
-
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
59
|
-
part?: string;
|
|
60
|
-
|
|
61
|
-
/** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
|
|
62
|
-
ref?: any;
|
|
63
|
-
|
|
64
|
-
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
65
|
-
tabIndex?: number;
|
|
66
|
-
|
|
67
|
-
/** Fired when expanded state changes. Detail: `{id, heading, expanded}`. */
|
|
68
|
-
onNysAccordionitemToggle?: (event: CustomEvent) => void;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Collapsible panel for use within nys-accordion with keyboard support.
|
|
73
|
-
* ---
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* ### **Events:**
|
|
77
|
-
* - **nys-accordionitem-toggle** - Fired when expanded state changes. Detail: `{id, heading, expanded}`.
|
|
78
|
-
*
|
|
79
|
-
* ### **Slots:**
|
|
80
|
-
* - _default_ - Default slot for panel content shown when expanded.
|
|
81
|
-
*/
|
|
82
|
-
export const NysAccordionItem: React.ForwardRefExoticComponent<NysAccordionItemProps>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useRef, useEffect } from "react";
|
|
2
|
-
import "../../dist/nysds.es.js";
|
|
3
|
-
import { useEventListener } from "./react-utils.js";
|
|
4
|
-
|
|
5
|
-
export const NysAccordionItem = forwardRef((props, forwardedRef) => {
|
|
6
|
-
const ref = useRef(null);
|
|
7
|
-
const { expanded, bordered, id, heading, headingLevel, ...filteredProps } =
|
|
8
|
-
props;
|
|
9
|
-
|
|
10
|
-
/** Event listeners - run once */
|
|
11
|
-
useEventListener(
|
|
12
|
-
ref,
|
|
13
|
-
"nys-accordionitem-toggle",
|
|
14
|
-
props.onNysAccordionitemToggle,
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
return React.createElement(
|
|
18
|
-
"nys-accordionitem",
|
|
19
|
-
{
|
|
20
|
-
ref: (node) => {
|
|
21
|
-
ref.current = node;
|
|
22
|
-
if (typeof forwardedRef === "function") {
|
|
23
|
-
forwardedRef(node);
|
|
24
|
-
} else if (forwardedRef) {
|
|
25
|
-
forwardedRef.current = node;
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
...filteredProps,
|
|
29
|
-
id: props.id,
|
|
30
|
-
heading: props.heading,
|
|
31
|
-
headingLevel: props.headingLevel,
|
|
32
|
-
class: props.className,
|
|
33
|
-
exportparts: props.exportparts,
|
|
34
|
-
for: props.htmlFor,
|
|
35
|
-
part: props.part,
|
|
36
|
-
tabindex: props.tabIndex,
|
|
37
|
-
expanded: props.expanded ? true : undefined,
|
|
38
|
-
bordered: props.bordered ? true : undefined,
|
|
39
|
-
style: { ...props.style },
|
|
40
|
-
},
|
|
41
|
-
props.children,
|
|
42
|
-
);
|
|
43
|
-
});
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
NysAlert as NysAlertElement,
|
|
4
|
-
CustomEvent,
|
|
5
|
-
} from "../../dist/nysds.es.js";
|
|
6
|
-
|
|
7
|
-
export type { NysAlertElement, CustomEvent };
|
|
8
|
-
|
|
9
|
-
export interface NysAlertProps extends Pick<
|
|
10
|
-
React.AllHTMLAttributes<HTMLElement>,
|
|
11
|
-
| "children"
|
|
12
|
-
| "dir"
|
|
13
|
-
| "hidden"
|
|
14
|
-
| "id"
|
|
15
|
-
| "lang"
|
|
16
|
-
| "slot"
|
|
17
|
-
| "style"
|
|
18
|
-
| "title"
|
|
19
|
-
| "translate"
|
|
20
|
-
| "onClick"
|
|
21
|
-
| "onFocus"
|
|
22
|
-
| "onBlur"
|
|
23
|
-
> {
|
|
24
|
-
/** Shows close button allowing users to dismiss the alert. */
|
|
25
|
-
dismissible?: boolean;
|
|
26
|
-
|
|
27
|
-
/** Unique identifier. Auto-generated if not provided. */
|
|
28
|
-
id?: NysAlertElement["id"];
|
|
29
|
-
|
|
30
|
-
/** Bold heading text displayed at the top of the alert. */
|
|
31
|
-
heading?: NysAlertElement["heading"];
|
|
32
|
-
|
|
33
|
-
/** Custom icon name. Defaults to type-appropriate icon if not set. */
|
|
34
|
-
icon?: NysAlertElement["icon"];
|
|
35
|
-
|
|
36
|
-
/** Auto-dismiss after specified milliseconds. Set to 0 to disable. */
|
|
37
|
-
duration?: NysAlertElement["duration"];
|
|
38
|
-
|
|
39
|
-
/** Body text content. Ignored if slot content is provided. */
|
|
40
|
-
text?: NysAlertElement["text"];
|
|
41
|
-
|
|
42
|
-
/** URL for the primary action link. */
|
|
43
|
-
primaryAction?: NysAlertElement["primaryAction"];
|
|
44
|
-
|
|
45
|
-
/** URL for the secondary action link. */
|
|
46
|
-
secondaryAction?: NysAlertElement["secondaryAction"];
|
|
47
|
-
|
|
48
|
-
/** Label text for primary action link. */
|
|
49
|
-
primaryLabel?: NysAlertElement["primaryLabel"];
|
|
50
|
-
|
|
51
|
-
/** Label text for secondary action link. */
|
|
52
|
-
secondaryLabel?: NysAlertElement["secondaryLabel"];
|
|
53
|
-
|
|
54
|
-
/** Semantic alert type affecting color and ARIA role. `warning`/`danger`/`emergency` use
|
|
55
|
-
`role="alert"` (assertive live region); `base`/`info`/`success` use `role="status"` (polite). */
|
|
56
|
-
type?: NysAlertElement["type"];
|
|
57
|
-
|
|
58
|
-
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
59
|
-
className?: string;
|
|
60
|
-
|
|
61
|
-
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
62
|
-
exportparts?: string;
|
|
63
|
-
|
|
64
|
-
/** Used for labels to link them with their inputs (using input id). */
|
|
65
|
-
htmlFor?: string;
|
|
66
|
-
|
|
67
|
-
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
68
|
-
key?: number | string;
|
|
69
|
-
|
|
70
|
-
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
71
|
-
part?: string;
|
|
72
|
-
|
|
73
|
-
/** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
|
|
74
|
-
ref?: any;
|
|
75
|
-
|
|
76
|
-
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
77
|
-
tabIndex?: number;
|
|
78
|
-
|
|
79
|
-
/** Returns the ARIA role and aria-live setting for the alert's live region based on type.
|
|
80
|
-
- `warning`/`danger`/`emergency` => role="alert", aria-live="assertive" (urgent, interrupts)
|
|
81
|
-
- `base`/`info`/`success` => role="status", aria-live="polite" (waits its turn)
|
|
82
|
-
|
|
83
|
-
`aria-live` is set explicitly alongside `role` (rather than relying on the role's implicit
|
|
84
|
-
live-region semantics) for more consistent behavior across browser/AT combinations. */
|
|
85
|
-
ariaAttributes?: NysAlertElement["ariaAttributes"];
|
|
86
|
-
|
|
87
|
-
/** Fired when alert is dismissed. Detail: `{id, type, label}`. */
|
|
88
|
-
onNysClose?: (event: CustomEvent) => void;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Alert for contextual feedback with semantic types and live region support.
|
|
93
|
-
* ---
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
-
* ### **Events:**
|
|
97
|
-
* - **nys-close** - Fired when alert is dismissed. Detail: `{id, type, label}`.
|
|
98
|
-
*
|
|
99
|
-
* ### **Slots:**
|
|
100
|
-
* - _default_ - Default slot for custom body content. Overrides `text` prop when provided.
|
|
101
|
-
*/
|
|
102
|
-
export const NysAlert: React.ForwardRefExoticComponent<NysAlertProps>;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef, useRef, useEffect } from "react";
|
|
2
|
-
import "../../dist/nysds.es.js";
|
|
3
|
-
import { useEventListener, useProperties } from "./react-utils.js";
|
|
4
|
-
|
|
5
|
-
export const NysAlert = forwardRef((props, forwardedRef) => {
|
|
6
|
-
const ref = useRef(null);
|
|
7
|
-
const {
|
|
8
|
-
dismissible,
|
|
9
|
-
id,
|
|
10
|
-
heading,
|
|
11
|
-
icon,
|
|
12
|
-
duration,
|
|
13
|
-
text,
|
|
14
|
-
primaryAction,
|
|
15
|
-
secondaryAction,
|
|
16
|
-
primaryLabel,
|
|
17
|
-
secondaryLabel,
|
|
18
|
-
type,
|
|
19
|
-
ariaAttributes,
|
|
20
|
-
...filteredProps
|
|
21
|
-
} = props;
|
|
22
|
-
|
|
23
|
-
/** Event listeners - run once */
|
|
24
|
-
useEventListener(ref, "nys-close", props.onNysClose);
|
|
25
|
-
|
|
26
|
-
/** Properties - run whenever a property has changed */
|
|
27
|
-
useProperties(ref, "ariaAttributes", props.ariaAttributes);
|
|
28
|
-
|
|
29
|
-
return React.createElement(
|
|
30
|
-
"nys-alert",
|
|
31
|
-
{
|
|
32
|
-
ref: (node) => {
|
|
33
|
-
ref.current = node;
|
|
34
|
-
if (typeof forwardedRef === "function") {
|
|
35
|
-
forwardedRef(node);
|
|
36
|
-
} else if (forwardedRef) {
|
|
37
|
-
forwardedRef.current = node;
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
...filteredProps,
|
|
41
|
-
id: props.id,
|
|
42
|
-
heading: props.heading,
|
|
43
|
-
icon: props.icon,
|
|
44
|
-
duration: props.duration,
|
|
45
|
-
text: props.text,
|
|
46
|
-
primaryAction: props.primaryAction,
|
|
47
|
-
secondaryAction: props.secondaryAction,
|
|
48
|
-
primaryLabel: props.primaryLabel,
|
|
49
|
-
secondaryLabel: props.secondaryLabel,
|
|
50
|
-
type: props.type,
|
|
51
|
-
class: props.className,
|
|
52
|
-
exportparts: props.exportparts,
|
|
53
|
-
for: props.htmlFor,
|
|
54
|
-
part: props.part,
|
|
55
|
-
tabindex: props.tabIndex,
|
|
56
|
-
dismissible: props.dismissible ? true : undefined,
|
|
57
|
-
style: { ...props.style },
|
|
58
|
-
},
|
|
59
|
-
props.children,
|
|
60
|
-
);
|
|
61
|
-
});
|