@telia/teddy 0.0.22 → 0.0.23

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 (42) hide show
  1. package/dist/components/button/button.d.ts +1 -1
  2. package/dist/components/button/button.js +1 -1
  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/drawer/drawer-root.d.ts +0 -3
  7. package/dist/components/index.d.ts +2 -0
  8. package/dist/components/index.js +4 -0
  9. package/dist/components/modal/modal.js +2 -0
  10. package/dist/components/notification/notification.d.ts +2 -2
  11. package/dist/components/scroll-area/index.d.ts +38 -0
  12. package/dist/components/scroll-area/index.js +9 -0
  13. package/dist/components/scroll-area/scroll-area-bar.d.ts +5 -0
  14. package/dist/components/scroll-area/scroll-area-bar.js +158 -0
  15. package/dist/components/scroll-area/scroll-area-button.d.ts +36 -0
  16. package/dist/components/scroll-area/scroll-area-button.js +11 -0
  17. package/dist/components/scroll-area/scroll-area-corner.d.ts +5 -0
  18. package/dist/components/scroll-area/scroll-area-corner.js +8 -0
  19. package/dist/components/scroll-area/scroll-area-item.d.ts +8 -0
  20. package/dist/components/scroll-area/scroll-area-item.js +41 -0
  21. package/dist/components/scroll-area/scroll-area-root.d.ts +21 -0
  22. package/dist/components/scroll-area/scroll-area-root.js +11 -0
  23. package/dist/components/scroll-area/scroll-area-thumb.d.ts +5 -0
  24. package/dist/components/scroll-area/scroll-area-thumb.js +8 -0
  25. package/dist/components/tabs/index.d.ts +59 -0
  26. package/dist/components/tabs/index.js +16 -0
  27. package/dist/components/tabs/tabs-content.d.ts +10 -0
  28. package/dist/components/tabs/tabs-content.js +15 -0
  29. package/dist/components/tabs/tabs-list.d.ts +16 -0
  30. package/dist/components/tabs/tabs-list.js +20 -0
  31. package/dist/components/tabs/tabs-root.d.ts +46 -0
  32. package/dist/components/tabs/tabs-root.js +41 -0
  33. package/dist/components/tabs/tabs-scroll-button.d.ts +27 -0
  34. package/dist/components/tabs/tabs-scroll-button.js +15 -0
  35. package/dist/components/tabs/tabs-scroll.d.ts +9 -0
  36. package/dist/components/tabs/tabs-scroll.js +22 -0
  37. package/dist/components/tabs/tabs-trigger.d.ts +16 -0
  38. package/dist/components/tabs/tabs-trigger.js +28 -0
  39. package/dist/components/toggle/toggle.d.ts +2 -2
  40. package/dist/main.js +4 -0
  41. package/dist/style.css +307 -142
  42. package/package.json +3 -1
@@ -9,7 +9,7 @@ type ButtonProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'aria-lab
9
9
  loading?: boolean;
10
10
  fullWidth?: boolean;
11
11
  size?: Size;
12
- variant: Variant;
12
+ variant?: Variant;
13
13
  } & ({
14
14
  iconOnly: true;
15
15
  ['aria-label']: string;
@@ -50,7 +50,7 @@ const variants = [
50
50
  const Root = React.forwardRef((args, ref) => {
51
51
  const {
52
52
  className,
53
- variant,
53
+ variant = "primary",
54
54
  size = "md",
55
55
  iconOnly,
56
56
  fullWidth,
@@ -65,7 +65,7 @@ declare const Card: React.ForwardRefExoticComponent<RootProps & React.RefAttribu
65
65
  loading?: boolean | undefined;
66
66
  fullWidth?: boolean | undefined;
67
67
  size?: "sm" | "md" | "lg" | undefined;
68
- variant: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative";
68
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
69
69
  } & {
70
70
  iconOnly: true;
71
71
  "aria-label": string;
@@ -74,12 +74,12 @@ declare const Card: React.ForwardRefExoticComponent<RootProps & React.RefAttribu
74
74
  loading?: boolean | undefined;
75
75
  fullWidth?: boolean | undefined;
76
76
  size?: "sm" | "md" | "lg" | undefined;
77
- variant: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative";
77
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
78
78
  } & {
79
79
  iconOnly?: false | undefined;
80
80
  "aria-label"?: string | undefined;
81
81
  } & React.RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
82
- variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
82
+ variant?: React.ComponentPropsWithoutRef<typeof PrimitiveButton>['variant'];
83
83
  } & React.RefAttributes<HTMLButtonElement>>;
84
84
  Link: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
85
85
  asChild?: boolean | undefined;
@@ -3,7 +3,7 @@ import { Icon } from '../icon';
3
3
 
4
4
  export type IndicatorProps = Partial<React.ComponentPropsWithoutRef<typeof Icon>>;
5
5
  export declare const Indicator: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
6
- name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "split" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "copy" | "dislike" | "download" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "visible" | "volume" | "zoom-out" | "zoom" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "email" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "add" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "infinite" | "job-search" | "key" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "radio" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "alert-filled" | "alert" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "help" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
7
- size?: ("font" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl") | undefined;
6
+ name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "x" | "download" | "split" | "alert" | "radio" | "email" | "copy" | "add" | "reverse" | "infinite" | "visible" | "help" | "zoom-out" | "zoom" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
7
+ size?: ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "font") | undefined;
8
8
  children?: React.ReactNode;
9
9
  }, "ref">> & React.RefAttributes<SVGSVGElement>>;
@@ -5,8 +5,8 @@ import { ItemProps } from './chip-item';
5
5
  export declare const Chip: import('react').ForwardRefExoticComponent<RootProps & import('react').RefAttributes<HTMLDivElement>> & {
6
6
  Item: import('react').ForwardRefExoticComponent<ItemProps & import('react').RefAttributes<HTMLButtonElement>>;
7
7
  Indicator: import('react').ForwardRefExoticComponent<Partial<Omit<import('react').SVGProps<SVGSVGElement> & {
8
- name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "split" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "copy" | "dislike" | "download" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "visible" | "volume" | "zoom-out" | "zoom" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "email" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "add" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "infinite" | "job-search" | "key" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "radio" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "alert-filled" | "alert" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "help" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
9
- size?: ("font" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl") | undefined;
8
+ name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "x" | "download" | "split" | "alert" | "radio" | "email" | "copy" | "add" | "reverse" | "infinite" | "visible" | "help" | "zoom-out" | "zoom" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
9
+ size?: ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "font") | undefined;
10
10
  children?: import('react').ReactNode;
11
11
  }, "ref">> & import('react').RefAttributes<SVGSVGElement>>;
12
12
  };
@@ -2,9 +2,6 @@ import { default as React } from 'react';
2
2
 
3
3
  import * as DrawerPrimitive from '@radix-ui/react-dialog';
4
4
  export declare const rootClassName = "teddy-drawer";
5
- /** -------------------------------------------------------------------------------------------------
6
- * Root
7
- * -----------------------------------------------------------------------------------------------*/
8
5
  export type RootProps = Omit<React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Root>, 'open' | 'defaultOpen' | 'onOpenChange' | 'modal'> & {
9
6
  /**
10
7
  * The controlled open state of the dialog. Must be used in conjunction with onOpenChange.
@@ -1,3 +1,5 @@
1
+ export * from './scroll-area';
2
+ export * from './tabs';
1
3
  export * from './drawer';
2
4
  export * from './image';
3
5
  export * from './chip';
@@ -1,3 +1,5 @@
1
+ import { ScrollArea } from "./scroll-area/index.js";
2
+ import { Tabs } from "./tabs/index.js";
1
3
  import { Drawer } from "./drawer/index.js";
2
4
  import { Image } from "./image/image.js";
3
5
  import { Chip } from "./chip/index.js";
@@ -49,7 +51,9 @@ export {
49
51
  NavigationMenu,
50
52
  Notification,
51
53
  RadioGroup,
54
+ ScrollArea,
52
55
  Spinner,
56
+ Tabs,
53
57
  Text,
54
58
  TextField,
55
59
  TextSpacing,
@@ -1,6 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import React__default, { useEffect } from "react";
3
3
  import * as DrawerPrimitive from "@radix-ui/react-dialog";
4
+ import "../scroll-area/index.js";
5
+ import "../tabs/index.js";
4
6
  import "../drawer/index.js";
5
7
  import "../image/image.js";
6
8
  import "../chip/index.js";
@@ -80,8 +80,8 @@ declare const Notification: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<
80
80
  Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLSpanElement>>;
81
81
  Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
82
82
  Icon: React.ForwardRefExoticComponent<Partial<Omit<React.SVGProps<SVGSVGElement> & {
83
- name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "split" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "copy" | "dislike" | "download" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "visible" | "volume" | "zoom-out" | "zoom" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "email" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "add" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "infinite" | "job-search" | "key" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "radio" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "alert-filled" | "alert" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "help" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
84
- size?: ("font" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl") | undefined;
83
+ name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "x" | "download" | "split" | "alert" | "radio" | "email" | "copy" | "add" | "reverse" | "infinite" | "visible" | "help" | "zoom-out" | "zoom" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "dislike" | "edit" | "heart-filled" | "heart" | "invisible" | "like" | "lock-open" | "lock" | "login" | "logout" | "maximize" | "minimize" | "mute" | "password-invisible" | "password-visible" | "play-filled" | "play" | "remove-filled" | "remove" | "save" | "send" | "settings" | "share" | "shuffle" | "sync" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "tv-next" | "tv-pause" | "tv-previous" | "tv-stop" | "upload" | "volume" | "connected-building" | "home" | "hospital" | "industry" | "premises-datacenter" | "premises-large" | "premises-medium" | "premises-small" | "premises" | "store" | "address-book" | "b2b-customer" | "care" | "chat-robot" | "chat" | "child-1" | "child-2" | "conversation" | "customer-dialogue" | "dsl-hub" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-sad" | "sms" | "support" | "user-admin" | "vcard" | "voicemail" | "battery" | "bluetooth" | "broadband" | "broken-phone" | "cast" | "cloud-connect" | "connected" | "core-router" | "daas-device" | "data-transfer" | "desktop" | "devices" | "esim-simcard" | "esim" | "face-id" | "fiber" | "fingerprint" | "fiveg" | "fourg" | "home-installation" | "industrial-iot" | "internet" | "it-service" | "laptop" | "mobile-broadband" | "network" | "phone-recycling" | "phone-ringing" | "phone" | "rack" | "refill-card" | "remote-control" | "repair" | "roaming" | "router" | "secure-device" | "sense-car" | "server" | "service-device" | "service-supervision" | "slow-wifi" | "smart-wifi" | "smartphone" | "smartwatch" | "tablet" | "trade-phone" | "tv" | "usb" | "voice-switch" | "wallplug" | "wireless-off" | "wireless-weak" | "wireless" | "world-alert" | "world-off" | "world-question" | "bar-chart" | "doc" | "document-doc" | "document-edit" | "document-pdf" | "document-ppt" | "excel" | "folder-copy" | "folder-new" | "folder" | "gif" | "graph" | "media-content" | "org-chart" | "pie-chart" | "print" | "register" | "report" | "simcard" | "spell-check" | "credit-card" | "euro" | "invoice" | "kontantkort" | "kr" | "late-payment" | "money-back-euro" | "money-back-kr" | "money-euro" | "money-kr" | "pay-monthly-euro" | "pay-monthly-kr" | "pay-once-euro" | "pay-once-kr" | "payment-success" | "savings" | "wallet" | "airplay" | "camera" | "entertainment" | "external" | "film" | "games" | "megaphone" | "microphone" | "music" | "player-settings" | "record" | "stream" | "trailer" | "video-conference" | "activity-level" | "ai-robot" | "bag" | "basketball" | "blood-pressure" | "bulb" | "business-continuity" | "business-intelligence" | "calendar" | "cart" | "close-circle" | "cloud" | "coffee" | "compass" | "construction" | "cookie" | "delivery" | "drone" | "education" | "efficiency" | "environment" | "facemask" | "flag" | "focus" | "food" | "fraud" | "getting-started" | "home-care" | "job-search" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "youtube" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "alert-filled" | "check-circle-filled" | "check-circle" | "error-filled" | "error" | "info-filled" | "info" | "question-filled" | "question" | "warning" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-subdirectory" | "arrow-up" | "card-view" | "checkmark-bold" | "checkmark" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "close" | "grid-view" | "list-view" | "minus-bold" | "minus" | "more-horizontal" | "more-vertical" | "plus" | "services" | "sorter" | "table-view";
84
+ size?: ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "font") | undefined;
85
85
  children?: React.ReactNode;
86
86
  }, "ref">> & React.RefAttributes<SVGSVGElement>>;
87
87
  Dismiss: React.ForwardRefExoticComponent<DismissProps & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,38 @@
1
+ import { RootProps } from './scroll-area-root';
2
+ import { ItemProps } from './scroll-area-item';
3
+ import { ButtonProps } from './scroll-area-button';
4
+
5
+ export declare const ScrollArea: import('react').ForwardRefExoticComponent<Omit<import('@radix-ui/react-scroll-area').ScrollAreaProps & import('react').RefAttributes<HTMLDivElement>, "ref"> & {
6
+ variant?: ("button" | "scrollbar") | undefined;
7
+ } & import('react').RefAttributes<HTMLDivElement>> & {
8
+ Item: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
9
+ asChild?: boolean | undefined;
10
+ } & import('react').RefAttributes<HTMLDivElement>>;
11
+ Button: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
12
+ asChild?: boolean | undefined;
13
+ loading?: boolean | undefined;
14
+ fullWidth?: boolean | undefined;
15
+ size?: "sm" | "md" | "lg" | undefined;
16
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
17
+ } & {
18
+ iconOnly: true;
19
+ "aria-label": string;
20
+ } & import('react').RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
21
+ asChild?: boolean | undefined;
22
+ loading?: boolean | undefined;
23
+ fullWidth?: boolean | undefined;
24
+ size?: "sm" | "md" | "lg" | undefined;
25
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
26
+ } & {
27
+ iconOnly?: false | undefined;
28
+ "aria-label"?: string | undefined;
29
+ } & import('react').RefAttributes<HTMLButtonElement>, "ref">, "hidden"> & {
30
+ direction?: "left" | "right" | "up" | "down" | undefined;
31
+ hidden?: boolean | undefined;
32
+ } & import('react').RefAttributes<HTMLButtonElement>>;
33
+ };
34
+ export type ScrollAreaProps = {
35
+ Root: RootProps;
36
+ Item: ItemProps;
37
+ Button: ButtonProps;
38
+ };
@@ -0,0 +1,9 @@
1
+ import { R as Root, B as Button } from "./scroll-area-bar.js";
2
+ import { Item } from "./scroll-area-item.js";
3
+ const ScrollArea = Object.assign(Root, {
4
+ Item,
5
+ Button
6
+ });
7
+ export {
8
+ ScrollArea
9
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
4
+ export type ScrollbarProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Scrollbar>;
5
+ export declare const Scrollbar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,158 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
5
+ import { Button as Button$1 } from "../button/button.js";
6
+ import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
7
+ import "../../assets/sprite.5636ec8e-teddy.svg";
8
+ import { Icon } from "../icon/icon.js";
9
+ import { Slottable } from "@radix-ui/react-slot";
10
+ const styles = {
11
+ "teddy-scroll-area": "_teddy-scroll-area_1swny_3",
12
+ "teddy-scroll-area__viewport": "_teddy-scroll-area__viewport_1swny_7",
13
+ "teddy-scroll-area__scrollbar": "_teddy-scroll-area__scrollbar_1swny_12",
14
+ "teddy-scroll-area__scrollbar--hidden": "_teddy-scroll-area__scrollbar--hidden_1swny_33",
15
+ "teddy-scroll-area__thumb": "_teddy-scroll-area__thumb_1swny_46",
16
+ "teddy-scroll-area__corner": "_teddy-scroll-area__corner_1swny_63",
17
+ "teddy-scroll-area__button": "_teddy-scroll-area__button_1swny_66",
18
+ "teddy-scroll-area__button--hidden": "_teddy-scroll-area__button--hidden_1swny_90"
19
+ };
20
+ const Scrollbar = React__default.forwardRef(
21
+ ({ className, ...props }, forwardRef) => {
22
+ const context = React__default.useContext(RootContext);
23
+ const classes = clsx(
24
+ [styles[`${rootClassName}__scrollbar`]],
25
+ {
26
+ [styles[`${rootClassName}__scrollbar--hidden`]]: (context == null ? void 0 : context.variant) !== "scrollbar"
27
+ },
28
+ className
29
+ );
30
+ return /* @__PURE__ */ jsx(ScrollAreaPrimitive.Scrollbar, { ...props, ref: forwardRef, className: classes });
31
+ }
32
+ );
33
+ Scrollbar.displayName = "Scrollbar";
34
+ const Thumb = React__default.forwardRef(
35
+ ({ className, ...props }, forwardRef) => {
36
+ const classes = clsx([styles[`${rootClassName}__thumb`]], className);
37
+ return /* @__PURE__ */ jsx(ScrollAreaPrimitive.Thumb, { ...props, ref: forwardRef, className: classes });
38
+ }
39
+ );
40
+ Thumb.displayName = "Thumb";
41
+ const Corner = React__default.forwardRef(
42
+ ({ className, ...props }, forwardRef) => {
43
+ const classes = clsx([styles[`${rootClassName}__corner`]], className);
44
+ return /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, { ...props, ref: forwardRef, className: classes });
45
+ }
46
+ );
47
+ Corner.displayName = "Corner";
48
+ const Button = React__default.forwardRef(
49
+ ({ className, hidden, direction, children, ...props }, forwardRef) => {
50
+ const context = React__default.useContext(RootContext);
51
+ const internalHidden = hidden ?? (direction === "up" && !(context == null ? void 0 : context.hasScrollTop) || direction === "down" && !(context == null ? void 0 : context.hasScrollBottom) || direction === "left" && !(context == null ? void 0 : context.hasScrollLeft) || direction === "right" && !(context == null ? void 0 : context.hasScrollRight));
52
+ const classes = clsx(
53
+ [styles[`${rootClassName}__button`]],
54
+ {
55
+ [styles[`${rootClassName}__button--hidden`]]: internalHidden
56
+ },
57
+ className
58
+ );
59
+ return /* @__PURE__ */ jsx(
60
+ Button$1,
61
+ {
62
+ iconOnly: true,
63
+ variant: "primary",
64
+ "aria-label": direction === "down" ? "Scroll ned" : direction === "up" ? "Scroll opp" : direction === "left" ? "Scroll venstre" : "Scroll høyre",
65
+ "data-direction": direction,
66
+ tabIndex: internalHidden ? -1 : void 0,
67
+ ...props,
68
+ onClick: composeEventHandlers(props.onClick, (e) => {
69
+ var _a, _b;
70
+ if (e.defaultPrevented)
71
+ return;
72
+ const scroll = (_a = context == null ? void 0 : context.scrollRef) == null ? void 0 : _a.getBoundingClientRect();
73
+ const scrollDirection = direction === "up" || direction === "left" ? -1 : 1;
74
+ const scrollAxis = direction === "up" || direction === "down" ? "top" : "left";
75
+ const scrollAmount = ((direction === "up" || direction === "down" ? scroll == null ? void 0 : scroll.height : scroll == null ? void 0 : scroll.width) || 0) * 0.7;
76
+ (_b = context == null ? void 0 : context.scrollRef) == null ? void 0 : _b.scrollBy({
77
+ [scrollAxis]: scrollAmount * scrollDirection,
78
+ behavior: "smooth"
79
+ });
80
+ }),
81
+ ref: forwardRef,
82
+ className: classes,
83
+ children: children || /* @__PURE__ */ jsx(
84
+ Icon,
85
+ {
86
+ name: direction === "down" ? "chevron-down" : direction === "up" ? "chevron-up" : direction === "left" ? "chevron-left" : "chevron-right"
87
+ }
88
+ )
89
+ }
90
+ );
91
+ }
92
+ );
93
+ Button$1.displayName = "Button";
94
+ const rootClassName = "teddy-scroll-area";
95
+ const RootContext = React__default.createContext(void 0);
96
+ const Root = React__default.forwardRef(
97
+ ({ className, variant, children, ...props }, forwardRef) => {
98
+ const [scrollRef, setScrollRef] = React__default.useState(null);
99
+ const [hasScroll, setHasScroll] = React__default.useState(null);
100
+ const initialHasScrollLeft = scrollRef ? scrollRef.scrollLeft > 0 : null;
101
+ const initialHasScrollRight = scrollRef ? scrollRef.scrollLeft < scrollRef.scrollWidth - scrollRef.clientWidth : null;
102
+ const initialHasScrollTop = scrollRef ? scrollRef.scrollTop > 0 : null;
103
+ const initialHasScrollBottom = scrollRef ? scrollRef.scrollTop < scrollRef.scrollHeight - scrollRef.clientHeight : null;
104
+ const hasScrollLeft = hasScroll ? hasScroll.left : initialHasScrollLeft;
105
+ const hasScrollRight = hasScroll ? hasScroll.right : initialHasScrollRight;
106
+ const hasScrollTop = hasScroll ? hasScroll.top : initialHasScrollTop;
107
+ const hasScrollBottom = hasScroll ? hasScroll.bottom : initialHasScrollBottom;
108
+ const hasScrollHorizontal = hasScrollLeft || hasScrollRight;
109
+ const hasScrollVertical = hasScrollTop || hasScrollBottom;
110
+ const classes = clsx([styles[`${rootClassName}`]], className);
111
+ function handleScroll(e) {
112
+ const target = e.currentTarget;
113
+ setHasScroll({
114
+ left: target.scrollLeft > 0,
115
+ right: target.scrollLeft < target.scrollWidth - target.clientWidth,
116
+ top: target.scrollTop > 0,
117
+ bottom: target.scrollTop < target.scrollHeight - target.clientHeight
118
+ });
119
+ }
120
+ return /* @__PURE__ */ jsx(
121
+ RootContext.Provider,
122
+ {
123
+ value: { scrollRef, variant, hasScrollTop, hasScrollBottom, hasScrollLeft, hasScrollRight },
124
+ children: /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, { ...props, ref: forwardRef, className: classes, children: [
125
+ /* @__PURE__ */ jsx(
126
+ ScrollAreaPrimitive.Viewport,
127
+ {
128
+ onScroll: handleScroll,
129
+ ref: setScrollRef,
130
+ className: clsx([styles[`${rootClassName}__viewport`]]),
131
+ children: /* @__PURE__ */ jsx(Slottable, { children })
132
+ }
133
+ ),
134
+ /* @__PURE__ */ jsx(Scrollbar, { orientation: "vertical", children: /* @__PURE__ */ jsx(Thumb, {}) }),
135
+ /* @__PURE__ */ jsx(Scrollbar, { orientation: "horizontal", children: /* @__PURE__ */ jsx(Thumb, {}) }),
136
+ /* @__PURE__ */ jsx(Corner, {}),
137
+ variant === "button" && /* @__PURE__ */ jsxs(Fragment, { children: [
138
+ hasScrollVertical && /* @__PURE__ */ jsx(Button, { direction: "up", hidden: !hasScrollTop }),
139
+ hasScrollVertical && /* @__PURE__ */ jsx(Button, { direction: "down", hidden: !hasScrollBottom }),
140
+ hasScrollHorizontal && /* @__PURE__ */ jsx(Button, { direction: "left", hidden: !hasScrollLeft }),
141
+ hasScrollHorizontal && /* @__PURE__ */ jsx(Button, { direction: "right", hidden: !hasScrollRight })
142
+ ] })
143
+ ] })
144
+ }
145
+ );
146
+ }
147
+ );
148
+ Root.displayName = "Root";
149
+ export {
150
+ Button as B,
151
+ Corner as C,
152
+ Root as R,
153
+ Scrollbar,
154
+ Thumb as T,
155
+ RootContext as a,
156
+ rootClassName as r,
157
+ styles as s
158
+ };
@@ -0,0 +1,36 @@
1
+ import { default as React } from 'react';
2
+ import { Button as PrimitiveButton } from '../button';
3
+
4
+ /**
5
+ * Props for the ScrollAreaButton component.
6
+ */
7
+ export type ButtonProps = Omit<React.ComponentPropsWithoutRef<typeof PrimitiveButton>, 'hidden'> & {
8
+ /** In which direction the button should point and scroll to */
9
+ direction?: 'up' | 'down' | 'left' | 'right';
10
+ /** Hidden will fade the button out. Used when the scrollbar is at the end */
11
+ hidden?: boolean;
12
+ };
13
+ export declare const Button: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
14
+ asChild?: boolean | undefined;
15
+ loading?: boolean | undefined;
16
+ fullWidth?: boolean | undefined;
17
+ size?: "sm" | "md" | "lg" | undefined;
18
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
19
+ } & {
20
+ iconOnly: true;
21
+ "aria-label": string;
22
+ } & React.RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
23
+ asChild?: boolean | undefined;
24
+ loading?: boolean | undefined;
25
+ fullWidth?: boolean | undefined;
26
+ size?: "sm" | "md" | "lg" | undefined;
27
+ variant?: "text" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
28
+ } & {
29
+ iconOnly?: false | undefined;
30
+ "aria-label"?: string | undefined;
31
+ } & React.RefAttributes<HTMLButtonElement>, "ref">, "hidden"> & {
32
+ /** In which direction the button should point and scroll to */
33
+ direction?: "left" | "right" | "up" | "down" | undefined;
34
+ /** Hidden will fade the button out. Used when the scrollbar is at the end */
35
+ hidden?: boolean | undefined;
36
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,11 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "clsx";
4
+ import { B } from "./scroll-area-bar.js";
5
+ import "../button/button.js";
6
+ import "../../utils/composeEventHandlers.js";
7
+ import "../../assets/sprite.5636ec8e-teddy.svg";
8
+ import "../icon/icon.js";
9
+ export {
10
+ B as Button
11
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
4
+ export type CornerProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Corner>;
5
+ export declare const Corner: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaCornerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,8 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "clsx";
4
+ import "@radix-ui/react-scroll-area";
5
+ import { C } from "./scroll-area-bar.js";
6
+ export {
7
+ C as Corner
8
+ };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+
3
+ export type ItemProps = React.ComponentPropsWithoutRef<'div'> & {
4
+ asChild?: boolean;
5
+ };
6
+ export declare const Item: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
+ asChild?: boolean | undefined;
8
+ } & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,41 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import React__default from "react";
3
+ import clsx from "clsx";
4
+ import { s as styles, r as rootClassName, a as RootContext } from "./scroll-area-bar.js";
5
+ import { Slot } from "@radix-ui/react-slot";
6
+ import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
7
+ const Item = React__default.forwardRef(
8
+ ({ className, asChild, ...props }, forwardRef) => {
9
+ const classes = clsx([styles[`${rootClassName}__item`]], className);
10
+ const Comp = asChild ? Slot : "div";
11
+ const context = React__default.useContext(RootContext);
12
+ return /* @__PURE__ */ jsx(
13
+ Comp,
14
+ {
15
+ ...props,
16
+ onClick: composeEventHandlers(props.onClick, (e) => {
17
+ var _a, _b;
18
+ if (e.defaultPrevented)
19
+ return;
20
+ const scroll = (_a = context == null ? void 0 : context.scrollRef) == null ? void 0 : _a.getBoundingClientRect();
21
+ const item = e.currentTarget.getBoundingClientRect();
22
+ const scrollViewVerticalCenter = ((scroll == null ? void 0 : scroll.top) || 0) + ((scroll == null ? void 0 : scroll.height) || 0) / 2;
23
+ const itemVerticalCenter = ((item == null ? void 0 : item.top) || 0) + ((item == null ? void 0 : item.height) || 0) / 2;
24
+ const scrollViewHorizontalCenter = ((scroll == null ? void 0 : scroll.left) || 0) + ((scroll == null ? void 0 : scroll.width) || 0) / 2;
25
+ const itemHorizontalCenter = ((item == null ? void 0 : item.left) || 0) + ((item == null ? void 0 : item.width) || 0) / 2;
26
+ (_b = context == null ? void 0 : context.scrollRef) == null ? void 0 : _b.scrollBy({
27
+ top: itemVerticalCenter - scrollViewVerticalCenter,
28
+ left: itemHorizontalCenter - scrollViewHorizontalCenter,
29
+ behavior: "smooth"
30
+ });
31
+ }),
32
+ ref: forwardRef,
33
+ className: classes
34
+ }
35
+ );
36
+ }
37
+ );
38
+ Item.displayName = "Item";
39
+ export {
40
+ Item
41
+ };
@@ -0,0 +1,21 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
4
+ export declare const rootClassName = "teddy-scroll-area";
5
+ type Variant = 'scrollbar' | 'button';
6
+ export type RootProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> & {
7
+ variant?: Variant;
8
+ };
9
+ type RootContextType = {
10
+ scrollRef: HTMLDivElement | null;
11
+ variant?: Variant;
12
+ hasScrollTop: boolean | null;
13
+ hasScrollBottom: boolean | null;
14
+ hasScrollLeft: boolean | null;
15
+ hasScrollRight: boolean | null;
16
+ };
17
+ export declare const RootContext: React.Context<RootContextType | undefined>;
18
+ export declare const Root: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
19
+ variant?: Variant | undefined;
20
+ } & React.RefAttributes<HTMLDivElement>>;
21
+ export {};
@@ -0,0 +1,11 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "clsx";
4
+ import "@radix-ui/react-scroll-area";
5
+ import { R, a, r } from "./scroll-area-bar.js";
6
+ import "@radix-ui/react-slot";
7
+ export {
8
+ R as Root,
9
+ a as RootContext,
10
+ r as rootClassName
11
+ };
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+
3
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
4
+ export type ThumbProps = React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Thumb>;
5
+ export declare const Thumb: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaThumbProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,8 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import "clsx";
4
+ import "@radix-ui/react-scroll-area";
5
+ import { T } from "./scroll-area-bar.js";
6
+ export {
7
+ T as Thumb
8
+ };