@telia/teddy 0.0.27 → 0.0.29

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 (87) hide show
  1. package/dist/components/accordion/accordion-root.cjs +14 -14
  2. package/dist/components/accordion/accordion-root.js +14 -14
  3. package/dist/components/card/card.d.ts +3 -3
  4. package/dist/components/chip/chip-indicator.d.ts +2 -2
  5. package/dist/components/chip/index.d.ts +2 -2
  6. package/dist/components/index.cjs +6 -0
  7. package/dist/components/index.d.ts +2 -0
  8. package/dist/components/index.js +6 -0
  9. package/dist/components/modal/modal.cjs +3 -0
  10. package/dist/components/modal/modal.js +3 -0
  11. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.cjs +9 -0
  12. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.d.ts +4 -0
  13. package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.js +9 -0
  14. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.cjs +21 -0
  15. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.d.ts +4 -0
  16. package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.js +21 -0
  17. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +369 -0
  18. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.d.ts +8 -0
  19. package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +369 -0
  20. package/dist/components/navigation-menu/global-navigation/global-navigation-root.cjs +12 -0
  21. package/dist/components/navigation-menu/global-navigation/global-navigation-root.d.ts +33 -0
  22. package/dist/components/navigation-menu/global-navigation/global-navigation-root.js +12 -0
  23. package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.cjs +37 -0
  24. package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.d.ts +10 -0
  25. package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.js +37 -0
  26. package/dist/components/navigation-menu/global-navigation/global-navigation-search.cjs +12 -0
  27. package/dist/components/navigation-menu/global-navigation/global-navigation-search.d.ts +8 -0
  28. package/dist/components/navigation-menu/global-navigation/global-navigation-search.js +12 -0
  29. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.cjs +11 -0
  30. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.d.ts +4 -0
  31. package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.js +11 -0
  32. package/dist/components/navigation-menu/global-navigation/index.cjs +4 -0
  33. package/dist/components/navigation-menu/global-navigation/index.d.ts +6 -0
  34. package/dist/components/navigation-menu/global-navigation/index.js +4 -0
  35. package/dist/components/navigation-menu/global-navigation/utils.cjs +318 -0
  36. package/dist/components/navigation-menu/global-navigation/utils.d.ts +496 -0
  37. package/dist/components/navigation-menu/global-navigation/utils.js +318 -0
  38. package/dist/components/navigation-menu/index.cjs +2 -0
  39. package/dist/components/navigation-menu/index.d.ts +1 -0
  40. package/dist/components/navigation-menu/index.js +2 -0
  41. package/dist/components/navigation-menu/navigation-menu.cjs +49 -23
  42. package/dist/components/navigation-menu/navigation-menu.d.ts +5 -0
  43. package/dist/components/navigation-menu/navigation-menu.js +50 -24
  44. package/dist/components/notabene/index.cjs +4 -0
  45. package/dist/components/notabene/index.d.ts +1 -0
  46. package/dist/components/notabene/index.js +4 -0
  47. package/dist/components/notabene/notabene.cjs +35 -0
  48. package/dist/components/notabene/notabene.d.ts +15 -0
  49. package/dist/components/notabene/notabene.js +35 -0
  50. package/dist/components/notification/notification.d.ts +2 -2
  51. package/dist/components/scroll-area/index.d.ts +2 -2
  52. package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
  53. package/dist/components/tabs/index.d.ts +2 -2
  54. package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
  55. package/dist/components/text-field/index.d.ts +2 -2
  56. package/dist/components/text-field/text-field-button.d.ts +2 -2
  57. package/dist/components/toggle/toggle.d.ts +2 -2
  58. package/dist/components/tooltip/index.cjs +22 -0
  59. package/dist/components/tooltip/index.d.ts +40 -0
  60. package/dist/components/tooltip/index.js +22 -0
  61. package/dist/components/tooltip/tooltip-arrow.cjs +33 -0
  62. package/dist/components/tooltip/tooltip-arrow.d.ts +6 -0
  63. package/dist/components/tooltip/tooltip-arrow.js +16 -0
  64. package/dist/components/tooltip/tooltip-content.cjs +46 -0
  65. package/dist/components/tooltip/tooltip-content.d.ts +80 -0
  66. package/dist/components/tooltip/tooltip-content.js +29 -0
  67. package/dist/components/tooltip/tooltip-portal.cjs +26 -0
  68. package/dist/components/tooltip/tooltip-portal.d.ts +7 -0
  69. package/dist/components/tooltip/tooltip-portal.js +9 -0
  70. package/dist/components/tooltip/tooltip-provider.cjs +30 -0
  71. package/dist/components/tooltip/tooltip-provider.d.ts +9 -0
  72. package/dist/components/tooltip/tooltip-provider.js +13 -0
  73. package/dist/components/tooltip/tooltip-root.cjs +36 -0
  74. package/dist/components/tooltip/tooltip-root.d.ts +25 -0
  75. package/dist/components/tooltip/tooltip-root.js +19 -0
  76. package/dist/components/tooltip/tooltip-trigger.cjs +38 -0
  77. package/dist/components/tooltip/tooltip-trigger.d.ts +6 -0
  78. package/dist/components/tooltip/tooltip-trigger.js +21 -0
  79. package/dist/main.cjs +6 -0
  80. package/dist/main.js +6 -0
  81. package/dist/style.css +1202 -1048
  82. package/dist/tooltip.module-D_3DOZOn.cjs +15 -0
  83. package/dist/tooltip.module-DnKU2XS4.js +16 -0
  84. package/dist/utils/generate-styling/grid.d.ts +24 -24
  85. package/dist/utils/generate-styling/index.d.ts +16 -16
  86. package/dist/utils/generate-styling/util.d.ts +2 -2
  87. package/package.json +2 -1
@@ -0,0 +1,318 @@
1
+ const APP_KEYS = {
2
+ "open-pages": "open-pages",
3
+ "web-shop": "web-shop",
4
+ storybook: "storybook",
5
+ "my-pages": "my-pages",
6
+ "my-business": "my-business",
7
+ "my-portal": "my-portal",
8
+ "business-net": "business-net"
9
+ };
10
+ const MY_PAGE_LINKS = {
11
+ name: "Min Side",
12
+ link: "/minside",
13
+ appKey: APP_KEYS["my-pages"],
14
+ links: [
15
+ {
16
+ name: "Hjem",
17
+ link: "/minside",
18
+ appKey: APP_KEYS["my-pages"],
19
+ icon: "home"
20
+ },
21
+ {
22
+ name: "Profil",
23
+ link: "/minside/profil",
24
+ appKey: APP_KEYS["my-pages"],
25
+ icon: "end-user"
26
+ },
27
+ {
28
+ name: "Faktura",
29
+ link: "/minside/faktura",
30
+ appKey: APP_KEYS["my-pages"],
31
+ icon: "doc"
32
+ },
33
+ {
34
+ name: "Personvern",
35
+ link: "/minside/innstillinger",
36
+ appKey: APP_KEYS["my-pages"],
37
+ icon: "secured-1"
38
+ }
39
+ ]
40
+ };
41
+ const MY_BUSINESS_LINKS = {
42
+ name: "Min bedrift",
43
+ link: "https://beta.minbedrift.telia.no/",
44
+ appKey: APP_KEYS["my-business"],
45
+ links: [],
46
+ icon: "home"
47
+ };
48
+ const MY_PORTAL_LINKS = {
49
+ name: "Min portal",
50
+ link: "https://minportal.telia.no/",
51
+ appKey: APP_KEYS["my-portal"],
52
+ links: [],
53
+ icon: "end-user"
54
+ };
55
+ const BUSINESS_NET_LINKS = {
56
+ name: "Bedriftsnett",
57
+ link: "https://sb.telia.no/",
58
+ appKey: APP_KEYS["business-net"],
59
+ links: [],
60
+ icon: "doc"
61
+ };
62
+ const LOGGED_IN_LINKS_BUSINESS = [MY_BUSINESS_LINKS, MY_PORTAL_LINKS, BUSINESS_NET_LINKS];
63
+ const LOGGED_IN_LINKS = [MY_PAGE_LINKS, ...LOGGED_IN_LINKS_BUSINESS];
64
+ const PRIVATE_LINKS = {
65
+ name: "Private",
66
+ link: "/",
67
+ links: [
68
+ {
69
+ name: "Logo",
70
+ link: "/",
71
+ appKey: APP_KEYS["open-pages"],
72
+ links: []
73
+ },
74
+ {
75
+ name: "Mobil",
76
+ link: "/mobil",
77
+ appKey: APP_KEYS["open-pages"],
78
+ links: [
79
+ {
80
+ name: "Abonnement",
81
+ link: "/mobil/abonnement",
82
+ appKey: APP_KEYS["open-pages"]
83
+ },
84
+ {
85
+ name: "Kontantkort",
86
+ link: "/mobil/kontantkort",
87
+ appKey: APP_KEYS["open-pages"]
88
+ },
89
+ {
90
+ name: "Mobiletelefoner",
91
+ link: "/mobil/mobiletelefoner",
92
+ appKey: APP_KEYS["web-shop"]
93
+ },
94
+ {
95
+ name: "Tjener",
96
+ link: "/mobil/tjener",
97
+ appKey: APP_KEYS["open-pages"]
98
+ },
99
+ {
100
+ name: "Tilbehør",
101
+ link: "/mobil/tilbehor",
102
+ appKey: APP_KEYS["web-shop"]
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ name: "TV",
108
+ link: "/tv",
109
+ appKey: APP_KEYS["open-pages"],
110
+ links: [
111
+ {
112
+ name: "Strømming",
113
+ link: "/tv/stromming",
114
+ appKey: APP_KEYS["open-pages"]
115
+ },
116
+ {
117
+ name: "Digital TV",
118
+ link: "/tv/digital-tv",
119
+ appKey: APP_KEYS["open-pages"]
120
+ },
121
+ {
122
+ name: "Tjener",
123
+ link: "/tv/tjener",
124
+ appKey: APP_KEYS["open-pages"]
125
+ }
126
+ ]
127
+ },
128
+ {
129
+ name: "Internett",
130
+ link: "/internett",
131
+ appKey: APP_KEYS["open-pages"],
132
+ links: [
133
+ {
134
+ name: "Fiber",
135
+ link: "/internett/fiber",
136
+ appKey: APP_KEYS["open-pages"]
137
+ },
138
+ {
139
+ name: "Mobilbredbånd",
140
+ link: "/internett/mobilbredband",
141
+ appKey: APP_KEYS["open-pages"]
142
+ },
143
+ {
144
+ name: "Tjener",
145
+ link: "/internett/tjener",
146
+ appKey: APP_KEYS["open-pages"]
147
+ },
148
+ {
149
+ name: "Tilbehør",
150
+ link: "/internett/tilbehor",
151
+ appKey: APP_KEYS["web-shop"]
152
+ }
153
+ ]
154
+ },
155
+ {
156
+ name: "Hjelp",
157
+ link: "/hjelp",
158
+ appKey: APP_KEYS["open-pages"],
159
+ links: [
160
+ {
161
+ name: "FAQ",
162
+ link: "/hjelp/faq",
163
+ appKey: APP_KEYS["open-pages"],
164
+ links: []
165
+ },
166
+ {
167
+ name: "Kontakt oss",
168
+ link: "/hjelp/kontakt-oss",
169
+ appKey: APP_KEYS["open-pages"],
170
+ links: []
171
+ }
172
+ ]
173
+ }
174
+ ]
175
+ };
176
+ const BUSINESS_LINKS = {
177
+ name: "Bedrift",
178
+ link: "/bedrift",
179
+ links: [
180
+ {
181
+ name: "Logo",
182
+ link: "/bedrift",
183
+ appKey: APP_KEYS["open-pages"],
184
+ links: []
185
+ },
186
+ {
187
+ name: "Produkter og tjenester",
188
+ link: "/bedrift/produkt-og-tjenester",
189
+ appKey: APP_KEYS["open-pages"],
190
+ links: [
191
+ {
192
+ name: "Tjenester",
193
+ link: "/bedrift/tjenester",
194
+ appKey: APP_KEYS["open-pages"]
195
+ },
196
+ {
197
+ name: "Mobil",
198
+ link: "/bedrift/mobil",
199
+ appKey: APP_KEYS["open-pages"]
200
+ },
201
+ {
202
+ name: "Internett",
203
+ link: "/bedrift/internett",
204
+ appKey: APP_KEYS["open-pages"]
205
+ },
206
+ {
207
+ name: "Tilbehør",
208
+ link: "/bedrift/tilbehor",
209
+ appKey: APP_KEYS["web-shop"]
210
+ }
211
+ ]
212
+ },
213
+ {
214
+ name: "Innovasjon og startup",
215
+ link: "/bedrift/innovasjon-og-startup",
216
+ appKey: APP_KEYS["open-pages"],
217
+ links: [
218
+ {
219
+ name: "Innovasjon",
220
+ link: "/bedrift/innovasjon",
221
+ appKey: APP_KEYS["open-pages"]
222
+ },
223
+ {
224
+ name: "Startup",
225
+ link: "/bedrift/startup",
226
+ appKey: APP_KEYS["open-pages"]
227
+ }
228
+ ]
229
+ },
230
+ {
231
+ name: "Hjelp",
232
+ link: "/bedrift/hjelp",
233
+ appKey: APP_KEYS["open-pages"],
234
+ links: [
235
+ {
236
+ name: "FAQ",
237
+ link: "/bedrift/hjelp/faq",
238
+ appKey: APP_KEYS["open-pages"]
239
+ },
240
+ {
241
+ name: "Kontakt oss",
242
+ link: "/bedrift/hjelp/kontakt-oss",
243
+ appKey: APP_KEYS["open-pages"]
244
+ }
245
+ ]
246
+ }
247
+ ]
248
+ };
249
+ const MDU_LINKS = {
250
+ name: "Borettslag",
251
+ link: "/borettslag",
252
+ links: [
253
+ {
254
+ name: "Logo",
255
+ link: "/borettslag",
256
+ appKey: APP_KEYS["open-pages"],
257
+ links: []
258
+ },
259
+ {
260
+ name: "Produkter og tjenester",
261
+ link: "/borettslag/produkt-og-tjenester",
262
+ appKey: APP_KEYS["open-pages"],
263
+ links: [
264
+ {
265
+ name: "Tjenester",
266
+ link: "/borettslag/tjenester",
267
+ appKey: APP_KEYS["open-pages"]
268
+ },
269
+ {
270
+ name: "Mobil",
271
+ link: "/borettslag/mobil",
272
+ appKey: APP_KEYS["open-pages"]
273
+ },
274
+ {
275
+ name: "Internett",
276
+ link: "/borettslag/internett",
277
+ appKey: APP_KEYS["open-pages"]
278
+ },
279
+ {
280
+ name: "Tilbehør",
281
+ link: "/borettslag/tilbehor",
282
+ appKey: APP_KEYS["web-shop"]
283
+ }
284
+ ]
285
+ },
286
+ {
287
+ name: "Hjelp",
288
+ link: "/borettslag/hjelp",
289
+ appKey: APP_KEYS["open-pages"],
290
+ links: [
291
+ {
292
+ name: "FAQ",
293
+ link: "/borettslag/hjelp/faq",
294
+ appKey: APP_KEYS["open-pages"]
295
+ },
296
+ {
297
+ name: "Kontakt oss",
298
+ link: "/borettslag/hjelp/kontakt-oss",
299
+ appKey: APP_KEYS["open-pages"]
300
+ }
301
+ ]
302
+ }
303
+ ]
304
+ };
305
+ const LINKS = [PRIVATE_LINKS, BUSINESS_LINKS, MDU_LINKS];
306
+ export {
307
+ APP_KEYS,
308
+ BUSINESS_LINKS,
309
+ BUSINESS_NET_LINKS,
310
+ LINKS,
311
+ LOGGED_IN_LINKS,
312
+ LOGGED_IN_LINKS_BUSINESS,
313
+ MDU_LINKS,
314
+ MY_BUSINESS_LINKS,
315
+ MY_PAGE_LINKS,
316
+ MY_PORTAL_LINKS,
317
+ PRIVATE_LINKS
318
+ };
@@ -1,4 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const components_navigationMenu_navigationMenu = require("./navigation-menu.cjs");
4
+ const components_navigationMenu_globalNavigation_globalNavigationMyPages = require("./global-navigation/global-navigation-my-pages.cjs");
4
5
  exports.NavigationMenu = components_navigationMenu_navigationMenu.NavigationMenu;
6
+ exports.GlobalNavigation = components_navigationMenu_globalNavigation_globalNavigationMyPages.GlobalNavigation;
@@ -1,2 +1,3 @@
1
1
  export { NavigationMenu } from './navigation-menu';
2
2
  export type { NavigationMenuProps } from './navigation-menu';
3
+ export { GlobalNavigation } from './global-navigation';
@@ -1,4 +1,6 @@
1
1
  import { NavigationMenu } from "./navigation-menu.js";
2
+ import { G } from "./global-navigation/global-navigation-my-pages.js";
2
3
  export {
4
+ G as GlobalNavigation,
3
5
  NavigationMenu
4
6
  };
@@ -8,6 +8,9 @@ const utils_composeRefs = require("../../utils/composeRefs.cjs");
8
8
  const components_visuallyHidden_visuallyHidden = require("../visually-hidden/visually-hidden.cjs");
9
9
  const utils_composeEventHandlers = require("../../utils/composeEventHandlers.cjs");
10
10
  const reactSlot = require("@radix-ui/react-slot");
11
+ const reactUseControllableState = require("@radix-ui/react-use-controllable-state");
12
+ const utils_generateStyling_index = require("../../utils/generate-styling/index.cjs");
13
+ const tokens_motion_variables = require("../../tokens/motion/variables.cjs");
11
14
  function _interopNamespaceDefault(e) {
12
15
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
13
16
  if (e) {
@@ -25,31 +28,31 @@ function _interopNamespaceDefault(e) {
25
28
  return Object.freeze(n);
26
29
  }
27
30
  const NavigationMenuPrimitive__namespace = /* @__PURE__ */ _interopNamespaceDefault(NavigationMenuPrimitive);
28
- const enterFromLeft = "_enterFromLeft_959s3_1";
29
- const enterFromRight = "_enterFromRight_959s3_1";
30
- const exitToLeft = "_exitToLeft_959s3_1";
31
- const exitToRight = "_exitToRight_959s3_1";
32
- const scaleIn = "_scaleIn_959s3_1";
33
- const scaleOut = "_scaleOut_959s3_1";
31
+ const enterFromLeft = "_enterFromLeft_h8tnl_1";
32
+ const enterFromRight = "_enterFromRight_h8tnl_1";
33
+ const exitToLeft = "_exitToLeft_h8tnl_1";
34
+ const exitToRight = "_exitToRight_h8tnl_1";
35
+ const scaleIn = "_scaleIn_h8tnl_1";
36
+ const scaleOut = "_scaleOut_h8tnl_1";
34
37
  const styles = {
35
- "teddy-navigation-menu": "_teddy-navigation-menu_959s3_1",
36
- "teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_959s3_33",
37
- "teddy-navigation-menu__list": "_teddy-navigation-menu__list_959s3_36",
38
- "teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_959s3_55",
39
- "teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_959s3_75",
40
- "teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_959s3_92",
41
- "teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_959s3_97",
42
- "teddy-navigation-menu__content": "_teddy-navigation-menu__content_959s3_169",
38
+ "teddy-navigation-menu": "_teddy-navigation-menu_h8tnl_1",
39
+ "teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_h8tnl_34",
40
+ "teddy-navigation-menu__list": "_teddy-navigation-menu__list_h8tnl_37",
41
+ "teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_h8tnl_56",
42
+ "teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_h8tnl_76",
43
+ "teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_h8tnl_95",
44
+ "teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_h8tnl_101",
45
+ "teddy-navigation-menu__content": "_teddy-navigation-menu__content_h8tnl_178",
43
46
  enterFromLeft,
44
47
  enterFromRight,
45
48
  exitToLeft,
46
49
  exitToRight,
47
- "teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_959s3_213",
48
- "teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_959s3_231",
49
- "teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_959s3_236",
50
- "teddy-navigation-menu__link": "_teddy-navigation-menu__link_959s3_301",
51
- "teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_959s3_319",
52
- "teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_959s3_324",
50
+ "teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_h8tnl_222",
51
+ "teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_h8tnl_242",
52
+ "teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_h8tnl_248",
53
+ "teddy-navigation-menu__link": "_teddy-navigation-menu__link_h8tnl_318",
54
+ "teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_h8tnl_338",
55
+ "teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_h8tnl_344",
53
56
  scaleIn,
54
57
  scaleOut
55
58
  };
@@ -72,9 +75,15 @@ const NavigationMenuContext = React.createContext({
72
75
  }
73
76
  });
74
77
  const Root = React.forwardRef(
75
- ({ className, defaultTopMenuValue, ...props }, forwardRef) => {
76
- const [selectedTopMenu, setSelectedTopMenu] = React.useState(defaultTopMenuValue);
78
+ ({ className, defaultTopMenuValue, topMenuValue, onTopMenuValueChange, ...props }, forwardRef) => {
79
+ const [selectedTopMenu, setSelectedTopMenu] = reactUseControllableState.useControllableState({
80
+ defaultProp: defaultTopMenuValue,
81
+ prop: topMenuValue,
82
+ onChange: onTopMenuValueChange
83
+ });
77
84
  const contentRef = React.useRef(null);
85
+ const [allowAnimationOfHeight, setAllowAnimationOfHeight] = React.useState(false);
86
+ const timerRef = React.useRef(void 0);
78
87
  const restoreContentTabOrderRef = React.useRef(() => {
79
88
  });
80
89
  const focusProxyRef = React.useRef(null);
@@ -95,6 +104,14 @@ const Root = React.forwardRef(
95
104
  restoreContentTabOrderRef.current = removeFromTabOrder(candidates);
96
105
  }
97
106
  }, []);
107
+ React.useEffect(() => {
108
+ timerRef.current = setTimeout(() => {
109
+ setAllowAnimationOfHeight(true);
110
+ }, 500);
111
+ return () => {
112
+ timerRef.current && clearTimeout(timerRef.current);
113
+ };
114
+ }, []);
98
115
  const classes = clsx([styles[`${rootClassName}`]], className);
99
116
  return /* @__PURE__ */ jsxRuntime.jsx(
100
117
  NavigationMenuContext.Provider,
@@ -112,7 +129,15 @@ const Root = React.forwardRef(
112
129
  selectedTopMenu,
113
130
  setSelectedTopMenu
114
131
  },
115
- children: /* @__PURE__ */ jsxRuntime.jsx(NavigationMenuPrimitive__namespace.Root, { ...props, ref: forwardRef, className: classes })
132
+ children: /* @__PURE__ */ jsxRuntime.jsx(
133
+ NavigationMenuPrimitive__namespace.Root,
134
+ {
135
+ ...props,
136
+ style: allowAnimationOfHeight ? utils_generateStyling_index.mergeStyles(props.style, { ["--teddy-motion-duration-controlled"]: tokens_motion_variables.teddyMotionDuration300 }) : props.style,
137
+ ref: forwardRef,
138
+ className: classes
139
+ }
140
+ )
116
141
  }
117
142
  );
118
143
  }
@@ -410,3 +435,4 @@ const NavigationMenu = Object.assign(Root, {
410
435
  TopMenuTrigger
411
436
  });
412
437
  exports.NavigationMenu = NavigationMenu;
438
+ exports.rootClassName = rootClassName;
@@ -1,6 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
 
3
3
  import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
4
+ export declare const rootClassName = "teddy-navigation-menu";
4
5
  /** -------------------------------------------------------------------------------------------------
5
6
  * NavigationMenuRoot
6
7
  * -----------------------------------------------------------------------------------------------*/
@@ -9,6 +10,8 @@ type RootProps = React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.R
9
10
  * @example "private" | "business"
10
11
  */
11
12
  defaultTopMenuValue?: string;
13
+ topMenuValue?: string | undefined;
14
+ onTopMenuValueChange?: (value: string) => void;
12
15
  };
13
16
  /** -------------------------------------------------------------------------------------------------
14
17
  * NavigationMenu.TopMenuList
@@ -80,6 +83,8 @@ declare const NavigationMenu: React.ForwardRefExoticComponent<Omit<NavigationMen
80
83
  * @example "private" | "business"
81
84
  */
82
85
  defaultTopMenuValue?: string | undefined;
86
+ topMenuValue?: string | undefined;
87
+ onTopMenuValueChange?: ((value: string) => void) | undefined;
83
88
  } & React.RefAttributes<HTMLElement>> & {
84
89
  List: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & {
85
90
  variant?: "gray" | undefined;
@@ -6,31 +6,34 @@ import { useComposedRefs } from "../../utils/composeRefs.js";
6
6
  import { VisuallyHidden } from "../visually-hidden/visually-hidden.js";
7
7
  import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
8
8
  import { Slot } from "@radix-ui/react-slot";
9
- const enterFromLeft = "_enterFromLeft_959s3_1";
10
- const enterFromRight = "_enterFromRight_959s3_1";
11
- const exitToLeft = "_exitToLeft_959s3_1";
12
- const exitToRight = "_exitToRight_959s3_1";
13
- const scaleIn = "_scaleIn_959s3_1";
14
- const scaleOut = "_scaleOut_959s3_1";
9
+ import { useControllableState } from "@radix-ui/react-use-controllable-state";
10
+ import { mergeStyles } from "../../utils/generate-styling/index.js";
11
+ import { teddyMotionDuration300 } from "../../tokens/motion/variables.js";
12
+ const enterFromLeft = "_enterFromLeft_h8tnl_1";
13
+ const enterFromRight = "_enterFromRight_h8tnl_1";
14
+ const exitToLeft = "_exitToLeft_h8tnl_1";
15
+ const exitToRight = "_exitToRight_h8tnl_1";
16
+ const scaleIn = "_scaleIn_h8tnl_1";
17
+ const scaleOut = "_scaleOut_h8tnl_1";
15
18
  const styles = {
16
- "teddy-navigation-menu": "_teddy-navigation-menu_959s3_1",
17
- "teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_959s3_33",
18
- "teddy-navigation-menu__list": "_teddy-navigation-menu__list_959s3_36",
19
- "teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_959s3_55",
20
- "teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_959s3_75",
21
- "teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_959s3_92",
22
- "teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_959s3_97",
23
- "teddy-navigation-menu__content": "_teddy-navigation-menu__content_959s3_169",
19
+ "teddy-navigation-menu": "_teddy-navigation-menu_h8tnl_1",
20
+ "teddy-navigation-menu__viewport": "_teddy-navigation-menu__viewport_h8tnl_34",
21
+ "teddy-navigation-menu__list": "_teddy-navigation-menu__list_h8tnl_37",
22
+ "teddy-navigation-menu__top-menu-list": "_teddy-navigation-menu__top-menu-list_h8tnl_56",
23
+ "teddy-navigation-menu__top-menu-trigger": "_teddy-navigation-menu__top-menu-trigger_h8tnl_76",
24
+ "teddy-navigation-menu__top-menu-trigger--small": "_teddy-navigation-menu__top-menu-trigger--small_h8tnl_95",
25
+ "teddy-navigation-menu__top-menu-trigger--button": "_teddy-navigation-menu__top-menu-trigger--button_h8tnl_101",
26
+ "teddy-navigation-menu__content": "_teddy-navigation-menu__content_h8tnl_178",
24
27
  enterFromLeft,
25
28
  enterFromRight,
26
29
  exitToLeft,
27
30
  exitToRight,
28
- "teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_959s3_213",
29
- "teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_959s3_231",
30
- "teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_959s3_236",
31
- "teddy-navigation-menu__link": "_teddy-navigation-menu__link_959s3_301",
32
- "teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_959s3_319",
33
- "teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_959s3_324",
31
+ "teddy-navigation-menu__trigger": "_teddy-navigation-menu__trigger_h8tnl_222",
32
+ "teddy-navigation-menu__trigger--small": "_teddy-navigation-menu__trigger--small_h8tnl_242",
33
+ "teddy-navigation-menu__trigger--button": "_teddy-navigation-menu__trigger--button_h8tnl_248",
34
+ "teddy-navigation-menu__link": "_teddy-navigation-menu__link_h8tnl_318",
35
+ "teddy-navigation-menu__link--small": "_teddy-navigation-menu__link--small_h8tnl_338",
36
+ "teddy-navigation-menu__link--button": "_teddy-navigation-menu__link--button_h8tnl_344",
34
37
  scaleIn,
35
38
  scaleOut
36
39
  };
@@ -53,9 +56,15 @@ const NavigationMenuContext = React__default.createContext({
53
56
  }
54
57
  });
55
58
  const Root = React__default.forwardRef(
56
- ({ className, defaultTopMenuValue, ...props }, forwardRef) => {
57
- const [selectedTopMenu, setSelectedTopMenu] = React__default.useState(defaultTopMenuValue);
59
+ ({ className, defaultTopMenuValue, topMenuValue, onTopMenuValueChange, ...props }, forwardRef) => {
60
+ const [selectedTopMenu, setSelectedTopMenu] = useControllableState({
61
+ defaultProp: defaultTopMenuValue,
62
+ prop: topMenuValue,
63
+ onChange: onTopMenuValueChange
64
+ });
58
65
  const contentRef = React__default.useRef(null);
66
+ const [allowAnimationOfHeight, setAllowAnimationOfHeight] = React__default.useState(false);
67
+ const timerRef = React__default.useRef(void 0);
59
68
  const restoreContentTabOrderRef = React__default.useRef(() => {
60
69
  });
61
70
  const focusProxyRef = React__default.useRef(null);
@@ -76,6 +85,14 @@ const Root = React__default.forwardRef(
76
85
  restoreContentTabOrderRef.current = removeFromTabOrder(candidates);
77
86
  }
78
87
  }, []);
88
+ React__default.useEffect(() => {
89
+ timerRef.current = setTimeout(() => {
90
+ setAllowAnimationOfHeight(true);
91
+ }, 500);
92
+ return () => {
93
+ timerRef.current && clearTimeout(timerRef.current);
94
+ };
95
+ }, []);
79
96
  const classes = clsx([styles[`${rootClassName}`]], className);
80
97
  return /* @__PURE__ */ jsx(
81
98
  NavigationMenuContext.Provider,
@@ -93,7 +110,15 @@ const Root = React__default.forwardRef(
93
110
  selectedTopMenu,
94
111
  setSelectedTopMenu
95
112
  },
96
- children: /* @__PURE__ */ jsx(NavigationMenuPrimitive.Root, { ...props, ref: forwardRef, className: classes })
113
+ children: /* @__PURE__ */ jsx(
114
+ NavigationMenuPrimitive.Root,
115
+ {
116
+ ...props,
117
+ style: allowAnimationOfHeight ? mergeStyles(props.style, { ["--teddy-motion-duration-controlled"]: teddyMotionDuration300 }) : props.style,
118
+ ref: forwardRef,
119
+ className: classes
120
+ }
121
+ )
97
122
  }
98
123
  );
99
124
  }
@@ -391,5 +416,6 @@ const NavigationMenu = Object.assign(Root, {
391
416
  TopMenuTrigger
392
417
  });
393
418
  export {
394
- NavigationMenu
419
+ NavigationMenu,
420
+ rootClassName
395
421
  };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const components_notabene_notabene = require("./notabene.cjs");
4
+ exports.Notabene = components_notabene_notabene.Notabene;
@@ -0,0 +1 @@
1
+ export { Notabene } from './notabene';
@@ -0,0 +1,4 @@
1
+ import { Notabene } from "./notabene.js";
2
+ export {
3
+ Notabene
4
+ };
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const clsx = require("clsx");
6
+ const reactSlot = require("@radix-ui/react-slot");
7
+ require("../../assets/sprite.269ba410-teddy.svg");
8
+ const components_icon_icon = require("../icon/icon.cjs");
9
+ const components_text_text = require("../text/text.cjs");
10
+ const components_heading_heading = require("../heading/heading.cjs");
11
+ const components_box_box = require("../box/box.cjs");
12
+ const styles = {
13
+ "teddy-notabene": "_teddy-notabene_waflr_1",
14
+ "teddy-notabene__icon": "_teddy-notabene__icon_waflr_9",
15
+ "teddy-notabene__heading": "_teddy-notabene__heading_waflr_9"
16
+ };
17
+ const rootClassName = "teddy-notabene";
18
+ const defaultTitle = "Good to know";
19
+ const defaultText = "It could be anything, and also bullet points.";
20
+ const Root = React.forwardRef(
21
+ ({ asChild, children, className, heading = defaultTitle, headingAs = "h2", text = defaultText, ...props }, forwardRef) => {
22
+ const classes = clsx([styles[`${rootClassName}`]], className);
23
+ const Comp = asChild ? reactSlot.Slot : "div";
24
+ return /* @__PURE__ */ jsxRuntime.jsxs(Comp, { ...props, ref: forwardRef, className: classes, children: [
25
+ /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { children: /* @__PURE__ */ jsxRuntime.jsx(components_icon_icon.Icon, { name: "bulb", size: "lg", className: styles[`${rootClassName}__icon`] }) }),
26
+ /* @__PURE__ */ jsxRuntime.jsxs(components_box_box.Box, { children: [
27
+ /* @__PURE__ */ jsxRuntime.jsx(components_heading_heading.Heading, { as: headingAs, variant: "title-200", mb: "150", className: styles[`${rootClassName}__heading`], children: heading }),
28
+ /* @__PURE__ */ jsxRuntime.jsx(components_text_text.Text, { variant: "paragraph-100", mb: "50", children: text }),
29
+ children
30
+ ] })
31
+ ] });
32
+ }
33
+ );
34
+ Root.displayName = "Notabene";
35
+ exports.Notabene = Root;
@@ -0,0 +1,15 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type RootProps = React.ComponentPropsWithoutRef<'div'> & {
4
+ heading: string;
5
+ text: string;
6
+ headingAs: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
7
+ asChild?: boolean;
8
+ };
9
+ declare const Root: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
+ heading: string;
11
+ text: string;
12
+ headingAs: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
13
+ asChild?: boolean | undefined;
14
+ } & React.RefAttributes<HTMLDivElement>>;
15
+ export { Root as Notabene };