chiplet 0.5.0 → 0.6.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/README.md +32 -2
- package/dist/assets/{global.css.ts.vanilla-CTwjHiaM.css → global.css.ts.vanilla-C6UQbnfq.css} +8 -2
- package/dist/component/button/Button.d.ts +13 -0
- package/dist/component/button/Button.d.ts.map +1 -0
- package/dist/component/button/Button.js +72 -28
- package/dist/component/button/Button.js.map +1 -1
- package/dist/component/button/IconButton.d.ts +5 -0
- package/dist/component/button/IconButton.d.ts.map +1 -0
- package/dist/component/button/IconButton.js +29 -13
- package/dist/component/button/IconButton.js.map +1 -1
- package/dist/component/button/Interactive.d.ts +11 -0
- package/dist/component/button/Interactive.d.ts.map +1 -0
- package/dist/component/button/Interactive.js +37 -14
- package/dist/component/button/Interactive.js.map +1 -1
- package/dist/component/button/LinkButton.d.ts +11 -0
- package/dist/component/button/LinkButton.d.ts.map +1 -0
- package/dist/component/button/LinkButton.js +79 -32
- package/dist/component/button/LinkButton.js.map +1 -1
- package/dist/component/button/index.d.ts +5 -0
- package/dist/component/button/index.d.ts.map +1 -0
- package/dist/component/button/index.js +0 -1
- package/dist/component/button/index.js.map +1 -1
- package/dist/component/button/style/index.css.d.ts +89 -0
- package/dist/component/button/style/index.css.d.ts.map +1 -0
- package/dist/component/button/style/{index.css.js → index.css.vanilla.js} +3 -3
- package/dist/component/button/style/index.css.vanilla.js.map +1 -0
- package/dist/component/checkbox/Checkbox.d.ts +14 -0
- package/dist/component/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/component/checkbox/Checkbox.js +119 -44
- package/dist/component/checkbox/Checkbox.js.map +1 -1
- package/dist/component/checkbox/CheckboxGroup.d.ts +11 -0
- package/dist/component/checkbox/CheckboxGroup.d.ts.map +1 -0
- package/dist/component/checkbox/CheckboxGroup.js +33 -16
- package/dist/component/checkbox/CheckboxGroup.js.map +1 -1
- package/dist/component/checkbox/Radio.d.ts +13 -0
- package/dist/component/checkbox/Radio.d.ts.map +1 -0
- package/dist/component/checkbox/Radio.js +94 -35
- package/dist/component/checkbox/Radio.js.map +1 -1
- package/dist/component/checkbox/RadioGroup.d.ts +11 -0
- package/dist/component/checkbox/RadioGroup.d.ts.map +1 -0
- package/dist/component/checkbox/RadioGroup.js +33 -17
- package/dist/component/checkbox/RadioGroup.js.map +1 -1
- package/dist/component/checkbox/Switch.d.ts +15 -0
- package/dist/component/checkbox/Switch.d.ts.map +1 -0
- package/dist/component/checkbox/Switch.js +93 -34
- package/dist/component/checkbox/Switch.js.map +1 -1
- package/dist/component/checkbox/icon/index.d.ts +6 -0
- package/dist/component/checkbox/icon/index.d.ts.map +1 -0
- package/dist/component/checkbox/icon/index.js +0 -1
- package/dist/component/checkbox/icon/index.js.map +1 -1
- package/dist/component/checkbox/index.d.ts +6 -0
- package/dist/component/checkbox/index.d.ts.map +1 -0
- package/dist/component/checkbox/index.js +0 -1
- package/dist/component/checkbox/index.js.map +1 -1
- package/dist/component/checkbox/style/index.css.d.ts +65 -0
- package/dist/component/checkbox/style/index.css.d.ts.map +1 -0
- package/dist/component/checkbox/style/{index.css.js → index.css.vanilla.js} +1 -1
- package/dist/component/checkbox/style/index.css.vanilla.js.map +1 -0
- package/dist/component/header/Header.d.ts +10 -0
- package/dist/component/header/Header.d.ts.map +1 -0
- package/dist/component/header/Header.js +73 -16
- package/dist/component/header/Header.js.map +1 -1
- package/dist/component/header/index.d.ts +2 -0
- package/dist/component/header/index.d.ts.map +1 -0
- package/dist/component/header/index.js +0 -1
- package/dist/component/header/index.js.map +1 -1
- package/dist/component/header/style/index.css.d.ts +3 -0
- package/dist/component/header/style/index.css.d.ts.map +1 -0
- package/dist/component/header/style/{index.css.js → index.css.vanilla.js} +1 -1
- package/dist/component/header/style/index.css.vanilla.js.map +1 -0
- package/dist/component/icon/Icon.d.ts +6 -0
- package/dist/component/icon/Icon.d.ts.map +1 -0
- package/dist/component/icon/Icon.js +0 -1
- package/dist/component/icon/Icon.js.map +1 -1
- package/dist/component/icon/index.d.ts +10 -0
- package/dist/component/icon/index.d.ts.map +1 -0
- package/dist/component/icon/index.js +0 -1
- package/dist/component/icon/index.js.map +1 -1
- package/dist/component/index.d.ts +12 -0
- package/dist/component/index.d.ts.map +1 -0
- package/dist/component/index.js +1 -2
- package/dist/component/index.js.map +1 -1
- package/dist/component/input/Input.d.ts +19 -0
- package/dist/component/input/Input.d.ts.map +1 -0
- package/dist/component/input/Input.js +113 -40
- package/dist/component/input/Input.js.map +1 -1
- package/dist/component/input/SearchInput.d.ts +7 -0
- package/dist/component/input/SearchInput.d.ts.map +1 -0
- package/dist/component/input/SearchInput.js +13 -18
- package/dist/component/input/SearchInput.js.map +1 -1
- package/dist/component/input/index.d.ts +3 -0
- package/dist/component/input/index.d.ts.map +1 -0
- package/dist/component/input/index.js +0 -1
- package/dist/component/input/index.js.map +1 -1
- package/dist/component/input/style/index.css.d.ts +89 -0
- package/dist/component/input/style/index.css.d.ts.map +1 -0
- package/dist/component/input/style/{index.css.js → index.css.vanilla.js} +3 -3
- package/dist/component/input/style/index.css.vanilla.js.map +1 -0
- package/dist/component/menu/Menu.d.ts +3 -0
- package/dist/component/menu/Menu.d.ts.map +1 -0
- package/dist/component/menu/Menu.js +22 -11
- package/dist/component/menu/Menu.js.map +1 -1
- package/dist/component/menu/MenuButton.d.ts +3 -0
- package/dist/component/menu/MenuButton.d.ts.map +1 -0
- package/dist/component/menu/MenuButton.js +21 -5
- package/dist/component/menu/MenuButton.js.map +1 -1
- package/dist/component/menu/MenuItem.d.ts +4 -0
- package/dist/component/menu/MenuItem.d.ts.map +1 -0
- package/dist/component/menu/MenuItem.js +14 -5
- package/dist/component/menu/MenuItem.js.map +1 -1
- package/dist/component/menu/MenuItemCheckbox.d.ts +11 -0
- package/dist/component/menu/MenuItemCheckbox.d.ts.map +1 -0
- package/dist/component/menu/MenuItemCheckbox.js +35 -19
- package/dist/component/menu/MenuItemCheckbox.js.map +1 -1
- package/dist/component/menu/MenuItemRadio.d.ts +11 -0
- package/dist/component/menu/MenuItemRadio.d.ts.map +1 -0
- package/dist/component/menu/MenuItemRadio.js +35 -19
- package/dist/component/menu/MenuItemRadio.js.map +1 -1
- package/dist/component/menu/index.d.ts +6 -0
- package/dist/component/menu/index.d.ts.map +1 -0
- package/dist/component/menu/index.js +0 -1
- package/dist/component/menu/index.js.map +1 -1
- package/dist/component/menu/renderMenuItem.d.ts +15 -0
- package/dist/component/menu/renderMenuItem.d.ts.map +1 -0
- package/dist/component/menu/renderMenuItem.js +16 -41
- package/dist/component/menu/renderMenuItem.js.map +1 -1
- package/dist/component/popover/Dialog.d.ts +11 -0
- package/dist/component/popover/Dialog.d.ts.map +1 -0
- package/dist/component/popover/Dialog.js +57 -17
- package/dist/component/popover/Dialog.js.map +1 -1
- package/dist/component/popover/DismissButton.d.ts +3 -0
- package/dist/component/popover/DismissButton.d.ts.map +1 -0
- package/dist/component/popover/DismissButton.js +22 -3
- package/dist/component/popover/DismissButton.js.map +1 -1
- package/dist/component/popover/Popover.d.ts +12 -0
- package/dist/component/popover/Popover.d.ts.map +1 -0
- package/dist/component/popover/Popover.js +59 -21
- package/dist/component/popover/Popover.js.map +1 -1
- package/dist/component/popover/Portal.d.ts +5 -0
- package/dist/component/popover/Portal.d.ts.map +1 -0
- package/dist/component/popover/Portal.js +30 -3
- package/dist/component/popover/Portal.js.map +1 -1
- package/dist/component/popover/ShadowRoot.d.ts +5 -0
- package/dist/component/popover/ShadowRoot.d.ts.map +1 -0
- package/dist/component/popover/ShadowRoot.js +73 -20
- package/dist/component/popover/ShadowRoot.js.map +1 -1
- package/dist/component/popover/Tooltip.d.ts +10 -0
- package/dist/component/popover/Tooltip.d.ts.map +1 -0
- package/dist/component/popover/Tooltip.js +103 -29
- package/dist/component/popover/Tooltip.js.map +1 -1
- package/dist/component/popover/index.d.ts +7 -0
- package/dist/component/popover/index.d.ts.map +1 -0
- package/dist/component/popover/index.js +0 -1
- package/dist/component/popover/index.js.map +1 -1
- package/dist/component/popover/renderTooltip.d.ts +4 -0
- package/dist/component/popover/renderTooltip.d.ts.map +1 -0
- package/dist/component/popover/renderTooltip.js +0 -1
- package/dist/component/popover/renderTooltip.js.map +1 -1
- package/dist/component/popover/style/index.css.d.ts +110 -0
- package/dist/component/popover/style/index.css.d.ts.map +1 -0
- package/dist/component/popover/style/{index.css.js → index.css.vanilla.js} +5 -5
- package/dist/component/popover/style/index.css.vanilla.js.map +1 -0
- package/dist/component/progress/Spinner.d.ts +6 -0
- package/dist/component/progress/Spinner.d.ts.map +1 -0
- package/dist/component/progress/Spinner.js +38 -11
- package/dist/component/progress/Spinner.js.map +1 -1
- package/dist/component/progress/index.d.ts +2 -0
- package/dist/component/progress/index.d.ts.map +1 -0
- package/dist/component/progress/index.js +0 -1
- package/dist/component/progress/index.js.map +1 -1
- package/dist/component/progress/style/index.css.d.ts +26 -0
- package/dist/component/progress/style/index.css.d.ts.map +1 -0
- package/dist/component/progress/style/{index.css.js → index.css.vanilla.js} +1 -1
- package/dist/component/progress/style/index.css.vanilla.js.map +1 -0
- package/dist/component/select/AutoComplete.d.ts +18 -0
- package/dist/component/select/AutoComplete.d.ts.map +1 -0
- package/dist/component/select/AutoComplete.js +89 -32
- package/dist/component/select/AutoComplete.js.map +1 -1
- package/dist/component/select/Group.d.ts +14 -0
- package/dist/component/select/Group.d.ts.map +1 -0
- package/dist/component/select/Group.js +13 -42
- package/dist/component/select/Group.js.map +1 -1
- package/dist/component/select/Option.d.ts +22 -0
- package/dist/component/select/Option.d.ts.map +1 -0
- package/dist/component/select/Option.js +91 -38
- package/dist/component/select/Option.js.map +1 -1
- package/dist/component/select/Select.d.ts +18 -0
- package/dist/component/select/Select.d.ts.map +1 -0
- package/dist/component/select/Select.js +72 -29
- package/dist/component/select/Select.js.map +1 -1
- package/dist/component/select/Separator.d.ts +4 -0
- package/dist/component/select/Separator.d.ts.map +1 -0
- package/dist/component/select/Separator.js +21 -10
- package/dist/component/select/Separator.js.map +1 -1
- package/dist/component/select/index.d.ts +6 -0
- package/dist/component/select/index.d.ts.map +1 -0
- package/dist/component/select/index.js +0 -1
- package/dist/component/select/index.js.map +1 -1
- package/dist/component/select/style/index.css.d.ts +22 -0
- package/dist/component/select/style/index.css.d.ts.map +1 -0
- package/dist/component/select/style/{index.css.js → index.css.vanilla.js} +3 -3
- package/dist/component/select/style/index.css.vanilla.js.map +1 -0
- package/dist/component/style/article.css.d.ts +2 -0
- package/dist/component/style/article.css.d.ts.map +1 -0
- package/dist/component/style/{article.css.js → article.css.vanilla.js} +1 -1
- package/dist/component/style/article.css.vanilla.js.map +1 -0
- package/dist/component/style/index.d.ts +2 -0
- package/dist/component/style/index.d.ts.map +1 -0
- package/dist/component/style/index.js +1 -2
- package/dist/component/style/index.js.map +1 -1
- package/dist/component/typography/Body1.d.ts +2 -0
- package/dist/component/typography/Body1.d.ts.map +1 -0
- package/dist/component/typography/Body1.js +21 -3
- package/dist/component/typography/Body1.js.map +1 -1
- package/dist/component/typography/Body2.d.ts +2 -0
- package/dist/component/typography/Body2.d.ts.map +1 -0
- package/dist/component/typography/Body2.js +21 -3
- package/dist/component/typography/Body2.js.map +1 -1
- package/dist/component/typography/Body3.d.ts +2 -0
- package/dist/component/typography/Body3.d.ts.map +1 -0
- package/dist/component/typography/Body3.js +21 -3
- package/dist/component/typography/Body3.js.map +1 -1
- package/dist/component/typography/Caption1.d.ts +2 -0
- package/dist/component/typography/Caption1.d.ts.map +1 -0
- package/dist/component/typography/Caption1.js +21 -3
- package/dist/component/typography/Caption1.js.map +1 -1
- package/dist/component/typography/Caption2.d.ts +2 -0
- package/dist/component/typography/Caption2.d.ts.map +1 -0
- package/dist/component/typography/Caption2.js +21 -3
- package/dist/component/typography/Caption2.js.map +1 -1
- package/dist/component/typography/Heading1.d.ts +2 -0
- package/dist/component/typography/Heading1.d.ts.map +1 -0
- package/dist/component/typography/Heading1.js +21 -11
- package/dist/component/typography/Heading1.js.map +1 -1
- package/dist/component/typography/Heading2.d.ts +2 -0
- package/dist/component/typography/Heading2.d.ts.map +1 -0
- package/dist/component/typography/Heading2.js +21 -11
- package/dist/component/typography/Heading2.js.map +1 -1
- package/dist/component/typography/Heading3.d.ts +2 -0
- package/dist/component/typography/Heading3.d.ts.map +1 -0
- package/dist/component/typography/Heading3.js +21 -11
- package/dist/component/typography/Heading3.js.map +1 -1
- package/dist/component/typography/Heading4.d.ts +2 -0
- package/dist/component/typography/Heading4.d.ts.map +1 -0
- package/dist/component/typography/Heading4.js +21 -11
- package/dist/component/typography/Heading4.js.map +1 -1
- package/dist/component/typography/index.d.ts +10 -0
- package/dist/component/typography/index.d.ts.map +1 -0
- package/dist/component/typography/index.js +0 -1
- package/dist/component/typography/index.js.map +1 -1
- package/dist/component/typography/style/index.css.d.ts +17 -0
- package/dist/component/typography/style/index.css.d.ts.map +1 -0
- package/dist/component/typography/style/{index.css.js → index.css.vanilla.js} +1 -1
- package/dist/component/typography/style/index.css.vanilla.js.map +1 -0
- package/dist/hook/accessibility/index.d.ts +2 -0
- package/dist/hook/accessibility/index.d.ts.map +1 -0
- package/dist/hook/accessibility/index.js +0 -1
- package/dist/hook/accessibility/index.js.map +1 -1
- package/dist/hook/accessibility/keyboard/Keyboard.d.ts +28 -0
- package/dist/hook/accessibility/keyboard/Keyboard.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/Keyboard.js +107 -38
- package/dist/hook/accessibility/keyboard/Keyboard.js.map +1 -1
- package/dist/hook/accessibility/keyboard/Roving.d.ts +7 -0
- package/dist/hook/accessibility/keyboard/Roving.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/Roving.js +28 -3
- package/dist/hook/accessibility/keyboard/Roving.js.map +1 -1
- package/dist/hook/accessibility/keyboard/context/index.d.ts +10 -0
- package/dist/hook/accessibility/keyboard/context/index.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/context/index.js +0 -1
- package/dist/hook/accessibility/keyboard/context/index.js.map +1 -1
- package/dist/hook/accessibility/keyboard/hook/index.d.ts +5 -0
- package/dist/hook/accessibility/keyboard/hook/index.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/hook/index.js +0 -1
- package/dist/hook/accessibility/keyboard/hook/index.js.map +1 -1
- package/dist/hook/accessibility/keyboard/hook/useLastFocused.d.ts +4 -0
- package/dist/hook/accessibility/keyboard/hook/useLastFocused.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/hook/useLastFocused.js +13 -14
- package/dist/hook/accessibility/keyboard/hook/useLastFocused.js.map +1 -1
- package/dist/hook/accessibility/keyboard/hook/useMoveFocus.d.ts +4 -0
- package/dist/hook/accessibility/keyboard/hook/useMoveFocus.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/hook/useMoveFocus.js +89 -38
- package/dist/hook/accessibility/keyboard/hook/useMoveFocus.js.map +1 -1
- package/dist/hook/accessibility/keyboard/hook/useNavigate.d.ts +8 -0
- package/dist/hook/accessibility/keyboard/hook/useNavigate.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/hook/useNavigate.js +84 -37
- package/dist/hook/accessibility/keyboard/hook/useNavigate.js.map +1 -1
- package/dist/hook/accessibility/keyboard/hook/usePool.d.ts +11 -0
- package/dist/hook/accessibility/keyboard/hook/usePool.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/hook/usePool.js +44 -18
- package/dist/hook/accessibility/keyboard/hook/usePool.js.map +1 -1
- package/dist/hook/accessibility/keyboard/index.d.ts +5 -0
- package/dist/hook/accessibility/keyboard/index.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/index.js +0 -1
- package/dist/hook/accessibility/keyboard/index.js.map +1 -1
- package/dist/hook/accessibility/keyboard/resolve.d.ts +26 -0
- package/dist/hook/accessibility/keyboard/resolve.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/resolve.js +36 -12
- package/dist/hook/accessibility/keyboard/resolve.js.map +1 -1
- package/dist/hook/accessibility/keyboard/sort.d.ts +3 -0
- package/dist/hook/accessibility/keyboard/sort.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/sort.js +5 -2
- package/dist/hook/accessibility/keyboard/sort.js.map +1 -1
- package/dist/hook/accessibility/keyboard/tree.d.ts +20 -0
- package/dist/hook/accessibility/keyboard/tree.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/tree.js +8 -18
- package/dist/hook/accessibility/keyboard/tree.js.map +1 -1
- package/dist/hook/accessibility/keyboard/useController.d.ts +11 -0
- package/dist/hook/accessibility/keyboard/useController.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/useController.js +158 -90
- package/dist/hook/accessibility/keyboard/useController.js.map +1 -1
- package/dist/hook/accessibility/keyboard/useKeyboard.d.ts +10 -0
- package/dist/hook/accessibility/keyboard/useKeyboard.d.ts.map +1 -0
- package/dist/hook/accessibility/keyboard/useKeyboard.js +79 -28
- package/dist/hook/accessibility/keyboard/useKeyboard.js.map +1 -1
- package/dist/hook/document/index.d.ts +2 -0
- package/dist/hook/document/index.d.ts.map +1 -0
- package/dist/hook/document/index.js +0 -1
- package/dist/hook/document/index.js.map +1 -1
- package/dist/hook/document/useHighlight.d.ts +3 -0
- package/dist/hook/document/useHighlight.d.ts.map +1 -0
- package/dist/hook/document/useHighlight.js +55 -31
- package/dist/hook/document/useHighlight.js.map +1 -1
- package/dist/hook/form/context/index.d.ts +11 -0
- package/dist/hook/form/context/index.d.ts.map +1 -0
- package/dist/hook/form/context/index.js +0 -1
- package/dist/hook/form/context/index.js.map +1 -1
- package/dist/hook/form/index.d.ts +14 -0
- package/dist/hook/form/index.d.ts.map +1 -0
- package/dist/hook/form/index.js +0 -1
- package/dist/hook/form/index.js.map +1 -1
- package/dist/hook/form/useAutoComplete.d.ts +66 -0
- package/dist/hook/form/useAutoComplete.d.ts.map +1 -0
- package/dist/hook/form/useAutoComplete.js +102 -99
- package/dist/hook/form/useAutoComplete.js.map +1 -1
- package/dist/hook/form/useChange.d.ts +9 -0
- package/dist/hook/form/useChange.d.ts.map +1 -0
- package/dist/hook/form/useChange.js +33 -12
- package/dist/hook/form/useChange.js.map +1 -1
- package/dist/hook/form/useCheckbox.d.ts +13 -0
- package/dist/hook/form/useCheckbox.d.ts.map +1 -0
- package/dist/hook/form/useCheckbox.js +29 -10
- package/dist/hook/form/useCheckbox.js.map +1 -1
- package/dist/hook/form/useChecked.d.ts +15 -0
- package/dist/hook/form/useChecked.d.ts.map +1 -0
- package/dist/hook/form/useChecked.js +151 -50
- package/dist/hook/form/useChecked.js.map +1 -1
- package/dist/hook/form/useDefault.d.ts +49 -0
- package/dist/hook/form/useDefault.d.ts.map +1 -0
- package/dist/hook/form/useDefault.js +102 -45
- package/dist/hook/form/useDefault.js.map +1 -1
- package/dist/hook/form/useForm.d.ts +10 -0
- package/dist/hook/form/useForm.d.ts.map +1 -0
- package/dist/hook/form/useForm.js +66 -16
- package/dist/hook/form/useForm.js.map +1 -1
- package/dist/hook/form/useGroup.d.ts +22 -0
- package/dist/hook/form/useGroup.d.ts.map +1 -0
- package/dist/hook/form/useGroup.js +63 -58
- package/dist/hook/form/useGroup.js.map +1 -1
- package/dist/hook/form/useName.d.ts +19 -0
- package/dist/hook/form/useName.d.ts.map +1 -0
- package/dist/hook/form/useName.js +46 -19
- package/dist/hook/form/useName.js.map +1 -1
- package/dist/hook/form/useOption.d.ts +17 -0
- package/dist/hook/form/useOption.d.ts.map +1 -0
- package/dist/hook/form/useOption.js +33 -14
- package/dist/hook/form/useOption.js.map +1 -1
- package/dist/hook/form/useRadio.d.ts +13 -0
- package/dist/hook/form/useRadio.d.ts.map +1 -0
- package/dist/hook/form/useRadio.js +29 -10
- package/dist/hook/form/useRadio.js.map +1 -1
- package/dist/hook/form/useSelect.d.ts +55 -0
- package/dist/hook/form/useSelect.d.ts.map +1 -0
- package/dist/hook/form/useSelect.js +114 -40
- package/dist/hook/form/useSelect.js.map +1 -1
- package/dist/hook/form/useValue.d.ts +12 -0
- package/dist/hook/form/useValue.d.ts.map +1 -0
- package/dist/hook/form/useValue.js +62 -19
- package/dist/hook/form/useValue.js.map +1 -1
- package/dist/hook/index.d.ts +7 -0
- package/dist/hook/index.d.ts.map +1 -0
- package/dist/hook/index.js +1 -2
- package/dist/hook/index.js.map +1 -1
- package/dist/hook/observable/index.d.ts +2 -0
- package/dist/hook/observable/index.d.ts.map +1 -0
- package/dist/hook/observable/index.js +0 -1
- package/dist/hook/observable/index.js.map +1 -1
- package/dist/hook/observable/useObservable.d.ts +5 -0
- package/dist/hook/observable/useObservable.d.ts.map +1 -0
- package/dist/hook/observable/useObservable.js +41 -20
- package/dist/hook/observable/useObservable.js.map +1 -1
- package/dist/hook/popover/context/index.d.ts +3 -0
- package/dist/hook/popover/context/index.d.ts.map +1 -0
- package/dist/hook/popover/context/index.js +0 -1
- package/dist/hook/popover/context/index.js.map +1 -1
- package/dist/hook/popover/index.d.ts +11 -0
- package/dist/hook/popover/index.d.ts.map +1 -0
- package/dist/hook/popover/index.js +1 -2
- package/dist/hook/popover/index.js.map +1 -1
- package/dist/hook/popover/style/positioning.css.d.ts +17 -0
- package/dist/hook/popover/style/positioning.css.d.ts.map +1 -0
- package/dist/hook/popover/style/{positioning.css.js → positioning.css.vanilla.js} +1 -1
- package/dist/hook/popover/style/positioning.css.vanilla.js.map +1 -0
- package/dist/hook/popover/useAnchor.d.ts +3 -0
- package/dist/hook/popover/useAnchor.d.ts.map +1 -0
- package/dist/hook/popover/useAnchor.js +46 -18
- package/dist/hook/popover/useAnchor.js.map +1 -1
- package/dist/hook/popover/useAnchorPositioning.d.ts +30 -0
- package/dist/hook/popover/useAnchorPositioning.d.ts.map +1 -0
- package/dist/hook/popover/useAnchorPositioning.js +158 -53
- package/dist/hook/popover/useAnchorPositioning.js.map +1 -1
- package/dist/hook/popover/useClickOutside.d.ts +2 -0
- package/dist/hook/popover/useClickOutside.d.ts.map +1 -0
- package/dist/hook/popover/useClickOutside.js +37 -14
- package/dist/hook/popover/useClickOutside.js.map +1 -1
- package/dist/hook/popover/useClose.d.ts +7 -0
- package/dist/hook/popover/useClose.d.ts.map +1 -0
- package/dist/hook/popover/useClose.js +9 -11
- package/dist/hook/popover/useClose.js.map +1 -1
- package/dist/hook/popover/useDialog.d.ts +16 -0
- package/dist/hook/popover/useDialog.d.ts.map +1 -0
- package/dist/hook/popover/useDialog.js +29 -20
- package/dist/hook/popover/useDialog.js.map +1 -1
- package/dist/hook/popover/useLightDismiss.d.ts +3 -0
- package/dist/hook/popover/useLightDismiss.d.ts.map +1 -0
- package/dist/hook/popover/useLightDismiss.js +159 -72
- package/dist/hook/popover/useLightDismiss.js.map +1 -1
- package/dist/hook/popover/useOverlay.d.ts +29 -0
- package/dist/hook/popover/useOverlay.d.ts.map +1 -0
- package/dist/hook/popover/useOverlay.js +25 -29
- package/dist/hook/popover/useOverlay.js.map +1 -1
- package/dist/hook/popover/usePopover.d.ts +26 -0
- package/dist/hook/popover/usePopover.d.ts.map +1 -0
- package/dist/hook/popover/usePopover.js +36 -32
- package/dist/hook/popover/usePopover.js.map +1 -1
- package/dist/hook/popover/usePositioning.d.ts +32 -0
- package/dist/hook/popover/usePositioning.d.ts.map +1 -0
- package/dist/hook/popover/usePositioning.js +87 -85
- package/dist/hook/popover/usePositioning.js.map +1 -1
- package/dist/hook/popover/useReturnFocus.d.ts +3 -0
- package/dist/hook/popover/useReturnFocus.d.ts.map +1 -0
- package/dist/hook/popover/useReturnFocus.js +11 -8
- package/dist/hook/popover/useReturnFocus.js.map +1 -1
- package/dist/hook/popover/useTooltip.d.ts +27 -0
- package/dist/hook/popover/useTooltip.d.ts.map +1 -0
- package/dist/hook/popover/useTooltip.js +89 -98
- package/dist/hook/popover/useTooltip.js.map +1 -1
- package/dist/hook/promise/index.d.ts +2 -0
- package/dist/hook/promise/index.d.ts.map +1 -0
- package/dist/hook/promise/index.js +0 -1
- package/dist/hook/promise/index.js.map +1 -1
- package/dist/hook/promise/usePromise.d.ts +3 -0
- package/dist/hook/promise/usePromise.d.ts.map +1 -0
- package/dist/hook/promise/usePromise.js +56 -23
- package/dist/hook/promise/usePromise.js.map +1 -1
- package/dist/hook/react/element.d.ts +23 -0
- package/dist/hook/react/index.d.ts +10 -0
- package/dist/hook/react/index.d.ts.map +1 -0
- package/dist/hook/react/index.js +0 -1
- package/dist/hook/react/index.js.map +1 -1
- package/dist/hook/react/refValue.d.ts +4 -0
- package/dist/hook/react/refValue.d.ts.map +1 -0
- package/dist/hook/react/refValue.js +0 -1
- package/dist/hook/react/refValue.js.map +1 -1
- package/dist/hook/react/useActivate.d.ts +8 -0
- package/dist/hook/react/useActivate.d.ts.map +1 -0
- package/dist/hook/react/useActivate.js +110 -57
- package/dist/hook/react/useActivate.js.map +1 -1
- package/dist/hook/react/useConst.d.ts +2 -0
- package/dist/hook/react/useConst.d.ts.map +1 -0
- package/dist/hook/react/useConst.js +0 -1
- package/dist/hook/react/useConst.js.map +1 -1
- package/dist/hook/react/useInteractive.d.ts +4 -0
- package/dist/hook/react/useInteractive.d.ts.map +1 -0
- package/dist/hook/react/useInteractive.js +73 -34
- package/dist/hook/react/useInteractive.js.map +1 -1
- package/dist/hook/react/useIsomorphicLayoutEffect.d.ts +3 -0
- package/dist/hook/react/useIsomorphicLayoutEffect.d.ts.map +1 -0
- package/dist/hook/react/useIsomorphicLayoutEffect.js +0 -1
- package/dist/hook/react/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/hook/react/useRefCallback.d.ts +3 -0
- package/dist/hook/react/useRefCallback.d.ts.map +1 -0
- package/dist/hook/react/useRefCallback.js +17 -21
- package/dist/hook/react/useRefCallback.js.map +1 -1
- package/dist/hook/react/useRefObject.d.ts +4 -0
- package/dist/hook/react/useRefObject.d.ts.map +1 -0
- package/dist/hook/react/useRefObject.js +0 -1
- package/dist/hook/react/useRefObject.js.map +1 -1
- package/dist/hook/react/useRegExp.d.ts +3 -0
- package/dist/hook/react/useRegExp.d.ts.map +1 -0
- package/dist/hook/react/useRegExp.js +27 -10
- package/dist/hook/react/useRegExp.js.map +1 -1
- package/dist/hook/react/useUniqueId.d.ts +2 -0
- package/dist/hook/react/useUniqueId.d.ts.map +1 -0
- package/dist/hook/react/useUniqueId.js +12 -4
- package/dist/hook/react/useUniqueId.js.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/infra/index.d.ts +2 -0
- package/dist/infra/index.d.ts.map +1 -0
- package/dist/infra/index.js +0 -1
- package/dist/infra/index.js.map +1 -1
- package/dist/infra/logging/index.d.ts +2 -0
- package/dist/infra/logging/index.d.ts.map +1 -0
- package/dist/infra/logging/index.js +0 -1
- package/dist/infra/logging/index.js.map +1 -1
- package/dist/infra/logging/logger.d.ts +50 -0
- package/dist/infra/logging/logger.d.ts.map +1 -0
- package/dist/infra/logging/logger.js +48 -68
- package/dist/infra/logging/logger.js.map +1 -1
- package/dist/theme/ColorScheme.d.ts +10 -0
- package/dist/theme/ColorScheme.d.ts.map +1 -0
- package/dist/theme/ColorScheme.js +49 -7
- package/dist/theme/ColorScheme.js.map +1 -1
- package/dist/theme/ThemeContext.d.ts +11 -0
- package/dist/theme/ThemeContext.d.ts.map +1 -0
- package/dist/theme/ThemeContext.js +7 -0
- package/dist/theme/ThemeContext.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +6 -0
- package/dist/theme/ThemeProvider.d.ts.map +1 -0
- package/dist/theme/ThemeProvider.js +51 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/defineTheme.d.ts +15 -0
- package/dist/theme/defineTheme.d.ts.map +1 -0
- package/dist/theme/defineTheme.js +3 -2
- package/dist/theme/defineTheme.js.map +1 -1
- package/dist/theme/global.css.d.ts +14 -0
- package/dist/theme/global.css.d.ts.map +1 -0
- package/dist/theme/{global.css.js → global.css.vanilla.js} +7 -5
- package/dist/theme/global.css.vanilla.js.map +1 -0
- package/dist/theme/index.d.ts +11 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +5 -4
- package/dist/theme/index.js.map +1 -1
- package/dist/theme/palette.d.ts +126 -0
- package/dist/theme/palette.d.ts.map +1 -0
- package/dist/theme/palette.js +1 -19
- package/dist/theme/palette.js.map +1 -1
- package/dist/theme/theme.css.d.ts +321 -0
- package/dist/theme/theme.css.d.ts.map +1 -0
- package/dist/theme/{theme.css.js → theme.css.vanilla.js} +1 -1
- package/dist/theme/theme.css.vanilla.js.map +1 -0
- package/dist/theme/token.css.d.ts +287 -0
- package/dist/theme/token.css.d.ts.map +1 -0
- package/dist/theme/{token.css.js → token.css.vanilla.js} +1 -1
- package/dist/theme/token.css.vanilla.js.map +1 -0
- package/dist/theme/typography.d.ts +136 -0
- package/dist/theme/typography.d.ts.map +1 -0
- package/dist/theme/typography.js +0 -1
- package/dist/theme/typography.js.map +1 -1
- package/dist/theme/useSystemColorScheme.d.ts +2 -0
- package/dist/theme/useSystemColorScheme.d.ts.map +1 -0
- package/dist/theme/useSystemColorScheme.js +0 -1
- package/dist/theme/useSystemColorScheme.js.map +1 -1
- package/dist/types/svg.d.ts +5 -0
- package/dist/util/array/compact.d.ts +3 -0
- package/dist/util/array/compact.d.ts.map +1 -0
- package/dist/util/array/compact.js +6 -0
- package/dist/util/array/compact.js.map +1 -0
- package/dist/util/array/index.d.ts +6 -0
- package/dist/util/array/index.d.ts.map +1 -0
- package/dist/util/array/index.js +4 -1
- package/dist/util/array/index.js.map +1 -1
- package/dist/util/array/range.d.ts +2 -0
- package/dist/util/array/range.d.ts.map +1 -0
- package/dist/util/array/range.js +8 -0
- package/dist/util/array/range.js.map +1 -0
- package/dist/util/array/toggle.d.ts +2 -0
- package/dist/util/array/toggle.d.ts.map +1 -0
- package/dist/util/array/toggle.js +0 -1
- package/dist/util/array/toggle.js.map +1 -1
- package/dist/util/array/uniq.d.ts +2 -0
- package/dist/util/array/uniq.d.ts.map +1 -0
- package/dist/util/array/uniq.js +6 -0
- package/dist/util/array/uniq.js.map +1 -0
- package/dist/util/array/without.d.ts +2 -0
- package/dist/util/array/without.d.ts.map +1 -0
- package/dist/util/array/without.js +6 -0
- package/dist/util/array/without.js.map +1 -0
- package/dist/util/document/accessibility.css.d.ts +7 -0
- package/dist/util/document/accessibility.css.d.ts.map +1 -0
- package/dist/util/document/{accessibility.css.js → accessibility.css.vanilla.js} +1 -1
- package/dist/util/document/accessibility.css.vanilla.js.map +1 -0
- package/dist/util/document/accessibility.d.ts +10 -0
- package/dist/util/document/accessibility.d.ts.map +1 -0
- package/dist/util/document/accessibility.js +0 -1
- package/dist/util/document/accessibility.js.map +1 -1
- package/dist/util/document/class.d.ts +4 -0
- package/dist/util/document/class.d.ts.map +1 -0
- package/dist/util/document/class.js +0 -1
- package/dist/util/document/class.js.map +1 -1
- package/dist/util/document/error.d.ts +21 -0
- package/dist/util/document/error.d.ts.map +1 -0
- package/dist/util/document/error.js +0 -1
- package/dist/util/document/error.js.map +1 -1
- package/dist/util/document/event.d.ts +15 -0
- package/dist/util/document/event.d.ts.map +1 -0
- package/dist/util/document/event.js +0 -1
- package/dist/util/document/event.js.map +1 -1
- package/dist/util/document/index.d.ts +5 -0
- package/dist/util/document/index.d.ts.map +1 -0
- package/dist/util/document/index.js +1 -2
- package/dist/util/document/index.js.map +1 -1
- package/dist/util/file/index.d.ts +2 -0
- package/dist/util/file/index.d.ts.map +1 -0
- package/dist/util/file/index.js +0 -1
- package/dist/util/file/index.js.map +1 -1
- package/dist/util/file/readAsDataURL.d.ts +5 -0
- package/dist/util/file/readAsDataURL.d.ts.map +1 -0
- package/dist/util/file/readAsDataURL.js +3 -2
- package/dist/util/file/readAsDataURL.js.map +1 -1
- package/dist/util/filter/index.d.ts +7 -0
- package/dist/util/filter/index.d.ts.map +1 -0
- package/dist/util/filter/index.js +0 -1
- package/dist/util/filter/index.js.map +1 -1
- package/dist/util/filter/isArray.d.ts +2 -0
- package/dist/util/filter/isArray.d.ts.map +1 -0
- package/dist/util/filter/isArray.js +0 -1
- package/dist/util/filter/isArray.js.map +1 -1
- package/dist/util/filter/isNil.d.ts +2 -0
- package/dist/util/filter/isNil.d.ts.map +1 -0
- package/dist/util/filter/isNil.js +0 -1
- package/dist/util/filter/isNil.js.map +1 -1
- package/dist/util/filter/isObject.d.ts +2 -0
- package/dist/util/filter/isObject.d.ts.map +1 -0
- package/dist/util/filter/isObject.js +0 -1
- package/dist/util/filter/isObject.js.map +1 -1
- package/dist/util/filter/isString.d.ts +2 -0
- package/dist/util/filter/isString.d.ts.map +1 -0
- package/dist/util/filter/isString.js +0 -1
- package/dist/util/filter/isString.js.map +1 -1
- package/dist/util/filter/isSymbol.d.ts +2 -0
- package/dist/util/filter/isSymbol.d.ts.map +1 -0
- package/dist/util/filter/isSymbol.js +0 -1
- package/dist/util/filter/isSymbol.js.map +1 -1
- package/dist/util/filter/negate.d.ts +3 -0
- package/dist/util/filter/negate.d.ts.map +1 -0
- package/dist/util/filter/negate.js +0 -1
- package/dist/util/filter/negate.js.map +1 -1
- package/dist/util/index.d.ts +14 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +5 -2
- package/dist/util/index.js.map +1 -1
- package/dist/util/linked-list/buildLinkedList.d.ts +3 -0
- package/dist/util/linked-list/buildLinkedList.d.ts.map +1 -0
- package/dist/util/linked-list/buildLinkedList.js +0 -1
- package/dist/util/linked-list/buildLinkedList.js.map +1 -1
- package/dist/util/linked-list/index.d.ts +3 -0
- package/dist/util/linked-list/index.d.ts.map +1 -0
- package/dist/util/linked-list/index.js +0 -1
- package/dist/util/linked-list/index.js.map +1 -1
- package/dist/util/linked-list/node.d.ts +7 -0
- package/dist/util/linked-list/node.d.ts.map +1 -0
- package/dist/util/linked-list/node.js +0 -1
- package/dist/util/linked-list/node.js.map +1 -1
- package/dist/util/lock/index.d.ts +2 -0
- package/dist/util/lock/index.d.ts.map +1 -0
- package/dist/util/lock/index.js +0 -1
- package/dist/util/lock/index.js.map +1 -1
- package/dist/util/lock/lock.d.ts +36 -0
- package/dist/util/lock/lock.d.ts.map +1 -0
- package/dist/util/lock/lock.js +9 -9
- package/dist/util/lock/lock.js.map +1 -1
- package/dist/util/number/index.d.ts +3 -0
- package/dist/util/number/index.d.ts.map +1 -0
- package/dist/util/number/index.js +0 -1
- package/dist/util/number/index.js.map +1 -1
- package/dist/util/number/isNumber.d.ts +2 -0
- package/dist/util/number/isNumber.d.ts.map +1 -0
- package/dist/util/number/isNumber.js +0 -1
- package/dist/util/number/isNumber.js.map +1 -1
- package/dist/util/number/range.d.ts +85 -0
- package/dist/util/object/entries.d.ts +6 -0
- package/dist/util/object/entries.d.ts.map +1 -0
- package/dist/util/object/entries.js +0 -1
- package/dist/util/object/entries.js.map +1 -1
- package/dist/util/object/fromEntries.d.ts +2 -0
- package/dist/util/object/fromEntries.d.ts.map +1 -0
- package/dist/util/object/fromEntries.js +0 -1
- package/dist/util/object/fromEntries.js.map +1 -1
- package/dist/util/object/index.d.ts +4 -0
- package/dist/util/object/index.d.ts.map +1 -0
- package/dist/util/object/index.js +0 -1
- package/dist/util/object/index.js.map +1 -1
- package/dist/util/object/keys.d.ts +3 -0
- package/dist/util/object/keys.d.ts.map +1 -0
- package/dist/util/object/keys.js +0 -1
- package/dist/util/object/keys.js.map +1 -1
- package/dist/util/promise/deferred.d.ts +12 -0
- package/dist/util/promise/deferred.d.ts.map +1 -0
- package/dist/util/promise/deferred.js +0 -1
- package/dist/util/promise/deferred.js.map +1 -1
- package/dist/util/promise/index.d.ts +6 -0
- package/dist/util/promise/index.d.ts.map +1 -0
- package/dist/util/promise/index.js +0 -1
- package/dist/util/promise/index.js.map +1 -1
- package/dist/util/promise/isPromise.d.ts +2 -0
- package/dist/util/promise/isPromise.d.ts.map +1 -0
- package/dist/util/promise/isPromise.js +0 -1
- package/dist/util/promise/isPromise.js.map +1 -1
- package/dist/util/promise/promiseReduce.d.ts +10 -0
- package/dist/util/promise/promiseReduce.d.ts.map +1 -0
- package/dist/util/promise/promiseReduce.js +0 -1
- package/dist/util/promise/promiseReduce.js.map +1 -1
- package/dist/util/promise/waitFor.d.ts +2 -0
- package/dist/util/promise/waitFor.d.ts.map +1 -0
- package/dist/util/promise/waitFor.js +3 -2
- package/dist/util/promise/waitFor.js.map +1 -1
- package/dist/util/promise/waitUntil.d.ts +2 -0
- package/dist/util/promise/waitUntil.d.ts.map +1 -0
- package/dist/util/promise/waitUntil.js +3 -2
- package/dist/util/promise/waitUntil.js.map +1 -1
- package/dist/util/random/UUID.d.ts +3 -0
- package/dist/util/random/UUID.d.ts.map +1 -0
- package/dist/util/random/UUID.js +0 -1
- package/dist/util/random/UUID.js.map +1 -1
- package/dist/util/random/generateDeterministicId.d.ts +2 -0
- package/dist/util/random/generateDeterministicId.d.ts.map +1 -0
- package/dist/util/random/generateDeterministicId.js +0 -1
- package/dist/util/random/generateDeterministicId.js.map +1 -1
- package/dist/util/random/generateDigest.d.ts +2 -0
- package/dist/util/random/generateDigest.d.ts.map +1 -0
- package/dist/util/random/generateDigest.js +0 -1
- package/dist/util/random/generateDigest.js.map +1 -1
- package/dist/util/random/generateUniqueId.d.ts +2 -0
- package/dist/util/random/generateUniqueId.d.ts.map +1 -0
- package/dist/util/random/generateUniqueId.js +0 -1
- package/dist/util/random/generateUniqueId.js.map +1 -1
- package/dist/util/random/index.d.ts +5 -0
- package/dist/util/random/index.d.ts.map +1 -0
- package/dist/util/random/index.js +0 -1
- package/dist/util/random/index.js.map +1 -1
- package/dist/util/random/randomKaomoji.d.ts +2 -0
- package/dist/util/random/randomKaomoji.d.ts.map +1 -0
- package/dist/util/random/randomKaomoji.js +0 -1
- package/dist/util/random/randomKaomoji.js.map +1 -1
- package/dist/util/random/toHex.d.ts +2 -0
- package/dist/util/random/toHex.d.ts.map +1 -0
- package/dist/util/random/toHex.js +1 -5
- package/dist/util/random/toHex.js.map +1 -1
- package/dist/util/sort/index.d.ts +3 -0
- package/dist/util/sort/index.d.ts.map +1 -0
- package/dist/util/sort/index.js +0 -1
- package/dist/util/sort/index.js.map +1 -1
- package/dist/util/sort/mergeSort.d.ts +6 -0
- package/dist/util/sort/mergeSort.d.ts.map +1 -0
- package/dist/util/sort/mergeSort.js +0 -1
- package/dist/util/sort/mergeSort.js.map +1 -1
- package/dist/util/sort/quickSort.d.ts +6 -0
- package/dist/util/sort/quickSort.d.ts.map +1 -0
- package/dist/util/sort/quickSort.js +0 -1
- package/dist/util/sort/quickSort.js.map +1 -1
- package/dist/util/string/index.d.ts +3 -0
- package/dist/util/string/index.d.ts.map +1 -0
- package/dist/util/string/index.js +0 -1
- package/dist/util/string/index.js.map +1 -1
- package/dist/util/string/kebabCase.d.ts +8 -0
- package/dist/util/string/kebabCase.d.ts.map +1 -0
- package/dist/util/string/kebabCase.js +0 -1
- package/dist/util/string/kebabCase.js.map +1 -1
- package/dist/util/string/split.d.ts +2 -0
- package/dist/util/string/split.d.ts.map +1 -0
- package/dist/util/string/split.js +0 -1
- package/dist/util/string/split.js.map +1 -1
- package/dist/util/tree/addTreeNode.d.ts +3 -0
- package/dist/util/tree/addTreeNode.d.ts.map +1 -0
- package/dist/util/tree/addTreeNode.js +0 -1
- package/dist/util/tree/addTreeNode.js.map +1 -1
- package/dist/util/tree/attachChild.d.ts +3 -0
- package/dist/util/tree/attachChild.d.ts.map +1 -0
- package/dist/util/tree/attachChild.js +0 -1
- package/dist/util/tree/attachChild.js.map +1 -1
- package/dist/util/tree/breadthFirstSearch.d.ts +2 -0
- package/dist/util/tree/breadthFirstSearch.d.ts.map +1 -0
- package/dist/util/tree/breadthFirstSearch.js +0 -1
- package/dist/util/tree/breadthFirstSearch.js.map +1 -1
- package/dist/util/tree/buildTree.d.ts +3 -0
- package/dist/util/tree/buildTree.d.ts.map +1 -0
- package/dist/util/tree/buildTree.js +0 -1
- package/dist/util/tree/buildTree.js.map +1 -1
- package/dist/util/tree/depthFirstSearch.d.ts +2 -0
- package/dist/util/tree/depthFirstSearch.d.ts.map +1 -0
- package/dist/util/tree/depthFirstSearch.js +0 -1
- package/dist/util/tree/depthFirstSearch.js.map +1 -1
- package/dist/util/tree/detachChild.d.ts +3 -0
- package/dist/util/tree/detachChild.d.ts.map +1 -0
- package/dist/util/tree/detachChild.js +0 -1
- package/dist/util/tree/detachChild.js.map +1 -1
- package/dist/util/tree/index.d.ts +9 -0
- package/dist/util/tree/index.d.ts.map +1 -0
- package/dist/util/tree/index.js +0 -1
- package/dist/util/tree/index.js.map +1 -1
- package/dist/util/tree/iterateChildren.d.ts +3 -0
- package/dist/util/tree/iterateChildren.d.ts.map +1 -0
- package/dist/util/tree/iterateChildren.js +0 -1
- package/dist/util/tree/iterateChildren.js.map +1 -1
- package/dist/util/tree/iterateTree.d.ts +3 -0
- package/dist/util/tree/iterateTree.d.ts.map +1 -0
- package/dist/util/tree/iterateTree.js +0 -1
- package/dist/util/tree/iterateTree.js.map +1 -1
- package/dist/util/tree/node.d.ts +10 -0
- package/dist/util/tree/node.d.ts.map +1 -0
- package/dist/util/tree/node.js +0 -1
- package/dist/util/tree/node.js.map +1 -1
- package/dist/util/tree/removeTreeNode.d.ts +3 -0
- package/dist/util/tree/removeTreeNode.d.ts.map +1 -0
- package/dist/util/tree/removeTreeNode.js +3 -2
- package/dist/util/tree/removeTreeNode.js.map +1 -1
- package/dist/util/type/index.d.ts +2 -0
- package/dist/util/type/index.d.ts.map +1 -0
- package/dist/util/type/index.js +2 -0
- package/dist/util/type/index.js.map +1 -0
- package/dist/util/type/prettify.d.ts +4 -0
- package/dist/util/type/prettify.d.ts.map +1 -0
- package/dist/util/type/prettify.js +2 -0
- package/dist/util/type/prettify.js.map +1 -0
- package/package.json +14 -28
- package/src/component/checkbox/icon/index.ts +2 -0
- package/src/component/icon/index.ts +2 -0
- package/src/component/popover/Portal.tsx +20 -1
- package/src/hook/accessibility/keyboard/hook/useMoveFocus.ts +1 -1
- package/src/hook/accessibility/keyboard/hook/useNavigate.ts +1 -1
- package/src/hook/accessibility/keyboard/resolve.ts +3 -6
- package/src/hook/accessibility/keyboard/useController.ts +1 -1
- package/src/hook/form/useAutoComplete.ts +1 -1
- package/src/hook/form/useChecked.ts +2 -2
- package/src/hook/popover/style/positioning.css.ts +2 -3
- package/src/hook/popover/usePositioning.ts +14 -3
- package/src/hook/popover/useReturnFocus.ts +1 -1
- package/src/hook/promise/usePromise.ts +12 -6
- package/src/hook/react/useActivate.ts +1 -1
- package/src/hook/react/useRegExp.ts +1 -2
- package/src/infra/logging/logger.ts +4 -4
- package/src/theme/ThemeContext.ts +15 -0
- package/src/theme/ThemeProvider.tsx +26 -0
- package/src/theme/defineTheme.ts +19 -13
- package/src/theme/global.css.ts +16 -11
- package/src/theme/index.ts +4 -0
- package/src/theme/typography.ts +2 -2
- package/src/types/svg.d.ts +5 -0
- package/src/util/array/compact.ts +5 -0
- package/src/util/array/index.ts +4 -0
- package/src/util/array/range.ts +6 -0
- package/src/util/array/uniq.ts +3 -0
- package/src/util/array/without.ts +3 -0
- package/src/util/index.ts +1 -0
- package/src/util/string/kebabCase.ts +27 -1
- package/src/util/type/index.ts +1 -0
- package/src/util/type/prettify.ts +1 -0
- package/src/vite-env.d.ts +3 -0
- package/dist/component/button/style/index.css.js.map +0 -1
- package/dist/component/checkbox/style/index.css.js.map +0 -1
- package/dist/component/header/style/index.css.js.map +0 -1
- package/dist/component/input/style/index.css.js.map +0 -1
- package/dist/component/popover/style/index.css.js.map +0 -1
- package/dist/component/progress/style/index.css.js.map +0 -1
- package/dist/component/select/style/index.css.js.map +0 -1
- package/dist/component/style/article.css.js.map +0 -1
- package/dist/component/typography/style/index.css.js.map +0 -1
- package/dist/hook/popover/style/positioning.css.js.map +0 -1
- package/dist/theme/global.css.js.map +0 -1
- package/dist/theme/theme.css.js.map +0 -1
- package/dist/theme/token.css.js.map +0 -1
- package/dist/util/document/accessibility.css.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/util/type/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prettify.d.ts","sourceRoot":"","sources":["../../../src/util/type/prettify.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prettify.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chiplet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "React component, hook, and utility library.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,15 +31,11 @@
|
|
|
31
31
|
"./package.json": "./package.json",
|
|
32
32
|
".": {
|
|
33
33
|
"types": "./src/index.ts",
|
|
34
|
-
"
|
|
35
|
-
"storybook": "./src/index.ts",
|
|
36
|
-
"import": "./dist/index.js"
|
|
34
|
+
"default": "./dist/index.js"
|
|
37
35
|
},
|
|
38
36
|
"./*": {
|
|
39
37
|
"types": "./src/*/index.ts",
|
|
40
|
-
"
|
|
41
|
-
"storybook": "./src/*/index.ts",
|
|
42
|
-
"import": "./dist/*/index.js"
|
|
38
|
+
"default": "./dist/*/index.js"
|
|
43
39
|
}
|
|
44
40
|
},
|
|
45
41
|
"files": [
|
|
@@ -66,15 +62,16 @@
|
|
|
66
62
|
"@opentelemetry/semantic-conventions": "^1.45.0",
|
|
67
63
|
"@vanilla-extract/recipes": "^0.5.7",
|
|
68
64
|
"clsx": "^2.1.1",
|
|
69
|
-
"
|
|
65
|
+
"fast-deep-equal": "^3.1.3",
|
|
70
66
|
"rxjs": "^7.8.2",
|
|
71
67
|
"symbol-observable": "^4.0.0",
|
|
72
68
|
"tiny-invariant": "^1.3.3"
|
|
73
69
|
},
|
|
74
70
|
"devDependencies": {
|
|
71
|
+
"@babel/plugin-syntax-jsx": "^7.29.7",
|
|
72
|
+
"@babel/plugin-syntax-typescript": "^7.29.7",
|
|
75
73
|
"@commitlint/cli": "^21.2.4",
|
|
76
74
|
"@commitlint/config-conventional": "^21.2.4",
|
|
77
|
-
"@commitlint/types": "^21.2.3",
|
|
78
75
|
"@csstools/postcss-light-dark-function": "^3.0.9",
|
|
79
76
|
"@csstools/postcss-relative-color-syntax": "^4.0.17",
|
|
80
77
|
"@eslint/js": "^10.0.1",
|
|
@@ -88,25 +85,20 @@
|
|
|
88
85
|
"@storybook/addon-vitest": "^10.6.7",
|
|
89
86
|
"@storybook/react-vite": "^10.6.7",
|
|
90
87
|
"@svgr/rollup": "^8.1.0",
|
|
91
|
-
"@tailwindcss/postcss": "^4.3.5",
|
|
92
88
|
"@testing-library/jest-dom": "^8.0.0",
|
|
93
89
|
"@testing-library/react": "^16.3.3",
|
|
94
90
|
"@testing-library/user-event": "^14.6.13",
|
|
95
|
-
"@types/lodash-es": "^4.17.12",
|
|
96
91
|
"@types/node": "^24.12.2",
|
|
97
92
|
"@types/react": "^19.3.0",
|
|
98
93
|
"@types/react-dom": "^19.3.0",
|
|
99
94
|
"@vanilla-extract/css": "^1.21.3",
|
|
100
95
|
"@vanilla-extract/rollup-plugin": "^1.5.4",
|
|
101
96
|
"@vanilla-extract/vite-plugin": "^5.2.6",
|
|
102
|
-
"@vitejs/plugin-legacy": "^8.2.4",
|
|
103
97
|
"@vitejs/plugin-react": "^6.3.0",
|
|
104
98
|
"@vitest/browser-playwright": "^5.1.1",
|
|
105
99
|
"@vitest/coverage-istanbul": "^5.1.1",
|
|
106
100
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
107
|
-
"clsx": "^2.1.1",
|
|
108
101
|
"colorjs.io": "^0.7.1",
|
|
109
|
-
"csstype": "^3.2.4",
|
|
110
102
|
"eslint": "^10.15.0",
|
|
111
103
|
"eslint-plugin-import-x": "^4.18.1",
|
|
112
104
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
@@ -118,13 +110,11 @@
|
|
|
118
110
|
"husky": "^9.1.7",
|
|
119
111
|
"jsdom": "^31.0.1",
|
|
120
112
|
"lint-staged": "^17.6.1",
|
|
113
|
+
"oxc-transform-react": "^0.156.0",
|
|
121
114
|
"playwright": "^1.65.1",
|
|
122
115
|
"postcss": "^8.5.33",
|
|
123
|
-
"postcss-html": "^2.0.1",
|
|
124
|
-
"postcss-scss": "^4.0.9",
|
|
125
116
|
"postcss-styled-syntax": "^0.7.4",
|
|
126
117
|
"prettier": "^3.10.1",
|
|
127
|
-
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
128
118
|
"react": "^19.3.1",
|
|
129
119
|
"react-dom": "^19.3.1",
|
|
130
120
|
"reelout": "^0.6.1",
|
|
@@ -133,7 +123,6 @@
|
|
|
133
123
|
"rollup": "^4.68.7",
|
|
134
124
|
"rollup-plugin-esbuild": "^6.2.1",
|
|
135
125
|
"rollup-plugin-node-externals": "^9.0.1",
|
|
136
|
-
"rollup-plugin-visualizer": "^7.1.3",
|
|
137
126
|
"rollup-preserve-directives": "^1.1.3",
|
|
138
127
|
"sort-package-json": "^4.1.0",
|
|
139
128
|
"storybook": "^10.6.7",
|
|
@@ -141,10 +130,6 @@
|
|
|
141
130
|
"stylelint-config-recess-order": "^7.10.1",
|
|
142
131
|
"stylelint-config-standard": "^41.0.0",
|
|
143
132
|
"stylelint-plugin-logical-css": "^2.1.1",
|
|
144
|
-
"tailwindcss": "^4.3.5",
|
|
145
|
-
"ts-node": "^10.9.2",
|
|
146
|
-
"tslib": "^2.9.1",
|
|
147
|
-
"type-fest": "^6.0.3",
|
|
148
133
|
"typescript": "^6.0.3",
|
|
149
134
|
"typescript-eslint": "^8.73.0",
|
|
150
135
|
"vite": "^8.3.8",
|
|
@@ -153,20 +138,21 @@
|
|
|
153
138
|
"peerDependencies": {
|
|
154
139
|
"@vanilla-extract/css": "^1.21.3",
|
|
155
140
|
"react": "^19.3.1",
|
|
156
|
-
"react-dom": "^19.3.1"
|
|
157
|
-
"tslib": "^2.9.1"
|
|
141
|
+
"react-dom": "^19.3.1"
|
|
158
142
|
},
|
|
159
143
|
"engines": {
|
|
160
144
|
"node": ">=24.15"
|
|
161
145
|
},
|
|
162
146
|
"scripts": {
|
|
163
|
-
"build": "rimraf dist && rollup -c && storybook build",
|
|
147
|
+
"build": "rimraf dist && rollup -c && node scripts/emit-dts.mjs && storybook build",
|
|
164
148
|
"clean": "rimraf -g \"**/{dist,storybook-static,coverage,test-results,__screenshots__,.vitest,*.tsbuildinfo}\"",
|
|
165
149
|
"dev": "storybook dev -p 6006",
|
|
166
|
-
"
|
|
167
|
-
"
|
|
150
|
+
"dts": "node scripts/emit-dts.mjs",
|
|
151
|
+
"format": "stylelint --fix \"**/*.{css,js,jsx,ts,tsx}\" && eslint --fix . && prettier --write .",
|
|
152
|
+
"lint": "stylelint \"**/*.{css,js,jsx,ts,tsx}\" && eslint . && prettier --check .",
|
|
168
153
|
"pretest": "playwright install --with-deps",
|
|
169
154
|
"test": "vitest",
|
|
170
|
-
"
|
|
155
|
+
"typecheck": "tsc --noEmit",
|
|
156
|
+
"validate": "pnpm i && pnpm clean && pnpm lint && pnpm typecheck && pnpm build && pnpm test run --coverage"
|
|
171
157
|
}
|
|
172
158
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
2
|
+
/// <reference path="../../../types/svg.d.ts" />
|
|
1
3
|
import { fromSVG } from '../../icon/Icon'
|
|
2
4
|
import { ReactComponent as CheckboxCheckedSVG } from './CheckboxChecked.svg'
|
|
3
5
|
import { ReactComponent as CheckboxIndeterminateSVG } from './CheckboxIndeterminate.svg'
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/triple-slash-reference
|
|
2
|
+
/// <reference path="../../types/svg.d.ts" />
|
|
1
3
|
import { fromSVG } from './Icon'
|
|
2
4
|
import { ReactComponent as Checkmark24FilledSVG } from './set/Checkmark24Filled.svg'
|
|
3
5
|
import { ReactComponent as Checkmark24RegularSVG } from './set/Checkmark24Regular.svg'
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ThemeContext } from '#theme'
|
|
2
|
+
import { use } from 'react'
|
|
1
3
|
import { createPortal } from 'react-dom'
|
|
2
4
|
|
|
3
5
|
export interface PortalProps extends React.PropsWithChildren {
|
|
@@ -7,6 +9,14 @@ export interface PortalProps extends React.PropsWithChildren {
|
|
|
7
9
|
export function Portal(props: PortalProps) {
|
|
8
10
|
let { container } = props
|
|
9
11
|
|
|
12
|
+
// Portaled content leaves the themed root, so re-establish the active
|
|
13
|
+
// 'ThemeContext' scope around it here rather than in
|
|
14
|
+
// 'usePopover'/'useTooltip'/'useDialog': those hooks only produce props
|
|
15
|
+
// for the positioned element, and merging the scope classes onto that
|
|
16
|
+
// element would compete with the overlay's own surface styles in the
|
|
17
|
+
// cascade.
|
|
18
|
+
const scope = use(ThemeContext)
|
|
19
|
+
|
|
10
20
|
if (!container && typeof document !== 'undefined') {
|
|
11
21
|
container = document.body
|
|
12
22
|
}
|
|
@@ -15,5 +25,14 @@ export function Portal(props: PortalProps) {
|
|
|
15
25
|
return null
|
|
16
26
|
}
|
|
17
27
|
|
|
18
|
-
return createPortal(
|
|
28
|
+
return createPortal(
|
|
29
|
+
scope === null ? (
|
|
30
|
+
props.children
|
|
31
|
+
) : (
|
|
32
|
+
<div className={scope.className} style={{ display: 'contents' }}>
|
|
33
|
+
{props.children}
|
|
34
|
+
</div>
|
|
35
|
+
),
|
|
36
|
+
container
|
|
37
|
+
)
|
|
19
38
|
}
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
isHomeKey,
|
|
8
8
|
isPageDownKey,
|
|
9
9
|
isPageUpKey,
|
|
10
|
+
type Prettify,
|
|
10
11
|
} from '#util'
|
|
11
12
|
import type { Pool } from './hook/usePool'
|
|
12
13
|
import { Tree } from './tree'
|
|
@@ -18,7 +19,7 @@ export type Resolve = typeof resolve
|
|
|
18
19
|
|
|
19
20
|
export function resolve(
|
|
20
21
|
type: NavigationType,
|
|
21
|
-
|
|
22
|
+
_direction: NavigationDirection,
|
|
22
23
|
tree: Tree,
|
|
23
24
|
current: Element | null | undefined,
|
|
24
25
|
target: Target | null | undefined
|
|
@@ -249,16 +250,12 @@ type Modifier = {
|
|
|
249
250
|
altKey?: boolean
|
|
250
251
|
}
|
|
251
252
|
|
|
252
|
-
type Target =
|
|
253
|
+
type Target = Prettify<
|
|
253
254
|
| { [K in Key]: K }[Key]
|
|
254
255
|
| { [K in Key]: { key: K } & Modifier }[Key]
|
|
255
256
|
| ({ key: 'Find'; detail: string } & Modifier)
|
|
256
257
|
>
|
|
257
258
|
|
|
258
|
-
type Pretty<T> = {
|
|
259
|
-
[K in keyof T]: T[K]
|
|
260
|
-
} & {}
|
|
261
|
-
|
|
262
259
|
function normalize(target: Target): Exclude<Target, string> {
|
|
263
260
|
if (typeof target === 'string') {
|
|
264
261
|
return { key: target }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { uniq, without } from '
|
|
2
|
+
import { uniq, without } from '#util'
|
|
3
3
|
import { useCallback, useLayoutEffect, useRef } from 'react'
|
|
4
4
|
import invariant from 'tiny-invariant'
|
|
5
5
|
import { useConst } from '../react/useConst'
|
|
@@ -99,7 +99,7 @@ export function useChecked<P extends Props<unknown>>(props: P) {
|
|
|
99
99
|
|
|
100
100
|
let _value = normalizeValue(multiple, ref.current.value)
|
|
101
101
|
|
|
102
|
-
_value = checked ? uniq(_value
|
|
102
|
+
_value = checked ? uniq([..._value, value]) : without(_value, value)
|
|
103
103
|
|
|
104
104
|
setValue(ev, _value)
|
|
105
105
|
},
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { entries, fromEntries, keys } from '#util'
|
|
1
|
+
import { entries, fromEntries, keys, type Prettify } from '#util'
|
|
2
2
|
import type { Alignment, Placement } from '@floating-ui/utils'
|
|
3
3
|
import { globalStyle } from '@vanilla-extract/css'
|
|
4
|
-
import type { Simplify } from 'type-fest'
|
|
5
4
|
import { generateDeterministicId } from '../../../util/random/generateDeterministicId'
|
|
6
5
|
|
|
7
6
|
export type Side = 'above' | 'below' | 'before' | 'after'
|
|
8
7
|
export type Axis = 'block' | 'inline'
|
|
9
|
-
export type Position =
|
|
8
|
+
export type Position = Prettify<Side | `${Side}-${Alignment}`>
|
|
10
9
|
|
|
11
10
|
export const Position = [
|
|
12
11
|
'above',
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
size,
|
|
13
13
|
} from '@floating-ui/dom'
|
|
14
14
|
import { getOppositePlacement, getSide } from '@floating-ui/utils'
|
|
15
|
-
import
|
|
15
|
+
import equal from 'fast-deep-equal'
|
|
16
16
|
import { useLayoutEffect, useRef, useState } from 'react'
|
|
17
17
|
import { flushSync } from 'react-dom'
|
|
18
18
|
import { refValue, type RefValue } from '../react/refValue'
|
|
@@ -68,7 +68,18 @@ export function usePositioning(
|
|
|
68
68
|
): Positioning {
|
|
69
69
|
const [stableOptions, setStableOptions] = useState(_options)
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
// 'fast-deep-equal' reports two distinct DOM elements as equal (no own
|
|
72
|
+
// enumerable keys), so compare the ref values by identity before the deep
|
|
73
|
+
// check. Comparing the referenced elements rather than the ref containers
|
|
74
|
+
// keeps a fresh ref-like object wrapping the same element from
|
|
75
|
+
// re-triggering the update on every render.
|
|
76
|
+
if (
|
|
77
|
+
refValue(_options.anchorRef) !== refValue(stableOptions.anchorRef) ||
|
|
78
|
+
refValue(_options.positionedRef) !==
|
|
79
|
+
refValue(stableOptions.positionedRef) ||
|
|
80
|
+
refValue(_options.arrowRef) !== refValue(stableOptions.arrowRef) ||
|
|
81
|
+
!equal(_options, stableOptions)
|
|
82
|
+
) {
|
|
72
83
|
setStableOptions(_options)
|
|
73
84
|
}
|
|
74
85
|
|
|
@@ -195,7 +206,7 @@ export function usePositioning(
|
|
|
195
206
|
}
|
|
196
207
|
}
|
|
197
208
|
|
|
198
|
-
if (!
|
|
209
|
+
if (!equal(ref.current.state, state)) {
|
|
199
210
|
ref.current.state = state
|
|
200
211
|
flushSync(() => setState(ref.current.state))
|
|
201
212
|
}
|
|
@@ -21,7 +21,16 @@ export function usePromise<T>(
|
|
|
21
21
|
const [error, setError] = useState<unknown>()
|
|
22
22
|
|
|
23
23
|
useEffect(() => {
|
|
24
|
-
|
|
24
|
+
// Both the deps array and the compiler's memo key track the signal
|
|
25
|
+
// instance, not its 'aborted' state: the deps re-run the effect when
|
|
26
|
+
// the signal is swapped between renders, and copying the signal to a
|
|
27
|
+
// local keeps the memo key identity-based — reading 'signal?.aborted'
|
|
28
|
+
// directly would narrow the key to that boolean, so a swapped-in,
|
|
29
|
+
// un-aborted signal would re-run the effect with a stale callback
|
|
30
|
+
// closing over the old signal.
|
|
31
|
+
const _signal = signal
|
|
32
|
+
|
|
33
|
+
if (_signal?.aborted) {
|
|
25
34
|
return
|
|
26
35
|
}
|
|
27
36
|
|
|
@@ -29,13 +38,13 @@ export function usePromise<T>(
|
|
|
29
38
|
|
|
30
39
|
promise
|
|
31
40
|
.then((value) => {
|
|
32
|
-
if (!destroyed && !
|
|
41
|
+
if (!destroyed && !_signal?.aborted) {
|
|
33
42
|
setValue(() => value)
|
|
34
43
|
setError(() => undefined)
|
|
35
44
|
}
|
|
36
45
|
})
|
|
37
46
|
.catch((error) => {
|
|
38
|
-
if (!destroyed && !
|
|
47
|
+
if (!destroyed && !_signal?.aborted) {
|
|
39
48
|
setError(() => error)
|
|
40
49
|
}
|
|
41
50
|
})
|
|
@@ -43,9 +52,6 @@ export function usePromise<T>(
|
|
|
43
52
|
return () => {
|
|
44
53
|
destroyed = true
|
|
45
54
|
}
|
|
46
|
-
// Depend on the signal instance, not its 'aborted' state, so the effect
|
|
47
|
-
// re-runs and the callbacks close over the latest signal when it is
|
|
48
|
-
// swapped between renders.
|
|
49
55
|
}, [promise, signal])
|
|
50
56
|
|
|
51
57
|
useEffect(() => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import { escapeRegExp } from 'lodash-es'
|
|
3
2
|
import { useDeferredValue, useMemo } from 'react'
|
|
4
3
|
|
|
5
4
|
export function useRegExp(pattern: string | RegExp, flags?: string): RegExp
|
|
@@ -21,7 +20,7 @@ export function useRegExp(
|
|
|
21
20
|
}
|
|
22
21
|
|
|
23
22
|
return new RegExp(
|
|
24
|
-
typeof pattern === 'string' ?
|
|
23
|
+
typeof pattern === 'string' ? RegExp.escape(pattern) : pattern,
|
|
25
24
|
flags
|
|
26
25
|
)
|
|
27
26
|
}, [flags, pattern])
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PERSISTENT_GLOBALLY_UNIQUE_IDENTIFIER, UUID } from '#util'
|
|
1
|
+
import { compact, PERSISTENT_GLOBALLY_UNIQUE_IDENTIFIER, UUID } from '#util'
|
|
2
2
|
import {
|
|
3
3
|
metrics,
|
|
4
4
|
SpanStatusCode,
|
|
@@ -54,7 +54,6 @@ import {
|
|
|
54
54
|
ATTR_EXCEPTION_TYPE,
|
|
55
55
|
ATTR_SERVICE_INSTANCE_ID,
|
|
56
56
|
} from '@opentelemetry/semantic-conventions/incubating'
|
|
57
|
-
import { compact, isError } from 'lodash-es'
|
|
58
57
|
|
|
59
58
|
export {
|
|
60
59
|
SpanStatusCode,
|
|
@@ -346,7 +345,7 @@ class Logger {
|
|
|
346
345
|
}
|
|
347
346
|
}
|
|
348
347
|
|
|
349
|
-
if (isError(error)) {
|
|
348
|
+
if (Error.isError(error)) {
|
|
350
349
|
// Guard against circular 'cause' chains, which would otherwise recurse
|
|
351
350
|
// until the stack overflows.
|
|
352
351
|
let cause: LogAttributes | undefined
|
|
@@ -402,7 +401,8 @@ class Logger {
|
|
|
402
401
|
status = SpanStatusCode.ERROR
|
|
403
402
|
|
|
404
403
|
/* istanbul ignore else */
|
|
405
|
-
if (isError(err) || typeof err === 'string')
|
|
404
|
+
if (Error.isError(err) || typeof err === 'string')
|
|
405
|
+
span.recordException(err)
|
|
406
406
|
|
|
407
407
|
throw err
|
|
408
408
|
} finally {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createContext } from 'react'
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export interface ThemeContext {
|
|
7
|
+
className: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export const ThemeContext = createContext<ThemeContext | null>(null)
|
|
14
|
+
|
|
15
|
+
ThemeContext.displayName = 'ThemeContext'
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import type { ColorScheme } from './ColorScheme'
|
|
3
|
+
import { ThemeContext } from './ThemeContext'
|
|
4
|
+
import {
|
|
5
|
+
DarkColorScheme,
|
|
6
|
+
DarkLightColorScheme,
|
|
7
|
+
GlobalContainerStyle,
|
|
8
|
+
LightColorScheme,
|
|
9
|
+
} from './global.css'
|
|
10
|
+
|
|
11
|
+
export interface ThemeProviderProps extends React.PropsWithChildren {
|
|
12
|
+
colorScheme?: ColorScheme | undefined
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function ThemeProvider(props: ThemeProviderProps) {
|
|
16
|
+
const { colorScheme = 'auto', children } = props
|
|
17
|
+
|
|
18
|
+
const className = clsx(
|
|
19
|
+
GlobalContainerStyle,
|
|
20
|
+
colorScheme === 'light' && LightColorScheme,
|
|
21
|
+
colorScheme === 'dark' && DarkColorScheme,
|
|
22
|
+
colorScheme === 'dark light' && DarkLightColorScheme
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
return <ThemeContext value={{ className }}>{children}</ThemeContext>
|
|
26
|
+
}
|
package/src/theme/defineTheme.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { kebabCase, type
|
|
2
|
-
import type { Join, KebabCase, Simplify } from 'type-fest'
|
|
1
|
+
import { kebabCase, type KebabCase, type Prettify } from '#util'
|
|
3
2
|
|
|
4
3
|
export function defineTheme<T extends object>(source: T) {
|
|
5
4
|
function traverse(source: object, prefix = '') {
|
|
@@ -27,17 +26,24 @@ export function defineTheme<T extends object>(source: T) {
|
|
|
27
26
|
|
|
28
27
|
Object.defineProperty(theme, '$declaration', { get: () => declaration })
|
|
29
28
|
|
|
30
|
-
return theme as
|
|
29
|
+
return theme as Prettify<Theme<T> & { readonly $declaration: Declaration<T> }>
|
|
31
30
|
}
|
|
32
31
|
|
|
33
|
-
type Theme<T extends object, P extends string = ''> = {
|
|
34
|
-
[K in keyof T]:
|
|
35
|
-
? T[K]
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
: never
|
|
39
|
-
} & {}
|
|
32
|
+
type Theme<T extends object, P extends string = '-'> = {
|
|
33
|
+
[K in keyof T]: T[K] extends Record<PropertyKey, unknown>
|
|
34
|
+
? Theme<T[K], `${P}-${Exclude<K, symbol>}`>
|
|
35
|
+
: `var(${KebabCase<`${P}-${Exclude<K, symbol>}`>})`
|
|
36
|
+
}
|
|
40
37
|
|
|
41
|
-
type
|
|
42
|
-
[
|
|
43
|
-
|
|
38
|
+
type Entry<T extends object, P extends string = '-'> = {
|
|
39
|
+
[K in keyof T]-?: K extends symbol
|
|
40
|
+
? never
|
|
41
|
+
: T[K] extends Record<PropertyKey, unknown>
|
|
42
|
+
? Entry<T[K], `${P}-${Exclude<K, symbol>}`>
|
|
43
|
+
: [KebabCase<`${P}-${Exclude<K, symbol>}`>, T[K]]
|
|
44
|
+
}[keyof T]
|
|
45
|
+
|
|
46
|
+
type Declaration<T extends object> =
|
|
47
|
+
Entry<T> extends infer E extends [string, unknown]
|
|
48
|
+
? { [K in E[0]]: Extract<E, [K, unknown]>[1] }
|
|
49
|
+
: never
|
package/src/theme/global.css.ts
CHANGED
|
@@ -3,12 +3,7 @@ import {
|
|
|
3
3
|
VirtualDisabledSelector,
|
|
4
4
|
VirtualFocusSelector,
|
|
5
5
|
} from '#util'
|
|
6
|
-
import {
|
|
7
|
-
createVar,
|
|
8
|
-
globalStyle,
|
|
9
|
-
style,
|
|
10
|
-
type StyleRule,
|
|
11
|
-
} from '@vanilla-extract/css'
|
|
6
|
+
import { createVar, globalStyle, style } from '@vanilla-extract/css'
|
|
12
7
|
import { generateDeterministicId } from '../util/random/generateDeterministicId'
|
|
13
8
|
import { theme, themeClass } from './theme.css'
|
|
14
9
|
import { tokenClass } from './token.css'
|
|
@@ -23,10 +18,7 @@ export const ActiveSelector = `:is(:active, ${VirtualActiveSelector})`
|
|
|
23
18
|
|
|
24
19
|
export const DisabledSelector = `:is(:disabled, ${VirtualDisabledSelector})`
|
|
25
20
|
|
|
26
|
-
export const stretch:
|
|
27
|
-
'-webkit-fill-available',
|
|
28
|
-
'stretch',
|
|
29
|
-
]
|
|
21
|
+
export const stretch: string[] = ['-webkit-fill-available', 'stretch']
|
|
30
22
|
|
|
31
23
|
export const GlobalContainerStyle = style([
|
|
32
24
|
tokenClass,
|
|
@@ -37,7 +29,10 @@ export const GlobalContainerStyle = style([
|
|
|
37
29
|
font: theme.body2,
|
|
38
30
|
WebkitFontSmoothing: 'antialiased',
|
|
39
31
|
color: theme.color,
|
|
40
|
-
|
|
32
|
+
// Enables 'light-dark()' in the theme tokens; it resolves only with an
|
|
33
|
+
// explicit 'color-scheme'.
|
|
34
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value/light-dark
|
|
35
|
+
colorScheme: 'light dark',
|
|
41
36
|
background: theme.paper.background,
|
|
42
37
|
},
|
|
43
38
|
])
|
|
@@ -54,6 +49,16 @@ export const DarkColorScheme = style({
|
|
|
54
49
|
colorScheme: 'dark',
|
|
55
50
|
})
|
|
56
51
|
|
|
52
|
+
// Standalone 'light dark' opt-in for containers that do not carry
|
|
53
|
+
// 'GlobalContainerStyle'.
|
|
54
|
+
export const LightDarkColorScheme = style({
|
|
55
|
+
colorScheme: 'light dark',
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
export const DarkLightColorScheme = style({
|
|
59
|
+
colorScheme: 'dark light',
|
|
60
|
+
})
|
|
61
|
+
|
|
57
62
|
export const SquircleStyle = style({
|
|
58
63
|
borderRadius: radiusVar,
|
|
59
64
|
'@supports': {
|
package/src/theme/index.ts
CHANGED
package/src/theme/typography.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CSSProperties } from 'react'
|
|
2
2
|
|
|
3
3
|
const BODY_FONT_FAMILY = `system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, sans-serif`
|
|
4
4
|
const HEADING_FONT_FAMILY = `'Avenir Next', 'Proxima Nova', ${BODY_FONT_FAMILY}`
|
|
@@ -8,7 +8,7 @@ const MONOSPACE_FONT_FAMILY = `ui-monospace, Consolas, Menlo, Monaco, 'Roboto Mo
|
|
|
8
8
|
* https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/font
|
|
9
9
|
*/
|
|
10
10
|
type Typography = Pick<
|
|
11
|
-
|
|
11
|
+
CSSProperties,
|
|
12
12
|
| 'fontFamily'
|
|
13
13
|
| 'fontSize'
|
|
14
14
|
| 'fontStyle'
|