@public-ui/sample-react 2.0.6 → 2.0.7

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 (66) hide show
  1. package/dist/104.js +1 -1
  2. package/dist/1296.js +1 -1
  3. package/dist/1461.js +1 -1
  4. package/dist/1684.js +1 -1
  5. package/dist/1685.js +1 -1
  6. package/dist/1804.js +2 -0
  7. package/dist/1888.js +1 -1
  8. package/dist/2120.js +1 -1
  9. package/dist/2240.js +1 -1
  10. package/dist/2364.js +1 -1
  11. package/dist/2392.js +1 -1
  12. package/dist/2444.js +1 -1
  13. package/dist/{6488.js → 2544.js} +2 -2
  14. package/dist/2628.js +1 -1
  15. package/dist/2740.js +1 -1
  16. package/dist/2764.js +1 -1
  17. package/dist/2782.js +1 -1
  18. package/dist/2812.js +1 -1
  19. package/dist/3200.js +1 -1
  20. package/dist/3204.js +1 -1
  21. package/dist/352.js +1 -1
  22. package/dist/3564.js +1 -1
  23. package/dist/3920.js +1 -1
  24. package/dist/4064.js +1 -1
  25. package/dist/4136.js +1 -1
  26. package/dist/4544.js +1 -1
  27. package/dist/4728.js +1 -1
  28. package/dist/4915.js +1 -1
  29. package/dist/4988.js +1 -1
  30. package/dist/5376.js +1 -1
  31. package/dist/5456.js +1 -1
  32. package/dist/5615.js +1 -1
  33. package/dist/5628.js +1 -1
  34. package/dist/5744.js +1 -1
  35. package/dist/5768.js +1 -1
  36. package/dist/5839.js +1 -1
  37. package/dist/5956.js +1 -1
  38. package/dist/5972.js +1 -1
  39. package/dist/6040.js +1 -1
  40. package/dist/7192.js +1 -1
  41. package/dist/7312.js +1 -1
  42. package/dist/736.js +1 -1
  43. package/dist/7496.js +1 -1
  44. package/dist/7508.js +1 -1
  45. package/dist/7596.js +1 -1
  46. package/dist/7712.js +1 -1
  47. package/dist/7808.js +1 -1
  48. package/dist/8188.js +1 -1
  49. package/dist/8232.js +1 -1
  50. package/dist/8248.js +1 -1
  51. package/dist/828.js +1 -1
  52. package/dist/8476.js +1 -1
  53. package/dist/8524.js +1 -1
  54. package/dist/9072.js +1 -1
  55. package/dist/9088.js +1 -1
  56. package/dist/9404.js +1 -1
  57. package/dist/9424.js +1 -1
  58. package/dist/9680.js +1 -1
  59. package/dist/9888.js +1 -1
  60. package/dist/9984.js +1 -1
  61. package/dist/main.js +7 -5
  62. package/dist/main.js.LICENSE.txt +2 -2
  63. package/package.json +12 -13
  64. package/dist/80.js +0 -2
  65. /package/dist/{6488.js.LICENSE.txt → 1804.js.LICENSE.txt} +0 -0
  66. /package/dist/{80.js.LICENSE.txt → 2544.js.LICENSE.txt} +0 -0
@@ -33,7 +33,7 @@
33
33
  */
34
34
 
35
35
  /**
36
- * @remix-run/router v1.15.0
36
+ * @remix-run/router v1.15.1
37
37
  *
38
38
  * Copyright (c) Remix Software Inc.
39
39
  *
@@ -44,7 +44,7 @@
44
44
  */
45
45
 
46
46
  /**
47
- * React Router v6.22.0
47
+ * React Router v6.22.1
48
48
  *
49
49
  * Copyright (c) Remix Software Inc.
50
50
  *
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "@public-ui/sample-react",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "description": "This app contains samples for the KoliBri/Public UI",
5
5
  "license": "EUPL-1.2",
6
6
  "dependencies": {
7
7
  "@leanup/stack": "1.3.49",
8
8
  "@leanup/stack-react": "1.3.49",
9
9
  "@leanup/stack-webpack": "1.3.49",
10
- "@public-ui/components": "2.0.6",
11
- "@public-ui/react": "2.0.6",
12
- "@public-ui/themes": "2.0.6",
13
- "@types/node": "20.11.17",
14
- "@types/react": "18.2.55",
10
+ "@public-ui/components": "2.0.7",
11
+ "@public-ui/react": "2.0.7",
12
+ "@public-ui/themes": "2.0.7",
13
+ "@types/node": "20.11.19",
14
+ "@types/react": "18.2.57",
15
15
  "@types/react-dom": "18.2.19",
16
16
  "@unocss/preset-uno": "0.58.5",
17
17
  "@unocss/webpack": "0.58.5",
18
18
  "ajv": "8.12.0",
19
- "chromedriver": "121.0.0",
19
+ "chromedriver": "121.0.2",
20
20
  "cpy-cli": "5.0.0",
21
21
  "eslint-plugin-jsx-a11y": "6.8.0",
22
22
  "eslint-plugin-react": "7.33.2",
@@ -25,8 +25,8 @@
25
25
  "npm-run-all": "4.1.5",
26
26
  "react": "18.2.0",
27
27
  "react-dom": "18.2.0",
28
- "react-router": "6.22.0",
29
- "react-router-dom": "6.22.0",
28
+ "react-router": "6.22.1",
29
+ "react-router-dom": "6.22.1",
30
30
  "rimraf": "3.0.2",
31
31
  "ts-prune": "0.10.3",
32
32
  "typescript": "5.3.3",
@@ -52,11 +52,10 @@
52
52
  "build:deps": "pnpm --filter @public-ui/sample-react^... build",
53
53
  "format": "prettier --check src",
54
54
  "lint": "eslint \"{src,tests}/**/*.{html,js,json,jsx,ts,tsx,gql,graphql}\"",
55
+ "prepare:components-assets": "cpy \"node_modules/@public-ui/components/assets/**/*\" public/assets --dot",
56
+ "prepare:themes-assets": "cpy \"node_modules/@public-ui/themes/assets/**/*\" public/assets --dot",
55
57
  "serve": "cross-env NODE_ENV=development webpack serve --devtool=source-map",
56
58
  "start": "npm run serve -- --open",
57
- "unused": "ts-prune -e src",
58
- "postinstall": "npm-run-all postinstall:*",
59
- "postinstall:components-assets": "cpy \"node_modules/@public-ui/components/assets/**/*\" public/assets --dot",
60
- "postinstall:themes-assets": "cpy \"node_modules/@public-ui/themes/assets/**/*\" public/assets --dot"
59
+ "unused": "ts-prune -e src"
61
60
  }
62
61
  }
package/dist/80.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see 80.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_public_ui_sample_react=self.webpackChunk_public_ui_sample_react||[]).push([[80],{7620:(t,e,o)=>{o.d(e,{I:()=>i});var n=o(3520);const i=({accessKey:t,label:e})=>{let[o,...i]=e.split(t);return 0===i.length&&(t=t.toUpperCase(),[o,...i]=e.split(t)),0===i.length&&(t=t.toLowerCase(),[o,...i]=e.split(t)),(0,n.h)(n.F,null,o,i.length?(0,n.h)(n.F,null,(0,n.h)("u",null,t),i.join(t)):null)}},7184:(t,e,o)=>{o.d(e,{A:()=>i});var n=o(5244);class i{constructor(t,e,o){var i,s;if(this.experimentalMode=(0,n.a0)(),this.setFormAssociatedValue=t=>{var e;const o=null===(e=this.formAssociated)||void 0===e?void 0:e.getAttribute("name");null!==o&&""!==o||(0,n.h)(` The form field (${this.name}) must have a name attribute to be form-associated. Please define the _name attribute.`);const i=this.tryToStringifyValue(t);this.syncValue(t,i,this.formAssociated),this.syncValue(t,i,this.syncToOwnInput)},this.component=t,this.host=this.findHostWithShadowRoot(o),this.name=e,this.experimentalMode){switch(null===(i=this.host)||void 0===i||i.querySelectorAll("input,select,textarea").forEach((t=>{var e;null===(e=this.host)||void 0===e||e.removeChild(t)})),this.name){case"button":this.formAssociated=document.createElement("button");break;case"select":this.formAssociated=document.createElement("select"),this.formAssociated.setAttribute("multiple","");break;case"textarea":this.formAssociated=document.createElement("textarea");break;default:this.formAssociated=document.createElement("input"),this.formAssociated.setAttribute("type","hidden")}this.formAssociated.setAttribute("aria-hidden","true"),this.formAssociated.setAttribute("data-form-associated",""),this.formAssociated.setAttribute("hidden",""),null===(s=this.host)||void 0===s||s.appendChild(this.formAssociated)}}findHostWithShadowRoot(t){for(;null===(null==t?void 0:t.shadowRoot)&&t!==document.body;)(t=null==t?void 0:t.parentNode).host&&(t=t.host);return t}setAttribute(t,e,o){if(this.experimentalMode)try{if("boolean"!=typeof(o="object"==typeof o&&null!==o?JSON.stringify(o):o)&&"number"!=typeof o&&"string"!=typeof o)throw new Error("Invalid value type: "+typeof o);null==e||e.setAttribute(t,`${o}`)}catch(o){null==e||e.removeAttribute(t)}}tryToStringifyValue(t){try{return"object"==typeof t&&null!==t?JSON.stringify(t).toString():null==t?null:t.toString()}catch(t){return(0,n.a1)(`The form field raw value is not able to stringify! ${t}`),""}}syncValue(t,e,o){o&&("select"===this.name?(o.querySelectorAll("option").forEach((t=>{o.removeChild(t)})),Array.isArray(t)&&t.forEach((t=>{const e=this.tryToStringifyValue(t);if("string"==typeof e){const t=document.createElement("option");t.setAttribute("value",e),t.setAttribute("selected",""),o.appendChild(t)}}))):"string"==typeof e?(o.setAttribute("value",e),o.value=e):(o.removeAttribute("value"),o.value=""))}validateName(t){(0,n.a2)(this.component,t,{hooks:{afterPatch:()=>{this.setAttribute("name",this.formAssociated,this.component.state._name)}}}),void 0===t&&(0,n.h)("Ein Name am Eingabefeldern oder Schalter ist nicht zwingend erforderlich, kann aber für die Autocomplete-Funktion und für das statische Versenden des Eingabefeldes relevant sein.")}validateSyncValueBySelector(t){if(this.experimentalMode&&"string"==typeof t){const e=document.querySelector(t);e&&(this.syncToOwnInput=e)}}componentWillLoad(){this.validateName(this.component._name),this.validateSyncValueBySelector(this.component._syncValueBySelector)}}},9972:(t,e,o)=>{o.d(e,{I:()=>s});var n=o(5244),i=o(4572);class s extends i.I{constructor(t,e,o){super(t,e,o),this.component=t}validateAutoComplete(t){(0,n.w)(this.component,"_autoComplete",(t=>"string"==typeof t&&("on"===t||"off"===t)),new Set(["on | off"]),t)}validateHasCounter(t){(0,n.ac)(this.component,t)}validateMaxLength(t){(0,n.a7)(this.component,"_maxLength",t,{min:0})}validatePattern(t){(0,n.C)(this.component,"_pattern",t)}validatePlaceholder(t){(0,n.C)(this.component,"_placeholder",t)}validateReadOnly(t){(0,n.B)(this.component,"_readOnly",t)}validateRequired(t){(0,n.B)(this.component,"_required",t)}validateValue(t){(0,n.C)(this.component,"_value",t),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateValue(this.component._value)}onBlur(t){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(t)}onFocus(t){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(t)}}},9728:(t,e,o)=>{o.d(e,{I:()=>r,g:()=>a});var n=o(5244),i=o(3344),s=o(7184);const a=t=>{const e="string"==typeof t._error&&t._error.length>0&&!0===t._touched,o="string"==typeof t._hint&&t._hint.length>0,n=[];return!0===e&&n.push(`${t._id}-error`),!0===o&&n.push(`${t._id}-hint`),{hasError:e,hasHint:o,ariaDescribedBy:n}};class l extends s.A{constructor(t,e,o){super(t,e,o),this.component=t}validateAlert(t){(0,n.B)(this.component,"_alert",t)}validateTouched(t){(0,n.N)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAlert(this.component._alert),this.validateTouched(this.component._touched)}}class r extends l{constructor(t,e,o){super(t,e,o),this.valueChangeListeners=[],this.onFacade={onBlur:this.onBlur.bind(this),onChange:this.onChange.bind(this),onClick:this.onClick.bind(this),onFocus:this.onFocus.bind(this)},this.component=t}validateAccessKey(t){(0,n.C)(this.component,"_accessKey",t)}validateAdjustHeight(t){(0,n.O)(this.component,t)}validateDisabled(t){(0,n.B)(this.component,"_disabled",t),!0===t&&(0,n.P)()}validateError(t){(0,n.C)(this.component,"_error",t)}validateHideError(t){(0,n.Q)(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideError&&(0,n.T)("Property hide-error for inputs: Only use when the error message is shown outside of the input component.")}}})}validateHideLabel(t){(0,n.R)(this.component,t,{hooks:{afterPatch:()=>{this.component.state._hideLabel&&(0,n.T)("Property hide-label for inputs: Only use for exceptions like search inputs that are clearly identifiable by their context.")}}})}validateHint(t){(0,n.C)(this.component,"_hint",t)}validateId(t){(0,n.C)(this.component,"_id",t,{hooks:{afterPatch:()=>{this.setAttribute("id",this.formAssociated,this.component.state._id)}},minLength:1}),""!==t&&void 0!==t||(0,n.h)("Eine eindeutige ID an den Eingabefeldern ist nicht zwingend erforderlich, könnte aber für die E2E-Tests relevant sein.")}validateLabel(t){(0,n.U)(this.component,t,{required:!0})}validateOn(t){"object"==typeof t&&(0,n.m)(this.component,"_on",t)}validateSmartButton(t){(0,n.t)(t,(()=>{try{t=(0,n.u)(t)}catch(t){}(0,n.m)(this.component,"_smartButton",t)}))}validateTabIndex(t){(0,n.V)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateAccessKey(this.component._accessKey),this.validateAdjustHeight(this.component._adjustHeight),this.validateError(this.component._error),this.validateDisabled(this.component._disabled),this.validateHideError(this.component._hideError),this.validateHideLabel(this.component._hideLabel),this.validateHint(this.component._hint),this.validateId(this.component._id),this.validateLabel(this.component._label),this.validateSmartButton(this.component._smartButton),this.validateOn(this.component._on),this.validateTabIndex(this.component._tabIndex)}onBlur(t){var e;this.component._alert=!0,this.component._touched=!0,(0,i.s)(t),(0,i.t)("blur",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onBlur)&&this.component._on.onBlur(t)}onChange(t){var e;const o=t.target.value;(0,i.t)("change",this.host,o),this.setFormAssociatedValue(o),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onChange)&&this.component._on.onChange(t,o),this.valueChangeListeners.forEach((t=>t(o)))}onClick(t){var e;(0,i.s)(t),(0,i.t)("click",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onClick)&&this.component._on.onClick(t)}onFocus(t){var e;this.component._alert=!0,(0,i.s)(t),(0,i.t)("focus",this.host),"function"==typeof(null===(e=this.component._on)||void 0===e?void 0:e.onFocus)&&this.component._on.onFocus(t)}addValueChangeListener(t){this.valueChangeListeners.push(t)}}},7088:(t,e,o)=>{o.d(e,{I:()=>s,a:()=>a});var n=o(5244),i=o(9972);class s extends i.I{constructor(t,e,o){super(t,e,o),this.component=t}validateSuggestions(t){(0,n.a4)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateSuggestions(this.component._suggestions)}}class a extends s{constructor(t,e,o){super(t,e,o),this.hasError=!1,this.component=t}validateType(t){(0,n.w)(this.component,"_type",(t=>"string"==typeof t&&n.ab.includes(t)),new Set([`String {${n.ab.join(", ")}`]),t)}validateHasCounter(t){(0,n.ac)(this.component,t)}componentWillLoad(){super.componentWillLoad(),this.validateType(this.component._type),this.validateHasCounter(this.component._hasCounter)}}},5488:(t,e,o)=>{o.d(e,{a:()=>s,p:()=>a});var n=o(5244);const i=t=>{for((0,n.a0)()&&((0,n.h)("↓ Search form element start."),console.log(t));t instanceof HTMLElement&&"FORM"!==t.tagName&&"KOL-FORM"!==t.tagName;){try{t=t.parentElement instanceof HTMLElement?t.parentElement:t.parentNode instanceof ShadowRoot?t.parentNode.host:null}catch(t){}(0,n.a0)()&&(console.log(t),(0,n.h)("↑ Search form element finished."))}return t},s=(t={})=>{var e,o;const s=i(t.form);if(s instanceof HTMLElement){const t=new Event("reset",{bubbles:!0,cancelable:!0});if("FORM"===s.tagName)(0,n.a9)(t,s),s.dispatchEvent(t);else if("KOL-FORM"===s.tagName){(0,n.a9)(t,n.K.querySelector("form",s));const i=s;"function"==typeof(null===(e=i._on)||void 0===e?void 0:e.onReset)&&(null===(o=i._on)||void 0===o||o.onReset(t))}}},a=(t={})=>{var e,o;const s=i(t.form);if(s instanceof HTMLElement){const t=new SubmitEvent("submit",{bubbles:!0,cancelable:!0,submitter:s});if("FORM"===s.tagName)(0,n.a9)(t,s),s.dispatchEvent(t),s.submit();else if("KOL-FORM"===s.tagName){(0,n.a9)(t,n.K.querySelector("form",s));const i=s;"function"==typeof(null===(e=i._on)||void 0===e?void 0:e.onSubmit)&&(null===(o=i._on)||void 0===o||o.onSubmit(t))}}}},4572:(t,e,o)=>{o.d(e,{I:()=>a});var n=o(5244),i=o(9728);const s=(t,e)=>{const o=t;"object"==typeof o&&null!==o&&((0,n.H)(o.right,1)&&(o.right={icon:o.right}),(0,n.H)(o.left,1)&&(o.left={icon:o.left}),e.set("_icons",o))};class a extends i.I{constructor(t,e,o){super(t,e,o),this.component=t}validateIcon(t){this.validateIcons(t)}validateIcons(t){(0,n.t)(t,(()=>{try{t=(0,n.u)(t)}catch(t){}(0,n.w)(this.component,"_icons",(t=>"object"==typeof t&&null!==t&&((0,n.H)(t.left,1)||(0,n.a5)(t.left)||(0,n.H)(t.right,1)||(0,n.a5)(t.right))),new Set(["KoliBriHorizontalIcon"]),t,{hooks:{beforePatch:s},required:!0})}))}componentWillLoad(){super.componentWillLoad(),this.validateIcons(this.component._icons||this.component._icon)}}},3344:(t,e,o)=>{function n(t){t.stopImmediatePropagation(),t.stopPropagation()}function i(t,e,o){e&&function(t,e,o){const n=t.dispatchEvent(function(t,e){return new CustomEvent(`kol-${t}`,{bubbles:!0,cancelable:!0,composed:!0,detail:e})}(e,o))}(e,t,o)}function s(t){t.preventDefault(),n(t)}o.d(e,{p:()=>s,s:()=>n,t:()=>i})}}]);
File without changes