@vinyasa/button 1.0.23 → 1.0.24
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/dist/cjs/button.cjs +5 -3
- package/dist/cjs/index.cjs +6 -4
- package/dist/esm/button.js +3 -1
- package/package.json +5 -5
package/dist/cjs/button.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
95 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
4
|
__webpack_require__.d(__webpack_exports__, {
|
|
5
5
|
a: ()=>ButtonIcon,
|
|
6
6
|
A: ()=>button_Button
|
|
7
7
|
});
|
|
8
8
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
9
|
+
const tokens_namespaceObject = require("@vinyasa/tokens");
|
|
9
10
|
const external_react_namespaceObject = require("react");
|
|
10
11
|
function toPrimitive(t, r) {
|
|
11
12
|
if ("object" != typeof t || !t) return t;
|
|
@@ -223,6 +224,7 @@ var __webpack_modules__ = {
|
|
|
223
224
|
"type",
|
|
224
225
|
"className"
|
|
225
226
|
]), [ref] = _rest;
|
|
227
|
+
const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
|
|
226
228
|
const classes = className ? `${Button_css_button({
|
|
227
229
|
variant,
|
|
228
230
|
size,
|
|
@@ -239,7 +241,7 @@ var __webpack_modules__ = {
|
|
|
239
241
|
...childArray.slice(hasLeadingIcon ? 1 : 0).filter((child)=>!isButtonIcon(child))
|
|
240
242
|
] : children;
|
|
241
243
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", _object_spread_props(_object_spread({
|
|
242
|
-
ref:
|
|
244
|
+
ref: themedRef,
|
|
243
245
|
type: type,
|
|
244
246
|
disabled: disabled || loading,
|
|
245
247
|
"aria-busy": loading || void 0,
|
|
@@ -290,7 +292,7 @@ function __webpack_require__(moduleId) {
|
|
|
290
292
|
var __webpack_exports__ = {};
|
|
291
293
|
(()=>{
|
|
292
294
|
__webpack_require__.r(__webpack_exports__);
|
|
293
|
-
var _Button__rspack_import_0 = __webpack_require__(
|
|
295
|
+
var _Button__rspack_import_0 = __webpack_require__(95);
|
|
294
296
|
const __rspack_default_export = _Button__rspack_import_0.A;
|
|
295
297
|
__webpack_require__.d(__webpack_exports__, {
|
|
296
298
|
ButtonIcon: ()=>_Button__rspack_import_0.a
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
|
|
3
|
+
95 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
4
4
|
__webpack_require__.d(__webpack_exports__, {
|
|
5
5
|
a: ()=>ButtonIcon,
|
|
6
6
|
A: ()=>button_Button
|
|
7
7
|
});
|
|
8
8
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
9
|
+
const tokens_namespaceObject = require("@vinyasa/tokens");
|
|
9
10
|
const external_react_namespaceObject = require("react");
|
|
10
11
|
function toPrimitive(t, r) {
|
|
11
12
|
if ("object" != typeof t || !t) return t;
|
|
@@ -223,6 +224,7 @@ var __webpack_modules__ = {
|
|
|
223
224
|
"type",
|
|
224
225
|
"className"
|
|
225
226
|
]), [ref] = _rest;
|
|
227
|
+
const themedRef = (0, tokens_namespaceObject.useThemedRef)(ref);
|
|
226
228
|
const classes = className ? `${Button_css_button({
|
|
227
229
|
variant,
|
|
228
230
|
size,
|
|
@@ -239,7 +241,7 @@ var __webpack_modules__ = {
|
|
|
239
241
|
...childArray.slice(hasLeadingIcon ? 1 : 0).filter((child)=>!isButtonIcon(child))
|
|
240
242
|
] : children;
|
|
241
243
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", _object_spread_props(_object_spread({
|
|
242
|
-
ref:
|
|
244
|
+
ref: themedRef,
|
|
243
245
|
type: type,
|
|
244
246
|
disabled: disabled || loading,
|
|
245
247
|
"aria-busy": loading || void 0,
|
|
@@ -252,7 +254,7 @@ var __webpack_modules__ = {
|
|
|
252
254
|
const button_Button = Button;
|
|
253
255
|
},
|
|
254
256
|
294 (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
255
|
-
var _Button__rspack_import_0 = __webpack_require__(
|
|
257
|
+
var _Button__rspack_import_0 = __webpack_require__(95);
|
|
256
258
|
const __rspack_default_export = _Button__rspack_import_0.A;
|
|
257
259
|
__webpack_require__.d(__webpack_exports__, {}, {
|
|
258
260
|
default: __rspack_default_export
|
|
@@ -298,7 +300,7 @@ var __webpack_exports__ = {};
|
|
|
298
300
|
(()=>{
|
|
299
301
|
__webpack_require__.r(__webpack_exports__);
|
|
300
302
|
var _components_button__rspack_import_0 = __webpack_require__(294);
|
|
301
|
-
var _components_button__rspack_import_1 = __webpack_require__(
|
|
303
|
+
var _components_button__rspack_import_1 = __webpack_require__(95);
|
|
302
304
|
__webpack_require__.d(__webpack_exports__, {
|
|
303
305
|
Button: ()=>_components_button__rspack_import_0["default"],
|
|
304
306
|
ButtonIcon: ()=>_components_button__rspack_import_1.a,
|
package/dist/esm/button.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import "./button.css";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useThemedRef } from "@vinyasa/tokens";
|
|
3
4
|
import { Children, forwardRef, isValidElement } from "react";
|
|
4
5
|
function toPrimitive(t, r) {
|
|
5
6
|
if ("object" != typeof t || !t) return t;
|
|
@@ -126,6 +127,7 @@ const ButtonIcon = ({ children })=>children;
|
|
|
126
127
|
ButtonIcon.displayName = 'ButtonIcon';
|
|
127
128
|
const isButtonIcon = (node)=>/*#__PURE__*/ isValidElement(node) && node.type === ButtonIcon;
|
|
128
129
|
const Button = /*#__PURE__*/ forwardRef(({ children, variant, size, radius, loading = false, disabled = false, type = 'button', className, ...rest }, ref)=>{
|
|
130
|
+
const themedRef = useThemedRef(ref);
|
|
129
131
|
const classes = className ? `${Button_css_button({
|
|
130
132
|
variant,
|
|
131
133
|
size,
|
|
@@ -142,7 +144,7 @@ const Button = /*#__PURE__*/ forwardRef(({ children, variant, size, radius, load
|
|
|
142
144
|
...childArray.slice(hasLeadingIcon ? 1 : 0).filter((child)=>!isButtonIcon(child))
|
|
143
145
|
] : children;
|
|
144
146
|
return /*#__PURE__*/ jsx("button", {
|
|
145
|
-
ref:
|
|
147
|
+
ref: themedRef,
|
|
146
148
|
type: type,
|
|
147
149
|
disabled: disabled || loading,
|
|
148
150
|
"aria-busy": loading || void 0,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vinyasa/button",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "^18.0.0 || ^19.0.0",
|
|
43
43
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
44
|
-
"@vinyasa/tokens": "^1.0.
|
|
44
|
+
"@vinyasa/tokens": "^1.0.24"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@rsbuild/plugin-react": "^2.1.0",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@vanilla-extract/vite-plugin": "^5.2.3",
|
|
55
55
|
"@vanilla-extract/webpack-plugin": "^2.3.27",
|
|
56
56
|
"typescript": "^5.7.3",
|
|
57
|
-
"@vinyasa/
|
|
58
|
-
"@vinyasa/
|
|
59
|
-
"@vinyasa/
|
|
57
|
+
"@vinyasa/icons": "1.0.24",
|
|
58
|
+
"@vinyasa/layout": "1.0.24",
|
|
59
|
+
"@vinyasa/tokens": "1.0.24"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "rslib build && node ../../scripts/postbuild-package.mjs",
|