@public-ui/sample-react 2.1.4-alpha.1 → 2.1.4
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/{9265.js → 1036.js} +2 -2
- package/dist/1069.js +1 -1
- package/dist/1085.js +1 -1
- package/dist/1184.js +1 -1
- package/dist/1222.js +1 -1
- package/dist/1278.js +1 -1
- package/dist/1325.js +1 -1
- package/dist/1333.js +1 -1
- package/dist/1661.js +1 -1
- package/dist/1703.js +1 -1
- package/dist/1711.js +1 -1
- package/dist/1792.js +1 -1
- package/dist/1793.js +1 -1
- package/dist/1878.js +1 -1
- package/dist/1957.js +1 -1
- package/dist/2305.js +1 -1
- package/dist/2471.js +1 -1
- package/dist/2538.js +1 -1
- package/dist/279.js +1 -1
- package/dist/2830.js +1 -1
- package/dist/3180.js +1 -1
- package/dist/3332.js +1 -1
- package/dist/3454.js +1 -1
- package/dist/3596.js +1 -1
- package/dist/3714.js +1 -1
- package/dist/3797.js +1 -1
- package/dist/3974.js +1 -1
- package/dist/3990.js +1 -1
- package/dist/4014.js +1 -1
- package/dist/4102.js +1 -1
- package/dist/4218.js +1 -1
- package/dist/4303.js +1 -1
- package/dist/4404.js +1 -1
- package/dist/{8631.js → 445.js} +2 -2
- package/dist/453.js +1 -1
- package/dist/4941.js +1 -1
- package/dist/500.js +1 -1
- package/dist/5139.js +1 -1
- package/dist/5164.js +1 -1
- package/dist/5168.js +2 -0
- package/dist/5365.js +1 -1
- package/dist/5540.js +1 -1
- package/dist/5756.js +1 -1
- package/dist/6393.js +1 -1
- package/dist/6682.js +1 -1
- package/dist/6781.js +1 -1
- package/dist/7100.js +1 -1
- package/dist/7245.js +1 -1
- package/dist/7263.js +1 -1
- package/dist/7512.js +1 -1
- package/dist/7856.js +1 -1
- package/dist/8002.js +1 -1
- package/dist/8189.js +1 -1
- package/dist/8264.js +1 -1
- package/dist/8384.js +1 -1
- package/dist/8389.js +1 -1
- package/dist/8515.js +1 -1
- package/dist/8557.js +1 -1
- package/dist/8588.js +1 -1
- package/dist/8724.js +1 -1
- package/dist/8791.js +1 -1
- package/dist/882.js +1 -1
- package/dist/8823.js +1 -1
- package/dist/895.js +1 -1
- package/dist/8993.js +1 -1
- package/dist/902.js +1 -1
- package/dist/9175.js +1 -1
- package/dist/9202.js +1 -1
- package/dist/9833.js +1 -1
- package/dist/9961.js +1 -1
- package/dist/main.js +1 -1
- package/package.json +4 -4
- package/src/scenarios/focus-elements.tsx +4 -2
- package/dist/1771.js +0 -2
- /package/dist/{1771.js.LICENSE.txt → 1036.js.LICENSE.txt} +0 -0
- /package/dist/{8631.js.LICENSE.txt → 445.js.LICENSE.txt} +0 -0
- /package/dist/{9265.js.LICENSE.txt → 5168.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/sample-react",
|
|
3
|
-
"version": "2.1.4
|
|
3
|
+
"version": "2.1.4",
|
|
4
4
|
"description": "This app contains samples for the KoliBri/Public UI",
|
|
5
5
|
"license": "EUPL-1.2",
|
|
6
6
|
"dependencies": {
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"typescript": "5.5.2",
|
|
30
30
|
"world_countries_lists": "2.9.0",
|
|
31
31
|
"yup": "1.4.0",
|
|
32
|
-
"@public-ui/
|
|
33
|
-
"@public-ui/
|
|
34
|
-
"@public-ui/themes": "2.1.4
|
|
32
|
+
"@public-ui/components": "2.1.4",
|
|
33
|
+
"@public-ui/react": "2.1.4",
|
|
34
|
+
"@public-ui/themes": "2.1.4"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
".eslintignore",
|
|
@@ -23,6 +23,7 @@ import type { FC, ForwardRefRenderFunction } from 'react';
|
|
|
23
23
|
import { useMemo } from 'react';
|
|
24
24
|
import React, { forwardRef, useLayoutEffect, useRef } from 'react';
|
|
25
25
|
import { useSearchParams } from 'react-router-dom';
|
|
26
|
+
import type { FocusableElement } from '@public-ui/components';
|
|
26
27
|
|
|
27
28
|
const getFocusElements = () => {
|
|
28
29
|
const focusElements = new Map<string, ForwardRefRenderFunction<any, any>>();
|
|
@@ -115,14 +116,15 @@ const Fallback = (props: FallbackProps) => {
|
|
|
115
116
|
};
|
|
116
117
|
|
|
117
118
|
export const FocusElements: FC = () => {
|
|
118
|
-
const ref = useRef(null);
|
|
119
|
+
const ref = useRef<FocusableElement>(null);
|
|
119
120
|
const focusElements = useMemo(() => getFocusElements(), []);
|
|
120
121
|
const [searchParams] = useSearchParams();
|
|
121
122
|
const componentName = searchParams.get('component');
|
|
122
123
|
|
|
123
124
|
useLayoutEffect(() => {
|
|
124
125
|
setTimeout(() => {
|
|
125
|
-
|
|
126
|
+
// Timeout not strictly necessary but prevents a layout glitch in snapshots with Playwright.
|
|
127
|
+
void ref.current?.kolFocus();
|
|
126
128
|
}, 500);
|
|
127
129
|
}, [ref]);
|
|
128
130
|
|
package/dist/1771.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see 1771.js.LICENSE.txt */
|
|
2
|
-
"use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[1771],{9543:(e,t,n)=>{n.d(t,{i:()=>s,n:()=>c,r:()=>a});var i=n(404),o=n(1330),r=n(3713);const l=()=>{let e=(0,r.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,r.d)(),"KoliBri",{value:e,writable:!1})),e},s=()=>{(()=>{const e=(0,r.g)().querySelector('meta[name="kolibri"]');if(e&&e.hasAttribute("content")){const t=e.getAttribute("content");"string"==typeof t&&((0,r.s)(t.includes("dev-mode=true")),(0,r.b)(t.includes("experimental-mode=true")),(0,r.c)(t.includes("color-contrast-analysis=true")))}})(),r.L.debug(`\n,--. ,--. ,--. ,--. ,-----. ,--.\n| .' / ,---. | | \`--' | |) /_ ,--.--. \`--'\n| . ' | .-. | | | ,--. | .-. \\ | .--' ,--.\n| |\\ \\ | '-' | | | | | | '--' / | | | |\n\`--' \`--´ \`---´ \`--' \`--' \`------´ \`--' \`--'\n🚹 The accessible HTML-Standard | 👉 https://public-ui.github.io | ${i.E.kolibriVersion}\n\t`,{forceLog:!0})},a=()=>{!0!==l().adviceShown&&(Object.defineProperty(l(),"adviceShown",{get:function(){return!0}}),r.L.debug("\nYou are using the KoliBri component library. If you have any suggestions for improvement or find a problem, please contact us:\n\nTicket: https://github.com/public-ui/kolibri/issues/new/choose (for privacy reasons, please use email)\nEmail: kolibri@itzbund.de\n"))};let c=()=>Math.floor(16777215*Math.random()).toString(16);"test"===o.p&&(c=()=>"nonce")},1771:(e,t,n)=>{n.r(t),n.d(t,{initialize:()=>a});var i=n(9543),o=n(3713),r=n(7238);function l(e,t){try{Object.defineProperty((()=>{let e=(0,o.d)().KoliBri;return void 0===e&&(e={},Object.defineProperty((0,o.d)(),"KoliBri",{value:e,writable:!1})),e})(),e,{get:function(){return t}})}catch(t){o.L.debug(`KoliBri property ${e} is already bind.`)}}const s=(e,t)=>o.L.debug(`${e} ${t?"":"not "}activated`),a=()=>{if((0,i.i)(),(0,o.e)()){(0,i.r)(),l("a11yColorContrast",r.A),l("querySelector",r.v),l("querySelectorAll",r.B),l("querySelectorColors",r.C),l("utils",(function(){return r.z})),l("parseJson",r.p),l("stringifyJson",r.D);const e=(0,o.g)().body,t=(0,o.g)().createElement("svg");if(t.setAttribute("aria-label","KoliBri-DevTools"),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t.setAttribute("role","toolbar"),t.setAttribute("style","position: fixed;color: black;font-size: 200%;bottom: 0.25rem;right: 0.25rem;"),t.innerHTML='<svg\n xmlns="http://www.w3.org/2000/svg"\n width="50"\n height="50"\n viewBox="0 0 600 600"\n>\n <path d="M353 322L213 304V434L353 322Z" fill="#047" />\n <path d="M209 564V304L149 434L209 564Z" fill="#047" />\n <path d="M357 316L417 250L361 210L275 244L357 316Z" fill="#047" />\n <path d="M353 318L35 36L213 300L353 318Z" fill="#047" />\n <path d="M329 218L237 92L250 222L272 241L329 218Z" fill="#047" />\n <path d="M391 286L565 272L421 252L391 286Z" fill="#047" />\n</svg>',(0,o.g)().body.appendChild(t),s("Development mode",(0,o.e)()),s("Experimental mode",(0,o.a)()),s("Color contrast analysis",(0,o.f)()),(0,o.f)()){const t=setTimeout((()=>{clearTimeout(t),setInterval((()=>{r.z.queryHtmlElementColors((0,o.g)().createElement("div"),(0,r.A)(e),!1,!1)}),1e4)}),2500)}}}},1330:(e,t,n)=>{n.d(t,{S:()=>l,a:()=>s,b:()=>r,c:()=>i,h:()=>c,i:()=>o,p:()=>a,s:()=>u});const i=e=>"object"==typeof e&&null!==e,o=(e,t=0)=>"string"==typeof e&&e.length>=t,r=e=>{if("object"!=typeof e||null===e)return o(e,1);for(const t in e)if(!1===o(t,1))return!1;return!0},l=new Event("StateChange"),s=(e,t)=>{i(e)&&e&&(e.focus=e=>null==t?void 0:t.focus(e))};let a="development";try{a="production"}catch(e){a="production"}const c=(e,t,n)=>{if(e&&t&&"string"==typeof n){const i=e.querySelector(`[slot="${n}"]`);i&&t.appendChild(i)}},u=e=>""===e}}]);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|