@editora/ui-core 0.2.2 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ElementBase-DxbvhLJs.js → ElementBase-CbUsP3D6.js} +1 -1
- package/dist/{ElementBase-BeZT54Hj.mjs → ElementBase-D5QsC5Vw.mjs} +10 -1
- package/dist/ElementBase.d.ts +7 -0
- package/dist/ElementBase.d.ts.map +1 -1
- package/dist/accordion.cjs.js +1 -1
- package/dist/accordion.esm.js +1 -1
- package/dist/add-icons-CVeHOsWl.js +1 -0
- package/dist/add-icons-DBUZJ0g7.mjs +14 -0
- package/dist/add-icons.cjs.js +1 -0
- package/dist/add-icons.d.ts +16 -0
- package/dist/add-icons.d.ts.map +1 -0
- package/dist/add-icons.esm.js +4 -0
- package/dist/alert-dialog.cjs.js +24 -24
- package/dist/alert-dialog.esm.js +112 -107
- package/dist/alert.cjs.js +8 -8
- package/dist/alert.esm.js +22 -22
- package/dist/animated-beam.cjs.js +1 -1
- package/dist/animated-beam.esm.js +1 -1
- package/dist/animated-list.cjs.js +1 -1
- package/dist/animated-list.esm.js +1 -1
- package/dist/animated-text.cjs.js +1 -1
- package/dist/animated-text.esm.js +1 -1
- package/dist/app-header.cjs.js +15 -3
- package/dist/app-header.esm.js +31 -4
- package/dist/aspect-ratio.cjs.js +1 -1
- package/dist/aspect-ratio.esm.js +1 -1
- package/dist/avatar.cjs.js +1 -1
- package/dist/avatar.esm.js +1 -1
- package/dist/badge.cjs.js +1 -1
- package/dist/badge.esm.js +1 -1
- package/dist/block-controls.cjs.js +1 -1
- package/dist/block-controls.esm.js +1 -1
- package/dist/box.cjs.js +1 -1
- package/dist/box.esm.js +1 -1
- package/dist/breadcrumb.cjs.js +4 -4
- package/dist/breadcrumb.esm.js +93 -84
- package/dist/button.cjs.js +520 -1
- package/dist/button.esm.js +682 -2
- package/dist/{calendar-CzpWDxLc.js → calendar-BsVqtpjM.js} +6 -6
- package/dist/{calendar-DkSDFg33.mjs → calendar-CFafqZVA.mjs} +6 -6
- package/dist/calendar.cjs.js +1 -1
- package/dist/calendar.esm.js +1 -1
- package/dist/card.cjs.js +6 -5
- package/dist/card.esm.js +52 -39
- package/dist/chart.cjs.js +2 -2
- package/dist/chart.esm.js +2 -2
- package/dist/checkbox.cjs.js +4 -4
- package/dist/checkbox.esm.js +36 -15
- package/dist/clone-source-BxK2pEVw.mjs +11 -0
- package/dist/clone-source-C7E_ri5f.js +1 -0
- package/dist/collapsible.cjs.js +1 -1
- package/dist/collapsible.esm.js +1 -1
- package/dist/color-picker.cjs.js +2 -2
- package/dist/color-picker.esm.js +3 -3
- package/dist/combobox.cjs.js +4 -4
- package/dist/combobox.esm.js +22 -19
- package/dist/command-palette.cjs.js +1 -1
- package/dist/command-palette.esm.js +1 -1
- package/dist/command.cjs.js +1 -1
- package/dist/command.esm.js +1 -1
- package/dist/components/ui-alert-dialog.d.ts.map +1 -1
- package/dist/components/ui-alert.d.ts.map +1 -1
- package/dist/components/ui-app-header.d.ts +1 -0
- package/dist/components/ui-app-header.d.ts.map +1 -1
- package/dist/components/ui-breadcrumb.d.ts.map +1 -1
- package/dist/components/ui-card.d.ts +7 -0
- package/dist/components/ui-card.d.ts.map +1 -1
- package/dist/components/ui-checkbox.d.ts +6 -0
- package/dist/components/ui-checkbox.d.ts.map +1 -1
- package/dist/components/ui-combobox.d.ts.map +1 -1
- package/dist/components/ui-date-time-picker.d.ts.map +1 -1
- package/dist/components/ui-dialog.d.ts +1 -0
- package/dist/components/ui-dialog.d.ts.map +1 -1
- package/dist/components/ui-drawer.d.ts.map +1 -1
- package/dist/components/ui-dropdown.d.ts.map +1 -1
- package/dist/components/ui-empty-state.d.ts.map +1 -1
- package/dist/components/ui-hover-card.d.ts.map +1 -1
- package/dist/components/ui-icon.d.ts +1 -0
- package/dist/components/ui-icon.d.ts.map +1 -1
- package/dist/components/ui-input.d.ts +16 -0
- package/dist/components/ui-input.d.ts.map +1 -1
- package/dist/components/ui-layout.d.ts +20 -0
- package/dist/components/ui-layout.d.ts.map +1 -1
- package/dist/components/ui-menu.d.ts +1 -0
- package/dist/components/ui-menu.d.ts.map +1 -1
- package/dist/components/ui-menubar.d.ts.map +1 -1
- package/dist/components/ui-multi-select.d.ts +6 -0
- package/dist/components/ui-multi-select.d.ts.map +1 -1
- package/dist/components/ui-number-field.d.ts +6 -0
- package/dist/components/ui-number-field.d.ts.map +1 -1
- package/dist/components/ui-pagination.d.ts.map +1 -1
- package/dist/components/ui-password-field.d.ts +11 -0
- package/dist/components/ui-password-field.d.ts.map +1 -1
- package/dist/components/ui-popover.d.ts.map +1 -1
- package/dist/components/ui-positioner.d.ts.map +1 -1
- package/dist/components/ui-radio-group.d.ts +6 -0
- package/dist/components/ui-radio-group.d.ts.map +1 -1
- package/dist/components/ui-rating.d.ts +1 -0
- package/dist/components/ui-rating.d.ts.map +1 -1
- package/dist/components/ui-select.d.ts +7 -0
- package/dist/components/ui-select.d.ts.map +1 -1
- package/dist/components/ui-sidebar.d.ts +1 -0
- package/dist/components/ui-sidebar.d.ts.map +1 -1
- package/dist/components/ui-slider.d.ts +6 -0
- package/dist/components/ui-slider.d.ts.map +1 -1
- package/dist/components/ui-sortable.d.ts +1 -0
- package/dist/components/ui-sortable.d.ts.map +1 -1
- package/dist/components/ui-switch.d.ts +6 -0
- package/dist/components/ui-switch.d.ts.map +1 -1
- package/dist/components/ui-tabs.d.ts +2 -0
- package/dist/components/ui-tabs.d.ts.map +1 -1
- package/dist/components/ui-textarea.d.ts +6 -0
- package/dist/components/ui-textarea.d.ts.map +1 -1
- package/dist/components/ui-toast.d.ts.map +1 -1
- package/dist/components/ui-tooltip.d.ts.map +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/context-menu.cjs.js +2 -2
- package/dist/context-menu.esm.js +2 -2
- package/dist/control-group.cjs.js +1 -1
- package/dist/control-group.esm.js +1 -1
- package/dist/data-table.cjs.js +5 -5
- package/dist/data-table.esm.js +7 -7
- package/dist/date-field.cjs.js +1 -1
- package/dist/date-field.esm.js +3 -3
- package/dist/date-picker.cjs.js +2 -2
- package/dist/date-picker.esm.js +17 -17
- package/dist/date-range-picker.cjs.js +2 -2
- package/dist/date-range-picker.esm.js +4 -4
- package/dist/date-range-time-picker.cjs.js +3 -3
- package/dist/date-range-time-picker.esm.js +16 -16
- package/dist/date-time-picker.cjs.js +26 -23
- package/dist/date-time-picker.esm.js +49 -46
- package/dist/{date-time-utils-zAx4ghvC.mjs → date-time-utils-CJUksWj3.mjs} +1 -1
- package/dist/{date-time-utils-C-4eHTyy.js → date-time-utils-D3hQQ5Om.js} +1 -1
- package/dist/description.cjs.js +1 -1
- package/dist/description.esm.js +1 -1
- package/dist/dialog.cjs.js +7 -7
- package/dist/dialog.esm.js +51 -47
- package/dist/direction-provider.cjs.js +1 -1
- package/dist/direction-provider.esm.js +1 -1
- package/dist/dismissable-layer.cjs.js +1 -1
- package/dist/dismissable-layer.esm.js +1 -1
- package/dist/dock.cjs.js +1 -1
- package/dist/dock.esm.js +1 -1
- package/dist/drawer.cjs.js +5 -5
- package/dist/drawer.esm.js +18 -17
- package/dist/dropdown.cjs.js +7 -7
- package/dist/dropdown.esm.js +39 -38
- package/dist/empty-state.cjs.js +12 -2
- package/dist/empty-state.esm.js +17 -7
- package/dist/field-error.cjs.js +1 -1
- package/dist/field-error.esm.js +1 -1
- package/dist/field.cjs.js +2 -2
- package/dist/field.esm.js +2 -2
- package/dist/fieldset.cjs.js +1 -1
- package/dist/fieldset.esm.js +1 -1
- package/dist/file-upload.cjs.js +1 -1
- package/dist/file-upload.esm.js +1 -1
- package/dist/flex.cjs.js +1 -1
- package/dist/flex.esm.js +1 -1
- package/dist/floating-toolbar.cjs.js +2 -2
- package/dist/floating-toolbar.esm.js +2 -2
- package/dist/focus-scope-Dl0qk5GP.mjs +177 -0
- package/dist/focus-scope-Doz0bnE1.js +1 -0
- package/dist/focus-scope.cjs.js +1 -1
- package/dist/focus-scope.esm.js +2 -2
- package/dist/form-control-B90_3kYN.js +1 -0
- package/dist/form-control-D9wWUMBl.mjs +86 -0
- package/dist/form.cjs.js +2 -2
- package/dist/form.esm.js +2 -2
- package/dist/gantt.cjs.js +2 -2
- package/dist/gantt.esm.js +2 -2
- package/dist/grid.cjs.js +1 -1
- package/dist/grid.esm.js +1 -1
- package/dist/hover-card.cjs.js +5 -5
- package/dist/hover-card.esm.js +19 -18
- package/dist/icon-cloud.cjs.js +1 -1
- package/dist/icon-cloud.esm.js +1 -1
- package/dist/icon.cjs.js +207 -1
- package/dist/icon.esm.js +294 -2
- package/dist/icons-CpCpPXV5.js +1 -0
- package/dist/icons-DWYbbhb0.mjs +115 -0
- package/dist/icons.d.ts +11 -1
- package/dist/icons.d.ts.map +1 -1
- package/dist/implicit-submit-B6M5Uc56.js +1 -0
- package/dist/implicit-submit-Lr0-q2LR.mjs +44 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +309 -299
- package/dist/inline-edit.cjs.js +1 -1
- package/dist/inline-edit.esm.js +1 -1
- package/dist/input.cjs.js +62 -20
- package/dist/input.esm.js +164 -58
- package/dist/label.cjs.js +1 -1
- package/dist/label.esm.js +1 -1
- package/dist/layout.cjs.js +145 -4
- package/dist/layout.esm.js +278 -40
- package/dist/marquee.cjs.js +1 -1
- package/dist/marquee.esm.js +1 -1
- package/dist/masonry-grid.cjs.js +1 -1
- package/dist/masonry-grid.esm.js +1 -1
- package/dist/menu.cjs.js +8 -8
- package/dist/menu.esm.js +51 -47
- package/dist/menubar.cjs.js +9 -9
- package/dist/menubar.esm.js +41 -40
- package/dist/meter.cjs.js +1 -1
- package/dist/meter.esm.js +1 -1
- package/dist/multi-select.cjs.js +7 -7
- package/dist/multi-select.esm.js +55 -34
- package/dist/navigate-CXebafwF.mjs +18 -0
- package/dist/navigate-ChJVIIuS.js +1 -0
- package/dist/navigation-menu.cjs.js +1 -1
- package/dist/navigation-menu.esm.js +1 -1
- package/dist/number-attribute-BAF07JrU.mjs +8 -0
- package/dist/number-attribute-C4Rrl7d3.js +1 -0
- package/dist/number-field.cjs.js +8 -8
- package/dist/number-field.esm.js +90 -69
- package/dist/number-ticker.cjs.js +1 -1
- package/dist/number-ticker.esm.js +1 -1
- package/dist/odometer.cjs.js +1 -1
- package/dist/odometer.esm.js +1 -1
- package/dist/orbiter.cjs.js +1 -1
- package/dist/orbiter.esm.js +1 -1
- package/dist/pagination.cjs.js +24 -23
- package/dist/pagination.esm.js +61 -46
- package/dist/{panel-group-BVHJEdfx.js → panel-group-BIzzpQ5i.js} +1 -1
- package/dist/{panel-group-BxO_eNW6.mjs → panel-group-CFLjzRWI.mjs} +1 -1
- package/dist/panel-group.cjs.js +1 -1
- package/dist/panel-group.esm.js +1 -1
- package/dist/panel.cjs.js +1 -1
- package/dist/panel.esm.js +1 -1
- package/dist/password-field.cjs.js +36 -16
- package/dist/password-field.esm.js +113 -44
- package/dist/pin-input.cjs.js +1 -1
- package/dist/pin-input.esm.js +1 -1
- package/dist/placement-grid.cjs.js +1 -1
- package/dist/placement-grid.esm.js +1 -1
- package/dist/plugin-panel.cjs.js +1 -1
- package/dist/plugin-panel.esm.js +1 -1
- package/dist/popover.cjs.js +2 -2
- package/dist/popover.esm.js +28 -26
- package/dist/portal.cjs.js +1 -1
- package/dist/portal.esm.js +1 -1
- package/dist/positioner.cjs.js +2 -2
- package/dist/positioner.esm.js +35 -38
- package/dist/preload.cjs.js +221 -0
- package/dist/preload.css +220 -0
- package/dist/preload.d.ts +17 -0
- package/dist/preload.d.ts.map +1 -0
- package/dist/preload.esm.js +224 -0
- package/dist/presence.cjs.js +1 -1
- package/dist/presence.esm.js +1 -1
- package/dist/primitives/clone-source.d.ts +3 -0
- package/dist/primitives/clone-source.d.ts.map +1 -0
- package/dist/primitives/focus-scope.d.ts +6 -0
- package/dist/primitives/focus-scope.d.ts.map +1 -1
- package/dist/primitives/form-control.d.ts +68 -0
- package/dist/primitives/form-control.d.ts.map +1 -0
- package/dist/primitives/implicit-submit.d.ts +17 -0
- package/dist/primitives/implicit-submit.d.ts.map +1 -0
- package/dist/primitives/navigate.d.ts +27 -0
- package/dist/primitives/navigate.d.ts.map +1 -0
- package/dist/primitives/number-attribute.d.ts +7 -0
- package/dist/primitives/number-attribute.d.ts.map +1 -0
- package/dist/primitives/slotted-input.d.ts +19 -0
- package/dist/primitives/slotted-input.d.ts.map +1 -0
- package/dist/progress.cjs.js +3 -3
- package/dist/progress.esm.js +3 -3
- package/dist/quick-actions.cjs.js +5 -5
- package/dist/quick-actions.esm.js +3 -3
- package/dist/radio-group.cjs.js +9 -9
- package/dist/radio-group.esm.js +47 -24
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +1 -1
- package/dist/rating.cjs.js +6 -6
- package/dist/rating.esm.js +21 -10
- package/dist/{runtime-CJzoaC8Z.mjs → runtime-CORXjP7e.mjs} +366 -352
- package/dist/runtime-uCly3ECd.js +5 -0
- package/dist/runtime.cjs.js +1 -1
- package/dist/runtime.esm.js +1 -1
- package/dist/scroll-area.cjs.js +1 -1
- package/dist/scroll-area.esm.js +1 -1
- package/dist/section.cjs.js +1 -1
- package/dist/section.esm.js +1 -1
- package/dist/select.cjs.js +21 -21
- package/dist/select.esm.js +111 -71
- package/dist/selection-popup.cjs.js +2 -2
- package/dist/selection-popup.esm.js +2 -2
- package/dist/semantic-tokens.d.ts.map +1 -1
- package/dist/separator.cjs.js +1 -1
- package/dist/separator.esm.js +1 -1
- package/dist/sidebar.cjs.js +15 -15
- package/dist/sidebar.esm.js +48 -42
- package/dist/skeleton.cjs.js +1 -1
- package/dist/skeleton.esm.js +1 -1
- package/dist/slider.cjs.js +11 -11
- package/dist/slider.esm.js +40 -23
- package/dist/slot.cjs.js +1 -1
- package/dist/slot.esm.js +1 -1
- package/dist/slotted-input-BVq2QQg2.js +1 -0
- package/dist/slotted-input-atWznLfm.mjs +13 -0
- package/dist/sortable.cjs.js +25 -25
- package/dist/sortable.esm.js +29 -21
- package/dist/spinning-text.cjs.js +1 -1
- package/dist/spinning-text.esm.js +1 -1
- package/dist/split-button.cjs.js +1 -1
- package/dist/split-button.esm.js +1 -1
- package/dist/splitter.cjs.js +1 -1
- package/dist/splitter.esm.js +1 -1
- package/dist/standalone/add-icons.d.ts +2 -0
- package/dist/standalone/add-icons.d.ts.map +1 -0
- package/dist/standalone/preload.d.ts +2 -0
- package/dist/standalone/preload.d.ts.map +1 -0
- package/dist/stepper.cjs.js +3 -3
- package/dist/stepper.esm.js +3 -3
- package/dist/switch.cjs.js +9 -9
- package/dist/switch.esm.js +56 -35
- package/dist/table.cjs.js +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/tabs.cjs.js +14 -14
- package/dist/tabs.esm.js +129 -115
- package/dist/tags-input.cjs.js +1 -1
- package/dist/tags-input.esm.js +1 -1
- package/dist/textarea.cjs.js +33 -11
- package/dist/textarea.esm.js +74 -35
- package/dist/theme.d.ts +6 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/time-field.cjs.js +1 -1
- package/dist/time-field.esm.js +2 -2
- package/dist/time-picker.cjs.js +1 -1
- package/dist/time-picker.esm.js +3 -3
- package/dist/timeline.cjs.js +2 -2
- package/dist/timeline.esm.js +2 -2
- package/dist/toast.cjs.js +4 -4
- package/dist/toast.esm.js +17 -16
- package/dist/toggle-group.cjs.js +1 -1
- package/dist/toggle-group.esm.js +1 -1
- package/dist/toggle.cjs.js +3 -3
- package/dist/toggle.esm.js +9 -9
- package/dist/toolbar.cjs.js +1 -1
- package/dist/toolbar.esm.js +1 -1
- package/dist/tooltip.cjs.js +2 -2
- package/dist/tooltip.esm.js +12 -14
- package/dist/transfer-list.cjs.js +1 -1
- package/dist/transfer-list.esm.js +1 -1
- package/dist/{tree-33fVNnaf.mjs → tree-CD2k2lIC.mjs} +1 -1
- package/dist/{tree-Dc02MChE.js → tree-ChQfhxya.js} +1 -1
- package/dist/tree-item.cjs.js +1 -1
- package/dist/tree-item.esm.js +1 -1
- package/dist/tree.cjs.js +1 -1
- package/dist/tree.esm.js +1 -1
- package/dist/visually-hidden.cjs.js +1 -1
- package/dist/visually-hidden.esm.js +1 -1
- package/dist/wizard.cjs.js +4 -4
- package/dist/wizard.esm.js +4 -4
- package/package.json +3 -2
- package/dist/focus-scope-Bwug2gDv.js +0 -1
- package/dist/focus-scope-CmEsG5UZ.mjs +0 -138
- package/dist/runtime-DYSIU3sR.js +0 -5
- package/dist/ui-button-C3OmI7Sn.mjs +0 -684
- package/dist/ui-button-CnLwXBnx.js +0 -520
- package/dist/ui-icon-D3avtxX_.js +0 -207
- package/dist/ui-icon-DLhB08Fo.mjs +0 -361
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const Oe=require("./ElementBase-
|
|
1
|
+
"use strict";const Oe=require("./ElementBase-CbUsP3D6.js"),Pe={calendarLabel:"Calendar",today:"Today",clear:"Clear",apply:"Apply",cancel:"Cancel",now:"Now",previousMonth:"Previous month",nextMonth:"Next month",chooseMonthYear:"Choose month and year",previousYear:"Previous year",nextYear:"Next year",syncingSchedule:"Syncing schedule...",unableToSyncEvents:"Unable to sync events",scheduleSynced:"Schedule synced",event:"Event",selectDate:"Select date",selectDateRange:"Select date range",startDate:"Start date",endDate:"End date",startEnd:"Start — End",toggleCalendar:"Toggle calendar",clearDate:"Clear date",clearDateRange:"Clear date range",invalidDate:"Invalid date",dateOutOfRange:"Date is outside the allowed range",invalidRange:"Invalid range",invalidTime:"Invalid time",invalidDateTime:"Invalid date-time",invalidRangeOrder:"Invalid range order",rangeIncomplete:"Range is incomplete",last7Days:"Last 7 days",thisMonth:"This month",hour:"Hour",minute:"Minute",second:"Second",meridiem:"Meridiem",am:"AM",pm:"PM",startTime:"Start time",endTime:"End time",datePickerPanel:"Date picker panel",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"Start — End"},Le={calendarLabel:"日历",today:"今天",clear:"清除",apply:"应用",cancel:"取消",now:"现在",previousMonth:"上个月",nextMonth:"下个月",chooseMonthYear:"选择月份和年份",previousYear:"上一年",nextYear:"下一年",syncingSchedule:"正在同步日程...",unableToSyncEvents:"无法同步事件",scheduleSynced:"日程已同步",event:"事件",selectDate:"选择日期",selectDateRange:"选择日期范围",startDate:"开始日期",endDate:"结束日期",startEnd:"开始 — 结束",toggleCalendar:"切换日历",clearDate:"清除日期",clearDateRange:"清除日期范围",invalidDate:"日期无效",dateOutOfRange:"日期超出允许范围",invalidRange:"范围无效",invalidTime:"时间无效",invalidDateTime:"日期时间无效",invalidRangeOrder:"范围顺序无效",rangeIncomplete:"范围不完整",last7Days:"最近7天",thisMonth:"本月",hour:"小时",minute:"分钟",second:"秒",meridiem:"上午/下午",am:"上午",pm:"下午",startTime:"开始时间",endTime:"结束时间",datePickerPanel:"日期选择面板",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"开始 — 结束"},Be={calendarLabel:"Calendrier",today:"Aujourd'hui",clear:"Effacer",apply:"Appliquer",cancel:"Annuler",now:"Maintenant",previousMonth:"Mois precedent",nextMonth:"Mois suivant",chooseMonthYear:"Choisir le mois et l annee",previousYear:"Annee precedente",nextYear:"Annee suivante",syncingSchedule:"Synchronisation du planning...",unableToSyncEvents:"Impossible de synchroniser les evenements",scheduleSynced:"Planning synchronise",event:"Evenement",selectDate:"Selectionner une date",selectDateRange:"Selectionner une periode",startDate:"Date de debut",endDate:"Date de fin",startEnd:"Debut — Fin",toggleCalendar:"Afficher le calendrier",clearDate:"Effacer la date",clearDateRange:"Effacer la periode",invalidDate:"Date invalide",dateOutOfRange:"La date est hors de la plage autorisee",invalidRange:"Periode invalide",invalidTime:"Heure invalide",invalidDateTime:"Date/heure invalide",invalidRangeOrder:"Ordre de periode invalide",rangeIncomplete:"Periode incomplete",last7Days:"7 derniers jours",thisMonth:"Ce mois-ci",hour:"Heure",minute:"Minute",second:"Seconde",meridiem:"AM/PM",am:"AM",pm:"PM",startTime:"Heure de debut",endTime:"Heure de fin",datePickerPanel:"Panneau de selection de date",timePlaceholder:"HH:mm",timePlaceholderSeconds:"HH:mm:ss",dateTimePlaceholder:"YYYY-MM-DD HH:mm",dateRangeTimePlaceholder:"Debut — Fin"},Fe={en:Pe,zh:Le,fr:Be},oe=new Map;function Ue(r){return r.trim().toLowerCase().replace(/_/g,"-")}function He(r){const e=r||(typeof navigator<"u"&&navigator.language?navigator.language:"en"),t=Ue(e||"");return t==="zh"||t.startsWith("zh-")||t==="cn"||t==="chinese"||t==="zh-cn"||t==="zh-hans"||t==="zh-hant"?"zh":t==="fr"||t.startsWith("fr-")||t==="french"?"fr":"en"}function le(r){if(!r||typeof r!="object"||Array.isArray(r))return{};const e={};return Object.entries(r).forEach(([t,n])=>{typeof n=="string"&&(e[t]=n)}),e}function Ne(r,e){if(!r)return{};try{const t=JSON.parse(r);if(!t||typeof t!="object"||Array.isArray(t))return{};const n=le(t),a=le(t[e]);return{...n,...a}}catch{return{}}}function fe(r,e){const t=He(r),n=`${t}::${e||""}`,a=oe.get(n);if(a)return a;const i=Fe[t],s=Ne(e,t),l={...i,...s};return oe.set(n,l),l}const Ye=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-calendar-bg: var(--color-panel-solid, var(--ui-color-surface, #ffffff));
|
|
4
4
|
--ui-calendar-border: var(--ui-color-line-subtle, color-mix(in srgb, var(--ui-color-border, #cbd5e1) 74%, transparent));
|
|
@@ -552,12 +552,12 @@
|
|
|
552
552
|
--ui-calendar-border: #334155;
|
|
553
553
|
--ui-calendar-text: #e2e8f0;
|
|
554
554
|
--ui-calendar-muted: #93a4bd;
|
|
555
|
-
--ui-calendar-accent: #93c5fd;
|
|
555
|
+
--ui-calendar-accent: var(--ui-color-accent-on-dark, #93c5fd);
|
|
556
556
|
--ui-calendar-shadow: 0 16px 38px rgba(2, 6, 23, 0.5);
|
|
557
|
-
--ui-calendar-selected-bg: color-mix(in srgb, #93c5fd 22%, transparent);
|
|
558
|
-
--ui-calendar-selected-border: color-mix(in srgb, #93c5fd 72%, transparent);
|
|
559
|
-
--ui-calendar-range-bg: color-mix(in srgb, #93c5fd 12%, transparent);
|
|
560
|
-
--ui-calendar-range-edge: color-mix(in srgb, #93c5fd 20%, transparent);
|
|
557
|
+
--ui-calendar-selected-bg: color-mix(in srgb, var(--ui-color-accent-on-dark, #93c5fd) 22%, transparent);
|
|
558
|
+
--ui-calendar-selected-border: color-mix(in srgb, var(--ui-color-accent-on-dark, #93c5fd) 72%, transparent);
|
|
559
|
+
--ui-calendar-range-bg: color-mix(in srgb, var(--ui-color-accent-on-dark, #93c5fd) 12%, transparent);
|
|
560
|
+
--ui-calendar-range-edge: color-mix(in srgb, var(--ui-color-accent-on-dark, #93c5fd) 20%, transparent);
|
|
561
561
|
}
|
|
562
562
|
|
|
563
563
|
:host([disabled]) .frame {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Te } from "./ElementBase-
|
|
1
|
+
import { E as Te } from "./ElementBase-D5QsC5Vw.mjs";
|
|
2
2
|
const Re = {
|
|
3
3
|
calendarLabel: "Calendar",
|
|
4
4
|
today: "Today",
|
|
@@ -727,12 +727,12 @@ const Fe = `
|
|
|
727
727
|
--ui-calendar-border: #334155;
|
|
728
728
|
--ui-calendar-text: #e2e8f0;
|
|
729
729
|
--ui-calendar-muted: #93a4bd;
|
|
730
|
-
--ui-calendar-accent: #93c5fd;
|
|
730
|
+
--ui-calendar-accent: var(--ui-color-accent-on-dark, #93c5fd);
|
|
731
731
|
--ui-calendar-shadow: 0 16px 38px rgba(2, 6, 23, 0.5);
|
|
732
|
-
--ui-calendar-selected-bg: color-mix(in srgb, #93c5fd 22%, transparent);
|
|
733
|
-
--ui-calendar-selected-border: color-mix(in srgb, #93c5fd 72%, transparent);
|
|
734
|
-
--ui-calendar-range-bg: color-mix(in srgb, #93c5fd 12%, transparent);
|
|
735
|
-
--ui-calendar-range-edge: color-mix(in srgb, #93c5fd 20%, transparent);
|
|
732
|
+
--ui-calendar-selected-bg: color-mix(in srgb, var(--ui-color-accent-on-dark, #93c5fd) 22%, transparent);
|
|
733
|
+
--ui-calendar-selected-border: color-mix(in srgb, var(--ui-color-accent-on-dark, #93c5fd) 72%, transparent);
|
|
734
|
+
--ui-calendar-range-bg: color-mix(in srgb, var(--ui-color-accent-on-dark, #93c5fd) 12%, transparent);
|
|
735
|
+
--ui-calendar-range-edge: color-mix(in srgb, var(--ui-color-accent-on-dark, #93c5fd) 20%, transparent);
|
|
736
736
|
}
|
|
737
737
|
|
|
738
738
|
:host([disabled]) .frame {
|
package/dist/calendar.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./calendar-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./calendar-BsVqtpjM.js");exports.UICalendar=e.UICalendar;exports.addDaysISO=e.addDaysISO;exports.addMonthsISO=e.addMonthsISO;exports.compareISO=e.compareISO;exports.endOfMonth=e.endOfMonth;exports.parseISO=e.parseISO;exports.startOfMonth=e.startOfMonth;
|
package/dist/calendar.esm.js
CHANGED
package/dist/card.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./ElementBase-CbUsP3D6.js"),h=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-card-radius: var(--base-card-radius, calc(var(--ui-radius, 6px) + 2px));
|
|
4
4
|
--ui-card-bg: var(--base-card-bg, var(--color-panel-solid, var(--ui-color-surface, #ffffff)));
|
|
@@ -234,7 +234,8 @@
|
|
|
234
234
|
padding-top: var(--ui-card-padding);
|
|
235
235
|
}
|
|
236
236
|
|
|
237
|
-
.body:last-child
|
|
237
|
+
.body:last-child,
|
|
238
|
+
.card[data-has-footer="false"] .body {
|
|
238
239
|
padding-bottom: var(--ui-card-padding);
|
|
239
240
|
}
|
|
240
241
|
|
|
@@ -283,8 +284,8 @@
|
|
|
283
284
|
box-shadow: none;
|
|
284
285
|
}
|
|
285
286
|
}
|
|
286
|
-
`;function
|
|
287
|
-
<style>${
|
|
287
|
+
`;function b(o){if(!o||!o.trim())return"var(--base-card-radius, var(--ui-radius, 6px))";const e=o.trim().toLowerCase();return e==="full"?"999px":/^-?\d+(\.\d+)?$/.test(e)?`${e}px`:o}const s="data-ui-card-auto-label";class l extends u.ElementBase{constructor(){super(...arguments),this._slotCleanup=[],this._onKeyDownBound=this._onKeyDown.bind(this)}static get observedAttributes(){return["variant","size","radius","tone","elevation","interactive","disabled","tabindex","role"]}connectedCallback(){super.connectedCallback(),this._syncHostStyles(),this.addEventListener("keydown",this._onKeyDownBound),this._syncAccessibilityState()}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._onKeyDownBound),this._cleanupSlotListeners()}attributeChangedCallback(e,r,i){super.attributeChangedCallback(e,r,i),r!==i&&(e==="radius"&&this._syncHostStyles(),(e==="interactive"||e==="disabled"||e==="tabindex"||e==="role")&&this._syncAccessibilityState())}shouldRenderOnAttributeChange(){return!1}render(){this.setContent(`
|
|
288
|
+
<style>${h}</style>
|
|
288
289
|
<div class="card" part="card" role="group">
|
|
289
290
|
<div class="section media" part="media" hidden>
|
|
290
291
|
<slot name="media"></slot>
|
|
@@ -302,4 +303,4 @@
|
|
|
302
303
|
<slot name="footer"></slot>
|
|
303
304
|
</div>
|
|
304
305
|
</div>
|
|
305
|
-
`),this._syncHostStyles(),this._bindSlotListeners(),this._syncSlotState()}_syncHostStyles(){this.style.setProperty("--ui-card-radius",
|
|
306
|
+
`),this._syncHostStyles(),this._bindSlotListeners(),this._syncSlotState()}_syncHostStyles(){this.style.setProperty("--ui-card-radius",b(this.getAttribute("radius")))}_syncAccessibilityState(){const e=this.hasAttribute("interactive"),r=this.hasAttribute("disabled");if(!e){this._clearAutoLabel(),this.getAttribute("role")==="button"&&this.removeAttribute("role"),this.removeAttribute("aria-disabled"),(this.getAttribute("tabindex")==="0"||this.getAttribute("tabindex")==="-1")&&this.removeAttribute("tabindex");return}this.hasAttribute("role")||this.setAttribute("role","button"),this.setAttribute("aria-disabled",r?"true":"false"),this._syncAutoLabel(),this.hasAttribute("tabindex")?r&&this.getAttribute("tabindex")!=="-1"&&this.setAttribute("tabindex","-1"):this.setAttribute("tabindex",r?"-1":"0")}_shownText(){const e=[],r=t=>{if(t.nodeType===Node.TEXT_NODE){const a=t.textContent||"";a.trim()&&e.push({text:a,parent:t.parentNode});return}if(t instanceof Element&&!(t.hasAttribute("hidden")||t.getAttribute("aria-hidden")==="true")&&!(t.tagName==="STYLE"||t.tagName==="SCRIPT")){if(t instanceof HTMLSlotElement){const a=t.assignedNodes({flatten:!0});(a.length?a:Array.from(t.childNodes)).forEach(r);return}t.childNodes.forEach(r)}};this.root.childNodes.forEach(r);let i="";return e.forEach((t,a)=>{i+=a>0&&e[a-1].parent!==t.parent?` ${t.text}`:t.text}),i.replace(/\s+/g," ").trim().slice(0,500)}_clearAutoLabel(){this.hasAttribute(s)&&(this.removeAttribute("aria-label"),this.removeAttribute(s))}_syncAutoLabel(){if(this.hasAttribute("aria-labelledby")||this.hasAttribute("aria-label")&&!this.hasAttribute(s)||this.getAttribute("role")!=="button"){this._clearAutoLabel();return}const r=this._shownText();if(!r){this._clearAutoLabel();return}this.getAttribute("aria-label")!==r&&this.setAttribute("aria-label",r),this.setAttribute(s,"")}_cleanupSlotListeners(){for(const e of this._slotCleanup)e();this._slotCleanup=[]}_bindSlotListeners(){this._cleanupSlotListeners(),this.root.querySelectorAll("slot").forEach(r=>{const i=()=>this._syncSlotState();r.addEventListener("slotchange",i),this._slotCleanup.push(()=>r.removeEventListener("slotchange",i))})}_syncSlotState(){this._toggleSection("media"),this._toggleSection("inset"),this._toggleSection("header"),this._toggleSection("footer"),this._syncSectionOrder(),this.hasAttribute("interactive")&&this._syncAutoLabel()}_syncSectionOrder(){const e=this.root.querySelector(".inset"),r=this.root.querySelector(".header"),i=this.root.querySelector(".body");if(!e||!r||!i)return;const t=Array.from(this.children),a=t.findIndex(d=>d.getAttribute("slot")==="inset"),c=t.findIndex(d=>d.getAttribute("slot")==="header"),n=a>=0&&c>=0&&a>c?i:r;e.nextElementSibling!==n&&n.parentElement?.insertBefore(e,n)}_toggleSection(e){const r=this.root.querySelector(`slot[name="${e}"]`),i=this.root.querySelector(`.${e}`);if(!r||!i)return;const t=r.assignedNodes({flatten:!0}).some(a=>a.nodeType===Node.TEXT_NODE?!!a.textContent?.trim():!0);i.hidden=!t,e==="footer"&&this.root.querySelector(".card")?.setAttribute("data-has-footer",String(t))}_onKeyDown(e){!this.hasAttribute("interactive")||this.hasAttribute("disabled")||e.defaultPrevented||e.target===this&&(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.click())}}typeof customElements<"u"&&!customElements.get("ui-card")&&customElements.define("ui-card",l);exports.UICard=l;
|
package/dist/card.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
const
|
|
1
|
+
import { E as l } from "./ElementBase-D5QsC5Vw.mjs";
|
|
2
|
+
const u = `
|
|
3
3
|
:host {
|
|
4
4
|
--ui-card-radius: var(--base-card-radius, calc(var(--ui-radius, 6px) + 2px));
|
|
5
5
|
--ui-card-bg: var(--base-card-bg, var(--color-panel-solid, var(--ui-color-surface, #ffffff)));
|
|
@@ -235,7 +235,8 @@ const n = `
|
|
|
235
235
|
padding-top: var(--ui-card-padding);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.body:last-child
|
|
238
|
+
.body:last-child,
|
|
239
|
+
.card[data-has-footer="false"] .body {
|
|
239
240
|
padding-bottom: var(--ui-card-padding);
|
|
240
241
|
}
|
|
241
242
|
|
|
@@ -285,13 +286,13 @@ const n = `
|
|
|
285
286
|
}
|
|
286
287
|
}
|
|
287
288
|
`;
|
|
288
|
-
function
|
|
289
|
+
function h(o) {
|
|
289
290
|
if (!o || !o.trim()) return "var(--base-card-radius, var(--ui-radius, 6px))";
|
|
290
|
-
const
|
|
291
|
-
return
|
|
291
|
+
const r = o.trim().toLowerCase();
|
|
292
|
+
return r === "full" ? "999px" : /^-?\d+(\.\d+)?$/.test(r) ? `${r}px` : o;
|
|
292
293
|
}
|
|
293
294
|
const s = "data-ui-card-auto-label";
|
|
294
|
-
class
|
|
295
|
+
class b extends l {
|
|
295
296
|
constructor() {
|
|
296
297
|
super(...arguments), this._slotCleanup = [], this._onKeyDownBound = this._onKeyDown.bind(this);
|
|
297
298
|
}
|
|
@@ -304,15 +305,15 @@ class l extends d {
|
|
|
304
305
|
disconnectedCallback() {
|
|
305
306
|
super.disconnectedCallback(), this.removeEventListener("keydown", this._onKeyDownBound), this._cleanupSlotListeners();
|
|
306
307
|
}
|
|
307
|
-
attributeChangedCallback(
|
|
308
|
-
super.attributeChangedCallback(
|
|
308
|
+
attributeChangedCallback(r, i, e) {
|
|
309
|
+
super.attributeChangedCallback(r, i, e), i !== e && (r === "radius" && this._syncHostStyles(), (r === "interactive" || r === "disabled" || r === "tabindex" || r === "role") && this._syncAccessibilityState());
|
|
309
310
|
}
|
|
310
311
|
shouldRenderOnAttributeChange() {
|
|
311
312
|
return !1;
|
|
312
313
|
}
|
|
313
314
|
render() {
|
|
314
315
|
this.setContent(`
|
|
315
|
-
<style>${
|
|
316
|
+
<style>${u}</style>
|
|
316
317
|
<div class="card" part="card" role="group">
|
|
317
318
|
<div class="section media" part="media" hidden>
|
|
318
319
|
<slot name="media"></slot>
|
|
@@ -333,15 +334,15 @@ class l extends d {
|
|
|
333
334
|
`), this._syncHostStyles(), this._bindSlotListeners(), this._syncSlotState();
|
|
334
335
|
}
|
|
335
336
|
_syncHostStyles() {
|
|
336
|
-
this.style.setProperty("--ui-card-radius",
|
|
337
|
+
this.style.setProperty("--ui-card-radius", h(this.getAttribute("radius")));
|
|
337
338
|
}
|
|
338
339
|
_syncAccessibilityState() {
|
|
339
|
-
const
|
|
340
|
-
if (!
|
|
340
|
+
const r = this.hasAttribute("interactive"), i = this.hasAttribute("disabled");
|
|
341
|
+
if (!r) {
|
|
341
342
|
this._clearAutoLabel(), this.getAttribute("role") === "button" && this.removeAttribute("role"), this.removeAttribute("aria-disabled"), (this.getAttribute("tabindex") === "0" || this.getAttribute("tabindex") === "-1") && this.removeAttribute("tabindex");
|
|
342
343
|
return;
|
|
343
344
|
}
|
|
344
|
-
this.hasAttribute("role") || this.setAttribute("role", "button"), this.setAttribute("aria-disabled",
|
|
345
|
+
this.hasAttribute("role") || this.setAttribute("role", "button"), this.setAttribute("aria-disabled", i ? "true" : "false"), this._syncAutoLabel(), this.hasAttribute("tabindex") ? i && this.getAttribute("tabindex") !== "-1" && this.setAttribute("tabindex", "-1") : this.setAttribute("tabindex", i ? "-1" : "0");
|
|
345
346
|
}
|
|
346
347
|
// Chromium derives no name from this card's slotted content, so an interactive card (role
|
|
347
348
|
// "button") was exposed unnamed. Name it after the text it shows, unless the author gave it a name:
|
|
@@ -349,25 +350,25 @@ class l extends d {
|
|
|
349
350
|
// The text the card shows, in the order it is drawn (the shadow template's slot order, not the order
|
|
350
351
|
// of the light DOM children), with a space where one element ends and the next begins.
|
|
351
352
|
_shownText() {
|
|
352
|
-
const
|
|
353
|
+
const r = [], i = (t) => {
|
|
353
354
|
if (t.nodeType === Node.TEXT_NODE) {
|
|
354
355
|
const a = t.textContent || "";
|
|
355
|
-
a.trim() &&
|
|
356
|
+
a.trim() && r.push({ text: a, parent: t.parentNode });
|
|
356
357
|
return;
|
|
357
358
|
}
|
|
358
359
|
if (t instanceof Element && !(t.hasAttribute("hidden") || t.getAttribute("aria-hidden") === "true") && !(t.tagName === "STYLE" || t.tagName === "SCRIPT")) {
|
|
359
360
|
if (t instanceof HTMLSlotElement) {
|
|
360
361
|
const a = t.assignedNodes({ flatten: !0 });
|
|
361
|
-
(a.length ? a : Array.from(t.childNodes)).forEach(
|
|
362
|
+
(a.length ? a : Array.from(t.childNodes)).forEach(i);
|
|
362
363
|
return;
|
|
363
364
|
}
|
|
364
|
-
t.childNodes.forEach(
|
|
365
|
+
t.childNodes.forEach(i);
|
|
365
366
|
}
|
|
366
367
|
};
|
|
367
|
-
this.root.childNodes.forEach(
|
|
368
|
+
this.root.childNodes.forEach(i);
|
|
368
369
|
let e = "";
|
|
369
|
-
return
|
|
370
|
-
e += a > 0 &&
|
|
370
|
+
return r.forEach((t, a) => {
|
|
371
|
+
e += a > 0 && r[a - 1].parent !== t.parent ? ` ${t.text}` : t.text;
|
|
371
372
|
}), e.replace(/\s+/g, " ").trim().slice(0, 500);
|
|
372
373
|
}
|
|
373
374
|
_clearAutoLabel() {
|
|
@@ -378,37 +379,49 @@ class l extends d {
|
|
|
378
379
|
this._clearAutoLabel();
|
|
379
380
|
return;
|
|
380
381
|
}
|
|
381
|
-
const
|
|
382
|
-
if (!
|
|
382
|
+
const i = this._shownText();
|
|
383
|
+
if (!i) {
|
|
383
384
|
this._clearAutoLabel();
|
|
384
385
|
return;
|
|
385
386
|
}
|
|
386
|
-
this.getAttribute("aria-label") !==
|
|
387
|
+
this.getAttribute("aria-label") !== i && this.setAttribute("aria-label", i), this.setAttribute(s, "");
|
|
387
388
|
}
|
|
388
389
|
_cleanupSlotListeners() {
|
|
389
|
-
for (const
|
|
390
|
+
for (const r of this._slotCleanup) r();
|
|
390
391
|
this._slotCleanup = [];
|
|
391
392
|
}
|
|
392
393
|
_bindSlotListeners() {
|
|
393
|
-
this._cleanupSlotListeners(), this.root.querySelectorAll("slot").forEach((
|
|
394
|
+
this._cleanupSlotListeners(), this.root.querySelectorAll("slot").forEach((i) => {
|
|
394
395
|
const e = () => this._syncSlotState();
|
|
395
|
-
|
|
396
|
+
i.addEventListener("slotchange", e), this._slotCleanup.push(() => i.removeEventListener("slotchange", e));
|
|
396
397
|
});
|
|
397
398
|
}
|
|
398
399
|
_syncSlotState() {
|
|
399
|
-
this._toggleSection("media"), this._toggleSection("inset"), this._toggleSection("header"), this._toggleSection("footer"), this.hasAttribute("interactive") && this._syncAutoLabel();
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
400
|
+
this._toggleSection("media"), this._toggleSection("inset"), this._toggleSection("header"), this._toggleSection("footer"), this._syncSectionOrder(), this.hasAttribute("interactive") && this._syncAutoLabel();
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* The inset goes where it was written relative to the header: above it by default (flush media
|
|
404
|
+
* at the top), below it when it comes after `<Card.Header>` in the markup. It used to be fixed
|
|
405
|
+
* above the header, so a header followed by a full-bleed table showed the table first. Media
|
|
406
|
+
* stays on top, the header above the body and the footer at the bottom, as before.
|
|
407
|
+
*/
|
|
408
|
+
_syncSectionOrder() {
|
|
409
|
+
const r = this.root.querySelector(".inset"), i = this.root.querySelector(".header"), e = this.root.querySelector(".body");
|
|
410
|
+
if (!r || !i || !e) return;
|
|
411
|
+
const t = Array.from(this.children), a = t.findIndex((d) => d.getAttribute("slot") === "inset"), c = t.findIndex((d) => d.getAttribute("slot") === "header"), n = a >= 0 && c >= 0 && a > c ? e : i;
|
|
412
|
+
r.nextElementSibling !== n && n.parentElement?.insertBefore(r, n);
|
|
413
|
+
}
|
|
414
|
+
_toggleSection(r) {
|
|
415
|
+
const i = this.root.querySelector(`slot[name="${r}"]`), e = this.root.querySelector(`.${r}`);
|
|
416
|
+
if (!i || !e) return;
|
|
417
|
+
const t = i.assignedNodes({ flatten: !0 }).some((a) => a.nodeType === Node.TEXT_NODE ? !!a.textContent?.trim() : !0);
|
|
418
|
+
e.hidden = !t, r === "footer" && this.root.querySelector(".card")?.setAttribute("data-has-footer", String(t));
|
|
419
|
+
}
|
|
420
|
+
_onKeyDown(r) {
|
|
421
|
+
!this.hasAttribute("interactive") || this.hasAttribute("disabled") || r.defaultPrevented || r.target === this && (r.key === "Enter" || r.key === " ") && (r.preventDefault(), this.click());
|
|
409
422
|
}
|
|
410
423
|
}
|
|
411
|
-
typeof customElements < "u" && !customElements.get("ui-card") && customElements.define("ui-card",
|
|
424
|
+
typeof customElements < "u" && !customElements.get("ui-card") && customElements.define("ui-card", b);
|
|
412
425
|
export {
|
|
413
|
-
|
|
426
|
+
b as UICard
|
|
414
427
|
};
|
package/dist/chart.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const J=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const J=require("./ElementBase-CbUsP3D6.js"),V=180,U=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-chart-bg: var(--color-panel-solid, var(--ui-color-surface, #ffffff));
|
|
4
4
|
--ui-chart-surface: color-mix(in srgb, var(--ui-color-surface, #ffffff) 97%, #ffffff 3%);
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
--ui-chart-text: #e2e8f0;
|
|
54
54
|
--ui-chart-muted: #94a3b8;
|
|
55
55
|
--ui-chart-grid: color-mix(in srgb, #475569 74%, transparent);
|
|
56
|
-
--ui-chart-accent: #93c5fd;
|
|
56
|
+
--ui-chart-accent: var(--ui-color-accent-on-dark, #93c5fd);
|
|
57
57
|
--ui-chart-success: #34d399;
|
|
58
58
|
--ui-chart-warning: #fbbf24;
|
|
59
59
|
--ui-chart-success-text: var(--ui-chart-success);
|
package/dist/chart.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as Y } from "./ElementBase-
|
|
1
|
+
import { E as Y } from "./ElementBase-D5QsC5Vw.mjs";
|
|
2
2
|
const V = 180, Z = `
|
|
3
3
|
:host {
|
|
4
4
|
--ui-chart-bg: var(--color-panel-solid, var(--ui-color-surface, #ffffff));
|
|
@@ -54,7 +54,7 @@ const V = 180, Z = `
|
|
|
54
54
|
--ui-chart-text: #e2e8f0;
|
|
55
55
|
--ui-chart-muted: #94a3b8;
|
|
56
56
|
--ui-chart-grid: color-mix(in srgb, #475569 74%, transparent);
|
|
57
|
-
--ui-chart-accent: #93c5fd;
|
|
57
|
+
--ui-chart-accent: var(--ui-color-accent-on-dark, #93c5fd);
|
|
58
58
|
--ui-chart-success: #34d399;
|
|
59
59
|
--ui-chart-warning: #fbbf24;
|
|
60
60
|
--ui-chart-success-text: var(--ui-chart-success);
|
package/dist/checkbox.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-CbUsP3D6.js"),s=require("./form-control-B90_3kYN.js"),h=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-checkbox-size: 16px;
|
|
4
4
|
--ui-checkbox-hit-area: 24px;
|
|
@@ -325,8 +325,8 @@
|
|
|
325
325
|
--ui-checkbox-label-color: CanvasText;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
`;function r(t){return t!==null&&t.toLowerCase()!=="false"&&t!=="0"}function
|
|
329
|
-
<style>${
|
|
328
|
+
`;function r(t){return t!==null&&t.toLowerCase()!=="false"&&t!=="0"}function l(t){return t instanceof HTMLElement?!!t.closest('a, button, input, select, textarea, [contenteditable="true"], [data-ui-checkbox-no-toggle]'):!1}const a=class a extends d.ElementBase{constructor(){super(),this._formControl=new s.FormControl(this,{getValue:()=>this.checked?this.getAttribute("value")??"on":null,getValidity:()=>({valueMissing:s.isRequired(this)&&!this.checked,message:"Please check this box if you want to proceed."}),defaultAttribute:"checked",onFormDisabled:()=>this.requestRender()}),this._uid=`ui-checkbox-${Math.random().toString(36).slice(2,9)}`,this._onClick=this._onClick.bind(this),this._onKeyDown=this._onKeyDown.bind(this)}static get observedAttributes(){return["checked","disabled","indeterminate","headless","loading","invalid","tabindex"]}formResetCallback(){this._formControl.formResetCallback()}formDisabledCallback(e){this._formControl.formDisabledCallback(e)}get form(){return this._formControl.form}connectedCallback(){super.connectedCallback(),this._formControl.connect(),this.addEventListener("click",this._onClick),this.addEventListener("keydown",this._onKeyDown),this._syncA11yState()}disconnectedCallback(){this._formControl.disconnect(),this.removeEventListener("click",this._onClick),this.removeEventListener("keydown",this._onKeyDown),super.disconnectedCallback()}attributeChangedCallback(e,i,o){if(i!==o){if(e==="tabindex"){this._syncA11yState();return}this.requestRender()}}get checked(){return r(this.getAttribute("checked"))}set checked(e){const i=!!e;i!==this.checked&&(i?this.setAttribute("checked",""):this.removeAttribute("checked"))}get indeterminate(){return r(this.getAttribute("indeterminate"))}set indeterminate(e){const i=!!e;i!==this.indeterminate&&(i?this.setAttribute("indeterminate",""):this.removeAttribute("indeterminate"))}get disabled(){return r(this.getAttribute("disabled"))||!!this._formControl?.disabledByForm}set disabled(e){const i=!!e;i!==this.disabled&&(i?this.setAttribute("disabled",""):this.removeAttribute("disabled"))}get loading(){return r(this.getAttribute("loading"))}set loading(e){const i=!!e;i!==this.loading&&(i?this.setAttribute("loading",""):this.removeAttribute("loading"))}get headless(){return this.hasAttribute("headless")}set headless(e){e!==this.headless&&(e?this.setAttribute("headless",""):this.removeAttribute("headless"))}get invalid(){return r(this.getAttribute("invalid"))}set invalid(e){const i=!!e;i!==this.invalid&&(i?this.setAttribute("invalid",""):this.removeAttribute("invalid"))}get density(){return this.getAttribute("density")||"default"}set density(e){const i=(e||"").trim().toLowerCase();if(!i||i==="default"){this.removeAttribute("density");return}this.setAttribute("density",i)}get preset(){return this.getAttribute("preset")||"default"}set preset(e){const i=(e||"").trim().toLowerCase();if(!i||i==="default"){this.removeAttribute("preset");return}this.setAttribute("preset",i)}_syncA11yState(){const e=this.indeterminate?"mixed":this.checked?"true":"false",i=this.disabled||this.loading,o=i?"-1":this.getAttribute("tabindex")||"0",n=`${this._uid}-label`;this.setAttribute("role","checkbox"),this.setAttribute("aria-checked",e),this.setAttribute("aria-disabled",i?"true":"false"),this.setAttribute("aria-busy",this.loading?"true":"false"),this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid"),this.getAttribute("aria-labelledby")===n&&this.removeAttribute("aria-labelledby"),this.setAttribute("tabindex",o)}_toggleFromUser(){if(this.disabled||this.loading)return;this.indeterminate?(this.indeterminate=!1,this.checked=!0):this.checked=!this.checked;const e={checked:this.checked,indeterminate:this.indeterminate};this.dispatchEvent(new CustomEvent("input",{detail:e,bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("change",{detail:e,bubbles:!0,composed:!0}))}_onClick(e){this.disabled||this.loading||e.composedPath().some(o=>l(o))||this._toggleFromUser()}_onKeyDown(e){this.disabled||this.loading||e.key!==" "&&e.key!=="Enter"||(e.preventDefault(),this._toggleFromUser())}render(){this._syncA11yState(),this.setContent(`
|
|
329
|
+
<style>${h}</style>
|
|
330
330
|
<span class="row" part="root">
|
|
331
331
|
<span class="control-wrap" part="hit-area" aria-hidden="true">
|
|
332
332
|
<span class="control" part="control">
|
|
@@ -339,4 +339,4 @@
|
|
|
339
339
|
</span>
|
|
340
340
|
<span class="label" id="${this._uid}-label" part="label"><slot></slot></span>
|
|
341
341
|
</span>
|
|
342
|
-
`)}}typeof customElements<"u"&&!customElements.get("ui-checkbox")&&customElements.define("ui-checkbox",c);exports.UICheckbox=c;
|
|
342
|
+
`)}};a.formAssociated=!0;let c=a;typeof customElements<"u"&&!customElements.get("ui-checkbox")&&customElements.define("ui-checkbox",c);exports.UICheckbox=c;
|
package/dist/checkbox.esm.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { E as
|
|
2
|
-
|
|
1
|
+
import { E as n } from "./ElementBase-D5QsC5Vw.mjs";
|
|
2
|
+
import { F as d, i as h } from "./form-control-D9wWUMBl.mjs";
|
|
3
|
+
const l = `
|
|
3
4
|
:host {
|
|
4
5
|
--ui-checkbox-size: 16px;
|
|
5
6
|
--ui-checkbox-hit-area: 24px;
|
|
@@ -330,21 +331,39 @@ const s = `
|
|
|
330
331
|
function r(t) {
|
|
331
332
|
return t !== null && t.toLowerCase() !== "false" && t !== "0";
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
+
function b(t) {
|
|
334
335
|
return t instanceof HTMLElement ? !!t.closest('a, button, input, select, textarea, [contenteditable="true"], [data-ui-checkbox-no-toggle]') : !1;
|
|
335
336
|
}
|
|
336
|
-
class
|
|
337
|
+
const a = class a extends n {
|
|
337
338
|
constructor() {
|
|
338
|
-
super(), this.
|
|
339
|
+
super(), this._formControl = new d(this, {
|
|
340
|
+
getValue: () => this.checked ? this.getAttribute("value") ?? "on" : null,
|
|
341
|
+
getValidity: () => ({
|
|
342
|
+
valueMissing: h(this) && !this.checked,
|
|
343
|
+
message: "Please check this box if you want to proceed."
|
|
344
|
+
}),
|
|
345
|
+
defaultAttribute: "checked",
|
|
346
|
+
onFormDisabled: () => this.requestRender()
|
|
347
|
+
}), this._uid = `ui-checkbox-${Math.random().toString(36).slice(2, 9)}`, this._onClick = this._onClick.bind(this), this._onKeyDown = this._onKeyDown.bind(this);
|
|
339
348
|
}
|
|
340
349
|
static get observedAttributes() {
|
|
341
350
|
return ["checked", "disabled", "indeterminate", "headless", "loading", "invalid", "tabindex"];
|
|
342
351
|
}
|
|
352
|
+
formResetCallback() {
|
|
353
|
+
this._formControl.formResetCallback();
|
|
354
|
+
}
|
|
355
|
+
formDisabledCallback(e) {
|
|
356
|
+
this._formControl.formDisabledCallback(e);
|
|
357
|
+
}
|
|
358
|
+
/** The `<form>` this field belongs to, if any. */
|
|
359
|
+
get form() {
|
|
360
|
+
return this._formControl.form;
|
|
361
|
+
}
|
|
343
362
|
connectedCallback() {
|
|
344
|
-
super.connectedCallback(), this.addEventListener("click", this._onClick), this.addEventListener("keydown", this._onKeyDown), this._syncA11yState();
|
|
363
|
+
super.connectedCallback(), this._formControl.connect(), this.addEventListener("click", this._onClick), this.addEventListener("keydown", this._onKeyDown), this._syncA11yState();
|
|
345
364
|
}
|
|
346
365
|
disconnectedCallback() {
|
|
347
|
-
this.removeEventListener("click", this._onClick), this.removeEventListener("keydown", this._onKeyDown), super.disconnectedCallback();
|
|
366
|
+
this._formControl.disconnect(), this.removeEventListener("click", this._onClick), this.removeEventListener("keydown", this._onKeyDown), super.disconnectedCallback();
|
|
348
367
|
}
|
|
349
368
|
attributeChangedCallback(e, i, o) {
|
|
350
369
|
if (i !== o) {
|
|
@@ -370,7 +389,7 @@ class d extends a {
|
|
|
370
389
|
i !== this.indeterminate && (i ? this.setAttribute("indeterminate", "") : this.removeAttribute("indeterminate"));
|
|
371
390
|
}
|
|
372
391
|
get disabled() {
|
|
373
|
-
return r(this.getAttribute("disabled"));
|
|
392
|
+
return r(this.getAttribute("disabled")) || !!this._formControl?.disabledByForm;
|
|
374
393
|
}
|
|
375
394
|
set disabled(e) {
|
|
376
395
|
const i = !!e;
|
|
@@ -419,8 +438,8 @@ class d extends a {
|
|
|
419
438
|
this.setAttribute("preset", i);
|
|
420
439
|
}
|
|
421
440
|
_syncA11yState() {
|
|
422
|
-
const e = this.indeterminate ? "mixed" : this.checked ? "true" : "false", i = this.disabled || this.loading, o = i ? "-1" : this.getAttribute("tabindex") || "0",
|
|
423
|
-
this.setAttribute("role", "checkbox"), this.setAttribute("aria-checked", e), this.setAttribute("aria-disabled", i ? "true" : "false"), this.setAttribute("aria-busy", this.loading ? "true" : "false"), this.invalid ? this.setAttribute("aria-invalid", "true") : this.removeAttribute("aria-invalid"), this.getAttribute("aria-labelledby") ===
|
|
441
|
+
const e = this.indeterminate ? "mixed" : this.checked ? "true" : "false", i = this.disabled || this.loading, o = i ? "-1" : this.getAttribute("tabindex") || "0", s = `${this._uid}-label`;
|
|
442
|
+
this.setAttribute("role", "checkbox"), this.setAttribute("aria-checked", e), this.setAttribute("aria-disabled", i ? "true" : "false"), this.setAttribute("aria-busy", this.loading ? "true" : "false"), this.invalid ? this.setAttribute("aria-invalid", "true") : this.removeAttribute("aria-invalid"), this.getAttribute("aria-labelledby") === s && this.removeAttribute("aria-labelledby"), this.setAttribute("tabindex", o);
|
|
424
443
|
}
|
|
425
444
|
_toggleFromUser() {
|
|
426
445
|
if (this.disabled || this.loading) return;
|
|
@@ -429,14 +448,14 @@ class d extends a {
|
|
|
429
448
|
this.dispatchEvent(new CustomEvent("input", { detail: e, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: e, bubbles: !0, composed: !0 }));
|
|
430
449
|
}
|
|
431
450
|
_onClick(e) {
|
|
432
|
-
this.disabled || this.loading || e.composedPath().some((o) =>
|
|
451
|
+
this.disabled || this.loading || e.composedPath().some((o) => b(o)) || this._toggleFromUser();
|
|
433
452
|
}
|
|
434
453
|
_onKeyDown(e) {
|
|
435
454
|
this.disabled || this.loading || e.key !== " " && e.key !== "Enter" || (e.preventDefault(), this._toggleFromUser());
|
|
436
455
|
}
|
|
437
456
|
render() {
|
|
438
457
|
this._syncA11yState(), this.setContent(`
|
|
439
|
-
<style>${
|
|
458
|
+
<style>${l}</style>
|
|
440
459
|
<span class="row" part="root">
|
|
441
460
|
<span class="control-wrap" part="hit-area" aria-hidden="true">
|
|
442
461
|
<span class="control" part="control">
|
|
@@ -451,8 +470,10 @@ class d extends a {
|
|
|
451
470
|
</span>
|
|
452
471
|
`);
|
|
453
472
|
}
|
|
454
|
-
}
|
|
455
|
-
|
|
473
|
+
};
|
|
474
|
+
a.formAssociated = !0;
|
|
475
|
+
let c = a;
|
|
476
|
+
typeof customElements < "u" && !customElements.get("ui-checkbox") && customElements.define("ui-checkbox", c);
|
|
456
477
|
export {
|
|
457
|
-
|
|
478
|
+
c as UICheckbox
|
|
458
479
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const e = "data-ui-clone-source";
|
|
2
|
+
function i(t) {
|
|
3
|
+
!t || t.hasAttribute(e) || t.hasAttribute("aria-hidden") || (t.setAttribute("aria-hidden", "true"), t.setAttribute(e, ""));
|
|
4
|
+
}
|
|
5
|
+
function r(t) {
|
|
6
|
+
return t.hasAttribute(e) && (t.removeAttribute(e), t.removeAttribute("aria-hidden")), t;
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
i as h,
|
|
10
|
+
r
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e="data-ui-clone-source";function i(t){!t||t.hasAttribute(e)||t.hasAttribute("aria-hidden")||(t.setAttribute("aria-hidden","true"),t.setAttribute(e,""))}function r(t){return t.hasAttribute(e)&&(t.removeAttribute(e),t.removeAttribute("aria-hidden")),t}exports.hideCloneSource=i;exports.revealClone=r;
|
package/dist/collapsible.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const m=require("./ElementBase-CbUsP3D6.js"),x=`
|
|
2
2
|
:host {
|
|
3
3
|
--ui-collapsible-bg: var(--color-panel-solid, var(--ui-color-surface, #ffffff));
|
|
4
4
|
--ui-collapsible-surface: var(--color-panel-solid, var(--ui-color-surface, #ffffff));
|
package/dist/collapsible.esm.js
CHANGED
package/dist/color-picker.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("./ElementBase-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const O=require("./ElementBase-CbUsP3D6.js"),m=require("./date-time-utils-D3hQQ5Om.js");function g(o,t,e){return Math.max(t,Math.min(e,o))}function _(o,t=3){const e=10**t;return Math.round(o*e)/e}function A(o){return g(Math.round(o),0,255)}function D(o){const t=o.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?g(r/100,0,1):null}const e=Number(t);return Number.isFinite(e)?g(e,0,1):null}function C(o){const t=o.trim();if(!t)return null;if(t.endsWith("%")){const r=Number(t.slice(0,-1));return Number.isFinite(r)?A(g(r,0,100)/100*255):null}const e=Number(t);return Number.isFinite(e)?A(e):null}function B(o){const t=o.trim();if(!t.endsWith("%"))return null;const e=Number(t.slice(0,-1));return Number.isFinite(e)?g(e,0,100):null}function F(o){const t=o.trim().toLowerCase();if(!t)return null;if(t.endsWith("deg")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r):null}if(t.endsWith("turn")){const r=Number(t.slice(0,-4));return Number.isFinite(r)?x(r*360):null}if(t.endsWith("rad")){const r=Number(t.slice(0,-3));return Number.isFinite(r)?x(r*180/Math.PI):null}const e=Number(t);return Number.isFinite(e)?x(e):null}function x(o){const t=o%360;return t<0?t+360:t}function T(o){const t=o.trim();if(!t)return null;if(t.includes("/")){const[r,i]=t.split("/");if(i==null)return null;const a=r.includes(",")?r.split(","):r.trim().split(/\s+/);return a.length<3?null:{channels:a.map(n=>n.trim()).filter(Boolean),alpha:i.trim()}}if(t.includes(",")){const r=t.split(",").map(i=>i.trim()).filter(Boolean);return r.length<3?null:{channels:r.slice(0,3),alpha:r[3]??null}}const e=t.split(/\s+/).map(r=>r.trim()).filter(Boolean);return e.length<3?null:{channels:e.slice(0,3),alpha:e[3]??null}}function U(o){const t=o.trim().replace(/^#/,"");if(![3,4,6,8].includes(t.length)||!/^[0-9a-f]+$/i.test(t))return null;if(t.length===3||t.length===4){const n=parseInt(t[0]+t[0],16),s=parseInt(t[1]+t[1],16),l=parseInt(t[2]+t[2],16),c=t.length===4?parseInt(t[3]+t[3],16)/255:1;return b({r:n,g:s,b:l,a:c})}const e=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),i=parseInt(t.slice(4,6),16),a=t.length===8?parseInt(t.slice(6,8),16)/255:1;return b({r:e,g:r,b:i,a})}function N(o){const t=/^rgba?\((.+)\)$/i.exec(o.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=C(e.channels[0]),i=C(e.channels[1]),a=C(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?D(e.alpha):1;return n==null?null:b({r,g:i,b:a,a:n})}function V(o){const t=/^hsla?\((.+)\)$/i.exec(o.trim());if(!t)return null;const e=T(t[1]);if(!e||e.channels.length<3)return null;const r=F(e.channels[0]),i=B(e.channels[1]),a=B(e.channels[2]);if(r==null||i==null||a==null)return null;const n=e.alpha!=null?D(e.alpha):1;return n==null?null:$({h:r,s:i,l:a,a:n})}function b(o){return{r:A(o.r),g:A(o.g),b:A(o.b),a:_(g(o.a,0,1),4)}}function v(o){const t=(o||"").trim();return t?t.startsWith("#")?U(t):/^rgba?\(/i.test(t)?N(t):/^hsla?\(/i.test(t)?V(t):null:null}function W(o,t=!1){const e=b(o),r=a=>a.toString(16).padStart(2,"0"),i=`#${r(e.r)}${r(e.g)}${r(e.b)}`;return t?`${i}${r(Math.round(e.a*255))}`:i}function K(o,t=!0){const e=b(o);return!t||e.a>=1?`rgb(${e.r} ${e.g} ${e.b})`:`rgb(${e.r} ${e.g} ${e.b} / ${_(e.a,3)})`}function G(o,t=!0){const e=Math.round(x(o.h)),r=Math.round(g(o.s,0,100)),i=Math.round(g(o.l,0,100)),a=_(g(o.a,0,1),3);return!t||a>=1?`hsl(${e} ${r}% ${i}%)`:`hsl(${e} ${r}% ${i}% / ${a})`}function z(o){const t=b(o),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),s=a-n;let l=0;s!==0&&(a===e?l=(r-i)/s%6:a===r?l=(i-e)/s+2:l=(e-r)/s+4,l*=60,l<0&&(l+=360));const c=a===0?0:s/a*100,p=a*100;return{h:_(l,3),s:_(c,3),v:_(p,3),a:t.a}}function X(o){const t=x(o.h),e=g(o.s,0,100)/100,r=g(o.v,0,100)/100,i=r*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i;let s=0,l=0,c=0;return t<60?(s=i,l=a):t<120?(s=a,l=i):t<180?(l=i,c=a):t<240?(l=a,c=i):t<300?(s=a,c=i):(s=i,c=a),b({r:(s+n)*255,g:(l+n)*255,b:(c+n)*255,a:o.a})}function M(o){const t=b(o),e=t.r/255,r=t.g/255,i=t.b/255,a=Math.max(e,r,i),n=Math.min(e,r,i),s=a-n,l=(a+n)/2;let c=0,p=0;return s!==0&&(p=s/(1-Math.abs(2*l-1)),a===e?c=(r-i)/s%6:a===r?c=(i-e)/s+2:c=(e-r)/s+4,c*=60,c<0&&(c+=360)),{h:_(c,3),s:_(p*100,3),l:_(l*100,3),a:t.a}}function $(o){const t=x(o.h),e=g(o.s,0,100)/100,r=g(o.l,0,100)/100,i=(1-Math.abs(2*r-1))*e,a=i*(1-Math.abs(t/60%2-1)),n=r-i/2;let s=0,l=0,c=0;return t<60?(s=i,l=a):t<120?(s=a,l=i):t<180?(l=i,c=a):t<240?(l=a,c=i):t<300?(s=a,c=i):(s=i,c=a),b({r:(s+n)*255,g:(l+n)*255,b:(c+n)*255,a:o.a})}function y(o,t){return W(o,t).toUpperCase()}function k(o,t){return K(o,t)}function Y(o,t){return G(M(o),t)}const I="#2563eb",L="editora:ui-color-picker:recent",j=`
|
|
2
2
|
<svg viewBox="0 0 20 20" aria-hidden="true" focusable="false">
|
|
3
3
|
<path d="m5.6 7.6 4.4 4.6 4.4-4.6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
4
|
</svg>
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
--ui-cp-border: #334155;
|
|
50
50
|
--ui-cp-text: #e2e8f0;
|
|
51
51
|
--ui-cp-muted: #93a4bd;
|
|
52
|
-
--ui-cp-accent: #93c5fd;
|
|
52
|
+
--ui-cp-accent: var(--ui-color-accent-on-dark, #93c5fd);
|
|
53
53
|
--ui-cp-checker-a: #475569;
|
|
54
54
|
--ui-cp-checker-b: #334155;
|
|
55
55
|
--ui-cp-shadow: 0 18px 40px rgba(2, 6, 23, 0.55);
|
package/dist/color-picker.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as q } from "./ElementBase-
|
|
2
|
-
import { r as O, e as F, l as U, i as A, s as N, c as V } from "./date-time-utils-
|
|
1
|
+
import { E as q } from "./ElementBase-D5QsC5Vw.mjs";
|
|
2
|
+
import { r as O, e as F, l as U, i as A, s as N, c as V } from "./date-time-utils-CJUksWj3.mjs";
|
|
3
3
|
function g(o, t, e) {
|
|
4
4
|
return Math.max(t, Math.min(e, o));
|
|
5
5
|
}
|
|
@@ -239,7 +239,7 @@ const I = "#2563eb", L = "editora:ui-color-picker:recent", tt = `
|
|
|
239
239
|
--ui-cp-border: #334155;
|
|
240
240
|
--ui-cp-text: #e2e8f0;
|
|
241
241
|
--ui-cp-muted: #93a4bd;
|
|
242
|
-
--ui-cp-accent: #93c5fd;
|
|
242
|
+
--ui-cp-accent: var(--ui-color-accent-on-dark, #93c5fd);
|
|
243
243
|
--ui-cp-checker-a: #475569;
|
|
244
244
|
--ui-cp-checker-b: #334155;
|
|
245
245
|
--ui-cp-shadow: 0 18px 40px rgba(2, 6, 23, 0.55);
|