@pequity/squirrel 1.0.21 → 1.0.22

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 (47) hide show
  1. package/dist/cjs/chunks/p-table-loader.js +13 -4
  2. package/dist/cjs/index.js +49 -16
  3. package/dist/cjs/inputClassesMixin.js +5 -1
  4. package/dist/cjs/p-chips.js +3 -3
  5. package/dist/cjs/p-input-search.js +2 -1
  6. package/dist/cjs/p-input.js +4 -0
  7. package/dist/cjs/p-table-header-cell.js +21 -8
  8. package/dist/cjs/p-table-td.js +6 -6
  9. package/dist/cjs/p-toggle.js +2 -2
  10. package/dist/cjs/useInputClasses.js +4 -3
  11. package/dist/es/chunks/p-table-loader.js +14 -5
  12. package/dist/es/index.js +49 -16
  13. package/dist/es/inputClassesMixin.js +5 -1
  14. package/dist/es/p-chips.js +3 -3
  15. package/dist/es/p-input-search.js +2 -1
  16. package/dist/es/p-input.js +4 -0
  17. package/dist/es/p-table-header-cell.js +22 -9
  18. package/dist/es/p-table-td.js +6 -6
  19. package/dist/es/p-toggle.js +2 -2
  20. package/dist/es/useInputClasses.js +4 -3
  21. package/dist/squirrel/components/p-date-picker/p-date-picker.vue.d.ts +9 -0
  22. package/dist/squirrel/components/p-inline-date-picker/p-inline-date-picker.vue.d.ts +9 -0
  23. package/dist/squirrel/components/p-input/p-input.vue.d.ts +18 -0
  24. package/dist/squirrel/components/p-input-number/p-input-number.vue.d.ts +9 -0
  25. package/dist/squirrel/components/p-table/p-table.vue.d.ts +5 -1
  26. package/dist/squirrel/components/p-table-header-cell/p-table-header-cell.vue.d.ts +17 -1
  27. package/dist/squirrel/components/p-table-loader/p-table-loader.vue.d.ts +9 -0
  28. package/dist/squirrel/components/p-textarea/p-textarea.vue.d.ts +9 -0
  29. package/dist/squirrel/components/p-toggle/p-toggle.vue.d.ts +9 -0
  30. package/dist/squirrel/composables/useInputClasses.d.ts +1 -0
  31. package/dist/squirrel/utils/inputClassesMixin.d.ts +9 -0
  32. package/dist/style.css +25 -25
  33. package/package.json +14 -14
  34. package/squirrel/components/p-chips/p-chips.vue +1 -1
  35. package/squirrel/components/p-input/p-input.stories.js +1 -0
  36. package/squirrel/components/p-input/p-input.vue +4 -0
  37. package/squirrel/components/p-input-search/p-input-search.vue +1 -0
  38. package/squirrel/components/p-table/p-table.spec.js +0 -23
  39. package/squirrel/components/p-table/p-table.vue +48 -13
  40. package/squirrel/components/p-table-header-cell/p-table-header-cell.spec.js +2 -3
  41. package/squirrel/components/p-table-header-cell/p-table-header-cell.vue +20 -7
  42. package/squirrel/components/p-table-loader/p-table-loader.vue +6 -1
  43. package/squirrel/components/p-table-td/p-table-td.spec.js +13 -13
  44. package/squirrel/components/p-table-td/p-table-td.vue +4 -4
  45. package/squirrel/components/p-toggle/p-toggle.vue +1 -1
  46. package/squirrel/composables/useInputClasses.ts +4 -2
  47. package/squirrel/utils/inputClassesMixin.ts +5 -1
package/dist/style.css CHANGED
@@ -6,7 +6,7 @@
6
6
  background-image: url("data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Remove'%20clip-path='url(%23clip0_3453_5756)'%3e%3cpath%20id='Vector'%20d='M0.219996%2010.72C0.149851%2010.7893%200.0941591%2010.8718%200.0561487%2010.9628C0.0181382%2011.0537%20-0.00143433%2011.1514%20-0.00143433%2011.25C-0.00143433%2011.3486%200.0181382%2011.4462%200.0561487%2011.5372C0.0941591%2011.6281%200.149851%2011.7107%200.219996%2011.78C0.360622%2011.9204%200.551246%2011.9993%200.749996%2011.9993C0.948747%2011.9993%201.13937%2011.9204%201.28%2011.78L5.91%207.14997C5.92166%207.13787%205.93564%207.12825%205.9511%207.12168C5.96656%207.1151%205.98319%207.11172%206%207.11172C6.0168%207.11172%206.03343%207.1151%206.04889%207.12168C6.06436%207.12825%206.07834%207.13787%206.09%207.14997L10.72%2011.78C10.8606%2011.9204%2011.0512%2011.9993%2011.25%2011.9993C11.4487%2011.9993%2011.6394%2011.9204%2011.78%2011.78C11.8501%2011.7107%2011.9058%2011.6281%2011.9438%2011.5372C11.9819%2011.4462%2012.0014%2011.3486%2012.0014%2011.25C12.0014%2011.1514%2011.9819%2011.0537%2011.9438%2010.9628C11.9058%2010.8718%2011.8501%2010.7893%2011.78%2010.72L7.15%206.08997C7.1379%206.07831%207.12828%206.06433%207.1217%206.04886C7.11513%206.0334%207.11174%206.01677%207.11174%205.99997C7.11174%205.98317%207.11513%205.96654%207.1217%205.95107C7.12828%205.93561%207.1379%205.92163%207.15%205.90997L11.78%201.27997C11.9125%201.13779%2011.9846%200.949747%2011.9812%200.755446C11.9777%200.561145%2011.899%200.37576%2011.7616%200.238347C11.6242%200.100934%2011.4388%200.0222218%2011.2445%200.0187936C11.0502%200.0153654%2010.8622%200.0874886%2010.72%200.219969L6.09%204.84997C6.07834%204.86207%206.06436%204.87169%206.04889%204.87826C6.03343%204.88483%206.0168%204.88822%206%204.88822C5.98319%204.88822%205.96656%204.88483%205.9511%204.87826C5.93564%204.87169%205.92166%204.86207%205.91%204.84997L1.28%200.219969C1.13782%200.0874886%200.949775%200.0153654%200.755474%200.0187936C0.561173%200.0222218%200.375787%200.100934%200.238374%200.238347C0.100961%200.37576%200.0222494%200.561145%200.0188212%200.755446C0.015393%200.949747%200.0875162%201.13779%200.219996%201.27997L4.85%205.90997C4.86209%205.92163%204.87172%205.93561%204.87829%205.95107C4.88486%205.96654%204.88825%205.98317%204.88825%205.99997C4.88825%206.01677%204.88486%206.0334%204.87829%206.04886C4.87172%206.06433%204.86209%206.07831%204.85%206.08997L0.219996%2010.72Z'%20fill='%23FFFFFF'%20/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3453_5756'%3e%3crect%20width='12'%20height='12'%20fill='white'%20/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
7
7
  }
8
8
 
9
- .bg-cross[data-v-40bc335f] {
9
+ .bg-cross[data-v-cb511035] {
10
10
  background-image: url("data:image/svg+xml,%3csvg%20width='6'%20height='6'%20viewBox='0%200%206%206'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_2511_8629)'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M3%203.51667L5.42083%205.9375L5.9375%205.42083L3.51667%203L5.9375%200.57917L5.42083%200.0625L3%202.48333L0.57917%200.0625L0.0625%200.57917L2.48333%203L0.0625%205.42083L0.57917%205.9375L3%203.51667Z'%20fill='%231A123B'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_2511_8629'%3e%3crect%20width='6'%20height='6'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
11
11
  }
12
12
  .drawer[data-v-a0b8be1e] {
@@ -253,77 +253,77 @@ div[id^=popper_].dropdown .v-popper__inner .dropdown-menu .dropdown-divider {
253
253
  border-color: var(--color-p-gray-30);
254
254
 
255
255
  opacity: 1
256
- }.icon.clear[data-v-3de99c69] {
256
+ }.icon.clear[data-v-7a1e1e82] {
257
257
  background-image: url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1634_880)'%3e%3cpath%20d='M16%208C16%206.41775%2015.5308%204.87104%2014.6518%203.55544C13.7727%202.23985%2012.5233%201.21447%2011.0615%200.608967C9.59966%200.00346629%207.99113%20-0.15496%206.43928%200.153721C4.88743%200.462403%203.46197%201.22433%202.34315%202.34315C1.22433%203.46197%200.462403%204.88743%200.153721%206.43928C-0.15496%207.99113%200.00346629%209.59966%200.608967%2011.0615C1.21447%2012.5233%202.23985%2013.7727%203.55544%2014.6518C4.87104%2015.5308%206.41775%2016%208%2016C10.1217%2016%2012.1566%2015.1571%2013.6569%2013.6569C15.1571%2012.1566%2016%2010.1217%2016%208ZM11.14%2010.1867C11.2642%2010.3116%2011.3339%2010.4805%2011.3339%2010.6567C11.3339%2010.8328%2011.2642%2011.0018%2011.14%2011.1267C11.078%2011.1892%2011.0043%2011.2388%2010.9231%2011.2726C10.8418%2011.3064%2010.7547%2011.3239%2010.6667%2011.3239C10.5787%2011.3239%2010.4915%2011.3064%2010.4103%2011.2726C10.329%2011.2388%2010.2553%2011.1892%2010.1933%2011.1267L8.12%209.05334C8.08809%209.02429%208.04649%209.0082%208.00334%209.0082C7.96019%209.0082%207.91858%209.02429%207.88667%209.05334L5.81334%2011.1267C5.6858%2011.2359%205.52175%2011.293%205.35397%2011.2865C5.18618%2011.28%205.02702%2011.2104%204.90829%2011.0917C4.78957%2010.973%204.72001%2010.8138%204.71353%2010.646C4.70705%2010.4783%204.76412%2010.3142%204.87334%2010.1867L6.94667%208.11334C6.97572%208.08142%206.99181%208.03982%206.99181%207.99667C6.99181%207.95352%206.97572%207.91192%206.94667%207.88L4.87334%205.80667C4.81085%205.7447%204.76126%205.67096%204.72741%205.58972C4.69356%205.50848%204.67614%205.42135%204.67614%205.33334C4.67614%205.24533%204.69356%205.15819%204.72741%205.07695C4.76126%204.99571%204.81085%204.92198%204.87334%204.86C4.99825%204.73584%205.16721%204.66614%205.34334%204.66614C5.51946%204.66614%205.68843%204.73584%205.81334%204.86L7.88667%206.93334C7.90163%206.94928%207.91971%206.96199%207.93977%206.97068C7.95984%206.97936%207.98147%206.98384%208.00334%206.98384C8.0252%206.98384%208.04684%206.97936%208.0669%206.97068C8.08697%206.96199%208.10504%206.94928%208.12%206.93334L10.1933%204.86C10.2555%204.79784%2010.3293%204.74854%2010.4105%204.7149C10.4917%204.68126%2010.5788%204.66394%2010.6667%204.66394C10.7546%204.66394%2010.8416%204.68126%2010.9228%204.7149C11.0041%204.74854%2011.0778%204.79784%2011.14%204.86C11.2022%204.92216%2011.2515%204.99596%2011.2851%205.07717C11.3188%205.15839%2011.3361%205.24543%2011.3361%205.33334C11.3361%205.42124%2011.3188%205.50829%2011.2851%205.5895C11.2515%205.67072%2011.2022%205.74451%2011.14%205.80667L9.06667%207.88C9.05073%207.89497%209.03802%207.91304%209.02933%207.93311C9.02065%207.95317%209.01616%207.97481%209.01616%207.99667C9.01616%208.01854%209.02065%208.04017%209.02933%208.06024C9.03802%208.0803%209.05073%208.09837%209.06667%208.11334L11.14%2010.1867Z'%20fill='%23A0AEC0'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1634_880'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
258
258
  background-position: center center;
259
259
  transition: background-image 0.4s;
260
260
  }
261
- .icon.clear-sm[data-v-3de99c69] {
261
+ .icon.clear-sm[data-v-7a1e1e82] {
262
262
  background-size: 0.875rem 0.875rem;
263
263
  width: 0.875rem;
264
264
  height: 0.875rem;
265
265
  bottom: 0.5rem;
266
266
  right: 0.375rem;
267
267
  }
268
- .icon.clear-md[data-v-3de99c69] {
268
+ .icon.clear-md[data-v-7a1e1e82] {
269
269
  background-size: 1rem 1rem;
270
270
  height: 1rem;
271
271
  width: 1rem;
272
272
  bottom: 0.75rem;
273
273
  right: 0.5rem;
274
274
  }
275
- .icon.clear-lg[data-v-3de99c69] {
275
+ .icon.clear-lg[data-v-7a1e1e82] {
276
276
  background-size: 1rem 1rem;
277
277
  height: 1rem;
278
278
  width: 1rem;
279
279
  bottom: 1rem;
280
280
  right: 0.5rem;
281
281
  }
282
- .icon.clear[data-v-3de99c69]:hover {
282
+ .icon.clear[data-v-7a1e1e82]:hover {
283
283
  background-image: url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1634_896)'%3e%3cpath%20d='M16%208C16%206.41775%2015.5308%204.87104%2014.6518%203.55544C13.7727%202.23985%2012.5233%201.21447%2011.0615%200.608967C9.59966%200.00346629%207.99113%20-0.15496%206.43928%200.153721C4.88743%200.462403%203.46197%201.22433%202.34315%202.34315C1.22433%203.46197%200.462403%204.88743%200.153721%206.43928C-0.15496%207.99113%200.00346629%209.59966%200.608967%2011.0615C1.21447%2012.5233%202.23985%2013.7727%203.55544%2014.6518C4.87104%2015.5308%206.41775%2016%208%2016C10.1217%2016%2012.1566%2015.1571%2013.6569%2013.6569C15.1571%2012.1566%2016%2010.1217%2016%208ZM11.14%2010.1867C11.2642%2010.3116%2011.3339%2010.4805%2011.3339%2010.6567C11.3339%2010.8328%2011.2642%2011.0018%2011.14%2011.1267C11.078%2011.1892%2011.0043%2011.2388%2010.9231%2011.2726C10.8418%2011.3064%2010.7547%2011.3239%2010.6667%2011.3239C10.5787%2011.3239%2010.4915%2011.3064%2010.4103%2011.2726C10.329%2011.2388%2010.2553%2011.1892%2010.1933%2011.1267L8.12%209.05334C8.08809%209.02429%208.04649%209.0082%208.00334%209.0082C7.96019%209.0082%207.91858%209.02429%207.88667%209.05334L5.81334%2011.1267C5.6858%2011.2359%205.52175%2011.293%205.35397%2011.2865C5.18618%2011.28%205.02702%2011.2104%204.90829%2011.0917C4.78957%2010.973%204.72001%2010.8138%204.71353%2010.646C4.70705%2010.4783%204.76412%2010.3142%204.87334%2010.1867L6.94667%208.11334C6.97572%208.08142%206.99181%208.03982%206.99181%207.99667C6.99181%207.95352%206.97572%207.91192%206.94667%207.88L4.87334%205.80667C4.81085%205.7447%204.76126%205.67096%204.72741%205.58972C4.69356%205.50848%204.67614%205.42135%204.67614%205.33334C4.67614%205.24533%204.69356%205.15819%204.72741%205.07695C4.76126%204.99571%204.81085%204.92198%204.87334%204.86C4.99825%204.73584%205.16721%204.66614%205.34334%204.66614C5.51946%204.66614%205.68843%204.73584%205.81334%204.86L7.88667%206.93334C7.90163%206.94928%207.91971%206.96199%207.93977%206.97068C7.95984%206.97936%207.98147%206.98384%208.00334%206.98384C8.0252%206.98384%208.04684%206.97936%208.0669%206.97068C8.08697%206.96199%208.10504%206.94928%208.12%206.93334L10.1933%204.86C10.2555%204.79784%2010.3293%204.74854%2010.4105%204.7149C10.4917%204.68126%2010.5788%204.66394%2010.6667%204.66394C10.7546%204.66394%2010.8416%204.68126%2010.9228%204.7149C11.0041%204.74854%2011.0778%204.79784%2011.14%204.86C11.2022%204.92216%2011.2515%204.99596%2011.2851%205.07717C11.3188%205.15839%2011.3361%205.24543%2011.3361%205.33334C11.3361%205.42124%2011.3188%205.50829%2011.2851%205.5895C11.2515%205.67072%2011.2022%205.74451%2011.14%205.80667L9.06667%207.88C9.05073%207.89497%209.03802%207.91304%209.02933%207.93311C9.02065%207.95317%209.01616%207.97481%209.01616%207.99667C9.01616%208.01854%209.02065%208.04017%209.02933%208.06024C9.03802%208.0803%209.05073%208.09837%209.06667%208.11334L11.14%2010.1867Z'%20fill='%23424E6E'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1634_896'%3e%3crect%20width='16'%20height='16'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
284
284
  }
285
- .icon.search[data-v-3de99c69] {
285
+ .icon.search[data-v-7a1e1e82] {
286
286
  background-image: url("data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_9127_330342)'%3e%3cpath%20d='M11.705%2010.295L9.38501%208.00004C10.0193%207.0497%2010.3178%205.91467%2010.2331%204.77526C10.1484%203.63584%209.68546%202.5574%208.91771%201.71124C8.14996%200.86508%207.12147%200.299735%205.99563%200.105014C4.8698%20-0.0897079%203.71117%200.0973621%202.70383%200.636506C1.69648%201.17565%200.898177%202.03595%200.435738%203.08073C-0.0267015%204.12552%20-0.126757%205.29487%200.151467%206.40303C0.429691%207.51119%201.07024%208.4946%201.97135%209.19704C2.87246%209.89948%203.98246%2010.2807%205.12501%2010.28C6.13901%2010.2811%207.13002%209.97801%207.97001%209.41004L10.295%2011.735C10.4824%2011.9213%2010.7358%2012.0258%2011%2012.0258C11.2642%2012.0258%2011.5176%2011.9213%2011.705%2011.735C11.8018%2011.6418%2011.8788%2011.5299%2011.9314%2011.4062C11.9839%2011.2825%2012.011%2011.1495%2012.011%2011.015C12.011%2010.8806%2011.9839%2010.7476%2011.9314%2010.6239C11.8788%2010.5002%2011.8018%2010.3883%2011.705%2010.295ZM5.12501%201.50004C5.84176%201.50004%206.54241%201.71251%207.13843%202.11061C7.73445%202.50871%208.19908%203.07456%208.47359%203.73666C8.74811%204.39875%208.82019%205.12736%208.68072%205.8304C8.54125%206.53345%208.1965%207.17937%207.69004%207.68653C7.18357%208.19369%206.53813%208.53934%205.83527%208.67977C5.13242%208.82021%204.40371%208.74913%203.74125%208.47553C3.07878%208.20193%202.51228%207.73808%202.11336%207.14261C1.71444%206.54714%201.501%205.84678%201.50001%205.13004C1.50001%204.16817%201.88177%203.24562%202.56145%202.565C3.24112%201.88439%204.16314%201.50136%205.12501%201.50004Z'%20fill='%23718096'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_9127_330342'%3e%3crect%20width='12'%20height='12'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
287
287
  }
288
- .icon.search-sm[data-v-3de99c69] {
288
+ .icon.search-sm[data-v-7a1e1e82] {
289
289
  background-size: 0.75rem 0.75rem;
290
290
  left: 0.5rem;
291
291
  bottom: 0.625rem;
292
292
  width: 0.75rem;
293
293
  height: 0.75rem;
294
294
  }
295
- .icon.search-md[data-v-3de99c69] {
295
+ .icon.search-md[data-v-7a1e1e82] {
296
296
  background-size: 1rem 1rem;
297
297
  width: 1rem;
298
298
  height: 1rem;
299
299
  left: 0.75rem;
300
300
  bottom: 0.75rem;
301
301
  }
302
- .icon.search-lg[data-v-3de99c69] {
302
+ .icon.search-lg[data-v-7a1e1e82] {
303
303
  background-size: 1rem 1rem;
304
304
  width: 1rem;
305
305
  height: 1rem;
306
306
  left: 1.125rem;
307
307
  bottom: 1rem;
308
308
  }
309
- .icon.enter[data-v-3de99c69] {
309
+ .icon.enter[data-v-7a1e1e82] {
310
310
  background-image: url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1627_786)'%3e%3crect%20width='24'%20height='24'%20rx='5'%20fill='%23ECF1FF'/%3e%3cpath%20d='M19.17%201.03744e-05H4.83C4.19619%20-0.00130459%203.56834%200.122398%202.98239%200.364037C2.39645%200.605676%201.86392%200.960506%201.41528%201.40822C0.966641%201.85592%200.610708%202.38772%200.367855%202.97316C0.125002%203.55861%20-1.36406e-06%204.1862%200%204.82001L0%2019.17C0%2020.451%200.508874%2021.6795%201.41467%2022.5853C2.32048%2023.4911%203.549%2024%204.83%2024H19.17C20.4502%2023.9974%2021.6772%2023.4876%2022.5824%2022.5824C23.4876%2021.6772%2023.9974%2020.4502%2024%2019.17V4.82001C23.9974%203.54075%2023.4873%202.31479%2022.5818%201.41115C21.6763%200.507508%2020.4493%207.63258e-06%2019.17%201.03744e-05ZM22%2019.17C22%2019.9206%2021.7018%2020.6404%2021.1711%2021.1711C20.6404%2021.7018%2019.9206%2022%2019.17%2022H4.83C4.07944%2022%203.35962%2021.7018%202.82889%2021.1711C2.29816%2020.6404%202%2019.9206%202%2019.17V4.82001C2.00265%204.07118%202.30197%203.35393%202.83242%202.82536C3.36286%202.29679%204.08117%202.00001%204.83%202.00001H19.17C19.9188%202.00001%2020.6371%202.29679%2021.1676%202.82536C21.698%203.35393%2021.9974%204.07118%2022%204.82001V19.17Z'%20fill='%234750EB'/%3e%3cpath%20d='M17.5%207.5C17.2348%207.5%2016.9804%207.60536%2016.7929%207.79289C16.6054%207.98043%2016.5%208.23478%2016.5%208.5V11.25C16.5%2011.3163%2016.4737%2011.3799%2016.4268%2011.4268C16.3799%2011.4737%2016.3163%2011.5%2016.25%2011.5H10.75C10.6837%2011.5%2010.6201%2011.4737%2010.5732%2011.4268C10.5263%2011.3799%2010.5%2011.3163%2010.5%2011.25V9.5C10.5012%209.30138%2010.4431%209.10691%2010.3333%208.94139C10.2235%208.77587%2010.0669%208.6468%209.88348%208.57063C9.70004%208.49446%209.49807%208.47465%209.30332%208.51372C9.10857%208.55279%208.92987%208.64897%208.79%208.79L5.79%2011.79C5.60375%2011.9774%205.49921%2012.2308%205.49921%2012.495C5.49921%2012.7592%205.60375%2013.0126%205.79%2013.2L8.79%2016.2C8.88261%2016.2945%208.99306%2016.3697%209.11493%2016.4212C9.23681%2016.4727%209.36769%2016.4995%209.5%2016.5C9.76522%2016.5%2010.0196%2016.3946%2010.2071%2016.2071C10.3946%2016.0196%2010.5%2015.7652%2010.5%2015.5V13.75C10.5%2013.6837%2010.5263%2013.6201%2010.5732%2013.5732C10.6201%2013.5263%2010.6837%2013.5%2010.75%2013.5H16.5C17.0304%2013.5%2017.5391%2013.2893%2017.9142%2012.9142C18.2893%2012.5391%2018.5%2012.0304%2018.5%2011.5V8.5C18.5%208.23478%2018.3946%207.98043%2018.2071%207.79289C18.0196%207.60536%2017.7652%207.5%2017.5%207.5Z'%20fill='%234750EB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1627_786'%3e%3crect%20width='24'%20height='24'%20rx='5'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
311
311
  }
312
- .icon.enter-sm[data-v-3de99c69] {
312
+ .icon.enter-sm[data-v-7a1e1e82] {
313
313
  background-size: 1rem 1rem;
314
314
  width: 1rem;
315
315
  height: 1rem;
316
316
  right: 1.5rem;
317
317
  bottom: 0.5rem;
318
318
  }
319
- .icon.enter-md[data-v-3de99c69] {
319
+ .icon.enter-md[data-v-7a1e1e82] {
320
320
  background-size: 1.5rem 1.5rem;
321
321
  width: 1.5rem;
322
322
  height: 1.5rem;
323
323
  right: 2.0625rem;
324
324
  bottom: 0.5rem;
325
325
  }
326
- .icon.enter-lg[data-v-3de99c69] {
326
+ .icon.enter-lg[data-v-7a1e1e82] {
327
327
  background-size: 1.5rem 1.5rem;
328
328
  width: 1.5rem;
329
329
  height: 1.5rem;
@@ -441,17 +441,17 @@ to {
441
441
  100% {
442
442
  transform: translateX(100%);
443
443
  }
444
- }.td-shadow-right[data-v-50608a90] {
444
+ }.td-shadow-right[data-v-09e6d191] {
445
445
  box-shadow: -1px 1px 5px 4px rgba(0, 0, 0, 0.15);
446
446
  -webkit-clip-path: inset(0px -12px 0px 0px);
447
447
  clip-path: inset(0px -12px 0px 0px);
448
448
  }
449
- .td-shadow-left[data-v-50608a90] {
449
+ .td-shadow-left[data-v-09e6d191] {
450
450
  box-shadow: -2px 1px 8px rgba(0, 0, 0, 0.15);
451
451
  -webkit-clip-path: inset(0px 0px 0px -12px);
452
452
  clip-path: inset(0px 0px 0px -12px);
453
453
  }
454
- .td-col-fixed-border-b[data-v-50608a90]::after {
454
+ .td-col-fixed-border-b[data-v-09e6d191]::after {
455
455
  position: absolute;
456
456
  bottom: 0px;
457
457
  left: 0px;
@@ -461,7 +461,7 @@ to {
461
461
  --tw-content: "";
462
462
  content: var(--tw-content);
463
463
  }
464
- .shadow-inner-toggle[data-v-e222188e]::after {
464
+ .shadow-inner-toggle[data-v-3a6de4eb]::after {
465
465
  box-shadow:
466
466
  rgba(0, 0, 0, 0.3) 0px 1px 2px 0px,
467
467
  rgba(0, 0, 0, 0.05) 0px 0px 1px 0px inset;
@@ -2094,30 +2094,30 @@ to {
2094
2094
  .bg-file-upload-x-icon[data-v-d07a8f64]:hover {
2095
2095
  background-image: url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%208C0%209.58225%200.469192%2011.129%201.34824%2012.4446C2.22729%2013.7602%203.47672%2014.7855%204.93853%2015.391C6.40034%2015.9965%208.00887%2016.155%209.56072%2015.8463C11.1126%2015.5376%2012.538%2014.7757%2013.6569%2013.6569C14.7757%2012.538%2015.5376%2011.1126%2015.8463%209.56072C16.155%208.00887%2015.9965%206.40034%2015.391%204.93853C14.7855%203.47672%2013.7602%202.22729%2012.4446%201.34824C11.129%200.469192%209.58225%200%208%200C5.87827%200%203.84344%200.842855%202.34315%202.34315C0.842855%203.84344%200%205.87827%200%208ZM14.3333%208C14.3333%209.25262%2013.9619%2010.4771%2013.266%2011.5186C12.5701%2012.5601%2011.5809%2013.3719%2010.4237%2013.8512C9.2664%2014.3306%207.99298%2014.456%206.76443%2014.2116C5.53588%2013.9673%204.40739%2013.3641%203.52166%2012.4783C2.63592%2011.5926%202.03273%2010.4641%201.78836%209.23557C1.54399%208.00703%201.66941%206.7336%202.14876%205.57634C2.62812%204.41907%203.43988%203.42994%204.48139%202.73403C5.5229%202.03811%206.74739%201.66667%208%201.66667C9.67916%201.66843%2011.289%202.33626%2012.4764%203.52361C13.6637%204.71096%2014.3316%206.32084%2014.3333%208Z'%20fill='%23BB1410'%20/%3e%3cpath%20d='M5.88634%204.71322C5.73075%204.55763%205.51972%204.47021%205.29967%204.47021C5.07963%204.47021%204.8686%204.55763%204.71301%204.71322C4.55741%204.86881%204.47%205.07984%204.47%205.29989C4.47%205.51993%204.55741%205.73096%204.71301%205.88655L6.71301%207.88655C6.72914%207.9021%206.74197%207.92074%206.75073%207.94136C6.7595%207.96198%206.76401%207.98415%206.76401%208.00655C6.76401%208.02896%206.7595%208.05113%206.75073%208.07175C6.74197%208.09237%206.72914%208.11101%206.71301%208.12655L4.71301%2010.1266C4.63561%2010.2034%204.57417%2010.2948%204.53225%2010.3955C4.49033%2010.4962%204.46875%2010.6042%204.46875%2010.7132C4.46875%2010.8223%204.49033%2010.9303%204.53225%2011.031C4.57417%2011.1317%204.63561%2011.223%204.71301%2011.2999C4.78939%2011.3781%204.88063%2011.4403%204.98138%2011.4827C5.08213%2011.5251%205.19035%2011.547%205.29967%2011.547C5.409%2011.547%205.51721%2011.5251%205.61796%2011.4827C5.71871%2011.4403%205.80996%2011.3781%205.88634%2011.2999L7.88634%209.29989C7.91934%209.27037%207.96207%209.25405%208.00634%209.25405C8.05062%209.25405%208.09334%209.27037%208.12634%209.29989L10.1263%2011.2999C10.2027%2011.3781%2010.294%2011.4403%2010.3947%2011.4827C10.4955%2011.5251%2010.6037%2011.547%2010.713%2011.547C10.8223%2011.547%2010.9305%2011.5251%2011.0313%2011.4827C11.132%2011.4403%2011.2233%2011.3781%2011.2997%2011.2999C11.3771%2011.223%2011.4385%2011.1317%2011.4804%2011.031C11.5224%2010.9303%2011.5439%2010.8223%2011.5439%2010.7132C11.5439%2010.6042%2011.5224%2010.4962%2011.4804%2010.3955C11.4385%2010.2948%2011.3771%2010.2034%2011.2997%2010.1266L9.29967%208.12655C9.27016%208.09355%209.25384%208.05083%209.25384%208.00655C9.25384%207.96228%209.27016%207.91955%209.29967%207.88655L11.2997%205.88655C11.4553%205.73096%2011.5427%205.51993%2011.5427%205.29989C11.5427%205.07984%2011.4553%204.86881%2011.2997%204.71322C11.1441%204.55763%2010.9331%204.47021%2010.713%204.47021C10.493%204.47021%2010.2819%204.55763%2010.1263%204.71322L8.12634%206.71322C8.09334%206.74274%208.05062%206.75906%208.00634%206.75906C7.96207%206.75906%207.91934%206.74274%207.88634%206.71322L5.88634%204.71322Z'%20fill='%23BB1410'%20/%3e%3c/svg%3e");
2096
2096
  }
2097
- .p-table[data-v-170d774b] {
2097
+ .p-table[data-v-6b61498d] {
2098
2098
  color: var(--color-night);
2099
2099
  height: 1px;
2100
2100
  }
2101
- .p-table th[data-v-170d774b] {
2101
+ .p-table th[data-v-6b61498d] {
2102
2102
  position: sticky;
2103
2103
  top: 0px;
2104
2104
  z-index: 20;
2105
2105
  padding: 0px;
2106
2106
  }
2107
- .p-table.first-col-fixed th[data-v-170d774b]:first-child {
2107
+ .p-table.first-col-fixed th[data-v-6b61498d]:first-child {
2108
2108
  left: 0px;
2109
2109
  z-index: 30;
2110
2110
  }
2111
- .p-table.first-col-fixed th:first-child .th-shadow[data-v-170d774b] {
2112
- box-shadow: 2px 1px 8px rgba(0, 0, 0, 0.15);
2111
+ .p-table.first-col-fixed th:first-child .th-shadow[data-v-6b61498d] {
2112
+ box-shadow: -1px 1px 5px 4px rgba(0, 0, 0, 0.15);
2113
2113
  -webkit-clip-path: inset(0px -12px 0px 0px);
2114
2114
  clip-path: inset(0px -12px 0px 0px);
2115
2115
  }
2116
- .p-table.last-col-fixed th[data-v-170d774b]:last-child {
2116
+ .p-table.last-col-fixed th[data-v-6b61498d]:last-child {
2117
2117
  right: 0px;
2118
2118
  z-index: 30;
2119
2119
  }
2120
- .p-table.last-col-fixed th:last-child .th-shadow[data-v-170d774b] {
2120
+ .p-table.last-col-fixed th:last-child .th-shadow[data-v-6b61498d] {
2121
2121
  box-shadow: -2px 1px 8px rgba(0, 0, 0, 0.15);
2122
2122
  -webkit-clip-path: inset(0px 0px 0px -12px);
2123
2123
  clip-path: inset(0px 0px 0px -12px);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pequity/squirrel",
3
3
  "description": "Squirrel component library",
4
- "version": "1.0.21",
4
+ "version": "1.0.22",
5
5
  "packageManager": "pnpm@8.9.2",
6
6
  "type": "module",
7
7
  "scripts": {
@@ -67,23 +67,23 @@
67
67
  "@pequity/eslint-config": "^0.0.12",
68
68
  "@semantic-release/changelog": "^6.0.3",
69
69
  "@semantic-release/git": "^10.0.1",
70
- "@storybook/addon-a11y": "^8.0.5",
71
- "@storybook/addon-actions": "^8.0.5",
72
- "@storybook/addon-essentials": "^8.0.5",
73
- "@storybook/addon-interactions": "^8.0.5",
74
- "@storybook/addon-links": "^8.0.5",
75
- "@storybook/blocks": "^8.0.5",
70
+ "@storybook/addon-a11y": "^8.0.6",
71
+ "@storybook/addon-actions": "^8.0.6",
72
+ "@storybook/addon-essentials": "^8.0.6",
73
+ "@storybook/addon-interactions": "^8.0.6",
74
+ "@storybook/addon-links": "^8.0.6",
75
+ "@storybook/blocks": "^8.0.6",
76
76
  "@storybook/jest": "^0.2.3",
77
- "@storybook/manager-api": "^8.0.5",
77
+ "@storybook/manager-api": "^8.0.6",
78
78
  "@storybook/test-runner": "^0.17.0",
79
79
  "@storybook/testing-library": "^0.2.2",
80
- "@storybook/theming": "^8.0.5",
81
- "@storybook/vue3": "^8.0.5",
82
- "@storybook/vue3-vite": "^8.0.5",
80
+ "@storybook/theming": "^8.0.6",
81
+ "@storybook/vue3": "^8.0.6",
82
+ "@storybook/vue3-vite": "^8.0.6",
83
83
  "@types/jest": "^29.5.12",
84
84
  "@types/jsdom": "^21.1.6",
85
85
  "@types/lodash-es": "^4.17.12",
86
- "@types/node": "^20.12.4",
86
+ "@types/node": "^20.12.6",
87
87
  "@vitejs/plugin-vue": "^5.0.4",
88
88
  "@vue/compiler-sfc": "3.4.21",
89
89
  "@vue/test-utils": "^2.4.5",
@@ -105,11 +105,11 @@
105
105
  "rimraf": "^5.0.5",
106
106
  "sass": "^1.74.1",
107
107
  "semantic-release": "^23.0.7",
108
- "storybook": "^8.0.5",
108
+ "storybook": "^8.0.6",
109
109
  "svgo": "^3.2.0",
110
110
  "tailwindcss": "^3.4.3",
111
111
  "ts-jest": "^29.1.2",
112
- "typescript": "5.4.3",
112
+ "typescript": "5.4.4",
113
113
  "vite": "^5.2.8",
114
114
  "vue-router": "^4.3.0",
115
115
  "vue-tsc": "2.0.7"
@@ -3,7 +3,7 @@
3
3
  <div ref="beforeSlotContainer"><slot name="before"></slot></div>
4
4
  <div
5
5
  ref="filterChipsRowInner"
6
- class="flex divide-x divide-p-blue-30 overflow-hidden rounded-md border border-p-blue-30 text-xs font-medium text-p-purple-60"
6
+ class="flex divide-x divide-p-blue-30 overflow-hidden rounded-md border border-p-blue-30 bg-transparent text-xs font-medium leading-4 text-p-purple-60"
7
7
  >
8
8
  <div
9
9
  v-for="(item, idx) in items.slice(0, maxChipsDisplayed)"
@@ -36,6 +36,7 @@ export const Default = {
36
36
  type: 'text',
37
37
  size: 'md',
38
38
  label: 'Text input',
39
+ rounded: false,
39
40
  },
40
41
  };
41
42
 
@@ -61,6 +61,10 @@ export default defineComponent({
61
61
  type: Boolean,
62
62
  default: false,
63
63
  },
64
+ rounded: {
65
+ type: Boolean,
66
+ default: false,
67
+ },
64
68
  },
65
69
  emits: ['update:modelValue'],
66
70
  computed: {
@@ -5,6 +5,7 @@
5
5
  :size="size"
6
6
  v-bind="$attrs"
7
7
  role="searchbox"
8
+ rounded
8
9
  @focus="showEnterIconOnFocus = true"
9
10
  @focusout="showEnterIconOnFocus = false"
10
11
  @keydown.enter="keydownEnter"
@@ -70,7 +70,6 @@ describe('PTable.vue', () => {
70
70
  const th = wrapper.find(`th[data-col-id="${col.id}"]`);
71
71
  const containerDiv = th.find('div.relative');
72
72
  const headerCell = th.find('div.header-cell-stub');
73
- const borderBottomDiv = th.find('div.absolute.bottom-0.h-1.w-full');
74
73
  const showFilterIcon = col.filterable || col.sortable;
75
74
 
76
75
  expect(th.classes()).toContain('th-class');
@@ -81,8 +80,6 @@ describe('PTable.vue', () => {
81
80
  expect(headerCell.attributes()['filter-active']).toBe(col.filterActive.toString());
82
81
  expect(headerCell.attributes()['show-filter-icon']).toBe(showFilterIcon.toString());
83
82
 
84
- expect(borderBottomDiv.element.style.background).toBe(col.borderColor);
85
-
86
83
  if (col.name === 'Second column') {
87
84
  expect(th.find('div.prepend').exists()).toBe(true);
88
85
  }
@@ -204,26 +201,6 @@ describe('PTable.vue', () => {
204
201
  expect(wrapper.find('table tbody tr:last-child').classes()).toEqual([]);
205
202
  });
206
203
 
207
- it.each([
208
- [false, 'left-0'],
209
- [true, '-left-1'],
210
- ])(
211
- 'sets the border bottom placement for headers correctly when colsResizable is set to %s',
212
- async (val, cssClass) => {
213
- const cols = cloneDeep(columns);
214
- const wrapper = createWrapperFor(PTable, {
215
- props: { cols, colsResizable: val },
216
- });
217
-
218
- cols.forEach((col) => {
219
- const th = wrapper.find(`th[data-col-id="${col.id}"]`);
220
- const borderBottomDiv = th.find('div.absolute.bottom-0.h-1.w-full');
221
-
222
- expect(borderBottomDiv.classes()).toContain(cssClass);
223
- });
224
- }
225
- );
226
-
227
204
  it('sets th refs correctly', async () => {
228
205
  const cols = cloneDeep(columns);
229
206
  const wrapper = createWrapperFor(PTable, { props: { cols } });
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div
3
3
  ref="scrollWrapper"
4
- :class="['block border border-p-gray-30', lockScroll ? 'overflow-hidden' : 'overflow-x-auto']"
4
+ :class="['block rounded-xl border border-p-gray-30', lockScroll ? 'overflow-hidden' : 'overflow-x-auto']"
5
5
  >
6
6
  <div
7
7
  v-if="isColResizing"
@@ -32,7 +32,7 @@
32
32
  :style="col.style"
33
33
  class="bg-surface"
34
34
  >
35
- <div :class="thDivClasses(i, col)">
35
+ <div :class="thDivClasses(i)" :style="bgColorStyle(col)">
36
36
  <div class="flex">
37
37
  <slot :name="`prepend-header-cell-${kebabCase(col.name)}`" :col="col" />
38
38
  <PTableHeaderCell
@@ -41,22 +41,22 @@
41
41
  :show-filter-icon="col.filterable || col.sortable"
42
42
  :tooltip-text="col.tooltip"
43
43
  :class="[{ 'pl-2': i === 1 && isFirstColFixed, 'pr-2': i === cols.length && isLastColFixed }, 'grow']"
44
+ :text-color="headerCellTextColor(col)"
44
45
  v-bind="col.headerCellAttrs"
45
46
  @click-filter-icon="$emit('click-filter-icon', $event, col)"
46
47
  />
47
48
  </div>
48
49
  <div
49
50
  v-if="colsResizable && i !== 0 && !(i === cols.length - 1 && isLastColFixed)"
50
- class="absolute bottom-0 right-0 h-full w-2 cursor-col-resize after:absolute after:bottom-2 after:z-20 after:block after:h-5 after:w-px after:cursor-col-resize after:bg-p-gray-30"
51
- :class="i === cols.length - 1 ? ' after:right-0' : ' after:right-1'"
51
+ class="absolute bottom-2 right-0 z-110 h-5 w-2 cursor-col-resize after:absolute after:bottom-0 after:z-110 after:block after:h-full after:w-2 after:cursor-col-resize after:border-r-2 after:border-dashed after:border-p-gray-30"
52
+ :class="i === cols.length - 1 ? ' after:right-0.5' : ' after:right-0'"
52
53
  data-resize-handle
53
54
  @mousedown="colResizeStart($event, i)"
54
55
  @dblclick="colResizeFitToData(i)"
55
56
  ></div>
56
- <div
57
- :class="['absolute bottom-0 h-1 w-full', colsResizable ? '-left-1' : 'left-0']"
58
- :style="{ background: col.borderColor }"
59
- ></div>
57
+ </div>
58
+ <div v-if="subheader" :class="thSubheaderClasses(i)">
59
+ <slot :name="`subheader-cell-${kebabCase(col.name)}`"></slot>
60
60
  </div>
61
61
  </th>
62
62
  <th
@@ -97,6 +97,7 @@ type Props = {
97
97
  isFirstColFixed?: boolean;
98
98
  isLastColFixed?: boolean;
99
99
  lockScroll?: boolean;
100
+ subheader?: boolean;
100
101
  virtualizer?: {
101
102
  paddingTop: number;
102
103
  paddingBottom: number;
@@ -118,6 +119,7 @@ const props = withDefaults(defineProps<Props>(), {
118
119
  isFirstColFixed: false,
119
120
  isLastColFixed: false,
120
121
  lockScroll: false,
122
+ subheader: false,
121
123
  virtualizer: () => ({
122
124
  paddingTop: 0,
123
125
  paddingBottom: 0,
@@ -169,12 +171,10 @@ const emitScroll = (e: Event) => {
169
171
  emit('scroll', e);
170
172
  };
171
173
 
172
- const thDivClasses = (i: number, col: TableCol) => {
174
+ const thDivClasses = (i: number) => {
173
175
  const res = ['relative', 'py-2'];
174
176
 
175
- if (!col.borderColor) {
176
- res.push('border-b border-p-gray-30');
177
- }
177
+ res.push('border-b border-p-gray-30');
178
178
 
179
179
  if ((i === 0 && props.isFirstColFixed) || (i === props.cols.length - 1 && props.isLastColFixed)) {
180
180
  res.push('th-shadow px-4');
@@ -185,6 +185,41 @@ const thDivClasses = (i: number, col: TableCol) => {
185
185
  return res;
186
186
  };
187
187
 
188
+ const thSubheaderClasses = (i: number) => {
189
+ const res = [
190
+ 'flex',
191
+ 'h-6',
192
+ 'items-center',
193
+ 'border-b',
194
+ 'border-b-p-gray-20',
195
+ 'bg-p-gray-10',
196
+ 'px-2',
197
+ 'text-xs',
198
+ 'font-medium',
199
+ 'text-p-gray-40',
200
+ ];
201
+
202
+ if ((i === 0 && props.isFirstColFixed) || (i === props.cols.length - 1 && props.isLastColFixed)) {
203
+ res.push('th-shadow');
204
+ }
205
+ return res;
206
+ };
207
+
208
+ const bgColorStyle = (col: TableCol) => {
209
+ if (col.borderColor) {
210
+ // append 33 to the color to make it 20% opacity
211
+ return { backgroundColor: col.borderColor + '33' };
212
+ }
213
+ return {};
214
+ };
215
+
216
+ const headerCellTextColor = (col: TableCol) => {
217
+ if (col.borderColor) {
218
+ return `color-mix(in srgb, ${col.borderColor} 100%, #000000 20%)`;
219
+ }
220
+ return '';
221
+ };
222
+
188
223
  // Lifecycle hooks
189
224
  onMounted(() => {
190
225
  scrollWrapper.value?.addEventListener('scroll', emitScroll, true);
@@ -214,7 +249,7 @@ watch(isColResizing, (nV) => {
214
249
  @apply left-0 z-30;
215
250
  }
216
251
  .p-table.first-col-fixed th:first-child .th-shadow {
217
- box-shadow: 2px 1px 8px rgba(0, 0, 0, 0.15);
252
+ box-shadow: -1px 1px 5px 4px rgba(0, 0, 0, 0.15);
218
253
  clip-path: inset(0px -12px 0px 0px);
219
254
  }
220
255
  .p-table.last-col-fixed th:last-child {
@@ -23,12 +23,11 @@ describe('PTableHeaderCell.vue', () => {
23
23
  expect(div.classes()).toEqual([
24
24
  'text-xs',
25
25
  'leading-5',
26
- 'font-bold',
27
- 'uppercase',
26
+ 'font-semibold',
28
27
  'truncate',
29
28
  'shrink',
30
29
  'test-class',
31
- 'text-p-purple-60',
30
+ 'text-p-gray-60',
32
31
  'mr-auto',
33
32
  ]);
34
33
  expect(tooltipIcon.exists()).toBe(false);
@@ -1,12 +1,8 @@
1
1
  <template>
2
2
  <div class="flex items-center overflow-hidden">
3
3
  <div
4
- :class="[
5
- DEFAULT_CLASSES,
6
- textClass,
7
- filterActive ? 'text-active-blue' : 'text-p-purple-60',
8
- { 'mr-auto': !tooltipText },
9
- ]"
4
+ :class="[DEFAULT_CLASSES, textClass, textColorClass, { 'mr-auto': !tooltipText }]"
5
+ :style="style"
10
6
  :title="text"
11
7
  >
12
8
  {{ text }}
@@ -27,7 +23,7 @@ import PInfoIcon from '@squirrel/components/p-info-icon/p-info-icon.vue';
27
23
  import PTableFilterIcon from '@squirrel/components/p-table-header-cell/p-table-filter-icon.vue';
28
24
  import { defineComponent } from 'vue';
29
25
 
30
- const DEFAULT_CLASSES = `text-xs leading-5 font-bold uppercase truncate shrink`;
26
+ const DEFAULT_CLASSES = `text-xs leading-5 font-semibold truncate shrink`;
31
27
 
32
28
  export default defineComponent({
33
29
  name: 'PTableHeaderCell',
@@ -56,6 +52,10 @@ export default defineComponent({
56
52
  type: String,
57
53
  default: '',
58
54
  },
55
+ textColor: {
56
+ type: String,
57
+ default: '',
58
+ },
59
59
  },
60
60
  emits: ['click-filter-icon'],
61
61
  data() {
@@ -63,5 +63,18 @@ export default defineComponent({
63
63
  DEFAULT_CLASSES,
64
64
  };
65
65
  },
66
+ computed: {
67
+ textColorClass() {
68
+ return this.filterActive ? 'text-active-blue' : this.textColor ? '' : 'text-p-gray-60';
69
+ },
70
+ style() {
71
+ if (this.filterActive) {
72
+ return {};
73
+ }
74
+ return {
75
+ color: this.textColor,
76
+ };
77
+ },
78
+ },
66
79
  });
67
80
  </script>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="block overflow-hidden border border-p-gray-30">
2
+ <div class="block overflow-hidden border border-p-gray-30 bg-surface">
3
3
  <table class="mb-0 w-full bg-surface">
4
4
  <thead>
5
5
  <tr>
@@ -7,6 +7,7 @@
7
7
  <div class="relative border-b border-p-gray-30 px-4 py-2">
8
8
  <PSkeletonLoader class="h-5" />
9
9
  </div>
10
+ <div v-if="withSubheader" class="h-4 w-full border-b border-b-p-gray-20 bg-p-gray-10"></div>
10
11
  </th>
11
12
  </tr>
12
13
  </thead>
@@ -45,5 +46,9 @@ defineProps({
45
46
  type: String,
46
47
  default: 'h-5',
47
48
  },
49
+ withSubheader: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
48
53
  });
49
54
  </script>
@@ -10,14 +10,18 @@ import { ref } from 'vue';
10
10
  const DEFAULT_TD_CLASSES = [
11
11
  'p-0',
12
12
  'h-full',
13
+ 'font-normal',
14
+ 'text-p-gray-60',
13
15
  'text-sm',
14
16
  'border-b',
15
17
  'border-p-gray-30',
18
+ 'border-r',
19
+ 'border-r-p-blue-10',
16
20
  'bg-white',
17
- 'group-hover/row:bg-p-blue-10',
21
+ 'group-hover/row:bg-p-gray-10',
18
22
  ];
19
23
 
20
- const DEFAULT_INNER_DIV_CLASSES = ['py-2', 'w-max', 'px-2'];
24
+ const DEFAULT_INNER_DIV_CLASSES = ['w-max', 'px-2'];
21
25
 
22
26
  describe('PTableTd.vue', () => {
23
27
  it('renders a td', async () => {
@@ -28,7 +32,7 @@ describe('PTableTd.vue', () => {
28
32
  });
29
33
 
30
34
  const td = wrapper.find('td');
31
- const innerDiv = wrapper.find('div.py-2');
35
+ const innerDiv = wrapper.find('div:nth-child(2)');
32
36
 
33
37
  expect(td.text()).toContain(`Cell content`);
34
38
  expect(td.classes()).toEqual(DEFAULT_TD_CLASSES);
@@ -73,7 +77,7 @@ describe('PTableTd.vue', () => {
73
77
  });
74
78
 
75
79
  const td = wrapper.find('td');
76
- const innerDiv = wrapper.find('div.py-2');
80
+ const innerDiv = wrapper.find('div:nth-child(2)');
77
81
 
78
82
  ['td-col-fixed-border-b', 'first:sticky', 'first:left-0', 'first:z-10'].forEach((c) => {
79
83
  expect(td.classes()).toContain(c);
@@ -97,7 +101,7 @@ describe('PTableTd.vue', () => {
97
101
  });
98
102
 
99
103
  const td = wrapper.find('td');
100
- const innerDiv = wrapper.find('div.py-2');
104
+ const innerDiv = wrapper.find('div:nth-child(2)');
101
105
 
102
106
  ['td-col-fixed-border-b', 'last:sticky', 'last:right-0', 'last:z-10'].forEach((c) => {
103
107
  expect(td.classes()).toContain(c);
@@ -120,11 +124,9 @@ describe('PTableTd.vue', () => {
120
124
  },
121
125
  });
122
126
 
123
- const innerDiv = wrapper.find('div.py-2');
127
+ const innerDiv = wrapper.find('div:nth-child(2)');
124
128
 
125
- ['py-2', 'w-max', 'pl-4', 'pr-2'].forEach((c) => {
126
- expect(innerDiv.classes()).toContain(c);
127
- });
129
+ expect([...innerDiv.classes()].sort()).toEqual(['w-max', 'pl-4', 'pr-2'].sort());
128
130
  });
129
131
 
130
132
  it('it applies spacing on the last non-sticky column', async () => {
@@ -139,10 +141,8 @@ describe('PTableTd.vue', () => {
139
141
  },
140
142
  });
141
143
 
142
- const innerDiv = wrapper.find('div.py-2');
144
+ const innerDiv = wrapper.find('div:nth-child(2)');
143
145
 
144
- ['py-2', 'w-max', 'pl-2', 'pr-4'].forEach((c) => {
145
- expect(innerDiv.classes()).toContain(c);
146
- });
146
+ expect([...innerDiv.classes()].sort()).toEqual(['w-max', 'pl-2', 'pr-4'].sort());
147
147
  });
148
148
  });