@caspeco/casper-ui-library 9.8.0 → 9.10.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 (113) hide show
  1. package/dist/_virtual/index.js +5 -0
  2. package/dist/_virtual/index2.js +4 -0
  3. package/dist/_virtual/use-sync-external-store-shim.development.js +4 -0
  4. package/dist/_virtual/use-sync-external-store-shim.production.js +4 -0
  5. package/dist/_virtual/with-selector.development.js +4 -0
  6. package/dist/_virtual/with-selector.js +5 -0
  7. package/dist/_virtual/with-selector.production.js +4 -0
  8. package/dist/_virtual/with-selector2.js +4 -0
  9. package/dist/components/button/button-recipe.d.ts.map +1 -1
  10. package/dist/components/button/button-recipe.js +80 -39
  11. package/dist/components/input/input.d.ts +1 -0
  12. package/dist/components/input/input.d.ts.map +1 -1
  13. package/dist/components/input/types.d.ts +1 -1
  14. package/dist/components/input/types.d.ts.map +1 -1
  15. package/dist/components/rich-text-editor/boolean-control.d.ts +3 -0
  16. package/dist/components/rich-text-editor/boolean-control.d.ts.map +1 -0
  17. package/dist/components/rich-text-editor/boolean-control.js +35 -0
  18. package/dist/components/rich-text-editor/extensions.d.ts +4 -0
  19. package/dist/components/rich-text-editor/extensions.d.ts.map +1 -0
  20. package/dist/components/rich-text-editor/extensions.js +37 -0
  21. package/dist/components/rich-text-editor/index.d.ts +26 -0
  22. package/dist/components/rich-text-editor/index.d.ts.map +1 -0
  23. package/dist/components/rich-text-editor/index.js +23 -0
  24. package/dist/components/rich-text-editor/rich-text-editor-context.d.ts +10 -0
  25. package/dist/components/rich-text-editor/rich-text-editor-context.d.ts.map +1 -0
  26. package/dist/components/rich-text-editor/rich-text-editor-context.js +13 -0
  27. package/dist/components/rich-text-editor/rich-text-editor-control.d.ts +11 -0
  28. package/dist/components/rich-text-editor/rich-text-editor-control.d.ts.map +1 -0
  29. package/dist/components/rich-text-editor/rich-text-editor-control.js +202 -0
  30. package/dist/components/rich-text-editor/rich-text-editor-recipe.d.ts +4 -0
  31. package/dist/components/rich-text-editor/rich-text-editor-recipe.d.ts.map +1 -0
  32. package/dist/components/rich-text-editor/rich-text-editor-recipe.js +58 -0
  33. package/dist/components/rich-text-editor/rich-text-editor.composition.d.ts +6 -0
  34. package/dist/components/rich-text-editor/rich-text-editor.composition.d.ts.map +1 -0
  35. package/dist/components/rich-text-editor/rich-text-editor.d.ts +11 -0
  36. package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -0
  37. package/dist/components/rich-text-editor/rich-text-editor.js +60 -0
  38. package/dist/components/rich-text-editor/rich-text-editor.test.d.ts +2 -0
  39. package/dist/components/rich-text-editor/rich-text-editor.test.d.ts.map +1 -0
  40. package/dist/components/rich-text-editor/rich-text-editor.visual.test.d.ts +2 -0
  41. package/dist/components/rich-text-editor/rich-text-editor.visual.test.d.ts.map +1 -0
  42. package/dist/components/rich-text-editor/rich-text-renderer.d.ts +3 -0
  43. package/dist/components/rich-text-editor/rich-text-renderer.d.ts.map +1 -0
  44. package/dist/components/rich-text-editor/rich-text-renderer.js +21 -0
  45. package/dist/components/rich-text-editor/translations.d.ts +23 -0
  46. package/dist/components/rich-text-editor/translations.d.ts.map +1 -0
  47. package/dist/components/rich-text-editor/translations.js +120 -0
  48. package/dist/components/rich-text-editor/types.d.ts +30 -0
  49. package/dist/components/rich-text-editor/types.d.ts.map +1 -0
  50. package/dist/components/rich-text-editor/use-rich-text-editor.d.ts +3 -0
  51. package/dist/components/rich-text-editor/use-rich-text-editor.d.ts.map +1 -0
  52. package/dist/components/rich-text-editor/use-rich-text-editor.js +17 -0
  53. package/dist/components/table/helper.d.ts +1 -0
  54. package/dist/components/table/helper.d.ts.map +1 -1
  55. package/dist/components/table/helper.js +8 -4
  56. package/dist/components/table/table-toolbar-settings.d.ts.map +1 -1
  57. package/dist/components/table/table-toolbar-settings.js +172 -56
  58. package/dist/components/table/translations.d.ts +14 -0
  59. package/dist/components/table/translations.d.ts.map +1 -1
  60. package/dist/components/table/translations.js +21 -9
  61. package/dist/components/toggle-button/toggle-button.d.ts.map +1 -1
  62. package/dist/components/toggle-button/toggle-button.js +11 -11
  63. package/dist/components/toggle-button/types.d.ts +2 -0
  64. package/dist/components/toggle-button/types.d.ts.map +1 -1
  65. package/dist/index.d.ts +1 -0
  66. package/dist/index.d.ts.map +1 -1
  67. package/dist/index.js +774 -763
  68. package/dist/node_modules/@dnd-kit/dom/index.js +13 -13
  69. package/dist/node_modules/@dnd-kit/dom/sortable.js +36 -32
  70. package/dist/node_modules/@dnd-kit/react/sortable.js +11 -10
  71. package/dist/node_modules/@dnd-kit/state/dist/index.js +1 -1
  72. package/dist/node_modules/@tiptap/core/dist/index.js +3792 -0
  73. package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +17 -0
  74. package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +62 -0
  75. package/dist/node_modules/@tiptap/extension-bold/dist/index.js +85 -0
  76. package/dist/node_modules/@tiptap/extension-code/dist/index.js +54 -0
  77. package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +217 -0
  78. package/dist/node_modules/@tiptap/extension-document/dist/index.js +12 -0
  79. package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +59 -0
  80. package/dist/node_modules/@tiptap/extension-heading/dist/index.js +63 -0
  81. package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +56 -0
  82. package/dist/node_modules/@tiptap/extension-italic/dist/index.js +83 -0
  83. package/dist/node_modules/@tiptap/extension-link/dist/index.js +313 -0
  84. package/dist/node_modules/@tiptap/extension-list/dist/index.js +785 -0
  85. package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +49 -0
  86. package/dist/node_modules/@tiptap/extension-strike/dist/index.js +66 -0
  87. package/dist/node_modules/@tiptap/extension-text/dist/index.js +13 -0
  88. package/dist/node_modules/@tiptap/extension-underline/dist/index.js +65 -0
  89. package/dist/node_modules/@tiptap/extensions/dist/index.js +439 -0
  90. package/dist/node_modules/@tiptap/react/dist/index.js +501 -0
  91. package/dist/node_modules/@tiptap/starter-kit/dist/index.js +28 -0
  92. package/dist/node_modules/fast-equals/dist/es/index.js +324 -0
  93. package/dist/node_modules/linkifyjs/dist/linkify.js +705 -0
  94. package/dist/node_modules/orderedmap/dist/index.js +103 -0
  95. package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
  96. package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
  97. package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
  98. package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
  99. package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
  100. package/dist/node_modules/prosemirror-model/dist/index.js +2736 -0
  101. package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
  102. package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
  103. package/dist/node_modules/prosemirror-transform/dist/index.js +1552 -0
  104. package/dist/node_modules/prosemirror-view/dist/index.js +3802 -0
  105. package/dist/node_modules/rope-sequence/dist/index.js +100 -0
  106. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js +58 -0
  107. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js +57 -0
  108. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +58 -0
  109. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +46 -0
  110. package/dist/node_modules/use-sync-external-store/shim/index.js +10 -0
  111. package/dist/node_modules/use-sync-external-store/shim/with-selector.js +10 -0
  112. package/dist/node_modules/w3c-keyname/index.js +93 -0
  113. package/package.json +9 -2
@@ -1,86 +1,202 @@
1
- import { jsx as t, jsxs as o, Fragment as u } from "react/jsx-runtime";
2
- import { Flex as S, Portal as k, Box as T } from "@chakra-ui/react";
3
- import { memo as x, useCallback as h } from "react";
4
- import { useTableContext as I } from "./table-context.js";
5
- import { DEFAULT_PAGE_SIZE_OPTIONS as v } from "./table.constants.js";
6
- import { translations as B } from "./translations.js";
7
- import { Menu as M } from "../menu/menu.js";
8
- import { MenuButton as w } from "../menu/menu-button.js";
9
- import { SlidersIcon as y } from "../icon/icons/sliders-icon.js";
10
- import { MenuList as O } from "../menu/menu-list.js";
11
- import { Text as d } from "../text/text.js";
12
- import { MenuItem as i } from "../menu/menu-item.js";
13
- import { GripMoreIcon as V } from "../icon/icons/grip-more-icon.js";
14
- import { Checkbox as A } from "../checkbox/checkbox.js";
15
- import { MenuDivider as b } from "../menu/menu-divider.js";
16
- import { RadioGroup as F } from "../radio/radio-group.js";
17
- import { Radio as G } from "../radio/radio.js";
18
- import { Switch as P } from "../switch/switch.js";
19
- import { ThemeIconSizeVariable as j, ThemeSpaceVariable as a, ThemeColorVariable as g } from "../../theme/theme-types.js";
20
- const D = ({ pageSize: m, onPageSizeChange: s }) => {
21
- const r = I(), l = B[r.localeString], p = !!s && Number.isInteger(m), C = h(() => r.table.getAllColumns().length === Object.keys(r.breakingContentState).length && !Object.values(r.breakingContentState).includes(!1), [r.breakingContentState, r.table]), f = h(
1
+ import { jsx as t, jsxs as c, Fragment as h } from "react/jsx-runtime";
2
+ import { Flex as y, Portal as w, Box as I } from "@chakra-ui/react";
3
+ import { closestCenter as P } from "../../node_modules/@dnd-kit/collision/dist/index.js";
4
+ import { isSortableOperation as E, SortableKeyboardPlugin as L } from "../../node_modules/@dnd-kit/dom/sortable.js";
5
+ import { DragDropProvider as A } from "../../node_modules/@dnd-kit/react/index.js";
6
+ import { useSortable as G } from "../../node_modules/@dnd-kit/react/sortable.js";
7
+ import { memo as R, useState as F, useCallback as x } from "react";
8
+ import { flushSync as Y } from "react-dom";
9
+ import { getColumnLabel as O } from "./helper.js";
10
+ import { useTableContext as j } from "./table-context.js";
11
+ import { DEFAULT_PAGE_SIZE_OPTIONS as N } from "./table.constants.js";
12
+ import { translations as _ } from "./translations.js";
13
+ import { Menu as z } from "../menu/menu.js";
14
+ import { MenuButton as H } from "../menu/menu-button.js";
15
+ import { SlidersIcon as U } from "../icon/icons/sliders-icon.js";
16
+ import { MenuList as K } from "../menu/menu-list.js";
17
+ import { Text as C } from "../text/text.js";
18
+ import { MenuDivider as k } from "../menu/menu-divider.js";
19
+ import { MenuItem as b } from "../menu/menu-item.js";
20
+ import { Checkbox as D } from "../checkbox/checkbox.js";
21
+ import { RadioGroup as X } from "../radio/radio-group.js";
22
+ import { Radio as Z } from "../radio/radio.js";
23
+ import { Switch as q } from "../switch/switch.js";
24
+ import { GripMoreIcon as J } from "../icon/icons/grip-more-icon.js";
25
+ import { ThemeIconSizeVariable as B, ThemeSpaceVariable as u, ThemeColorVariable as f, ThemeShadowVariable as Q } from "../../theme/theme-types.js";
26
+ const W = (i, l, r, o) => {
27
+ if (!o || o.sourceId === i) return "none";
28
+ const s = r.findIndex((a) => a.id === o.sourceId), d = r.findIndex((a) => a.id === o.targetId);
29
+ return s < 0 || d < 0 || s === d ? "none" : s < d && l > s && l <= d ? "translateY(-100%)" : s > d && l >= d && l < s ? "translateY(100%)" : "none";
30
+ }, v = (i) => {
31
+ if (!E(i)) return null;
32
+ const { source: l, target: r } = i;
33
+ return l && r ? { source: l, target: r } : null;
34
+ }, $ = ({ pageSize: i, onPageSizeChange: l }) => {
35
+ const r = j(), o = _[r.localeString], s = !!l && Number.isInteger(i), [d, a] = F(null), g = r.table.getAllLeafColumns().filter((e) => e.getCanHide()), p = g.filter((e) => e.getIsVisible()), T = g.filter((e) => !e.getIsVisible()).sort((e, n) => {
36
+ const m = O(e.columnDef.header, e.id), S = O(n.columnDef.header, n.id);
37
+ return m.localeCompare(S, r.localeString, { sensitivity: "base" });
38
+ }), M = x(() => r.table.getAllColumns().length === Object.keys(r.breakingContentState).length && !Object.values(r.breakingContentState).includes(!1), [r.breakingContentState, r.table]), V = x(
22
39
  ({ checked: e }) => {
23
40
  const n = {};
24
- r.table.getAllColumns().forEach((c) => {
25
- n[c.id] = e;
41
+ r.table.getAllColumns().forEach((m) => {
42
+ n[m.id] = e;
26
43
  }), r.setBreakingContentState(n), r.onBreakingContentChange?.(n);
27
44
  },
28
45
  [r]
29
46
  );
30
- return /* @__PURE__ */ t(S, { children: /* @__PURE__ */ o(M, { closeOnSelect: !1, isLazy: !0, children: [
31
- /* @__PURE__ */ t(w, { "aria-label": l.presets, variant: "ghost", p: "unset", w: "40px", h: "40px", children: /* @__PURE__ */ t(y, { size: j.Medium }) }),
32
- /* @__PURE__ */ t(k, { children: /* @__PURE__ */ o(O, { children: [
47
+ return /* @__PURE__ */ t(y, { children: /* @__PURE__ */ c(z, { closeOnSelect: !1, isLazy: !0, children: [
48
+ /* @__PURE__ */ t(H, { "aria-label": o.presets, variant: "ghost", p: "unset", w: "40px", h: "40px", children: /* @__PURE__ */ t(U, { size: B.Medium }) }),
49
+ /* @__PURE__ */ t(w, { children: /* @__PURE__ */ c(K, { children: [
33
50
  /* @__PURE__ */ t(
34
- d,
51
+ C,
35
52
  {
36
- color: g.OnSurfaceSubdued,
37
- py: a.Small,
38
- px: a.Medium,
39
- children: l.showColumns
53
+ color: f.OnSurfaceSubdued,
54
+ py: u.Small,
55
+ px: u.Medium,
56
+ children: o.shownInTable
40
57
  }
41
58
  ),
42
- /* @__PURE__ */ t(T, { maxHeight: "320px", overflowY: "auto", children: r.table.getAllLeafColumns().filter((e) => e.getCanHide()).map((e) => /* @__PURE__ */ o(i, { itemType: "checkbox", leftIcon: V, value: e.id, children: [
43
- /* @__PURE__ */ t(u, { children: e.columnDef.header }),
59
+ /* @__PURE__ */ c(I, { maxHeight: "400px", overflowY: "auto", children: [
44
60
  /* @__PURE__ */ t(
45
61
  A,
46
62
  {
47
- isChecked: e.getIsVisible(),
48
- onCheckedChange: ({ checked: n }) => e.toggleVisibility(!!n)
63
+ onDragOver: (e) => {
64
+ const n = v(e.operation);
65
+ n && a({
66
+ sourceId: String(n.source.id),
67
+ targetId: String(n.target.id)
68
+ });
69
+ },
70
+ onDragEnd: (e) => {
71
+ const n = v(e.operation);
72
+ Y(() => {
73
+ a(null), n && r.handleDragEnd(String(n.source.id), String(n.target.id));
74
+ });
75
+ },
76
+ children: p.map((e, n) => /* @__PURE__ */ t(
77
+ re,
78
+ {
79
+ column: e,
80
+ index: n,
81
+ isDisabled: p.length === 1,
82
+ translateY: W(e.id, n, p, d)
83
+ },
84
+ e.id
85
+ ))
49
86
  }
50
- )
51
- ] }, e.id)) }),
52
- /* @__PURE__ */ t(b, {}),
53
- p && /* @__PURE__ */ o(u, { children: [
87
+ ),
88
+ T.length > 0 && /* @__PURE__ */ c(h, { children: [
89
+ /* @__PURE__ */ t(k, {}),
90
+ /* @__PURE__ */ t(
91
+ C,
92
+ {
93
+ color: f.OnSurfaceSubdued,
94
+ py: u.Small,
95
+ px: u.Medium,
96
+ children: o.hiddenInTable
97
+ }
98
+ ),
99
+ T.map((e) => /* @__PURE__ */ c(b, { itemType: "checkbox", value: e.id, children: [
100
+ /* @__PURE__ */ t(h, { children: e.columnDef.header }),
101
+ /* @__PURE__ */ t(
102
+ D,
103
+ {
104
+ isChecked: e.getIsVisible(),
105
+ onCheckedChange: ({ checked: n }) => {
106
+ if (e.toggleVisibility(!!n), n) {
107
+ const m = r.columnOrder.filter((S) => S !== e.id);
108
+ m.push(e.id), r.setColumnOrder(m);
109
+ }
110
+ }
111
+ }
112
+ )
113
+ ] }, e.id))
114
+ ] })
115
+ ] }),
116
+ /* @__PURE__ */ t(k, {}),
117
+ s && /* @__PURE__ */ c(h, { children: [
54
118
  /* @__PURE__ */ t(
55
- d,
119
+ C,
56
120
  {
57
- color: g.OnSurfaceSubdued,
58
- py: a.Small,
59
- px: a.Medium,
60
- children: l.rowsPerPage
121
+ color: f.OnSurfaceSubdued,
122
+ py: u.Small,
123
+ px: u.Medium,
124
+ children: o.rowsPerPage
61
125
  }
62
126
  ),
63
127
  /* @__PURE__ */ t(
64
- F,
128
+ X,
65
129
  {
66
130
  gap: "unset",
67
- value: String(m),
68
- onValueChange: (e) => s?.(Number(e.value)),
69
- children: v.map((e) => /* @__PURE__ */ o(i, { itemType: "radio", value: String(e), children: [
70
- l.numberOfRows.replace("{count}", String(e)),
71
- /* @__PURE__ */ t(G, { value: String(e) })
131
+ value: String(i),
132
+ onValueChange: (e) => l?.(Number(e.value)),
133
+ children: N.map((e) => /* @__PURE__ */ c(b, { itemType: "radio", value: String(e), children: [
134
+ o.numberOfRows.replace("{count}", String(e)),
135
+ /* @__PURE__ */ t(Z, { value: String(e) })
72
136
  ] }, e))
73
137
  }
74
138
  ),
75
- /* @__PURE__ */ t(b, {})
139
+ /* @__PURE__ */ t(k, {})
76
140
  ] }),
77
- /* @__PURE__ */ o(i, { itemType: "switch", value: "breakingContent", children: [
78
- l.breakingContent,
79
- /* @__PURE__ */ t(P, { onCheckedChange: f, isChecked: C() })
141
+ /* @__PURE__ */ c(b, { itemType: "switch", value: "breakingContent", children: [
142
+ o.breakingContent,
143
+ /* @__PURE__ */ t(q, { onCheckedChange: V, isChecked: M() })
80
144
  ] })
81
145
  ] }) })
82
146
  ] }) });
83
- }, re = x(D);
147
+ }, ee = [L], re = ({
148
+ column: i,
149
+ index: l,
150
+ isDisabled: r,
151
+ translateY: o
152
+ }) => {
153
+ const {
154
+ ref: s,
155
+ handleRef: d,
156
+ isDragging: a
157
+ } = G({
158
+ id: i.id,
159
+ index: l,
160
+ collisionDetector: P,
161
+ plugins: ee
162
+ });
163
+ return /* @__PURE__ */ t(
164
+ I,
165
+ {
166
+ ref: s,
167
+ role: "none",
168
+ opacity: a ? 0.95 : 1,
169
+ backgroundColor: f.Background,
170
+ transform: o,
171
+ transition: a ? void 0 : "transform 200ms ease",
172
+ boxShadow: a ? Q.Medium : void 0,
173
+ children: /* @__PURE__ */ c(b, { itemType: "checkbox", value: i.id, children: [
174
+ /* @__PURE__ */ c(y, { alignItems: "center", gap: u.XSmall, children: [
175
+ /* @__PURE__ */ t(
176
+ I,
177
+ {
178
+ ref: d,
179
+ cursor: a ? "grabbing" : "grab",
180
+ display: "inline-flex",
181
+ alignItems: "center",
182
+ flexShrink: 0,
183
+ children: /* @__PURE__ */ t(J, { size: B.Medium })
184
+ }
185
+ ),
186
+ /* @__PURE__ */ t(h, { children: i.columnDef.header })
187
+ ] }),
188
+ !a && /* @__PURE__ */ t(
189
+ D,
190
+ {
191
+ isDisabled: r,
192
+ isChecked: i.getIsVisible(),
193
+ onCheckedChange: ({ checked: g }) => i.toggleVisibility(!!g)
194
+ }
195
+ )
196
+ ] })
197
+ }
198
+ );
199
+ }, De = R($);
84
200
  export {
85
- re as TableToolbarSettings
201
+ De as TableToolbarSettings
86
202
  };
@@ -31,6 +31,8 @@ export declare const translations: {
31
31
  selectedWithTotal: string;
32
32
  action: string;
33
33
  deleteSelectedRows: string;
34
+ shownInTable: string;
35
+ hiddenInTable: string;
34
36
  };
35
37
  "en-US": {
36
38
  sortUp: string;
@@ -60,6 +62,8 @@ export declare const translations: {
60
62
  selectedWithTotal: string;
61
63
  action: string;
62
64
  deleteSelectedRows: string;
65
+ shownInTable: string;
66
+ hiddenInTable: string;
63
67
  };
64
68
  "en-GB": {
65
69
  sortUp: string;
@@ -89,6 +93,8 @@ export declare const translations: {
89
93
  selectedWithTotal: string;
90
94
  action: string;
91
95
  deleteSelectedRows: string;
96
+ shownInTable: string;
97
+ hiddenInTable: string;
92
98
  };
93
99
  "nb-NO": {
94
100
  sortUp: string;
@@ -118,6 +124,8 @@ export declare const translations: {
118
124
  selectedWithTotal: string;
119
125
  action: string;
120
126
  deleteSelectedRows: string;
127
+ shownInTable: string;
128
+ hiddenInTable: string;
121
129
  };
122
130
  "da-DK": {
123
131
  sortUp: string;
@@ -147,6 +155,8 @@ export declare const translations: {
147
155
  selectedWithTotal: string;
148
156
  action: string;
149
157
  deleteSelectedRows: string;
158
+ shownInTable: string;
159
+ hiddenInTable: string;
150
160
  };
151
161
  "fr-FR": {
152
162
  sortUp: string;
@@ -176,6 +186,8 @@ export declare const translations: {
176
186
  selectedWithTotal: string;
177
187
  action: string;
178
188
  deleteSelectedRows: string;
189
+ shownInTable: string;
190
+ hiddenInTable: string;
179
191
  };
180
192
  "nl-BE": {
181
193
  sortUp: string;
@@ -205,6 +217,8 @@ export declare const translations: {
205
217
  selectedWithTotal: string;
206
218
  action: string;
207
219
  deleteSelectedRows: string;
220
+ shownInTable: string;
221
+ hiddenInTable: string;
208
222
  };
209
223
  };
210
224
  //# sourceMappingURL=translations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../lib/components/table/translations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1F,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,UAE1F;AAgCD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoJxB,CAAC"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../lib/components/table/translations.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAE1F,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,UAE1F;AAkCD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8JxB,CAAC"}
@@ -1,5 +1,5 @@
1
- function l(t, n) {
2
- return t.replace(/{(\w+)}/g, (r, o) => String(n[o] ?? ""));
1
+ function r(n, t) {
2
+ return n.replace(/{(\w+)}/g, (l, o) => String(t[o] ?? ""));
3
3
  }
4
4
  const e = {
5
5
  sortUp: "Sort up",
@@ -28,7 +28,9 @@ const e = {
28
28
  numberOfRows: "{count} rows",
29
29
  selectedWithTotal: "{count} of {total} selected",
30
30
  action: "Action",
31
- deleteSelectedRows: "Delete selected rows"
31
+ deleteSelectedRows: "Delete selected rows",
32
+ shownInTable: "Shown in table",
33
+ hiddenInTable: "Hidden in table"
32
34
  }, s = {
33
35
  "sv-SE": {
34
36
  sortUp: "Sortera stigande",
@@ -57,7 +59,9 @@ const e = {
57
59
  numberOfRows: "{count} rader",
58
60
  selectedWithTotal: "{count} av {total} valda",
59
61
  action: "Åtgärd",
60
- deleteSelectedRows: "Ta bort valda rader"
62
+ deleteSelectedRows: "Ta bort valda rader",
63
+ shownInTable: "Visas i tabellen",
64
+ hiddenInTable: "Dold i tabellen"
61
65
  },
62
66
  "en-US": e,
63
67
  "en-GB": e,
@@ -88,7 +92,9 @@ const e = {
88
92
  numberOfRows: "{count} rader",
89
93
  selectedWithTotal: "{count} av {total} valgt",
90
94
  action: "Handling",
91
- deleteSelectedRows: "Fjern valgte rader"
95
+ deleteSelectedRows: "Fjern valgte rader",
96
+ shownInTable: "Vises i tabellen",
97
+ hiddenInTable: "Dold i tabellen"
92
98
  },
93
99
  "da-DK": {
94
100
  sortUp: "Sorter stigende",
@@ -117,7 +123,9 @@ const e = {
117
123
  numberOfRows: "{count} rækker",
118
124
  selectedWithTotal: "{count} af {total} valgt",
119
125
  action: "Handling",
120
- deleteSelectedRows: "Fjern valgte rækker"
126
+ deleteSelectedRows: "Fjern valgte rækker",
127
+ shownInTable: "Vises i tabellen",
128
+ hiddenInTable: "Dold i tabellen"
121
129
  },
122
130
  "fr-FR": {
123
131
  sortUp: "Trier par ordre croissant",
@@ -146,7 +154,9 @@ const e = {
146
154
  numberOfRows: "{count} lignes",
147
155
  selectedWithTotal: "{count} sur {total} sélectionnés",
148
156
  action: "Action",
149
- deleteSelectedRows: "Supprimer les lignes sélectionnées"
157
+ deleteSelectedRows: "Supprimer les lignes sélectionnées",
158
+ shownInTable: "Affiché dans le tableau",
159
+ hiddenInTable: "Masqué dans le tableau"
150
160
  },
151
161
  "nl-BE": {
152
162
  sortUp: "Oplopend sorteren",
@@ -175,10 +185,12 @@ const e = {
175
185
  numberOfRows: "{count} rijen",
176
186
  selectedWithTotal: "{count} van {total} geselecteerd",
177
187
  action: "Actie",
178
- deleteSelectedRows: "Verwijder geselecteerde rijen"
188
+ deleteSelectedRows: "Verwijder geselecteerde rijen",
189
+ shownInTable: "Getoond in tabel",
190
+ hiddenInTable: "Verborgen in tabel"
179
191
  }
180
192
  };
181
193
  export {
182
- l as interpolate,
194
+ r as interpolate,
183
195
  s as translations
184
196
  };
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../lib/components/toggle-button/toggle-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGjD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAgBpD"}
1
+ {"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../lib/components/toggle-button/toggle-button.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGjD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAiBpD"}
@@ -1,20 +1,20 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
- import { Button as i } from "@chakra-ui/react";
3
- import { useButtonChildren as d } from "./use-button-children.js";
4
- function c(t) {
5
- const { isPressed: e = !1, isDisabled: r, subText: l, children: u, ...o } = t, n = d(t);
2
+ import { Button as a } from "@chakra-ui/react";
3
+ import { useButtonChildren as l } from "./use-button-children.js";
4
+ function b(t) {
5
+ const { isPressed: r = !1, isDisabled: o, variant: e = "outline", subText: u, children: d, ...n } = t, i = l(t);
6
6
  return /* @__PURE__ */ s(
7
- i,
7
+ a,
8
8
  {
9
- "aria-pressed": e,
9
+ "aria-pressed": r,
10
10
  type: "button",
11
- variant: "toggle",
12
- disabled: r,
13
- ...o,
14
- children: n
11
+ variant: e === "ghost" ? "toggleGhost" : "toggle",
12
+ disabled: o,
13
+ ...n,
14
+ children: i
15
15
  }
16
16
  );
17
17
  }
18
18
  export {
19
- c as ToggleButton
19
+ b as ToggleButton
20
20
  };
@@ -7,6 +7,8 @@ type ToggleButtonPropsBase = {
7
7
  isPressed?: boolean;
8
8
  /** The size of the button, default: md */
9
9
  size?: ConditionalValue<ButtonSize> | undefined;
10
+ /** The visual variant of the button. Defaults to "outline". Use "ghost" for borderless toolbar controls. */
11
+ variant?: "outline" | "ghost";
10
12
  isDisabled?: boolean;
11
13
  } & Pick<ChakraButtonProps, "children" | "onClick" | "type"> & CustomStyleProps;
12
14
  type ToggleButtonPropsWithSubText = ToggleButtonPropsBase & {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/components/toggle-button/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5F,OAAO,KAAK,EAAE,WAAW,IAAI,iBAA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AA0C;IAC1C,IAAI,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;IAChD,4GAA4G;IAC5G,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAE9B,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB,GAAG,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC,GAC3D,gBAAgB,CAAC;AAElB,KAAK,4BAA4B,GAAG,qBAAqB,GAAG;IAC3D;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,+BAA+B,GAAG,qBAAqB,GAAG;IAC9D,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAIF,MAAM,MAAM,iBAAiB,GAAG,4BAA4B,GAAG,+BAA+B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -35,6 +35,7 @@ export * from './components/paginator/index.js';
35
35
  export * from './components/quantity-button/index.js';
36
36
  export * from './components/radio/index.js';
37
37
  export * from './components/radio-card/index.js';
38
+ export * from './components/rich-text-editor/index.js';
38
39
  export * from './components/segmented-control/index.js';
39
40
  export * from './components/select/index.js';
40
41
  export * from './components/skeleton/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AAExB,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AAEvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,C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