@vinyasa/button 1.0.9 → 1.0.11

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.
@@ -1,286 +1,5 @@
1
1
  "use strict";
2
- var __webpack_modules__ = {
3
- 169 (module, __webpack_exports__, __webpack_require__) {
4
- var _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__(586);
5
- var _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
6
- var _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__(115);
7
- var _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
8
- var ___CSS_LOADER_EXPORT___ = _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
9
- ___CSS_LOADER_EXPORT___.push([
10
- module.id,
11
- `._1bwnrav0 {
12
- color: #fff;
13
- cursor: pointer;
14
- background-color: #111827;
15
- border: none;
16
- border-radius: 9999px;
17
- padding: .625rem 1rem;
18
- font-size: .875rem;
19
- font-weight: 600;
20
- line-height: 1;
21
- transition: transform .15s, opacity .15s;
22
- }
23
-
24
- ._1bwnrav0:hover {
25
- opacity: .92;
26
- }
27
-
28
- ._1bwnrav0:active {
29
- transform: translateY(1px);
30
- }
31
-
32
- ._1bwnrav0:focus-visible {
33
- outline-offset: 2px;
34
- outline: 2px solid #2563eb;
35
- }
36
- `,
37
- ""
38
- ]);
39
- const __rspack_default_export = ___CSS_LOADER_EXPORT___;
40
- __webpack_require__.d(__webpack_exports__, {}, {
41
- A: __rspack_default_export
42
- });
43
- },
44
- 115 (module) {
45
- module.exports = function(cssWithMappingToString) {
46
- var list = [];
47
- list.toString = function() {
48
- return this.map(function(item) {
49
- var content = "";
50
- var needLayer = void 0 !== item[5];
51
- if (item[4]) content += "@supports (".concat(item[4], ") {");
52
- if (item[2]) content += "@media ".concat(item[2], " {");
53
- if (needLayer) content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
54
- content += cssWithMappingToString(item);
55
- if (needLayer) content += "}";
56
- if (item[2]) content += "}";
57
- if (item[4]) content += "}";
58
- return content;
59
- }).join("");
60
- };
61
- list.i = function(modules, media, dedupe, supports, layer) {
62
- if ("string" == typeof modules) modules = [
63
- [
64
- null,
65
- modules,
66
- void 0
67
- ]
68
- ];
69
- var alreadyImportedModules = {};
70
- if (dedupe) for(var k = 0; k < this.length; k++){
71
- var id = this[k][0];
72
- if (null != id) alreadyImportedModules[id] = true;
73
- }
74
- for(var _k = 0; _k < modules.length; _k++){
75
- var item = [].concat(modules[_k]);
76
- if (!dedupe || !alreadyImportedModules[item[0]]) {
77
- if (void 0 !== layer) if (void 0 === item[5]) item[5] = layer;
78
- else {
79
- item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
80
- item[5] = layer;
81
- }
82
- if (media) if (item[2]) {
83
- item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
84
- item[2] = media;
85
- } else item[2] = media;
86
- if (supports) if (item[4]) {
87
- item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
88
- item[4] = supports;
89
- } else item[4] = "".concat(supports);
90
- list.push(item);
91
- }
92
- }
93
- };
94
- return list;
95
- };
96
- },
97
- 586 (module) {
98
- module.exports = function(i) {
99
- return i[1];
100
- };
101
- },
102
- 702 (module) {
103
- var stylesInDOM = [];
104
- function getIndexByIdentifier(identifier) {
105
- var result = -1;
106
- for(var i = 0; i < stylesInDOM.length; i++)if (stylesInDOM[i].identifier === identifier) {
107
- result = i;
108
- break;
109
- }
110
- return result;
111
- }
112
- function modulesToDom(list, options) {
113
- var idCountMap = {};
114
- var identifiers = [];
115
- for(var i = 0; i < list.length; i++){
116
- var item = list[i];
117
- var id = options.base ? item[0] + options.base : item[0];
118
- var count = idCountMap[id] || 0;
119
- var identifier = "".concat(id, " ").concat(count);
120
- idCountMap[id] = count + 1;
121
- var indexByIdentifier = getIndexByIdentifier(identifier);
122
- var obj = {
123
- css: item[1],
124
- media: item[2],
125
- sourceMap: item[3],
126
- supports: item[4],
127
- layer: item[5]
128
- };
129
- if (-1 !== indexByIdentifier) {
130
- stylesInDOM[indexByIdentifier].references++;
131
- stylesInDOM[indexByIdentifier].updater(obj);
132
- } else {
133
- var updater = addElementStyle(obj, options);
134
- options.byIndex = i;
135
- stylesInDOM.splice(i, 0, {
136
- identifier: identifier,
137
- updater: updater,
138
- references: 1
139
- });
140
- }
141
- identifiers.push(identifier);
142
- }
143
- return identifiers;
144
- }
145
- function addElementStyle(obj, options) {
146
- var api = options.domAPI(options);
147
- api.update(obj);
148
- var updater = function(newObj) {
149
- if (newObj) {
150
- if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) return;
151
- api.update(obj = newObj);
152
- } else api.remove();
153
- };
154
- return updater;
155
- }
156
- module.exports = function(list, options) {
157
- options = options || {};
158
- list = list || [];
159
- var lastIdentifiers = modulesToDom(list, options);
160
- return function(newList) {
161
- newList = newList || [];
162
- for(var i = 0; i < lastIdentifiers.length; i++){
163
- var identifier = lastIdentifiers[i];
164
- var index = getIndexByIdentifier(identifier);
165
- stylesInDOM[index].references--;
166
- }
167
- var newLastIdentifiers = modulesToDom(newList, options);
168
- for(var _i = 0; _i < lastIdentifiers.length; _i++){
169
- var _identifier = lastIdentifiers[_i];
170
- var _index = getIndexByIdentifier(_identifier);
171
- if (0 === stylesInDOM[_index].references) {
172
- stylesInDOM[_index].updater();
173
- stylesInDOM.splice(_index, 1);
174
- }
175
- }
176
- lastIdentifiers = newLastIdentifiers;
177
- };
178
- };
179
- },
180
- 149 (module) {
181
- var memo = {};
182
- function getTarget(target) {
183
- if (void 0 === memo[target]) {
184
- var styleTarget = document.querySelector(target);
185
- if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) try {
186
- styleTarget = styleTarget.contentDocument.head;
187
- } catch (e) {
188
- styleTarget = null;
189
- }
190
- memo[target] = styleTarget;
191
- }
192
- return memo[target];
193
- }
194
- function insertBySelector(insert, style) {
195
- var target = getTarget(insert);
196
- if (!target) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
197
- target.appendChild(style);
198
- }
199
- module.exports = insertBySelector;
200
- },
201
- 634 (module) {
202
- function insertStyleElement(options) {
203
- var element = document.createElement("style");
204
- options.setAttributes(element, options.attributes);
205
- options.insert(element, options.options);
206
- return element;
207
- }
208
- module.exports = insertStyleElement;
209
- },
210
- 390 (module, __unused_rspack_exports, __webpack_require__) {
211
- function setAttributesWithoutAttributes(styleElement) {
212
- var nonce = __webpack_require__.nc;
213
- if (nonce) styleElement.setAttribute("nonce", nonce);
214
- }
215
- module.exports = setAttributesWithoutAttributes;
216
- },
217
- 119 (module) {
218
- function apply(styleElement, options, obj) {
219
- var css = "";
220
- if (obj.supports) css += "@supports (".concat(obj.supports, ") {");
221
- if (obj.media) css += "@media ".concat(obj.media, " {");
222
- var needLayer = void 0 !== obj.layer;
223
- if (needLayer) css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
224
- css += obj.css;
225
- if (needLayer) css += "}";
226
- if (obj.media) css += "}";
227
- if (obj.supports) css += "}";
228
- var sourceMap = obj.sourceMap;
229
- if (sourceMap && "u" > typeof btoa) css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
230
- options.styleTagTransform(css, styleElement, options.options);
231
- }
232
- function removeStyleElement(styleElement) {
233
- if (null === styleElement.parentNode) return false;
234
- styleElement.parentNode.removeChild(styleElement);
235
- }
236
- function domAPI(options) {
237
- if ("u" < typeof document) return {
238
- update: function() {},
239
- remove: function() {}
240
- };
241
- var styleElement = options.insertStyleElement(options);
242
- return {
243
- update: function(obj) {
244
- apply(styleElement, options, obj);
245
- },
246
- remove: function() {
247
- removeStyleElement(styleElement);
248
- }
249
- };
250
- }
251
- module.exports = domAPI;
252
- },
253
- 999 (module) {
254
- function styleTagTransform(css, styleElement) {
255
- if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
256
- else {
257
- while(styleElement.firstChild)styleElement.removeChild(styleElement.firstChild);
258
- styleElement.appendChild(document.createTextNode(css));
259
- }
260
- }
261
- module.exports = styleTagTransform;
262
- }
263
- };
264
- var __webpack_module_cache__ = {};
265
- function __webpack_require__(moduleId) {
266
- var cachedModule = __webpack_module_cache__[moduleId];
267
- if (void 0 !== cachedModule) return cachedModule.exports;
268
- var module = __webpack_module_cache__[moduleId] = {
269
- id: moduleId,
270
- exports: {}
271
- };
272
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
273
- return module.exports;
274
- }
275
- (()=>{
276
- __webpack_require__.n = (module)=>{
277
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
278
- __webpack_require__.d(getter, {
279
- a: getter
280
- });
281
- return getter;
282
- };
283
- })();
2
+ var __webpack_require__ = {};
284
3
  (()=>{
285
4
  __webpack_require__.d = (exports1, getters, values)=>{
286
5
  var define = (defs, kind)=>{
@@ -306,47 +25,21 @@ function __webpack_require__(moduleId) {
306
25
  });
307
26
  };
308
27
  })();
309
- (()=>{
310
- __webpack_require__.nc = void 0;
311
- })();
312
28
  var __webpack_exports__ = {};
313
- (()=>{
314
- __webpack_require__.r(__webpack_exports__);
315
- __webpack_require__.d(__webpack_exports__, {
316
- Button: ()=>components_button,
317
- default: ()=>components_button
29
+ __webpack_require__.r(__webpack_exports__);
30
+ __webpack_require__.d(__webpack_exports__, {
31
+ Button: ()=>components_button,
32
+ default: ()=>components_button
33
+ });
34
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
35
+ require("react");
36
+ var Button_css_button = '_1bwnrav0';
37
+ const Button = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
38
+ className: Button_css_button,
39
+ children: "Button"
318
40
  });
319
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
320
- require("react");
321
- var injectStylesIntoStyleTag = __webpack_require__(702);
322
- var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
323
- var styleDomAPI = __webpack_require__(119);
324
- var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
325
- var insertBySelector = __webpack_require__(149);
326
- var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
327
- var setAttributesWithoutAttributes = __webpack_require__(390);
328
- var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
329
- var insertStyleElement = __webpack_require__(634);
330
- var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
331
- var styleTagTransform = __webpack_require__(999);
332
- var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
333
- var extracted = __webpack_require__(169);
334
- var options = {};
335
- options.styleTagTransform = styleTagTransform_default();
336
- options.setAttributes = setAttributesWithoutAttributes_default();
337
- options.insert = insertBySelector_default().bind(null, "head");
338
- options.domAPI = styleDomAPI_default();
339
- options.insertStyleElement = insertStyleElement_default();
340
- injectStylesIntoStyleTag_default()(extracted.A, options);
341
- extracted.A && extracted.A.locals && extracted.A.locals;
342
- var Button_css_button = '_1bwnrav0';
343
- const Button = ()=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("button", {
344
- className: Button_css_button,
345
- children: "Button"
346
- });
347
- const button_Button = Button;
348
- const components_button = button_Button;
349
- })();
41
+ const button_Button = Button;
42
+ const components_button = button_Button;
350
43
  exports.Button = __webpack_exports__.Button;
351
44
  exports["default"] = __webpack_exports__["default"];
352
45
  for(var __rspack_i in __webpack_exports__)if (-1 === [
@@ -0,0 +1,26 @@
1
+ ._1bwnrav0 {
2
+ color: #fff;
3
+ cursor: pointer;
4
+ background-color: #111827;
5
+ border: none;
6
+ border-radius: 9999px;
7
+ padding: .625rem 1rem;
8
+ font-size: .875rem;
9
+ font-weight: 600;
10
+ line-height: 1;
11
+ transition: transform .15s, opacity .15s;
12
+ }
13
+
14
+ ._1bwnrav0:hover {
15
+ opacity: .92;
16
+ }
17
+
18
+ ._1bwnrav0:active {
19
+ transform: translateY(1px);
20
+ }
21
+
22
+ ._1bwnrav0:focus-visible {
23
+ outline-offset: 2px;
24
+ outline: 2px solid #2563eb;
25
+ }
26
+
@@ -1,2 +1 @@
1
1
  export { default } from './components/button/Button';
2
- //# sourceMappingURL=Button.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare const button: string;
2
- //# sourceMappingURL=Button.css.d.ts.map
@@ -1,4 +1,3 @@
1
1
  import React from 'react';
2
2
  declare const Button: () => React.JSX.Element;
3
3
  export default Button;
4
- //# sourceMappingURL=Button.d.ts.map
@@ -1,3 +1,2 @@
1
1
  import Button from './Button';
2
2
  export default Button;
3
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,26 @@
1
+ ._1bwnrav0 {
2
+ color: #fff;
3
+ cursor: pointer;
4
+ background-color: #111827;
5
+ border: none;
6
+ border-radius: 9999px;
7
+ padding: .625rem 1rem;
8
+ font-size: .875rem;
9
+ font-weight: 600;
10
+ line-height: 1;
11
+ transition: transform .15s, opacity .15s;
12
+ }
13
+
14
+ ._1bwnrav0:hover {
15
+ opacity: .92;
16
+ }
17
+
18
+ ._1bwnrav0:active {
19
+ transform: translateY(1px);
20
+ }
21
+
22
+ ._1bwnrav0:focus-visible {
23
+ outline-offset: 2px;
24
+ outline: 2px solid #2563eb;
25
+ }
26
+
@@ -1,3 +1,2 @@
1
1
  export { default as Button } from './components/button';
2
2
  export { default } from './components/button';
3
- //# sourceMappingURL=index.d.ts.map
package/dist/esm/index.js CHANGED
@@ -1,333 +1,6 @@
1
+ import "./index.css";
1
2
  import { jsx } from "react/jsx-runtime";
2
3
  import "react";
3
- var __webpack_modules__ = {};
4
- var __webpack_module_cache__ = {};
5
- function __webpack_require__(moduleId) {
6
- var cachedModule = __webpack_module_cache__[moduleId];
7
- if (void 0 !== cachedModule) return cachedModule.exports;
8
- var module = __webpack_module_cache__[moduleId] = {
9
- id: moduleId,
10
- exports: {}
11
- };
12
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
13
- return module.exports;
14
- }
15
- __webpack_require__.m = __webpack_modules__;
16
- (()=>{
17
- __webpack_require__.n = (module)=>{
18
- var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
19
- __webpack_require__.d(getter, {
20
- a: getter
21
- });
22
- return getter;
23
- };
24
- })();
25
- (()=>{
26
- __webpack_require__.d = (exports, getters, values)=>{
27
- var define = (defs, kind)=>{
28
- for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) Object.defineProperty(exports, key, {
29
- enumerable: true,
30
- [kind]: defs[key]
31
- });
32
- };
33
- define(getters, "get");
34
- define(values, "value");
35
- };
36
- })();
37
- (()=>{
38
- __webpack_require__.add = function(modules) {
39
- Object.assign(__webpack_require__.m, modules);
40
- };
41
- })();
42
- (()=>{
43
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
44
- })();
45
- (()=>{
46
- __webpack_require__.nc = void 0;
47
- })();
48
- __webpack_require__.add({
49
- 169 (module, __webpack_exports__, __webpack_require__) {
50
- var _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0 = __webpack_require__(586);
51
- var _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0);
52
- var _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1 = __webpack_require__(115);
53
- var _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default = /*#__PURE__*/ __webpack_require__.n(_rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1);
54
- var ___CSS_LOADER_EXPORT___ = _rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_api_js__rspack_import_1_default()(_rsbuild_core_2_1_1_node_modules_rsbuild_core_compiled_css_loader_noSourceMaps_js__rspack_import_0_default());
55
- ___CSS_LOADER_EXPORT___.push([
56
- module.id,
57
- `._1bwnrav0 {
58
- color: #fff;
59
- cursor: pointer;
60
- background-color: #111827;
61
- border: none;
62
- border-radius: 9999px;
63
- padding: .625rem 1rem;
64
- font-size: .875rem;
65
- font-weight: 600;
66
- line-height: 1;
67
- transition: transform .15s, opacity .15s;
68
- }
69
-
70
- ._1bwnrav0:hover {
71
- opacity: .92;
72
- }
73
-
74
- ._1bwnrav0:active {
75
- transform: translateY(1px);
76
- }
77
-
78
- ._1bwnrav0:focus-visible {
79
- outline-offset: 2px;
80
- outline: 2px solid #2563eb;
81
- }
82
- `,
83
- ""
84
- ]);
85
- const __rspack_default_export = ___CSS_LOADER_EXPORT___;
86
- __webpack_require__.d(__webpack_exports__, {}, {
87
- A: __rspack_default_export
88
- });
89
- },
90
- 115 (module) {
91
- module.exports = function(cssWithMappingToString) {
92
- var list = [];
93
- list.toString = function() {
94
- return this.map(function(item) {
95
- var content = "";
96
- var needLayer = void 0 !== item[5];
97
- if (item[4]) content += "@supports (".concat(item[4], ") {");
98
- if (item[2]) content += "@media ".concat(item[2], " {");
99
- if (needLayer) content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
100
- content += cssWithMappingToString(item);
101
- if (needLayer) content += "}";
102
- if (item[2]) content += "}";
103
- if (item[4]) content += "}";
104
- return content;
105
- }).join("");
106
- };
107
- list.i = function(modules, media, dedupe, supports, layer) {
108
- if ("string" == typeof modules) modules = [
109
- [
110
- null,
111
- modules,
112
- void 0
113
- ]
114
- ];
115
- var alreadyImportedModules = {};
116
- if (dedupe) for(var k = 0; k < this.length; k++){
117
- var id = this[k][0];
118
- if (null != id) alreadyImportedModules[id] = true;
119
- }
120
- for(var _k = 0; _k < modules.length; _k++){
121
- var item = [].concat(modules[_k]);
122
- if (!dedupe || !alreadyImportedModules[item[0]]) {
123
- if (void 0 !== layer) if (void 0 === item[5]) item[5] = layer;
124
- else {
125
- item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
126
- item[5] = layer;
127
- }
128
- if (media) if (item[2]) {
129
- item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
130
- item[2] = media;
131
- } else item[2] = media;
132
- if (supports) if (item[4]) {
133
- item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
134
- item[4] = supports;
135
- } else item[4] = "".concat(supports);
136
- list.push(item);
137
- }
138
- }
139
- };
140
- return list;
141
- };
142
- },
143
- 586 (module) {
144
- module.exports = function(i) {
145
- return i[1];
146
- };
147
- },
148
- 702 (module) {
149
- var stylesInDOM = [];
150
- function getIndexByIdentifier(identifier) {
151
- var result = -1;
152
- for(var i = 0; i < stylesInDOM.length; i++)if (stylesInDOM[i].identifier === identifier) {
153
- result = i;
154
- break;
155
- }
156
- return result;
157
- }
158
- function modulesToDom(list, options) {
159
- var idCountMap = {};
160
- var identifiers = [];
161
- for(var i = 0; i < list.length; i++){
162
- var item = list[i];
163
- var id = options.base ? item[0] + options.base : item[0];
164
- var count = idCountMap[id] || 0;
165
- var identifier = "".concat(id, " ").concat(count);
166
- idCountMap[id] = count + 1;
167
- var indexByIdentifier = getIndexByIdentifier(identifier);
168
- var obj = {
169
- css: item[1],
170
- media: item[2],
171
- sourceMap: item[3],
172
- supports: item[4],
173
- layer: item[5]
174
- };
175
- if (-1 !== indexByIdentifier) {
176
- stylesInDOM[indexByIdentifier].references++;
177
- stylesInDOM[indexByIdentifier].updater(obj);
178
- } else {
179
- var updater = addElementStyle(obj, options);
180
- options.byIndex = i;
181
- stylesInDOM.splice(i, 0, {
182
- identifier: identifier,
183
- updater: updater,
184
- references: 1
185
- });
186
- }
187
- identifiers.push(identifier);
188
- }
189
- return identifiers;
190
- }
191
- function addElementStyle(obj, options) {
192
- var api = options.domAPI(options);
193
- api.update(obj);
194
- var updater = function(newObj) {
195
- if (newObj) {
196
- if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) return;
197
- api.update(obj = newObj);
198
- } else api.remove();
199
- };
200
- return updater;
201
- }
202
- module.exports = function(list, options) {
203
- options = options || {};
204
- list = list || [];
205
- var lastIdentifiers = modulesToDom(list, options);
206
- return function(newList) {
207
- newList = newList || [];
208
- for(var i = 0; i < lastIdentifiers.length; i++){
209
- var identifier = lastIdentifiers[i];
210
- var index = getIndexByIdentifier(identifier);
211
- stylesInDOM[index].references--;
212
- }
213
- var newLastIdentifiers = modulesToDom(newList, options);
214
- for(var _i = 0; _i < lastIdentifiers.length; _i++){
215
- var _identifier = lastIdentifiers[_i];
216
- var _index = getIndexByIdentifier(_identifier);
217
- if (0 === stylesInDOM[_index].references) {
218
- stylesInDOM[_index].updater();
219
- stylesInDOM.splice(_index, 1);
220
- }
221
- }
222
- lastIdentifiers = newLastIdentifiers;
223
- };
224
- };
225
- },
226
- 149 (module) {
227
- var memo = {};
228
- function getTarget(target) {
229
- if (void 0 === memo[target]) {
230
- var styleTarget = document.querySelector(target);
231
- if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) try {
232
- styleTarget = styleTarget.contentDocument.head;
233
- } catch (e) {
234
- styleTarget = null;
235
- }
236
- memo[target] = styleTarget;
237
- }
238
- return memo[target];
239
- }
240
- function insertBySelector(insert, style) {
241
- var target = getTarget(insert);
242
- if (!target) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
243
- target.appendChild(style);
244
- }
245
- module.exports = insertBySelector;
246
- },
247
- 634 (module) {
248
- function insertStyleElement(options) {
249
- var element = document.createElement("style");
250
- options.setAttributes(element, options.attributes);
251
- options.insert(element, options.options);
252
- return element;
253
- }
254
- module.exports = insertStyleElement;
255
- },
256
- 390 (module, __unused_rspack_exports, __webpack_require__) {
257
- function setAttributesWithoutAttributes(styleElement) {
258
- var nonce = __webpack_require__.nc;
259
- if (nonce) styleElement.setAttribute("nonce", nonce);
260
- }
261
- module.exports = setAttributesWithoutAttributes;
262
- },
263
- 119 (module) {
264
- function apply(styleElement, options, obj) {
265
- var css = "";
266
- if (obj.supports) css += "@supports (".concat(obj.supports, ") {");
267
- if (obj.media) css += "@media ".concat(obj.media, " {");
268
- var needLayer = void 0 !== obj.layer;
269
- if (needLayer) css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
270
- css += obj.css;
271
- if (needLayer) css += "}";
272
- if (obj.media) css += "}";
273
- if (obj.supports) css += "}";
274
- var sourceMap = obj.sourceMap;
275
- if (sourceMap && "u" > typeof btoa) css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
276
- options.styleTagTransform(css, styleElement, options.options);
277
- }
278
- function removeStyleElement(styleElement) {
279
- if (null === styleElement.parentNode) return false;
280
- styleElement.parentNode.removeChild(styleElement);
281
- }
282
- function domAPI(options) {
283
- if ("u" < typeof document) return {
284
- update: function() {},
285
- remove: function() {}
286
- };
287
- var styleElement = options.insertStyleElement(options);
288
- return {
289
- update: function(obj) {
290
- apply(styleElement, options, obj);
291
- },
292
- remove: function() {
293
- removeStyleElement(styleElement);
294
- }
295
- };
296
- }
297
- module.exports = domAPI;
298
- },
299
- 999 (module) {
300
- function styleTagTransform(css, styleElement) {
301
- if (styleElement.styleSheet) styleElement.styleSheet.cssText = css;
302
- else {
303
- while(styleElement.firstChild)styleElement.removeChild(styleElement.firstChild);
304
- styleElement.appendChild(document.createTextNode(css));
305
- }
306
- }
307
- module.exports = styleTagTransform;
308
- }
309
- });
310
- const injectStylesIntoStyleTag = __webpack_require__("702");
311
- var injectStylesIntoStyleTag_default = /*#__PURE__*/ __webpack_require__.n(injectStylesIntoStyleTag);
312
- const styleDomAPI = __webpack_require__("119");
313
- var styleDomAPI_default = /*#__PURE__*/ __webpack_require__.n(styleDomAPI);
314
- const insertBySelector = __webpack_require__("149");
315
- var insertBySelector_default = /*#__PURE__*/ __webpack_require__.n(insertBySelector);
316
- const setAttributesWithoutAttributes = __webpack_require__("390");
317
- var setAttributesWithoutAttributes_default = /*#__PURE__*/ __webpack_require__.n(setAttributesWithoutAttributes);
318
- const insertStyleElement = __webpack_require__("634");
319
- var insertStyleElement_default = /*#__PURE__*/ __webpack_require__.n(insertStyleElement);
320
- const styleTagTransform = __webpack_require__("999");
321
- var styleTagTransform_default = /*#__PURE__*/ __webpack_require__.n(styleTagTransform);
322
- const extracted_0 = __webpack_require__("169");
323
- var options = {};
324
- options.styleTagTransform = styleTagTransform_default();
325
- options.setAttributes = setAttributesWithoutAttributes_default();
326
- options.insert = insertBySelector_default().bind(null, "head");
327
- options.domAPI = styleDomAPI_default();
328
- options.insertStyleElement = insertStyleElement_default();
329
- injectStylesIntoStyleTag_default()(extracted_0.A, options);
330
- extracted_0.A && extracted_0.A.locals && extracted_0.A.locals;
331
4
  var Button_css_button = '_1bwnrav0';
332
5
  const Button = ()=>/*#__PURE__*/ jsx("button", {
333
6
  className: Button_css_button,
package/package.json CHANGED
@@ -1,19 +1,25 @@
1
1
  {
2
2
  "name": "@vinyasa/button",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "sideEffects": [
7
7
  "**/*.css"
8
8
  ],
9
9
  "files": [
10
- "dist"
10
+ "dist",
11
+ "!dist/**/*.map",
12
+ "!dist/**/__story__/**",
13
+ "!dist/**/__test__/**",
14
+ "!dist/**/*.stories.d.ts",
15
+ "!dist/**/*.test.d.ts"
11
16
  ],
12
17
  "publishConfig": {
13
18
  "access": "public"
14
19
  },
15
20
  "main": "./dist/cjs/index.cjs",
16
21
  "module": "./dist/esm/index.js",
22
+ "style": "./dist/esm/index.css",
17
23
  "types": "./dist/esm/index.d.ts",
18
24
  "exports": {
19
25
  ".": {
@@ -22,13 +28,14 @@
22
28
  "require": "./dist/cjs/index.cjs",
23
29
  "default": "./dist/esm/index.js"
24
30
  },
31
+ "./style.css": "./dist/esm/index.css",
25
32
  "./package.json": "./package.json"
26
33
  },
27
34
  "scripts": {
28
- "build": "rslib build",
35
+ "build": "rslib build && node ../../scripts/postbuild-package.mjs",
29
36
  "typecheck": "tsc --noEmit -p tsconfig.json",
30
- "lint": "eslint --config ../../configs/eslint.config.mjs src/**/*.{ts,tsx}",
31
- "lint:fix": "eslint --config ../../configs/eslint.config.mjs src/**/*.{ts,tsx} --fix",
37
+ "lint": "eslint --config ../../configs/eslint.config.mjs src/**/*.{ts,tsx} --ignore-pattern src/**/__story__/** --ignore-pattern src/**/__test__/**",
38
+ "lint:fix": "eslint --config ../../configs/eslint.config.mjs src/**/*.{ts,tsx} --ignore-pattern src/**/__story__/** --ignore-pattern src/**/__test__/** --fix",
32
39
  "format": "prettier . --config ../../configs/prettier.config.json --ignore-path ../../configs/.prettierignore --write",
33
40
  "format:check": "prettier . --config ../../configs/prettier.config.json --ignore-path ../../configs/.prettierignore --check",
34
41
  "test": "vitest run --config vitest.config.ts",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.css.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,QAuBjB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../src/components/button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,QAAA,MAAM,MAAM,yBAEX,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,10 +0,0 @@
1
- import type { StoryObj } from '@storybook/react-vite';
2
- declare const meta: {
3
- title: string;
4
- component: () => import("react").JSX.Element;
5
- tags: string[];
6
- };
7
- export default meta;
8
- type Story = StoryObj<typeof meta>;
9
- export declare const Default: Story;
10
- //# sourceMappingURL=Button.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/__story__/Button.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,QAAA,MAAM,IAAI;;;;CAIqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=Button.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.test.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/__test__/Button.test.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,eAAe,MAAM,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC"}