chiplet 0.3.0-dev.3 → 0.3.0-dev.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +5 -4
  2. package/dist/component/button/Interactive.js +1 -0
  3. package/dist/component/button/Interactive.js.map +1 -1
  4. package/dist/component/button/style/index.css +37 -37
  5. package/dist/component/button/style/index.css.vanilla.js +1 -1
  6. package/dist/component/checkbox/Checkbox.js +1 -1
  7. package/dist/component/checkbox/Checkbox.js.map +1 -1
  8. package/dist/component/checkbox/CheckboxGroup.js +1 -0
  9. package/dist/component/checkbox/CheckboxGroup.js.map +1 -1
  10. package/dist/component/checkbox/Radio.js +1 -0
  11. package/dist/component/checkbox/Radio.js.map +1 -1
  12. package/dist/component/checkbox/RadioGroup.js +1 -0
  13. package/dist/component/checkbox/RadioGroup.js.map +1 -1
  14. package/dist/component/checkbox/icon/index.js +2 -0
  15. package/dist/component/checkbox/icon/index.js.map +1 -1
  16. package/dist/component/checkbox/style/index.css +79 -71
  17. package/dist/component/checkbox/style/index.css.vanilla.js +10 -10
  18. package/dist/component/index.js +1 -0
  19. package/dist/component/index.js.map +1 -1
  20. package/dist/component/input/Input.js +1 -0
  21. package/dist/component/input/Input.js.map +1 -1
  22. package/dist/component/input/SearchInput.js +1 -0
  23. package/dist/component/input/SearchInput.js.map +1 -1
  24. package/dist/component/input/style/index.css +29 -30
  25. package/dist/component/input/style/index.css.vanilla.js +4 -4
  26. package/dist/component/menu/Menu.js +2 -0
  27. package/dist/component/menu/Menu.js.map +1 -1
  28. package/dist/component/menu/MenuItem.js +1 -0
  29. package/dist/component/menu/MenuItem.js.map +1 -1
  30. package/dist/component/menu/MenuItemCheckbox.js +2 -0
  31. package/dist/component/menu/MenuItemCheckbox.js.map +1 -1
  32. package/dist/component/menu/MenuItemRadio.js +2 -0
  33. package/dist/component/menu/MenuItemRadio.js.map +1 -1
  34. package/dist/component/popover/Dialog.js +1 -0
  35. package/dist/component/popover/Dialog.js.map +1 -1
  36. package/dist/component/popover/DismissButton.js +1 -0
  37. package/dist/component/popover/DismissButton.js.map +1 -1
  38. package/dist/component/popover/Popover.js +1 -0
  39. package/dist/component/popover/Popover.js.map +1 -1
  40. package/dist/component/popover/Tooltip.js +1 -0
  41. package/dist/component/popover/Tooltip.js.map +1 -1
  42. package/dist/component/popover/style/index.css +96 -104
  43. package/dist/component/popover/style/index.css.vanilla.js +4 -4
  44. package/dist/component/select/AutoComplete.js +2 -0
  45. package/dist/component/select/AutoComplete.js.map +1 -1
  46. package/dist/component/select/Group.js +13 -4
  47. package/dist/component/select/Group.js.map +1 -1
  48. package/dist/component/select/Option.js +1 -0
  49. package/dist/component/select/Option.js.map +1 -1
  50. package/dist/component/select/Select.js +2 -0
  51. package/dist/component/select/Select.js.map +1 -1
  52. package/dist/component/select/style/index.css +78 -75
  53. package/dist/component/select/style/index.css.vanilla.js +12 -11
  54. package/dist/component/select/style/index.css.vanilla.js.map +1 -1
  55. package/dist/component/style/article.css +143 -0
  56. package/dist/component/style/article.css.vanilla.js +6 -0
  57. package/dist/component/style/article.css.vanilla.js.map +1 -0
  58. package/dist/component/style/index.js +3 -0
  59. package/dist/component/style/index.js.map +1 -0
  60. package/dist/hook/accessibility/keyboard/Keyboard.js +7 -2
  61. package/dist/hook/accessibility/keyboard/Keyboard.js.map +1 -1
  62. package/dist/hook/accessibility/keyboard/Roving.js +1 -0
  63. package/dist/hook/accessibility/keyboard/Roving.js.map +1 -1
  64. package/dist/hook/accessibility/keyboard/hook/useLastFocused.js +1 -0
  65. package/dist/hook/accessibility/keyboard/hook/useLastFocused.js.map +1 -1
  66. package/dist/hook/accessibility/keyboard/hook/useMoveFocus.js.map +1 -1
  67. package/dist/hook/accessibility/keyboard/hook/useNavigate.js +2 -4
  68. package/dist/hook/accessibility/keyboard/hook/useNavigate.js.map +1 -1
  69. package/dist/hook/accessibility/keyboard/resolve.js +1 -0
  70. package/dist/hook/accessibility/keyboard/resolve.js.map +1 -1
  71. package/dist/hook/accessibility/keyboard/sort.js +1 -1
  72. package/dist/hook/accessibility/keyboard/sort.js.map +1 -1
  73. package/dist/hook/accessibility/keyboard/tree.js +1 -0
  74. package/dist/hook/accessibility/keyboard/tree.js.map +1 -1
  75. package/dist/hook/accessibility/keyboard/useController.js +1 -0
  76. package/dist/hook/accessibility/keyboard/useController.js.map +1 -1
  77. package/dist/hook/accessibility/keyboard/useKeyboard.js +1 -0
  78. package/dist/hook/accessibility/keyboard/useKeyboard.js.map +1 -1
  79. package/dist/hook/document/useHighlight.js +1 -1
  80. package/dist/hook/document/useHighlight.js.map +1 -1
  81. package/dist/hook/form/useAutoComplete.js +1 -3
  82. package/dist/hook/form/useAutoComplete.js.map +1 -1
  83. package/dist/hook/form/useCheckbox.js +1 -0
  84. package/dist/hook/form/useCheckbox.js.map +1 -1
  85. package/dist/hook/form/useChecked.js +1 -0
  86. package/dist/hook/form/useChecked.js.map +1 -1
  87. package/dist/hook/form/useDefault.js +2 -0
  88. package/dist/hook/form/useDefault.js.map +1 -1
  89. package/dist/hook/form/useForm.js +2 -1
  90. package/dist/hook/form/useForm.js.map +1 -1
  91. package/dist/hook/form/useGroup.js +1 -0
  92. package/dist/hook/form/useGroup.js.map +1 -1
  93. package/dist/hook/form/useOption.js +1 -0
  94. package/dist/hook/form/useOption.js.map +1 -1
  95. package/dist/hook/form/useRadio.js +1 -0
  96. package/dist/hook/form/useRadio.js.map +1 -1
  97. package/dist/hook/form/useSelect.js +1 -0
  98. package/dist/hook/form/useSelect.js.map +1 -1
  99. package/dist/hook/form/useValue.js +1 -0
  100. package/dist/hook/form/useValue.js.map +1 -1
  101. package/dist/hook/popover/useAnchorPositioning.js +1 -0
  102. package/dist/hook/popover/useAnchorPositioning.js.map +1 -1
  103. package/dist/hook/popover/useDialog.js +1 -0
  104. package/dist/hook/popover/useDialog.js.map +1 -1
  105. package/dist/hook/popover/useLightDismiss.js +1 -1
  106. package/dist/hook/popover/useLightDismiss.js.map +1 -1
  107. package/dist/hook/popover/useOverlay.js +1 -0
  108. package/dist/hook/popover/useOverlay.js.map +1 -1
  109. package/dist/hook/popover/usePopover.js +6 -2
  110. package/dist/hook/popover/usePopover.js.map +1 -1
  111. package/dist/hook/popover/usePositioning.js +1 -0
  112. package/dist/hook/popover/usePositioning.js.map +1 -1
  113. package/dist/hook/popover/useTooltip.js +2 -1
  114. package/dist/hook/popover/useTooltip.js.map +1 -1
  115. package/dist/hook/react/refValue.js +1 -0
  116. package/dist/hook/react/refValue.js.map +1 -1
  117. package/dist/hook/react/useActivate.js +1 -1
  118. package/dist/hook/react/useActivate.js.map +1 -1
  119. package/dist/hook/react/useInteractive.js +1 -0
  120. package/dist/hook/react/useInteractive.js.map +1 -1
  121. package/dist/hook/react/useUniqueId.js +3 -2
  122. package/dist/hook/react/useUniqueId.js.map +1 -1
  123. package/dist/index.js +5 -1
  124. package/dist/index.js.map +1 -1
  125. package/dist/infra/logging/logger.js +10 -12
  126. package/dist/infra/logging/logger.js.map +1 -1
  127. package/dist/theme/defineTheme.js +1 -0
  128. package/dist/theme/defineTheme.js.map +1 -1
  129. package/dist/theme/global.css +7 -7
  130. package/dist/theme/global.css.vanilla.js +8 -8
  131. package/dist/theme/theme.css +23 -27
  132. package/dist/theme/theme.css.vanilla.js +1 -1
  133. package/dist/util/document/accessibility.css.vanilla.js +4 -4
  134. package/dist/util/index.js +4 -1
  135. package/dist/util/index.js.map +1 -1
  136. package/dist/util/random/generateDeterministicId.js +12 -0
  137. package/dist/util/random/generateDeterministicId.js.map +1 -0
  138. package/dist/util/random/generateDigest.js +12 -0
  139. package/dist/util/random/generateDigest.js.map +1 -0
  140. package/dist/util/random/generateUniqueId.js +9 -0
  141. package/dist/util/random/generateUniqueId.js.map +1 -0
  142. package/dist/util/random/index.js +4 -1
  143. package/dist/util/random/index.js.map +1 -1
  144. package/dist/util/random/toHex.js +10 -0
  145. package/dist/util/random/toHex.js.map +1 -0
  146. package/package.json +77 -80
  147. package/src/component/button/style/index.css.ts +1 -1
  148. package/src/component/checkbox/Checkbox.tsx +1 -1
  149. package/src/component/checkbox/style/index.css.ts +34 -25
  150. package/src/component/index.ts +1 -0
  151. package/src/component/input/style/index.css.ts +42 -41
  152. package/src/component/popover/style/index.css.ts +100 -103
  153. package/src/component/select/Group.tsx +11 -3
  154. package/src/component/select/style/index.css.ts +59 -53
  155. package/src/component/style/article.css.ts +189 -0
  156. package/src/component/style/index.ts +1 -0
  157. package/src/hook/accessibility/keyboard/Keyboard.tsx +6 -1
  158. package/src/hook/accessibility/keyboard/hook/useMoveFocus.ts +2 -0
  159. package/src/hook/accessibility/keyboard/hook/useNavigate.ts +5 -5
  160. package/src/hook/accessibility/keyboard/sort.ts +1 -1
  161. package/src/hook/document/useHighlight.ts +1 -27
  162. package/src/hook/form/useAutoComplete.ts +3 -3
  163. package/src/hook/form/useDefault.ts +2 -0
  164. package/src/hook/form/useForm.ts +2 -2
  165. package/src/hook/popover/useLightDismiss.ts +1 -1
  166. package/src/hook/popover/usePopover.ts +6 -12
  167. package/src/hook/popover/useTooltip.ts +2 -1
  168. package/src/hook/react/useActivate.ts +1 -1
  169. package/src/hook/react/useUniqueId.ts +2 -2
  170. package/src/infra/logging/logger.ts +26 -13
  171. package/src/theme/global.css.ts +2 -2
  172. package/src/theme/theme.css.ts +1 -5
  173. package/src/util/document/accessibility.css.ts +3 -3
  174. package/src/util/random/generateDeterministicId.ts +10 -0
  175. package/src/util/random/generateDigest.ts +11 -0
  176. package/src/util/random/{createUniqueId.ts → generateUniqueId.ts} +4 -6
  177. package/src/util/random/index.ts +4 -1
  178. package/src/util/random/toHex.ts +6 -0
  179. package/dist/util/random/createUniqueId.js +0 -8
  180. package/dist/util/random/createUniqueId.js.map +0 -1
  181. package/src/component/style/font/font.css +0 -23
  182. package/src/component/style/font/proxima-nova-bold.woff +0 -0
  183. package/src/component/style/font/proxima-nova-light.woff +0 -0
  184. package/src/component/style/font/proxima-nova-regular.woff +0 -0
  185. package/src/component/style/font/proxima-nova-semibold.woff +0 -0
  186. package/src/component/style/press.module.css +0 -204
package/package.json CHANGED
@@ -1,31 +1,27 @@
1
1
  {
2
2
  "name": "chiplet",
3
- "version": "0.3.0-dev.3",
3
+ "version": "0.3.0-dev.4",
4
4
  "description": "React component, hook, and utility library.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "imports": {
8
8
  "#.storybook/preview": "./.storybook/preview.tsx",
9
+ "#.mock/*": "./test/.mock/*.ts",
9
10
  "#test": "./test/index.ts",
10
11
  "#component": "./src/component/index.ts",
11
12
  "#hook": "./src/hook/index.ts",
12
13
  "#infra": "./src/infra/index.ts",
13
14
  "#theme": "./src/theme/index.ts",
14
15
  "#util": "./src/util/index.ts",
15
- "#*": {
16
- "types": [
17
- "./src/*/index.ts",
18
- "./src/*/index.tsx",
19
- "./src/*.ts",
20
- "./src/*.tsx",
21
- "./src/*"
22
- ],
23
- "default": [
24
- "./src/*"
25
- ]
26
- }
16
+ "#*": [
17
+ "./src/*",
18
+ "./src/*.ts",
19
+ "./src/*.tsx",
20
+ "./src/*/index.ts"
21
+ ]
27
22
  },
28
23
  "exports": {
24
+ "./package.json": "./package.json",
29
25
  ".": {
30
26
  "types": "./src/index.ts",
31
27
  "default": "./dist/index.js"
@@ -40,85 +36,85 @@
40
36
  "./src"
41
37
  ],
42
38
  "dependencies": {
43
- "@floating-ui/dom": "^1.7.5",
44
- "@floating-ui/utils": "^0.2.10",
45
- "@opentelemetry/api": "^1.9.0",
46
- "@opentelemetry/api-logs": "^0.211.0",
47
- "@opentelemetry/auto-instrumentations-web": "^0.56.0",
48
- "@opentelemetry/exporter-logs-otlp-http": "^0.211.0",
49
- "@opentelemetry/exporter-metrics-otlp-http": "^0.211.0",
50
- "@opentelemetry/exporter-trace-otlp-http": "^0.211.0",
51
- "@opentelemetry/instrumentation": "^0.211.0",
52
- "@opentelemetry/instrumentation-long-task": "^0.55.0",
53
- "@opentelemetry/instrumentation-web-exception": "^0.4.0",
54
- "@opentelemetry/opentelemetry-browser-detector": "^0.211.0",
55
- "@opentelemetry/resources": "^2.5.0",
56
- "@opentelemetry/sdk-logs": "^0.211.0",
57
- "@opentelemetry/sdk-metrics": "^2.5.0",
58
- "@opentelemetry/sdk-trace-web": "^2.5.0",
59
- "@opentelemetry/semantic-conventions": "^1.39.0",
39
+ "@floating-ui/dom": "^1.7.6",
40
+ "@floating-ui/utils": "^0.2.11",
41
+ "@opentelemetry/api": "^1.9.1",
42
+ "@opentelemetry/api-logs": "^0.214.0",
43
+ "@opentelemetry/auto-instrumentations-web": "^0.59.0",
44
+ "@opentelemetry/exporter-logs-otlp-http": "^0.214.0",
45
+ "@opentelemetry/exporter-metrics-otlp-http": "^0.214.0",
46
+ "@opentelemetry/exporter-trace-otlp-http": "^0.214.0",
47
+ "@opentelemetry/instrumentation": "^0.214.0",
48
+ "@opentelemetry/instrumentation-long-task": "^0.58.0",
49
+ "@opentelemetry/instrumentation-web-exception": "^0.7.0",
50
+ "@opentelemetry/opentelemetry-browser-detector": "^0.214.0",
51
+ "@opentelemetry/resources": "^2.6.1",
52
+ "@opentelemetry/sdk-logs": "^0.214.0",
53
+ "@opentelemetry/sdk-metrics": "^2.6.1",
54
+ "@opentelemetry/sdk-trace-web": "^2.6.1",
55
+ "@opentelemetry/semantic-conventions": "^1.40.0",
60
56
  "@vanilla-extract/recipes": "^0.5.7",
61
57
  "clsx": "^2.1.1",
62
- "lodash-es": "^4.17.23",
58
+ "lodash-es": "^4.18.1",
63
59
  "rxjs": "^7.8.2",
64
60
  "symbol-observable": "^4.0.0",
65
61
  "tiny-invariant": "^1.3.3"
66
62
  },
67
63
  "devDependencies": {
68
- "@commitlint/cli": "^20.4.1",
69
- "@commitlint/config-conventional": "^20.4.1",
70
- "@commitlint/types": "^20.4.0",
64
+ "@commitlint/cli": "^20.5.0",
65
+ "@commitlint/config-conventional": "^20.5.0",
66
+ "@commitlint/types": "^20.5.0",
71
67
  "@csstools/postcss-light-dark-function": "^3.0.0",
72
- "@csstools/postcss-relative-color-syntax": "^4.0.1",
73
- "@eslint/js": "^9.39.2",
74
- "@rollup/plugin-babel": "^6.1.0",
75
- "@rollup/plugin-commonjs": "^29.0.0",
68
+ "@csstools/postcss-relative-color-syntax": "^4.0.2",
69
+ "@eslint/js": "^10.0.1",
70
+ "@rollup/plugin-babel": "^7.0.0",
71
+ "@rollup/plugin-commonjs": "^29.0.2",
76
72
  "@rollup/plugin-node-resolve": "^16.0.3",
77
73
  "@semantic-release/changelog": "^6.0.3",
78
74
  "@semantic-release/git": "^10.0.1",
79
- "@semantic-release/npm": "^13.1.4",
80
- "@storybook/addon-a11y": "^10.2.8",
81
- "@storybook/addon-docs": "^10.2.8",
82
- "@storybook/addon-links": "^10.2.8",
83
- "@storybook/addon-themes": "^10.2.8",
84
- "@storybook/addon-vitest": "^10.2.8",
85
- "@storybook/react-vite": "^10.2.8",
75
+ "@semantic-release/npm": "^13.1.5",
76
+ "@storybook/addon-a11y": "^10.3.4",
77
+ "@storybook/addon-docs": "^10.3.4",
78
+ "@storybook/addon-links": "^10.3.4",
79
+ "@storybook/addon-themes": "^10.3.4",
80
+ "@storybook/addon-vitest": "^10.3.4",
81
+ "@storybook/react-vite": "^10.3.4",
86
82
  "@svgr/rollup": "^8.1.0",
87
- "@tailwindcss/postcss": "^4.1.18",
83
+ "@tailwindcss/postcss": "^4.2.2",
88
84
  "@testing-library/jest-dom": "^6.9.1",
89
85
  "@testing-library/react": "^16.3.2",
90
86
  "@testing-library/user-event": "^14.6.1",
91
87
  "@types/lodash-es": "^4.17.12",
92
88
  "@types/mime-types": "^3.0.1",
93
- "@types/node": "^24.10.12",
94
- "@types/react": "^19.2.13",
89
+ "@types/node": "^24.12.2",
90
+ "@types/react": "^19.2.14",
95
91
  "@types/react-dom": "^19.2.3",
96
- "@typescript/native-preview": "7.0.0-dev.20260207.1",
97
- "@vanilla-extract/css": "^1.18.0",
98
- "@vanilla-extract/rollup-plugin": "^1.5.1",
99
- "@vanilla-extract/vite-plugin": "^5.1.4",
100
- "@vitejs/plugin-legacy": "^7.2.1",
101
- "@vitejs/plugin-react": "^5.1.4",
102
- "@vitest/browser-playwright": "^4.0.18",
103
- "@vitest/coverage-istanbul": "^4.0.18",
104
- "babel-plugin-formatjs": "^11.2.3",
92
+ "@typescript/native-preview": "7.0.0-dev.20260406.1",
93
+ "@vanilla-extract/css": "^1.20.1",
94
+ "@vanilla-extract/rollup-plugin": "^1.5.3",
95
+ "@vanilla-extract/vite-plugin": "^5.2.2",
96
+ "@vitejs/plugin-legacy": "^8.0.1",
97
+ "@vitejs/plugin-react": "^6.0.1",
98
+ "@vitest/browser-playwright": "^4.1.2",
99
+ "@vitest/coverage-istanbul": "^4.1.2",
100
+ "babel-plugin-formatjs": "^11.3.2",
105
101
  "babel-plugin-react-compiler": "^1.0.0",
106
102
  "clsx": "^2.1.1",
107
103
  "colorjs.io": "^0.6.1",
108
104
  "csstype": "^3.2.3",
109
- "eslint": "^9.39.2",
105
+ "eslint": "^10.2.0",
110
106
  "eslint-plugin-import": "^2.32.0",
111
107
  "eslint-plugin-jsx-a11y": "^6.10.2",
112
108
  "eslint-plugin-react": "^7.37.5",
113
109
  "eslint-plugin-react-hooks": "^7.0.1",
114
- "eslint-plugin-react-refresh": "^0.5.0",
115
- "globals": "^17.3.0",
110
+ "eslint-plugin-react-refresh": "^0.5.2",
111
+ "globals": "^17.4.0",
116
112
  "husky": "^9.1.7",
117
- "jsdom": "^28.0.0",
118
- "lint-staged": "^16.2.7",
113
+ "jsdom": "^29.0.1",
114
+ "lint-staged": "^16.4.0",
119
115
  "mime-types": "^3.0.2",
120
- "playwright": "^1.58.2",
121
- "postcss": "^8.5.6",
116
+ "playwright": "^1.59.1",
117
+ "postcss": "^8.5.8",
122
118
  "postcss-html": "^1.8.1",
123
119
  "postcss-scss": "^4.0.9",
124
120
  "postcss-styled-syntax": "^0.7.1",
@@ -129,30 +125,31 @@
129
125
  "remark-frontmatter": "^5.0.0",
130
126
  "remark-gfm": "^4.0.1",
131
127
  "remark-mdx-frontmatter": "^5.2.0",
132
- "rimraf": "^6.1.2",
133
- "rollup": "^4.57.1",
128
+ "rimraf": "^6.1.3",
129
+ "rollup": "^4.60.1",
134
130
  "rollup-plugin-esbuild": "^6.2.1",
135
131
  "rollup-plugin-node-externals": "^8.1.2",
136
- "rollup-plugin-visualizer": "^6.0.5",
132
+ "rollup-plugin-visualizer": "^7.0.1",
137
133
  "rollup-preserve-directives": "^1.1.3",
138
134
  "semantic-release": "^25.0.3",
139
135
  "sort-package-json": "^3.6.1",
140
- "storybook": "^10.2.8",
141
- "stylelint": "^17.1.1",
142
- "stylelint-config-recess-order": "^7.6.1",
136
+ "storybook": "^10.3.4",
137
+ "stylelint": "^17.6.0",
138
+ "stylelint-config-recess-order": "^7.7.0",
143
139
  "stylelint-config-standard": "^40.0.0",
144
- "stylelint-plugin-logical-css": "^1.3.0",
145
- "tailwindcss": "^4.1.18",
140
+ "stylelint-plugin-logical-css": "^2.1.0",
141
+ "tailwindcss": "^4.2.2",
146
142
  "ts-node": "^10.9.2",
147
143
  "tslib": "^2.8.1",
148
- "type-fest": "^5.4.4",
149
- "typescript": "6.0.0-dev.20260101",
150
- "typescript-eslint": "^8.55.0",
151
- "vite": "^7.3.1",
152
- "vitest": "^4.0.18"
144
+ "type-fest": "^5.5.0",
145
+ "typedoc": "^0.28.18",
146
+ "typescript": "^6.0.2",
147
+ "typescript-eslint": "^8.58.0",
148
+ "vite": "^8.0.5",
149
+ "vitest": "^4.1.2"
153
150
  },
154
151
  "peerDependencies": {
155
- "@vanilla-extract/css": "^1.18.0",
152
+ "@vanilla-extract/css": "^1.20.1",
156
153
  "react": "^19.2.4",
157
154
  "react-dom": "^19.2.4",
158
155
  "tslib": "^2.8.1"
@@ -161,8 +158,8 @@
161
158
  "node": ">=24.11"
162
159
  },
163
160
  "scripts": {
164
- "build": "rimraf dist && rollup -c && storybook build",
165
- "clean": "rimraf -g **/{dist,tsconfig.tsbuildinfo,storybook-static,coverage,test-results,__screenshots__}",
161
+ "build": "pnpm -r build && rimraf dist && rollup -c && storybook build && typedoc src --out typedoc-generated",
162
+ "clean": "pnpm -r clean && rimraf -g **/{dist,.tsbuildinfo,storybook-static,typedoc-generated,coverage,test-results,__screenshots__}",
166
163
  "dev": "storybook dev -p 6006",
167
164
  "format": "stylelint --fix '**/*.{css,scss,js,jsx,ts,tsx,html,vue}' && eslint --fix . && prettier --write .",
168
165
  "lint": "stylelint '**/*.{css,scss,js,jsx,ts,tsx,html,vue}' && eslint . && prettier --check .",
@@ -27,11 +27,11 @@ const backgroundHover = createVar()
27
27
  const backgroundActive = createVar()
28
28
  const backgroundDisabled = createVar()
29
29
  const border = createVar()
30
- const borderSize = createVar()
31
30
  const borderColor = createVar()
32
31
  const borderColorHover = createVar()
33
32
  const borderColorActive = createVar()
34
33
  const borderColorDisabled = createVar()
34
+ const borderSize = createVar()
35
35
  const shadow = createVar()
36
36
  const shadowDisabled = createVar()
37
37
  const transition = createVar()
@@ -46,7 +46,7 @@ export function Checkbox(props: CheckboxProps) {
46
46
  const ref = useRefObject(attrs.ref)
47
47
 
48
48
  useLayoutEffect(() => {
49
- /* istanbul ignore else -- @preserve */
49
+ /* istanbul ignore else */
50
50
  if (ref.current) {
51
51
  // When a checkbox has both `indeterminate` and `checked` set to true,
52
52
  // only the `indeterminate` state will be activated in Chromium browser.
@@ -7,12 +7,12 @@ import {
7
7
  } from '@vanilla-extract/css'
8
8
  import { recipe } from '@vanilla-extract/recipes'
9
9
 
10
+ const outset = createVar()
10
11
  const gap = createVar()
11
12
  const width = createVar()
12
13
  const height = createVar()
13
- const margin = createVar()
14
- const padding = createVar()
15
14
  const size = createVar()
15
+ const padding = createVar()
16
16
  const color = createVar()
17
17
  const colorHover = createVar()
18
18
  const colorActive = createVar()
@@ -27,9 +27,10 @@ const backgroundChecked = createVar()
27
27
  const backgroundDisabled = createVar()
28
28
  const scale = createVar()
29
29
  const scaleActive = createVar()
30
+ const scaleDisabled = createVar()
31
+ const translate = createVar()
32
+ const translateChecked = createVar()
30
33
  const transition = createVar()
31
- const offset = createVar()
32
- const offsetChecked = createVar()
33
34
 
34
35
  export const CheckboxGroupStyle = style({
35
36
  vars: {
@@ -83,16 +84,16 @@ export const CheckboxStyle = recipe({
83
84
  outlineOffset: theme.checkbox.outline,
84
85
  transition,
85
86
  selectors: {
86
- // https://larsmagnus.co/blog/focus-visible-within-the-missing-pseudo-class#using-has-to-emulate-focus-visible-within
87
- '&:has(:focus-visible)': {
88
- outline: theme.outline,
89
- },
90
87
  // https://kizu.dev/label-to-input/
91
- '&:has(:focus-visible, :hover)': {
88
+ '&:has(:hover, :focus-visible)': {
92
89
  vars: {
93
90
  [color]: colorHover,
94
91
  },
95
92
  },
93
+ // https://larsmagnus.co/blog/focus-visible-within-the-missing-pseudo-class#using-has-to-emulate-focus-visible-within
94
+ '&:has(:focus-visible)': {
95
+ outline: theme.outline,
96
+ },
96
97
  '&:has(:active)': {
97
98
  vars: {
98
99
  [color]: colorActive,
@@ -103,7 +104,7 @@ export const CheckboxStyle = recipe({
103
104
  [color]: colorChecked,
104
105
  },
105
106
  },
106
- '&:has(:indeterminate, :checked):where(:has(:focus-visible, :hover))': {
107
+ '&:has(:indeterminate, :checked):where(:has(:hover, :focus-visible))': {
107
108
  vars: {
108
109
  [color]: colorCheckedHover,
109
110
  },
@@ -125,19 +126,19 @@ export const CheckboxStyle = recipe({
125
126
  size: {
126
127
  small: {
127
128
  vars: {
128
- [margin]: theme.checkbox.margin,
129
+ [outset]: theme.checkbox.outset,
129
130
  [size]: theme.checkbox.size.small,
130
131
  },
131
132
  },
132
133
  medium: {
133
134
  vars: {
134
- [margin]: theme.checkbox.margin,
135
+ [outset]: theme.checkbox.outset,
135
136
  [size]: theme.checkbox.size.medium,
136
137
  },
137
138
  },
138
139
  large: {
139
140
  vars: {
140
- [margin]: theme.checkbox.margin,
141
+ [outset]: theme.checkbox.outset,
141
142
  [size]: theme.checkbox.size.large,
142
143
  },
143
144
  },
@@ -147,7 +148,7 @@ export const CheckboxStyle = recipe({
147
148
 
148
149
  globalStyle(`${CheckboxStyle.classNames.base} > input`, {
149
150
  position: 'absolute',
150
- inset: `calc(-1 * ${margin})`,
151
+ inset: `calc(-1 * ${outset})`,
151
152
  margin: '0',
152
153
  appearance: 'none',
153
154
  cursor: 'inherit',
@@ -227,13 +228,20 @@ export const SwitchStyle = recipe({
227
228
  [backgroundDisabled]: theme.disabled.background,
228
229
  [scale]: '1',
229
230
  [scaleActive]: '1.25',
231
+ [scaleDisabled]: '1',
232
+ [translate]: padding,
233
+ [translateChecked]: `calc(${width} - ${size} * ${scale} - ${padding})`,
230
234
  [transition]: theme.switch.transition,
231
- [offset]: padding,
232
- [offsetChecked]: `calc(100% - ${size} * ${scale} - ${padding})`,
233
235
  },
234
236
  position: 'relative',
237
+ boxSizing: 'border-box',
238
+ display: 'inline-flex',
239
+ flexShrink: '0',
240
+ placeContent: 'center',
241
+ placeItems: 'center',
235
242
  inlineSize: width,
236
243
  blockSize: height,
244
+ padding,
237
245
  color,
238
246
  cursor,
239
247
  outlineOffset: theme.switch.outline,
@@ -242,14 +250,14 @@ export const SwitchStyle = recipe({
242
250
  transition,
243
251
  '::after': {
244
252
  position: 'absolute',
245
- insetBlockStart: padding,
246
- insetInlineStart: offset,
253
+ insetInlineStart: '0',
247
254
  inlineSize: `calc(${size} * ${scale})`,
248
255
  blockSize: size,
249
256
  pointerEvents: 'none',
250
257
  content: '',
251
258
  background: 'currentcolor',
252
- borderRadius: size,
259
+ borderRadius: 'inherit',
260
+ translate,
253
261
  transition: 'inherit',
254
262
  },
255
263
  selectors: {
@@ -265,14 +273,15 @@ export const SwitchStyle = recipe({
265
273
  vars: {
266
274
  [color]: colorChecked,
267
275
  [background]: backgroundChecked,
268
- [offset]: offsetChecked,
276
+ [translate]: translateChecked,
269
277
  },
270
278
  },
271
279
  '&:has(:disabled)': {
272
280
  vars: {
273
281
  [color]: colorDisabled,
274
- [background]: backgroundDisabled,
275
282
  [cursor]: cursorDisabled,
283
+ [background]: backgroundDisabled,
284
+ [scale]: scaleDisabled,
276
285
  },
277
286
  },
278
287
  },
@@ -281,26 +290,26 @@ export const SwitchStyle = recipe({
281
290
  size: {
282
291
  small: {
283
292
  vars: {
293
+ [outset]: theme.switch.outset,
284
294
  [width]: theme.switch.width.small,
285
295
  [height]: theme.switch.height.small,
286
296
  [padding]: theme.switch.padding.small,
287
- [margin]: theme.switch.outset,
288
297
  },
289
298
  },
290
299
  medium: {
291
300
  vars: {
301
+ [outset]: theme.switch.outset,
292
302
  [width]: theme.switch.width.medium,
293
303
  [height]: theme.switch.height.medium,
294
304
  [padding]: theme.switch.padding.medium,
295
- [margin]: theme.switch.outset,
296
305
  },
297
306
  },
298
307
  large: {
299
308
  vars: {
309
+ [outset]: theme.switch.outset,
300
310
  [width]: theme.switch.width.large,
301
311
  [height]: theme.switch.height.large,
302
312
  [padding]: theme.switch.padding.large,
303
- [margin]: theme.switch.outset,
304
313
  },
305
314
  },
306
315
  },
@@ -309,7 +318,7 @@ export const SwitchStyle = recipe({
309
318
 
310
319
  export const SwitchInputStyle = style({
311
320
  position: 'absolute',
312
- inset: `calc(-1 * ${margin})`,
321
+ inset: `calc(-1 * ${outset})`,
313
322
  margin: '0',
314
323
  appearance: 'none',
315
324
  cursor: 'inherit',
@@ -1,5 +1,6 @@
1
1
  export * from './icon'
2
2
  export * from './popover'
3
+ export * from './style'
3
4
  export * from './typography'
4
5
 
5
6
  export * from './button'
@@ -1,4 +1,4 @@
1
- import { stretch, theme } from '#theme'
1
+ import { radiusVar, SquircleStyle, stretch, theme } from '#theme'
2
2
  import { createVar, globalStyle, style } from '@vanilla-extract/css'
3
3
  import { recipe } from '@vanilla-extract/recipes'
4
4
 
@@ -19,52 +19,53 @@ const borderColorHover = createVar()
19
19
  const borderColorFocus = createVar()
20
20
  const borderColorDisabled = createVar()
21
21
  const borderSize = createVar()
22
- const radius = createVar()
23
22
  const placeholder = createVar()
24
23
  const before = createVar()
25
24
  const after = createVar()
26
25
 
27
26
  export const InputStyle = recipe({
28
- base: {
29
- vars: {
30
- [border]: `${borderSize} solid`,
31
- [placeholder]: theme.input.placeholder,
32
- [before]: theme.input.before,
33
- [after]: theme.input.after,
34
- },
35
- boxSizing: 'border-box',
36
- display: 'flex',
37
- placeItems: 'center',
38
- blockSize: height,
39
- font,
40
- color,
41
- background,
42
- border,
43
- borderColor,
44
- borderRadius: radius,
45
- ':hover': {
27
+ base: [
28
+ SquircleStyle,
29
+ {
46
30
  vars: {
47
- [background]: backgroundHover,
48
- [borderColor]: borderColorHover,
31
+ [border]: `${borderSize} solid`,
32
+ [placeholder]: theme.input.placeholder,
33
+ [before]: theme.input.before,
34
+ [after]: theme.input.after,
49
35
  },
50
- },
51
- ':focus-within': {
52
- vars: {
53
- [background]: backgroundFocus,
54
- [borderColor]: borderColorFocus,
36
+ boxSizing: 'border-box',
37
+ display: 'flex',
38
+ placeItems: 'center',
39
+ blockSize: height,
40
+ font,
41
+ color,
42
+ background,
43
+ border,
44
+ borderColor,
45
+ ':hover': {
46
+ vars: {
47
+ [background]: backgroundHover,
48
+ [borderColor]: borderColorHover,
49
+ },
55
50
  },
56
- },
57
- selectors: {
58
- '&:has(> input:disabled)': {
51
+ ':focus-within': {
59
52
  vars: {
60
- [color]: colorDisabled,
61
- [background]: backgroundDisabled,
62
- [borderColor]: borderColorDisabled,
63
- [placeholder]: color,
53
+ [background]: backgroundFocus,
54
+ [borderColor]: borderColorFocus,
55
+ },
56
+ },
57
+ selectors: {
58
+ '&:has(> input:disabled)': {
59
+ vars: {
60
+ [color]: colorDisabled,
61
+ [background]: backgroundDisabled,
62
+ [borderColor]: borderColorDisabled,
63
+ [placeholder]: color,
64
+ },
64
65
  },
65
66
  },
66
67
  },
67
- },
68
+ ],
68
69
  variants: {
69
70
  variant: {
70
71
  primary: {
@@ -103,9 +104,9 @@ export const InputStyle = recipe({
103
104
  [height]: theme.input.height.small,
104
105
  [padding]: theme.input.padding.small,
105
106
  [font]: theme.input.font.small,
106
- [borderSize]: theme.input.border.small,
107
- [radius]: theme.input.radius.small,
108
107
  [icon]: theme.icon.size.small,
108
+ [borderSize]: theme.input.border.small,
109
+ [radiusVar]: theme.input.radius.small,
109
110
  },
110
111
  },
111
112
  medium: {
@@ -114,9 +115,9 @@ export const InputStyle = recipe({
114
115
  [height]: theme.input.height.medium,
115
116
  [padding]: theme.input.padding.medium,
116
117
  [font]: theme.input.font.medium,
117
- [borderSize]: theme.input.border.medium,
118
- [radius]: theme.input.radius.medium,
119
118
  [icon]: theme.icon.size.medium,
119
+ [borderSize]: theme.input.border.medium,
120
+ [radiusVar]: theme.input.radius.medium,
120
121
  },
121
122
  },
122
123
  large: {
@@ -125,9 +126,9 @@ export const InputStyle = recipe({
125
126
  [height]: theme.input.height.large,
126
127
  [padding]: theme.input.padding.large,
127
128
  [font]: theme.input.font.large,
128
- [borderSize]: theme.input.border.large,
129
- [radius]: theme.input.radius.large,
130
129
  [icon]: theme.icon.size.large,
130
+ [borderSize]: theme.input.border.large,
131
+ [radiusVar]: theme.input.radius.large,
131
132
  },
132
133
  },
133
134
  },