@ganpatiinfo/gids-web-dom-reference 0.0.3 → 0.0.4

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.
@@ -0,0 +1,6 @@
1
+ import { type GidsDisplayTagCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { type DomNodeOrString } from '../../utils/domUtils';
3
+ export interface GidsDisplayTagDomProps extends GidsDisplayTagCommonProps<DomNodeOrString> {
4
+ }
5
+ export declare const GidsDisplayTagDom: ({ label, appearance, color, size, icon, }: GidsDisplayTagDomProps) => HTMLSpanElement;
6
+ //# sourceMappingURL=GidsDisplayTag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsDisplayTag.d.ts","sourceRoot":"","sources":["../../../src/components/GidsDisplayTag/GidsDisplayTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAI5D,MAAM,WAAW,sBAChB,SAAQ,yBAAyB,CAAC,eAAe,CAAC;CAAG;AAEtD,eAAO,MAAM,iBAAiB,GAAI,2CAM/B,sBAAsB,KAAG,eAe3B,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { GidsDisplayTagWebUtils } from '@ganpatiinfo/gids-web-shared';
2
+ const { getGidsDisplaTagClassNames } = GidsDisplayTagWebUtils;
3
+ export const GidsDisplayTagDom = ({ label, appearance = 'subtle', color, size = 'md', icon, }) => {
4
+ const gidsDisplayTag = document.createElement('span');
5
+ if (icon !== undefined) {
6
+ gidsDisplayTag.append(icon);
7
+ }
8
+ gidsDisplayTag.append(label);
9
+ gidsDisplayTag.className = getGidsDisplaTagClassNames({
10
+ size,
11
+ appearance,
12
+ color,
13
+ });
14
+ return gidsDisplayTag;
15
+ };
16
+ //# sourceMappingURL=GidsDisplayTag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GidsDisplayTag.js","sourceRoot":"","sources":["../../../src/components/GidsDisplayTag/GidsDisplayTag.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAGtE,MAAM,EAAE,0BAA0B,EAAE,GAAG,sBAAsB,CAAC;AAK9D,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EACjC,KAAK,EACL,UAAU,GAAG,QAAQ,EACrB,KAAK,EACL,IAAI,GAAG,IAAI,EACX,IAAI,GACoB,EAAmB,EAAE;IAC7C,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtD,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACxB,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;IAED,cAAc,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC7B,cAAc,CAAC,SAAS,GAAG,0BAA0B,CAAC;QACrD,IAAI;QACJ,UAAU;QACV,KAAK;KACL,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC;AACvB,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  * Referenced to DOM components
3
3
  */
4
4
  export * from './components/GidsDivider/GidsDivider';
5
+ export * from './components/GidsDisplayTag/GidsDisplayTag';
5
6
  /**
6
7
  * Utilities
7
8
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,sCAAsC,CAAC;AAErD;;GAEG;AACH,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAE3D;;GAEG;AACH,cAAc,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  * Referenced to DOM components
3
3
  */
4
4
  export * from './components/GidsDivider/GidsDivider';
5
+ export * from './components/GidsDisplayTag/GidsDisplayTag';
5
6
  /**
6
7
  * Utilities
7
8
  */
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,sCAAsC,CAAC;AAErD;;GAEG;AACH,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,cAAc,sCAAsC,CAAC;AACrD,cAAc,4CAA4C,CAAC;AAE3D;;GAEG;AACH,cAAc,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ganpatiinfo/gids-web-dom-reference",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "description": "DOM for components reference implementations",
6
6
  "homepage": "https://ganpatiinfosystem.vercel.app/",
@@ -24,8 +24,8 @@
24
24
  "directory": "packages/private/web-dom-reference"
25
25
  },
26
26
  "dependencies": {
27
- "@ganpatiinfo/gids-core-shared": "0.0.3",
28
- "@ganpatiinfo/gids-web-shared": "0.0.3"
27
+ "@ganpatiinfo/gids-core-shared": "0.0.4",
28
+ "@ganpatiinfo/gids-web-shared": "0.0.4"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "@jest/globals": "29.7.0",
@@ -0,0 +1,31 @@
1
+ import { type GidsDisplayTagCommonProps } from '@ganpatiinfo/gids-core-shared';
2
+ import { GidsDisplayTagWebUtils } from '@ganpatiinfo/gids-web-shared';
3
+ import { type DomNodeOrString } from '../../utils/domUtils';
4
+
5
+ const { getGidsDisplaTagClassNames } = GidsDisplayTagWebUtils;
6
+
7
+ export interface GidsDisplayTagDomProps
8
+ extends GidsDisplayTagCommonProps<DomNodeOrString> {}
9
+
10
+ export const GidsDisplayTagDom = ({
11
+ label,
12
+ appearance = 'subtle',
13
+ color,
14
+ size = 'md',
15
+ icon,
16
+ }: GidsDisplayTagDomProps): HTMLSpanElement => {
17
+ const gidsDisplayTag = document.createElement('span');
18
+
19
+ if (icon !== undefined) {
20
+ gidsDisplayTag.append(icon);
21
+ }
22
+
23
+ gidsDisplayTag.append(label);
24
+ gidsDisplayTag.className = getGidsDisplaTagClassNames({
25
+ size,
26
+ appearance,
27
+ color,
28
+ });
29
+
30
+ return gidsDisplayTag;
31
+ };
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  * Referenced to DOM components
3
3
  */
4
4
  export * from './components/GidsDivider/GidsDivider';
5
+ export * from './components/GidsDisplayTag/GidsDisplayTag';
5
6
 
6
7
  /**
7
8
  * Utilities