@gnist/design-system 3.8.1 → 3.8.3

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 (92) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +105 -6
  3. package/dist/building-blocks/inputs/InputHelperText.cjs +1 -1
  4. package/dist/building-blocks/inputs/InputHelperText.js +1 -1
  5. package/dist/building-blocks/skeletons/CircularSkeleton.cjs +1 -2
  6. package/dist/building-blocks/skeletons/CircularSkeleton.d.ts.map +1 -1
  7. package/dist/building-blocks/skeletons/CircularSkeleton.js +1 -2
  8. package/dist/building-blocks/skeletons/RectangularSkeleton.d.ts.map +1 -1
  9. package/dist/building-blocks/skeletons/TextSkeleton.d.ts.map +1 -1
  10. package/dist/components/actions/buttons/ButtonBase.cjs +4 -4
  11. package/dist/components/actions/buttons/ButtonBase.d.ts +2 -1
  12. package/dist/components/actions/buttons/ButtonBase.d.ts.map +1 -1
  13. package/dist/components/actions/buttons/ButtonBase.js +4 -4
  14. package/dist/components/actions/buttons/DangerButton.cjs +3 -4
  15. package/dist/components/actions/buttons/DangerButton.d.ts +1 -1
  16. package/dist/components/actions/buttons/DangerButton.d.ts.map +1 -1
  17. package/dist/components/actions/buttons/DangerButton.js +3 -4
  18. package/dist/components/actions/buttons/GhostButton.cjs +3 -4
  19. package/dist/components/actions/buttons/GhostButton.d.ts +1 -1
  20. package/dist/components/actions/buttons/GhostButton.d.ts.map +1 -1
  21. package/dist/components/actions/buttons/GhostButton.js +3 -4
  22. package/dist/components/actions/buttons/IconButton.cjs +11 -15
  23. package/dist/components/actions/buttons/IconButton.d.ts +3 -2
  24. package/dist/components/actions/buttons/IconButton.d.ts.map +1 -1
  25. package/dist/components/actions/buttons/IconButton.js +12 -16
  26. package/dist/components/actions/buttons/PrimaryButton.cjs +3 -4
  27. package/dist/components/actions/buttons/PrimaryButton.d.ts +1 -1
  28. package/dist/components/actions/buttons/PrimaryButton.d.ts.map +1 -1
  29. package/dist/components/actions/buttons/PrimaryButton.js +3 -4
  30. package/dist/components/actions/buttons/SecondaryButton.cjs +3 -4
  31. package/dist/components/actions/buttons/SecondaryButton.d.ts +1 -1
  32. package/dist/components/actions/buttons/SecondaryButton.d.ts.map +1 -1
  33. package/dist/components/actions/buttons/SecondaryButton.js +3 -4
  34. package/dist/components/actions/buttons/SuccessButton.cjs +3 -4
  35. package/dist/components/actions/buttons/SuccessButton.d.ts +1 -1
  36. package/dist/components/actions/buttons/SuccessButton.d.ts.map +1 -1
  37. package/dist/components/actions/buttons/SuccessButton.js +3 -4
  38. package/dist/components/actions/buttons/TextButton.cjs +2 -3
  39. package/dist/components/actions/buttons/TextButton.d.ts +3 -2
  40. package/dist/components/actions/buttons/TextButton.d.ts.map +1 -1
  41. package/dist/components/actions/buttons/TextButton.js +3 -4
  42. package/dist/components/actions/buttons/createButtonVariant.cjs +18 -21
  43. package/dist/components/actions/buttons/createButtonVariant.d.ts.map +1 -1
  44. package/dist/components/actions/buttons/createButtonVariant.js +18 -21
  45. package/dist/components/actions/chips/ActionChip.cjs +2 -2
  46. package/dist/components/actions/chips/ActionChip.js +2 -2
  47. package/dist/components/actions/chips/FilterChip.cjs +2 -2
  48. package/dist/components/actions/chips/FilterChip.js +2 -2
  49. package/dist/components/actions/selectionControls/Checkbox.cjs +1 -1
  50. package/dist/components/actions/selectionControls/Checkbox.js +1 -1
  51. package/dist/components/actions/selectionControls/RadioButton.cjs +2 -2
  52. package/dist/components/actions/selectionControls/RadioButton.js +2 -2
  53. package/dist/components/actions/selectionControls/shared.d.ts.map +1 -1
  54. package/dist/components/feedback/alerts/AlertBanner.cjs +9 -6
  55. package/dist/components/feedback/alerts/AlertBanner.d.ts.map +1 -1
  56. package/dist/components/feedback/alerts/AlertBanner.js +9 -6
  57. package/dist/components/feedback/loaders/LoadingSpinner.d.ts.map +1 -1
  58. package/dist/components/inputs/dropdowns/SelectBase.cjs +9 -16
  59. package/dist/components/inputs/dropdowns/SelectBase.js +9 -16
  60. package/dist/components/inputs/pickers/calendar.cjs +10 -12
  61. package/dist/components/inputs/pickers/calendar.js +10 -12
  62. package/dist/components/inputs/shared.cjs +1 -4
  63. package/dist/components/inputs/shared.js +1 -4
  64. package/dist/components/inputs/textFields/TextArea.cjs +4 -6
  65. package/dist/components/inputs/textFields/TextArea.d.ts.map +1 -1
  66. package/dist/components/inputs/textFields/TextArea.js +4 -6
  67. package/dist/components/inputs/textFields/TextField.cjs +6 -9
  68. package/dist/components/inputs/textFields/TextField.js +6 -9
  69. package/dist/components/surfaces/cards/internal/SelectionCard.d.ts.map +1 -1
  70. package/dist/components/surfaces/modal/Modal.cjs +19 -15
  71. package/dist/components/surfaces/modal/Modal.js +19 -15
  72. package/dist/translations/index.d.ts.map +1 -1
  73. package/dist/utilities/forms/formContext.cjs +2 -2
  74. package/dist/utilities/forms/formContext.js +2 -2
  75. package/dist/utilities/forms/formHelpers.cjs +12 -16
  76. package/dist/utilities/forms/formHelpers.d.ts.map +1 -1
  77. package/dist/utilities/forms/formHelpers.js +12 -16
  78. package/dist/utilities/forms/internal/components.cjs +2 -4
  79. package/dist/utilities/forms/internal/components.js +2 -4
  80. package/dist/utilities/forms/useFormProps.cjs +2 -4
  81. package/dist/utilities/forms/useFormProps.js +2 -4
  82. package/dist/utilities/html/index.d.ts.map +1 -1
  83. package/dist/utilities/time/date.d.ts.map +1 -1
  84. package/dist/utilities/tokens/tokens.cjs +1 -2
  85. package/dist/utilities/tokens/tokens.d.ts.map +1 -1
  86. package/dist/utilities/tokens/tokens.js +1 -2
  87. package/dist/utilities/validation/validation.cjs +1 -1
  88. package/dist/utilities/validation/validation.d.ts.map +1 -1
  89. package/dist/utilities/validation/validation.js +1 -1
  90. package/dist/utilities/validation/validationSteps.d.ts.map +1 -1
  91. package/dist/utilities/validation/validators.d.ts.map +1 -1
  92. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.8.3](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.8.2...@gnist/design-system@3.8.3) (2025-08-27)
7
+
8
+ **Note:** Version bump only for package @gnist/design-system
9
+
10
+ ## [3.8.2](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.8.1...@gnist/design-system@3.8.2) (2025-08-22)
11
+
12
+ **Note:** Version bump only for package @gnist/design-system
13
+
6
14
  ## [3.8.1](https://github.com/mollerdigital/design-system-design-system/compare/@gnist/design-system@3.8.0...@gnist/design-system@3.8.1) (2025-08-15)
7
15
 
8
16
  ### Bug Fixes
package/README.md CHANGED
@@ -18,7 +18,11 @@ npm install @gnist/design-system @gnist/themes
18
18
 
19
19
  ## Using the library
20
20
 
21
- To use the library, the vanilla-extract plugin needs to be used. For Vite, you need
21
+ To use the library, the vanilla-extract plugin needs to be used.
22
+
23
+ ### Vite
24
+
25
+ For Vite, you need
22
26
 
23
27
  ```
24
28
  npm install -D @vanilla-extract/vite-plugin @vanilla-extract/esbuild-plugin
@@ -27,6 +31,8 @@ npm install -D @vanilla-extract/vite-plugin @vanilla-extract/esbuild-plugin
27
31
  Your `vite.config.ts` might look like this:
28
32
 
29
33
  ```ts
34
+ // vite.config.ts
35
+
30
36
  import { defineConfig } from "vite";
31
37
  import react from "@vitejs/plugin-react";
32
38
  import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
@@ -49,6 +55,8 @@ export default defineConfig({
49
55
  In the application entrypoint, import the required global styles and choose a theme
50
56
 
51
57
  ```tsx
58
+ // app.tsx
59
+
52
60
  import { LocalizationProvider } from "@gnist/design-system";
53
61
  // Import one or more of these themes
54
62
  import { bilholdLight } from "@gnist/themes/themes/bilholdLight.css.js";
@@ -96,11 +104,17 @@ export const App: React.FC = () => {
96
104
 
97
105
  If you are setting up in a Next.js project, the procedure is quite the same.
98
106
 
99
- You will need to install and use `@vanilla-extract/next-plugin`.
107
+ You will need to install and use `@vanilla-extract/next-plugin`:
100
108
 
101
- With this setup, your `next.config.mjs` might look like this
109
+ ```bash
110
+ npm install -D @vanilla-extract/next-plugin
111
+ ```
112
+
113
+ With this setup, your `next.config.mjs` might look like this:
102
114
 
103
115
  ```js
116
+ // next.config.mjs
117
+
104
118
  import { createVanillaExtractPlugin } from "@vanilla-extract/next-plugin";
105
119
  const withVanillaExtract = createVanillaExtractPlugin();
106
120
 
@@ -112,16 +126,20 @@ export default withVanillaExtract(nextConfig);
112
126
 
113
127
  If you are running a React version 18 project, you will also need to add this to your `tsconfig.json` for it to work with this React 17 library.
114
128
 
115
- ```
129
+ ```json
130
+ // tsconfig.json
131
+
116
132
  "paths": {
117
133
  ...
118
134
  "react": [ "./node_modules/@types/react"]
119
135
  }
120
136
  ```
121
137
 
122
- Next, just add the styling to your `layout.tsx` file. It might look like this:
138
+ Then add the styling to your `layout.tsx` file. It might look like this:
123
139
 
124
140
  ```tsx
141
+ // layout.tsx
142
+
125
143
  import { bilholdLight } from "@gnist/themes/themes/bilholdLight.css.js";
126
144
  import { globalTextStyles } from "@gnist/themes/typography.css.js";
127
145
  import "@gnist/design-system/fonts/bilhold";
@@ -141,7 +159,88 @@ export default function RootLayout({
141
159
  }
142
160
  ```
143
161
 
144
- Finally, import components from `@gnist/design-system`.
162
+ #### Using components
163
+
164
+ Finally, import components from `@gnist/design-system`:
165
+
166
+ ```js
167
+ // index.tsx
168
+
169
+ import { PrimaryButton } from "@gnist/design-system";
170
+
171
+ export default function Home() {
172
+ return <PrimaryButton>Hello</PrimaryButton>;
173
+ }
174
+ ```
175
+
176
+ #### Pages Router
177
+
178
+ If you are running Pages Router, add `transpilePackages` to `next.config.mjs` so that Vanilla Extract is applied to the library code:
179
+
180
+ ```js
181
+ // next.config.mjs
182
+ const nextConfig = {
183
+ transpilePackages: ["@gnist/design-system", "@gnist/themes"],
184
+ };
185
+ ```
186
+
187
+ As Pages Router does not have `layout.tsx`, you need to split the setup between
188
+ `pages/_document.tsx` and `pages/_app.tsx`.
189
+
190
+ `_document.tsx` runs once on the server. Use a **named import** here to get the theme class for <body>:
191
+
192
+ ```js
193
+ // _document.tsx
194
+
195
+ import { bilholdLight } from "@gnist/themes/themes/bilholdLight.css.js";
196
+ import { globalTextStyles } from "@gnist/themes/typography.css.js";
197
+ import "@gnist/design-system/fonts/bilhold";
198
+
199
+ const bodyClassList = [bilholdLight, ...globalTextStyles];
200
+
201
+ export default function RootLayout({
202
+ children,
203
+ }: {
204
+ children: React.ReactNode;
205
+ }) {
206
+ return (
207
+ <html lang="en">
208
+ <body className={bodyClassList.join(" ")}>{children}</body>
209
+ </html>
210
+ );
211
+ }
212
+ ```
213
+
214
+ `_app.tsx` runs on every route change. Here you must use **side-effect imports** for the same theme and typography so the CSS actually ends up in the client bundle:
215
+
216
+ ```js
217
+ // _app.tsx
218
+
219
+ import { LocalizationProvider } from "@gnist/design-system";
220
+
221
+ // Fonts matching your chosen theme
222
+ import "@gnist/design-system/fonts/bilhold";
223
+
224
+ // Side-effect imports to include CSS/tokens in client bundle
225
+ import "@gnist/themes/themes/bilholdLight.css.js";
226
+ import "@gnist/themes/typography.css.js";
227
+
228
+
229
+ export default function MyApp({ Component, pageProps }: AppProps) {
230
+ return (
231
+ // Wrap app in LocalizationProvider
232
+ <LocalizationProvider language="en">
233
+ <Component {...pageProps} />
234
+ </LocalizationProvider>
235
+ );
236
+ }
237
+ ```
238
+
239
+ This ensures:
240
+
241
+ `_document.tsx` sets the correct theme class on <html> and <body>.
242
+
243
+ `_app.tsx` loads the theme’s CSS variables and typography tokens into the client bundle.
145
244
 
146
245
  ## Migrating from [`@moller/design-system`](https://www.npmjs.com/package/@moller/design-system)
147
246
 
@@ -19,7 +19,7 @@ function InputHelperText({ id, helperText, validity = { type: "none" }, reserveS
19
19
  function useInputHelperText(props) {
20
20
  const { validity, id } = props;
21
21
  const inputAriaProps = {
22
- ...(validity == null ? void 0 : validity.type) === "error" && {
22
+ ...validity?.type === "error" && {
23
23
  "aria-invalid": true,
24
24
  "aria-errormessage": id
25
25
  },
@@ -17,7 +17,7 @@ function InputHelperText({ id, helperText, validity = { type: "none" }, reserveS
17
17
  function useInputHelperText(props) {
18
18
  const { validity, id } = props;
19
19
  const inputAriaProps = {
20
- ...(validity == null ? void 0 : validity.type) === "error" && {
20
+ ...validity?.type === "error" && {
21
21
  "aria-invalid": true,
22
22
  "aria-errormessage": id
23
23
  },
@@ -8,8 +8,7 @@ const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in
8
8
  const reactContentLoader__default = /* @__PURE__ */ _interopDefaultCompat(reactContentLoader);
9
9
  const ContentLoader = reactContentLoader__default.default;
10
10
  function transformDimension(dimension, transform) {
11
- var _a;
12
- const numericPart = (_a = /(\d+)(\.\d+)?/.exec(dimension)) == null ? void 0 : _a[0];
11
+ const numericPart = /(\d+)(\.\d+)?/.exec(dimension)?.[0];
13
12
  if (!numericPart) {
14
13
  return dimension;
15
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CircularSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/CircularSkeleton.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,qBAAqB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,+BAI9B,qBAAqB,4CAoBvB,CAAC"}
1
+ {"version":3,"file":"CircularSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/CircularSkeleton.tsx"],"names":[],"mappings":"AAiBA,MAAM,WAAW,qBAAqB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,kCAI1B,qBAAqB,4CAoBvB,CAAC"}
@@ -4,8 +4,7 @@ import { tokens } from "@gnist/themes/tokens.css.js";
4
4
  import reactContentLoader from "react-content-loader";
5
5
  const ContentLoader = reactContentLoader;
6
6
  function transformDimension(dimension, transform) {
7
- var _a;
8
- const numericPart = (_a = /(\d+)(\.\d+)?/.exec(dimension)) == null ? void 0 : _a[0];
7
+ const numericPart = /(\d+)(\.\d+)?/.exec(dimension)?.[0];
9
8
  if (!numericPart) {
10
9
  return dimension;
11
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RectangularSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/RectangularSkeleton.tsx"],"names":[],"mappings":"AAKA,UAAU,wBAAwB;IAC9B,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,wCAKjC,wBAAwB,4CAmB1B,CAAC"}
1
+ {"version":3,"file":"RectangularSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/RectangularSkeleton.tsx"],"names":[],"mappings":"AAKA,UAAU,wBAAwB;IAC9B,uDAAuD;IACvD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,2CAK7B,wBAAwB,4CAmB1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/TextSkeleton.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,+BAI1B,iBAAiB,4CAiCnB,CAAC"}
1
+ {"version":3,"file":"TextSkeleton.d.ts","sourceRoot":"","sources":["../../../src/building-blocks/skeletons/TextSkeleton.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,YAAY,kCAItB,iBAAiB,4CAiCnB,CAAC"}
@@ -35,10 +35,10 @@ function _interopNamespaceCompat(e) {
35
35
  }
36
36
  const React__namespace = /* @__PURE__ */ _interopNamespaceCompat(React);
37
37
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
38
- const BoxedButtonBase = React__namespace.forwardRef(function BoxedButtonBase2({ $as, as, children, className, loading, disabled = loading == null ? void 0 : loading.isLoading, type = "button", density = "default", ...props }, ref) {
38
+ function BoxedButtonBase({ $as, as, children, className, loading, disabled = loading?.isLoading, type = "button", density = "default", ref, ...props }) {
39
39
  const buttonProps = {
40
40
  ...props,
41
- disabled: (loading == null ? void 0 : loading.isLoading) === true ? loading.isLoading : disabled,
41
+ disabled: loading?.isLoading === true ? loading.isLoading : disabled,
42
42
  className: classNames__default.default(className, styles_css.boxedButton({ density })),
43
43
  type,
44
44
  ref
@@ -53,6 +53,6 @@ const BoxedButtonBase = React__namespace.forwardRef(function BoxedButtonBase2({
53
53
  return jsxRuntime.jsx(index.BodyText, { className: styles_css.actionText, children: child });
54
54
  }
55
55
  return child;
56
- }), (loading == null ? void 0 : loading.isLoading) && (loading == null ? void 0 : loading.loadingText) && jsxRuntime.jsx(Spinner.Spinner, { diameter: tokens_css_js.tokens.size[density === "compact" ? "xs" : "s"], textDescription: loading == null ? void 0 : loading.loadingText }), jsxRuntime.jsx(ScreenReaderOnly.ScreenReaderOnly, { "aria-live": "polite", children: (loading == null ? void 0 : loading.isLoading) && loading.loadingText })] }));
57
- });
56
+ }), loading?.isLoading && loading?.loadingText && jsxRuntime.jsx(Spinner.Spinner, { diameter: tokens_css_js.tokens.size[density === "compact" ? "xs" : "s"], textDescription: loading?.loadingText }), jsxRuntime.jsx(ScreenReaderOnly.ScreenReaderOnly, { "aria-live": "polite", children: loading?.isLoading && loading.loadingText })] }));
57
+ }
58
58
  exports.BoxedButtonBase = BoxedButtonBase;
@@ -22,6 +22,7 @@ export type BoxedButtonProps<AsElement extends ElementType> = PolymorphicProps<A
22
22
  */
23
23
  loadingText: string;
24
24
  };
25
+ ref?: React.ForwardedRef<Element>;
25
26
  };
26
- export declare const BoxedButtonBase: React.ForwardRefExoticComponent<Omit<BoxedButtonProps<React.ElementType>, "ref"> & React.RefAttributes<Element>>;
27
+ export declare function BoxedButtonBase<AsElement extends ElementType = "button">({ $as, as, children, className, loading, disabled, type, density, ref, ...props }: BoxedButtonProps<AsElement>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
27
28
  //# sourceMappingURL=ButtonBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/ButtonBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAEH,YAAY,EACf,MAAM,yCAAyC,CAAC;AAKjD,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAElE,MAAM,MAAM,gBAAgB,CAAC,SAAS,SAAS,WAAW,IACtD,gBAAgB,CAAC,SAAS,CAAC,GAAG;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE;QACN;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QACnB;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;KACvB,CAAC;CACL,CAAC;AAEN,eAAO,MAAM,eAAe,kHAmD1B,CAAC"}
1
+ {"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/ButtonBase.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK1D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAEH,YAAY,EACf,MAAM,yCAAyC,CAAC;AAKjD,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAElE,MAAM,MAAM,gBAAgB,CAAC,SAAS,SAAS,WAAW,IACtD,gBAAgB,CAAC,SAAS,CAAC,GAAG;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE;QACN;;WAEG;QACH,SAAS,EAAE,OAAO,CAAC;QACnB;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;CACrC,CAAC;AAEN,wBAAgB,eAAe,CAAC,SAAS,SAAS,WAAW,GAAG,QAAQ,EAAE,EACtE,GAAG,EACH,EAAE,EACF,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAA6B,EAC7B,IAAe,EACf,OAAmB,EACnB,GAAG,EACH,GAAG,KAAK,EACX,EAAE,gBAAgB,CAAC,SAAS,CAAC,sEAoC7B"}
@@ -13,10 +13,10 @@ import { ScreenReaderOnly } from "../../../utilities/accessibility/ScreenReaderO
13
13
  import "../../../utilities/accessibility/visuallyHidden.css.js";
14
14
  import { Spinner } from "../../progress/Spinner.js";
15
15
  import { boxedButton, actionText } from "./styles.css.js";
16
- const BoxedButtonBase = React.forwardRef(function BoxedButtonBase2({ $as, as, children, className, loading, disabled = loading == null ? void 0 : loading.isLoading, type = "button", density = "default", ...props }, ref) {
16
+ function BoxedButtonBase({ $as, as, children, className, loading, disabled = loading?.isLoading, type = "button", density = "default", ref, ...props }) {
17
17
  const buttonProps = {
18
18
  ...props,
19
- disabled: (loading == null ? void 0 : loading.isLoading) === true ? loading.isLoading : disabled,
19
+ disabled: loading?.isLoading === true ? loading.isLoading : disabled,
20
20
  className: classNames(className, boxedButton({ density })),
21
21
  type,
22
22
  ref
@@ -31,8 +31,8 @@ const BoxedButtonBase = React.forwardRef(function BoxedButtonBase2({ $as, as, ch
31
31
  return jsx(BodyText, { className: actionText, children: child });
32
32
  }
33
33
  return child;
34
- }), (loading == null ? void 0 : loading.isLoading) && (loading == null ? void 0 : loading.loadingText) && jsx(Spinner, { diameter: tokens.size[density === "compact" ? "xs" : "s"], textDescription: loading == null ? void 0 : loading.loadingText }), jsx(ScreenReaderOnly, { "aria-live": "polite", children: (loading == null ? void 0 : loading.isLoading) && loading.loadingText })] }));
35
- });
34
+ }), loading?.isLoading && loading?.loadingText && jsx(Spinner, { diameter: tokens.size[density === "compact" ? "xs" : "s"], textDescription: loading?.loadingText }), jsx(ScreenReaderOnly, { "aria-live": "polite", children: loading?.isLoading && loading.loadingText })] }));
35
+ }
36
36
  export {
37
37
  BoxedButtonBase
38
38
  };
@@ -2,10 +2,9 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
- const React = require("react");
6
5
  const ButtonBase = require("./ButtonBase.cjs");
7
6
  const createButtonVariant = require("./createButtonVariant.cjs");
8
- const DangerButton = React.forwardRef(function DangerButton2(props, ref) {
9
- return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ref, ...createButtonVariant.getButtonVariantProps("error", props) });
10
- });
7
+ function DangerButton(props) {
8
+ return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ...createButtonVariant.getButtonVariantProps("error", props) });
9
+ }
11
10
  exports.DangerButton = DangerButton;
@@ -5,5 +5,5 @@ The danger button appears as a final confirmation for a destructive action like
5
5
 
6
6
  Documentation: [DangerButton](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-buttons-dangerbutton--docs)
7
7
  */
8
- export declare const DangerButton: import("react").ForwardRefExoticComponent<Omit<BoxedButtonProps<ElementType>, "ref"> & import("react").RefAttributes<Element>>;
8
+ export declare function DangerButton<AsElement extends ElementType = "button">(props: BoxedButtonProps<AsElement>): import("react/jsx-runtime").JSX.Element;
9
9
  //# sourceMappingURL=DangerButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DangerButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/DangerButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA4B,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;;GAIG;AAEH,eAAO,MAAM,YAAY,gIAMvB,CAAC"}
1
+ {"version":3,"file":"DangerButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/DangerButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;;GAIG;AAEH,wBAAgB,YAAY,CAAC,SAAS,SAAS,WAAW,GAAG,QAAQ,EACjE,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,2CAGrC"}
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
3
  import { BoxedButtonBase } from "./ButtonBase.js";
5
4
  import { getButtonVariantProps } from "./createButtonVariant.js";
6
- const DangerButton = forwardRef(function DangerButton2(props, ref) {
7
- return jsx(BoxedButtonBase, { ref, ...getButtonVariantProps("error", props) });
8
- });
5
+ function DangerButton(props) {
6
+ return jsx(BoxedButtonBase, { ...getButtonVariantProps("error", props) });
7
+ }
9
8
  export {
10
9
  DangerButton
11
10
  };
@@ -2,10 +2,9 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
- const React = require("react");
6
5
  const ButtonBase = require("./ButtonBase.cjs");
7
6
  const createButtonVariant = require("./createButtonVariant.cjs");
8
- const GhostButton = React.forwardRef(function GhostButton2(props, ref) {
9
- return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ref, ...createButtonVariant.getButtonVariantProps("transparent", props) });
10
- });
7
+ function GhostButton(props) {
8
+ return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ...createButtonVariant.getButtonVariantProps("transparent", props) });
9
+ }
11
10
  exports.GhostButton = GhostButton;
@@ -7,5 +7,5 @@ As the ghost button looks less like a traditional button, it must always be used
7
7
 
8
8
  Documentation: [GhostButton](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-buttons-ghostbutton--docs)
9
9
  */
10
- export declare const GhostButton: import("react").ForwardRefExoticComponent<Omit<BoxedButtonProps<ElementType>, "ref"> & import("react").RefAttributes<Element>>;
10
+ export declare function GhostButton<AsElement extends ElementType = "button">(props: BoxedButtonProps<AsElement>): import("react/jsx-runtime").JSX.Element;
11
11
  //# sourceMappingURL=GhostButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GhostButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/GhostButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA4B,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;;;;EAME;AACF,eAAO,MAAM,WAAW,gIAStB,CAAC"}
1
+ {"version":3,"file":"GhostButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/GhostButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;;;;EAME;AACF,wBAAgB,WAAW,CAAC,SAAS,SAAS,WAAW,GAAG,QAAQ,EAChE,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,2CAGrC"}
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
3
  import { BoxedButtonBase } from "./ButtonBase.js";
5
4
  import { getButtonVariantProps } from "./createButtonVariant.js";
6
- const GhostButton = forwardRef(function GhostButton2(props, ref) {
7
- return jsx(BoxedButtonBase, { ref, ...getButtonVariantProps("transparent", props) });
8
- });
5
+ function GhostButton(props) {
6
+ return jsx(BoxedButtonBase, { ...getButtonVariantProps("transparent", props) });
7
+ }
9
8
  export {
10
9
  GhostButton
11
10
  };
@@ -13,19 +13,15 @@ const index = require("../../../foundation/typography/index.cjs");
13
13
  const styles_css = require("./styles.css.cjs");
14
14
  const _interopDefaultCompat = (e) => e && typeof e === "object" && "default" in e ? e : { default: e };
15
15
  const classNames__default = /* @__PURE__ */ _interopDefaultCompat(classNames);
16
- const IconButton = React.forwardRef(
17
- // @ts-expect-error - This is a valid type
18
- function IconButton2({ $as, as, className, showLabel, label, icon, variantOverride, ...props }, ref) {
19
- return React.createElement($as ?? as ?? "button", {
20
- ...props,
21
- ref,
22
- className: classNames__default.default(className, styles_css.buttonRecipe({ color: "transparent", buttonType: "icon" }), styles_css.iconButton({ showLabel }), states_css.stateLayers({
23
- borderSize: "medium",
24
- borderRadius: "button",
25
- backgroundColor: "palette-black",
26
- setFocusState: true
27
- }))
28
- }, jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showLabel === "left" && jsxRuntime.jsx(index.BodyText, { className: styles_css.actionText, children: label }), jsxRuntime.jsx(Icon.Icon, { icon, title: showLabel ? void 0 : label, variantOverride }), showLabel === "right" && jsxRuntime.jsx(index.BodyText, { className: styles_css.actionText, children: label })] }));
29
- }
30
- );
16
+ function IconButton({ $as, as, className, showLabel, label, icon, variantOverride, ...props }) {
17
+ return React.createElement($as ?? as ?? "button", {
18
+ ...props,
19
+ className: classNames__default.default(className, styles_css.buttonRecipe({ color: "transparent", buttonType: "icon" }), styles_css.iconButton({ showLabel }), states_css.stateLayers({
20
+ borderSize: "medium",
21
+ borderRadius: "button",
22
+ backgroundColor: "palette-black",
23
+ setFocusState: true
24
+ }))
25
+ }, jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showLabel === "left" && jsxRuntime.jsx(index.BodyText, { className: styles_css.actionText, children: label }), jsxRuntime.jsx(Icon.Icon, { icon, title: showLabel ? void 0 : label, variantOverride }), showLabel === "right" && jsxRuntime.jsx(index.BodyText, { className: styles_css.actionText, children: label })] }));
26
+ }
31
27
  exports.IconButton = IconButton;
@@ -1,6 +1,6 @@
1
1
  import { PolymorphicProps } from "@gnist/component-utils";
2
2
  import { VariantNames } from "../../../foundation/iconography/variantNames.js";
3
- import { ElementType } from "react";
3
+ import { ElementType, ForwardedRef } from "react";
4
4
  import { AllowedIcons } from "../../../foundation/iconography/index.js";
5
5
  type IconButtonProps<AsElement extends ElementType> = PolymorphicProps<AsElement> & {
6
6
  /**
@@ -18,6 +18,7 @@ type IconButtonProps<AsElement extends ElementType> = PolymorphicProps<AsElement
18
18
  showLabel?: "left" | "right" | "none";
19
19
  /** Override the default icon variant for this icon. To change the default icon variant, use IconVariantProvider */
20
20
  variantOverride?: VariantNames;
21
+ ref?: ForwardedRef<Element>;
21
22
  };
22
23
  /**
23
24
  An icon button is a button which displays only an icon with or without a label. Icon buttons allow users to take actions, and make choices, with a single tap. Because the background is transparent, the icon and label color is inherited from ancestors to acommodate use on different background colors.
@@ -26,6 +27,6 @@ Note: Unlike most button components, `disabled`, `loading` and `density` props d
26
27
 
27
28
  Documentation: [IconButton](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-buttons-iconbutton--docs)
28
29
  */
29
- export declare const IconButton: import("react").ForwardRefExoticComponent<Omit<IconButtonProps<ElementType>, "ref"> & import("react").RefAttributes<Element>>;
30
+ export declare function IconButton<AsElement extends ElementType = "button">({ $as, as, className, showLabel, label, icon, variantOverride, ...props }: IconButtonProps<AsElement>): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
30
31
  export {};
31
32
  //# sourceMappingURL=IconButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,wDAAoE;AAG3F,OAAO,EAAE,WAAW,EAA2C,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAQ,MAAM,0CAA0C,CAAC;AAI9E,KAAK,eAAe,CAAC,SAAS,SAAS,WAAW,IAC9C,gBAAgB,CAAC,SAAS,CAAC,GAAG;IAC1B;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACtC,mHAAmH;IACnH,eAAe,CAAC,EAAE,YAAY,CAAC;CAClC,CAAC;AAEN;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,+HA+CtB,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,wDAAoE;AAG3F,OAAO,EAAE,WAAW,EAAE,YAAY,EAAiB,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,YAAY,EAAQ,MAAM,0CAA0C,CAAC;AAI9E,KAAK,eAAe,CAAC,SAAS,SAAS,WAAW,IAC9C,gBAAgB,CAAC,SAAS,CAAC,GAAG;IAC1B;;OAEG;IACH,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACtC,mHAAmH;IACnH,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,GAAG,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;CAC/B,CAAC;AAEN;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,SAAS,SAAS,WAAW,GAAG,QAAQ,EAAE,EACjE,GAAG,EACH,EAAE,EACF,SAAS,EACT,SAAS,EACT,KAAK,EACL,IAAI,EACJ,eAAe,EACf,GAAG,KAAK,EACX,EAAE,eAAe,CAAC,SAAS,CAAC,0FA+B5B"}
@@ -2,28 +2,24 @@
2
2
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
3
3
  import { stateLayers } from "../../../styles/states.css.js";
4
4
  import classNames from "classnames";
5
- import { forwardRef, createElement } from "react";
5
+ import { createElement } from "react";
6
6
  import "../../../foundation/iconography/ExtraIconsProvider.js";
7
7
  import "../../../foundation/iconography/IconVariantProvider.js";
8
8
  import "../../../foundation/iconography/icons.js";
9
9
  import { Icon } from "../../../foundation/iconography/Icon.js";
10
10
  import { BodyText } from "../../../foundation/typography/index.js";
11
11
  import { buttonRecipe, iconButton, actionText } from "./styles.css.js";
12
- const IconButton = forwardRef(
13
- // @ts-expect-error - This is a valid type
14
- function IconButton2({ $as, as, className, showLabel, label, icon, variantOverride, ...props }, ref) {
15
- return createElement($as ?? as ?? "button", {
16
- ...props,
17
- ref,
18
- className: classNames(className, buttonRecipe({ color: "transparent", buttonType: "icon" }), iconButton({ showLabel }), stateLayers({
19
- borderSize: "medium",
20
- borderRadius: "button",
21
- backgroundColor: "palette-black",
22
- setFocusState: true
23
- }))
24
- }, jsxs(Fragment, { children: [showLabel === "left" && jsx(BodyText, { className: actionText, children: label }), jsx(Icon, { icon, title: showLabel ? void 0 : label, variantOverride }), showLabel === "right" && jsx(BodyText, { className: actionText, children: label })] }));
25
- }
26
- );
12
+ function IconButton({ $as, as, className, showLabel, label, icon, variantOverride, ...props }) {
13
+ return createElement($as ?? as ?? "button", {
14
+ ...props,
15
+ className: classNames(className, buttonRecipe({ color: "transparent", buttonType: "icon" }), iconButton({ showLabel }), stateLayers({
16
+ borderSize: "medium",
17
+ borderRadius: "button",
18
+ backgroundColor: "palette-black",
19
+ setFocusState: true
20
+ }))
21
+ }, jsxs(Fragment, { children: [showLabel === "left" && jsx(BodyText, { className: actionText, children: label }), jsx(Icon, { icon, title: showLabel ? void 0 : label, variantOverride }), showLabel === "right" && jsx(BodyText, { className: actionText, children: label })] }));
22
+ }
27
23
  export {
28
24
  IconButton
29
25
  };
@@ -2,10 +2,9 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
- const React = require("react");
6
5
  const ButtonBase = require("./ButtonBase.cjs");
7
6
  const createButtonVariant = require("./createButtonVariant.cjs");
8
- const PrimaryButton = React.forwardRef(function PrimaryButton2(props, ref) {
9
- return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ref, ...createButtonVariant.getButtonVariantProps("primary", props) });
10
- });
7
+ function PrimaryButton(props) {
8
+ return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ...createButtonVariant.getButtonVariantProps("primary", props) });
9
+ }
11
10
  exports.PrimaryButton = PrimaryButton;
@@ -7,5 +7,5 @@ Primary buttons shouldn’t appear more than once in a section, and preferably j
7
7
 
8
8
  Documentation: [PrimaryButton](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-buttons-primarybutton--docs)
9
9
  */
10
- export declare const PrimaryButton: import("react").ForwardRefExoticComponent<Omit<BoxedButtonProps<ElementType>, "ref"> & import("react").RefAttributes<Element>>;
10
+ export declare function PrimaryButton<AsElement extends ElementType = "button">(props: BoxedButtonProps<AsElement>): import("react/jsx-runtime").JSX.Element;
11
11
  //# sourceMappingURL=PrimaryButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA4B,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;;;;GAMG;AAEH,eAAO,MAAM,aAAa,gIASxB,CAAC"}
1
+ {"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/PrimaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;;;;GAMG;AAEH,wBAAgB,aAAa,CAAC,SAAS,SAAS,WAAW,GAAG,QAAQ,EAClE,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,2CAGrC"}
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
3
  import { BoxedButtonBase } from "./ButtonBase.js";
5
4
  import { getButtonVariantProps } from "./createButtonVariant.js";
6
- const PrimaryButton = forwardRef(function PrimaryButton2(props, ref) {
7
- return jsx(BoxedButtonBase, { ref, ...getButtonVariantProps("primary", props) });
8
- });
5
+ function PrimaryButton(props) {
6
+ return jsx(BoxedButtonBase, { ...getButtonVariantProps("primary", props) });
7
+ }
9
8
  export {
10
9
  PrimaryButton
11
10
  };
@@ -2,10 +2,9 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
- const React = require("react");
6
5
  const ButtonBase = require("./ButtonBase.cjs");
7
6
  const createButtonVariant = require("./createButtonVariant.cjs");
8
- const SecondaryButton = React.forwardRef(function SecondaryButton2(props, ref) {
9
- return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ref, ...createButtonVariant.getButtonVariantProps("secondary", props) });
10
- });
7
+ function SecondaryButton(props) {
8
+ return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ...createButtonVariant.getButtonVariantProps("secondary", props) });
9
+ }
11
10
  exports.SecondaryButton = SecondaryButton;
@@ -5,5 +5,5 @@ Secondary buttons are used for the second most important action. These are often
5
5
 
6
6
  Documentation: [SecondaryButton](https://gnist.moller.no/developers/components/latest/?path=/docs/components-actions-buttons-secondarybutton--docs)
7
7
  */
8
- export declare const SecondaryButton: import("react").ForwardRefExoticComponent<Omit<BoxedButtonProps<ElementType>, "ref"> & import("react").RefAttributes<Element>>;
8
+ export declare function SecondaryButton<AsElement extends ElementType = "button">(props: BoxedButtonProps<AsElement>): import("react/jsx-runtime").JSX.Element;
9
9
  //# sourceMappingURL=SecondaryButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/SecondaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAA4B,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;;EAIE;AAEF,eAAO,MAAM,eAAe,gIAS1B,CAAC"}
1
+ {"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../src/components/actions/buttons/SecondaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACpC,OAAO,EAAmB,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGpE;;;;EAIE;AAEF,wBAAgB,eAAe,CAAC,SAAS,SAAS,WAAW,GAAG,QAAQ,EACpE,KAAK,EAAE,gBAAgB,CAAC,SAAS,CAAC,2CAGrC"}
@@ -1,11 +1,10 @@
1
1
  "use client";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import { forwardRef } from "react";
4
3
  import { BoxedButtonBase } from "./ButtonBase.js";
5
4
  import { getButtonVariantProps } from "./createButtonVariant.js";
6
- const SecondaryButton = forwardRef(function SecondaryButton2(props, ref) {
7
- return jsx(BoxedButtonBase, { ref, ...getButtonVariantProps("secondary", props) });
8
- });
5
+ function SecondaryButton(props) {
6
+ return jsx(BoxedButtonBase, { ...getButtonVariantProps("secondary", props) });
7
+ }
9
8
  export {
10
9
  SecondaryButton
11
10
  };
@@ -2,10 +2,9 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
4
4
  const jsxRuntime = require("react/jsx-runtime");
5
- const React = require("react");
6
5
  const ButtonBase = require("./ButtonBase.cjs");
7
6
  const createButtonVariant = require("./createButtonVariant.cjs");
8
- const SuccessButton = React.forwardRef(function SuccessButton2(props, ref) {
9
- return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ref, ...createButtonVariant.getButtonVariantProps("success", props) });
10
- });
7
+ function SuccessButton(props) {
8
+ return jsxRuntime.jsx(ButtonBase.BoxedButtonBase, { ...createButtonVariant.getButtonVariantProps("success", props) });
9
+ }
11
10
  exports.SuccessButton = SuccessButton;