@wrdagency/blockout 0.1.1 → 0.1.2

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 +1 @@
1
- .component-toggle-group-control .component-base-control__box{background:none;border:none}.component-toggle-group-control__options{display:flex;overflow:hidden;border-radius:var(--blockout__radius--md);background-color:var(--blockout__colours__surface--100);padding:.25rem;gap:.25rem}.component-toggle-group-control__option{display:flex;flex-direction:column;padding:.625rem .75rem;min-height:40px;width:100%;color:var(--blockout__colours__surface--800);border-radius:calc(var(--blockout__radius--md) - .25rem);font-size:1rem;font-weight:500;flex-basis:50%;cursor:pointer;position:relative;transition:color .25s ease,background-color .25s ease;background-color:var(--blockout__colours__surface--100);color:var(--blockout__colours__surface--500);box-shadow:none}.component-toggle-group-control__option__label{display:flex;align-items:center;justify-content:start;text-align:center;gap:.5rem;font-weight:500}.component-toggle-group-control__option__label>svg{width:1.25rem;height:1.25rem}.component-toggle-group-control__option__description{font-weight:400;color:var(--blockout__colours__surface--500);font-size:.875rem}.component-toggle-group-control__option:has(:checked){background-color:var(--blockout__colours__surface--0);color:var(--blockout__colours__surface--950);box-shadow:0 .1rem .25rem #0000001a;z-index:2}.component-toggle-group-control__option:has(:disabled){background-color:var(--blockout__colours__surface--200);color:var(--blockout__colours__surface--400);box-shadow:none;cursor:default}.component-toggle-group-control__option:has(:checked:disabled){background-color:var(--blockout__colours__surface--50);color:var(--blockout__colours__surface--400)}
1
+ .component-toggle-group-control .component-base-control__box{background:none;border:none}.component-toggle-group-control__options{display:flex;overflow:hidden;border-radius:var(--blockout__radius--md);background-color:var(--blockout__colours__surface--100);padding:.25rem;gap:.25rem}.component-toggle-group-control__option{display:flex;flex-direction:column;padding:.625rem .75rem;min-height:40px;width:100%;color:var(--blockout__colours__surface--800);border-radius:calc(var(--blockout__radius--md) - .25rem);font-size:1rem;font-weight:500;flex-basis:50%;cursor:pointer;position:relative;transition:color .25s ease,background-color .25s ease;background-color:var(--blockout__colours__surface--100);color:var(--blockout__colours__surface--500);box-shadow:none}.component-toggle-group-control__option__label{display:flex;align-items:center;justify-content:center;text-align:center;gap:.5rem;font-weight:500}.component-toggle-group-control__option__label>svg{width:1.25rem;height:1.25rem}.component-toggle-group-control__option__description{font-weight:400;color:var(--blockout__colours__surface--500);font-size:.875rem}.component-toggle-group-control__option:has(:checked){background-color:var(--blockout__colours__surface--0);color:var(--blockout__colours__surface--950);box-shadow:0 .1rem .25rem #0000001a;z-index:2}.component-toggle-group-control__option:has(:disabled){background-color:var(--blockout__colours__surface--200);color:var(--blockout__colours__surface--400);box-shadow:none;cursor:default}.component-toggle-group-control__option:has(:checked:disabled){background-color:var(--blockout__colours__surface--50);color:var(--blockout__colours__surface--400)}
@@ -1,30 +1,33 @@
1
- import { jsx as s } from "react/jsx-runtime";
2
- import { cn as u } from "../../../utils/css.js";
3
- import { useRef as f, useEffect as m } from "react";
4
- import { useForm as a } from "../types/form.js";
5
- const h = ({
6
- className: o,
7
- index: t,
8
- children: c,
9
- ...n
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { cn as f } from "../../../utils/css.js";
3
+ import { useRef as m, useEffect as p } from "react";
4
+ import { useForm as l } from "../types/form.js";
5
+ const x = ({
6
+ className: c,
7
+ index: r,
8
+ children: n,
9
+ ...s
10
10
  }) => {
11
- const { step: r } = a(), e = f(null);
12
- return m(() => {
13
- r.current === t && e.current && e.current.querySelectorAll(
14
- 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
15
- )[0].focus();
16
- }, [r.current, t]), /* @__PURE__ */ s(
11
+ const { step: t } = l(), e = m(null);
12
+ return p(() => {
13
+ if (t.current === r && e.current) {
14
+ const o = e.current.querySelectorAll(
15
+ 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
16
+ )[0];
17
+ o == null || o.focus();
18
+ }
19
+ }, [t.current, r]), /* @__PURE__ */ u(
17
20
  "div",
18
21
  {
19
- className: u("component-form-step", o),
20
- hidden: r.current !== t,
21
- inert: r.current !== t,
22
+ className: f("component-form-step", c),
23
+ hidden: t.current !== r,
24
+ inert: t.current !== r,
22
25
  ref: e,
23
- ...n,
24
- children: c
26
+ ...s,
27
+ children: n
25
28
  }
26
29
  );
27
30
  };
28
31
  export {
29
- h as FormStep
32
+ x as FormStep
30
33
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrdagency/blockout",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A React component library created by WRD.agency",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",