@epfl-sti/poesis 0.1.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/LICENSE +217 -0
- package/README.md +204 -0
- package/dist/components/data-display/Card.d.ts +20 -0
- package/dist/components/data-display/Card.d.ts.map +1 -0
- package/dist/components/data-display/DescriptionList.d.ts +23 -0
- package/dist/components/data-display/DescriptionList.d.ts.map +1 -0
- package/dist/components/data-display/EmptyState.d.ts +18 -0
- package/dist/components/data-display/EmptyState.d.ts.map +1 -0
- package/dist/components/data-display/Table.d.ts +47 -0
- package/dist/components/data-display/Table.d.ts.map +1 -0
- package/dist/components/data-display/index.d.ts +5 -0
- package/dist/components/data-display/index.d.ts.map +1 -0
- package/dist/components/feedback/Alert.d.ts +18 -0
- package/dist/components/feedback/Alert.d.ts.map +1 -0
- package/dist/components/feedback/ConfirmDialog.d.ts +24 -0
- package/dist/components/feedback/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/feedback/Dialog.d.ts +20 -0
- package/dist/components/feedback/Dialog.d.ts.map +1 -0
- package/dist/components/feedback/Toast.d.ts +5 -0
- package/dist/components/feedback/Toast.d.ts.map +1 -0
- package/dist/components/feedback/index.d.ts +6 -0
- package/dist/components/feedback/index.d.ts.map +1 -0
- package/dist/components/feedback/toastContext.d.ts +17 -0
- package/dist/components/feedback/toastContext.d.ts.map +1 -0
- package/dist/components/layout/BurgerDrawer.d.ts +25 -0
- package/dist/components/layout/BurgerDrawer.d.ts.map +1 -0
- package/dist/components/layout/PageShell.d.ts +32 -0
- package/dist/components/layout/PageShell.d.ts.map +1 -0
- package/dist/components/layout/SideNav.d.ts +22 -0
- package/dist/components/layout/SideNav.d.ts.map +1 -0
- package/dist/components/layout/TopNav.d.ts +24 -0
- package/dist/components/layout/TopNav.d.ts.map +1 -0
- package/dist/components/layout/index.d.ts +10 -0
- package/dist/components/layout/index.d.ts.map +1 -0
- package/dist/components/layout/types.d.ts +31 -0
- package/dist/components/layout/types.d.ts.map +1 -0
- package/dist/components/ui/Avatar.d.ts +25 -0
- package/dist/components/ui/Avatar.d.ts.map +1 -0
- package/dist/components/ui/Badge.d.ts +34 -0
- package/dist/components/ui/Badge.d.ts.map +1 -0
- package/dist/components/ui/Button.d.ts +35 -0
- package/dist/components/ui/Button.d.ts.map +1 -0
- package/dist/components/ui/Checkbox.d.ts +16 -0
- package/dist/components/ui/Checkbox.d.ts.map +1 -0
- package/dist/components/ui/DropdownMenu.d.ts +30 -0
- package/dist/components/ui/DropdownMenu.d.ts.map +1 -0
- package/dist/components/ui/IconButton.d.ts +34 -0
- package/dist/components/ui/IconButton.d.ts.map +1 -0
- package/dist/components/ui/Input.d.ts +21 -0
- package/dist/components/ui/Input.d.ts.map +1 -0
- package/dist/components/ui/LanguageSwitcher.d.ts +11 -0
- package/dist/components/ui/LanguageSwitcher.d.ts.map +1 -0
- package/dist/components/ui/Popover.d.ts +18 -0
- package/dist/components/ui/Popover.d.ts.map +1 -0
- package/dist/components/ui/RadioGroup.d.ts +45 -0
- package/dist/components/ui/RadioGroup.d.ts.map +1 -0
- package/dist/components/ui/Select.d.ts +15 -0
- package/dist/components/ui/Select.d.ts.map +1 -0
- package/dist/components/ui/Spinner.d.ts +19 -0
- package/dist/components/ui/Spinner.d.ts.map +1 -0
- package/dist/components/ui/Switch.d.ts +12 -0
- package/dist/components/ui/Switch.d.ts.map +1 -0
- package/dist/components/ui/Tabs.d.ts +36 -0
- package/dist/components/ui/Tabs.d.ts.map +1 -0
- package/dist/components/ui/Textarea.d.ts +18 -0
- package/dist/components/ui/Textarea.d.ts.map +1 -0
- package/dist/components/ui/ThemeToggle.d.ts +16 -0
- package/dist/components/ui/ThemeToggle.d.ts.map +1 -0
- package/dist/components/ui/Tooltip.d.ts +16 -0
- package/dist/components/ui/Tooltip.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +18 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/hooks/useAuth.d.ts +33 -0
- package/dist/hooks/useAuth.d.ts.map +1 -0
- package/dist/hooks/useLanguage.d.ts +14 -0
- package/dist/hooks/useLanguage.d.ts.map +1 -0
- package/dist/hooks/useTheme.d.ts +21 -0
- package/dist/hooks/useTheme.d.ts.map +1 -0
- package/dist/i18n/index.d.ts +3 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/lib.d.ts +11 -0
- package/dist/lib.d.ts.map +1 -0
- package/dist/poesis.js +1870 -0
- package/dist/poesis.js.map +1 -0
- package/dist/routes/types.d.ts +39 -0
- package/dist/routes/types.d.ts.map +1 -0
- package/dist/theme/reactSelectStyles.d.ts +12 -0
- package/dist/theme/reactSelectStyles.d.ts.map +1 -0
- package/package.json +98 -0
package/dist/poesis.js
ADDED
|
@@ -0,0 +1,1870 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-duration:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-md:28rem;--container-xl:36rem;--container-6xl:72rem;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--radius-sm:4px;--radius-md:8px;--radius-lg:12px;--shadow-sm:0 1px 2px #0000000f;--shadow-md:0 2px 8px #00000014;--shadow-lg:0 4px 16px #0000001a;--shadow-xl:0 8px 32px #0000001f;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-epfl-red:red;--color-epfl-red-dark:#b51f1f;--color-epfl-leman:#00a79f;--color-epfl-canard:#007480;--color-epfl-canard-dark:#004248;--color-primary:var(--action-primary);--color-primary-hover:var(--action-primary-hover);--color-bg-primary:var(--bg-primary);--color-bg-secondary:var(--bg-secondary);--color-bg-tertiary:var(--bg-tertiary);--color-border:var(--border-default);--color-border-strong:var(--border-strong);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-success:var(--semantic-success);--color-success-bg:var(--semantic-success-bg);--color-warning:var(--semantic-warning);--color-warning-bg:var(--semantic-warning-bg);--color-error:var(--semantic-error);--color-error-bg:var(--semantic-error-bg);--color-info:var(--semantic-info);--color-info-bg:var(--semantic-info-bg);--radius-full:9999px;--spacing-xs:4px;--spacing-sm:8px;--spacing-md:16px;--spacing-lg:24px;--spacing-xl:32px;--spacing-2xl:48px;--text-h1:2rem;--text-h1--line-height:1.2;--text-h2:1.5rem;--text-h2--line-height:1.3;--text-h3:1.25rem;--text-h3--line-height:1.4;--text-body:.9375rem;--text-body--line-height:1.5;--text-small:.8125rem;--text-small--line-height:1.5;--text-caption:.75rem;--text-caption--line-height:1.4}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.inset-x-0{inset-inline:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-0{right:calc(var(--spacing) * 0)}.right-lg{right:var(--spacing-lg)}.bottom-lg{bottom:var(--spacing-lg)}.left-0{left:calc(var(--spacing) * 0)}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.-mt-0\\.5{margin-top:calc(var(--spacing) * -.5)}.mt-0\\.5{margin-top:calc(var(--spacing) * .5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-lg{margin-top:var(--spacing-lg)}.mt-md{margin-top:var(--spacing-md)}.mt-xs{margin-top:var(--spacing-xs)}.mr-lg{margin-right:var(--spacing-lg)}.mr-sm{margin-right:var(--spacing-sm)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-lg{margin-bottom:var(--spacing-lg)}.mb-md{margin-bottom:var(--spacing-md)}.mb-sm{margin-bottom:var(--spacing-sm)}.mb-xs{margin-bottom:var(--spacing-xs)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-2\\.5{width:calc(var(--spacing) * 2.5);height:calc(var(--spacing) * 2.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-10{width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.size-11{width:calc(var(--spacing) * 11);height:calc(var(--spacing) * 11)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-14{width:calc(var(--spacing) * 14);height:calc(var(--spacing) * 14)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.size-20{width:calc(var(--spacing) * 20);height:calc(var(--spacing) * 20)}.size-full{width:100%;height:100%}.h-0\\.5{height:calc(var(--spacing) * .5)}.h-4{height:calc(var(--spacing) * 4)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-10{height:calc(var(--spacing) * 10)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-20{height:calc(var(--spacing) * 20)}.h-64{height:calc(var(--spacing) * 64)}.h-96{height:calc(var(--spacing) * 96)}.h-full{height:100%}.h-screen{height:100vh}.min-h-screen{min-height:100vh}.w-7{width:calc(var(--spacing) * 7)}.w-10{width:calc(var(--spacing) * 10)}.w-11{width:calc(var(--spacing) * 11)}.w-16{width:calc(var(--spacing) * 16)}.w-40{width:calc(var(--spacing) * 40)}.w-48{width:calc(var(--spacing) * 48)}.w-64{width:calc(var(--spacing) * 64)}.w-72{width:calc(var(--spacing) * 72)}.w-80{width:calc(var(--spacing) * 80)}.w-\\[4px\\]{width:4px}.w-\\[8px\\]{width:8px}.w-\\[16px\\]{width:16px}.w-\\[24px\\]{width:24px}.w-\\[32px\\]{width:32px}.w-\\[48px\\]{width:48px}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\\[24rem\\]{max-width:24rem}.max-w-\\[32rem\\]{max-width:32rem}.max-w-\\[42rem\\]{max-width:42rem}.max-w-\\[600px\\]{max-width:600px}.max-w-\\[var\\(--container-6xl\\)\\]{max-width:var(--container-6xl)}.max-w-\\[var\\(--container-md\\)\\]{max-width:var(--container-md)}.max-w-\\[var\\(--container-xl\\)\\]{max-width:var(--container-xl)}.max-w-\\[var\\(--container-xs\\)\\]{max-width:var(--container-xs)}.max-w-full{max-width:100%}.max-w-md{max-width:var(--spacing-md)}.max-w-screen{max-width:100vw}.max-w-sm{max-width:var(--spacing-sm)}.max-w-xl{max-width:var(--spacing-xl)}.max-w-xs{max-width:var(--spacing-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\\[10rem\\]{min-width:10rem}.min-w-\\[500px\\]{min-width:500px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.-rotate-90{rotate:-90deg}.rotate-45{rotate:45deg}.animate-dialog-in{animation:.2s ease-out dialog-in}.animate-floating-in{animation:.15s ease-out floating-in}.animate-slide-in{animation:.25s ease-out slide-in}.animate-spin{animation:var(--animate-spin)}.cursor-help{cursor:help}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-8{gap:calc(var(--spacing) * 8)}.gap-lg{gap:var(--spacing-lg)}.gap-md{gap:var(--spacing-md)}.gap-px{gap:1px}.gap-sm{gap:var(--spacing-sm)}.gap-xl{gap:var(--spacing-xl)}.gap-xs{gap:var(--spacing-xs)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border>:not(:last-child)){border-color:var(--color-border)}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.\\!rounded-lg{border-radius:var(--radius-lg)!important}.\\!rounded-md{border-radius:var(--radius-md)!important}.\\!rounded-sm{border-radius:var(--radius-sm)!important}.rounded{border-radius:.25rem}.rounded-full{border-radius:var(--radius-full)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.\\!border{border-style:var(--tw-border-style)!important;border-width:1px!important}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.\\!border-border{border-color:var(--color-border)!important}.\\!border-epfl-canard{border-color:var(--color-epfl-canard)!important}.\\!border-error{border-color:var(--color-error)!important}.\\!border-primary{border-color:var(--color-primary)!important}.border-border{border-color:var(--color-border)}.border-error,.border-error\\/30{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/30{border-color:color-mix(in oklab,var(--color-error) 30%,transparent)}}.border-info\\/30{border-color:var(--color-info)}@supports (color:color-mix(in lab,red,red)){.border-info\\/30{border-color:color-mix(in oklab,var(--color-info) 30%,transparent)}}.border-primary{border-color:var(--color-primary)}.border-success\\/30{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/30{border-color:color-mix(in oklab,var(--color-success) 30%,transparent)}}.border-transparent{border-color:#0000}.border-warning\\/30{border-color:var(--color-warning)}@supports (color:color-mix(in lab,red,red)){.border-warning\\/30{border-color:color-mix(in oklab,var(--color-warning) 30%,transparent)}}.\\!bg-bg-tertiary{background-color:var(--color-bg-tertiary)!important}.\\!bg-epfl-canard{background-color:var(--color-epfl-canard)!important}.\\!bg-primary{background-color:var(--color-primary)!important}.bg-bg-primary{background-color:var(--color-bg-primary)}.bg-bg-secondary{background-color:var(--color-bg-secondary)}.bg-bg-tertiary,.bg-bg-tertiary\\/50{background-color:var(--color-bg-tertiary)}@supports (color:color-mix(in lab,red,red)){.bg-bg-tertiary\\/50{background-color:color-mix(in oklab,var(--color-bg-tertiary) 50%,transparent)}}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black) 40%,transparent)}}.bg-black\\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\\/50{background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-border-strong{background-color:var(--color-border-strong)}.bg-epfl-canard{background-color:var(--color-epfl-canard)}.bg-epfl-canard-dark{background-color:var(--color-epfl-canard-dark)}.bg-epfl-leman{background-color:var(--color-epfl-leman)}.bg-epfl-red{background-color:var(--color-epfl-red)}.bg-epfl-red-dark{background-color:var(--color-epfl-red-dark)}.bg-error{background-color:var(--color-error)}.bg-error-bg{background-color:var(--color-error-bg)}.bg-info{background-color:var(--color-info)}.bg-info-bg{background-color:var(--color-info-bg)}.bg-primary,.bg-primary\\/10{background-color:var(--color-primary)}@supports (color:color-mix(in lab,red,red)){.bg-primary\\/10{background-color:color-mix(in oklab,var(--color-primary) 10%,transparent)}}.bg-success{background-color:var(--color-success)}.bg-success-bg{background-color:var(--color-success-bg)}.bg-text-muted{background-color:var(--color-text-muted)}.bg-text-primary{background-color:var(--color-text-primary)}.bg-warning{background-color:var(--color-warning)}.bg-warning-bg{background-color:var(--color-warning-bg)}.object-cover{object-fit:cover}.p-0\\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-16{padding:calc(var(--spacing) * 16)}.p-lg{padding:var(--spacing-lg)}.p-md{padding:var(--spacing-md)}.p-sm{padding:var(--spacing-sm)}.p-xl{padding:var(--spacing-xl)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-lg{padding-inline:var(--spacing-lg)}.px-md{padding-inline:var(--spacing-md)}.px-sm{padding-inline:var(--spacing-sm)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\\.5{padding-block:calc(var(--spacing) * 2.5)}.py-2xl{padding-block:var(--spacing-2xl)}.py-lg{padding-block:var(--spacing-lg)}.py-md{padding-block:var(--spacing-md)}.py-sm{padding-block:var(--spacing-sm)}.py-xl{padding-block:var(--spacing-xl)}.py-xs{padding-block:var(--spacing-xs)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-14{padding-top:calc(var(--spacing) * 14)}.pt-xl{padding-top:var(--spacing-xl)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pr-11{padding-right:calc(var(--spacing) * 11)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-6{padding-left:calc(var(--spacing) * 6)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-10{padding-left:calc(var(--spacing) * 10)}.pl-11{padding-left:calc(var(--spacing) * 11)}.pl-14{padding-left:calc(var(--spacing) * 14)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-body{font-size:var(--text-body);line-height:var(--tw-leading,var(--text-body--line-height))}.text-caption{font-size:var(--text-caption);line-height:var(--tw-leading,var(--text-caption--line-height))}.text-h1{font-size:var(--text-h1);line-height:var(--tw-leading,var(--text-h1--line-height))}.text-h2{font-size:var(--text-h2);line-height:var(--tw-leading,var(--text-h2--line-height))}.text-h3{font-size:var(--text-h3);line-height:var(--tw-leading,var(--text-h3--line-height))}.text-small{font-size:var(--text-small);line-height:var(--tw-leading,var(--text-small--line-height))}.leading-\\[1\\.2\\]{--tw-leading:1.2;line-height:1.2}.leading-\\[1\\.3\\]{--tw-leading:1.3;line-height:1.3}.leading-\\[1\\.4\\]{--tw-leading:1.4;line-height:1.4}.leading-\\[1\\.5\\]{--tw-leading:1.5;line-height:1.5}.leading-none{--tw-leading:1;line-height:1}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.\\!text-white{color:var(--color-white)!important}.text-bg-primary{color:var(--color-bg-primary)}.text-epfl-canard{color:var(--color-epfl-canard)}.text-epfl-red{color:var(--color-epfl-red)}.text-error{color:var(--color-error)}.text-info{color:var(--color-info)}.text-primary{color:var(--color-primary)}.text-success{color:var(--color-success)}.text-text-muted{color:var(--color-text-muted)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.text-warning{color:var(--color-warning)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.decoration-dotted{text-decoration-style:dotted}.opacity-0{opacity:0}.opacity-25{opacity:.25}.opacity-30{opacity:.3}.opacity-50{opacity:.5}.opacity-75{opacity:.75}.opacity-100{opacity:1}.\\!shadow-lg{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.\\!shadow-sm{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000f)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.shadow-lg{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 8px 32px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\\!ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor)!important;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)!important}.\\!ring-epfl-canard{--tw-ring-color:var(--color-epfl-canard)!important}.\\!ring-primary{--tw-ring-color:var(--color-primary)!important}.transition-\\[width\\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.peer-checked\\:bg-primary:is(:where(.peer):checked~*){background-color:var(--color-primary)}.peer-focus-visible\\:ring-2:is(:where(.peer):focus-visible~*){--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.peer-focus-visible\\:ring-primary:is(:where(.peer):focus-visible~*){--tw-ring-color:var(--color-primary)}.peer-focus-visible\\:ring-offset-2:is(:where(.peer):focus-visible~*){--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.peer-focus-visible\\:ring-offset-bg-primary:is(:where(.peer):focus-visible~*){--tw-ring-offset-color:var(--color-bg-primary)}.peer-disabled\\:cursor-not-allowed:is(:where(.peer):disabled~*){cursor:not-allowed}.peer-disabled\\:opacity-50:is(:where(.peer):disabled~*){opacity:.5}.placeholder\\:text-text-muted::placeholder{color:var(--color-text-muted)}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:top-0\\.5:after{content:var(--tw-content);top:calc(var(--spacing) * .5)}.after\\:left-0\\.5:after{content:var(--tw-content);left:calc(var(--spacing) * .5)}.after\\:size-5:after{content:var(--tw-content);width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.after\\:rounded-full:after{content:var(--tw-content);border-radius:var(--radius-full)}.after\\:bg-white:after{content:var(--tw-content);background-color:var(--color-white)}.after\\:shadow-sm:after{content:var(--tw-content);--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.after\\:transition-transform:after{content:var(--tw-content);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.after\\:content-\\[\\'\\'\\]:after{--tw-content:"";content:var(--tw-content)}.peer-checked\\:after\\:translate-x-5:is(:where(.peer):checked~*):after{content:var(--tw-content);--tw-translate-x:calc(var(--spacing) * 5);translate:var(--tw-translate-x) var(--tw-translate-y)}.last\\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.checked\\:border-\\[5px\\]:checked{border-style:var(--tw-border-style);border-width:5px}.checked\\:border-primary:checked{border-color:var(--color-primary)}.checked\\:bg-primary:checked{background-color:var(--color-primary)}.checked\\:bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\,\\%3Csvg\\%20viewBox\\%3D\\%220\\%200\\%2016\\%2016\\%22\\%20fill\\%3D\\%22white\\%22\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%3E\\%3Cpath\\%20d\\%3D\\%22M12\\.207\\%204\\.793a1\\%201\\%200\\%20010\\%201\\.414l-5\\%205a1\\%201\\%200\\%2001-1\\.414\\%200l-2-2a1\\%201\\%200\\%20011\\.414-1\\.414L6\\.5\\%209\\.086l4\\.293-4\\.293a1\\%201\\%200\\%20011\\.414\\%200z\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]:checked{background-image:url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.207%204.793a1%201%200%20010%201.414l-5%205a1%201%200%2001-1.414%200l-2-2a1%201%200%20011.414-1.414L6.5%209.086l4.293-4.293a1%201%200%20011.414%200z%22%2F%3E%3C%2Fsvg%3E)}.checked\\:bg-center:checked{background-position:50%}.checked\\:bg-no-repeat:checked{background-repeat:no-repeat}.indeterminate\\:border-primary:indeterminate{border-color:var(--color-primary)}.indeterminate\\:bg-primary:indeterminate{background-color:var(--color-primary)}.indeterminate\\:bg-\\[url\\(\\'data\\:image\\/svg\\+xml\\,\\%3Csvg\\%20viewBox\\%3D\\%220\\%200\\%2016\\%2016\\%22\\%20fill\\%3D\\%22white\\%22\\%20xmlns\\%3D\\%22http\\%3A\\%2F\\%2Fwww\\.w3\\.org\\%2F2000\\%2Fsvg\\%22\\%3E\\%3Crect\\%20x\\%3D\\%223\\%22\\%20y\\%3D\\%227\\%22\\%20width\\%3D\\%2210\\%22\\%20height\\%3D\\%222\\%22\\%20rx\\%3D\\%221\\%22\\%2F\\%3E\\%3C\\%2Fsvg\\%3E\\'\\)\\]:indeterminate{background-image:url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E)}.indeterminate\\:bg-center:indeterminate{background-position:50%}.indeterminate\\:bg-no-repeat:indeterminate{background-repeat:no-repeat}@media(hover:hover){.hover\\:border-border-strong:hover{border-color:var(--color-border-strong)}.hover\\:bg-bg-tertiary:hover,.hover\\:bg-bg-tertiary\\/70:hover{background-color:var(--color-bg-tertiary)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-tertiary\\/70:hover{background-color:color-mix(in oklab,var(--color-bg-tertiary) 70%,transparent)}}.hover\\:bg-error-bg:hover{background-color:var(--color-error-bg)}.hover\\:bg-error\\/80:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/80:hover{background-color:color-mix(in oklab,var(--color-error) 80%,transparent)}}.hover\\:bg-primary-hover:hover{background-color:var(--color-primary-hover)}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-text-secondary:hover{color:var(--color-text-secondary)}.hover\\:opacity-90:hover{opacity:.9}}.focus\\:border-error:focus{border-color:var(--color-error)}.focus\\:border-primary:focus{border-color:var(--color-primary)}.focus\\:bg-bg-tertiary:focus{background-color:var(--color-bg-tertiary)}.focus\\:bg-error-bg:focus{background-color:var(--color-error-bg)}.focus\\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\\:ring-error:focus{--tw-ring-color:var(--color-error)}.focus\\:ring-primary:focus{--tw-ring-color:var(--color-primary)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\\:ring-error:focus-visible{--tw-ring-color:var(--color-error)}.focus-visible\\:ring-primary:focus-visible{--tw-ring-color:var(--color-primary)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-bg-primary:focus-visible{--tw-ring-offset-color:var(--color-bg-primary)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:bg-bg-secondary:disabled{background-color:var(--color-bg-secondary)}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:col-span-2{grid-column:span 2/span 2}.sm\\:w-1\\/3{width:33.3333%}.sm\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:gap-lg{gap:var(--spacing-lg)}}@media(min-width:48rem){.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(min-width:64rem){.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\\:px-lg{padding-inline:var(--spacing-lg)}}.\\[\\&\\>svg\\]\\:size-4>svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\\[\\&\\>svg\\]\\:size-5>svg{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}}:root{--bg-primary:#fff;--bg-secondary:#f5f5f5;--bg-tertiary:#e6e6e6;--border-default:#d5d5d5;--border-strong:#c1c1c1;--text-primary:#212121;--text-secondary:#707070;--text-muted:#8e8e8e;--semantic-success:#1b874b;--semantic-success-bg:#e8f5e9;--semantic-warning:#d4860a;--semantic-warning-bg:#fff3e0;--semantic-error:#d32f2f;--semantic-error-bg:#ffebee;--semantic-info:#1976d2;--semantic-info-bg:#e3f2fd;--action-primary:#007480;--action-primary-hover:#004248}.dark{--bg-primary:#1a1a1a;--bg-secondary:#242424;--bg-tertiary:#2e2e2e;--border-default:#3a3a3a;--border-strong:#505050;--text-primary:#f0f0f0;--text-secondary:#a0a0a0;--text-muted:#707070;--semantic-success:#34d37a;--semantic-success-bg:#1a2e1a;--semantic-warning:#ffad33;--semantic-warning-bg:#2e2410;--semantic-error:#ff6b6b;--semantic-error-bg:#2e1515;--semantic-info:#64b5f6;--semantic-info-bg:#152538;--action-primary:#009ba6;--action-primary-hover:#007480;--shadow-sm:0 1px 2px #0000004d;--shadow-md:0 2px 8px #0006;--shadow-lg:0 4px 16px #00000080;--shadow-xl:0 8px 32px #0009}@keyframes slide-in{0%{opacity:0;transform:translate(1rem)}to{opacity:1;transform:translate(0)}}@keyframes dialog-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes floating-in{0%{opacity:0}to{opacity:1}}body{font-family:var(--font-sans);font-size:var(--text-body);line-height:var(--text-body--line-height);color:var(--color-text-primary);background-color:var(--color-bg-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-duration{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}`)),document.head.appendChild(r)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
+
import { useState as N, forwardRef as C, useId as I, useRef as $, useCallback as k, useEffect as z, createContext as D, useContext as F, useSyncExternalStore as ce, useMemo as de } from "react";
|
|
3
|
+
import { useTranslation as J } from "react-i18next";
|
|
4
|
+
import { jsx as e, jsxs as m, Fragment as S } from "react/jsx-runtime";
|
|
5
|
+
import { SunFill as me, MoonFill as ue, List as be, ChevronDown as E, XLg as pe, ChevronUp as Y, InfoCircleFill as Q, XCircleFill as Z, ExclamationTriangleFill as P, CheckCircleFill as ee, X as B } from "react-bootstrap-icons";
|
|
6
|
+
import { createPortal as fe } from "react-dom";
|
|
7
|
+
import { useFloating as L, autoUpdate as R, offset as T, flip as M, shift as O, useClick as te, useDismiss as U, useRole as H, useListNavigation as xe, useInteractions as V, FloatingPortal as q, FloatingFocusManager as re, arrow as ge, useHover as he, useFocus as ye } from "@floating-ui/react";
|
|
8
|
+
import ve from "react-select";
|
|
9
|
+
const we = {
|
|
10
|
+
sm: "size-8 text-caption",
|
|
11
|
+
md: "size-10 text-small",
|
|
12
|
+
lg: "size-14 text-body"
|
|
13
|
+
};
|
|
14
|
+
function Ne(t) {
|
|
15
|
+
const r = t.trim().split(/\s+/);
|
|
16
|
+
return r.length === 0 ? "?" : r.length === 1 ? r[0][0].toUpperCase() : (r[0][0] + r[r.length - 1][0]).toUpperCase();
|
|
17
|
+
}
|
|
18
|
+
function bt({ src: t, name: r, size: o = "md", alt: n, className: s = "", ...i }) {
|
|
19
|
+
const [a, c] = N(!1), d = !!t && !a;
|
|
20
|
+
return /* @__PURE__ */ e(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
role: "img",
|
|
24
|
+
"aria-label": n ?? r,
|
|
25
|
+
className: [
|
|
26
|
+
"inline-flex items-center justify-center rounded-full overflow-hidden",
|
|
27
|
+
"bg-primary text-white font-semibold select-none shrink-0",
|
|
28
|
+
we[o],
|
|
29
|
+
s
|
|
30
|
+
].join(" "),
|
|
31
|
+
...i,
|
|
32
|
+
children: d ? /* @__PURE__ */ e(
|
|
33
|
+
"img",
|
|
34
|
+
{
|
|
35
|
+
src: t,
|
|
36
|
+
alt: n ?? r,
|
|
37
|
+
className: "size-full object-cover",
|
|
38
|
+
onError: () => c(!0)
|
|
39
|
+
}
|
|
40
|
+
) : /* @__PURE__ */ e("span", { "aria-hidden": "true", children: Ne(r) })
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
const ke = {
|
|
45
|
+
default: "bg-bg-tertiary text-text-primary",
|
|
46
|
+
success: "bg-success-bg text-success",
|
|
47
|
+
warning: "bg-warning-bg text-warning",
|
|
48
|
+
error: "bg-error-bg text-error",
|
|
49
|
+
info: "bg-info-bg text-info"
|
|
50
|
+
}, Ce = {
|
|
51
|
+
default: "bg-text-muted",
|
|
52
|
+
success: "bg-success",
|
|
53
|
+
warning: "bg-warning",
|
|
54
|
+
error: "bg-error",
|
|
55
|
+
info: "bg-info"
|
|
56
|
+
};
|
|
57
|
+
function pt({ color: t = "default", dot: r, className: o = "", children: n, ...s }) {
|
|
58
|
+
return r ? /* @__PURE__ */ e(
|
|
59
|
+
"span",
|
|
60
|
+
{
|
|
61
|
+
role: "status",
|
|
62
|
+
className: `inline-block size-2.5 rounded-full ${Ce[t]} ${o}`,
|
|
63
|
+
...s
|
|
64
|
+
}
|
|
65
|
+
) : /* @__PURE__ */ e(
|
|
66
|
+
"span",
|
|
67
|
+
{
|
|
68
|
+
className: [
|
|
69
|
+
"inline-flex items-center rounded-sm px-2 py-0.5",
|
|
70
|
+
"text-caption font-medium leading-none",
|
|
71
|
+
ke[t],
|
|
72
|
+
o
|
|
73
|
+
].join(" "),
|
|
74
|
+
...s,
|
|
75
|
+
children: n
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
const ze = {
|
|
80
|
+
sm: "size-4",
|
|
81
|
+
md: "size-6",
|
|
82
|
+
lg: "size-8"
|
|
83
|
+
};
|
|
84
|
+
function ne({ size: t = "md", className: r = "", ...o }) {
|
|
85
|
+
return /* @__PURE__ */ m(
|
|
86
|
+
"svg",
|
|
87
|
+
{
|
|
88
|
+
viewBox: "0 0 24 24",
|
|
89
|
+
fill: "none",
|
|
90
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
91
|
+
className: `animate-spin ${ze[t]} ${r}`,
|
|
92
|
+
role: "status",
|
|
93
|
+
"aria-label": "Loading",
|
|
94
|
+
...o,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ e(
|
|
97
|
+
"circle",
|
|
98
|
+
{
|
|
99
|
+
className: "opacity-25",
|
|
100
|
+
cx: "12",
|
|
101
|
+
cy: "12",
|
|
102
|
+
r: "10",
|
|
103
|
+
stroke: "currentColor",
|
|
104
|
+
strokeWidth: "3"
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ e(
|
|
108
|
+
"path",
|
|
109
|
+
{
|
|
110
|
+
className: "opacity-75",
|
|
111
|
+
fill: "currentColor",
|
|
112
|
+
d: "M4 12a8 8 0 018-8v3a5 5 0 00-5 5H4z"
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
const $e = {
|
|
120
|
+
primary: "bg-primary text-white hover:bg-primary-hover focus-visible:ring-primary",
|
|
121
|
+
secondary: "border border-border text-text-primary bg-bg-primary hover:bg-bg-tertiary focus-visible:ring-primary",
|
|
122
|
+
ghost: "text-text-primary hover:bg-bg-tertiary focus-visible:ring-primary",
|
|
123
|
+
danger: "bg-error text-white hover:opacity-90 focus-visible:ring-error"
|
|
124
|
+
}, Ie = {
|
|
125
|
+
sm: "text-small px-3 py-1 gap-1.5",
|
|
126
|
+
md: "text-body px-4 py-2 gap-2",
|
|
127
|
+
lg: "text-body px-5 py-2.5 gap-2"
|
|
128
|
+
}, je = {
|
|
129
|
+
sm: "sm",
|
|
130
|
+
md: "sm",
|
|
131
|
+
lg: "md"
|
|
132
|
+
}, ft = C(function({
|
|
133
|
+
variant: r = "primary",
|
|
134
|
+
size: o = "md",
|
|
135
|
+
loading: n = !1,
|
|
136
|
+
disabled: s,
|
|
137
|
+
iconLeft: i,
|
|
138
|
+
iconRight: a,
|
|
139
|
+
className: c = "",
|
|
140
|
+
children: d,
|
|
141
|
+
...l
|
|
142
|
+
}, u) {
|
|
143
|
+
const b = s || n;
|
|
144
|
+
return /* @__PURE__ */ m(
|
|
145
|
+
"button",
|
|
146
|
+
{
|
|
147
|
+
ref: u,
|
|
148
|
+
type: "button",
|
|
149
|
+
disabled: b,
|
|
150
|
+
"aria-busy": n || void 0,
|
|
151
|
+
className: [
|
|
152
|
+
// base
|
|
153
|
+
"inline-flex items-center justify-center font-medium rounded-md",
|
|
154
|
+
"transition-colors duration-150 cursor-pointer",
|
|
155
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
156
|
+
// variant + size
|
|
157
|
+
$e[r],
|
|
158
|
+
Ie[o],
|
|
159
|
+
// disabled / loading
|
|
160
|
+
b && "opacity-50 pointer-events-none",
|
|
161
|
+
c
|
|
162
|
+
].filter(Boolean).join(" "),
|
|
163
|
+
...l,
|
|
164
|
+
children: [
|
|
165
|
+
n ? /* @__PURE__ */ e(ne, { size: je[o], "aria-hidden": "true" }) : i,
|
|
166
|
+
d,
|
|
167
|
+
!n && a
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
);
|
|
171
|
+
}), De = {
|
|
172
|
+
primary: "bg-primary text-white hover:bg-primary-hover focus-visible:ring-primary",
|
|
173
|
+
secondary: "border border-border text-text-primary bg-bg-primary hover:bg-bg-tertiary focus-visible:ring-primary",
|
|
174
|
+
ghost: "text-text-primary hover:bg-bg-tertiary focus-visible:ring-primary",
|
|
175
|
+
danger: "bg-error text-white hover:opacity-90 focus-visible:ring-error"
|
|
176
|
+
}, Fe = {
|
|
177
|
+
sm: "size-7 text-small",
|
|
178
|
+
md: "size-9 text-body",
|
|
179
|
+
lg: "size-11 text-body"
|
|
180
|
+
}, Ee = C(function({ variant: r = "ghost", size: o = "md", loading: n = !1, disabled: s, icon: i, className: a = "", ...c }, d) {
|
|
181
|
+
const l = s || n;
|
|
182
|
+
return /* @__PURE__ */ e(
|
|
183
|
+
"button",
|
|
184
|
+
{
|
|
185
|
+
ref: d,
|
|
186
|
+
type: "button",
|
|
187
|
+
disabled: l,
|
|
188
|
+
"aria-busy": n || void 0,
|
|
189
|
+
className: [
|
|
190
|
+
// base
|
|
191
|
+
"inline-flex items-center justify-center rounded-md",
|
|
192
|
+
"transition-colors duration-150 cursor-pointer",
|
|
193
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
194
|
+
// variant + size
|
|
195
|
+
De[r],
|
|
196
|
+
Fe[o],
|
|
197
|
+
// disabled / loading
|
|
198
|
+
l && "opacity-50 pointer-events-none",
|
|
199
|
+
a
|
|
200
|
+
].filter(Boolean).join(" "),
|
|
201
|
+
...c,
|
|
202
|
+
children: n ? /* @__PURE__ */ e(ne, { size: "sm", "aria-hidden": "true" }) : i
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
}), xt = C(function({
|
|
206
|
+
label: r,
|
|
207
|
+
indeterminate: o = !1,
|
|
208
|
+
helperText: n,
|
|
209
|
+
error: s,
|
|
210
|
+
className: i = "",
|
|
211
|
+
id: a,
|
|
212
|
+
disabled: c,
|
|
213
|
+
...d
|
|
214
|
+
}, l) {
|
|
215
|
+
const u = I(), b = a ?? u, g = `${b}-helper`, f = !!s, y = $(null), p = k(
|
|
216
|
+
(x) => {
|
|
217
|
+
y.current = x, typeof l == "function" ? l(x) : l && (l.current = x);
|
|
218
|
+
},
|
|
219
|
+
[l]
|
|
220
|
+
);
|
|
221
|
+
return z(() => {
|
|
222
|
+
y.current && (y.current.indeterminate = o);
|
|
223
|
+
}, [o]), /* @__PURE__ */ m("div", { className: `flex flex-col gap-1 ${i}`, children: [
|
|
224
|
+
/* @__PURE__ */ m("div", { className: "flex items-start gap-2", children: [
|
|
225
|
+
/* @__PURE__ */ e(
|
|
226
|
+
"input",
|
|
227
|
+
{
|
|
228
|
+
ref: p,
|
|
229
|
+
id: b,
|
|
230
|
+
type: "checkbox",
|
|
231
|
+
disabled: c,
|
|
232
|
+
"aria-invalid": f || void 0,
|
|
233
|
+
"aria-describedby": n || s ? g : void 0,
|
|
234
|
+
className: [
|
|
235
|
+
"mt-0.5 size-4 shrink-0 cursor-pointer rounded-sm border appearance-none",
|
|
236
|
+
"bg-bg-primary transition-colors",
|
|
237
|
+
"checked:bg-primary checked:border-primary",
|
|
238
|
+
"indeterminate:bg-primary indeterminate:border-primary",
|
|
239
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg-primary",
|
|
240
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
241
|
+
f ? "border-error" : "border-border hover:border-border-strong",
|
|
242
|
+
// Checkmark via background SVG
|
|
243
|
+
"checked:bg-[url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M12.207%204.793a1%201%200%20010%201.414l-5%205a1%201%200%2001-1.414%200l-2-2a1%201%200%20011.414-1.414L6.5%209.086l4.293-4.293a1%201%200%20011.414%200z%22%2F%3E%3C%2Fsvg%3E')] checked:bg-center checked:bg-no-repeat",
|
|
244
|
+
// Indeterminate dash
|
|
245
|
+
"indeterminate:bg-[url('data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2016%2016%22%20fill%3D%22white%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect%20x%3D%223%22%20y%3D%227%22%20width%3D%2210%22%20height%3D%222%22%20rx%3D%221%22%2F%3E%3C%2Fsvg%3E')] indeterminate:bg-center indeterminate:bg-no-repeat"
|
|
246
|
+
].join(" "),
|
|
247
|
+
...d
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
r && /* @__PURE__ */ e(
|
|
251
|
+
"label",
|
|
252
|
+
{
|
|
253
|
+
htmlFor: b,
|
|
254
|
+
className: `text-body select-none ${c ? "text-text-muted cursor-not-allowed" : "text-text-primary cursor-pointer"}`,
|
|
255
|
+
children: r
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
] }),
|
|
259
|
+
(n || s) && /* @__PURE__ */ e(
|
|
260
|
+
"p",
|
|
261
|
+
{
|
|
262
|
+
id: g,
|
|
263
|
+
className: `text-caption pl-6 ${f ? "text-error" : "text-text-secondary"}`,
|
|
264
|
+
children: s ?? n
|
|
265
|
+
}
|
|
266
|
+
)
|
|
267
|
+
] });
|
|
268
|
+
}), Se = {
|
|
269
|
+
sm: "h-8 text-small px-2.5",
|
|
270
|
+
md: "h-10 text-body px-3",
|
|
271
|
+
lg: "h-12 text-body px-3.5"
|
|
272
|
+
}, Ae = {
|
|
273
|
+
sm: "pl-8",
|
|
274
|
+
md: "pl-10",
|
|
275
|
+
lg: "pl-11"
|
|
276
|
+
}, Pe = {
|
|
277
|
+
sm: "pr-8",
|
|
278
|
+
md: "pr-10",
|
|
279
|
+
lg: "pr-11"
|
|
280
|
+
}, _ = {
|
|
281
|
+
sm: "[&>svg]:size-4",
|
|
282
|
+
md: "[&>svg]:size-5",
|
|
283
|
+
lg: "[&>svg]:size-5"
|
|
284
|
+
}, gt = C(function({
|
|
285
|
+
label: r,
|
|
286
|
+
helperText: o,
|
|
287
|
+
error: n,
|
|
288
|
+
leftIcon: s,
|
|
289
|
+
rightIcon: i,
|
|
290
|
+
inputSize: a = "md",
|
|
291
|
+
className: c = "",
|
|
292
|
+
id: d,
|
|
293
|
+
disabled: l,
|
|
294
|
+
...u
|
|
295
|
+
}, b) {
|
|
296
|
+
const g = I(), f = d ?? g, y = `${f}-helper`, p = !!n;
|
|
297
|
+
return /* @__PURE__ */ m("div", { className: `flex flex-col gap-1.5 ${c}`, children: [
|
|
298
|
+
r && /* @__PURE__ */ e("label", { htmlFor: f, className: "text-small font-medium text-text-primary", children: r }),
|
|
299
|
+
/* @__PURE__ */ m("div", { className: "relative", children: [
|
|
300
|
+
s && /* @__PURE__ */ e(
|
|
301
|
+
"span",
|
|
302
|
+
{
|
|
303
|
+
className: `pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-secondary ${_[a]}`,
|
|
304
|
+
"aria-hidden": "true",
|
|
305
|
+
children: s
|
|
306
|
+
}
|
|
307
|
+
),
|
|
308
|
+
/* @__PURE__ */ e(
|
|
309
|
+
"input",
|
|
310
|
+
{
|
|
311
|
+
ref: b,
|
|
312
|
+
id: f,
|
|
313
|
+
disabled: l,
|
|
314
|
+
"aria-invalid": p || void 0,
|
|
315
|
+
"aria-describedby": o || n ? y : void 0,
|
|
316
|
+
className: [
|
|
317
|
+
"w-full rounded-md border bg-bg-primary text-text-primary placeholder:text-text-muted",
|
|
318
|
+
"outline-none transition-colors",
|
|
319
|
+
"focus:border-primary focus:ring-1 focus:ring-primary",
|
|
320
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-bg-secondary",
|
|
321
|
+
p ? "border-error focus:border-error focus:ring-error" : "border-border hover:border-border-strong",
|
|
322
|
+
Se[a],
|
|
323
|
+
s ? Ae[a] : "",
|
|
324
|
+
i ? Pe[a] : ""
|
|
325
|
+
].join(" "),
|
|
326
|
+
...u
|
|
327
|
+
}
|
|
328
|
+
),
|
|
329
|
+
i && /* @__PURE__ */ e(
|
|
330
|
+
"span",
|
|
331
|
+
{
|
|
332
|
+
className: `pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-text-secondary ${_[a]}`,
|
|
333
|
+
"aria-hidden": "true",
|
|
334
|
+
children: i
|
|
335
|
+
}
|
|
336
|
+
)
|
|
337
|
+
] }),
|
|
338
|
+
(o || n) && /* @__PURE__ */ e(
|
|
339
|
+
"p",
|
|
340
|
+
{
|
|
341
|
+
id: y,
|
|
342
|
+
className: `text-caption ${p ? "text-error" : "text-text-secondary"}`,
|
|
343
|
+
children: n ?? o
|
|
344
|
+
}
|
|
345
|
+
)
|
|
346
|
+
] });
|
|
347
|
+
}), oe = D(null);
|
|
348
|
+
function Be() {
|
|
349
|
+
const t = F(oe);
|
|
350
|
+
if (!t) throw new Error("RadioGroup.Item must be used within RadioGroup");
|
|
351
|
+
return t;
|
|
352
|
+
}
|
|
353
|
+
function Le({
|
|
354
|
+
name: t,
|
|
355
|
+
value: r,
|
|
356
|
+
onChange: o,
|
|
357
|
+
label: n,
|
|
358
|
+
helperText: s,
|
|
359
|
+
error: i,
|
|
360
|
+
orientation: a = "vertical",
|
|
361
|
+
disabled: c = !1,
|
|
362
|
+
children: d,
|
|
363
|
+
className: l = ""
|
|
364
|
+
}) {
|
|
365
|
+
const u = I(), b = t ?? u, f = `${`${b}-group`}-helper`, y = !!i;
|
|
366
|
+
return /* @__PURE__ */ e(oe.Provider, { value: { name: b, value: r, onChange: o, disabled: c, hasError: y }, children: /* @__PURE__ */ m(
|
|
367
|
+
"fieldset",
|
|
368
|
+
{
|
|
369
|
+
className: `flex flex-col gap-2 ${l}`,
|
|
370
|
+
"aria-describedby": s || i ? f : void 0,
|
|
371
|
+
disabled: c,
|
|
372
|
+
children: [
|
|
373
|
+
n && /* @__PURE__ */ e("legend", { className: "text-small font-medium text-text-primary mb-1", children: n }),
|
|
374
|
+
/* @__PURE__ */ e(
|
|
375
|
+
"div",
|
|
376
|
+
{
|
|
377
|
+
className: `flex gap-3 ${a === "horizontal" ? "flex-row flex-wrap" : "flex-col"}`,
|
|
378
|
+
role: "radiogroup",
|
|
379
|
+
children: d
|
|
380
|
+
}
|
|
381
|
+
),
|
|
382
|
+
(s || i) && /* @__PURE__ */ e(
|
|
383
|
+
"p",
|
|
384
|
+
{
|
|
385
|
+
id: f,
|
|
386
|
+
className: `text-caption ${y ? "text-error" : "text-text-secondary"}`,
|
|
387
|
+
children: i ?? s
|
|
388
|
+
}
|
|
389
|
+
)
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
) });
|
|
393
|
+
}
|
|
394
|
+
function Re({ value: t, label: r, description: o, disabled: n }) {
|
|
395
|
+
const {
|
|
396
|
+
name: s,
|
|
397
|
+
value: i,
|
|
398
|
+
onChange: a,
|
|
399
|
+
disabled: c,
|
|
400
|
+
hasError: d
|
|
401
|
+
} = Be(), l = I(), u = c || n;
|
|
402
|
+
return /* @__PURE__ */ m("div", { className: "flex items-start gap-2", children: [
|
|
403
|
+
/* @__PURE__ */ e(
|
|
404
|
+
"input",
|
|
405
|
+
{
|
|
406
|
+
id: l,
|
|
407
|
+
type: "radio",
|
|
408
|
+
name: s,
|
|
409
|
+
value: t,
|
|
410
|
+
checked: i !== void 0 ? i === t : void 0,
|
|
411
|
+
disabled: u,
|
|
412
|
+
onChange: () => a?.(t),
|
|
413
|
+
className: [
|
|
414
|
+
"mt-0.5 size-4 shrink-0 cursor-pointer appearance-none rounded-full border",
|
|
415
|
+
"bg-bg-primary transition-colors",
|
|
416
|
+
"checked:border-primary checked:border-[5px]",
|
|
417
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 focus-visible:ring-offset-bg-primary",
|
|
418
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
419
|
+
d ? "border-error" : "border-border hover:border-border-strong"
|
|
420
|
+
].join(" ")
|
|
421
|
+
}
|
|
422
|
+
),
|
|
423
|
+
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
424
|
+
/* @__PURE__ */ e(
|
|
425
|
+
"label",
|
|
426
|
+
{
|
|
427
|
+
htmlFor: l,
|
|
428
|
+
className: `text-body select-none ${u ? "text-text-muted cursor-not-allowed" : "text-text-primary cursor-pointer"}`,
|
|
429
|
+
children: r
|
|
430
|
+
}
|
|
431
|
+
),
|
|
432
|
+
o && /* @__PURE__ */ e("span", { className: "text-caption text-text-secondary", children: o })
|
|
433
|
+
] })
|
|
434
|
+
] });
|
|
435
|
+
}
|
|
436
|
+
Le.Item = Re;
|
|
437
|
+
const Te = (t) => ({
|
|
438
|
+
...t,
|
|
439
|
+
borderRadius: 8,
|
|
440
|
+
colors: {
|
|
441
|
+
...t.colors,
|
|
442
|
+
primary: "var(--color-primary)",
|
|
443
|
+
// focused border, selected option
|
|
444
|
+
primary75: "var(--color-primary-hover)",
|
|
445
|
+
primary50: "var(--color-bg-tertiary)",
|
|
446
|
+
// option hover
|
|
447
|
+
primary25: "var(--color-bg-secondary)",
|
|
448
|
+
// option light hover
|
|
449
|
+
neutral0: "var(--color-bg-primary)",
|
|
450
|
+
// control background
|
|
451
|
+
neutral5: "var(--color-bg-secondary)",
|
|
452
|
+
neutral10: "var(--color-bg-tertiary)",
|
|
453
|
+
// multi-value tag bg
|
|
454
|
+
neutral20: "var(--color-border)",
|
|
455
|
+
// control border
|
|
456
|
+
neutral30: "var(--color-border-strong)",
|
|
457
|
+
// hover border
|
|
458
|
+
neutral40: "var(--color-text-muted)",
|
|
459
|
+
// placeholder if no search
|
|
460
|
+
neutral50: "var(--color-text-secondary)",
|
|
461
|
+
// placeholder
|
|
462
|
+
neutral60: "var(--color-text-secondary)",
|
|
463
|
+
neutral70: "var(--color-text-primary)",
|
|
464
|
+
neutral80: "var(--color-text-primary)",
|
|
465
|
+
// selected text, input text
|
|
466
|
+
neutral90: "var(--color-text-primary)",
|
|
467
|
+
danger: "var(--color-error)",
|
|
468
|
+
dangerLight: "var(--color-error-bg)"
|
|
469
|
+
}
|
|
470
|
+
}), W = {
|
|
471
|
+
control: ({ isFocused: t }) => `!shadow-sm !rounded-md !border-border ${t ? "!border-primary !ring-1 !ring-primary" : ""}`,
|
|
472
|
+
menu: () => "!rounded-lg !shadow-lg !border !border-border",
|
|
473
|
+
option: ({ isFocused: t, isSelected: r }) => `${r ? "!bg-primary !text-white" : t ? "!bg-bg-tertiary" : ""}`,
|
|
474
|
+
multiValue: () => "!rounded-sm !bg-bg-tertiary"
|
|
475
|
+
};
|
|
476
|
+
function ht({ label: t, helperText: r, error: o, className: n = "", ...s }) {
|
|
477
|
+
const i = I(), a = s.inputId ?? i, c = `${a}-helper`, d = !!o;
|
|
478
|
+
return /* @__PURE__ */ m("div", { className: `flex flex-col gap-1.5 ${n}`, children: [
|
|
479
|
+
t && /* @__PURE__ */ e("label", { htmlFor: a, className: "text-small font-medium text-text-primary", children: t }),
|
|
480
|
+
/* @__PURE__ */ e(
|
|
481
|
+
ve,
|
|
482
|
+
{
|
|
483
|
+
inputId: a,
|
|
484
|
+
theme: Te,
|
|
485
|
+
classNames: {
|
|
486
|
+
...W,
|
|
487
|
+
control: (l) => {
|
|
488
|
+
const u = W.control?.(l) ?? "";
|
|
489
|
+
return d ? `${u} !border-error !focus:ring-error` : u;
|
|
490
|
+
}
|
|
491
|
+
},
|
|
492
|
+
"aria-invalid": d || void 0,
|
|
493
|
+
"aria-errormessage": d ? c : void 0,
|
|
494
|
+
...s
|
|
495
|
+
}
|
|
496
|
+
),
|
|
497
|
+
(r || o) && /* @__PURE__ */ e(
|
|
498
|
+
"p",
|
|
499
|
+
{
|
|
500
|
+
id: c,
|
|
501
|
+
className: `text-caption ${d ? "text-error" : "text-text-secondary"}`,
|
|
502
|
+
children: o ?? r
|
|
503
|
+
}
|
|
504
|
+
)
|
|
505
|
+
] });
|
|
506
|
+
}
|
|
507
|
+
const yt = C(function({ label: r, helperText: o, className: n = "", id: s, disabled: i, ...a }, c) {
|
|
508
|
+
const d = I(), l = s ?? d, u = `${l}-helper`;
|
|
509
|
+
return /* @__PURE__ */ m("div", { className: `flex flex-col gap-1 ${n}`, children: [
|
|
510
|
+
/* @__PURE__ */ m("div", { className: "flex items-center gap-3", children: [
|
|
511
|
+
/* @__PURE__ */ m("div", { className: "relative inline-flex items-center", children: [
|
|
512
|
+
/* @__PURE__ */ e(
|
|
513
|
+
"input",
|
|
514
|
+
{
|
|
515
|
+
ref: c,
|
|
516
|
+
id: l,
|
|
517
|
+
type: "checkbox",
|
|
518
|
+
role: "switch",
|
|
519
|
+
disabled: i,
|
|
520
|
+
"aria-describedby": o ? u : void 0,
|
|
521
|
+
className: "peer sr-only",
|
|
522
|
+
...a
|
|
523
|
+
}
|
|
524
|
+
),
|
|
525
|
+
/* @__PURE__ */ e(
|
|
526
|
+
"label",
|
|
527
|
+
{
|
|
528
|
+
htmlFor: l,
|
|
529
|
+
className: [
|
|
530
|
+
"relative h-6 w-11 rounded-full transition-colors",
|
|
531
|
+
"bg-border-strong",
|
|
532
|
+
"peer-checked:bg-primary",
|
|
533
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-primary peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg-primary",
|
|
534
|
+
"peer-disabled:opacity-50 peer-disabled:cursor-not-allowed",
|
|
535
|
+
i ? "cursor-not-allowed" : "cursor-pointer",
|
|
536
|
+
// Thumb
|
|
537
|
+
"after:content-[''] after:absolute after:top-0.5 after:left-0.5",
|
|
538
|
+
"after:size-5 after:rounded-full after:bg-white after:shadow-sm",
|
|
539
|
+
"after:transition-transform peer-checked:after:translate-x-5"
|
|
540
|
+
].join(" "),
|
|
541
|
+
"aria-hidden": "true"
|
|
542
|
+
}
|
|
543
|
+
)
|
|
544
|
+
] }),
|
|
545
|
+
r && /* @__PURE__ */ e(
|
|
546
|
+
"label",
|
|
547
|
+
{
|
|
548
|
+
htmlFor: l,
|
|
549
|
+
className: `text-body select-none ${i ? "text-text-muted cursor-not-allowed" : "text-text-primary cursor-pointer"}`,
|
|
550
|
+
children: r
|
|
551
|
+
}
|
|
552
|
+
)
|
|
553
|
+
] }),
|
|
554
|
+
o && /* @__PURE__ */ e("p", { id: u, className: "text-caption text-text-secondary pl-14", children: o })
|
|
555
|
+
] });
|
|
556
|
+
}), vt = C(function({
|
|
557
|
+
label: r,
|
|
558
|
+
helperText: o,
|
|
559
|
+
error: n,
|
|
560
|
+
autoGrow: s = !1,
|
|
561
|
+
minRows: i = 3,
|
|
562
|
+
className: a = "",
|
|
563
|
+
id: c,
|
|
564
|
+
disabled: d,
|
|
565
|
+
onChange: l,
|
|
566
|
+
...u
|
|
567
|
+
}, b) {
|
|
568
|
+
const g = I(), f = c ?? g, y = `${f}-helper`, p = !!n, x = $(null), h = k(() => {
|
|
569
|
+
const v = x.current;
|
|
570
|
+
!v || !s || (v.style.height = "auto", v.style.height = `${v.scrollHeight}px`);
|
|
571
|
+
}, [s]);
|
|
572
|
+
z(() => {
|
|
573
|
+
h();
|
|
574
|
+
}, [h, u.value, u.defaultValue]);
|
|
575
|
+
const w = k(
|
|
576
|
+
(v) => {
|
|
577
|
+
x.current = v, typeof b == "function" ? b(v) : b && (b.current = v);
|
|
578
|
+
},
|
|
579
|
+
[b]
|
|
580
|
+
);
|
|
581
|
+
return /* @__PURE__ */ m("div", { className: `flex flex-col gap-1.5 ${a}`, children: [
|
|
582
|
+
r && /* @__PURE__ */ e("label", { htmlFor: f, className: "text-small font-medium text-text-primary", children: r }),
|
|
583
|
+
/* @__PURE__ */ e(
|
|
584
|
+
"textarea",
|
|
585
|
+
{
|
|
586
|
+
ref: w,
|
|
587
|
+
id: f,
|
|
588
|
+
rows: i,
|
|
589
|
+
disabled: d,
|
|
590
|
+
"aria-invalid": p || void 0,
|
|
591
|
+
"aria-describedby": o || n ? y : void 0,
|
|
592
|
+
onChange: (v) => {
|
|
593
|
+
l?.(v), h();
|
|
594
|
+
},
|
|
595
|
+
className: [
|
|
596
|
+
"w-full rounded-md border bg-bg-primary text-text-primary placeholder:text-text-muted",
|
|
597
|
+
"px-3 py-2 text-body outline-none transition-colors",
|
|
598
|
+
"focus:border-primary focus:ring-1 focus:ring-primary",
|
|
599
|
+
"disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-bg-secondary",
|
|
600
|
+
s ? "resize-none overflow-hidden" : "resize-y",
|
|
601
|
+
p ? "border-error focus:border-error focus:ring-error" : "border-border hover:border-border-strong"
|
|
602
|
+
].join(" "),
|
|
603
|
+
...u
|
|
604
|
+
}
|
|
605
|
+
),
|
|
606
|
+
(o || n) && /* @__PURE__ */ e(
|
|
607
|
+
"p",
|
|
608
|
+
{
|
|
609
|
+
id: y,
|
|
610
|
+
className: `text-caption ${p ? "text-error" : "text-text-secondary"}`,
|
|
611
|
+
children: n ?? o
|
|
612
|
+
}
|
|
613
|
+
)
|
|
614
|
+
] });
|
|
615
|
+
}), ie = D({
|
|
616
|
+
close: () => {
|
|
617
|
+
},
|
|
618
|
+
getItemProps: () => ({}),
|
|
619
|
+
activeIndex: null,
|
|
620
|
+
setActiveIndex: () => {
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
function wt() {
|
|
624
|
+
return /* @__PURE__ */ e("div", { role: "separator", className: "my-1 border-t border-border" });
|
|
625
|
+
}
|
|
626
|
+
const Nt = C(function({ children: r, icon: o, danger: n = !1, disabled: s = !1, onClick: i, className: a = "", ...c }, d) {
|
|
627
|
+
const { close: l } = F(ie);
|
|
628
|
+
return /* @__PURE__ */ m(
|
|
629
|
+
"button",
|
|
630
|
+
{
|
|
631
|
+
ref: d,
|
|
632
|
+
type: "button",
|
|
633
|
+
role: "menuitem",
|
|
634
|
+
disabled: s,
|
|
635
|
+
onClick: () => {
|
|
636
|
+
s || (i?.(), l());
|
|
637
|
+
},
|
|
638
|
+
className: [
|
|
639
|
+
"flex w-full items-center gap-2 px-3 py-2 text-small rounded-md",
|
|
640
|
+
"text-left transition-colors outline-none cursor-pointer",
|
|
641
|
+
n ? "text-error hover:bg-error-bg focus:bg-error-bg" : "text-text-primary hover:bg-bg-tertiary focus:bg-bg-tertiary",
|
|
642
|
+
s && "opacity-50 pointer-events-none",
|
|
643
|
+
a
|
|
644
|
+
].filter(Boolean).join(" "),
|
|
645
|
+
...c,
|
|
646
|
+
children: [
|
|
647
|
+
o && /* @__PURE__ */ e("span", { className: "shrink-0 size-4", children: o }),
|
|
648
|
+
r
|
|
649
|
+
]
|
|
650
|
+
}
|
|
651
|
+
);
|
|
652
|
+
});
|
|
653
|
+
function kt({
|
|
654
|
+
trigger: t,
|
|
655
|
+
children: r,
|
|
656
|
+
placement: o = "bottom-start",
|
|
657
|
+
className: n = ""
|
|
658
|
+
}) {
|
|
659
|
+
const [s, i] = N(!1), [a, c] = N(null), d = $([]), { refs: l, floatingStyles: u, context: b } = L({
|
|
660
|
+
open: s,
|
|
661
|
+
onOpenChange: i,
|
|
662
|
+
placement: o,
|
|
663
|
+
middleware: [T(4), M(), O({ padding: 8 })],
|
|
664
|
+
whileElementsMounted: R
|
|
665
|
+
}), g = te(b), f = U(b), y = H(b, { role: "menu" }), p = xe(b, {
|
|
666
|
+
listRef: d,
|
|
667
|
+
activeIndex: a,
|
|
668
|
+
onNavigate: c,
|
|
669
|
+
loop: !0
|
|
670
|
+
}), { getReferenceProps: x, getFloatingProps: h, getItemProps: w } = V([
|
|
671
|
+
g,
|
|
672
|
+
f,
|
|
673
|
+
y,
|
|
674
|
+
p
|
|
675
|
+
]), v = k(() => i(!1), []);
|
|
676
|
+
return /* @__PURE__ */ m(S, { children: [
|
|
677
|
+
/* @__PURE__ */ e("span", { ref: l.setReference, className: "inline-flex", ...x(), children: t }),
|
|
678
|
+
s && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(re, { context: b, modal: !1, children: /* @__PURE__ */ e(
|
|
679
|
+
"div",
|
|
680
|
+
{
|
|
681
|
+
ref: l.setFloating,
|
|
682
|
+
style: u,
|
|
683
|
+
className: [
|
|
684
|
+
"z-50 min-w-[10rem] p-1 rounded-lg border border-border",
|
|
685
|
+
"bg-bg-primary shadow-lg animate-floating-in",
|
|
686
|
+
n
|
|
687
|
+
].join(" "),
|
|
688
|
+
...h(),
|
|
689
|
+
children: /* @__PURE__ */ e(
|
|
690
|
+
ie.Provider,
|
|
691
|
+
{
|
|
692
|
+
value: { close: v, getItemProps: w, activeIndex: a, setActiveIndex: c },
|
|
693
|
+
children: r
|
|
694
|
+
}
|
|
695
|
+
)
|
|
696
|
+
}
|
|
697
|
+
) }) })
|
|
698
|
+
] });
|
|
699
|
+
}
|
|
700
|
+
function Ct({
|
|
701
|
+
trigger: t,
|
|
702
|
+
children: r,
|
|
703
|
+
placement: o = "bottom",
|
|
704
|
+
open: n,
|
|
705
|
+
onOpenChange: s,
|
|
706
|
+
className: i = ""
|
|
707
|
+
}) {
|
|
708
|
+
const [a, c] = N(!1), d = n !== void 0, l = d ? n : a, u = d ? (v) => s?.(v) : c, { refs: b, floatingStyles: g, context: f } = L({
|
|
709
|
+
open: l,
|
|
710
|
+
onOpenChange: u,
|
|
711
|
+
placement: o,
|
|
712
|
+
middleware: [T(8), M(), O({ padding: 8 })],
|
|
713
|
+
whileElementsMounted: R
|
|
714
|
+
}), y = te(f), p = U(f), x = H(f), { getReferenceProps: h, getFloatingProps: w } = V([y, p, x]);
|
|
715
|
+
return /* @__PURE__ */ m(S, { children: [
|
|
716
|
+
/* @__PURE__ */ e("span", { ref: b.setReference, className: "inline-flex", ...h(), children: t }),
|
|
717
|
+
l && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(re, { context: f, modal: !1, children: /* @__PURE__ */ e(
|
|
718
|
+
"div",
|
|
719
|
+
{
|
|
720
|
+
ref: b.setFloating,
|
|
721
|
+
style: g,
|
|
722
|
+
className: [
|
|
723
|
+
"z-50 rounded-lg border border-border p-md",
|
|
724
|
+
"bg-bg-primary shadow-lg animate-floating-in",
|
|
725
|
+
i
|
|
726
|
+
].join(" "),
|
|
727
|
+
...w(),
|
|
728
|
+
children: r
|
|
729
|
+
}
|
|
730
|
+
) }) })
|
|
731
|
+
] });
|
|
732
|
+
}
|
|
733
|
+
const se = D({
|
|
734
|
+
activeValue: "",
|
|
735
|
+
idPrefix: ""
|
|
736
|
+
});
|
|
737
|
+
function zt({ value: t, children: r, className: o = "" }) {
|
|
738
|
+
const { activeValue: n, idPrefix: s } = F(se), i = n === t;
|
|
739
|
+
return /* @__PURE__ */ e(
|
|
740
|
+
"div",
|
|
741
|
+
{
|
|
742
|
+
id: `${s}-panel-${t}`,
|
|
743
|
+
role: "tabpanel",
|
|
744
|
+
"aria-labelledby": `${s}-tab-${t}`,
|
|
745
|
+
hidden: !i,
|
|
746
|
+
tabIndex: 0,
|
|
747
|
+
className: o,
|
|
748
|
+
children: i && r
|
|
749
|
+
}
|
|
750
|
+
);
|
|
751
|
+
}
|
|
752
|
+
function $t({
|
|
753
|
+
items: t,
|
|
754
|
+
value: r,
|
|
755
|
+
defaultValue: o,
|
|
756
|
+
onChange: n,
|
|
757
|
+
children: s,
|
|
758
|
+
className: i = ""
|
|
759
|
+
}) {
|
|
760
|
+
const a = I().replace(/:/g, ""), c = $(null), d = r !== void 0, [l, u] = N(
|
|
761
|
+
() => o ?? t.find((p) => !p.disabled)?.value ?? t[0]?.value ?? ""
|
|
762
|
+
), b = d ? r : l, g = k(
|
|
763
|
+
(p) => {
|
|
764
|
+
d || u(p), n?.(p);
|
|
765
|
+
},
|
|
766
|
+
[d, n]
|
|
767
|
+
), f = t.filter((p) => !p.disabled), y = (p) => {
|
|
768
|
+
const x = f.findIndex((v) => v.value === b);
|
|
769
|
+
let h = x;
|
|
770
|
+
switch (p.key) {
|
|
771
|
+
case "ArrowRight":
|
|
772
|
+
case "ArrowDown":
|
|
773
|
+
p.preventDefault(), h = (x + 1) % f.length;
|
|
774
|
+
break;
|
|
775
|
+
case "ArrowLeft":
|
|
776
|
+
case "ArrowUp":
|
|
777
|
+
p.preventDefault(), h = (x - 1 + f.length) % f.length;
|
|
778
|
+
break;
|
|
779
|
+
case "Home":
|
|
780
|
+
p.preventDefault(), h = 0;
|
|
781
|
+
break;
|
|
782
|
+
case "End":
|
|
783
|
+
p.preventDefault(), h = f.length - 1;
|
|
784
|
+
break;
|
|
785
|
+
default:
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
const w = f[h];
|
|
789
|
+
w && (g(w.value), c.current?.querySelector(
|
|
790
|
+
`[data-tab-value="${w.value}"]`
|
|
791
|
+
)?.focus());
|
|
792
|
+
};
|
|
793
|
+
return /* @__PURE__ */ e(se.Provider, { value: { activeValue: b, idPrefix: a }, children: /* @__PURE__ */ m("div", { className: i, children: [
|
|
794
|
+
/* @__PURE__ */ e(
|
|
795
|
+
"div",
|
|
796
|
+
{
|
|
797
|
+
ref: c,
|
|
798
|
+
role: "tablist",
|
|
799
|
+
"aria-orientation": "horizontal",
|
|
800
|
+
onKeyDown: y,
|
|
801
|
+
className: "flex border-b border-border",
|
|
802
|
+
children: t.map((p) => {
|
|
803
|
+
const x = p.value === b;
|
|
804
|
+
return /* @__PURE__ */ m(
|
|
805
|
+
"button",
|
|
806
|
+
{
|
|
807
|
+
id: `${a}-tab-${p.value}`,
|
|
808
|
+
role: "tab",
|
|
809
|
+
type: "button",
|
|
810
|
+
"data-tab-value": p.value,
|
|
811
|
+
"aria-selected": x,
|
|
812
|
+
"aria-controls": `${a}-panel-${p.value}`,
|
|
813
|
+
tabIndex: x ? 0 : -1,
|
|
814
|
+
disabled: p.disabled,
|
|
815
|
+
onClick: () => g(p.value),
|
|
816
|
+
className: [
|
|
817
|
+
"inline-flex items-center gap-1.5 px-4 py-2.5 text-small font-medium",
|
|
818
|
+
"border-b-2 -mb-px transition-colors outline-none cursor-pointer",
|
|
819
|
+
"focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
|
|
820
|
+
x ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-border-strong",
|
|
821
|
+
p.disabled && "opacity-50 pointer-events-none"
|
|
822
|
+
].filter(Boolean).join(" "),
|
|
823
|
+
children: [
|
|
824
|
+
p.icon && /* @__PURE__ */ e("span", { className: "shrink-0 size-4", children: p.icon }),
|
|
825
|
+
p.label
|
|
826
|
+
]
|
|
827
|
+
},
|
|
828
|
+
p.value
|
|
829
|
+
);
|
|
830
|
+
})
|
|
831
|
+
}
|
|
832
|
+
),
|
|
833
|
+
s
|
|
834
|
+
] }) });
|
|
835
|
+
}
|
|
836
|
+
const Me = {
|
|
837
|
+
top: "bottom",
|
|
838
|
+
bottom: "top",
|
|
839
|
+
left: "right",
|
|
840
|
+
right: "left"
|
|
841
|
+
};
|
|
842
|
+
function It({
|
|
843
|
+
children: t,
|
|
844
|
+
content: r,
|
|
845
|
+
placement: o = "top",
|
|
846
|
+
delay: n = 200,
|
|
847
|
+
className: s = ""
|
|
848
|
+
}) {
|
|
849
|
+
const [i, a] = N(!1), c = $(null), {
|
|
850
|
+
refs: d,
|
|
851
|
+
floatingStyles: l,
|
|
852
|
+
context: u,
|
|
853
|
+
middlewareData: b,
|
|
854
|
+
placement: g
|
|
855
|
+
} = L({
|
|
856
|
+
open: i,
|
|
857
|
+
onOpenChange: a,
|
|
858
|
+
placement: o,
|
|
859
|
+
middleware: [
|
|
860
|
+
T(8),
|
|
861
|
+
M(),
|
|
862
|
+
O({ padding: 8 }),
|
|
863
|
+
// eslint-disable-next-line react-hooks/refs -- floating-ui arrow middleware needs ref object
|
|
864
|
+
ge({ element: c })
|
|
865
|
+
],
|
|
866
|
+
whileElementsMounted: R
|
|
867
|
+
}), f = he(u, { delay: n, move: !1 }), y = ye(u), p = U(u), x = H(u, { role: "tooltip" }), { getReferenceProps: h, getFloatingProps: w } = V([f, y, p, x]), v = g.split("-")[0], G = b.arrow?.x, X = b.arrow?.y;
|
|
868
|
+
return /* @__PURE__ */ m(S, { children: [
|
|
869
|
+
/* @__PURE__ */ e("span", { ref: d.setReference, className: "inline-flex", ...h(), children: t }),
|
|
870
|
+
i && r && /* @__PURE__ */ e(q, { children: /* @__PURE__ */ m(
|
|
871
|
+
"div",
|
|
872
|
+
{
|
|
873
|
+
ref: d.setFloating,
|
|
874
|
+
style: l,
|
|
875
|
+
role: "tooltip",
|
|
876
|
+
className: [
|
|
877
|
+
"z-50 max-w-[var(--container-xs)] px-3 py-1.5 rounded-md text-small",
|
|
878
|
+
"bg-text-primary text-bg-primary shadow-md",
|
|
879
|
+
"pointer-events-none animate-floating-in",
|
|
880
|
+
s
|
|
881
|
+
].join(" "),
|
|
882
|
+
...w(),
|
|
883
|
+
children: [
|
|
884
|
+
r,
|
|
885
|
+
/* @__PURE__ */ e(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
ref: c,
|
|
889
|
+
className: "absolute size-2 bg-text-primary rotate-45",
|
|
890
|
+
style: {
|
|
891
|
+
left: G != null ? `${G}px` : "",
|
|
892
|
+
top: X != null ? `${X}px` : "",
|
|
893
|
+
[Me[v]]: "-4px"
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
)
|
|
897
|
+
]
|
|
898
|
+
}
|
|
899
|
+
) })
|
|
900
|
+
] });
|
|
901
|
+
}
|
|
902
|
+
function Oe() {
|
|
903
|
+
const { i18n: t } = J(), r = t.language ?? "en", o = k(
|
|
904
|
+
(s) => {
|
|
905
|
+
t.changeLanguage(s);
|
|
906
|
+
},
|
|
907
|
+
[t]
|
|
908
|
+
), n = k(() => {
|
|
909
|
+
o(r === "en" ? "fr" : "en");
|
|
910
|
+
}, [r, o]);
|
|
911
|
+
return { language: r, toggleLanguage: n, setLanguage: o };
|
|
912
|
+
}
|
|
913
|
+
const Ue = [
|
|
914
|
+
{ value: "en", label: "EN" },
|
|
915
|
+
{ value: "fr", label: "FR" }
|
|
916
|
+
];
|
|
917
|
+
function jt({ className: t = "" }) {
|
|
918
|
+
const { language: r, setLanguage: o } = Oe();
|
|
919
|
+
return /* @__PURE__ */ e(
|
|
920
|
+
"div",
|
|
921
|
+
{
|
|
922
|
+
role: "radiogroup",
|
|
923
|
+
"aria-label": "Language",
|
|
924
|
+
className: [
|
|
925
|
+
"inline-flex items-center rounded-full border border-border bg-bg-secondary p-0.5",
|
|
926
|
+
t
|
|
927
|
+
].filter(Boolean).join(" "),
|
|
928
|
+
children: Ue.map(({ value: n, label: s }) => {
|
|
929
|
+
const i = r === n;
|
|
930
|
+
return /* @__PURE__ */ e(
|
|
931
|
+
"button",
|
|
932
|
+
{
|
|
933
|
+
type: "button",
|
|
934
|
+
role: "radio",
|
|
935
|
+
"aria-checked": i,
|
|
936
|
+
onClick: () => o(n),
|
|
937
|
+
className: [
|
|
938
|
+
"rounded-full px-2.5 py-0.5 text-caption font-medium transition-colors cursor-pointer",
|
|
939
|
+
i ? "bg-primary text-white shadow-sm" : "text-text-secondary hover:text-text-primary"
|
|
940
|
+
].join(" "),
|
|
941
|
+
children: s
|
|
942
|
+
},
|
|
943
|
+
n
|
|
944
|
+
);
|
|
945
|
+
})
|
|
946
|
+
}
|
|
947
|
+
);
|
|
948
|
+
}
|
|
949
|
+
const K = "poesis-theme", A = /* @__PURE__ */ new Set();
|
|
950
|
+
function He() {
|
|
951
|
+
A.forEach((t) => t());
|
|
952
|
+
}
|
|
953
|
+
function Ve(t) {
|
|
954
|
+
return A.add(t), () => A.delete(t);
|
|
955
|
+
}
|
|
956
|
+
function qe() {
|
|
957
|
+
return document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
958
|
+
}
|
|
959
|
+
function Ke() {
|
|
960
|
+
return "light";
|
|
961
|
+
}
|
|
962
|
+
function j(t) {
|
|
963
|
+
t === "dark" ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark"), localStorage.setItem(K, t), He();
|
|
964
|
+
}
|
|
965
|
+
function Dt() {
|
|
966
|
+
const t = localStorage.getItem(K);
|
|
967
|
+
if (t) {
|
|
968
|
+
j(t);
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
const r = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
972
|
+
j(r ? "dark" : "light");
|
|
973
|
+
}
|
|
974
|
+
function Ge() {
|
|
975
|
+
const t = ce(Ve, qe, Ke);
|
|
976
|
+
z(() => {
|
|
977
|
+
const n = window.matchMedia("(prefers-color-scheme: dark)"), s = (i) => {
|
|
978
|
+
localStorage.getItem(K) || j(i.matches ? "dark" : "light");
|
|
979
|
+
};
|
|
980
|
+
return n.addEventListener("change", s), () => n.removeEventListener("change", s);
|
|
981
|
+
}, []);
|
|
982
|
+
const r = k(() => {
|
|
983
|
+
j(t === "dark" ? "light" : "dark");
|
|
984
|
+
}, [t]), o = k((n) => {
|
|
985
|
+
j(n);
|
|
986
|
+
}, []);
|
|
987
|
+
return { theme: t, toggleTheme: r, setTheme: o, isDark: t === "dark" };
|
|
988
|
+
}
|
|
989
|
+
function Ft({ variant: t = "ghost", size: r = "md", className: o }) {
|
|
990
|
+
const { isDark: n, toggleTheme: s } = Ge(), { t: i } = J();
|
|
991
|
+
return /* @__PURE__ */ e(
|
|
992
|
+
Ee,
|
|
993
|
+
{
|
|
994
|
+
variant: t,
|
|
995
|
+
size: r,
|
|
996
|
+
icon: n ? /* @__PURE__ */ e(me, { size: 16 }) : /* @__PURE__ */ e(ue, { size: 16 }),
|
|
997
|
+
"aria-label": i("theme.toggleTheme"),
|
|
998
|
+
onClick: s,
|
|
999
|
+
className: o
|
|
1000
|
+
}
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
1003
|
+
function Xe({
|
|
1004
|
+
logo: t,
|
|
1005
|
+
categories: r = [],
|
|
1006
|
+
activeCategoryId: o,
|
|
1007
|
+
onCategoryChange: n,
|
|
1008
|
+
actions: s,
|
|
1009
|
+
onBurgerClick: i
|
|
1010
|
+
}) {
|
|
1011
|
+
return /* @__PURE__ */ m("header", { className: "fixed inset-x-0 top-0 z-40 flex h-14 items-center border-b border-border bg-bg-primary px-md", children: [
|
|
1012
|
+
/* @__PURE__ */ e(
|
|
1013
|
+
"button",
|
|
1014
|
+
{
|
|
1015
|
+
type: "button",
|
|
1016
|
+
onClick: i,
|
|
1017
|
+
className: "mr-sm flex size-9 items-center justify-center rounded-md text-text-secondary hover:bg-bg-tertiary hover:text-text-primary lg:hidden",
|
|
1018
|
+
"aria-label": "Open menu",
|
|
1019
|
+
children: /* @__PURE__ */ e(be, { size: 22 })
|
|
1020
|
+
}
|
|
1021
|
+
),
|
|
1022
|
+
/* @__PURE__ */ e("div", { className: "mr-lg flex shrink-0 items-center", children: t ?? /* @__PURE__ */ e("span", { className: "text-h3 font-bold text-epfl-red", children: "EPFL" }) }),
|
|
1023
|
+
/* @__PURE__ */ e("nav", { className: "hidden flex-1 items-center gap-xs lg:flex", "aria-label": "Main categories", children: r.map((a) => {
|
|
1024
|
+
const c = a.id === o;
|
|
1025
|
+
return /* @__PURE__ */ m(
|
|
1026
|
+
"button",
|
|
1027
|
+
{
|
|
1028
|
+
type: "button",
|
|
1029
|
+
onClick: () => n?.(a.id),
|
|
1030
|
+
className: [
|
|
1031
|
+
"flex items-center gap-xs rounded-md px-sm py-xs text-small font-medium transition-colors",
|
|
1032
|
+
c ? "bg-primary/10 text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"
|
|
1033
|
+
].join(" "),
|
|
1034
|
+
"aria-current": c ? "page" : void 0,
|
|
1035
|
+
children: [
|
|
1036
|
+
a.icon && /* @__PURE__ */ e(a.icon, { size: 16 }),
|
|
1037
|
+
a.label
|
|
1038
|
+
]
|
|
1039
|
+
},
|
|
1040
|
+
a.id
|
|
1041
|
+
);
|
|
1042
|
+
}) }),
|
|
1043
|
+
/* @__PURE__ */ e("div", { className: "flex-1 lg:hidden" }),
|
|
1044
|
+
s && /* @__PURE__ */ e("div", { className: "flex items-center gap-xs", children: s })
|
|
1045
|
+
] });
|
|
1046
|
+
}
|
|
1047
|
+
function Ye({
|
|
1048
|
+
sections: t = [],
|
|
1049
|
+
activeLinkId: r,
|
|
1050
|
+
onLinkClick: o,
|
|
1051
|
+
collapsed: n = !1
|
|
1052
|
+
}) {
|
|
1053
|
+
return /* @__PURE__ */ e(
|
|
1054
|
+
"aside",
|
|
1055
|
+
{
|
|
1056
|
+
className: [
|
|
1057
|
+
"hidden lg:flex flex-col border-r border-border bg-bg-secondary overflow-y-auto transition-[width] duration-200",
|
|
1058
|
+
n ? "w-16" : "w-64"
|
|
1059
|
+
].join(" "),
|
|
1060
|
+
children: /* @__PURE__ */ e("nav", { className: "flex flex-col gap-xs p-sm", "aria-label": "Page navigation", children: t.map((s) => /* @__PURE__ */ e(
|
|
1061
|
+
_e,
|
|
1062
|
+
{
|
|
1063
|
+
section: s,
|
|
1064
|
+
activeLinkId: r,
|
|
1065
|
+
onLinkClick: o,
|
|
1066
|
+
collapsed: n
|
|
1067
|
+
},
|
|
1068
|
+
s.id
|
|
1069
|
+
)) })
|
|
1070
|
+
}
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
function _e({
|
|
1074
|
+
section: t,
|
|
1075
|
+
activeLinkId: r,
|
|
1076
|
+
onLinkClick: o,
|
|
1077
|
+
collapsed: n
|
|
1078
|
+
}) {
|
|
1079
|
+
const [s, i] = N(!0);
|
|
1080
|
+
return /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
1081
|
+
t.title && !n && /* @__PURE__ */ m(
|
|
1082
|
+
"button",
|
|
1083
|
+
{
|
|
1084
|
+
type: "button",
|
|
1085
|
+
onClick: () => i((a) => !a),
|
|
1086
|
+
className: "flex items-center justify-between rounded-md px-sm py-xs text-caption font-semibold uppercase tracking-wide text-text-muted hover:text-text-secondary",
|
|
1087
|
+
children: [
|
|
1088
|
+
/* @__PURE__ */ e("span", { children: t.title }),
|
|
1089
|
+
/* @__PURE__ */ e(
|
|
1090
|
+
E,
|
|
1091
|
+
{
|
|
1092
|
+
size: 14,
|
|
1093
|
+
className: `transition-transform ${s ? "" : "-rotate-90"}`
|
|
1094
|
+
}
|
|
1095
|
+
)
|
|
1096
|
+
]
|
|
1097
|
+
}
|
|
1098
|
+
),
|
|
1099
|
+
(s || n) && /* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.links.map((a) => {
|
|
1100
|
+
const c = a.id === r;
|
|
1101
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ m(
|
|
1102
|
+
"button",
|
|
1103
|
+
{
|
|
1104
|
+
type: "button",
|
|
1105
|
+
onClick: () => o?.(a.href),
|
|
1106
|
+
title: n ? a.label : void 0,
|
|
1107
|
+
className: [
|
|
1108
|
+
"flex w-full items-center gap-sm rounded-md px-sm py-xs text-small transition-colors",
|
|
1109
|
+
n ? "justify-center" : "",
|
|
1110
|
+
c ? "bg-primary/10 font-medium text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"
|
|
1111
|
+
].join(" "),
|
|
1112
|
+
"aria-current": c ? "page" : void 0,
|
|
1113
|
+
children: [
|
|
1114
|
+
a.icon && /* @__PURE__ */ e(a.icon, { size: 18 }),
|
|
1115
|
+
!n && /* @__PURE__ */ e("span", { children: a.label })
|
|
1116
|
+
]
|
|
1117
|
+
}
|
|
1118
|
+
) }, a.id);
|
|
1119
|
+
}) })
|
|
1120
|
+
] });
|
|
1121
|
+
}
|
|
1122
|
+
function We({
|
|
1123
|
+
open: t,
|
|
1124
|
+
onClose: r,
|
|
1125
|
+
categories: o = [],
|
|
1126
|
+
activeCategoryId: n,
|
|
1127
|
+
onCategoryChange: s,
|
|
1128
|
+
sections: i = [],
|
|
1129
|
+
activeLinkId: a,
|
|
1130
|
+
onLinkClick: c
|
|
1131
|
+
}) {
|
|
1132
|
+
const d = $(null);
|
|
1133
|
+
return z(() => {
|
|
1134
|
+
if (!t) return;
|
|
1135
|
+
const l = (u) => {
|
|
1136
|
+
u.key === "Escape" && r();
|
|
1137
|
+
};
|
|
1138
|
+
return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
|
|
1139
|
+
}, [t, r]), z(() => {
|
|
1140
|
+
if (!t) return;
|
|
1141
|
+
d.current?.focus();
|
|
1142
|
+
}, [t]), z(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
1143
|
+
document.body.style.overflow = "";
|
|
1144
|
+
}), [t]), /* @__PURE__ */ m(S, { children: [
|
|
1145
|
+
/* @__PURE__ */ e(
|
|
1146
|
+
"div",
|
|
1147
|
+
{
|
|
1148
|
+
className: [
|
|
1149
|
+
"fixed inset-0 z-50 bg-black/40 transition-opacity lg:hidden",
|
|
1150
|
+
t ? "opacity-100" : "pointer-events-none opacity-0"
|
|
1151
|
+
].join(" "),
|
|
1152
|
+
onClick: r,
|
|
1153
|
+
"aria-hidden": "true"
|
|
1154
|
+
}
|
|
1155
|
+
),
|
|
1156
|
+
/* @__PURE__ */ m(
|
|
1157
|
+
"div",
|
|
1158
|
+
{
|
|
1159
|
+
ref: d,
|
|
1160
|
+
tabIndex: -1,
|
|
1161
|
+
role: "dialog",
|
|
1162
|
+
"aria-modal": "true",
|
|
1163
|
+
"aria-label": "Navigation menu",
|
|
1164
|
+
className: [
|
|
1165
|
+
"fixed inset-y-0 left-0 z-50 flex w-72 flex-col bg-bg-primary shadow-xl transition-transform duration-200 lg:hidden",
|
|
1166
|
+
t ? "translate-x-0" : "-translate-x-full"
|
|
1167
|
+
].join(" "),
|
|
1168
|
+
children: [
|
|
1169
|
+
/* @__PURE__ */ m("div", { className: "flex h-14 items-center justify-between border-b border-border px-md", children: [
|
|
1170
|
+
/* @__PURE__ */ e("span", { className: "text-h3 font-bold text-epfl-red", children: "EPFL" }),
|
|
1171
|
+
/* @__PURE__ */ e(
|
|
1172
|
+
"button",
|
|
1173
|
+
{
|
|
1174
|
+
type: "button",
|
|
1175
|
+
onClick: r,
|
|
1176
|
+
className: "flex size-9 items-center justify-center rounded-md text-text-secondary hover:bg-bg-tertiary hover:text-text-primary",
|
|
1177
|
+
"aria-label": "Close menu",
|
|
1178
|
+
children: /* @__PURE__ */ e(pe, { size: 18 })
|
|
1179
|
+
}
|
|
1180
|
+
)
|
|
1181
|
+
] }),
|
|
1182
|
+
/* @__PURE__ */ m("div", { className: "flex-1 overflow-y-auto p-sm", children: [
|
|
1183
|
+
o.length > 0 && /* @__PURE__ */ m("div", { className: "mb-md flex flex-col gap-xs", children: [
|
|
1184
|
+
/* @__PURE__ */ e("span", { className: "px-sm text-caption font-semibold uppercase tracking-wide text-text-muted", children: "Categories" }),
|
|
1185
|
+
o.map((l) => {
|
|
1186
|
+
const u = l.id === n;
|
|
1187
|
+
return /* @__PURE__ */ m(
|
|
1188
|
+
"button",
|
|
1189
|
+
{
|
|
1190
|
+
type: "button",
|
|
1191
|
+
onClick: () => {
|
|
1192
|
+
s?.(l.id);
|
|
1193
|
+
},
|
|
1194
|
+
className: [
|
|
1195
|
+
"flex items-center gap-sm rounded-md px-sm py-xs text-small font-medium transition-colors",
|
|
1196
|
+
u ? "bg-primary/10 text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"
|
|
1197
|
+
].join(" "),
|
|
1198
|
+
children: [
|
|
1199
|
+
l.icon && /* @__PURE__ */ e(l.icon, { size: 16 }),
|
|
1200
|
+
l.label
|
|
1201
|
+
]
|
|
1202
|
+
},
|
|
1203
|
+
l.id
|
|
1204
|
+
);
|
|
1205
|
+
})
|
|
1206
|
+
] }),
|
|
1207
|
+
i.map((l) => /* @__PURE__ */ e(
|
|
1208
|
+
Je,
|
|
1209
|
+
{
|
|
1210
|
+
section: l,
|
|
1211
|
+
activeLinkId: a,
|
|
1212
|
+
onLinkClick: (u) => {
|
|
1213
|
+
c?.(u), r();
|
|
1214
|
+
}
|
|
1215
|
+
},
|
|
1216
|
+
l.id
|
|
1217
|
+
))
|
|
1218
|
+
] })
|
|
1219
|
+
]
|
|
1220
|
+
}
|
|
1221
|
+
)
|
|
1222
|
+
] });
|
|
1223
|
+
}
|
|
1224
|
+
function Je({
|
|
1225
|
+
section: t,
|
|
1226
|
+
activeLinkId: r,
|
|
1227
|
+
onLinkClick: o
|
|
1228
|
+
}) {
|
|
1229
|
+
const [n, s] = N(!0);
|
|
1230
|
+
return /* @__PURE__ */ m("div", { className: "mb-xs flex flex-col", children: [
|
|
1231
|
+
t.title && /* @__PURE__ */ m(
|
|
1232
|
+
"button",
|
|
1233
|
+
{
|
|
1234
|
+
type: "button",
|
|
1235
|
+
onClick: () => s((i) => !i),
|
|
1236
|
+
className: "flex items-center justify-between rounded-md px-sm py-xs text-caption font-semibold uppercase tracking-wide text-text-muted hover:text-text-secondary",
|
|
1237
|
+
children: [
|
|
1238
|
+
/* @__PURE__ */ e("span", { children: t.title }),
|
|
1239
|
+
/* @__PURE__ */ e(
|
|
1240
|
+
E,
|
|
1241
|
+
{
|
|
1242
|
+
size: 14,
|
|
1243
|
+
className: `transition-transform ${n ? "" : "-rotate-90"}`
|
|
1244
|
+
}
|
|
1245
|
+
)
|
|
1246
|
+
]
|
|
1247
|
+
}
|
|
1248
|
+
),
|
|
1249
|
+
n && /* @__PURE__ */ e("ul", { className: "flex flex-col gap-px", children: t.links.map((i) => {
|
|
1250
|
+
const a = i.id === r;
|
|
1251
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ m(
|
|
1252
|
+
"button",
|
|
1253
|
+
{
|
|
1254
|
+
type: "button",
|
|
1255
|
+
onClick: () => o?.(i.href),
|
|
1256
|
+
className: [
|
|
1257
|
+
"flex w-full items-center gap-sm rounded-md px-sm py-xs text-small transition-colors",
|
|
1258
|
+
a ? "bg-primary/10 font-medium text-primary" : "text-text-secondary hover:bg-bg-tertiary hover:text-text-primary"
|
|
1259
|
+
].join(" "),
|
|
1260
|
+
"aria-current": a ? "page" : void 0,
|
|
1261
|
+
children: [
|
|
1262
|
+
i.icon && /* @__PURE__ */ e(i.icon, { size: 18 }),
|
|
1263
|
+
/* @__PURE__ */ e("span", { children: i.label })
|
|
1264
|
+
]
|
|
1265
|
+
}
|
|
1266
|
+
) }, i.id);
|
|
1267
|
+
}) })
|
|
1268
|
+
] });
|
|
1269
|
+
}
|
|
1270
|
+
function Et({
|
|
1271
|
+
children: t,
|
|
1272
|
+
logo: r,
|
|
1273
|
+
categories: o = [],
|
|
1274
|
+
activeCategoryId: n,
|
|
1275
|
+
onCategoryChange: s,
|
|
1276
|
+
sections: i = [],
|
|
1277
|
+
activeLinkId: a,
|
|
1278
|
+
onLinkClick: c,
|
|
1279
|
+
actions: d,
|
|
1280
|
+
sideNavCollapsed: l = !1
|
|
1281
|
+
}) {
|
|
1282
|
+
const [u, b] = N(!1);
|
|
1283
|
+
return /* @__PURE__ */ m("div", { className: "flex h-screen flex-col bg-bg-primary", children: [
|
|
1284
|
+
/* @__PURE__ */ e(
|
|
1285
|
+
Xe,
|
|
1286
|
+
{
|
|
1287
|
+
logo: r,
|
|
1288
|
+
categories: o,
|
|
1289
|
+
activeCategoryId: n,
|
|
1290
|
+
onCategoryChange: s,
|
|
1291
|
+
actions: d,
|
|
1292
|
+
onBurgerClick: () => b(!0)
|
|
1293
|
+
}
|
|
1294
|
+
),
|
|
1295
|
+
/* @__PURE__ */ m("div", { className: "flex flex-1 overflow-hidden pt-14", children: [
|
|
1296
|
+
/* @__PURE__ */ e(
|
|
1297
|
+
Ye,
|
|
1298
|
+
{
|
|
1299
|
+
sections: i,
|
|
1300
|
+
activeLinkId: a,
|
|
1301
|
+
onLinkClick: c,
|
|
1302
|
+
collapsed: l
|
|
1303
|
+
}
|
|
1304
|
+
),
|
|
1305
|
+
/* @__PURE__ */ e("main", { className: "flex-1 overflow-y-auto px-md py-lg lg:px-lg", children: /* @__PURE__ */ e("div", { className: "mx-auto max-w-[var(--container-6xl)]", children: t }) })
|
|
1306
|
+
] }),
|
|
1307
|
+
/* @__PURE__ */ e(
|
|
1308
|
+
We,
|
|
1309
|
+
{
|
|
1310
|
+
open: u,
|
|
1311
|
+
onClose: () => b(!1),
|
|
1312
|
+
categories: o,
|
|
1313
|
+
activeCategoryId: n,
|
|
1314
|
+
onCategoryChange: (g) => {
|
|
1315
|
+
s?.(g), b(!1);
|
|
1316
|
+
},
|
|
1317
|
+
sections: i,
|
|
1318
|
+
activeLinkId: a,
|
|
1319
|
+
onLinkClick: (g) => {
|
|
1320
|
+
c?.(g), b(!1);
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
)
|
|
1324
|
+
] });
|
|
1325
|
+
}
|
|
1326
|
+
const St = C(function({ header: r, footer: o, actions: n, noPadding: s = !1, className: i = "", children: a, ...c }, d) {
|
|
1327
|
+
const l = o || n;
|
|
1328
|
+
return /* @__PURE__ */ m(
|
|
1329
|
+
"div",
|
|
1330
|
+
{
|
|
1331
|
+
ref: d,
|
|
1332
|
+
className: [
|
|
1333
|
+
"rounded-md shadow-md border border-border bg-bg-secondary",
|
|
1334
|
+
"flex flex-col overflow-hidden",
|
|
1335
|
+
i
|
|
1336
|
+
].filter(Boolean).join(" "),
|
|
1337
|
+
...c,
|
|
1338
|
+
children: [
|
|
1339
|
+
r && /* @__PURE__ */ e("div", { className: "px-lg py-md border-b border-border", children: /* @__PURE__ */ e("div", { className: "font-semibold text-body text-text-primary", children: r }) }),
|
|
1340
|
+
/* @__PURE__ */ e("div", { className: s ? "" : "p-lg", children: a }),
|
|
1341
|
+
l && /* @__PURE__ */ m("div", { className: "px-lg py-md border-t border-border flex items-center gap-3", children: [
|
|
1342
|
+
o && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: o }),
|
|
1343
|
+
n && /* @__PURE__ */ e("div", { className: "ml-auto flex items-center gap-2", children: n })
|
|
1344
|
+
] })
|
|
1345
|
+
]
|
|
1346
|
+
}
|
|
1347
|
+
);
|
|
1348
|
+
}), At = C(
|
|
1349
|
+
function({ items: r, layout: o = "horizontal", dividers: n = !0, className: s = "", ...i }, a) {
|
|
1350
|
+
const c = o === "horizontal";
|
|
1351
|
+
return /* @__PURE__ */ e(
|
|
1352
|
+
"dl",
|
|
1353
|
+
{
|
|
1354
|
+
ref: a,
|
|
1355
|
+
className: ["text-body", n && "divide-y divide-border", s].filter(Boolean).join(" "),
|
|
1356
|
+
...i,
|
|
1357
|
+
children: r.map((d, l) => /* @__PURE__ */ m(
|
|
1358
|
+
"div",
|
|
1359
|
+
{
|
|
1360
|
+
className: [
|
|
1361
|
+
"py-sm",
|
|
1362
|
+
c ? "flex flex-col sm:flex-row sm:gap-lg" : "flex flex-col gap-xs"
|
|
1363
|
+
].filter(Boolean).join(" "),
|
|
1364
|
+
children: [
|
|
1365
|
+
/* @__PURE__ */ e(
|
|
1366
|
+
"dt",
|
|
1367
|
+
{
|
|
1368
|
+
className: [
|
|
1369
|
+
"font-medium text-text-secondary text-small shrink-0",
|
|
1370
|
+
c && "sm:w-1/3"
|
|
1371
|
+
].filter(Boolean).join(" "),
|
|
1372
|
+
children: d.label
|
|
1373
|
+
}
|
|
1374
|
+
),
|
|
1375
|
+
/* @__PURE__ */ e("dd", { className: "text-text-primary", children: d.value })
|
|
1376
|
+
]
|
|
1377
|
+
},
|
|
1378
|
+
l
|
|
1379
|
+
))
|
|
1380
|
+
}
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1383
|
+
), Pt = C(function({ illustration: r, title: o, description: n, action: s, className: i = "", ...a }, c) {
|
|
1384
|
+
return /* @__PURE__ */ m(
|
|
1385
|
+
"div",
|
|
1386
|
+
{
|
|
1387
|
+
ref: c,
|
|
1388
|
+
className: [
|
|
1389
|
+
"flex flex-col items-center justify-center text-center py-2xl px-lg",
|
|
1390
|
+
i
|
|
1391
|
+
].filter(Boolean).join(" "),
|
|
1392
|
+
...a,
|
|
1393
|
+
children: [
|
|
1394
|
+
r && /* @__PURE__ */ e("div", { className: "mb-lg text-text-secondary", children: r }),
|
|
1395
|
+
/* @__PURE__ */ e("h3", { className: "text-h3 font-semibold text-text-primary", children: o }),
|
|
1396
|
+
n && /* @__PURE__ */ e("p", { className: "mt-xs text-body text-text-secondary max-w-[var(--container-md)]", children: n }),
|
|
1397
|
+
s && /* @__PURE__ */ e("div", { className: "mt-lg", children: s })
|
|
1398
|
+
]
|
|
1399
|
+
}
|
|
1400
|
+
);
|
|
1401
|
+
});
|
|
1402
|
+
function Qe({ active: t, direction: r }) {
|
|
1403
|
+
return t ? r === "asc" ? /* @__PURE__ */ e(Y, { size: 12, className: "ml-1 inline", "aria-hidden": !0 }) : /* @__PURE__ */ e(E, { size: 12, className: "ml-1 inline", "aria-hidden": !0 }) : /* @__PURE__ */ m("span", { className: "inline-flex flex-col ml-1 opacity-30", "aria-hidden": !0, children: [
|
|
1404
|
+
/* @__PURE__ */ e(Y, { size: 10 }),
|
|
1405
|
+
/* @__PURE__ */ e(E, { size: 10, className: "-mt-0.5" })
|
|
1406
|
+
] });
|
|
1407
|
+
}
|
|
1408
|
+
const Bt = C(function({
|
|
1409
|
+
columns: r,
|
|
1410
|
+
data: o,
|
|
1411
|
+
rowKey: n,
|
|
1412
|
+
striped: s = !1,
|
|
1413
|
+
sort: i,
|
|
1414
|
+
onSortChange: a,
|
|
1415
|
+
emptyContent: c,
|
|
1416
|
+
className: d = "",
|
|
1417
|
+
...l
|
|
1418
|
+
}, u) {
|
|
1419
|
+
const [b, g] = N(), f = i ?? b, y = k(
|
|
1420
|
+
(x) => {
|
|
1421
|
+
const h = f?.column === x && f.direction === "asc" ? { column: x, direction: "desc" } : { column: x, direction: "asc" };
|
|
1422
|
+
a ? a(h) : g(h);
|
|
1423
|
+
},
|
|
1424
|
+
[f, a]
|
|
1425
|
+
), p = o.length === 0;
|
|
1426
|
+
return /* @__PURE__ */ e(
|
|
1427
|
+
"div",
|
|
1428
|
+
{
|
|
1429
|
+
ref: u,
|
|
1430
|
+
className: ["overflow-x-auto rounded-md border border-border", d].filter(Boolean).join(" "),
|
|
1431
|
+
...l,
|
|
1432
|
+
children: /* @__PURE__ */ m("table", { className: "w-full text-body text-left", children: [
|
|
1433
|
+
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "bg-bg-secondary border-b border-border", children: r.map((x) => {
|
|
1434
|
+
const h = f?.column === x.key;
|
|
1435
|
+
return /* @__PURE__ */ e(
|
|
1436
|
+
"th",
|
|
1437
|
+
{
|
|
1438
|
+
className: [
|
|
1439
|
+
"px-md py-sm font-semibold text-small text-text-secondary whitespace-nowrap",
|
|
1440
|
+
x.sortable && "cursor-pointer select-none hover:text-text-primary",
|
|
1441
|
+
x.headerClassName
|
|
1442
|
+
].filter(Boolean).join(" "),
|
|
1443
|
+
onClick: x.sortable ? () => y(x.key) : void 0,
|
|
1444
|
+
"aria-sort": h ? f.direction === "asc" ? "ascending" : "descending" : x.sortable ? "none" : void 0,
|
|
1445
|
+
children: /* @__PURE__ */ m("span", { className: "inline-flex items-center", children: [
|
|
1446
|
+
x.header,
|
|
1447
|
+
x.sortable && /* @__PURE__ */ e(
|
|
1448
|
+
Qe,
|
|
1449
|
+
{
|
|
1450
|
+
active: h,
|
|
1451
|
+
direction: h ? f.direction : void 0
|
|
1452
|
+
}
|
|
1453
|
+
)
|
|
1454
|
+
] })
|
|
1455
|
+
},
|
|
1456
|
+
x.key
|
|
1457
|
+
);
|
|
1458
|
+
}) }) }),
|
|
1459
|
+
/* @__PURE__ */ e("tbody", { children: p ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e(
|
|
1460
|
+
"td",
|
|
1461
|
+
{
|
|
1462
|
+
colSpan: r.length,
|
|
1463
|
+
className: "px-md py-xl text-center text-text-secondary",
|
|
1464
|
+
children: c ?? "No data available."
|
|
1465
|
+
}
|
|
1466
|
+
) }) : o.map((x, h) => /* @__PURE__ */ e(
|
|
1467
|
+
"tr",
|
|
1468
|
+
{
|
|
1469
|
+
className: [
|
|
1470
|
+
"border-b border-border last:border-b-0 transition-colors",
|
|
1471
|
+
s && h % 2 === 1 && "bg-bg-tertiary/50",
|
|
1472
|
+
"hover:bg-bg-tertiary/70"
|
|
1473
|
+
].filter(Boolean).join(" "),
|
|
1474
|
+
children: r.map((w) => /* @__PURE__ */ e(
|
|
1475
|
+
"td",
|
|
1476
|
+
{
|
|
1477
|
+
className: [
|
|
1478
|
+
"px-md py-sm text-text-primary",
|
|
1479
|
+
w.cellClassName
|
|
1480
|
+
].filter(Boolean).join(" "),
|
|
1481
|
+
children: w.cell(x, h)
|
|
1482
|
+
},
|
|
1483
|
+
w.key
|
|
1484
|
+
))
|
|
1485
|
+
},
|
|
1486
|
+
n(x, h)
|
|
1487
|
+
)) })
|
|
1488
|
+
] })
|
|
1489
|
+
}
|
|
1490
|
+
);
|
|
1491
|
+
}), Ze = {
|
|
1492
|
+
success: {
|
|
1493
|
+
bg: "bg-success-bg",
|
|
1494
|
+
border: "border-success/30",
|
|
1495
|
+
text: "text-success",
|
|
1496
|
+
icon: ee
|
|
1497
|
+
},
|
|
1498
|
+
warning: {
|
|
1499
|
+
bg: "bg-warning-bg",
|
|
1500
|
+
border: "border-warning/30",
|
|
1501
|
+
text: "text-warning",
|
|
1502
|
+
icon: P
|
|
1503
|
+
},
|
|
1504
|
+
error: {
|
|
1505
|
+
bg: "bg-error-bg",
|
|
1506
|
+
border: "border-error/30",
|
|
1507
|
+
text: "text-error",
|
|
1508
|
+
icon: Z
|
|
1509
|
+
},
|
|
1510
|
+
info: {
|
|
1511
|
+
bg: "bg-info-bg",
|
|
1512
|
+
border: "border-info/30",
|
|
1513
|
+
text: "text-info",
|
|
1514
|
+
icon: Q
|
|
1515
|
+
}
|
|
1516
|
+
};
|
|
1517
|
+
function Lt({
|
|
1518
|
+
variant: t,
|
|
1519
|
+
title: r,
|
|
1520
|
+
children: o,
|
|
1521
|
+
dismissible: n = !1,
|
|
1522
|
+
onDismiss: s,
|
|
1523
|
+
className: i = ""
|
|
1524
|
+
}) {
|
|
1525
|
+
const [a, c] = N(!0), { bg: d, border: l, text: u, icon: b } = Ze[t];
|
|
1526
|
+
if (!a) return null;
|
|
1527
|
+
const g = () => {
|
|
1528
|
+
c(!1), s?.();
|
|
1529
|
+
};
|
|
1530
|
+
return /* @__PURE__ */ m(
|
|
1531
|
+
"div",
|
|
1532
|
+
{
|
|
1533
|
+
role: "alert",
|
|
1534
|
+
className: `flex gap-3 rounded-md border p-md ${d} ${l} ${i}`,
|
|
1535
|
+
children: [
|
|
1536
|
+
/* @__PURE__ */ e(b, { size: 20, className: `shrink-0 mt-0.5 ${u}`, "aria-hidden": !0 }),
|
|
1537
|
+
/* @__PURE__ */ m("div", { className: "flex-1 min-w-0", children: [
|
|
1538
|
+
r && /* @__PURE__ */ e("p", { className: `font-semibold text-body ${u}`, children: r }),
|
|
1539
|
+
/* @__PURE__ */ e("div", { className: "text-body text-text-primary", children: o })
|
|
1540
|
+
] }),
|
|
1541
|
+
n && /* @__PURE__ */ e(
|
|
1542
|
+
"button",
|
|
1543
|
+
{
|
|
1544
|
+
type: "button",
|
|
1545
|
+
onClick: g,
|
|
1546
|
+
className: "shrink-0 p-1 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
1547
|
+
"aria-label": "Dismiss alert",
|
|
1548
|
+
children: /* @__PURE__ */ e(B, { size: 16 })
|
|
1549
|
+
}
|
|
1550
|
+
)
|
|
1551
|
+
]
|
|
1552
|
+
}
|
|
1553
|
+
);
|
|
1554
|
+
}
|
|
1555
|
+
const et = {
|
|
1556
|
+
sm: "max-w-[24rem]",
|
|
1557
|
+
md: "max-w-[32rem]",
|
|
1558
|
+
lg: "max-w-[42rem]"
|
|
1559
|
+
};
|
|
1560
|
+
function tt({
|
|
1561
|
+
open: t,
|
|
1562
|
+
onClose: r,
|
|
1563
|
+
title: o,
|
|
1564
|
+
size: n = "md",
|
|
1565
|
+
children: s,
|
|
1566
|
+
footer: i,
|
|
1567
|
+
className: a = ""
|
|
1568
|
+
}) {
|
|
1569
|
+
const c = $(null);
|
|
1570
|
+
z(() => {
|
|
1571
|
+
if (!t) return;
|
|
1572
|
+
const l = document.activeElement;
|
|
1573
|
+
return c.current?.focus(), () => {
|
|
1574
|
+
l?.focus();
|
|
1575
|
+
};
|
|
1576
|
+
}, [t]), z(() => {
|
|
1577
|
+
if (!t) return;
|
|
1578
|
+
const l = document.body.style.overflow;
|
|
1579
|
+
return document.body.style.overflow = "hidden", () => {
|
|
1580
|
+
document.body.style.overflow = l;
|
|
1581
|
+
};
|
|
1582
|
+
}, [t]);
|
|
1583
|
+
const d = (l) => {
|
|
1584
|
+
if (l.key === "Escape") {
|
|
1585
|
+
r();
|
|
1586
|
+
return;
|
|
1587
|
+
}
|
|
1588
|
+
if (l.key === "Tab" && c.current) {
|
|
1589
|
+
const u = c.current.querySelectorAll(
|
|
1590
|
+
'a[href], button:not([disabled]), textarea, input:not([disabled]), select, [tabindex]:not([tabindex="-1"])'
|
|
1591
|
+
);
|
|
1592
|
+
if (u.length === 0) return;
|
|
1593
|
+
const b = u[0], g = u[u.length - 1];
|
|
1594
|
+
l.shiftKey && document.activeElement === b ? (l.preventDefault(), g.focus()) : !l.shiftKey && document.activeElement === g && (l.preventDefault(), b.focus());
|
|
1595
|
+
}
|
|
1596
|
+
};
|
|
1597
|
+
return t ? fe(
|
|
1598
|
+
/* @__PURE__ */ m(
|
|
1599
|
+
"div",
|
|
1600
|
+
{
|
|
1601
|
+
style: { position: "fixed", inset: 0, zIndex: 50, overflowY: "auto" },
|
|
1602
|
+
"aria-modal": "true",
|
|
1603
|
+
role: "dialog",
|
|
1604
|
+
"aria-labelledby": o ? "dialog-title" : void 0,
|
|
1605
|
+
onKeyDown: d,
|
|
1606
|
+
children: [
|
|
1607
|
+
/* @__PURE__ */ e(
|
|
1608
|
+
"div",
|
|
1609
|
+
{
|
|
1610
|
+
style: { position: "fixed", inset: 0 },
|
|
1611
|
+
className: "bg-black/50",
|
|
1612
|
+
"aria-hidden": !0,
|
|
1613
|
+
onClick: r
|
|
1614
|
+
}
|
|
1615
|
+
),
|
|
1616
|
+
/* @__PURE__ */ e(
|
|
1617
|
+
"div",
|
|
1618
|
+
{
|
|
1619
|
+
style: {
|
|
1620
|
+
display: "flex",
|
|
1621
|
+
minHeight: "100%",
|
|
1622
|
+
width: "100%",
|
|
1623
|
+
alignItems: "center",
|
|
1624
|
+
justifyContent: "center",
|
|
1625
|
+
padding: "var(--spacing-md, 16px)",
|
|
1626
|
+
boxSizing: "border-box"
|
|
1627
|
+
},
|
|
1628
|
+
children: /* @__PURE__ */ m(
|
|
1629
|
+
"div",
|
|
1630
|
+
{
|
|
1631
|
+
ref: c,
|
|
1632
|
+
tabIndex: -1,
|
|
1633
|
+
className: `relative z-10 flex flex-col w-full ${et[n]} rounded-lg border border-border bg-bg-primary shadow-xl outline-none animate-dialog-in ${a}`,
|
|
1634
|
+
children: [
|
|
1635
|
+
o && /* @__PURE__ */ m("div", { className: "flex items-center justify-between px-lg py-md border-b border-border", children: [
|
|
1636
|
+
/* @__PURE__ */ e(
|
|
1637
|
+
"h2",
|
|
1638
|
+
{
|
|
1639
|
+
id: "dialog-title",
|
|
1640
|
+
className: "text-h3 font-semibold text-text-primary",
|
|
1641
|
+
children: o
|
|
1642
|
+
}
|
|
1643
|
+
),
|
|
1644
|
+
/* @__PURE__ */ e(
|
|
1645
|
+
"button",
|
|
1646
|
+
{
|
|
1647
|
+
type: "button",
|
|
1648
|
+
onClick: r,
|
|
1649
|
+
className: "shrink-0 p-1 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
1650
|
+
"aria-label": "Close dialog",
|
|
1651
|
+
children: /* @__PURE__ */ e(B, { size: 18 })
|
|
1652
|
+
}
|
|
1653
|
+
)
|
|
1654
|
+
] }),
|
|
1655
|
+
/* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto px-lg py-md text-body text-text-primary", children: s }),
|
|
1656
|
+
i && /* @__PURE__ */ e("div", { className: "flex items-center justify-end gap-sm px-lg py-md border-t border-border", children: i })
|
|
1657
|
+
]
|
|
1658
|
+
}
|
|
1659
|
+
)
|
|
1660
|
+
}
|
|
1661
|
+
)
|
|
1662
|
+
]
|
|
1663
|
+
}
|
|
1664
|
+
),
|
|
1665
|
+
document.body
|
|
1666
|
+
) : null;
|
|
1667
|
+
}
|
|
1668
|
+
function Rt({
|
|
1669
|
+
open: t,
|
|
1670
|
+
onCancel: r,
|
|
1671
|
+
onConfirm: o,
|
|
1672
|
+
title: n,
|
|
1673
|
+
children: s,
|
|
1674
|
+
confirmLabel: i = "Confirm",
|
|
1675
|
+
cancelLabel: a = "Cancel",
|
|
1676
|
+
danger: c = !1,
|
|
1677
|
+
size: d = "sm"
|
|
1678
|
+
}) {
|
|
1679
|
+
return /* @__PURE__ */ m(tt, { open: t, onClose: r, title: n, size: d, children: [
|
|
1680
|
+
/* @__PURE__ */ m("div", { className: "flex gap-3", children: [
|
|
1681
|
+
c && /* @__PURE__ */ e(
|
|
1682
|
+
P,
|
|
1683
|
+
{
|
|
1684
|
+
size: 22,
|
|
1685
|
+
className: "shrink-0 mt-0.5 text-error",
|
|
1686
|
+
"aria-hidden": !0
|
|
1687
|
+
}
|
|
1688
|
+
),
|
|
1689
|
+
/* @__PURE__ */ e("div", { className: "text-body text-text-secondary", children: s })
|
|
1690
|
+
] }),
|
|
1691
|
+
/* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-sm mt-lg", children: [
|
|
1692
|
+
/* @__PURE__ */ e(
|
|
1693
|
+
"button",
|
|
1694
|
+
{
|
|
1695
|
+
type: "button",
|
|
1696
|
+
onClick: r,
|
|
1697
|
+
className: "px-4 py-2 rounded-md text-small font-medium text-text-primary bg-bg-secondary hover:bg-bg-tertiary border border-border transition-colors cursor-pointer",
|
|
1698
|
+
children: a
|
|
1699
|
+
}
|
|
1700
|
+
),
|
|
1701
|
+
/* @__PURE__ */ e(
|
|
1702
|
+
"button",
|
|
1703
|
+
{
|
|
1704
|
+
type: "button",
|
|
1705
|
+
onClick: o,
|
|
1706
|
+
className: `px-4 py-2 rounded-md text-small font-medium text-white transition-colors cursor-pointer ${c ? "bg-error hover:bg-error/80" : "bg-primary hover:bg-primary-hover"}`,
|
|
1707
|
+
children: i
|
|
1708
|
+
}
|
|
1709
|
+
)
|
|
1710
|
+
] })
|
|
1711
|
+
] });
|
|
1712
|
+
}
|
|
1713
|
+
const ae = D(null);
|
|
1714
|
+
function Tt() {
|
|
1715
|
+
const t = F(ae);
|
|
1716
|
+
if (!t) throw new Error("useToast must be used within a <ToastProvider>");
|
|
1717
|
+
return t;
|
|
1718
|
+
}
|
|
1719
|
+
const rt = {
|
|
1720
|
+
success: {
|
|
1721
|
+
bg: "bg-bg-primary",
|
|
1722
|
+
accent: "bg-success",
|
|
1723
|
+
text: "text-success",
|
|
1724
|
+
icon: ee
|
|
1725
|
+
},
|
|
1726
|
+
warning: {
|
|
1727
|
+
bg: "bg-bg-primary",
|
|
1728
|
+
accent: "bg-warning",
|
|
1729
|
+
text: "text-warning",
|
|
1730
|
+
icon: P
|
|
1731
|
+
},
|
|
1732
|
+
error: {
|
|
1733
|
+
bg: "bg-bg-primary",
|
|
1734
|
+
accent: "bg-error",
|
|
1735
|
+
text: "text-error",
|
|
1736
|
+
icon: Z
|
|
1737
|
+
},
|
|
1738
|
+
info: {
|
|
1739
|
+
bg: "bg-bg-primary",
|
|
1740
|
+
accent: "bg-info",
|
|
1741
|
+
text: "text-info",
|
|
1742
|
+
icon: Q
|
|
1743
|
+
}
|
|
1744
|
+
};
|
|
1745
|
+
function nt({ toast: t, onRemove: r }) {
|
|
1746
|
+
const { variant: o, title: n, message: s, duration: i = 5e3 } = t, { bg: a, accent: c, text: d, icon: l } = rt[o], [u, b] = N(100), g = $(0), f = $(0);
|
|
1747
|
+
return z(() => {
|
|
1748
|
+
if (i <= 0) return;
|
|
1749
|
+
g.current = performance.now();
|
|
1750
|
+
const y = (p) => {
|
|
1751
|
+
const x = p - g.current, h = Math.max(0, 100 - x / i * 100);
|
|
1752
|
+
if (b(h), h <= 0) {
|
|
1753
|
+
r(t.id);
|
|
1754
|
+
return;
|
|
1755
|
+
}
|
|
1756
|
+
f.current = requestAnimationFrame(y);
|
|
1757
|
+
};
|
|
1758
|
+
return f.current = requestAnimationFrame(y), () => cancelAnimationFrame(f.current);
|
|
1759
|
+
}, [i, t.id, r]), /* @__PURE__ */ m(
|
|
1760
|
+
"div",
|
|
1761
|
+
{
|
|
1762
|
+
role: "status",
|
|
1763
|
+
"aria-live": "polite",
|
|
1764
|
+
className: `relative overflow-hidden rounded-lg border border-border shadow-lg ${a} w-80 animate-slide-in`,
|
|
1765
|
+
children: [
|
|
1766
|
+
/* @__PURE__ */ m("div", { className: "flex gap-3 p-md", children: [
|
|
1767
|
+
/* @__PURE__ */ e(l, { size: 18, className: `shrink-0 mt-0.5 ${d}`, "aria-hidden": !0 }),
|
|
1768
|
+
/* @__PURE__ */ m("div", { className: "flex-1 min-w-0", children: [
|
|
1769
|
+
n && /* @__PURE__ */ e("p", { className: "font-semibold text-small text-text-primary", children: n }),
|
|
1770
|
+
/* @__PURE__ */ e("p", { className: "text-small text-text-secondary", children: s })
|
|
1771
|
+
] }),
|
|
1772
|
+
/* @__PURE__ */ e(
|
|
1773
|
+
"button",
|
|
1774
|
+
{
|
|
1775
|
+
type: "button",
|
|
1776
|
+
onClick: () => r(t.id),
|
|
1777
|
+
className: "shrink-0 p-1 rounded-sm text-text-secondary hover:text-text-primary hover:bg-bg-tertiary transition-colors cursor-pointer",
|
|
1778
|
+
"aria-label": "Dismiss notification",
|
|
1779
|
+
children: /* @__PURE__ */ e(B, { size: 14 })
|
|
1780
|
+
}
|
|
1781
|
+
)
|
|
1782
|
+
] }),
|
|
1783
|
+
i > 0 && /* @__PURE__ */ e("div", { className: "h-0.5 w-full bg-bg-tertiary", children: /* @__PURE__ */ e(
|
|
1784
|
+
"div",
|
|
1785
|
+
{
|
|
1786
|
+
className: `h-full ${c} transition-none`,
|
|
1787
|
+
style: { width: `${u}%` }
|
|
1788
|
+
}
|
|
1789
|
+
) })
|
|
1790
|
+
]
|
|
1791
|
+
}
|
|
1792
|
+
);
|
|
1793
|
+
}
|
|
1794
|
+
let ot = 0;
|
|
1795
|
+
function Mt({ children: t }) {
|
|
1796
|
+
const [r, o] = N([]), n = k((i) => {
|
|
1797
|
+
const a = `toast-${++ot}`;
|
|
1798
|
+
return o((c) => [...c, { ...i, id: a }]), a;
|
|
1799
|
+
}, []), s = k((i) => {
|
|
1800
|
+
o((a) => a.filter((c) => c.id !== i));
|
|
1801
|
+
}, []);
|
|
1802
|
+
return /* @__PURE__ */ m(ae, { value: { addToast: n, removeToast: s }, children: [
|
|
1803
|
+
t,
|
|
1804
|
+
/* @__PURE__ */ e(
|
|
1805
|
+
"div",
|
|
1806
|
+
{
|
|
1807
|
+
"aria-label": "Notifications",
|
|
1808
|
+
className: "fixed bottom-lg right-lg z-50 flex flex-col-reverse gap-sm pointer-events-none",
|
|
1809
|
+
children: r.map((i) => /* @__PURE__ */ e("div", { className: "pointer-events-auto", children: /* @__PURE__ */ e(nt, { toast: i, onRemove: s }) }, i.id))
|
|
1810
|
+
}
|
|
1811
|
+
)
|
|
1812
|
+
] });
|
|
1813
|
+
}
|
|
1814
|
+
const le = D(null), it = {
|
|
1815
|
+
name: "Alice Martin",
|
|
1816
|
+
email: "alice.martin@epfl.ch",
|
|
1817
|
+
role: "admin"
|
|
1818
|
+
};
|
|
1819
|
+
function Ot({ initialUser: t = it, children: r }) {
|
|
1820
|
+
const [o, n] = N(t), s = (a) => n((c) => ({ ...c, role: a })), i = de(() => ({ user: o, setRole: s }), [o]);
|
|
1821
|
+
return /* @__PURE__ */ e(le.Provider, { value: i, children: r });
|
|
1822
|
+
}
|
|
1823
|
+
function Ut() {
|
|
1824
|
+
const t = F(le);
|
|
1825
|
+
if (!t) throw new Error("useAuth must be used within an AuthProvider");
|
|
1826
|
+
return t;
|
|
1827
|
+
}
|
|
1828
|
+
export {
|
|
1829
|
+
Lt as Alert,
|
|
1830
|
+
Ot as AuthProvider,
|
|
1831
|
+
bt as Avatar,
|
|
1832
|
+
pt as Badge,
|
|
1833
|
+
We as BurgerDrawer,
|
|
1834
|
+
ft as Button,
|
|
1835
|
+
St as Card,
|
|
1836
|
+
xt as Checkbox,
|
|
1837
|
+
Rt as ConfirmDialog,
|
|
1838
|
+
At as DescriptionList,
|
|
1839
|
+
tt as Dialog,
|
|
1840
|
+
wt as DropdownDivider,
|
|
1841
|
+
Nt as DropdownItem,
|
|
1842
|
+
kt as DropdownMenu,
|
|
1843
|
+
Pt as EmptyState,
|
|
1844
|
+
Ee as IconButton,
|
|
1845
|
+
gt as Input,
|
|
1846
|
+
jt as LanguageSwitcher,
|
|
1847
|
+
Et as PageShell,
|
|
1848
|
+
Ct as Popover,
|
|
1849
|
+
Le as RadioGroup,
|
|
1850
|
+
ht as Select,
|
|
1851
|
+
Ye as SideNav,
|
|
1852
|
+
ne as Spinner,
|
|
1853
|
+
yt as Switch,
|
|
1854
|
+
zt as TabPanel,
|
|
1855
|
+
Bt as Table,
|
|
1856
|
+
$t as Tabs,
|
|
1857
|
+
vt as Textarea,
|
|
1858
|
+
Ft as ThemeToggle,
|
|
1859
|
+
Mt as ToastProvider,
|
|
1860
|
+
It as Tooltip,
|
|
1861
|
+
Xe as TopNav,
|
|
1862
|
+
W as epflSelectClassNames,
|
|
1863
|
+
Te as epflSelectTheme,
|
|
1864
|
+
Dt as initTheme,
|
|
1865
|
+
Ut as useAuth,
|
|
1866
|
+
Oe as useLanguage,
|
|
1867
|
+
Ge as useTheme,
|
|
1868
|
+
Tt as useToast
|
|
1869
|
+
};
|
|
1870
|
+
//# sourceMappingURL=poesis.js.map
|