@vygruppen/spor-react 12.24.9 → 12.24.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,5 +1,5 @@
1
1
 
2
- > @vygruppen/spor-react@12.24.9 build /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.24.11 build /home/runner/work/spor/spor/packages/spor-react
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/index.tsx, src/icons/index.tsx
@@ -11,17 +11,17 @@
11
11
  ESM Build start
12
12
  CJS Build start
13
13
  DTS Build start
14
- CJS dist/index.cjs 356.13 KB
14
+ CJS dist/index.cjs 356.73 KB
15
15
  CJS dist/icons/index.cjs 381.00 B
16
+ CJS dist/index.cjs.map 703.26 KB
16
17
  CJS dist/icons/index.cjs.map 157.00 B
17
- CJS dist/index.cjs.map 702.12 KB
18
- CJS ⚡️ Build success in 2606ms
19
- ESM dist/index.mjs 331.95 KB
18
+ CJS ⚡️ Build success in 2702ms
19
+ ESM dist/index.mjs 332.58 KB
20
20
  ESM dist/icons/index.mjs 110.00 B
21
- ESM dist/index.mjs.map 702.12 KB
21
+ ESM dist/index.mjs.map 703.26 KB
22
22
  ESM dist/icons/index.mjs.map 157.00 B
23
- ESM ⚡️ Build success in 2609ms
24
- DTS ⚡️ Build success in 20140ms
23
+ ESM ⚡️ Build success in 2703ms
24
+ DTS ⚡️ Build success in 20415ms
25
25
  DTS dist/icons/index.d.ts 44.00 B
26
26
  DTS dist/index.d.ts 147.62 KB
27
27
  DTS dist/icons/index.d.cts 44.00 B
@@ -1,8 +1,8 @@
1
1
 
2
- > @vygruppen/spor-react@12.24.9 postinstall /home/runner/work/spor/spor/packages/spor-react
2
+ > @vygruppen/spor-react@12.24.11 postinstall /home/runner/work/spor/spor/packages/spor-react
3
3
  > chakra typegen src/theme/index.ts
4
4
 
5
- [dotenv@17.3.1] injecting env (0) from .env -- tip: 🛡️ auth for agents: https://vestauth.com
5
+ [dotenv@17.3.1] injecting env (0) from .env -- tip: 🤖 agentic secret storage: https://dotenvx.com/as2
6
6
  ┌ Chakra CLI ⚡️
7
7
  [?25l│
8
8
  ◒ Generating conditions types...
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @vygruppen/spor-react
2
2
 
3
+ ## 12.24.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 4b468fb: Autocomplete - Empty result text now does not display when input is empty
8
+ - ecdcdba: Improve voiceover support on RadioCards
9
+ - e73653c: Improve voiceover support on Accordion
10
+ - Updated dependencies [3c08bf8]
11
+ - @vygruppen/spor-icon-react@4.5.3
12
+
13
+ ## 12.24.10
14
+
15
+ ### Patch Changes
16
+
17
+ - 4d11f81: Fix closetrigger tabbable autocomplete
18
+
3
19
  ## 12.24.9
4
20
 
5
21
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -128,10 +128,17 @@ var AccordionItemTrigger = React20.forwardRef(function AccordionItemTrigger2(pro
128
128
  ] }) });
129
129
  });
130
130
  var AccordionItemContent = React20.forwardRef(function AccordionItemContent2(props, ref) {
131
- const { children } = props;
131
+ const { children, "aria-labelledby": ariaLabelledBy, ...otherProps } = props;
132
132
  const recipe = react.useSlotRecipe({ key: "accordion" });
133
133
  const styles = recipe();
134
- return /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemContent, { css: styles.itemContent, children: /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemBody, { ...props, ref, children }) });
134
+ return /* @__PURE__ */ jsxRuntime.jsx(
135
+ react.Accordion.ItemContent,
136
+ {
137
+ css: styles.itemContent,
138
+ "aria-labelledby": ariaLabelledBy,
139
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.Accordion.ItemBody, { ...otherProps, ref, children })
140
+ }
141
+ );
135
142
  });
136
143
  Accordion.displayName = "Accordion";
137
144
  var AccordionItem = react.Accordion.Item;
@@ -1524,9 +1531,19 @@ PressableCard.displayName = "PressableCard";
1524
1531
  var RadioCard = React20.forwardRef(
1525
1532
  (props, ref) => {
1526
1533
  const { inputProps, children } = props;
1534
+ const uniqueId = React20.useId();
1535
+ const itemControlId = `radio-card-item-control-${uniqueId}`;
1536
+ const inputHasAriaLabel = (inputProps == null ? void 0 : inputProps["aria-labelledby"]) || (inputProps == null ? void 0 : inputProps["aria-label"]);
1527
1537
  return /* @__PURE__ */ jsxRuntime.jsxs(react.RadioCard.Item, { ...props, children: [
1528
- /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemHiddenInput, { ref, ...inputProps }),
1529
- /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemControl, { children })
1538
+ /* @__PURE__ */ jsxRuntime.jsx(
1539
+ react.RadioCard.ItemHiddenInput,
1540
+ {
1541
+ "aria-labelledby": inputHasAriaLabel ? inputProps == null ? void 0 : inputProps["aria-labelledby"] : itemControlId,
1542
+ ref,
1543
+ ...inputProps
1544
+ }
1545
+ ),
1546
+ /* @__PURE__ */ jsxRuntime.jsx(react.RadioCard.ItemControl, { id: itemControlId, "aria-hidden": true, children })
1530
1547
  ] });
1531
1548
  }
1532
1549
  );
@@ -3351,7 +3368,7 @@ var Autocomplete = ({
3351
3368
  );
3352
3369
  const combobox = react.useCombobox({
3353
3370
  collection,
3354
- openOnClick,
3371
+ openOnClick: filteredChildren.length > 0 ? openOnClick : false,
3355
3372
  onInputValueChange: (event) => {
3356
3373
  if (!filteredExternally) {
3357
3374
  filter(event.inputValue);
@@ -3384,16 +3401,16 @@ var Autocomplete = ({
3384
3401
  required,
3385
3402
  onFocus: (event) => {
3386
3403
  onFocus == null ? void 0 : onFocus(event);
3387
- if (openOnFocus)
3404
+ if (openOnFocus && filteredChildren.length > 0)
3388
3405
  combobox.setOpen(true);
3389
3406
  }
3390
3407
  }
3391
3408
  ) }),
3392
- /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts14.clearValue), children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "xs" }) }) })
3409
+ /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.IndicatorGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.ClearTrigger, { asChild: true, "aria-label": t(texts14.clearValue), children: /* @__PURE__ */ jsxRuntime.jsx(CloseButton, { size: "xs", tabIndex: 0 }) }) })
3393
3410
  ] }),
3394
3411
  /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Positioner, { children: /* @__PURE__ */ jsxRuntime.jsxs(react.Combobox.Content, { children: [
3395
- /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Empty, { children: !loading && (emptyLabel ?? t(texts14.noItemsFound)) }),
3396
- loading ? /* @__PURE__ */ jsxRuntime.jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: filteredChildren })
3412
+ !loading && /* @__PURE__ */ jsxRuntime.jsx(react.Combobox.Empty, { children: emptyLabel ?? t(texts14.noItemsFound) }),
3413
+ loading ? /* @__PURE__ */ jsxRuntime.jsx(ColorSpinner, { width: "1.5rem", p: "2" }) : filteredChildren
3397
3414
  ] }) })
3398
3415
  ] });
3399
3416
  };