@ganpatiinfo/gids-core-web 2.0.5 → 2.0.6
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/custom-elements.json +1 -1
- package/dist/gids-toggle-button.js +3 -3
- package/dist/gids-toggle-button.js.map +1 -1
- package/dist/index.css +208 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +1 -1
- package/dist/{p-DXWsIVvG.js → p-C0FfV2mK.js} +8 -101
- package/dist/p-C0FfV2mK.js.map +1 -0
- package/dist/types/components/html/GidsAvatar/GidsAvatar.d.ts +4 -0
- package/dist/types/components/html/GidsAvatarGroup/GidsAvatarGroup.d.ts +5 -0
- package/dist/types/components/html/GidsBadge/GidsBadge.d.ts +4 -0
- package/dist/types/index.d.ts +1 -1
- package/package.json +9 -9
- package/dist/p-C7NwBdoN.js +0 -1227
- package/dist/p-C7NwBdoN.js.map +0 -1
- package/dist/p-DXWsIVvG.js.map +0 -1
- package/dist/p-Dl9wTOvC.js +0 -748
- package/dist/p-Dl9wTOvC.js.map +0 -1
- package/dist/types/components/gids-toggle-button/gids-toggle-button.d.ts +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, p as proxyCustomElement, H, e as createEvent, d as getConstructedGidsStylesheet, f as Host } from './p-
|
|
1
|
+
import { h, p as proxyCustomElement, H, e as createEvent, d as getConstructedGidsStylesheet, f as Host } from './p-C0FfV2mK.js';
|
|
2
2
|
import { GidsSpinnerControlWebUtils, GidsButtonWebUtils, nonEmpty } from '@ganpatiinfo/gids-web-shared';
|
|
3
3
|
import { GidsSpinnerControlCommonUtils } from '@ganpatiinfo/gids-core-shared';
|
|
4
4
|
|
|
@@ -84,9 +84,9 @@ const GidsToggleButton$1 = /*@__PURE__*/ proxyCustomElement(class GidsToggleButt
|
|
|
84
84
|
this.select?.emit(toggledValue);
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: '5c54c2974c214043b8d07e03d1bba4428106e2aa' }, h("style", { key: '9d90d24d0b47e87cf0b62d906f05cd2fab689950' }, `:host {
|
|
88
88
|
display: ${this.width === 'full' ? 'block' : 'inline-block'}
|
|
89
|
-
}`), h(GidsButton, { key: '
|
|
89
|
+
}`), h(GidsButton, { key: 'e48005f27f637b9f03c9c1e6e0cf13bb0687a6ce', appearance: this.appearance, size: this.size, width: this.width, disabled: this.disabled, onClick: this._toggle, "aria-pressed": this.selected ? 'true' : 'false', leadingIcon: h("slot", { name: "leadingIcon" }), trailingIcon: h("slot", { name: "trailingIcon" }), forceIconOnly: this._onlyHasLeadingIcon() }, h("slot", { key: 'e727c6972563dbb7320dc0157a2522df459a8635' }))));
|
|
90
90
|
}
|
|
91
91
|
_onlyHasLeadingIcon() {
|
|
92
92
|
const childNodes = this._el.childNodes;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"gids-toggle-button.js","mappings":";;;;AAQA,MAAM,EAAE,+BAA+B,EAAE,GAAG,0BAA0B;AACtE,MAAM,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,GAC7E,6BAA6B;AAOvB,MAAM,kBAAkB,GAE3B,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,KAAI;IACpD,IAAI,KAAK,GAAuC,SAAS;IAEzD,IAAI,CAAC,aAAa,EAAE;AACnB,QAAA,MAAM,SAAS,GAAG,wBAAwB,CAAC,KAAK,EAAE,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;QAChE,KAAK,GAAG,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAE;;AAG9D,IAAA,QACC,CACC,CAAA,KAAA,EAAA,EAAA,KAAK,EAAE,+BAA+B,CAAC,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC,EACtE,OAAO,EAAE,OAAO,KACZ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AA,EAAA,EACJ,CAAQ,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,CAAA;2BACe,IAAI,CAAC,KAAK,KAAK,MAAM,GAAG,OAAO,GAAG,cAAc;kBACzD,CAAS,EACvB,CAAA,CAAC,UAAU,EAAA,EAAA,GAAA,EAAA,0CAAA,EACV,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,OAAO,EAAA,cAAA,EACP,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,OAAO,EAC9C,WAAW,EAAE,YAAM,IAAI,EAAC,aAAa,EAAA,CAAG,EACxC,YAAY,EAAE,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,cAAc,EAAG,CAAA,EAC1C,aAAa,EAAE,IAAI,CAAC,mBAAmB,EAAE,EAAA,EAEzC,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACI,CACP;;IAID,mBAAmB,GAAA;AAC1B,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU;AACtC,QAAA,IACC,UAAU,CAAC,MAAM,KAAK,CAAC;AACvB,YAAA,UAAU,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,OAAO;YACvC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,EACnC;AACD,YAAA,OAAO,IAAI;;AAEZ,QAAA,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GidsToggleButton","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/html/_GidsSpinnerControl/GidsSpinnerControl.tsx","src/components/html/GidsButton/GidsButton.tsx","src/components/webComponents/GidsToggleButton/GidsToggleButton.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport type { FunctionalComponent, JSXBase } from '@stencil/core/internal';\nimport { GidsSpinnerControlWebUtils } from '@ganpatiinfo/gids-web-shared';\nimport {\n\tGidsSpinnerControlCommonProps,\n\tGidsSpinnerControlCommonUtils,\n} from '@ganpatiinfo/gids-core-shared';\n\nconst { getGidsSpinnerControlClassNames } = GidsSpinnerControlWebUtils;\nconst { calculateStrokeDasharray, thickness, radius, centerPosition, viewBox } =\n\tGidsSpinnerControlCommonUtils;\n\nexport type GidsSpinnerControlProps = GidsSpinnerControlCommonProps &\n\tJSXBase.IntrinsicElements['svg'] & {\n\t\tclass?: string;\n\t};\n\nexport const GidsSpinnerControl: FunctionalComponent<\n\tGidsSpinnerControlCommonProps\n> = ({ size, indeterminate, value, max, ...rest }) => {\n\tlet style: Record<string, string> | undefined = undefined;\n\n\tif (!indeterminate) {\n\t\tconst dashArray = calculateStrokeDasharray(value, max ? max : 0);\n\t\tstyle = { strokeDashArray: dashArray, strokeDashoffset: '0' };\n\t}\n\n\treturn (\n\t\t<svg\n\t\t\tclass={getGidsSpinnerControlClassNames({ size, indeterminate, value })}\n\t\t\tviewBox={viewBox}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<circle\n\t\t\t\tclass=\"gids-spinner-control__track\"\n\t\t\t\tcx={centerPosition}\n\t\t\t\tcy={centerPosition}\n\t\t\t\tr={radius}\n\t\t\t\tstroke-width={thickness}\n\t\t\t/>\n\t\t\t<circle\n\t\t\t\tstyle={style}\n\t\t\t\tclass=\"gids-spinner-control__progress\"\n\t\t\t\tcx={centerPosition}\n\t\t\t\tcy={centerPosition}\n\t\t\t\tr={radius}\n\t\t\t\tstroke-width={thickness}\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n","import { h } from '@stencil/core';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport {\n\ttype PermittedGidsButtonElements,\n\ttype GidsButtonWebProps,\n\tGidsButtonWebUtils,\n\tnonEmpty,\n} from '@ganpatiinfo/gids-web-shared';\nimport { GidsSpinnerControl } from '../_GidsSpinnerControl/GidsSpinnerControl';\n\nconst { getGidsButtonClassNames } = GidsButtonWebUtils;\n\n/**\n * Props for the Stencil Functional Component implementation of GIDS Button.\n */\nexport type GidsButtonProps<E extends PermittedGidsButtonElements> =\n\tGidsButtonWebProps<VNode | VNode[], VNode | VNode[], E> &\n\t\tJSXBase.IntrinsicElements[E] & {\n\t\t\t/**\n\t\t\t * Whether to force the button to icon-only styling.\n\t\t\t */\n\t\t\tforceIconOnly?: boolean;\n\t\t};\n\n/**\n * Stencil functional component implementation of GIDS Button component.\n *\n * Only used internally by Stencil web components that need to render Buttons within their\n * JSX templates.\n *\n * @internal\n *\n * @param props\n * @param children\n * @returns\n */\nexport const GidsButton = <E extends PermittedGidsButtonElements = 'button'>(\n\t{\n\t\tappearance,\n\t\tsize,\n\t\tdestructive,\n\t\tloading,\n\t\twidth,\n\t\tleadingIcon,\n\t\ttrailingIcon,\n\t\tas,\n\t\tdisabled,\n\t\tclass: className,\n\t\tforceIconOnly = false,\n\t\t...rest\n\t}: GidsButtonProps<E>,\n\tchildren: VNode[],\n): VNode | VNode[] => {\n\tconst Element = as || 'button';\n\tconst spinnerSize = size === 'lg' || size === undefined ? 'md' : size;\n\n\t// Default to type=\"button\" if not provided, since HTML's default is \"submit\"\n\tif (Element === 'button' && !('type' in rest)) {\n\t\t(rest as JSXBase.IntrinsicElements['button']).type = 'button';\n\t}\n\n\treturn (\n\t\t// @ts-expect-error: TODO This used to work in TypeScript 4.x but not anymore\n\t\t<Element\n\t\t\tclass={getGidsButtonClassNames(\n\t\t\t\t{ appearance, size, destructive, loading, width },\n\t\t\t\tforceIconOnly ||\n\t\t\t\t\t(children.length === 0 &&\n\t\t\t\t\t\tnonEmpty(leadingIcon) &&\n\t\t\t\t\t\t!nonEmpty(trailingIcon)),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdisabled={Element === 'button' ? disabled : undefined}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<span class=\"gids-button__content\">\n\t\t\t\t{leadingIcon}\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t{loading && (\n\t\t\t\t<GidsSpinnerControl size={spinnerSize} indeterminate></GidsSpinnerControl>\n\t\t\t)}\n\t\t\t{trailingIcon}\n\t\t</Element>\n\t);\n};\n","import {\n\th,\n\tComponent,\n\tProp,\n\tElement,\n\tHost,\n\tEvent,\n\tEventEmitter,\n} from '@stencil/core';\nimport { GidsButton } from '../../html/GidsButton/GidsButton';\nimport { getConstructedGidsStylesheet } from '../../../utils/constructedGidsStylesheet';\nimport {\n\ttype GidsButtonSize,\n\ttype GidsToggleButtonAppearance,\n\ttype GidsButtonWidth,\n} from '@ganpatiinfo/gids-core-shared';\nimport { type GidsToggleButtonWebProps } from '@ganpatiinfo/gids-web-shared';\n\n@Component({\n\ttag: 'gids-toggle-button',\n\tshadow: true,\n})\nexport class GidsToggleButton\n\timplements Omit<GidsToggleButtonWebProps, 'children'>\n{\n\t/**\n\t * @internal\n\t */\n\t@Element() private _el: HTMLGidsToggleButtonElement;\n\n\t@Event()\n\tprivate select?: EventEmitter<boolean>;\n\n\t/**\n\t *\n\t * Reflected by `disabled` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\tdisabled?: boolean;\n\n\t/**\n\t *\n\t * Reflected by `appearance` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\tappearance?: GidsToggleButtonAppearance;\n\n\t/**\n\t *\n\t * Reflected by `size` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\tsize?: GidsButtonSize;\n\n\t/**\n\t *\n\t * Reflected by `width` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\twidth?: GidsButtonWidth;\n\n\t/**\n\t *\n\t * Reflected by `defaultSelected` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\tdefaultSelected?: boolean;\n\n\t/**\n\t *\n\t * Only available as a property. There is no `selected` attribute\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t\tattribute: null,\n\t})\n\tget selected(): boolean | undefined {\n\t\treturn this.#selected ?? this.defaultSelected;\n\t}\n\tset selected(value: unknown) {\n\t\tthis.#selected = value === undefined ? undefined : Boolean(value);\n\t}\n\n\tconstructor() {\n\t\tthis._toggle = this._toggle.bind(this);\n\t}\n\n\t/**\n\t * @internal\n\t */\n\t#selected?: boolean;\n\n\tconnectedCallback() {\n\t\tconst constructedGidsStylesheet = getConstructedGidsStylesheet();\n\t\tif (constructedGidsStylesheet !== undefined) {\n\t\t\tthis._el.shadowRoot?.adoptedStyleSheets.push(constructedGidsStylesheet);\n\t\t}\n\t}\n\n\tprivate _toggle() {\n\t\tconst toggledValue = !this.selected;\n\t\tthis._el.selected = toggledValue;\n\t\tthis.select?.emit(toggledValue);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<style>{`:host {\n display: ${this.width === 'full' ? 'block' : 'inline-block'}\n }`}</style>\n\t\t\t\t<GidsButton\n\t\t\t\t\tappearance={this.appearance}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\twidth={this.width}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tonClick={this._toggle}\n\t\t\t\t\taria-pressed={this.selected ? 'true' : 'false'}\n\t\t\t\t\tleadingIcon={<slot name=\"leadingIcon\" />}\n\t\t\t\t\ttrailingIcon={<slot name=\"trailingIcon\" />}\n\t\t\t\t\tforceIconOnly={this._onlyHasLeadingIcon()}\n\t\t\t\t>\n\t\t\t\t\t<slot />\n\t\t\t\t</GidsButton>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _onlyHasLeadingIcon(): boolean {\n\t\tconst childNodes = this._el.childNodes;\n\t\tif (\n\t\t\tchildNodes.length === 1 &&\n\t\t\tchildNodes[0] instanceof window.Element &&\n\t\t\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AAW,EAAE,YAAM,IAAI,EAAC,aAAa,EAAA,CAAG,EACxC,YAAY,EAAE,CAAA,CAAA,MAAA,EAAA,EAAM,IAAI,EAAC,cAAc,EAAG,CAAA,EAC1C,aAAa,EAAE,IAAI,CAAC,mBAAmB,EAAE,EAAA,EAEzC,CAAQ,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACI,CACP;;IAID,mBAAmB,GAAA;AAC1B,QAAA,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU;AACtC,QAAA,IACC,UAAU,CAAC,MAAM,KAAK,CAAC;AACvB,YAAA,UAAU,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,OAAO;YACvC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,EACnC;AACD,YAAA,OAAO,IAAI;;AAEZ,QAAA,OAAO,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["GidsToggleButton","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/html/_GidsSpinnerControl/GidsSpinnerControl.tsx","src/components/html/GidsButton/GidsButton.tsx","src/components/webComponents/GidsToggleButton/GidsToggleButton.tsx"],"sourcesContent":["import { h } from '@stencil/core';\nimport type { FunctionalComponent, JSXBase } from '@stencil/core/internal';\nimport { GidsSpinnerControlWebUtils } from '@ganpatiinfo/gids-web-shared';\nimport {\n\tGidsSpinnerControlCommonProps,\n\tGidsSpinnerControlCommonUtils,\n} from '@ganpatiinfo/gids-core-shared';\n\nconst { getGidsSpinnerControlClassNames } = GidsSpinnerControlWebUtils;\nconst { calculateStrokeDasharray, thickness, radius, centerPosition, viewBox } =\n\tGidsSpinnerControlCommonUtils;\n\nexport type GidsSpinnerControlProps = GidsSpinnerControlCommonProps &\n\tJSXBase.IntrinsicElements['svg'] & {\n\t\tclass?: string;\n\t};\n\nexport const GidsSpinnerControl: FunctionalComponent<\n\tGidsSpinnerControlCommonProps\n> = ({ size, indeterminate, value, max, ...rest }) => {\n\tlet style: Record<string, string> | undefined = undefined;\n\n\tif (!indeterminate) {\n\t\tconst dashArray = calculateStrokeDasharray(value, max ? max : 0);\n\t\tstyle = { strokeDashArray: dashArray, strokeDashoffset: '0' };\n\t}\n\n\treturn (\n\t\t<svg\n\t\t\tclass={getGidsSpinnerControlClassNames({ size, indeterminate, value })}\n\t\t\tviewBox={viewBox}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<circle\n\t\t\t\tclass=\"gids-spinner-control__track\"\n\t\t\t\tcx={centerPosition}\n\t\t\t\tcy={centerPosition}\n\t\t\t\tr={radius}\n\t\t\t\tstroke-width={thickness}\n\t\t\t/>\n\t\t\t<circle\n\t\t\t\tstyle={style}\n\t\t\t\tclass=\"gids-spinner-control__progress\"\n\t\t\t\tcx={centerPosition}\n\t\t\t\tcy={centerPosition}\n\t\t\t\tr={radius}\n\t\t\t\tstroke-width={thickness}\n\t\t\t/>\n\t\t</svg>\n\t);\n};\n","import { h } from '@stencil/core';\nimport type { JSXBase, VNode } from '@stencil/core/internal';\nimport {\n\ttype PermittedGidsButtonElements,\n\ttype GidsButtonWebProps,\n\tGidsButtonWebUtils,\n\tnonEmpty,\n} from '@ganpatiinfo/gids-web-shared';\nimport { GidsSpinnerControl } from '../_GidsSpinnerControl/GidsSpinnerControl.js';\n\nconst { getGidsButtonClassNames } = GidsButtonWebUtils;\n\n/**\n * Props for the Stencil Functional Component implementation of GIDS Button.\n */\nexport type GidsButtonProps<E extends PermittedGidsButtonElements> =\n\tGidsButtonWebProps<VNode | VNode[], VNode | VNode[], E> &\n\t\tJSXBase.IntrinsicElements[E] & {\n\t\t\t/**\n\t\t\t * Whether to force the button to icon-only styling.\n\t\t\t */\n\t\t\tforceIconOnly?: boolean;\n\t\t};\n\n/**\n * Stencil functional component implementation of GIDS Button component.\n *\n * Only used internally by Stencil web components that need to render Buttons within their\n * JSX templates.\n *\n * @internal\n *\n * @param props\n * @param children\n * @returns\n */\nexport const GidsButton = <E extends PermittedGidsButtonElements = 'button'>(\n\t{\n\t\tappearance,\n\t\tsize,\n\t\tdestructive,\n\t\tloading,\n\t\twidth,\n\t\tleadingIcon,\n\t\ttrailingIcon,\n\t\tas,\n\t\tdisabled,\n\t\tclass: className,\n\t\tforceIconOnly = false,\n\t\t...rest\n\t}: GidsButtonProps<E>,\n\tchildren: VNode[],\n): VNode | VNode[] => {\n\tconst Element = as || 'button';\n\tconst spinnerSize = size === 'lg' || size === undefined ? 'md' : size;\n\n\t// Default to type=\"button\" if not provided, since HTML's default is \"submit\"\n\tif (Element === 'button' && !('type' in rest)) {\n\t\t(rest as JSXBase.IntrinsicElements['button']).type = 'button';\n\t}\n\n\treturn (\n\t\t// @ts-expect-error: TODO This used to work in TypeScript 4.x but not anymore\n\t\t<Element\n\t\t\tclass={getGidsButtonClassNames(\n\t\t\t\t{ appearance, size, destructive, loading, width },\n\t\t\t\tforceIconOnly ||\n\t\t\t\t\t(children.length === 0 &&\n\t\t\t\t\t\tnonEmpty(leadingIcon) &&\n\t\t\t\t\t\t!nonEmpty(trailingIcon)),\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdisabled={Element === 'button' ? disabled : undefined}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<span class=\"gids-button__content\">\n\t\t\t\t{leadingIcon}\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t{loading && (\n\t\t\t\t<GidsSpinnerControl size={spinnerSize} indeterminate></GidsSpinnerControl>\n\t\t\t)}\n\t\t\t{trailingIcon}\n\t\t</Element>\n\t);\n};\n","import {\n\th,\n\tComponent,\n\tProp,\n\tElement,\n\tHost,\n\tEvent,\n\tEventEmitter,\n} from '@stencil/core';\nimport { GidsButton } from '../../html/GidsButton/GidsButton.js';\nimport { getConstructedGidsStylesheet } from '../../../utils/constructedGidsStylesheet.js';\nimport {\n\ttype GidsButtonSize,\n\ttype GidsToggleButtonAppearance,\n\ttype GidsButtonWidth,\n} from '@ganpatiinfo/gids-core-shared';\nimport { type GidsToggleButtonWebProps } from '@ganpatiinfo/gids-web-shared';\n\n@Component({\n\ttag: 'gids-toggle-button',\n\tshadow: true,\n})\nexport class GidsToggleButton\n\timplements Omit<GidsToggleButtonWebProps, 'children'>\n{\n\t/**\n\t * @internal\n\t */\n\t@Element() private _el: HTMLGidsToggleButtonElement;\n\n\t@Event()\n\tprivate select?: EventEmitter<boolean>;\n\n\t/**\n\t *\n\t * Reflected by `disabled` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\tdisabled?: boolean;\n\n\t/**\n\t *\n\t * Reflected by `appearance` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\tappearance?: GidsToggleButtonAppearance;\n\n\t/**\n\t *\n\t * Reflected by `size` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\tsize?: GidsButtonSize;\n\n\t/**\n\t *\n\t * Reflected by `width` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\twidth?: GidsButtonWidth;\n\n\t/**\n\t *\n\t * Reflected by `defaultSelected` property\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t})\n\tdefaultSelected?: boolean;\n\n\t/**\n\t *\n\t * Only available as a property. There is no `selected` attribute\n\t *\n\t * @inheritdoc\n\t */\n\t@Prop({\n\t\treflect: true,\n\t\tattribute: null,\n\t})\n\tget selected(): boolean | undefined {\n\t\treturn this.#selected ?? this.defaultSelected;\n\t}\n\tset selected(value: unknown) {\n\t\tthis.#selected = value === undefined ? undefined : Boolean(value);\n\t}\n\n\tconstructor() {\n\t\tthis._toggle = this._toggle.bind(this);\n\t}\n\n\t/**\n\t * @internal\n\t */\n\t#selected?: boolean;\n\n\tconnectedCallback() {\n\t\tconst constructedGidsStylesheet = getConstructedGidsStylesheet();\n\t\tif (constructedGidsStylesheet !== undefined) {\n\t\t\tthis._el.shadowRoot?.adoptedStyleSheets.push(constructedGidsStylesheet);\n\t\t}\n\t}\n\n\tprivate _toggle() {\n\t\tconst toggledValue = !this.selected;\n\t\tthis._el.selected = toggledValue;\n\t\tthis.select?.emit(toggledValue);\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host>\n\t\t\t\t<style>{`:host {\n display: ${this.width === 'full' ? 'block' : 'inline-block'}\n }`}</style>\n\t\t\t\t<GidsButton\n\t\t\t\t\tappearance={this.appearance}\n\t\t\t\t\tsize={this.size}\n\t\t\t\t\twidth={this.width}\n\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\tonClick={this._toggle}\n\t\t\t\t\taria-pressed={this.selected ? 'true' : 'false'}\n\t\t\t\t\tleadingIcon={<slot name=\"leadingIcon\" />}\n\t\t\t\t\ttrailingIcon={<slot name=\"trailingIcon\" />}\n\t\t\t\t\tforceIconOnly={this._onlyHasLeadingIcon()}\n\t\t\t\t>\n\t\t\t\t\t<slot />\n\t\t\t\t</GidsButton>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _onlyHasLeadingIcon(): boolean {\n\t\tconst childNodes = this._el.childNodes;\n\t\tif (\n\t\t\tchildNodes.length === 1 &&\n\t\t\tchildNodes[0] instanceof window.Element &&\n\t\t\tchildNodes[0].slot === 'leadingIcon'\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n}\n"],"version":3}
|
package/dist/index.css
CHANGED
|
@@ -986,6 +986,214 @@ gids-global-styles-start {
|
|
|
986
986
|
margin-top: var(--gids-gap-100);
|
|
987
987
|
}
|
|
988
988
|
|
|
989
|
+
.gids-badge {
|
|
990
|
+
display: inline-flex;
|
|
991
|
+
justify-content: center;
|
|
992
|
+
align-items: center;
|
|
993
|
+
background-color: var(--gids-color-background-danger-bold-default);
|
|
994
|
+
height: var(--gids-size-200);
|
|
995
|
+
min-width: var(--gids-size-200);
|
|
996
|
+
padding: calc(var(--gids-padding-vertical-edge-to-element-025) - var(--gids-border-width-thin)) calc(var(--gids-padding-horizontal-edge-to-element-075) - var(--gids-border-width-thin));
|
|
997
|
+
border-radius: var(--gids-border-radius-full);
|
|
998
|
+
border-width: var(--gids-border-width-thin);
|
|
999
|
+
border-style: solid;
|
|
1000
|
+
border-color: transparent;
|
|
1001
|
+
color: var(--gids-color-text-inverse);
|
|
1002
|
+
background-color: var(--gids-color-background-information-bold-default);
|
|
1003
|
+
font-family: var(--gids-typography-label-x-small__font-family);
|
|
1004
|
+
font-size: var(--gids-typography-label-x-small__font-size);
|
|
1005
|
+
font-weight: var(--gids-typography-label-x-small__font-weight);
|
|
1006
|
+
letter-spacing: var(--gids-typography-label-x-small__letter-spacing);
|
|
1007
|
+
line-height: var(--gids-typography-label-x-small__line-height);
|
|
1008
|
+
text-transform: var(--gids-typography-label-x-small__text-transform, inherit);
|
|
1009
|
+
font-variant-caps: var(--gids-typography-label-x-small__font-variant-caps, inherit);
|
|
1010
|
+
}
|
|
1011
|
+
.gids-badge--dot {
|
|
1012
|
+
height: var(--gids-size-100);
|
|
1013
|
+
min-width: var(--gids-size-100);
|
|
1014
|
+
border-radius: var(--gids-border-radius-full);
|
|
1015
|
+
padding: 0px;
|
|
1016
|
+
}
|
|
1017
|
+
.gids-badge--outline {
|
|
1018
|
+
border-color: var(--gids-color-border-inverse);
|
|
1019
|
+
}
|
|
1020
|
+
.gids-badge--danger {
|
|
1021
|
+
background-color: var(--gids-color-background-danger-bold-default);
|
|
1022
|
+
}
|
|
1023
|
+
.gids-badge--positive {
|
|
1024
|
+
background-color: var(--gids-color-background-positive-bold-default);
|
|
1025
|
+
}
|
|
1026
|
+
.gids-badge--warning {
|
|
1027
|
+
background-color: var(--gids-color-background-warning-bold-default);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
Allows an element to have a nested GIDS Badge positioned at the top-right corner.
|
|
1032
|
+
*/
|
|
1033
|
+
.gids-avatar {
|
|
1034
|
+
display: flex;
|
|
1035
|
+
align-items: center;
|
|
1036
|
+
justify-content: center;
|
|
1037
|
+
border-radius: 50%;
|
|
1038
|
+
background-color: var(--gidsAvatar-background-color, var(--gids-color-background-brand-bold-default));
|
|
1039
|
+
color: var(--gids-color-text-inverse);
|
|
1040
|
+
width: var(--gidsAvatar-size, var(--gids-size-320));
|
|
1041
|
+
height: var(--gidsAvatar-size, var(--gids-size-320));
|
|
1042
|
+
font-family: var(--gids-typography-label-small__font-family);
|
|
1043
|
+
font-size: var(--gids-typography-label-small__font-size);
|
|
1044
|
+
font-weight: var(--gids-typography-label-small__font-weight);
|
|
1045
|
+
letter-spacing: var(--gids-typography-label-small__letter-spacing);
|
|
1046
|
+
line-height: var(--gids-typography-label-small__line-height);
|
|
1047
|
+
font-variant-caps: var(--gids-typography-label-small__font-variant-caps, inherit);
|
|
1048
|
+
text-transform: uppercase;
|
|
1049
|
+
/*
|
|
1050
|
+
Badges need to be nudged to the right by their border radius.
|
|
1051
|
+
|
|
1052
|
+
- 1) Dot style Badges are always perfect circles, so 50% of their width does the trick.
|
|
1053
|
+
- 2) Notification style Badges might be pill-shaped, so need to shift them by half their height.
|
|
1054
|
+
|
|
1055
|
+
For a dot Badge, 50% of its width (1) will be less that the nudge amount for a
|
|
1056
|
+
pill-shaped Badge (2), so that should be used.
|
|
1057
|
+
|
|
1058
|
+
For a notification circle, the nudge amount (2) will be equal to 50% of the Badge's width
|
|
1059
|
+
if it is a perfect cirle, but smaller than half its width if it is a pill shape.
|
|
1060
|
+
|
|
1061
|
+
Therefore min( (1), (2) ) will always return the correct nudge amount.
|
|
1062
|
+
|
|
1063
|
+
Finally, since we will use this within a translate() function and want to nudge the
|
|
1064
|
+
Badge to the right, we need to negate the nudge amount.
|
|
1065
|
+
*/
|
|
1066
|
+
/*
|
|
1067
|
+
--gidsWidthBadge-offset is the offset from the top and right edges of the
|
|
1068
|
+
container's bounding box to the centre of the Badge.
|
|
1069
|
+
|
|
1070
|
+
If the container has rounded corners, we want the centre of the Badge to sit
|
|
1071
|
+
that rounded border, not the corner of its bounding box.
|
|
1072
|
+
|
|
1073
|
+
The container's top right rounded corner is like a quarter of a circle with radius
|
|
1074
|
+
of $container-border-radius. We want our Badge to sit half way along that curve.
|
|
1075
|
+
In other words, if we drew a line from the centre of that circle up and to the right
|
|
1076
|
+
at a 45 degree angle, it would intersect the circle at our target point.
|
|
1077
|
+
That's a perfect right-angled triangle with hypotenuse of $container-border-radius, so
|
|
1078
|
+
the length of the other two sides is $container-border-radius * sin(45deg).
|
|
1079
|
+
|
|
1080
|
+
Finally, since we need the offset from the top right corner of the container's border box,
|
|
1081
|
+
we need to subtract that length from the border radius.
|
|
1082
|
+
*/
|
|
1083
|
+
--gidsWithBadge-offset: calc(
|
|
1084
|
+
calc(var(--gidsAvatar-size, var(--gids-size-320)) / 2) -
|
|
1085
|
+
(calc(var(--gidsAvatar-size, var(--gids-size-320)) / 2) * 0.7071067812)
|
|
1086
|
+
);
|
|
1087
|
+
position: relative;
|
|
1088
|
+
}
|
|
1089
|
+
.gids-avatar .gids-badge {
|
|
1090
|
+
position: absolute;
|
|
1091
|
+
top: var(--gidsWithBadge-offset);
|
|
1092
|
+
left: calc(100% - var(--gidsWithBadge-offset));
|
|
1093
|
+
transform: translate(calc(-1 * min(var(--gids-size-200) / 2, 50%)), -50%);
|
|
1094
|
+
}
|
|
1095
|
+
.gids-avatar .gids-icon {
|
|
1096
|
+
--gidsIcon-color: currentColor;
|
|
1097
|
+
--gidsIcon-height: var(--gids-size-160);
|
|
1098
|
+
}
|
|
1099
|
+
.gids-avatar img {
|
|
1100
|
+
border-radius: 50%;
|
|
1101
|
+
display: block;
|
|
1102
|
+
width: 100%;
|
|
1103
|
+
height: 100%;
|
|
1104
|
+
object-fit: cover;
|
|
1105
|
+
}
|
|
1106
|
+
.gids-avatar--sm {
|
|
1107
|
+
--gidsAvatar-size: var(--gids-size-240);
|
|
1108
|
+
font-family: var(--gids-typography-label-x-small__font-family);
|
|
1109
|
+
font-size: var(--gids-typography-label-x-small__font-size);
|
|
1110
|
+
font-weight: var(--gids-typography-label-x-small__font-weight);
|
|
1111
|
+
letter-spacing: var(--gids-typography-label-x-small__letter-spacing);
|
|
1112
|
+
line-height: var(--gids-typography-label-x-small__line-height);
|
|
1113
|
+
font-variant-caps: var(--gids-typography-label-x-small__font-variant-caps, inherit);
|
|
1114
|
+
}
|
|
1115
|
+
.gids-avatar--sm .gids-icon {
|
|
1116
|
+
--gidsIcon-height: var(--gids-size-120);
|
|
1117
|
+
}
|
|
1118
|
+
.gids-avatar--lg {
|
|
1119
|
+
--gidsAvatar-size: var(--gids-size-400);
|
|
1120
|
+
font-family: var(--gids-typography-label-large__font-family);
|
|
1121
|
+
font-size: var(--gids-typography-label-large__font-size);
|
|
1122
|
+
font-weight: var(--gids-typography-label-large__font-weight);
|
|
1123
|
+
letter-spacing: var(--gids-typography-label-large__letter-spacing);
|
|
1124
|
+
line-height: var(--gids-typography-label-large__line-height);
|
|
1125
|
+
font-variant-caps: var(--gids-typography-label-large__font-variant-caps, inherit);
|
|
1126
|
+
}
|
|
1127
|
+
.gids-avatar--lg .gids-icon {
|
|
1128
|
+
--gidsIcon-height: var(--gids-size-240);
|
|
1129
|
+
}
|
|
1130
|
+
.gids-avatar--xl {
|
|
1131
|
+
--gidsAvatar-size: var(--gids-size-480);
|
|
1132
|
+
font-family: var(--gids-typography-heading-x-small__font-family);
|
|
1133
|
+
font-size: var(--gids-typography-heading-x-small__font-size);
|
|
1134
|
+
font-weight: var(--gids-typography-heading-x-small__font-weight);
|
|
1135
|
+
letter-spacing: var(--gids-typography-heading-x-small__letter-spacing);
|
|
1136
|
+
line-height: var(--gids-typography-heading-x-small__line-height);
|
|
1137
|
+
font-variant-caps: var(--gids-typography-heading-x-small__font-variant-caps, inherit);
|
|
1138
|
+
}
|
|
1139
|
+
.gids-avatar--xl .gids-icon {
|
|
1140
|
+
--gidsIcon-height: var(--gids-size-320);
|
|
1141
|
+
}
|
|
1142
|
+
.gids-avatar--accent-1 {
|
|
1143
|
+
--gidsAvatar-background-color: var(
|
|
1144
|
+
--gids-color-background-accent-1-bolder-default
|
|
1145
|
+
);
|
|
1146
|
+
}
|
|
1147
|
+
.gids-avatar--accent-2 {
|
|
1148
|
+
--gidsAvatar-background-color: var(
|
|
1149
|
+
--gids-color-background-accent-2-bolder-default
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
.gids-avatar--accent-3 {
|
|
1153
|
+
--gidsAvatar-background-color: var(
|
|
1154
|
+
--gids-color-background-accent-3-bolder-default
|
|
1155
|
+
);
|
|
1156
|
+
}
|
|
1157
|
+
.gids-avatar--accent-4 {
|
|
1158
|
+
--gidsAvatar-background-color: var(
|
|
1159
|
+
--gids-color-background-accent-4-bolder-default
|
|
1160
|
+
);
|
|
1161
|
+
}
|
|
1162
|
+
.gids-avatar--accent-5 {
|
|
1163
|
+
--gidsAvatar-background-color: var(
|
|
1164
|
+
--gids-color-background-accent-5-bolder-default
|
|
1165
|
+
);
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
.gids-avatar:has(img) {
|
|
1169
|
+
background: none;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
.gids-avatar-group {
|
|
1173
|
+
display: flex;
|
|
1174
|
+
gap: var(--gids-gap-100);
|
|
1175
|
+
flex-wrap: wrap;
|
|
1176
|
+
}
|
|
1177
|
+
.gids-avatar-group > * {
|
|
1178
|
+
flex-shrink: 0;
|
|
1179
|
+
}
|
|
1180
|
+
.gids-avatar-group--scroll {
|
|
1181
|
+
overflow-x: auto;
|
|
1182
|
+
width: 100%;
|
|
1183
|
+
flex-wrap: nowrap;
|
|
1184
|
+
scrollbar-width: none;
|
|
1185
|
+
}
|
|
1186
|
+
.gids-avatar-group--scroll::-webkit-scrollbar {
|
|
1187
|
+
display: none;
|
|
1188
|
+
}
|
|
1189
|
+
.gids-avatar-group--stack {
|
|
1190
|
+
gap: var(--gids-gap-100) var(--gids-gap-0);
|
|
1191
|
+
padding-left: var(--gids-gap-100);
|
|
1192
|
+
}
|
|
1193
|
+
.gids-avatar-group--stack > * {
|
|
1194
|
+
margin-left: calc(-1 * var(--gids-gap-100));
|
|
1195
|
+
}
|
|
1196
|
+
|
|
989
1197
|
/*
|
|
990
1198
|
DO NOT EDIT THIS FILE!
|
|
991
1199
|
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../src/index.scss","../src/styles/start.scss","../src/styles/3-generic/normalise.scss","../src/components/html/_GidsSpinnerControl/GidsSpinnerControl.scss","../src/components/html/GidsButton/GidsButton.scss","../src/styles/2-tools/typography.scss","../src/styles/2-tools/card.scss","../src/styles/2-tools/focus.scss","../src/components/html/GidsDivider/GidsDivider.scss","../src/components/html/GidsDisplayTag/GidsDisplayTag.scss","../src/styles/2-tools/tags.scss","../src/components/html/GidsIcon/GidsIcon.scss","../src/components/html/GidsLabel/GidsLabel.scss","../src/components/html/GidsLabel/GidsLabelInfo/GidsLabelInfo.scss","../src/styles/2-tools/links.scss","../src/components/html/GidsLink/GidsLink.scss","../src/components/html/GidsSpinner/GidsSpinner.scss","../src/components/html/_GidsCheckboxControl/GidsCheckboxControl.scss","../src/components/html/_GidsRadioControl/GidsRadioControl.scss","../src/components/html/_GidsSwitchControl/GidsSwitchControl.scss","../src/components/html/GidsCheckbox/GidsCheckbox.scss","../src/components/html/GidsRadio/GidsRadio.scss","../src/components/html/GidsSwitch/GidsSwitch.scss","../src/styles/2-tools/stack-layout.scss","../src/styles/6-utilities/typography.scss","../src/styles/2-tools/accessibility.scss","../src/styles/6-utilities/visually-hidden.scss","../src/styles/end.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;ACAA;EACC;;;ACDD;EACC;;;ACKD;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AA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A;;;AEhIA;EFoIA;;;AAIF;EACC;EACA;;AE1IC;EF6IA;;;AE7IA;EFiJA;;;AAGD;EACC;EACA;;AAIF;EACC;EACA;EACA;EACA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAIA;AAAA;AAAA;EAGA;AAAA;AAAA;;AAIA;EACC;;;AItWH;EACC;EACA;EAEA;;AAEA;EACC;EACA;EAEA;EACA;EACA;;;ACTF;EACC;ECAA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAKA;EACA;ELhBA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AKWA;EACC;EACA;;AAGD;EL1BA;EACA;EACA;EACA;EACA;EAGC;EAGD;EKmBC;EAKA;EACA;;AACA;EACC;;AAIF;ELzCA;EACA;EACA;EACA;EACA;EAGC;EAGD;EKkCC;EAKA;EACA;;AACA;EACC;;AAIF;ELxDA;EACA;EACA;EACA;EACA;EAGC;EAGD;EKiDC;EAKA;EACA;;AACA;EACC;;AD/DF;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;;AE3DF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;;;AChBF;EACC;EACA;EPDA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AONA;EACC;;AAGD;EACC;;AAGD;EACC;;;AChBF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AChBF;EAEC;EAEA;EACA;EACA;EAEA;;AAEA;EACC;;ARmKC;EQ1JD;;;AAWD;EACC;EACA;EAWA;EACA;EACA;;;AC1CD;EVHA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AUHA;EVPA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AUCA;EVXA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AUKA;EVfA;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AWXD;EACC;EACA;EACA;;AAEA;EACC;EACA;EXND;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWAA;EACC;EXXD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWMC;EXhBD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWUC;EXpBD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWgBC;EX1BD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWoBC;EX9BD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AW0BC;EXpCD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AW8BC;EXxCD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWoCC;EX9CD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWwCC;EXlDD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AW8CC;EXxDD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWkDC;EX5DD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWwDC;EXlED;EACA;EACA;EACA;EACA;EAGC;EAGD;;AW4DC;EXtED;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AYXD;EACC;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;;AAOA;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;AAGC;EACC;;AAGD;EACC;;AAGD;EAEC;EACA;AAAA;AAAA;;AAIA;EACC;AAAA;AAAA;;AAKD;EACC;AAAA;AAAA;;AAOH;EACC;EACA;;AVxEF;EACC;EACA;;AU+ED;EAEC;EACA;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;AAGD;EAEC;;;AClGF;EAGC;EACA;EACA;EACA;EACA;EAEA;;AAQA;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGC;EACC;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAEA;EACC;EACA;;AAGD;EACC;EACA;;AAKH;EACC;EACA;;AXlEF;EACC;EACA;;AWsED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;;ACtFF;EAEC;EACA;EACA;;AAIA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AZpBD;EACC;EACA;;AYuBA;EACC;;AAGD;EACC;;AAID;EACC;;AAMC;EACC;;AAGD;EACC;;AAMH;EACC;EACA;;AAKF;EACC;EACA;EACA;EACA;EACA;EACA,YACC;EAED;EACA;;AAGD;EACC;;AAGD;EAIC;;AAID;EAEC;EACA;;AAED;EACC;;;AC3FF;EAIC;EACA;EACA;;AAEA;EAEC;EACA;;AAGD;EAEC;;;AChBF;EAIC;EACA;EACA;;AAEA;EAEC;EACA;;AAGD;EAEC;;;AChBF;EAIC;EACA;EACA;;AAEA;EAEC;EACA;;AAGD;EAEC;;;ACfD;EACC;;;AADD;EACC;;;AADD;EACC;;;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../src/index.scss","../src/styles/start.scss","../src/styles/3-generic/normalise.scss","../src/components/html/_GidsSpinnerControl/GidsSpinnerControl.scss","../src/components/html/GidsButton/GidsButton.scss","../src/styles/2-tools/typography.scss","../src/styles/2-tools/card.scss","../src/styles/2-tools/focus.scss","../src/components/html/GidsDivider/GidsDivider.scss","../src/components/html/GidsDisplayTag/GidsDisplayTag.scss","../src/styles/2-tools/tags.scss","../src/components/html/GidsIcon/GidsIcon.scss","../src/components/html/GidsLabel/GidsLabel.scss","../src/components/html/GidsLabel/GidsLabelInfo/GidsLabelInfo.scss","../src/styles/2-tools/links.scss","../src/components/html/GidsLink/GidsLink.scss","../src/components/html/GidsSpinner/GidsSpinner.scss","../src/components/html/_GidsCheckboxControl/GidsCheckboxControl.scss","../src/components/html/_GidsRadioControl/GidsRadioControl.scss","../src/components/html/_GidsSwitchControl/GidsSwitchControl.scss","../src/components/html/GidsCheckbox/GidsCheckbox.scss","../src/components/html/GidsRadio/GidsRadio.scss","../src/components/html/GidsSwitch/GidsSwitch.scss","../src/styles/2-tools/stack-layout.scss","../src/components/html/GidsBadge/GidsBadge.scss","../src/styles/2-tools/badge.scss","../src/components/html/GidsAvatar/GidsAvatar.scss","../src/components/html/GidsAvatarGroup/GidsAvatarGroup.scss","../src/styles/2-tools/group-container.scss","../src/styles/6-utilities/typography.scss","../src/styles/2-tools/accessibility.scss","../src/styles/6-utilities/visually-hidden.scss","../src/styles/end.scss"],"names":[],"mappings":"AAAA;AAAA;AAAA;ACAA;EACC;;;ACDD;EACC;;;ACKD;EACC;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAIA;EACC;EACA;EACA;;AAIF;EACC;IACC,mBA7Da;;EA+Dd;IACC;;;;AHzDH;AAAA;AAAA;AINA;EAOC;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAIA;EACA;EAGA;EACA;EACA;EACA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EAGA;AAAA;AAAA;EC/CA;EACA;EACA;EACA;EACA;EAGC;EAGD;ED8CA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;EACA,SAEC;EASD;EAKA;AAyDA;AA6CA;AA0CA;AAuDA;;AA1LA;EACC;EACA;EAWA;EACA;EACA;EAIA;;AAID;EACC;EACA;EACA;EACA;EACA;;AAID;EACC;EACA;;AAID;EAEC;EACA;;AAID;EAEC;;AE+B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F;ELxDA;EACA;EACA;EACA;EACA;EAGC;EAGD;EKiDC;EAKA;EACA;;AACA;EACC;;AD/DF;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;;AE3DF;EACC;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;;;AChBF;EACC;EACA;EPDA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AONA;EACC;;AAGD;EACC;;AAGD;EACC;;;AChBF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;;AAGD;EACC;;AAGD;EACC;;;AChBF;EAEC;EAEA;EACA;EACA;EAEA;;AAEA;EACC;;ARmKC;EQ1JD;;;AAWD;EACC;EACA;EAWA;EACA;EACA;;;AC1CD;EVHA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AUHA;EVPA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AUCA;EVXA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AUKA;EVfA;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AWXD;EACC;EACA;EACA;;AAEA;EACC;EACA;EXND;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWAA;EACC;EXXD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWMC;EXhBD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWUC;EXpBD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWgBC;EX1BD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWoBC;EX9BD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AW0BC;EXpCD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AW8BC;EXxCD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWoCC;EX9CD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWwCC;EXlDD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AW8CC;EXxDD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWkDC;EX5DD;EACA;EACA;EACA;EACA;EAGC;EAGD;;AWwDC;EXlED;EACA;EACA;EACA;EACA;EAGC;EAGD;;AW4DC;EXtED;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AYXD;EACC;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;;AAOA;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EACA;EACA;EACA;;AAGC;EACC;;AAGD;EACC;;AAGD;EAEC;EACA;AAAA;AAAA;;AAIA;EACC;AAAA;AAAA;;AAKD;EACC;AAAA;AAAA;;AAOH;EACC;EACA;;AVxEF;EACC;EACA;;AU+ED;EAEC;EACA;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;AAGD;EAEC;;;AClGF;EAGC;EACA;EACA;EACA;EACA;EAEA;;AAQA;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGC;EACC;;AAGD;EACC;EACA;;AAGD;EACC;EACA;;AAEA;EACC;EACA;;AAGD;EACC;EACA;;AAKH;EACC;EACA;;AXlEF;EACC;EACA;;AWsED;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;;ACtFF;EAEC;EACA;EACA;;AAIA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AZpBD;EACC;EACA;;AYuBA;EACC;;AAGD;EACC;;AAID;EACC;;AAMC;EACC;;AAGD;EACC;;AAMH;EACC;EACA;;AAKF;EACC;EACA;EACA;EACA;EACA;EACA,YACC;EAED;EACA;;AAGD;EACC;;AAGD;EAIC;;AAID;EAEC;EACA;;AAED;EACC;;;AC3FF;EAIC;EACA;EACA;;AAEA;EAEC;EACA;;AAGD;EAEC;;;AChBF;EAIC;EACA;EACA;;AAEA;EAEC;EACA;;AAGD;EAEC;;;AChBF;EAIC;EACA;EACA;;AAEA;EAEC;EACA;;AAGD;EAEC;;;ACfD;EACC;;;AADD;EACC;;;AADD;EACC;;;ACCF;EACC;EACA;EACA;EACA;EACA;EACA;EACA,SAEC;EASD;EACA;EACA;EACA;EACA;EAGA;EnBzBA;EACA;EACA;EACA;EACA;EAGC;EAGD;;AmBoBA;EACC;EACA;EACA;EACA;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;;;ACnDF;AAAA;AAAA;ACCA;EACC;EACA;EACA;EACA;EACA;EAIA;EACA;EACA;ErBXA;EACA;EACA;EACA;EACA;EAMA;EqBOA;ADZA;AAAA;;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAqBA;AAAA;AAAA;;AAAA;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA;AAAA;AAAA;EAkBA;AAAA;AAAA;AAAA;EAKA;;AAGC;EACC;EACA;EAIA;EAKA;;ACvCF;EACC;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;;AAID;EACC;ErBvCD;EACA;EACA;EACA;EACA;EAMA;;AqBmCC;EACC;;AAGF;EACC;ErBlDD;EACA;EACA;EACA;EACA;EAMA;;AqB8CC;EACC;;AAGF;EACC;ErB7DD;EACA;EACA;EACA;EACA;EAMA;;AqByDC;EACC;;AAMD;EACC;AAAA;AAAA;;AADD;EACC;AAAA;AAAA;;AADD;EACC;AAAA;AAAA;;AADD;EACC;AAAA;AAAA;;AADD;EACC;AAAA;AAAA;;;AASH;EACC;;;ACtFD;ECDC;EACA;EACA;;AACA;EACC;;AAGD;EACC;EACA;EACA;EAEA;;AAEA;EACC;;ADXF;EACC;EACA;;AAIA;EAGC;;;AEdH;AAAA;;AAAA;AAAA;;AAAA;AAAA;AAWA;ExBRC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBED;ExBZC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBMD;ExBhBC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBUD;ExBpBC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBcD;ExBxBC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBkBD;ExB5BC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBsBD;ExBhCC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwB0BD;ExBpCC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwB8BD;ExBxCC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBkCD;ExB5CC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBsCD;ExBhDC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwB0CD;ExBpDC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwB8CD;ExBxDC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBkDD;ExB5DC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBsDD;ExBhEC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwB0DD;ExBpEC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwB8DD;ExBxEC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBkED;ExB5EC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwBsED;ExBhFC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwB0ED;ExBpFC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AwB8ED;ExBxFC;EACA;EACA;EACA;EACA;EAGC;EAGD;;;AyBbD;AAAA;;AAAA;;AAAA;AAAA;AAAA;AAAA;ACEA;EDSC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;A9BoBD;AAAA;AAAA;AgCvCA;EACC","file":"index.css"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as getAssetPath, d as getConstructedGidsStylesheet, c as refreshConstructedGidsStylesheet, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-
|
|
1
|
+
export { g as getAssetPath, d as getConstructedGidsStylesheet, c as refreshConstructedGidsStylesheet, r as render, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-C0FfV2mK.js';
|
|
2
2
|
export { setGidsAssetFilePaths, setGidsDefaultAssetDirPath } from '@ganpatiinfo/gids-web-shared';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
4
4
|
|
|
@@ -10,10 +10,6 @@ var __export = (target, all) => {
|
|
|
10
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
// src/utils/constants.ts
|
|
14
|
-
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
15
|
-
var HTML_NS = "http://www.w3.org/1999/xhtml";
|
|
16
|
-
|
|
17
13
|
// src/client/client-host-ref.ts
|
|
18
14
|
var getHostRef = (ref) => {
|
|
19
15
|
if (ref.__stencil__getHostRef) {
|
|
@@ -39,7 +35,6 @@ var registerHost = (hostElement, cmpMeta) => {
|
|
|
39
35
|
};
|
|
40
36
|
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
41
37
|
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
42
|
-
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
43
38
|
var win = typeof window !== "undefined" ? window : {};
|
|
44
39
|
var H = win.HTMLElement || class {
|
|
45
40
|
};
|
|
@@ -189,12 +184,6 @@ var h = (nodeName, vnodeData, ...children) => {
|
|
|
189
184
|
if (vnodeData.key) {
|
|
190
185
|
key = vnodeData.key;
|
|
191
186
|
}
|
|
192
|
-
{
|
|
193
|
-
const classData = vnodeData.className || vnodeData.class;
|
|
194
|
-
if (classData) {
|
|
195
|
-
vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
187
|
}
|
|
199
188
|
if (typeof nodeName === "function") {
|
|
200
189
|
return nodeName(
|
|
@@ -313,40 +302,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
313
302
|
}
|
|
314
303
|
let isProp = isMemberInElement(elm, memberName);
|
|
315
304
|
let ln = memberName.toLowerCase();
|
|
316
|
-
if (memberName === "
|
|
317
|
-
const classList = elm.classList;
|
|
318
|
-
const oldClasses = parseClassList(oldValue);
|
|
319
|
-
let newClasses = parseClassList(newValue);
|
|
320
|
-
{
|
|
321
|
-
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
322
|
-
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
323
|
-
}
|
|
324
|
-
} else if (memberName === "style") {
|
|
325
|
-
{
|
|
326
|
-
for (const prop in oldValue) {
|
|
327
|
-
if (!newValue || newValue[prop] == null) {
|
|
328
|
-
if (prop.includes("-")) {
|
|
329
|
-
elm.style.removeProperty(prop);
|
|
330
|
-
} else {
|
|
331
|
-
elm.style[prop] = "";
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
for (const prop in newValue) {
|
|
337
|
-
if (!oldValue || newValue[prop] !== oldValue[prop]) {
|
|
338
|
-
if (prop.includes("-")) {
|
|
339
|
-
elm.style.setProperty(prop, newValue[prop]);
|
|
340
|
-
} else {
|
|
341
|
-
elm.style[prop] = newValue[prop];
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
} else if (memberName === "key") ; else if (memberName === "ref") {
|
|
346
|
-
if (newValue) {
|
|
347
|
-
newValue(elm);
|
|
348
|
-
}
|
|
349
|
-
} else if ((!elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
305
|
+
if (memberName === "key") ; else if ((!elm.__lookupSetter__(memberName)) && memberName[0] === "o" && memberName[1] === "n") {
|
|
350
306
|
if (memberName[2] === "-") {
|
|
351
307
|
memberName = memberName.slice(3);
|
|
352
308
|
} else if (isMemberInElement(win, ln)) {
|
|
@@ -366,7 +322,7 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
366
322
|
}
|
|
367
323
|
} else {
|
|
368
324
|
const isComplex = isComplexType(newValue);
|
|
369
|
-
if ((isProp || isComplex && newValue !== null) &&
|
|
325
|
+
if ((isProp || isComplex && newValue !== null) && true) {
|
|
370
326
|
try {
|
|
371
327
|
if (!elm.tagName.includes("-")) {
|
|
372
328
|
const n = newValue == null ? "" : newValue;
|
|
@@ -385,41 +341,20 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
|
|
|
385
341
|
} catch (e) {
|
|
386
342
|
}
|
|
387
343
|
}
|
|
388
|
-
let xlink = false;
|
|
389
|
-
{
|
|
390
|
-
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
391
|
-
memberName = ln;
|
|
392
|
-
xlink = true;
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
344
|
if (newValue == null || newValue === false) {
|
|
396
345
|
if (newValue !== false || elm.getAttribute(memberName) === "") {
|
|
397
|
-
|
|
398
|
-
elm.removeAttributeNS(XLINK_NS, memberName);
|
|
399
|
-
} else {
|
|
346
|
+
{
|
|
400
347
|
elm.removeAttribute(memberName);
|
|
401
348
|
}
|
|
402
349
|
}
|
|
403
350
|
} else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {
|
|
404
351
|
newValue = newValue === true ? "" : newValue;
|
|
405
|
-
|
|
406
|
-
elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
407
|
-
} else {
|
|
352
|
+
{
|
|
408
353
|
elm.setAttribute(memberName, newValue);
|
|
409
354
|
}
|
|
410
355
|
}
|
|
411
356
|
}
|
|
412
357
|
};
|
|
413
|
-
var parseClassListRegex = /\s/;
|
|
414
|
-
var parseClassList = (value) => {
|
|
415
|
-
if (typeof value === "object" && value && "baseVal" in value) {
|
|
416
|
-
value = value.baseVal;
|
|
417
|
-
}
|
|
418
|
-
if (!value || typeof value !== "string") {
|
|
419
|
-
return [];
|
|
420
|
-
}
|
|
421
|
-
return value.split(parseClassListRegex);
|
|
422
|
-
};
|
|
423
358
|
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
424
359
|
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
425
360
|
|
|
@@ -470,21 +405,14 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
470
405
|
if (newVNode2.$text$ !== null) {
|
|
471
406
|
elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
472
407
|
} else {
|
|
473
|
-
if (!isSvgMode) {
|
|
474
|
-
isSvgMode = newVNode2.$tag$ === "svg";
|
|
475
|
-
}
|
|
476
408
|
if (!win.document) {
|
|
477
409
|
throw new Error(
|
|
478
410
|
"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component."
|
|
479
411
|
);
|
|
480
412
|
}
|
|
481
|
-
elm = newVNode2.$elm$ = win.document.
|
|
482
|
-
isSvgMode ? SVG_NS : HTML_NS,
|
|
413
|
+
elm = newVNode2.$elm$ = win.document.createElement(
|
|
483
414
|
newVNode2.$tag$
|
|
484
|
-
)
|
|
485
|
-
if (isSvgMode && newVNode2.$tag$ === "foreignObject") {
|
|
486
|
-
isSvgMode = false;
|
|
487
|
-
}
|
|
415
|
+
);
|
|
488
416
|
{
|
|
489
417
|
updateElement(null, newVNode2, isSvgMode);
|
|
490
418
|
}
|
|
@@ -496,13 +424,6 @@ var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
|
496
424
|
}
|
|
497
425
|
}
|
|
498
426
|
}
|
|
499
|
-
{
|
|
500
|
-
if (newVNode2.$tag$ === "svg") {
|
|
501
|
-
isSvgMode = false;
|
|
502
|
-
} else if (elm.tagName === "foreignObject") {
|
|
503
|
-
isSvgMode = true;
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
427
|
}
|
|
507
428
|
elm["s-hn"] = hostTagName;
|
|
508
429
|
return elm;
|
|
@@ -528,7 +449,6 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
|
528
449
|
const vnode = vnodes[index];
|
|
529
450
|
if (vnode) {
|
|
530
451
|
const elm = vnode.$elm$;
|
|
531
|
-
nullifyVNodeRefs(vnode);
|
|
532
452
|
if (elm) {
|
|
533
453
|
elm.remove();
|
|
534
454
|
}
|
|
@@ -635,12 +555,8 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
635
555
|
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
636
556
|
const oldChildren = oldVNode.$children$;
|
|
637
557
|
const newChildren = newVNode2.$children$;
|
|
638
|
-
const tag = newVNode2.$tag$;
|
|
639
558
|
const text = newVNode2.$text$;
|
|
640
559
|
if (text === null) {
|
|
641
|
-
{
|
|
642
|
-
isSvgMode = tag === "svg" ? true : tag === "foreignObject" ? false : isSvgMode;
|
|
643
|
-
}
|
|
644
560
|
{
|
|
645
561
|
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
646
562
|
}
|
|
@@ -657,19 +573,10 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
|
657
573
|
) {
|
|
658
574
|
removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
659
575
|
}
|
|
660
|
-
if (isSvgMode && tag === "svg") {
|
|
661
|
-
isSvgMode = false;
|
|
662
|
-
}
|
|
663
576
|
} else if (oldVNode.$text$ !== text) {
|
|
664
577
|
elm.data = text;
|
|
665
578
|
}
|
|
666
579
|
};
|
|
667
|
-
var nullifyVNodeRefs = (vNode) => {
|
|
668
|
-
{
|
|
669
|
-
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
670
|
-
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
671
|
-
}
|
|
672
|
-
};
|
|
673
580
|
var insertBefore = (parent, newNode, reference) => {
|
|
674
581
|
{
|
|
675
582
|
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
@@ -1222,6 +1129,6 @@ const getConstructedGidsStylesheet = () => {
|
|
|
1222
1129
|
};
|
|
1223
1130
|
|
|
1224
1131
|
export { H, setNonce as a, setPlatformOptions as b, refreshConstructedGidsStylesheet as c, getConstructedGidsStylesheet as d, createEvent as e, Host as f, getAssetPath as g, h, proxyCustomElement as p, render as r, setAssetPath as s };
|
|
1225
|
-
//# sourceMappingURL=p-
|
|
1132
|
+
//# sourceMappingURL=p-C0FfV2mK.js.map
|
|
1226
1133
|
|
|
1227
|
-
//# sourceMappingURL=p-
|
|
1134
|
+
//# sourceMappingURL=p-C0FfV2mK.js.map
|