@quartzds/core 1.0.0-beta.1 → 1.0.0-beta.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/components/icon.js +9 -9
- package/components/icon.js.map +1 -1
- package/components/qds-checkbox.js +2 -2
- package/components/qds-checkbox.js.map +1 -1
- package/components/qds-inline-link.js +1 -1
- package/components/qds-inline-link.js.map +1 -1
- package/components/qds-radio.js +1 -1
- package/components/qds-radio.js.map +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{library-4803c801.js → library-4ab80928.js} +10 -10
- package/dist/cjs/library-4ab80928.js.map +1 -0
- package/dist/cjs/qds-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/qds-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js.map +1 -1
- package/dist/cjs/qds-radio.cjs.entry.js +1 -1
- package/dist/cjs/qds-radio.cjs.entry.js.map +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{library-aa6893c0.js → library-eaf6fb3d.js} +10 -10
- package/dist/esm/library-eaf6fb3d.js.map +1 -0
- package/dist/esm/qds-checkbox.entry.js +2 -2
- package/dist/esm/qds-checkbox.entry.js.map +1 -1
- package/dist/esm/qds-icon.entry.js +1 -1
- package/dist/esm/qds-icon.entry.js.map +1 -1
- package/dist/esm/qds-inline-link.entry.js +1 -1
- package/dist/esm/qds-inline-link.entry.js.map +1 -1
- package/dist/esm/qds-radio.entry.js +1 -1
- package/dist/esm/qds-radio.entry.js.map +1 -1
- package/dist/types/components/icon/core-library.d.ts +4 -0
- package/hydrate/index.js +13 -13
- package/package.json +5 -7
- package/dist/cjs/library-4803c801.js.map +0 -1
- package/dist/esm/library-aa6893c0.js.map +0 -1
- package/dist/types/components/icon/system-library.d.ts +0 -4
package/hydrate/index.js
CHANGED
|
@@ -6169,10 +6169,10 @@ class Checkbox {
|
|
|
6169
6169
|
}), hAsync("qds-icon", { "aria-hidden": "true", class: {
|
|
6170
6170
|
icon: true,
|
|
6171
6171
|
checked: true,
|
|
6172
|
-
}, "data-size": this.size, library: "
|
|
6172
|
+
}, "data-size": this.size, library: "core", name: "check" }), hAsync("qds-icon", { "aria-hidden": "true", class: {
|
|
6173
6173
|
icon: true,
|
|
6174
6174
|
indeterminate: true,
|
|
6175
|
-
}, "data-size": this.size, library: "
|
|
6175
|
+
}, "data-size": this.size, library: "core", name: "minus" }), this.hasText && (hAsync("qds-label", { required: this.required, size: this.size, text: this.text }))));
|
|
6176
6176
|
}
|
|
6177
6177
|
get element() { return getElement(this); }
|
|
6178
6178
|
static get style() { return checkboxCss; }
|
|
@@ -7837,12 +7837,6 @@ class Dropdown {
|
|
|
7837
7837
|
}; }
|
|
7838
7838
|
}
|
|
7839
7839
|
|
|
7840
|
-
// SPDX-FileCopyrightText: © 2023 Schneider Electric
|
|
7841
|
-
const library = {
|
|
7842
|
-
name: 'default',
|
|
7843
|
-
resolver: (name) => getAssetPath(`icons/${name}.svg`),
|
|
7844
|
-
};
|
|
7845
|
-
|
|
7846
7840
|
const arrowTopRightOnSquareSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTEyLjAzIDEzLjAxSDMuMDJ2LTloNS45N3YtMUgyLjAzdjExaDEwLjk5VjYuOThoLS45OXY2LjAzWiIvPjxwYXRoIGQ9Ik0xMC45OSAxLjk4djFoMS4zNkw5LjEgNi4yM2wuNzEuNyAzLjE2LTMuMTYtLjAxIDEuMjEgMSAuMDEuMDQtMy4wMWgtMy4wMVoiLz48L3N2Zz4=';
|
|
7847
7841
|
|
|
7848
7842
|
const checkSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiI+PHBhdGggZD0iTTYuMzEgMTEuODYgMy4wOCA4LjYzbC43MS0uNzEgMi41MiAyLjUyIDUuOS01Ljk0LjcxLjctNi42MSA2LjY2WiIvPjwvc3ZnPg==';
|
|
@@ -7857,13 +7851,19 @@ const icons = {
|
|
|
7857
7851
|
minus: minusSvg,
|
|
7858
7852
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
7859
7853
|
};
|
|
7860
|
-
const
|
|
7861
|
-
name: '
|
|
7854
|
+
const coreLibrary = {
|
|
7855
|
+
name: 'core',
|
|
7862
7856
|
resolver: (name) => icons[name] ?? '',
|
|
7863
7857
|
};
|
|
7864
7858
|
|
|
7865
7859
|
// SPDX-FileCopyrightText: © 2023 Schneider Electric
|
|
7866
|
-
|
|
7860
|
+
const library = {
|
|
7861
|
+
name: 'default',
|
|
7862
|
+
resolver: (name) => getAssetPath(`icons/${name}.svg`),
|
|
7863
|
+
};
|
|
7864
|
+
|
|
7865
|
+
// SPDX-FileCopyrightText: © 2023 Schneider Electric
|
|
7866
|
+
let registry = [library, coreLibrary];
|
|
7867
7867
|
/**
|
|
7868
7868
|
* Returns a library from the registry.
|
|
7869
7869
|
*/
|
|
@@ -8032,7 +8032,7 @@ class InlineLink {
|
|
|
8032
8032
|
};
|
|
8033
8033
|
}
|
|
8034
8034
|
render() {
|
|
8035
|
-
return (hAsync("a", { "aria-disabled": this.disabled ? 'true' : 'false', class: "inline-link", download: this.download, href: this.href, hrefLang: this.hreflang, onBlur: this.onBlur, onFocus: this.onFocus, referrerPolicy: this.referrerPolicy, rel: this.rel, target: this.target, ...this.inheritedAttributes, tabIndex: this.disabled ? -1 : this.computedTabIndex }, hAsync("slot", null), hAsync("qds-icon", { class: "external", library: "
|
|
8035
|
+
return (hAsync("a", { "aria-disabled": this.disabled ? 'true' : 'false', class: "inline-link", download: this.download, href: this.href, hrefLang: this.hreflang, onBlur: this.onBlur, onFocus: this.onFocus, referrerPolicy: this.referrerPolicy, rel: this.rel, target: this.target, ...this.inheritedAttributes, tabIndex: this.disabled ? -1 : this.computedTabIndex }, hAsync("slot", null), hAsync("qds-icon", { class: "external", library: "core", name: "arrow-top-right-on-square" })));
|
|
8036
8036
|
}
|
|
8037
8037
|
static get delegatesFocus() { return true; }
|
|
8038
8038
|
get element() { return getElement(this); }
|
|
@@ -8393,7 +8393,7 @@ class Radio {
|
|
|
8393
8393
|
hAsync("label", { "aria-disabled": this.computedDisabled ? 'true' : 'false', class: {
|
|
8394
8394
|
inline: this.inline,
|
|
8395
8395
|
label: true,
|
|
8396
|
-
}, "data-size": this.size }, hAsync("input", { checked: this.checked, class: "radio", "data-size": this.size, disabled: this.disabled, form: this.form, name: this.name, onBlur: this.onBlur, onChange: this.onChange, onFocus: this.onFocus, ref: this.ref, required: this.required, type: "radio", value: this.value ?? undefined, ...this.inheritedAttributes }), hAsync("qds-icon", { "aria-hidden": "true", class: "icon", "data-size": this.size, library: "
|
|
8396
|
+
}, "data-size": this.size }, hAsync("input", { checked: this.checked, class: "radio", "data-size": this.size, disabled: this.disabled, form: this.form, name: this.name, onBlur: this.onBlur, onChange: this.onChange, onFocus: this.onFocus, ref: this.ref, required: this.required, type: "radio", value: this.value ?? undefined, ...this.inheritedAttributes }), hAsync("qds-icon", { "aria-hidden": "true", class: "icon", "data-size": this.size, library: "core", name: "check" }), this.hasText && hAsync("qds-label", { size: this.size, text: this.text })));
|
|
8397
8397
|
}
|
|
8398
8398
|
get element() { return getElement(this); }
|
|
8399
8399
|
static get style() { return radioCss; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quartzds/core",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.2",
|
|
4
4
|
"description": "Quartz design system web components",
|
|
5
5
|
"homepage": "https://github.com/quartzds/core-foundations/tree/main/packages/core",
|
|
6
6
|
"bugs": {
|
|
@@ -186,9 +186,9 @@
|
|
|
186
186
|
"@quartzds/browserslist-config": "1.1.0",
|
|
187
187
|
"@quartzds/generic-tokens-core": "1.0.0-beta.1",
|
|
188
188
|
"@quartzds/tailwind-preset": "1.0.0-beta.3",
|
|
189
|
-
"@stencil/angular-output-target": "0.7.
|
|
189
|
+
"@stencil/angular-output-target": "0.7.1",
|
|
190
190
|
"@stencil/postcss": "2.1.0",
|
|
191
|
-
"@stencil/react-output-target": "0.5.
|
|
191
|
+
"@stencil/react-output-target": "0.5.3",
|
|
192
192
|
"@stencil/vue-output-target": "0.8.5",
|
|
193
193
|
"@storybook/addon-a11y": "6.5.16",
|
|
194
194
|
"@storybook/addon-docs": "6.5.16",
|
|
@@ -199,6 +199,7 @@
|
|
|
199
199
|
"@storybook/mdx2-csf": "1.1.0",
|
|
200
200
|
"@storybook/web-components": "6.5.16",
|
|
201
201
|
"@types/postcss-import": "14.0.0",
|
|
202
|
+
"@types/react": "18.2.14",
|
|
202
203
|
"babel-loader": "9.1.2",
|
|
203
204
|
"babel-plugin-macros": "3.1.0",
|
|
204
205
|
"core-js": "3.30.2",
|
|
@@ -224,8 +225,5 @@
|
|
|
224
225
|
"engines": {
|
|
225
226
|
"node": "^14.20.0 || ^16.13.0 || >=18.10.0"
|
|
226
227
|
},
|
|
227
|
-
"customElements": "./dist/custom-elements.json"
|
|
228
|
-
"publishConfig": {
|
|
229
|
-
"access": "public"
|
|
230
|
-
}
|
|
228
|
+
"customElements": "./dist/custom-elements.json"
|
|
231
229
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"library-4803c801.js","mappings":";;;;;;;;;AAAA;AAQA,MAAM,OAAO,GAAgB;EAC3B,IAAI,EAAE,SAAS;EACf,QAAQ,EAAE,CAAC,IAAI,KAAKA,kBAAY,CAAC,SAAS,IAAI,MAAM,CAAC;CACtD;;ACXD,MAAM,wBAAwB,GAAG,oUAAoU;;ACArW,MAAM,QAAQ,GAAG,4NAA4N;;ACA7O,MAAM,QAAQ,GAAG,gKAAgK;;ACAjL;AAeA,MAAM,KAAK,GAAuC;;EAEhD,2BAA2B,EAAEC,wBAAqB;SAClDC,QAAK;SACLC,QAAK;;CAEN,CAAA;AAED,MAAM,aAAa,GAAgB;EACjC,IAAI,EAAE,QAAQ;EACd,QAAQ,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE;CACtC;;AC1BD;AAeA,IAAI,QAAQ,GAAkB,CAACC,OAAc,EAAE,aAAa,CAAC,CAAA;AAE7D;;;MAGa,cAAc,GAAG,CAAC,IAAY,KACzC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,IAAI,EAAC;AAEnD;;;MAGa,qBAAqB,GAAG,CAAC,IAAY;EAChD,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;AAChE,EAAC;AAED;;;MAGa,mBAAmB,GAAG,CACjC,IAAY,EACZ,OAAoC;EAEpC,qBAAqB,CAAC,IAAI,CAAC,CAAA;EAC3B,QAAQ,CAAC,IAAI,CAAC;IACZ,IAAI;IACJ,GAAG,OAAO;GACX,CAAC,CAAA;AACJ;;;;;;","names":["getAssetPath","arrowTopRightOnSquare","check","minus","defaultLibrary"],"sources":["./src/components/icon/default-library.ts","../../node_modules/@quartzds/generic-icons-core/dist/arrow-top-right-on-square.svg","../../node_modules/@quartzds/generic-icons-core/dist/check.svg","../../node_modules/@quartzds/generic-icons-core/dist/minus.svg","./src/components/icon/system-library.ts","./src/components/icon/library.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\nimport { getAssetPath } from '@stencil/core'\n\nimport type { IconLibrary } from './library'\n\nconst library: IconLibrary = {\n name: 'default',\n resolver: (name) => getAssetPath(`icons/${name}.svg`),\n}\n\nexport default library\n","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M12.03 13.01H3.02v-9h5.97v-1H2.03v11h10.99V6.98h-.99v6.03Z\"/><path d=\"M10.99 1.98v1h1.36L9.1 6.23l.71.7 3.16-3.16-.01 1.21 1 .01.04-3.01h-3.01Z\"/></svg>","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M6.31 11.86 3.08 8.63l.71-.71 2.52 2.52 5.9-5.94.71.7-6.61 6.66Z\"/></svg>","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M13 7.5H3.01v1H13v-1Z\"/></svg>","// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\n// FIXME: TypeScript and Webpack can resolve exports from the package.json\n// `exports` field but Rollup can't. `@quartzds/generic-icons-core/*.svg`\n// _should_ work but it doesn't.\n/* eslint-disable import/no-unresolved */\nimport arrowTopRightOnSquare from '@quartzds/generic-icons-core/dist/arrow-top-right-on-square.svg'\nimport check from '@quartzds/generic-icons-core/dist/check.svg'\nimport minus from '@quartzds/generic-icons-core/dist/minus.svg'\n\n/* eslint-enable import/no-unresolved */\nimport type { IconLibrary } from './library'\n\nconst icons: Record<string, string | undefined> = {\n /* eslint-disable @typescript-eslint/naming-convention */\n 'arrow-top-right-on-square': arrowTopRightOnSquare,\n check,\n minus,\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nconst systemLibrary: IconLibrary = {\n name: 'system',\n resolver: (name) => icons[name] ?? '',\n}\n\nexport default systemLibrary\n","// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\nimport type { Except } from 'type-fest'\n\nimport defaultLibrary from './default-library'\nimport systemLibrary from './system-library'\n\nexport type IconLibraryResolver = (name: string) => string\nexport interface IconLibrary {\n name: string\n resolver: IconLibraryResolver\n}\n\nlet registry: IconLibrary[] = [defaultLibrary, systemLibrary]\n\n/**\n * Returns a library from the registry.\n */\nexport const getIconLibrary = (name: string): IconLibrary | undefined =>\n registry.find((library) => library.name === name)\n\n/**\n * Removes an icon library from the registry.\n */\nexport const unregisterIconLibrary = (name: string): void => {\n registry = registry.filter((library) => library.name !== name)\n}\n\n/**\n * Adds an icon library to the registry or overrides an existing one.\n */\nexport const registerIconLibrary = (\n name: string,\n options: Except<IconLibrary, 'name'>,\n): void => {\n unregisterIconLibrary(name)\n registry.push({\n name,\n ...options,\n })\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"library-aa6893c0.js","mappings":";;;;;;;AAAA;AAQA,MAAM,OAAO,GAAgB;EAC3B,IAAI,EAAE,SAAS;EACf,QAAQ,EAAE,CAAC,IAAI,KAAK,YAAY,CAAC,SAAS,IAAI,MAAM,CAAC;CACtD;;ACXD,MAAM,wBAAwB,GAAG,oUAAoU;;ACArW,MAAM,QAAQ,GAAG,4NAA4N;;ACA7O,MAAM,QAAQ,GAAG,gKAAgK;;ACAjL;AAeA,MAAM,KAAK,GAAuC;;EAEhD,2BAA2B,EAAEA,wBAAqB;SAClDC,QAAK;SACLC,QAAK;;CAEN,CAAA;AAED,MAAM,aAAa,GAAgB;EACjC,IAAI,EAAE,QAAQ;EACd,QAAQ,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE;CACtC;;AC1BD;AAeA,IAAI,QAAQ,GAAkB,CAACC,OAAc,EAAE,aAAa,CAAC,CAAA;AAE7D;;;MAGa,cAAc,GAAG,CAAC,IAAY,KACzC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,IAAI,EAAC;AAEnD;;;MAGa,qBAAqB,GAAG,CAAC,IAAY;EAChD,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,IAAI,KAAK,IAAI,CAAC,CAAA;AAChE,EAAC;AAED;;;MAGa,mBAAmB,GAAG,CACjC,IAAY,EACZ,OAAoC;EAEpC,qBAAqB,CAAC,IAAI,CAAC,CAAA;EAC3B,QAAQ,CAAC,IAAI,CAAC;IACZ,IAAI;IACJ,GAAG,OAAO;GACX,CAAC,CAAA;AACJ;;;;","names":["arrowTopRightOnSquare","check","minus","defaultLibrary"],"sources":["./src/components/icon/default-library.ts","../../node_modules/@quartzds/generic-icons-core/dist/arrow-top-right-on-square.svg","../../node_modules/@quartzds/generic-icons-core/dist/check.svg","../../node_modules/@quartzds/generic-icons-core/dist/minus.svg","./src/components/icon/system-library.ts","./src/components/icon/library.ts"],"sourcesContent":["// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\nimport { getAssetPath } from '@stencil/core'\n\nimport type { IconLibrary } from './library'\n\nconst library: IconLibrary = {\n name: 'default',\n resolver: (name) => getAssetPath(`icons/${name}.svg`),\n}\n\nexport default library\n","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M12.03 13.01H3.02v-9h5.97v-1H2.03v11h10.99V6.98h-.99v6.03Z\"/><path d=\"M10.99 1.98v1h1.36L9.1 6.23l.71.7 3.16-3.16-.01 1.21 1 .01.04-3.01h-3.01Z\"/></svg>","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M6.31 11.86 3.08 8.63l.71-.71 2.52 2.52 5.9-5.94.71.7-6.61 6.66Z\"/></svg>","<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M13 7.5H3.01v1H13v-1Z\"/></svg>","// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\n// FIXME: TypeScript and Webpack can resolve exports from the package.json\n// `exports` field but Rollup can't. `@quartzds/generic-icons-core/*.svg`\n// _should_ work but it doesn't.\n/* eslint-disable import/no-unresolved */\nimport arrowTopRightOnSquare from '@quartzds/generic-icons-core/dist/arrow-top-right-on-square.svg'\nimport check from '@quartzds/generic-icons-core/dist/check.svg'\nimport minus from '@quartzds/generic-icons-core/dist/minus.svg'\n\n/* eslint-enable import/no-unresolved */\nimport type { IconLibrary } from './library'\n\nconst icons: Record<string, string | undefined> = {\n /* eslint-disable @typescript-eslint/naming-convention */\n 'arrow-top-right-on-square': arrowTopRightOnSquare,\n check,\n minus,\n /* eslint-enable @typescript-eslint/naming-convention */\n}\n\nconst systemLibrary: IconLibrary = {\n name: 'system',\n resolver: (name) => icons[name] ?? '',\n}\n\nexport default systemLibrary\n","// SPDX-FileCopyrightText: © 2023 Schneider Electric\n//\n// SPDX-License-Identifier: LGPL-2.1-only\n\nimport type { Except } from 'type-fest'\n\nimport defaultLibrary from './default-library'\nimport systemLibrary from './system-library'\n\nexport type IconLibraryResolver = (name: string) => string\nexport interface IconLibrary {\n name: string\n resolver: IconLibraryResolver\n}\n\nlet registry: IconLibrary[] = [defaultLibrary, systemLibrary]\n\n/**\n * Returns a library from the registry.\n */\nexport const getIconLibrary = (name: string): IconLibrary | undefined =>\n registry.find((library) => library.name === name)\n\n/**\n * Removes an icon library from the registry.\n */\nexport const unregisterIconLibrary = (name: string): void => {\n registry = registry.filter((library) => library.name !== name)\n}\n\n/**\n * Adds an icon library to the registry or overrides an existing one.\n */\nexport const registerIconLibrary = (\n name: string,\n options: Except<IconLibrary, 'name'>,\n): void => {\n unregisterIconLibrary(name)\n registry.push({\n name,\n ...options,\n })\n}\n"],"version":3}
|