@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.
package/dist/assets/index9.css
CHANGED
|
@@ -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:
|
|
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
|
|
2
|
-
import { cn as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import { useForm as
|
|
5
|
-
const
|
|
6
|
-
className:
|
|
7
|
-
index:
|
|
8
|
-
children:
|
|
9
|
-
...
|
|
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:
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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:
|
|
20
|
-
hidden:
|
|
21
|
-
inert:
|
|
22
|
+
className: f("component-form-step", c),
|
|
23
|
+
hidden: t.current !== r,
|
|
24
|
+
inert: t.current !== r,
|
|
22
25
|
ref: e,
|
|
23
|
-
...
|
|
24
|
-
children:
|
|
26
|
+
...s,
|
|
27
|
+
children: n
|
|
25
28
|
}
|
|
26
29
|
);
|
|
27
30
|
};
|
|
28
31
|
export {
|
|
29
|
-
|
|
32
|
+
x as FormStep
|
|
30
33
|
};
|