@dso-toolkit/core 48.0.0 → 49.0.0

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 (29) hide show
  1. package/dist/cjs/dso-accordion-section.cjs.entry.js +72 -14
  2. package/dist/cjs/dso-accordion.cjs.entry.js +24 -4
  3. package/dist/cjs/dso-toolkit.cjs.js +1 -1
  4. package/dist/cjs/dso-tooltip.cjs.entry.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/collection/components/accordion/accordion.js +29 -6
  7. package/dist/collection/components/accordion/components/accordion-section.js +93 -10
  8. package/dist/collection/components/accordion/components/handles/heading.handle.js +5 -5
  9. package/dist/collection/components/icon/icon.js +95 -95
  10. package/dist/collection/components/tooltip/tooltip.js +1 -1
  11. package/dist/components/dso-accordion-section.js +74 -15
  12. package/dist/components/dso-accordion.js +24 -4
  13. package/dist/components/tooltip.js +1 -1
  14. package/dist/dso-toolkit/dso-toolkit.esm.js +1 -1
  15. package/dist/dso-toolkit/p-bcd19ae7.entry.js +1 -0
  16. package/dist/dso-toolkit/{p-ec5412aa.entry.js → p-d8ba8db6.entry.js} +1 -1
  17. package/dist/esm/dso-accordion-section.entry.js +72 -14
  18. package/dist/esm/dso-accordion.entry.js +24 -4
  19. package/dist/esm/dso-toolkit.js +1 -1
  20. package/dist/esm/dso-tooltip.entry.js +1 -1
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/types/components/accordion/accordion.d.ts +7 -2
  23. package/dist/types/components/accordion/accordion.interfaces.d.ts +6 -1
  24. package/dist/types/components/accordion/components/accordion-section.d.ts +10 -3
  25. package/dist/types/components/accordion/components/handles/heading.handle.d.ts +1 -0
  26. package/dist/types/components/tree-view/tree-item.d.ts +1 -1
  27. package/dist/types/components.d.ts +9 -4
  28. package/package.json +13 -18
  29. package/dist/dso-toolkit/p-39a33b89.entry.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dso-toolkit/core",
3
- "version": "48.0.0",
3
+ "version": "49.0.0",
4
4
  "description": "DSO Toolkit Web Components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/components/index.js",
@@ -11,19 +11,20 @@
11
11
  "collection:main": "dist/collection/index.js",
12
12
  "unpkg": "dist/dso-toolkit/dso-toolkit.js",
13
13
  "files": [
14
- "/dist/!(**/*.stories.*)",
14
+ "/dist",
15
15
  "/loader"
16
16
  ],
17
17
  "scripts": {
18
18
  "clear": "rimraf dist && rimraf loader",
19
- "build": "stencil build",
20
- "watch": "yarn clear && cross-env DSO_ENV=development yarn node scripts/watch.js"
19
+ "watch": "yarn clear && yarn node scripts/watch.js"
21
20
  },
22
21
  "dependencies": {
23
22
  "@popperjs/core": "^2.11.6",
24
23
  "@stencil/core": "^2.20.0",
25
24
  "@stencil/store": "^2.0.1",
25
+ "animejs": "3.2.1",
26
26
  "clsx": "1.2.1",
27
+ "dso-toolkit": "49.0.0",
27
28
  "escape-string-regexp": "^5.0.0",
28
29
  "focus-trap": "^7.1.0",
29
30
  "popper-max-size-modifier": "^0.2.0",
@@ -31,30 +32,24 @@
31
32
  "uuid": "^9.0.0"
32
33
  },
33
34
  "devDependencies": {
34
- "@babel/core": "^7.20.2",
35
- "@dso-toolkit/css": "0.0.0",
36
- "@dso-toolkit/sources": "0.0.0",
37
35
  "@stencil/angular-output-target": "^0.4.0",
38
36
  "@stencil/react-output-target": "^0.3.1",
39
37
  "@stencil/sass": "^2.0.1",
38
+ "@types/animejs": "^3.1.6",
40
39
  "@types/concurrently": "^7.0.0",
41
40
  "@types/debounce": "^1.2.1",
42
41
  "@types/sass": "^1.43.1",
43
42
  "@types/uuid": "^8.3.4",
44
- "@types/validator": "^13.7.10",
45
- "babel-loader": "^8.3.0",
46
43
  "concurrently": "^7.6.0",
47
- "cross-env": "^7.0.3",
48
44
  "debounce": "^1.2.1",
49
- "lit-html": "^2.4.0",
50
- "mini-svg-data-uri": "1.4.4",
51
- "minimist": "^1.2.7",
52
- "react": "^18.2.0",
53
- "react-dom": "^18.2.0",
54
45
  "rimraf": "^3.0.2",
55
46
  "stencil-inline-svg": "1.1.0",
56
- "typescript": "^4.8.4",
57
- "wait-on": "^6.0.1",
58
- "webpack": "^5.75.0"
47
+ "typescript": "~4.8.2"
48
+ },
49
+ "peerDependencies": {
50
+ "dso-toolkit": ">=45"
51
+ },
52
+ "nx": {
53
+ "includedScripts": []
59
54
  }
60
55
  }
@@ -1 +0,0 @@
1
- import{g as t,f as e,r as s,c as o,h as n,H as i,a as r}from"./p-8f35c8f8.js";const c=t=>!("isConnected"in t)||t.isConnected,a=(()=>{let t;return(...e)=>{t&&clearTimeout(t),t=setTimeout((()=>{t=0,(t=>{for(let e of t.keys())t.set(e,t.get(e).filter(c))})(...e)}),2e3)}})(),l=t=>"function"==typeof t?t():t,u=class{constructor(n){s(this,n),this.dsoToggleSection=o(this,"dsoToggleSection",7),this.variant="default",this.reverseAlign=!1,this.allowMultipleOpen=!1;const{state:i}=((s,o)=>{const n=((t,e=((t,e)=>t!==e))=>{const s=l(t);let o=new Map(Object.entries(null!=s?s:{}));const n={dispose:[],get:[],set:[],reset:[]},i=()=>{var e;o=new Map(Object.entries(null!==(e=l(t))&&void 0!==e?e:{})),n.reset.forEach((t=>t()))},r=t=>(n.get.forEach((e=>e(t))),o.get(t)),c=(t,s)=>{const i=o.get(t);e(s,i,t)&&(o.set(t,s),n.set.forEach((e=>e(t,s,i))))},a="undefined"==typeof Proxy?{}:new Proxy(s,{get:(t,e)=>r(e),ownKeys:()=>Array.from(o.keys()),getOwnPropertyDescriptor:()=>({enumerable:!0,configurable:!0}),has:(t,e)=>o.has(e),set:(t,e,s)=>(c(e,s),!0)}),u=(t,e)=>(n[t].push(e),()=>{((t,e)=>{const s=t.indexOf(e);s>=0&&(t[s]=t[t.length-1],t.length--)})(n[t],e)});return{state:a,get:r,set:c,on:u,onChange:(e,s)=>{const o=u("set",((t,o)=>{t===e&&s(o)})),n=u("reset",(()=>s(l(t)[e])));return()=>{o(),n()}},use:(...t)=>{const e=t.reduce(((t,e)=>(e.set&&t.push(u("set",e.set)),e.get&&t.push(u("get",e.get)),e.reset&&t.push(u("reset",e.reset)),e.dispose&&t.push(u("dispose",e.dispose)),t)),[]);return()=>e.forEach((t=>t()))},dispose:()=>{n.dispose.forEach((t=>t())),i()},reset:i,forceUpdate:t=>{const e=o.get(t);n.set.forEach((s=>s(t,e,e)))}}})(s,o);return n.use((()=>{if("function"!=typeof t)return{};const s=new Map;return{dispose:()=>s.clear(),get:e=>{const o=t();o&&((t,e,s)=>{const o=t.get(e);o?o.includes(s)||o.push(s):t.set(e,[s])})(s,e,o)},set:t=>{const o=s.get(t);o&&s.set(t,o.filter(e)),a(s)},reset:()=>{s.forEach((t=>t.forEach(e))),a(s)}}})()),n})({variant:this.variant||"default",reverseAlign:this.reverseAlign});this.accordionState=i}updateVariant(t="default"){this.accordionState.variant=t||"default"}updateReverseAlign(t){this.accordionState.reverseAlign=t}watchAllowMultiple(t){if(!t){const t=Array.from(this.host.querySelectorAll(":scope > dso-accordion-section[open]"));t.shift(),t.forEach((t=>this.controlOpenAttribute(t,!1)))}}async getState(){return this.accordionState}async toggleSection(t,e){const s=Array.from(this.host.querySelectorAll(":scope > dso-accordion-section"));if("number"==typeof t&&(t=s[t]),!(t instanceof HTMLElement&&s.includes(t)))return;const o=this.isSectionOpen(t);return this.allowMultipleOpen?(this.controlOpenAttribute(t,!o),void this.emitToggleEvent(t,s,e)):o?(this.controlOpenAttribute(t,!1),void this.emitToggleEvent(t,s,e)):(await this.closeOpenSections(),this.controlOpenAttribute(t,!0),void this.emitToggleEvent(t,s,e))}async closeOpenSections(){Array.from(this.host.querySelectorAll(":scope > dso-accordion-section")).filter((t=>this.isSectionOpen(t))).forEach((t=>this.controlOpenAttribute(t,!1)))}render(){return n(i,{class:{"dso-accordion":!0}},n("slot",null))}emitToggleEvent(t,e,s){this.dsoToggleSection.emit({originalEvent:s,section:{element:t,open:this.isSectionOpen(t)},sections:e})}isSectionOpen(t){return"string"==typeof t.getAttribute("open")}controlOpenAttribute(t,e){e?t.setAttribute("open",""):t.removeAttribute("open")}get host(){return r(this)}static get watchers(){return{variant:["updateVariant"],reverseAlign:["updateReverseAlign"],allowMultipleOpen:["watchAllowMultiple"]}}};u.style=":host{display:block}*,*::after,*::before{box-sizing:border-box}";export{u as dso_accordion}