jaci-ui 0.1.1 → 0.3.0

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 (96) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +77 -1
  3. package/dist/components/button-group/button-group.cjs +22 -0
  4. package/dist/components/button-group/button-group.cjs.map +1 -0
  5. package/dist/components/button-group/button-group.d.cts +12 -0
  6. package/dist/components/button-group/button-group.d.ts +12 -0
  7. package/dist/components/button-group/button-group.js +21 -0
  8. package/dist/components/button-group/button-group.js.map +1 -0
  9. package/dist/components/button-group/index.d.cts +2 -0
  10. package/dist/components/button-group/index.d.ts +2 -0
  11. package/dist/components/color-picker/color-picker.cjs +77 -22
  12. package/dist/components/color-picker/color-picker.cjs.map +1 -1
  13. package/dist/components/color-picker/color-picker.d.cts +3 -3
  14. package/dist/components/color-picker/color-picker.d.ts +3 -3
  15. package/dist/components/color-picker/color-picker.js +77 -22
  16. package/dist/components/color-picker/color-picker.js.map +1 -1
  17. package/dist/components/date-picker/date-picker.cjs +227 -30
  18. package/dist/components/date-picker/date-picker.cjs.map +1 -1
  19. package/dist/components/date-picker/date-picker.d.cts +23 -5
  20. package/dist/components/date-picker/date-picker.d.ts +23 -5
  21. package/dist/components/date-picker/date-picker.js +226 -32
  22. package/dist/components/date-picker/date-picker.js.map +1 -1
  23. package/dist/components/date-picker/date-utils.cjs +32 -2
  24. package/dist/components/date-picker/date-utils.cjs.map +1 -1
  25. package/dist/components/date-picker/date-utils.d.cts +5 -0
  26. package/dist/components/date-picker/date-utils.d.ts +5 -0
  27. package/dist/components/date-picker/date-utils.js +29 -3
  28. package/dist/components/date-picker/date-utils.js.map +1 -1
  29. package/dist/components/date-picker/index.d.cts +3 -2
  30. package/dist/components/date-picker/index.d.ts +3 -2
  31. package/dist/components/empty-state/empty-state.cjs +62 -0
  32. package/dist/components/empty-state/empty-state.cjs.map +1 -0
  33. package/dist/components/empty-state/empty-state.d.cts +18 -0
  34. package/dist/components/empty-state/empty-state.d.ts +18 -0
  35. package/dist/components/empty-state/empty-state.js +57 -0
  36. package/dist/components/empty-state/empty-state.js.map +1 -0
  37. package/dist/components/empty-state/index.d.cts +2 -0
  38. package/dist/components/empty-state/index.d.ts +2 -0
  39. package/dist/components/icon-button/icon-button.cjs +40 -0
  40. package/dist/components/icon-button/icon-button.cjs.map +1 -0
  41. package/dist/components/icon-button/icon-button.d.cts +12 -0
  42. package/dist/components/icon-button/icon-button.d.ts +12 -0
  43. package/dist/components/icon-button/icon-button.js +40 -0
  44. package/dist/components/icon-button/icon-button.js.map +1 -0
  45. package/dist/components/icon-button/index.d.cts +2 -0
  46. package/dist/components/icon-button/index.d.ts +2 -0
  47. package/dist/components/input-group/index.d.cts +2 -0
  48. package/dist/components/input-group/index.d.ts +2 -0
  49. package/dist/components/input-group/input-group.cjs +32 -0
  50. package/dist/components/input-group/input-group.cjs.map +1 -0
  51. package/dist/components/input-group/input-group.d.cts +15 -0
  52. package/dist/components/input-group/input-group.d.ts +15 -0
  53. package/dist/components/input-group/input-group.js +30 -0
  54. package/dist/components/input-group/input-group.js.map +1 -0
  55. package/dist/index.cjs +22 -0
  56. package/dist/index.d.cts +13 -2
  57. package/dist/index.d.ts +13 -2
  58. package/dist/index.js +7 -2
  59. package/dist/styled-system/recipes/button-group.cjs +30 -0
  60. package/dist/styled-system/recipes/button-group.cjs.map +1 -0
  61. package/dist/styled-system/recipes/button-group.js +30 -0
  62. package/dist/styled-system/recipes/button-group.js.map +1 -0
  63. package/dist/styled-system/recipes/color-picker.cjs +1 -0
  64. package/dist/styled-system/recipes/color-picker.cjs.map +1 -1
  65. package/dist/styled-system/recipes/color-picker.js +1 -0
  66. package/dist/styled-system/recipes/color-picker.js.map +1 -1
  67. package/dist/styled-system/recipes/date-picker.cjs +6 -0
  68. package/dist/styled-system/recipes/date-picker.cjs.map +1 -1
  69. package/dist/styled-system/recipes/date-picker.js +6 -0
  70. package/dist/styled-system/recipes/date-picker.js.map +1 -1
  71. package/dist/styled-system/recipes/empty-state.cjs +36 -0
  72. package/dist/styled-system/recipes/empty-state.cjs.map +1 -0
  73. package/dist/styled-system/recipes/empty-state.js +36 -0
  74. package/dist/styled-system/recipes/empty-state.js.map +1 -0
  75. package/dist/styled-system/recipes/icon-button.cjs +40 -0
  76. package/dist/styled-system/recipes/icon-button.cjs.map +1 -0
  77. package/dist/styled-system/recipes/icon-button.js +40 -0
  78. package/dist/styled-system/recipes/icon-button.js.map +1 -0
  79. package/dist/styled-system/recipes/input-group.cjs +30 -0
  80. package/dist/styled-system/recipes/input-group.cjs.map +1 -0
  81. package/dist/styled-system/recipes/input-group.js +30 -0
  82. package/dist/styled-system/recipes/input-group.js.map +1 -0
  83. package/dist/styles/theme.cjs +15 -0
  84. package/dist/styles/theme.cjs.map +1 -1
  85. package/dist/styles/theme.js +15 -0
  86. package/dist/styles/theme.js.map +1 -1
  87. package/dist/styles.css +382 -5
  88. package/dist/theme/index.d.cts +2 -0
  89. package/dist/theme/index.d.ts +2 -0
  90. package/dist/theme/theme-provider.cjs +86 -0
  91. package/dist/theme/theme-provider.cjs.map +1 -0
  92. package/dist/theme/theme-provider.d.cts +66 -0
  93. package/dist/theme/theme-provider.d.ts +66 -0
  94. package/dist/theme/theme-provider.js +85 -0
  95. package/dist/theme/theme-provider.js.map +1 -0
  96. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"date-utils.cjs","names":[],"sources":["../../../src/components/date-picker/date-utils.ts"],"sourcesContent":["export type DateLike = Date | null | undefined;\n\nexport function cloneDate(date: Date): Date {\n return new Date(date.getTime());\n}\n\n/** Creates a local date at noon to avoid DST changes moving a calendar day. */\nexport function createCalendarDate(year: number, month: number, day: number): Date {\n return new Date(year, month, day, 12, 0, 0, 0);\n}\n\nexport function startOfMonth(date: Date): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth(), 1);\n}\n\nexport function addDays(date: Date, amount: number): Date {\n const result = cloneDate(date);\n result.setDate(result.getDate() + amount);\n return result;\n}\n\nexport function addMonths(date: Date, amount: number): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth() + amount, 1);\n}\n\nexport function dateKey(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\nexport function toInputDate(date: DateLike): string {\n return date ? dateKey(date) : \"\";\n}\n\nexport function isSameDay(left: DateLike, right: DateLike): boolean {\n return Boolean(left && right && dateKey(left) === dateKey(right));\n}\n\nexport function isBeforeDay(left: Date, right: Date): boolean {\n return dateKey(left) < dateKey(right);\n}\n\nexport function isAfterDay(left: Date, right: Date): boolean {\n return dateKey(left) > dateKey(right);\n}\n\nexport function getCalendarDays(month: Date, weekStartsOn: number): Date[] {\n const firstDay = startOfMonth(month);\n const offset = (firstDay.getDay() - weekStartsOn + 7) % 7;\n const firstVisibleDay = addDays(firstDay, -offset);\n\n return Array.from({ length: 42 }, (_, index) => addDays(firstVisibleDay, index));\n}\n\nexport function getWeekdayLabels(locale: string, weekStartsOn: number): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { weekday: \"short\" });\n const sunday = createCalendarDate(2024, 0, 7);\n\n return Array.from({ length: 7 }, (_, index) =>\n formatter.format(addDays(sunday, (weekStartsOn + index) % 7)),\n );\n}\n\nexport function formatMonthLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }).format(date);\n}\n\nexport function formatDateLabel(date: DateLike, locale: string, placeholder: string): string {\n return date ? new Intl.DateTimeFormat(locale, { dateStyle: \"medium\" }).format(date) : placeholder;\n}\n\nexport function getDateRangeLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n }).format(date);\n}\n"],"mappings":";AAEA,SAAgB,UAAU,MAAkB;CAC1C,OAAO,IAAI,KAAK,KAAK,QAAQ,CAAC;AAChC;;AAGA,SAAgB,m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AQ,iBAAiB,KAAK,CAAC;AACjF;AAEA,SAAgB,iBAAiB,QAAgB,cAAgC;CAC/E,MAAM,YAAY,IAAI,KAAK,eAAe,QAAQ,EAAE,SAAS,QAAQ,CAAC;CACtE,MAAM,SAAS,mBAAmB,MAAM,GAAG,CAAC;CAE5C,OAAO,MAAM,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAG,UACnC,UAAU,OAAO,QAAQ,SAAS,eAAe,SAAS,CAAC,CAAC,CAC9D;AACF;AAEA,SAAgB,iBAAiB,MAAY,QAAwB;CACnE,OAAO,IAAI,KAAK,eAAe,QAAQ;EAAE,OAAO;EAAQ,MAAM;CAAU,CAAC,CAAC,CAAC,OAAO,IAAI;AACxF;AAEA,SAAgB,gBAAgB,MAAgB,QAAgB,aAA6B;CAC3F,OAAO,OAAO,IAAI,KAAK,eAAe,QAAQ,EAAE,WAAW,SAAS,CAAC,CAAC,CAAC,OAAO,IAAI,IAAI;AACxF;AAEA,SAAgB,kBAAkB,MAAY,QAAwB;CACpE,OAAO,IAAI,KAAK,eAAe,QAAQ;EACrC,KAAK;EACL,OAAO;EACP,MAAM;CACR,CAAC,CAAC,CAAC,OAAO,IAAI;AAChB"}
1
+ {"version":3,"file":"date-utils.cjs","names":[],"sources":["../../../src/components/date-picker/date-utils.ts"],"sourcesContent":["export type DateLike = Date | null | undefined;\n\nexport type DatePickerGranularity = \"day\" | \"month\" | \"date-time\";\n\nexport function cloneDate(date: Date): Date {\n return new Date(date.getTime());\n}\n\n/** Creates a local date at noon to avoid DST changes moving a calendar day. */\nexport function createCalendarDate(year: number, month: number, day: number): Date {\n return new Date(year, month, day, 12, 0, 0, 0);\n}\n\nexport function startOfMonth(date: Date): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth(), 1);\n}\n\nexport function addDays(date: Date, amount: number): Date {\n const result = cloneDate(date);\n result.setDate(result.getDate() + amount);\n return result;\n}\n\nexport function addMonths(date: Date, amount: number): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth() + amount, 1);\n}\n\nexport function dateKey(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\nexport function toInputDate(date: DateLike): string {\n return date ? dateKey(date) : \"\";\n}\n\nexport function toInputMonth(date: DateLike): string {\n return date ? `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, \"0\")}` : \"\";\n}\n\nexport function toInputDateTime(date: DateLike): string {\n if (!date) return \"\";\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n return `${dateKey(date)}T${hours}:${minutes}`;\n}\n\nexport function isSameDay(left: DateLike, right: DateLike): boolean {\n return Boolean(left && right && dateKey(left) === dateKey(right));\n}\n\nexport function isBeforeDay(left: Date, right: Date): boolean {\n return dateKey(left) < dateKey(right);\n}\n\nexport function isAfterDay(left: Date, right: Date): boolean {\n return dateKey(left) > dateKey(right);\n}\n\nexport function getCalendarDays(month: Date, weekStartsOn: number): Date[] {\n const firstDay = startOfMonth(month);\n const offset = (firstDay.getDay() - weekStartsOn + 7) % 7;\n const firstVisibleDay = addDays(firstDay, -offset);\n\n return Array.from({ length: 42 }, (_, index) => addDays(firstVisibleDay, index));\n}\n\nexport function getWeekdayLabels(locale: string, weekStartsOn: number): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { weekday: \"short\" });\n const sunday = createCalendarDate(2024, 0, 7);\n\n return Array.from({ length: 7 }, (_, index) =>\n formatter.format(addDays(sunday, (weekStartsOn + index) % 7)),\n );\n}\n\nexport function formatMonthLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }).format(date);\n}\n\nexport function formatDateLabel(\n date: DateLike,\n locale: string,\n placeholder: string,\n granularity: DatePickerGranularity = \"day\",\n): string {\n if (!date) return placeholder;\n if (granularity === \"month\") {\n return new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }).format(date);\n }\n if (granularity === \"date-time\") {\n return new Intl.DateTimeFormat(locale, {\n dateStyle: \"medium\",\n timeStyle: \"short\",\n }).format(date);\n }\n return new Intl.DateTimeFormat(locale, { dateStyle: \"medium\" }).format(date);\n}\n\nexport function getMonthLabels(locale: string): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { month: \"long\" });\n return Array.from({ length: 12 }, (_, month) =>\n formatter.format(createCalendarDate(2024, month, 1)),\n );\n}\n\nexport function toTimeInput(date: DateLike): string {\n if (!date) return \"\";\n return `${String(date.getHours()).padStart(2, \"0\")}:${String(date.getMinutes()).padStart(2, \"0\")}`;\n}\n\nexport function getDateRangeLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n }).format(date);\n}\n"],"mappings":";AAIA,SAAgB,UAAU,MAAkB;CAC1C,OAAO,IAAI,KAAK,KAAK,QAAQ,CAAC;AAChC;;AAGA,SAAgB,mBAAmB,MAAc,OAAe,KAAmB;CACjF,OAAO,IAAI,KAAK,MAAM,OAAO,KAAK,IAAI,GAAG,GAAG,CAAC;AAC/C;AAEA,SAAgB,aAAa,MAAkB;CAC7C,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,GAAG,CAAC;AAClE;AAEA,SAAgB,QAAQ,MAAY,QAAsB;CACxD,MAAM,SAAS,UAAU,IAAI;CAC7B,OAAO,QAAQ,OAAO,QAAQ,IAAI,MAAM;CACxC,OAAO;AACT;AAEA,SAAgB,UAAU,MAAY,QAAsB;CAC1D,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,IAAI,QAAQ,CAAC;AAC3E;AAEA,SAAgB,QAAQ,MAAoB;CAC1C,MAAM,QAAQ,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CACzD,MAAM,MAAM,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CAClD,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src/components/date-picker/date-utils.d.ts
2
+ type DatePickerGranularity = "day" | "month" | "date-time";
3
+ //#endregion
4
+ export { DatePickerGranularity };
5
+ //# sourceMappingURL=date-utils.d.cts.map
@@ -0,0 +1,5 @@
1
+ //#region src/components/date-picker/date-utils.d.ts
2
+ type DatePickerGranularity = "day" | "month" | "date-time";
3
+ //#endregion
4
+ export { DatePickerGranularity };
5
+ //# sourceMappingURL=date-utils.d.ts.map
@@ -25,6 +25,15 @@ function dateKey(date) {
25
25
  function toInputDate(date) {
26
26
  return date ? dateKey(date) : "";
27
27
  }
28
+ function toInputMonth(date) {
29
+ return date ? `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}` : "";
30
+ }
31
+ function toInputDateTime(date) {
32
+ if (!date) return "";
33
+ const hours = String(date.getHours()).padStart(2, "0");
34
+ const minutes = String(date.getMinutes()).padStart(2, "0");
35
+ return `${dateKey(date)}T${hours}:${minutes}`;
36
+ }
28
37
  function isSameDay(left, right) {
29
38
  return Boolean(left && right && dateKey(left) === dateKey(right));
30
39
  }
@@ -50,8 +59,25 @@ function formatMonthLabel(date, locale) {
50
59
  year: "numeric"
51
60
  }).format(date);
52
61
  }
53
- function formatDateLabel(date, locale, placeholder) {
54
- return date ? new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(date) : placeholder;
62
+ function formatDateLabel(date, locale, placeholder, granularity = "day") {
63
+ if (!date) return placeholder;
64
+ if (granularity === "month") return new Intl.DateTimeFormat(locale, {
65
+ month: "long",
66
+ year: "numeric"
67
+ }).format(date);
68
+ if (granularity === "date-time") return new Intl.DateTimeFormat(locale, {
69
+ dateStyle: "medium",
70
+ timeStyle: "short"
71
+ }).format(date);
72
+ return new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(date);
73
+ }
74
+ function getMonthLabels(locale) {
75
+ const formatter = new Intl.DateTimeFormat(locale, { month: "long" });
76
+ return Array.from({ length: 12 }, (_, month) => formatter.format(createCalendarDate(2024, month, 1)));
77
+ }
78
+ function toTimeInput(date) {
79
+ if (!date) return "";
80
+ return `${String(date.getHours()).padStart(2, "0")}:${String(date.getMinutes()).padStart(2, "0")}`;
55
81
  }
56
82
  function getDateRangeLabel(date, locale) {
57
83
  return new Intl.DateTimeFormat(locale, {
@@ -61,6 +87,6 @@ function getDateRangeLabel(date, locale) {
61
87
  }).format(date);
62
88
  }
63
89
  //#endregion
64
- export { addDays, addMonths, cloneDate, createCalendarDate, dateKey, formatDateLabel, formatMonthLabel, getCalendarDays, getDateRangeLabel, getWeekdayLabels, isAfterDay, isBeforeDay, isSameDay, startOfMonth, toInputDate };
90
+ export { addDays, addMonths, cloneDate, createCalendarDate, dateKey, formatDateLabel, formatMonthLabel, getCalendarDays, getDateRangeLabel, getMonthLabels, getWeekdayLabels, isAfterDay, isBeforeDay, isSameDay, startOfMonth, toInputDate, toInputDateTime, toInputMonth, toTimeInput };
65
91
 
66
92
  //# sourceMappingURL=date-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-utils.js","names":[],"sources":["../../../src/components/date-picker/date-utils.ts"],"sourcesContent":["export type DateLike = Date | null | undefined;\n\nexport function cloneDate(date: Date): Date {\n return new Date(date.getTime());\n}\n\n/** Creates a local date at noon to avoid DST changes moving a calendar day. */\nexport function createCalendarDate(year: number, month: number, day: number): Date {\n return new Date(year, month, day, 12, 0, 0, 0);\n}\n\nexport function startOfMonth(date: Date): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth(), 1);\n}\n\nexport function addDays(date: Date, amount: number): Date {\n const result = cloneDate(date);\n result.setDate(result.getDate() + amount);\n return result;\n}\n\nexport function addMonths(date: Date, amount: number): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth() + amount, 1);\n}\n\nexport function dateKey(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\nexport function toInputDate(date: DateLike): string {\n return date ? dateKey(date) : \"\";\n}\n\nexport function isSameDay(left: DateLike, right: DateLike): boolean {\n return Boolean(left && right && dateKey(left) === dateKey(right));\n}\n\nexport function isBeforeDay(left: Date, right: Date): boolean {\n return dateKey(left) < dateKey(right);\n}\n\nexport function isAfterDay(left: Date, right: Date): boolean {\n return dateKey(left) > dateKey(right);\n}\n\nexport function getCalendarDays(month: Date, weekStartsOn: number): Date[] {\n const firstDay = startOfMonth(month);\n const offset = (firstDay.getDay() - weekStartsOn + 7) % 7;\n const firstVisibleDay = addDays(firstDay, -offset);\n\n return Array.from({ length: 42 }, (_, index) => addDays(firstVisibleDay, index));\n}\n\nexport function getWeekdayLabels(locale: string, weekStartsOn: number): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { weekday: \"short\" });\n const sunday = createCalendarDate(2024, 0, 7);\n\n return Array.from({ length: 7 }, (_, index) =>\n formatter.format(addDays(sunday, (weekStartsOn + index) % 7)),\n );\n}\n\nexport function formatMonthLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }).format(date);\n}\n\nexport function formatDateLabel(date: DateLike, locale: string, placeholder: string): string {\n return date ? new Intl.DateTimeFormat(locale, { dateStyle: \"medium\" }).format(date) : placeholder;\n}\n\nexport function getDateRangeLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n }).format(date);\n}\n"],"mappings":";AAEA,SAAgB,UAAU,MAAkB;CAC1C,OAAO,IAAI,KAAK,KAAK,QAAQ,CAAC;AAChC;;AAGA,SAAgB,mBAAmB,MAAc,OAAe,KAAmB;CACjF,OAAO,IAAI,KAAK,MAAM,OAAO,KAAK,IAAI,GAAG,GAAG,CAAC;AAC/C;AAEA,SAAgB,aAAa,MAAkB;CAC7C,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,GAAG,CAAC;AAClE;AAEA,SAAgB,QAAQ,MAAY,QAAsB;CACxD,MAAM,SAAS,UAAU,IAAI;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Q,SAAS,eAAe,SAAS,CAAC,CAAC,CAC9D;AACF;AAEA,SAAgB,iBAAiB,MAAY,QAAwB;CACnE,OAAO,IAAI,KAAK,eAAe,QAAQ;EAAE,OAAO;EAAQ,MAAM;CAAU,CAAC,CAAC,CAAC,OAAO,IAAI;AACxF;AAEA,SAAgB,gBAAgB,MAAgB,QAAgB,aAA6B;CAC3F,OAAO,OAAO,IAAI,KAAK,eAAe,QAAQ,EAAE,WAAW,SAAS,CAAC,CAAC,CAAC,OAAO,IAAI,IAAI;AACxF;AAEA,SAAgB,kBAAkB,MAAY,QAAwB;CACpE,OAAO,IAAI,KAAK,eAAe,QAAQ;EACrC,KAAK;EACL,OAAO;EACP,MAAM;CACR,CAAC,CAAC,CAAC,OAAO,IAAI;AAChB"}
1
+ {"version":3,"file":"date-utils.js","names":[],"sources":["../../../src/components/date-picker/date-utils.ts"],"sourcesContent":["export type DateLike = Date | null | undefined;\n\nexport type DatePickerGranularity = \"day\" | \"month\" | \"date-time\";\n\nexport function cloneDate(date: Date): Date {\n return new Date(date.getTime());\n}\n\n/** Creates a local date at noon to avoid DST changes moving a calendar day. */\nexport function createCalendarDate(year: number, month: number, day: number): Date {\n return new Date(year, month, day, 12, 0, 0, 0);\n}\n\nexport function startOfMonth(date: Date): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth(), 1);\n}\n\nexport function addDays(date: Date, amount: number): Date {\n const result = cloneDate(date);\n result.setDate(result.getDate() + amount);\n return result;\n}\n\nexport function addMonths(date: Date, amount: number): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth() + amount, 1);\n}\n\nexport function dateKey(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\nexport function toInputDate(date: DateLike): string {\n return date ? dateKey(date) : \"\";\n}\n\nexport function toInputMonth(date: DateLike): string {\n return date ? `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, \"0\")}` : \"\";\n}\n\nexport function toInputDateTime(date: DateLike): string {\n if (!date) return \"\";\n const hours = String(date.getHours()).padStart(2, \"0\");\n const minutes = String(date.getMinutes()).padStart(2, \"0\");\n return `${dateKey(date)}T${hours}:${minutes}`;\n}\n\nexport function isSameDay(left: DateLike, right: DateLike): boolean {\n return Boolean(left && right && dateKey(left) === dateKey(right));\n}\n\nexport function isBeforeDay(left: Date, right: Date): boolean {\n return dateKey(left) < dateKey(right);\n}\n\nexport function isAfterDay(left: Date, right: Date): boolean {\n return dateKey(left) > dateKey(right);\n}\n\nexport function getCalendarDays(month: Date, weekStartsOn: number): Date[] {\n const firstDay = startOfMonth(month);\n const offset = (firstDay.getDay() - weekStartsOn + 7) % 7;\n const firstVisibleDay = addDays(firstDay, -offset);\n\n return Array.from({ length: 42 }, (_, index) => addDays(firstVisibleDay, index));\n}\n\nexport function getWeekdayLabels(locale: string, weekStartsOn: number): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { weekday: \"short\" });\n const sunday = createCalendarDate(2024, 0, 7);\n\n return Array.from({ length: 7 }, (_, index) =>\n formatter.format(addDays(sunday, (weekStartsOn + index) % 7)),\n );\n}\n\nexport function formatMonthLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }).format(date);\n}\n\nexport function formatDateLabel(\n date: DateLike,\n locale: string,\n placeholder: string,\n granularity: DatePickerGranularity = \"day\",\n): string {\n if (!date) return placeholder;\n if (granularity === \"month\") {\n return new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }).format(date);\n }\n if (granularity === \"date-time\") {\n return new Intl.DateTimeFormat(locale, {\n dateStyle: \"medium\",\n timeStyle: \"short\",\n }).format(date);\n }\n return new Intl.DateTimeFormat(locale, { dateStyle: \"medium\" }).format(date);\n}\n\nexport function getMonthLabels(locale: string): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { month: \"long\" });\n return Array.from({ length: 12 }, (_, month) =>\n formatter.format(createCalendarDate(2024, month, 1)),\n );\n}\n\nexport function toTimeInput(date: DateLike): string {\n if (!date) return \"\";\n return `${String(date.getHours()).padStart(2, \"0\")}:${String(date.getMinutes()).padStart(2, \"0\")}`;\n}\n\nexport function getDateRangeLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n }).format(date);\n}\n"],"mappings":";AAIA,SAAgB,UAAU,MAAkB;CAC1C,OAAO,IAAI,KAAK,KAAK,QAAQ,CAAC;AAChC;;AAGA,SAAgB,mBAAmB,MAAc,OAAe,KAAmB;CACjF,OAAO,IAAI,KAAK,MAAM,OAAO,KAAK,IAAI,GAAG,GAAG,CAAC;AAC/C;AAEA,SAAgB,aAAa,MAAkB;CAC7C,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,GAAG,CAAC;AAClE;AAEA,SAAgB,QAAQ,MAAY,QAAsB;CACxD,MAAM,SAAS,UAAU,IAAI;CAC7B,OAAO,QAAQ,OAAO,QAAQ,IAAI,MAAM;CACxC,OAAO;AACT;AAEA,SAAgB,UAAU,MAAY,QAAsB;CAC1D,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,IAAI,QAAQ,CAAC;AAC3E;AAEA,SAAgB,QAAQ,MAAoB;CAC1C,MAAM,QAAQ,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CACzD,MAAM,MAAM,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CAClD,OAAO,GAAG,KAAK,YAAY,EAAE,GAAG,MAAM,GAAG;AAC3C;AAEA,SAAgB,YAAY,MAAwB;CAClD,OAAO,OAAO,QAAQ,IAAI,IAAI;AAChC;AAEA,SAAgB,aAAa,MAAwB;CACnD,OAAO,OAAO,GAAG,KAAK,YAAY,EAAE,GAAG,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,MA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QACA,aACA,cAAqC,OAC7B;CACR,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI,gBAAgB,SAClB,OAAO,IAAI,KAAK,eAAe,QAAQ;EAAE,OAAO;EAAQ,MAAM;CAAU,CAAC,CAAC,CAAC,OAAO,IAAI;CAExF,IAAI,gBAAgB,aAClB,OAAO,IAAI,KAAK,eAAe,QAAQ;EACrC,WAAW;EACX,WAAW;CACb,CAAC,CAAC,CAAC,OAAO,IAAI;CAEhB,OAAO,IAAI,KAAK,eAAe,QAAQ,EAAE,WAAW,SAAS,CAAC,CAAC,CAAC,OAAO,IAAI;AAC7E;AAEA,SAAgB,eAAe,QAA0B;CACvD,MAAM,YAAY,IAAI,KAAK,eAAe,QAAQ,EAAE,OAAO,OAAO,CAAC;CACnE,OAAO,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,UACpC,UAAU,OAAO,mBAAmB,MAAM,OAAO,CAAC,CAAC,CACrD;AACF;AAEA,SAAgB,YAAY,MAAwB;CAClD,IAAI,CAAC,MAAM,OAAO;CAClB,OAAO,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;AACjG;AAEA,SAAgB,kBAAkB,MAAY,QAAwB;CACpE,OAAO,IAAI,KAAK,eAAe,QAAQ;EACrC,KAAK;EACL,OAAO;EACP,MAAM;CACR,CAAC,CAAC,CAAC,OAAO,IAAI;AAChB"}
@@ -1,2 +1,3 @@
1
- import { DatePicker, DatePickerCalendar, DatePickerCalendarProps, DatePickerCaption, DatePickerCaptionProps, DatePickerClear, DatePickerClearProps, DatePickerClose, DatePickerCloseProps, DatePickerControl, DatePickerControlProps, DatePickerDay, DatePickerDayProps, DatePickerHeader, DatePickerHeaderProps, DatePickerLabel, DatePickerLabelProps, DatePickerNavigationProps, DatePickerNext, DatePickerPopup, DatePickerPopupProps, DatePickerPortal, DatePickerPortalProps, DatePickerPositioner, DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, DatePickerRootProps, DatePickerSize, DatePickerTrigger, DatePickerTriggerProps, DatePickerValue, DatePickerValueProps } from "./date-picker.cjs";
2
- export { DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerCaption, type DatePickerCaptionProps, DatePickerClear, type DatePickerClearProps, DatePickerClose, type DatePickerCloseProps, DatePickerControl, type DatePickerControlProps, DatePickerDay, type DatePickerDayProps, DatePickerHeader, type DatePickerHeaderProps, DatePickerLabel, type DatePickerLabelProps, type DatePickerNavigationProps, DatePickerNext, DatePickerPopup, type DatePickerPopupProps, DatePickerPortal, type DatePickerPortalProps, DatePickerPositioner, type DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, type DatePickerRootProps, type DatePickerSize, DatePickerTrigger, type DatePickerTriggerProps, DatePickerValue, type DatePickerValueProps };
1
+ import { DatePickerGranularity } from "./date-utils.cjs";
2
+ import { DatePicker, DatePickerCalendar, DatePickerCalendarProps, DatePickerCaption, DatePickerCaptionProps, DatePickerClear, DatePickerClearProps, DatePickerClose, DatePickerCloseProps, DatePickerControl, DatePickerControlProps, DatePickerDay, DatePickerDayProps, DatePickerHeader, DatePickerHeaderProps, DatePickerLabel, DatePickerLabelProps, DatePickerMonthSelect, DatePickerMonthSelectProps, DatePickerNavigationProps, DatePickerNext, DatePickerPopup, DatePickerPopupProps, DatePickerPortal, DatePickerPortalProps, DatePickerPositioner, DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, DatePickerRootProps, DatePickerSize, DatePickerTimeField, DatePickerTimeFieldProps, DatePickerTrigger, DatePickerTriggerProps, DatePickerValue, DatePickerValueProps, DatePickerYearRange, DatePickerYearSelect, DatePickerYearSelectProps } from "./date-picker.cjs";
3
+ export { DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerCaption, type DatePickerCaptionProps, DatePickerClear, type DatePickerClearProps, DatePickerClose, type DatePickerCloseProps, DatePickerControl, type DatePickerControlProps, DatePickerDay, type DatePickerDayProps, type DatePickerGranularity, DatePickerHeader, type DatePickerHeaderProps, DatePickerLabel, type DatePickerLabelProps, DatePickerMonthSelect, type DatePickerMonthSelectProps, type DatePickerNavigationProps, DatePickerNext, DatePickerPopup, type DatePickerPopupProps, DatePickerPortal, type DatePickerPortalProps, DatePickerPositioner, type DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, type DatePickerRootProps, type DatePickerSize, DatePickerTimeField, type DatePickerTimeFieldProps, DatePickerTrigger, type DatePickerTriggerProps, DatePickerValue, type DatePickerValueProps, type DatePickerYearRange, DatePickerYearSelect, type DatePickerYearSelectProps };
@@ -1,2 +1,3 @@
1
- import { DatePicker, DatePickerCalendar, DatePickerCalendarProps, DatePickerCaption, DatePickerCaptionProps, DatePickerClear, DatePickerClearProps, DatePickerClose, DatePickerCloseProps, DatePickerControl, DatePickerControlProps, DatePickerDay, DatePickerDayProps, DatePickerHeader, DatePickerHeaderProps, DatePickerLabel, DatePickerLabelProps, DatePickerNavigationProps, DatePickerNext, DatePickerPopup, DatePickerPopupProps, DatePickerPortal, DatePickerPortalProps, DatePickerPositioner, DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, DatePickerRootProps, DatePickerSize, DatePickerTrigger, DatePickerTriggerProps, DatePickerValue, DatePickerValueProps } from "./date-picker.js";
2
- export { DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerCaption, type DatePickerCaptionProps, DatePickerClear, type DatePickerClearProps, DatePickerClose, type DatePickerCloseProps, DatePickerControl, type DatePickerControlProps, DatePickerDay, type DatePickerDayProps, DatePickerHeader, type DatePickerHeaderProps, DatePickerLabel, type DatePickerLabelProps, type DatePickerNavigationProps, DatePickerNext, DatePickerPopup, type DatePickerPopupProps, DatePickerPortal, type DatePickerPortalProps, DatePickerPositioner, type DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, type DatePickerRootProps, type DatePickerSize, DatePickerTrigger, type DatePickerTriggerProps, DatePickerValue, type DatePickerValueProps };
1
+ import { DatePickerGranularity } from "./date-utils.js";
2
+ import { DatePicker, DatePickerCalendar, DatePickerCalendarProps, DatePickerCaption, DatePickerCaptionProps, DatePickerClear, DatePickerClearProps, DatePickerClose, DatePickerCloseProps, DatePickerControl, DatePickerControlProps, DatePickerDay, DatePickerDayProps, DatePickerHeader, DatePickerHeaderProps, DatePickerLabel, DatePickerLabelProps, DatePickerMonthSelect, DatePickerMonthSelectProps, DatePickerNavigationProps, DatePickerNext, DatePickerPopup, DatePickerPopupProps, DatePickerPortal, DatePickerPortalProps, DatePickerPositioner, DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, DatePickerRootProps, DatePickerSize, DatePickerTimeField, DatePickerTimeFieldProps, DatePickerTrigger, DatePickerTriggerProps, DatePickerValue, DatePickerValueProps, DatePickerYearRange, DatePickerYearSelect, DatePickerYearSelectProps } from "./date-picker.js";
3
+ export { DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerCaption, type DatePickerCaptionProps, DatePickerClear, type DatePickerClearProps, DatePickerClose, type DatePickerCloseProps, DatePickerControl, type DatePickerControlProps, DatePickerDay, type DatePickerDayProps, type DatePickerGranularity, DatePickerHeader, type DatePickerHeaderProps, DatePickerLabel, type DatePickerLabelProps, DatePickerMonthSelect, type DatePickerMonthSelectProps, type DatePickerNavigationProps, DatePickerNext, DatePickerPopup, type DatePickerPopupProps, DatePickerPortal, type DatePickerPortalProps, DatePickerPositioner, type DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, type DatePickerRootProps, type DatePickerSize, DatePickerTimeField, type DatePickerTimeFieldProps, DatePickerTrigger, type DatePickerTriggerProps, DatePickerValue, type DatePickerValueProps, type DatePickerYearRange, DatePickerYearSelect, type DatePickerYearSelectProps };
@@ -0,0 +1,62 @@
1
+ const require_cx = require("../../styled-system/css/cx.cjs");
2
+ const require_empty_state = require("../../styled-system/recipes/empty-state.cjs");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ //#region src/components/empty-state/empty-state.tsx
6
+ const EmptyStateRoot = (0, react.forwardRef)(function EmptyStateRoot({ className, ...props }, ref) {
7
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
8
+ ...props,
9
+ ref,
10
+ className: require_cx.cx(require_empty_state.emptyState().root, className),
11
+ "data-jaci-component": "empty-state",
12
+ "data-slot": "empty-state"
13
+ });
14
+ });
15
+ const EmptyStateIcon = (0, react.forwardRef)(function EmptyStateIcon({ className, ...props }, ref) {
16
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
17
+ ...props,
18
+ ref,
19
+ className: require_cx.cx(require_empty_state.emptyState().icon, className),
20
+ "data-slot": "empty-state-icon"
21
+ });
22
+ });
23
+ const EmptyStateTitle = (0, react.forwardRef)(function EmptyStateTitle({ className, ...props }, ref) {
24
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", {
25
+ ...props,
26
+ ref,
27
+ className: require_cx.cx(require_empty_state.emptyState().title, className),
28
+ "data-slot": "empty-state-title"
29
+ });
30
+ });
31
+ const EmptyStateDescription = (0, react.forwardRef)(function EmptyStateDescription({ className, ...props }, ref) {
32
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
33
+ ...props,
34
+ ref,
35
+ className: require_cx.cx(require_empty_state.emptyState().description, className),
36
+ "data-slot": "empty-state-description"
37
+ });
38
+ });
39
+ const EmptyStateAction = (0, react.forwardRef)(function EmptyStateAction({ className, ...props }, ref) {
40
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
41
+ ...props,
42
+ ref,
43
+ className: require_cx.cx(require_empty_state.emptyState().action, className),
44
+ "data-slot": "empty-state-action"
45
+ });
46
+ });
47
+ const EmptyState = Object.assign(EmptyStateRoot, {
48
+ Root: EmptyStateRoot,
49
+ Icon: EmptyStateIcon,
50
+ Title: EmptyStateTitle,
51
+ Description: EmptyStateDescription,
52
+ Action: EmptyStateAction
53
+ });
54
+ //#endregion
55
+ exports.EmptyState = EmptyState;
56
+ exports.EmptyStateAction = EmptyStateAction;
57
+ exports.EmptyStateDescription = EmptyStateDescription;
58
+ exports.EmptyStateIcon = EmptyStateIcon;
59
+ exports.EmptyStateRoot = EmptyStateRoot;
60
+ exports.EmptyStateTitle = EmptyStateTitle;
61
+
62
+ //# sourceMappingURL=empty-state.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.cjs","names":["cx","emptyState"],"sources":["../../../src/components/empty-state/empty-state.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { emptyState } from \"../../styled-system/recipes\";\n\nexport type EmptyStateRootProps = ComponentPropsWithoutRef<\"section\">;\n\nexport const EmptyStateRoot = forwardRef<HTMLElement, EmptyStateRootProps>(function EmptyStateRoot(\n { className, ...props },\n ref,\n) {\n return (\n <section\n {...props}\n ref={ref}\n className={cx(emptyState().root, className)}\n data-jaci-component=\"empty-state\"\n data-slot=\"empty-state\"\n />\n );\n});\n\nexport const EmptyStateIcon = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function EmptyStateIcon({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(emptyState().icon, className)}\n data-slot=\"empty-state-icon\"\n />\n );\n },\n);\n\nexport const EmptyStateTitle = forwardRef<HTMLHeadingElement, ComponentPropsWithoutRef<\"h3\">>(\n function EmptyStateTitle({ className, ...props }, ref) {\n return (\n <h3\n {...props}\n ref={ref}\n className={cx(emptyState().title, className)}\n data-slot=\"empty-state-title\"\n />\n );\n },\n);\n\nexport const EmptyStateDescription = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<\"p\">\n>(function EmptyStateDescription({ className, ...props }, ref) {\n return (\n <p\n {...props}\n ref={ref}\n className={cx(emptyState().description, className)}\n data-slot=\"empty-state-description\"\n />\n );\n});\n\nexport const EmptyStateAction = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function EmptyStateAction({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(emptyState().action, className)}\n data-slot=\"empty-state-action\"\n />\n );\n },\n);\n\nexport const EmptyState = Object.assign(EmptyStateRoot, {\n Root: EmptyStateRoot,\n Icon: EmptyStateIcon,\n Title: EmptyStateTitle,\n Description: EmptyStateDescription,\n Action: EmptyStateAction,\n});\n"],"mappings":";;;;;AAQA,MAAa,kBAAA,GAAA,MAAA,WAAA,CAA8D,SAAS,eAClF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,mBAAA,GAAA,MAAA,WAAA,CACX,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,yBAAA,GAAA,MAAA,WAAA,CAGX,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC7D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,aAAa,SAAS;EACjD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,oBAAA,GAAA,MAAA,WAAA,CACX,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,QAAQ,SAAS;EAC5C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,QAAQ;AACV,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ //#region src/components/empty-state/empty-state.d.ts
3
+ type EmptyStateRootProps = ComponentPropsWithoutRef<"section">;
4
+ declare const EmptyStateRoot: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
5
+ declare const EmptyStateIcon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
+ declare const EmptyStateTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
7
+ declare const EmptyStateDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
8
+ declare const EmptyStateAction: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
+ declare const EmptyState: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
10
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
11
+ Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
+ Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
13
+ Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
14
+ Action: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
+ };
16
+ //#endregion
17
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateRootProps, EmptyStateTitle };
18
+ //# sourceMappingURL=empty-state.d.cts.map
@@ -0,0 +1,18 @@
1
+ import { ComponentPropsWithoutRef } from "react";
2
+ //#region src/components/empty-state/empty-state.d.ts
3
+ type EmptyStateRootProps = ComponentPropsWithoutRef<"section">;
4
+ declare const EmptyStateRoot: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
5
+ declare const EmptyStateIcon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
6
+ declare const EmptyStateTitle: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
7
+ declare const EmptyStateDescription: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
8
+ declare const EmptyStateAction: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
+ declare const EmptyState: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
10
+ Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
11
+ Icon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
12
+ Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
13
+ Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
14
+ Action: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
+ };
16
+ //#endregion
17
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateRootProps, EmptyStateTitle };
18
+ //# sourceMappingURL=empty-state.d.ts.map
@@ -0,0 +1,57 @@
1
+ import { cx } from "../../styled-system/css/cx.js";
2
+ import { emptyState } from "../../styled-system/recipes/empty-state.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/empty-state/empty-state.tsx
6
+ const EmptyStateRoot = forwardRef(function EmptyStateRoot({ className, ...props }, ref) {
7
+ return /* @__PURE__ */ jsx("section", {
8
+ ...props,
9
+ ref,
10
+ className: cx(emptyState().root, className),
11
+ "data-jaci-component": "empty-state",
12
+ "data-slot": "empty-state"
13
+ });
14
+ });
15
+ const EmptyStateIcon = forwardRef(function EmptyStateIcon({ className, ...props }, ref) {
16
+ return /* @__PURE__ */ jsx("div", {
17
+ ...props,
18
+ ref,
19
+ className: cx(emptyState().icon, className),
20
+ "data-slot": "empty-state-icon"
21
+ });
22
+ });
23
+ const EmptyStateTitle = forwardRef(function EmptyStateTitle({ className, ...props }, ref) {
24
+ return /* @__PURE__ */ jsx("h3", {
25
+ ...props,
26
+ ref,
27
+ className: cx(emptyState().title, className),
28
+ "data-slot": "empty-state-title"
29
+ });
30
+ });
31
+ const EmptyStateDescription = forwardRef(function EmptyStateDescription({ className, ...props }, ref) {
32
+ return /* @__PURE__ */ jsx("p", {
33
+ ...props,
34
+ ref,
35
+ className: cx(emptyState().description, className),
36
+ "data-slot": "empty-state-description"
37
+ });
38
+ });
39
+ const EmptyStateAction = forwardRef(function EmptyStateAction({ className, ...props }, ref) {
40
+ return /* @__PURE__ */ jsx("div", {
41
+ ...props,
42
+ ref,
43
+ className: cx(emptyState().action, className),
44
+ "data-slot": "empty-state-action"
45
+ });
46
+ });
47
+ const EmptyState = Object.assign(EmptyStateRoot, {
48
+ Root: EmptyStateRoot,
49
+ Icon: EmptyStateIcon,
50
+ Title: EmptyStateTitle,
51
+ Description: EmptyStateDescription,
52
+ Action: EmptyStateAction
53
+ });
54
+ //#endregion
55
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateTitle };
56
+
57
+ //# sourceMappingURL=empty-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"empty-state.js","names":[],"sources":["../../../src/components/empty-state/empty-state.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { emptyState } from \"../../styled-system/recipes\";\n\nexport type EmptyStateRootProps = ComponentPropsWithoutRef<\"section\">;\n\nexport const EmptyStateRoot = forwardRef<HTMLElement, EmptyStateRootProps>(function EmptyStateRoot(\n { className, ...props },\n ref,\n) {\n return (\n <section\n {...props}\n ref={ref}\n className={cx(emptyState().root, className)}\n data-jaci-component=\"empty-state\"\n data-slot=\"empty-state\"\n />\n );\n});\n\nexport const EmptyStateIcon = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function EmptyStateIcon({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(emptyState().icon, className)}\n data-slot=\"empty-state-icon\"\n />\n );\n },\n);\n\nexport const EmptyStateTitle = forwardRef<HTMLHeadingElement, ComponentPropsWithoutRef<\"h3\">>(\n function EmptyStateTitle({ className, ...props }, ref) {\n return (\n <h3\n {...props}\n ref={ref}\n className={cx(emptyState().title, className)}\n data-slot=\"empty-state-title\"\n />\n );\n },\n);\n\nexport const EmptyStateDescription = forwardRef<\n HTMLParagraphElement,\n ComponentPropsWithoutRef<\"p\">\n>(function EmptyStateDescription({ className, ...props }, ref) {\n return (\n <p\n {...props}\n ref={ref}\n className={cx(emptyState().description, className)}\n data-slot=\"empty-state-description\"\n />\n );\n});\n\nexport const EmptyStateAction = forwardRef<HTMLDivElement, ComponentPropsWithoutRef<\"div\">>(\n function EmptyStateAction({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(emptyState().action, className)}\n data-slot=\"empty-state-action\"\n />\n );\n },\n);\n\nexport const EmptyState = Object.assign(EmptyStateRoot, {\n Root: EmptyStateRoot,\n Icon: EmptyStateIcon,\n Title: EmptyStateTitle,\n Description: EmptyStateDescription,\n Action: EmptyStateAction,\n});\n"],"mappings":";;;;;AAQA,MAAa,iBAAiB,WAA6C,SAAS,eAClF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,WAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,oBAAC,MAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,wBAAwB,WAGnC,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC7D,OACE,oBAAC,KAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,aAAa,SAAS;EACjD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,mBAAmB,WAC9B,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,QAAQ,SAAS;EAC5C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,MAAM;CACN,OAAO;CACP,aAAa;CACb,QAAQ;AACV,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateRootProps, EmptyStateTitle } from "./empty-state.cjs";
2
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, type EmptyStateRootProps, EmptyStateTitle };
@@ -0,0 +1,2 @@
1
+ import { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, EmptyStateRootProps, EmptyStateTitle } from "./empty-state.js";
2
+ export { EmptyState, EmptyStateAction, EmptyStateDescription, EmptyStateIcon, EmptyStateRoot, type EmptyStateRootProps, EmptyStateTitle };
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ const require_cx = require("../../styled-system/css/cx.cjs");
3
+ const require_icon_button = require("../../styled-system/recipes/icon-button.cjs");
4
+ const require_index = require("../layout/index.cjs");
5
+ let react = require("react");
6
+ let react_jsx_runtime = require("react/jsx-runtime");
7
+ //#region src/components/icon-button/icon-button.tsx
8
+ function hasTextualContent(children) {
9
+ if (typeof children === "string" || typeof children === "number") return String(children).trim().length > 0;
10
+ return react.Children.toArray(children).some((child) => {
11
+ if (!(0, react.isValidElement)(child)) return false;
12
+ return hasTextualContent(child.props.children);
13
+ });
14
+ }
15
+ const IconButton = (0, react.forwardRef)(function IconButton({ children, className, disabled, loading = false, size = "md", variant = "outline", ...props }, ref) {
16
+ if (!hasTextualContent(children) && !props["aria-label"] && !props["aria-labelledby"]) throw new Error("IconButton requires an aria-label when it has no textual content.");
17
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
18
+ ...props,
19
+ ref,
20
+ "aria-busy": loading || void 0,
21
+ className: require_cx.cx(require_icon_button.iconButton({
22
+ size,
23
+ variant
24
+ }), className),
25
+ "data-jaci-component": "icon-button",
26
+ "data-loading": loading || void 0,
27
+ "data-slot": "icon-button",
28
+ disabled: disabled || loading,
29
+ type: props.type ?? "button",
30
+ children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_index.Spinner, {
31
+ "aria-hidden": "true",
32
+ label: "",
33
+ size: "sm"
34
+ }) : children
35
+ });
36
+ });
37
+ //#endregion
38
+ exports.IconButton = IconButton;
39
+
40
+ //# sourceMappingURL=icon-button.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.cjs","names":["Children","cx","iconButton","Spinner"],"sources":["../../../src/components/icon-button/icon-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { Children, forwardRef, isValidElement } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { iconButton } from \"../../styled-system/recipes\";\nimport { Spinner } from \"../layout\";\n\nexport interface IconButtonProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"children\" | \"color\"> {\n children?: ReactNode;\n variant?: \"solid\" | \"outline\" | \"ghost\" | \"danger\";\n size?: \"sm\" | \"md\" | \"lg\";\n loading?: boolean;\n}\n\nfunction hasTextualContent(children: ReactNode): boolean {\n if (typeof children === \"string\" || typeof children === \"number\") {\n return String(children).trim().length > 0;\n }\n\n return Children.toArray(children).some((child) => {\n if (!isValidElement(child)) return false;\n return hasTextualContent((child.props as { children?: ReactNode }).children);\n });\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { children, className, disabled, loading = false, size = \"md\", variant = \"outline\", ...props },\n ref,\n) {\n if (!hasTextualContent(children) && !props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n throw new Error(\"IconButton requires an aria-label when it has no textual content.\");\n }\n\n return (\n <button\n {...props}\n ref={ref}\n aria-busy={loading || undefined}\n className={cx(iconButton({ size, variant }), className)}\n data-jaci-component=\"icon-button\"\n data-loading={loading || undefined}\n data-slot=\"icon-button\"\n disabled={disabled || loading}\n type={props.type ?? \"button\"}\n >\n {loading ? <Spinner aria-hidden=\"true\" label=\"\" size=\"sm\" /> : children}\n </button>\n );\n});\n"],"mappings":";;;;;;;AAiBA,SAAS,kBAAkB,UAA8B;CACvD,IAAI,OAAO,aAAa,YAAY,OAAO,aAAa,UACtD,OAAO,OAAO,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS;CAG1C,OAAOA,MAAAA,SAAS,QAAQ,QAAQ,CAAC,CAAC,MAAM,UAAU;EAChD,IAAI,EAAA,GAAA,MAAA,eAAA,CAAgB,KAAK,GAAG,OAAO;EACnC,OAAO,kBAAmB,MAAM,MAAmC,QAAQ;CAC7E,CAAC;AACH;AAEA,MAAa,cAAA,GAAA,MAAA,WAAA,CAA4D,SAAS,WAChF,EAAE,UAAU,WAAW,UAAU,UAAU,OAAO,OAAO,MAAM,UAAU,WAAW,GAAG,SACvF,KACA;CACA,IAAI,CAAC,kBAAkB,QAAQ,KAAK,CAAC,MAAM,iBAAiB,CAAC,MAAM,oBACjE,MAAM,IAAI,MAAM,mEAAmE;CAGrF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EACE,GAAI;EACC;EACL,aAAW,WAAW,KAAA;EACtB,WAAWC,WAAAA,GAAGC,oBAAAA,WAAW;GAAE;GAAM;EAAQ,CAAC,GAAG,SAAS;EACtD,uBAAoB;EACpB,gBAAc,WAAW,KAAA;EACzB,aAAU;EACV,UAAU,YAAY;EACtB,MAAM,MAAM,QAAQ;YAEnB,UAAU,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,SAAD;GAAS,eAAY;GAAO,OAAM;GAAG,MAAK;EAAM,CAAA,IAAI;CACzD,CAAA;AAEZ,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ //#region src/components/icon-button/icon-button.d.ts
3
+ interface IconButtonProps extends Omit<ComponentPropsWithoutRef<"button">, "children" | "color"> {
4
+ children?: ReactNode;
5
+ variant?: "solid" | "outline" | "ghost" | "danger";
6
+ size?: "sm" | "md" | "lg";
7
+ loading?: boolean;
8
+ }
9
+ declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
10
+ //#endregion
11
+ export { IconButton, IconButtonProps };
12
+ //# sourceMappingURL=icon-button.d.cts.map
@@ -0,0 +1,12 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ //#region src/components/icon-button/icon-button.d.ts
3
+ interface IconButtonProps extends Omit<ComponentPropsWithoutRef<"button">, "children" | "color"> {
4
+ children?: ReactNode;
5
+ variant?: "solid" | "outline" | "ghost" | "danger";
6
+ size?: "sm" | "md" | "lg";
7
+ loading?: boolean;
8
+ }
9
+ declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
10
+ //#endregion
11
+ export { IconButton, IconButtonProps };
12
+ //# sourceMappingURL=icon-button.d.ts.map
@@ -0,0 +1,40 @@
1
+ "use client";
2
+ import { cx } from "../../styled-system/css/cx.js";
3
+ import { iconButton } from "../../styled-system/recipes/icon-button.js";
4
+ import { Spinner } from "../layout/index.js";
5
+ import { Children, forwardRef, isValidElement } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ //#region src/components/icon-button/icon-button.tsx
8
+ function hasTextualContent(children) {
9
+ if (typeof children === "string" || typeof children === "number") return String(children).trim().length > 0;
10
+ return Children.toArray(children).some((child) => {
11
+ if (!isValidElement(child)) return false;
12
+ return hasTextualContent(child.props.children);
13
+ });
14
+ }
15
+ const IconButton = forwardRef(function IconButton({ children, className, disabled, loading = false, size = "md", variant = "outline", ...props }, ref) {
16
+ if (!hasTextualContent(children) && !props["aria-label"] && !props["aria-labelledby"]) throw new Error("IconButton requires an aria-label when it has no textual content.");
17
+ return /* @__PURE__ */ jsx("button", {
18
+ ...props,
19
+ ref,
20
+ "aria-busy": loading || void 0,
21
+ className: cx(iconButton({
22
+ size,
23
+ variant
24
+ }), className),
25
+ "data-jaci-component": "icon-button",
26
+ "data-loading": loading || void 0,
27
+ "data-slot": "icon-button",
28
+ disabled: disabled || loading,
29
+ type: props.type ?? "button",
30
+ children: loading ? /* @__PURE__ */ jsx(Spinner, {
31
+ "aria-hidden": "true",
32
+ label: "",
33
+ size: "sm"
34
+ }) : children
35
+ });
36
+ });
37
+ //#endregion
38
+ export { IconButton };
39
+
40
+ //# sourceMappingURL=icon-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button.js","names":[],"sources":["../../../src/components/icon-button/icon-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { Children, forwardRef, isValidElement } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { iconButton } from \"../../styled-system/recipes\";\nimport { Spinner } from \"../layout\";\n\nexport interface IconButtonProps\n extends Omit<ComponentPropsWithoutRef<\"button\">, \"children\" | \"color\"> {\n children?: ReactNode;\n variant?: \"solid\" | \"outline\" | \"ghost\" | \"danger\";\n size?: \"sm\" | \"md\" | \"lg\";\n loading?: boolean;\n}\n\nfunction hasTextualContent(children: ReactNode): boolean {\n if (typeof children === \"string\" || typeof children === \"number\") {\n return String(children).trim().length > 0;\n }\n\n return Children.toArray(children).some((child) => {\n if (!isValidElement(child)) return false;\n return hasTextualContent((child.props as { children?: ReactNode }).children);\n });\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(function IconButton(\n { children, className, disabled, loading = false, size = \"md\", variant = \"outline\", ...props },\n ref,\n) {\n if (!hasTextualContent(children) && !props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n throw new Error(\"IconButton requires an aria-label when it has no textual content.\");\n }\n\n return (\n <button\n {...props}\n ref={ref}\n aria-busy={loading || undefined}\n className={cx(iconButton({ size, variant }), className)}\n data-jaci-component=\"icon-button\"\n data-loading={loading || undefined}\n data-slot=\"icon-button\"\n disabled={disabled || loading}\n type={props.type ?? \"button\"}\n >\n {loading ? <Spinner aria-hidden=\"true\" label=\"\" size=\"sm\" /> : children}\n </button>\n );\n});\n"],"mappings":";;;;;;;AAiBA,SAAS,kBAAkB,UAA8B;CACvD,IAAI,OAAO,aAAa,YAAY,OAAO,aAAa,UACtD,OAAO,OAAO,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS;CAG1C,OAAO,SAAS,QAAQ,QAAQ,CAAC,CAAC,MAAM,UAAU;EAChD,IAAI,CAAC,eAAe,KAAK,GAAG,OAAO;EACnC,OAAO,kBAAmB,MAAM,MAAmC,QAAQ;CAC7E,CAAC;AACH;AAEA,MAAa,aAAa,WAA+C,SAAS,WAChF,EAAE,UAAU,WAAW,UAAU,UAAU,OAAO,OAAO,MAAM,UAAU,WAAW,GAAG,SACvF,KACA;CACA,IAAI,CAAC,kBAAkB,QAAQ,KAAK,CAAC,MAAM,iBAAiB,CAAC,MAAM,oBACjE,MAAM,IAAI,MAAM,mEAAmE;CAGrF,OACE,oBAAC,UAAD;EACE,GAAI;EACC;EACL,aAAW,WAAW,KAAA;EACtB,WAAW,GAAG,WAAW;GAAE;GAAM;EAAQ,CAAC,GAAG,SAAS;EACtD,uBAAoB;EACpB,gBAAc,WAAW,KAAA;EACzB,aAAU;EACV,UAAU,YAAY;EACtB,MAAM,MAAM,QAAQ;YAEnB,UAAU,oBAAC,SAAD;GAAS,eAAY;GAAO,OAAM;GAAG,MAAK;EAAM,CAAA,IAAI;CACzD,CAAA;AAEZ,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { IconButton, IconButtonProps } from "./icon-button.cjs";
2
+ export { IconButton, type IconButtonProps };
@@ -0,0 +1,2 @@
1
+ import { IconButton, IconButtonProps } from "./icon-button.js";
2
+ export { IconButton, type IconButtonProps };
@@ -0,0 +1,2 @@
1
+ import { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupRoot, InputGroupRootProps } from "./input-group.cjs";
2
+ export { InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupRoot, type InputGroupRootProps };
@@ -0,0 +1,2 @@
1
+ import { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupRoot, InputGroupRootProps } from "./input-group.js";
2
+ export { InputGroup, InputGroupAddon, type InputGroupAddonProps, InputGroupRoot, type InputGroupRootProps };
@@ -0,0 +1,32 @@
1
+ const require_cx = require("../../styled-system/css/cx.cjs");
2
+ const require_input_group = require("../../styled-system/recipes/input-group.cjs");
3
+ let react = require("react");
4
+ let react_jsx_runtime = require("react/jsx-runtime");
5
+ //#region src/components/input-group/input-group.tsx
6
+ const InputGroupRoot = (0, react.forwardRef)(function InputGroupRoot({ className, ...props }, ref) {
7
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
8
+ ...props,
9
+ ref,
10
+ className: require_cx.cx(require_input_group.inputGroup().root, className),
11
+ "data-jaci-component": "input-group",
12
+ "data-slot": "input-group"
13
+ });
14
+ });
15
+ const InputGroupAddon = (0, react.forwardRef)(function InputGroupAddon({ className, ...props }, ref) {
16
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
17
+ ...props,
18
+ ref,
19
+ className: require_cx.cx(require_input_group.inputGroup().addon, className),
20
+ "data-slot": "input-group-addon"
21
+ });
22
+ });
23
+ const InputGroup = Object.assign(InputGroupRoot, {
24
+ Root: InputGroupRoot,
25
+ Addon: InputGroupAddon
26
+ });
27
+ //#endregion
28
+ exports.InputGroup = InputGroup;
29
+ exports.InputGroupAddon = InputGroupAddon;
30
+ exports.InputGroupRoot = InputGroupRoot;
31
+
32
+ //# sourceMappingURL=input-group.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.cjs","names":["cx","inputGroup"],"sources":["../../../src/components/input-group/input-group.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { inputGroup } from \"../../styled-system/recipes\";\n\nexport interface InputGroupRootProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\n\nexport const InputGroupRoot = forwardRef<HTMLDivElement, InputGroupRootProps>(\n function InputGroupRoot({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(inputGroup().root, className)}\n data-jaci-component=\"input-group\"\n data-slot=\"input-group\"\n />\n );\n },\n);\n\nexport type InputGroupAddonProps = ComponentPropsWithoutRef<\"span\">;\nexport const InputGroupAddon = forwardRef<HTMLSpanElement, InputGroupAddonProps>(\n function InputGroupAddon({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(inputGroup().addon, className)}\n data-slot=\"input-group-addon\"\n />\n );\n },\n);\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n Root: InputGroupRoot,\n Addon: InputGroupAddon,\n});\n"],"mappings":";;;;;AAUA,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,mBAAA,GAAA,MAAA,WAAA,CACX,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,OAAO;AACT,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ //#region src/components/input-group/input-group.d.ts
3
+ interface InputGroupRootProps extends ComponentPropsWithoutRef<"div"> {
4
+ children?: ReactNode;
5
+ }
6
+ declare const InputGroupRoot: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ type InputGroupAddonProps = ComponentPropsWithoutRef<"span">;
8
+ declare const InputGroupAddon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
9
+ declare const InputGroup: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>> & {
10
+ Root: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ Addon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
12
+ };
13
+ //#endregion
14
+ export { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupRoot, InputGroupRootProps };
15
+ //# sourceMappingURL=input-group.d.cts.map
@@ -0,0 +1,15 @@
1
+ import { ComponentPropsWithoutRef, ReactNode } from "react";
2
+ //#region src/components/input-group/input-group.d.ts
3
+ interface InputGroupRootProps extends ComponentPropsWithoutRef<"div"> {
4
+ children?: ReactNode;
5
+ }
6
+ declare const InputGroupRoot: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ type InputGroupAddonProps = ComponentPropsWithoutRef<"span">;
8
+ declare const InputGroupAddon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
9
+ declare const InputGroup: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>> & {
10
+ Root: import("react").ForwardRefExoticComponent<InputGroupRootProps & import("react").RefAttributes<HTMLDivElement>>;
11
+ Addon: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
12
+ };
13
+ //#endregion
14
+ export { InputGroup, InputGroupAddon, InputGroupAddonProps, InputGroupRoot, InputGroupRootProps };
15
+ //# sourceMappingURL=input-group.d.ts.map
@@ -0,0 +1,30 @@
1
+ import { cx } from "../../styled-system/css/cx.js";
2
+ import { inputGroup } from "../../styled-system/recipes/input-group.js";
3
+ import { forwardRef } from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ //#region src/components/input-group/input-group.tsx
6
+ const InputGroupRoot = forwardRef(function InputGroupRoot({ className, ...props }, ref) {
7
+ return /* @__PURE__ */ jsx("div", {
8
+ ...props,
9
+ ref,
10
+ className: cx(inputGroup().root, className),
11
+ "data-jaci-component": "input-group",
12
+ "data-slot": "input-group"
13
+ });
14
+ });
15
+ const InputGroupAddon = forwardRef(function InputGroupAddon({ className, ...props }, ref) {
16
+ return /* @__PURE__ */ jsx("span", {
17
+ ...props,
18
+ ref,
19
+ className: cx(inputGroup().addon, className),
20
+ "data-slot": "input-group-addon"
21
+ });
22
+ });
23
+ const InputGroup = Object.assign(InputGroupRoot, {
24
+ Root: InputGroupRoot,
25
+ Addon: InputGroupAddon
26
+ });
27
+ //#endregion
28
+ export { InputGroup, InputGroupAddon, InputGroupRoot };
29
+
30
+ //# sourceMappingURL=input-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-group.js","names":[],"sources":["../../../src/components/input-group/input-group.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { inputGroup } from \"../../styled-system/recipes\";\n\nexport interface InputGroupRootProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\n\nexport const InputGroupRoot = forwardRef<HTMLDivElement, InputGroupRootProps>(\n function InputGroupRoot({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(inputGroup().root, className)}\n data-jaci-component=\"input-group\"\n data-slot=\"input-group\"\n />\n );\n },\n);\n\nexport type InputGroupAddonProps = ComponentPropsWithoutRef<\"span\">;\nexport const InputGroupAddon = forwardRef<HTMLSpanElement, InputGroupAddonProps>(\n function InputGroupAddon({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(inputGroup().addon, className)}\n data-slot=\"input-group-addon\"\n />\n );\n },\n);\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n Root: InputGroupRoot,\n Addon: InputGroupAddon,\n});\n"],"mappings":";;;;;AAUA,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,kBAAkB,WAC7B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,oBAAC,QAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,OAAO;AACT,CAAC"}