@solid-design-system/components 1.0.2 → 1.2.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 (67) hide show
  1. package/dist/components/es/accordion-group.js +1 -0
  2. package/dist/components/es/accordion.js +1 -0
  3. package/dist/components/es/button.js +12 -12
  4. package/dist/components/es/divider.js +1 -0
  5. package/dist/components/es/if-defined.js +2 -7
  6. package/dist/components/es/link.js +1 -1
  7. package/dist/components/es/query.js +6 -0
  8. package/dist/components/es/solid-components2.js +1 -1
  9. package/dist/components/es/solid-element.js +1 -1
  10. package/dist/components/umd/solid-components.js +46 -46
  11. package/dist/custom-elements.json +1 -1
  12. package/dist/package/components/accordion/accordion.d.ts +23 -0
  13. package/dist/package/components/accordion/accordion.js +152 -0
  14. package/dist/package/components/accordion-group/accordion-group.d.ts +16 -0
  15. package/dist/package/components/accordion-group/accordion-group.js +63 -0
  16. package/dist/package/components/divider/divider.d.ts +13 -0
  17. package/dist/package/components/divider/divider.js +50 -0
  18. package/dist/package/internal/animate.d.ts +10 -0
  19. package/dist/package/internal/animate.js +41 -0
  20. package/dist/package/internal/event.d.ts +1 -0
  21. package/dist/package/internal/event.js +14 -0
  22. package/dist/package/solid-components.d.ts +3 -0
  23. package/dist/package/solid-components.js +16 -10
  24. package/dist/package/styles/tailwind.css.js +1 -1
  25. package/dist/package/utilities/animation-registry.d.ts +14 -0
  26. package/dist/package/utilities/animation-registry.js +35 -0
  27. package/dist/versioned-components/es/accordion-group.js +1 -0
  28. package/dist/versioned-components/es/accordion.js +1 -0
  29. package/dist/versioned-components/es/button.js +28 -28
  30. package/dist/versioned-components/es/divider.js +1 -0
  31. package/dist/versioned-components/es/icon.js +1 -1
  32. package/dist/versioned-components/es/if-defined.js +2 -7
  33. package/dist/versioned-components/es/include.js +1 -1
  34. package/dist/versioned-components/es/link.js +1 -1
  35. package/dist/versioned-components/es/query.js +6 -0
  36. package/dist/versioned-components/es/solid-components2.js +1 -1
  37. package/dist/versioned-components/es/solid-element.js +1 -1
  38. package/dist/versioned-components/es/spinner.js +1 -1
  39. package/dist/versioned-package/components/accordion/accordion.d.ts +23 -0
  40. package/dist/versioned-package/components/accordion/accordion.js +152 -0
  41. package/dist/versioned-package/components/accordion-group/accordion-group.d.ts +16 -0
  42. package/dist/versioned-package/components/accordion-group/accordion-group.js +63 -0
  43. package/dist/versioned-package/components/button/button.d.ts +1 -1
  44. package/dist/versioned-package/components/button/button.js +18 -18
  45. package/dist/versioned-package/components/divider/divider.d.ts +13 -0
  46. package/dist/versioned-package/components/divider/divider.js +50 -0
  47. package/dist/versioned-package/components/icon/icon.d.ts +1 -1
  48. package/dist/versioned-package/components/icon/icon.js +1 -1
  49. package/dist/versioned-package/components/include/include.d.ts +1 -1
  50. package/dist/versioned-package/components/include/include.js +1 -1
  51. package/dist/versioned-package/components/link/link.d.ts +1 -1
  52. package/dist/versioned-package/components/link/link.js +2 -2
  53. package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
  54. package/dist/versioned-package/components/spinner/spinner.js +1 -1
  55. package/dist/versioned-package/internal/animate.d.ts +10 -0
  56. package/dist/versioned-package/internal/animate.js +41 -0
  57. package/dist/versioned-package/internal/event.d.ts +1 -0
  58. package/dist/versioned-package/internal/event.js +14 -0
  59. package/dist/versioned-package/internal/form.js +1 -1
  60. package/dist/versioned-package/solid-components.d.ts +3 -0
  61. package/dist/versioned-package/solid-components.js +16 -10
  62. package/dist/versioned-package/styles/tailwind.css.js +1 -1
  63. package/dist/versioned-package/utilities/animation-registry.d.ts +14 -0
  64. package/dist/versioned-package/utilities/animation-registry.js +35 -0
  65. package/dist/vscode.html-custom-data.json +111 -5
  66. package/dist/web-types.json +312 -6
  67. package/package.json +10 -5
@@ -1 +1 @@
1
- {"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"components/button/button.js","declarations":[{"kind":"class","description":"","name":"SdButton","cssParts":[{"description":"The component's base wrapper.","name":"base"},{"description":"The container that wraps the left icon area.","name":"icon-left"},{"description":"The button's label.","name":"label"},{"description":"The container that wraps the right icon area.","name":"icon-right"}],"slots":[{"description":"The button's label.","name":""},{"description":"A prefix icon or similar element.","name":"icon-left"},{"description":"A suffix icon or similar element.","name":"icon-right"}],"members":[{"kind":"field","name":"formControlController","privacy":"private","default":"new FormControlController(this, {\n form: input => {\n // Buttons support a form attribute that points to an arbitrary form, so if this attribute it set we need to query\n // the form from the same root using its id\n if (input.hasAttribute('form')) {\n const doc = input.getRootNode() as Document | ShadowRoot;\n const formId = input.getAttribute('form')!;\n return doc.getElementById(formId) as HTMLFormElement;\n }\n\n // Fall back to the closest containing form\n return input.closest('form');\n }\n })"},{"kind":"field","name":"hasSlotController","privacy":"private","default":"new HasSlotController(this, '[default]', 'icon-left', 'icon-right')"},{"kind":"field","name":"invalid","type":{"text":"boolean"},"default":"false"},{"kind":"field","name":"title","type":{"text":"string"},"default":"''","attribute":"title"},{"kind":"field","name":"variant","type":{"text":"'primary' | 'secondary' | 'tertiary' | 'cta'"},"default":"'primary'","description":"The button's theme variant.","attribute":"variant","reflects":true},{"kind":"field","name":"inverted","type":{"text":"boolean"},"default":"false","description":"Inverts the button.","attribute":"inverted","reflects":true},{"kind":"field","name":"size","type":{"text":"'lg' | 'md' | 'sm'"},"default":"'lg'","description":"The button's size.","attribute":"size","reflects":true},{"kind":"field","name":"disabled","type":{"text":"boolean"},"default":"false","description":"Disables the button.","attribute":"disabled","reflects":true},{"kind":"field","name":"loading","type":{"text":"boolean"},"default":"false","description":"Draws the button in a loading state.","attribute":"loading","reflects":true},{"kind":"field","name":"type","type":{"text":"'button' | 'submit' | 'reset'"},"default":"'button'","description":"The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n`<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.","attribute":"type"},{"kind":"field","name":"name","type":{"text":"string"},"default":"''","description":"The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\nThis attribute is ignored when `href` is present.","attribute":"name"},{"kind":"field","name":"value","type":{"text":"string"},"default":"''","description":"The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\nbutton is the submitter. This attribute is ignored when `href` is present.","attribute":"value"},{"kind":"field","name":"href","type":{"text":"string"},"default":"''","description":"When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.","attribute":"href"},{"kind":"field","name":"target","type":{"text":"'_blank' | '_parent' | '_self' | '_top'"},"description":"Tells the browser where to open the link. Only used when `href` is present.","attribute":"target"},{"kind":"field","name":"download","type":{"text":"string | undefined"},"description":"Tells the browser to download the linked file as this filename. Only used when `href` is present.","attribute":"download"},{"kind":"field","name":"form","type":{"text":"string"},"description":"The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.","attribute":"form"},{"kind":"field","name":"formAction","type":{"text":"string"},"description":"Used to override the form owner's `action` attribute.","attribute":"formaction"},{"kind":"field","name":"formEnctype","type":{"text":"'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'"},"description":"Used to override the form owner's `enctype` attribute.","attribute":"formenctype"},{"kind":"field","name":"formMethod","type":{"text":"'post' | 'get'"},"description":"Used to override the form owner's `method` attribute.","attribute":"formmethod"},{"kind":"field","name":"formNoValidate","type":{"text":"boolean"},"description":"Used to override the form owner's `novalidate` attribute.","attribute":"formnovalidate"},{"kind":"field","name":"formTarget","type":{"text":"'_self' | '_blank' | '_parent' | '_top' | string"},"description":"Used to override the form owner's `target` attribute.","attribute":"formtarget"},{"kind":"method","name":"handleBlur","privacy":"private"},{"kind":"method","name":"handleFocus","privacy":"private"},{"kind":"method","name":"handleClick","privacy":"private","parameters":[{"name":"event","type":{"text":"MouseEvent"}}]},{"kind":"method","name":"isButton","privacy":"private"},{"kind":"method","name":"isLink","privacy":"private"},{"kind":"method","name":"handleDisabledChange"},{"kind":"method","name":"click","description":"Simulates a click on the button."},{"kind":"method","name":"focus","parameters":[{"name":"options","optional":true,"type":{"text":"FocusOptions"}}],"description":"Sets focus on the button."},{"kind":"method","name":"blur","description":"Removes focus from the button."},{"kind":"method","name":"checkValidity","description":"Checks for validity but does not show the browser's validation message."},{"kind":"method","name":"reportValidity","description":"Checks for validity and shows the browser's validation message if the control is invalid."},{"kind":"method","name":"setCustomValidity","parameters":[{"name":"message","type":{"text":"string"}}],"description":"Sets a custom validation message. Pass an empty string to restore validity."}],"events":[{"description":"Emitted when the button loses focus.","name":"sd-blur"},{"description":"Emitted when the button gains focus.","name":"sd-focus"}],"attributes":[{"name":"title","type":{"text":"string"},"default":"''","fieldName":"title","attribute":"title"},{"name":"variant","type":{"text":"'primary' | 'secondary' | 'tertiary' | 'cta'"},"default":"'primary'","description":"The button's theme variant.","fieldName":"variant","attribute":"variant"},{"name":"inverted","type":{"text":"boolean"},"default":"false","description":"Inverts the button.","fieldName":"inverted","attribute":"inverted"},{"name":"size","type":{"text":"'lg' | 'md' | 'sm'"},"default":"'lg'","description":"The button's size.","fieldName":"size","attribute":"size"},{"name":"disabled","type":{"text":"boolean"},"default":"false","description":"Disables the button.","fieldName":"disabled","attribute":"disabled"},{"name":"loading","type":{"text":"boolean"},"default":"false","description":"Draws the button in a loading state.","fieldName":"loading","attribute":"loading"},{"name":"type","type":{"text":"'button' | 'submit' | 'reset'"},"default":"'button'","description":"The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n`<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.","fieldName":"type","attribute":"type"},{"name":"name","type":{"text":"string"},"default":"''","description":"The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\nThis attribute is ignored when `href` is present.","fieldName":"name","attribute":"name"},{"name":"value","type":{"text":"string"},"default":"''","description":"The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\nbutton is the submitter. This attribute is ignored when `href` is present.","fieldName":"value","attribute":"value"},{"name":"href","type":{"text":"string"},"default":"''","description":"When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.","fieldName":"href","attribute":"href"},{"name":"target","type":{"text":"'_blank' | '_parent' | '_self' | '_top'"},"description":"Tells the browser where to open the link. Only used when `href` is present.","fieldName":"target","attribute":"target"},{"name":"download","type":{"text":"string | undefined"},"description":"Tells the browser to download the linked file as this filename. Only used when `href` is present.","fieldName":"download","attribute":"download"},{"name":"form","type":{"text":"string"},"description":"The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.","fieldName":"form","attribute":"form"},{"name":"formaction","type":{"text":"string"},"description":"Used to override the form owner's `action` attribute.","fieldName":"formAction","attribute":"formaction"},{"name":"formenctype","type":{"text":"'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'"},"description":"Used to override the form owner's `enctype` attribute.","fieldName":"formEnctype","attribute":"formenctype"},{"name":"formmethod","type":{"text":"'post' | 'get'"},"description":"Used to override the form owner's `method` attribute.","fieldName":"formMethod","attribute":"formmethod"},{"name":"formnovalidate","type":{"text":"boolean"},"description":"Used to override the form owner's `novalidate` attribute.","fieldName":"formNoValidate","attribute":"formnovalidate"},{"name":"formtarget","type":{"text":"'_self' | '_blank' | '_parent' | '_top' | string"},"description":"Used to override the form owner's `target` attribute.","fieldName":"formTarget","attribute":"formtarget"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Buttons represent actions that are available to the user.","documentation":"https://solid.union-investment.com/[storybook-link]/button","status":"stable","since":"1.0","dependencies":["sd-icon","sd-spinner"],"tagName":"sd-button","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdButton","module":"components/button/button.js"}},{"kind":"custom-element-definition","name":"sd-button","declaration":{"name":"SdButton","module":"components/button/button.js"}},{"kind":"custom-element-definition","name":"sd-button","declaration":{"name":"SdButton","module":"components/button/button.js"}}]},{"kind":"javascript-module","path":"components/icon/icon.js","declarations":[{"kind":"class","description":"","name":"SdIcon","members":[{"kind":"field","name":"svg","type":{"text":"string"},"privacy":"private","default":"''"},{"kind":"field","name":"name","type":{"text":"string | undefined"},"description":"The name of the icon to draw. Available names depend on the icon library being used.","attribute":"name","reflects":true},{"kind":"field","name":"src","type":{"text":"string | undefined"},"description":"An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\ncan result in XSS attacks. Only SVGs on a local or CORS-enabled endpoint are supported. If you're using more than one custom icon,\nit might make sense to register a custom icon library.","attribute":"src"},{"kind":"field","name":"label","type":{"text":"string"},"default":"''","description":"An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and\nignored by assistive devices.","attribute":"label"},{"kind":"field","name":"library","type":{"text":"string"},"default":"'default'","description":"The name of a registered custom icon library.","attribute":"library","reflects":true},{"kind":"field","name":"color","type":{"text":"'currentColor' | 'primary' | 'white'"},"default":"'currentColor'","description":"The color of the icon.\n\"current\" refers to currentColor and makes it possible to easily style the icon from outside without any CSS variables.","attribute":"color","reflects":true},{"kind":"method","name":"getUrl","privacy":"private"},{"kind":"method","name":"handleLabelChange"},{"kind":"method","name":"setIcon"}],"events":[{"description":"Emitted when the icon has loaded.","name":"sd-load"},{"description":"Emitted when the icon fails to load due to an error.","name":"sd-error"}],"attributes":[{"name":"name","type":{"text":"string | undefined"},"description":"The name of the icon to draw. Available names depend on the icon library being used.","fieldName":"name","attribute":"name"},{"name":"src","type":{"text":"string | undefined"},"description":"An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\ncan result in XSS attacks. Only SVGs on a local or CORS-enabled endpoint are supported. If you're using more than one custom icon,\nit might make sense to register a custom icon library.","fieldName":"src","attribute":"src"},{"name":"label","type":{"text":"string"},"default":"''","description":"An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and\nignored by assistive devices.","fieldName":"label","attribute":"label"},{"name":"library","type":{"text":"string"},"default":"'default'","description":"The name of a registered custom icon library.","fieldName":"library","attribute":"library"},{"name":"color","type":{"text":"'currentColor' | 'primary' | 'white'"},"default":"'currentColor'","description":"The color of the icon.\n\"current\" refers to currentColor and makes it possible to easily style the icon from outside without any CSS variables.","fieldName":"color","attribute":"color"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Icons are symbols that can be used to represent various options within an application.","status":"stable","since":"1.0","tagName":"sd-icon","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdIcon","module":"components/icon/icon.js"}},{"kind":"custom-element-definition","name":"sd-icon","declaration":{"name":"SdIcon","module":"components/icon/icon.js"}},{"kind":"custom-element-definition","name":"sd-icon","declaration":{"name":"SdIcon","module":"components/icon/icon.js"}}]},{"kind":"javascript-module","path":"components/icon/library.system.js","declarations":[{"kind":"variable","name":"icons","type":{"text":"object"},"default":"{\n 'chevron-down': `\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M20.257 6.333l-8.257 9.173-8.257-9.173c-0.181-0.181-0.431-0.292-0.707-0.292-0.552 0-1 0.448-1 1 0 0.238 0.083 0.456 0.222 0.628l-0.001-0.002 9 10c0.184 0.204 0.449 0.331 0.743 0.331s0.56-0.127 0.743-0.33l0.001-0.001 9-10c0.137-0.17 0.22-0.388 0.22-0.626 0-0.552-0.448-1-1-1-0.276 0-0.526 0.112-0.707 0.293v0z\"></path>\n </svg>\n `,\n 'chevron-up': `\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12.743 6.333c-0.188-0.195-0.452-0.316-0.743-0.316s-0.555 0.121-0.743 0.315l-0 0-9 10c-0.137 0.17-0.22 0.388-0.22 0.626 0 0.552 0.448 1 1 1 0.276 0 0.526-0.112 0.707-0.293v0l8.257-9.173 8.257 9.173c0.181 0.181 0.431 0.292 0.707 0.292 0.552 0 1-0.448 1-1 0-0.238-0.083-0.456-0.222-0.628l0.001 0.002z\"></path>\n </svg>\n `\n}"},{"kind":"variable","name":"systemLibrary","type":{"text":"IconLibrary"},"default":"{\n name: 'system',\n resolver: (name: keyof typeof icons) => {\n if (name in icons) {\n return `data:image/svg+xml,${encodeURIComponent(icons[name])}`;\n }\n return '';\n },\n mutator: svg => svg.setAttribute('fill', 'currentColor')\n}"}],"exports":[{"kind":"js","name":"icons","declaration":{"name":"icons","module":"components/icon/library.system.js"}},{"kind":"js","name":"default","declaration":{"name":"systemLibrary","module":"components/icon/library.system.js"}}]},{"kind":"javascript-module","path":"components/icon/library.js","declarations":[{"kind":"function","name":"watchIcon","parameters":[{"name":"icon","type":{"text":"SdIcon"}}],"description":"Adds an icon to the list of watched icons."},{"kind":"function","name":"unwatchIcon","parameters":[{"name":"icon","type":{"text":"SdIcon"}}],"description":"Removes an icon from the list of watched icons."},{"kind":"function","name":"getIconLibrary","parameters":[{"name":"name","optional":true,"type":{"text":"string"}}],"description":"Returns a library from the registry."},{"kind":"function","name":"registerIconLibrary","parameters":[{"name":"name","type":{"text":"string"}},{"name":"options","type":{"text":"{ resolver: IconLibraryResolver; mutator?: IconLibraryMutator }"}}],"description":"Adds an icon library to the registry, or overrides an existing one."},{"kind":"function","name":"unregisterIconLibrary","parameters":[{"name":"name","type":{"text":"string"}}],"description":"Removes an icon library from the registry."}],"exports":[{"kind":"js","name":"watchIcon","declaration":{"name":"watchIcon","module":"components/icon/library.js"}},{"kind":"js","name":"unwatchIcon","declaration":{"name":"unwatchIcon","module":"components/icon/library.js"}},{"kind":"js","name":"getIconLibrary","declaration":{"name":"getIconLibrary","module":"components/icon/library.js"}},{"kind":"js","name":"registerIconLibrary","declaration":{"name":"registerIconLibrary","module":"components/icon/library.js"}},{"kind":"js","name":"unregisterIconLibrary","declaration":{"name":"unregisterIconLibrary","module":"components/icon/library.js"}}]},{"kind":"javascript-module","path":"components/icon/request.js","declarations":[{"kind":"function","name":"requestIcon","return":{"type":{"text":"Promise<IconFile>"}},"parameters":[{"name":"url","type":{"text":"string"}}]}],"exports":[{"kind":"js","name":"requestIcon","declaration":{"name":"requestIcon","module":"components/icon/request.js"}}]},{"kind":"javascript-module","path":"components/include/include.styles.js","declarations":[],"exports":[{"kind":"js","name":"default","declaration":{"module":"components/include/include.styles.js"}}]},{"kind":"javascript-module","path":"components/include/include.js","declarations":[{"kind":"class","description":"","name":"SdInclude","members":[{"kind":"field","name":"src","type":{"text":"string"},"description":"The location of the HTML file to include. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.","attribute":"src"},{"kind":"field","name":"mode","type":{"text":"'cors' | 'no-cors' | 'same-origin'"},"default":"'cors'","description":"The fetch mode to use.","attribute":"mode"},{"kind":"field","name":"allowScripts","type":{"text":"boolean"},"default":"false","description":"Allows included scripts to be executed. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.","attribute":"allow-scripts"},{"kind":"method","name":"executeScript","privacy":"private","parameters":[{"name":"script","type":{"text":"HTMLScriptElement"}}]},{"kind":"method","name":"handleSrcChange"}],"events":[{"description":"Emitted when the included file is loaded.","name":"sd-load"},{"type":{"text":"{ status: number }"},"description":"Emitted when the included file fails to load due to an error.","name":"sd-error"}],"attributes":[{"name":"src","type":{"text":"string"},"description":"The location of the HTML file to include. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.","fieldName":"src","attribute":"src"},{"name":"mode","type":{"text":"'cors' | 'no-cors' | 'same-origin'"},"default":"'cors'","description":"The fetch mode to use.","fieldName":"mode","attribute":"mode"},{"name":"allow-scripts","type":{"text":"boolean"},"default":"false","description":"Allows included scripts to be executed. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.","fieldName":"allowScripts","attribute":"allow-scripts"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Includes give you the power to embed external HTML files into the page.","documentation":"https://solid.union-investment.com/[storybook-link]/include","status":"stable","since":"1.0","tagName":"sd-include","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdInclude","module":"components/include/include.js"}},{"kind":"custom-element-definition","name":"sd-include","declaration":{"name":"SdInclude","module":"components/include/include.js"}},{"kind":"custom-element-definition","name":"sd-include","declaration":{"name":"SdInclude","module":"components/include/include.js"}}]},{"kind":"javascript-module","path":"components/include/request.js","declarations":[{"kind":"function","name":"requestInclude","return":{"type":{"text":"Promise<IncludeFile>"}},"parameters":[{"name":"src","type":{"text":"string"}},{"name":"mode","default":"'cors'","type":{"text":"'cors' | 'no-cors' | 'same-origin'"}}],"description":"Fetches an include file from a remote source. Caching is enabled so the origin is only pinged once."}],"exports":[{"kind":"js","name":"requestInclude","declaration":{"name":"requestInclude","module":"components/include/request.js"}}]},{"kind":"javascript-module","path":"components/link/link.js","declarations":[{"kind":"class","description":"","name":"SdLink","cssParts":[{"description":"The component's base wrapper.","name":"base"},{"description":"The container that wraps the left icon area.","name":"icon-left"},{"description":"The link's label.","name":"label"},{"description":"The container that wraps the right icon area.","name":"icon-right"}],"slots":[{"description":"The default slot.","name":""},{"description":"The icon to display on the left side of the link.","name":"icon-left"},{"description":"The icon to display on the right side of the link.","name":"icon-right"}],"members":[{"kind":"field","name":"hasSlotController","privacy":"private","default":"new HasSlotController(this, '[default]', 'icon-left', 'icon-right')"},{"kind":"field","name":"size","type":{"text":"'inherit' | 'lg' | 'sm'"},"default":"'inherit'","description":"The link's size.","attribute":"size","reflects":true},{"kind":"field","name":"inverted","type":{"text":"boolean"},"default":"false","description":"Inverts the link.","attribute":"inverted","reflects":true},{"kind":"field","name":"standalone","type":{"text":"boolean"},"default":"false","description":"Control the layout of icon and text within the component and the component's positioning.","attribute":"standalone","reflects":true},{"kind":"field","name":"href","type":{"text":"string"},"default":"''","description":"When not set, the link will render as disabled.","attribute":"href"},{"kind":"field","name":"target","type":{"text":"'_blank' | '_parent' | '_self' | '_top'"},"description":"Tells the browser where to open the link. Only used when `href` is present.","attribute":"target"},{"kind":"field","name":"download","type":{"text":"string | undefined"},"description":"Tells the browser to download the linked file as this filename. Only used when `href` is present.","attribute":"download"},{"kind":"method","name":"handleBlur","privacy":"private"},{"kind":"method","name":"handleFocus","privacy":"private"},{"kind":"method","name":"focus","parameters":[{"name":"options","optional":true,"type":{"text":"FocusOptions"}}],"description":"Sets focus on the button."},{"kind":"method","name":"blur","description":"Removes focus from the button."}],"events":[{"description":"Emitted when the link loses focus.","name":"sd-blur"},{"description":"Emitted when the link gains focus.","name":"sd-focus"}],"attributes":[{"name":"size","type":{"text":"'inherit' | 'lg' | 'sm'"},"default":"'inherit'","description":"The link's size.","fieldName":"size","attribute":"size"},{"name":"inverted","type":{"text":"boolean"},"default":"false","description":"Inverts the link.","fieldName":"inverted","attribute":"inverted"},{"name":"standalone","type":{"text":"boolean"},"default":"false","description":"Control the layout of icon and text within the component and the component's positioning.","fieldName":"standalone","attribute":"standalone"},{"name":"href","type":{"text":"string"},"default":"''","description":"When not set, the link will render as disabled.","fieldName":"href","attribute":"href"},{"name":"target","type":{"text":"'_blank' | '_parent' | '_self' | '_top'"},"description":"Tells the browser where to open the link. Only used when `href` is present.","fieldName":"target","attribute":"target"},{"name":"download","type":{"text":"string | undefined"},"description":"Tells the browser to download the linked file as this filename. Only used when `href` is present.","fieldName":"download","attribute":"download"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"A link component.","documentation":"https://solid.union-investment.com/[storybook-link]/link","status":"experimental","since":"1.2","tagName":"sd-link","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdLink","module":"components/link/link.js"}},{"kind":"custom-element-definition","name":"sd-link","declaration":{"name":"SdLink","module":"components/link/link.js"}},{"kind":"custom-element-definition","name":"sd-link","declaration":{"name":"SdLink","module":"components/link/link.js"}}]},{"kind":"javascript-module","path":"components/spinner/spinner.js","declarations":[{"kind":"class","description":"","name":"SdSpinner","members":[{"kind":"field","name":"color","type":{"text":"'primary' | 'white' | 'currentColor'"},"default":"'currentColor'","description":"The color color of the spinner.","attribute":"color","reflects":true},{"kind":"field","name":"localize","privacy":"private","default":"new LocalizeController(this)"}],"attributes":[{"name":"color","type":{"text":"'primary' | 'white' | 'currentColor'"},"default":"'currentColor'","description":"The color color of the spinner.","fieldName":"color","attribute":"color"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Spinners are used to show the progress of an indeterminate operation.","documentation":"https://solid.union-investment.com/[storybook-link]/spinner","status":"stable","since":"1.0","tagName":"sd-spinner","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdSpinner","module":"components/spinner/spinner.js"}},{"kind":"custom-element-definition","name":"sd-spinner","declaration":{"name":"SdSpinner","module":"components/spinner/spinner.js"}},{"kind":"custom-element-definition","name":"sd-spinner","declaration":{"name":"SdSpinner","module":"components/spinner/spinner.js"}}]}],"package":{"name":"@solid-design-system/components","description":"Solid Design System: Components","version":"1.0.2","author":{"name":"Union Investment"},"homepage":"https://solid-design-system.fe.union-investment.de/x.x.x/storybook/","license":"MIT"}}
1
+ {"schemaVersion":"1.0.0","readme":"","modules":[{"kind":"javascript-module","path":"components/accordion-group/accordion-group.js","declarations":[{"kind":"class","description":"","name":"SdAccordionGroup","cssParts":[{"description":"The component's base wrapper.","name":"base"}],"slots":[{"description":"The default slot where `<sd-accordion>` elements are placed.","name":""}],"members":[{"kind":"field","name":"closeOthers","type":{"text":"boolean"},"default":"false","description":"Closes other accordions.","attribute":"close-others"},{"kind":"field","name":"handleAccordionShow","privacy":"private"}],"attributes":[{"name":"close-others","type":{"text":"boolean"},"default":"false","description":"Closes other accordions.","fieldName":"closeOthers","attribute":"close-others"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Short summary of the component's intended use.","documentation":"https://solid.union-investment.com/[storybook-link]/accordion-group","status":"experimental","since":"1.1","dependencies":["sd-accordion"],"tagName":"sd-accordion-group","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdAccordionGroup","module":"components/accordion-group/accordion-group.js"}},{"kind":"custom-element-definition","name":"sd-accordion-group","declaration":{"name":"SdAccordionGroup","module":"components/accordion-group/accordion-group.js"}},{"kind":"custom-element-definition","name":"sd-accordion-group","declaration":{"name":"SdAccordionGroup","module":"components/accordion-group/accordion-group.js"}}]},{"kind":"javascript-module","path":"components/accordion/accordion.js","declarations":[{"kind":"class","description":"","name":"SdAccordion","cssParts":[{"description":"The component's base wrapper.","name":"base"},{"description":"The header that wraps both the summary and the expand/collapse icon.","name":"header"},{"description":"The container that wraps the summary.","name":"summary"},{"description":"The container that wraps the expand/collapse icons.","name":"summary-icon"},{"description":"The accordion content.","name":"content"}],"slots":[{"description":"The accordion main content.","name":""},{"description":"The accordion summary. Alternatively, you can use the `summary` attribute.","name":"summary"},{"description":"Optional expand icon to use instead of the default. Works best with `<sd-icon>`.","name":"expand-icon"},{"description":"Optional collapse icon to use instead of the default. Works best with `<sd-icon>`.","name":"collapse-icon"}],"members":[{"kind":"field","name":"localize","privacy":"private","default":"new LocalizeController(this)"},{"kind":"field","name":"open","type":{"text":"boolean"},"default":"false","description":"Indicates whether or not the accordion is open. You can toggle this attribute to show and hide the accordion, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the accordion' open state.","attribute":"open","reflects":true},{"kind":"field","name":"summary","type":{"text":"string"},"description":"The summary to show in the header. If you need to display HTML, use the `summary` slot instead.","attribute":"summary"},{"kind":"method","name":"handleSummaryClick","privacy":"private"},{"kind":"method","name":"handleSummaryKeyDown","privacy":"private","parameters":[{"name":"event","type":{"text":"KeyboardEvent"}}]},{"kind":"method","name":"handleOpenChange"},{"kind":"method","name":"show","description":"Shows the accordion."},{"kind":"method","name":"hide","description":"Hides the accordion"}],"events":[{"description":"Emitted when the accordion opens.","name":"sd-show"},{"description":"Emitted after the accordion opens and all animations are complete.","name":"sd-after-show"},{"description":"Emitted when the accordion closes.","name":"sd-hide"},{"description":"Emitted after the accordion closes and all animations are complete.","name":"sd-after-hide"}],"attributes":[{"name":"open","type":{"text":"boolean"},"default":"false","description":"Indicates whether or not the accordion is open. You can toggle this attribute to show and hide the accordion, or you\ncan use the `show()` and `hide()` methods and this attribute will reflect the accordion' open state.","fieldName":"open","attribute":"open"},{"name":"summary","type":{"text":"string"},"description":"The summary to show in the header. If you need to display HTML, use the `summary` slot instead.","fieldName":"summary","attribute":"summary"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Accordion shows a brief summary and expands to show additional content.","documentation":"https://solid.union-investment.com/[storybook-link]/accordion","status":"stable","since":"1.1","dependencies":["sd-icon"],"animations":[{"name":"accordion.show","description":"The animation to use when showing accordion. You can use `height: auto` with this animation."},{"name":"accordion.hide","description":"The animation to use when hiding accordion. You can use `height: auto` with this animation."}],"tagName":"sd-accordion","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdAccordion","module":"components/accordion/accordion.js"}},{"kind":"custom-element-definition","name":"sd-accordion","declaration":{"name":"SdAccordion","module":"components/accordion/accordion.js"}},{"kind":"custom-element-definition","name":"sd-accordion","declaration":{"name":"SdAccordion","module":"components/accordion/accordion.js"}}]},{"kind":"javascript-module","path":"components/button/button.js","declarations":[{"kind":"class","description":"","name":"SdButton","cssParts":[{"description":"The component's base wrapper.","name":"base"},{"description":"The container that wraps the left icon area.","name":"icon-left"},{"description":"The button's label.","name":"label"},{"description":"The container that wraps the right icon area.","name":"icon-right"}],"slots":[{"description":"The button's label.","name":""},{"description":"A prefix icon or similar element.","name":"icon-left"},{"description":"A suffix icon or similar element.","name":"icon-right"}],"members":[{"kind":"field","name":"formControlController","privacy":"private","default":"new FormControlController(this, {\n form: input => {\n // Buttons support a form attribute that points to an arbitrary form, so if this attribute it set we need to query\n // the form from the same root using its id\n if (input.hasAttribute('form')) {\n const doc = input.getRootNode() as Document | ShadowRoot;\n const formId = input.getAttribute('form')!;\n return doc.getElementById(formId) as HTMLFormElement;\n }\n\n // Fall back to the closest containing form\n return input.closest('form');\n }\n })"},{"kind":"field","name":"hasSlotController","privacy":"private","default":"new HasSlotController(this, '[default]', 'icon-left', 'icon-right')"},{"kind":"field","name":"invalid","type":{"text":"boolean"},"default":"false"},{"kind":"field","name":"title","type":{"text":"string"},"default":"''","attribute":"title"},{"kind":"field","name":"variant","type":{"text":"'primary' | 'secondary' | 'tertiary' | 'cta'"},"default":"'primary'","description":"The button's theme variant.","attribute":"variant","reflects":true},{"kind":"field","name":"inverted","type":{"text":"boolean"},"default":"false","description":"Inverts the button.","attribute":"inverted","reflects":true},{"kind":"field","name":"size","type":{"text":"'lg' | 'md' | 'sm'"},"default":"'lg'","description":"The button's size.","attribute":"size","reflects":true},{"kind":"field","name":"disabled","type":{"text":"boolean"},"default":"false","description":"Disables the button.","attribute":"disabled","reflects":true},{"kind":"field","name":"loading","type":{"text":"boolean"},"default":"false","description":"Draws the button in a loading state.","attribute":"loading","reflects":true},{"kind":"field","name":"type","type":{"text":"'button' | 'submit' | 'reset'"},"default":"'button'","description":"The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n`<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.","attribute":"type"},{"kind":"field","name":"name","type":{"text":"string"},"default":"''","description":"The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\nThis attribute is ignored when `href` is present.","attribute":"name"},{"kind":"field","name":"value","type":{"text":"string"},"default":"''","description":"The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\nbutton is the submitter. This attribute is ignored when `href` is present.","attribute":"value"},{"kind":"field","name":"href","type":{"text":"string"},"default":"''","description":"When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.","attribute":"href"},{"kind":"field","name":"target","type":{"text":"'_blank' | '_parent' | '_self' | '_top'"},"description":"Tells the browser where to open the link. Only used when `href` is present.","attribute":"target"},{"kind":"field","name":"download","type":{"text":"string | undefined"},"description":"Tells the browser to download the linked file as this filename. Only used when `href` is present.","attribute":"download"},{"kind":"field","name":"form","type":{"text":"string"},"description":"The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.","attribute":"form"},{"kind":"field","name":"formAction","type":{"text":"string"},"description":"Used to override the form owner's `action` attribute.","attribute":"formaction"},{"kind":"field","name":"formEnctype","type":{"text":"'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'"},"description":"Used to override the form owner's `enctype` attribute.","attribute":"formenctype"},{"kind":"field","name":"formMethod","type":{"text":"'post' | 'get'"},"description":"Used to override the form owner's `method` attribute.","attribute":"formmethod"},{"kind":"field","name":"formNoValidate","type":{"text":"boolean"},"description":"Used to override the form owner's `novalidate` attribute.","attribute":"formnovalidate"},{"kind":"field","name":"formTarget","type":{"text":"'_self' | '_blank' | '_parent' | '_top' | string"},"description":"Used to override the form owner's `target` attribute.","attribute":"formtarget"},{"kind":"method","name":"handleBlur","privacy":"private"},{"kind":"method","name":"handleFocus","privacy":"private"},{"kind":"method","name":"handleClick","privacy":"private","parameters":[{"name":"event","type":{"text":"MouseEvent"}}]},{"kind":"method","name":"isButton","privacy":"private"},{"kind":"method","name":"isLink","privacy":"private"},{"kind":"method","name":"handleDisabledChange"},{"kind":"method","name":"click","description":"Simulates a click on the button."},{"kind":"method","name":"focus","parameters":[{"name":"options","optional":true,"type":{"text":"FocusOptions"}}],"description":"Sets focus on the button."},{"kind":"method","name":"blur","description":"Removes focus from the button."},{"kind":"method","name":"checkValidity","description":"Checks for validity but does not show the browser's validation message."},{"kind":"method","name":"reportValidity","description":"Checks for validity and shows the browser's validation message if the control is invalid."},{"kind":"method","name":"setCustomValidity","parameters":[{"name":"message","type":{"text":"string"}}],"description":"Sets a custom validation message. Pass an empty string to restore validity."}],"events":[{"description":"Emitted when the button loses focus.","name":"sd-blur"},{"description":"Emitted when the button gains focus.","name":"sd-focus"}],"attributes":[{"name":"title","type":{"text":"string"},"default":"''","fieldName":"title","attribute":"title"},{"name":"variant","type":{"text":"'primary' | 'secondary' | 'tertiary' | 'cta'"},"default":"'primary'","description":"The button's theme variant.","fieldName":"variant","attribute":"variant"},{"name":"inverted","type":{"text":"boolean"},"default":"false","description":"Inverts the button.","fieldName":"inverted","attribute":"inverted"},{"name":"size","type":{"text":"'lg' | 'md' | 'sm'"},"default":"'lg'","description":"The button's size.","fieldName":"size","attribute":"size"},{"name":"disabled","type":{"text":"boolean"},"default":"false","description":"Disables the button.","fieldName":"disabled","attribute":"disabled"},{"name":"loading","type":{"text":"boolean"},"default":"false","description":"Draws the button in a loading state.","fieldName":"loading","attribute":"loading"},{"name":"type","type":{"text":"'button' | 'submit' | 'reset'"},"default":"'button'","description":"The type of button. Note that the default value is `button` instead of `submit`, which is opposite of how native\n`<button>` elements behave. When the type is `submit`, the button will submit the surrounding form.","fieldName":"type","attribute":"type"},{"name":"name","type":{"text":"string"},"default":"''","description":"The name of the button, submitted as a name/value pair with form data, but only when this button is the submitter.\nThis attribute is ignored when `href` is present.","fieldName":"name","attribute":"name"},{"name":"value","type":{"text":"string"},"default":"''","description":"The value of the button, submitted as a pair with the button's name as part of the form data, but only when this\nbutton is the submitter. This attribute is ignored when `href` is present.","fieldName":"value","attribute":"value"},{"name":"href","type":{"text":"string"},"default":"''","description":"When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`.","fieldName":"href","attribute":"href"},{"name":"target","type":{"text":"'_blank' | '_parent' | '_self' | '_top'"},"description":"Tells the browser where to open the link. Only used when `href` is present.","fieldName":"target","attribute":"target"},{"name":"download","type":{"text":"string | undefined"},"description":"Tells the browser to download the linked file as this filename. Only used when `href` is present.","fieldName":"download","attribute":"download"},{"name":"form","type":{"text":"string"},"description":"The \"form owner\" to associate the button with. If omitted, the closest containing form will be used instead. The\nvalue of this attribute must be an id of a form in the same document or shadow root as the button.","fieldName":"form","attribute":"form"},{"name":"formaction","type":{"text":"string"},"description":"Used to override the form owner's `action` attribute.","fieldName":"formAction","attribute":"formaction"},{"name":"formenctype","type":{"text":"'application/x-www-form-urlencoded' | 'multipart/form-data' | 'text/plain'"},"description":"Used to override the form owner's `enctype` attribute.","fieldName":"formEnctype","attribute":"formenctype"},{"name":"formmethod","type":{"text":"'post' | 'get'"},"description":"Used to override the form owner's `method` attribute.","fieldName":"formMethod","attribute":"formmethod"},{"name":"formnovalidate","type":{"text":"boolean"},"description":"Used to override the form owner's `novalidate` attribute.","fieldName":"formNoValidate","attribute":"formnovalidate"},{"name":"formtarget","type":{"text":"'_self' | '_blank' | '_parent' | '_top' | string"},"description":"Used to override the form owner's `target` attribute.","fieldName":"formTarget","attribute":"formtarget"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Buttons represent actions that are available to the user.","documentation":"https://solid.union-investment.com/[storybook-link]/button","status":"stable","since":"1.0","dependencies":["sd-icon","sd-spinner"],"tagName":"sd-button","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdButton","module":"components/button/button.js"}},{"kind":"custom-element-definition","name":"sd-button","declaration":{"name":"SdButton","module":"components/button/button.js"}},{"kind":"custom-element-definition","name":"sd-button","declaration":{"name":"SdButton","module":"components/button/button.js"}}]},{"kind":"javascript-module","path":"components/divider/divider.js","declarations":[{"kind":"class","description":"","name":"SdDivider","members":[{"kind":"field","name":"orientation","type":{"text":"'horizontal' | 'vertical'"},"default":"'horizontal'","description":"Determines the orientation of the divider.","attribute":"orientation","reflects":true},{"kind":"field","name":"inverted","type":{"text":"boolean"},"default":"false","description":"This inverts the divider.","attribute":"inverted","reflects":true}],"attributes":[{"name":"orientation","type":{"text":"'horizontal' | 'vertical'"},"default":"'horizontal'","description":"Determines the orientation of the divider.","fieldName":"orientation","attribute":"orientation"},{"name":"inverted","type":{"text":"boolean"},"default":"false","description":"This inverts the divider.","fieldName":"inverted","attribute":"inverted"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Dividers are used to visually separate or group elements.","documentation":"https://solid.union-investment.com/[storybook-link]/divider","status":"stable","since":"1.0","tagName":"sd-divider","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdDivider","module":"components/divider/divider.js"}},{"kind":"custom-element-definition","name":"sd-divider","declaration":{"name":"SdDivider","module":"components/divider/divider.js"}},{"kind":"custom-element-definition","name":"sd-divider","declaration":{"name":"SdDivider","module":"components/divider/divider.js"}}]},{"kind":"javascript-module","path":"components/icon/icon.js","declarations":[{"kind":"class","description":"","name":"SdIcon","members":[{"kind":"field","name":"svg","type":{"text":"string"},"privacy":"private","default":"''"},{"kind":"field","name":"name","type":{"text":"string | undefined"},"description":"The name of the icon to draw. Available names depend on the icon library being used.","attribute":"name","reflects":true},{"kind":"field","name":"src","type":{"text":"string | undefined"},"description":"An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\ncan result in XSS attacks. Only SVGs on a local or CORS-enabled endpoint are supported. If you're using more than one custom icon,\nit might make sense to register a custom icon library.","attribute":"src"},{"kind":"field","name":"label","type":{"text":"string"},"default":"''","description":"An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and\nignored by assistive devices.","attribute":"label"},{"kind":"field","name":"library","type":{"text":"string"},"default":"'default'","description":"The name of a registered custom icon library.","attribute":"library","reflects":true},{"kind":"field","name":"color","type":{"text":"'currentColor' | 'primary' | 'white'"},"default":"'currentColor'","description":"The color of the icon.\n\"current\" refers to currentColor and makes it possible to easily style the icon from outside without any CSS variables.","attribute":"color","reflects":true},{"kind":"method","name":"getUrl","privacy":"private"},{"kind":"method","name":"handleLabelChange"},{"kind":"method","name":"setIcon"}],"events":[{"description":"Emitted when the icon has loaded.","name":"sd-load"},{"description":"Emitted when the icon fails to load due to an error.","name":"sd-error"}],"attributes":[{"name":"name","type":{"text":"string | undefined"},"description":"The name of the icon to draw. Available names depend on the icon library being used.","fieldName":"name","attribute":"name"},{"name":"src","type":{"text":"string | undefined"},"description":"An external URL of an SVG file. Be sure you trust the content you are including, as it will be executed as code and\ncan result in XSS attacks. Only SVGs on a local or CORS-enabled endpoint are supported. If you're using more than one custom icon,\nit might make sense to register a custom icon library.","fieldName":"src","attribute":"src"},{"name":"label","type":{"text":"string"},"default":"''","description":"An alternate description to use for assistive devices. If omitted, the icon will be considered presentational and\nignored by assistive devices.","fieldName":"label","attribute":"label"},{"name":"library","type":{"text":"string"},"default":"'default'","description":"The name of a registered custom icon library.","fieldName":"library","attribute":"library"},{"name":"color","type":{"text":"'currentColor' | 'primary' | 'white'"},"default":"'currentColor'","description":"The color of the icon.\n\"current\" refers to currentColor and makes it possible to easily style the icon from outside without any CSS variables.","fieldName":"color","attribute":"color"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Icons are symbols that can be used to represent various options within an application.","status":"stable","since":"1.0","tagName":"sd-icon","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdIcon","module":"components/icon/icon.js"}},{"kind":"custom-element-definition","name":"sd-icon","declaration":{"name":"SdIcon","module":"components/icon/icon.js"}},{"kind":"custom-element-definition","name":"sd-icon","declaration":{"name":"SdIcon","module":"components/icon/icon.js"}}]},{"kind":"javascript-module","path":"components/icon/library.system.js","declarations":[{"kind":"variable","name":"icons","type":{"text":"object"},"default":"{\n 'chevron-down': `\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M20.257 6.333l-8.257 9.173-8.257-9.173c-0.181-0.181-0.431-0.292-0.707-0.292-0.552 0-1 0.448-1 1 0 0.238 0.083 0.456 0.222 0.628l-0.001-0.002 9 10c0.184 0.204 0.449 0.331 0.743 0.331s0.56-0.127 0.743-0.33l0.001-0.001 9-10c0.137-0.17 0.22-0.388 0.22-0.626 0-0.552-0.448-1-1-1-0.276 0-0.526 0.112-0.707 0.293v0z\"></path>\n </svg>\n `,\n 'chevron-up': `\n <svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M12.743 6.333c-0.188-0.195-0.452-0.316-0.743-0.316s-0.555 0.121-0.743 0.315l-0 0-9 10c-0.137 0.17-0.22 0.388-0.22 0.626 0 0.552 0.448 1 1 1 0.276 0 0.526-0.112 0.707-0.293v0l8.257-9.173 8.257 9.173c0.181 0.181 0.431 0.292 0.707 0.292 0.552 0 1-0.448 1-1 0-0.238-0.083-0.456-0.222-0.628l0.001 0.002z\"></path>\n </svg>\n `\n}"},{"kind":"variable","name":"systemLibrary","type":{"text":"IconLibrary"},"default":"{\n name: 'system',\n resolver: (name: keyof typeof icons) => {\n if (name in icons) {\n return `data:image/svg+xml,${encodeURIComponent(icons[name])}`;\n }\n return '';\n },\n mutator: svg => svg.setAttribute('fill', 'currentColor')\n}"}],"exports":[{"kind":"js","name":"icons","declaration":{"name":"icons","module":"components/icon/library.system.js"}},{"kind":"js","name":"default","declaration":{"name":"systemLibrary","module":"components/icon/library.system.js"}}]},{"kind":"javascript-module","path":"components/icon/library.js","declarations":[{"kind":"function","name":"watchIcon","parameters":[{"name":"icon","type":{"text":"SdIcon"}}],"description":"Adds an icon to the list of watched icons."},{"kind":"function","name":"unwatchIcon","parameters":[{"name":"icon","type":{"text":"SdIcon"}}],"description":"Removes an icon from the list of watched icons."},{"kind":"function","name":"getIconLibrary","parameters":[{"name":"name","optional":true,"type":{"text":"string"}}],"description":"Returns a library from the registry."},{"kind":"function","name":"registerIconLibrary","parameters":[{"name":"name","type":{"text":"string"}},{"name":"options","type":{"text":"{ resolver: IconLibraryResolver; mutator?: IconLibraryMutator }"}}],"description":"Adds an icon library to the registry, or overrides an existing one."},{"kind":"function","name":"unregisterIconLibrary","parameters":[{"name":"name","type":{"text":"string"}}],"description":"Removes an icon library from the registry."}],"exports":[{"kind":"js","name":"watchIcon","declaration":{"name":"watchIcon","module":"components/icon/library.js"}},{"kind":"js","name":"unwatchIcon","declaration":{"name":"unwatchIcon","module":"components/icon/library.js"}},{"kind":"js","name":"getIconLibrary","declaration":{"name":"getIconLibrary","module":"components/icon/library.js"}},{"kind":"js","name":"registerIconLibrary","declaration":{"name":"registerIconLibrary","module":"components/icon/library.js"}},{"kind":"js","name":"unregisterIconLibrary","declaration":{"name":"unregisterIconLibrary","module":"components/icon/library.js"}}]},{"kind":"javascript-module","path":"components/icon/request.js","declarations":[{"kind":"function","name":"requestIcon","return":{"type":{"text":"Promise<IconFile>"}},"parameters":[{"name":"url","type":{"text":"string"}}]}],"exports":[{"kind":"js","name":"requestIcon","declaration":{"name":"requestIcon","module":"components/icon/request.js"}}]},{"kind":"javascript-module","path":"components/include/include.styles.js","declarations":[],"exports":[{"kind":"js","name":"default","declaration":{"module":"components/include/include.styles.js"}}]},{"kind":"javascript-module","path":"components/include/include.js","declarations":[{"kind":"class","description":"","name":"SdInclude","members":[{"kind":"field","name":"src","type":{"text":"string"},"description":"The location of the HTML file to include. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.","attribute":"src"},{"kind":"field","name":"mode","type":{"text":"'cors' | 'no-cors' | 'same-origin'"},"default":"'cors'","description":"The fetch mode to use.","attribute":"mode"},{"kind":"field","name":"allowScripts","type":{"text":"boolean"},"default":"false","description":"Allows included scripts to be executed. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.","attribute":"allow-scripts"},{"kind":"method","name":"executeScript","privacy":"private","parameters":[{"name":"script","type":{"text":"HTMLScriptElement"}}]},{"kind":"method","name":"handleSrcChange"}],"events":[{"description":"Emitted when the included file is loaded.","name":"sd-load"},{"type":{"text":"{ status: number }"},"description":"Emitted when the included file fails to load due to an error.","name":"sd-error"}],"attributes":[{"name":"src","type":{"text":"string"},"description":"The location of the HTML file to include. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.","fieldName":"src","attribute":"src"},{"name":"mode","type":{"text":"'cors' | 'no-cors' | 'same-origin'"},"default":"'cors'","description":"The fetch mode to use.","fieldName":"mode","attribute":"mode"},{"name":"allow-scripts","type":{"text":"boolean"},"default":"false","description":"Allows included scripts to be executed. Be sure you trust the content you are including as it will be executed as\ncode and can result in XSS attacks.","fieldName":"allowScripts","attribute":"allow-scripts"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Includes give you the power to embed external HTML files into the page.","documentation":"https://solid.union-investment.com/[storybook-link]/include","status":"stable","since":"1.0","tagName":"sd-include","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdInclude","module":"components/include/include.js"}},{"kind":"custom-element-definition","name":"sd-include","declaration":{"name":"SdInclude","module":"components/include/include.js"}},{"kind":"custom-element-definition","name":"sd-include","declaration":{"name":"SdInclude","module":"components/include/include.js"}}]},{"kind":"javascript-module","path":"components/include/request.js","declarations":[{"kind":"function","name":"requestInclude","return":{"type":{"text":"Promise<IncludeFile>"}},"parameters":[{"name":"src","type":{"text":"string"}},{"name":"mode","default":"'cors'","type":{"text":"'cors' | 'no-cors' | 'same-origin'"}}],"description":"Fetches an include file from a remote source. Caching is enabled so the origin is only pinged once."}],"exports":[{"kind":"js","name":"requestInclude","declaration":{"name":"requestInclude","module":"components/include/request.js"}}]},{"kind":"javascript-module","path":"components/link/link.js","declarations":[{"kind":"class","description":"","name":"SdLink","cssParts":[{"description":"The component's base wrapper.","name":"base"},{"description":"The container that wraps the left icon area.","name":"icon-left"},{"description":"The link's label.","name":"label"},{"description":"The container that wraps the right icon area.","name":"icon-right"}],"slots":[{"description":"The default slot.","name":""},{"description":"The icon to display on the left side of the link.","name":"icon-left"},{"description":"The icon to display on the right side of the link.","name":"icon-right"}],"members":[{"kind":"field","name":"hasSlotController","privacy":"private","default":"new HasSlotController(this, '[default]', 'icon-left', 'icon-right')"},{"kind":"field","name":"size","type":{"text":"'inherit' | 'lg' | 'sm'"},"default":"'inherit'","description":"The link's size.","attribute":"size","reflects":true},{"kind":"field","name":"inverted","type":{"text":"boolean"},"default":"false","description":"Inverts the link.","attribute":"inverted","reflects":true},{"kind":"field","name":"standalone","type":{"text":"boolean"},"default":"false","description":"Control the layout of icon and text within the component and the component's positioning.","attribute":"standalone","reflects":true},{"kind":"field","name":"href","type":{"text":"string"},"default":"''","description":"When not set, the link will render as disabled.","attribute":"href"},{"kind":"field","name":"target","type":{"text":"'_blank' | '_parent' | '_self' | '_top'"},"description":"Tells the browser where to open the link. Only used when `href` is present.","attribute":"target"},{"kind":"field","name":"download","type":{"text":"string | undefined"},"description":"Tells the browser to download the linked file as this filename. Only used when `href` is present.","attribute":"download"},{"kind":"method","name":"handleBlur","privacy":"private"},{"kind":"method","name":"handleFocus","privacy":"private"},{"kind":"method","name":"focus","parameters":[{"name":"options","optional":true,"type":{"text":"FocusOptions"}}],"description":"Sets focus on the button."},{"kind":"method","name":"blur","description":"Removes focus from the button."}],"events":[{"description":"Emitted when the link loses focus.","name":"sd-blur"},{"description":"Emitted when the link gains focus.","name":"sd-focus"}],"attributes":[{"name":"size","type":{"text":"'inherit' | 'lg' | 'sm'"},"default":"'inherit'","description":"The link's size.","fieldName":"size","attribute":"size"},{"name":"inverted","type":{"text":"boolean"},"default":"false","description":"Inverts the link.","fieldName":"inverted","attribute":"inverted"},{"name":"standalone","type":{"text":"boolean"},"default":"false","description":"Control the layout of icon and text within the component and the component's positioning.","fieldName":"standalone","attribute":"standalone"},{"name":"href","type":{"text":"string"},"default":"''","description":"When not set, the link will render as disabled.","fieldName":"href","attribute":"href"},{"name":"target","type":{"text":"'_blank' | '_parent' | '_self' | '_top'"},"description":"Tells the browser where to open the link. Only used when `href` is present.","fieldName":"target","attribute":"target"},{"name":"download","type":{"text":"string | undefined"},"description":"Tells the browser to download the linked file as this filename. Only used when `href` is present.","fieldName":"download","attribute":"download"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"A link component.","documentation":"https://solid.union-investment.com/[storybook-link]/link","status":"experimental","since":"1.2","tagName":"sd-link","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdLink","module":"components/link/link.js"}},{"kind":"custom-element-definition","name":"sd-link","declaration":{"name":"SdLink","module":"components/link/link.js"}},{"kind":"custom-element-definition","name":"sd-link","declaration":{"name":"SdLink","module":"components/link/link.js"}}]},{"kind":"javascript-module","path":"components/spinner/spinner.js","declarations":[{"kind":"class","description":"","name":"SdSpinner","members":[{"kind":"field","name":"color","type":{"text":"'primary' | 'white' | 'currentColor'"},"default":"'currentColor'","description":"The color color of the spinner.","attribute":"color","reflects":true},{"kind":"field","name":"localize","privacy":"private","default":"new LocalizeController(this)"}],"attributes":[{"name":"color","type":{"text":"'primary' | 'white' | 'currentColor'"},"default":"'currentColor'","description":"The color color of the spinner.","fieldName":"color","attribute":"color"}],"superclass":{"name":"SolidElement","module":"/src/internal/solid-element"},"summary":"Spinners are used to show the progress of an indeterminate operation.","documentation":"https://solid.union-investment.com/[storybook-link]/spinner","status":"stable","since":"1.0","tagName":"sd-spinner","customElement":true}],"exports":[{"kind":"js","name":"default","declaration":{"name":"SdSpinner","module":"components/spinner/spinner.js"}},{"kind":"custom-element-definition","name":"sd-spinner","declaration":{"name":"SdSpinner","module":"components/spinner/spinner.js"}},{"kind":"custom-element-definition","name":"sd-spinner","declaration":{"name":"SdSpinner","module":"components/spinner/spinner.js"}}]}],"package":{"name":"@solid-design-system/components","description":"Solid Design System: Components","version":"1.2.0","author":{"name":"Union Investment"},"homepage":"https://solid-design-system.fe.union-investment.de/x.x.x/storybook/","license":"MIT"}}
@@ -0,0 +1,23 @@
1
+ import '../icon/icon';
2
+ import SolidElement from '../../internal/solid-element';
3
+ export default class SdAccordion extends SolidElement {
4
+ private readonly localize;
5
+ accordion: HTMLElement;
6
+ header: HTMLElement;
7
+ body: HTMLElement;
8
+ open: boolean;
9
+ summary: string;
10
+ firstUpdated(): void;
11
+ private handleSummaryClick;
12
+ private handleSummaryKeyDown;
13
+ handleOpenChange(): Promise<void>;
14
+ show(): Promise<void>;
15
+ hide(): Promise<void>;
16
+ render(): import("lit").TemplateResult<1>;
17
+ static styles: import("lit").CSSResultGroup[];
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ 'sd-accordion': SdAccordion;
22
+ }
23
+ }
@@ -0,0 +1,152 @@
1
+ import "../icon/icon.js";
2
+ import { stopAnimations, animateTo, shimKeyframesHeightAuto } from "../../internal/animate.js";
3
+ import { css, html } from "lit";
4
+ import { query, property, customElement } from "lit/decorators.js";
5
+ import { setDefaultAnimation, getAnimation } from "../../utilities/animation-registry.js";
6
+ import { LocalizeController } from "../../utilities/localize.js";
7
+ import { waitForEvent } from "../../internal/event.js";
8
+ import { watch } from "../../internal/watch.js";
9
+ import cx from "classix";
10
+ import SolidElement from "../../internal/solid-element.js";
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __decorateClass = (decorators, target, key, kind) => {
14
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
15
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
16
+ if (decorator = decorators[i])
17
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
18
+ if (kind && result)
19
+ __defProp(target, key, result);
20
+ return result;
21
+ };
22
+ let SdAccordion = class extends SolidElement {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.localize = new LocalizeController(this);
26
+ this.open = false;
27
+ }
28
+ firstUpdated() {
29
+ this.body.hidden = !this.open;
30
+ this.body.style.height = this.open ? "auto" : "0";
31
+ }
32
+ handleSummaryClick() {
33
+ this.header.focus();
34
+ if (this.open) {
35
+ this.hide();
36
+ } else {
37
+ this.show();
38
+ }
39
+ }
40
+ handleSummaryKeyDown(event) {
41
+ if (event.key === "Enter" || event.key === " ") {
42
+ event.preventDefault();
43
+ if (this.open) {
44
+ this.hide();
45
+ } else {
46
+ this.show();
47
+ }
48
+ }
49
+ if (event.key === "ArrowUp" || event.key === "ArrowLeft") {
50
+ event.preventDefault();
51
+ this.hide();
52
+ }
53
+ if (event.key === "ArrowDown" || event.key === "ArrowRight") {
54
+ event.preventDefault();
55
+ this.show();
56
+ }
57
+ }
58
+ async handleOpenChange() {
59
+ if (this.open) {
60
+ const slShow = this.emit("sd-show", { cancelable: true });
61
+ if (slShow.defaultPrevented) {
62
+ this.open = false;
63
+ return;
64
+ }
65
+ await stopAnimations(this.body);
66
+ this.body.hidden = false;
67
+ const { keyframes, options } = getAnimation(this, "accordion.show", { dir: this.localize.dir() });
68
+ await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);
69
+ this.body.style.height = "auto";
70
+ this.emit("sd-after-show");
71
+ } else {
72
+ const slHide = this.emit("sd-hide", { cancelable: true });
73
+ if (slHide.defaultPrevented) {
74
+ this.open = true;
75
+ return;
76
+ }
77
+ await stopAnimations(this.body);
78
+ const { keyframes, options } = getAnimation(this, "accordion.hide", { dir: this.localize.dir() });
79
+ await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);
80
+ this.body.hidden = true;
81
+ this.body.style.height = "auto";
82
+ this.emit("sd-after-hide");
83
+ }
84
+ }
85
+ /** Shows the accordion. */
86
+ async show() {
87
+ if (this.open) {
88
+ return void 0;
89
+ }
90
+ this.open = true;
91
+ return waitForEvent(this, "sd-after-show");
92
+ }
93
+ /** Hides the accordion */
94
+ async hide() {
95
+ if (!this.open) {
96
+ return void 0;
97
+ }
98
+ this.open = false;
99
+ return waitForEvent(this, "sd-after-hide");
100
+ }
101
+ render() {
102
+ return html`<div part="base" class="outline outline-1 outline-neutral-400 -outline-offset-1"><header part="header" id="header" class="${cx(
103
+ "flex text-base gap-4 font-bold items-center cursor-pointer select-none px-4 py-3 focus:outline focus:outline-primary focus:outline-2 focus:outline-offset-2 focus-visible:focus",
104
+ this.open ? "bg-white text-accent hover:bg-neutral-200" : "text-primary bg-neutral-100 hover:bg-neutral-200"
105
+ )}" role="button" aria-expanded="${this.open ? "true" : "false"}" aria-controls="content" tabindex="0" @click="${this.handleSummaryClick}" @keydown="${this.handleSummaryKeyDown}"><slot name="summary" part="summary" class="flex flex-auto items-center text-left">${this.summary}</slot><span part="summary-icon" class="${cx(
106
+ "flex flex-grow-0 flex-shrink-0 flex-auto items-center transition-all ease-in-out duration-300 text-xl",
107
+ this.open && "rotate-180"
108
+ )}"><slot name="expand-icon" class="${cx(this.open && "hidden")}"><sd-icon library="system" name="chevron-down"></sd-icon></slot><slot name="collapse-icon" class="${cx(!this.open && "hidden")}"><sd-icon library="system" name="chevron-down"></sd-icon></slot></span></header><div part="content" id="content" class="overflow-hidden"><slot class="block px-4 py-6" role="region" aria-labelledby="header"></slot></div></div>`;
109
+ }
110
+ };
111
+ SdAccordion.styles = [
112
+ SolidElement.styles,
113
+ css`:host{display:block}`
114
+ ];
115
+ __decorateClass([
116
+ query('[part="base"]')
117
+ ], SdAccordion.prototype, "accordion", 2);
118
+ __decorateClass([
119
+ query('[part="header"]')
120
+ ], SdAccordion.prototype, "header", 2);
121
+ __decorateClass([
122
+ query('[part="content"]')
123
+ ], SdAccordion.prototype, "body", 2);
124
+ __decorateClass([
125
+ property({ type: Boolean, reflect: true })
126
+ ], SdAccordion.prototype, "open", 2);
127
+ __decorateClass([
128
+ property()
129
+ ], SdAccordion.prototype, "summary", 2);
130
+ __decorateClass([
131
+ watch("open", { waitUntilFirstUpdate: true })
132
+ ], SdAccordion.prototype, "handleOpenChange", 1);
133
+ SdAccordion = __decorateClass([
134
+ customElement("sd-accordion")
135
+ ], SdAccordion);
136
+ setDefaultAnimation("accordion.show", {
137
+ keyframes: [
138
+ { height: "0", opacity: "0" },
139
+ { height: "auto", opacity: "1" }
140
+ ],
141
+ options: { duration: 300, easing: "ease" }
142
+ });
143
+ setDefaultAnimation("accordion.hide", {
144
+ keyframes: [
145
+ { height: "auto", opacity: "1" },
146
+ { height: "0", opacity: "0" }
147
+ ],
148
+ options: { duration: 300, easing: "ease" }
149
+ });
150
+ export {
151
+ SdAccordion as default
152
+ };
@@ -0,0 +1,16 @@
1
+ import '../accordion/accordion';
2
+ import SolidElement from '../../internal/solid-element';
3
+ export default class SdAccordionGroup extends SolidElement {
4
+ _accordionsInDefaultSlot: HTMLElement[];
5
+ closeOthers: boolean;
6
+ connectedCallback(): void;
7
+ disconnectedCallback(): void;
8
+ private handleAccordionShow;
9
+ render(): import("lit").TemplateResult<1>;
10
+ static styles: import("lit").CSSResultGroup[];
11
+ }
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'sd-accordion-group': SdAccordionGroup;
15
+ }
16
+ }
@@ -0,0 +1,63 @@
1
+ import "../accordion/accordion.js";
2
+ import { css, html } from "lit";
3
+ import { queryAssignedElements, property, customElement } from "lit/decorators.js";
4
+ import componentStyles from "../../styles/component.styles.js";
5
+ import SolidElement from "../../internal/solid-element.js";
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result)
14
+ __defProp(target, key, result);
15
+ return result;
16
+ };
17
+ let SdAccordionGroup = class extends SolidElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.closeOthers = false;
21
+ this.handleAccordionShow = (event) => {
22
+ if (this.closeOthers) {
23
+ this._accordionsInDefaultSlot.forEach((accordionElement) => {
24
+ if (accordionElement === event.target) {
25
+ return;
26
+ }
27
+ if (accordionElement.parentNode !== event.target.parentNode) {
28
+ return;
29
+ }
30
+ accordionElement.removeAttribute("open");
31
+ });
32
+ }
33
+ };
34
+ }
35
+ connectedCallback() {
36
+ super.connectedCallback();
37
+ this.addEventListener("sd-show", this.handleAccordionShow);
38
+ }
39
+ disconnectedCallback() {
40
+ super.disconnectedCallback();
41
+ this.removeEventListener("sd-show", this.handleAccordionShow);
42
+ }
43
+ render() {
44
+ return html`<div part="base"><slot></slot></div>`;
45
+ }
46
+ };
47
+ SdAccordionGroup.styles = [
48
+ componentStyles,
49
+ SolidElement.styles,
50
+ css`:host{display:block}::slotted(sd-accordion:not(:first-of-type)){margin-top:-1px}`
51
+ ];
52
+ __decorateClass([
53
+ queryAssignedElements({ selector: "sd-accordion" })
54
+ ], SdAccordionGroup.prototype, "_accordionsInDefaultSlot", 2);
55
+ __decorateClass([
56
+ property({ attribute: "close-others", type: Boolean })
57
+ ], SdAccordionGroup.prototype, "closeOthers", 2);
58
+ SdAccordionGroup = __decorateClass([
59
+ customElement("sd-accordion-group")
60
+ ], SdAccordionGroup);
61
+ export {
62
+ SdAccordionGroup as default
63
+ };
@@ -0,0 +1,13 @@
1
+ import SolidElement from '../../internal/solid-element';
2
+ export default class SdDivider extends SolidElement {
3
+ orientation: 'horizontal' | 'vertical';
4
+ inverted: boolean;
5
+ connectedCallback(): void;
6
+ render(): import("lit").TemplateResult<1>;
7
+ static styles: import("lit").CSSResultGroup[];
8
+ }
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ 'sd-divider': SdDivider;
12
+ }
13
+ }
@@ -0,0 +1,50 @@
1
+ import { css, html } from "lit";
2
+ import { property, customElement } from "lit/decorators.js";
3
+ import componentStyles from "../../styles/component.styles.js";
4
+ import cx from "classix";
5
+ import SolidElement from "../../internal/solid-element.js";
6
+ var __defProp = Object.defineProperty;
7
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
8
+ var __decorateClass = (decorators, target, key, kind) => {
9
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
10
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
11
+ if (decorator = decorators[i])
12
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
13
+ if (kind && result)
14
+ __defProp(target, key, result);
15
+ return result;
16
+ };
17
+ let SdDivider = class extends SolidElement {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.orientation = "horizontal";
21
+ this.inverted = false;
22
+ }
23
+ connectedCallback() {
24
+ super.connectedCallback();
25
+ this.setAttribute("role", "separator");
26
+ }
27
+ render() {
28
+ return html`<hr part="main" class="${cx(
29
+ this.inverted ? "border-primary-400" : "border-neutral-400",
30
+ this.orientation === "horizontal" ? "border-t w-full" : " border-l h-full"
31
+ )}">`;
32
+ }
33
+ };
34
+ SdDivider.styles = [
35
+ componentStyles,
36
+ SolidElement.styles,
37
+ css`:host{margin:0}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`
38
+ ];
39
+ __decorateClass([
40
+ property({ reflect: true })
41
+ ], SdDivider.prototype, "orientation", 2);
42
+ __decorateClass([
43
+ property({ type: Boolean, reflect: true })
44
+ ], SdDivider.prototype, "inverted", 2);
45
+ SdDivider = __decorateClass([
46
+ customElement("sd-divider")
47
+ ], SdDivider);
48
+ export {
49
+ SdDivider as default
50
+ };
@@ -0,0 +1,10 @@
1
+ export declare function animateTo(el: HTMLElement, keyframes: Keyframe[], options?: KeyframeAnimationOptions): Promise<unknown>;
2
+ export declare function parseDuration(delay: number | string): number;
3
+ export declare function prefersReducedMotion(): boolean;
4
+ export declare function stopAnimations(el: HTMLElement): Promise<unknown[]>;
5
+ export declare function shimKeyframesHeightAuto(keyframes: Keyframe[], calculatedHeight: number): {
6
+ height: string | number | null | undefined;
7
+ composite?: CompositeOperationOrAuto | undefined;
8
+ easing?: string | undefined;
9
+ offset?: number | null | undefined;
10
+ }[];
@@ -0,0 +1,41 @@
1
+ function animateTo(el, keyframes, options) {
2
+ return new Promise((resolve) => {
3
+ if ((options == null ? void 0 : options.duration) === Infinity) {
4
+ throw new Error("Promise-based animations must be finite.");
5
+ }
6
+ const animation = el.animate(keyframes, {
7
+ ...options,
8
+ duration: prefersReducedMotion() ? 0 : options.duration
9
+ });
10
+ animation.addEventListener("cancel", resolve, { once: true });
11
+ animation.addEventListener("finish", resolve, { once: true });
12
+ });
13
+ }
14
+ function prefersReducedMotion() {
15
+ const query = window.matchMedia("(prefers-reduced-motion: reduce)");
16
+ return query.matches;
17
+ }
18
+ function stopAnimations(el) {
19
+ return Promise.all(
20
+ el.getAnimations().map((animation) => {
21
+ return new Promise((resolve) => {
22
+ const handleAnimationEvent = requestAnimationFrame(resolve);
23
+ animation.addEventListener("cancel", () => handleAnimationEvent, { once: true });
24
+ animation.addEventListener("finish", () => handleAnimationEvent, { once: true });
25
+ animation.cancel();
26
+ });
27
+ })
28
+ );
29
+ }
30
+ function shimKeyframesHeightAuto(keyframes, calculatedHeight) {
31
+ return keyframes.map((keyframe) => ({
32
+ ...keyframe,
33
+ height: keyframe.height === "auto" ? `${calculatedHeight}px` : keyframe.height
34
+ }));
35
+ }
36
+ export {
37
+ animateTo,
38
+ prefersReducedMotion,
39
+ shimKeyframesHeightAuto,
40
+ stopAnimations
41
+ };
@@ -0,0 +1 @@
1
+ export declare function waitForEvent(el: HTMLElement, eventName: string): Promise<void>;
@@ -0,0 +1,14 @@
1
+ function waitForEvent(el, eventName) {
2
+ return new Promise((resolve) => {
3
+ function done(event) {
4
+ if (event.target === el) {
5
+ el.removeEventListener(eventName, done);
6
+ resolve();
7
+ }
8
+ }
9
+ el.addEventListener(eventName, done);
10
+ });
11
+ }
12
+ export {
13
+ waitForEvent
14
+ };