@starasia/table 1.0.2 → 1.0.3

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/table.es.js CHANGED
@@ -41,15 +41,9 @@ const o = `* {
41
41
  #f9fafb
42
42
  );
43
43
 
44
- /* blue */
45
- --starasia-ui-input-color-primary-blue: var(
46
- --starasia-ui-color-blue-700,
47
- #1d4ed8
48
- );
49
- --starasia-ui-input-color-quinary-blue: var(
50
- --starasia-ui-color-blue-50,
51
- #eff6ff
52
- );
44
+ /* brand */
45
+ --starasia-ui-input-color-primary-blue: var(--starasia-ui-brand-primary-default);
46
+ --starasia-ui-input-color-quinary-blue: var(--starasia-ui-brand-primary-tertiary);
53
47
  }
54
48
 
55
49
  .starasia-table {
@@ -89,20 +83,20 @@ const o = `* {
89
83
  .starasia-table-full-width {
90
84
  width: 100%;
91
85
  }
92
- `, r = "starasia-table-styles", l = (t) => {
93
- if (!document.getElementById(r)) {
86
+ `, i = "starasia-table-styles", l = (t) => {
87
+ if (!document.getElementById(i)) {
94
88
  const a = document.createElement("style");
95
- a.id = r, a.textContent = t, document.head.appendChild(a);
89
+ a.id = i, a.textContent = t, document.head.appendChild(a);
96
90
  }
97
91
  };
98
92
  l(o);
99
- const d = (t) => {
100
- const { children: a, fullWidth: s = !1, variant: e = "unstyled", ...i } = t;
93
+ const u = (t) => {
94
+ const { children: a, fullWidth: s = !1, variant: e = "unstyled", ...r } = t;
101
95
  return /* @__PURE__ */ n(
102
96
  "table",
103
97
  {
104
- ...i,
105
- className: `starasia-table starasia-table-${e} ${s ? "starasia-table-full-width " : ""} ${i.className}`,
98
+ ...r,
99
+ className: `starasia-table starasia-table-${e} ${s ? "starasia-table-full-width " : ""} ${r.className}`,
106
100
  children: a
107
101
  }
108
102
  );
@@ -121,14 +115,14 @@ const d = (t) => {
121
115
  }, h = (t) => {
122
116
  const { children: a, ...s } = t;
123
117
  return /* @__PURE__ */ n("th", { ...s, className: `starasia-table-th ${s.className}`, children: a });
124
- }, f = (t) => {
118
+ }, m = (t) => {
125
119
  const { children: a, ...s } = t;
126
120
  return /* @__PURE__ */ n("td", { ...s, className: `starasia-table-td ${s.className}`, children: a });
127
121
  };
128
122
  export {
129
- d as Table,
123
+ u as Table,
130
124
  b as Tbody,
131
- f as Td,
125
+ m as Td,
132
126
  p as Tfoot,
133
127
  h as Th,
134
128
  c as Thead,
package/dist/table.umd.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(s,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],i):(s=typeof globalThis<"u"?globalThis:s||self,i(s.Table={},s.jsxRuntime))})(this,function(s,i){"use strict";const o=`* {
1
+ (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.Table={},n.jsxRuntime))})(this,function(n,i){"use strict";const o=`* {
2
2
  margin: 0;
3
3
  padding: 0;
4
4
  box-sizing: border-box !important;
@@ -40,15 +40,9 @@
40
40
  #f9fafb
41
41
  );
42
42
 
43
- /* blue */
44
- --starasia-ui-input-color-primary-blue: var(
45
- --starasia-ui-color-blue-700,
46
- #1d4ed8
47
- );
48
- --starasia-ui-input-color-quinary-blue: var(
49
- --starasia-ui-color-blue-50,
50
- #eff6ff
51
- );
43
+ /* brand */
44
+ --starasia-ui-input-color-primary-blue: var(--starasia-ui-brand-primary-default);
45
+ --starasia-ui-input-color-quinary-blue: var(--starasia-ui-brand-primary-tertiary);
52
46
  }
53
47
 
54
48
  .starasia-table {
@@ -88,4 +82,4 @@
88
82
  .starasia-table-full-width {
89
83
  width: 100%;
90
84
  }
91
- `,r="starasia-table-styles";(t=>{if(!document.getElementById(r)){const a=document.createElement("style");a.id=r,a.textContent=t,document.head.appendChild(a)}})(o);const l=t=>{const{children:a,fullWidth:n=!1,variant:h="unstyled",...e}=t;return i.jsx("table",{...e,className:`starasia-table starasia-table-${h} ${n?"starasia-table-full-width ":""} ${e.className}`,children:a})},d=t=>{const{children:a,...n}=t;return i.jsx("thead",{...n,children:a})},u=t=>{const{children:a,...n}=t;return i.jsx("tbody",{...n,children:a})},c=t=>{const{children:a,...n}=t;return i.jsx("tfoot",{...n,children:a})},b=t=>{const{children:a,...n}=t;return i.jsx("tr",{...n,children:a})},f=t=>{const{children:a,...n}=t;return i.jsx("th",{...n,className:`starasia-table-th ${n.className}`,children:a})},g=t=>{const{children:a,...n}=t;return i.jsx("td",{...n,className:`starasia-table-td ${n.className}`,children:a})};s.Table=l,s.Tbody=u,s.Td=g,s.Tfoot=c,s.Th=f,s.Thead=d,s.Tr=b,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
85
+ `,r="starasia-table-styles";(t=>{if(!document.getElementById(r)){const a=document.createElement("style");a.id=r,a.textContent=t,document.head.appendChild(a)}})(o);const l=t=>{const{children:a,fullWidth:s=!1,variant:f="unstyled",...e}=t;return i.jsx("table",{...e,className:`starasia-table starasia-table-${f} ${s?"starasia-table-full-width ":""} ${e.className}`,children:a})},d=t=>{const{children:a,...s}=t;return i.jsx("thead",{...s,children:a})},u=t=>{const{children:a,...s}=t;return i.jsx("tbody",{...s,children:a})},c=t=>{const{children:a,...s}=t;return i.jsx("tfoot",{...s,children:a})},b=t=>{const{children:a,...s}=t;return i.jsx("tr",{...s,children:a})},p=t=>{const{children:a,...s}=t;return i.jsx("th",{...s,className:`starasia-table-th ${s.className}`,children:a})},g=t=>{const{children:a,...s}=t;return i.jsx("td",{...s,className:`starasia-table-td ${s.className}`,children:a})};n.Table=l,n.Tbody=u,n.Td=g,n.Tfoot=c,n.Th=p,n.Thead=d,n.Tr=b,Object.defineProperty(n,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starasia/table",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "table component for starasia UI",
5
5
  "author": "Prawito Hudoro",
6
6
  "main": "dist/table.umd.js",
@@ -12,6 +12,10 @@
12
12
  "dist/*.map",
13
13
  "dist/*.css"
14
14
  ],
15
+ "scripts": {
16
+ "dev": "vite --config vite.config.ts --port 3000",
17
+ "build": "vite build --config vite.config.ts"
18
+ },
15
19
  "keywords": [],
16
20
  "license": "ISC",
17
21
  "type": "module",
@@ -33,9 +37,5 @@
33
37
  "react-dom": "^18.2.0",
34
38
  "@types/react": "^18.2.55",
35
39
  "@types/react-dom": "^18.2.19"
36
- },
37
- "scripts": {
38
- "dev": "vite --config vite.config.ts --port 3000",
39
- "build": "vite build --config vite.config.ts"
40
40
  }
41
- }
41
+ }