@solid-design-system/components 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/es/button.js +1 -1
- package/dist/components/es/icon.js +3 -3
- package/dist/components/es/solid-components.js +1 -1
- package/dist/components/es/solid-components2.js +1 -0
- package/dist/components/es/spinner.js +1 -1
- package/dist/components/umd/solid-components.js +33 -33
- package/dist/custom-elements.json +1 -1
- package/dist/package/components/icon/icon.js +1 -1
- package/dist/package/components/icon/library.js +18 -0
- package/dist/package/components/spinner/spinner.js +1 -1
- package/dist/package/solid-components.d.ts +1 -0
- package/dist/package/solid-components.js +4 -1
- package/dist/versioned-components/es/button.js +18 -18
- package/dist/versioned-components/es/icon.js +3 -3
- package/dist/versioned-components/es/include.js +1 -1
- package/dist/versioned-components/es/link.js +1 -1
- package/dist/versioned-components/es/solid-components.js +1 -1
- package/dist/versioned-components/es/solid-components2.js +1 -0
- package/dist/versioned-components/es/spinner.js +1 -1
- package/dist/versioned-package/components/button/button.d.ts +1 -1
- package/dist/versioned-package/components/button/button.js +18 -18
- package/dist/versioned-package/components/icon/icon.d.ts +1 -1
- package/dist/versioned-package/components/icon/icon.js +2 -2
- package/dist/versioned-package/components/icon/library.js +18 -0
- package/dist/versioned-package/components/include/include.d.ts +1 -1
- package/dist/versioned-package/components/include/include.js +1 -1
- package/dist/versioned-package/components/link/link.d.ts +1 -1
- package/dist/versioned-package/components/link/link.js +2 -2
- package/dist/versioned-package/components/spinner/spinner.d.ts +1 -1
- package/dist/versioned-package/components/spinner/spinner.js +2 -2
- package/dist/versioned-package/internal/form.js +1 -1
- package/dist/versioned-package/solid-components.d.ts +1 -0
- package/dist/versioned-package/solid-components.js +4 -1
- package/dist/vscode.html-custom-data.json +5 -5
- package/dist/web-types.json +6 -6
- package/package.json +12 -23
- package/dist/components/es/library.js +0 -1
- package/dist/components/es/library.system.js +0 -1
- package/dist/versioned-components/es/library.js +0 -1
- package/dist/versioned-components/es/library.system.js +0 -1
|
@@ -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.0","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/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,6 +1,6 @@
|
|
|
1
1
|
import { css, html } from "lit";
|
|
2
2
|
import { state, property, customElement } from "lit/decorators.js";
|
|
3
|
-
import { unwatchIcon, getIconLibrary
|
|
3
|
+
import { watchIcon, unwatchIcon, getIconLibrary } from "./library.js";
|
|
4
4
|
import { requestIcon } from "./request.js";
|
|
5
5
|
import { unsafeSVG } from "lit/directives/unsafe-svg.js";
|
|
6
6
|
import { watch } from "../../internal/watch.js";
|
|
@@ -10,8 +10,26 @@ function unwatchIcon(icon) {
|
|
|
10
10
|
function getIconLibrary(name) {
|
|
11
11
|
return registry.find((lib) => lib.name === name);
|
|
12
12
|
}
|
|
13
|
+
function registerIconLibrary(name, options) {
|
|
14
|
+
unregisterIconLibrary(name);
|
|
15
|
+
registry.push({
|
|
16
|
+
name,
|
|
17
|
+
resolver: options.resolver,
|
|
18
|
+
mutator: options.mutator
|
|
19
|
+
});
|
|
20
|
+
watchedIcons.forEach((icon) => {
|
|
21
|
+
if (icon.library === name) {
|
|
22
|
+
icon.setIcon();
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function unregisterIconLibrary(name) {
|
|
27
|
+
registry = registry.filter((lib) => lib.name !== name);
|
|
28
|
+
}
|
|
13
29
|
export {
|
|
14
30
|
getIconLibrary,
|
|
31
|
+
registerIconLibrary,
|
|
32
|
+
unregisterIconLibrary,
|
|
15
33
|
unwatchIcon,
|
|
16
34
|
watchIcon
|
|
17
35
|
};
|
|
@@ -28,7 +28,7 @@ let SdSpinner = class extends SolidElement {
|
|
|
28
28
|
white: "text-white",
|
|
29
29
|
currentColor: ""
|
|
30
30
|
}[this.color]
|
|
31
|
-
)}" aria-
|
|
31
|
+
)}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`;
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
SdSpinner.styles = [
|
|
@@ -3,4 +3,5 @@ export { default as SdIcon } from './components/icon/icon';
|
|
|
3
3
|
export { default as SdInclude } from './components/include/include';
|
|
4
4
|
export { default as SdLink } from './components/link/link';
|
|
5
5
|
export { default as SdSpinner } from './components/spinner/spinner';
|
|
6
|
+
export * from './utilities/icon-library';
|
|
6
7
|
export * from './utilities/localize';
|
|
@@ -3,6 +3,7 @@ import { default as default3 } from "./components/icon/icon.js";
|
|
|
3
3
|
import { default as default4 } from "./components/include/include.js";
|
|
4
4
|
import { default as default5 } from "./components/link/link.js";
|
|
5
5
|
import { default as default6 } from "./components/spinner/spinner.js";
|
|
6
|
+
import { registerIconLibrary, unregisterIconLibrary } from "./components/icon/library.js";
|
|
6
7
|
import { LocalizeController } from "./utilities/localize.js";
|
|
7
8
|
export {
|
|
8
9
|
LocalizeController,
|
|
@@ -10,5 +11,7 @@ export {
|
|
|
10
11
|
default3 as SdIcon,
|
|
11
12
|
default4 as SdInclude,
|
|
12
13
|
default5 as SdLink,
|
|
13
|
-
default6 as SdSpinner
|
|
14
|
+
default6 as SdSpinner,
|
|
15
|
+
registerIconLibrary,
|
|
16
|
+
unregisterIconLibrary
|
|
14
17
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./spinner.js";import{x as t,i as e}from"./lit-element.js";import{S as o,l as i,n as r,e as s}from"./solid-element.js";import{t as a}from"./state.js";import{H as n,l,i as d}from"./if-defined.js";import{w as h}from"./watch.js";import{c as u}from"./component.styles.js";import{t as p}from"./classix.js";const m=new WeakMap,c=new WeakMap,b=new WeakMap;class f{constructor(t,e){(this.host=t).addController(this),this.options={form:t=>{if(t.hasAttribute("form")&&""!==t.getAttribute("form")){const e=t.getRootNode(),o=t.getAttribute("form");if(o)return e.getElementById(o)}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>t.disabled??!1,reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),setValue:(t,e)=>t.value=e,...e},this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleUserInput=this.handleUserInput.bind(this)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),this.host.addEventListener("sd-input",this.handleUserInput)}hostDisconnected(){this.detachForm(),this.host.removeEventListener("sd-input",this.handleUserInput)}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.checkValidity())}attachForm(t){t?(this.form=t,m.has(this.form)?m.get(this.form).add(this.host):m.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),b.has(this.form)||(b.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&(null==(t=m.get(this.form))||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),b.has(this.form)&&(this.form.reportValidity=b.get(this.form),b.delete(this.form))),this.form=void 0}handleFormData(t){const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),r="sd-1-0-
|
|
1
|
+
import"./spinner.js";import{x as t,i as e}from"./lit-element.js";import{S as o,l as i,n as r,e as s}from"./solid-element.js";import{t as a}from"./state.js";import{H as n,l,i as d}from"./if-defined.js";import{w as h}from"./watch.js";import{c as u}from"./component.styles.js";import{t as p}from"./classix.js";import"./solid-components2.js";const m=new WeakMap,c=new WeakMap,b=new WeakMap;class f{constructor(t,e){(this.host=t).addController(this),this.options={form:t=>{if(t.hasAttribute("form")&&""!==t.getAttribute("form")){const e=t.getRootNode(),o=t.getAttribute("form");if(o)return e.getElementById(o)}return t.closest("form")},name:t=>t.name,value:t=>t.value,defaultValue:t=>t.defaultValue,disabled:t=>t.disabled??!1,reportValidity:t=>"function"!=typeof t.reportValidity||t.reportValidity(),setValue:(t,e)=>t.value=e,...e},this.handleFormData=this.handleFormData.bind(this),this.handleFormSubmit=this.handleFormSubmit.bind(this),this.handleFormReset=this.handleFormReset.bind(this),this.reportFormValidity=this.reportFormValidity.bind(this),this.handleUserInput=this.handleUserInput.bind(this)}hostConnected(){const t=this.options.form(this.host);t&&this.attachForm(t),this.host.addEventListener("sd-input",this.handleUserInput)}hostDisconnected(){this.detachForm(),this.host.removeEventListener("sd-input",this.handleUserInput)}hostUpdated(){const t=this.options.form(this.host);t||this.detachForm(),t&&this.form!==t&&(this.detachForm(),this.attachForm(t)),this.host.hasUpdated&&this.setValidity(this.host.checkValidity())}attachForm(t){t?(this.form=t,m.has(this.form)?m.get(this.form).add(this.host):m.set(this.form,new Set([this.host])),this.form.addEventListener("formdata",this.handleFormData),this.form.addEventListener("submit",this.handleFormSubmit),this.form.addEventListener("reset",this.handleFormReset),b.has(this.form)||(b.set(this.form,this.form.reportValidity),this.form.reportValidity=()=>this.reportFormValidity())):this.form=void 0}detachForm(){var t;this.form&&(null==(t=m.get(this.form))||t.delete(this.host),this.form.removeEventListener("formdata",this.handleFormData),this.form.removeEventListener("submit",this.handleFormSubmit),this.form.removeEventListener("reset",this.handleFormReset),b.has(this.form)&&(this.form.reportValidity=b.get(this.form),b.delete(this.form))),this.form=void 0}handleFormData(t){const e=this.options.disabled(this.host),o=this.options.name(this.host),i=this.options.value(this.host),r="sd-1-0-2-button"===this.host.tagName.toLowerCase();!e&&!r&&"string"==typeof o&&o.length>0&&typeof i<"u"&&(Array.isArray(i)?i.forEach((e=>{t.formData.append(o,e.toString())})):t.formData.append(o,i.toString()))}handleFormSubmit(t){var e;const o=this.options.disabled(this.host),i=this.options.reportValidity;this.form&&!this.form.noValidate&&(null==(e=m.get(this.form))||e.forEach((t=>{this.setUserInteracted(t,!0)}))),this.form&&!this.form.noValidate&&!o&&!i(this.host)&&(t.preventDefault(),t.stopImmediatePropagation())}handleFormReset(){this.options.setValue(this.host,this.options.defaultValue(this.host)),this.setUserInteracted(this.host,!1)}async handleUserInput(){await this.host.updateComplete,this.setUserInteracted(this.host,!0)}reportFormValidity(){if(this.form&&!this.form.noValidate){const t=this.form.querySelectorAll("*");for(const e of t)if("function"==typeof e.reportValidity&&!e.reportValidity())return!1}return!0}setUserInteracted(t,e){c.set(t,e),t.requestUpdate()}doAction(t,e){if(this.form){const o=document.createElement("button");o.type=t,o.style.position="absolute",o.style.width="0",o.style.height="0",o.style.clipPath="inset(50%)",o.style.overflow="hidden",o.style.whiteSpace="nowrap",e&&(o.name=e.name,o.value=e.value,["formaction","formenctype","formmethod","formnovalidate","formtarget"].forEach((t=>{e.hasAttribute(t)&&o.setAttribute(t,e.getAttribute(t))}))),this.form.append(o),o.click(),o.remove()}}reset(t){this.doAction("reset",t)}submit(t){this.doAction("submit",t)}setValidity(t){var e;const o=this.host,i=!!c.get(o),r=!!o.required;null!=(e=this.form)&&e.noValidate?(o.removeAttribute("data-required"),o.removeAttribute("data-optional"),o.removeAttribute("data-invalid"),o.removeAttribute("data-valid"),o.removeAttribute("data-user-invalid"),o.removeAttribute("data-user-valid")):(o.toggleAttribute("data-required",r),o.toggleAttribute("data-optional",!r),o.toggleAttribute("data-invalid",!t),o.toggleAttribute("data-valid",t),o.toggleAttribute("data-user-invalid",!t&&i),o.toggleAttribute("data-user-valid",t&&i))}updateValidity(){const t=this.host;this.setValidity(t.checkValidity())}}
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2020 Google LLC
|
|
@@ -29,9 +29,9 @@ import"./spinner.js";import{x as t,i as e}from"./lit-element.js";import{S as o,l
|
|
|
29
29
|
part="icon-right"
|
|
30
30
|
class=${p("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",o["icon-only"]&&"hidden",o["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}>
|
|
31
31
|
</slot>
|
|
32
|
-
${this.loading?w`<sd-1-0-
|
|
32
|
+
${this.loading?w`<sd-1-0-2-spinner
|
|
33
33
|
class="${p("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"
|
|
34
|
-
></sd-1-0-
|
|
34
|
+
></sd-1-0-2-spinner>`:""}
|
|
35
35
|
</${e}>
|
|
36
36
|
`}};A.styles=[u,o.styles,e`
|
|
37
37
|
:host {
|
|
@@ -41,7 +41,7 @@ import"./spinner.js";import{x as t,i as e}from"./lit-element.js";import{S as o,l
|
|
|
41
41
|
cursor: pointer;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
-
sd-1-0-
|
|
44
|
+
sd-1-0-2-spinner {
|
|
45
45
|
--indicator-color: currentColor;
|
|
46
46
|
--track-color: var(--tw-varcolor-200);
|
|
47
47
|
}
|
|
@@ -60,11 +60,11 @@ import"./spinner.js";import{x as t,i as e}from"./lit-element.js";import{S as o,l
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
* sd-1-0-
|
|
63
|
+
* sd-1-0-2-icons should automatically resize correctly based on the button size.
|
|
64
64
|
*/
|
|
65
65
|
|
|
66
|
-
::slotted(sd-1-0-
|
|
67
|
-
sd-1-0-
|
|
66
|
+
::slotted(sd-1-0-2-icon),
|
|
67
|
+
sd-1-0-2-spinner {
|
|
68
68
|
font-size: calc(var(--tw-varspacing) / 2);
|
|
69
69
|
}
|
|
70
70
|
|
|
@@ -75,30 +75,30 @@ import"./spinner.js";import{x as t,i as e}from"./lit-element.js";import{S as o,l
|
|
|
75
75
|
// * buttons and we style them here instead.
|
|
76
76
|
// */
|
|
77
77
|
|
|
78
|
-
// :host(.sd-1-0-
|
|
78
|
+
// :host(.sd-1-0-2-button-group__button--first:not(.sd-1-0-2-button-group__button--last)) .button {
|
|
79
79
|
// border-start-end-radius: 0;
|
|
80
80
|
// border-end-end-radius: 0;
|
|
81
81
|
// }
|
|
82
82
|
|
|
83
|
-
// :host(.sd-1-0-
|
|
83
|
+
// :host(.sd-1-0-2-button-group__button--inner) .button {
|
|
84
84
|
// border-radius: 0;
|
|
85
85
|
// }
|
|
86
86
|
|
|
87
|
-
// :host(.sd-1-0-
|
|
87
|
+
// :host(.sd-1-0-2-button-group__button--last:not(.sd-1-0-2-button-group__button--first)) .button {
|
|
88
88
|
// border-start-start-radius: 0;
|
|
89
89
|
// border-end-start-radius: 0;
|
|
90
90
|
// }
|
|
91
91
|
|
|
92
92
|
// /* All except the first */
|
|
93
|
-
// :host(.sd-1-0-
|
|
93
|
+
// :host(.sd-1-0-2-button-group__button:not(.sd-1-0-2-button-group__button--first)) {
|
|
94
94
|
// margin-inline-start: calc(-1 * var(--sd-input-border-width));
|
|
95
95
|
// }
|
|
96
96
|
|
|
97
97
|
// /* Add a visual separator between solid buttons */
|
|
98
98
|
// :host(
|
|
99
|
-
// .sd-1-0-
|
|
100
|
-
// .sd-1-0-
|
|
101
|
-
// .sd-1-0-
|
|
99
|
+
// .sd-1-0-2-button-group__button:not(
|
|
100
|
+
// .sd-1-0-2-button-group__button--first,
|
|
101
|
+
// .sd-1-0-2-button-group__button--radio,
|
|
102
102
|
// [variant='default']
|
|
103
103
|
// ):not(:hover)
|
|
104
104
|
// )
|
|
@@ -113,13 +113,13 @@ import"./spinner.js";import{x as t,i as e}from"./lit-element.js";import{S as o,l
|
|
|
113
113
|
// }
|
|
114
114
|
|
|
115
115
|
// /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
|
|
116
|
-
// :host(.sd-1-0-
|
|
116
|
+
// :host(.sd-1-0-2-button-group__button--hover) {
|
|
117
117
|
// z-index: 1;
|
|
118
118
|
// }
|
|
119
119
|
|
|
120
120
|
// /* Focus and checked are always on top */
|
|
121
|
-
// :host(.sd-1-0-
|
|
122
|
-
// :host(.sd-1-0-
|
|
121
|
+
// :host(.sd-1-0-2-button-group__button--focus),
|
|
122
|
+
// :host(.sd-1-0-2-button-group__button[checked]) {
|
|
123
123
|
// z-index: 2;
|
|
124
124
|
// }
|
|
125
|
-
`],F([d("a, button")],A.prototype,"button",2),F([i({selector:"sd-1-0-
|
|
125
|
+
`],F([d("a, button")],A.prototype,"button",2),F([i({selector:"sd-1-0-2-icon"})],A.prototype,"_iconsInDefaultSlot",2),F([a()],A.prototype,"invalid",2),F([r()],A.prototype,"title",2),F([r({reflect:!0})],A.prototype,"variant",2),F([r({type:Boolean,reflect:!0})],A.prototype,"inverted",2),F([r({reflect:!0})],A.prototype,"size",2),F([r({type:Boolean,reflect:!0})],A.prototype,"disabled",2),F([r({type:Boolean,reflect:!0})],A.prototype,"loading",2),F([r()],A.prototype,"type",2),F([r()],A.prototype,"name",2),F([r()],A.prototype,"value",2),F([r()],A.prototype,"href",2),F([r()],A.prototype,"target",2),F([r()],A.prototype,"download",2),F([r()],A.prototype,"form",2),F([r({attribute:"formaction"})],A.prototype,"formAction",2),F([r({attribute:"formenctype"})],A.prototype,"formEnctype",2),F([r({attribute:"formmethod"})],A.prototype,"formMethod",2),F([r({attribute:"formnovalidate",type:Boolean})],A.prototype,"formNoValidate",2),F([r({attribute:"formtarget"})],A.prototype,"formTarget",2),F([h("disabled",{waitUntilFirstUpdate:!0})],A.prototype,"handleDisabledChange",1),A=F([s("sd-1-0-2-button")],A);export{A as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as t,T as e,x as r,i as s}from"./lit-element.js";import{S as i,n as o,e as a}from"./solid-element.js";import{t as l}from"./state.js";import{
|
|
1
|
+
import{A as t,T as e,x as r,i as s}from"./lit-element.js";import{S as i,n as o,e as a}from"./solid-element.js";import{t as l}from"./state.js";import{w as n,u as c,g as h}from"./solid-components2.js";import{requestIcon as p}from"./request.js";import{w as u}from"./watch.js";import{c as d}from"./component.styles.js";import"./request2.js";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
@@ -8,10 +8,10 @@ import{A as t,T as e,x as r,i as s}from"./lit-element.js";import{S as i,n as o,e
|
|
|
8
8
|
* @license
|
|
9
9
|
* Copyright 2017 Google LLC
|
|
10
10
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
11
|
-
*/class
|
|
11
|
+
*/class b extends m{constructor(e){if(super(e),this.et=t,2!==e.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===t||null==r)return this.ft=void 0,this.et=r;if(r===e)return r;if("string"!=typeof r)throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.et)return this.ft;this.et=r;const s=[r];return s.raw=s,this.ft={_$litType$:this.constructor.resultType,strings:s,values:[]}}}b.directiveName="unsafeHTML",b.resultType=1;
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
14
14
|
* Copyright 2017 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
class
|
|
17
|
+
class g extends b{}g.directiveName="unsafeSVG",g.resultType=2;const y=(v=g,(...t)=>({_$litDirective$:v,values:t}));var v,f=Object.defineProperty,w=Object.getOwnPropertyDescriptor,A=(t,e,r,s)=>{for(var i,o=s>1?void 0:s?w(e,r):e,a=t.length-1;a>=0;a--)(i=t[a])&&(o=(s?i(e,r,o):i(o))||o);return s&&o&&f(e,r,o),o};let $,x=class extends i{constructor(){super(...arguments),this.svg="",this.label="",this.library="default",this.color="currentColor"}connectedCallback(){super.connectedCallback(),n(this)}firstUpdated(){this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),c(this)}getUrl(){const t=h(this.library);return this.name&&t?t.resolver(this.name):this.src}handleLabelChange(){"string"==typeof this.label&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var t;const e=h(this.library),r=this.getUrl();if($||($=new DOMParser),r)try{const s=await p(r);if(r===this.getUrl())if(s.ok){const r=$.parseFromString(s.svg,"text/html").body.querySelector("svg");null!==r?(null==(t=null==e?void 0:e.mutator)||t.call(e,r),this.svg=r.outerHTML,this.emit("sd-load")):(this.svg="",this.emit("sd-error"))}else this.svg="",this.emit("sd-error")}catch{this.emit("sd-error")}else this.svg.length>0&&(this.svg="")}render(){return r`${y(this.svg)}`}};x.styles=[d,s`:host{display:inline-block;width:1em;height:1em;box-sizing:content-box!important}svg{display:block;height:100%;width:100%}:host([color=primary]) svg{color:rgb(var(--sd-color-primary,0 53 142) / var(--tw-text-opacity,1))}// text-primary :host([color=white]) svg{color:rgb(var(--sd-color-white,255 255 255) / var(--tw-text-opacity,1))}`],A([l()],x.prototype,"svg",2),A([o({reflect:!0})],x.prototype,"name",2),A([o()],x.prototype,"src",2),A([o()],x.prototype,"label",2),A([o({reflect:!0})],x.prototype,"library",2),A([o({reflect:!0})],x.prototype,"color",2),A([u("label")],x.prototype,"handleLabelChange",1),A([u(["name","src","library"])],x.prototype,"setIcon",1),x=A([a("sd-1-0-2-icon")],x);export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as t,n as e,e as r}from"./solid-element.js";import{x as s}from"./lit-element.js";import{requestInclude as o}from"./request2.js";import{w as i}from"./watch.js";import a from"./include.styles.js";import"./component.styles.js";var c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=(t,e,r,s)=>{for(var o,i=s>1?void 0:s?l(e,r):e,a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s?o(e,r,i):o(i))||i);return s&&i&&c(e,r,i),i};let p=class extends t{constructor(){super(...arguments),this.mode="cors",this.allowScripts=!1}executeScript(t){const e=document.createElement("script");[...t.attributes].forEach((t=>e.setAttribute(t.name,t.value))),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{const t=this.src,e=await o(t,this.mode);if(t!==this.src)return;if(!e.ok)return void this.emit("sd-error",{detail:{status:e.status}});this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach((t=>this.executeScript(t))),this.emit("sd-load")}catch{this.emit("sd-error",{detail:{status:-1}})}}render(){return s`<slot></slot>`}};p.styles=a,n([e()],p.prototype,"src",2),n([e()],p.prototype,"mode",2),n([e({attribute:"allow-scripts",type:Boolean})],p.prototype,"allowScripts",2),n([i("src")],p.prototype,"handleSrcChange",1),p=n([r("sd-1-0-
|
|
1
|
+
import{S as t,n as e,e as r}from"./solid-element.js";import{x as s}from"./lit-element.js";import{requestInclude as o}from"./request2.js";import{w as i}from"./watch.js";import a from"./include.styles.js";import"./component.styles.js";var c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,n=(t,e,r,s)=>{for(var o,i=s>1?void 0:s?l(e,r):e,a=t.length-1;a>=0;a--)(o=t[a])&&(i=(s?o(e,r,i):o(i))||i);return s&&i&&c(e,r,i),i};let p=class extends t{constructor(){super(...arguments),this.mode="cors",this.allowScripts=!1}executeScript(t){const e=document.createElement("script");[...t.attributes].forEach((t=>e.setAttribute(t.name,t.value))),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{const t=this.src,e=await o(t,this.mode);if(t!==this.src)return;if(!e.ok)return void this.emit("sd-error",{detail:{status:e.status}});this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach((t=>this.executeScript(t))),this.emit("sd-load")}catch{this.emit("sd-error",{detail:{status:-1}})}}render(){return s`<slot></slot>`}};p.styles=a,n([e()],p.prototype,"src",2),n([e()],p.prototype,"mode",2),n([e({attribute:"allow-scripts",type:Boolean})],p.prototype,"allowScripts",2),n([i("src")],p.prototype,"handleSrcChange",1),p=n([r("sd-1-0-2-include")],p);export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as t,i as e}from"./lit-element.js";import{S as s,n as i,e as o}from"./solid-element.js";import{H as r,l,i as n}from"./if-defined.js";import{t as a}from"./classix.js";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=(t,e,s,i)=>{for(var o,r=i>1?void 0:i?d(e,s):e,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&h(e,s,r),r};let c=class extends s{constructor(){super(...arguments),this.hasSlotController=new r(this,"[default]","icon-left","icon-right"),this.size="inherit",this.inverted=!1,this.standalone=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const e={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return t`<a part="base" class="${a("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${l(this.href||void 0)}" target="${l(this.target||void 0)}" download="${l(this.download||void 0)}" rel="${l(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${a("inline",e["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${a("inline",e["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};c.styles=[s.styles,e`::slotted(sd-1-0-
|
|
1
|
+
import{x as t,i as e}from"./lit-element.js";import{S as s,n as i,e as o}from"./solid-element.js";import{H as r,l,i as n}from"./if-defined.js";import{t as a}from"./classix.js";var h=Object.defineProperty,d=Object.getOwnPropertyDescriptor,f=(t,e,s,i)=>{for(var o,r=i>1?void 0:i?d(e,s):e,l=t.length-1;l>=0;l--)(o=t[l])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&h(e,s,r),r};let c=class extends s{constructor(){super(...arguments),this.hasSlotController=new r(this,"[default]","icon-left","icon-right"),this.size="inherit",this.inverted=!1,this.standalone=!1,this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){const e={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return t`<a part="base" class="${a("inline",this.href?"cursor-pointer":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline"}[this.href?"enabled":"disabled"],this.standalone&&"flex items-start")}" href="${l(this.href||void 0)}" target="${l(this.target||void 0)}" download="${l(this.download||void 0)}" rel="${l(this.target?"noreferrer noopener":void 0)}" aria-disabled="${this.href?"false":"true"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"><slot name="icon-left" part="icon-left" class="${a("inline",e["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${a("inline",e["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};c.styles=[s.styles,e`::slotted(sd-1-0-2-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-1-0-2-icon){font-size:1rem}:host([size=lg][standalone]) ::slotted(sd-1-0-2-icon){font-size:1.5rem}`],f([n("a")],c.prototype,"button",2),f([i({reflect:!0})],c.prototype,"size",2),f([i({type:Boolean,reflect:!0})],c.prototype,"inverted",2),f([i({type:Boolean,reflect:!0})],c.prototype,"standalone",2),f([i()],c.prototype,"href",2),f([i()],c.prototype,"target",2),f([i()],c.prototype,"download",2),c=f([o("sd-1-0-2-link")],c);export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{L as r,r as o,a as s}from"./solid-components2.js";export{r as LocalizeController,o as registerIconLibrary,s as unregisterIconLibrary};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={"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 ',"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 '},t={name:"system",resolver:t=>t in e?`data:image/svg+xml,${encodeURIComponent(e[t])}`:"",mutator:e=>e.setAttribute("fill","currentColor")},n=Object.freeze(Object.defineProperty({__proto__:null,default:t,icons:e},Symbol.toStringTag,{value:"Module"}));let o=[t],r=[];function s(e){r.push(e)}function l(e){r=r.filter((t=>t!==e))}function a(e){return o.find((t=>t.name===e))}function i(e,t){c(e),o.push({name:e,resolver:t.resolver,mutator:t.mutator}),r.forEach((t=>{t.library===e&&t.setIcon()}))}function c(e){o=o.filter((t=>t.name!==e))}const u=Object.freeze(Object.defineProperty({__proto__:null,getIconLibrary:a,registerIconLibrary:i,unregisterIconLibrary:c,unwatchIcon:l,watchIcon:s},Symbol.toStringTag,{value:"Module"})),m=new Set,d=new MutationObserver(w),g=new Map;let p,h=document.documentElement.dir||"ltr",v=document.documentElement.lang||navigator.language;function w(){h=document.documentElement.dir||"ltr",v=document.documentElement.lang||navigator.language,[...m.keys()].map((e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()}))}d.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]});let f=class{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){m.add(this.host)}hostDisconnected(){m.delete(this.host)}dir(){return`${this.host.dir||h}`.toLowerCase()}lang(){return`${this.host.lang||v}`.toLowerCase()}getTranslationData(e){var t,n;const o=new Intl.Locale(e),r=null==o?void 0:o.language.toLowerCase(),s=null!==(n=null===(t=null==o?void 0:o.region)||void 0===t?void 0:t.toLowerCase())&&void 0!==n?n:"";return{locale:o,language:r,region:s,primary:g.get(`${r}-${s}`),secondary:g.get(r)}}exists(e,t){var n;const{primary:o,secondary:r}=this.getTranslationData(null!==(n=t.lang)&&void 0!==n?n:this.lang());return t=Object.assign({includeFallback:!1},t),!!(o&&o[e]||r&&r[e]||t.includeFallback&&p&&p[e])}term(e,...t){const{primary:n,secondary:o}=this.getTranslationData(this.lang());let r;if(n&&n[e])r=n[e];else if(o&&o[e])r=o[e];else{if(!p||!p[e])return console.error(`No translation found for: ${String(e)}`),String(e);r=p[e]}return"function"==typeof r?r(...t):r}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,n){return new Intl.RelativeTimeFormat(this.lang(),n).format(e,t)}};!function(...e){e.map((e=>{const t=e.$code.toLowerCase();g.has(t)?g.set(t,Object.assign(Object.assign({},g.get(t)),e)):g.set(t,e),p||(p=e)})),w()}({$code:"en",$name:"English",$dir:"ltr",clearEntry:"Clear entry",close:"Close",copy:"Copy",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,currentValue:"Current value",hidePassword:"Hide password",loading:"Loading",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",toggleColorFormat:"Toggle color format"});class b extends f{}const y=Object.assign({"./components/button/button.ts":()=>import("./button.js"),"./components/icon/icon.ts":()=>import("./icon.js"),"./components/icon/library.system.ts":()=>Promise.resolve().then((()=>n)),"./components/icon/library.ts":()=>Promise.resolve().then((()=>u)),"./components/icon/request.ts":()=>import("./request.js"),"./components/include/include.styles.ts":()=>import("./include.styles.js"),"./components/include/include.ts":()=>import("./include.js"),"./components/include/request.ts":()=>import("./request2.js"),"./components/link/link.ts":()=>import("./link.js"),"./components/spinner/spinner.ts":()=>import("./spinner.js")});Object.keys(y).forEach((e=>{y[e]()}));export{b as L,c as a,a as g,i as r,l as u,s as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{x as e,i as
|
|
1
|
+
import{x as e,i as r}from"./lit-element.js";import{S as t,n as s,e as l}from"./solid-element.js";import{L as o}from"./solid-components2.js";import{t as i}from"./classix.js";var a=Object.defineProperty,n=Object.getOwnPropertyDescriptor,p=(e,r,t,s)=>{for(var l,o=s>1?void 0:s?n(r,t):r,i=e.length-1;i>=0;i--)(l=e[i])&&(o=(s?l(r,t,o):l(o))||o);return s&&o&&a(r,t,o),o};let c=class extends t{constructor(){super(...arguments),this.color="currentColor",this.localize=new o(this)}render(){return e`<svg role="progressbar" viewBox="0 0 24 24" class="${i("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};c.styles=[t.styles,r`:host{display:inline-block;width:1em;height:1em}`],p([s({reflect:!0})],c.prototype,"color",2),c=p([l("sd-1-0-2-spinner")],c);export{c as default};
|