@leaflink/stash 48.4.0 → 48.4.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.
package/dist/Table.js CHANGED
@@ -1,4 +1,4 @@
1
- import { defineComponent as C, inject as b, computed as o, provide as L, watchEffect as H, openBlock as n, createElementBlock as N, normalizeClass as v, unref as m, normalizeStyle as D, createElementVNode as u, renderSlot as p, createBlock as h, withCtx as r, createVNode as i } from "vue";
1
+ import { defineComponent as C, inject as v, computed as o, provide as L, watchEffect as H, openBlock as u, createElementBlock as N, normalizeClass as s, unref as m, normalizeStyle as D, createElementVNode as p, renderSlot as c, createBlock as h, withCtx as r, createVNode as i } from "vue";
2
2
  import "lodash-es/cloneDeep";
3
3
  import { M as g } from "./Module.keys-2cc7d830.js";
4
4
  import "lodash-es/uniqueId";
@@ -45,18 +45,18 @@ const z = { class: "tw-relative tw-min-w-full tw-max-w-initial tw-border-separat
45
45
  setup(e) {
46
46
  const t = e, {
47
47
  density: x,
48
- variant: c,
48
+ variant: f,
49
49
  isEmpty: _,
50
50
  isLoading: T,
51
- isSelectable: f
52
- } = b(E.key, E.defaults), { variant: s } = b(g.key, g.defaults), y = o(() => (s == null ? void 0 : s.value) === "table" || c.value === "table" ? "rounded-bottom" : t.radius), l = o(() => t.stickyHeader ? "scroll" : t.layout), w = o(() => {
53
- var a, d;
51
+ isSelectable: y
52
+ } = v(E.key, E.defaults), { variant: d } = v(g.key, g.defaults), w = o(() => (d == null ? void 0 : d.value) === "table" || f.value === "table" ? "rounded-bottom" : t.radius), l = o(() => t.stickyHeader ? "scroll" : t.layout), b = o(() => {
53
+ var a, n;
54
54
  return !!((a = t.stickyHeader) != null && a.maxHeight && // table can't scroll without a max height; sticky headers only needed for a scrollable table
55
- ((d = t.stickyHeader) == null ? void 0 : d.listLength) > 3);
55
+ ((n = t.stickyHeader) == null ? void 0 : n.listLength) > 3);
56
56
  }), B = o(() => {
57
57
  var a;
58
58
  return {
59
- maxHeight: w.value ? (a = t.stickyHeader) == null ? void 0 : a.maxHeight : ""
59
+ maxHeight: b.value ? (a = t.stickyHeader) == null ? void 0 : a.maxHeight : ""
60
60
  };
61
61
  });
62
62
  return L(A.key, {
@@ -67,44 +67,50 @@ const z = { class: "tw-relative tw-min-w-full tw-max-w-initial tw-border-separat
67
67
  isSelectable: o(() => t.isSelectable && !t.isLoading && !t.isEmpty),
68
68
  layout: l
69
69
  }), H(() => {
70
- f && (f.value = t.isSelectable);
71
- }), (a, d) => (n(), N("div", {
72
- class: v(["stash-table tw-relative", [
73
- { "tw-rounded": y.value === "rounded" },
74
- { "tw-rounded-b": y.value === "rounded-bottom" },
75
- { "tw-border-t tw-border-ice-200": m(c) === "table" },
70
+ y && (y.value = t.isSelectable);
71
+ }), (a, n) => (u(), N("div", {
72
+ class: s(["stash-table tw-relative", [
73
+ { "tw-rounded": w.value === "rounded" },
74
+ { "tw-rounded-b": w.value === "rounded-bottom" },
75
+ { "tw-border-t tw-border-ice-200": m(f) === "table" },
76
76
  { "tw-overflow-auto tw-shadow": l.value === "scroll" },
77
77
  { "tw-overflow-visble lg:tw-overflow-auto lg:tw-shadow": l.value === "stack" },
78
- { "tw-min-h-[300px]": w.value && !t.isLoading }
78
+ { "tw-min-h-[300px]": b.value && !t.isLoading }
79
79
  // prevent the table from collapsing on small screen heights when the max-height is dynamic
80
80
  ]]),
81
81
  "data-test": "stash-table",
82
82
  style: D(B.value)
83
83
  }, [
84
- u("table", z, [
85
- u("thead", {
86
- class: v(["tw-border-b tw-border-ice-200", {
84
+ p("table", z, [
85
+ p("thead", {
86
+ class: s(["tw-border-b tw-border-ice-200", {
87
87
  "tw-hidden lg:tw-table-header-group": l.value === "stack"
88
88
  }])
89
89
  }, [
90
- p(a.$slots, "head")
90
+ c(a.$slots, "head")
91
91
  ], 2),
92
- u("tbody", null, [
93
- t.isLoading || m(T) ? (n(), h(S, { key: 0 }, {
92
+ p("tbody", null, [
93
+ t.isLoading || m(T) ? (u(), h(S, { key: 0 }, {
94
94
  default: r(() => [
95
- i(k, { colspan: "100%" }, {
95
+ i(k, {
96
+ colspan: "100%",
97
+ class: s({ "tw-col-span-12": l.value === "stack" })
98
+ }, {
96
99
  default: r(() => [
97
100
  i(I)
98
101
  ]),
99
102
  _: 1
100
- })
103
+ }, 8, ["class"])
101
104
  ]),
102
105
  _: 1
103
- })) : t.isEmpty || m(_) ? (n(), h(S, { key: 1 }, {
106
+ })) : t.isEmpty || m(_) ? (u(), h(S, { key: 1 }, {
104
107
  default: r(() => [
105
- i(k, { colspan: "100%" }, {
108
+ i(k, {
109
+ colspan: "100%",
110
+ class: s({ "tw-col-span-12": l.value === "stack" })
111
+ }, {
106
112
  default: r(() => [
107
- p(a.$slots, "empty", {}, () => [
113
+ c(a.$slots, "empty", {}, () => [
108
114
  i(V, {
109
115
  class: "tw-w-full tw-bg-white",
110
116
  text: t.emptyStateText
@@ -112,10 +118,10 @@ const z = { class: "tw-relative tw-min-w-full tw-max-w-initial tw-border-separat
112
118
  ])
113
119
  ]),
114
120
  _: 3
115
- })
121
+ }, 8, ["class"])
116
122
  ]),
117
123
  _: 3
118
- })) : p(a.$slots, "body", { key: 2 })
124
+ })) : c(a.$slots, "body", { key: 2 })
119
125
  ])
120
126
  ])
121
127
  ], 6));
package/dist/Table.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Table.js","sources":["../src/components/Table/Table.types.ts","../src/components/Table/Table.vue"],"sourcesContent":["import { ComputedRef } from 'vue';\n\nimport { SpacingDensities } from '../../../types/misc';\n\nexport enum Layout {\n Scroll = 'scroll',\n Stack = 'stack',\n}\n\nexport type Layouts = `${Layout}`;\n\nexport enum TableRadius {\n None = 'none',\n Rounded = 'rounded',\n RoundedBottom = 'rounded-bottom',\n}\n\nexport type TableRadiuses = `${TableRadius}`;\n\n/**\n * Properties and utilities provided to children of a Table instance\n */\nexport interface TableInjection {\n /**\n * Controls the Table's padding; the default value is \"comfortable\". On small screens, the density will always be \"compact\".\n */\n density: ComputedRef<SpacingDensities>;\n\n /**\n * Styles the last column for \"row actions\"\n */\n hasActions: ComputedRef<boolean>;\n\n /**\n * If true, hides the default expansion toggle column\n */\n hasCustomExpandToggle: ComputedRef<boolean>;\n\n /**\n * Adds a toggle column for row expansion. This is primarily needed for ensuring the corresponding empty TableHeaderRow is included.\n */\n isExpandable: ComputedRef<boolean>;\n\n /**\n * Adds a checkbox column for selecting rows; intended for use with the `useSelection` composable.\n */\n isSelectable: ComputedRef<boolean>;\n\n /**\n * Sets the table layout; the default value is \"scroll\".\n */\n layout: ComputedRef<Layouts>;\n}\n","<script lang=\"ts\">\n import { SpacingDensities, SpacingDensity } from '../../../types/misc';\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import { Layouts, TableRadiuses } from './Table.types';\n\n export * from './Table.keys';\n export * from './Table.types';\n\n export interface TableProps {\n /**\n * Controls the Table's padding; the default value is \"comfortable\". On small screens, \"compact\" density is applied regardless of this prop's value.\n */\n density?: SpacingDensities;\n\n /**\n * Sets the text for the empty state; the default value is \"No Results\".\n */\n emptyStateText?: string;\n\n /**\n * Styles the last column for \"row actions\"\n */\n hasActions?: boolean;\n\n /**\n * If true, hides the default expansion toggle column\n */\n hasCustomExpandToggle?: boolean;\n\n /**\n * Shows the empty state\n */\n isEmpty?: boolean;\n\n /**\n * Shows the loading state\n */\n isLoading?: boolean;\n\n /**\n * Adds a toggle column for row expansion. This is primarily needed for ensuring the corresponding empty TableHeaderRow is included.\n */\n isExpandable?: boolean;\n\n /**\n * Adds a checkbox column for selecting rows; intended for use with the `useSelection` composable.\n */\n isSelectable?: boolean;\n\n /**\n * Sets the table layout; the default value is \"scroll\".\n */\n layout?: Layouts;\n\n /**\n * Controls the corners of the table with the \"border-radius\" CSS property. The default value is \"rounded\".\n */\n radius?: TableRadiuses;\n\n /**\n * Allows the table head to be sticky when scrolling inside the table body\n */\n stickyHeader?: {\n listLength: number;\n maxHeight: string;\n };\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, watchEffect } from 'vue';\n\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import EmptyState from '../EmptyState/EmptyState.vue';\n import Loading from '../Loading/Loading.vue';\n import TableCell from '../TableCell/TableCell.vue';\n import TableRow from '../TableRow/TableRow.vue';\n import { TABLE_INJECTION } from './Table.keys';\n\n const props = withDefaults(defineProps<TableProps>(), {\n density: undefined,\n emptyStateText: '',\n hasActions: false,\n hasCustomExpandToggle: false,\n isEmpty: false,\n isLoading: false,\n isExpandable: false,\n isSelectable: false,\n layout: 'scroll',\n radius: 'rounded',\n stickyHeader: undefined,\n });\n\n const {\n density: dataViewDensity,\n variant: dataViewVariant,\n isEmpty: isDataViewEmpty,\n isLoading: isDataViewLoading,\n isSelectable: isDataViewSelectable,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const { variant: moduleVariant } = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n\n const computedRadius = computed<TableRadiuses>(() => {\n // Will work for tables when rendered inside of a Module with OR without a DataView.\n if (moduleVariant?.value === 'table') {\n return 'rounded-bottom';\n }\n\n if (dataViewVariant.value === 'table') {\n return 'rounded-bottom';\n }\n\n return props.radius;\n });\n\n const computedLayout = computed<Layouts>(() => {\n if (props.stickyHeader) {\n return 'scroll';\n }\n\n return props.layout;\n });\n\n const isStickyHeaderEnabled = computed<boolean>(() => {\n return !!(\n (\n props.stickyHeader?.maxHeight && // table can't scroll without a max height; sticky headers only needed for a scrollable table\n props.stickyHeader?.listLength > 3\n ) // scrollable table and sticky headers not needed when list is small\n );\n });\n\n const rootStyle = computed(() => ({\n maxHeight: isStickyHeaderEnabled.value ? props.stickyHeader?.maxHeight : '',\n }));\n\n provide(TABLE_INJECTION.key, {\n density: computed(() => props.density || dataViewDensity.value || SpacingDensity.Comfortable),\n hasCustomExpandToggle: computed(() => props.hasCustomExpandToggle),\n hasActions: computed(() => props.hasActions),\n isExpandable: computed(() => props.isExpandable),\n isSelectable: computed(() => props.isSelectable && !props.isLoading && !props.isEmpty),\n layout: computedLayout,\n });\n\n watchEffect(() => {\n // Table can be both casted within a DataView or standalone. useSelection is still possible to be used on both cases,\n // making it important to have Table to control selection props.\n // To avoid breaking changes and developer experience, a DataView injection is passed down and updated whenever it exists,\n // and move the information up into DataView, that sometimes aren't used.\n if (isDataViewSelectable) {\n isDataViewSelectable.value = props.isSelectable;\n }\n });\n</script>\n\n<template>\n <div\n class=\"stash-table tw-relative\"\n :class=\"[\n { 'tw-rounded': computedRadius === 'rounded' },\n { 'tw-rounded-b': computedRadius === 'rounded-bottom' },\n { 'tw-border-t tw-border-ice-200': dataViewVariant === 'table' },\n { 'tw-overflow-auto tw-shadow': computedLayout === 'scroll' },\n { 'tw-overflow-visble lg:tw-overflow-auto lg:tw-shadow': computedLayout === 'stack' },\n { 'tw-min-h-[300px]': isStickyHeaderEnabled && !props.isLoading }, // prevent the table from collapsing on small screen heights when the max-height is dynamic\n ]\"\n data-test=\"stash-table\"\n :style=\"rootStyle\"\n >\n <table class=\"tw-relative tw-min-w-full tw-max-w-initial tw-border-separate\">\n <thead\n class=\"tw-border-b tw-border-ice-200\"\n :class=\"{\n 'tw-hidden lg:tw-table-header-group': computedLayout === 'stack',\n }\"\n >\n <!-- @slot head -->\n <slot name=\"head\"> </slot>\n </thead>\n <tbody>\n <TableRow v-if=\"props.isLoading || isDataViewLoading\">\n <TableCell colspan=\"100%\">\n <Loading />\n </TableCell>\n </TableRow>\n <!-- @slot empty -->\n <template v-else-if=\"props.isEmpty || isDataViewEmpty\">\n <TableRow>\n <TableCell colspan=\"100%\">\n <slot name=\"empty\">\n <EmptyState class=\"tw-w-full tw-bg-white\" :text=\"props.emptyStateText\" />\n </slot>\n </TableCell>\n </TableRow>\n </template>\n <!-- @slot body -->\n <slot v-else name=\"body\"></slot>\n </tbody>\n </table>\n </div>\n</template>\n"],"names":["Layout","TableRadius","dataViewDensity","dataViewVariant","isDataViewEmpty","isDataViewLoading","isDataViewSelectable","inject","DATA_VIEW_INJECTION","moduleVariant","MODULE_INJECTION","computedRadius","computed","props","computedLayout","isStickyHeaderEnabled","_a","_b","rootStyle","provide","TABLE_INJECTION","SpacingDensity","watchEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIY,IAAAA,sBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,QAAQ,SAFEA,IAAAA,KAAA,CAAA,CAAA,GAOAC,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,UAAU,WACVA,EAAA,gBAAgB,kBAHNA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;iBCkFJ;AAAA,MACJ,SAASC;AAAA,MACT,SAASC;AAAA,MACT,SAASC;AAAA,MACT,WAAWC;AAAA,MACX,cAAcC;AAAA,IACZ,IAAAC,EAAOC,EAAoB,KAAKA,EAAoB,QAAQ,GAE1D,EAAE,SAASC,MAAkBF,EAAOG,EAAiB,KAAKA,EAAiB,QAAQ,GAEnFC,IAAiBC,EAAwB,OAEzCH,KAAA,gBAAAA,EAAe,WAAU,WAIzBN,EAAgB,UAAU,UACrB,mBAGFU,EAAM,MACd,GAEKC,IAAiBF,EAAkB,MACnCC,EAAM,eACD,WAGFA,EAAM,MACd,GAEKE,IAAwBH,EAAkB,MAAM;;AAC7C,aAAA,CAAC,GAEJI,IAAAH,EAAM,iBAAN,QAAAG,EAAoB;AAAA,QACpBC,IAAAJ,EAAM,iBAAN,gBAAAI,EAAoB,cAAa;AAAA,IAAA,CAGtC,GAEKC,IAAYN,EAAS,MAAO;;AAAA;AAAA,QAChC,WAAWG,EAAsB,SAAQC,IAAAH,EAAM,iBAAN,gBAAAG,EAAoB,YAAY;AAAA,MACzE;AAAA,KAAA;AAEF,WAAAG,EAAQC,EAAgB,KAAK;AAAA,MAC3B,SAASR,EAAS,MAAMC,EAAM,WAAWX,EAAgB,SAASmB,EAAe,WAAW;AAAA,MAC5F,uBAAuBT,EAAS,MAAMC,EAAM,qBAAqB;AAAA,MACjE,YAAYD,EAAS,MAAMC,EAAM,UAAU;AAAA,MAC3C,cAAcD,EAAS,MAAMC,EAAM,YAAY;AAAA,MAC/C,cAAcD,EAAS,MAAMC,EAAM,gBAAgB,CAACA,EAAM,aAAa,CAACA,EAAM,OAAO;AAAA,MACrF,QAAQC;AAAA,IAAA,CACT,GAEDQ,EAAY,MAAM;AAKhB,MAAIhB,MACFA,EAAqB,QAAQO,EAAM;AAAA,IACrC,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Table.js","sources":["../src/components/Table/Table.types.ts","../src/components/Table/Table.vue"],"sourcesContent":["import { ComputedRef } from 'vue';\n\nimport { SpacingDensities } from '../../../types/misc';\n\nexport enum Layout {\n Scroll = 'scroll',\n Stack = 'stack',\n}\n\nexport type Layouts = `${Layout}`;\n\nexport enum TableRadius {\n None = 'none',\n Rounded = 'rounded',\n RoundedBottom = 'rounded-bottom',\n}\n\nexport type TableRadiuses = `${TableRadius}`;\n\n/**\n * Properties and utilities provided to children of a Table instance\n */\nexport interface TableInjection {\n /**\n * Controls the Table's padding; the default value is \"comfortable\". On small screens, the density will always be \"compact\".\n */\n density: ComputedRef<SpacingDensities>;\n\n /**\n * Styles the last column for \"row actions\"\n */\n hasActions: ComputedRef<boolean>;\n\n /**\n * If true, hides the default expansion toggle column\n */\n hasCustomExpandToggle: ComputedRef<boolean>;\n\n /**\n * Adds a toggle column for row expansion. This is primarily needed for ensuring the corresponding empty TableHeaderRow is included.\n */\n isExpandable: ComputedRef<boolean>;\n\n /**\n * Adds a checkbox column for selecting rows; intended for use with the `useSelection` composable.\n */\n isSelectable: ComputedRef<boolean>;\n\n /**\n * Sets the table layout; the default value is \"scroll\".\n */\n layout: ComputedRef<Layouts>;\n}\n","<script lang=\"ts\">\n import { SpacingDensities, SpacingDensity } from '../../../types/misc';\n import { MODULE_INJECTION } from '../Module/Module.keys';\n import { Layouts, TableRadiuses } from './Table.types';\n\n export * from './Table.keys';\n export * from './Table.types';\n\n export interface TableProps {\n /**\n * Controls the Table's padding; the default value is \"comfortable\". On small screens, \"compact\" density is applied regardless of this prop's value.\n */\n density?: SpacingDensities;\n\n /**\n * Sets the text for the empty state; the default value is \"No Results\".\n */\n emptyStateText?: string;\n\n /**\n * Styles the last column for \"row actions\"\n */\n hasActions?: boolean;\n\n /**\n * If true, hides the default expansion toggle column\n */\n hasCustomExpandToggle?: boolean;\n\n /**\n * Shows the empty state\n */\n isEmpty?: boolean;\n\n /**\n * Shows the loading state\n */\n isLoading?: boolean;\n\n /**\n * Adds a toggle column for row expansion. This is primarily needed for ensuring the corresponding empty TableHeaderRow is included.\n */\n isExpandable?: boolean;\n\n /**\n * Adds a checkbox column for selecting rows; intended for use with the `useSelection` composable.\n */\n isSelectable?: boolean;\n\n /**\n * Sets the table layout; the default value is \"scroll\".\n */\n layout?: Layouts;\n\n /**\n * Controls the corners of the table with the \"border-radius\" CSS property. The default value is \"rounded\".\n */\n radius?: TableRadiuses;\n\n /**\n * Allows the table head to be sticky when scrolling inside the table body\n */\n stickyHeader?: {\n listLength: number;\n maxHeight: string;\n };\n }\n</script>\n\n<script setup lang=\"ts\">\n import { computed, inject, provide, watchEffect } from 'vue';\n\n import { DATA_VIEW_INJECTION } from '../DataView/DataView.vue';\n import EmptyState from '../EmptyState/EmptyState.vue';\n import Loading from '../Loading/Loading.vue';\n import TableCell from '../TableCell/TableCell.vue';\n import TableRow from '../TableRow/TableRow.vue';\n import { TABLE_INJECTION } from './Table.keys';\n\n const props = withDefaults(defineProps<TableProps>(), {\n density: undefined,\n emptyStateText: '',\n hasActions: false,\n hasCustomExpandToggle: false,\n isEmpty: false,\n isLoading: false,\n isExpandable: false,\n isSelectable: false,\n layout: 'scroll',\n radius: 'rounded',\n stickyHeader: undefined,\n });\n\n const {\n density: dataViewDensity,\n variant: dataViewVariant,\n isEmpty: isDataViewEmpty,\n isLoading: isDataViewLoading,\n isSelectable: isDataViewSelectable,\n } = inject(DATA_VIEW_INJECTION.key, DATA_VIEW_INJECTION.defaults);\n\n const { variant: moduleVariant } = inject(MODULE_INJECTION.key, MODULE_INJECTION.defaults);\n\n const computedRadius = computed<TableRadiuses>(() => {\n // Will work for tables when rendered inside of a Module with OR without a DataView.\n if (moduleVariant?.value === 'table') {\n return 'rounded-bottom';\n }\n\n if (dataViewVariant.value === 'table') {\n return 'rounded-bottom';\n }\n\n return props.radius;\n });\n\n const computedLayout = computed<Layouts>(() => {\n if (props.stickyHeader) {\n return 'scroll';\n }\n\n return props.layout;\n });\n\n const isStickyHeaderEnabled = computed<boolean>(() => {\n return !!(\n (\n props.stickyHeader?.maxHeight && // table can't scroll without a max height; sticky headers only needed for a scrollable table\n props.stickyHeader?.listLength > 3\n ) // scrollable table and sticky headers not needed when list is small\n );\n });\n\n const rootStyle = computed(() => ({\n maxHeight: isStickyHeaderEnabled.value ? props.stickyHeader?.maxHeight : '',\n }));\n\n provide(TABLE_INJECTION.key, {\n density: computed(() => props.density || dataViewDensity.value || SpacingDensity.Comfortable),\n hasCustomExpandToggle: computed(() => props.hasCustomExpandToggle),\n hasActions: computed(() => props.hasActions),\n isExpandable: computed(() => props.isExpandable),\n isSelectable: computed(() => props.isSelectable && !props.isLoading && !props.isEmpty),\n layout: computedLayout,\n });\n\n watchEffect(() => {\n // Table can be both casted within a DataView or standalone. useSelection is still possible to be used on both cases,\n // making it important to have Table to control selection props.\n // To avoid breaking changes and developer experience, a DataView injection is passed down and updated whenever it exists,\n // and move the information up into DataView, that sometimes aren't used.\n if (isDataViewSelectable) {\n isDataViewSelectable.value = props.isSelectable;\n }\n });\n</script>\n\n<template>\n <div\n class=\"stash-table tw-relative\"\n :class=\"[\n { 'tw-rounded': computedRadius === 'rounded' },\n { 'tw-rounded-b': computedRadius === 'rounded-bottom' },\n { 'tw-border-t tw-border-ice-200': dataViewVariant === 'table' },\n { 'tw-overflow-auto tw-shadow': computedLayout === 'scroll' },\n { 'tw-overflow-visble lg:tw-overflow-auto lg:tw-shadow': computedLayout === 'stack' },\n { 'tw-min-h-[300px]': isStickyHeaderEnabled && !props.isLoading }, // prevent the table from collapsing on small screen heights when the max-height is dynamic\n ]\"\n data-test=\"stash-table\"\n :style=\"rootStyle\"\n >\n <table class=\"tw-relative tw-min-w-full tw-max-w-initial tw-border-separate\">\n <thead\n class=\"tw-border-b tw-border-ice-200\"\n :class=\"{\n 'tw-hidden lg:tw-table-header-group': computedLayout === 'stack',\n }\"\n >\n <!-- @slot head -->\n <slot name=\"head\"> </slot>\n </thead>\n <tbody>\n <!-- \n tw-col-span-12 makes the td span all columns only when layout === 'stack' and the viewport is below lg (when table elements are using display: grid ).\n The colspan attr does the same in all other cases when the table elements are using their native table styles.\n These are necessary in order to properly horizontally center Loading, and EmptyState \n -->\n <TableRow v-if=\"props.isLoading || isDataViewLoading\">\n <TableCell colspan=\"100%\" :class=\"{ 'tw-col-span-12': computedLayout === 'stack' }\">\n <Loading />\n </TableCell>\n </TableRow>\n <!-- @slot empty -->\n <template v-else-if=\"props.isEmpty || isDataViewEmpty\">\n <TableRow>\n <TableCell colspan=\"100%\" :class=\"{ 'tw-col-span-12': computedLayout === 'stack' }\">\n <slot name=\"empty\">\n <EmptyState class=\"tw-w-full tw-bg-white\" :text=\"props.emptyStateText\" />\n </slot>\n </TableCell>\n </TableRow>\n </template>\n <!-- @slot body -->\n <slot v-else name=\"body\"></slot>\n </tbody>\n </table>\n </div>\n</template>\n"],"names":["Layout","TableRadius","dataViewDensity","dataViewVariant","isDataViewEmpty","isDataViewLoading","isDataViewSelectable","inject","DATA_VIEW_INJECTION","moduleVariant","MODULE_INJECTION","computedRadius","computed","props","computedLayout","isStickyHeaderEnabled","_a","_b","rootStyle","provide","TABLE_INJECTION","SpacingDensity","watchEffect"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIY,IAAAA,sBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,QAAQ,SAFEA,IAAAA,KAAA,CAAA,CAAA,GAOAC,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,UAAU,WACVA,EAAA,gBAAgB,kBAHNA,IAAAA,KAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;iBCkFJ;AAAA,MACJ,SAASC;AAAA,MACT,SAASC;AAAA,MACT,SAASC;AAAA,MACT,WAAWC;AAAA,MACX,cAAcC;AAAA,IACZ,IAAAC,EAAOC,EAAoB,KAAKA,EAAoB,QAAQ,GAE1D,EAAE,SAASC,MAAkBF,EAAOG,EAAiB,KAAKA,EAAiB,QAAQ,GAEnFC,IAAiBC,EAAwB,OAEzCH,KAAA,gBAAAA,EAAe,WAAU,WAIzBN,EAAgB,UAAU,UACrB,mBAGFU,EAAM,MACd,GAEKC,IAAiBF,EAAkB,MACnCC,EAAM,eACD,WAGFA,EAAM,MACd,GAEKE,IAAwBH,EAAkB,MAAM;;AAC7C,aAAA,CAAC,GAEJI,IAAAH,EAAM,iBAAN,QAAAG,EAAoB;AAAA,QACpBC,IAAAJ,EAAM,iBAAN,gBAAAI,EAAoB,cAAa;AAAA,IAAA,CAGtC,GAEKC,IAAYN,EAAS,MAAO;;AAAA;AAAA,QAChC,WAAWG,EAAsB,SAAQC,IAAAH,EAAM,iBAAN,gBAAAG,EAAoB,YAAY;AAAA,MACzE;AAAA,KAAA;AAEF,WAAAG,EAAQC,EAAgB,KAAK;AAAA,MAC3B,SAASR,EAAS,MAAMC,EAAM,WAAWX,EAAgB,SAASmB,EAAe,WAAW;AAAA,MAC5F,uBAAuBT,EAAS,MAAMC,EAAM,qBAAqB;AAAA,MACjE,YAAYD,EAAS,MAAMC,EAAM,UAAU;AAAA,MAC3C,cAAcD,EAAS,MAAMC,EAAM,YAAY;AAAA,MAC/C,cAAcD,EAAS,MAAMC,EAAM,gBAAgB,CAACA,EAAM,aAAa,CAACA,EAAM,OAAO;AAAA,MACrF,QAAQC;AAAA,IAAA,CACT,GAEDQ,EAAY,MAAM;AAKhB,MAAIhB,MACFA,EAAqB,QAAQO,EAAM;AAAA,IACrC,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflink/stash",
3
- "version": "48.4.0",
3
+ "version": "48.4.1",
4
4
  "description": "LeafLink's design system.",
5
5
  "homepage": "https://stash.leaflink.com",
6
6
  "main": "./dist/index.ts",