@ganpatiinfo/gids-web-dom-reference 0.0.2 → 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.
- package/dist/components/GidsDisplayTag/GidsDisplayTag.d.ts +6 -0
- package/dist/components/GidsDisplayTag/GidsDisplayTag.d.ts.map +1 -0
- package/dist/components/GidsDisplayTag/GidsDisplayTag.js +16 -0
- package/dist/components/GidsDisplayTag/GidsDisplayTag.js.map +1 -0
- package/dist/components/GidsDivider/GidsDivider.d.ts +5 -0
- package/dist/components/GidsDivider/GidsDivider.d.ts.map +1 -0
- package/dist/components/GidsDivider/GidsDivider.js +8 -0
- package/dist/components/GidsDivider/GidsDivider.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/GidsDisplayTag/GidsDisplayTag.ts +31 -0
- package/src/components/GidsDivider/GidsDivider.ts +15 -0
- package/src/index.ts +2 -0
|
@@ -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"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type GidsDividerCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
export interface GidsDividerDomProps extends GidsDividerCommonProps {
|
|
3
|
+
}
|
|
4
|
+
export declare const GidsDividerDom: ({ orientation, }: GidsDividerDomProps) => HTMLHRElement;
|
|
5
|
+
//# sourceMappingURL=GidsDivider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsDivider.d.ts","sourceRoot":"","sources":["../../../src/components/GidsDivider/GidsDivider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAK5E,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB;CAAG;AAEtE,eAAO,MAAM,cAAc,GAAI,kBAE5B,mBAAmB,KAAG,aAKxB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GidsDividerWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
2
|
+
const { getGidsDividerClassNames } = GidsDividerWebUtils;
|
|
3
|
+
export const GidsDividerDom = ({ orientation, }) => {
|
|
4
|
+
const divider = document.createElement('hr');
|
|
5
|
+
divider.className = getGidsDividerClassNames({ orientation });
|
|
6
|
+
return divider;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=GidsDivider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GidsDivider.js","sourceRoot":"","sources":["../../../src/components/GidsDivider/GidsDivider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAEnE,MAAM,EAAE,wBAAwB,EAAE,GAAG,mBAAmB,CAAC;AAIzD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAC9B,WAAW,GACU,EAAiB,EAAE;IACxC,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7C,OAAO,CAAC,SAAS,GAAG,wBAAwB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAE9D,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
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
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
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
|
+
"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.
|
|
28
|
-
"@ganpatiinfo/gids-web-shared": "0.0.
|
|
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
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type GidsDividerCommonProps } from '@ganpatiinfo/gids-core-shared';
|
|
2
|
+
import { GidsDividerWebUtils } from '@ganpatiinfo/gids-web-shared';
|
|
3
|
+
|
|
4
|
+
const { getGidsDividerClassNames } = GidsDividerWebUtils;
|
|
5
|
+
|
|
6
|
+
export interface GidsDividerDomProps extends GidsDividerCommonProps {}
|
|
7
|
+
|
|
8
|
+
export const GidsDividerDom = ({
|
|
9
|
+
orientation,
|
|
10
|
+
}: GidsDividerDomProps): HTMLHRElement => {
|
|
11
|
+
const divider = document.createElement('hr');
|
|
12
|
+
divider.className = getGidsDividerClassNames({ orientation });
|
|
13
|
+
|
|
14
|
+
return divider;
|
|
15
|
+
};
|