@solibo/solibo-ui 2.2.16 → 2.2.17

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.
@@ -1 +1 @@
1
- ._combobox_10eim_3{align-items:center;display:flex;flex-wrap:wrap;gap:var(--shape-spacing-2xs);min-height:calc(var(--scale-32) + var(--scale-8));padding:var(--shape-spacing-2xs) 0}._combobox-input_10eim_12{--control-bg: var(--colors-semantic-bg-surface);--control-border: var(--colors-semantic-border-strong);--control-border-width: var(--shape-border-width-default);--control-color: var(--colors-semantic-content-primary);border:var(--control-border-width) solid var(--control-border);border-radius:var(--shape-border-radius-radius-lg);color:var(--control-color);font-size:var(--typography-font-sizes-body-md);line-height:1.1;min-height:var(--input-height);padding:var(--shape-spacing-sm);transition:border var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);width:100%;background-color:var(--control-bg);flex:1 1 calc(10 * var(--utils-tokens-unit));min-width:calc(10 * var(--utils-tokens-unit))}._combobox-input_10eim_12:disabled{pointer-events:none}._combobox-input_10eim_12::-moz-placeholder{color:var(--input-placeholder);opacity:1}._combobox-input_10eim_12::placeholder{color:var(--input-placeholder);opacity:1}._combobox-input_10eim_12:focus-visible{outline:solid var(--scale-2) var(--colors-semantic-border-focus);outline-offset:var(--shape-outline-offset, calc(var(--scale-2) * -1))}._dropdown_10eim_21{--input-height: calc(var(--scale-48) + 2 * var(--shape-border-width-default));--input-placeholder: var(--colors-semantic-content-tertiary);min-width:0;position:relative;width:100%}._dropdown_10eim_21 ._empty_10eim_29,._dropdown_10eim_21 ._group_10eim_30,._dropdown_10eim_21 ._placeholder_10eim_31{color:var(--colors-semantic-content-secondary)}._dropdown_10eim_21 ._empty_10eim_29{padding:var(--scale-4) var(--scale-8)}._dropdown_10eim_21 ._filter_10eim_39{font-size:var(--typography-font-sizes-label-sm);margin:var(--scale-4);width:calc(100% - var(--shape-spacing-xs))}._dropdown_10eim_21 ._group_10eim_30{flex-shrink:0}._dropdown_10eim_21 ._native_10eim_49{height:var(--scale-1);left:0;opacity:0;pointer-events:none;position:absolute;top:0;width:var(--scale-1)}._dropdown_10eim_21 ._option_10eim_59{align-items:center;background-color:transparent;border:0;border-radius:var(--shape-border-radius-radius-lg);color:var(--colors-semantic-content-secondary);display:flex;font-weight:var(--font-font-weight-regular);gap:var(--scale-8);justify-content:space-between;overflow:hidden;padding:var(--shape-spacing-md) var(--shape-spacing-sm);text-align:left;white-space:nowrap;width:100%}._dropdown_10eim_21 ._option_10eim_59:where(:not(:disabled)):active{box-shadow:none}._dropdown_10eim_21 ._option_10eim_59:disabled{color:var(--colors-semantic-content-disabled);cursor:not-allowed}._dropdown_10eim_21 ._options_10eim_85{display:flex;flex-direction:column;gap:var(--shape-spacing-2xs);margin:0;max-height:calc(var(--scale-48) * 8);overflow-y:auto;padding:0}._dropdown_10eim_21 ._panel_10eim_95{background-color:var(--colors-semantic-bg-surface);border:var(--scale-1) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-lg);box-shadow:var(--shape-box-shadow-md-position-x) var(--shape-box-shadow-md-position-y) var(--shape-box-shadow-md-blur) var(--shape-box-shadow-md-spread) var(--shape-box-shadow-md-color);display:grid;left:0;margin-top:var(--shape-spacing-xs);max-height:80vh;max-width:min(95vw,var(--shape-width-max));min-width:100%;overflow:hidden;padding:var(--scale-4);position:absolute;width:-moz-max-content;width:max-content;z-index:var(--utils-tokens-z-max)}._dropdown_10eim_21 ._placeholder_10eim_31{color:var(--colors-semantic-content-primary);font-weight:var(--font-font-weight-regular)}._dropdown_10eim_21 ._selected_10eim_120{font-weight:var(--font-font-weight-semibold)}._dropdown_10eim_21 ._text_10eim_124{flex:1 1 auto;font-size:var(--typography-font-sizes-label-lg);line-height:1.1;min-width:0;white-space:pre-wrap}._dropdown_10eim_21 ._trigger_10eim_132{--control-bg: var(--colors-semantic-bg-surface);--control-border: var(--colors-semantic-border-strong);--control-border-width: var(--shape-border-width-default);--control-color: var(--colors-semantic-content-primary);border:var(--control-border-width) solid var(--control-border);border-radius:var(--shape-border-radius-radius-lg);color:var(--control-color);font-size:var(--typography-font-sizes-body-md);line-height:1.1;min-height:var(--input-height);padding:var(--shape-spacing-sm);transition:border var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);align-items:center;background-color:var(--control-bg);display:flex;font-weight:var(--font-font-weight-regular);max-width:100%;min-height:calc(var(--scale-48) + 2 * var(--shape-border-width-default));overflow:hidden;padding-right:var(--scale-48);position:relative;text-align:left;width:100%}._dropdown_10eim_21 ._trigger_10eim_132:disabled{pointer-events:none}._dropdown_10eim_21 ._trigger_10eim_132::-moz-placeholder{color:var(--input-placeholder);opacity:1}._dropdown_10eim_21 ._trigger_10eim_132::placeholder{color:var(--input-placeholder);opacity:1}._dropdown_10eim_21 ._trigger_10eim_132:focus-visible{outline:solid var(--scale-2) var(--colors-semantic-border-focus);outline-offset:var(--shape-outline-offset, calc(var(--scale-2) * -1))}._dropdown_10eim_21 ._trigger_10eim_132>._text_10eim_124{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;overflow-wrap:anywhere}._dropdown_10eim_21 ._trigger_10eim_132:after{background-image:var(--icon-svg);background-position:center;background-repeat:no-repeat;background-size:contain;content:"";height:var(--utils-tokens-icon-medium);position:absolute;right:var(--shape-spacing-sm);top:50%;transform:translateY(-50%);transition:transform var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);width:var(--utils-tokens-icon-medium)}._dropdown_10eim_21 ._trigger_10eim_132[data-open=true]:after{transform:translateY(-50%) rotate(180deg)}._dropdown_10eim_21._minimal_10eim_177{--dropdown-background: var(--colors-semantic-bg-backdrop);--dropdown-content: var(--colors-neutral-0);--dropdown-muted: rgb(255 255 255 / 65%);--dropdown-placeholder: rgb(255 255 255 / 65%)}._dropdown_10eim_21._minimal_10eim_177 ._empty_10eim_29,._dropdown_10eim_21._minimal_10eim_177 ._group_10eim_30{color:var(--dropdown-muted)}._dropdown_10eim_21._minimal_10eim_177 ._filter_10eim_39{border:0;box-shadow:none;padding:var(--scale-4);padding-left:calc(var(--scale-32) - var(--scale-4))}._dropdown_10eim_21._minimal_10eim_177 ._option_10eim_59{color:var(--dropdown-content)}._dropdown_10eim_21._minimal_10eim_177 ._option_10eim_59:disabled{color:#ffffff73}._dropdown_10eim_21._minimal_10eim_177 ._option_10eim_59:not([disabled]):hover{background-color:#ffffff1a}._dropdown_10eim_21._minimal_10eim_177 ._panel_10eim_95{background-color:var(--dropdown-background);border:none;color:var(--dropdown-content);margin-top:calc(var(--scale-12) * -1)}._dropdown_10eim_21._minimal_10eim_177 ._panel_10eim_95 input{background-color:transparent;border-color:var(--colors-semantic-border-strong);color:var(--dropdown-content)}._dropdown_10eim_21._minimal_10eim_177 ._panel_10eim_95 input::-moz-placeholder{color:var(--dropdown-muted)}._dropdown_10eim_21._minimal_10eim_177 ._panel_10eim_95 input::placeholder{color:var(--dropdown-muted)}._dropdown_10eim_21._minimal_10eim_177 ._placeholder_10eim_31{color:var(--dropdown-placeholder)}._dropdown_10eim_21._minimal_10eim_177 ._trigger_10eim_132{background-color:var(--dropdown-background);border:none;color:var(--dropdown-content);margin-bottom:var(--utils-tokens-unit);padding:0 var(--scale-48) 0 var(--shape-spacing-xs)}._dropdown_10eim_21._inline_10eim_237{flex:1 1 auto;min-width:0}._dropdown_10eim_21._inline_10eim_237 ._combobox_10eim_3{border:0;border-radius:var(--shape-border-radius-radius-md);box-shadow:none;min-height:calc(var(--scale-32) + var(--scale-8));padding:0}._dropdown_10eim_21._inline_10eim_237 ._combobox-input_10eim_12{border:0;border-radius:var(--shape-border-radius-radius-md);box-shadow:none;background-color:transparent;min-height:0;padding:var(--shape-spacing-xs) 0}._dropdown_10eim_21._inline_10eim_237 ._text_10eim_124{font-size:var(--typography-font-sizes-body-md)}._dropdown_10eim_21._inline_10eim_237 ._trigger_10eim_132{border:0;border-radius:var(--shape-border-radius-radius-md);box-shadow:none;min-height:calc(var(--scale-32) + var(--scale-8));padding-bottom:var(--shape-spacing-xs);padding-left:0;padding-top:var(--shape-spacing-xs)}._field_10eim_271{width:100%}._label_10eim_275{color:var(--colors-semantic-content-primary);width:100%}._inline-field_10eim_280{align-items:center;border-bottom:var(--scale-1) solid var(--colors-semantic-border-default);display:flex;gap:var(--shape-spacing-sm);min-height:calc(var(--scale-32) + var(--scale-8));transition:border-color var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);width:100%}._inline-field_10eim_280:focus-within{border-bottom-color:var(--colors-semantic-primary-primary)}._inline-field_10eim_280>span{color:var(--colors-semantic-content-tertiary);flex:none;margin-bottom:0!important}._label_10eim_275:has(._native_10eim_49:disabled){--control-color: var(--colors-semantic-content-disabled);--label-description-color: var(--control-color)}._dropdown_10eim_21 :is(._trigger_10eim_132,._combobox-input_10eim_12):hover:not(:disabled){--control-bg: var(--colors-semantic-interactive-hover)}._dropdown_10eim_21 :is(._trigger_10eim_132,._combobox-input_10eim_12):focus{--control-bg: var(--colors-semantic-bg-surface);--control-border: var(--colors-semantic-primary-primary-active);--control-border-width: var(--shape-border-width-thick)}._dropdown_10eim_21 :is(._trigger_10eim_132,._combobox-input_10eim_12)[aria-invalid=true]{--control-bg: var(--colors-semantic-bg-surface);--control-border: var(--colors-semantic-status-error-border);--control-border-width: var(--shape-border-width-default)}._dropdown_10eim_21 :is(._trigger_10eim_132,._combobox-input_10eim_12):disabled{--control-bg: var(--colors-semantic-bg-disabled);--control-border: var(--colors-semantic-border-disabled);--control-border-width: var(--shape-border-width-default);--control-color: var(--colors-semantic-content-disabled);--input-placeholder: var(--colors-semantic-content-disabled);opacity:1}._dropdown_10eim_21 ._option_10eim_59:focus-visible{outline:solid var(--scale-2) var(--colors-semantic-border-focus);outline-offset:var(--shape-outline-offset, calc(var(--scale-2) * -1))}._inline-field_10eim_280:has([aria-invalid=true]){border-bottom-color:var(--colors-semantic-status-error-border)}
1
+ ._combobox_7iy0q_3{align-items:center;display:flex;flex-wrap:wrap;gap:var(--shape-spacing-2xs);min-height:calc(var(--scale-32) + var(--scale-8));padding:var(--shape-spacing-2xs) 0}._combobox-input_7iy0q_12{--control-bg: var(--colors-semantic-bg-surface);--control-border: var(--colors-semantic-border-strong);--control-border-width: var(--shape-border-width-default);--control-color: var(--colors-semantic-content-primary);border:var(--control-border-width) solid var(--control-border);border-radius:var(--shape-border-radius-radius-lg);color:var(--control-color);font-size:var(--typography-font-sizes-body-md);line-height:1.1;min-height:var(--input-height);padding:var(--shape-spacing-sm);transition:border var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);width:100%;background-color:var(--control-bg);flex:1 1 calc(10 * var(--utils-tokens-unit));min-width:calc(10 * var(--utils-tokens-unit))}._combobox-input_7iy0q_12:disabled{pointer-events:none}._combobox-input_7iy0q_12::-moz-placeholder{color:var(--input-placeholder);opacity:1}._combobox-input_7iy0q_12::placeholder{color:var(--input-placeholder);opacity:1}._combobox-input_7iy0q_12:focus-visible{outline:solid var(--scale-2) var(--colors-semantic-border-focus);outline-offset:var(--shape-outline-offset, calc(var(--scale-2) * -1))}._dropdown_7iy0q_21{--input-height: calc(var(--scale-48) + 2 * var(--shape-border-width-default));--input-placeholder: var(--colors-semantic-content-tertiary);min-width:0;position:relative;width:100%}._dropdown_7iy0q_21 ._empty_7iy0q_29,._dropdown_7iy0q_21 ._group_7iy0q_30,._dropdown_7iy0q_21 ._placeholder_7iy0q_31{color:var(--colors-semantic-content-secondary)}._dropdown_7iy0q_21 ._empty_7iy0q_29{padding:var(--scale-4) var(--scale-8)}._dropdown_7iy0q_21 ._filter_7iy0q_39{flex:1;font-size:var(--typography-font-sizes-label-sm);margin:var(--scale-4);min-width:0}._dropdown_7iy0q_21 ._filter-controls_7iy0q_46{align-items:center;display:flex;gap:var(--shape-spacing-xs)}._dropdown_7iy0q_21 ._filter-controls_7iy0q_46>[data-component=input]{flex:1;min-width:0}._dropdown_7iy0q_21 ._loading-status_7iy0q_57{align-items:center;display:flex;flex:0 0 var(--utils-tokens-icon-small);height:var(--utils-tokens-icon-small);justify-content:center;margin-right:var(--shape-spacing-xs);width:var(--utils-tokens-icon-small)}._dropdown_7iy0q_21 ._group_7iy0q_30{flex-shrink:0}._dropdown_7iy0q_21 ._native_7iy0q_71{height:var(--scale-1);left:0;opacity:0;pointer-events:none;position:absolute;top:0;width:var(--scale-1)}._dropdown_7iy0q_21 ._option_7iy0q_81{align-items:center;background-color:transparent;border:0;border-radius:var(--shape-border-radius-radius-lg);color:var(--colors-semantic-content-secondary);display:flex;font-weight:var(--font-font-weight-regular);gap:var(--scale-8);justify-content:space-between;overflow:hidden;padding:var(--shape-spacing-md) var(--shape-spacing-sm);text-align:left;white-space:nowrap;width:100%}._dropdown_7iy0q_21 ._option_7iy0q_81:where(:not(:disabled)):active{box-shadow:none}._dropdown_7iy0q_21 ._option_7iy0q_81:disabled{color:var(--colors-semantic-content-disabled);cursor:not-allowed}._dropdown_7iy0q_21 ._options_7iy0q_107{display:flex;flex-direction:column;gap:var(--shape-spacing-2xs);margin:0;max-height:calc(var(--scale-48) * 8);overflow-y:auto;padding:0}._dropdown_7iy0q_21 ._panel_7iy0q_117{background-color:var(--colors-semantic-bg-surface);border:var(--scale-1) solid var(--colors-semantic-border-default);border-radius:var(--shape-border-radius-radius-lg);box-shadow:var(--shape-box-shadow-md-position-x) var(--shape-box-shadow-md-position-y) var(--shape-box-shadow-md-blur) var(--shape-box-shadow-md-spread) var(--shape-box-shadow-md-color);display:grid;left:0;margin-top:var(--shape-spacing-xs);max-height:80vh;max-width:min(95vw,var(--shape-width-max));min-width:100%;overflow:hidden;padding:var(--scale-4);position:absolute;width:-moz-max-content;width:max-content;z-index:var(--utils-tokens-z-max)}._dropdown_7iy0q_21 ._placeholder_7iy0q_31{color:var(--colors-semantic-content-primary);font-weight:var(--font-font-weight-regular)}._dropdown_7iy0q_21 ._selected_7iy0q_142{font-weight:var(--font-font-weight-semibold)}._dropdown_7iy0q_21 ._text_7iy0q_146{flex:1 1 auto;font-size:var(--typography-font-sizes-label-lg);line-height:1.1;min-width:0;white-space:pre-wrap}._dropdown_7iy0q_21 ._trigger_7iy0q_154{--control-bg: var(--colors-semantic-bg-surface);--control-border: var(--colors-semantic-border-strong);--control-border-width: var(--shape-border-width-default);--control-color: var(--colors-semantic-content-primary);border:var(--control-border-width) solid var(--control-border);border-radius:var(--shape-border-radius-radius-lg);color:var(--control-color);font-size:var(--typography-font-sizes-body-md);line-height:1.1;min-height:var(--input-height);padding:var(--shape-spacing-sm);transition:border var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);align-items:center;background-color:var(--control-bg);display:flex;font-weight:var(--font-font-weight-regular);max-width:100%;min-height:calc(var(--scale-48) + 2 * var(--shape-border-width-default));overflow:hidden;padding-right:var(--scale-48);position:relative;text-align:left;width:100%}._dropdown_7iy0q_21 ._trigger_7iy0q_154:disabled{pointer-events:none}._dropdown_7iy0q_21 ._trigger_7iy0q_154::-moz-placeholder{color:var(--input-placeholder);opacity:1}._dropdown_7iy0q_21 ._trigger_7iy0q_154::placeholder{color:var(--input-placeholder);opacity:1}._dropdown_7iy0q_21 ._trigger_7iy0q_154:focus-visible{outline:solid var(--scale-2) var(--colors-semantic-border-focus);outline-offset:var(--shape-outline-offset, calc(var(--scale-2) * -1))}._dropdown_7iy0q_21 ._trigger_7iy0q_154>._text_7iy0q_146{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;overflow-wrap:anywhere}._dropdown_7iy0q_21 ._trigger_7iy0q_154:after{background-image:var(--icon-svg);background-position:center;background-repeat:no-repeat;background-size:contain;content:"";height:var(--utils-tokens-icon-medium);position:absolute;right:var(--shape-spacing-sm);top:50%;transform:translateY(-50%);transition:transform var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);width:var(--utils-tokens-icon-medium)}._dropdown_7iy0q_21 ._trigger_7iy0q_154[data-open=true]:after{transform:translateY(-50%) rotate(180deg)}._dropdown_7iy0q_21._minimal_7iy0q_199{--dropdown-background: var(--colors-semantic-bg-backdrop);--dropdown-content: var(--colors-neutral-0);--dropdown-muted: rgb(255 255 255 / 65%);--dropdown-placeholder: rgb(255 255 255 / 65%)}._dropdown_7iy0q_21._minimal_7iy0q_199 ._empty_7iy0q_29,._dropdown_7iy0q_21._minimal_7iy0q_199 ._group_7iy0q_30{color:var(--dropdown-muted)}._dropdown_7iy0q_21._minimal_7iy0q_199 ._filter_7iy0q_39{border:0;box-shadow:none;padding:var(--scale-4);padding-left:calc(var(--scale-32) - var(--scale-4))}._dropdown_7iy0q_21._minimal_7iy0q_199 ._option_7iy0q_81{color:var(--dropdown-content)}._dropdown_7iy0q_21._minimal_7iy0q_199 ._option_7iy0q_81:disabled{color:#ffffff73}._dropdown_7iy0q_21._minimal_7iy0q_199 ._option_7iy0q_81:not([disabled]):hover{background-color:#ffffff1a}._dropdown_7iy0q_21._minimal_7iy0q_199 ._panel_7iy0q_117{background-color:var(--dropdown-background);border:none;color:var(--dropdown-content);margin-top:calc(var(--scale-12) * -1)}._dropdown_7iy0q_21._minimal_7iy0q_199 ._panel_7iy0q_117 input{background-color:transparent;border-color:var(--colors-semantic-border-strong);color:var(--dropdown-content)}._dropdown_7iy0q_21._minimal_7iy0q_199 ._panel_7iy0q_117 input::-moz-placeholder{color:var(--dropdown-muted)}._dropdown_7iy0q_21._minimal_7iy0q_199 ._panel_7iy0q_117 input::placeholder{color:var(--dropdown-muted)}._dropdown_7iy0q_21._minimal_7iy0q_199 ._placeholder_7iy0q_31{color:var(--dropdown-placeholder)}._dropdown_7iy0q_21._minimal_7iy0q_199 ._trigger_7iy0q_154{background-color:var(--dropdown-background);border:none;color:var(--dropdown-content);margin-bottom:var(--utils-tokens-unit);padding:0 var(--scale-48) 0 var(--shape-spacing-xs)}._dropdown_7iy0q_21._inline_7iy0q_259{flex:1 1 auto;min-width:0}._dropdown_7iy0q_21._inline_7iy0q_259 ._combobox_7iy0q_3{border:0;border-radius:var(--shape-border-radius-radius-md);box-shadow:none;min-height:calc(var(--scale-32) + var(--scale-8));padding:0}._dropdown_7iy0q_21._inline_7iy0q_259 ._combobox-input_7iy0q_12{border:0;border-radius:var(--shape-border-radius-radius-md);box-shadow:none;background-color:transparent;min-height:0;padding:var(--shape-spacing-xs) 0}._dropdown_7iy0q_21._inline_7iy0q_259 ._text_7iy0q_146{font-size:var(--typography-font-sizes-body-md)}._dropdown_7iy0q_21._inline_7iy0q_259 ._trigger_7iy0q_154{border:0;border-radius:var(--shape-border-radius-radius-md);box-shadow:none;min-height:calc(var(--scale-32) + var(--scale-8));padding-bottom:var(--shape-spacing-xs);padding-left:0;padding-top:var(--shape-spacing-xs)}._field_7iy0q_293{width:100%}._label_7iy0q_297{color:var(--colors-semantic-content-primary);width:100%}._inline-field_7iy0q_302{align-items:center;border-bottom:var(--scale-1) solid var(--colors-semantic-border-default);display:flex;gap:var(--shape-spacing-sm);min-height:calc(var(--scale-32) + var(--scale-8));transition:border-color var(--utils-tokens-transition-duration) var(--utils-tokens-transition-timing-function);width:100%}._inline-field_7iy0q_302:focus-within{border-bottom-color:var(--colors-semantic-primary-primary)}._inline-field_7iy0q_302>span{color:var(--colors-semantic-content-tertiary);flex:none;margin-bottom:0!important}._label_7iy0q_297:has(._native_7iy0q_71:disabled){--control-color: var(--colors-semantic-content-disabled);--label-description-color: var(--control-color)}._dropdown_7iy0q_21 :is(._trigger_7iy0q_154,._combobox-input_7iy0q_12):hover:not(:disabled){--control-bg: var(--colors-semantic-interactive-hover)}._dropdown_7iy0q_21 :is(._trigger_7iy0q_154,._combobox-input_7iy0q_12):focus{--control-bg: var(--colors-semantic-bg-surface);--control-border: var(--colors-semantic-primary-primary-active);--control-border-width: var(--shape-border-width-thick)}._dropdown_7iy0q_21 :is(._trigger_7iy0q_154,._combobox-input_7iy0q_12)[aria-invalid=true]{--control-bg: var(--colors-semantic-bg-surface);--control-border: var(--colors-semantic-status-error-border);--control-border-width: var(--shape-border-width-default)}._dropdown_7iy0q_21 :is(._trigger_7iy0q_154,._combobox-input_7iy0q_12):disabled{--control-bg: var(--colors-semantic-bg-disabled);--control-border: var(--colors-semantic-border-disabled);--control-border-width: var(--shape-border-width-default);--control-color: var(--colors-semantic-content-disabled);--input-placeholder: var(--colors-semantic-content-disabled);opacity:1}._dropdown_7iy0q_21 ._option_7iy0q_81:focus-visible{outline:solid var(--scale-2) var(--colors-semantic-border-focus);outline-offset:var(--shape-outline-offset, calc(var(--scale-2) * -1))}._inline-field_7iy0q_302:has([aria-invalid=true]){border-bottom-color:var(--colors-semantic-status-error-border)}
@@ -1 +1 @@
1
- ._search_wsuwb_3{display:flex;flex-direction:column;gap:var(--shape-spacing-xs);margin-bottom:var(--shape-spacing-lg);width:100%}._search_wsuwb_3 [data-component=input]{max-width:var(--shape-width-max)}._controls_wsuwb_15{align-items:stretch;display:flex;gap:var(--shape-spacing-xs)}._controls_wsuwb_15 label{flex:1}._controls_wsuwb_15 button{white-space:nowrap}@media (width < 480px){._controls_wsuwb_15{align-items:stretch;flex-direction:column}}._chips_wsuwb_35{align-items:center;display:flex;flex-wrap:wrap;gap:var(--shape-spacing-xs)}._filter-dialog_wsuwb_42[open]{max-height:calc(100vh - var(--shape-spacing-lg) - var(--shape-spacing-lg));max-height:calc(100dvh - var(--shape-spacing-lg) - var(--shape-spacing-lg))}._filter-groups_wsuwb_47{display:grid;gap:var(--shape-spacing-lg)}._filter-groups_wsuwb_47[data-columns="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}@media (width < 480px){._filter-groups_wsuwb_47[data-columns="2"]{grid-template-columns:1fr;min-width:min(24rem,75vw)}}._filter-group_wsuwb_47{display:flex;flex-direction:column;gap:var(--shape-spacing-sm)}._filter-group_wsuwb_47[data-column-span="2"]{grid-column:1 / -1}@media (width < 480px){._filter-group_wsuwb_47[data-column-span="2"]{grid-column:auto}}._filter-group_wsuwb_47 h3{font-size:var(--typography-font-sizes-label-lg);font-weight:var(--font-font-weight-semibold);margin:0 0 var(--shape-spacing-xs)}._filter-option_wsuwb_83>label{align-items:flex-start}._option-copy_wsuwb_89{display:flex;flex-direction:column;gap:var(--shape-spacing-2xs)}._option-copy_wsuwb_89 sub{color:var(--colors-semantic-content-secondary);font-size:var(--typography-font-sizes-body-sm);line-height:normal}._radio_wsuwb_101{position:relative;align-items:center;cursor:pointer;display:inline-flex;gap:var(--shape-spacing-xs)}._radio_wsuwb_101:after{content:"";inset:var(--utils-tokens-negative-unit);position:absolute}._radio_wsuwb_101 input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:solid var(--scale-1) var(--colors-semantic-border-default);border-radius:50%;box-shadow:1px 1px 2px 0 var(--shape-box-shadow-xs-color) inset;height:var(--utils-tokens-unit);margin:0;width:var(--utils-tokens-unit)}._radio_wsuwb_101 input:checked{border:calc(var(--scale-1) * 5) solid var(--colors-semantic-primary-primary)}._collapsible-options_wsuwb_124{display:flex;flex-direction:column;gap:var(--shape-spacing-sm);padding-block-start:var(--shape-spacing-sm)}
1
+ ._search_1r1ik_3{display:flex;flex-direction:column;gap:var(--shape-spacing-xs);margin-bottom:var(--shape-spacing-lg);width:100%}._search_1r1ik_3 [data-component=input]{max-width:var(--shape-width-max)}._controls_1r1ik_15{align-items:stretch;display:flex;gap:var(--shape-spacing-xs)}._controls_1r1ik_15 label{flex:1}._controls_1r1ik_15 button{white-space:nowrap}@media (width < 480px){._controls_1r1ik_15[data-with-filters]{flex-direction:column}}._actions_1r1ik_36{display:flex;flex-shrink:0;gap:var(--shape-spacing-xs)}._actions_1r1ik_36 button{flex:1}._loading-status_1r1ik_46{align-items:center;align-self:center;display:flex;flex:0 0 var(--utils-tokens-icon-small);height:var(--utils-tokens-icon-small);justify-content:center;width:var(--utils-tokens-icon-small)}._chips_1r1ik_56{align-items:center;display:flex;flex-wrap:wrap;gap:var(--shape-spacing-xs)}._filter-dialog_1r1ik_63[open]{max-height:calc(100vh - var(--shape-spacing-lg) - var(--shape-spacing-lg));max-height:calc(100dvh - var(--shape-spacing-lg) - var(--shape-spacing-lg))}._filter-groups_1r1ik_68{display:grid;gap:var(--shape-spacing-lg)}._filter-groups_1r1ik_68[data-columns="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}@media (width < 480px){._filter-groups_1r1ik_68[data-columns="2"]{grid-template-columns:1fr;min-width:min(24rem,75vw)}}._filter-group_1r1ik_68{display:flex;flex-direction:column;gap:var(--shape-spacing-sm)}._filter-group_1r1ik_68[data-column-span="2"]{grid-column:1 / -1}@media (width < 480px){._filter-group_1r1ik_68[data-column-span="2"]{grid-column:auto}}._filter-group_1r1ik_68 h3{font-size:var(--typography-font-sizes-label-lg);font-weight:var(--font-font-weight-semibold);margin:0 0 var(--shape-spacing-xs)}._filter-option_1r1ik_104>label{align-items:flex-start}._option-copy_1r1ik_110{display:flex;flex-direction:column;gap:var(--shape-spacing-2xs)}._option-copy_1r1ik_110 sub{color:var(--colors-semantic-content-secondary);font-size:var(--typography-font-sizes-body-sm);line-height:normal}._radio_1r1ik_122{position:relative;align-items:center;cursor:pointer;display:inline-flex;gap:var(--shape-spacing-xs)}._radio_1r1ik_122:after{content:"";inset:var(--utils-tokens-negative-unit);position:absolute}._radio_1r1ik_122 input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:solid var(--scale-1) var(--colors-semantic-border-default);border-radius:50%;box-shadow:1px 1px 2px 0 var(--shape-box-shadow-xs-color) inset;height:var(--utils-tokens-unit);margin:0;width:var(--utils-tokens-unit)}._radio_1r1ik_122 input:checked{border:calc(var(--scale-1) * 5) solid var(--colors-semantic-primary-primary)}._collapsible-options_1r1ik_145{display:flex;flex-direction:column;gap:var(--shape-spacing-sm);padding-block-start:var(--shape-spacing-sm)}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const s=require("react/jsx-runtime"),B=require("classix"),i=require("react"),V=require("../button/index.cjs"),Te=require("../form/index.cjs"),Ae=require("../../icons-BIdcCH-v.cjs"),he=require("../../index-DEQcFR32.cjs"),Ke=require("../label/index.cjs"),Oe=require("../list/index.cjs"),He=require("../loading/index.cjs"),q=require("../../index-BQoXmNo3.cjs");function W(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(W).join(" "):i.isValidElement(t)?W(t.props.children):""}function Je(t){return i.isValidElement(t)&&t.type==="option"}function Ue(t){return i.isValidElement(t)&&t.type==="optgroup"}function Xe(t){return i.isValidElement(t)&&t.type===i.Fragment}function Ye(t){return i.isValidElement(t)&&t.type===q.Select}function ie(t,o,r=!1){const a=[];return i.Children.forEach(t,n=>{if(Xe(n))a.push(...ie(n.props.children,o,r));else if(Je(n)){const v=W(n.props.children).trim(),$=n.props.value!=null?String(n.props.value):v;a.push({disabled:r||!!n.props.disabled,groupLabel:o,hidden:!!n.props.hidden,isPlaceholder:!!(n.props.hidden&&$===""),label:n.props.children,selected:!!n.props.selected,text:v,value:$})}else Ue(n)&&a.push(...ie(n.props.children,n.props.label,r||!!n.props.disabled))}),a}function Ze(t){const o=t.trim();if(!o)return null;const a=[.../[*?]/.test(o)?o:`*${o}*`].map(n=>n==="*"?".*":n==="?"?".":n.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${a}$`,"i")}function et(t,o){const r=Ze(o),a=t.filter(n=>!n.hidden&&!n.isPlaceholder);return r?a.filter(n=>r.test([n.groupLabel,n.text,n.value].filter(Boolean).join(" "))):a}function tt(t,o){return t.find(r=>r.value===o)??t.find(r=>r.isPlaceholder)??t[0]}function nt(t,o,r){var a,n;return o!=null?String(o):r!=null?String(r):((a=t.find(v=>v.selected))==null?void 0:a.value)??((n=t[0])==null?void 0:n.value)??""}function st(t){if(Ye(t)){const{children:o,placeholder:r,...a}=t.props;return{children:s.jsxs(s.Fragment,{children:[r&&s.jsx("option",{hidden:!0,value:"",children:r}),o]}),props:a}}return{children:t.props.children,props:t.props}}const it="_combobox_10eim_3",rt="_dropdown_10eim_21",lt="_empty_10eim_29",ot="_group_10eim_30",at="_placeholder_10eim_31",ct="_filter_10eim_39",ut="_native_10eim_49",dt="_option_10eim_59",ft="_options_10eim_85",pt="_panel_10eim_95",mt="_selected_10eim_120",bt="_text_10eim_124",_t="_trigger_10eim_132",vt="_minimal_10eim_177",xt="_inline_10eim_237",yt="_field_10eim_271",ht="_label_10eim_275",l={combobox:it,"combobox-input":"_combobox-input_10eim_12",dropdown:rt,empty:lt,group:ot,placeholder:at,filter:ct,native:ut,option:dt,options:ft,panel:pt,selected:mt,text:bt,trigger:_t,minimal:vt,inline:xt,field:yt,label:ht,"inline-field":"_inline-field_10eim_280"};function je(t,o){return{"--icon-svg":Ae.iconSVG(t,o)}}const jt=({children:t,className:o,combobox:r=!1,description:a,errorMessage:n,invalid:v=!1,searchable:$,createOption:x,emptyLabel:ge="No matches found",errorLabel:b,onRetry:re,retryLabel:we="Retry",label:_,filterOptions:Ee=!0,hasNextPage:y=!1,loading:m=!1,loadMoreLabel:Re="Load more",onLoadMore:R,onOpenChange:k,onSearchChange:D,searchValue:z,renderOption:G,searchPlaceholder:M="Filter",selectedItems:Ne,variant:h="default",...Se})=>{const P=st(t),{defaultValue:Ie,onChange:T,value:A,...Ce}=P.props,c=q.sanitizeSelectProps(Ce),{className:Be,...Ve}=c,le=i.useRef(null),oe=i.useRef(null),j=i.useId(),K=v&&n?`${j}-error`:void 0,ae=a?`${j}-description`:void 0,ce=[c["aria-describedby"],ae,K].filter(Boolean).join(" ")||void 0,ue=v?!0:c["aria-invalid"],de=i.useRef(null),g=i.useRef(null),O=i.useRef(null),fe=i.useRef(null),H=i.useRef(!1),J=i.useRef(!1),U=i.useRef(R),pe=!!R,w=ie(P.children),X=$??w.filter(e=>!e.hidden).length>8,N=A!=null,Y=nt(w,A,Ie),[Z,ee]=i.useState(()=>Y),[f,qe]=i.useState(!1),[$e,ke]=i.useState(""),S=z??$e,I=i.useCallback(e=>{z===void 0&&ke(e),D==null||D(e)},[D,z]),p=i.useCallback(e=>{H.current===e||e&&c.disabled||(H.current=e,qe(e),k==null||k(e),e||I(""))},[k,c.disabled,I]),F=N?String(A):Z,me={default:q.resolveColor("--colors-semantic-content-secondary"),white:q.resolveColor("--color-white","white")},be=c.disabled?q.resolveColor("--colors-semantic-content-disabled"):h==="minimal"?me.white:me.default,L=tt(w,F),De=je("CaretDown",be),Fe=je("MagnifyingGlass",be),te=et(w,Ee?S:""),E=S.trim(),Q=!!(r&&x&&E&&x.isValid(E)),Le=_&&h==="inline"?he.formatInlineLabel(_):_,_e=e=>e?(G==null?void 0:G({groupLabel:e.groupLabel,isSelected:e.value===F,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";i.useEffect(()=>{!N&&!w.some(e=>e.value===Z)&&ee(Y)},[Y,Z,N,w]),i.useEffect(()=>{var e,u,d;f&&(r||X?(e=g.current)==null||e.focus():(d=(u=O.current)==null?void 0:u.querySelector("button:not(:disabled)"))==null||d.focus())},[f,r,X]),i.useEffect(()=>{if(!f)return;const e=u=>{var d;(d=oe.current)!=null&&d.contains(u.target)||p(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[p,f]),i.useEffect(()=>{U.current=R},[R]),i.useEffect(()=>{c.disabled&&p(!1)},[p,c.disabled]);const ne=i.useCallback(()=>{!H.current||c.disabled||m||b||!y||!U.current||J.current||(J.current=!0,U.current())},[b,y,m,c.disabled]);i.useEffect(()=>{if(J.current=!1,!f||c.disabled||m||b||!y||!pe)return;const e=fe.current,u=O.current;if(!e||!u||typeof IntersectionObserver>"u")return;let d=!0;const C=new IntersectionObserver(Me=>{d&&Me.some(Pe=>Pe.isIntersecting)&&ne()},{root:u});return C.observe(e),()=>{d=!1,C.disconnect()}},[f,m,b,y,pe,ne,te.length,S,c.disabled]);const Qe=e=>{N||ee(e.target.value),T==null||T(e)},se=()=>{var e;p(!1),r||(e=le.current)==null||e.focus()},ve=()=>{var e;I(""),p(!0),(e=g.current)==null||e.focus()},xe=()=>{!x||!Q||(x.onCreate(E),ve())},We=e=>{var C;N||ee(e);const u=de.current;if(!u){se();return}const d=(C=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:C.set;d==null||d.call(u,e),u.dispatchEvent(new Event("change",{bubbles:!0})),r?ve():se()},ze=e=>{e.key==="Escape"&&se(),e.key==="Enter"&&e.target===g.current&&Q&&(e.preventDefault(),xe())},ye=s.jsxs("div",{className:B(l.dropdown,h==="inline"&&l.inline,h==="minimal"&&l.minimal,o),onKeyDown:ze,ref:oe,...Se,children:[s.jsx("select",{...Ve,"aria-hidden":"true",className:B(l.native,Be),onChange:Qe,ref:de,tabIndex:-1,value:F,children:P.children}),r?s.jsxs("div",{className:l.combobox,onClick:()=>{var e;return(e=g.current)==null?void 0:e.focus()},children:[Ne,s.jsx("input",{"aria-describedby":ce,"aria-invalid":ue,"aria-autocomplete":"list","aria-expanded":f,"aria-label":c["aria-label"]??_??M,className:l["combobox-input"],disabled:c.disabled,onChange:e=>{I(e.target.value),p(!0)},onClick:()=>p(!0),onFocus:()=>p(!0),placeholder:M||void 0,ref:g,role:"combobox",type:"text",value:S})]}):s.jsx(V.Button,{"aria-describedby":ce,"aria-invalid":ue,"aria-label":_?void 0:c["aria-label"],"aria-expanded":f,"aria-haspopup":"dialog","aria-labelledby":_?`${j} ${j}-value`:void 0,className:B(l.trigger,(L==null?void 0:L.isPlaceholder)&&l.placeholder),"data-open":f?"true":void 0,disabled:c.disabled,onClick:()=>p(!f),ref:le,style:De,variant:"simple",children:s.jsx("span",{className:l.text,id:`${j}-value`,children:_e(L)})}),f&&s.jsxs("div",{className:l.panel,children:[!r&&X&&s.jsx(he.Input,{"aria-label":"Filter",className:l.filter,icon:"MagnifyingGlass",onChange:e=>I(e.target.value),placeholder:M,ref:g,style:Fe,type:"search",value:S}),s.jsxs(Oe.List,{"aria-label":"Dropdown","aria-busy":m||void 0,className:l.options,ref:O,children:[te.map(e=>{const u=e.value===F;return s.jsx("li",{"data-component":"dropdown",children:s.jsxs(V.Button,{"aria-label":u?`${e.text}, selected`:e.text,className:B(l.option,u&&l.selected),disabled:e.disabled,onClick:()=>We(e.value),variant:"tertiary",children:[s.jsx("span",{className:l.text,children:_e(e)}),e.groupLabel&&s.jsx("small",{className:l.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),Q&&x&&s.jsx("li",{children:s.jsx(V.Button,{"aria-label":W(x.render(E))||E,className:l.option,onClick:xe,variant:"tertiary",children:s.jsx("span",{className:l.text,children:x.render(E)})})}),te.length===0&&!Q&&!m&&!b&&!y&&s.jsx("li",{className:l.empty,children:ge}),b&&s.jsxs("li",{className:l.empty,children:[s.jsx("span",{role:"alert",children:b}),re&&s.jsx(V.Button,{disabled:m,onClick:re,variant:"tertiary",children:we})]}),m&&s.jsx("li",{"aria-label":"Loading",className:l.empty,role:"status",children:s.jsx(He.Loading,{size:"small"})}),y&&R&&!b&&s.jsx("li",{ref:fe,children:s.jsx(V.Button,{className:l.option,disabled:m,onClick:ne,variant:"tertiary",children:Re})})]})]})]}),Ge=_||a?s.jsxs("div",{className:B(l.label,h==="inline"&&l["inline-field"]),children:[s.jsx(Ke.Label,{label:Le,labelId:_?j:void 0,description:a,descriptionId:ae,inline:h==="inline"}),ye]}):ye;return s.jsxs("div",{className:l.field,"data-component":"dropdown",children:[Ge,K&&s.jsx(Te.FieldError,{errorId:K,errorMessage:n})]})};exports.Dropdown=jt;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index41.css');const n=require("react/jsx-runtime"),V=require("classix"),s=require("react"),B=require("../button/index.cjs"),Ze=require("../form/index.cjs"),et=require("../../icons-BIdcCH-v.cjs"),we=require("../../index-DEQcFR32.cjs"),tt=require("../label/index.cjs"),nt=require("../list/index.cjs"),Ee=require("../loading/index.cjs"),$=require("../../index-BQoXmNo3.cjs");function G(t){return typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(G).join(" "):s.isValidElement(t)?G(t.props.children):""}function st(t){return s.isValidElement(t)&&t.type==="option"}function it(t){return s.isValidElement(t)&&t.type==="optgroup"}function lt(t){return s.isValidElement(t)&&t.type===s.Fragment}function rt(t){return s.isValidElement(t)&&t.type===$.Select}function le(t,o,r=!1){const a=[];return s.Children.forEach(t,i=>{if(lt(i))a.push(...le(i.props.children,o,r));else if(st(i)){const x=G(i.props.children).trim(),k=i.props.value!=null?String(i.props.value):x;a.push({disabled:r||!!i.props.disabled,groupLabel:o,hidden:!!i.props.hidden,isPlaceholder:!!(i.props.hidden&&k===""),label:i.props.children,selected:!!i.props.selected,text:x,value:k})}else it(i)&&a.push(...le(i.props.children,i.props.label,r||!!i.props.disabled))}),a}function ot(t){const o=t.trim();if(!o)return null;const a=[.../[*?]/.test(o)?o:`*${o}*`].map(i=>i==="*"?".*":i==="?"?".":i.replace(/[|\\{}()[\]^$+.,]/g,"\\$&")).join("");return new RegExp(`^${a}$`,"i")}function at(t,o){const r=ot(o),a=t.filter(i=>!i.hidden&&!i.isPlaceholder);return r?a.filter(i=>r.test([i.groupLabel,i.text,i.value].filter(Boolean).join(" "))):a}function ct(t,o){return t.find(r=>r.value===o)??t.find(r=>r.isPlaceholder)??t[0]}function ut(t,o,r){var a,i;return o!=null?String(o):r!=null?String(r):((a=t.find(x=>x.selected))==null?void 0:a.value)??((i=t[0])==null?void 0:i.value)??""}function dt(t){if(rt(t)){const{children:o,placeholder:r,...a}=t.props;return{children:n.jsxs(n.Fragment,{children:[r&&n.jsx("option",{hidden:!0,value:"",children:r}),o]}),props:a}}return{children:t.props.children,props:t.props}}const ft="_combobox_7iy0q_3",pt="_dropdown_7iy0q_21",mt="_empty_7iy0q_29",_t="_group_7iy0q_30",bt="_placeholder_7iy0q_31",yt="_filter_7iy0q_39",vt="_native_7iy0q_71",xt="_option_7iy0q_81",ht="_options_7iy0q_107",jt="_panel_7iy0q_117",qt="_selected_7iy0q_142",gt="_text_7iy0q_146",wt="_trigger_7iy0q_154",Et="_minimal_7iy0q_199",St="_inline_7iy0q_259",Rt="_field_7iy0q_293",Nt="_label_7iy0q_297",l={combobox:ft,"combobox-input":"_combobox-input_7iy0q_12",dropdown:pt,empty:mt,group:_t,placeholder:bt,filter:yt,"filter-controls":"_filter-controls_7iy0q_46","loading-status":"_loading-status_7iy0q_57",native:vt,option:xt,options:ht,panel:jt,selected:qt,text:gt,trigger:wt,minimal:Et,inline:St,field:Rt,label:Nt,"inline-field":"_inline-field_7iy0q_302"};function Se(t,o){return{"--icon-svg":et.iconSVG(t,o)}}const It=({children:t,className:o,combobox:r=!1,description:a,errorMessage:i,invalid:x=!1,searchable:k,createOption:h,emptyLabel:Re="No matches found",errorLabel:m,onRetry:re,retryLabel:Ne="Retry",label:y,filterOptions:Ie=!0,hasNextPage:b=!1,loading:d=!1,loadingLabel:oe="Loading",loadMoreLabel:Ce="Load more",onLoadMore:R,onOpenChange:D,onSearchChange:F,searchValue:M,renderOption:A,searchPlaceholder:L="Filter",selectedItems:Ve,variant:j="default",...Be})=>{const O=dt(t),{defaultValue:$e,onChange:T,value:K,...ke}=O.props,c=$.sanitizeSelectProps(ke),{className:De,...Fe}=c,ae=s.useRef(null),ce=s.useRef(null),q=s.useId(),H=x&&i?`${q}-error`:void 0,ue=a?`${q}-description`:void 0,de=[c["aria-describedby"],ue,H].filter(Boolean).join(" ")||void 0,fe=x?!0:c["aria-invalid"],pe=s.useRef(null),g=s.useRef(null),P=s.useRef(null),me=s.useRef(null),J=s.useRef(!1),U=s.useRef(!1),X=s.useRef(R),_e=!!R,w=le(O.children),N=K!=null,Y=ut(w,K,$e),[Z,ee]=s.useState(()=>Y),[u,We]=s.useState(!1),[ze,be]=s.useState(!1),[Qe,Ge]=s.useState(null),[Me,Ae]=s.useState(""),v=M??Me,te=w.filter(e=>!e.hidden).length,Le=Qe??(d||!!m||b||te>8),E=k??(Le||ze||v.length>0),I=s.useCallback(e=>{M===void 0&&Ae(e),F==null||F(e)},[F,M]),_=s.useCallback(e=>{J.current===e||e&&c.disabled||(J.current=e,We(e),D==null||D(e),e||I(""))},[D,c.disabled,I]),W=N?String(K):Z,ye={default:$.resolveColor("--colors-semantic-content-secondary"),white:$.resolveColor("--color-white","white")},ve=c.disabled?$.resolveColor("--colors-semantic-content-disabled"):j==="minimal"?ye.white:ye.default,z=ct(w,W),Oe=Se("CaretDown",ve),Te=Se("MagnifyingGlass",ve),ne=at(w,Ie?v:""),S=v.trim(),Q=!!(r&&h&&S&&h.isValid(S)),Ke=y&&j==="inline"?we.formatInlineLabel(y):y,xe=e=>e?(A==null?void 0:A({groupLabel:e.groupLabel,isSelected:e.value===W,label:e.label,text:e.text,value:e.value}))??e.label:"Select an option";s.useEffect(()=>{u&&!v&&!d&&!m&&Ge(b||te>8)},[u,v,d,m,b,te]),s.useEffect(()=>{!N&&!w.some(e=>e.value===Z)&&ee(Y)},[Y,Z,N,w]),s.useEffect(()=>{u?E&&be(!0):be(!1)},[u,E]),s.useEffect(()=>{var e,f,p;u&&(r||E?(e=g.current)==null||e.focus():(p=(f=P.current)==null?void 0:f.querySelector("button:not(:disabled)"))==null||p.focus())},[u,r,E]),s.useEffect(()=>{if(!u)return;const e=f=>{var p;(p=ce.current)!=null&&p.contains(f.target)||_(!1)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[_,u]),s.useEffect(()=>{X.current=R},[R]),s.useEffect(()=>{c.disabled&&_(!1)},[_,c.disabled]);const se=s.useCallback(()=>{!J.current||c.disabled||d||m||!b||!X.current||U.current||(U.current=!0,X.current())},[m,b,d,c.disabled]);s.useEffect(()=>{if(U.current=!1,!u||c.disabled||d||m||!b||!_e)return;const e=me.current,f=P.current;if(!e||!f||typeof IntersectionObserver>"u")return;let p=!0;const C=new IntersectionObserver(Xe=>{p&&Xe.some(Ye=>Ye.isIntersecting)&&se()},{root:f});return C.observe(e),()=>{p=!1,C.disconnect()}},[u,d,m,b,_e,se,ne.length,v,c.disabled]);const He=e=>{N||ee(e.target.value),T==null||T(e)},ie=()=>{var e;_(!1),r||(e=ae.current)==null||e.focus()},he=()=>{var e;I(""),_(!0),(e=g.current)==null||e.focus()},je=()=>{!h||!Q||(h.onCreate(S),he())},Pe=e=>{var C;N||ee(e);const f=pe.current;if(!f){ie();return}const p=(C=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value"))==null?void 0:C.set;p==null||p.call(f,e),f.dispatchEvent(new Event("change",{bubbles:!0})),r?he():ie()},Je=e=>{e.key==="Escape"&&ie(),e.key==="Enter"&&e.target===g.current&&Q&&(e.preventDefault(),je())},qe=n.jsx("div",{"aria-hidden":!d,"aria-label":oe,className:l["loading-status"],role:"status",children:d&&n.jsx(Ee.Loading,{size:"small"})}),ge=n.jsxs("div",{className:V(l.dropdown,j==="inline"&&l.inline,j==="minimal"&&l.minimal,o),onKeyDown:Je,ref:ce,...Be,children:[n.jsx("select",{...Fe,"aria-hidden":"true",className:V(l.native,De),onChange:He,ref:pe,tabIndex:-1,value:W,children:O.children}),r?n.jsxs("div",{className:l.combobox,onClick:()=>{var e;return(e=g.current)==null?void 0:e.focus()},children:[Ve,n.jsx("input",{"aria-describedby":de,"aria-invalid":fe,"aria-autocomplete":"list","aria-expanded":u,"aria-label":c["aria-label"]??y??L,className:l["combobox-input"],disabled:c.disabled,onChange:e=>{I(e.target.value),_(!0)},onClick:()=>_(!0),onFocus:()=>_(!0),placeholder:L||void 0,ref:g,role:"combobox",type:"text",value:v}),qe]}):n.jsx(B.Button,{"aria-describedby":de,"aria-invalid":fe,"aria-label":y?void 0:c["aria-label"],"aria-expanded":u,"aria-haspopup":"dialog","aria-labelledby":y?`${q} ${q}-value`:void 0,className:V(l.trigger,(z==null?void 0:z.isPlaceholder)&&l.placeholder),"data-open":u?"true":void 0,disabled:c.disabled,onClick:()=>_(!u),ref:ae,style:Oe,variant:"simple",children:n.jsx("span",{className:l.text,id:`${q}-value`,children:xe(z)})}),u&&n.jsxs("div",{className:l.panel,children:[!r&&E&&n.jsxs("div",{className:l["filter-controls"],children:[n.jsx(we.Input,{"aria-label":"Filter",className:l.filter,icon:"MagnifyingGlass",onChange:e=>I(e.target.value),placeholder:L,ref:g,style:Te,type:"search",value:v}),qe]}),n.jsxs(nt.List,{"aria-label":"Dropdown","aria-busy":d||void 0,className:l.options,ref:P,children:[ne.map(e=>{const f=e.value===W;return n.jsx("li",{"data-component":"dropdown",children:n.jsxs(B.Button,{"aria-label":f?`${e.text}, selected`:e.text,className:V(l.option,f&&l.selected),disabled:e.disabled,onClick:()=>Pe(e.value),variant:"tertiary",children:[n.jsx("span",{className:l.text,children:xe(e)}),e.groupLabel&&n.jsx("small",{className:l.group,children:e.groupLabel})]})},`${e.groupLabel??"root"}-${e.value}`)}),Q&&h&&n.jsx("li",{children:n.jsx(B.Button,{"aria-label":G(h.render(S))||S,className:l.option,onClick:je,variant:"tertiary",children:n.jsx("span",{className:l.text,children:h.render(S)})})}),ne.length===0&&!Q&&!d&&!m&&!b&&n.jsx("li",{className:l.empty,children:Re}),m&&n.jsxs("li",{className:l.empty,children:[n.jsx("span",{role:"alert",children:m}),re&&n.jsx(B.Button,{disabled:d,onClick:re,variant:"tertiary",children:Ne})]}),d&&!r&&!E&&n.jsx("li",{"aria-label":oe,className:l.empty,role:"status",children:n.jsx(Ee.Loading,{size:"small"})}),b&&R&&!m&&n.jsx("li",{ref:me,children:n.jsx(B.Button,{className:l.option,disabled:d,onClick:se,variant:"tertiary",children:Ce})})]})]})]}),Ue=y||a?n.jsxs("div",{className:V(l.label,j==="inline"&&l["inline-field"]),children:[n.jsx(tt.Label,{label:Ke,labelId:y?q:void 0,description:a,descriptionId:ue,inline:j==="inline"}),ge]}):ge;return n.jsxs("div",{className:l.field,"data-component":"dropdown",children:[Ue,H&&n.jsx(Ze.FieldError,{errorId:H,errorMessage:i})]})};exports.Dropdown=It;
@@ -1,79 +1,79 @@
1
- import { jsxs as b, Fragment as Oe, jsx as l } from "react/jsx-runtime";
1
+ import { jsxs as b, Fragment as it, jsx as l } from "react/jsx-runtime";
2
2
  import k from "classix";
3
- import Je, { Children as Ue, isValidElement as j, useRef as m, useId as Xe, useState as se, useCallback as oe, useEffect as E } from "react";
4
- import { Button as D } from "../button/index.js";
5
- import { FieldError as Ye } from "../form/index.js";
6
- import { i as Ze } from "../../icons-DVeBguFb.js";
7
- import { f as et, I as tt } from "../../index-6TyCExT0.js";
8
- import { Label as nt } from "../label/index.js";
9
- import { List as rt } from "../list/index.js";
10
- import { Loading as it } from "../loading/index.js";
11
- import { S as lt, s as st, r as ae } from "../../index-GPsHvb4d.js";
12
- import '../../assets/index41.css';function q(t) {
13
- return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(q).join(" ") : j(t) ? q(t.props.children) : "";
3
+ import rt, { Children as lt, isValidElement as F, useRef as _, useId as st, useState as D, useCallback as oe, useEffect as g } from "react";
4
+ import { Button as j } from "../button/index.js";
5
+ import { FieldError as at } from "../form/index.js";
6
+ import { i as ot } from "../../icons-DVeBguFb.js";
7
+ import { f as ct, I as dt } from "../../index-6TyCExT0.js";
8
+ import { Label as ut } from "../label/index.js";
9
+ import { List as ft } from "../list/index.js";
10
+ import { Loading as Re } from "../loading/index.js";
11
+ import { S as pt, s as mt, r as ce } from "../../index-GPsHvb4d.js";
12
+ import '../../assets/index41.css';function K(t) {
13
+ return typeof t == "string" || typeof t == "number" ? String(t) : Array.isArray(t) ? t.map(K).join(" ") : F(t) ? K(t.props.children) : "";
14
14
  }
15
- function ot(t) {
16
- return j(t) && t.type === "option";
15
+ function bt(t) {
16
+ return F(t) && t.type === "option";
17
17
  }
18
- function at(t) {
19
- return j(t) && t.type === "optgroup";
18
+ function yt(t) {
19
+ return F(t) && t.type === "optgroup";
20
20
  }
21
- function ct(t) {
22
- return j(t) && t.type === Je.Fragment;
21
+ function _t(t) {
22
+ return F(t) && t.type === rt.Fragment;
23
23
  }
24
- function dt(t) {
25
- return j(t) && t.type === lt;
24
+ function vt(t) {
25
+ return F(t) && t.type === pt;
26
26
  }
27
- function ce(t, s, r = !1) {
28
- const o = [];
29
- return Ue.forEach(t, (n) => {
30
- if (ct(n))
31
- o.push(...ce(n.props.children, s, r));
32
- else if (ot(n)) {
33
- const y = q(n.props.children).trim(), F = n.props.value != null ? String(n.props.value) : y;
34
- o.push({
27
+ function de(t, s, r = !1) {
28
+ const a = [];
29
+ return lt.forEach(t, (n) => {
30
+ if (_t(n))
31
+ a.push(...de(n.props.children, s, r));
32
+ else if (bt(n)) {
33
+ const w = K(n.props.children).trim(), W = n.props.value != null ? String(n.props.value) : w;
34
+ a.push({
35
35
  disabled: r || !!n.props.disabled,
36
36
  groupLabel: s,
37
37
  hidden: !!n.props.hidden,
38
- isPlaceholder: !!(n.props.hidden && F === ""),
38
+ isPlaceholder: !!(n.props.hidden && W === ""),
39
39
  label: n.props.children,
40
40
  selected: !!n.props.selected,
41
- text: y,
42
- value: F
41
+ text: w,
42
+ value: W
43
43
  });
44
- } else at(n) && o.push(...ce(n.props.children, n.props.label, r || !!n.props.disabled));
45
- }), o;
44
+ } else yt(n) && a.push(...de(n.props.children, n.props.label, r || !!n.props.disabled));
45
+ }), a;
46
46
  }
47
- function ut(t) {
47
+ function ht(t) {
48
48
  const s = t.trim();
49
49
  if (!s) return null;
50
- const o = [.../[*?]/.test(s) ? s : `*${s}*`].map((n) => n === "*" ? ".*" : n === "?" ? "." : n.replace(/[|\\{}()[\]^$+.,]/g, "\\$&")).join("");
51
- return new RegExp(`^${o}$`, "i");
50
+ const a = [.../[*?]/.test(s) ? s : `*${s}*`].map((n) => n === "*" ? ".*" : n === "?" ? "." : n.replace(/[|\\{}()[\]^$+.,]/g, "\\$&")).join("");
51
+ return new RegExp(`^${a}$`, "i");
52
52
  }
53
- function ft(t, s) {
54
- const r = ut(s), o = t.filter((n) => !n.hidden && !n.isPlaceholder);
55
- return r ? o.filter((n) => r.test([n.groupLabel, n.text, n.value].filter(Boolean).join(" "))) : o;
53
+ function gt(t, s) {
54
+ const r = ht(s), a = t.filter((n) => !n.hidden && !n.isPlaceholder);
55
+ return r ? a.filter((n) => r.test([n.groupLabel, n.text, n.value].filter(Boolean).join(" "))) : a;
56
56
  }
57
- function pt(t, s) {
57
+ function wt(t, s) {
58
58
  return t.find((r) => r.value === s) ?? t.find((r) => r.isPlaceholder) ?? t[0];
59
59
  }
60
- function mt(t, s, r) {
61
- var o, n;
62
- return s != null ? String(s) : r != null ? String(r) : ((o = t.find((y) => y.selected)) == null ? void 0 : o.value) ?? ((n = t[0]) == null ? void 0 : n.value) ?? "";
60
+ function qt(t, s, r) {
61
+ var a, n;
62
+ return s != null ? String(s) : r != null ? String(r) : ((a = t.find((w) => w.selected)) == null ? void 0 : a.value) ?? ((n = t[0]) == null ? void 0 : n.value) ?? "";
63
63
  }
64
- function bt(t) {
65
- if (dt(t)) {
64
+ function St(t) {
65
+ if (vt(t)) {
66
66
  const {
67
67
  children: s,
68
68
  placeholder: r,
69
- ...o
69
+ ...a
70
70
  } = t.props;
71
71
  return {
72
- children: /* @__PURE__ */ b(Oe, { children: [
72
+ children: /* @__PURE__ */ b(it, { children: [
73
73
  r && /* @__PURE__ */ l("option", { hidden: !0, value: "", children: r }),
74
74
  s
75
75
  ] }),
76
- props: o
76
+ props: a
77
77
  };
78
78
  }
79
79
  return {
@@ -81,183 +81,194 @@ function bt(t) {
81
81
  props: t.props
82
82
  };
83
83
  }
84
- const vt = "_combobox_10eim_3", _t = "_dropdown_10eim_21", yt = "_empty_10eim_29", ht = "_group_10eim_30", gt = "_placeholder_10eim_31", wt = "_filter_10eim_39", xt = "_native_10eim_49", Nt = "_option_10eim_59", It = "_options_10eim_85", St = "_panel_10eim_95", Et = "_selected_10eim_120", Rt = "_text_10eim_124", $t = "_trigger_10eim_132", Ct = "_minimal_10eim_177", Bt = "_inline_10eim_237", Vt = "_field_10eim_271", kt = "_label_10eim_275", i = {
85
- combobox: vt,
86
- "combobox-input": "_combobox-input_10eim_12",
87
- dropdown: _t,
88
- empty: yt,
89
- group: ht,
90
- placeholder: gt,
91
- filter: wt,
92
- native: xt,
93
- option: Nt,
94
- options: It,
95
- panel: St,
96
- selected: Et,
97
- text: Rt,
98
- trigger: $t,
99
- minimal: Ct,
100
- inline: Bt,
101
- field: Vt,
102
- label: kt,
103
- "inline-field": "_inline-field_10eim_280"
84
+ const It = "_combobox_7iy0q_3", Nt = "_dropdown_7iy0q_21", xt = "_empty_7iy0q_29", Et = "_group_7iy0q_30", Ct = "_placeholder_7iy0q_31", Rt = "_filter_7iy0q_39", Vt = "_native_7iy0q_71", $t = "_option_7iy0q_81", Bt = "_options_7iy0q_107", kt = "_panel_7iy0q_117", Dt = "_selected_7iy0q_142", jt = "_text_7iy0q_146", Ft = "_trigger_7iy0q_154", Wt = "_minimal_7iy0q_199", zt = "_inline_7iy0q_259", Qt = "_field_7iy0q_293", Gt = "_label_7iy0q_297", i = {
85
+ combobox: It,
86
+ "combobox-input": "_combobox-input_7iy0q_12",
87
+ dropdown: Nt,
88
+ empty: xt,
89
+ group: Et,
90
+ placeholder: Ct,
91
+ filter: Rt,
92
+ "filter-controls": "_filter-controls_7iy0q_46",
93
+ "loading-status": "_loading-status_7iy0q_57",
94
+ native: Vt,
95
+ option: $t,
96
+ options: Bt,
97
+ panel: kt,
98
+ selected: Dt,
99
+ text: jt,
100
+ trigger: Ft,
101
+ minimal: Wt,
102
+ inline: zt,
103
+ field: Qt,
104
+ label: Gt,
105
+ "inline-field": "_inline-field_7iy0q_302"
104
106
  };
105
- function Se(t, s) {
107
+ function Ve(t, s) {
106
108
  return {
107
- "--icon-svg": Ze(t, s)
109
+ "--icon-svg": ot(t, s)
108
110
  };
109
111
  }
110
- const At = ({
112
+ const Yt = ({
111
113
  children: t,
112
114
  className: s,
113
115
  combobox: r = !1,
114
- description: o,
116
+ description: a,
115
117
  errorMessage: n,
116
- invalid: y = !1,
117
- searchable: F,
118
- createOption: h,
119
- emptyLabel: Ee = "No matches found",
120
- errorLabel: v,
121
- onRetry: de,
122
- retryLabel: Re = "Retry",
123
- label: _,
124
- filterOptions: $e = !0,
125
- hasNextPage: g = !1,
126
- loading: p = !1,
127
- loadMoreLabel: Ce = "Load more",
118
+ invalid: w = !1,
119
+ searchable: W,
120
+ createOption: q,
121
+ emptyLabel: $e = "No matches found",
122
+ errorLabel: p,
123
+ onRetry: ue,
124
+ retryLabel: Be = "Retry",
125
+ label: v,
126
+ filterOptions: ke = !0,
127
+ hasNextPage: y = !1,
128
+ loading: d = !1,
129
+ loadingLabel: fe = "Loading",
130
+ loadMoreLabel: De = "Load more",
128
131
  onLoadMore: R,
129
- onOpenChange: L,
132
+ onOpenChange: z,
130
133
  onSearchChange: Q,
131
- searchValue: M,
132
- renderOption: P,
133
- searchPlaceholder: A = "Filter",
134
- selectedItems: Be,
135
- variant: w = "default",
136
- ...Ve
134
+ searchValue: L,
135
+ renderOption: O,
136
+ searchPlaceholder: T = "Filter",
137
+ selectedItems: je,
138
+ variant: S = "default",
139
+ ...Fe
137
140
  }) => {
138
- const K = bt(t), {
139
- defaultValue: ke,
140
- onChange: T,
141
- value: H,
142
- ...De
143
- } = K.props, a = st(De), {
144
- className: je,
145
- ...Fe
146
- } = a, ue = m(null), fe = m(null), x = Xe(), O = y && n ? `${x}-error` : void 0, pe = o ? `${x}-description` : void 0, me = [a["aria-describedby"], pe, O].filter(Boolean).join(" ") || void 0, be = y ? !0 : a["aria-invalid"], ve = m(null), N = m(null), J = m(null), _e = m(null), U = m(!1), X = m(!1), Y = m(R), ye = !!R, I = ce(K.children), Z = F ?? I.filter((e) => !e.hidden).length > 8, $ = H != null, ee = mt(I, H, ke), [te, ne] = se(() => ee), [u, Le] = se(!1), [Qe, We] = se(""), C = M ?? Qe, B = oe((e) => {
147
- M === void 0 && We(e), Q == null || Q(e);
148
- }, [Q, M]), f = oe((e) => {
149
- U.current === e || e && a.disabled || (U.current = e, Le(e), L == null || L(e), e || B(""));
150
- }, [L, a.disabled, B]), W = $ ? String(H) : te, he = {
151
- default: ae("--colors-semantic-content-secondary"),
152
- white: ae("--color-white", "white")
153
- }, ge = a.disabled ? ae("--colors-semantic-content-disabled") : w === "minimal" ? he.white : he.default, z = pt(I, W), ze = Se("CaretDown", ge), Ge = Se("MagnifyingGlass", ge), re = ft(I, $e ? C : ""), S = C.trim(), G = !!(r && h && S && h.isValid(S)), qe = _ && w === "inline" ? et(_) : _, we = (e) => e ? (P == null ? void 0 : P({
141
+ const H = St(t), {
142
+ defaultValue: We,
143
+ onChange: J,
144
+ value: P,
145
+ ...ze
146
+ } = H.props, o = mt(ze), {
147
+ className: Qe,
148
+ ...Ge
149
+ } = o, pe = _(null), me = _(null), I = st(), U = w && n ? `${I}-error` : void 0, be = a ? `${I}-description` : void 0, ye = [o["aria-describedby"], be, U].filter(Boolean).join(" ") || void 0, _e = w ? !0 : o["aria-invalid"], ve = _(null), N = _(null), X = _(null), he = _(null), Y = _(!1), Z = _(!1), ee = _(R), ge = !!R, x = de(H.children), V = P != null, te = qt(x, P, We), [ne, ie] = D(() => te), [c, Ae] = D(!1), [Me, we] = D(!1), [Ke, Le] = D(null), [Oe, Te] = D(""), h = L ?? Oe, re = x.filter((e) => !e.hidden).length, He = Ke ?? (d || !!p || y || re > 8), E = W ?? (He || Me || h.length > 0), $ = oe((e) => {
150
+ L === void 0 && Te(e), Q == null || Q(e);
151
+ }, [Q, L]), m = oe((e) => {
152
+ Y.current === e || e && o.disabled || (Y.current = e, Ae(e), z == null || z(e), e || $(""));
153
+ }, [z, o.disabled, $]), G = V ? String(P) : ne, qe = {
154
+ default: ce("--colors-semantic-content-secondary"),
155
+ white: ce("--color-white", "white")
156
+ }, Se = o.disabled ? ce("--colors-semantic-content-disabled") : S === "minimal" ? qe.white : qe.default, A = wt(x, G), Je = Ve("CaretDown", Se), Pe = Ve("MagnifyingGlass", Se), le = gt(x, ke ? h : ""), C = h.trim(), M = !!(r && q && C && q.isValid(C)), Ue = v && S === "inline" ? ct(v) : v, Ie = (e) => e ? (O == null ? void 0 : O({
154
157
  groupLabel: e.groupLabel,
155
- isSelected: e.value === W,
158
+ isSelected: e.value === G,
156
159
  label: e.label,
157
160
  text: e.text,
158
161
  value: e.value
159
162
  })) ?? e.label : "Select an option";
160
- E(() => {
161
- !$ && !I.some((e) => e.value === te) && ne(ee);
162
- }, [ee, te, $, I]), E(() => {
163
- var e, c, d;
164
- u && (r || Z ? (e = N.current) == null || e.focus() : (d = (c = J.current) == null ? void 0 : c.querySelector("button:not(:disabled)")) == null || d.focus());
165
- }, [u, r, Z]), E(() => {
166
- if (!u)
163
+ g(() => {
164
+ c && !h && !d && !p && Le(y || re > 8);
165
+ }, [c, h, d, p, y, re]), g(() => {
166
+ !V && !x.some((e) => e.value === ne) && ie(te);
167
+ }, [te, ne, V, x]), g(() => {
168
+ c ? E && we(!0) : we(!1);
169
+ }, [c, E]), g(() => {
170
+ var e, u, f;
171
+ c && (r || E ? (e = N.current) == null || e.focus() : (f = (u = X.current) == null ? void 0 : u.querySelector("button:not(:disabled)")) == null || f.focus());
172
+ }, [c, r, E]), g(() => {
173
+ if (!c)
167
174
  return;
168
- const e = (c) => {
169
- var d;
170
- (d = fe.current) != null && d.contains(c.target) || f(!1);
175
+ const e = (u) => {
176
+ var f;
177
+ (f = me.current) != null && f.contains(u.target) || m(!1);
171
178
  };
172
179
  return document.addEventListener("mousedown", e), () => {
173
180
  document.removeEventListener("mousedown", e);
174
181
  };
175
- }, [f, u]), E(() => {
176
- Y.current = R;
177
- }, [R]), E(() => {
178
- a.disabled && f(!1);
179
- }, [f, a.disabled]);
180
- const ie = oe(() => {
181
- !U.current || a.disabled || p || v || !g || !Y.current || X.current || (X.current = !0, Y.current());
182
- }, [v, g, p, a.disabled]);
183
- E(() => {
184
- if (X.current = !1, !u || a.disabled || p || v || !g || !ye) return;
185
- const e = _e.current, c = J.current;
186
- if (!e || !c || typeof IntersectionObserver > "u") return;
187
- let d = !0;
188
- const V = new IntersectionObserver((Te) => {
189
- d && Te.some((He) => He.isIntersecting) && ie();
182
+ }, [m, c]), g(() => {
183
+ ee.current = R;
184
+ }, [R]), g(() => {
185
+ o.disabled && m(!1);
186
+ }, [m, o.disabled]);
187
+ const se = oe(() => {
188
+ !Y.current || o.disabled || d || p || !y || !ee.current || Z.current || (Z.current = !0, ee.current());
189
+ }, [p, y, d, o.disabled]);
190
+ g(() => {
191
+ if (Z.current = !1, !c || o.disabled || d || p || !y || !ge) return;
192
+ const e = he.current, u = X.current;
193
+ if (!e || !u || typeof IntersectionObserver > "u") return;
194
+ let f = !0;
195
+ const B = new IntersectionObserver((tt) => {
196
+ f && tt.some((nt) => nt.isIntersecting) && se();
190
197
  }, {
191
- root: c
198
+ root: u
192
199
  });
193
- return V.observe(e), () => {
194
- d = !1, V.disconnect();
200
+ return B.observe(e), () => {
201
+ f = !1, B.disconnect();
195
202
  };
196
- }, [u, p, v, g, ye, ie, re.length, C, a.disabled]);
197
- const Me = (e) => {
198
- $ || ne(e.target.value), T == null || T(e);
199
- }, le = () => {
200
- var e;
201
- f(!1), r || (e = ue.current) == null || e.focus();
202
- }, xe = () => {
203
+ }, [c, d, p, y, ge, se, le.length, h, o.disabled]);
204
+ const Xe = (e) => {
205
+ V || ie(e.target.value), J == null || J(e);
206
+ }, ae = () => {
203
207
  var e;
204
- B(""), f(!0), (e = N.current) == null || e.focus();
208
+ m(!1), r || (e = pe.current) == null || e.focus();
205
209
  }, Ne = () => {
206
- !h || !G || (h.onCreate(S), xe());
207
- }, Pe = (e) => {
208
- var V;
209
- $ || ne(e);
210
- const c = ve.current;
211
- if (!c) {
212
- le();
210
+ var e;
211
+ $(""), m(!0), (e = N.current) == null || e.focus();
212
+ }, xe = () => {
213
+ !q || !M || (q.onCreate(C), Ne());
214
+ }, Ye = (e) => {
215
+ var B;
216
+ V || ie(e);
217
+ const u = ve.current;
218
+ if (!u) {
219
+ ae();
213
220
  return;
214
221
  }
215
- const d = (V = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : V.set;
216
- d == null || d.call(c, e), c.dispatchEvent(new Event("change", {
222
+ const f = (B = Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype, "value")) == null ? void 0 : B.set;
223
+ f == null || f.call(u, e), u.dispatchEvent(new Event("change", {
217
224
  bubbles: !0
218
- })), r ? xe() : le();
219
- }, Ae = (e) => {
220
- e.key === "Escape" && le(), e.key === "Enter" && e.target === N.current && G && (e.preventDefault(), Ne());
221
- }, Ie = /* @__PURE__ */ b("div", { className: k(i.dropdown, w === "inline" && i.inline, w === "minimal" && i.minimal, s), onKeyDown: Ae, ref: fe, ...Ve, children: [
222
- /* @__PURE__ */ l("select", { ...Fe, "aria-hidden": "true", className: k(i.native, je), onChange: Me, ref: ve, tabIndex: -1, value: W, children: K.children }),
225
+ })), r ? Ne() : ae();
226
+ }, Ze = (e) => {
227
+ e.key === "Escape" && ae(), e.key === "Enter" && e.target === N.current && M && (e.preventDefault(), xe());
228
+ }, Ee = /* @__PURE__ */ l("div", { "aria-hidden": !d, "aria-label": fe, className: i["loading-status"], role: "status", children: d && /* @__PURE__ */ l(Re, { size: "small" }) }), Ce = /* @__PURE__ */ b("div", { className: k(i.dropdown, S === "inline" && i.inline, S === "minimal" && i.minimal, s), onKeyDown: Ze, ref: me, ...Fe, children: [
229
+ /* @__PURE__ */ l("select", { ...Ge, "aria-hidden": "true", className: k(i.native, Qe), onChange: Xe, ref: ve, tabIndex: -1, value: G, children: H.children }),
223
230
  r ? /* @__PURE__ */ b("div", { className: i.combobox, onClick: () => {
224
231
  var e;
225
232
  return (e = N.current) == null ? void 0 : e.focus();
226
233
  }, children: [
227
- Be,
228
- /* @__PURE__ */ l("input", { "aria-describedby": me, "aria-invalid": be, "aria-autocomplete": "list", "aria-expanded": u, "aria-label": a["aria-label"] ?? _ ?? A, className: i["combobox-input"], disabled: a.disabled, onChange: (e) => {
229
- B(e.target.value), f(!0);
230
- }, onClick: () => f(!0), onFocus: () => f(!0), placeholder: A || void 0, ref: N, role: "combobox", type: "text", value: C })
231
- ] }) : /* @__PURE__ */ l(D, { "aria-describedby": me, "aria-invalid": be, "aria-label": _ ? void 0 : a["aria-label"], "aria-expanded": u, "aria-haspopup": "dialog", "aria-labelledby": _ ? `${x} ${x}-value` : void 0, className: k(i.trigger, (z == null ? void 0 : z.isPlaceholder) && i.placeholder), "data-open": u ? "true" : void 0, disabled: a.disabled, onClick: () => f(!u), ref: ue, style: ze, variant: "simple", children: /* @__PURE__ */ l("span", { className: i.text, id: `${x}-value`, children: we(z) }) }),
232
- u && /* @__PURE__ */ b("div", { className: i.panel, children: [
233
- !r && Z && /* @__PURE__ */ l(tt, { "aria-label": "Filter", className: i.filter, icon: "MagnifyingGlass", onChange: (e) => B(e.target.value), placeholder: A, ref: N, style: Ge, type: "search", value: C }),
234
- /* @__PURE__ */ b(rt, { "aria-label": "Dropdown", "aria-busy": p || void 0, className: i.options, ref: J, children: [
235
- re.map((e) => {
236
- const c = e.value === W;
237
- return /* @__PURE__ */ l("li", { "data-component": "dropdown", children: /* @__PURE__ */ b(D, { "aria-label": c ? `${e.text}, selected` : e.text, className: k(i.option, c && i.selected), disabled: e.disabled, onClick: () => Pe(e.value), variant: "tertiary", children: [
238
- /* @__PURE__ */ l("span", { className: i.text, children: we(e) }),
234
+ je,
235
+ /* @__PURE__ */ l("input", { "aria-describedby": ye, "aria-invalid": _e, "aria-autocomplete": "list", "aria-expanded": c, "aria-label": o["aria-label"] ?? v ?? T, className: i["combobox-input"], disabled: o.disabled, onChange: (e) => {
236
+ $(e.target.value), m(!0);
237
+ }, onClick: () => m(!0), onFocus: () => m(!0), placeholder: T || void 0, ref: N, role: "combobox", type: "text", value: h }),
238
+ Ee
239
+ ] }) : /* @__PURE__ */ l(j, { "aria-describedby": ye, "aria-invalid": _e, "aria-label": v ? void 0 : o["aria-label"], "aria-expanded": c, "aria-haspopup": "dialog", "aria-labelledby": v ? `${I} ${I}-value` : void 0, className: k(i.trigger, (A == null ? void 0 : A.isPlaceholder) && i.placeholder), "data-open": c ? "true" : void 0, disabled: o.disabled, onClick: () => m(!c), ref: pe, style: Je, variant: "simple", children: /* @__PURE__ */ l("span", { className: i.text, id: `${I}-value`, children: Ie(A) }) }),
240
+ c && /* @__PURE__ */ b("div", { className: i.panel, children: [
241
+ !r && E && /* @__PURE__ */ b("div", { className: i["filter-controls"], children: [
242
+ /* @__PURE__ */ l(dt, { "aria-label": "Filter", className: i.filter, icon: "MagnifyingGlass", onChange: (e) => $(e.target.value), placeholder: T, ref: N, style: Pe, type: "search", value: h }),
243
+ Ee
244
+ ] }),
245
+ /* @__PURE__ */ b(ft, { "aria-label": "Dropdown", "aria-busy": d || void 0, className: i.options, ref: X, children: [
246
+ le.map((e) => {
247
+ const u = e.value === G;
248
+ return /* @__PURE__ */ l("li", { "data-component": "dropdown", children: /* @__PURE__ */ b(j, { "aria-label": u ? `${e.text}, selected` : e.text, className: k(i.option, u && i.selected), disabled: e.disabled, onClick: () => Ye(e.value), variant: "tertiary", children: [
249
+ /* @__PURE__ */ l("span", { className: i.text, children: Ie(e) }),
239
250
  e.groupLabel && /* @__PURE__ */ l("small", { className: i.group, children: e.groupLabel })
240
251
  ] }) }, `${e.groupLabel ?? "root"}-${e.value}`);
241
252
  }),
242
- G && h && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(D, { "aria-label": q(h.render(S)) || S, className: i.option, onClick: Ne, variant: "tertiary", children: /* @__PURE__ */ l("span", { className: i.text, children: h.render(S) }) }) }),
243
- re.length === 0 && !G && !p && !v && !g && /* @__PURE__ */ l("li", { className: i.empty, children: Ee }),
244
- v && /* @__PURE__ */ b("li", { className: i.empty, children: [
245
- /* @__PURE__ */ l("span", { role: "alert", children: v }),
246
- de && /* @__PURE__ */ l(D, { disabled: p, onClick: de, variant: "tertiary", children: Re })
253
+ M && q && /* @__PURE__ */ l("li", { children: /* @__PURE__ */ l(j, { "aria-label": K(q.render(C)) || C, className: i.option, onClick: xe, variant: "tertiary", children: /* @__PURE__ */ l("span", { className: i.text, children: q.render(C) }) }) }),
254
+ le.length === 0 && !M && !d && !p && !y && /* @__PURE__ */ l("li", { className: i.empty, children: $e }),
255
+ p && /* @__PURE__ */ b("li", { className: i.empty, children: [
256
+ /* @__PURE__ */ l("span", { role: "alert", children: p }),
257
+ ue && /* @__PURE__ */ l(j, { disabled: d, onClick: ue, variant: "tertiary", children: Be })
247
258
  ] }),
248
- p && /* @__PURE__ */ l("li", { "aria-label": "Loading", className: i.empty, role: "status", children: /* @__PURE__ */ l(it, { size: "small" }) }),
249
- g && R && !v && /* @__PURE__ */ l("li", { ref: _e, children: /* @__PURE__ */ l(D, { className: i.option, disabled: p, onClick: ie, variant: "tertiary", children: Ce }) })
259
+ d && !r && !E && /* @__PURE__ */ l("li", { "aria-label": fe, className: i.empty, role: "status", children: /* @__PURE__ */ l(Re, { size: "small" }) }),
260
+ y && R && !p && /* @__PURE__ */ l("li", { ref: he, children: /* @__PURE__ */ l(j, { className: i.option, disabled: d, onClick: se, variant: "tertiary", children: De }) })
250
261
  ] })
251
262
  ] })
252
- ] }), Ke = _ || o ? /* @__PURE__ */ b("div", { className: k(i.label, w === "inline" && i["inline-field"]), children: [
253
- /* @__PURE__ */ l(nt, { label: qe, labelId: _ ? x : void 0, description: o, descriptionId: pe, inline: w === "inline" }),
254
- Ie
255
- ] }) : Ie;
263
+ ] }), et = v || a ? /* @__PURE__ */ b("div", { className: k(i.label, S === "inline" && i["inline-field"]), children: [
264
+ /* @__PURE__ */ l(ut, { label: Ue, labelId: v ? I : void 0, description: a, descriptionId: be, inline: S === "inline" }),
265
+ Ce
266
+ ] }) : Ce;
256
267
  return /* @__PURE__ */ b("div", { className: i.field, "data-component": "dropdown", children: [
257
- Ke,
258
- O && /* @__PURE__ */ l(Ye, { errorId: O, errorMessage: n })
268
+ et,
269
+ U && /* @__PURE__ */ l(at, { errorId: U, errorMessage: n })
259
270
  ] });
260
271
  };
261
272
  export {
262
- At as Dropdown
273
+ Yt as Dropdown
263
274
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),m=require("react"),b=require("../button/index.cjs"),I=require("../checkbox/index.cjs"),T=require("../chip/index.cjs"),H=require("../collapsible/index.cjs"),P=require("../../index-BwfsmdF6.cjs"),z=require("../dialog/index.cjs"),A=require("../header/index.cjs"),E=require("../../index-DEQcFR32.cjs"),J="_search_wsuwb_3",K="_controls_wsuwb_15",Q="_chips_wsuwb_35",S="_radio_wsuwb_101",l={search:J,controls:K,chips:Q,"filter-dialog":"_filter-dialog_wsuwb_42","filter-groups":"_filter-groups_wsuwb_47","filter-group":"_filter-group_wsuwb_47","filter-option":"_filter-option_wsuwb_83","option-copy":"_option-copy_wsuwb_89",radio:S,"collapsible-options":"_collapsible-options_wsuwb_124"},U=({filterButtonLabel:x="Filters",filterDialogColumns:f=1,filterDialogTitle:k="Filters",filterGroups:d=[],onChange:q,onSelectedFiltersChange:i,removeFilterLabel:M=c=>`Remove ${c.label} filter`,resetLabel:u="Reset",searchLabel:$="Search",searchPlaceholder:O="Search",selectedFilters:t=[],showResultsLabel:B="Show results",value:D=""})=>{const c=m.useId(),[j,r]=m.useState(!1),R=m.useMemo(()=>new Map(d.flatMap(s=>{var n;return[...s.options,...((n=s.collapsible)==null?void 0:n.options)??[]]}).map(s=>[s.value,s])),[d]),h=t.flatMap(s=>{const n=R.get(s);return n?[n]:[]}),p=(s,n,e)=>{var N;if(!i)return;const _=new Set([...(e==null?void 0:e.options.map(o=>o.value))??[],...((N=e==null?void 0:e.collapsible)==null?void 0:N.options.map(o=>o.value))??[]]),y=t.filter(o=>!_.has(o));if(n&&(e==null?void 0:e.defaultValue)===s){i(y);return}i(n?(e==null?void 0:e.control)==="radio"||(e==null?void 0:e.selectionMode)==="single"?[...y,s]:[...new Set([...t,s])]:t.filter(o=>o!==s))},v=(s,n)=>{var e;return t.includes(s)||n.defaultValue===s&&![...n.options,...((e=n.collapsible)==null?void 0:e.options)??[]].some(_=>t.includes(_.value))},w=(s,n)=>a.jsx("div",{className:l["filter-option"],"data-component":"renderfilter",children:n.control==="radio"?a.jsxs("label",{className:l.radio,children:[a.jsx("input",{checked:v(s.value,n),name:`${c}-filter-${n.label??"group"}`,onChange:e=>p(s.value,e.target.checked,n),type:"radio"}),a.jsxs("span",{className:l["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]})]}):a.jsx(I.Checkbox,{checked:v(s.value,n),label:a.jsxs("span",{className:l["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]}),onChange:e=>p(s.value,e.target.checked,n)})},s.value);return a.jsxs("div",{className:l.search,"data-component":"search",children:[a.jsxs("div",{className:l.controls,children:[a.jsx(E.Input,{"aria-label":$,icon:"MagnifyingGlass",onChange:s=>q(s.target.value),placeholder:O,type:"search",value:D}),d.length>0&&a.jsx(b.Button,{"aria-expanded":j,"aria-haspopup":"dialog",badge:h.length,icon:"Funnel",onClick:()=>r(!0),variant:"tertiary",children:x})]}),h.length>0&&a.jsxs("div",{"aria-label":x,className:l.chips,children:[h.map(s=>a.jsx(T.Chip,{accessibleLabel:M(s),label:s.label,onDelete:()=>p(s.value,!1)},s.value)),a.jsx(b.Button,{onClick:()=>i==null?void 0:i([]),variant:"tertiary",children:u})]}),j&&a.jsx(z.Dialog,{"aria-labelledby":c,className:l["filter-dialog"],controls:a.jsxs(P.Controls,{children:[a.jsx(b.Button,{onClick:()=>{i==null||i([]),r(!1)},children:u}),a.jsx(b.Button,{onClick:()=>r(!1),variant:"primary",children:B})]}),header:a.jsx(A.Header,{children:a.jsx("h2",{id:c,children:k})}),open:!0,setOpen:r,children:a.jsx("div",{className:l["filter-groups"],"data-columns":f,children:d.map((s,n)=>a.jsxs("section",{"aria-labelledby":s.label?`${c}-${n}`:void 0,className:l["filter-group"],"data-column-span":s.columnSpan??1,role:s.control==="radio"?"radiogroup":"group",children:[s.label&&a.jsx("h3",{id:`${c}-${n}`,children:s.label}),s.options.map(e=>w(e,s)),s.collapsible&&a.jsx(H.Collapsible,{summary:s.collapsible.label,children:a.jsx("div",{className:l["collapsible-options"],children:s.collapsible.options.map(e=>w(e,s))})})]},s.label??n))})})]})};exports.Search=U;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../assets/index9.css');const a=require("react/jsx-runtime"),b=require("react"),h=require("../button/index.cjs"),z=require("../checkbox/index.cjs"),H=require("../chip/index.cjs"),P=require("../collapsible/index.cjs"),A=require("../../index-BwfsmdF6.cjs"),E=require("../dialog/index.cjs"),J=require("../header/index.cjs"),K=require("../../index-DEQcFR32.cjs"),Q=require("../loading/index.cjs"),S="_search_1r1ik_3",U="_controls_1r1ik_15",V="_actions_1r1ik_36",W="_chips_1r1ik_56",X="_radio_1r1ik_122",n={search:S,controls:U,actions:V,"loading-status":"_loading-status_1r1ik_46",chips:W,"filter-dialog":"_filter-dialog_1r1ik_63","filter-groups":"_filter-groups_1r1ik_68","filter-group":"_filter-group_1r1ik_68","filter-option":"_filter-option_1r1ik_104","option-copy":"_option-copy_1r1ik_110",radio:X,"collapsible-options":"_collapsible-options_1r1ik_145"},Y=({filterButtonLabel:j="Filters",filterDialogColumns:f=1,filterDialogTitle:M="Filters",filterGroups:t=[],isLoading:d,loadingLabel:$="Loading results",onChange:w,onSelectedFiltersChange:l,removeFilterLabel:O=o=>`Remove ${o.label} filter`,resetLabel:v="Reset",searchLabel:B="Search",searchPlaceholder:D="Search",selectedFilters:r=[],showResultsLabel:R="Show results",value:I=""})=>{const o=b.useId(),[u,_]=b.useState(!1),T=b.useMemo(()=>new Map(t.flatMap(s=>{var i;return[...s.options,...((i=s.collapsible)==null?void 0:i.options)??[]]}).map(s=>[s.value,s])),[t]),p=r.flatMap(s=>{const i=T.get(s);return i?[i]:[]}),m=(s,i,e)=>{var q;if(!l)return;const x=new Set([...(e==null?void 0:e.options.map(c=>c.value))??[],...((q=e==null?void 0:e.collapsible)==null?void 0:q.options.map(c=>c.value))??[]]),N=r.filter(c=>!x.has(c));if(i&&(e==null?void 0:e.defaultValue)===s){l(N);return}l(i?(e==null?void 0:e.control)==="radio"||(e==null?void 0:e.selectionMode)==="single"?[...N,s]:[...new Set([...r,s])]:r.filter(c=>c!==s))},k=(s,i)=>{var e;return r.includes(s)||i.defaultValue===s&&![...i.options,...((e=i.collapsible)==null?void 0:e.options)??[]].some(x=>r.includes(x.value))},y=(s,i)=>a.jsx("div",{className:n["filter-option"],"data-component":"renderfilter",children:i.control==="radio"?a.jsxs("label",{className:n.radio,children:[a.jsx("input",{checked:k(s.value,i),name:`${o}-filter-${i.label??"group"}`,onChange:e=>m(s.value,e.target.checked,i),type:"radio"}),a.jsxs("span",{className:n["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]})]}):a.jsx(z.Checkbox,{checked:k(s.value,i),label:a.jsxs("span",{className:n["option-copy"],children:[s.label,s.description&&a.jsx("sub",{children:s.description})]}),onChange:e=>m(s.value,e.target.checked,i)})},s.value);return a.jsxs("div",{className:n.search,"data-component":"search",children:[a.jsxs("div",{className:n.controls,"data-with-filters":t.length>0||void 0,children:[a.jsx(K.Input,{"aria-label":B,icon:"MagnifyingGlass",onChange:s=>w(s.target.value),placeholder:D,type:"search",value:I}),(t.length>0||d!==void 0)&&a.jsxs("div",{className:n.actions,children:[t.length>0&&a.jsx(h.Button,{"aria-expanded":u,"aria-haspopup":"dialog",badge:p.length,icon:"Funnel",onClick:()=>_(!0),variant:"tertiary",children:j}),d!==void 0&&a.jsx("div",{"aria-hidden":!d,"aria-label":$,className:n["loading-status"],role:"status",children:d&&a.jsx(Q.Loading,{size:"small"})})]})]}),p.length>0&&a.jsxs("div",{"aria-label":j,className:n.chips,children:[p.map(s=>a.jsx(H.Chip,{accessibleLabel:O(s),label:s.label,onDelete:()=>m(s.value,!1)},s.value)),a.jsx(h.Button,{onClick:()=>l==null?void 0:l([]),variant:"tertiary",children:v})]}),u&&a.jsx(E.Dialog,{"aria-labelledby":o,className:n["filter-dialog"],controls:a.jsxs(A.Controls,{children:[a.jsx(h.Button,{onClick:()=>{l==null||l([]),_(!1)},children:v}),a.jsx(h.Button,{onClick:()=>_(!1),variant:"primary",children:R})]}),header:a.jsx(J.Header,{children:a.jsx("h2",{id:o,children:M})}),open:!0,setOpen:_,children:a.jsx("div",{className:n["filter-groups"],"data-columns":f,children:t.map((s,i)=>a.jsxs("section",{"aria-labelledby":s.label?`${o}-${i}`:void 0,className:n["filter-group"],"data-column-span":s.columnSpan??1,role:s.control==="radio"?"radiogroup":"group",children:[s.label&&a.jsx("h3",{id:`${o}-${i}`,children:s.label}),s.options.map(e=>y(e,s)),s.collapsible&&a.jsx(P.Collapsible,{summary:s.collapsible.label,children:a.jsx("div",{className:n["collapsible-options"],children:s.collapsible.options.map(e=>y(e,s))})})]},s.label??i))})})]})};exports.Search=Y;
@@ -1,88 +1,96 @@
1
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
2
- import { useId as H, useState as T, useMemo as q } from "react";
1
+ import { jsxs as n, jsx as s } from "react/jsx-runtime";
2
+ import { useId as T, useState as q, useMemo as A } from "react";
3
3
  import { Button as p } from "../button/index.js";
4
- import { Checkbox as z } from "../checkbox/index.js";
5
- import { Chip as A } from "../chip/index.js";
6
- import { Collapsible as C } from "../collapsible/index.js";
7
- import { C as E } from "../../index-acMNM3VJ.js";
8
- import { Dialog as J } from "../dialog/index.js";
9
- import { Header as K } from "../header/index.js";
10
- import { I as P } from "../../index-6TyCExT0.js";
11
- import '../../assets/index9.css';const Q = "_search_wsuwb_3", U = "_controls_wsuwb_15", V = "_chips_wsuwb_35", W = "_radio_wsuwb_101", o = {
12
- search: Q,
13
- controls: U,
14
- chips: V,
15
- "filter-dialog": "_filter-dialog_wsuwb_42",
16
- "filter-groups": "_filter-groups_wsuwb_47",
17
- "filter-group": "_filter-group_wsuwb_47",
18
- "filter-option": "_filter-option_wsuwb_83",
19
- "option-copy": "_option-copy_wsuwb_89",
20
- radio: W,
21
- "collapsible-options": "_collapsible-options_wsuwb_124"
22
- }, ia = ({
23
- filterButtonLabel: v = "Filters",
24
- filterDialogColumns: $ = 1,
25
- filterDialogTitle: M = "Filters",
26
- filterGroups: d = [],
27
- onChange: D,
4
+ import { Checkbox as C } from "../checkbox/index.js";
5
+ import { Chip as E } from "../chip/index.js";
6
+ import { Collapsible as J } from "../collapsible/index.js";
7
+ import { C as K } from "../../index-acMNM3VJ.js";
8
+ import { Dialog as P } from "../dialog/index.js";
9
+ import { Header as Q } from "../header/index.js";
10
+ import { I as U } from "../../index-6TyCExT0.js";
11
+ import { Loading as V } from "../loading/index.js";
12
+ import '../../assets/index9.css';const W = "_search_1r1ik_3", X = "_controls_1r1ik_15", Y = "_actions_1r1ik_36", Z = "_chips_1r1ik_56", L = "_radio_1r1ik_122", o = {
13
+ search: W,
14
+ controls: X,
15
+ actions: Y,
16
+ "loading-status": "_loading-status_1r1ik_46",
17
+ chips: Z,
18
+ "filter-dialog": "_filter-dialog_1r1ik_63",
19
+ "filter-groups": "_filter-groups_1r1ik_68",
20
+ "filter-group": "_filter-group_1r1ik_68",
21
+ "filter-option": "_filter-option_1r1ik_104",
22
+ "option-copy": "_option-copy_1r1ik_110",
23
+ radio: L,
24
+ "collapsible-options": "_collapsible-options_1r1ik_145"
25
+ }, ca = ({
26
+ filterButtonLabel: k = "Filters",
27
+ filterDialogColumns: D = 1,
28
+ filterDialogTitle: O = "Filters",
29
+ filterGroups: r = [],
30
+ isLoading: m,
31
+ loadingLabel: u = "Loading results",
32
+ onChange: x,
28
33
  onSelectedFiltersChange: e,
29
- removeFilterLabel: O = (n) => `Remove ${n.label} filter`,
30
- resetLabel: w = "Reset",
31
- searchLabel: x = "Search",
32
- searchPlaceholder: I = "Search",
33
- selectedFilters: r = [],
34
- showResultsLabel: j = "Show results",
35
- value: R = ""
34
+ removeFilterLabel: I = (c) => `Remove ${c.label} filter`,
35
+ resetLabel: f = "Reset",
36
+ searchLabel: j = "Search",
37
+ searchPlaceholder: R = "Search",
38
+ selectedFilters: d = [],
39
+ showResultsLabel: z = "Show results",
40
+ value: B = ""
36
41
  }) => {
37
- const n = H(), [f, m] = T(!1), B = q(() => new Map(d.flatMap((a) => {
38
- var i;
39
- return [...a.options, ...((i = a.collapsible) == null ? void 0 : i.options) ?? []];
40
- }).map((a) => [a.value, a])), [d]), b = r.flatMap((a) => {
41
- const i = B.get(a);
42
- return i ? [i] : [];
43
- }), h = (a, i, l) => {
44
- var k;
42
+ const c = T(), [y, h] = q(!1), H = A(() => new Map(r.flatMap((a) => {
43
+ var l;
44
+ return [...a.options, ...((l = a.collapsible) == null ? void 0 : l.options) ?? []];
45
+ }).map((a) => [a.value, a])), [r]), _ = d.flatMap((a) => {
46
+ const l = H.get(a);
47
+ return l ? [l] : [];
48
+ }), b = (a, l, i) => {
49
+ var w;
45
50
  if (!e) return;
46
- const _ = /* @__PURE__ */ new Set([...(l == null ? void 0 : l.options.map((t) => t.value)) ?? [], ...((k = l == null ? void 0 : l.collapsible) == null ? void 0 : k.options.map((t) => t.value)) ?? []]), u = r.filter((t) => !_.has(t));
47
- if (i && (l == null ? void 0 : l.defaultValue) === a) {
48
- e(u);
51
+ const v = /* @__PURE__ */ new Set([...(i == null ? void 0 : i.options.map((t) => t.value)) ?? [], ...((w = i == null ? void 0 : i.collapsible) == null ? void 0 : w.options.map((t) => t.value)) ?? []]), M = d.filter((t) => !v.has(t));
52
+ if (l && (i == null ? void 0 : i.defaultValue) === a) {
53
+ e(M);
49
54
  return;
50
55
  }
51
- e(i ? (l == null ? void 0 : l.control) === "radio" || (l == null ? void 0 : l.selectionMode) === "single" ? [...u, a] : [.../* @__PURE__ */ new Set([...r, a])] : r.filter((t) => t !== a));
52
- }, y = (a, i) => {
53
- var l;
54
- return r.includes(a) || i.defaultValue === a && ![...i.options, ...((l = i.collapsible) == null ? void 0 : l.options) ?? []].some((_) => r.includes(_.value));
55
- }, N = (a, i) => /* @__PURE__ */ s("div", { className: o["filter-option"], "data-component": "renderfilter", children: i.control === "radio" ? /* @__PURE__ */ c("label", { className: o.radio, children: [
56
- /* @__PURE__ */ s("input", { checked: y(a.value, i), name: `${n}-filter-${i.label ?? "group"}`, onChange: (l) => h(a.value, l.target.checked, i), type: "radio" }),
57
- /* @__PURE__ */ c("span", { className: o["option-copy"], children: [
56
+ e(l ? (i == null ? void 0 : i.control) === "radio" || (i == null ? void 0 : i.selectionMode) === "single" ? [...M, a] : [.../* @__PURE__ */ new Set([...d, a])] : d.filter((t) => t !== a));
57
+ }, N = (a, l) => {
58
+ var i;
59
+ return d.includes(a) || l.defaultValue === a && ![...l.options, ...((i = l.collapsible) == null ? void 0 : i.options) ?? []].some((v) => d.includes(v.value));
60
+ }, $ = (a, l) => /* @__PURE__ */ s("div", { className: o["filter-option"], "data-component": "renderfilter", children: l.control === "radio" ? /* @__PURE__ */ n("label", { className: o.radio, children: [
61
+ /* @__PURE__ */ s("input", { checked: N(a.value, l), name: `${c}-filter-${l.label ?? "group"}`, onChange: (i) => b(a.value, i.target.checked, l), type: "radio" }),
62
+ /* @__PURE__ */ n("span", { className: o["option-copy"], children: [
58
63
  a.label,
59
64
  a.description && /* @__PURE__ */ s("sub", { children: a.description })
60
65
  ] })
61
- ] }) : /* @__PURE__ */ s(z, { checked: y(a.value, i), label: /* @__PURE__ */ c("span", { className: o["option-copy"], children: [
66
+ ] }) : /* @__PURE__ */ s(C, { checked: N(a.value, l), label: /* @__PURE__ */ n("span", { className: o["option-copy"], children: [
62
67
  a.label,
63
68
  a.description && /* @__PURE__ */ s("sub", { children: a.description })
64
- ] }), onChange: (l) => h(a.value, l.target.checked, i) }) }, a.value);
65
- return /* @__PURE__ */ c("div", { className: o.search, "data-component": "search", children: [
66
- /* @__PURE__ */ c("div", { className: o.controls, children: [
67
- /* @__PURE__ */ s(P, { "aria-label": x, icon: "MagnifyingGlass", onChange: (a) => D(a.target.value), placeholder: I, type: "search", value: R }),
68
- d.length > 0 && /* @__PURE__ */ s(p, { "aria-expanded": f, "aria-haspopup": "dialog", badge: b.length, icon: "Funnel", onClick: () => m(!0), variant: "tertiary", children: v })
69
+ ] }), onChange: (i) => b(a.value, i.target.checked, l) }) }, a.value);
70
+ return /* @__PURE__ */ n("div", { className: o.search, "data-component": "search", children: [
71
+ /* @__PURE__ */ n("div", { className: o.controls, "data-with-filters": r.length > 0 || void 0, children: [
72
+ /* @__PURE__ */ s(U, { "aria-label": j, icon: "MagnifyingGlass", onChange: (a) => x(a.target.value), placeholder: R, type: "search", value: B }),
73
+ (r.length > 0 || m !== void 0) && /* @__PURE__ */ n("div", { className: o.actions, children: [
74
+ r.length > 0 && /* @__PURE__ */ s(p, { "aria-expanded": y, "aria-haspopup": "dialog", badge: _.length, icon: "Funnel", onClick: () => h(!0), variant: "tertiary", children: k }),
75
+ m !== void 0 && /* @__PURE__ */ s("div", { "aria-hidden": !m, "aria-label": u, className: o["loading-status"], role: "status", children: m && /* @__PURE__ */ s(V, { size: "small" }) })
76
+ ] })
69
77
  ] }),
70
- b.length > 0 && /* @__PURE__ */ c("div", { "aria-label": v, className: o.chips, children: [
71
- b.map((a) => /* @__PURE__ */ s(A, { accessibleLabel: O(a), label: a.label, onDelete: () => h(a.value, !1) }, a.value)),
72
- /* @__PURE__ */ s(p, { onClick: () => e == null ? void 0 : e([]), variant: "tertiary", children: w })
78
+ _.length > 0 && /* @__PURE__ */ n("div", { "aria-label": k, className: o.chips, children: [
79
+ _.map((a) => /* @__PURE__ */ s(E, { accessibleLabel: I(a), label: a.label, onDelete: () => b(a.value, !1) }, a.value)),
80
+ /* @__PURE__ */ s(p, { onClick: () => e == null ? void 0 : e([]), variant: "tertiary", children: f })
73
81
  ] }),
74
- f && /* @__PURE__ */ s(J, { "aria-labelledby": n, className: o["filter-dialog"], controls: /* @__PURE__ */ c(E, { children: [
82
+ y && /* @__PURE__ */ s(P, { "aria-labelledby": c, className: o["filter-dialog"], controls: /* @__PURE__ */ n(K, { children: [
75
83
  /* @__PURE__ */ s(p, { onClick: () => {
76
- e == null || e([]), m(!1);
77
- }, children: w }),
78
- /* @__PURE__ */ s(p, { onClick: () => m(!1), variant: "primary", children: j })
79
- ] }), header: /* @__PURE__ */ s(K, { children: /* @__PURE__ */ s("h2", { id: n, children: M }) }), open: !0, setOpen: m, children: /* @__PURE__ */ s("div", { className: o["filter-groups"], "data-columns": $, children: d.map((a, i) => /* @__PURE__ */ c("section", { "aria-labelledby": a.label ? `${n}-${i}` : void 0, className: o["filter-group"], "data-column-span": a.columnSpan ?? 1, role: a.control === "radio" ? "radiogroup" : "group", children: [
80
- a.label && /* @__PURE__ */ s("h3", { id: `${n}-${i}`, children: a.label }),
81
- a.options.map((l) => N(l, a)),
82
- a.collapsible && /* @__PURE__ */ s(C, { summary: a.collapsible.label, children: /* @__PURE__ */ s("div", { className: o["collapsible-options"], children: a.collapsible.options.map((l) => N(l, a)) }) })
83
- ] }, a.label ?? i)) }) })
84
+ e == null || e([]), h(!1);
85
+ }, children: f }),
86
+ /* @__PURE__ */ s(p, { onClick: () => h(!1), variant: "primary", children: z })
87
+ ] }), header: /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s("h2", { id: c, children: O }) }), open: !0, setOpen: h, children: /* @__PURE__ */ s("div", { className: o["filter-groups"], "data-columns": D, children: r.map((a, l) => /* @__PURE__ */ n("section", { "aria-labelledby": a.label ? `${c}-${l}` : void 0, className: o["filter-group"], "data-column-span": a.columnSpan ?? 1, role: a.control === "radio" ? "radiogroup" : "group", children: [
88
+ a.label && /* @__PURE__ */ s("h3", { id: `${c}-${l}`, children: a.label }),
89
+ a.options.map((i) => $(i, a)),
90
+ a.collapsible && /* @__PURE__ */ s(J, { summary: a.collapsible.label, children: /* @__PURE__ */ s("div", { className: o["collapsible-options"], children: a.collapsible.options.map((i) => $(i, a)) }) })
91
+ ] }, a.label ?? l)) }) })
84
92
  ] });
85
93
  };
86
94
  export {
87
- ia as Search
95
+ ca as Search
88
96
  };
package/dist/index.d.ts CHANGED
@@ -290,7 +290,7 @@ export declare const Divider: ({ className, ...props }: DividerProps) => JSX.Ele
290
290
 
291
291
  export declare type DividerProps = React.ComponentPropsWithoutRef<'hr'>;
292
292
 
293
- export declare const Dropdown: ({ children: selectElement, className, combobox, description, errorMessage, invalid, searchable: searchableProp, createOption, emptyLabel, errorLabel, onRetry, retryLabel, label, filterOptions, hasNextPage, loading, loadMoreLabel, onLoadMore, onOpenChange, onSearchChange, searchValue, renderOption, searchPlaceholder, selectedItems, variant, ...props }: DropdownProps) => JSX.Element;
293
+ export declare const Dropdown: ({ children: selectElement, className, combobox, description, errorMessage, invalid, searchable: searchableProp, createOption, emptyLabel, errorLabel, onRetry, retryLabel, label, filterOptions, hasNextPage, loading, loadingLabel, loadMoreLabel, onLoadMore, onOpenChange, onSearchChange, searchValue, renderOption, searchPlaceholder, selectedItems, variant, ...props }: DropdownProps) => JSX.Element;
294
294
 
295
295
  export declare type DropdownCreateOption = {
296
296
  isValid: (value: string) => boolean;
@@ -315,7 +315,6 @@ declare type DropdownProps = Omit<default_2.ComponentPropsWithoutRef<'div'>, 'ch
315
315
  description?: string;
316
316
  errorMessage?: default_2.ReactNode;
317
317
  invalid?: boolean;
318
- /** Defaults to true when there are more than eight visible options. */
319
318
  searchable?: boolean;
320
319
  createOption?: DropdownCreateOption;
321
320
  emptyLabel?: string;
@@ -327,6 +326,7 @@ declare type DropdownProps = Omit<default_2.ComponentPropsWithoutRef<'div'>, 'ch
327
326
  filterOptions?: boolean;
328
327
  hasNextPage?: boolean;
329
328
  loading?: boolean;
329
+ loadingLabel?: string;
330
330
  loadMoreLabel?: string;
331
331
  onLoadMore?: () => void;
332
332
  onOpenChange?: (open: boolean) => void;
@@ -1357,7 +1357,7 @@ export declare type RadioProps = Omit<React.ComponentPropsWithRef<'input'>, 'typ
1357
1357
  label?: string;
1358
1358
  };
1359
1359
 
1360
- export declare const Search: ({ filterButtonLabel, filterDialogColumns, filterDialogTitle, filterGroups, onChange, onSelectedFiltersChange, removeFilterLabel, resetLabel, searchLabel, searchPlaceholder, selectedFilters, showResultsLabel, value, }: SearchProps) => JSX.Element;
1360
+ export declare const Search: ({ filterButtonLabel, filterDialogColumns, filterDialogTitle, filterGroups, isLoading, loadingLabel, onChange, onSelectedFiltersChange, removeFilterLabel, resetLabel, searchLabel, searchPlaceholder, selectedFilters, showResultsLabel, value, }: SearchProps) => JSX.Element;
1361
1361
 
1362
1362
  export declare type SearchFilter = {
1363
1363
  description?: string;
@@ -1383,6 +1383,8 @@ export declare type SearchProps = {
1383
1383
  filterDialogColumns?: 1 | 2;
1384
1384
  filterDialogTitle?: string;
1385
1385
  filterGroups?: readonly SearchFilterGroup[];
1386
+ isLoading?: boolean;
1387
+ loadingLabel?: string;
1386
1388
  onChange: (value: string) => void;
1387
1389
  onSelectedFiltersChange?: (selectedFilters: string[]) => void;
1388
1390
  removeFilterLabel?: (filter: SearchFilter) => string;
package/dist/tokens.json CHANGED
@@ -379,7 +379,7 @@
379
379
  },
380
380
  "com.solibo": {
381
381
  "packageName": "@solibo/solibo-ui",
382
- "packageVersion": "2.2.16"
382
+ "packageVersion": "2.2.17"
383
383
  }
384
384
  },
385
385
  "$name": "SUI: Design Tokens",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solibo/solibo-ui",
3
- "version": "2.2.16",
3
+ "version": "2.2.17",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "./dist/index.js",