@seanyeh77/ui 0.46.0 → 0.47.1

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 (65) hide show
  1. package/dist/bundle.js +16 -16
  2. package/dist/components/Badge/Badge.d.ts +4 -4
  3. package/dist/components/Badge/Badge.js +7 -1
  4. package/dist/components/Badge/Badge.js.map +1 -1
  5. package/dist/components/Breadcrumb/Breadcrumb.js +1 -0
  6. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  7. package/dist/components/DataTable/DataTable.js +19 -4
  8. package/dist/components/DataTable/DataTable.js.map +1 -1
  9. package/dist/components/EmptyState/EmptyState.js +19 -1
  10. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  11. package/dist/components/InlineCode/InlineCode.js +1 -1
  12. package/dist/components/InlineCode/InlineCode.js.map +1 -1
  13. package/dist/components/KpiCard/KpiCard.d.ts +2 -2
  14. package/dist/components/KpiCard/KpiCard.js +1 -1
  15. package/dist/components/KpiCard/KpiCard.js.map +1 -1
  16. package/dist/components/LayerGraph/LayerGraph.js +5 -5
  17. package/dist/components/LayerGraph/LayerGraph.js.map +1 -1
  18. package/dist/components/MultiSelect/MultiSelect.js +1 -0
  19. package/dist/components/MultiSelect/MultiSelect.js.map +1 -1
  20. package/dist/components/SettingsLayout/SettingsLayout.js +3 -1
  21. package/dist/components/SettingsLayout/SettingsLayout.js.map +1 -1
  22. package/dist/components/TextField/TextField.d.ts +8 -2
  23. package/dist/components/TextField/TextField.js +65 -13
  24. package/dist/components/TextField/TextField.js.map +1 -1
  25. package/dist/css/Alert.css +9 -1
  26. package/dist/css/DataTable.css +27 -2
  27. package/dist/css/EmptyState.css +4 -4
  28. package/dist/css/EventTimeline.css +3 -1
  29. package/dist/css/LayerGraph.css +1 -1
  30. package/dist/css/LoadingBar.css +4 -1
  31. package/dist/css/MobileTabBar.css +6 -4
  32. package/dist/css/SettingsLayout.css +1 -0
  33. package/dist/css/Tabs.css +15 -2
  34. package/dist/css/base.css +86 -3
  35. package/dist/css/end.css +3 -1
  36. package/dist/i18n.js +1 -0
  37. package/dist/i18n.js.map +1 -1
  38. package/dist/icons/Icon.d.ts +2 -1
  39. package/dist/icons/Icon.js +4 -3
  40. package/dist/icons/Icon.js.map +1 -1
  41. package/dist/icons/store.d.ts +3 -1
  42. package/dist/icons/store.js +17 -12
  43. package/dist/icons/store.js.map +1 -1
  44. package/dist/index.d.ts +2 -2
  45. package/dist/index.js +2 -2
  46. package/dist/internal/util.js +4 -3
  47. package/dist/internal/util.js.map +1 -1
  48. package/dist/styles.css +248 -109
  49. package/dist/theme.d.ts +7 -0
  50. package/dist/theme.js +39 -15
  51. package/dist/theme.js.map +1 -1
  52. package/docs/Badge.md +2 -1
  53. package/docs/DataTable.md +1 -1
  54. package/docs/EmptyState.md +1 -1
  55. package/docs/EventTimeline.md +1 -1
  56. package/docs/Graph.md +1 -1
  57. package/docs/KpiCard.md +1 -1
  58. package/docs/LoadingBar.md +1 -1
  59. package/docs/MobileTabBar.md +1 -1
  60. package/docs/MultiSelect.md +1 -1
  61. package/docs/Tabs.md +10 -9
  62. package/docs/TextField.md +2 -0
  63. package/docs/agents.md +6 -6
  64. package/docs/theme.md +5 -2
  65. package/package.json +2 -2
@@ -3,9 +3,9 @@ import * as React from "react";
3
3
  export type BadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';
4
4
  /** The five work states: draft, doing, review, done and fail. */
5
5
  export type BadgeStatus = 'draft' | 'doing' | 'review' | 'done' | 'fail';
6
- /** Every preset: the work states, closed for a state that ended without a result (已取消, 已停用), and online and
7
- * offline for monitoring. */
8
- export type BadgePreset = BadgeStatus | 'closed' | 'online' | 'offline';
6
+ /** Every preset: the work states, closed for a state that ended without a result (已取消, 已停用), paused for one on
7
+ * hold that can resume (已暫停, 已停權), and online and offline for monitoring. */
8
+ export type BadgePreset = BadgeStatus | 'closed' | 'paused' | 'online' | 'offline';
9
9
  interface BadgeBase {
10
10
  /** Colour of the mark (and of the text for warning and danger). Default: the preset's, or 'neutral'. */
11
11
  tone?: BadgeTone;
@@ -17,7 +17,7 @@ interface BadgeBase {
17
17
  export type BadgeProps = BadgeBase & ({
18
18
  /** A preset: its name, tone and mark. */
19
19
  status: BadgePreset;
20
- /** Default: the preset's name (草稿, 進行中, 審核中, 完成, 失敗, 已關閉, 在線, 離線). */
20
+ /** Default: the preset's name (草稿, 進行中, 審核中, 完成, 失敗, 已關閉, 已暫停, 在線, 離線). */
21
21
  children?: React.ReactNode;
22
22
  } | {
23
23
  status?: undefined;
@@ -35,6 +35,11 @@ const STATUS = {
35
35
  tone: "neutral",
36
36
  mark: "dash"
37
37
  },
38
+ paused: {
39
+ label: "已暫停",
40
+ tone: "warning",
41
+ mark: "pause"
42
+ },
38
43
  online: {
39
44
  label: "在線",
40
45
  tone: "success",
@@ -64,7 +69,8 @@ const STROKE = {
64
69
  bang: "M12 7.5v5.5M12 16.4v.2",
65
70
  cross: "M9 9l6 6M15 9l-6 6",
66
71
  dash: "M8.5 12h7",
67
- slash: "M6.5 17.5l11-11"
72
+ slash: "M6.5 17.5l11-11",
73
+ pause: "M10 8.5v7M14 8.5v7"
68
74
  };
69
75
  /** The status of an item: a mark and text, no chip. The mark's shape carries the meaning too, never colour alone. */
70
76
  function Badge({ status, tone, variant, children, className }) {
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","names":[],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { tr } from '../../i18n';\nimport { cx } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\n\n/** The meaning of a status: its colour, and its mark's shape when no preset gives one. */\nexport type BadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';\n\n/** The five work states: draft, doing, review, done and fail. */\nexport type BadgeStatus = 'draft' | 'doing' | 'review' | 'done' | 'fail';\n/** Every preset: the work states, closed for a state that ended without a result (已取消, 已停用), and online and\n * offline for monitoring. */\nexport type BadgePreset = BadgeStatus | 'closed' | 'online' | 'offline';\n\ntype Mark = 'ring' | 'half' | 'quarter' | 'full' | 'bang' | 'cross' | 'dash' | 'slash';\n\nconst STATUS: Record<BadgePreset, { label: string; tone: BadgeTone; mark: Mark }> = {\n draft: { label: '草稿', tone: 'neutral', mark: 'ring' },\n doing: { label: '進行中', tone: 'info', mark: 'half' },\n review: { label: '審核中', tone: 'warning', mark: 'quarter' },\n done: { label: '完成', tone: 'success', mark: 'full' },\n fail: { label: '失敗', tone: 'danger', mark: 'cross' },\n closed: { label: '已關閉', tone: 'neutral', mark: 'dash' },\n online: { label: '在線', tone: 'success', mark: 'full' },\n offline: { label: '離線', tone: 'neutral', mark: 'slash' },\n};\n\n/** The mark of a tone without a preset: the shape tells the meaning too, never colour alone. */\nconst TONE_MARK: Record<BadgeTone, Mark> = { neutral: 'ring', info: 'half', success: 'full', warning: 'bang', danger: 'cross' };\n\n/** Inside the 24 px ring (r 8): filled paths, then stroked ones. */\nconst FILL: Partial<Record<Mark, string>> = {\n half: 'M12 4a8 8 0 0 1 0 16z',\n quarter: 'M12 4a8 8 0 0 1 8 8h-8z',\n full: 'M12 4a8 8 0 1 1 0 16a8 8 0 1 1 0-16z',\n};\nconst STROKE: Partial<Record<Mark, string>> = {\n bang: 'M12 7.5v5.5M12 16.4v.2',\n cross: 'M9 9l6 6M15 9l-6 6',\n dash: 'M8.5 12h7',\n slash: 'M6.5 17.5l11-11',\n};\n\ninterface BadgeBase {\n /** Colour of the mark (and of the text for warning and danger). Default: the preset's, or 'neutral'. */\n tone?: BadgeTone;\n /** @deprecated Every Badge is now a mark and text without a chip; remove the prop. */\n variant?: 'chip' | 'dot';\n /** Extra class on the root element. */\n className?: string;\n}\n\nexport type BadgeProps = BadgeBase &\n (\n | {\n /** A preset: its name, tone and mark. */\n status: BadgePreset;\n /** Default: the preset's name (草稿, 進行中, 審核中, 完成, 失敗, 已關閉, 在線, 離線). */\n children?: React.ReactNode;\n }\n | {\n status?: undefined;\n /** The text; required without a preset. */\n children: React.ReactNode;\n }\n );\n\n/** The status of an item: a mark and text, no chip. The mark's shape carries the meaning too, never colour alone. */\nexport function Badge({ status, tone, variant, children, className }: BadgeProps) {\n devWarn(variant !== undefined, 'Badge', '`variant` is deprecated: every Badge is now a mark and text without a chip. Remove the prop.');\n const preset = status ? (STATUS[status] ?? STATUS.draft) : undefined;\n devWarn(\n !!status && !STATUS[status],\n 'Badge',\n `unknown status \"${String(status)}\"; it shows as 草稿. Use one of ${Object.keys(STATUS).join(', ')}, or give \\`tone\\` and text.`,\n );\n const t: BadgeTone = tone ?? preset?.tone ?? 'neutral';\n const mark: Mark = preset?.mark ?? TONE_MARK[t] ?? 'ring';\n devWarn(!preset && !children, 'Badge', 'a Badge without `status` has no text. Give it text as children, e.g. <Badge tone=\"success\">已付款</Badge>.');\n const key = status && STATUS[status] ? status : preset ? 'draft' : undefined;\n return (\n <span className={cx('ui-badge', 'is-' + t, key && 'ui-badge-' + key, className)}>\n <svg className=\"ui-badge-mark\" width={15} height={15} viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx={12} cy={12} r={8} fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} />\n {FILL[mark] ? <path d={FILL[mark]} fill=\"currentColor\" /> : null}\n {STROKE[mark] ? <path d={STROKE[mark]} fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} strokeLinecap=\"round\" /> : null}\n </svg>\n <span className=\"ui-badge-text\">{children || (preset ? tr(preset.label) : null)}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;AAgBA,MAAM,SAA8E;CAClF,OAAO;EAAE,OAAO;EAAM,MAAM;EAAW,MAAM;CAAO;CACpD,OAAO;EAAE,OAAO;EAAO,MAAM;EAAQ,MAAM;CAAO;CAClD,QAAQ;EAAE,OAAO;EAAO,MAAM;EAAW,MAAM;CAAU;CACzD,MAAM;EAAE,OAAO;EAAM,MAAM;EAAW,MAAM;CAAO;CACnD,MAAM;EAAE,OAAO;EAAM,MAAM;EAAU,MAAM;CAAQ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,GAAG,KAAK;KAAO,MAAK;IAAgB,CAAA,IAAI;IAC3D,OAAO,QAAQ,oBAAC,QAAD;KAAM,GAAG,OAAO;KAAO,MAAK;KAAO,QAAO;KAAe,aAAa;KAAK,eAAc;IAAS,CAAA,IAAI;GACnH;EACL,CAAA,GAAA,oBAAC,QAAD;GAAM,WAAU;GAAiB,UAAA,aAAa,SAAS,GAAG,OAAO,KAAK,IAAI;EAAY,CAAA,CAClF;;AAEV"}
1
+ {"version":3,"file":"Badge.js","names":[],"sources":["../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import type * as React from 'react';\nimport { tr } from '../../i18n';\nimport { cx } from '../../internal/util';\nimport { devWarn } from '../../internal/dev';\n\n/** The meaning of a status: its colour, and its mark's shape when no preset gives one. */\nexport type BadgeTone = 'neutral' | 'info' | 'success' | 'warning' | 'danger';\n\n/** The five work states: draft, doing, review, done and fail. */\nexport type BadgeStatus = 'draft' | 'doing' | 'review' | 'done' | 'fail';\n/** Every preset: the work states, closed for a state that ended without a result (已取消, 已停用), paused for one on\n * hold that can resume (已暫停, 已停權), and online and offline for monitoring. */\nexport type BadgePreset = BadgeStatus | 'closed' | 'paused' | 'online' | 'offline';\n\ntype Mark = 'ring' | 'half' | 'quarter' | 'full' | 'bang' | 'cross' | 'dash' | 'slash' | 'pause';\n\nconst STATUS: Record<BadgePreset, { label: string; tone: BadgeTone; mark: Mark }> = {\n draft: { label: '草稿', tone: 'neutral', mark: 'ring' },\n doing: { label: '進行中', tone: 'info', mark: 'half' },\n review: { label: '審核中', tone: 'warning', mark: 'quarter' },\n done: { label: '完成', tone: 'success', mark: 'full' },\n fail: { label: '失敗', tone: 'danger', mark: 'cross' },\n closed: { label: '已關閉', tone: 'neutral', mark: 'dash' },\n paused: { label: '已暫停', tone: 'warning', mark: 'pause' },\n online: { label: '在線', tone: 'success', mark: 'full' },\n offline: { label: '離線', tone: 'neutral', mark: 'slash' },\n};\n\n/** The mark of a tone without a preset: the shape tells the meaning too, never colour alone. */\nconst TONE_MARK: Record<BadgeTone, Mark> = { neutral: 'ring', info: 'half', success: 'full', warning: 'bang', danger: 'cross' };\n\n/** Inside the 24 px ring (r 8): filled paths, then stroked ones. */\nconst FILL: Partial<Record<Mark, string>> = {\n half: 'M12 4a8 8 0 0 1 0 16z',\n quarter: 'M12 4a8 8 0 0 1 8 8h-8z',\n full: 'M12 4a8 8 0 1 1 0 16a8 8 0 1 1 0-16z',\n};\nconst STROKE: Partial<Record<Mark, string>> = {\n bang: 'M12 7.5v5.5M12 16.4v.2',\n cross: 'M9 9l6 6M15 9l-6 6',\n dash: 'M8.5 12h7',\n slash: 'M6.5 17.5l11-11',\n pause: 'M10 8.5v7M14 8.5v7',\n};\n\ninterface BadgeBase {\n /** Colour of the mark (and of the text for warning and danger). Default: the preset's, or 'neutral'. */\n tone?: BadgeTone;\n /** @deprecated Every Badge is now a mark and text without a chip; remove the prop. */\n variant?: 'chip' | 'dot';\n /** Extra class on the root element. */\n className?: string;\n}\n\nexport type BadgeProps = BadgeBase &\n (\n | {\n /** A preset: its name, tone and mark. */\n status: BadgePreset;\n /** Default: the preset's name (草稿, 進行中, 審核中, 完成, 失敗, 已關閉, 已暫停, 在線, 離線). */\n children?: React.ReactNode;\n }\n | {\n status?: undefined;\n /** The text; required without a preset. */\n children: React.ReactNode;\n }\n );\n\n/** The status of an item: a mark and text, no chip. The mark's shape carries the meaning too, never colour alone. */\nexport function Badge({ status, tone, variant, children, className }: BadgeProps) {\n devWarn(variant !== undefined, 'Badge', '`variant` is deprecated: every Badge is now a mark and text without a chip. Remove the prop.');\n const preset = status ? (STATUS[status] ?? STATUS.draft) : undefined;\n devWarn(\n !!status && !STATUS[status],\n 'Badge',\n `unknown status \"${String(status)}\"; it shows as 草稿. Use one of ${Object.keys(STATUS).join(', ')}, or give \\`tone\\` and text.`,\n );\n const t: BadgeTone = tone ?? preset?.tone ?? 'neutral';\n const mark: Mark = preset?.mark ?? TONE_MARK[t] ?? 'ring';\n devWarn(!preset && !children, 'Badge', 'a Badge without `status` has no text. Give it text as children, e.g. <Badge tone=\"success\">已付款</Badge>.');\n const key = status && STATUS[status] ? status : preset ? 'draft' : undefined;\n return (\n <span className={cx('ui-badge', 'is-' + t, key && 'ui-badge-' + key, className)}>\n <svg className=\"ui-badge-mark\" width={15} height={15} viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx={12} cy={12} r={8} fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} />\n {FILL[mark] ? <path d={FILL[mark]} fill=\"currentColor\" /> : null}\n {STROKE[mark] ? <path d={STROKE[mark]} fill=\"none\" stroke=\"currentColor\" strokeWidth={2.5} strokeLinecap=\"round\" /> : null}\n </svg>\n <span className=\"ui-badge-text\">{children || (preset ? tr(preset.label) : null)}</span>\n </span>\n );\n}\n"],"mappings":";;;;;;AAgBA,MAAM,SAA8E;CAClF,OAAO;EAAE,OAAO;EAAM,MAAM;EAAW,MAAM;CAAO;CACpD,OAAO;EAAE,OAAO;EAAO,MAAM;EAAQ,MAAM;CAAO;CAClD,QAAQ;EAAE,OAAO;EAAO,MAAM;EAAW,MAAM;CAAU;CACzD,MAAM;EAAE,OAAO;EAAM,MAAM;EAAW,MAAM;CAAO;CACnD,MAAM;EAAE,OAAO;EAAM,MAAM;EAAU,MAAM;CAAQ;CACnD,QAAQ;EAAE,OAAO;EAAO,MAAM;EAAW,MAAM;CAAO;CACtD,QAAQ;EAAE,OAAO;EAAO,MAAM;EAAW,MAAM;CAAQ;CACvD,QAAQ;EAAE,OAAO;EAAM,MAAM;EAAW,MAAM;CAAO;CACrD,SAAS;EAAE,OAAO;EAAM,MAAM;EAAW,MAAM;CAAQ;AACzD;;AAGA,MAAM,YAAqC;CAAE,SAAS;CAAQ,MAAM;CAAQ,SAAS;CAAQ,SAAS;CAAQ,QAAQ;AAAQ;;AAG9H,MAAM,OAAsC;CAC1C,MAAM;CACN,SAAS;CACT,MAAM;AACR;AACA,MAAM,SAAwC;CAC5C,MAAM;CACN,OAAO;CACP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  }) : it.href ? /* @__PURE__ */ jsx("a", {
17
+ className: "ui-crumb-link",
17
18
  href: it.href,
18
19
  children: it.label
19
20
  }) : /* @__PURE__ */ jsx("span", { children: it.label }), last ? null : /* @__PURE__ */ jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumb.js","names":[],"sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { tr } from '../../i18n';\nimport { cx } from '../../internal/util';\n\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n}\n\nexport interface BreadcrumbProps {\n /** From the top level down; the last one is the current page. */\n items: BreadcrumbItem[];\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Where the page sits: links to each level, the current page last and not a link. */\nexport function Breadcrumb({ items, className }: BreadcrumbProps) {\n return (\n <nav className={cx('ui-crumb', className)} aria-label={tr('路徑')}>\n <ol>\n {items.map((it, i) => {\n const last = i === items.length - 1;\n return (\n <li key={i}>\n {last ? <span aria-current=\"page\">{it.label}</span> : it.href ? <a href={it.href}>{it.label}</a> : <span>{it.label}</span>}\n {last ? null : (\n <span className=\"ui-crumb-sep\" aria-hidden=\"true\">\n ›\n </span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n"],"mappings":";;;;;;AAgBA,SAAgB,WAAW,EAAE,OAAO,aAA8B;CAChE,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,YAAY,SAAS;EAAG,cAAY,GAAG,IAAI;EAC5D,UAAA,oBAAC,MAAD,EAAA,UACG,MAAM,KAAK,IAAI,MAAM;GACpB,MAAM,OAAO,MAAM,MAAM,SAAS;GAClC,OACE,qBAAC,MAAD,EAAA,UAAA,CACG,OAAO,oBAAC,QAAD;IAAM,gBAAa;IAAQ,UAAA,GAAG;GAAY,CAAA,IAAI,GAAG,OAAO,oBAAC,KAAD;IAAG,MAAM,GAAG;IAAO,UAAA,GAAG;GAAS,CAAA,IAAI,oBAAC,QAAD,EAAA,UAAO,GAAG,MAAY,CAAA,GACxH,OAAO,OACN,oBAAC,QAAD;IAAM,WAAU;IAAe,eAAY;IAAO,UAAA;GAE5C,CAAA,CAEN,EAAA,GAPK,CAOL;EAER,CAAC,EACC,CAAA;CACD,CAAA;AAET"}
1
+ {"version":3,"file":"Breadcrumb.js","names":[],"sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import { tr } from '../../i18n';\nimport { cx } from '../../internal/util';\n\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n}\n\nexport interface BreadcrumbProps {\n /** From the top level down; the last one is the current page. */\n items: BreadcrumbItem[];\n /** Extra class on the root element. */\n className?: string;\n}\n\n/** Where the page sits: links to each level, the current page last and not a link. */\nexport function Breadcrumb({ items, className }: BreadcrumbProps) {\n return (\n <nav className={cx('ui-crumb', className)} aria-label={tr('路徑')}>\n <ol>\n {items.map((it, i) => {\n const last = i === items.length - 1;\n return (\n <li key={i}>\n {last ? (\n <span aria-current=\"page\">{it.label}</span>\n ) : it.href ? (\n <a className=\"ui-crumb-link\" href={it.href}>\n {it.label}\n </a>\n ) : (\n <span>{it.label}</span>\n )}\n {last ? null : (\n <span className=\"ui-crumb-sep\" aria-hidden=\"true\">\n ›\n </span>\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n}\n"],"mappings":";;;;;;AAgBA,SAAgB,WAAW,EAAE,OAAO,aAA8B;CAChE,OACE,oBAAC,OAAD;EAAK,WAAW,GAAG,YAAY,SAAS;EAAG,cAAY,GAAG,IAAI;EAC5D,UAAA,oBAAC,MAAD,EAAA,UACG,MAAM,KAAK,IAAI,MAAM;GACpB,MAAM,OAAO,MAAM,MAAM,SAAS;GAClC,OACE,qBAAC,MAAD,EAAA,UAAA,CACG,OACC,oBAAC,QAAD;IAAM,gBAAa;IAAQ,UAAA,GAAG;GAAY,CAAA,IACxC,GAAG,OACL,oBAAC,KAAD;IAAG,WAAU;IAAgB,MAAM,GAAG;IACnC,UAAA,GAAG;GACH,CAAA,IAEH,oBAAC,QAAD,EAAA,UAAO,GAAG,MAAY,CAAA,GAEvB,OAAO,OACN,oBAAC,QAAD;IAAM,WAAU;IAAe,eAAY;IAAO,UAAA;GAE5C,CAAA,CAEN,EAAA,GAfK,CAeL;EAER,CAAC,EACC,CAAA;CACD,CAAA;AAET"}
@@ -608,13 +608,19 @@ function DataTable(p) {
608
608
  const onerow = onerowState && !narrow;
609
609
  const hasTitle = shownCols.some((c) => c.mobile === "title");
610
610
  const mobileClass = (c, ci) => {
611
- const m = c.mobile || (!hasTitle && ci === 0 ? "title" : null);
611
+ const m = c.mobile || (ci === titleIdx() ? "title" : null);
612
612
  return m ? "is-m-" + m : null;
613
613
  };
614
614
  const longCols = shownCols.filter((c) => c.long || c.fullText);
615
615
  const expander = longCols.length > 0 && !narrow && (clipped !== false || longCols.some((c) => c.fullText) || visIds.some((id) => opened[id]));
616
616
  const EXP = 40;
617
- const mainKey = (shownCols.find((c) => !isShort(c) && !c.long && c.grow !== 0) ?? shownCols[0])?.key;
617
+ const mainKey = shownCols.find((c) => !isShort(c) && !c.long && !c.mono && c.grow !== 0)?.key;
618
+ const titleIdx = () => {
619
+ if (hasTitle) return -1;
620
+ if (!shownCols[0]?.mono) return 0;
621
+ const main = shownCols.findIndex((c) => c.key === mainKey && !c.mobile);
622
+ return main < 0 ? 0 : main;
623
+ };
618
624
  const grows = (c) => c.grow != null ? c.grow > 0 : c.long || c.key === mainKey;
619
625
  const minOf = (c) => {
620
626
  if (grows(c)) return Math.max(c.width || (isNum(c) ? 96 : 120), fit[c.key] || 0, roomy ? want[c.key] || 0 : 0);
@@ -1238,7 +1244,16 @@ function DataTable(p) {
1238
1244
  "64%",
1239
1245
  "48%"
1240
1246
  ];
1241
- const widthOf = (c, i) => c.key === mainKey ? MAIN[i % MAIN.length] : c.mobile === "status" ? 64 : isDateCol(c) ? 112 : isNum(c) ? 56 : c.long ? "80%" : "60%";
1247
+ const TYPICAL = {
1248
+ date: 128,
1249
+ dateTime: 184,
1250
+ datetime: 184,
1251
+ relative: 184,
1252
+ duration: 64,
1253
+ money: 96,
1254
+ percent: 56
1255
+ };
1256
+ const widthOf = (c, i) => c.key === mainKey ? MAIN[i % MAIN.length] : c.mobile === "status" ? 64 : TYPICAL[c.format ?? ""] ?? (isNum(c) ? 56 : c.mono ? 112 : c.long ? "80%" : "60%");
1242
1257
  return [/* @__PURE__ */ jsx("div", {
1243
1258
  role: "row",
1244
1259
  className: "ui-visually-hidden",
@@ -1429,7 +1444,7 @@ function DataTable(p) {
1429
1444
  })
1430
1445
  });
1431
1446
  };
1432
- const footView = /* @__PURE__ */ jsx(Fragment, { children: pages > 1 ? /* @__PURE__ */ jsxs("div", {
1447
+ const footView = /* @__PURE__ */ jsx(Fragment, { children: pages > 1 && !p.loading ? /* @__PURE__ */ jsxs("div", {
1433
1448
  className: "ui-dt-foot",
1434
1449
  children: [/* @__PURE__ */ jsx("span", {
1435
1450
  className: "ui-dt-range",