chiplet 0.3.0-dev.4 → 0.4.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/LICENSE +1 -1
- package/README.md +42 -13
- package/dist/assets/positioning.css.ts.vanilla-BVOg9Lwj.css +60 -0
- package/dist/component/button/Button.js +5 -5
- package/dist/component/button/Button.js.map +1 -1
- package/dist/component/button/IconButton.js +1 -1
- package/dist/component/button/IconButton.js.map +1 -1
- package/dist/component/button/Interactive.js +2 -17
- package/dist/component/button/Interactive.js.map +1 -1
- package/dist/component/button/LinkButton.js +7 -5
- package/dist/component/button/LinkButton.js.map +1 -1
- package/dist/component/button/style/{index.css.vanilla.js → index.css.js} +5 -5
- package/dist/component/button/style/index.css.js.map +1 -0
- package/dist/component/checkbox/Checkbox.js +4 -18
- package/dist/component/checkbox/Checkbox.js.map +1 -1
- package/dist/component/checkbox/CheckboxGroup.js +2 -17
- package/dist/component/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/component/checkbox/Radio.js +2 -17
- package/dist/component/checkbox/Radio.js.map +1 -1
- package/dist/component/checkbox/RadioGroup.js +2 -17
- package/dist/component/checkbox/RadioGroup.js.map +1 -1
- package/dist/component/checkbox/Switch.js +1 -1
- package/dist/component/checkbox/icon/CheckboxChecked.svg.js.map +1 -1
- package/dist/component/checkbox/icon/CheckboxIndeterminate.svg.js.map +1 -1
- package/dist/component/checkbox/icon/CheckboxUnchecked.svg.js.map +1 -1
- package/dist/component/checkbox/icon/RadioChecked.svg.js.map +1 -1
- package/dist/component/checkbox/icon/RadioUnchecked.svg.js.map +1 -1
- package/dist/component/checkbox/icon/index.js +0 -29
- package/dist/component/checkbox/icon/index.js.map +1 -1
- package/dist/component/checkbox/style/{index.css.vanilla.js → index.css.js} +4 -5
- package/dist/component/checkbox/style/index.css.js.map +1 -0
- package/dist/component/header/Header.js +1 -1
- package/dist/component/header/style/index.css.js +7 -0
- package/dist/component/header/style/index.css.js.map +1 -0
- package/dist/component/icon/set/Checkmark24Filled.svg.js.map +1 -1
- package/dist/component/icon/set/Checkmark24Regular.svg.js.map +1 -1
- package/dist/component/icon/set/ChevronDown24Filled.svg.js.map +1 -1
- package/dist/component/icon/set/ChevronDown24Regular.svg.js.map +1 -1
- package/dist/component/icon/set/Dismiss24Filled.svg.js.map +1 -1
- package/dist/component/icon/set/Dismiss24Regular.svg.js.map +1 -1
- package/dist/component/icon/set/Search24Filled.svg.js.map +1 -1
- package/dist/component/icon/set/Search24Regular.svg.js.map +1 -1
- package/dist/component/index.js +20 -19
- package/dist/component/index.js.map +1 -1
- package/dist/component/input/Input.js +2 -17
- package/dist/component/input/Input.js.map +1 -1
- package/dist/component/input/SearchInput.js +4 -5
- package/dist/component/input/SearchInput.js.map +1 -1
- package/dist/component/input/style/{index.css.vanilla.js → index.css.js} +5 -5
- package/dist/component/input/style/index.css.js.map +1 -0
- package/dist/component/menu/Menu.js +2 -28
- package/dist/component/menu/Menu.js.map +1 -1
- package/dist/component/menu/MenuButton.js +1 -3
- package/dist/component/menu/MenuButton.js.map +1 -1
- package/dist/component/menu/MenuItem.js +2 -18
- package/dist/component/menu/MenuItem.js.map +1 -1
- package/dist/component/menu/MenuItemCheckbox.js +4 -31
- package/dist/component/menu/MenuItemCheckbox.js.map +1 -1
- package/dist/component/menu/MenuItemRadio.js +5 -32
- package/dist/component/menu/MenuItemRadio.js.map +1 -1
- package/dist/component/menu/renderMenuItem.js +1 -1
- package/dist/component/popover/Dialog.js +2 -17
- package/dist/component/popover/Dialog.js.map +1 -1
- package/dist/component/popover/DismissButton.js +2 -19
- package/dist/component/popover/DismissButton.js.map +1 -1
- package/dist/component/popover/Popover.js +2 -17
- package/dist/component/popover/Popover.js.map +1 -1
- package/dist/component/popover/ShadowRoot.js +34 -0
- package/dist/component/popover/ShadowRoot.js.map +1 -0
- package/dist/component/popover/Tooltip.js +4 -18
- package/dist/component/popover/Tooltip.js.map +1 -1
- package/dist/component/popover/index.js +1 -0
- package/dist/component/popover/index.js.map +1 -1
- package/dist/component/popover/style/{index.css.vanilla.js → index.css.js} +5 -5
- package/dist/component/popover/style/index.css.js.map +1 -0
- package/dist/component/progress/Spinner.js +1 -1
- package/dist/component/progress/style/{index.css.vanilla.js → index.css.js} +4 -5
- package/dist/component/progress/style/index.css.js.map +1 -0
- package/dist/component/select/AutoComplete.js +7 -30
- package/dist/component/select/AutoComplete.js.map +1 -1
- package/dist/component/select/Group.js +2 -17
- package/dist/component/select/Group.js.map +1 -1
- package/dist/component/select/Option.js +6 -21
- package/dist/component/select/Option.js.map +1 -1
- package/dist/component/select/Select.js +6 -29
- package/dist/component/select/Select.js.map +1 -1
- package/dist/component/select/Separator.js +1 -1
- package/dist/component/select/style/{index.css.vanilla.js → index.css.js} +5 -5
- package/dist/component/select/style/index.css.js.map +1 -0
- package/dist/component/style/article.css.js +6 -0
- package/dist/component/style/article.css.js.map +1 -0
- package/dist/component/style/index.js +1 -1
- package/dist/component/typography/Body1.js +1 -1
- package/dist/component/typography/Body2.js +1 -1
- package/dist/component/typography/Body3.js +1 -1
- package/dist/component/typography/Caption1.js +1 -1
- package/dist/component/typography/Caption2.js +1 -1
- package/dist/component/typography/Heading1.js +1 -1
- package/dist/component/typography/Heading2.js +1 -1
- package/dist/component/typography/Heading3.js +1 -1
- package/dist/component/typography/Heading4.js +1 -1
- package/dist/component/typography/style/{index.css.vanilla.js → index.css.js} +4 -5
- package/dist/component/typography/style/index.css.js.map +1 -0
- package/dist/hook/accessibility/keyboard/Keyboard.js +6 -18
- package/dist/hook/accessibility/keyboard/Keyboard.js.map +1 -1
- package/dist/hook/accessibility/keyboard/Roving.js +0 -15
- package/dist/hook/accessibility/keyboard/Roving.js.map +1 -1
- package/dist/hook/accessibility/keyboard/context/index.js.map +1 -1
- package/dist/hook/accessibility/keyboard/hook/useLastFocused.js +1 -4
- package/dist/hook/accessibility/keyboard/hook/useLastFocused.js.map +1 -1
- package/dist/hook/accessibility/keyboard/hook/useNavigate.js.map +1 -1
- package/dist/hook/accessibility/keyboard/resolve.js +1 -4
- package/dist/hook/accessibility/keyboard/resolve.js.map +1 -1
- package/dist/hook/accessibility/keyboard/sort.js +0 -3
- package/dist/hook/accessibility/keyboard/sort.js.map +1 -1
- package/dist/hook/accessibility/keyboard/tree.js +1 -4
- package/dist/hook/accessibility/keyboard/tree.js.map +1 -1
- package/dist/hook/accessibility/keyboard/useController.js +2 -15
- package/dist/hook/accessibility/keyboard/useController.js.map +1 -1
- package/dist/hook/accessibility/keyboard/useKeyboard.js +2 -16
- package/dist/hook/accessibility/keyboard/useKeyboard.js.map +1 -1
- package/dist/hook/document/useHighlight.js +1 -4
- package/dist/hook/document/useHighlight.js.map +1 -1
- package/dist/hook/form/context/index.js.map +1 -1
- package/dist/hook/form/useAutoComplete.js +2 -16
- package/dist/hook/form/useAutoComplete.js.map +1 -1
- package/dist/hook/form/useChange.js.map +1 -1
- package/dist/hook/form/useCheckbox.js +0 -16
- package/dist/hook/form/useCheckbox.js.map +1 -1
- package/dist/hook/form/useChecked.js +1 -14
- package/dist/hook/form/useChecked.js.map +1 -1
- package/dist/hook/form/useForm.js +1 -15
- package/dist/hook/form/useForm.js.map +1 -1
- package/dist/hook/form/useGroup.js +2 -14
- package/dist/hook/form/useGroup.js.map +1 -1
- package/dist/hook/form/useName.js.map +1 -1
- package/dist/hook/form/useOption.js +0 -16
- package/dist/hook/form/useOption.js.map +1 -1
- package/dist/hook/form/useRadio.js +0 -16
- package/dist/hook/form/useRadio.js.map +1 -1
- package/dist/hook/form/useSelect.js +0 -16
- package/dist/hook/form/useSelect.js.map +1 -1
- package/dist/hook/form/useValue.js +0 -15
- package/dist/hook/form/useValue.js.map +1 -1
- package/dist/hook/index.js +22 -21
- package/dist/hook/index.js.map +1 -1
- package/dist/hook/popover/context/index.js.map +1 -1
- package/dist/hook/popover/index.js +2 -1
- package/dist/hook/popover/index.js.map +1 -1
- package/dist/hook/popover/style/positioning.css.js +13 -0
- package/dist/hook/popover/style/positioning.css.js.map +1 -0
- package/dist/hook/popover/useAnchorPositioning.js +6 -88
- package/dist/hook/popover/useAnchorPositioning.js.map +1 -1
- package/dist/hook/popover/useDialog.js +1 -15
- package/dist/hook/popover/useDialog.js.map +1 -1
- package/dist/hook/popover/useLightDismiss.js +1 -4
- package/dist/hook/popover/useLightDismiss.js.map +1 -1
- package/dist/hook/popover/useOverlay.js +0 -15
- package/dist/hook/popover/useOverlay.js.map +1 -1
- package/dist/hook/popover/usePopover.js +1 -12
- package/dist/hook/popover/usePopover.js.map +1 -1
- package/dist/hook/popover/usePositioning.js +4 -5
- package/dist/hook/popover/usePositioning.js.map +1 -1
- package/dist/hook/popover/useTooltip.js +1 -13
- package/dist/hook/popover/useTooltip.js.map +1 -1
- package/dist/hook/react/refValue.js +0 -3
- package/dist/hook/react/refValue.js.map +1 -1
- package/dist/hook/react/useActivate.js +1 -4
- package/dist/hook/react/useActivate.js.map +1 -1
- package/dist/hook/react/useConst.js.map +1 -1
- package/dist/hook/react/useInteractive.js +1 -4
- package/dist/hook/react/useInteractive.js.map +1 -1
- package/dist/hook/react/useRefCallback.js.map +1 -1
- package/dist/hook/react/useUniqueId.js +1 -4
- package/dist/hook/react/useUniqueId.js.map +1 -1
- package/dist/index.js +109 -109
- package/dist/infra/index.js +1 -1
- package/dist/infra/logging/logger.js +7 -8
- package/dist/infra/logging/logger.js.map +1 -1
- package/dist/theme/ColorScheme.js.map +1 -1
- package/dist/theme/defineTheme.js +0 -3
- package/dist/theme/defineTheme.js.map +1 -1
- package/dist/theme/{global.css.vanilla.js → global.css.js} +4 -4
- package/dist/theme/global.css.js.map +1 -0
- package/dist/theme/index.js +3 -3
- package/dist/theme/{theme.css.vanilla.js → theme.css.js} +3 -3
- package/dist/theme/theme.css.js.map +1 -0
- package/dist/theme/{token.css.vanilla.js → token.css.js} +2 -2
- package/dist/theme/token.css.js.map +1 -0
- package/dist/util/array/index.js +0 -1
- package/dist/util/array/index.js.map +1 -1
- package/dist/util/document/{accessibility.css.vanilla.js → accessibility.css.js} +1 -1
- package/dist/util/document/accessibility.css.js.map +1 -0
- package/dist/util/document/index.js +1 -1
- package/dist/util/index.js +28 -30
- package/dist/util/index.js.map +1 -1
- package/dist/util/linked-list/buildLinkedList.js.map +1 -1
- package/dist/util/lock/lock.js +0 -2
- package/dist/util/lock/lock.js.map +1 -1
- package/dist/util/random/index.js +0 -1
- package/dist/util/random/index.js.map +1 -1
- package/dist/util/tree/addTreeNode.js.map +1 -1
- package/dist/util/tree/attachChild.js.map +1 -1
- package/dist/util/tree/buildTree.js.map +1 -1
- package/dist/util/tree/detachChild.js.map +1 -1
- package/dist/util/tree/iterateChildren.js.map +1 -1
- package/dist/util/tree/iterateTree.js.map +1 -1
- package/package.json +99 -97
- package/src/component/button/Button.tsx +5 -10
- package/src/component/button/IconButton.tsx +1 -1
- package/src/component/button/LinkButton.tsx +12 -6
- package/src/component/checkbox/Checkbox.tsx +2 -2
- package/src/component/checkbox/Radio.tsx +1 -2
- package/src/component/checkbox/RadioGroup.tsx +1 -2
- package/src/component/checkbox/icon/index.ts +1 -1
- package/src/component/icon/README.md +17 -3
- package/src/component/input/Input.tsx +1 -2
- package/src/component/input/SearchInput.tsx +4 -3
- package/src/component/menu/Menu.tsx +1 -1
- package/src/component/menu/MenuItemCheckbox.tsx +1 -1
- package/src/component/menu/MenuItemRadio.tsx +1 -1
- package/src/component/popover/ShadowRoot.tsx +42 -0
- package/src/component/popover/Tooltip.tsx +3 -5
- package/src/component/popover/index.ts +1 -0
- package/src/component/select/AutoComplete.tsx +3 -7
- package/src/component/select/Option.tsx +1 -2
- package/src/component/select/Select.tsx +3 -7
- package/src/hook/accessibility/keyboard/Keyboard.tsx +1 -1
- package/src/hook/accessibility/keyboard/Roving.tsx +1 -1
- package/src/hook/accessibility/keyboard/context/index.ts +1 -1
- package/src/hook/accessibility/keyboard/hook/useLastFocused.ts +2 -1
- package/src/hook/accessibility/keyboard/hook/useNavigate.ts +1 -1
- package/src/hook/accessibility/keyboard/resolve.ts +1 -1
- package/src/hook/accessibility/keyboard/useController.ts +3 -2
- package/src/hook/accessibility/keyboard/useKeyboard.ts +3 -2
- package/src/hook/form/context/index.ts +1 -1
- package/src/hook/form/useAutoComplete.ts +14 -14
- package/src/hook/form/useChange.ts +1 -1
- package/src/hook/form/useCheckbox.ts +2 -2
- package/src/hook/form/useChecked.ts +3 -2
- package/src/hook/form/useForm.ts +1 -1
- package/src/hook/form/useGroup.ts +5 -3
- package/src/hook/form/useName.ts +1 -1
- package/src/hook/form/useOption.ts +2 -2
- package/src/hook/form/useRadio.ts +2 -2
- package/src/hook/form/useSelect.ts +15 -12
- package/src/hook/form/useValue.ts +3 -2
- package/src/hook/popover/context/index.ts +1 -1
- package/src/hook/popover/style/positioning.css.ts +112 -0
- package/src/hook/popover/useAnchorPositioning.ts +15 -104
- package/src/hook/popover/useDialog.ts +5 -4
- package/src/hook/popover/useOverlay.ts +2 -2
- package/src/hook/popover/usePopover.ts +12 -11
- package/src/hook/popover/usePositioning.ts +12 -6
- package/src/hook/popover/useTooltip.ts +7 -6
- package/src/hook/react/useConst.ts +2 -1
- package/src/hook/react/useRefCallback.ts +1 -1
- package/src/infra/logging/logger.ts +32 -18
- package/src/theme/ColorScheme.tsx +1 -5
- package/src/theme/global.css.ts +1 -1
- package/src/util/array/index.ts +0 -1
- package/src/util/document/accessibility.css.ts +1 -1
- package/src/util/linked-list/buildLinkedList.ts +1 -1
- package/src/util/random/index.ts +0 -1
- package/src/util/tree/addTreeNode.ts +1 -1
- package/src/util/tree/attachChild.ts +1 -1
- package/src/util/tree/buildTree.ts +1 -1
- package/src/util/tree/detachChild.ts +1 -1
- package/src/util/tree/iterateChildren.ts +1 -1
- package/src/util/tree/iterateTree.ts +1 -1
- package/dist/component/button/style/index.css.vanilla.js.map +0 -1
- package/dist/component/checkbox/style/index.css.vanilla.js.map +0 -1
- package/dist/component/header/style/index.css.vanilla.js +0 -7
- package/dist/component/header/style/index.css.vanilla.js.map +0 -1
- package/dist/component/input/style/index.css.vanilla.js.map +0 -1
- package/dist/component/popover/style/index.css.vanilla.js.map +0 -1
- package/dist/component/progress/style/index.css.vanilla.js.map +0 -1
- package/dist/component/select/style/index.css.vanilla.js.map +0 -1
- package/dist/component/style/article.css.vanilla.js +0 -6
- package/dist/component/style/article.css.vanilla.js.map +0 -1
- package/dist/component/typography/style/index.css.vanilla.js.map +0 -1
- package/dist/theme/global.css.vanilla.js.map +0 -1
- package/dist/theme/theme.css.vanilla.js.map +0 -1
- package/dist/theme/token.css.vanilla.js.map +0 -1
- package/dist/util/array/fromAsync.js +0 -11
- package/dist/util/array/fromAsync.js.map +0 -1
- package/dist/util/document/accessibility.css.vanilla.js.map +0 -1
- package/src/util/array/fromAsync.ts +0 -11
- /package/dist/{component/style/article.css → assets/article.css.ts.vanilla-s_HEpsy3.css} +0 -0
- /package/dist/{theme/global.css → assets/global.css.ts.vanilla-CTwjHiaM.css} +0 -0
- /package/dist/{component/button/style/index.css → assets/index.css.ts.vanilla-9qGDrdgn.css} +0 -0
- /package/dist/{component/checkbox/style/index.css → assets/index.css.ts.vanilla-BsBngo8U.css} +0 -0
- /package/dist/{component/select/index2.css → assets/index.css.ts.vanilla-CVNLkHc9.css} +0 -0
- /package/dist/{component/select/style/index.css → assets/index.css.ts.vanilla-C_RzxiYH.css} +0 -0
- /package/dist/{component/popover/style/index.css → assets/index.css.ts.vanilla-CvQQLJ-M.css} +0 -0
- /package/dist/{component/select/index.css → assets/index.css.ts.vanilla-DGmHFJbF.css} +0 -0
- /package/dist/{component/progress/style/index.css → assets/index.css.ts.vanilla-VHSAjLub.css} +0 -0
- /package/dist/{component/input/style/index.css → assets/index.css.ts.vanilla-kgyRRvgH.css} +0 -0
- /package/dist/{theme/theme.css → assets/theme.css.ts.vanilla-Bjn8sb_B.css} +0 -0
- /package/dist/{theme/token.css → assets/token.css.ts.vanilla-B3LtFaO7.css} +0 -0
package/package.json
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chiplet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "React component, hook, and utility library.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/reelout/chiplet.git"
|
|
8
|
+
},
|
|
5
9
|
"license": "MIT",
|
|
10
|
+
"sideEffects": [
|
|
11
|
+
"**/*.css"
|
|
12
|
+
],
|
|
6
13
|
"type": "module",
|
|
7
14
|
"imports": {
|
|
8
15
|
"#.storybook/preview": "./.storybook/preview.tsx",
|
|
@@ -24,11 +31,15 @@
|
|
|
24
31
|
"./package.json": "./package.json",
|
|
25
32
|
".": {
|
|
26
33
|
"types": "./src/index.ts",
|
|
27
|
-
"
|
|
34
|
+
"development": "./src/index.ts",
|
|
35
|
+
"storybook": "./src/index.ts",
|
|
36
|
+
"import": "./dist/index.js"
|
|
28
37
|
},
|
|
29
38
|
"./*": {
|
|
30
39
|
"types": "./src/*/index.ts",
|
|
31
|
-
"
|
|
40
|
+
"development": "./src/*/index.ts",
|
|
41
|
+
"storybook": "./src/*/index.ts",
|
|
42
|
+
"import": "./dist/*/index.js"
|
|
32
43
|
}
|
|
33
44
|
},
|
|
34
45
|
"files": [
|
|
@@ -36,23 +47,23 @@
|
|
|
36
47
|
"./src"
|
|
37
48
|
],
|
|
38
49
|
"dependencies": {
|
|
39
|
-
"@floating-ui/dom": "^1.
|
|
40
|
-
"@floating-ui/utils": "^0.2.
|
|
41
|
-
"@opentelemetry/api": "^1.
|
|
42
|
-
"@opentelemetry/api-logs": "^0.
|
|
43
|
-
"@opentelemetry/auto-instrumentations-web": "^0.
|
|
44
|
-
"@opentelemetry/exporter-logs-otlp-http": "^0.
|
|
45
|
-
"@opentelemetry/exporter-metrics-otlp-http": "^0.
|
|
46
|
-
"@opentelemetry/exporter-trace-otlp-http": "^0.
|
|
47
|
-
"@opentelemetry/instrumentation": "^0.
|
|
48
|
-
"@opentelemetry/instrumentation-long-task": "^0.
|
|
49
|
-
"@opentelemetry/instrumentation-web-exception": "^0.
|
|
50
|
-
"@opentelemetry/opentelemetry-browser-detector": "^0.
|
|
51
|
-
"@opentelemetry/resources": "^
|
|
52
|
-
"@opentelemetry/sdk-logs": "^
|
|
53
|
-
"@opentelemetry/sdk-metrics": "^
|
|
54
|
-
"@opentelemetry/sdk-trace-web": "^2.
|
|
55
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
50
|
+
"@floating-ui/dom": "^1.8.0",
|
|
51
|
+
"@floating-ui/utils": "^0.2.12",
|
|
52
|
+
"@opentelemetry/api": "^1.10.0",
|
|
53
|
+
"@opentelemetry/api-logs": "^0.223.0",
|
|
54
|
+
"@opentelemetry/auto-instrumentations-web": "^0.70.1",
|
|
55
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.301.2",
|
|
56
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.301.2",
|
|
57
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.301.2",
|
|
58
|
+
"@opentelemetry/instrumentation": "^0.301.2",
|
|
59
|
+
"@opentelemetry/instrumentation-long-task": "^0.69.0",
|
|
60
|
+
"@opentelemetry/instrumentation-web-exception": "^0.18.0",
|
|
61
|
+
"@opentelemetry/opentelemetry-browser-detector": "^0.301.2",
|
|
62
|
+
"@opentelemetry/resources": "^3.1.1",
|
|
63
|
+
"@opentelemetry/sdk-logs": "^3.1.1",
|
|
64
|
+
"@opentelemetry/sdk-metrics": "^3.1.1",
|
|
65
|
+
"@opentelemetry/sdk-trace-web": "^2.12.1",
|
|
66
|
+
"@opentelemetry/semantic-conventions": "^1.45.0",
|
|
56
67
|
"@vanilla-extract/recipes": "^0.5.7",
|
|
57
68
|
"clsx": "^2.1.1",
|
|
58
69
|
"lodash-es": "^4.18.1",
|
|
@@ -61,108 +72,99 @@
|
|
|
61
72
|
"tiny-invariant": "^1.3.3"
|
|
62
73
|
},
|
|
63
74
|
"devDependencies": {
|
|
64
|
-
"@commitlint/cli": "^
|
|
65
|
-
"@commitlint/config-conventional": "^
|
|
66
|
-
"@commitlint/types": "^
|
|
67
|
-
"@csstools/postcss-light-dark-function": "^3.0.
|
|
68
|
-
"@csstools/postcss-relative-color-syntax": "^4.0.
|
|
75
|
+
"@commitlint/cli": "^21.2.4",
|
|
76
|
+
"@commitlint/config-conventional": "^21.2.4",
|
|
77
|
+
"@commitlint/types": "^21.2.3",
|
|
78
|
+
"@csstools/postcss-light-dark-function": "^3.0.8",
|
|
79
|
+
"@csstools/postcss-relative-color-syntax": "^4.0.16",
|
|
69
80
|
"@eslint/js": "^10.0.1",
|
|
70
|
-
"@rollup/plugin-babel": "^7.
|
|
71
|
-
"@rollup/plugin-commonjs": "^29.0.
|
|
81
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
82
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
72
83
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
73
|
-
"@
|
|
74
|
-
"@
|
|
75
|
-
"@
|
|
76
|
-
"@storybook/addon-
|
|
77
|
-
"@storybook/addon-
|
|
78
|
-
"@storybook/
|
|
79
|
-
"@storybook/addon-themes": "^10.3.4",
|
|
80
|
-
"@storybook/addon-vitest": "^10.3.4",
|
|
81
|
-
"@storybook/react-vite": "^10.3.4",
|
|
84
|
+
"@storybook/addon-a11y": "^10.6.7",
|
|
85
|
+
"@storybook/addon-docs": "^10.6.7",
|
|
86
|
+
"@storybook/addon-links": "^10.6.7",
|
|
87
|
+
"@storybook/addon-themes": "^10.6.7",
|
|
88
|
+
"@storybook/addon-vitest": "^10.6.7",
|
|
89
|
+
"@storybook/react-vite": "^10.6.7",
|
|
82
90
|
"@svgr/rollup": "^8.1.0",
|
|
83
|
-
"@tailwindcss/postcss": "^4.
|
|
84
|
-
"@testing-library/jest-dom": "^
|
|
85
|
-
"@testing-library/react": "^16.3.
|
|
86
|
-
"@testing-library/user-event": "^14.6.
|
|
91
|
+
"@tailwindcss/postcss": "^4.3.5",
|
|
92
|
+
"@testing-library/jest-dom": "^7.0.1",
|
|
93
|
+
"@testing-library/react": "^16.3.3",
|
|
94
|
+
"@testing-library/user-event": "^14.6.10",
|
|
87
95
|
"@types/lodash-es": "^4.17.12",
|
|
88
|
-
"@types/mime-types": "^3.0.1",
|
|
89
96
|
"@types/node": "^24.12.2",
|
|
90
|
-
"@types/react": "^19.
|
|
91
|
-
"@types/react-dom": "^19.
|
|
92
|
-
"@
|
|
93
|
-
"@vanilla-extract/
|
|
94
|
-
"@vanilla-extract/
|
|
95
|
-
"@
|
|
96
|
-
"@vitejs/plugin-
|
|
97
|
-
"@
|
|
98
|
-
"@vitest/
|
|
99
|
-
"@vitest/coverage-istanbul": "^4.1.2",
|
|
100
|
-
"babel-plugin-formatjs": "^11.3.2",
|
|
97
|
+
"@types/react": "^19.3.0",
|
|
98
|
+
"@types/react-dom": "^19.3.0",
|
|
99
|
+
"@vanilla-extract/css": "^1.21.3",
|
|
100
|
+
"@vanilla-extract/rollup-plugin": "^1.5.4",
|
|
101
|
+
"@vanilla-extract/vite-plugin": "^5.2.6",
|
|
102
|
+
"@vitejs/plugin-legacy": "^8.2.4",
|
|
103
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
104
|
+
"@vitest/browser-playwright": "^5.1.0",
|
|
105
|
+
"@vitest/coverage-istanbul": "^5.1.0",
|
|
101
106
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
102
107
|
"clsx": "^2.1.1",
|
|
103
|
-
"colorjs.io": "^0.
|
|
108
|
+
"colorjs.io": "^0.7.1",
|
|
104
109
|
"csstype": "^3.2.3",
|
|
105
|
-
"eslint": "^10.
|
|
106
|
-
"eslint-plugin-import": "^
|
|
110
|
+
"eslint": "^10.15.0",
|
|
111
|
+
"eslint-plugin-import-x": "^4.18.1",
|
|
107
112
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
108
113
|
"eslint-plugin-react": "^7.37.5",
|
|
109
|
-
"eslint-plugin-react-
|
|
110
|
-
"eslint-plugin-react-
|
|
111
|
-
"
|
|
114
|
+
"eslint-plugin-react-compiler": "^19.1.0-rc.2",
|
|
115
|
+
"eslint-plugin-react-hooks": "^7.1.1",
|
|
116
|
+
"eslint-plugin-react-refresh": "^0.5.8",
|
|
117
|
+
"globals": "^17.14.0",
|
|
112
118
|
"husky": "^9.1.7",
|
|
113
|
-
"jsdom": "^
|
|
114
|
-
"lint-staged": "^
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"postcss": "^
|
|
118
|
-
"postcss-html": "^1.8.1",
|
|
119
|
+
"jsdom": "^31.0.1",
|
|
120
|
+
"lint-staged": "^17.6.1",
|
|
121
|
+
"playwright": "^1.65.1",
|
|
122
|
+
"postcss": "^8.5.33",
|
|
123
|
+
"postcss-html": "^2.0.0",
|
|
119
124
|
"postcss-scss": "^4.0.9",
|
|
120
|
-
"postcss-styled-syntax": "^0.7.
|
|
121
|
-
"prettier": "^3.
|
|
122
|
-
"prettier-plugin-tailwindcss": "^0.
|
|
123
|
-
"react": "^19.
|
|
124
|
-
"react-dom": "^19.
|
|
125
|
-
"
|
|
125
|
+
"postcss-styled-syntax": "^0.7.4",
|
|
126
|
+
"prettier": "^3.10.1",
|
|
127
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
128
|
+
"react": "^19.3.1",
|
|
129
|
+
"react-dom": "^19.3.1",
|
|
130
|
+
"reelout": "^0.2.5",
|
|
126
131
|
"remark-gfm": "^4.0.1",
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"rollup": "^4.60.1",
|
|
132
|
+
"rimraf": "^6.1.4",
|
|
133
|
+
"rollup": "^4.68.3",
|
|
130
134
|
"rollup-plugin-esbuild": "^6.2.1",
|
|
131
|
-
"rollup-plugin-node-externals": "^
|
|
132
|
-
"rollup-plugin-visualizer": "^7.
|
|
135
|
+
"rollup-plugin-node-externals": "^9.0.1",
|
|
136
|
+
"rollup-plugin-visualizer": "^7.1.3",
|
|
133
137
|
"rollup-preserve-directives": "^1.1.3",
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"stylelint": "^
|
|
138
|
-
"stylelint-config-
|
|
139
|
-
"stylelint-config-standard": "^40.0.0",
|
|
138
|
+
"sort-package-json": "^4.1.0",
|
|
139
|
+
"storybook": "^10.6.7",
|
|
140
|
+
"stylelint": "^18.0.0",
|
|
141
|
+
"stylelint-config-recess-order": "^7.10.0",
|
|
142
|
+
"stylelint-config-standard": "^41.0.0",
|
|
140
143
|
"stylelint-plugin-logical-css": "^2.1.0",
|
|
141
|
-
"tailwindcss": "^4.
|
|
144
|
+
"tailwindcss": "^4.3.5",
|
|
142
145
|
"ts-node": "^10.9.2",
|
|
143
|
-
"tslib": "^2.
|
|
144
|
-
"type-fest": "^5.
|
|
145
|
-
"typedoc": "^0.28.18",
|
|
146
|
+
"tslib": "^2.9.1",
|
|
147
|
+
"type-fest": "^5.10.0",
|
|
146
148
|
"typescript": "^6.0.2",
|
|
147
|
-
"typescript-eslint": "^8.
|
|
148
|
-
"vite": "^8.
|
|
149
|
-
"vitest": "^
|
|
149
|
+
"typescript-eslint": "^8.72.2",
|
|
150
|
+
"vite": "^8.3.8",
|
|
151
|
+
"vitest": "^5.1.0"
|
|
150
152
|
},
|
|
151
153
|
"peerDependencies": {
|
|
152
|
-
"@vanilla-extract/css": "^1.
|
|
153
|
-
"react": "^19.
|
|
154
|
-
"react-dom": "^19.
|
|
155
|
-
"tslib": "^2.
|
|
154
|
+
"@vanilla-extract/css": "^1.21.3",
|
|
155
|
+
"react": "^19.3.1",
|
|
156
|
+
"react-dom": "^19.3.1",
|
|
157
|
+
"tslib": "^2.9.1"
|
|
156
158
|
},
|
|
157
159
|
"engines": {
|
|
158
|
-
"node": ">=24.
|
|
160
|
+
"node": ">=24.15"
|
|
159
161
|
},
|
|
160
162
|
"scripts": {
|
|
161
|
-
"build": "
|
|
162
|
-
"clean": "
|
|
163
|
+
"build": "rimraf dist && rollup -c && storybook build",
|
|
164
|
+
"clean": "rimraf -g \"**/{dist,storybook-static,coverage,test-results,__screenshots__,.vitest,*.tsbuildinfo}\"",
|
|
163
165
|
"dev": "storybook dev -p 6006",
|
|
164
|
-
"format": "stylelint --fix
|
|
165
|
-
"lint": "stylelint
|
|
166
|
+
"format": "stylelint --fix \"**/*.{css,scss,js,jsx,ts,tsx,html,vue}\" && eslint --fix . && prettier --write .",
|
|
167
|
+
"lint": "stylelint \"**/*.{css,scss,js,jsx,ts,tsx,html,vue}\" && eslint . && prettier --check .",
|
|
166
168
|
"pretest": "playwright install --with-deps",
|
|
167
169
|
"test": "vitest",
|
|
168
170
|
"validate": "pnpm i && pnpm clean && pnpm lint && pnpm build && pnpm test run --coverage"
|
|
@@ -2,11 +2,7 @@ import clsx from 'clsx'
|
|
|
2
2
|
import { ButtonStyle } from './style/index.css'
|
|
3
3
|
|
|
4
4
|
export type ButtonColor =
|
|
5
|
-
| '
|
|
6
|
-
| 'primary'
|
|
7
|
-
| 'success'
|
|
8
|
-
| 'warning'
|
|
9
|
-
| 'danger'
|
|
5
|
+
'default' | 'primary' | 'success' | 'warning' | 'danger'
|
|
10
6
|
|
|
11
7
|
// https://uxmovement.com/mobile/why-text-buttons-hurt-mobile-usability/
|
|
12
8
|
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary'
|
|
@@ -34,14 +30,11 @@ export function Button(props: ButtonProps) {
|
|
|
34
30
|
shape = 'rounded',
|
|
35
31
|
block = false,
|
|
36
32
|
disabled,
|
|
33
|
+
onClick,
|
|
34
|
+
onClickCapture,
|
|
37
35
|
...attrs
|
|
38
36
|
} = props
|
|
39
37
|
|
|
40
|
-
if (disabled) {
|
|
41
|
-
attrs.onClick = undefined
|
|
42
|
-
attrs.onClickCapture = undefined
|
|
43
|
-
}
|
|
44
|
-
|
|
45
38
|
return (
|
|
46
39
|
<button
|
|
47
40
|
{...attrs}
|
|
@@ -51,6 +44,8 @@ export function Button(props: ButtonProps) {
|
|
|
51
44
|
)}
|
|
52
45
|
type={attrs.type || 'button'}
|
|
53
46
|
tabIndex={disabled ? -1 : attrs.tabIndex}
|
|
47
|
+
onClick={disabled ? undefined : onClick}
|
|
48
|
+
onClickCapture={disabled ? undefined : onClickCapture}
|
|
54
49
|
aria-disabled={disabled}
|
|
55
50
|
/>
|
|
56
51
|
)
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import clsx from 'clsx'
|
|
2
2
|
import { ButtonStyle, LinkButtonStyle } from './style/index.css'
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
ButtonColor,
|
|
5
|
+
ButtonShape,
|
|
6
|
+
ButtonSize,
|
|
7
|
+
ButtonVariant,
|
|
8
|
+
} from './Button'
|
|
4
9
|
|
|
5
10
|
export interface LinkButtonProps
|
|
6
11
|
extends
|
|
@@ -22,17 +27,16 @@ export function LinkButton(props: LinkButtonProps) {
|
|
|
22
27
|
shape = 'rounded',
|
|
23
28
|
block = false,
|
|
24
29
|
disabled,
|
|
30
|
+
href,
|
|
31
|
+
onClick,
|
|
32
|
+
onClickCapture,
|
|
25
33
|
...attrs
|
|
26
34
|
} = props
|
|
27
35
|
|
|
28
|
-
if (disabled) {
|
|
29
|
-
attrs.onClick = undefined
|
|
30
|
-
attrs.onClickCapture = undefined
|
|
31
|
-
}
|
|
32
|
-
|
|
33
36
|
return (
|
|
34
37
|
<a
|
|
35
38
|
{...attrs}
|
|
39
|
+
href={href}
|
|
36
40
|
className={clsx(
|
|
37
41
|
ButtonStyle({ color, variant, size, shape, block }),
|
|
38
42
|
LinkButtonStyle,
|
|
@@ -40,6 +44,8 @@ export function LinkButton(props: LinkButtonProps) {
|
|
|
40
44
|
)}
|
|
41
45
|
rel={attrs.rel || 'noopener noreferrer'}
|
|
42
46
|
tabIndex={disabled ? -1 : attrs.tabIndex}
|
|
47
|
+
onClick={disabled ? undefined : onClick}
|
|
48
|
+
onClickCapture={disabled ? undefined : onClickCapture}
|
|
43
49
|
aria-disabled={disabled}
|
|
44
50
|
>
|
|
45
51
|
{attrs.children}
|
|
@@ -24,8 +24,7 @@ export interface CheckboxProps extends Omit<
|
|
|
24
24
|
value: string
|
|
25
25
|
indeterminate?: boolean | undefined
|
|
26
26
|
onChange?:
|
|
27
|
-
|
|
28
|
-
| undefined
|
|
27
|
+
ChangeCallback<React.ChangeEvent<HTMLInputElement>, boolean> | undefined
|
|
29
28
|
slot?: {
|
|
30
29
|
root?: React.ComponentProps<'div'> | undefined
|
|
31
30
|
input?: React.ComponentProps<'input'> | undefined
|
|
@@ -50,6 +49,7 @@ export function Checkbox(props: CheckboxProps) {
|
|
|
50
49
|
if (ref.current) {
|
|
51
50
|
// When a checkbox has both `indeterminate` and `checked` set to true,
|
|
52
51
|
// only the `indeterminate` state will be activated in Chromium browser.
|
|
52
|
+
// eslint-disable-next-line react-compiler/react-compiler
|
|
53
53
|
ref.current.indeterminate = !ref.current.checked && !!indeterminate
|
|
54
54
|
}
|
|
55
55
|
})
|
|
@@ -17,8 +17,7 @@ export interface RadioProps extends Omit<
|
|
|
17
17
|
size?: RadioSize | undefined
|
|
18
18
|
value: string
|
|
19
19
|
onChange?:
|
|
20
|
-
|
|
21
|
-
| undefined
|
|
20
|
+
ChangeCallback<React.ChangeEvent<HTMLInputElement>, boolean> | undefined
|
|
22
21
|
slot?: {
|
|
23
22
|
root?: React.ComponentProps<'div'> | undefined
|
|
24
23
|
input?: React.ComponentProps<'input'> | undefined
|
|
@@ -12,8 +12,7 @@ export interface RadioGroupProps extends Omit<
|
|
|
12
12
|
multiple?: never
|
|
13
13
|
disabled?: boolean | undefined
|
|
14
14
|
onChange?:
|
|
15
|
-
|
|
16
|
-
| undefined
|
|
15
|
+
ChangeCallback<React.ChangeEvent<HTMLInputElement>, string> | undefined
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
export function RadioGroup(props: RadioGroupProps) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fromSVG } from '
|
|
1
|
+
import { fromSVG } from '../../icon/Icon'
|
|
2
2
|
import { ReactComponent as CheckboxCheckedSVG } from './CheckboxChecked.svg'
|
|
3
3
|
import { ReactComponent as CheckboxIndeterminateSVG } from './CheckboxIndeterminate.svg'
|
|
4
4
|
import { ReactComponent as CheckboxUncheckedSVG } from './CheckboxUnchecked.svg'
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Simplify SVG files
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Install picosvg:
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
python3 -m pip install picosvg
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
From the repository root, write simplified copies to a separate directory so the originals remain unchanged:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
mkdir -p "$TMPDIR/chiplet-icons"
|
|
13
|
+
for svg in src/component/icon/set/*.svg; do
|
|
14
|
+
python3 -m picosvg.picosvg "$svg" --output_file "$TMPDIR/chiplet-icons/$(basename "$svg")" || exit 1
|
|
15
|
+
done
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Review the generated files before replacing any source icons.
|
|
@@ -16,8 +16,7 @@ export interface InputProps extends Omit<
|
|
|
16
16
|
defaultValue?: string | undefined
|
|
17
17
|
value?: string | undefined
|
|
18
18
|
onChange?:
|
|
19
|
-
|
|
20
|
-
| undefined
|
|
19
|
+
ChangeCallback<React.ChangeEvent<HTMLInputElement>, string> | undefined
|
|
21
20
|
before?: JSX.Element | null | undefined
|
|
22
21
|
after?: JSX.Element | null | undefined
|
|
23
22
|
slot?: {
|
|
@@ -3,13 +3,12 @@ import { isEnterKey } from '#util'
|
|
|
3
3
|
import clsx from 'clsx'
|
|
4
4
|
import { useCallback } from 'react'
|
|
5
5
|
import { Search24Regular } from '../icon'
|
|
6
|
+
import { Input, type InputProps } from './Input'
|
|
6
7
|
import { InputBeforeStyle, SearchInputBeforeStyle } from './style/index.css'
|
|
7
|
-
import { Input, type InputProps } from '.'
|
|
8
8
|
|
|
9
9
|
export interface SearchInputProps extends InputProps {
|
|
10
10
|
onSearch?:
|
|
11
|
-
|
|
12
|
-
| undefined
|
|
11
|
+
ChangeCallback<React.KeyboardEvent<HTMLInputElement>, string> | undefined
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
export function SearchInput(props: SearchInputProps) {
|
|
@@ -28,6 +27,7 @@ export function SearchInput(props: SearchInputProps) {
|
|
|
28
27
|
const { onKeyDown } = attrs
|
|
29
28
|
|
|
30
29
|
attrs.onKeyDown = useCallback<NonNullable<typeof onKeyDown>>(
|
|
30
|
+
// eslint-disable-next-line react-hooks/preserve-manual-memoization
|
|
31
31
|
(ev) => {
|
|
32
32
|
onKeyDown?.(ev)
|
|
33
33
|
|
|
@@ -35,6 +35,7 @@ export function SearchInput(props: SearchInputProps) {
|
|
|
35
35
|
onSearch?.(ev, ev.currentTarget.value)
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
+
// eslint-disable-next-line react-hooks/preserve-manual-memoization
|
|
38
39
|
[onKeyDown, onSearch]
|
|
39
40
|
)
|
|
40
41
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type PopoverProps, Popover } from '#component'
|
|
2
1
|
import { useForm } from '#hook'
|
|
3
2
|
import clsx from 'clsx'
|
|
3
|
+
import { Popover, type PopoverProps } from '../popover/Popover'
|
|
4
4
|
import { ListStyle } from '../select/style/index.css'
|
|
5
5
|
|
|
6
6
|
export function Menu(props: PopoverProps<'ul'>) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Checkmark24Regular } from '#component'
|
|
2
1
|
import { useChange, useCheckbox, useInteractive, useKeyboard } from '#hook'
|
|
2
|
+
import { Checkmark24Regular } from '../icon'
|
|
3
3
|
import { ItemIconStyle } from '../select/style/index.css'
|
|
4
4
|
import { renderMenuItem, type MenuItemProps } from './renderMenuItem'
|
|
5
5
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Checkmark24Regular } from '#component'
|
|
2
1
|
import {
|
|
3
2
|
useChange,
|
|
4
3
|
useClose,
|
|
@@ -6,6 +5,7 @@ import {
|
|
|
6
5
|
useKeyboard,
|
|
7
6
|
useRadio,
|
|
8
7
|
} from '#hook'
|
|
8
|
+
import { Checkmark24Regular } from '../icon'
|
|
9
9
|
import { ItemIconStyle } from '../select/style/index.css'
|
|
10
10
|
import { renderMenuItem, type MenuItemProps } from './renderMenuItem'
|
|
11
11
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { useIsomorphicLayoutEffect, useRefObject } from '#hook'
|
|
2
|
+
import { useRef } from 'react'
|
|
3
|
+
import { type Root, createRoot } from 'react-dom/client'
|
|
4
|
+
|
|
5
|
+
export interface ShadowRootProps extends React.ComponentProps<'div'> {
|
|
6
|
+
delegatesFocus?: boolean | undefined
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function ShadowRoot(props: ShadowRootProps) {
|
|
10
|
+
const { children, delegatesFocus = false, ref, ...attrs } = props
|
|
11
|
+
const hostRef = useRefObject<HTMLDivElement>(ref)
|
|
12
|
+
const nestedRootRef = useRef<Root | null>(null)
|
|
13
|
+
|
|
14
|
+
useIsomorphicLayoutEffect(() => {
|
|
15
|
+
const host = hostRef.current
|
|
16
|
+
|
|
17
|
+
/* istanbul ignore next */
|
|
18
|
+
if (host === null) {
|
|
19
|
+
return
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const shadowRoot =
|
|
23
|
+
host.shadowRoot ??
|
|
24
|
+
host.attachShadow({
|
|
25
|
+
mode: 'open',
|
|
26
|
+
delegatesFocus,
|
|
27
|
+
})
|
|
28
|
+
const nestedRoot = nestedRootRef.current ?? createRoot(shadowRoot)
|
|
29
|
+
|
|
30
|
+
nestedRootRef.current = nestedRoot
|
|
31
|
+
|
|
32
|
+
return () => {
|
|
33
|
+
nestedRoot.render(null)
|
|
34
|
+
}
|
|
35
|
+
}, [delegatesFocus, hostRef])
|
|
36
|
+
|
|
37
|
+
useIsomorphicLayoutEffect(() => {
|
|
38
|
+
nestedRootRef.current?.render(children)
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
return <div {...attrs} ref={hostRef} />
|
|
42
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
2
|
+
positionAxisMap,
|
|
3
3
|
useTooltip,
|
|
4
4
|
type Overlay,
|
|
5
5
|
type TooltipOptions,
|
|
@@ -9,9 +9,7 @@ import { Portal } from './Portal'
|
|
|
9
9
|
import { TooltipArrowStyle, TooltipStyle } from './style/index.css'
|
|
10
10
|
|
|
11
11
|
export type TooltipContent =
|
|
12
|
-
|
|
13
|
-
| string
|
|
14
|
-
| React.ReactElement
|
|
12
|
+
((tooltip: Tooltip) => React.ReactNode) | string | React.ReactElement
|
|
15
13
|
|
|
16
14
|
export interface TooltipProps
|
|
17
15
|
extends
|
|
@@ -40,7 +38,7 @@ export function Tooltip(props: TooltipProps) {
|
|
|
40
38
|
<div
|
|
41
39
|
{...tooltip.arrow.props}
|
|
42
40
|
className={clsx(
|
|
43
|
-
TooltipArrowStyle({ axis:
|
|
41
|
+
TooltipArrowStyle({ axis: positionAxisMap[tooltip.position] }),
|
|
44
42
|
tooltip.arrow.props.className
|
|
45
43
|
)}
|
|
46
44
|
/>
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import {
|
|
3
|
-
ChevronDown24Regular,
|
|
4
|
-
Input,
|
|
5
|
-
Popover,
|
|
6
|
-
type InputProps,
|
|
7
|
-
type PopoverProps,
|
|
8
|
-
} from '#component'
|
|
9
2
|
import { FormContext, useAutoComplete, type AutoCompleteOptions } from '#hook'
|
|
10
3
|
import { HighlightName } from '#theme'
|
|
11
4
|
import clsx from 'clsx'
|
|
12
5
|
import { useLayoutEffect, type JSX } from 'react'
|
|
6
|
+
import { ChevronDown24Regular } from '../icon'
|
|
7
|
+
import { Input, type InputProps } from '../input/Input'
|
|
8
|
+
import { Popover, type PopoverProps } from '../popover/Popover'
|
|
13
9
|
import { InputAfterStyle } from '../input/style/index.css'
|
|
14
10
|
import { Option } from './Option'
|
|
15
11
|
import { ListStyle } from './style/index.css'
|
|
@@ -24,8 +24,7 @@ export interface OptionProps<T extends OptionValue> extends Omit<
|
|
|
24
24
|
multiple?: never
|
|
25
25
|
disabled?: boolean | undefined
|
|
26
26
|
onChange?:
|
|
27
|
-
|
|
28
|
-
| undefined
|
|
27
|
+
ChangeCallback<React.MouseEvent<HTMLLIElement>, boolean> | undefined
|
|
29
28
|
slot?: {
|
|
30
29
|
root?: React.ComponentProps<'li'> | undefined
|
|
31
30
|
icon?: React.ComponentProps<'svg'> | undefined
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Button,
|
|
3
|
-
ChevronDown24Regular,
|
|
4
|
-
Popover,
|
|
5
|
-
type ButtonProps,
|
|
6
|
-
type PopoverProps,
|
|
7
|
-
} from '#component'
|
|
8
1
|
import {
|
|
9
2
|
FormContext,
|
|
10
3
|
useSelect,
|
|
@@ -13,6 +6,9 @@ import {
|
|
|
13
6
|
} from '#hook'
|
|
14
7
|
import clsx from 'clsx'
|
|
15
8
|
import type { JSX } from 'react'
|
|
9
|
+
import { Popover, type PopoverProps } from '../popover/Popover'
|
|
10
|
+
import { Button, type ButtonProps } from '../button/Button'
|
|
11
|
+
import { ChevronDown24Regular } from '../icon'
|
|
16
12
|
import { ButtonAfterStyle } from '../button/style/index.css'
|
|
17
13
|
import { ListStyle } from '../select/style/index.css'
|
|
18
14
|
import { Option } from './Option'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { useActivate, type ActivateCallback } from '#hook'
|
|
3
2
|
import { useImperativeHandle, useMemo } from 'react'
|
|
4
3
|
import invariant from 'tiny-invariant'
|
|
4
|
+
import { useActivate, type ActivateCallback } from '../../react/useActivate'
|
|
5
5
|
import { KeyboardContext } from './context'
|
|
6
6
|
import {
|
|
7
7
|
useLastFocused,
|