@re-code/ui-components 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1 -0
  3. package/dist/cjs/index-CwGon_W1.js +4501 -0
  4. package/dist/cjs/index.cjs.js +3 -0
  5. package/dist/cjs/loader.cjs.js +12 -0
  6. package/dist/cjs/ui-components.cjs.js +51 -0
  7. package/dist/cjs/ui-label.cjs.entry.js +26 -0
  8. package/dist/collection/collection-manifest.json +12 -0
  9. package/dist/collection/components/ui-label/ui-label.css +199 -0
  10. package/dist/collection/components/ui-label/ui-label.js +152 -0
  11. package/dist/collection/components/ui-label/ui-label.stories.js +67 -0
  12. package/dist/collection/global/types.js +1 -0
  13. package/dist/components/index.d.ts +33 -0
  14. package/dist/components/index.js +6 -0
  15. package/dist/components/index2.js +4488 -0
  16. package/dist/components/ui-label.d.ts +11 -0
  17. package/dist/components/ui-label.js +51 -0
  18. package/dist/esm/index-CDwILsz8.js +4488 -0
  19. package/dist/esm/index.js +1 -0
  20. package/dist/esm/loader.js +10 -0
  21. package/dist/esm/ui-components.js +47 -0
  22. package/dist/esm/ui-label.entry.js +24 -0
  23. package/dist/index.cjs.js +1 -0
  24. package/dist/index.js +1 -0
  25. package/dist/types/components/ui-label/ui-label.d.ts +9 -0
  26. package/dist/types/components/ui-label/ui-label.stories.d.ts +4 -0
  27. package/dist/types/components.d.ts +67 -0
  28. package/dist/types/global/types.d.ts +3 -0
  29. package/dist/types/stencil-public-runtime.d.ts +1839 -0
  30. package/dist/types/ui-components/.stencil/ui-label.d.ts +15 -0
  31. package/dist/types/ui-components/.stencil/ui-label.stories.d.ts +10 -0
  32. package/dist/ui-components/index-CDwILsz8.js +4488 -0
  33. package/dist/ui-components/index-Ds6GXFU9.js +4491 -0
  34. package/dist/ui-components/index-Ds6GXFU9.js.map +1 -0
  35. package/dist/ui-components/index-NEMW1Jjc.js +4491 -0
  36. package/dist/ui-components/index-NEMW1Jjc.js.map +1 -0
  37. package/dist/ui-components/index.esm.js +1 -0
  38. package/dist/ui-components/index.esm.js.map +1 -0
  39. package/dist/ui-components/ui-components.css +28 -0
  40. package/dist/ui-components/ui-components.esm.js +47 -0
  41. package/dist/ui-components/ui-components.esm.js.map +1 -0
  42. package/dist/ui-components/ui-label.entry.js +24 -0
  43. package/dist/ui-components/ui-label.entry.js.map +1 -0
  44. package/package.json +65 -0
@@ -0,0 +1 @@
1
+ //! Autogenerated index
@@ -0,0 +1,10 @@
1
+ import { g as globalScripts, b as bootstrapLazy } from './index-CDwILsz8.js';
2
+ export { s as setNonce } from './index-CDwILsz8.js';
3
+
4
+ const defineCustomElements = async (win, options) => {
5
+ if (typeof window === 'undefined') return undefined;
6
+ await globalScripts();
7
+ return bootstrapLazy([["ui-label",[[257,"ui-label",{"label":[1],"variant":[1],"color":[1],"weight":[1],"italic":[4]}]]]], options);
8
+ };
9
+
10
+ export { defineCustomElements };
@@ -0,0 +1,47 @@
1
+ import { B as BUILD, c as consoleDevInfo, H, w as win, N as NAMESPACE, p as promiseResolve, g as globalScripts, b as bootstrapLazy } from './index-CDwILsz8.js';
2
+ export { s as setNonce } from './index-CDwILsz8.js';
3
+
4
+ /*
5
+ Stencil Client Patch Browser v4.41.2 | MIT Licensed | https://stenciljs.com
6
+ */
7
+
8
+ var patchBrowser = () => {
9
+ if (BUILD.isDev && !BUILD.isTesting) {
10
+ consoleDevInfo("Running in development mode.");
11
+ }
12
+ if (BUILD.cloneNodeFix) {
13
+ patchCloneNodeFix(H.prototype);
14
+ }
15
+ const scriptElm = BUILD.scriptDataOpts ? win.document && Array.from(win.document.querySelectorAll("script")).find(
16
+ (s) => new RegExp(`/${NAMESPACE}(\\.esm)?\\.js($|\\?|#)`).test(s.src) || s.getAttribute("data-stencil-namespace") === NAMESPACE
17
+ ) : null;
18
+ const importMeta = import.meta.url;
19
+ const opts = BUILD.scriptDataOpts ? (scriptElm || {})["data-opts"] || {} : {};
20
+ if (importMeta !== "") {
21
+ opts.resourcesUrl = new URL(".", importMeta).href;
22
+ }
23
+ return promiseResolve(opts);
24
+ };
25
+ var patchCloneNodeFix = (HTMLElementPrototype) => {
26
+ const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;
27
+ HTMLElementPrototype.cloneNode = function(deep) {
28
+ if (this.nodeName === "TEMPLATE") {
29
+ return nativeCloneNodeFn.call(this, deep);
30
+ }
31
+ const clonedNode = nativeCloneNodeFn.call(this, false);
32
+ const srcChildNodes = this.childNodes;
33
+ if (deep) {
34
+ for (let i = 0; i < srcChildNodes.length; i++) {
35
+ if (srcChildNodes[i].nodeType !== 2) {
36
+ clonedNode.appendChild(srcChildNodes[i].cloneNode(true));
37
+ }
38
+ }
39
+ }
40
+ return clonedNode;
41
+ };
42
+ };
43
+
44
+ patchBrowser().then(async (options) => {
45
+ await globalScripts();
46
+ return bootstrapLazy([["ui-label",[[257,"ui-label",{"label":[1],"variant":[1],"color":[1],"weight":[1],"italic":[4]}]]]], options);
47
+ });
@@ -0,0 +1,24 @@
1
+ import { r as registerInstance, h, a as Host } from './index-CDwILsz8.js';
2
+
3
+ const uiLabelCss = () => `:host{display:inline-block;font-family:"Roboto", system-ui, -apple-system, sans-serif;color:#1D1B20;transition:all 0.2s ease-in-out}:host(.ui-label--display-large){font-size:57px;line-height:64px;font-weight:400;letter-spacing:-0.25px}:host(.ui-label--display-medium){font-size:45px;line-height:52px;font-weight:400;letter-spacing:0px}:host(.ui-label--display-small){font-size:36px;line-height:44px;font-weight:400;letter-spacing:0px}:host(.ui-label--headline-large){font-size:32px;line-height:40px;font-weight:400;letter-spacing:0px}:host(.ui-label--headline-medium){font-size:28px;line-height:36px;font-weight:400;letter-spacing:0px}:host(.ui-label--headline-small){font-size:24px;line-height:32px;font-weight:400;letter-spacing:0px}:host(.ui-label--title-large){font-size:22px;line-height:28px;font-weight:400;letter-spacing:0px}:host(.ui-label--title-medium){font-size:16px;line-height:24px;font-weight:500;letter-spacing:0.15px}:host(.ui-label--title-small){font-size:14px;line-height:20px;font-weight:500;letter-spacing:0.1px}:host(.ui-label--body-large){font-size:16px;line-height:24px;font-weight:400;letter-spacing:0.5px}:host(.ui-label--body-medium){font-size:14px;line-height:20px;font-weight:400;letter-spacing:0.25px}:host(.ui-label--body-small){font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.4px}:host(.ui-label--label-large){font-size:14px;line-height:20px;font-weight:500;letter-spacing:0.1px}:host(.ui-label--label-medium){font-size:12px;line-height:16px;font-weight:500;letter-spacing:0.5px}:host(.ui-label--label-small){font-size:11px;line-height:16px;font-weight:500;letter-spacing:0.5px}:host(.ui-label--color-primary){color:#6750A4}:host(.ui-label--color-on-primary){color:#FFFFFF}:host(.ui-label--color-primary-container){color:#EADDFF}:host(.ui-label--color-on-primary-container){color:#21005D}:host(.ui-label--color-secondary){color:#625B71}:host(.ui-label--color-on-secondary){color:#FFFFFF}:host(.ui-label--color-secondary-container){color:#E8DEF8}:host(.ui-label--color-on-secondary-container){color:#1D192B}:host(.ui-label--color-tertiary){color:#7D5260}:host(.ui-label--color-on-tertiary){color:#FFFFFF}:host(.ui-label--color-tertiary-container){color:#FFD8E4}:host(.ui-label--color-on-tertiary-container){color:#31111D}:host(.ui-label--color-error){color:#B3261E}:host(.ui-label--color-on-error){color:#FFFFFF}:host(.ui-label--color-surface){color:#FEF7FF}:host(.ui-label--color-on-surface){color:#1D1B20}:host(.ui-label--color-on-surface-variant){color:#49454F}:host(.ui-label--color-outline){color:#79747E}:host(.ui-label--weight-normal){font-weight:400}:host(.ui-label--weight-medium){font-weight:500}:host(.ui-label--weight-bold){font-weight:700}:host(.ui-label--italic){font-style:italic !important}`;
4
+
5
+ const UiLabel = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ this.variant = 'body-medium';
9
+ this.color = 'on-surface';
10
+ this.italic = false;
11
+ }
12
+ render() {
13
+ const classMap = {
14
+ [`ui-label--${this.variant}`]: true,
15
+ [`ui-label--color-${this.color}`]: true,
16
+ [`ui-label--weight-${this.weight}`]: !!this.weight,
17
+ 'ui-label--italic': this.italic
18
+ };
19
+ return (h(Host, { key: 'aa90dba620bb302ef1f8d2d9452eab3cb1c993db', class: classMap }, h("span", { key: '09e6a2daad525a3946a4d926799e866970a70fc3' }, this.label, " ", h("slot", { key: '972f325c8826a2bc3f7d1a36bf5adb4335285904' }))));
20
+ }
21
+ };
22
+ UiLabel.style = uiLabelCss();
23
+
24
+ export { UiLabel as ui_label };
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/index.cjs.js');
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/index.js';
@@ -0,0 +1,9 @@
1
+ import { TypographyVariant, ColorVariant, FontWeight } from '../../global/types';
2
+ export declare class UiLabel {
3
+ label: string;
4
+ variant: TypographyVariant;
5
+ color: ColorVariant;
6
+ weight?: FontWeight;
7
+ italic: boolean;
8
+ render(): any;
9
+ }
@@ -0,0 +1,4 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Playground: StoryObj;
@@ -0,0 +1,67 @@
1
+ /* eslint-disable */
2
+ /* tslint:disable */
3
+ /**
4
+ * This is an autogenerated file created by the Stencil compiler.
5
+ * It contains typing information for all components that exist in this project.
6
+ */
7
+ import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
+ import { ColorVariant, FontWeight, TypographyVariant } from "./global/types";
9
+ export { ColorVariant, FontWeight, TypographyVariant } from "./global/types";
10
+ export namespace Components {
11
+ interface UiLabel {
12
+ /**
13
+ * @default 'on-surface'
14
+ */
15
+ "color": ColorVariant;
16
+ /**
17
+ * @default false
18
+ */
19
+ "italic": boolean;
20
+ "label": string;
21
+ /**
22
+ * @default 'body-medium'
23
+ */
24
+ "variant": TypographyVariant;
25
+ "weight"?: FontWeight;
26
+ }
27
+ }
28
+ declare global {
29
+ interface HTMLUiLabelElement extends Components.UiLabel, HTMLStencilElement {
30
+ }
31
+ var HTMLUiLabelElement: {
32
+ prototype: HTMLUiLabelElement;
33
+ new (): HTMLUiLabelElement;
34
+ };
35
+ interface HTMLElementTagNameMap {
36
+ "ui-label": HTMLUiLabelElement;
37
+ }
38
+ }
39
+ declare namespace LocalJSX {
40
+ interface UiLabel {
41
+ /**
42
+ * @default 'on-surface'
43
+ */
44
+ "color"?: ColorVariant;
45
+ /**
46
+ * @default false
47
+ */
48
+ "italic"?: boolean;
49
+ "label": string;
50
+ /**
51
+ * @default 'body-medium'
52
+ */
53
+ "variant"?: TypographyVariant;
54
+ "weight"?: FontWeight;
55
+ }
56
+ interface IntrinsicElements {
57
+ "ui-label": UiLabel;
58
+ }
59
+ }
60
+ export { LocalJSX as JSX };
61
+ declare module "@stencil/core" {
62
+ export namespace JSX {
63
+ interface IntrinsicElements {
64
+ "ui-label": LocalJSX.UiLabel & JSXBase.HTMLAttributes<HTMLUiLabelElement>;
65
+ }
66
+ }
67
+ }
@@ -0,0 +1,3 @@
1
+ export type TypographyVariant = 'display-large' | 'display-medium' | 'display-small' | 'headline-large' | 'headline-medium' | 'headline-small' | 'title-large' | 'title-medium' | 'title-small' | 'body-large' | 'body-medium' | 'body-small' | 'label-large' | 'label-medium' | 'label-small';
2
+ export type ColorVariant = 'primary' | 'on-primary' | 'primary-container' | 'on-primary-container' | 'secondary' | 'on-secondary' | 'secondary-container' | 'on-secondary-container' | 'tertiary' | 'on-tertiary' | 'tertiary-container' | 'on-tertiary-container' | 'error' | 'on-error' | 'surface' | 'on-surface' | 'on-surface-variant' | 'outline';
3
+ export type FontWeight = 'normal' | 'medium' | 'bold';