yuyeon 0.3.2-rc.9 → 0.3.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.
Files changed (80) hide show
  1. package/dist/style.css +1 -1
  2. package/dist/yuyeon.js +3375 -3186
  3. package/dist/yuyeon.umd.cjs +3 -3
  4. package/lib/components/table/YDataTable.js +20 -10
  5. package/lib/components/table/YDataTable.js.map +1 -1
  6. package/lib/components/table/YDataTableBody.js +14 -18
  7. package/lib/components/table/YDataTableBody.js.map +1 -1
  8. package/lib/components/table/YDataTableLayerRow.js +87 -0
  9. package/lib/components/table/YDataTableLayerRow.js.map +1 -0
  10. package/lib/components/table/YDataTableLayerRow.vue +7 -6
  11. package/lib/components/table/YDataTableLayerRows.js +60 -0
  12. package/lib/components/table/YDataTableLayerRows.js.map +1 -0
  13. package/lib/components/table/YDataTableLayerRows.scss +14 -0
  14. package/lib/components/table/YDataTableRow.js +13 -5
  15. package/lib/components/table/YDataTableRow.js.map +1 -1
  16. package/lib/components/table/YDataTableRows.scss +14 -0
  17. package/lib/components/table/YDataTableServer.js +13 -4
  18. package/lib/components/table/YDataTableServer.js.map +1 -1
  19. package/lib/components/table/composables/expand.js +49 -0
  20. package/lib/components/table/composables/expand.js.map +1 -0
  21. package/lib/components/table/composables/items.js +8 -2
  22. package/lib/components/table/composables/items.js.map +1 -1
  23. package/lib/components/table/index.js +2 -0
  24. package/lib/components/table/index.js.map +1 -1
  25. package/lib/components/table/types/item.js.map +1 -1
  26. package/package.json +5 -2
  27. package/types/abstract/items.d.ts +4 -4
  28. package/types/components/badge/YBadge.d.ts +4 -4
  29. package/types/components/button/YButton.d.ts +8 -8
  30. package/types/components/chip/YChip.d.ts +1 -1
  31. package/types/components/date-picker/YDateCalendar.d.ts +1 -1
  32. package/types/components/date-picker/YDatePicker.d.ts +1 -1
  33. package/types/components/date-picker/YDatePickerControl.d.ts +5 -5
  34. package/types/components/dialog/YDialog.d.ts +58 -58
  35. package/types/components/dropdown/YDropdown.d.ts +55 -55
  36. package/types/components/field-input/YFieldInput.d.ts +13 -13
  37. package/types/components/hover/YHover.d.ts +3 -3
  38. package/types/components/icon/YIcon.d.ts +2 -2
  39. package/types/components/img/YImg.d.ts +5 -5
  40. package/types/components/input/YInput.d.ts +9 -9
  41. package/types/components/ip-field/YIpv4Field.d.ts +1 -1
  42. package/types/components/layer/YLayer.d.ts +26 -26
  43. package/types/components/layer/content.d.ts +1 -1
  44. package/types/components/layer/scroll-strategies.d.ts +1 -1
  45. package/types/components/list/YListItem.d.ts +1 -1
  46. package/types/components/menu/YMenu.d.ts +9 -9
  47. package/types/components/pagination/YPagination.d.ts +5 -5
  48. package/types/components/select/YSelect.d.ts +62 -62
  49. package/types/components/snackbar/YSnackbar.d.ts +33 -33
  50. package/types/components/switch/YSwitch.d.ts +10 -10
  51. package/types/components/tab/YTab.d.ts +12 -12
  52. package/types/components/tab/YTabs.d.ts +4 -4
  53. package/types/components/table/YDataTable.d.ts +37 -15
  54. package/types/components/table/YDataTableBody.d.ts +3 -5
  55. package/types/components/table/YDataTableControl.d.ts +2 -2
  56. package/types/components/table/YDataTableHead.d.ts +2 -2
  57. package/types/components/table/YDataTableLayerRow.d.ts +22 -0
  58. package/types/components/table/YDataTableLayerRows.d.ts +9 -0
  59. package/types/components/table/YDataTableServer.d.ts +40 -18
  60. package/types/components/table/YTable.d.ts +4 -4
  61. package/types/components/table/composables/expand.d.ts +42 -0
  62. package/types/components/table/composables/header.d.ts +1 -1
  63. package/types/components/table/composables/items.d.ts +3 -3
  64. package/types/components/table/composables/pagination.d.ts +2 -2
  65. package/types/components/table/composables/selection.d.ts +3 -3
  66. package/types/components/table/composables/sorting.d.ts +1 -1
  67. package/types/components/table/index.d.ts +2 -0
  68. package/types/components/table/types/item.d.ts +1 -0
  69. package/types/components/textarea/YTextarea.d.ts +18 -18
  70. package/types/components/tooltip/YTooltip.d.ts +46 -46
  71. package/types/components/tree-view/YTreeView.d.ts +4 -4
  72. package/types/components/tree-view/YTreeViewNode.d.ts +8 -8
  73. package/types/composables/choice.d.ts +1 -1
  74. package/types/composables/coordinate/index.d.ts +8 -8
  75. package/types/composables/form.d.ts +2 -2
  76. package/types/composables/icon.d.ts +2 -2
  77. package/types/composables/list-items.d.ts +10 -10
  78. package/types/composables/transition.d.ts +1 -1
  79. package/types/composables/validation.d.ts +3 -3
  80. package/types/shims.d.ts +58 -56
@@ -0,0 +1,14 @@
1
+ .y-data-table-layer-rows {
2
+ position: absolute;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ clip-path: inset(0 -20px 0 -20px);
8
+ }
9
+
10
+ .y-data-table-layer-row {
11
+ pointer-events: none;
12
+ position: absolute;
13
+ left: 0;
14
+ }
@@ -1,5 +1,7 @@
1
- import { mergeProps as _mergeProps, createVNode as _createVNode, resolveDirective as _resolveDirective, Fragment as _Fragment } from "vue";
2
- import { computed, provide, ref, toRef } from 'vue';
1
+ import { mergeProps as _mergeProps, Fragment as _Fragment, createVNode as _createVNode, resolveDirective as _resolveDirective } from "vue";
2
+ import { computed, provide, ref, toRef, Fragment } from 'vue';
3
+ import { provideExpand } from "./composables/expand.js";
4
+ import { YDataTableInjectionKey } from "./composables/provides.js";
3
5
  import { useRender } from "../../composables/component.js";
4
6
  import { useResizeObserver } from "../../composables/resize-observer.js";
5
7
  import { chooseProps, defineComponent, propsFactory } from "../../util/component/index.js";
@@ -17,7 +19,6 @@ import { useOptions } from "./composables/options.js";
17
19
  import { createPagination, pressDataTablePaginationProps, providePagination } from "./composables/pagination.js";
18
20
  import { provideSelection } from "./composables/selection.js";
19
21
  import { createSorting, provideSorting } from "./composables/sorting.js";
20
- import { YDataTableInjectionKey } from "./composables/provides.js";
21
22
  export const pressDataTableServerProps = propsFactory({
22
23
  total: {
23
24
  type: [Number, String],
@@ -44,6 +45,7 @@ export const YDataTableServer = defineComponent({
44
45
  'update:pageSize': pageSize => true,
45
46
  'update:sortBy': sortBy => true,
46
47
  'update:options': options => true,
48
+ 'update:expanded': expanded => true,
47
49
  'click:row': (e, value) => true
48
50
  },
49
51
  setup(props, _ref) {
@@ -97,6 +99,10 @@ export const YDataTableServer = defineComponent({
97
99
  allItems: items,
98
100
  pageItems: items
99
101
  });
102
+ const {
103
+ isExpanded,
104
+ toggleExpand
105
+ } = provideExpand(props);
100
106
  const headRect = ref();
101
107
  const debounceMeasureHead = debounce(measureHead, 100);
102
108
  const {
@@ -121,6 +127,9 @@ export const YDataTableServer = defineComponent({
121
127
  // sorting
122
128
  sortBy: sortBy.value,
123
129
  toggleSort,
130
+ // expand
131
+ isExpanded,
132
+ toggleExpand,
124
133
  // selection
125
134
  someSelected: someSelected.value,
126
135
  allSelected: allSelected.value,
@@ -128,7 +137,7 @@ export const YDataTableServer = defineComponent({
128
137
  select,
129
138
  selectAll,
130
139
  toggleSelect,
131
- //
140
+ // matrix
132
141
  items: items.value,
133
142
  columns: columns.value,
134
143
  headers: headers.value,
@@ -1 +1 @@
1
- {"version":3,"file":"YDataTableServer.js","names":["computed","provide","ref","toRef","useRender","useResizeObserver","chooseProps","defineComponent","propsFactory","debounce","toStyleSizeValue","pressDataTableProps","YDataTableBody","YDataTableControl","YDataTableHead","YDataTableLayer","YTable","createHeader","useItems","useOptions","createPagination","pressDataTablePaginationProps","providePagination","provideSelection","createSorting","provideSorting","YDataTableInjectionKey","pressDataTableServerProps","total","type","Number","String","required","YDataTableServer","name","components","props","emits","value","page","pageSize","sortBy","options","click:row","e","setup","_ref","slots","emit","TableBodyRef","multiSort","parseInt","columns","headers","enableSelect","items","toggleSort","pageLength","setPageSize","setPage","isSelected","select","selectAll","toggleSelect","someSelected","allSelected","allItems","pageItems","headRect","debounceMeasureHead","measureHead","resizeObservedRef","headObserveRef","entries","search","slotProps","contentRect","yDataTableHeadProps","yDataTableBodyProps","yTableProps","_createVNode","_mergeProps","loading","length","hideNoData","height","top","leading","_Fragment","default","thead","tbody","tfoot","trailing","bottom","prepend"],"sources":["../../../src/components/table/YDataTableServer.tsx"],"sourcesContent":["import {\n type PropType,\n computed,\n provide,\n ref,\n toRef,\n} from 'vue';\n\nimport { useRender } from '@/composables/component';\nimport { useResizeObserver } from '@/composables/resize-observer';\nimport { chooseProps, defineComponent, propsFactory } from '@/util/component';\nimport { debounce } from '@/util/debounce';\nimport { toStyleSizeValue } from '@/util/ui';\n\nimport { pressDataTableProps } from './YDataTable';\nimport { YDataTableBody } from './YDataTableBody';\nimport { YDataTableControl } from './YDataTableControl';\nimport { YDataTableHead } from './YDataTableHead';\nimport { YDataTableLayer } from './YDataTableLayer';\nimport { YTable } from './YTable';\nimport { createHeader } from './composables/header';\nimport { useItems } from './composables/items';\nimport { useOptions } from './composables/options';\nimport {\n createPagination,\n pressDataTablePaginationProps,\n providePagination,\n} from './composables/pagination';\nimport { provideSelection } from './composables/selection';\nimport { createSorting, provideSorting } from './composables/sorting';\nimport { YDataTableSlotProps } from './types';\nimport { YDataTableInjectionKey } from '@/components/table/composables/provides';\n\nexport const pressDataTableServerProps = propsFactory(\n {\n total: {\n type: [Number, String] as PropType<number | string>,\n required: true,\n },\n ...pressDataTablePaginationProps(),\n ...pressDataTableProps(),\n },\n 'YDataTableServer',\n);\n\nexport const YDataTableServer = defineComponent({\n name: 'YDataTableServer',\n components: {\n YTable,\n YDataTableLayer,\n YDataTableHead,\n YDataTableBody,\n YDataTableControl,\n },\n props: {\n ...pressDataTableServerProps(),\n },\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:page': (page: number) => true,\n 'update:pageSize': (pageSize: number) => true,\n 'update:sortBy': (sortBy: any) => true,\n 'update:options': (options: any) => true,\n 'click:row': (e: Event, value: { row: any }) => true,\n },\n setup(props, { slots, emit }) {\n const TableBodyRef = ref();\n const { page, pageSize } = createPagination(props);\n const { sortBy, multiSort } = createSorting(props);\n const total = computed(() => parseInt(props.total as string));\n const { columns, headers } = createHeader(props, {\n enableSelect: toRef(props, 'enableSelect'),\n });\n const { items } = useItems(props, columns);\n\n const { toggleSort } = provideSorting({ sortBy, multiSort, page });\n const { pageLength, setPageSize, setPage } = providePagination({\n page,\n pageSize,\n total,\n });\n const {\n isSelected,\n select,\n selectAll,\n toggleSelect,\n someSelected,\n allSelected,\n } = provideSelection(props, { allItems: items, pageItems: items });\n\n const headRect = ref<DOMRectReadOnly>();\n const debounceMeasureHead = debounce(measureHead, 100);\n const { resizeObservedRef: headObserveRef } = useResizeObserver(\n (entries) => {\n debounceMeasureHead(entries);\n },\n );\n\n useOptions(\n {\n page,\n pageSize,\n search: toRef(props, 'search'),\n sortBy,\n },\n emit,\n );\n\n const slotProps = computed<YDataTableSlotProps>(() => {\n return {\n // pagination\n page: page.value,\n pageSize: pageSize.value,\n pageLength: pageLength.value,\n setPageSize,\n setPage,\n // sorting\n sortBy: sortBy.value,\n toggleSort,\n // selection\n someSelected: someSelected.value,\n allSelected: allSelected.value,\n isSelected,\n select,\n selectAll,\n toggleSelect,\n //\n items: items.value,\n columns: columns.value,\n headers: headers.value,\n //\n TableBodyRef,\n };\n });\n\n function measureHead(entries: ResizeObserverEntry[]) {\n headRect.value = entries?.[0].contentRect;\n }\n\n provide(YDataTableInjectionKey, {\n toggleSort,\n sortBy,\n headRect,\n });\n\n useRender(() => {\n const yDataTableHeadProps = chooseProps(props, YDataTableHead.props);\n const yDataTableBodyProps = chooseProps(props, YDataTableBody.props);\n const yTableProps = chooseProps(props, YTable.props);\n return (\n <YTable\n class={[\n 'y-data-table',\n {\n 'y-data-table--no-data':\n !props.loading && props.items.length < 1 && !props.hideNoData,\n },\n ]}\n {...yTableProps}\n style={{\n '--y-table-head-height': toStyleSizeValue(headRect.value?.height),\n }}\n >\n {{\n top: () => slots.top?.(slotProps.value),\n leading: () =>\n slots.leading ? (\n slots.leading(slotProps.value)\n ) : (\n <>\n <YDataTableLayer\n v-slots={slots}\n slotProps={slotProps.value}\n ></YDataTableLayer>\n </>\n ),\n default: () =>\n slots.default ? (\n slots.default(slotProps.value)\n ) : (\n <>\n <thead ref={headObserveRef}>\n <YDataTableHead\n v-slots={slots}\n {...yDataTableHeadProps}\n ></YDataTableHead>\n </thead>\n {slots.thead?.(slotProps.value)}\n <tbody>\n <YDataTableBody\n ref={TableBodyRef}\n v-slots={slots}\n {...yDataTableBodyProps}\n items={items.value}\n ></YDataTableBody>\n </tbody>\n {slots.tbody?.(slotProps.value)}\n {slots.tfoot?.(slotProps.value)}\n </>\n ),\n trailing: () => slots.trailing?.(slotProps.value),\n bottom: () =>\n slots.bottom ? (\n slots.bottom(slotProps.value)\n ) : (\n <YDataTableControl\n v-slots={{\n prepend: slots['control.prepend'],\n }}\n ></YDataTableControl>\n ),\n }}\n </YTable>\n );\n });\n },\n});\n\nexport type YDataTableServer = InstanceType<typeof YDataTableServer>;\n"],"mappings":";AAAA,SAEEA,QAAQ,EACRC,OAAO,EACPC,GAAG,EACHC,KAAK,QACA,KAAK;AAAC,SAEJC,SAAS;AAAA,SACTC,iBAAiB;AAAA,SACjBC,WAAW,EAAEC,eAAe,EAAEC,YAAY;AAAA,SAC1CC,QAAQ;AAAA,SACRC,gBAAgB;AAAA,SAEhBC,mBAAmB;AAAA,SACnBC,cAAc;AAAA,SACdC,iBAAiB;AAAA,SACjBC,cAAc;AAAA,SACdC,eAAe;AAAA,SACfC,MAAM;AAAA,SACNC,YAAY;AAAA,SACZC,QAAQ;AAAA,SACRC,UAAU;AAAA,SAEjBC,gBAAgB,EAChBC,6BAA6B,EAC7BC,iBAAiB;AAAA,SAEVC,gBAAgB;AAAA,SAChBC,aAAa,EAAEC,cAAc;AAAA,SAE7BC,sBAAsB;AAE/B,OAAO,MAAMC,yBAAyB,GAAGnB,YAAY,CACnD;EACEoB,KAAK,EAAE;IACLC,IAAI,EAAE,CAACC,MAAM,EAAEC,MAAM,CAA8B;IACnDC,QAAQ,EAAE;EACZ,CAAC;EACD,GAAGX,6BAA6B,CAAC,CAAC;EAClC,GAAGV,mBAAmB,CAAC;AACzB,CAAC,EACD,kBACF,CAAC;AAED,OAAO,MAAMsB,gBA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OAAO,GACX1C,KAAK,CAAC0C,OAAO,CAACd,SAAS,CAACrC,KAAK,CAAC,GAAA0C,YAAA,CAAAQ,SAAA,SAAAR,YAAA;UAAA,OAGhBR;QAAc,IAAAQ,YAAA,CAAAlE,cAAA,EAGlB+D,mBAAmB,EADd9B,KAAK,KAIjBA,KAAK,CAAC2C,KAAK,GAAGf,SAAS,CAACrC,KAAK,CAAC,EAAA0C,YAAA,iBAAAA,YAAA,CAAApE,cAAA,EAAAqE,WAAA;UAAA,OAGtBhC;QAAY,GAEb6B,mBAAmB;UAAA,SAChBvB,KAAK,CAACjB;QAAK,IAFTS,KAAK,KAKjBA,KAAK,CAAC4C,KAAK,GAAGhB,SAAS,CAACrC,KAAK,CAAC,EAC9BS,KAAK,CAAC6C,KAAK,GAAGjB,SAAS,CAACrC,KAAK,CAAC,EAElC;QACHuD,QAAQ,EAAEA,CAAA,KAAM9C,KAAK,CAAC8C,QAAQ,GAAGlB,SAAS,CAACrC,KAAK,CAAC;QACjDwD,MAAM,EAAEA,CAAA,KACN/C,KAAK,CAAC+C,MAAM,GACV/C,KAAK,CAAC+C,MAAM,CAACnB,SAAS,CAACrC,KAAK,CAAC,GAAA0C,YAAA,CAAAnE,iBAAA,QAGlB;UACPkF,OAAO,EAAEhD,KAAK,CAAC,iBAAiB;QAClC,CAAC;MAEJ;IAIX,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"YDataTableServer.js","names":["computed","provide","ref","toRef","Fragment","provideExpand","YDataTableInjectionKey","useRender","useResizeObserver","chooseProps","defineComponent","propsFactory","debounce","toStyleSizeValue","pressDataTableProps","YDataTableBody","YDataTableControl","YDataTableHead","YDataTableLayer","YTable","createHeader","useItems","useOptions","createPagination","pressDataTablePaginationProps","providePagination","provideSelection","createSorting","provideSorting","pressDataTableServerProps","total","type","Number","String","required","YDataTableServer","name","components","props","emits","value","page","pageSize","sortBy","options","expanded","click:row","e","setup","_ref","slots","emit","TableBodyRef","multiSort","parseInt","columns","headers","enableSelect","items","toggleSort","pageLength","setPageSize","setPage","isSelected","select","selectAll","toggleSelect","someSelected","allSelected","allItems","pageItems","isExpanded","toggleExpand","headRect","debounceMeasureHead","measureHead","resizeObservedRef","headObserveRef","entries","search","slotProps","contentRect","yDataTableHeadProps","yDataTableBodyProps","yTableProps","_createVNode","_mergeProps","loading","length","hideNoData","height","top","leading","_Fragment","default","thead","tbody","tfoot","trailing","bottom","prepend"],"sources":["../../../src/components/table/YDataTableServer.tsx"],"sourcesContent":["import { type PropType, computed, provide, ref, toRef, Fragment } from 'vue';\n\nimport { provideExpand } from '@/components/table/composables/expand';\nimport { YDataTableInjectionKey } from '@/components/table/composables/provides';\nimport { useRender } from '@/composables/component';\nimport { useResizeObserver } from '@/composables/resize-observer';\nimport { chooseProps, defineComponent, propsFactory } from '@/util/component';\nimport { debounce } from '@/util/debounce';\nimport { toStyleSizeValue } from '@/util/ui';\n\nimport { pressDataTableProps } from './YDataTable';\nimport { YDataTableBody } from './YDataTableBody';\nimport { YDataTableControl } from './YDataTableControl';\nimport { YDataTableHead } from './YDataTableHead';\nimport { YDataTableLayer } from './YDataTableLayer';\nimport { YTable } from './YTable';\nimport { createHeader } from './composables/header';\nimport { useItems } from './composables/items';\nimport { useOptions } from './composables/options';\nimport {\n createPagination,\n pressDataTablePaginationProps,\n providePagination,\n} from './composables/pagination';\nimport { provideSelection } from './composables/selection';\nimport { createSorting, provideSorting } from './composables/sorting';\nimport { YDataTableSlotProps } from './types';\n\nexport const pressDataTableServerProps = propsFactory(\n {\n total: {\n type: [Number, String] as PropType<number | string>,\n required: true,\n },\n ...pressDataTablePaginationProps(),\n ...pressDataTableProps(),\n },\n 'YDataTableServer',\n);\n\nexport const YDataTableServer = defineComponent({\n name: 'YDataTableServer',\n components: {\n YTable,\n YDataTableLayer,\n YDataTableHead,\n YDataTableBody,\n YDataTableControl,\n },\n props: {\n ...pressDataTableServerProps(),\n },\n emits: {\n 'update:modelValue': (value: any[]) => true,\n 'update:page': (page: number) => true,\n 'update:pageSize': (pageSize: number) => true,\n 'update:sortBy': (sortBy: any) => true,\n 'update:options': (options: any) => true,\n 'update:expanded': (expanded: any[]) => true,\n 'click:row': (e: Event, value: { row: any }) => true,\n },\n setup(props, { slots, emit }) {\n const TableBodyRef = ref();\n const { page, pageSize } = createPagination(props);\n const { sortBy, multiSort } = createSorting(props);\n const total = computed(() => parseInt(props.total as string));\n const { columns, headers } = createHeader(props, {\n enableSelect: toRef(props, 'enableSelect'),\n });\n const { items } = useItems(props, columns);\n\n const { toggleSort } = provideSorting({ sortBy, multiSort, page });\n const { pageLength, setPageSize, setPage } = providePagination({\n page,\n pageSize,\n total,\n });\n const {\n isSelected,\n select,\n selectAll,\n toggleSelect,\n someSelected,\n allSelected,\n } = provideSelection(props, { allItems: items, pageItems: items });\n const { isExpanded, toggleExpand } = provideExpand(props);\n\n const headRect = ref<DOMRectReadOnly>();\n const debounceMeasureHead = debounce(measureHead, 100);\n const { resizeObservedRef: headObserveRef } = useResizeObserver(\n (entries) => {\n debounceMeasureHead(entries);\n },\n );\n\n useOptions(\n {\n page,\n pageSize,\n search: toRef(props, 'search'),\n sortBy,\n },\n emit,\n );\n\n const slotProps = computed<YDataTableSlotProps>(() => {\n return {\n // pagination\n page: page.value,\n pageSize: pageSize.value,\n pageLength: pageLength.value,\n setPageSize,\n setPage,\n // sorting\n sortBy: sortBy.value,\n toggleSort,\n // expand\n isExpanded,\n toggleExpand,\n // selection\n someSelected: someSelected.value,\n allSelected: allSelected.value,\n isSelected,\n select,\n selectAll,\n toggleSelect,\n // matrix\n items: items.value,\n columns: columns.value,\n headers: headers.value,\n //\n TableBodyRef,\n };\n });\n\n function measureHead(entries: ResizeObserverEntry[]) {\n headRect.value = entries?.[0].contentRect;\n }\n\n provide(YDataTableInjectionKey, {\n toggleSort,\n sortBy,\n headRect,\n });\n\n useRender(() => {\n const yDataTableHeadProps = chooseProps(props, YDataTableHead.props);\n const yDataTableBodyProps = chooseProps(props, YDataTableBody.props);\n const yTableProps = chooseProps(props, YTable.props);\n return (\n <YTable\n class={[\n 'y-data-table',\n {\n 'y-data-table--no-data':\n !props.loading && props.items.length < 1 && !props.hideNoData,\n },\n ]}\n {...yTableProps}\n style={{\n '--y-table-head-height': toStyleSizeValue(headRect.value?.height),\n }}\n >\n {{\n top: () => slots.top?.(slotProps.value),\n leading: () =>\n slots.leading ? (\n slots.leading(slotProps.value)\n ) : (\n <Fragment>\n <YDataTableLayer\n v-slots={slots}\n slotProps={slotProps.value}\n ></YDataTableLayer>\n </Fragment>\n ),\n default: () =>\n slots.default ? (\n slots.default(slotProps.value)\n ) : (\n <Fragment>\n <thead ref={headObserveRef}>\n <YDataTableHead\n v-slots={slots}\n {...yDataTableHeadProps}\n ></YDataTableHead>\n </thead>\n {slots.thead?.(slotProps.value)}\n <tbody>\n <YDataTableBody\n ref={TableBodyRef}\n v-slots={slots}\n {...yDataTableBodyProps}\n items={items.value}\n ></YDataTableBody>\n </tbody>\n {slots.tbody?.(slotProps.value)}\n {slots.tfoot?.(slotProps.value)}\n </Fragment>\n ),\n trailing: () => slots.trailing?.(slotProps.value),\n bottom: () =>\n slots.bottom ? (\n slots.bottom(slotProps.value)\n ) : (\n <YDataTableControl\n v-slots={{\n prepend: slots['control.prepend'],\n }}\n ></YDataTableControl>\n ),\n }}\n </YTable>\n );\n });\n },\n});\n\nexport type YDataTableServer = InstanceType<typeof YDataTableServer>;\n"],"mappings":";AAAA,SAAwBA,QAAQ,EAAEC,OAAO,EAAEC,GAAG,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,KAAK;AAAC,SAEpEC,aAAa;AAAA,SACbC,sBAAsB;AAAA,SACtBC,SAAS;AAAA,SACTC,iBAAiB;AAAA,SACjBC,WAAW,EAAEC,eAAe,EAAEC,YAAY;AAAA,SAC1CC,QAAQ;AAAA,SACRC,gBAAgB;AAAA,SAEhBC,mBAAmB;AAAA,SACnBC,cAAc;AAAA,SACdC,iBAAiB;AAAA,SACjBC,cAAc;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QACjD2D,MAAM,EAAEA,CAAA,KACNjD,KAAK,CAACiD,MAAM,GACVjD,KAAK,CAACiD,MAAM,CAACnB,SAAS,CAACxC,KAAK,CAAC,GAAA6C,YAAA,CAAArE,iBAAA,QAGlB;UACPoF,OAAO,EAAElD,KAAK,CAAC,iBAAiB;QAClC,CAAC;MAEJ;IAIX,CAAC,CAAC;EACJ;AACF,CAAC,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { inject, provide } from 'vue';
2
+ import { useModelDuplex } from "../../../composables/communication.js";
3
+ import { propsFactory } from "../../../util/component/props.js";
4
+ export const pressDataTableExpandProps = propsFactory({
5
+ enableExpand: Boolean,
6
+ expanded: {
7
+ type: Array,
8
+ default: () => []
9
+ }
10
+ }, 'YDataTable--expand');
11
+ const Y_DATA_TABLE_EXPAND_KEY = Symbol.for('yuyeon.data-table.expand');
12
+ export function provideExpand(props) {
13
+ const expands = useModelDuplex(props, 'expanded', props.expanded ?? [], v => new Set(v), v => [...v]);
14
+ function isExpanded(item) {
15
+ return expands.value.has(item.value);
16
+ }
17
+ function expand(item, value) {
18
+ const neo = new Set(expands.value);
19
+ if (value) {
20
+ neo.add(item.value);
21
+ } else {
22
+ neo.delete(item.value);
23
+ }
24
+ expands.value = neo;
25
+ }
26
+ function toggleExpand(item) {
27
+ expand(item, !isExpanded(item));
28
+ }
29
+ provide(Y_DATA_TABLE_EXPAND_KEY, {
30
+ expands,
31
+ isExpanded,
32
+ expand,
33
+ toggleExpand
34
+ });
35
+ return {
36
+ expands,
37
+ isExpanded,
38
+ expand,
39
+ toggleExpand
40
+ };
41
+ }
42
+ export function useExpand() {
43
+ const instance = inject(Y_DATA_TABLE_EXPAND_KEY);
44
+ if (!instance) {
45
+ throw new Error(`Not provided: ${Y_DATA_TABLE_EXPAND_KEY.description}`);
46
+ }
47
+ return instance;
48
+ }
49
+ //# sourceMappingURL=expand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"expand.js","names":["inject","provide","useModelDuplex","propsFactory","pressDataTableExpandProps","enableExpand","Boolean","expanded","type","Array","default","Y_DATA_TABLE_EXPAND_KEY","Symbol","for","provideExpand","props","expands","v","Set","isExpanded","item","value","has","expand","neo","add","delete","toggleExpand","useExpand","instance","Error","description"],"sources":["../../../../src/components/table/composables/expand.ts"],"sourcesContent":["import {\n type InjectionKey,\n type PropType,\n type Ref,\n inject,\n provide,\n} from 'vue';\n\nimport { useModelDuplex } from '@/composables/communication';\nimport { propsFactory } from '@/util/component/props';\n\nimport type { DataTableItem } from '../types/item';\n\nexport const pressDataTableExpandProps = propsFactory(\n {\n enableExpand: Boolean,\n expanded: {\n type: Array as PropType<readonly string[]>,\n default: () => [],\n },\n },\n 'YDataTable--expand',\n);\n\ntype DataTableExpandProps = {\n enableExpand: boolean;\n expanded: readonly string[];\n 'onUpdate:expanded': ((value: any[]) => void) | undefined;\n};\n\nconst Y_DATA_TABLE_EXPAND_KEY: InjectionKey<{\n expands: Ref<Set<string>>;\n isExpanded: (item: DataTableItem) => boolean;\n expand: (item: DataTableItem, value: boolean) => void;\n toggleExpand: (item: DataTableItem) => void;\n}> = Symbol.for('yuyeon.data-table.expand');\n\nexport function provideExpand(props: DataTableExpandProps) {\n const expands = useModelDuplex(\n props,\n 'expanded',\n props.expanded ?? [],\n (v) => new Set(v),\n (v) => [...v],\n );\n\n function isExpanded(item: DataTableItem) {\n return expands.value.has(item.value);\n }\n\n function expand(item: DataTableItem, value: boolean) {\n const neo = new Set(expands.value);\n if (value) {\n neo.add(item.value);\n } else {\n neo.delete(item.value);\n }\n\n expands.value = neo;\n }\n\n function toggleExpand(item: DataTableItem) {\n expand(item, !isExpanded(item));\n }\n\n provide(Y_DATA_TABLE_EXPAND_KEY, {\n expands,\n isExpanded,\n expand,\n toggleExpand,\n });\n\n return {\n expands,\n isExpanded,\n expand,\n toggleExpand,\n };\n}\n\nexport function useExpand() {\n const instance = inject(Y_DATA_TABLE_EXPAND_KEY);\n if (!instance) {\n throw new Error(`Not provided: ${Y_DATA_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,UAAU;IACVI,MAAM;IACNI;EACF,CAAC,CAAC;EAEF,OAAO;IACLX,OAAO;IACPG,UAAU;IACVI,MAAM;IACNI;EACF,CAAC;AACH;AAEA,OAAO,SAASC,SAASA,CAAA,EAAG;EAC1B,MAAMC,QAAQ,GAAG7B,MAAM,CAACW,uBAAuB,CAAC;EAChD,IAAI,CAACkB,QAAQ,EAAE;IACb,MAAM,IAAIC,KAAK,CAAE,iBAAgBnB,uBAAuB,CAACoB,WAAY,EAAC,CAAC;EACzE;EACA,OAAOF,QAAQ;AACjB"}
@@ -1,4 +1,4 @@
1
- import { computed } from 'vue';
1
+ import { computed, ref } from 'vue';
2
2
  import { getPropertyFromItem } from "../../../util/common.js";
3
3
  import { propsFactory } from "../../../util/component/index.js";
4
4
  export const pressDataTableItemsProps = propsFactory({
@@ -17,6 +17,7 @@ export const pressDataTableItemsProps = propsFactory({
17
17
  returnItem: Boolean
18
18
  }, 'YDataTable--items');
19
19
  export function updateItem(props, item, index, columns) {
20
+ const rowRef = ref(null);
20
21
  const key = getPropertyFromItem(item, props.itemKey);
21
22
  const value = props.returnItem ? item : key;
22
23
  let selectable;
@@ -29,13 +30,18 @@ export function updateItem(props, item, index, columns) {
29
30
  acc[column.key] = getPropertyFromItem(item, column.value ?? column.key);
30
31
  return acc;
31
32
  }, {});
33
+ function _bindRowRef(el) {
34
+ rowRef.value = el;
35
+ }
32
36
  return {
33
37
  index,
34
38
  key,
35
39
  value,
36
40
  selectable,
37
41
  columns: itemColumns,
38
- raw: item
42
+ raw: item,
43
+ rowRef,
44
+ _bindRowRef
39
45
  };
40
46
  }
41
47
  export function updateItems(props, items, columns) {
@@ -1 +1 @@
1
- {"version":3,"file":"items.js","names":["computed","getPropertyFromItem","propsFactory","pressDataTableItemsProps","items","type","Array","default","itemKey","String","Function","itemSelectable","returnItem","Boolean","updateItem","props","item","index","columns","key","value","selectable","itemColumns","reduce","acc","column","raw","updateItems","map","useItems"],"sources":["../../../../src/components/table/composables/items.ts"],"sourcesContent":["import { type PropType, type Ref, computed } from 'vue';\r\n\r\nimport { getPropertyFromItem } from '@/util/common';\r\nimport { propsFactory } from '@/util/component';\r\n\r\nimport { DataTableItem, InternalDataTableHeader } from '../types';\r\n\r\nexport type DataTableItemsProps = {\r\n items: any[];\r\n itemKey: any;\r\n itemSelectable: any;\r\n returnItem: boolean;\r\n};\r\n\r\nexport const pressDataTableItemsProps = propsFactory(\r\n {\r\n items: {\r\n type: Array as PropType<DataTableItemsProps['items']>,\r\n default: () => [],\r\n },\r\n itemKey: {\r\n type: [String, Array, Function] as PropType<any>,\r\n default: 'id',\r\n },\r\n itemSelectable: {\r\n type: [String, Array, Function] as PropType<any>,\r\n default: null,\r\n },\r\n returnItem: Boolean,\r\n },\r\n 'YDataTable--items',\r\n);\r\n\r\nexport function updateItem(\r\n props: Omit<DataTableItemsProps, 'items'>,\r\n item: any,\r\n index: number,\r\n columns: InternalDataTableHeader[],\r\n): DataTableItem {\r\n const key = getPropertyFromItem(item, props.itemKey);\r\n const value = props.returnItem ? item : key;\r\n let selectable;\r\n if (typeof props.itemSelectable === 'function') {\r\n selectable = !!props.itemSelectable(item);\r\n } else {\r\n selectable = getPropertyFromItem(item, props.itemSelectable, true);\r\n }\r\n\r\n const itemColumns = columns.reduce(\r\n (acc, column) => {\r\n acc[column.key] = getPropertyFromItem(item, column.value ?? column.key);\r\n return acc;\r\n },\r\n {} as Record<string, unknown>,\r\n );\r\n\r\n return {\r\n index,\r\n key,\r\n value,\r\n selectable,\r\n columns: itemColumns,\r\n raw: item,\r\n };\r\n}\r\n\r\nexport function updateItems(\r\n props: Omit<DataTableItemsProps, 'items'>,\r\n items: DataTableItemsProps['items'],\r\n columns: InternalDataTableHeader[],\r\n): DataTableItem[] {\r\n return items.map((item, index) => updateItem(props, item, index, columns));\r\n}\r\n\r\nexport function useItems(\r\n props: DataTableItemsProps,\r\n columns: Ref<InternalDataTableHeader[]>,\r\n) {\r\n const items = computed(() => {\r\n return updateItems(props, props.items, columns.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,GAAG;EACZ,CAAC,EACD,CAAC,CACH,CAAC;EAED,OAAO;IACLP,KAAK;IACLE,GAAG;IACHC,KAAK;IACLC,UAAU;IACVH,OAAO,EAAEI,WAAW;IACpBI,GAAG,EAAEV;EACP,CAAC;AACH;AAEA,OAAO,SAASW,WAAWA,CACzBZ,KAAyC,EACzCX,KAAmC,EACnCc,OAAkC,EACjB;EACjB,OAAOd,KAAK,CAACwB,GAAG,CAAC,CAACZ,IAAI,EAAEC,KAAK,KAAKH,UAAU,CAACC,KAAK,EAAEC,IAAI,EAAEC,KAAK,EAAEC,OAAO,CAAC,CAAC;AAC5E;AAEA,OAAO,SAASW,QAAQA,CACtBd,KAA0B,EAC1BG,OAAuC,EACvC;EACA,MAAMd,KAAK,GAAGJ,QAAQ,CAAC,MAAM;IAC3B,OAAO2B,WAAW,CAACZ,KAAK,EAAEA,KAAK,CAACX,KAAK,EAAEc,OAAO,CAACE,KAAK,CAAC;EACvD,CAAC,CAAC;EACF,OAAO;IAAEhB;EAAM,CAAC;AAClB"}
1
+ {"version":3,"file":"items.js","names":["computed","ref","getPropertyFromItem","propsFactory","pressDataTableItemsProps","items","type","Array","default","itemKey","String","Function","itemSelectable","returnItem","Boolean","updateItem","props","item","index","columns","rowRef","key","value","selectable","itemColumns","reduce","acc","column","_bindRowRef","el","raw","updateItems","map","useItems"],"sources":["../../../../src/components/table/composables/items.ts"],"sourcesContent":["import { type PropType, type Ref, computed, ref } from 'vue';\r\n\r\nimport { getPropertyFromItem } from '@/util/common';\r\nimport { propsFactory } from '@/util/component';\r\n\r\nimport { DataTableItem, InternalDataTableHeader } from '../types';\r\n\r\nexport type DataTableItemsProps = {\r\n items: any[];\r\n itemKey: any;\r\n itemSelectable: any;\r\n returnItem: boolean;\r\n};\r\n\r\nexport const pressDataTableItemsProps = propsFactory(\r\n {\r\n items: {\r\n type: Array as PropType<DataTableItemsProps['items']>,\r\n default: () => [],\r\n },\r\n itemKey: {\r\n type: [String, Array, Function] as PropType<any>,\r\n default: 'id',\r\n },\r\n itemSelectable: {\r\n type: [String, Array, Function] as PropType<any>,\r\n default: null,\r\n },\r\n returnItem: Boolean,\r\n },\r\n 'YDataTable--items',\r\n);\r\n\r\nexport function updateItem(\r\n props: Omit<DataTableItemsProps, 'items'>,\r\n item: any,\r\n index: number,\r\n columns: InternalDataTableHeader[],\r\n): DataTableItem {\r\n const rowRef = ref<any | null>(null);\r\n const key = getPropertyFromItem(item, props.itemKey);\r\n const value = props.returnItem ? item : key;\r\n let selectable;\r\n if (typeof props.itemSelectable === 'function') {\r\n selectable = !!props.itemSelectable(item);\r\n } else {\r\n selectable = getPropertyFromItem(item, props.itemSelectable, true);\r\n }\r\n\r\n const itemColumns = columns.reduce(\r\n (acc, column) => {\r\n acc[column.key] = getPropertyFromItem(item, column.value ?? column.key);\r\n return acc;\r\n },\r\n {} as Record<string, unknown>,\r\n );\r\n\r\n function _bindRowRef(el: any | null) {\r\n rowRef.value = el;\r\n }\r\n\r\n return {\r\n index,\r\n key,\r\n value,\r\n selectable,\r\n columns: itemColumns,\r\n raw: item,\r\n rowRef,\r\n _bindRowRef,\r\n };\r\n}\r\n\r\nexport function updateItems(\r\n props: Omit<DataTableItemsProps, 'items'>,\r\n items: DataTableItemsProps['items'],\r\n columns: InternalDataTableHeader[],\r\n): DataTableItem[] {\r\n return items.map((item, index) => updateItem(props, item, index, columns));\r\n}\r\n\r\nexport function useItems(\r\n props: DataTableItemsProps,\r\n columns: Ref<InternalDataTableHeader[]>,\r\n) {\r\n const items = computed(() => {\r\n return updateItems(props, props.items, columns.value);\r\n });\r\n return { items };\r\n}\r\n"],"mappings":"AAAA,SAAkCA,QAAQ,EAAEC,GAAG,QAAQ,KAAK;AAAC,SAEpDC,mBAAmB;AAAA,SACnBC,YAAY;AAWrB,OAAO,MAAMC,wBAAwB,GAAGD,YAAY,CAClD;EACEE,KAAK,EAAE;IACLC,IAAI,EAAEC,KAA+C;IACrDC,OAAO,EAAEA,CAAA,KAAM;EACjB,CAAC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AEK,WAAW;IACpBM,GAAG,EAAEb,IAAI;IACTG,MAAM;IACNQ;EACF,CAAC;AACH;AAEA,OAAO,SAASG,WAAWA,CACzBf,KAAyC,EACzCX,KAAmC,EACnCc,OAAkC,EACjB;EACjB,OAAOd,KAAK,CAAC2B,GAAG,CAAC,CAACf,IAAI,EAAEC,KAAK,KAAKH,UAAU,CAACC,KAAK,EAAEC,IAAI,EAAEC,KAAK,EAAEC,OAAO,CAAC,CAAC;AAC5E;AAEA,OAAO,SAASc,QAAQA,CACtBjB,KAA0B,EAC1BG,OAAuC,EACvC;EACA,MAAMd,KAAK,GAAGL,QAAQ,CAAC,MAAM;IAC3B,OAAO+B,WAAW,CAACf,KAAK,EAAEA,KAAK,CAACX,KAAK,EAAEc,OAAO,CAACG,KAAK,CAAC;EACvD,CAAC,CAAC;EACF,OAAO;IAAEjB;EAAM,CAAC;AAClB"}
@@ -6,4 +6,6 @@ export * from "./YDataTableRow.js";
6
6
  export * from "./YDataTableCell.js";
7
7
  export * from "./YDataTableControl.js";
8
8
  export * from "./YDataTableLayer.js";
9
+ export * from "./YDataTableLayerRows.js";
10
+ export * from "./YDataTableLayerRow.js";
9
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/table/index.ts"],"sourcesContent":["export * from './YTable';\nexport * from './YDataTable';\nexport * from './YDataTableServer';\n\nexport * from './YDataTableBody';\nexport * from './YDataTableRow';\nexport * from './YDataTableCell';\nexport * from './YDataTableControl';\nexport * from './YDataTableLayer';\n"],"mappings":""}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/table/index.ts"],"sourcesContent":["export * from './YTable';\nexport * from './YDataTable';\nexport * from './YDataTableServer';\n\nexport * from './YDataTableBody';\nexport * from './YDataTableRow';\nexport * from './YDataTableCell';\nexport * from './YDataTableControl';\nexport * from './YDataTableLayer';\nexport * from './YDataTableLayerRows';\nexport * from './YDataTableLayerRow';\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"item.js","names":[],"sources":["../../../../src/components/table/types/item.ts"],"sourcesContent":["import { SelectableItem, provideSelection } from '@/components/table/composables/selection';\nimport { InternalDataTableHeader } from './header';\n\ntype ItemSlotBase<T> = {\n index: number;\n item: T;\n internalItem: DataTableItem<T>;\n selected: boolean;\n isSelected: ReturnType<typeof provideSelection>['isSelected'];\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect'];\n};\n\nexport type ItemKeySlot<T> = ItemSlotBase<T> & {\n value: any;\n column: InternalDataTableHeader;\n};\n\nexport interface DataTableItem<T = any> extends SelectableItem {\n index: number;\n columns: Record<string, any>;\n raw: T;\n rowRef?: any\n}\n"],"mappings":""}
1
+ {"version":3,"file":"item.js","names":[],"sources":["../../../../src/components/table/types/item.ts"],"sourcesContent":["import { SelectableItem, provideSelection } from '@/components/table/composables/selection';\nimport { InternalDataTableHeader } from './header';\n\ntype ItemSlotBase<T> = {\n index: number;\n item: T;\n internalItem: DataTableItem<T>;\n selected: boolean;\n isSelected: ReturnType<typeof provideSelection>['isSelected'];\n toggleSelect: ReturnType<typeof provideSelection>['toggleSelect'];\n};\n\nexport type ItemKeySlot<T> = ItemSlotBase<T> & {\n value: any;\n column: InternalDataTableHeader;\n};\n\nexport interface DataTableItem<T = any> extends SelectableItem {\n index: number;\n columns: Record<string, any>;\n raw: T;\n rowRef?: any\n readonly _bindRowRef: (el: any | null) => void;\n}\n"],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuyeon",
3
- "version": "0.3.2-rc.9",
3
+ "version": "0.3.3",
4
4
  "keywords": [
5
5
  "UI Library",
6
6
  "Vue"
@@ -35,7 +35,10 @@
35
35
  "types": "./types/components/index.d.ts",
36
36
  "module": "./lib/components/index.js"
37
37
  },
38
- "./components/*": "./lib/components/*/index.js",
38
+ "./components/*": {
39
+ "module": "./lib/components/*/*.js",
40
+ "types": "./types/components/*/*.d.ts"
41
+ },
39
42
  "./composables": {
40
43
  "types": "./types/composables/index.d.ts",
41
44
  "module": "./lib/composables/index.js",
@@ -12,7 +12,7 @@ export declare const pressItemsPropsOptions: <Defaults extends {
12
12
  } : Omit<{
13
13
  type: PropType<any[]>;
14
14
  default: () => never[];
15
- }, "default" | "type"> & {
15
+ }, "type" | "default"> & {
16
16
  type: PropType<unknown extends Defaults["items"] ? any[] : any[] | Defaults["items"]>;
17
17
  default: unknown extends Defaults["items"] ? any[] : any[] | Defaults["items"];
18
18
  };
@@ -22,7 +22,7 @@ export declare const pressItemsPropsOptions: <Defaults extends {
22
22
  } : Omit<{
23
23
  type: PropType<string>;
24
24
  default: string;
25
- }, "default" | "type"> & {
25
+ }, "type" | "default"> & {
26
26
  type: PropType<unknown extends Defaults["itemKey"] ? string : string | Defaults["itemKey"]>;
27
27
  default: unknown extends Defaults["itemKey"] ? string : string | Defaults["itemKey"];
28
28
  };
@@ -32,7 +32,7 @@ export declare const pressItemsPropsOptions: <Defaults extends {
32
32
  } : Omit<{
33
33
  type: PropType<string>;
34
34
  default: string;
35
- }, "default" | "type"> & {
35
+ }, "type" | "default"> & {
36
36
  type: PropType<unknown extends Defaults["itemText"] ? string : string | Defaults["itemText"]>;
37
37
  default: unknown extends Defaults["itemText"] ? string : string | Defaults["itemText"];
38
38
  };
@@ -42,7 +42,7 @@ export declare const pressItemsPropsOptions: <Defaults extends {
42
42
  } : Omit<{
43
43
  type: PropType<string | boolean>;
44
44
  default: string;
45
- }, "default" | "type"> & {
45
+ }, "type" | "default"> & {
46
46
  type: PropType<unknown extends Defaults["itemChildren"] ? string | boolean : NonNullable<string | boolean> | Defaults["itemChildren"]>;
47
47
  default: unknown extends Defaults["itemChildren"] ? string | boolean : NonNullable<string | boolean> | Defaults["itemChildren"];
48
48
  };
@@ -31,7 +31,7 @@ export declare const pressYBadgePropsOptions: <Defaults extends {
31
31
  } : Omit<{
32
32
  type: NumberConstructor;
33
33
  default: number;
34
- }, "default" | "type"> & {
34
+ }, "type" | "default"> & {
35
35
  type: PropType<unknown extends Defaults["backgroundOpacity"] ? number : number | Defaults["backgroundOpacity"]>;
36
36
  default: unknown extends Defaults["backgroundOpacity"] ? number : number | Defaults["backgroundOpacity"];
37
37
  };
@@ -41,7 +41,7 @@ export declare const pressYBadgePropsOptions: <Defaults extends {
41
41
  } : Omit<{
42
42
  type: PropType<string>;
43
43
  default: string;
44
- }, "default" | "type"> & {
44
+ }, "type" | "default"> & {
45
45
  type: PropType<unknown extends Defaults["tag"] ? string : string | Defaults["tag"]>;
46
46
  default: unknown extends Defaults["tag"] ? string : string | Defaults["tag"];
47
47
  };
@@ -75,7 +75,7 @@ export declare const pressYBadgePropsOptions: <Defaults extends {
75
75
  } : Omit<{
76
76
  type: StringConstructor;
77
77
  default: string;
78
- }, "default" | "type"> & {
78
+ }, "type" | "default"> & {
79
79
  type: PropType<unknown extends Defaults["label"] ? string : string | Defaults["label"]>;
80
80
  default: unknown extends Defaults["label"] ? string : string | Defaults["label"];
81
81
  };
@@ -93,7 +93,7 @@ export declare const pressYBadgePropsOptions: <Defaults extends {
93
93
  } : Omit<{
94
94
  type: StringConstructor;
95
95
  default: string;
96
- }, "default" | "type"> & {
96
+ }, "type" | "default"> & {
97
97
  type: PropType<unknown extends Defaults["transition"] ? string : string | Defaults["transition"]>;
98
98
  default: unknown extends Defaults["transition"] ? string : string | Defaults["transition"];
99
99
  };
@@ -58,7 +58,7 @@ export declare const pressYButtonProps: <Defaults extends {
58
58
  } : Omit<{
59
59
  type: BooleanConstructor;
60
60
  default: undefined;
61
- }, "default" | "type"> & {
61
+ }, "type" | "default"> & {
62
62
  type: PropType<unknown extends Defaults["active"] ? boolean : boolean | Defaults["active"]>;
63
63
  default: unknown extends Defaults["active"] ? boolean : boolean | Defaults["active"];
64
64
  };
@@ -68,7 +68,7 @@ export declare const pressYButtonProps: <Defaults extends {
68
68
  } : Omit<{
69
69
  type: null;
70
70
  default: import('vue').InjectionKey<import('../../composables/choice').ChoiceProvide>;
71
- }, "default" | "type"> & {
71
+ }, "type" | "default"> & {
72
72
  type: PropType<unknown extends Defaults["injectSymbol"] ? any : any>;
73
73
  default: unknown extends Defaults["injectSymbol"] ? any : any;
74
74
  };
@@ -76,7 +76,7 @@ export declare const pressYButtonProps: <Defaults extends {
76
76
  type: PropType<string>;
77
77
  } : Omit<{
78
78
  type: PropType<string>;
79
- }, "default" | "type"> & {
79
+ }, "type" | "default"> & {
80
80
  type: PropType<unknown extends Defaults["variation"] ? string : string | Defaults["variation"]>;
81
81
  default: unknown extends Defaults["variation"] ? string : string | Defaults["variation"];
82
82
  };
@@ -94,7 +94,7 @@ export declare const pressYButtonProps: <Defaults extends {
94
94
  } : Omit<{
95
95
  type: BooleanConstructor;
96
96
  default: boolean;
97
- }, "default" | "type"> & {
97
+ }, "type" | "default"> & {
98
98
  type: PropType<unknown extends Defaults["outlined"] ? boolean : boolean | Defaults["outlined"]>;
99
99
  default: unknown extends Defaults["outlined"] ? boolean : boolean | Defaults["outlined"];
100
100
  };
@@ -104,7 +104,7 @@ export declare const pressYButtonProps: <Defaults extends {
104
104
  } : Omit<{
105
105
  type: BooleanConstructor;
106
106
  default: boolean;
107
- }, "default" | "type"> & {
107
+ }, "type" | "default"> & {
108
108
  type: PropType<unknown extends Defaults["rounded"] ? boolean : boolean | Defaults["rounded"]>;
109
109
  default: unknown extends Defaults["rounded"] ? boolean : boolean | Defaults["rounded"];
110
110
  };
@@ -114,7 +114,7 @@ export declare const pressYButtonProps: <Defaults extends {
114
114
  } : Omit<{
115
115
  type: BooleanConstructor;
116
116
  default: boolean;
117
- }, "default" | "type"> & {
117
+ }, "type" | "default"> & {
118
118
  type: PropType<unknown extends Defaults["filled"] ? boolean : boolean | Defaults["filled"]>;
119
119
  default: unknown extends Defaults["filled"] ? boolean : boolean | Defaults["filled"];
120
120
  };
@@ -122,7 +122,7 @@ export declare const pressYButtonProps: <Defaults extends {
122
122
  type: StringConstructor;
123
123
  } : Omit<{
124
124
  type: StringConstructor;
125
- }, "default" | "type"> & {
125
+ }, "type" | "default"> & {
126
126
  type: PropType<unknown extends Defaults["color"] ? string : string | Defaults["color"]>;
127
127
  default: unknown extends Defaults["color"] ? string : string | Defaults["color"];
128
128
  };
@@ -132,7 +132,7 @@ export declare const pressYButtonProps: <Defaults extends {
132
132
  } : Omit<{
133
133
  type: BooleanConstructor;
134
134
  default: boolean;
135
- }, "default" | "type"> & {
135
+ }, "type" | "default"> & {
136
136
  type: PropType<unknown extends Defaults["noWave"] ? boolean : boolean | Defaults["noWave"]>;
137
137
  default: unknown extends Defaults["noWave"] ? boolean : boolean | Defaults["noWave"];
138
138
  };
@@ -23,7 +23,7 @@ export declare const pressYChipPropsOptions: <Defaults extends {
23
23
  } : Omit<{
24
24
  type: NumberConstructor;
25
25
  default: number;
26
- }, "default" | "type"> & {
26
+ }, "type" | "default"> & {
27
27
  type: import('vue').PropType<unknown extends Defaults["backgroundOpacity"] ? number : number | Defaults["backgroundOpacity"]>;
28
28
  default: unknown extends Defaults["backgroundOpacity"] ? number : number | Defaults["backgroundOpacity"];
29
29
  };
@@ -65,7 +65,7 @@ export declare const pressYDateCalendarPropsOptions: <Defaults extends {
65
65
  } : Omit<{
66
66
  type: BooleanConstructor;
67
67
  default: boolean;
68
- }, "default" | "type"> & {
68
+ }, "type" | "default"> & {
69
69
  type: PropType<unknown extends Defaults["showAdjacentMonthDates"] ? boolean : boolean | Defaults["showAdjacentMonthDates"]>;
70
70
  default: unknown extends Defaults["showAdjacentMonthDates"] ? boolean : boolean | Defaults["showAdjacentMonthDates"];
71
71
  };
@@ -64,7 +64,7 @@ export declare const pressYDatePickerPropsOptions: <Defaults extends {
64
64
  } : Omit<{
65
65
  type: BooleanConstructor;
66
66
  default: boolean;
67
- }, "default" | "type"> & {
67
+ }, "type" | "default"> & {
68
68
  type: import('vue').PropType<unknown extends Defaults["showAdjacentMonthDates"] ? boolean : boolean | Defaults["showAdjacentMonthDates"]>;
69
69
  default: unknown extends Defaults["showAdjacentMonthDates"] ? boolean : boolean | Defaults["showAdjacentMonthDates"];
70
70
  };
@@ -15,7 +15,7 @@ export declare const pressYDatePickerControlPropsOptions: <Defaults extends {
15
15
  } : Omit<{
16
16
  type: PropType<string | boolean | string[]>;
17
17
  default: boolean;
18
- }, "default" | "type"> & {
18
+ }, "type" | "default"> & {
19
19
  type: PropType<unknown extends Defaults["disabled"] ? string | boolean | string[] : Defaults["disabled"] | NonNullable<string | boolean | string[]>>;
20
20
  default: unknown extends Defaults["disabled"] ? string | boolean | string[] : Defaults["disabled"] | NonNullable<string | boolean | string[]>;
21
21
  };
@@ -25,7 +25,7 @@ export declare const pressYDatePickerControlPropsOptions: <Defaults extends {
25
25
  } : Omit<{
26
26
  type: (ObjectConstructor | StringConstructor)[];
27
27
  default: string;
28
- }, "default" | "type"> & {
28
+ }, "type" | "default"> & {
29
29
  type: PropType<unknown extends Defaults["nextIcon"] ? string | Record<string, any> : Defaults["nextIcon"] | NonNullable<string | Record<string, any>>>;
30
30
  default: unknown extends Defaults["nextIcon"] ? string | Record<string, any> : Defaults["nextIcon"] | NonNullable<string | Record<string, any>>;
31
31
  };
@@ -35,7 +35,7 @@ export declare const pressYDatePickerControlPropsOptions: <Defaults extends {
35
35
  } : Omit<{
36
36
  type: (ObjectConstructor | StringConstructor)[];
37
37
  default: string;
38
- }, "default" | "type"> & {
38
+ }, "type" | "default"> & {
39
39
  type: PropType<unknown extends Defaults["prevIcon"] ? string | Record<string, any> : NonNullable<string | Record<string, any>> | Defaults["prevIcon"]>;
40
40
  default: unknown extends Defaults["prevIcon"] ? string | Record<string, any> : NonNullable<string | Record<string, any>> | Defaults["prevIcon"];
41
41
  };
@@ -43,7 +43,7 @@ export declare const pressYDatePickerControlPropsOptions: <Defaults extends {
43
43
  type: (ObjectConstructor | StringConstructor)[];
44
44
  } : Omit<{
45
45
  type: (ObjectConstructor | StringConstructor)[];
46
- }, "default" | "type"> & {
46
+ }, "type" | "default"> & {
47
47
  type: PropType<unknown extends Defaults["dropdownIcon"] ? string | Record<string, any> : NonNullable<string | Record<string, any>> | Defaults["dropdownIcon"]>;
48
48
  default: unknown extends Defaults["dropdownIcon"] ? string | Record<string, any> : NonNullable<string | Record<string, any>> | Defaults["dropdownIcon"];
49
49
  };
@@ -53,7 +53,7 @@ export declare const pressYDatePickerControlPropsOptions: <Defaults extends {
53
53
  } : Omit<{
54
54
  type: PropType<"date" | "month" | "year">;
55
55
  default: string;
56
- }, "default" | "type"> & {
56
+ }, "type" | "default"> & {
57
57
  type: PropType<unknown extends Defaults["mode"] ? "date" | "month" | "year" : Defaults["mode"] | NonNullable<"date" | "month" | "year">>;
58
58
  default: unknown extends Defaults["mode"] ? "date" | "month" | "year" : Defaults["mode"] | NonNullable<"date" | "month" | "year">;
59
59
  };