@public-ui/sample-react 2.0.0-rc.7 → 2.0.0-rc.8

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.
Files changed (71) hide show
  1. package/dist/1474.js +1 -1
  2. package/dist/183.js +1 -1
  3. package/dist/2337.js +1 -1
  4. package/dist/2412.js +1 -1
  5. package/dist/3303.js +1 -1
  6. package/dist/3325.js +1 -1
  7. package/dist/3459.js +1 -1
  8. package/dist/3932.js +1 -1
  9. package/dist/4022.js +1 -1
  10. package/dist/4164.js +1 -1
  11. package/dist/4291.js +1 -1
  12. package/dist/4323.js +1 -1
  13. package/dist/4355.js +1 -1
  14. package/dist/4564.js +1 -1
  15. package/dist/4891.js +1 -1
  16. package/dist/5183.js +1 -1
  17. package/dist/5369.js +1 -1
  18. package/dist/5390.js +1 -1
  19. package/dist/540.js +1 -1
  20. package/dist/{2288.js → 5414.js} +2 -2
  21. package/dist/5717.js +1 -1
  22. package/dist/5866.js +1 -1
  23. package/dist/6012.js +1 -1
  24. package/dist/6068.js +1 -1
  25. package/dist/{5771.js → 6077.js} +2 -2
  26. package/dist/6210.js +1 -1
  27. package/dist/6320.js +1 -1
  28. package/dist/6558.js +1 -1
  29. package/dist/6655.js +1 -1
  30. package/dist/6908.js +1 -1
  31. package/dist/7029.js +1 -1
  32. package/dist/7255.js +1 -1
  33. package/dist/7447.js +1 -1
  34. package/dist/7535.js +1 -1
  35. package/dist/{8139.js → 7648.js} +2 -2
  36. package/dist/7715.js +1 -1
  37. package/dist/7722.js +1 -1
  38. package/dist/7801.js +1 -1
  39. package/dist/7929.js +2 -0
  40. package/dist/7955.js +1 -1
  41. package/dist/7995.js +1 -1
  42. package/dist/8073.js +1 -1
  43. package/dist/8111.js +1 -1
  44. package/dist/8255.js +1 -1
  45. package/dist/8291.js +1 -1
  46. package/dist/8709.js +1 -1
  47. package/dist/8761.js +1 -1
  48. package/dist/9734.js +1 -1
  49. package/dist/9747.js +1 -1
  50. package/dist/9792.js +1 -1
  51. package/dist/9963.js +1 -1
  52. package/dist/abgrenzung.jpg +0 -0
  53. package/dist/main.css +1 -1
  54. package/dist/main.js +10 -4
  55. package/package.json +4 -4
  56. package/public/abgrenzung.jpg +0 -0
  57. package/src/components/button-link/image.tsx +1 -1
  58. package/src/components/card/selection.tsx +3 -3
  59. package/src/components/handout/basic.tsx +1 -1
  60. package/src/components/image/basic.tsx +1 -1
  61. package/src/components/link/image.tsx +2 -2
  62. package/src/components/logo/basic.tsx +1 -1
  63. package/src/components/nav/active.tsx +8 -9
  64. package/src/components/nav/basic.tsx +1 -1
  65. package/src/components/table/with-pagination.tsx +2 -3
  66. package/src/scenarios/appointment-form/AvailableAppointmentsForm.tsx +1 -1
  67. package/dist/3337.js +0 -2
  68. /package/dist/{2288.js.LICENSE.txt → 5414.js.LICENSE.txt} +0 -0
  69. /package/dist/{3337.js.LICENSE.txt → 6077.js.LICENSE.txt} +0 -0
  70. /package/dist/{5771.js.LICENSE.txt → 7648.js.LICENSE.txt} +0 -0
  71. /package/dist/{8139.js.LICENSE.txt → 7929.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.0.0-rc.7",
3
+ "version": "2.0.0-rc.8",
4
4
  "description": "This app contains samples for the KoliBri/Public UI",
5
5
  "license": "EUPL-1.2",
6
6
  "dependencies": {
@@ -8,9 +8,9 @@
8
8
  "@leanup/stack-react": "1.3.48",
9
9
  "@leanup/stack-webpack": "1.3.48",
10
10
  "@public-oss/kolibri-themes": "0.0.3",
11
- "@public-ui/components": "2.0.0-rc.7",
12
- "@public-ui/react": "2.0.0-rc.7",
13
- "@public-ui/themes": "2.0.0-rc.7",
11
+ "@public-ui/components": "2.0.0-rc.8",
12
+ "@public-ui/react": "2.0.0-rc.8",
13
+ "@public-ui/themes": "2.0.0-rc.8",
14
14
  "@types/node": "20.8.9",
15
15
  "@types/react": "18.2.33",
16
16
  "@types/react-dom": "18.2.14",
Binary file
@@ -8,7 +8,7 @@ export const ButtonLinkImage: FC = () => (
8
8
  <KolButtonLink _label="Ich bin ein Link, der als Text gerendert wird" />
9
9
  <br />
10
10
  <KolButtonLink _label="">
11
- <img alt="Abgrenzung" slot="expert" src="https://public-ui.github.io/assets/abgrenzung.jpg" width="300" />
11
+ <img alt="Darstellung des KoliBri-Theming" slot="expert" src="/abgrenzung.jpg" width="300" />
12
12
  </KolButtonLink>
13
13
  </div>
14
14
  );
@@ -21,7 +21,7 @@ export const CardSelection: FC = () => (
21
21
  </div>
22
22
  <div>
23
23
  <div>
24
- <img alt="Beispielbild" src="https://via.placeholder.com/200" />
24
+ <img alt="Darstellung des KoliBri-Theming" src="/abgrenzung.jpg" width="100%" />
25
25
  </div>
26
26
  </div>
27
27
  <div>
@@ -41,7 +41,7 @@ export const CardSelection: FC = () => (
41
41
  </div>
42
42
  <div>
43
43
  <div>
44
- <img alt="Beispielbild" src="https://via.placeholder.com/200" />
44
+ <img alt="Darstellung des KoliBri-Theming" src="/abgrenzung.jpg" width="100%" />
45
45
  </div>
46
46
  </div>
47
47
  <div>
@@ -61,7 +61,7 @@ export const CardSelection: FC = () => (
61
61
  </div>
62
62
  <div>
63
63
  <div>
64
- <img alt="Beispielbild" src="https://via.placeholder.com/200" />
64
+ <img alt="Darstellung des KoliBri-Theming" src="/abgrenzung.jpg" width="100%" />
65
65
  </div>
66
66
  </div>
67
67
  <div>
@@ -987,7 +987,7 @@ export const HandoutBasic: FC = () => (
987
987
  </KolCard>
988
988
  </div>
989
989
  <KolVersion _label="5.0.2-test.2"></KolVersion>
990
- {/* <KolImage _src="assets/images/abgrenzung.jpg" _alt="KoliBri Darstellung"></KolImage> */}
990
+ {/* <KolImage _src="/abgrenzung.jpg" _alt="KoliBri Darstellung"></KolImage> */}
991
991
  {/* <KolIndentedText></KolIndentedText> */}
992
992
  {/* <KolQuote></KolQuote> */}
993
993
  </div>
@@ -2,4 +2,4 @@ import { FC } from 'react';
2
2
  import { KolImage } from '@public-ui/react';
3
3
  import React from 'react';
4
4
 
5
- export const ImageBasic: FC = () => <KolImage _src="https://placehold.co/100x100/cc006e/white" _alt="Beispielbild: 100 × 100" />;
5
+ export const ImageBasic: FC = () => <KolImage className="w-80%" _src="/abgrenzung.jpg" _alt="Darstellung des KoliBri-Theming" />;
@@ -8,12 +8,12 @@ export const LinkImage: FC = () => (
8
8
  <KolLink _href="#" _label="Ich bin ein Link, der als Text gerendert wird" />
9
9
  <br />
10
10
  <KolLink _href="#" _label="">
11
- <img alt="Abgrenzung" slot="expert" src="https://public-ui.github.io/assets/abgrenzung.jpg" width="300" />
11
+ <img alt="Darstellung des KoliBri-Theming" slot="expert" src="/abgrenzung.jpg" width="300" />
12
12
  <KolKolibri style={{ width: '300px' }}></KolKolibri>
13
13
  </KolLink>
14
14
  <br />
15
15
  <KolLink _href="#" _label="">
16
- <img alt="Abgrenzung" slot="expert" src="https://public-ui.github.io/assets/abgrenzung.jpg" width="300" />
16
+ <img alt="Darstellung des KoliBri-Theming" slot="expert" src="/abgrenzung.jpg" width="300" />
17
17
  </KolLink>
18
18
  </div>
19
19
  );
@@ -2,4 +2,4 @@ import React, { FC } from 'react';
2
2
  import { KolLogo } from '@public-ui/react';
3
3
  import { Bundesministerium } from '@public-ui/components';
4
4
 
5
- export const LogoBasic: FC = () => <KolLogo _org={Bundesministerium['Die Bundesregierung']} style={{ width: 300 }} />;
5
+ export const LogoBasic: FC = () => <KolLogo className="w-50%" _org={Bundesministerium['Die Bundesregierung']} />;
@@ -2,23 +2,22 @@ import React from 'react';
2
2
  import { KolNav } from '@public-ui/react';
3
3
 
4
4
  import { FC, useEffect, useState } from 'react';
5
-
6
- import { useNavigate } from 'react-router';
5
+ import { ButtonOrLinkOrTextWithChildrenProps } from '@public-ui/components';
7
6
 
8
7
  export const NavActive: FC = () => {
9
- const [links, setLinks] = useState([]);
8
+ const [links, setLinks] = useState<ButtonOrLinkOrTextWithChildrenProps[]>([]);
10
9
 
11
10
  const handleLinks = (route: string) => {
12
11
  const link = links.find((link) => link._label === route);
12
+ if (!link) return;
13
13
  link._active = !link._active;
14
14
  setLinks(links);
15
15
  };
16
-
17
16
  useEffect(() => {
18
17
  setLinks([
19
18
  {
20
19
  _label: 'Main',
21
- _icons: 'fa-solid fa-house',
20
+ _icons: 'codicon codicon-home',
22
21
  _on: {
23
22
  onClick: () => handleLinks('Main'),
24
23
  },
@@ -36,7 +35,7 @@ export const NavActive: FC = () => {
36
35
  },
37
36
  },
38
37
  {
39
- _active: false,
38
+ _active: true,
40
39
  _label: 'Alert',
41
40
  _on: {
42
41
  onClick: () => handleLinks('Alert'),
@@ -44,12 +43,13 @@ export const NavActive: FC = () => {
44
43
  _children: [
45
44
  {
46
45
  _label: 'Main',
47
- _icons: 'fa-solid fa-house',
46
+ _icons: 'codicon codicon-home',
48
47
  _on: {
49
48
  onClick: () => handleLinks('/'),
50
49
  },
51
50
  },
52
51
  {
52
+ _active: true,
53
53
  _label: 'Abbr',
54
54
  _href: '/abbr',
55
55
  _on: {
@@ -83,6 +83,5 @@ export const NavActive: FC = () => {
83
83
  },
84
84
  ]);
85
85
  }, []);
86
-
87
- return <KolNav _label="Main navigation" _links={links} />;
86
+ return <KolNav _ariaLabel="Main navigation" _links={links} />;
88
87
  };
@@ -9,7 +9,7 @@ export const NavBasic: FC = () => (
9
9
  _links={[
10
10
  {
11
11
  _label: 'Homepage',
12
- _icons: 'fa-solid fa-house',
12
+ _icons: 'codicon codicon-home',
13
13
  _href: '#/',
14
14
  },
15
15
  {
@@ -1,8 +1,7 @@
1
1
  import React, { FC } from 'react';
2
2
 
3
3
  import { KolTable } from '@public-ui/react';
4
- import { KoliBriTableHeaders } from '@public-ui/components';
5
- import { KoliBriTablePaginationProps } from '@public-ui/components/src';
4
+ import { KoliBriTableHeaders, KoliBriTablePaginationProps } from '@public-ui/components';
6
5
  import { DATA } from './test-data';
7
6
 
8
7
  const HEADERS: KoliBriTableHeaders = {
@@ -13,7 +12,7 @@ const HEADERS: KoliBriTableHeaders = {
13
12
  ],
14
13
  ],
15
14
  };
16
- const PAGINATION: KoliBriTablePaginationProps = { _page: 2, _total: 1 };
15
+ const PAGINATION: KoliBriTablePaginationProps = { _page: 2, _max: 1 };
17
16
 
18
17
  export const TableWithPagination: FC = () => (
19
18
  <div>
@@ -4,7 +4,7 @@ import { FormValues } from './AppointmentForm';
4
4
  import { ErrorList } from './ErrorList';
5
5
  import { Field, FieldProps, useFormikContext } from 'formik';
6
6
  import { fetchAvailableTimes } from './appointmentService';
7
- import { Option } from '@public-ui/components/src';
7
+ import { Option } from '@public-ui/components';
8
8
 
9
9
  export function AvailableAppointmentsForm() {
10
10
  const form = useFormikContext<FormValues>();
package/dist/3337.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 3337.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[3337],{5866:(t,e,n)=>{n.r(e),n.d(e,{kol_progress:()=>h});var a,r,i=n(1167),l=n(1786),s=n(2288);(r=a||(a={})).bar="bar",r.cycle="cycle",r["cycle-value-label"]="cycle-value-label",r["cycle-label-value"]="cycle-label-value";const o=Object.keys(a),h=class{constructor(t){(0,i.r)(this,t),this._label=void 0,this._max=void 0,this._unit="%",this._value=void 0,this._variant=void 0,this.state={_max:100,_unit:"%",_value:0,_variant:"bar",_liveValue:0}}render(){return(0,i.h)(i.H,null,(t=>{let e="43%",n=t._label?"57%":"50%";switch(t._variant){case"cycle-value-label":t._label&&(e="57%",n="43%");case"cycle":case"cycle-label-value":return(0,i.h)("svg",{class:"cycle",width:"100",viewBox:"0 0 120 120",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("circle",{class:"background",cx:"60",cy:"60",r:"54.5",fill:"currentColor",stroke:"currentColor","stroke-width":"8"}),(0,i.h)("circle",{class:"whitespace",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"3"}),(0,i.h)("circle",{class:"border",cx:"60",cy:"60",r:"59",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),(0,i.h)("circle",{class:"whitespace",cx:"60",cy:"60",r:"51",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),(0,i.h)("circle",{class:"border",cx:"60",cy:"60",r:"50",fill:"currentColor",stroke:"currentColor","stroke-width":"1"}),(0,i.h)("circle",{class:"progress",fill:"currentColor",stroke:"currentColor","stroke-linecap":"round","stroke-dasharray":`${Math.round(t._value/t._max*342)}px 342px`,"stroke-width":"6",cx:"60",cy:"60",r:"54.5"}),t._label&&(0,i.h)("text",{"aria-hidden":"true",x:"50%",y:e,"text-anchor":"middle",fill:"currentColor"},t._label),(0,i.h)("text",{"aria-hidden":"true",x:"50%",y:n,"text-anchor":"middle",fill:"currentColor"},t._value,t._unit));default:return(0,i.h)("div",{class:"bar"},t._label&&(0,i.h)("div",null,t._label),(0,i.h)("div",{style:{display:"flex",gap:"0.3em"}},(0,i.h)("svg",{width:"100",viewBox:"0 0 102 8",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("rect",{class:"background",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:"100"}),(0,i.h)("rect",{class:"progress",x:"2.5",y:"2.5",height:"7",rx:"3.5",fill:"currentColor",stroke:"currentColor","stroke-width":"3",width:t._value/t._max*95}),(0,i.h)("rect",{class:"border",x:"1",y:"1",height:"10",rx:"5",fill:"currentColor",stroke:"currentColor","stroke-width":"1",width:"100"})),(0,i.h)("text",{"aria-hidden":"true","text-anchor":"middle","dominant-baseline":"central",fill:"currentColor"},t._value,t._unit)))}})(this.state),(0,i.h)("progress",{"aria-busy":this.state._value<this.state._max?"true":"false",max:this.state._max,value:this.state._value}),(0,i.h)("span",{"aria-live":"polite","aria-relevant":"removals text",hidden:!0},this.state._liveValue," von ",this.state._max," ",this.state._unit))}validateLabel(t){(0,l.v)(this,t)}validateMax(t){"number"!=typeof t&&(t=100),(0,s.e)(this,"_max",t,{required:!0})}validateUnit(t){(0,s.d)(this,"_unit",t)}validateValue(t){"number"!=typeof t&&(t=0),(0,s.e)(this,"_value",t,{required:!0})}validateVariant(t){(0,s.w)(this,"_variant",(t=>"string"==typeof t&&o.includes(t)),new Set(o),t)}componentWillLoad(){this.validateLabel(this._label),this.validateMax(this._max),this.validateUnit(this._unit),this.validateValue(this._value),this.validateVariant(this._variant),this.interval=setInterval((()=>{this.state._liveValue!==this.state._value&&(this.state=Object.assign(Object.assign({},this.state),{_liveValue:this.state._value}))}),5e3)}disconnectedCallback(){clearInterval(this.interval)}static get watchers(){return{_label:["validateLabel"],_max:["validateMax"],_unit:["validateUnit"],_value:["validateValue"],_variant:["validateVariant"]}}};h.style={default:"@layer kol-global {\n\t/*\n\t * This file contains all rules for accessibility.\n\t */\n\t:host {\n\t\t/*\n\t\t * Minimum size of interactive elements.\n\t\t */\n\t\t--a11y-min-size: 44px;\n\t\tfont-size: inherit;\n\t}\n\n\t* {\n\t\t/*\n\t\t * Verdana is an accessible font that can be used without requiring additional loading time.\n\t\t */\n\t\tfont-family: Verdana;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\thyphens: auto;\n\t\t/*\n\t\t * Letter spacing is required for all texts.\n\t\t */\n\t\tletter-spacing: inherit;\n\t\t/*\n\t\t * This rule enables the word dividing for all texts. That is important for high zoom levels.\n\t\t */\n\t\tword-break: break-word;\n\t\t/*\n\t\t * Word spacing is required for all texts.\n\t\t */\n\t\tword-spacing: inherit;\n\t}\n\n\t/*\n\t * All interactive elements should have a minimum size of 44px.\n\t */\n\t/* input:not([type='checkbox'], [type='radio'], [type='range']), */\n\t/* option, */\n\t/* select, */\n\t/* textarea, */\n\t[role='button'],\n\tbutton:not([role='link']),\n\tkol-input .input {\n\t\tmin-height: var(--a11y-min-size);\n\t\tmin-width: var(--a11y-min-size);\n\t}\n\n\t/*\n\t * Some interactive elements should not inherit the font-family and font-size.\n\t */\n\ta,\n\tbutton,\n\th1,\n\th2,\n\th3,\n\th4,\n\th5,\n\th6,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\t/*\n\t\t * All elements should inherit the font family from his parent element.\n\t\t */\n\t\tfont-family: inherit;\n\t\t/*\n\t\t * All elements should inherit the font size from his parent element.\n\t\t */\n\t\tfont-size: inherit;\n\t}\n}\n\n@layer kol-global {\n\t/*\n\t * Dieses CSS stellt sicher, dass der Standard-Style\n\t * von A und Button resettet werden.\n\t */\n\t:is(a, button) {\n\t\tbackground-color: transparent;\n\t\tborder: none;\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\twidth: 100%; /* 100% needed for custom width from outside */\n\t}\n}\n\n@layer kol-global {\n\t:host {\n\t\t/*\n\t\t * The max-width is needed to prevent the table from overflowing the\n\t\t * parent node, if the table is wider than the parent node.\n\t\t */\n\t\tmax-width: 100%;\n\t}\n\n\t* {\n\t\t/*\n\t\t * We prefer to box-sizing: border-box for all elements.\n\t\t */\n\t\tbox-sizing: border-box;\n\t}\n\n\t/* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n\tkol-span-wc {\n\t\tdisplay: grid;\n\t\tplace-items: center;\n\t}\n\n\t/* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n\tkol-span-wc > span {\n\t\tdisplay: flex;\n\t\tplace-items: center;\n\t}\n\n\ta,\n\tbutton {\n\t\tcursor: pointer;\n\t}\n\n\t/* font-family is NOT inherited all HTML elements. */\n\tbutton,\n\tinput,\n\toption,\n\tselect,\n\ttextarea {\n\t\tfont-family: inherit;\n\t}\n\n\t/* This is the text label. */\n\t.icon-only > kol-span-wc > span > span {\n\t\tdisplay: none;\n\t}\n}\n\n@layer kol-component {\n\tprogress {\n\t\tdisplay: block;\n\t\theight: 0;\n\t\toverflow: hidden;\n\t\twidth: 0;\n\t}\n\n\t.bar .border {\n\t\tfill: transparent;\n\t\tstroke: black;\n\t}\n\n\t.bar .background {\n\t\tfill: lightgray;\n\t\tstroke: white;\n\t}\n\n\t.bar .progress {\n\t\tfill: #0075ff;\n\t\tstroke: transparent;\n\t\ttransition: 250ms ease-in-out 50ms;\n\t}\n\n\t.cycle .background {\n\t\tfill: transparent;\n\t\tstroke: lightgray;\n\t}\n\n\t.cycle .border {\n\t\tfill: transparent;\n\t\tstroke: black;\n\t}\n\n\t.cycle .whitespace {\n\t\tfill: transparent;\n\t\tstroke: white;\n\t}\n\n\t.cycle .progress {\n\t\tfill: transparent;\n\t\tstroke: #0075ff;\n\t\ttransform-origin: 50% 50%;\n\t\ttransform: rotate(-90deg);\n\t\ttransition: 250ms ease-in-out 50ms;\n\t}\n\n\t/* https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion */\n\t@media (prefers-reduced-motion) {\n\t\t.progress {\n\t\t\ttransition-duration: 0s;\n\t\t\ttransition-delay: 0s;\n\t\t}\n\t}\n}\n"}},1786:(t,e,n)=>{n.d(e,{a:()=>d,c:()=>o,h:()=>s,v:()=>c});var a=n(4272),r=n(2288);const i=/[a-zA-Z0-9äöüÄÖÜß]/g,l=/^\d+$/;function s(t,e=1){return function(t){var e;return"string"==typeof t&&(null===(e=t.match(i))||void 0===e?void 0:e.length)||0}(t)>=e}function o(t){return l.test(t)}const h=new Set(["string"]),c=(t,e,n={})=>{(0,r.w)(t,"_label",(t=>"string"==typeof t),h,e,function(t){var e;return{hooks:{afterPatch:(e,n,r,i)=>{var l,h;"function"==typeof(null===(l=t.hooks)||void 0===l?void 0:l.afterPatch)&&(null===(h=t.hooks)||void 0===h||h.afterPatch(e,n,r,i)),"string"==typeof e&&!1===s(e,3)&&!1===o(e)&&(0,a.a)(`The heading or label ("${e}") is not accessible. A label should consist of at least three readable characters.`),"string"==typeof e&&e.length>80&&(0,a.u)("A heading or label should not be longer than 80 characters.")},beforePatch:null===(e=t.hooks)||void 0===e?void 0:e.beforePatch}}}(n))},d=c}}]);