@nori-ui/core 1.2.0 → 1.4.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 (56) hide show
  1. package/dist/chunk-2PESUXE3.js +3 -0
  2. package/dist/chunk-2PESUXE3.js.map +1 -0
  3. package/dist/{chunk-WDNDTSNX.js → chunk-4I37QSEM.js} +3 -3
  4. package/dist/{chunk-WDNDTSNX.js.map → chunk-4I37QSEM.js.map} +1 -1
  5. package/dist/chunk-BNDUQNG7.js +443 -0
  6. package/dist/chunk-BNDUQNG7.js.map +1 -0
  7. package/dist/chunk-H7MFAFV4.js +303 -0
  8. package/dist/chunk-H7MFAFV4.js.map +1 -0
  9. package/dist/chunk-KCLWPSV5.js +134 -0
  10. package/dist/chunk-KCLWPSV5.js.map +1 -0
  11. package/dist/{chunk-7D2BHQ6M.js → chunk-L5X4SYJ4.js} +3 -3
  12. package/dist/chunk-L5X4SYJ4.js.map +1 -0
  13. package/dist/{chunk-XBNVKPJN.js → chunk-XXBN6CIK.js} +3 -3
  14. package/dist/{chunk-XBNVKPJN.js.map → chunk-XXBN6CIK.js.map} +1 -1
  15. package/dist/chunk-ZPUYNM37.js +3 -0
  16. package/dist/chunk-ZPUYNM37.js.map +1 -0
  17. package/dist/client.cjs +879 -21
  18. package/dist/client.cjs.map +1 -1
  19. package/dist/client.d.cts +4 -1
  20. package/dist/client.d.ts +4 -1
  21. package/dist/client.js +18 -13
  22. package/dist/client.js.map +1 -1
  23. package/dist/components/Breadcrumb/index.cjs.map +1 -1
  24. package/dist/components/Breadcrumb/index.js +3 -2
  25. package/dist/components/ContextMenu/index.cjs +1150 -0
  26. package/dist/components/ContextMenu/index.cjs.map +1 -0
  27. package/dist/components/ContextMenu/index.d.cts +38 -0
  28. package/dist/components/ContextMenu/index.d.ts +38 -0
  29. package/dist/components/ContextMenu/index.js +10 -0
  30. package/dist/components/ContextMenu/index.js.map +1 -0
  31. package/dist/components/DatePicker/index.cjs.map +1 -1
  32. package/dist/components/DatePicker/index.js +3 -2
  33. package/dist/components/DropdownMenu/index.cjs +1032 -0
  34. package/dist/components/DropdownMenu/index.cjs.map +1 -0
  35. package/dist/components/DropdownMenu/index.d.cts +97 -0
  36. package/dist/components/DropdownMenu/index.d.ts +97 -0
  37. package/dist/components/DropdownMenu/index.js +10 -0
  38. package/dist/components/DropdownMenu/index.js.map +1 -0
  39. package/dist/components/Popover/index.cjs +1 -0
  40. package/dist/components/Popover/index.cjs.map +1 -1
  41. package/dist/components/Popover/index.d.cts +22 -1
  42. package/dist/components/Popover/index.d.ts +22 -1
  43. package/dist/components/Popover/index.js +2 -1
  44. package/dist/components/Sheet/index.cjs +855 -0
  45. package/dist/components/Sheet/index.cjs.map +1 -0
  46. package/dist/components/Sheet/index.d.cts +104 -0
  47. package/dist/components/Sheet/index.d.ts +104 -0
  48. package/dist/components/Sheet/index.js +8 -0
  49. package/dist/components/Sheet/index.js.map +1 -0
  50. package/dist/index.cjs +879 -21
  51. package/dist/index.cjs.map +1 -1
  52. package/dist/index.d.cts +4 -1
  53. package/dist/index.d.ts +4 -1
  54. package/dist/index.js +18 -13
  55. package/package.json +1 -1
  56. package/dist/chunk-7D2BHQ6M.js.map +0 -1
package/dist/client.d.cts CHANGED
@@ -17,20 +17,23 @@ export { Button, ButtonProps, ButtonSize, ButtonVariant } from './components/But
17
17
  export { Calendar, CalendarBehavior, CalendarCaption, CalendarCaptionProps, CalendarChangeMeta, CalendarMode, CalendarProps, CalendarValue, CalendarView, CaptionContextValue, CaptionOption, DateRange, DayContext, useCalendarCaption } from './components/Calendar/index.cjs';
18
18
  export { Card, CardProps, CardSectionProps, CardTextProps } from './components/Card/index.cjs';
19
19
  export { Checkbox, CheckboxProps } from './components/Checkbox/index.cjs';
20
+ export { ContextMenu, ContextMenuContentProps, ContextMenuProps, ContextMenuTriggerProps } from './components/ContextMenu/index.cjs';
20
21
  export { DatePicker, DatePickerProps, DatePickerRangeProps, DateRangeValue } from './components/DatePicker/index.cjs';
21
22
  export { Dialog, DialogCloseProps, DialogContentProps, DialogFooterProps, DialogProps, DialogTextProps, DialogTriggerProps } from './components/Dialog/index.cjs';
23
+ export { DropdownMenu, DropdownMenuContentProps, DropdownMenuProps, DropdownMenuTriggerProps, MenuContent, MenuContentProps, MenuItem, MenuItemProps, MenuLabel, MenuLabelProps, MenuSeparator, MenuSeparatorProps } from './components/DropdownMenu/index.cjs';
22
24
  export { Field, FieldGroupProps, FieldProps } from './components/Field/index.cjs';
23
25
  export { FloatButton, FloatButtonBackToTopProps, FloatButtonBadge, FloatButtonGroupDirection, FloatButtonGroupProps, FloatButtonGroupTrigger, FloatButtonPlacement, FloatButtonProps, FloatButtonShape, FloatButtonSize, FloatButtonVariant } from './components/FloatButton/index.cjs';
24
26
  export { HStack, HStackProps, StackAlign, StackGap, StackJustify } from './components/HStack/index.cjs';
25
27
  export { InputGroup, InputGroupAddonProps, InputGroupInputProps, InputGroupProps } from './components/InputGroup/index.cjs';
26
28
  export { Label, LabelProps } from './components/Label/index.cjs';
27
29
  export { PAGINATION_COMPACT_BREAKPOINT, Pagination, PaginationItemDescriptor, PaginationItemType, PaginationJumperProps, PaginationOnPageChange, PaginationProps, PaginationRenderItemArgs, PaginationVariant, UsePaginationArgs, UsePaginationReturn, usePagination } from './components/Pagination/index.cjs';
28
- export { Popover, PopoverAlign, PopoverContentProps, PopoverProps, PopoverSide, PopoverTriggerProps } from './components/Popover/index.cjs';
30
+ export { Popover, PopoverAlign, PopoverContentProps, PopoverProps, PopoverSide, PopoverTriggerProps, usePopoverContext } from './components/Popover/index.cjs';
29
31
  export { Progress, ProgressProps, ProgressSize, ProgressTone } from './components/Progress/index.cjs';
30
32
  export { Radio, RadioGroupOrientation, RadioGroupProps, RadioProps } from './components/Radio/index.cjs';
31
33
  export { SegmentedControl, SegmentedControlOption, SegmentedControlProps, SegmentedControlSize } from './components/SegmentedControl/index.cjs';
32
34
  export { LoadOptionsParams, LoadOptionsResult, Select, SelectOption, SelectProps, SelectRenderOptionInfo } from './components/Select/index.cjs';
33
35
  export { Separator, SeparatorOrientation, SeparatorProps } from './components/Separator/index.cjs';
36
+ export { Drawer, Sheet, SheetBody, SheetBodyProps, SheetClose, SheetCloseProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetPanel, SheetPanelProps, SheetProps, SheetSide, SheetSize, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps } from './components/Sheet/index.cjs';
34
37
  export { Skeleton, SkeletonProps } from './components/Skeleton/index.cjs';
35
38
  export { Slider, SliderDirection, SliderGestureProvider, SliderOrientation, SliderProps, useSliderInteractionActive } from './components/Slider/index.cjs';
36
39
  export { Spinner, SpinnerProps, SpinnerSize } from './components/Spinner/index.cjs';
package/dist/client.d.ts CHANGED
@@ -17,20 +17,23 @@ export { Button, ButtonProps, ButtonSize, ButtonVariant } from './components/But
17
17
  export { Calendar, CalendarBehavior, CalendarCaption, CalendarCaptionProps, CalendarChangeMeta, CalendarMode, CalendarProps, CalendarValue, CalendarView, CaptionContextValue, CaptionOption, DateRange, DayContext, useCalendarCaption } from './components/Calendar/index.js';
18
18
  export { Card, CardProps, CardSectionProps, CardTextProps } from './components/Card/index.js';
19
19
  export { Checkbox, CheckboxProps } from './components/Checkbox/index.js';
20
+ export { ContextMenu, ContextMenuContentProps, ContextMenuProps, ContextMenuTriggerProps } from './components/ContextMenu/index.js';
20
21
  export { DatePicker, DatePickerProps, DatePickerRangeProps, DateRangeValue } from './components/DatePicker/index.js';
21
22
  export { Dialog, DialogCloseProps, DialogContentProps, DialogFooterProps, DialogProps, DialogTextProps, DialogTriggerProps } from './components/Dialog/index.js';
23
+ export { DropdownMenu, DropdownMenuContentProps, DropdownMenuProps, DropdownMenuTriggerProps, MenuContent, MenuContentProps, MenuItem, MenuItemProps, MenuLabel, MenuLabelProps, MenuSeparator, MenuSeparatorProps } from './components/DropdownMenu/index.js';
22
24
  export { Field, FieldGroupProps, FieldProps } from './components/Field/index.js';
23
25
  export { FloatButton, FloatButtonBackToTopProps, FloatButtonBadge, FloatButtonGroupDirection, FloatButtonGroupProps, FloatButtonGroupTrigger, FloatButtonPlacement, FloatButtonProps, FloatButtonShape, FloatButtonSize, FloatButtonVariant } from './components/FloatButton/index.js';
24
26
  export { HStack, HStackProps, StackAlign, StackGap, StackJustify } from './components/HStack/index.js';
25
27
  export { InputGroup, InputGroupAddonProps, InputGroupInputProps, InputGroupProps } from './components/InputGroup/index.js';
26
28
  export { Label, LabelProps } from './components/Label/index.js';
27
29
  export { PAGINATION_COMPACT_BREAKPOINT, Pagination, PaginationItemDescriptor, PaginationItemType, PaginationJumperProps, PaginationOnPageChange, PaginationProps, PaginationRenderItemArgs, PaginationVariant, UsePaginationArgs, UsePaginationReturn, usePagination } from './components/Pagination/index.js';
28
- export { Popover, PopoverAlign, PopoverContentProps, PopoverProps, PopoverSide, PopoverTriggerProps } from './components/Popover/index.js';
30
+ export { Popover, PopoverAlign, PopoverContentProps, PopoverProps, PopoverSide, PopoverTriggerProps, usePopoverContext } from './components/Popover/index.js';
29
31
  export { Progress, ProgressProps, ProgressSize, ProgressTone } from './components/Progress/index.js';
30
32
  export { Radio, RadioGroupOrientation, RadioGroupProps, RadioProps } from './components/Radio/index.js';
31
33
  export { SegmentedControl, SegmentedControlOption, SegmentedControlProps, SegmentedControlSize } from './components/SegmentedControl/index.js';
32
34
  export { LoadOptionsParams, LoadOptionsResult, Select, SelectOption, SelectProps, SelectRenderOptionInfo } from './components/Select/index.js';
33
35
  export { Separator, SeparatorOrientation, SeparatorProps } from './components/Separator/index.js';
36
+ export { Drawer, Sheet, SheetBody, SheetBodyProps, SheetClose, SheetCloseProps, SheetDescription, SheetDescriptionProps, SheetFooter, SheetFooterProps, SheetHeader, SheetHeaderProps, SheetPanel, SheetPanelProps, SheetProps, SheetSide, SheetSize, SheetTitle, SheetTitleProps, SheetTrigger, SheetTriggerProps } from './components/Sheet/index.js';
34
37
  export { Skeleton, SkeletonProps } from './components/Skeleton/index.js';
35
38
  export { Slider, SliderDirection, SliderGestureProvider, SliderOrientation, SliderProps, useSliderInteractionActive } from './components/Slider/index.js';
36
39
  export { Spinner, SpinnerProps, SpinnerSize } from './components/Spinner/index.js';
package/dist/client.js CHANGED
@@ -1,42 +1,47 @@
1
1
  import './chunk-BRCCWMGJ.js';
2
+ export { Tooltip } from './chunk-CGQIVFCN.js';
3
+ export { VStack } from './chunk-AFQIK6JI.js';
4
+ export { blueTheme, orangeTheme, presetThemes, roseTheme, slateTheme, tealTheme, useTheme, violetTheme } from './chunk-MDOZGILD.js';
2
5
  import './chunk-QI6646JZ.js';
3
6
  export { Icon } from './chunk-33S7ADWM.js';
7
+ export { Switch } from './chunk-VMAGFYHG.js';
8
+ export { Tabs } from './chunk-GELLSU64.js';
4
9
  export { TextArea } from './chunk-UPVNZPFV.js';
5
10
  export { TextInput } from './chunk-EFK7726V.js';
6
11
  export { Toaster, toast } from './chunk-LWLK6HSW.js';
7
12
  export { Toggle } from './chunk-SINLREQV.js';
8
- export { Tooltip } from './chunk-CGQIVFCN.js';
9
- export { VStack } from './chunk-AFQIK6JI.js';
10
- export { blueTheme, orangeTheme, presetThemes, roseTheme, slateTheme, tealTheme, useTheme, violetTheme } from './chunk-MDOZGILD.js';
13
+ export { Progress } from './chunk-XP55RZ3D.js';
14
+ export { Radio } from './chunk-C6TRLHMW.js';
11
15
  export { SegmentedControl } from './chunk-WAKKQROH.js';
12
16
  export { Separator } from './chunk-7UKRN73P.js';
17
+ export { Drawer, Sheet, SheetBody, SheetClose, SheetDescription, SheetFooter, SheetHeader, SheetPanel, SheetTitle, SheetTrigger } from './chunk-BNDUQNG7.js';
13
18
  export { Skeleton } from './chunk-JSAG5YO7.js';
14
19
  export { Slider, SliderGestureProvider, useSliderInteractionActive } from './chunk-ZMSIYLSI.js';
15
- export { Switch } from './chunk-VMAGFYHG.js';
16
- export { Tabs } from './chunk-GELLSU64.js';
20
+ import './chunk-2PESUXE3.js';
21
+ export { Field } from './chunk-2UXKXUX2.js';
17
22
  export { FloatButton } from './chunk-6JVUVBZH.js';
18
23
  export { HStack } from './chunk-GRDVE3IR.js';
19
24
  export { InputGroup } from './chunk-UUXWRDWW.js';
20
25
  export { Label } from './chunk-WOF67PKT.js';
21
26
  export { PAGINATION_COMPACT_BREAKPOINT, Pagination, usePagination } from './chunk-V2AWSDDZ.js';
22
- export { Progress } from './chunk-XP55RZ3D.js';
23
- export { Radio } from './chunk-C6TRLHMW.js';
24
- export { Breadcrumb, getBreadcrumbJsonLd } from './chunk-WDNDTSNX.js';
27
+ export { Breadcrumb, getBreadcrumbJsonLd } from './chunk-4I37QSEM.js';
25
28
  export { Button } from './chunk-LWQZ257T.js';
29
+ export { Spinner } from './chunk-ACLHDHX3.js';
26
30
  export { Card } from './chunk-HTF6FDB6.js';
27
31
  import { SemanticIconsProvider } from './chunk-WTNDPO2V.js';
28
32
  export { Checkbox, SemanticIconsProvider, useSemanticIcon } from './chunk-WTNDPO2V.js';
29
- export { DatePicker } from './chunk-XBNVKPJN.js';
30
- export { Popover } from './chunk-7D2BHQ6M.js';
33
+ export { ContextMenu } from './chunk-KCLWPSV5.js';
34
+ export { DropdownMenu, MenuContent, MenuItem, MenuLabel, MenuSeparator } from './chunk-H7MFAFV4.js';
35
+ export { DatePicker } from './chunk-XXBN6CIK.js';
36
+ import './chunk-ZPUYNM37.js';
31
37
  import { LocaleProvider } from './chunk-HZKXPN6B.js';
32
38
  export { Calendar, LocaleProvider, detectLocale, useCalendarCaption, useLocale } from './chunk-HZKXPN6B.js';
33
39
  export { Select } from './chunk-UJ5KFRDE.js';
34
- export { Dialog } from './chunk-IGLMPAWE.js';
35
- export { Field } from './chunk-2UXKXUX2.js';
36
- export { Spinner } from './chunk-ACLHDHX3.js';
37
40
  import { I18nProvider } from './chunk-MJ4AGXS7.js';
38
41
  export { I18nProvider, useTranslation } from './chunk-MJ4AGXS7.js';
39
42
  export { defaultDictionary, resolveI18n } from './chunk-6PO2IWB3.js';
43
+ export { Popover, usePopoverContext } from './chunk-L5X4SYJ4.js';
44
+ export { Dialog } from './chunk-IGLMPAWE.js';
40
45
  export { Accordion } from './chunk-Y4ZRSW35.js';
41
46
  import './chunk-RB3YBWQ4.js';
42
47
  import './chunk-RGJ3NBKE.js';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/provider/nori-provider.tsx"],"names":["theme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDO,SAAS,YAAA,CAAa,EAAE,KAAA,EAAAA,MAAAA,EAAO,aAAa,IAAA,EAAM,KAAA,EAAO,MAAA,EAAQ,QAAA,EAAS,EAAsB;AAGnG,EAAA,MAAM,aAAaA,MAAAA,KAAU,MAAA,GAAY,EAAC,GAAI,EAAE,OAAAA,MAAAA,EAAM;AACtD,EAAA,MAAM,YAAY,IAAA,KAAS,MAAA,GAAY,EAAC,GAAI,EAAE,IAAA,EAAK;AACnD,EAAA,MAAM,aAAa,KAAA,KAAU,MAAA,GAAY,EAAC,GAAI,EAAE,KAAA,EAAM;AACtD,EAAA,MAAM,cAAc,MAAA,KAAW,MAAA,GAAY,EAAC,GAAI,EAAE,MAAA,EAAO;AAEzD,EAAA,MAAM,KAAA,uBACD,cAAA,EAAA,EAAgB,GAAG,aAChB,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAe,GAAG,UAAA,EACf,QAAA,kBAAA,GAAA,CAAC,gBAAc,GAAG,SAAA,EACd,8BAAC,qBAAA,EAAA,EAAuB,GAAG,YAAa,QAAA,EAAS,CAAA,EACrD,GACJ,CAAA,EACJ,CAAA;AAGJ,EAAA,OAAO,gBAAgB,MAAA,GAAY,KAAA,uBAAS,mBAAA,EAAA,EAAoB,KAAA,EAAO,aAAc,QAAA,EAAA,KAAA,EAAM,CAAA;AAC/F;AAnBgB,MAAA,CAAA,YAAA,EAAA,cAAA,CAAA","file":"client.js","sourcesContent":["'use client';\n\nimport type { Theme } from '@nori-ui/tokens';\nimport type { ReactNode } from 'react';\nimport { I18nProvider } from '../i18n/context';\nimport { type LocaleInput, LocaleProvider } from '../i18n/locale';\nimport type { I18nInput } from '../i18n/types';\nimport type { SemanticIcons } from '../icons/default-semantic-icons';\nimport { SemanticIconsProvider } from '../icons/semantic-context';\nimport { type NoriTheme, ThemeProvider } from '../theme/context';\nimport { type ColorScheme, ColorSchemeProvider } from '../theme/use-color-scheme';\n\nexport type NoriProviderProps = {\n /**\n * Theme to apply to descendants. Pass:\n * - a `NoriTheme` (`{ light, dark }`) — covers both schemes\n * - a single `Theme` — used for both schemes (rare)\n * - one of the bundled presets: `tealTheme`, `blueTheme`, `roseTheme`,\n * `violetTheme`, `orangeTheme`, `slateTheme` (from `@nori-ui/core`)\n * - omit — falls back to the default Nori palette (teal)\n */\n theme?: NoriTheme | Theme;\n /**\n * Force a color scheme for descendants, overriding the OS signal. Use\n * when an app shell is hard-coded to one scheme (e.g. forced-dark\n * editorial chrome) and wants library components inside it to render\n * against the matching half of the theme.\n *\n * Omit to track the OS Appearance (native) / `<html>` `dark` class (web).\n */\n colorScheme?: ColorScheme;\n i18n?: I18nInput;\n icons?: Partial<SemanticIcons>;\n /**\n * BCP 47 locale tag (or `Intl.Locale`) used by locale-aware components\n * (Calendar, Number/Currency formatting, RelativeTime). Defaults to\n * the runtime's resolved locale (`new Intl.DateTimeFormat().resolvedOptions().locale`),\n * which mirrors what other `Intl` calls in the consumer's code use.\n */\n locale?: LocaleInput;\n children?: ReactNode;\n};\n\n/**\n * Single root provider composing theme, i18n, and semantic-icons contexts.\n * Place near the root of your app. Only needed to override defaults — the\n * library works out of the box without any provider.\n */\nexport function NoriProvider({ theme, colorScheme, i18n, icons, locale, children }: NoriProviderProps) {\n // Conditionally spread each optional prop — `exactOptionalPropertyTypes: true`\n // rejects passing `undefined` to a prop typed as `T | missing`.\n const themeProps = theme === undefined ? {} : { theme };\n const i18nProps = i18n === undefined ? {} : { i18n };\n const iconsProps = icons === undefined ? {} : { icons };\n const localeProps = locale === undefined ? {} : { locale };\n\n const inner = (\n <LocaleProvider {...localeProps}>\n <ThemeProvider {...themeProps}>\n <I18nProvider {...i18nProps}>\n <SemanticIconsProvider {...iconsProps}>{children}</SemanticIconsProvider>\n </I18nProvider>\n </ThemeProvider>\n </LocaleProvider>\n );\n\n return colorScheme === undefined ? inner : <ColorSchemeProvider value={colorScheme}>{inner}</ColorSchemeProvider>;\n}\n"]}
1
+ {"version":3,"sources":["../src/provider/nori-provider.tsx"],"names":["theme"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDO,SAAS,YAAA,CAAa,EAAE,KAAA,EAAAA,MAAAA,EAAO,aAAa,IAAA,EAAM,KAAA,EAAO,MAAA,EAAQ,QAAA,EAAS,EAAsB;AAGnG,EAAA,MAAM,aAAaA,MAAAA,KAAU,MAAA,GAAY,EAAC,GAAI,EAAE,OAAAA,MAAAA,EAAM;AACtD,EAAA,MAAM,YAAY,IAAA,KAAS,MAAA,GAAY,EAAC,GAAI,EAAE,IAAA,EAAK;AACnD,EAAA,MAAM,aAAa,KAAA,KAAU,MAAA,GAAY,EAAC,GAAI,EAAE,KAAA,EAAM;AACtD,EAAA,MAAM,cAAc,MAAA,KAAW,MAAA,GAAY,EAAC,GAAI,EAAE,MAAA,EAAO;AAEzD,EAAA,MAAM,KAAA,uBACD,cAAA,EAAA,EAAgB,GAAG,aAChB,QAAA,kBAAA,GAAA,CAAC,aAAA,EAAA,EAAe,GAAG,UAAA,EACf,QAAA,kBAAA,GAAA,CAAC,gBAAc,GAAG,SAAA,EACd,8BAAC,qBAAA,EAAA,EAAuB,GAAG,YAAa,QAAA,EAAS,CAAA,EACrD,GACJ,CAAA,EACJ,CAAA;AAGJ,EAAA,OAAO,gBAAgB,MAAA,GAAY,KAAA,uBAAS,mBAAA,EAAA,EAAoB,KAAA,EAAO,aAAc,QAAA,EAAA,KAAA,EAAM,CAAA;AAC/F;AAnBgB,MAAA,CAAA,YAAA,EAAA,cAAA,CAAA","file":"client.js","sourcesContent":["'use client';\n\nimport type { Theme } from '@nori-ui/tokens';\nimport type { ReactNode } from 'react';\nimport { I18nProvider } from '../i18n/context';\nimport { type LocaleInput, LocaleProvider } from '../i18n/locale';\nimport type { I18nInput } from '../i18n/types';\nimport type { SemanticIcons } from '../icons/default-semantic-icons';\nimport { SemanticIconsProvider } from '../icons/semantic-context';\nimport { type NoriTheme, ThemeProvider } from '../theme/context';\nimport { type ColorScheme, ColorSchemeProvider } from '../theme/use-color-scheme';\n\nexport type NoriProviderProps = {\n /**\n * Theme to apply to descendants. Pass:\n * - a `NoriTheme` (`{ light, dark }`) — covers both schemes\n * - a single `Theme` — used for both schemes (rare)\n * - one of the bundled presets: `tealTheme`, `blueTheme`, `roseTheme`,\n * `violetTheme`, `orangeTheme`, `slateTheme` (from `@nori-ui/core`)\n * - omit — falls back to the default Nori palette (teal)\n */\n theme?: NoriTheme | Theme;\n /**\n * Force a color scheme for descendants, overriding the OS signal. Use\n * when an app shell is hard-coded to one scheme (e.g. forced-dark\n * editorial chrome) and wants library components inside it to render\n * against the matching half of the theme.\n *\n * Omit to track the OS Appearance (native) / `<html>` `dark` class (web).\n */\n colorScheme?: ColorScheme;\n i18n?: I18nInput;\n icons?: Partial<SemanticIcons>;\n /**\n * BCP 47 locale tag (or `Intl.Locale`) used by locale-aware components\n * (Calendar, Number/Currency formatting, RelativeTime). Defaults to\n * the runtime's resolved locale (`new Intl.DateTimeFormat().resolvedOptions().locale`),\n * which mirrors what other `Intl` calls in the consumer's code use.\n */\n locale?: LocaleInput;\n children?: ReactNode;\n};\n\n/**\n * Single root provider composing theme, i18n, and semantic-icons contexts.\n * Place near the root of your app. Only needed to override defaults — the\n * library works out of the box without any provider.\n */\nexport function NoriProvider({ theme, colorScheme, i18n, icons, locale, children }: NoriProviderProps) {\n // Conditionally spread each optional prop — `exactOptionalPropertyTypes: true`\n // rejects passing `undefined` to a prop typed as `T | missing`.\n const themeProps = theme === undefined ? {} : { theme };\n const i18nProps = i18n === undefined ? {} : { i18n };\n const iconsProps = icons === undefined ? {} : { icons };\n const localeProps = locale === undefined ? {} : { locale };\n\n const inner = (\n <LocaleProvider {...localeProps}>\n <ThemeProvider {...themeProps}>\n <I18nProvider {...i18nProps}>\n <SemanticIconsProvider {...iconsProps}>{children}</SemanticIconsProvider>\n </I18nProvider>\n </ThemeProvider>\n </LocaleProvider>\n );\n\n return colorScheme === undefined ? inner : <ColorSchemeProvider value={colorScheme}>{inner}</ColorSchemeProvider>;\n}\n"]}