@youcan/celeste 0.6.56 → 0.6.59

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 (141) hide show
  1. package/dist/celeste.css +301 -70
  2. package/dist/cjs/chunks/index.js +245 -1
  3. package/dist/cjs/chunks/pagination-first.js +32 -0
  4. package/dist/cjs/chunks/pagination-item.js +32 -0
  5. package/dist/cjs/chunks/pagination-last.js +32 -0
  6. package/dist/cjs/chunks/pagination-next.js +32 -0
  7. package/dist/cjs/chunks/pagination-previous.js +32 -0
  8. package/dist/cjs/chunks/use-color-model.js +3 -0
  9. package/dist/cjs/index.js +24 -0
  10. package/dist/cjs/pagination-content.js +30 -0
  11. package/dist/cjs/pagination-ellipsis.js +34 -0
  12. package/dist/cjs/pagination-first.js +3 -0
  13. package/dist/cjs/pagination-item.js +3 -0
  14. package/dist/cjs/pagination-last.js +3 -0
  15. package/dist/cjs/pagination-next.js +3 -0
  16. package/dist/cjs/pagination-previous.js +3 -0
  17. package/dist/cjs/pagination.js +59 -0
  18. package/dist/cjs/table-body.js +23 -0
  19. package/dist/cjs/table-caption.js +23 -0
  20. package/dist/cjs/table-cell.js +25 -0
  21. package/dist/cjs/table-empty.js +43 -0
  22. package/dist/cjs/table-footer.js +23 -0
  23. package/dist/cjs/table-head.js +24 -0
  24. package/dist/cjs/table-header.js +20 -0
  25. package/dist/cjs/table-row.js +31 -0
  26. package/dist/cjs/table.js +26 -0
  27. package/dist/components/index.d.ts +1 -0
  28. package/dist/components/pagination/index.d.ts +16 -0
  29. package/dist/components/pagination/pagination-content.d.ts +21 -0
  30. package/dist/components/pagination/pagination-ellipsis.d.ts +14 -0
  31. package/dist/components/pagination/pagination-first.d.ts +14 -0
  32. package/dist/components/pagination/pagination-item.d.ts +16 -0
  33. package/dist/components/pagination/pagination-last.d.ts +14 -0
  34. package/dist/components/pagination/pagination-next.d.ts +14 -0
  35. package/dist/components/pagination/pagination-previous.d.ts +14 -0
  36. package/dist/components/pagination/pagination.d.ts +32 -0
  37. package/dist/components/table/index.d.ts +18 -0
  38. package/dist/components/table/table-body.d.ts +13 -0
  39. package/dist/components/table/table-caption.d.ts +13 -0
  40. package/dist/components/table/table-cell.d.ts +16 -0
  41. package/dist/components/table/table-empty.d.ts +16 -0
  42. package/dist/components/table/table-footer.d.ts +13 -0
  43. package/dist/components/table/table-head.d.ts +16 -0
  44. package/dist/components/table/table-header.d.ts +13 -0
  45. package/dist/components/table/table-row.d.ts +16 -0
  46. package/dist/components/table/table.d.ts +13 -0
  47. package/dist/es/chunks/index.js +309 -65
  48. package/dist/es/chunks/index3.js +1 -1
  49. package/dist/es/chunks/modal-close.js +1 -1
  50. package/dist/es/chunks/pagination-first.js +33 -0
  51. package/dist/es/chunks/pagination-item.js +33 -0
  52. package/dist/es/chunks/pagination-last.js +33 -0
  53. package/dist/es/chunks/pagination-next.js +33 -0
  54. package/dist/es/chunks/pagination-previous.js +33 -0
  55. package/dist/es/chunks/select-group.js +1 -1
  56. package/dist/es/chunks/use-color-model.js +3 -0
  57. package/dist/es/combobox-group.js +1 -1
  58. package/dist/es/combobox-input.js +1 -1
  59. package/dist/es/combobox-item.js +1 -1
  60. package/dist/es/combobox-list.js +1 -1
  61. package/dist/es/combobox-root.js +1 -1
  62. package/dist/es/combobox-separator.js +1 -1
  63. package/dist/es/combobox-trigger.js +1 -1
  64. package/dist/es/command-group.js +1 -1
  65. package/dist/es/command-input.js +1 -1
  66. package/dist/es/command-item.js +1 -1
  67. package/dist/es/command-list.js +1 -1
  68. package/dist/es/command-root.js +1 -1
  69. package/dist/es/command-separator.js +1 -1
  70. package/dist/es/digit-input-slot.js +1 -1
  71. package/dist/es/digit-input.js +1 -1
  72. package/dist/es/dropdown-menu-content.js +1 -1
  73. package/dist/es/dropdown-menu-group.js +1 -1
  74. package/dist/es/dropdown-menu-item.js +1 -1
  75. package/dist/es/dropdown-menu-label.js +1 -1
  76. package/dist/es/dropdown-menu-separator.js +1 -1
  77. package/dist/es/dropdown-menu-sub-content.js +1 -1
  78. package/dist/es/dropdown-menu-sub-trigger.js +1 -1
  79. package/dist/es/dropdown-menu-trigger.js +1 -1
  80. package/dist/es/dropdown-menu.js +1 -1
  81. package/dist/es/index.js +51 -27
  82. package/dist/es/modal-content.js +1 -1
  83. package/dist/es/modal-header.js +1 -1
  84. package/dist/es/pagination-content.js +31 -0
  85. package/dist/es/pagination-ellipsis.js +35 -0
  86. package/dist/es/pagination-first.js +4 -0
  87. package/dist/es/pagination-item.js +4 -0
  88. package/dist/es/pagination-last.js +4 -0
  89. package/dist/es/pagination-next.js +4 -0
  90. package/dist/es/pagination-previous.js +4 -0
  91. package/dist/es/pagination.js +60 -0
  92. package/dist/es/popover-content.js +1 -1
  93. package/dist/es/popover-trigger.js +1 -1
  94. package/dist/es/progress-bar.js +1 -1
  95. package/dist/es/progress-circle.js +1 -1
  96. package/dist/es/scroll-bar.js +1 -1
  97. package/dist/es/segmented-control-item.js +1 -1
  98. package/dist/es/segmented-control.js +1 -1
  99. package/dist/es/select-content.js +1 -1
  100. package/dist/es/select-item.js +1 -1
  101. package/dist/es/select-trigger.js +1 -1
  102. package/dist/es/select-value.js +1 -1
  103. package/dist/es/tab-menu-content.js +1 -1
  104. package/dist/es/tab-menu-item.js +1 -1
  105. package/dist/es/tab-menu-list.js +1 -1
  106. package/dist/es/tab-menu.js +1 -1
  107. package/dist/es/table-body.js +24 -0
  108. package/dist/es/table-caption.js +24 -0
  109. package/dist/es/table-cell.js +26 -0
  110. package/dist/es/table-empty.js +44 -0
  111. package/dist/es/table-footer.js +24 -0
  112. package/dist/es/table-head.js +25 -0
  113. package/dist/es/table-header.js +21 -0
  114. package/dist/es/table-row.js +32 -0
  115. package/dist/es/table.js +27 -0
  116. package/dist/es/tooltip.js +1 -1
  117. package/package.json +4 -3
  118. package/src/components/color-picker/composable/use-color-model.ts +4 -0
  119. package/src/components/index.ts +1 -0
  120. package/src/components/pagination/index.ts +23 -0
  121. package/src/components/pagination/pagination-content.vue +36 -0
  122. package/src/components/pagination/pagination-ellipsis.vue +47 -0
  123. package/src/components/pagination/pagination-first.vue +29 -0
  124. package/src/components/pagination/pagination-item.vue +28 -0
  125. package/src/components/pagination/pagination-last.vue +29 -0
  126. package/src/components/pagination/pagination-next.vue +29 -0
  127. package/src/components/pagination/pagination-previous.vue +33 -0
  128. package/src/components/pagination/pagination.vue +157 -0
  129. package/src/components/pagination/stories/pagination.stories.ts +154 -0
  130. package/src/components/switch/switch.vue +34 -16
  131. package/src/components/table/index.ts +26 -0
  132. package/src/components/table/stories/table.stories.ts +138 -0
  133. package/src/components/table/table-body.vue +24 -0
  134. package/src/components/table/table-caption.vue +26 -0
  135. package/src/components/table/table-cell.vue +49 -0
  136. package/src/components/table/table-empty.vue +43 -0
  137. package/src/components/table/table-footer.vue +24 -0
  138. package/src/components/table/table-head.vue +47 -0
  139. package/src/components/table/table-header.vue +18 -0
  140. package/src/components/table/table-row.vue +52 -0
  141. package/src/components/table/table.vue +36 -0
@@ -6781,8 +6781,244 @@ const Kc = ["value", "name", "disabled", "required"], [Eo, Hc] = Q("NumberFieldR
6781
6781
  _: 3
6782
6782
  }, 16, ["type", "style", "disabled", "data-disabled", "data-pressed"]));
6783
6783
  }
6784
+ }), [ta, Wc] = Q("PaginationRoot"), by = /* @__PURE__ */ Mo.defineComponent({
6785
+ __name: "PaginationRoot",
6786
+ props: {
6787
+ page: {},
6788
+ defaultPage: { default: 1 },
6789
+ itemsPerPage: { default: 10 },
6790
+ total: { default: 0 },
6791
+ siblingCount: { default: 2 },
6792
+ disabled: { type: Boolean },
6793
+ showEdges: { type: Boolean, default: false },
6794
+ asChild: { type: Boolean },
6795
+ as: { default: "nav" }
6796
+ },
6797
+ emits: ["update:page"],
6798
+ setup(a2, { emit: t }) {
6799
+ const e = a2, n = t, { siblingCount: l, disabled: s, showEdges: r } = Mo.toRefs(e);
6800
+ R();
6801
+ const i = ne(e, "page", n, {
6802
+ defaultValue: e.defaultPage,
6803
+ passive: e.page === void 0
6804
+ }), u = Mo.computed(() => Math.max(1, Math.ceil(e.total / e.itemsPerPage)));
6805
+ return Wc({
6806
+ page: i,
6807
+ onPageChange(d) {
6808
+ i.value = d;
6809
+ },
6810
+ pageCount: u,
6811
+ siblingCount: l,
6812
+ disabled: s,
6813
+ showEdges: r
6814
+ }), (d, c) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), {
6815
+ as: d.as,
6816
+ "as-child": d.asChild
6817
+ }, {
6818
+ default: Mo.withCtx(() => [
6819
+ Mo.renderSlot(d.$slots, "default", {
6820
+ page: Mo.unref(i),
6821
+ pageCount: u.value
6822
+ })
6823
+ ]),
6824
+ _: 3
6825
+ }, 8, ["as", "as-child"]));
6826
+ }
6827
+ }), Cy = /* @__PURE__ */ Mo.defineComponent({
6828
+ __name: "PaginationEllipsis",
6829
+ props: {
6830
+ asChild: { type: Boolean },
6831
+ as: {}
6832
+ },
6833
+ setup(a2) {
6834
+ const t = a2;
6835
+ return R(), (e, n) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, { "data-type": "ellipsis" }), {
6836
+ default: Mo.withCtx(() => [
6837
+ Mo.renderSlot(e.$slots, "default", {}, () => [
6838
+ Mo.createTextVNode("…")
6839
+ ])
6840
+ ]),
6841
+ _: 3
6842
+ }, 16));
6843
+ }
6844
+ }), wy = /* @__PURE__ */ Mo.defineComponent({
6845
+ __name: "PaginationFirst",
6846
+ props: {
6847
+ asChild: { type: Boolean },
6848
+ as: { default: "button" }
6849
+ },
6850
+ setup(a2) {
6851
+ const t = a2, e = ta();
6852
+ R();
6853
+ const n = Mo.computed(() => e.page.value === 1 || e.disabled.value);
6854
+ return (l, s) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
6855
+ "aria-label": "First Page",
6856
+ type: l.as === "button" ? "button" : void 0,
6857
+ disabled: n.value,
6858
+ onClick: s[0] || (s[0] = (r) => !n.value && Mo.unref(e).onPageChange(1))
6859
+ }), {
6860
+ default: Mo.withCtx(() => [
6861
+ Mo.renderSlot(l.$slots, "default", {}, () => [
6862
+ Mo.createTextVNode("First page")
6863
+ ])
6864
+ ]),
6865
+ _: 3
6866
+ }, 16, ["type", "disabled"]));
6867
+ }
6868
+ }), _y = /* @__PURE__ */ Mo.defineComponent({
6869
+ __name: "PaginationLast",
6870
+ props: {
6871
+ asChild: { type: Boolean },
6872
+ as: { default: "button" }
6873
+ },
6874
+ setup(a2) {
6875
+ const t = a2, e = ta();
6876
+ R();
6877
+ const n = Mo.computed(() => e.page.value === e.pageCount.value || e.disabled.value);
6878
+ return (l, s) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
6879
+ "aria-label": "Last Page",
6880
+ type: l.as === "button" ? "button" : void 0,
6881
+ disabled: n.value,
6882
+ onClick: s[0] || (s[0] = (r) => !n.value && Mo.unref(e).onPageChange(Mo.unref(e).pageCount.value))
6883
+ }), {
6884
+ default: Mo.withCtx(() => [
6885
+ Mo.renderSlot(l.$slots, "default", {}, () => [
6886
+ Mo.createTextVNode("Last page")
6887
+ ])
6888
+ ]),
6889
+ _: 3
6890
+ }, 16, ["type", "disabled"]));
6891
+ }
6784
6892
  });
6785
- const Gc = ["id", "value", "name", "disabled", "required"], [qc, Yc] = Q("PinInputRoot"), Dy = /* @__PURE__ */ Mo.defineComponent({
6893
+ function it(a2, t) {
6894
+ const e = t - a2 + 1;
6895
+ return Array.from({ length: e }, (n, l) => l + a2);
6896
+ }
6897
+ function jc(a2) {
6898
+ return a2.map((t) => typeof t == "number" ? { type: "page", value: t } : { type: "ellipsis" });
6899
+ }
6900
+ const Ba = "ellipsis";
6901
+ function Uc(a2, t, e, n) {
6902
+ const s = t, r = Math.max(a2 - e, 1), i = Math.min(a2 + e, s);
6903
+ if (n) {
6904
+ const d = Math.min(2 * e + 5, t) - 2, c = r > 3 && Math.abs(s - d - 1 + 1) > 2 && Math.abs(r - 1) > 2, f = i < s - 2 && Math.abs(s - d) > 2 && Math.abs(s - i) > 2;
6905
+ if (!c && f)
6906
+ return [...it(1, d), Ba, s];
6907
+ if (c && !f) {
6908
+ const p = it(s - d + 1, s);
6909
+ return [1, Ba, ...p];
6910
+ }
6911
+ if (c && f) {
6912
+ const p = it(r, i);
6913
+ return [1, Ba, ...p, Ba, s];
6914
+ }
6915
+ return it(1, s);
6916
+ } else {
6917
+ const u = e * 2 + 1;
6918
+ return t < u ? it(1, s) : a2 <= e + 1 ? it(1, u) : t - a2 <= e ? it(t - u + 1, s) : it(r, i);
6919
+ }
6920
+ }
6921
+ const xy = /* @__PURE__ */ Mo.defineComponent({
6922
+ __name: "PaginationList",
6923
+ props: {
6924
+ asChild: { type: Boolean },
6925
+ as: {}
6926
+ },
6927
+ setup(a2) {
6928
+ const t = a2;
6929
+ R();
6930
+ const e = ta(), n = Mo.computed(() => jc(
6931
+ Uc(
6932
+ e.page.value,
6933
+ e.pageCount.value,
6934
+ e.siblingCount.value,
6935
+ e.showEdges.value
6936
+ )
6937
+ ));
6938
+ return (l, s) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.normalizeProps(Mo.guardReactiveProps(t)), {
6939
+ default: Mo.withCtx(() => [
6940
+ Mo.renderSlot(l.$slots, "default", { items: n.value })
6941
+ ]),
6942
+ _: 3
6943
+ }, 16));
6944
+ }
6945
+ }), Sy = /* @__PURE__ */ Mo.defineComponent({
6946
+ __name: "PaginationListItem",
6947
+ props: {
6948
+ value: {},
6949
+ asChild: { type: Boolean },
6950
+ as: { default: "button" }
6951
+ },
6952
+ setup(a2) {
6953
+ const t = a2;
6954
+ R();
6955
+ const e = ta(), n = Mo.computed(() => e.page.value === t.value), l = Mo.computed(() => e.disabled.value);
6956
+ return (s, r) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
6957
+ "data-type": "page",
6958
+ "aria-label": `Page ${s.value}`,
6959
+ "aria-current": n.value ? "page" : void 0,
6960
+ "data-selected": n.value ? "true" : void 0,
6961
+ disabled: l.value,
6962
+ type: s.as === "button" ? "button" : void 0,
6963
+ onClick: r[0] || (r[0] = (i) => !l.value && Mo.unref(e).onPageChange(s.value))
6964
+ }), {
6965
+ default: Mo.withCtx(() => [
6966
+ Mo.renderSlot(s.$slots, "default", {}, () => [
6967
+ Mo.createTextVNode(Mo.toDisplayString(s.value), 1)
6968
+ ])
6969
+ ]),
6970
+ _: 3
6971
+ }, 16, ["aria-label", "aria-current", "data-selected", "disabled", "type"]));
6972
+ }
6973
+ }), Ey = /* @__PURE__ */ Mo.defineComponent({
6974
+ __name: "PaginationNext",
6975
+ props: {
6976
+ asChild: { type: Boolean },
6977
+ as: { default: "button" }
6978
+ },
6979
+ setup(a2) {
6980
+ const t = a2;
6981
+ R();
6982
+ const e = ta(), n = Mo.computed(() => e.page.value === e.pageCount.value || e.disabled.value);
6983
+ return (l, s) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
6984
+ "aria-label": "Next Page",
6985
+ type: l.as === "button" ? "button" : void 0,
6986
+ disabled: n.value,
6987
+ onClick: s[0] || (s[0] = (r) => !n.value && Mo.unref(e).onPageChange(Mo.unref(e).page.value + 1))
6988
+ }), {
6989
+ default: Mo.withCtx(() => [
6990
+ Mo.renderSlot(l.$slots, "default", {}, () => [
6991
+ Mo.createTextVNode("Next page")
6992
+ ])
6993
+ ]),
6994
+ _: 3
6995
+ }, 16, ["type", "disabled"]));
6996
+ }
6997
+ }), Py = /* @__PURE__ */ Mo.defineComponent({
6998
+ __name: "PaginationPrev",
6999
+ props: {
7000
+ asChild: { type: Boolean },
7001
+ as: { default: "button" }
7002
+ },
7003
+ setup(a2) {
7004
+ const t = a2;
7005
+ R();
7006
+ const e = ta(), n = Mo.computed(() => e.page.value === 1 || e.disabled.value);
7007
+ return (l, s) => (Mo.openBlock(), Mo.createBlock(Mo.unref(O), Mo.mergeProps(t, {
7008
+ "aria-label": "Previous Page",
7009
+ type: l.as === "button" ? "button" : void 0,
7010
+ disabled: n.value,
7011
+ onClick: s[0] || (s[0] = (r) => !n.value && Mo.unref(e).onPageChange(Mo.unref(e).page.value - 1))
7012
+ }), {
7013
+ default: Mo.withCtx(() => [
7014
+ Mo.renderSlot(l.$slots, "default", {}, () => [
7015
+ Mo.createTextVNode("Prev page")
7016
+ ])
7017
+ ]),
7018
+ _: 3
7019
+ }, 16, ["type", "disabled"]));
7020
+ }
7021
+ }), Gc = ["id", "value", "name", "disabled", "required"], [qc, Yc] = Q("PinInputRoot"), Dy = /* @__PURE__ */ Mo.defineComponent({
6786
7022
  inheritAttrs: false,
6787
7023
  __name: "PinInputRoot",
6788
7024
  props: {
@@ -10396,10 +10632,12 @@ exports.Ay = Ay;
10396
10632
  exports.By = By;
10397
10633
  exports.Cg = Cg;
10398
10634
  exports.Ch = Ch;
10635
+ exports.Cy = Cy;
10399
10636
  exports.Du = Du;
10400
10637
  exports.Dv = Dv;
10401
10638
  exports.Dy = Dy;
10402
10639
  exports.Eu = Eu;
10640
+ exports.Ey = Ey;
10403
10641
  exports.Fy = Fy;
10404
10642
  exports.Gl = Gl;
10405
10643
  exports.Gy = Gy;
@@ -10418,10 +10656,12 @@ exports.O = O;
10418
10656
  exports.Oh = Oh;
10419
10657
  exports.Oy = Oy;
10420
10658
  exports.Pu = Pu;
10659
+ exports.Py = Py;
10421
10660
  exports.Qf = Qf;
10422
10661
  exports.Qv = Qv;
10423
10662
  exports.Qy = Qy;
10424
10663
  exports.Ry = Ry;
10664
+ exports.Sy = Sy;
10425
10665
  exports.Ty = Ty;
10426
10666
  exports.Uv = Uv;
10427
10667
  exports.Uy = Uy;
@@ -10435,12 +10675,14 @@ exports.Yv = Yv;
10435
10675
  exports.Yy = Yy;
10436
10676
  exports.Zv = Zv;
10437
10677
  exports._s = _s;
10678
+ exports._y = _y;
10438
10679
  exports.ag = ag;
10439
10680
  exports.arrow = arrow$1;
10440
10681
  exports.autoPlacement = autoPlacement;
10441
10682
  exports.bg = bg;
10442
10683
  exports.bh = bh;
10443
10684
  exports.bs = bs;
10685
+ exports.by = by;
10444
10686
  exports.ch = ch;
10445
10687
  exports.computePosition = computePosition;
10446
10688
  exports.eg = eg;
@@ -10481,9 +10723,11 @@ exports.tu = tu;
10481
10723
  exports.uh = uh;
10482
10724
  exports.wh = wh;
10483
10725
  exports.ws = ws;
10726
+ exports.wy = wy;
10484
10727
  exports.xe = xe;
10485
10728
  exports.xs = xs;
10486
10729
  exports.xu = xu;
10730
+ exports.xy = xy;
10487
10731
  exports.yg = yg;
10488
10732
  exports.ys = ys;
10489
10733
  exports.yy = yy;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ const Mo = require("vue");
3
+ const clsx = require("./clsx.js");
4
+ const index$1 = require("./index.js");
5
+ const index = require("./index2.js");
6
+ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
7
+ __name: "pagination-first",
8
+ props: {
9
+ class: {},
10
+ asChild: { type: Boolean },
11
+ as: {}
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const delegated = index.reactiveOmit(props, "class");
16
+ const forwarded = index$1.At(delegated);
17
+ return (_ctx, _cache) => {
18
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index$1.wy), Mo.mergeProps({
19
+ class: Mo.unref(clsx.clsx)("celeste-pagination-element", "celeste-pagination-first", props.class),
20
+ "data-slot": "pagination-first"
21
+ }, Mo.unref(forwarded)), {
22
+ default: Mo.withCtx(() => [
23
+ Mo.renderSlot(_ctx.$slots, "default", {}, () => [
24
+ _cache[0] || (_cache[0] = Mo.createElementVNode("i", { class: "i-celeste-arrow-left-double-line" }, null, -1))
25
+ ])
26
+ ]),
27
+ _: 3
28
+ }, 16, ["class"]);
29
+ };
30
+ }
31
+ });
32
+ exports._sfc_main = _sfc_main;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ const Mo = require("vue");
3
+ const clsx = require("./clsx.js");
4
+ const index$1 = require("./index.js");
5
+ const index = require("./index2.js");
6
+ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
7
+ __name: "pagination-item",
8
+ props: {
9
+ class: {},
10
+ isActive: { type: Boolean },
11
+ disabled: { type: Boolean },
12
+ value: {},
13
+ asChild: { type: Boolean },
14
+ as: {}
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ const delegated = index.reactiveOmit(props, "class", "isActive", "disabled");
19
+ return (_ctx, _cache) => {
20
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index$1.Sy), Mo.mergeProps(Mo.unref(delegated), {
21
+ "data-slot": "pagination-item",
22
+ class: Mo.unref(clsx.clsx)("celeste-pagination-element", "celeste-pagination-item", props.class, { "celeste-pagination-item-active": props.isActive }, props.disabled && "celeste-pagination-item-disabled")
23
+ }), {
24
+ default: Mo.withCtx(() => [
25
+ Mo.renderSlot(_ctx.$slots, "default")
26
+ ]),
27
+ _: 3
28
+ }, 16, ["class"]);
29
+ };
30
+ }
31
+ });
32
+ exports._sfc_main = _sfc_main;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ const Mo = require("vue");
3
+ const clsx = require("./clsx.js");
4
+ const index$1 = require("./index.js");
5
+ const index = require("./index2.js");
6
+ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
7
+ __name: "pagination-last",
8
+ props: {
9
+ class: {},
10
+ asChild: { type: Boolean },
11
+ as: {}
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const delegated = index.reactiveOmit(props, "class");
16
+ const forwarded = index$1.At(delegated);
17
+ return (_ctx, _cache) => {
18
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index$1._y), Mo.mergeProps({
19
+ class: Mo.unref(clsx.clsx)("celeste-pagination-element", "celeste-pagination-last", props.class),
20
+ "data-slot": "pagination-last"
21
+ }, Mo.unref(forwarded)), {
22
+ default: Mo.withCtx(() => [
23
+ Mo.renderSlot(_ctx.$slots, "default", {}, () => [
24
+ _cache[0] || (_cache[0] = Mo.createElementVNode("i", { class: "i-celeste-arrow-right-double-line" }, null, -1))
25
+ ])
26
+ ]),
27
+ _: 3
28
+ }, 16, ["class"]);
29
+ };
30
+ }
31
+ });
32
+ exports._sfc_main = _sfc_main;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ const Mo = require("vue");
3
+ const clsx = require("./clsx.js");
4
+ const index$1 = require("./index.js");
5
+ const index = require("./index2.js");
6
+ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
7
+ __name: "pagination-next",
8
+ props: {
9
+ class: {},
10
+ asChild: { type: Boolean },
11
+ as: {}
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const delegated = index.reactiveOmit(props, "class");
16
+ const forwarded = index$1.At(delegated);
17
+ return (_ctx, _cache) => {
18
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index$1.Ey), Mo.mergeProps({
19
+ class: Mo.unref(clsx.clsx)("celeste-pagination-element", "celeste-pagination-next", props.class),
20
+ "data-slot": "pagination-next"
21
+ }, Mo.unref(forwarded)), {
22
+ default: Mo.withCtx(() => [
23
+ Mo.renderSlot(_ctx.$slots, "default", {}, () => [
24
+ _cache[0] || (_cache[0] = Mo.createElementVNode("i", { class: "i-celeste-arrow-right-s-line" }, null, -1))
25
+ ])
26
+ ]),
27
+ _: 3
28
+ }, 16, ["class"]);
29
+ };
30
+ }
31
+ });
32
+ exports._sfc_main = _sfc_main;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ const Mo = require("vue");
3
+ const clsx = require("./clsx.js");
4
+ const index$1 = require("./index.js");
5
+ const index = require("./index2.js");
6
+ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
7
+ __name: "pagination-previous",
8
+ props: {
9
+ class: {},
10
+ asChild: { type: Boolean },
11
+ as: {}
12
+ },
13
+ setup(__props) {
14
+ const props = __props;
15
+ const delegated = index.reactiveOmit(props, "class");
16
+ const forwarded = index$1.At(delegated);
17
+ return (_ctx, _cache) => {
18
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index$1.Py), Mo.mergeProps({
19
+ class: Mo.unref(clsx.clsx)("celeste-pagination-element", "celeste-pagination-previous", props.class),
20
+ "data-slot": "pagination-previous"
21
+ }, Mo.unref(forwarded)), {
22
+ default: Mo.withCtx(() => [
23
+ Mo.renderSlot(_ctx.$slots, "default", {}, () => [
24
+ _cache[0] || (_cache[0] = Mo.createElementVNode("i", { class: "i-celeste-arrow-left-s-line" }, null, -1))
25
+ ])
26
+ ]),
27
+ _: 3
28
+ }, 16, ["class"]);
29
+ };
30
+ }
31
+ });
32
+ exports._sfc_main = _sfc_main;
@@ -985,6 +985,9 @@ function defineColorModel(props, emit) {
985
985
  return tinyColorRef;
986
986
  }
987
987
  function transformToOriginalInputFormat(color, originalFormat) {
988
+ if (originalFormat === "hex" && color.getAlpha() < 1) {
989
+ return color.toString("hex8");
990
+ }
988
991
  return color.toString(originalFormat);
989
992
  }
990
993
  exports.ColorPickerEmits = ColorPickerEmits;
package/dist/cjs/index.js CHANGED
@@ -51,6 +51,14 @@ const modalFooter = require("./modal-footer.js");
51
51
  const modalHeader = require("./modal-header.js");
52
52
  const modalTrigger_vue_vue_type_script_setup_true_lang = require("./chunks/modal-trigger.js");
53
53
  const modal_vue_vue_type_script_setup_true_lang = require("./chunks/modal.js");
54
+ const paginationContent = require("./pagination-content.js");
55
+ const paginationEllipsis = require("./pagination-ellipsis.js");
56
+ const paginationFirst_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-first.js");
57
+ const paginationItem_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-item.js");
58
+ const paginationLast_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-last.js");
59
+ const paginationNext_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-next.js");
60
+ const paginationPrevious_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-previous.js");
61
+ const pagination = require("./pagination.js");
54
62
  const popoverContent = require("./popover-content.js");
55
63
  const popoverTrigger = require("./popover-trigger.js");
56
64
  const popover_vue_vue_type_script_setup_true_lang = require("./chunks/popover.js");
@@ -141,6 +149,14 @@ const components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePr
141
149
  ModalFooter: modalFooter,
142
150
  ModalHeader: modalHeader,
143
151
  ModalTrigger: modalTrigger_vue_vue_type_script_setup_true_lang._sfc_main,
152
+ Pagination: pagination,
153
+ PaginationContent: paginationContent,
154
+ PaginationEllipsis: paginationEllipsis,
155
+ PaginationFirst: paginationFirst_vue_vue_type_script_setup_true_lang._sfc_main,
156
+ PaginationItem: paginationItem_vue_vue_type_script_setup_true_lang._sfc_main,
157
+ PaginationLast: paginationLast_vue_vue_type_script_setup_true_lang._sfc_main,
158
+ PaginationNext: paginationNext_vue_vue_type_script_setup_true_lang._sfc_main,
159
+ PaginationPrevious: paginationPrevious_vue_vue_type_script_setup_true_lang._sfc_main,
144
160
  Popover: popover_vue_vue_type_script_setup_true_lang._sfc_main,
145
161
  PopoverContent: popoverContent,
146
162
  PopoverTrigger: popoverTrigger,
@@ -287,6 +303,14 @@ exports.ModalFooter = modalFooter;
287
303
  exports.ModalHeader = modalHeader;
288
304
  exports.ModalTrigger = modalTrigger_vue_vue_type_script_setup_true_lang._sfc_main;
289
305
  exports.Modal = modal_vue_vue_type_script_setup_true_lang._sfc_main;
306
+ exports.PaginationContent = paginationContent;
307
+ exports.PaginationEllipsis = paginationEllipsis;
308
+ exports.PaginationFirst = paginationFirst_vue_vue_type_script_setup_true_lang._sfc_main;
309
+ exports.PaginationItem = paginationItem_vue_vue_type_script_setup_true_lang._sfc_main;
310
+ exports.PaginationLast = paginationLast_vue_vue_type_script_setup_true_lang._sfc_main;
311
+ exports.PaginationNext = paginationNext_vue_vue_type_script_setup_true_lang._sfc_main;
312
+ exports.PaginationPrevious = paginationPrevious_vue_vue_type_script_setup_true_lang._sfc_main;
313
+ exports.Pagination = pagination;
290
314
  exports.PopoverContent = popoverContent;
291
315
  exports.PopoverTrigger = popoverTrigger;
292
316
  exports.Popover = popover_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ const Mo = require("vue");
3
+ const clsx = require("./chunks/clsx.js");
4
+ const index$1 = require("./chunks/index.js");
5
+ const index = require("./chunks/index2.js");
6
+ const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
7
+ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
8
+ __name: "pagination-content",
9
+ props: {
10
+ class: {},
11
+ asChild: { type: Boolean },
12
+ as: {}
13
+ },
14
+ setup(__props) {
15
+ const props = __props;
16
+ const delegated = index.reactiveOmit(props, "class");
17
+ return (_ctx, _cache) => {
18
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index$1.xy), Mo.mergeProps({ "data-slot": "pagination-content" }, Mo.unref(delegated), {
19
+ class: Mo.unref(clsx.clsx)("celeste-pagination-content", props.class)
20
+ }), {
21
+ default: Mo.withCtx((sprops) => [
22
+ Mo.renderSlot(_ctx.$slots, "default", Mo.normalizeProps(Mo.guardReactiveProps(sprops)), void 0, true)
23
+ ]),
24
+ _: 3
25
+ }, 16, ["class"]);
26
+ };
27
+ }
28
+ });
29
+ const paginationContent = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-9a600a5d"]]);
30
+ module.exports = paginationContent;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ const Mo = require("vue");
3
+ const clsx = require("./chunks/clsx.js");
4
+ const index$1 = require("./chunks/index.js");
5
+ const index = require("./chunks/index2.js");
6
+ const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
7
+ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
8
+ __name: "pagination-ellipsis",
9
+ props: {
10
+ class: {},
11
+ asChild: { type: Boolean },
12
+ as: {}
13
+ },
14
+ setup(__props) {
15
+ const props = __props;
16
+ const delegated = index.reactiveOmit(props, "class");
17
+ return (_ctx, _cache) => {
18
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index$1.Cy), Mo.mergeProps(Mo.unref(delegated), {
19
+ class: Mo.unref(clsx.clsx)("celeste-pagination-element", "celeste-pagination-ellipsis", props.class),
20
+ "data-slot": "pagination-ellipsis"
21
+ }), {
22
+ default: Mo.withCtx(() => [
23
+ Mo.renderSlot(_ctx.$slots, "default", {}, () => [
24
+ _cache[0] || (_cache[0] = Mo.createElementVNode("span", { class: "celeste-pagination-ellipsis-dots" }, "...", -1)),
25
+ _cache[1] || (_cache[1] = Mo.createElementVNode("span", { class: "celeste-pagination-ellipsis-sr" }, "More pages", -1))
26
+ ], true)
27
+ ]),
28
+ _: 3
29
+ }, 16, ["class"]);
30
+ };
31
+ }
32
+ });
33
+ const paginationEllipsis = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-b7b0cb53"]]);
34
+ module.exports = paginationEllipsis;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const paginationFirst_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-first.js");
3
+ module.exports = paginationFirst_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const paginationItem_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-item.js");
3
+ module.exports = paginationItem_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const paginationLast_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-last.js");
3
+ module.exports = paginationLast_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const paginationNext_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-next.js");
3
+ module.exports = paginationNext_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ const paginationPrevious_vue_vue_type_script_setup_true_lang = require("./chunks/pagination-previous.js");
3
+ module.exports = paginationPrevious_vue_vue_type_script_setup_true_lang._sfc_main;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ const Mo = require("vue");
3
+ const clsx = require("./chunks/clsx.js");
4
+ const index$1 = require("./chunks/index.js");
5
+ const index = require("./chunks/index2.js");
6
+ const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
7
+ const _hoisted_1 = {
8
+ key: 0,
9
+ class: "celeste-pagination-leading"
10
+ };
11
+ const _hoisted_2 = { class: "celeste-pagination-center" };
12
+ const _hoisted_3 = {
13
+ key: 1,
14
+ class: "celeste-pagination-trailing"
15
+ };
16
+ const _sfc_main = /* @__PURE__ */ Mo.defineComponent({
17
+ __name: "pagination",
18
+ props: {
19
+ class: {},
20
+ variant: { default: "basic" },
21
+ page: {},
22
+ defaultPage: {},
23
+ itemsPerPage: {},
24
+ total: {},
25
+ siblingCount: {},
26
+ disabled: { type: Boolean },
27
+ showEdges: { type: Boolean },
28
+ asChild: { type: Boolean },
29
+ as: {}
30
+ },
31
+ emits: ["update:page"],
32
+ setup(__props, { emit: __emit }) {
33
+ const props = __props;
34
+ const emits = __emit;
35
+ const delegated = index.reactiveOmit(props, "class");
36
+ const forwarded = index$1.xe(delegated, emits);
37
+ return (_ctx, _cache) => {
38
+ return Mo.openBlock(), Mo.createBlock(Mo.unref(index$1.by), Mo.mergeProps(Mo.unref(forwarded), {
39
+ "data-slot": "pagination",
40
+ class: Mo.unref(clsx.clsx)("celeste-pagination", `celeste-pagination-variant-${props.variant}`, props.class)
41
+ }), {
42
+ default: Mo.withCtx((sprops) => [
43
+ _ctx.$slots.leading ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_1, [
44
+ Mo.renderSlot(_ctx.$slots, "leading", Mo.normalizeProps(Mo.guardReactiveProps(sprops)), void 0, true)
45
+ ])) : Mo.createCommentVNode("", true),
46
+ Mo.createElementVNode("div", _hoisted_2, [
47
+ Mo.renderSlot(_ctx.$slots, "default", Mo.normalizeProps(Mo.guardReactiveProps(sprops)), void 0, true)
48
+ ]),
49
+ _ctx.$slots.trailing ? (Mo.openBlock(), Mo.createElementBlock("div", _hoisted_3, [
50
+ Mo.renderSlot(_ctx.$slots, "trailing", Mo.normalizeProps(Mo.guardReactiveProps(sprops)), void 0, true)
51
+ ])) : Mo.createCommentVNode("", true)
52
+ ]),
53
+ _: 3
54
+ }, 16, ["class"]);
55
+ };
56
+ }
57
+ });
58
+ const pagination = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-0511c5ac"]]);
59
+ module.exports = pagination;