@wrdagency/blockout 0.0.2 → 0.0.3

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.
@@ -4,16 +4,16 @@ import { r as u } from "../../../CaretUp.es-Cy8czlHG.js";
4
4
  import { useRef as p } from "react";
5
5
  import { BaseControl as a } from "../base-control/index.js";
6
6
  import { useBaseControlProps as b } from "../base-control/props.js";
7
- import '../../../assets/index5.css';const h = (r) => {
8
- const o = p(null), s = () => /* @__PURE__ */ i("div", { className: "component-number-control__spinbox", children: [
7
+ import '../../../assets/index5.css';const h = (t) => {
8
+ const o = p(null), c = () => /* @__PURE__ */ i("div", { className: "component-number-control__spinbox", children: [
9
9
  /* @__PURE__ */ n(
10
10
  "button",
11
11
  {
12
- type: "submit",
12
+ type: "button",
13
13
  className: "component-number-control__spinbox__button",
14
14
  "aria-label": "Increment",
15
15
  role: "spinbutton",
16
- "aria-controls": r.id,
16
+ "aria-controls": t.id,
17
17
  onClick: () => e(1),
18
18
  tabIndex: -1,
19
19
  children: /* @__PURE__ */ n(u, {})
@@ -22,23 +22,23 @@ import '../../../assets/index5.css';const h = (r) => {
22
22
  /* @__PURE__ */ n(
23
23
  "button",
24
24
  {
25
- type: "submit",
25
+ type: "button",
26
26
  className: "component-number-control__spinbox__button",
27
27
  "aria-label": "Decrement",
28
28
  role: "spinbutton",
29
- "aria-controls": r.id,
29
+ "aria-controls": t.id,
30
30
  onClick: () => e(-1),
31
31
  tabIndex: -1,
32
32
  children: /* @__PURE__ */ n(l, {})
33
33
  }
34
34
  )
35
- ] }), e = (t) => {
36
- o.current && (t > 0 ? o.current.stepUp(t) : o.current.stepDown(t * -1), o.current.focus());
37
- }, { baseProps: c, controlProps: m } = b(r, {
35
+ ] }), e = (r) => {
36
+ o.current && (r > 0 ? o.current.stepUp(r) : o.current.stepDown(r * -1), o.current.focus());
37
+ }, { baseProps: s, controlProps: m } = b(t, {
38
38
  className: "component-number-control",
39
- suffix: /* @__PURE__ */ n(s, {})
39
+ suffix: /* @__PURE__ */ n(c, {})
40
40
  });
41
- return /* @__PURE__ */ n(a, { ...c, children: /* @__PURE__ */ n(
41
+ return /* @__PURE__ */ n(a, { ...s, children: /* @__PURE__ */ n(
42
42
  "input",
43
43
  {
44
44
  className: "component-number-control__input",
@@ -1,16 +1,16 @@
1
1
  import { jsx as o, jsxs as f } from "react/jsx-runtime";
2
- import { VisuallyHidden as m } from "../../visually-hidden/index.js";
3
- import { useRef as p } from "react";
2
+ import { VisuallyHidden as p } from "../../visually-hidden/index.js";
3
+ import { useRef as m } from "react";
4
4
  import { BaseControl as u } from "../base-control/index.js";
5
5
  import { useBaseControlProps as d } from "../base-control/props.js";
6
6
  import '../../../assets/index2.css';const _ = (r) => {
7
7
  const { baseProps: l, controlProps: c } = d(r, {
8
8
  className: "component-toggle-control"
9
- }), { onLabel: s = "On", offLabel: i = "Off", ...a } = c, e = p(null), n = (t) => {
9
+ }), { onLabel: s = "On", offLabel: a = "Off", ...i } = c, e = m(null), n = (t) => {
10
10
  e.current && (e.current.checked = t, e.current.focus());
11
11
  };
12
12
  return /* @__PURE__ */ o(u, { ...l, children: /* @__PURE__ */ f("div", { className: "component-toggle-control__buttons", children: [
13
- /* @__PURE__ */ o(m, { children: /* @__PURE__ */ o(
13
+ /* @__PURE__ */ o(p, { children: /* @__PURE__ */ o(
14
14
  "input",
15
15
  {
16
16
  type: "checkbox",
@@ -18,13 +18,13 @@ import '../../../assets/index2.css';const _ = (r) => {
18
18
  t.key === "ArrowLeft" ? n(!0) : t.key === "ArrowRight" && n(!1);
19
19
  },
20
20
  ref: e,
21
- ...a
21
+ ...i
22
22
  }
23
23
  ) }),
24
24
  /* @__PURE__ */ o(
25
25
  "button",
26
26
  {
27
- type: "submit",
27
+ type: "button",
28
28
  className: "component-toggle-control__on",
29
29
  onClick: () => n(!0),
30
30
  tabIndex: -1,
@@ -34,11 +34,11 @@ import '../../../assets/index2.css';const _ = (r) => {
34
34
  /* @__PURE__ */ o(
35
35
  "button",
36
36
  {
37
- type: "submit",
37
+ type: "button",
38
38
  className: "component-toggle-control__off",
39
39
  onClick: () => n(!1),
40
40
  tabIndex: -1,
41
- children: i
41
+ children: a
42
42
  }
43
43
  )
44
44
  ] }) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrdagency/blockout",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "A React component library created by WRD.agency",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",