@selectwin/kit 0.1.258 → 0.1.259

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 (40) hide show
  1. package/README.md +31 -0
  2. package/dist/SelectActionBar.d.ts +29 -0
  3. package/dist/SelectActionBar.js +101 -0
  4. package/dist/SelectBadge.d.ts +9 -0
  5. package/dist/SelectBadge.js +26 -12
  6. package/dist/SelectBulkBar.d.ts +21 -0
  7. package/dist/SelectBulkBar.js +40 -0
  8. package/dist/SelectChannelPreview.d.ts +21 -1
  9. package/dist/SelectChannelPreview.js +100 -73
  10. package/dist/SelectColorField.d.ts +1 -5
  11. package/dist/SelectColorField.js +83 -101
  12. package/dist/SelectCombobox.d.ts +5 -0
  13. package/dist/SelectCombobox.js +52 -49
  14. package/dist/SelectDataTable.d.ts +17 -1
  15. package/dist/SelectDataTable.js +100 -90
  16. package/dist/SelectDeadlineBadge.d.ts +32 -0
  17. package/dist/SelectDeadlineBadge.js +73 -0
  18. package/dist/SelectFilterBar.js +5 -5
  19. package/dist/SelectListCard.d.ts +27 -1
  20. package/dist/SelectListCard.js +47 -22
  21. package/dist/SelectLocale.d.ts +62 -0
  22. package/dist/SelectLocale.js +173 -0
  23. package/dist/SelectMail.d.ts +9 -1
  24. package/dist/SelectMail.js +234 -207
  25. package/dist/SelectSection.d.ts +4 -4
  26. package/dist/SelectSection.js +77 -8
  27. package/dist/SelectTable.d.ts +13 -1
  28. package/dist/SelectTable.js +88 -79
  29. package/dist/SelectTabs.d.ts +10 -0
  30. package/dist/SelectTabs.js +68 -30
  31. package/dist/SelectWeekHours.d.ts +64 -0
  32. package/dist/SelectWeekHours.js +338 -0
  33. package/dist/index.d.ts +12 -2
  34. package/dist/index.js +188 -183
  35. package/dist/internal/color.d.ts +15 -0
  36. package/dist/internal/color.js +40 -0
  37. package/dist/internal/safeHref.d.ts +7 -0
  38. package/dist/internal/safeHref.js +12 -1
  39. package/dist/style.css +1 -1
  40. package/package.json +1 -1
@@ -298,6 +298,68 @@ export interface SelectKitMessages {
298
298
  dropped: (name: string, position: number, total: number) => string;
299
299
  canceled: (name: string, position: number) => string;
300
300
  };
301
+ /** 0.1.259: a etiqueta que se tira (`SelectBadge onRemove`): o nome do "x" ("Tirar VIP"; sem o texto, "Tirar a etiqueta"). */
302
+ badge: {
303
+ remove: (name: string) => string;
304
+ };
305
+ /**
306
+ * 0.1.259: o editor das faixas da semana (`SelectWeekHours`): os dias (o nome inteiro, o curto das frases e o "na
307
+ * segunda-feira"), as faixas, o copiar, os problemas, os feriados e as frases do resumo ("Segunda a sexta").
308
+ */
309
+ weekHours: {
310
+ label: string;
311
+ days: Record<'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun', string>;
312
+ span: Record<'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun', string>;
313
+ openOn: (day: 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun') => string;
314
+ closed: string;
315
+ from: string;
316
+ to: string;
317
+ until: string;
318
+ rangeLabel: (day: string, n: number) => string;
319
+ removeRange: (from: string, to: string) => string;
320
+ addRange: string;
321
+ copyMenu: (day: string) => string;
322
+ copyWorkdays: string;
323
+ copyAll: string;
324
+ workdays: string;
325
+ everyDay: string;
326
+ copied: (day: string, target: string) => string;
327
+ problems: Record<'empty' | 'order' | 'overlap' | 'many', string>;
328
+ holidays: string;
329
+ holiday: (date: string, name: string) => string;
330
+ removeHoliday: (holiday: string) => string;
331
+ noHolidays: string;
332
+ date: string;
333
+ name: string;
334
+ addHoliday: string;
335
+ range: (from: string, to: string) => string;
336
+ pair: (a: string, b: string) => string;
337
+ through: (a: string, b: string) => string;
338
+ };
339
+ /** 0.1.259: a fileira de ações que nunca corta (`SelectActionBar`): o nome do menu das que não cabem. */
340
+ actionBar: {
341
+ more: string;
342
+ };
343
+ /**
344
+ * 0.1.259: o selo do prazo (`SelectDeadlineBadge`): a duração ("17 h úteis", "3 dias"), as frases de cada estado
345
+ * ("Faltam 17 h úteis", "Vencido há 2 h"), o estado sem a duração e o que o leitor de tela ouve depois do texto.
346
+ */
347
+ deadline: {
348
+ duration: (hours: number, minutes: number, business: boolean) => string;
349
+ days: (days: number) => string;
350
+ left: (duration: string, one: boolean) => string;
351
+ overdue: (duration: string) => string;
352
+ met: (duration: string) => string;
353
+ paused: (duration: string) => string;
354
+ bare: Record<'running' | 'near' | 'overdue' | 'met' | 'paused', string>;
355
+ state: Record<'running' | 'near', string>;
356
+ };
357
+ /** 0.1.259: a barra do lote (`SelectBulkBar`): o nome da região, a conta e o limpar. */
358
+ bulkBar: {
359
+ label: string;
360
+ count: (count: number) => string;
361
+ clear: string;
362
+ };
301
363
  }
302
364
  /** Os dicionários do kit, para quem quer conferir ou montar um texto do mesmo jeito. */
303
365
  export declare const selectKitMessages: Readonly<Record<SelectLocaleCode, SelectKitMessages>>;
@@ -274,6 +274,94 @@ var r = {
274
274
  moved: (e, t, n) => `${e}: posição ${t} de ${n}.`,
275
275
  dropped: (e, t, n) => `Soltou ${e} na posição ${t} de ${n}.`,
276
276
  canceled: (e, t) => `Cancelado: ${e} voltou para a posição ${t}.`
277
+ },
278
+ badge: { remove: (e) => e ? `Tirar ${e}` : "Tirar a etiqueta" },
279
+ weekHours: {
280
+ label: "Horário da semana",
281
+ days: {
282
+ mon: "Segunda-feira",
283
+ tue: "Terça-feira",
284
+ wed: "Quarta-feira",
285
+ thu: "Quinta-feira",
286
+ fri: "Sexta-feira",
287
+ sat: "Sábado",
288
+ sun: "Domingo"
289
+ },
290
+ span: {
291
+ mon: "segunda",
292
+ tue: "terça",
293
+ wed: "quarta",
294
+ thu: "quinta",
295
+ fri: "sexta",
296
+ sat: "sábado",
297
+ sun: "domingo"
298
+ },
299
+ openOn: (e) => ({
300
+ mon: "Atende na segunda-feira",
301
+ tue: "Atende na terça-feira",
302
+ wed: "Atende na quarta-feira",
303
+ thu: "Atende na quinta-feira",
304
+ fri: "Atende na sexta-feira",
305
+ sat: "Atende no sábado",
306
+ sun: "Atende no domingo"
307
+ })[e],
308
+ closed: "Fechado",
309
+ from: "Começa",
310
+ to: "Termina",
311
+ until: "às",
312
+ rangeLabel: (e, t) => `${e}, faixa ${t}`,
313
+ removeRange: (e, t) => `Tirar a faixa das ${e} às ${t}`,
314
+ addRange: "Adicionar uma faixa",
315
+ copyMenu: (e) => `Copiar o horário de ${e.toLowerCase()}`,
316
+ copyWorkdays: "Copiar para os dias úteis",
317
+ copyAll: "Copiar para todos os dias",
318
+ workdays: "os dias úteis",
319
+ everyDay: "todos os dias",
320
+ copied: (e, t) => `O horário de ${e.toLowerCase()} foi para ${t}.`,
321
+ problems: {
322
+ empty: "Preencha as duas horas de cada faixa.",
323
+ order: "Uma faixa termina antes de começar.",
324
+ overlap: "As faixas do dia se cruzam.",
325
+ many: "Faixas demais neste dia."
326
+ },
327
+ holidays: "Feriados",
328
+ holiday: (e, t) => `${e} · ${t}`,
329
+ removeHoliday: (e) => `Tirar ${e}`,
330
+ noHolidays: "Nenhuma data a mais.",
331
+ date: "Data",
332
+ name: "Nome",
333
+ addHoliday: "Adicionar a data",
334
+ range: (e, t) => `${e} às ${t}`,
335
+ pair: (e, t) => `${e.charAt(0).toUpperCase()}${e.slice(1)} e ${t}`,
336
+ through: (e, t) => `${e.charAt(0).toUpperCase()}${e.slice(1)} a ${t}`
337
+ },
338
+ actionBar: { more: "Mais ações" },
339
+ deadline: {
340
+ duration: (e, t, n) => {
341
+ let r = [e ? `${e} h` : "", t || !e ? `${t} min` : ""].filter(Boolean).join(" ");
342
+ return n ? `${r} ${e === 1 && t === 0 || e === 0 && t === 1 ? "útil" : "úteis"}` : r;
343
+ },
344
+ days: (e) => e === 1 ? "1 dia" : `${e} dias`,
345
+ left: (e, t) => `${t ? "Falta" : "Faltam"} ${e}`,
346
+ overdue: (e) => `Vencido há ${e}`,
347
+ met: (e) => `Cumprido em ${e}`,
348
+ paused: (e) => `Pausado há ${e}`,
349
+ bare: {
350
+ running: "No prazo",
351
+ near: "Perto de vencer",
352
+ overdue: "Vencido",
353
+ met: "Cumprido",
354
+ paused: "Pausado"
355
+ },
356
+ state: {
357
+ running: "no prazo",
358
+ near: "perto de vencer"
359
+ }
360
+ },
361
+ bulkBar: {
362
+ label: "Ações em lote",
363
+ count: (e) => e === 1 ? "1 selecionado" : `${p(e, "pt-BR")} selecionados`,
364
+ clear: "Limpar a seleção"
277
365
  }
278
366
  }, i = {
279
367
  common: {
@@ -548,6 +636,91 @@ var r = {
548
636
  moved: (e, t, n) => `${e}: position ${t} of ${n}.`,
549
637
  dropped: (e, t, n) => `Dropped ${e} at position ${t} of ${n}.`,
550
638
  canceled: (e, t) => `Canceled: ${e} went back to position ${t}.`
639
+ },
640
+ badge: { remove: (e) => e ? `Remove ${e}` : "Remove the label" },
641
+ weekHours: {
642
+ label: "Weekly hours",
643
+ days: {
644
+ mon: "Monday",
645
+ tue: "Tuesday",
646
+ wed: "Wednesday",
647
+ thu: "Thursday",
648
+ fri: "Friday",
649
+ sat: "Saturday",
650
+ sun: "Sunday"
651
+ },
652
+ span: {
653
+ mon: "Monday",
654
+ tue: "Tuesday",
655
+ wed: "Wednesday",
656
+ thu: "Thursday",
657
+ fri: "Friday",
658
+ sat: "Saturday",
659
+ sun: "Sunday"
660
+ },
661
+ openOn: (e) => ({
662
+ mon: "Open on Monday",
663
+ tue: "Open on Tuesday",
664
+ wed: "Open on Wednesday",
665
+ thu: "Open on Thursday",
666
+ fri: "Open on Friday",
667
+ sat: "Open on Saturday",
668
+ sun: "Open on Sunday"
669
+ })[e],
670
+ closed: "Closed",
671
+ from: "Starts",
672
+ to: "Ends",
673
+ until: "to",
674
+ rangeLabel: (e, t) => `${e}, range ${t}`,
675
+ removeRange: (e, t) => `Remove the ${e} to ${t} range`,
676
+ addRange: "Add a range",
677
+ copyMenu: (e) => `Copy ${e}'s hours`,
678
+ copyWorkdays: "Copy to weekdays",
679
+ copyAll: "Copy to every day",
680
+ workdays: "the weekdays",
681
+ everyDay: "every day",
682
+ copied: (e, t) => `${e}'s hours were copied to ${t}.`,
683
+ problems: {
684
+ empty: "Fill in both times of each range.",
685
+ order: "A range ends before it starts.",
686
+ overlap: "The day's ranges overlap.",
687
+ many: "Too many ranges on this day."
688
+ },
689
+ holidays: "Holidays",
690
+ holiday: (e, t) => `${e} · ${t}`,
691
+ removeHoliday: (e) => `Remove ${e}`,
692
+ noHolidays: "No extra dates.",
693
+ date: "Date",
694
+ name: "Name",
695
+ addHoliday: "Add the date",
696
+ range: (e, t) => `${e} to ${t}`,
697
+ pair: (e, t) => `${e} and ${t}`,
698
+ through: (e, t) => `${e} to ${t}`
699
+ },
700
+ actionBar: { more: "More actions" },
701
+ deadline: {
702
+ duration: (e, t, n) => n ? e ? t ? `${e} h ${t} min of business time` : e === 1 ? "1 business hour" : `${e} business hours` : `${t} business min` : [e ? `${e} h` : "", t || !e ? `${t} min` : ""].filter(Boolean).join(" "),
703
+ days: (e) => e === 1 ? "1 day" : `${e} days`,
704
+ left: (e) => `${e} left`,
705
+ overdue: (e) => `Overdue by ${e}`,
706
+ met: (e) => `Met in ${e}`,
707
+ paused: (e) => `Paused for ${e}`,
708
+ bare: {
709
+ running: "On time",
710
+ near: "Due soon",
711
+ overdue: "Overdue",
712
+ met: "Met",
713
+ paused: "Paused"
714
+ },
715
+ state: {
716
+ running: "on time",
717
+ near: "due soon"
718
+ }
719
+ },
720
+ bulkBar: {
721
+ label: "Bulk actions",
722
+ count: (e) => `${p(e, "en")} selected`,
723
+ clear: "Clear selection"
551
724
  }
552
725
  };
553
726
  function a(e, t) {
@@ -241,11 +241,19 @@ export declare function SelectMailComposerInput({ value, onChange, placeholder,
241
241
  maxLength?: number;
242
242
  }): import("react").JSX.Element;
243
243
  /** O corpo: texto, sem moldura, que cresce até um teto e rola. */
244
- export declare function SelectMailComposerBody({ value, onChange, placeholder, rows, 'aria-label': ariaLabel, maxLength, onEnter, id, textareaRef, onKeyDown, onSelect, fieldProps, }: {
244
+ export declare function SelectMailComposerBody({ value, onChange, placeholder, rows, autoGrow, minRows, maxRows, 'aria-label': ariaLabel, maxLength, onEnter, id, textareaRef, onKeyDown, onSelect, fieldProps, }: {
245
245
  value: string;
246
246
  onChange: (value: string) => void;
247
247
  placeholder?: string;
248
248
  rows?: number;
249
+ /**
250
+ * 0.1.259: o texto começa baixo e cresce com o que se escreve, até um teto, e só então rola (o e-mail no pé da
251
+ * conversa, o P21). `minRows` (padrão 3) é a altura do começo e `maxRows` (padrão 12), o teto; a altura acompanha a
252
+ * largura (a caixa que estreita ganha linhas). Sem ele, a caixa de sempre (`rows`, a que a pessoa estica).
253
+ */
254
+ autoGrow?: boolean;
255
+ minRows?: number;
256
+ maxRows?: number;
249
257
  'aria-label'?: string;
250
258
  maxLength?: number;
251
259
  /**