@nuskin/react-search-components 1.0.0-comx-3067.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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +92 -0
  3. package/package.json +117 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nu Skin Enterprises
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # `@nuskin/react-search-components`
2
+
3
+ UI-only React component library for Nu Skin header search experiences.
4
+
5
+ This repository contains presentational components ranging from internal design
6
+ atoms through an eventual complete search widget. Data fetching, search state,
7
+ translations, analytics, navigation, and other business behavior belong to a
8
+ separate integration layer.
9
+
10
+ ## Status
11
+
12
+ The repository exposes initial `SearchPanel`, `SearchMessage`, and
13
+ `SearchMessageInput` components for iteration. The copied `Button`, `Icon`,
14
+ `TextInput`, and `SelectInput` atoms are available in Storybook for development
15
+ and validation only.
16
+
17
+ ## Requirements
18
+
19
+ - Node 22
20
+ - Yarn Classic
21
+ - React 18.2 or a compatible React 18 release
22
+ - The standard Nu Skin foundation theme provider and global stylesheet in the
23
+ consuming application
24
+
25
+ ## Install
26
+
27
+ ```sh
28
+ yarn add @nuskin/react-search-components
29
+ ```
30
+
31
+ Consumers must also provide the declared React, Emotion, foundation theme, and
32
+ foundation UI peer dependencies.
33
+
34
+ ## Usage
35
+
36
+ ```tsx
37
+ import { SearchPanel } from '@nuskin/react-search-components';
38
+
39
+ <SearchPanel
40
+ aria-label="Search"
41
+ closeLabel="Close"
42
+ initialPrompt="How can I prevent wrinkles?"
43
+ messageInputProps={{
44
+ inputLabel: 'Message',
45
+ onSubmit: handleSubmit,
46
+ placeholder: 'Ask anything',
47
+ submitLabel: 'Send message',
48
+ }}
49
+ onClose={handleClose}
50
+ >
51
+ Search response placeholder
52
+ </SearchPanel>;
53
+ ```
54
+
55
+ The consuming header controls when and where the panel is rendered.
56
+
57
+ ## Commands
58
+
59
+ | Command | Purpose |
60
+ | ---------------------- | ----------------------------------------------------- |
61
+ | `yarn typecheck` | Run strict TypeScript checks |
62
+ | `yarn lint` | Run ESLint |
63
+ | `yarn format` | Format source and documentation |
64
+ | `yarn format:check` | Verify formatting |
65
+ | `yarn test` | Run Jest with coverage |
66
+ | `yarn storybook` | Start Storybook on port 6006 |
67
+ | `yarn build-storybook` | Build Storybook into `dist/storybook/` |
68
+ | `yarn build:package` | Type-check and build the package into `package-dist/` |
69
+ | `yarn check:package` | Validate ESM, CommonJS, types, and packed contents |
70
+ | `yarn validate` | Run the complete local quality workflow |
71
+
72
+ ## Outputs
73
+
74
+ | Output | Location |
75
+ | -------------------------------------------- | ----------------- |
76
+ | CommonJS, ESM, declarations, and source maps | `package-dist/` |
77
+ | Static Storybook | `dist/storybook/` |
78
+ | Test coverage | `coverage/` |
79
+
80
+ The package owns no global CSS and exports no stylesheet.
81
+
82
+ ## Documentation
83
+
84
+ - [Architecture](docs/architecture.md)
85
+ - [Component contracts](docs/component-contracts.md)
86
+ - [Contributing](CONTRIBUTING.md)
87
+ - [Initialization plan](docs/initialization-plan.md)
88
+ - [Architecture decisions](docs/decisions/)
89
+
90
+ ## License
91
+
92
+ MIT
package/package.json ADDED
@@ -0,0 +1,117 @@
1
+ {
2
+ "name": "@nuskin/react-search-components",
3
+ "version": "1.0.0-comx-3067.1",
4
+ "description": "UI-only React component library for Nu Skin search experiences",
5
+ "main": "package-dist/index.js",
6
+ "module": "package-dist/index.mjs",
7
+ "types": "package-dist/index.d.ts",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git@code.tls.nuskin.io:ns-am/search/react-search-components.git"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "keywords": [
16
+ "react",
17
+ "search",
18
+ "components",
19
+ "storybook"
20
+ ],
21
+ "license": "MIT",
22
+ "files": [
23
+ "package-dist",
24
+ "README.md",
25
+ "LICENSE"
26
+ ],
27
+ "sideEffects": false,
28
+ "exports": {
29
+ ".": {
30
+ "types": "./package-dist/index.d.ts",
31
+ "import": "./package-dist/index.mjs",
32
+ "require": "./package-dist/index.js"
33
+ }
34
+ },
35
+ "scripts": {
36
+ "build": "yarn build:package",
37
+ "build:package": "yarn typecheck && tsup",
38
+ "build-dev": "yarn build:package && yarn build-storybook",
39
+ "build-test": "yarn build:package && yarn build-storybook",
40
+ "build-prod": "yarn build:package",
41
+ "build-storybook": "cross-env SB_DISABLE_TELEMETRY=1 CI=true storybook build -o dist/storybook",
42
+ "check:package": "yarn build:package && node scripts/package-smoke.mjs && node scripts/package-smoke.cjs && tsc -p tsconfig.package-smoke.json && node scripts/check-pack.mjs",
43
+ "clean": "rimraf coverage dist package-dist",
44
+ "format": "prettier --write .",
45
+ "format:check": "prettier --check .",
46
+ "lint": "eslint src .storybook test-utils --ext .ts,.tsx",
47
+ "storybook": "storybook dev -p 6006",
48
+ "test": "jest --coverage",
49
+ "test:watch": "jest --watch",
50
+ "typecheck": "tsc --noEmit",
51
+ "validate": "yarn format:check && yarn lint && yarn test && yarn build-storybook && yarn check:package"
52
+ },
53
+ "devDependencies": {
54
+ "@babel/core": "^7.22.0",
55
+ "@babel/preset-env": "^7.22.0",
56
+ "@babel/preset-react": "^7.22.0",
57
+ "@babel/preset-typescript": "^7.23.2",
58
+ "@emotion/react": "^11.14.0",
59
+ "@emotion/styled": "^11.14.1",
60
+ "@mui/icons-material": "5.18.0",
61
+ "@ns/ns-contentstack-lib": "2.2.2",
62
+ "@nuskin/foundation-theme": "1.8.0",
63
+ "@nuskin/foundation-ui-components": "3.0.0",
64
+ "@nuskin/react-product-components": "1.1.3",
65
+ "@nuskin/react-search-sdk": "v1.0.0-comx-2233.1",
66
+ "@storybook/addon-a11y": "^8.4.7",
67
+ "@storybook/addon-essentials": "^8.4.7",
68
+ "@storybook/react": "^8.4.7",
69
+ "@storybook/react-webpack5": "^8.4.7",
70
+ "@testing-library/dom": "10.4.0",
71
+ "@testing-library/jest-dom": "6.6.3",
72
+ "@testing-library/react": "16.2.0",
73
+ "@types/jest": "^29.5.14",
74
+ "@types/jest-axe": "3.5.9",
75
+ "@types/node": "^22.10.2",
76
+ "@types/react": "^18.3.12",
77
+ "@types/react-dom": "^18.3.1",
78
+ "@typescript-eslint/eslint-plugin": "8.28.0",
79
+ "@typescript-eslint/parser": "8.28.0",
80
+ "babel-jest": "29.7.0",
81
+ "babel-loader": "^9.1.0",
82
+ "cross-env": "7.0.3",
83
+ "eslint": "8.57.1",
84
+ "eslint-config-prettier": "10.1.1",
85
+ "eslint-plugin-react": "7.37.5",
86
+ "eslint-plugin-react-hooks": "5.2.0",
87
+ "eslint-plugin-spellcheck": "0.0.20",
88
+ "eslint-plugin-unused-imports": "4.1.4",
89
+ "jest": "29.7.0",
90
+ "jest-axe": "^10.0.0",
91
+ "jest-environment-jsdom": "29.7.0",
92
+ "prettier": "^3.5.3",
93
+ "react": "18.2.0",
94
+ "react-dom": "18.2.0",
95
+ "react-markdown": "^8.0.5",
96
+ "rimraf": "5.0.8",
97
+ "storybook": "^8.4.7",
98
+ "tsup": "8.3.6",
99
+ "typescript": "5.7.3",
100
+ "webpack": "5.105.4"
101
+ },
102
+ "peerDependencies": {
103
+ "@emotion/react": "^11.14.0",
104
+ "@emotion/styled": "^11.14.0",
105
+ "@mui/icons-material": "^5.18.0",
106
+ "@mui/material": "^5.14.16",
107
+ "@ns/ns-contentstack-lib": "2.2.2",
108
+ "@nuskin/foundation-theme": "1.8.0",
109
+ "@nuskin/foundation-ui-components": "3.x",
110
+ "@nuskin/react-product-components": "1.x",
111
+ "react": "^18.2.0",
112
+ "react-dom": "^18.2.0"
113
+ },
114
+ "engines": {
115
+ "node": ">=22.0.0 <25.0.0"
116
+ }
117
+ }