@telia/teddy 0.6.16 → 0.7.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.
- package/dist/assets/ajax-loader.0b80f665-teddy.gif +0 -0
- package/dist/assets/slick.25572f22-teddy.eot +0 -0
- package/dist/assets/slick.653a4cbb-teddy.woff +0 -0
- package/dist/assets/slick.6aa1ee46-teddy.ttf +0 -0
- package/dist/components/avatar/avatar-root.d.ts +1 -1
- package/dist/components/avatar/index.d.ts +1 -1
- package/dist/components/avatar/utils.cjs +1 -2
- package/dist/components/avatar/utils.js +1 -2
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/card/card-availability.d.ts +1 -1
- package/dist/components/card/card.cjs +6 -12
- package/dist/components/card/card.js +6 -12
- package/dist/components/channel-button/channel-button-root.d.ts +3 -3
- package/dist/components/channel-button/index.d.ts +3 -3
- package/dist/components/checkbox/checkbox-group.cjs +1 -2
- package/dist/components/checkbox/checkbox-group.js +1 -2
- package/dist/components/chip/chip-indicator.d.ts +1 -1
- package/dist/components/chip/index.d.ts +1 -1
- package/dist/components/circle-bar/css.cjs +1 -2
- package/dist/components/circle-bar/css.js +1 -2
- package/dist/components/dashboard-card/dashboard-card-avatar.d.ts +1 -1
- package/dist/components/dashboard-card/dashboard-card-root.js +1 -1
- package/dist/components/date-picker/css.cjs +1 -2
- package/dist/components/date-picker/css.js +1 -2
- package/dist/components/date-picker/date-picker-month.js +1 -1
- package/dist/components/date-picker/date-picker.cjs +6 -12
- package/dist/components/date-picker/date-picker.js +7 -13
- package/dist/components/date-picker/date-utils.cjs +13 -26
- package/dist/components/date-picker/date-utils.js +13 -26
- package/dist/components/expandable-card/expandable-card-button.d.ts +2 -2
- package/dist/components/expandable-card/index.d.ts +2 -2
- package/dist/components/flip-card/flip-card-root.cjs +1 -2
- package/dist/components/flip-card/flip-card-root.js +1 -2
- package/dist/components/flip-card/flip-card-trigger.d.ts +2 -2
- package/dist/components/icon/AllIcons.cjs +9 -9
- package/dist/components/icon/AllIcons.js +9 -9
- package/dist/components/icon/icon.cjs +2 -2
- package/dist/components/icon/icon.js +2 -2
- package/dist/components/icon/index.cjs +1 -2
- package/dist/components/icon/index.d.ts +0 -2
- package/dist/components/icon/index.js +3 -4
- package/dist/components/icon/utils.d.ts +1 -1
- package/dist/components/index.cjs +6 -7
- package/dist/components/index.js +3 -4
- package/dist/components/input/index.cjs +5 -5
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/input-clear-button.cjs +2 -3
- package/dist/components/input/input-clear-button.js +1 -2
- package/dist/components/input/input-group.cjs +10 -14
- package/dist/components/input/input-group.js +10 -14
- package/dist/components/input/input-indicator.cjs +1 -1
- package/dist/components/input/input.cjs +2 -2
- package/dist/components/meter-bar/index.cjs +2 -2
- package/dist/components/meter-bar/meter-bar-indicator.cjs +3 -0
- package/dist/components/meter-bar/meter-bar-indicator.js +5 -2
- package/dist/components/meter-bar/meter-bar-root.cjs +3 -3
- package/dist/components/metricmeter/css.cjs +1 -2
- package/dist/components/metricmeter/css.js +1 -2
- package/dist/components/modal/index.cjs +1 -1
- package/dist/components/modal/modal-close.cjs +1 -1
- package/dist/components/modal/modal-title.d.ts +2 -2
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.cjs +2 -2
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile.d.ts +1 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.d.ts +2 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-search-field.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-search.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-shopping-cart.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/index.cjs +1 -1
- package/dist/components/navigation-menu/global-navigation/utils.cjs +32 -0
- package/dist/components/navigation-menu/global-navigation/utils.d.ts +26 -0
- package/dist/components/navigation-menu/global-navigation/utils.js +32 -0
- package/dist/components/navigation-menu/index.cjs +2 -2
- package/dist/components/navigation-menu/index.d.ts +1 -0
- package/dist/components/navigation-menu/navigation-menu.cjs +3 -3
- package/dist/components/notabene/notabene-icon.cjs +1 -2
- package/dist/components/notabene/notabene-icon.d.ts +1 -1
- package/dist/components/notabene/notabene-icon.js +1 -2
- package/dist/components/notification/index.d.ts +4 -4
- package/dist/components/notification/notification-footer.cjs +1 -2
- package/dist/components/notification/notification-footer.js +1 -2
- package/dist/components/notification/notification-heading.cjs +1 -2
- package/dist/components/notification/notification-heading.js +1 -2
- package/dist/components/notification/notification-icon.cjs +1 -2
- package/dist/components/notification/notification-icon.d.ts +1 -1
- package/dist/components/notification/notification-icon.js +1 -2
- package/dist/components/notification/notification-root.d.ts +4 -4
- package/dist/components/radio-card-group/index.cjs +1 -1
- package/dist/components/radio-card-group/radio-card-group-content.cjs +1 -1
- package/dist/components/radio-card-group/radio-card-group-item-title.cjs +53 -49
- package/dist/components/radio-card-group/radio-card-group-item-title.js +54 -50
- package/dist/components/radio-card-group/radio-card-group-item.cjs +2 -2
- package/dist/components/scroll-area/index.cjs +3 -3
- package/dist/components/scroll-area/index.d.ts +2 -2
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/scroll-area/scroll-area-bar.cjs +1 -1
- package/dist/components/scroll-area/scroll-area-button.cjs +1 -1
- package/dist/components/scroll-area/scroll-area-button.d.ts +2 -2
- package/dist/components/scroll-area/scroll-area-corner.cjs +1 -1
- package/dist/components/scroll-area/scroll-area-item.cjs +4 -6
- package/dist/components/scroll-area/scroll-area-item.js +2 -4
- package/dist/components/scroll-area/scroll-area-root.cjs +3 -3
- package/dist/components/scroll-area/scroll-area-thumb.cjs +9 -6
- package/dist/components/scroll-area/scroll-area-thumb.js +9 -6
- package/dist/components/select/select-root.cjs +1 -2
- package/dist/components/select/select-root.js +1 -2
- package/dist/components/skeleton/skeleton-root.cjs +1 -2
- package/dist/components/skeleton/skeleton-root.js +1 -2
- package/dist/components/spinner/spinner.cjs +2 -9
- package/dist/components/spinner/spinner.js +2 -9
- package/dist/components/tabs/tabs-list.cjs +1 -2
- package/dist/components/tabs/tabs-list.js +1 -2
- package/dist/components/tabs/tabs-scroll-button.d.ts +2 -2
- package/dist/components/tabs/tabs-trigger.cjs +1 -2
- package/dist/components/tabs/tabs-trigger.js +1 -2
- package/dist/components/text-field/index.d.ts +2 -2
- package/dist/components/text-field/text-field-button.d.ts +2 -2
- package/dist/components/text-field/text-field-error-list.cjs +2 -4
- package/dist/components/text-field/text-field-error-list.d.ts +1 -1
- package/dist/components/text-field/text-field-error-list.js +2 -4
- package/dist/components/toggle/toggle.cjs +2 -4
- package/dist/components/toggle/toggle.d.ts +1 -1
- package/dist/components/toggle/toggle.js +2 -4
- package/dist/icons/category.cjs +3 -3
- package/dist/icons/category.d.ts +8 -8
- package/dist/icons/category.js +3 -3
- package/dist/icons/name.cjs +3 -3
- package/dist/icons/name.d.ts +1 -1
- package/dist/icons/name.js +3 -3
- package/dist/main.cjs +6 -7
- package/dist/main.js +3 -4
- package/dist/style.css +3 -3
- package/package.json +67 -77
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -12,6 +12,6 @@ export declare const Root: React.ForwardRefExoticComponent<Omit<React.DetailedHT
|
|
|
12
12
|
variant?: Variant | undefined;
|
|
13
13
|
firstName?: string | undefined;
|
|
14
14
|
lastName?: string | undefined;
|
|
15
|
-
icon?: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "
|
|
15
|
+
icon?: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "split" | "alert" | "radio" | "email" | "copy" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "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" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "sync" | "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" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-neutral" | "smiley-sad" | "smiley-very-happy" | "smiley-very-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" | "AI-star" | "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" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "youtube" | "alert-filled" | "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" | undefined;
|
|
16
16
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,6 +4,6 @@ export declare const Avatar: import('react').ForwardRefExoticComponent<Omit<impo
|
|
|
4
4
|
variant?: ("beige" | "blue" | "green" | "grey" | "orange" | "white" | "purple-light") | undefined;
|
|
5
5
|
firstName?: string | undefined;
|
|
6
6
|
lastName?: string | undefined;
|
|
7
|
-
icon?: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "
|
|
7
|
+
icon?: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "split" | "alert" | "radio" | "email" | "copy" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "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" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "sync" | "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" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-neutral" | "smiley-sad" | "smiley-very-happy" | "smiley-very-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" | "AI-star" | "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" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "youtube" | "alert-filled" | "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" | undefined;
|
|
8
8
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export type AvatarProps = RootProps;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
function getInitials(firstName, lastName) {
|
|
4
|
-
if (!firstName && !lastName)
|
|
5
|
-
return "";
|
|
4
|
+
if (!firstName && !lastName) return "";
|
|
6
5
|
const firstInitial = firstName ? firstName.charAt(0).toLocaleUpperCase() : "";
|
|
7
6
|
const lastInitial = lastName ? lastName.charAt(0).toLocaleUpperCase() : "";
|
|
8
7
|
return `${firstInitial}${lastInitial}`;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
function getInitials(firstName, lastName) {
|
|
2
|
-
if (!firstName && !lastName)
|
|
3
|
-
return "";
|
|
2
|
+
if (!firstName && !lastName) return "";
|
|
4
3
|
const firstInitial = firstName ? firstName.charAt(0).toLocaleUpperCase() : "";
|
|
5
4
|
const lastInitial = lastName ? lastName.charAt(0).toLocaleUpperCase() : "";
|
|
6
5
|
return `${firstInitial}${lastInitial}`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import clsx from "clsx";
|
|
3
3
|
import React__default from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { Slot, Slottable } from "@radix-ui/react-slot";
|
|
5
5
|
import "../../assets/sprite.c7653d19-teddy.svg";
|
|
6
6
|
import { Icon } from "../icon/icon.js";
|
|
7
7
|
const styles = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Slot, Slottable } from "@radix-ui/react-slot";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { Spinner } from "../spinner/spinner.js";
|
|
@@ -5,6 +5,6 @@ export type AvailabilityProps = Partial<React.ComponentPropsWithoutRef<typeof Pr
|
|
|
5
5
|
statusText: string;
|
|
6
6
|
};
|
|
7
7
|
/** The stock status for the product */
|
|
8
|
-
export declare const Availability: React.ForwardRefExoticComponent<Partial<Omit<import('../badge').AlertBadgeProps & React.RefAttributes<HTMLSpanElement>, "ref">> & {
|
|
8
|
+
export declare const Availability: React.ForwardRefExoticComponent<Partial<Omit<import('../badge/alert-badge').AlertBadgeProps & React.RefAttributes<HTMLSpanElement>, "ref">> & {
|
|
9
9
|
statusText: string;
|
|
10
10
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -106,10 +106,8 @@ const Root = React.forwardRef(
|
|
|
106
106
|
onKeyDown: (e) => {
|
|
107
107
|
if (e.key === "Enter" || e.key === " ") {
|
|
108
108
|
e.preventDefault();
|
|
109
|
-
if (linkRef.current)
|
|
110
|
-
|
|
111
|
-
if (buttonRef.current)
|
|
112
|
-
return buttonRef.current.click();
|
|
109
|
+
if (linkRef.current) return linkRef.current.click();
|
|
110
|
+
if (buttonRef.current) return buttonRef.current.click();
|
|
113
111
|
}
|
|
114
112
|
}
|
|
115
113
|
};
|
|
@@ -122,15 +120,11 @@ const Root = React.forwardRef(
|
|
|
122
120
|
...additionalProps,
|
|
123
121
|
onClick: utils_composeEventHandlers.composeEventHandlers(props.onClick, (e) => {
|
|
124
122
|
const isClickInsideCard = e.currentTarget.contains(e.target);
|
|
125
|
-
if (!isClickInsideCard)
|
|
126
|
-
|
|
127
|
-
if (e.isDefaultPrevented())
|
|
128
|
-
return;
|
|
123
|
+
if (!isClickInsideCard) return;
|
|
124
|
+
if (e.isDefaultPrevented()) return;
|
|
129
125
|
e.stopPropagation();
|
|
130
|
-
if (linkRef.current && e.target !== linkRef.current)
|
|
131
|
-
|
|
132
|
-
if (buttonRef.current && e.target !== buttonRef.current)
|
|
133
|
-
return buttonRef.current.click();
|
|
126
|
+
if (linkRef.current && e.target !== linkRef.current) return linkRef.current.click();
|
|
127
|
+
if (buttonRef.current && e.target !== buttonRef.current) return buttonRef.current.click();
|
|
134
128
|
}),
|
|
135
129
|
ref: forwardRef,
|
|
136
130
|
children
|
|
@@ -104,10 +104,8 @@ const Root = React__default.forwardRef(
|
|
|
104
104
|
onKeyDown: (e) => {
|
|
105
105
|
if (e.key === "Enter" || e.key === " ") {
|
|
106
106
|
e.preventDefault();
|
|
107
|
-
if (linkRef.current)
|
|
108
|
-
|
|
109
|
-
if (buttonRef.current)
|
|
110
|
-
return buttonRef.current.click();
|
|
107
|
+
if (linkRef.current) return linkRef.current.click();
|
|
108
|
+
if (buttonRef.current) return buttonRef.current.click();
|
|
111
109
|
}
|
|
112
110
|
}
|
|
113
111
|
};
|
|
@@ -120,15 +118,11 @@ const Root = React__default.forwardRef(
|
|
|
120
118
|
...additionalProps,
|
|
121
119
|
onClick: composeEventHandlers(props.onClick, (e) => {
|
|
122
120
|
const isClickInsideCard = e.currentTarget.contains(e.target);
|
|
123
|
-
if (!isClickInsideCard)
|
|
124
|
-
|
|
125
|
-
if (e.isDefaultPrevented())
|
|
126
|
-
return;
|
|
121
|
+
if (!isClickInsideCard) return;
|
|
122
|
+
if (e.isDefaultPrevented()) return;
|
|
127
123
|
e.stopPropagation();
|
|
128
|
-
if (linkRef.current && e.target !== linkRef.current)
|
|
129
|
-
|
|
130
|
-
if (buttonRef.current && e.target !== buttonRef.current)
|
|
131
|
-
return buttonRef.current.click();
|
|
124
|
+
if (linkRef.current && e.target !== linkRef.current) return linkRef.current.click();
|
|
125
|
+
if (buttonRef.current && e.target !== buttonRef.current) return buttonRef.current.click();
|
|
132
126
|
}),
|
|
133
127
|
ref: forwardRef,
|
|
134
128
|
children
|
|
@@ -13,7 +13,7 @@ export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.
|
|
|
13
13
|
fullWidth?: boolean | undefined;
|
|
14
14
|
size?: "sm" | "md" | "lg" | undefined;
|
|
15
15
|
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
16
|
-
borderStyle?: ("
|
|
16
|
+
borderStyle?: ("dashed" | "default") | undefined;
|
|
17
17
|
} & {
|
|
18
18
|
iconOnly: true;
|
|
19
19
|
"aria-label": string;
|
|
@@ -25,10 +25,10 @@ export declare const Root: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.
|
|
|
25
25
|
fullWidth?: boolean | undefined;
|
|
26
26
|
size?: "sm" | "md" | "lg" | undefined;
|
|
27
27
|
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
28
|
-
borderStyle?: ("
|
|
28
|
+
borderStyle?: ("dashed" | "default") | undefined;
|
|
29
29
|
} & {
|
|
30
30
|
iconOnly?: false | undefined;
|
|
31
31
|
"aria-label"?: string | undefined;
|
|
32
|
-
} & React.RefAttributes<HTMLButtonElement>, "ref">, "aria-label" | "
|
|
32
|
+
} & React.RefAttributes<HTMLButtonElement>, "ref">, "aria-label" | "size" | "borderStyle" | "variant" | "loading" | "fullWidth" | "iconOnly"> & {
|
|
33
33
|
as?: "div" | "span" | undefined;
|
|
34
34
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -36,7 +36,7 @@ declare const ChannelButton: import('react').ForwardRefExoticComponent<Omit<Omit
|
|
|
36
36
|
fullWidth?: boolean | undefined;
|
|
37
37
|
size?: "sm" | "md" | "lg" | undefined;
|
|
38
38
|
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
39
|
-
borderStyle?: ("
|
|
39
|
+
borderStyle?: ("dashed" | "default") | undefined;
|
|
40
40
|
} & {
|
|
41
41
|
iconOnly: true;
|
|
42
42
|
"aria-label": string;
|
|
@@ -48,11 +48,11 @@ declare const ChannelButton: import('react').ForwardRefExoticComponent<Omit<Omit
|
|
|
48
48
|
fullWidth?: boolean | undefined;
|
|
49
49
|
size?: "sm" | "md" | "lg" | undefined;
|
|
50
50
|
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
51
|
-
borderStyle?: ("
|
|
51
|
+
borderStyle?: ("dashed" | "default") | undefined;
|
|
52
52
|
} & {
|
|
53
53
|
iconOnly?: false | undefined;
|
|
54
54
|
"aria-label"?: string | undefined;
|
|
55
|
-
} & import('react').RefAttributes<HTMLButtonElement>, "ref">, "aria-label" | "
|
|
55
|
+
} & import('react').RefAttributes<HTMLButtonElement>, "ref">, "aria-label" | "size" | "borderStyle" | "variant" | "loading" | "fullWidth" | "iconOnly"> & {
|
|
56
56
|
as?: "div" | "span" | undefined;
|
|
57
57
|
} & import('react').RefAttributes<HTMLButtonElement>> & {
|
|
58
58
|
/**
|
|
@@ -64,8 +64,7 @@ const Group = React.forwardRef(
|
|
|
64
64
|
const isIndeterminate = React.useCallback(
|
|
65
65
|
(parentValue) => {
|
|
66
66
|
const children2 = getChildren(parentValue);
|
|
67
|
-
if (children2.length === 0)
|
|
68
|
-
return false;
|
|
67
|
+
if (children2.length === 0) return false;
|
|
69
68
|
const selectedChildren = children2.filter((child) => (value == null ? void 0 : value.includes(child.value)) || false);
|
|
70
69
|
return selectedChildren.length > 0 && selectedChildren.length < children2.length;
|
|
71
70
|
},
|
|
@@ -62,8 +62,7 @@ const Group = React__default.forwardRef(
|
|
|
62
62
|
const isIndeterminate = useCallback(
|
|
63
63
|
(parentValue) => {
|
|
64
64
|
const children2 = getChildren(parentValue);
|
|
65
|
-
if (children2.length === 0)
|
|
66
|
-
return false;
|
|
65
|
+
if (children2.length === 0) return false;
|
|
67
66
|
const selectedChildren = children2.filter((child) => (value == null ? void 0 : value.includes(child.value)) || false);
|
|
68
67
|
return selectedChildren.length > 0 && selectedChildren.length < children2.length;
|
|
69
68
|
},
|
|
@@ -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" | "key" | "
|
|
6
|
+
name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "split" | "alert" | "radio" | "email" | "copy" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "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" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "sync" | "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" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-neutral" | "smiley-sad" | "smiley-very-happy" | "smiley-very-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" | "AI-star" | "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" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "youtube" | "alert-filled" | "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
7
|
size?: ("font" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl") | undefined;
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
}, "ref">> & React.RefAttributes<SVGSVGElement>>;
|
|
@@ -5,7 +5,7 @@ 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" | "key" | "
|
|
8
|
+
name: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "split" | "alert" | "radio" | "email" | "copy" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "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" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "sync" | "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" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-neutral" | "smiley-sad" | "smiley-very-happy" | "smiley-very-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" | "AI-star" | "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" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "youtube" | "alert-filled" | "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
9
|
size?: ("font" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl") | undefined;
|
|
10
10
|
children?: import('react').ReactNode;
|
|
11
11
|
}, "ref">> & import('react').RefAttributes<SVGSVGElement>>;
|
|
@@ -14,8 +14,7 @@ const styles = {
|
|
|
14
14
|
};
|
|
15
15
|
const rootClassName = "teddy-circle-bar";
|
|
16
16
|
const css = (suffix) => {
|
|
17
|
-
if (suffix == null)
|
|
18
|
-
return "";
|
|
17
|
+
if (suffix == null) return "";
|
|
19
18
|
let tmp = null;
|
|
20
19
|
if (suffix.startsWith("_") || suffix.startsWith("-") || suffix === "") {
|
|
21
20
|
tmp = clsx([styles[`${rootClassName + suffix}`]], "");
|
|
@@ -12,8 +12,7 @@ const styles = {
|
|
|
12
12
|
};
|
|
13
13
|
const rootClassName = "teddy-circle-bar";
|
|
14
14
|
const css = (suffix) => {
|
|
15
|
-
if (suffix == null)
|
|
16
|
-
return "";
|
|
15
|
+
if (suffix == null) return "";
|
|
17
16
|
let tmp = null;
|
|
18
17
|
if (suffix.startsWith("_") || suffix.startsWith("-") || suffix === "") {
|
|
19
18
|
tmp = clsx([styles[`${rootClassName + suffix}`]], "");
|
|
@@ -6,5 +6,5 @@ export declare const Avatar: React.ForwardRefExoticComponent<Omit<Omit<React.Det
|
|
|
6
6
|
variant?: ("beige" | "blue" | "green" | "grey" | "orange" | "white" | "purple-light") | undefined;
|
|
7
7
|
firstName?: string | undefined;
|
|
8
8
|
lastName?: string | undefined;
|
|
9
|
-
icon?: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "
|
|
9
|
+
icon?: "link" | "map" | "menu" | "search" | "summary" | "time" | "video" | "filter" | "image" | "stop" | "key" | "split" | "alert" | "radio" | "email" | "copy" | "alarm-off" | "alarm-on" | "attachment" | "bookmark-filled" | "bookmark" | "copy-filled" | "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" | "shortcut" | "shuffle" | "skip-back-10sec" | "skip-back-30sec" | "skip-forward-10sec" | "skip-forward-30sec" | "star-filled" | "star" | "switch-arrows" | "sync" | "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" | "end-user" | "handshake" | "headphones" | "letter" | "mms" | "new-contact" | "new-group" | "news" | "parental-guide" | "people-hub" | "people" | "portal" | "signature" | "smiley-happy" | "smiley-neutral" | "smiley-sad" | "smiley-very-happy" | "smiley-very-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" | "AI-star" | "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" | "layers" | "measuring-health" | "moisture" | "offering" | "offshore" | "optimization" | "pebble" | "pet-dog" | "pin" | "plane" | "plus-minus" | "police" | "power-grid" | "present" | "press-button" | "price" | "pulse" | "recycle" | "reservation" | "reverse" | "route" | "ruler" | "satellite" | "secured-1" | "secured-2" | "security-camera" | "shopping" | "smart-connect" | "snowflake" | "speedometer" | "spyware" | "suitcase" | "sustainability" | "tag" | "temperature" | "thinking" | "train" | "transfer" | "undo" | "wavelength" | "weather" | "world" | "android" | "apple" | "bankid-norway" | "bankid" | "facebook" | "instagram" | "linkedin" | "snapchat" | "telia-logo" | "whatsapp" | "windows" | "x" | "youtube" | "alert-filled" | "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" | undefined;
|
|
10
10
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import {
|
|
4
|
+
import { Slot, Slottable } from "@radix-ui/react-slot";
|
|
5
5
|
import "../../assets/sprite.c7653d19-teddy.svg";
|
|
6
6
|
import { Icon } from "../icon/icon.js";
|
|
7
7
|
const styles = {
|
|
@@ -43,8 +43,7 @@ const styles = {
|
|
|
43
43
|
};
|
|
44
44
|
const rootClassName = "date-picker";
|
|
45
45
|
const css = (suffix) => {
|
|
46
|
-
if (suffix == null)
|
|
47
|
-
return "";
|
|
46
|
+
if (suffix == null) return "";
|
|
48
47
|
let tmp = null;
|
|
49
48
|
if (suffix.startsWith("_") || suffix.startsWith("-") || suffix === "") {
|
|
50
49
|
tmp = clsx([styles[`${rootClassName + suffix}`]], "");
|
|
@@ -41,8 +41,7 @@ const styles = {
|
|
|
41
41
|
};
|
|
42
42
|
const rootClassName = "date-picker";
|
|
43
43
|
const css = (suffix) => {
|
|
44
|
-
if (suffix == null)
|
|
45
|
-
return "";
|
|
44
|
+
if (suffix == null) return "";
|
|
46
45
|
let tmp = null;
|
|
47
46
|
if (suffix.startsWith("_") || suffix.startsWith("-") || suffix === "") {
|
|
48
47
|
tmp = clsx([styles[`${rootClassName + suffix}`]], "");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { DatePickerDay } from "./date-picker-day.js";
|
|
3
|
-
import { getViewOfMonth,
|
|
3
|
+
import { getViewOfMonth, inRange, isEqual } from "./date-utils.js";
|
|
4
4
|
import { mapWithOffset, chunk } from "./dialog-utils.js";
|
|
5
5
|
import { css } from "./css.js";
|
|
6
6
|
const DatePickerMonth = ({
|
|
@@ -161,35 +161,29 @@ const DatePicker = ({
|
|
|
161
161
|
const isValueLessThanMinDate = () => {
|
|
162
162
|
const inputValue = datePickerInput.value;
|
|
163
163
|
const parsedDate = components_datePicker_dateUtils.parseDate(inputValue);
|
|
164
|
-
if (parsedDate === void 0)
|
|
165
|
-
return false;
|
|
164
|
+
if (parsedDate === void 0) return false;
|
|
166
165
|
const minDate2 = components_datePicker_dateUtils.parseDate(min);
|
|
167
|
-
if (!minDate2)
|
|
168
|
-
return false;
|
|
166
|
+
if (!minDate2) return false;
|
|
169
167
|
return parsedDate < minDate2;
|
|
170
168
|
};
|
|
171
169
|
const isValueLargerThanMaxDate = () => {
|
|
172
170
|
const inputValue = datePickerInput.value;
|
|
173
171
|
const parsedDate = components_datePicker_dateUtils.parseDate(inputValue);
|
|
174
|
-
if (parsedDate === void 0)
|
|
175
|
-
return false;
|
|
172
|
+
if (parsedDate === void 0) return false;
|
|
176
173
|
const maxDate2 = components_datePicker_dateUtils.parseDate(min);
|
|
177
|
-
if (!maxDate2)
|
|
178
|
-
return false;
|
|
174
|
+
if (!maxDate2) return false;
|
|
179
175
|
return parsedDate > maxDate2;
|
|
180
176
|
};
|
|
181
177
|
const isValueValid = () => {
|
|
182
178
|
const inputValue = datePickerInput.value;
|
|
183
179
|
const parsedDate = components_datePicker_dateUtils.parseDate(inputValue);
|
|
184
|
-
if (parsedDate === void 0)
|
|
185
|
-
return false;
|
|
180
|
+
if (parsedDate === void 0) return false;
|
|
186
181
|
const isInRange = components_datePicker_dateUtils.inRange(
|
|
187
182
|
parsedDate,
|
|
188
183
|
components_datePicker_dateUtils.parseDate(min),
|
|
189
184
|
components_datePicker_dateUtils.parseDate(max)
|
|
190
185
|
);
|
|
191
|
-
if (!isInRange)
|
|
192
|
-
return false;
|
|
186
|
+
if (!isInRange) return false;
|
|
193
187
|
const isDisabled = isDateDisabled(parsedDate);
|
|
194
188
|
return !isDisabled;
|
|
195
189
|
};
|
|
@@ -10,7 +10,7 @@ import DatePickerInput from "./date-picker-input.js";
|
|
|
10
10
|
import DatePickerMonth from "./date-picker-month.js";
|
|
11
11
|
import DatePickerYear from "./date-picker-year.js";
|
|
12
12
|
import { css } from "./css.js";
|
|
13
|
-
import { parseDate, printDate, DaysOfWeek, inRange, setYear, startOfMonth, endOfMonth, clamp, getViewOfYears,
|
|
13
|
+
import { parseDate, printDate, DaysOfWeek, inRange, printISODate, setYear, startOfMonth, endOfMonth, clamp, getViewOfYears, addDays, setMonth } from "./date-utils.js";
|
|
14
14
|
const DateDisabledPredicate = () => false;
|
|
15
15
|
const cn = (classes) => {
|
|
16
16
|
return Object.keys(classes).filter((key) => classes[key]).join(" ");
|
|
@@ -159,35 +159,29 @@ const DatePicker = ({
|
|
|
159
159
|
const isValueLessThanMinDate = () => {
|
|
160
160
|
const inputValue = datePickerInput.value;
|
|
161
161
|
const parsedDate = parseDate(inputValue);
|
|
162
|
-
if (parsedDate === void 0)
|
|
163
|
-
return false;
|
|
162
|
+
if (parsedDate === void 0) return false;
|
|
164
163
|
const minDate2 = parseDate(min);
|
|
165
|
-
if (!minDate2)
|
|
166
|
-
return false;
|
|
164
|
+
if (!minDate2) return false;
|
|
167
165
|
return parsedDate < minDate2;
|
|
168
166
|
};
|
|
169
167
|
const isValueLargerThanMaxDate = () => {
|
|
170
168
|
const inputValue = datePickerInput.value;
|
|
171
169
|
const parsedDate = parseDate(inputValue);
|
|
172
|
-
if (parsedDate === void 0)
|
|
173
|
-
return false;
|
|
170
|
+
if (parsedDate === void 0) return false;
|
|
174
171
|
const maxDate2 = parseDate(min);
|
|
175
|
-
if (!maxDate2)
|
|
176
|
-
return false;
|
|
172
|
+
if (!maxDate2) return false;
|
|
177
173
|
return parsedDate > maxDate2;
|
|
178
174
|
};
|
|
179
175
|
const isValueValid = () => {
|
|
180
176
|
const inputValue = datePickerInput.value;
|
|
181
177
|
const parsedDate = parseDate(inputValue);
|
|
182
|
-
if (parsedDate === void 0)
|
|
183
|
-
return false;
|
|
178
|
+
if (parsedDate === void 0) return false;
|
|
184
179
|
const isInRange = inRange(
|
|
185
180
|
parsedDate,
|
|
186
181
|
parseDate(min),
|
|
187
182
|
parseDate(max)
|
|
188
183
|
);
|
|
189
|
-
if (!isInRange)
|
|
190
|
-
return false;
|
|
184
|
+
if (!isInRange) return false;
|
|
191
185
|
const isDisabled = isDateDisabled(parsedDate);
|
|
192
186
|
return !isDisabled;
|
|
193
187
|
};
|