@sula-tech/webcomponents 0.21.0 → 0.22.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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sula-avatar_32.cjs.entry.js +105 -66
- package/dist/cjs/sula-avatar_32.cjs.entry.js.map +1 -1
- package/dist/cjs/sula-toast-stack.cjs.entry.js +4 -4
- package/dist/cjs/sula-toast.cjs.entry.js +2 -2
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/sula-calendar/sula-calendar.css +1 -1
- package/dist/collection/components/sula-calendar/sula-calendar.js +47 -2
- package/dist/collection/components/sula-calendar/sula-calendar.js.map +1 -1
- package/dist/collection/components/sula-calendar/sula-calendar.stories.js +36 -0
- package/dist/collection/components/sula-calendar/sula-calendar.stories.js.map +1 -1
- package/dist/collection/components/sula-checkbox/sula-checkbox.js +3 -3
- package/dist/collection/components/sula-chip/model/sula-chip.model.js +5 -0
- package/dist/collection/components/sula-chip/model/sula-chip.model.js.map +1 -1
- package/dist/collection/components/sula-chip/sula-chip.css +1 -1
- package/dist/collection/components/sula-chip/sula-chip.js +40 -5
- package/dist/collection/components/sula-chip/sula-chip.js.map +1 -1
- package/dist/collection/components/sula-chip/sula-chip.stories.js +14 -1
- package/dist/collection/components/sula-chip/sula-chip.stories.js.map +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.js +3 -3
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-icon/sula-icon.js +1 -1
- package/dist/collection/components/sula-icon-picker/sula-icon-picker.js +2 -2
- package/dist/collection/components/sula-loader/sula-loader.js +1 -1
- package/dist/collection/components/sula-menu/sula-menu.js +8 -8
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +1 -1
- package/dist/collection/components/sula-progress-bar/sula-progress-bar.js +2 -2
- package/dist/collection/components/sula-radio-button/sula-radio-button.js +2 -2
- package/dist/collection/components/sula-search-bar/sula-search-bar.js +2 -2
- package/dist/collection/components/sula-segmented-control/sula-segmented-control.js +1 -1
- package/dist/collection/components/sula-switch/sula-switch.js +4 -4
- package/dist/collection/components/sula-table/sula-table.js +3 -3
- package/dist/collection/components/sula-table-body/sula-table-body.js +1 -1
- package/dist/collection/components/sula-table-cell/sula-table-cell.js +2 -2
- package/dist/collection/components/sula-table-head-cell/sula-table-head-cell.js +2 -2
- package/dist/collection/components/sula-table-header/sula-table-header.js +1 -1
- package/dist/collection/components/sula-table-row/sula-table-row.js +1 -1
- package/dist/collection/components/sula-tag/sula-tag.js +3 -3
- package/dist/collection/components/sula-textarea/sula-textarea.js +6 -6
- package/dist/collection/components/sula-textfield/sula-textfield.css +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.js +2 -2
- package/dist/collection/components/sula-tiles/sula-tiles.js +1 -1
- package/dist/collection/components/sula-timeline-list/sula-timeline-list.js +1 -1
- package/dist/collection/components/sula-toast/sula-toast.js +2 -2
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.js +4 -4
- package/dist/collection/components/sula-toggle/sula-toggle.js +1 -1
- package/dist/collection/components/sula-tooltip/sula-tooltip.js +1 -1
- package/dist/components/{p-DtVQ10Ux.js → p-CXm0qTFO.js} +4 -4
- package/dist/components/{p-DtVQ10Ux.js.map → p-CXm0qTFO.js.map} +1 -1
- package/dist/components/{p-B_NGmHsm.js → p-D5G0T47I.js} +5 -5
- package/dist/components/{p-B_NGmHsm.js.map → p-D5G0T47I.js.map} +1 -1
- package/dist/components/{p-rm8YKiRh.js → p-DGAtNvje.js} +6 -6
- package/dist/components/p-DGAtNvje.js.map +1 -0
- package/dist/components/{p-VozP-C7p.js → p-DwyYG9oc.js} +5 -5
- package/dist/components/{p-VozP-C7p.js.map → p-DwyYG9oc.js.map} +1 -1
- package/dist/components/{p-rCU8ay8s.js → p-MPkJUrNl.js} +3 -3
- package/dist/components/{p-rCU8ay8s.js.map → p-MPkJUrNl.js.map} +1 -1
- package/dist/components/{p-BlH9b-mx.js → p-fAOl4EhI.js} +5 -5
- package/dist/components/{p-BlH9b-mx.js.map → p-fAOl4EhI.js.map} +1 -1
- package/dist/components/{p-DaG0HavP.js → p-jplrktAF.js} +4 -4
- package/dist/components/{p-DaG0HavP.js.map → p-jplrktAF.js.map} +1 -1
- package/dist/components/{p-BjgwRn5o.js → p-t7f_qmad.js} +7 -7
- package/dist/components/{p-BjgwRn5o.js.map → p-t7f_qmad.js.map} +1 -1
- package/dist/components/sula-avatar.js +1 -1
- package/dist/components/sula-badge.js +1 -1
- package/dist/components/sula-breadcrumb.js +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-calendar.js +31 -5
- package/dist/components/sula-calendar.js.map +1 -1
- package/dist/components/sula-checkbox.js +4 -4
- package/dist/components/sula-chip.js +22 -7
- package/dist/components/sula-chip.js.map +1 -1
- package/dist/components/sula-dropdown.js +1 -1
- package/dist/components/sula-icon-picker.js +6 -6
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-loader.js +1 -1
- package/dist/components/sula-menu-select-list.js +1 -1
- package/dist/components/sula-menu.js +9 -9
- package/dist/components/sula-modal.js +3 -3
- package/dist/components/sula-progress-bar.js +3 -3
- package/dist/components/sula-radio-button.js +2 -2
- package/dist/components/sula-search-bar.js +1 -1
- package/dist/components/sula-segmented-control.js +2 -2
- package/dist/components/sula-switch.js +4 -4
- package/dist/components/sula-table-body.js +1 -1
- package/dist/components/sula-table-cell.js +2 -2
- package/dist/components/sula-table-head-cell.js +2 -2
- package/dist/components/sula-table-header.js +1 -1
- package/dist/components/sula-table-row.js +1 -1
- package/dist/components/sula-table.js +3 -3
- package/dist/components/sula-tag.js +4 -4
- package/dist/components/sula-textarea.js +6 -6
- package/dist/components/sula-textfield.js +1 -1
- package/dist/components/sula-tiles.js +2 -2
- package/dist/components/sula-timeline-list.js +2 -2
- package/dist/components/sula-toast-stack.js +6 -6
- package/dist/components/sula-toast.js +1 -1
- package/dist/components/sula-toggle.js +2 -2
- package/dist/components/sula-tooltip.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sula-avatar_32.entry.js +105 -66
- package/dist/esm/sula-avatar_32.entry.js.map +1 -1
- package/dist/esm/sula-toast-stack.entry.js +4 -4
- package/dist/esm/sula-toast.entry.js +2 -2
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-calendar/sula-calendar.d.ts +6 -0
- package/dist/types/components/sula-calendar/sula-calendar.stories.d.ts +10 -0
- package/dist/types/components/sula-chip/model/sula-chip.model.d.ts +4 -0
- package/dist/types/components/sula-chip/sula-chip.d.ts +5 -1
- package/dist/types/components/sula-chip/sula-chip.stories.d.ts +12 -1
- package/dist/types/components.d.ts +22 -2
- package/dist/webcomponents/{p-0004eff8.entry.js → p-22b10b91.entry.js} +264 -203
- package/dist/webcomponents/p-22b10b91.entry.js.map +1 -0
- package/dist/webcomponents/{p-9a8a1133.entry.js → p-c552c435.entry.js} +16 -16
- package/dist/webcomponents/{p-aafb83bd.entry.js → p-df271629.entry.js} +6 -6
- package/dist/webcomponents/webcomponents.esm.js +5 -3
- package/package.json +1 -1
- package/dist/components/p-rm8YKiRh.js.map +0 -1
- package/dist/webcomponents/p-0004eff8.entry.js.map +0 -1
- /package/dist/webcomponents/{p-9a8a1133.entry.js.map → p-c552c435.entry.js.map} +0 -0
- /package/dist/webcomponents/{p-aafb83bd.entry.js.map → p-df271629.entry.js.map} +0 -0
|
@@ -272,7 +272,7 @@ const SulaToastStack = class {
|
|
|
272
272
|
render() {
|
|
273
273
|
const expanded = this.expanded;
|
|
274
274
|
const visibleItems = this.visibleItems;
|
|
275
|
-
return (index.h(index.Host, { key: '
|
|
275
|
+
return (index.h(index.Host, { key: 'f80b3b3f370e40ba87a261825af7ee9f55fe99dc' }, index.h("section", { key: 'd5a233e0b204060a1bde1bb09eac204a5c8f5ca7', ref: el => (this.region = el), role: "region", "aria-label": "Notifica\u00E7\u00F5es", tabIndex: 0, class: "toast-region w-full rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-feedback-informational focus-visible:outline-offset-2", onMouseEnter: () => {
|
|
276
276
|
if (!this.noHover)
|
|
277
277
|
this.hovering = true;
|
|
278
278
|
}, onMouseLeave: () => (this.hovering = false), onPointerDown: () => {
|
|
@@ -281,7 +281,7 @@ const SulaToastStack = class {
|
|
|
281
281
|
}, onKeyDown: () => {
|
|
282
282
|
this.keyboardInteraction = true;
|
|
283
283
|
this.stopRetainingPointerExpansion();
|
|
284
|
-
}, onFocusin: () => (this.focused = true), onFocusout: this.handleFocusOut }, index.h("div", { key: '
|
|
284
|
+
}, onFocusin: () => (this.focused = true), onFocusout: this.handleFocusOut }, index.h("div", { key: 'e409f3009f2c19839304f06b05b0409d9cc6a819', ref: el => (this.list = el), class: { 'toast-list relative flex flex-col gap-12': true, 'toast-list--collapsed': !expanded }, style: {
|
|
285
285
|
'--toast-layer-offset': `${Math.max(0, visibleItems.length - 1) * LAYER_OFFSET}px`,
|
|
286
286
|
} }, visibleItems.map((item, index$1) => {
|
|
287
287
|
var _a, _b, _c, _d;
|
|
@@ -295,9 +295,9 @@ const SulaToastStack = class {
|
|
|
295
295
|
'--toast-depth': String(depth),
|
|
296
296
|
'--toast-width': `${100 - Math.min(depth, MAX_VISIBLE_LAYERS - 1) * LAYER_WIDTH_STEP}%`,
|
|
297
297
|
} }, index.h("sula-toast", { toastTitle: item.title, message: (_a = item.message) !== null && _a !== void 0 ? _a : '', type: item.type, icon: item.icon, actionText: (_b = item.actionText) !== null && _b !== void 0 ? _b : '', closable: (_c = item.closable) !== null && _c !== void 0 ? _c : true, duration: item.duration, closeLabel: (_d = item.closeLabel) !== null && _d !== void 0 ? _d : 'Fechar notificação', paused: covered || this.hovering || this.focused || this.retainingPointerExpansion, announcement: "off", animated: depth === 0, onToastDismissRequested: event => this.dismiss(event, item.id), onToastAction: event => this.action(event, item.id) })));
|
|
298
|
-
}))), index.h("div", { key: '
|
|
298
|
+
}))), index.h("div", { key: '2b2eadddfde8a784d9c2f1c7f431d82619eb57dc', class: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "false", "aria-relevant": "additions text" }, this.announcements
|
|
299
299
|
.filter(record => record.priority === 'polite')
|
|
300
|
-
.map(record => (index.h("p", { key: record.version }, record.text)))), index.h("div", { key: '
|
|
300
|
+
.map(record => (index.h("p", { key: record.version }, record.text)))), index.h("div", { key: '0207426e568669405be5a1d99c47338d72607bdf', class: "sr-only", role: "alert", "aria-live": "assertive", "aria-atomic": "false", "aria-relevant": "additions text" }, this.announcements
|
|
301
301
|
.filter(record => record.priority === 'assertive')
|
|
302
302
|
.map(record => (index.h("p", { key: record.version }, record.text))))));
|
|
303
303
|
}
|
|
@@ -172,10 +172,10 @@ const SulaToast = class {
|
|
|
172
172
|
}
|
|
173
173
|
render() {
|
|
174
174
|
const intent = this.intent;
|
|
175
|
-
return (index.h(index.Host, { key: '
|
|
175
|
+
return (index.h(index.Host, { key: 'be9ec64bd756310cbc5a41d218ff47c53f04de54', onMouseEnter: () => this.setHover(true), onMouseLeave: () => this.setHover(false), onFocusin: () => {
|
|
176
176
|
this.focused = true;
|
|
177
177
|
this.updateTimeout();
|
|
178
|
-
}, onFocusout: this.handleFocusOut }, index.h("div", { key: '
|
|
178
|
+
}, onFocusout: this.handleFocusOut }, index.h("div", { key: '712abcedfd6615db3de20ac66acd872f34db2737', part: "container", class: `toast-surface relative isolate box-border flex items-center w-full p-16 gap-12 rounded-sm border bg-opacity-toast ${intent.border} ${this.animated ? 'toast-surface--animated' : ''}`, style: { '--toast-border-color': intent.borderColor } }, this.icon && (index.h("div", { key: '656903d50bf672c3058c1ff1aa564a8f25ec4a71', part: "icon", "aria-hidden": "true", class: `flex shrink-0 items-center justify-center w-44 h-44 rounded-xxl ${intent.background}` }, index.h("sula-icon", { key: '649ec85c3ffe3c1d8ba49301df36dafcef68df19', icon: this.icon, customClass: `text-2xl ${intent.color}`, class: "flex leading-none" }))), index.h("div", { key: '7c0259e7e101e37f740fc44f56ed6b8aba89ebce', part: "content", class: `flex min-w-0 flex-1 flex-col gap-8 ${this.closable ? 'pr-48' : ''}` }, index.h("div", { key: 'a8d4be58976ba60577b72fb18cf5adde5302e4a9', class: "flex flex-col gap-4" }, this.toastTitle && (index.h("p", { key: 'a68c9bef629be007bf7e8e2fe9e171103f0da293', class: "toast-copy toast-title text-label-medium-bold text-text-primary", title: this.toastTitle }, this.toastTitle)), this.message && (index.h("p", { key: 'fd3df25e0dbb73a322e55f5464699c6b36dc558c', class: "toast-copy toast-message text-label-medium-regular text-text-secondary", title: this.message }, this.message))), this.actionText && (index.h("button", { key: 'a64c83ed689f099928ed8e89ddfbd1a29f9d7d37', type: "button", class: `toast-copy toast-action self-start text-left text-label-medium-bold text-text-link underline rounded ${FOCUS_RING_CLASSES}`, title: this.actionText, onClick: () => this.toastAction.emit() }, this.actionText))), this.closable && (index.h("button", { key: 'ec4cb316444689bc05aa176f86b51c1b6d5e88af', part: "close-button", type: "button", "aria-label": this.closeLabel, class: `absolute top-16 right-16 flex items-center justify-center w-24 h-24 rounded ${intent.color} ${FOCUS_RING_CLASSES}`, onClick: () => this.toastDismissRequested.emit({ reason: 'close' }) }, index.h("sula-icon", { key: '9be25e6384c6a154a359a15ab2ec0d732befe282', "aria-hidden": "true", icon: "ph ph-x", customClass: "text-2xl", class: "flex leading-none" }))), index.h("svg", { key: '8996d6309d39d79e5db7671fcbd8c1b6cbfeda5c', class: "toast-border", "aria-hidden": "true", focusable: "false" }, index.h("rect", { key: '141c0776c32283daef59b261b04e4059beee3aca', class: "toast-border__path", pathLength: "1" }))), index.h("div", { key: '318987642827371f72b5754827c8019a6a1b968a', class: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "true" }, this.announcement === 'polite' ? this.announcedText : ''), index.h("div", { key: '6c1e12a9c15f11afb7f517d911441a868978c2ba', class: "sr-only", role: "alert", "aria-live": "assertive", "aria-atomic": "true" }, this.announcement === 'assertive' ? this.announcedText : '')));
|
|
179
179
|
}
|
|
180
180
|
get hostElement() { return index.getElement(this); }
|
|
181
181
|
static get watchers() { return {
|
|
@@ -18,7 +18,7 @@ var patchBrowser = () => {
|
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(async (options) => {
|
|
20
20
|
await index.globalScripts();
|
|
21
|
-
return index.bootstrapLazy([["sula-avatar_32.cjs",[[1,"sula-icon-picker",{"label":[1025],"required":[1028],"disabled":[1028],"error":[1025],"value":[1025],"showSearch":[4,"show-search"],"searchPlaceholder":[1,"search-placeholder"],"icons":[1040],"maxVisibleIcons":[2,"max-visible-icons"],"menuMaxHeight":[2,"menu-max-height"],"selectedIcon":[32],"searchTerm":[32]},null,{"value":["handleValueChange"],"icons":["handleIconsChange"]}],[1,"sula-modal",{"opened":[1028],"blockBodyScroll":[1028,"block-body-scroll"],"closeOnClickOutside":[1028,"close-on-click-outside"],"type":[1],"headerIcon":[1,"header-icon"],"modalTitle":[1,"modal-title"],"promoImage":[1,"promo-image"],"subTitle":[1,"sub-title"],"primaryButtonText":[1,"primary-button-text"],"secondaryButtonText":[1,"secondary-button-text"],"slotOverflow":[1,"slot-overflow"],"isAnimating":[32],"shouldRender":[32]},null,{"opened":["handleOpenedChange"]}],[1,"sula-calendar",{"label":[1],"value":[1025],"placeholder":[1],"disabled":[4],"helpText":[1,"help-text"],"status":[1],"locale":[1],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"range":[4],"allowTyping":[4,"allow-typing"],"inline":[4],"firstDayOfWeek":[2,"first-day-of-week"],"closeOnSelect":[4,"close-on-select"],"showCalendar":[32],"openUpward":[32],"viewMonth":[32],"viewYear":[32],"hoverDate":[32]},[[4,"click","handleDocumentClick"],[4,"keydown","handleDocumentKeydown"]],{"value":["handleValueChange"]}],[1,"sula-chip",{"text":[1025],"appearance":[1025],"disabled":[1028],"items":[1040],"selected":[1028],"isFocused":[32],"showItems":[32]},[[4,"click","handleDocumentClick"]]],[1,"sula-avatar",{"size":[1],"imageUrl":[1,"image-url"],"text":[1],"icon":[1]}],[1,"sula-badge",{"status":[1025],"size":[1025],"type":[1025],"text":[1025],"icon":[1025],"hasSlotContent":[32]}],[1,"sula-breadcrumb",{"items":[1040]}],[1,"sula-checkbox",{"type":[1025],"label":[1025],"subTitle":[1025,"sub-title"],"disabled":[1028],"checked":[1028],"isFocus":[32]}],[1,"sula-menu",{"menuTitle":[1,"menu-title"],"image":[1],"width":[1],"density":[1],"labelOverflow":[1,"label-overflow"],"items":[1040],"collapsed":[32],"previewExpanded":[32],"selectedItem":[32]},null,{"items":["syncSelectedItemFromItems"]}],[1,"sula-progress-bar",{"appearance":[1025],"state":[1025],"topLabel":[1025,"top-label"],"bottomLabel":[1025,"bottom-label"],"progress":[1026],"showProgress":[1028,"show-progress"]},null,{"progress":["validateProgress"]}],[1,"sula-segmented-control",{"items":[1040],"type":[1025],"size":[1025],"color":[1025]}],[1,"sula-tag",{"label":[1025],"icon":[1025],"iconStatus":[1025,"icon-status"],"size":[1025],"appearance":[1025],"fontWeight":[1025,"font-weight"]}],[1,"sula-tiles",{"type":[1],"size":[1],"ellipsis":[4],"icon":[1],"text":[1],"subText":[1,"sub-text"],"disabled":[4]}],[1,"sula-timeline-list",{"sulaTimelineList":[1040,"sula-timeline-list"]}],[1,"sula-toggle",{"selected":[1028],"buttonDisabled":[1028,"button-disabled"],"icon":[1]}],[1,"sula-tooltip",{"text":[1],"position":[1],"icon":[1],"iconClass":[1,"icon-class"],"focused":[4],"trigger":[1],"appendToBody":[4,"append-to-body"],"isVisible":[32]},null,{"text":["handleTextChange"]}],[1,"sula-radio-button",{"checked":[1028],"label":[1025],"disabled":[1028],"radioIsFocus":[32]}],[1,"sula-switch",{"type":[1025],"active":[1028],"disabled":[1028],"label":[1025],"subTitle":[1025,"sub-title"],"responsive":[4],"isFocus":[32]}],[4,"sula-table",{"density":[1],"equalWidth":[4,"equal-width"],"fullWidth":[4,"full-width"]}],[4,"sula-table-body"],[4,"sula-table-cell"],[4,"sula-table-head-cell"],[4,"sula-table-header"],[4,"sula-table-row"],[1,"sula-textarea",{"value":[1025],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"rows":[2],"isActive":[32],"textValue":[32],"textareaIsFocused":[32],"labelPadding":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"]}],[1,"sula-button",{"text":[1025],"icon":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"appearance":[1025],"type":[1025],"size":[1025],"status":[1025],"loading":[1028],"buttonDisabled":[1028,"button-disabled"],"fullWidth":[1028,"full-width"]}],[1,"sula-dropdown",{"label":[1025],"disabled":[1028],"hasError":[1540,"has-error"],"items":[1040],"value":[1040],"searchable":[516],"menuMaxHeight":[2,"menu-max-height"],"contentMaxHeight":[2,"content-max-height"],"customContent":[516,"custom-content"],"closeOnSelect":[4,"close-on-select"],"showContent":[1540,"show-content"],"selectedItem":[32],"isFocused":[32],"searchTerm":[32],"filteredItems":[32],"openUpward":[32]},[[4,"click","handleDocumentClick"],[9,"resize","handleWindowResize"]],{"value":["handleValueChange"],"showContent":["handleShowContentChange"]}],[1,"sula-search-bar",{"value":[1025],"searchBarStyle":[1025,"search-bar-style"],"placeholder":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"isFocused":[32],"textValue":[32]}],[1,"sula-textfield",{"value":[1025],"type":[1],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"readOnly":[4,"read-only"],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"icon":[1],"maskPattern":[1,"mask-pattern"],"maskPatternSwitchMaxLength":[2,"mask-pattern-switch-max-length"],"inputIsOpen":[32],"textValue":[32],"showPassword":[32],"inputIsFocused":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"],"maskPattern":["watchMaskPatternHandler"],"maskPatternSwitchMaxLength":["watchMaskPatternSwitchMaxLengthHandler"]}],[1,"sula-loader",{"size":[1],"animationInstance":[32]}],[1,"sula-menu-select-list",{"items":[1040],"fullWidth":[4,"full-width"],"maxHeight":[2,"max-height"],"selectedValue":[16,"selected-value"]}],[0,"sula-icon",{"icon":[1],"customClass":[1,"custom-class"]}]]],["sula-toast.cjs",[[1,"sula-toast",{"toastTitle":[1,"toast-title"],"message":[1],"type":[1],"icon":[1],"actionText":[1,"action-text"],"closable":[4],"duration":[2],"paused":[4],"animated":[4],"announcement":[1],"closeLabel":[1,"close-label"],"announcedText":[32]},[[4,"visibilitychange","updateTimeout"]],{"toastTitle":["handleContentChange"],"message":["handleContentChange"],"actionText":["handleContentChange"],"duration":["handleContentChange"],"announcement":["updateAnnouncement"],"paused":["updateTimeout"]}]]],["sula-toast-stack.cjs",[[1,"sula-toast-stack",{"items":[16],"hovering":[32],"focused":[32],"noHover":[32],"retainingPointerExpansion":[32],"announcements":[32]},null,{"items":["handleItemsChange"]}]]]], options);
|
|
21
|
+
return index.bootstrapLazy([["sula-avatar_32.cjs",[[1,"sula-icon-picker",{"label":[1025],"required":[1028],"disabled":[1028],"error":[1025],"value":[1025],"showSearch":[4,"show-search"],"searchPlaceholder":[1,"search-placeholder"],"icons":[1040],"maxVisibleIcons":[2,"max-visible-icons"],"menuMaxHeight":[2,"menu-max-height"],"selectedIcon":[32],"searchTerm":[32]},null,{"value":["handleValueChange"],"icons":["handleIconsChange"]}],[1,"sula-modal",{"opened":[1028],"blockBodyScroll":[1028,"block-body-scroll"],"closeOnClickOutside":[1028,"close-on-click-outside"],"type":[1],"headerIcon":[1,"header-icon"],"modalTitle":[1,"modal-title"],"promoImage":[1,"promo-image"],"subTitle":[1,"sub-title"],"primaryButtonText":[1,"primary-button-text"],"secondaryButtonText":[1,"secondary-button-text"],"slotOverflow":[1,"slot-overflow"],"isAnimating":[32],"shouldRender":[32]},null,{"opened":["handleOpenedChange"]}],[1,"sula-calendar",{"label":[1],"value":[1025],"placeholder":[1],"disabled":[4],"helpText":[1,"help-text"],"status":[1],"locale":[1],"minDate":[1,"min-date"],"maxDate":[1,"max-date"],"range":[4],"allowTyping":[4,"allow-typing"],"inline":[4],"compact":[4],"firstDayOfWeek":[2,"first-day-of-week"],"closeOnSelect":[4,"close-on-select"],"showCalendar":[32],"openUpward":[32],"viewMonth":[32],"viewYear":[32],"hoverDate":[32]},[[4,"click","handleDocumentClick"],[4,"keydown","handleDocumentKeydown"]],{"value":["handleValueChange"]}],[1,"sula-chip",{"text":[1025],"appearance":[1025],"disabled":[1028],"items":[1040],"itemsPlacement":[1025,"items-placement"],"selected":[1028],"isFocused":[32],"showItems":[32]},[[4,"click","handleDocumentClick"]]],[1,"sula-avatar",{"size":[1],"imageUrl":[1,"image-url"],"text":[1],"icon":[1]}],[1,"sula-badge",{"status":[1025],"size":[1025],"type":[1025],"text":[1025],"icon":[1025],"hasSlotContent":[32]}],[1,"sula-breadcrumb",{"items":[1040]}],[1,"sula-checkbox",{"type":[1025],"label":[1025],"subTitle":[1025,"sub-title"],"disabled":[1028],"checked":[1028],"isFocus":[32]}],[1,"sula-menu",{"menuTitle":[1,"menu-title"],"image":[1],"width":[1],"density":[1],"labelOverflow":[1,"label-overflow"],"items":[1040],"collapsed":[32],"previewExpanded":[32],"selectedItem":[32]},null,{"items":["syncSelectedItemFromItems"]}],[1,"sula-progress-bar",{"appearance":[1025],"state":[1025],"topLabel":[1025,"top-label"],"bottomLabel":[1025,"bottom-label"],"progress":[1026],"showProgress":[1028,"show-progress"]},null,{"progress":["validateProgress"]}],[1,"sula-segmented-control",{"items":[1040],"type":[1025],"size":[1025],"color":[1025]}],[1,"sula-tag",{"label":[1025],"icon":[1025],"iconStatus":[1025,"icon-status"],"size":[1025],"appearance":[1025],"fontWeight":[1025,"font-weight"]}],[1,"sula-tiles",{"type":[1],"size":[1],"ellipsis":[4],"icon":[1],"text":[1],"subText":[1,"sub-text"],"disabled":[4]}],[1,"sula-timeline-list",{"sulaTimelineList":[1040,"sula-timeline-list"]}],[1,"sula-toggle",{"selected":[1028],"buttonDisabled":[1028,"button-disabled"],"icon":[1]}],[1,"sula-tooltip",{"text":[1],"position":[1],"icon":[1],"iconClass":[1,"icon-class"],"focused":[4],"trigger":[1],"appendToBody":[4,"append-to-body"],"isVisible":[32]},null,{"text":["handleTextChange"]}],[1,"sula-radio-button",{"checked":[1028],"label":[1025],"disabled":[1028],"radioIsFocus":[32]}],[1,"sula-switch",{"type":[1025],"active":[1028],"disabled":[1028],"label":[1025],"subTitle":[1025,"sub-title"],"responsive":[4],"isFocus":[32]}],[4,"sula-table",{"density":[1],"equalWidth":[4,"equal-width"],"fullWidth":[4,"full-width"]}],[4,"sula-table-body"],[4,"sula-table-cell"],[4,"sula-table-head-cell"],[4,"sula-table-header"],[4,"sula-table-row"],[1,"sula-textarea",{"value":[1025],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"rows":[2],"isActive":[32],"textValue":[32],"textareaIsFocused":[32],"labelPadding":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"]}],[1,"sula-button",{"text":[1025],"icon":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"appearance":[1025],"type":[1025],"size":[1025],"status":[1025],"loading":[1028],"buttonDisabled":[1028,"button-disabled"],"fullWidth":[1028,"full-width"]}],[1,"sula-dropdown",{"label":[1025],"disabled":[1028],"hasError":[1540,"has-error"],"items":[1040],"value":[1040],"searchable":[516],"menuMaxHeight":[2,"menu-max-height"],"contentMaxHeight":[2,"content-max-height"],"customContent":[516,"custom-content"],"closeOnSelect":[4,"close-on-select"],"showContent":[1540,"show-content"],"selectedItem":[32],"isFocused":[32],"searchTerm":[32],"filteredItems":[32],"openUpward":[32]},[[4,"click","handleDocumentClick"],[9,"resize","handleWindowResize"]],{"value":["handleValueChange"],"showContent":["handleShowContentChange"]}],[1,"sula-search-bar",{"value":[1025],"searchBarStyle":[1025,"search-bar-style"],"placeholder":[1025],"leftIcon":[1025,"left-icon"],"rightIcon":[1025,"right-icon"],"isFocused":[32],"textValue":[32]}],[1,"sula-textfield",{"value":[1025],"type":[1],"status":[1025],"label":[1],"placeholder":[1],"disabled":[1028],"readOnly":[4,"read-only"],"helpText":[1,"help-text"],"maxLength":[2,"max-length"],"icon":[1],"maskPattern":[1,"mask-pattern"],"maskPatternSwitchMaxLength":[2,"mask-pattern-switch-max-length"],"inputIsOpen":[32],"textValue":[32],"showPassword":[32],"inputIsFocused":[32]},[[4,"click","handleClick"]],{"value":["watchValueHandler"],"maskPattern":["watchMaskPatternHandler"],"maskPatternSwitchMaxLength":["watchMaskPatternSwitchMaxLengthHandler"]}],[1,"sula-loader",{"size":[1],"animationInstance":[32]}],[1,"sula-menu-select-list",{"items":[1040],"fullWidth":[4,"full-width"],"maxHeight":[2,"max-height"],"selectedValue":[16,"selected-value"]}],[0,"sula-icon",{"icon":[1],"customClass":[1,"custom-class"]}]]],["sula-toast.cjs",[[1,"sula-toast",{"toastTitle":[1,"toast-title"],"message":[1],"type":[1],"icon":[1],"actionText":[1,"action-text"],"closable":[4],"duration":[2],"paused":[4],"animated":[4],"announcement":[1],"closeLabel":[1,"close-label"],"announcedText":[32]},[[4,"visibilitychange","updateTimeout"]],{"toastTitle":["handleContentChange"],"message":["handleContentChange"],"actionText":["handleContentChange"],"duration":["handleContentChange"],"announcement":["updateAnnouncement"],"paused":["updateTimeout"]}]]],["sula-toast-stack.cjs",[[1,"sula-toast-stack",{"items":[16],"hovering":[32],"focused":[32],"noHover":[32],"retainingPointerExpansion":[32],"announcements":[32]},null,{"items":["handleItemsChange"]}]]]], options);
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
exports.setNonce = index.setNonce;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{font-family:Figtree;line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:host{display:block}.calendar-panel{box-shadow:0 4px 19.7px 0 var(--color-box-shadow-shadow-color-2)}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-opacity-toast:#ffffff45;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.inset-x-0{left:0;right:0}.inset-y-0{bottom:0;top:0}.bottom-full{bottom:100%}.left-0{left:0}.right-0{right:0}.top-full{top:100%}.z-50{z-index:50}.mb-8{margin-bottom:.5rem}.mt-8{margin-top:.5rem}.inline{display:inline}.flex{display:flex}.grid{display:grid}.h-22{height:1.375rem}.h-28{height:1.75rem}.h-36{height:2.25rem}.w-1\/2{width:50%}.w-28{width:1.75rem}.w-36{width:2.25rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-12{gap:.75rem}.gap-24{gap:1.5rem}.gap-y-8{row-gap:.5rem}.rounded-lg{border-radius:2.5rem}.rounded-xs{border-radius:.5rem}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-brand-primary{border-color:var(--color-brand-primary)}.border-line-general{border-color:var(--color-line-general)}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}.bg-surface-body{background-color:var(--color-surface-body)}.bg-surface-on-body-brand{background-color:var(--color-surface-on-body-brand)}.p-24{padding:1.5rem}.px-4{padding-left:.25rem;padding-right:.25rem}.pt-8{padding-top:.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-label-medium-regular{font-size:1rem;font-weight:400;letter-spacing:0;line-height:20px}.text-label-small-regular{font-size:.875rem;font-weight:400;letter-spacing:0;line-height:16px}.capitalize{text-transform:capitalize}.text-neutral-neutral-1{color:var(--color-neutral-neutral-1)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.line-through{text-decoration-line:line-through}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format("truetype")}.mt-4{margin-top:.25rem}.hidden{display:none}.h-\[72px\]{height:72px}.cursor-pointer{cursor:pointer}.rounded-sm{border-radius:.75rem}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-transparent{background-color:transparent}.px-16{padding-left:1rem;padding-right:1rem}.pr-12{padding-right:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-feedback-error{color:var(--color-feedback-error)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.caret-brand-primary{caret-color:var(--color-brand-primary)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}
|
|
1
|
+
*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{font-family:Figtree;line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:host{display:block}.calendar-panel{box-shadow:0 4px 19.7px 0 var(--color-box-shadow-shadow-color-2)}.calendar-panel.calendar-panel--compact{max-width:calc(100vw - 16px);width:356px}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-opacity-toast:#ffffff45;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.inset-x-0{left:0;right:0}.inset-y-0{bottom:0;top:0}.bottom-full{bottom:100%}.left-0{left:0}.right-0{right:0}.top-full{top:100%}.z-50{z-index:50}.mb-8{margin-bottom:.5rem}.mt-8{margin-top:.5rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.h-22{height:1.375rem}.h-28{height:1.75rem}.h-36{height:2.25rem}.h-40{height:2.5rem}.w-1\/2{width:50%}.w-28{width:1.75rem}.w-36{width:2.25rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-12{gap:.75rem}.gap-24{gap:1.5rem}.gap-8{gap:.5rem}.gap-y-8{row-gap:.5rem}.whitespace-nowrap{white-space:nowrap}.rounded-lg{border-radius:2.5rem}.rounded-xs{border-radius:.5rem}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-brand-primary{border-color:var(--color-brand-primary)}.border-line-general{border-color:var(--color-line-general)}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}.bg-surface-body{background-color:var(--color-surface-body)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.bg-surface-on-body-brand{background-color:var(--color-surface-on-body-brand)}.p-24{padding:1.5rem}.px-16{padding-left:1rem;padding-right:1rem}.px-4{padding-left:.25rem;padding-right:.25rem}.py-2{padding-bottom:.125rem;padding-top:.125rem}.pt-8{padding-top:.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-label-medium-bold{font-size:1rem;font-weight:700;letter-spacing:0;line-height:20px}.text-label-medium-regular{font-size:1rem;font-weight:400;letter-spacing:0;line-height:20px}.text-label-small-regular{font-size:.875rem;font-weight:400;letter-spacing:0;line-height:16px}.capitalize{text-transform:capitalize}.text-neutral-neutral-1{color:var(--color-neutral-neutral-1)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.line-through{text-decoration-line:line-through}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format("truetype")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local("Figtree"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format("truetype")}.mt-4{margin-top:.25rem}.hidden{display:none}.h-\[72px\]{height:72px}.cursor-pointer{cursor:pointer}.rounded-sm{border-radius:.75rem}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-transparent{background-color:transparent}.pr-12{padding-right:.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-feedback-error{color:var(--color-feedback-error)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.caret-brand-primary{caret-color:var(--color-brand-primary)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}
|
|
@@ -34,6 +34,10 @@ export class SulaCalendar {
|
|
|
34
34
|
* Renders only the calendar panel, without the input field
|
|
35
35
|
*/
|
|
36
36
|
this.inline = false;
|
|
37
|
+
/**
|
|
38
|
+
* Renders a smaller chip-like trigger showing only the selected date (`DD/MM/YY`), instead of the input field
|
|
39
|
+
*/
|
|
40
|
+
this.compact = false;
|
|
37
41
|
/**
|
|
38
42
|
* First day of the week, where 0 is Sunday and 6 is Saturday
|
|
39
43
|
*/
|
|
@@ -48,6 +52,15 @@ export class SulaCalendar {
|
|
|
48
52
|
this.handleFieldClick = () => {
|
|
49
53
|
this.open();
|
|
50
54
|
};
|
|
55
|
+
this.handleCompactClick = (event) => {
|
|
56
|
+
event.stopPropagation();
|
|
57
|
+
if (this.showCalendar) {
|
|
58
|
+
this.close();
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
this.open();
|
|
62
|
+
}
|
|
63
|
+
};
|
|
51
64
|
this.handleFieldKeydown = (event) => {
|
|
52
65
|
if (event.key === 'ArrowDown') {
|
|
53
66
|
event.preventDefault();
|
|
@@ -253,6 +266,13 @@ export class SulaCalendar {
|
|
|
253
266
|
this.hoverDate = null;
|
|
254
267
|
this.calendarClosed.emit();
|
|
255
268
|
}
|
|
269
|
+
getCompactLabel() {
|
|
270
|
+
const { start, end } = this.getRange();
|
|
271
|
+
const short = (date) => this.formatDate(date).replace(/\/\d{2}(\d{2})$/, '/$1');
|
|
272
|
+
if (!start)
|
|
273
|
+
return this.placeholder || this.label || '';
|
|
274
|
+
return this.range && end ? `${short(start)} - ${short(end)}` : short(start);
|
|
275
|
+
}
|
|
256
276
|
changeMonth(step) {
|
|
257
277
|
const date = new Date(this.viewYear, this.viewMonth + step, 1);
|
|
258
278
|
this.viewMonth = date.getMonth();
|
|
@@ -302,14 +322,19 @@ export class SulaCalendar {
|
|
|
302
322
|
}
|
|
303
323
|
renderPanel() {
|
|
304
324
|
return (h("div", { ref: node => (this.panelNode = node), role: this.inline ? 'group' : 'dialog', "aria-label": "Calend\u00E1rio", class: {
|
|
305
|
-
'calendar-panel flex
|
|
325
|
+
'calendar-panel flex flex-col items-center rounded-lg border border-line-general bg-surface-body p-24': true,
|
|
326
|
+
'w-full': !this.compact || this.inline,
|
|
306
327
|
'absolute left-0 z-50': !this.inline,
|
|
328
|
+
'calendar-panel--compact': this.compact && !this.inline,
|
|
307
329
|
'bottom-full mb-8': !this.inline && this.openUpward,
|
|
308
330
|
'top-full mt-8': !this.inline && !this.openUpward,
|
|
309
331
|
} }, h("div", { class: "flex w-full flex-col items-center gap-24" }, this.renderHeader(), h("div", { class: "flex w-full flex-col", role: "grid" }, h("div", { class: "grid grid-cols-7", role: "row" }, this.getWeekdays().map(weekday => (h("div", { role: "columnheader", title: weekday.long, class: "flex h-22 w-full items-center justify-center text-label-small-regular text-text-secondary" }, weekday.short)))), h("div", { role: "rowgroup", class: "grid gap-y-8 pt-8", onMouseLeave: this.handleGridLeave }, this.getWeeks().map(week => (h("div", { class: "grid grid-cols-7", role: "row" }, week.map(day => this.renderDay(day))))))))));
|
|
310
332
|
}
|
|
311
333
|
render() {
|
|
312
|
-
return (h(Host, { key: '
|
|
334
|
+
return (h(Host, { key: '03f17f7e0e68a7229d3aca0eff13974e32653d87', ref: node => (this.node = node) }, h("div", { key: '1a480da01747dedffbfe78831404433cbbd75b18', class: { 'relative': true, 'w-full': !this.compact || this.inline, 'inline-block': this.compact && !this.inline } }, !this.inline && this.compact && (h("button", { key: '8f2bf98089507e52f21add599c865e460adefc24', type: "button", disabled: this.disabled, "aria-haspopup": "dialog", "aria-expanded": this.showCalendar ? 'true' : 'false', "aria-label": this.label, onClick: this.handleCompactClick, class: {
|
|
335
|
+
'flex h-40 items-center justify-center gap-8 rounded-xxl bg-surface-on-body px-16 py-2 text-label-medium-bold text-text-primary': true,
|
|
336
|
+
'cursor-not-allowed opacity-50': this.disabled,
|
|
337
|
+
} }, h("sula-icon", { key: 'c27d9bca935147017996159a75b163c5f082cd96', icon: "ph ph-calendar-dots", customClass: "text-2xl text-text-secondary" }), h("span", { key: '239d70e9d79003484221a43efafdb503cff36fb2', class: "whitespace-nowrap" }, this.getCompactLabel()), h("sula-icon", { key: '13940e9f9c38e8a2be2bccdbf2b701f6db2b7cae', icon: this.showCalendar ? 'ph ph-caret-up' : 'ph ph-caret-down', customClass: "text-base text-text-primary" }))), !this.inline && !this.compact && (h("div", { key: '2cde57cb84d986160f4e6e5209f3e0537bfe4d1d', onClick: this.handleFieldClick, onKeyDown: this.handleFieldKeydown }, h("sula-textfield", { key: '1aea48c63cd5fb65c833b6673690d9672d8b2e5b', label: this.label, value: this.value, placeholder: this.placeholder, disabled: this.disabled, helpText: this.helpText, status: this.getTextfieldStatus(), icon: "ph ph-calendar-blank", maskPattern: this.range ? '99/99/9999 - 99/99/9999' : '99/99/9999', readOnly: !this.allowTyping, onValueChanged: this.handleInputChanged }))), (this.inline || this.showCalendar) && this.renderPanel())));
|
|
313
338
|
}
|
|
314
339
|
static get is() { return "sula-calendar"; }
|
|
315
340
|
static get encapsulation() { return "shadow"; }
|
|
@@ -566,6 +591,26 @@ export class SulaCalendar {
|
|
|
566
591
|
"reflect": false,
|
|
567
592
|
"defaultValue": "false"
|
|
568
593
|
},
|
|
594
|
+
"compact": {
|
|
595
|
+
"type": "boolean",
|
|
596
|
+
"attribute": "compact",
|
|
597
|
+
"mutable": false,
|
|
598
|
+
"complexType": {
|
|
599
|
+
"original": "boolean",
|
|
600
|
+
"resolved": "boolean",
|
|
601
|
+
"references": {}
|
|
602
|
+
},
|
|
603
|
+
"required": false,
|
|
604
|
+
"optional": false,
|
|
605
|
+
"docs": {
|
|
606
|
+
"tags": [],
|
|
607
|
+
"text": "Renders a smaller chip-like trigger showing only the selected date (`DD/MM/YY`), instead of the input field"
|
|
608
|
+
},
|
|
609
|
+
"getter": false,
|
|
610
|
+
"setter": false,
|
|
611
|
+
"reflect": false,
|
|
612
|
+
"defaultValue": "false"
|
|
613
|
+
},
|
|
569
614
|
"firstDayOfWeek": {
|
|
570
615
|
"type": "number",
|
|
571
616
|
"attribute": "first-day-of-week",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sula-calendar.js","sourceRoot":"","sources":["../../../src/components/sula-calendar/sula-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAA+D,kBAAkB,EAAuB,MAAM,6BAA6B,CAAC;AAEnJ,MAAM,YAAY,GAAG,6BAA6B,CAAC;AACnD,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,eAAe,GAAG,OAAO,CAAC;AAOhC,MAAM,OAAO,YAAY;IALzB;QAWE;;WAEG;QACsB,UAAK,GAAW,EAAE,CAAC;QAO5C;;WAEG;QACK,aAAQ,GAAY,KAAK,CAAC;QAOlC;;WAEG;QACK,WAAM,GAAuB,kBAAkB,CAAC,OAAO,CAAC;QAEhE;;WAEG;QACK,WAAM,GAAW,OAAO,CAAC;QAYjC;;WAEG;QACK,UAAK,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACK,gBAAW,GAAY,IAAI,CAAC;QAEpC;;W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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaTextfieldStatus } from '../sula-textfield/model/sula-textfield.model';\nimport { SulaCalendarDay, SulaCalendarMonthChange, SulaCalendarRange, SulaCalendarStatus, SulaCalendarWeekday } from './model/sula-calendar.model';\n\nconst DATE_PATTERN = /^(\\d{2})\\/(\\d{2})\\/(\\d{4})$/;\nconst DAYS_IN_WEEK = 7;\nconst FALLBACK_LOCALE = 'pt-BR';\n\n@Component({\n tag: 'sula-calendar',\n styleUrl: 'sula-calendar.scss',\n shadow: true,\n})\nexport class SulaCalendar {\n /**\n * The calendar field label\n */\n @Prop() label: string;\n\n /**\n * Selected date in the `DD/MM/YYYY` format. In range mode the format is `DD/MM/YYYY - DD/MM/YYYY`\n */\n @Prop({ mutable: true }) value: string = '';\n\n /**\n * The calendar field placeholder\n */\n @Prop() placeholder?: string;\n\n /**\n * The calendar is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The help text displayed below the field\n */\n @Prop() helpText?: string;\n\n /**\n * The calendar field status\n */\n @Prop() status: SulaCalendarStatus = SulaCalendarStatus.Default;\n\n /**\n * Locale used to format month and weekday names\n */\n @Prop() locale: string = 'pt-BR';\n\n /**\n * Earliest selectable date in the `DD/MM/YYYY` format\n */\n @Prop() minDate?: string;\n\n /**\n * Latest selectable date in the `DD/MM/YYYY` format\n */\n @Prop() maxDate?: string;\n\n /**\n * Enables selecting a date range (start and end dates) instead of a single date\n */\n @Prop() range: boolean = false;\n\n /**\n * Allows typing the date directly in the field. When false, the date can only be picked in the calendar\n */\n @Prop() allowTyping: boolean = true;\n\n /**\n * Renders only the calendar panel, without the input field\n */\n @Prop() inline: boolean = false;\n\n /**\n * First day of the week, where 0 is Sunday and 6 is Saturday\n */\n @Prop() firstDayOfWeek: number = 0;\n\n /**\n * Closes the calendar panel after a date is selected\n */\n @Prop() closeOnSelect: boolean = true;\n\n /**\n * Event emitted when a date is selected, with the date in the `DD/MM/YYYY` format\n */\n @Event() dateSelected: EventEmitter<string>;\n\n /**\n * Event emitted in range mode when both the start and end dates are selected, either by picking or by typing. In range mode `valueChanged` is not emitted\n */\n @Event() rangeSelected: EventEmitter<SulaCalendarRange>;\n\n /**\n * Event emitted when the value changes, either by typing or by selecting a date. Not emitted in range mode, use `rangeSelected` instead\n */\n @Event() valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when the displayed month changes\n */\n @Event() monthChanged: EventEmitter<SulaCalendarMonthChange>;\n\n /**\n * Event emitted when the calendar panel is opened\n */\n @Event() calendarOpened: EventEmitter<void>;\n\n /**\n * Event emitted when the calendar panel is closed\n */\n @Event() calendarClosed: EventEmitter<void>;\n\n @State() showCalendar: boolean = false;\n\n @State() openUpward: boolean = false;\n\n @State() viewMonth: number;\n\n @State() viewYear: number;\n\n @State() hoverDate: Date | null = null;\n\n node?: HTMLElement;\n\n panelNode?: HTMLElement;\n\n @Watch('value')\n handleValueChange() {\n this.hoverDate = null;\n\n // keeps the view on the current month while an incomplete date is being typed\n if (this.selectedDate) {\n this.syncViewWithValue();\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (!this.showCalendar || !this.node) return;\n\n if (!event.composedPath().includes(this.node)) {\n this.close();\n }\n }\n\n @Listen('keydown', { target: 'document' })\n handleDocumentKeydown(event: KeyboardEvent) {\n if (this.showCalendar && event.key === 'Escape') {\n this.close();\n }\n }\n\n componentWillLoad() {\n this.syncViewWithValue();\n }\n\n componentDidRender() {\n if (this.showCalendar) {\n this.calculatePanelPosition();\n }\n }\n\n get selectedDate(): Date | null {\n return this.getRange().start;\n }\n\n private getRange(): { start: Date | null; end: Date | null } {\n if (!this.range) {\n return { start: this.parseDate(this.value), end: null };\n }\n\n const [startText, endText] = (this.value ?? '').split('-');\n\n return { start: this.parseDate(startText), end: this.parseDate(endText) };\n }\n\n private syncViewWithValue() {\n const reference = this.selectedDate ?? new Date();\n\n this.viewMonth = reference.getMonth();\n this.viewYear = reference.getFullYear();\n }\n\n private parseDate(value?: string): Date | null {\n const match = DATE_PATTERN.exec((value ?? '').trim());\n if (!match) return null;\n\n const day = Number(match[1]);\n const month = Number(match[2]);\n const year = Number(match[3]);\n const date = new Date(year, month - 1, day, 0, 0, 0, 0);\n\n const isValid = date.getDate() === day && date.getMonth() === month - 1 && date.getFullYear() === year;\n\n return isValid ? date : null;\n }\n\n private formatDate(date: Date): string {\n const day = `${date.getDate()}`.padStart(2, '0');\n const month = `${date.getMonth() + 1}`.padStart(2, '0');\n\n return `${day}/${month}/${date.getFullYear()}`;\n }\n\n private capitalize(text: string): string {\n return text.charAt(0).toUpperCase() + text.slice(1);\n }\n\n private isSameDay(first: Date, second: Date): boolean {\n return first.getDate() === second.getDate() && first.getMonth() === second.getMonth() && first.getFullYear() === second.getFullYear();\n }\n\n private isOutOfRange(date: Date, min: Date | null, max: Date | null): boolean {\n return (!!min && date.getTime() < min.getTime()) || (!!max && date.getTime() > max.getTime());\n }\n\n private get weekStart(): number {\n const value = Math.trunc(Number(this.firstDayOfWeek));\n\n return Number.isFinite(value) ? ((value % DAYS_IN_WEEK) + DAYS_IN_WEEK) % DAYS_IN_WEEK : 0;\n }\n\n // an invalid `locale` would make Intl throw and break the whole render\n private createFormatter(options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n try {\n return new Intl.DateTimeFormat(this.locale, options);\n } catch {\n return new Intl.DateTimeFormat(FALLBACK_LOCALE, options);\n }\n }\n\n getMonthLabel(): string {\n const date = new Date(this.viewYear, this.viewMonth, 1);\n const month = this.createFormatter({ month: 'short' }).format(date).replace(/\\./g, '');\n\n return `${this.capitalize(month)} ${this.viewYear}`;\n }\n\n getWeekdays(): SulaCalendarWeekday[] {\n const shortFormatter = this.createFormatter({ weekday: 'short' });\n const longFormatter = this.createFormatter({ weekday: 'long' });\n\n return Array.from({ length: DAYS_IN_WEEK }, (_, index) => {\n // 2024-01-07 is a Sunday, used as a stable reference to build the weekday sequence\n const date = new Date(2024, 0, 7 + ((index + this.weekStart) % DAYS_IN_WEEK));\n\n return {\n short: this.capitalize(shortFormatter.format(date).replace(/\\./g, '')),\n long: this.capitalize(longFormatter.format(date)),\n };\n });\n }\n\n getWeeks(): SulaCalendarDay[][] {\n const today = new Date();\n const { start, end } = this.getRange();\n const previewEnd = this.range && !!start && !end ? this.hoverDate : null;\n const rangeEnd = end ?? previewEnd;\n const hasRange = this.range && !!start && !!rangeEnd;\n const from = hasRange && start.getTime() > rangeEnd.getTime() ? rangeEnd : start;\n const to = hasRange && start.getTime() > rangeEnd.getTime() ? start : rangeEnd;\n const firstOfMonth = new Date(this.viewYear, this.viewMonth, 1);\n const min = this.parseDate(this.minDate);\n const max = this.parseDate(this.maxDate);\n const offset = (firstOfMonth.getDay() - this.weekStart + DAYS_IN_WEEK) % DAYS_IN_WEEK;\n const daysInMonth = new Date(this.viewYear, this.viewMonth + 1, 0).getDate();\n const totalCells = Math.ceil((offset + daysInMonth) / DAYS_IN_WEEK) * DAYS_IN_WEEK;\n const weeks: SulaCalendarDay[][] = [];\n\n for (let cell = 0; cell < totalCells; cell++) {\n const date = new Date(this.viewYear, this.viewMonth, cell - offset + 1);\n\n const day: SulaCalendarDay = {\n date,\n day: date.getDate(),\n isCurrentMonth: date.getMonth() === this.viewMonth && date.getFullYear() === this.viewYear,\n isSelected: (!!start && this.isSameDay(date, start)) || (this.range && !!end && this.isSameDay(date, end)),\n isRangeStart: hasRange && this.isSameDay(date, from),\n isRangeEnd: hasRange && this.isSameDay(date, to),\n isInRange: hasRange && date.getTime() > from.getTime() && date.getTime() < to.getTime(),\n isRangePreview: !!previewEnd && this.isSameDay(date, previewEnd) && !this.isSameDay(date, start),\n isToday: this.isSameDay(date, today),\n isDisabled: this.isOutOfRange(date, min, max),\n };\n\n if (cell % DAYS_IN_WEEK === 0) weeks.push([]);\n weeks[weeks.length - 1].push(day);\n }\n\n return weeks;\n }\n\n calculatePanelPosition() {\n if (!this.node || this.inline) return;\n\n const rect = this.node.getBoundingClientRect();\n const panelHeight = this.panelNode?.offsetHeight ?? 0;\n const spaceBelow = window.innerHeight - rect.bottom;\n const spaceAbove = rect.top;\n\n this.openUpward = spaceBelow < panelHeight && spaceAbove > spaceBelow;\n }\n\n open() {\n if (this.disabled || this.showCalendar) return;\n\n this.showCalendar = true;\n this.calendarOpened.emit();\n }\n\n close() {\n if (!this.showCalendar) return;\n\n this.showCalendar = false;\n this.hoverDate = null;\n this.calendarClosed.emit();\n }\n\n handleFieldClick = () => {\n this.open();\n };\n\n handleFieldKeydown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.open();\n }\n };\n\n handleInputChanged = (event: CustomEvent<string>) => {\n event.stopPropagation();\n\n const typedValue = event.detail ?? '';\n\n this.value = typedValue;\n\n if (this.range) {\n const { start, end } = this.getRange();\n\n if (start && end && start.getTime() <= end.getTime()) {\n this.rangeSelected.emit({ start: this.formatDate(start), end: this.formatDate(end) });\n }\n\n return;\n }\n\n this.valueChanged.emit(typedValue);\n };\n\n handlePreviousMonth = (event: MouseEvent) => {\n event.stopPropagation();\n this.changeMonth(-1);\n };\n\n handleNextMonth = (event: MouseEvent) => {\n event.stopPropagation();\n this.changeMonth(1);\n };\n\n changeMonth(step: number) {\n const date = new Date(this.viewYear, this.viewMonth + step, 1);\n\n this.viewMonth = date.getMonth();\n this.viewYear = date.getFullYear();\n\n this.monthChanged.emit({ month: this.viewMonth, year: this.viewYear });\n }\n\n handleSelectDay = (event: MouseEvent, day: SulaCalendarDay) => {\n event.stopPropagation();\n\n if (day.isDisabled || this.disabled) return;\n\n if (this.range) {\n this.selectRangeDay(day.date);\n return;\n }\n\n const formatted = this.formatDate(day.date);\n\n this.value = formatted;\n this.dateSelected.emit(formatted);\n this.valueChanged.emit(formatted);\n\n if (this.closeOnSelect && !this.inline) {\n this.close();\n }\n };\n\n selectRangeDay(date: Date) {\n const { start, end } = this.getRange();\n\n // first click, or a click after a complete range, starts a new range\n if (!start || end) {\n this.value = this.formatDate(date);\n return;\n }\n\n const [from, to] = date.getTime() < start.getTime() ? [date, start] : [start, date];\n const range: SulaCalendarRange = { start: this.formatDate(from), end: this.formatDate(to) };\n\n this.value = `${range.start} - ${range.end}`;\n this.rangeSelected.emit(range);\n\n if (this.closeOnSelect && !this.inline) {\n this.close();\n }\n }\n\n handleDayHover(day: SulaCalendarDay) {\n if (!this.range || day.isDisabled) return;\n\n this.hoverDate = day.date;\n }\n\n handleGridLeave = () => {\n this.hoverDate = null;\n };\n\n getTextfieldStatus(): SulaTextfieldStatus {\n return this.status === SulaCalendarStatus.Error ? SulaTextfieldStatus.Error : SulaTextfieldStatus.Default;\n }\n\n renderHeader() {\n return (\n <div class=\"flex h-28 w-full flex-row items-center justify-between gap-12 px-4\">\n <button\n type=\"button\"\n class=\"flex h-28 w-28 items-center justify-center rounded-xs hover:bg-states-empty-bg-hover\"\n aria-label=\"Mês anterior\"\n onClick={this.handlePreviousMonth}\n >\n <sula-icon icon=\"ph ph-caret-left\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>\n\n <span class=\"text-label-medium-regular text-text-primary\" aria-live=\"polite\">\n {this.getMonthLabel()}\n </span>\n\n <button\n type=\"button\"\n class=\"flex h-28 w-28 items-center justify-center rounded-xs hover:bg-states-empty-bg-hover\"\n aria-label=\"Próximo mês\"\n onClick={this.handleNextMonth}\n >\n <sula-icon icon=\"ph ph-caret-right\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>\n </div>\n );\n }\n\n renderDay(day: SulaCalendarDay) {\n return (\n <div\n role=\"gridcell\"\n aria-selected={day.isSelected ? 'true' : 'false'}\n aria-disabled={day.isDisabled ? 'true' : null}\n aria-current={day.isToday ? 'date' : null}\n class=\"relative flex w-full items-center justify-center\"\n onMouseEnter={() => this.handleDayHover(day)}\n >\n {(day.isInRange || day.isRangeStart !== day.isRangeEnd) && (\n <span\n data-range-background\n aria-hidden=\"true\"\n class={{\n 'absolute inset-y-0 bg-surface-on-body-brand': true,\n 'inset-x-0': day.isInRange,\n 'right-0 w-1/2': day.isRangeStart && !day.isRangeEnd,\n 'left-0 w-1/2': day.isRangeEnd && !day.isRangeStart,\n }}\n ></span>\n )}\n <button\n type=\"button\"\n disabled={day.isDisabled}\n aria-label={this.formatDate(day.date)}\n onClick={(event: MouseEvent) => this.handleSelectDay(event, day)}\n class={{\n 'relative flex h-36 w-36 items-center justify-center rounded-xxl text-label-small-regular transition-colors': true,\n 'bg-brand-primary text-neutral-neutral-1': day.isSelected,\n 'border border-brand-primary text-text-primary': day.isRangePreview && !day.isSelected,\n 'text-text-primary hover:bg-states-empty-bg-hover': !day.isSelected && day.isCurrentMonth && !day.isDisabled,\n 'text-text-secondary opacity-50 hover:bg-states-empty-bg-hover': !day.isSelected && !day.isCurrentMonth && !day.isDisabled,\n 'cursor-not-allowed text-text-disabled line-through': day.isDisabled,\n }}\n >\n {day.day}\n </button>\n </div>\n );\n }\n\n renderPanel() {\n return (\n <div\n ref={node => (this.panelNode = node)}\n role={this.inline ? 'group' : 'dialog'}\n aria-label=\"Calendário\"\n class={{\n 'calendar-panel flex w-full flex-col items-center rounded-lg border border-line-general bg-surface-body p-24': true,\n 'absolute left-0 z-50': !this.inline,\n 'bottom-full mb-8': !this.inline && this.openUpward,\n 'top-full mt-8': !this.inline && !this.openUpward,\n }}\n >\n <div class=\"flex w-full flex-col items-center gap-24\">\n {this.renderHeader()}\n\n <div class=\"flex w-full flex-col\" role=\"grid\">\n <div class=\"grid grid-cols-7\" role=\"row\">\n {this.getWeekdays().map(weekday => (\n <div role=\"columnheader\" title={weekday.long} class=\"flex h-22 w-full items-center justify-center text-label-small-regular text-text-secondary\">\n {weekday.short}\n </div>\n ))}\n </div>\n\n <div role=\"rowgroup\" class=\"grid gap-y-8 pt-8\" onMouseLeave={this.handleGridLeave}>\n {this.getWeeks().map(week => (\n <div class=\"grid grid-cols-7\" role=\"row\">\n {week.map(day => this.renderDay(day))}\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div class=\"relative w-full\">\n {!this.inline && (\n <div onClick={this.handleFieldClick} onKeyDown={this.handleFieldKeydown}>\n <sula-textfield\n label={this.label}\n value={this.value}\n placeholder={this.placeholder}\n disabled={this.disabled}\n helpText={this.helpText}\n status={this.getTextfieldStatus()}\n icon=\"ph ph-calendar-blank\"\n maskPattern={this.range ? '99/99/9999 - 99/99/9999' : '99/99/9999'}\n readOnly={!this.allowTyping}\n onValueChanged={this.handleInputChanged}\n ></sula-textfield>\n </div>\n )}\n\n {(this.inline || this.showCalendar) && this.renderPanel()}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sula-calendar.js","sourceRoot":"","sources":["../../../src/components/sula-calendar/sula-calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAA+D,kBAAkB,EAAuB,MAAM,6BAA6B,CAAC;AAEnJ,MAAM,YAAY,GAAG,6BAA6B,CAAC;AACnD,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,eAAe,GAAG,OAAO,CAAC;AAOhC,MAAM,OAAO,YAAY;IALzB;QAWE;;WAEG;QACsB,UAAK,GAAW,EAAE,CAAC;QAO5C;;WAEG;QACK,aAAQ,GAAY,KAAK,CAAC;QAOlC;;WAEG;QACK,WAAM,GAAuB,kBAAkB,CAAC,OAAO,CAAC;QAEhE;;WAEG;QACK,WAAM,GAAW,OAAO,CAAC;QAYjC;;WAEG;QACK,UAAK,GAAY,KAAK,CAAC;QAE/B;;WAEG;QACK,gBAAW,GAAY,IAAI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vB,CACd,CACP;gBAEA,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,YAAY,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,CACrD,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaTextfieldStatus } from '../sula-textfield/model/sula-textfield.model';\nimport { SulaCalendarDay, SulaCalendarMonthChange, SulaCalendarRange, SulaCalendarStatus, SulaCalendarWeekday } from './model/sula-calendar.model';\n\nconst DATE_PATTERN = /^(\\d{2})\\/(\\d{2})\\/(\\d{4})$/;\nconst DAYS_IN_WEEK = 7;\nconst FALLBACK_LOCALE = 'pt-BR';\n\n@Component({\n tag: 'sula-calendar',\n styleUrl: 'sula-calendar.scss',\n shadow: true,\n})\nexport class SulaCalendar {\n /**\n * The calendar field label\n */\n @Prop() label: string;\n\n /**\n * Selected date in the `DD/MM/YYYY` format. In range mode the format is `DD/MM/YYYY - DD/MM/YYYY`\n */\n @Prop({ mutable: true }) value: string = '';\n\n /**\n * The calendar field placeholder\n */\n @Prop() placeholder?: string;\n\n /**\n * The calendar is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The help text displayed below the field\n */\n @Prop() helpText?: string;\n\n /**\n * The calendar field status\n */\n @Prop() status: SulaCalendarStatus = SulaCalendarStatus.Default;\n\n /**\n * Locale used to format month and weekday names\n */\n @Prop() locale: string = 'pt-BR';\n\n /**\n * Earliest selectable date in the `DD/MM/YYYY` format\n */\n @Prop() minDate?: string;\n\n /**\n * Latest selectable date in the `DD/MM/YYYY` format\n */\n @Prop() maxDate?: string;\n\n /**\n * Enables selecting a date range (start and end dates) instead of a single date\n */\n @Prop() range: boolean = false;\n\n /**\n * Allows typing the date directly in the field. When false, the date can only be picked in the calendar\n */\n @Prop() allowTyping: boolean = true;\n\n /**\n * Renders only the calendar panel, without the input field\n */\n @Prop() inline: boolean = false;\n\n /**\n * Renders a smaller chip-like trigger showing only the selected date (`DD/MM/YY`), instead of the input field\n */\n @Prop() compact: boolean = false;\n\n /**\n * First day of the week, where 0 is Sunday and 6 is Saturday\n */\n @Prop() firstDayOfWeek: number = 0;\n\n /**\n * Closes the calendar panel after a date is selected\n */\n @Prop() closeOnSelect: boolean = true;\n\n /**\n * Event emitted when a date is selected, with the date in the `DD/MM/YYYY` format\n */\n @Event() dateSelected: EventEmitter<string>;\n\n /**\n * Event emitted in range mode when both the start and end dates are selected, either by picking or by typing. In range mode `valueChanged` is not emitted\n */\n @Event() rangeSelected: EventEmitter<SulaCalendarRange>;\n\n /**\n * Event emitted when the value changes, either by typing or by selecting a date. Not emitted in range mode, use `rangeSelected` instead\n */\n @Event() valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when the displayed month changes\n */\n @Event() monthChanged: EventEmitter<SulaCalendarMonthChange>;\n\n /**\n * Event emitted when the calendar panel is opened\n */\n @Event() calendarOpened: EventEmitter<void>;\n\n /**\n * Event emitted when the calendar panel is closed\n */\n @Event() calendarClosed: EventEmitter<void>;\n\n @State() showCalendar: boolean = false;\n\n @State() openUpward: boolean = false;\n\n @State() viewMonth: number;\n\n @State() viewYear: number;\n\n @State() hoverDate: Date | null = null;\n\n node?: HTMLElement;\n\n panelNode?: HTMLElement;\n\n @Watch('value')\n handleValueChange() {\n this.hoverDate = null;\n\n // keeps the view on the current month while an incomplete date is being typed\n if (this.selectedDate) {\n this.syncViewWithValue();\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (!this.showCalendar || !this.node) return;\n\n if (!event.composedPath().includes(this.node)) {\n this.close();\n }\n }\n\n @Listen('keydown', { target: 'document' })\n handleDocumentKeydown(event: KeyboardEvent) {\n if (this.showCalendar && event.key === 'Escape') {\n this.close();\n }\n }\n\n componentWillLoad() {\n this.syncViewWithValue();\n }\n\n componentDidRender() {\n if (this.showCalendar) {\n this.calculatePanelPosition();\n }\n }\n\n get selectedDate(): Date | null {\n return this.getRange().start;\n }\n\n private getRange(): { start: Date | null; end: Date | null } {\n if (!this.range) {\n return { start: this.parseDate(this.value), end: null };\n }\n\n const [startText, endText] = (this.value ?? '').split('-');\n\n return { start: this.parseDate(startText), end: this.parseDate(endText) };\n }\n\n private syncViewWithValue() {\n const reference = this.selectedDate ?? new Date();\n\n this.viewMonth = reference.getMonth();\n this.viewYear = reference.getFullYear();\n }\n\n private parseDate(value?: string): Date | null {\n const match = DATE_PATTERN.exec((value ?? '').trim());\n if (!match) return null;\n\n const day = Number(match[1]);\n const month = Number(match[2]);\n const year = Number(match[3]);\n const date = new Date(year, month - 1, day, 0, 0, 0, 0);\n\n const isValid = date.getDate() === day && date.getMonth() === month - 1 && date.getFullYear() === year;\n\n return isValid ? date : null;\n }\n\n private formatDate(date: Date): string {\n const day = `${date.getDate()}`.padStart(2, '0');\n const month = `${date.getMonth() + 1}`.padStart(2, '0');\n\n return `${day}/${month}/${date.getFullYear()}`;\n }\n\n private capitalize(text: string): string {\n return text.charAt(0).toUpperCase() + text.slice(1);\n }\n\n private isSameDay(first: Date, second: Date): boolean {\n return first.getDate() === second.getDate() && first.getMonth() === second.getMonth() && first.getFullYear() === second.getFullYear();\n }\n\n private isOutOfRange(date: Date, min: Date | null, max: Date | null): boolean {\n return (!!min && date.getTime() < min.getTime()) || (!!max && date.getTime() > max.getTime());\n }\n\n private get weekStart(): number {\n const value = Math.trunc(Number(this.firstDayOfWeek));\n\n return Number.isFinite(value) ? ((value % DAYS_IN_WEEK) + DAYS_IN_WEEK) % DAYS_IN_WEEK : 0;\n }\n\n // an invalid `locale` would make Intl throw and break the whole render\n private createFormatter(options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n try {\n return new Intl.DateTimeFormat(this.locale, options);\n } catch {\n return new Intl.DateTimeFormat(FALLBACK_LOCALE, options);\n }\n }\n\n getMonthLabel(): string {\n const date = new Date(this.viewYear, this.viewMonth, 1);\n const month = this.createFormatter({ month: 'short' }).format(date).replace(/\\./g, '');\n\n return `${this.capitalize(month)} ${this.viewYear}`;\n }\n\n getWeekdays(): SulaCalendarWeekday[] {\n const shortFormatter = this.createFormatter({ weekday: 'short' });\n const longFormatter = this.createFormatter({ weekday: 'long' });\n\n return Array.from({ length: DAYS_IN_WEEK }, (_, index) => {\n // 2024-01-07 is a Sunday, used as a stable reference to build the weekday sequence\n const date = new Date(2024, 0, 7 + ((index + this.weekStart) % DAYS_IN_WEEK));\n\n return {\n short: this.capitalize(shortFormatter.format(date).replace(/\\./g, '')),\n long: this.capitalize(longFormatter.format(date)),\n };\n });\n }\n\n getWeeks(): SulaCalendarDay[][] {\n const today = new Date();\n const { start, end } = this.getRange();\n const previewEnd = this.range && !!start && !end ? this.hoverDate : null;\n const rangeEnd = end ?? previewEnd;\n const hasRange = this.range && !!start && !!rangeEnd;\n const from = hasRange && start.getTime() > rangeEnd.getTime() ? rangeEnd : start;\n const to = hasRange && start.getTime() > rangeEnd.getTime() ? start : rangeEnd;\n const firstOfMonth = new Date(this.viewYear, this.viewMonth, 1);\n const min = this.parseDate(this.minDate);\n const max = this.parseDate(this.maxDate);\n const offset = (firstOfMonth.getDay() - this.weekStart + DAYS_IN_WEEK) % DAYS_IN_WEEK;\n const daysInMonth = new Date(this.viewYear, this.viewMonth + 1, 0).getDate();\n const totalCells = Math.ceil((offset + daysInMonth) / DAYS_IN_WEEK) * DAYS_IN_WEEK;\n const weeks: SulaCalendarDay[][] = [];\n\n for (let cell = 0; cell < totalCells; cell++) {\n const date = new Date(this.viewYear, this.viewMonth, cell - offset + 1);\n\n const day: SulaCalendarDay = {\n date,\n day: date.getDate(),\n isCurrentMonth: date.getMonth() === this.viewMonth && date.getFullYear() === this.viewYear,\n isSelected: (!!start && this.isSameDay(date, start)) || (this.range && !!end && this.isSameDay(date, end)),\n isRangeStart: hasRange && this.isSameDay(date, from),\n isRangeEnd: hasRange && this.isSameDay(date, to),\n isInRange: hasRange && date.getTime() > from.getTime() && date.getTime() < to.getTime(),\n isRangePreview: !!previewEnd && this.isSameDay(date, previewEnd) && !this.isSameDay(date, start),\n isToday: this.isSameDay(date, today),\n isDisabled: this.isOutOfRange(date, min, max),\n };\n\n if (cell % DAYS_IN_WEEK === 0) weeks.push([]);\n weeks[weeks.length - 1].push(day);\n }\n\n return weeks;\n }\n\n calculatePanelPosition() {\n if (!this.node || this.inline) return;\n\n const rect = this.node.getBoundingClientRect();\n const panelHeight = this.panelNode?.offsetHeight ?? 0;\n const spaceBelow = window.innerHeight - rect.bottom;\n const spaceAbove = rect.top;\n\n this.openUpward = spaceBelow < panelHeight && spaceAbove > spaceBelow;\n }\n\n open() {\n if (this.disabled || this.showCalendar) return;\n\n this.showCalendar = true;\n this.calendarOpened.emit();\n }\n\n close() {\n if (!this.showCalendar) return;\n\n this.showCalendar = false;\n this.hoverDate = null;\n this.calendarClosed.emit();\n }\n\n handleFieldClick = () => {\n this.open();\n };\n\n getCompactLabel(): string {\n const { start, end } = this.getRange();\n const short = (date: Date) => this.formatDate(date).replace(/\\/\\d{2}(\\d{2})$/, '/$1');\n\n if (!start) return this.placeholder || this.label || '';\n\n return this.range && end ? `${short(start)} - ${short(end)}` : short(start);\n }\n\n handleCompactClick = (event: MouseEvent) => {\n event.stopPropagation();\n\n if (this.showCalendar) {\n this.close();\n } else {\n this.open();\n }\n };\n\n handleFieldKeydown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.open();\n }\n };\n\n handleInputChanged = (event: CustomEvent<string>) => {\n event.stopPropagation();\n\n const typedValue = event.detail ?? '';\n\n this.value = typedValue;\n\n if (this.range) {\n const { start, end } = this.getRange();\n\n if (start && end && start.getTime() <= end.getTime()) {\n this.rangeSelected.emit({ start: this.formatDate(start), end: this.formatDate(end) });\n }\n\n return;\n }\n\n this.valueChanged.emit(typedValue);\n };\n\n handlePreviousMonth = (event: MouseEvent) => {\n event.stopPropagation();\n this.changeMonth(-1);\n };\n\n handleNextMonth = (event: MouseEvent) => {\n event.stopPropagation();\n this.changeMonth(1);\n };\n\n changeMonth(step: number) {\n const date = new Date(this.viewYear, this.viewMonth + step, 1);\n\n this.viewMonth = date.getMonth();\n this.viewYear = date.getFullYear();\n\n this.monthChanged.emit({ month: this.viewMonth, year: this.viewYear });\n }\n\n handleSelectDay = (event: MouseEvent, day: SulaCalendarDay) => {\n event.stopPropagation();\n\n if (day.isDisabled || this.disabled) return;\n\n if (this.range) {\n this.selectRangeDay(day.date);\n return;\n }\n\n const formatted = this.formatDate(day.date);\n\n this.value = formatted;\n this.dateSelected.emit(formatted);\n this.valueChanged.emit(formatted);\n\n if (this.closeOnSelect && !this.inline) {\n this.close();\n }\n };\n\n selectRangeDay(date: Date) {\n const { start, end } = this.getRange();\n\n // first click, or a click after a complete range, starts a new range\n if (!start || end) {\n this.value = this.formatDate(date);\n return;\n }\n\n const [from, to] = date.getTime() < start.getTime() ? [date, start] : [start, date];\n const range: SulaCalendarRange = { start: this.formatDate(from), end: this.formatDate(to) };\n\n this.value = `${range.start} - ${range.end}`;\n this.rangeSelected.emit(range);\n\n if (this.closeOnSelect && !this.inline) {\n this.close();\n }\n }\n\n handleDayHover(day: SulaCalendarDay) {\n if (!this.range || day.isDisabled) return;\n\n this.hoverDate = day.date;\n }\n\n handleGridLeave = () => {\n this.hoverDate = null;\n };\n\n getTextfieldStatus(): SulaTextfieldStatus {\n return this.status === SulaCalendarStatus.Error ? SulaTextfieldStatus.Error : SulaTextfieldStatus.Default;\n }\n\n renderHeader() {\n return (\n <div class=\"flex h-28 w-full flex-row items-center justify-between gap-12 px-4\">\n <button\n type=\"button\"\n class=\"flex h-28 w-28 items-center justify-center rounded-xs hover:bg-states-empty-bg-hover\"\n aria-label=\"Mês anterior\"\n onClick={this.handlePreviousMonth}\n >\n <sula-icon icon=\"ph ph-caret-left\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>\n\n <span class=\"text-label-medium-regular text-text-primary\" aria-live=\"polite\">\n {this.getMonthLabel()}\n </span>\n\n <button\n type=\"button\"\n class=\"flex h-28 w-28 items-center justify-center rounded-xs hover:bg-states-empty-bg-hover\"\n aria-label=\"Próximo mês\"\n onClick={this.handleNextMonth}\n >\n <sula-icon icon=\"ph ph-caret-right\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>\n </div>\n );\n }\n\n renderDay(day: SulaCalendarDay) {\n return (\n <div\n role=\"gridcell\"\n aria-selected={day.isSelected ? 'true' : 'false'}\n aria-disabled={day.isDisabled ? 'true' : null}\n aria-current={day.isToday ? 'date' : null}\n class=\"relative flex w-full items-center justify-center\"\n onMouseEnter={() => this.handleDayHover(day)}\n >\n {(day.isInRange || day.isRangeStart !== day.isRangeEnd) && (\n <span\n data-range-background\n aria-hidden=\"true\"\n class={{\n 'absolute inset-y-0 bg-surface-on-body-brand': true,\n 'inset-x-0': day.isInRange,\n 'right-0 w-1/2': day.isRangeStart && !day.isRangeEnd,\n 'left-0 w-1/2': day.isRangeEnd && !day.isRangeStart,\n }}\n ></span>\n )}\n <button\n type=\"button\"\n disabled={day.isDisabled}\n aria-label={this.formatDate(day.date)}\n onClick={(event: MouseEvent) => this.handleSelectDay(event, day)}\n class={{\n 'relative flex h-36 w-36 items-center justify-center rounded-xxl text-label-small-regular transition-colors': true,\n 'bg-brand-primary text-neutral-neutral-1': day.isSelected,\n 'border border-brand-primary text-text-primary': day.isRangePreview && !day.isSelected,\n 'text-text-primary hover:bg-states-empty-bg-hover': !day.isSelected && day.isCurrentMonth && !day.isDisabled,\n 'text-text-secondary opacity-50 hover:bg-states-empty-bg-hover': !day.isSelected && !day.isCurrentMonth && !day.isDisabled,\n 'cursor-not-allowed text-text-disabled line-through': day.isDisabled,\n }}\n >\n {day.day}\n </button>\n </div>\n );\n }\n\n renderPanel() {\n return (\n <div\n ref={node => (this.panelNode = node)}\n role={this.inline ? 'group' : 'dialog'}\n aria-label=\"Calendário\"\n class={{\n 'calendar-panel flex flex-col items-center rounded-lg border border-line-general bg-surface-body p-24': true,\n 'w-full': !this.compact || this.inline,\n 'absolute left-0 z-50': !this.inline,\n 'calendar-panel--compact': this.compact && !this.inline,\n 'bottom-full mb-8': !this.inline && this.openUpward,\n 'top-full mt-8': !this.inline && !this.openUpward,\n }}\n >\n <div class=\"flex w-full flex-col items-center gap-24\">\n {this.renderHeader()}\n\n <div class=\"flex w-full flex-col\" role=\"grid\">\n <div class=\"grid grid-cols-7\" role=\"row\">\n {this.getWeekdays().map(weekday => (\n <div role=\"columnheader\" title={weekday.long} class=\"flex h-22 w-full items-center justify-center text-label-small-regular text-text-secondary\">\n {weekday.short}\n </div>\n ))}\n </div>\n\n <div role=\"rowgroup\" class=\"grid gap-y-8 pt-8\" onMouseLeave={this.handleGridLeave}>\n {this.getWeeks().map(week => (\n <div class=\"grid grid-cols-7\" role=\"row\">\n {week.map(day => this.renderDay(day))}\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div class={{ 'relative': true, 'w-full': !this.compact || this.inline, 'inline-block': this.compact && !this.inline }}>\n {!this.inline && this.compact && (\n <button\n type=\"button\"\n disabled={this.disabled}\n aria-haspopup=\"dialog\"\n aria-expanded={this.showCalendar ? 'true' : 'false'}\n aria-label={this.label}\n onClick={this.handleCompactClick}\n class={{\n 'flex h-40 items-center justify-center gap-8 rounded-xxl bg-surface-on-body px-16 py-2 text-label-medium-bold text-text-primary': true,\n 'cursor-not-allowed opacity-50': this.disabled,\n }}\n >\n <sula-icon icon=\"ph ph-calendar-dots\" customClass=\"text-2xl text-text-secondary\"></sula-icon>\n <span class=\"whitespace-nowrap\">{this.getCompactLabel()}</span>\n <sula-icon icon={this.showCalendar ? 'ph ph-caret-up' : 'ph ph-caret-down'} customClass=\"text-base text-text-primary\"></sula-icon>\n </button>\n )}\n\n {!this.inline && !this.compact && (\n <div onClick={this.handleFieldClick} onKeyDown={this.handleFieldKeydown}>\n <sula-textfield\n label={this.label}\n value={this.value}\n placeholder={this.placeholder}\n disabled={this.disabled}\n helpText={this.helpText}\n status={this.getTextfieldStatus()}\n icon=\"ph ph-calendar-blank\"\n maskPattern={this.range ? '99/99/9999 - 99/99/9999' : '99/99/9999'}\n readOnly={!this.allowTyping}\n onValueChanged={this.handleInputChanged}\n ></sula-textfield>\n </div>\n )}\n\n {(this.inline || this.showCalendar) && this.renderPanel()}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -97,6 +97,14 @@ export default {
|
|
|
97
97
|
required: false,
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
|
+
compact: {
|
|
101
|
+
control: 'boolean',
|
|
102
|
+
defaultValue: false,
|
|
103
|
+
description: 'Exibe um gatilho menor, em formato de chip, mostrando apenas a data selecionada (DD/MM/AA)',
|
|
104
|
+
type: {
|
|
105
|
+
required: false,
|
|
106
|
+
},
|
|
107
|
+
},
|
|
100
108
|
firstDayOfWeek: {
|
|
101
109
|
control: 'number',
|
|
102
110
|
defaultValue: 0,
|
|
@@ -171,6 +179,7 @@ const Template = args => {
|
|
|
171
179
|
el.setAttribute('first-day-of-week', args.firstDayOfWeek.toString());
|
|
172
180
|
el.setAttribute('disabled', (!!args.disabled).toString());
|
|
173
181
|
el.setAttribute('inline', (!!args.inline).toString());
|
|
182
|
+
el.setAttribute('compact', (!!args.compact).toString());
|
|
174
183
|
el.setAttribute('close-on-select', (args.closeOnSelect !== false).toString());
|
|
175
184
|
el.setAttribute('allow-typing', (args.allowTyping !== false).toString());
|
|
176
185
|
el.setAttribute('range', (!!args.range).toString());
|
|
@@ -244,6 +253,33 @@ RangeInline.args = {
|
|
|
244
253
|
inline: true,
|
|
245
254
|
value: '10/08/2024 - 19/08/2024',
|
|
246
255
|
};
|
|
256
|
+
export const Compact = Template.bind({});
|
|
257
|
+
Compact.args = {
|
|
258
|
+
label: 'Período',
|
|
259
|
+
range: true,
|
|
260
|
+
compact: true,
|
|
261
|
+
value: '16/08/2026 - 25/09/2026',
|
|
262
|
+
};
|
|
263
|
+
Compact.parameters = {
|
|
264
|
+
docs: {
|
|
265
|
+
description: {
|
|
266
|
+
story: 'Versão reduzida em formato de chip, definindo `compact="true"`. Funciona com data única ou `range`.',
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
};
|
|
270
|
+
export const CompactSingleDate = Template.bind({});
|
|
271
|
+
CompactSingleDate.args = {
|
|
272
|
+
label: 'Data',
|
|
273
|
+
compact: true,
|
|
274
|
+
value: '15/10/2026',
|
|
275
|
+
};
|
|
276
|
+
CompactSingleDate.parameters = {
|
|
277
|
+
docs: {
|
|
278
|
+
description: {
|
|
279
|
+
story: 'Versão reduzida com seleção de data única, usando `compact="true"` sem `range`.',
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
};
|
|
247
283
|
export const WithoutTyping = Template.bind({});
|
|
248
284
|
WithoutTyping.args = {
|
|
249
285
|
label: 'Data de nascimento',
|