@economic/taco 0.0.1-alpha.0 → 0.0.1-alpha.2
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/esm/_virtual/tailwindcss-aria-attributes.js_commonjs-proxy +2 -3
- package/dist/esm/_virtual/tailwindcss-aria-attributes.js_commonjs-proxy.map +1 -1
- package/dist/esm/index.css +24 -41
- package/dist/esm/src/components/Dialog/components/Content.js +3 -3
- package/dist/esm/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/src/components/Table/hooks/plugins/useRowActions.js +11 -5
- package/dist/esm/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
- package/dist/esm/src/components/Table/hooks/plugins/useRowSelect.js +3 -3
- package/dist/esm/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
- package/dist/esm/src/components/Table/util/renderColumn.js +4 -3
- package/dist/esm/src/components/Table/util/renderColumn.js.map +1 -1
- package/dist/esm/src/components/Table/util/renderRow.js +4 -3
- package/dist/esm/src/components/Table/util/renderRow.js.map +1 -1
- package/dist/index.css +24 -41
- package/dist/taco.cjs.development.js +32 -17
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +4 -3
- package/types.json +7309 -0
- package/dist/esm/_virtual/_commonjsHelpers.js +0 -6
- package/dist/esm/_virtual/_commonjsHelpers.js.map +0 -1
package/dist/index.css
CHANGED
@@ -578,81 +578,73 @@
|
|
578
578
|
}
|
579
579
|
|
580
580
|
.yt-table:focus {
|
581
|
-
@apply rounded-sm
|
581
|
+
@apply yt-focus rounded-sm;
|
582
582
|
}
|
583
583
|
|
584
584
|
/* rows */
|
585
585
|
.yt-table__row {
|
586
|
-
@apply border-
|
586
|
+
@apply border-grey-light flex border-b;
|
587
587
|
min-height: 2.5rem;
|
588
588
|
}
|
589
589
|
|
590
590
|
/* cells */
|
591
591
|
.yt-table__cell {
|
592
|
-
@apply flex-1 p-2
|
592
|
+
@apply flex-1 truncate p-2 text-center align-middle;
|
593
593
|
}
|
594
594
|
|
595
|
-
.yt-table__cell
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
.yt-table__cell > .yt-button,
|
600
|
-
.yt-table__cell .yt-group > .yt-button {
|
601
|
-
@apply -mt-1 -mb-1;
|
602
|
-
}
|
603
|
-
|
604
|
-
.yt-table__cell.yt-table__cell__actions .yt-group > *:not(:first-child):not(.yt-hanger):not(.yt-menu) {
|
605
|
-
@apply ml-0;
|
595
|
+
.yt-table__cell > [data-taco='button'],
|
596
|
+
.yt-table__cell > [data-taco='icon-button'] {
|
597
|
+
@apply -mt-1 -mb-1 flex;
|
606
598
|
}
|
607
599
|
|
608
600
|
.yt-table__cell.yt-table__cell--draggable {
|
609
601
|
@apply flex-col px-0;
|
610
602
|
}
|
611
603
|
|
612
|
-
.yt-table__cell.yt-table__cell--draggable
|
613
|
-
@apply
|
604
|
+
.yt-table__cell.yt-table__cell--draggable [data-taco='icon'] {
|
605
|
+
@apply text-grey-darkest invisible cursor-grab;
|
614
606
|
width: 20px;
|
615
607
|
}
|
616
608
|
|
617
|
-
.yt-table__row.yt-table__row--dragging .yt-table__cell.yt-table__cell--draggable
|
609
|
+
.yt-table__row.yt-table__row--dragging .yt-table__cell.yt-table__cell--draggable [data-taco='icon'] {
|
618
610
|
@apply text-white;
|
619
611
|
}
|
620
612
|
|
621
|
-
.yt-table__cell.yt-table__cell--draggable
|
613
|
+
.yt-table__cell.yt-table__cell--draggable [data-taco='icon']:active {
|
622
614
|
@apply cursor-grabbing;
|
623
615
|
}
|
624
616
|
|
625
|
-
.yt-table__row:hover .yt-table__cell.yt-table__cell--draggable
|
617
|
+
.yt-table__row:hover .yt-table__cell.yt-table__cell--draggable [data-taco='icon'] {
|
626
618
|
@apply visible;
|
627
619
|
}
|
628
620
|
|
629
621
|
/* head */
|
630
622
|
.yt-table__head .yt-table__row {
|
631
|
-
@apply border-t-0 border-b-2 font-bold
|
623
|
+
@apply h-auto w-full select-none border-t-0 border-b-2 font-bold;
|
632
624
|
}
|
633
625
|
|
634
626
|
.yt-table__head .yt-table__head__group {
|
635
|
-
@apply flex flex-
|
627
|
+
@apply flex flex-1 flex-wrap;
|
636
628
|
}
|
637
629
|
|
638
630
|
.yt-table__head .yt-table__head__group .yt-table__cell.yt-table__cell__group {
|
639
|
-
@apply border-
|
631
|
+
@apply border-grey-light border-b;
|
640
632
|
flex-basis: 100%;
|
641
633
|
}
|
642
634
|
|
643
635
|
.yt-table__head .yt-table__head__group + .yt-table__head__group {
|
644
|
-
@apply border-
|
636
|
+
@apply border-grey-light border-l;
|
645
637
|
}
|
646
638
|
|
647
639
|
.yt-table__head .yt-table__cell {
|
648
|
-
@apply
|
640
|
+
@apply text-grey-darkest flex justify-center;
|
649
641
|
}
|
650
642
|
|
651
643
|
.yt-table__head .yt-table__cell > span {
|
652
644
|
@apply truncate;
|
653
645
|
}
|
654
646
|
|
655
|
-
.yt-table__head .yt-table__cell >
|
647
|
+
.yt-table__head .yt-table__cell > [data-taco='icon'] {
|
656
648
|
@apply flex-shrink-0;
|
657
649
|
}
|
658
650
|
|
@@ -661,7 +653,7 @@
|
|
661
653
|
}
|
662
654
|
|
663
655
|
.yt-table__head .yt-table__cell.yt-table__cell__group + .yt-table__cell__group {
|
664
|
-
@apply border-
|
656
|
+
@apply border-grey-light border-l-2;
|
665
657
|
}
|
666
658
|
|
667
659
|
.yt-table__head .yt-table__cell:not(.yt-table__cell--disable-sort) {
|
@@ -717,35 +709,26 @@
|
|
717
709
|
overflow-wrap: normal;
|
718
710
|
}
|
719
711
|
|
720
|
-
.yt-table__cell
|
721
|
-
@apply
|
712
|
+
.yt-table__cell [data-taco='label'] {
|
713
|
+
@apply -my-2 pb-0 text-transparent;
|
722
714
|
min-height: theme('spacing.10');
|
723
715
|
}
|
724
716
|
|
725
|
-
.yt-table__cell
|
717
|
+
.yt-table__cell [data-taco='label'] > *:not([data-taco='label']__message) {
|
726
718
|
@apply mt-1;
|
727
719
|
}
|
728
720
|
|
729
|
-
.yt-table__body .yt-table__row.yt-table__row--editing .yt-table__cell
|
721
|
+
.yt-table__body .yt-table__row.yt-table__row--editing .yt-table__cell [data-taco='label'] > *:not([data-taco='label']__message) {
|
730
722
|
@apply -mt-5;
|
731
723
|
}
|
732
724
|
|
733
|
-
.yt-table__cell
|
725
|
+
.yt-table__cell [data-taco='label'] > [data-taco='label']__message {
|
734
726
|
@apply mb-1;
|
735
727
|
}
|
736
728
|
|
737
729
|
/* drag */
|
738
730
|
#yt-table__drag__placeholder {
|
739
|
-
@apply bg-blue
|
740
|
-
}
|
741
|
-
|
742
|
-
/* cell alignment */
|
743
|
-
.yt-table__cell.yt-table__cell--align-left {
|
744
|
-
@apply justify-start text-left;
|
745
|
-
}
|
746
|
-
|
747
|
-
.yt-table__cell.yt-table__cell--align-right {
|
748
|
-
@apply justify-end text-right;
|
731
|
+
@apply bg-blue flex w-3/12 rounded p-4 font-bold text-white;
|
749
732
|
}
|
750
733
|
|
751
734
|
.yt-tabs .yt-tab__list[aria-orientation='vertical'] {
|
@@ -4050,7 +4050,7 @@ var Title = /*#__PURE__*/React.forwardRef(function DialogTitle(props, ref) {
|
|
4050
4050
|
});
|
4051
4051
|
var Footer = /*#__PURE__*/React.forwardRef(function DialogFooter(props, ref) {
|
4052
4052
|
return React.createElement("div", Object.assign({}, props, {
|
4053
|
-
className: "flex justify-end
|
4053
|
+
className: "mt-8 flex justify-end",
|
4054
4054
|
ref: ref
|
4055
4055
|
}), React.createElement(Group, null, props.children));
|
4056
4056
|
});
|
@@ -4085,7 +4085,7 @@ var Content$2 = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref)
|
|
4085
4085
|
};
|
4086
4086
|
}
|
4087
4087
|
|
4088
|
-
var className = cn('bg-white rounded
|
4088
|
+
var className = cn('bg-white rounded mt-16 mx-auto', {
|
4089
4089
|
'w-128 text-center justify-center': dialog.size === 'dialog',
|
4090
4090
|
'w-xs': dialog.size === 'xs',
|
4091
4091
|
'w-sm': dialog.size === 'sm',
|
@@ -4129,7 +4129,7 @@ var Content$2 = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref)
|
|
4129
4129
|
className: containerClassName
|
4130
4130
|
}, output, dialog.draggable && React.createElement("div", Object.assign({}, dragHandleProps, {
|
4131
4131
|
"aria-label": texts.dialog.drag,
|
4132
|
-
className: "yt-dialog__drag absolute-center-x
|
4132
|
+
className: "yt-dialog__drag absolute-center-x bg-grey-light top-1.5 h-3 w-24 cursor-move rounded text-center"
|
4133
4133
|
})), React.createElement(DialogPrimitive.Close, {
|
4134
4134
|
asChild: true,
|
4135
4135
|
onClick: dialog.onClose
|
@@ -7852,6 +7852,8 @@ var useRowEditing = function useRowEditing(uniqueId) {
|
|
7852
7852
|
return plugin;
|
7853
7853
|
};
|
7854
7854
|
|
7855
|
+
var actionGroupClassName = '-mt-1 -mb-1 h-8 flex';
|
7856
|
+
|
7855
7857
|
var hasActions = function hasActions(inlineEditingUniqueId, handlers, actions) {
|
7856
7858
|
return !!actions || handlers.onRowCreate || handlers.onRowCopy || handlers.onRowDelete || !!inlineEditingUniqueId || handlers.onRowEdit;
|
7857
7859
|
};
|
@@ -7952,7 +7954,9 @@ var EditModeActions = function EditModeActions() {
|
|
7952
7954
|
document.removeEventListener('keydown', listener);
|
7953
7955
|
};
|
7954
7956
|
}, []);
|
7955
|
-
return React__default.createElement(
|
7957
|
+
return React__default.createElement("div", {
|
7958
|
+
className: actionGroupClassName
|
7959
|
+
}, React__default.createElement(IconButton, {
|
7956
7960
|
appearance: "primary",
|
7957
7961
|
icon: "tick",
|
7958
7962
|
type: "submit",
|
@@ -7977,7 +7981,7 @@ var useRowActions = function useRowActions(inlineEditingUniqueId, handlers, acti
|
|
7977
7981
|
hooks.visibleColumns.push(function (columns) {
|
7978
7982
|
return [].concat(columns, [{
|
7979
7983
|
id: '_actions',
|
7980
|
-
className: '
|
7984
|
+
className: 'flex justify-end px-1 overflow-visible',
|
7981
7985
|
flex: "0 0 calc((" + actionsLength + " * 2rem) + .5rem)",
|
7982
7986
|
Cell: function Cell(_ref) {
|
7983
7987
|
var row = _ref.row;
|
@@ -8075,7 +8079,9 @@ var useRowActions = function useRowActions(inlineEditingUniqueId, handlers, acti
|
|
8075
8079
|
}))) : null);
|
8076
8080
|
|
8077
8081
|
if (windowed) {
|
8078
|
-
return React__default.createElement(
|
8082
|
+
return React__default.createElement("div", {
|
8083
|
+
className: actionGroupClassName
|
8084
|
+
}, output);
|
8079
8085
|
}
|
8080
8086
|
|
8081
8087
|
return React__default.createElement(reactIntersectionObserver.InView, {
|
@@ -8083,7 +8089,8 @@ var useRowActions = function useRowActions(inlineEditingUniqueId, handlers, acti
|
|
8083
8089
|
}, function (_ref2) {
|
8084
8090
|
var inView = _ref2.inView,
|
8085
8091
|
ref = _ref2.ref;
|
8086
|
-
return React__default.createElement(
|
8092
|
+
return React__default.createElement("div", {
|
8093
|
+
className: actionGroupClassName,
|
8087
8094
|
ref: ref
|
8088
8095
|
}, inView ? output : null);
|
8089
8096
|
});
|
@@ -8158,7 +8165,7 @@ var useRowSelect = function useRowSelect(onSelectedRows) {
|
|
8158
8165
|
|
8159
8166
|
return React__default.createElement(Checkbox, Object.assign({}, props, {
|
8160
8167
|
onChange: onChange,
|
8161
|
-
className: "
|
8168
|
+
className: "mt-px"
|
8162
8169
|
}));
|
8163
8170
|
},
|
8164
8171
|
Cell: function Cell(_ref2) {
|
@@ -8190,7 +8197,7 @@ var useRowSelect = function useRowSelect(onSelectedRows) {
|
|
8190
8197
|
};
|
8191
8198
|
|
8192
8199
|
return React__default.createElement(Checkbox, Object.assign({}, props, {
|
8193
|
-
className: "
|
8200
|
+
className: "mt-px",
|
8194
8201
|
onClick: onClick,
|
8195
8202
|
// this is necessary to remove console spam from eslint
|
8196
8203
|
onChange: function onChange() {
|
@@ -8199,7 +8206,7 @@ var useRowSelect = function useRowSelect(onSelectedRows) {
|
|
8199
8206
|
}));
|
8200
8207
|
},
|
8201
8208
|
flex: '0 0 36px',
|
8202
|
-
className: 'flex-col justify-start'
|
8209
|
+
className: 'flex-col justify-start !pb-0'
|
8203
8210
|
}].concat(columns);
|
8204
8211
|
});
|
8205
8212
|
}
|
@@ -8686,8 +8693,8 @@ var _excluded$K = ["row", "index", "instance", "headerGroups"];
|
|
8686
8693
|
var renderCell = function renderCell(cell, row) {
|
8687
8694
|
var props = _extends({}, cell.getCellProps(), {
|
8688
8695
|
className: cn('yt-table__cell', cell.column.className, {
|
8689
|
-
'
|
8690
|
-
'
|
8696
|
+
'justify-start text-left': cell.column.align === 'left',
|
8697
|
+
'justify-end text-right': cell.column.align === 'right'
|
8691
8698
|
}),
|
8692
8699
|
style: _extends({}, cell.column.style, {
|
8693
8700
|
flex: typeof cell.column.flex === 'function' ? cell.column.flex(row) : cell.column.flex
|
@@ -8695,7 +8702,8 @@ var renderCell = function renderCell(cell, row) {
|
|
8695
8702
|
});
|
8696
8703
|
|
8697
8704
|
return React__default.createElement("div", Object.assign({}, props, {
|
8698
|
-
role: "gridcell"
|
8705
|
+
role: "gridcell",
|
8706
|
+
"data-taco": "table-cell"
|
8699
8707
|
}), cell.render('Cell') || null);
|
8700
8708
|
};
|
8701
8709
|
|
@@ -8790,8 +8798,8 @@ var Column = function Column(_ref) {
|
|
8790
8798
|
className: cn('yt-table__cell', cell.className, {
|
8791
8799
|
'yt-table__cell__group': !!cell.columns,
|
8792
8800
|
'yt-table__cell--disable-sort': cell.disableSorting,
|
8793
|
-
'
|
8794
|
-
'
|
8801
|
+
'justify-start text-left': cell.align === 'left',
|
8802
|
+
'justify-end text-right': cell.align === 'right'
|
8795
8803
|
}),
|
8796
8804
|
style: _extends({}, cell.style, {
|
8797
8805
|
flex: cell.flex
|
@@ -8803,7 +8811,8 @@ var Column = function Column(_ref) {
|
|
8803
8811
|
}
|
8804
8812
|
|
8805
8813
|
return React__default.createElement("div", Object.assign({}, props, {
|
8806
|
-
key: cell.id
|
8814
|
+
key: cell.id,
|
8815
|
+
"data-taco": "table-column"
|
8807
8816
|
}), React__default.createElement("span", null, cell.render('Header')), cell.isSorted ? React__default.createElement(Icon, {
|
8808
8817
|
name: cell.isSortedDesc ? 'chevron-down-solid' : 'chevron-up-solid'
|
8809
8818
|
}) : null);
|
@@ -9410,6 +9419,12 @@ var tailwindcssAriaAttributes = {
|
|
9410
9419
|
__proto__: null
|
9411
9420
|
};
|
9412
9421
|
|
9422
|
+
function getCjsExportFromNamespace (n) {
|
9423
|
+
return n && n['default'] || n;
|
9424
|
+
}
|
9425
|
+
|
9426
|
+
var require$$0 = getCjsExportFromNamespace(tailwindcssAriaAttributes);
|
9427
|
+
|
9413
9428
|
var tailwind_config = {
|
9414
9429
|
theme: {
|
9415
9430
|
colors: {
|
@@ -9485,7 +9500,7 @@ var tailwind_config = {
|
|
9485
9500
|
}
|
9486
9501
|
}
|
9487
9502
|
},
|
9488
|
-
plugins: [/*#__PURE__*/
|
9503
|
+
plugins: [/*#__PURE__*/require$$0, /*#__PURE__*/plugin(function (_ref) {
|
9489
9504
|
var addUtilities = _ref.addUtilities,
|
9490
9505
|
theme = _ref.theme;
|
9491
9506
|
// ideally we would do this using the @layer utilities directive, but
|