@wrdagency/blockout 1.0.34 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/index6.css +1 -1
- package/dist/assets/style11.css +1 -1
- package/dist/assets/style19.css +1 -1
- package/dist/assets/style20.css +1 -1
- package/dist/assets/style28.css +1 -1
- package/dist/components/controls/recurrence-control/index.d.ts +5 -2
- package/dist/components/controls/recurrence-control/index.js +57 -56
- package/dist/components/controls/select-control/control.js +14 -14
- package/dist/components/controls/select-control/props.d.ts +1 -0
- package/package.json +1 -1
package/dist/assets/index6.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.component-dialog{position:fixed;top:1rem;right:1rem;bottom:1rem;left:1rem;z-index:50;margin:auto;height:fit-content;max-height:calc(100dvh - 2rem);max-width:64ch;overflow:auto;border-radius:var(--blockout__radius--lg);background:var(--blockout__colours__surface--0);box-shadow:0 10px 15px -3px #0000000d,0 4px 6px -4px #0000000d;opacity:0;transform:translateY(1rem);transition:opacity .15s ease,transform .15s ease}.component-dialog[data-enter]{opacity:1;transform:translateY(0)}.component-dialog.component-dialog--top{margin-top:5vh}.component-dialog.component-dialog--bottom{margin-bottom:5vh}.component-dialog.component-dialog--left{margin-top:0;right:auto;left:0;height:100%;max-height:100%;width:100%;max-width:42ch;border-top-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}@media (width <= 42ch){.component-dialog.component-dialog--left{border-top-left-radius:var(--blockout__radius--lg)}}.component-dialog.component-dialog--right{margin-top:0;left:auto;right:0;height:100%;max-height:100%;width:100%;max-width:42ch;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}@media (width <= 42ch){.component-dialog.component-dialog--right{border-top-right-radius:var(--blockout__radius--lg)}}.component-dialog__backdrop{background-color:#0000001a;opacity:0;transition:opacity ease .15s}.component-dialog__backdrop[data-enter]{opacity:1}[data-colour-schema=dark] .component-dialog__backdrop{background-color:#00000054}.component-dialog__header{display:flex;align-items:start;justify-content:space-between;gap:1rem;width:100%;padding:.5rem .5rem .5rem 1.5rem}.component-dialog--divided .component-dialog__header{border-bottom:1px solid var(--blockout__colours__surface--200)}.component-dialog__title{margin-top:.675rem}.component-dialog__body{padding:1rem 1.5rem}.component-dialog--edgeless-x .component-dialog__body{padding-inline:0}.component-dialog--edgeless-y .component-dialog__body{padding-block:0}.component-dialog--edgeless-top .component-dialog__body{padding-top:0}.component-dialog--edgeless-bottom .component-dialog__body{padding-bottom:0}.component-dialog--edgeless-left .component-dialog__body{padding-left:0}.component-dialog--edgeless-right .component-dialog__body{padding-right:0}.component-dialog--edgeless-all .component-dialog__body{padding:0}
|
|
1
|
+
.component-dialog{position:fixed;top:1rem;right:1rem;bottom:1rem;left:1rem;z-index:50;margin:auto;height:fit-content;max-height:calc(100dvh - 2rem);max-width:64ch;overflow:auto;border-radius:var(--blockout__radius--lg);background:var(--blockout__colours__surface--0);box-shadow:0 10px 15px -3px #0000000d,0 4px 6px -4px #0000000d;opacity:0;transform:translateY(1rem);transition:opacity .15s ease,transform .15s ease}.component-dialog[data-enter]{opacity:1;transform:translateY(0)}.component-dialog.component-dialog--top{margin-top:5vh;max-height:calc(100dvh - 2rem - 5vh)}.component-dialog.component-dialog--bottom{margin-bottom:5vh;max-height:calc(100dvh - 2rem - 5vh)}.component-dialog.component-dialog--left{margin-top:0;right:auto;left:0;height:100%;max-height:100%;width:100%;max-width:42ch;border-top-left-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}@media (width <= 42ch){.component-dialog.component-dialog--left{border-top-left-radius:var(--blockout__radius--lg)}}.component-dialog.component-dialog--right{margin-top:0;left:auto;right:0;height:100%;max-height:100%;width:100%;max-width:42ch;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:0}@media (width <= 42ch){.component-dialog.component-dialog--right{border-top-right-radius:var(--blockout__radius--lg)}}.component-dialog__backdrop{background-color:#0000001a;opacity:0;transition:opacity ease .15s}.component-dialog__backdrop[data-enter]{opacity:1}[data-colour-schema=dark] .component-dialog__backdrop{background-color:#00000054}.component-dialog__header{display:flex;align-items:start;justify-content:space-between;gap:1rem;width:100%;padding:.5rem .5rem .5rem 1.5rem}.component-dialog--divided .component-dialog__header{border-bottom:1px solid var(--blockout__colours__surface--200)}.component-dialog__title{margin-top:.675rem}.component-dialog__body{padding:1rem 1.5rem}.component-dialog--edgeless-x .component-dialog__body{padding-inline:0}.component-dialog--edgeless-y .component-dialog__body{padding-block:0}.component-dialog--edgeless-top .component-dialog__body{padding-top:0}.component-dialog--edgeless-bottom .component-dialog__body{padding-bottom:0}.component-dialog--edgeless-left .component-dialog__body{padding-left:0}.component-dialog--edgeless-right .component-dialog__body{padding-right:0}.component-dialog--edgeless-all .component-dialog__body{padding:0}
|
package/dist/assets/style11.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.component-date-control .component-base-control__control{display:flex;align-items:baseline;position:relative;min-height:var(--base-control__min-height);cursor:default}.component-date-control__separator{color:var(--blockout__colours__surface--300)}.component-date-control .component-date-control__input{flex-grow:0;width:calc(var(--date-control__input__length, 2) * 2.5ch);max-width:7ch;min-height:calc(var(--base-control__min-height) - .5rem);padding:calc(var(--base-control__padding) - .5rem) .5rem;margin:.25rem;border-radius:calc(var(--blockout__radius--md) - .25rem)!important}.component-date-control .component-date-control__input:hover,.component-date-control .component-date-control__input:focus{background-color:var(--blockout__colours__surface--200)}.component-date-control__view{position:absolute;display:flex;align-items:center;padding:var(--base-control__padding);
|
|
1
|
+
.component-date-control .component-base-control__control{display:flex;align-items:baseline;position:relative;min-height:var(--base-control__min-height);cursor:default}.component-date-control__separator{color:var(--blockout__colours__surface--300)}.component-date-control .component-date-control__input{flex-grow:0;width:calc(var(--date-control__input__length, 2) * 2.5ch);max-width:7ch;min-height:calc(var(--base-control__min-height) - .5rem);padding:calc(var(--base-control__padding) - .5rem) .5rem;margin:.25rem;border-radius:calc(var(--blockout__radius--md) - .25rem)!important}.component-date-control .component-date-control__input:hover,.component-date-control .component-date-control__input:focus{background-color:var(--blockout__colours__surface--200)}.component-date-control__input,.component-date-control__separator{opacity:0;transition:opacity 75ms ease}.component-date-control__view{position:absolute;display:flex;align-items:center;padding:var(--base-control__padding);border-radius:var(--blockout__radius--md);top:0;right:0;bottom:0;left:0;right:3.5rem;pointer-events:none;transition:opacity 75ms ease}.component-date-control:has(.component-date-control__input:focus) .component-date-control__input,.component-date-control:has(.component-date-control__input:focus) .component-date-control__separator{opacity:1}.component-date-control:has(.component-date-control__input:focus) .component-date-control__view{opacity:0}.component-date-control__picker__btn{margin-left:auto;align-self:center}.component-date-picker__header{display:flex;align-items:center;justify-content:space-between;gap:.5rem;border-bottom:1px solid var(--blockout__colours__surface--300);padding-bottom:.5rem;margin-bottom:.5rem}.component-date-picker__dates{display:grid;gap:.125rem}.component-date-picker__week{display:grid;grid-template-columns:repeat(7,1fr);gap:.125rem}.component-date-picker__date{padding:.375rem;aspect-ratio:1/1;border-radius:var(--blockout__radius--xs);color:var(--blockout__colours__surface--950);font-weight:500;cursor:pointer}.component-date-picker__date:hover{background-color:var(--blockout__colours__surface--0)}.component-date-picker__date:focus-visible{outline:1px solid var(--blockout__colours__outline);outline-offset:4px}.component-date-picker__date.component-date-picker__date--weekend{color:var(--blockout__colours__surface--600)}.component-date-picker__date.component-date-picker__date--out-of-month{color:var(--blockout__colours__surface--300)}.component-date-picker__date.component-date-picker__date--today{color:var(--blockout__colours__primary--500);outline:1px solid var(--blockout__colours__outline)}.component-date-picker__date[aria-pressed=true]{background-color:var(--blockout__colours__primary--500);color:var(--blockout__colours__surface--0)}
|
package/dist/assets/style19.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.component-base-popover-control{min-width:0px}.component-base-popover-control .component-base-control__control{min-width:0}.component-base-popover-control__input{cursor:pointer;display:flex;width:100%}.component-base-popover-control__input:focus{outline:none}.component-base-popover-control__input:disabled .component-base-popover-control__value{opacity:.5}.component-base-popover-control__value{flex-grow:1;padding:var(--base-control__padding);min-height:var(--base-control__min-height);width:100%;min-width:0;color:var(--blockout__colours__surface--800);border-top-left-radius:var(--blockout__radius--md);border-bottom-left-radius:var(--blockout__radius--md);font-size:1rem;text-align:left;background-color:transparent;transition:background-color .25s ease;text-transform:capitalize}.component-base-popover-control__popover__wrapper{z-index:9999!important}.component-base-popover-control__popover{background-color:var(--blockout__colours__surface--200);border:1px solid var(--blockout__colours__surface--300);border-radius:var(--blockout__radius--lg);box-shadow:0 .175rem .375rem #0000001a;width:fit-content;max-height:var(--popover-available-height);padding:.5rem;min-height:var(--base-control__min-height)}.component-base-control--normal.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__input:hover){background-color:var(--blockout__colours__surface--200);border-color:var(--blockout__colours__surface--100)}.component-base-control--normal.component-base-popover-control .component-base-control__box .component-base-popover-control__caret:hover{background-color:var(--blockout__colours__surface--200)}.component-base-control--normal.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__caret:hover){background-color:var(--blockout__colours__surface--100)}.component-base-control--normal.component-base-popover-control .component-base-control__box:focus-within{background-color:var(--blockout__colours__surface--50);border-color:var(--blockout__colours__surface--300);outline:1px solid var(--blockout__colours__outline);outline-offset:4px}.component-base-control--outline.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__input:hover){border-color:var(--blockout__colours__primary--500)}.component-base-control--outline.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__caret:hover){border-color:var(--blockout__colours__surface--300)}.component-base-control--outline.component-base-popover-control .component-base-control__box:focus-within{border-color:var(--blockout__colours__primary--500);outline:1px solid var(--blockout__colours__outline);outline-offset:4px}.component-base-control--ghost.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__input:hover){border-color:var(--blockout__colours__surface--300)}.component-base-control--ghost.component-base-popover-control .component-base-control__box:
|
|
1
|
+
.component-base-popover-control{min-width:0px}.component-base-popover-control .component-base-control__control{min-width:0}.component-base-popover-control__input{cursor:pointer;display:flex;width:100%}.component-base-popover-control__input:focus{outline:none}.component-base-popover-control__input:disabled .component-base-popover-control__value{opacity:.5}.component-base-popover-control__value{flex-grow:1;padding:var(--base-control__padding);min-height:var(--base-control__min-height);width:100%;min-width:0;color:var(--blockout__colours__surface--800);border-top-left-radius:var(--blockout__radius--md);border-bottom-left-radius:var(--blockout__radius--md);font-size:1rem;text-align:left;background-color:transparent;transition:background-color .25s ease;text-transform:capitalize}.component-base-popover-control__caret{align-self:center;margin-right:.25rem}.component-base-popover-control__popover__wrapper{z-index:9999!important}.component-base-popover-control__popover{background-color:var(--blockout__colours__surface--200);border:1px solid var(--blockout__colours__surface--300);border-radius:var(--blockout__radius--lg);box-shadow:0 .175rem .375rem #0000001a;width:fit-content;max-height:var(--popover-available-height);padding:.5rem;min-height:var(--base-control__min-height)}.component-base-control--normal.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__input:hover){background-color:var(--blockout__colours__surface--200);border-color:var(--blockout__colours__surface--100)}.component-base-control--normal.component-base-popover-control .component-base-control__box .component-base-popover-control__caret:hover{background-color:var(--blockout__colours__surface--200)}.component-base-control--normal.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__caret:hover){background-color:var(--blockout__colours__surface--100)}.component-base-control--normal.component-base-popover-control .component-base-control__box:focus-within{background-color:var(--blockout__colours__surface--50);border-color:var(--blockout__colours__surface--300);outline:1px solid var(--blockout__colours__outline);outline-offset:4px}.component-base-control--outline.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__input:hover){border-color:var(--blockout__colours__primary--500)}.component-base-control--outline.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__caret:hover){border-color:var(--blockout__colours__surface--300)}.component-base-control--outline.component-base-popover-control .component-base-control__box:focus-within{border-color:var(--blockout__colours__primary--500);outline:1px solid var(--blockout__colours__outline);outline-offset:4px}.component-base-control--ghost.component-base-popover-control .component-base-control__box:has(.component-base-popover-control__input:hover){border-color:var(--blockout__colours__surface--300)}.component-base-control--ghost.component-base-popover-control .component-base-control__box:focus-within{border-color:var(--blockout__colours__primary--500);outline:1px solid var(--blockout__colours__outline);outline-offset:4px}.component-base-control--ghost.component-base-popover-control .component-base-popover-control__caret{display:none}
|
package/dist/assets/style20.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.component-menu__menu-wrapper{z-index:9999!important}.primitive-popover__target{cursor:pointer}.component-menu__window{background-color:var(--blockout__colours__surface--200);border:1px solid var(--blockout__colours__surface--300);border-radius:var(--blockout__radius--lg);box-shadow:0 .175rem .375rem #0000001a;min-width:calc(var(--popover-anchor-width) + 2px);max-height:var(--popover-available-height);padding:.25rem;min-height:40px;overflow-y:auto}.component-menu__item{display:flex;align-items:baseline;gap:.875rem;padding:.375rem 1.375rem .375rem .675rem;width:100%;cursor:pointer;transition:background-color .25s ease}.component-menu__item:has(.component-menu__item__icon--submenu-indicator){padding-right:.375rem}.component-menu__item[data-active-item=true]{background-color:var(--blockout__colours__surface--100);border-radius:var(--blockout__radius--md)}.component-menu__item:focus-visible{outline:none}.component-menu__item[data-active-item=true] .component-menu__item__label{color:var(--blockout__colours__surface--950)}.component-menu__item[data-active-item=true] .component-menu__item__description{color:var(--blockout__colours__surface--700)}.component-menu__item[aria-disabled=true] .component-menu__item__label{color:var(--blockout__colours__surface--500)}.component-menu__item[aria-disabled=true] .component-menu__item__description{color:var(--blockout__colours__surface--300)}.component-menu__item__icon{width:1.25rem;height:1.25rem;fill:var(--blockout__colours__surface--500)}.component-menu__window:not(:has(.component-menu__item__icon--pictoral:not(.component-menu__item__icon--empty))) .component-menu__item__icon--pictoral{display:none}.component-menu__item__icon--pictoral{transform:translateY(.25rem);margin-left:-.25rem}.component-menu__item__text{flex-grow:1}.component-menu__item__text__header{display:flex;align-items:center;gap:2rem;justify-content:space-between;width:100%}.component-menu__item__text__header+.component-menu__item__description{margin-top:.25rem}.component-menu__item__label{font-weight:500;color:var(--blockout__colours__surface--950);transition:color .25s ease}.component-menu__item__description{font-weight:400;color:var(--blockout__colours__surface--600);font-size:.875rem;padding-right:.375rem;transition:color .25s ease,opacity .25s ease}.component-menu__item--toggle--checked .component-menu__item__icon--checkbox{fill:var(--blockout__colours__surface--950)}.component-menu__separator{margin:.5rem;border-top:1px solid var(--blockout__colours__surface--300);border-bottom:none}
|
|
1
|
+
.component-menu__menu-wrapper{z-index:9999!important}.primitive-popover__target{cursor:pointer}.component-menu__window{background-color:var(--blockout__colours__surface--200);border:1px solid var(--blockout__colours__surface--300);border-radius:var(--blockout__radius--lg);box-shadow:0 .175rem .375rem #0000001a;min-width:calc(var(--popover-anchor-width) + 2px);max-height:var(--popover-available-height);padding:.25rem;min-height:40px;overflow-y:auto}.component-menu__item{display:flex;align-items:baseline;gap:.875rem;padding:.375rem 1.375rem .375rem .675rem;width:100%;cursor:pointer;transition:background-color .25s ease}.component-menu__item:has(.component-menu__item__icon--submenu-indicator){padding-right:.375rem}.component-menu__item[data-active-item=true]{background-color:var(--blockout__colours__surface--100);border-radius:var(--blockout__radius--md)}.component-menu__item:focus-visible{outline:none}.component-menu__item[data-active-item=true] .component-menu__item__label{color:var(--blockout__colours__surface--950)}.component-menu__item[data-active-item=true] .component-menu__item__description{color:var(--blockout__colours__surface--700)}.component-menu__item[aria-disabled=true] .component-menu__item__label{color:var(--blockout__colours__surface--500)}.component-menu__item[aria-disabled=true] .component-menu__item__description{color:var(--blockout__colours__surface--300)}.component-menu__item__icon{width:1.25rem;height:1.25rem;fill:var(--blockout__colours__surface--500)}.component-menu__window:not(:has(.component-menu__item__icon--pictoral:not(.component-menu__item__icon--empty))) .component-menu__item__icon--pictoral{display:none}.component-menu__item__icon--pictoral:not(.component-avatar){transform:translateY(.25rem);margin-left:-.25rem}.component-menu__item__text{flex-grow:1}.component-menu__item__text__header{display:flex;align-items:center;gap:2rem;justify-content:space-between;width:100%}.component-menu__item__text__header+.component-menu__item__description{margin-top:.25rem}.component-menu__item__label{font-weight:500;color:var(--blockout__colours__surface--950);transition:color .25s ease}.component-menu__item__description{font-weight:400;color:var(--blockout__colours__surface--600);font-size:.875rem;padding-right:.375rem;transition:color .25s ease,opacity .25s ease}.component-menu__item--toggle--checked .component-menu__item__icon--checkbox{fill:var(--blockout__colours__surface--950)}.component-menu__separator{margin:.5rem;border-top:1px solid var(--blockout__colours__surface--300);border-bottom:none}
|
package/dist/assets/style28.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.component-recurrence-control .component-base-popover-control__popover{min-width:300px}.component-recurrence-control__row{display:flex;align-items:center;gap:1rem;flex-grow:1}.component-recurrence-control__row:not(:first-child){margin-top:1rem}.component-recurrence-control__row .component-base-control{flex-grow:1}.component-recurrence-control__fieldset{display:flex;flex-direction:column;gap:1rem}.component-recurrence-control__frequency_type{display:flex;align-items:center;gap:1ch}.component-recurrence-control__frequency_type:not(:first-child){margin-top:1rem}.component-recurrence-control__frequency_type .component-recurrence-control__row{margin-top:0}.component-recurrence-control__radio{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;cursor:pointer;border-radius:var(--blockout__radius--xs);outline-offset:0px;outline:0px solid transparent;transition:outline .25s ease,outline-offset .25s ease,background-color .25s ease}.component-recurrence-control__radio>svg{width:1rem;height:1rem}.component-recurrence-control__radio:hover{background-color:var(--blockout__colours__surface--300)}.component-recurrence-control__radio:focus{outline:1px solid var(--blockout__colours__outline);outline-offset:4px}
|
|
1
|
+
.component-recurrence-controller__placeholder{color:var(--blockout__colours__surface--500)}.component-recurrence-control .component-base-popover-control__popover{min-width:300px}.component-recurrence-control__row{display:flex;align-items:center;gap:1rem;flex-grow:1}.component-recurrence-control__row:not(:first-child){margin-top:1rem}.component-recurrence-control__row .component-base-control{flex-grow:1}.component-recurrence-control__fieldset{display:flex;flex-direction:column;gap:1rem}.component-recurrence-control__frequency_type{display:flex;align-items:center;gap:1ch}.component-recurrence-control__frequency_type:not(:first-child){margin-top:1rem}.component-recurrence-control__frequency_type .component-recurrence-control__row{margin-top:0}.component-recurrence-control__radio{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;cursor:pointer;border-radius:var(--blockout__radius--xs);outline-offset:0px;outline:0px solid transparent;transition:outline .25s ease,outline-offset .25s ease,background-color .25s ease}.component-recurrence-control__radio>svg{width:1rem;height:1rem}.component-recurrence-control__radio:hover{background-color:var(--blockout__colours__surface--300)}.component-recurrence-control__radio:focus{outline:1px solid var(--blockout__colours__outline);outline-offset:4px}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ControlFC } from '../base-control/props';
|
|
2
|
-
type
|
|
2
|
+
type RecurrenceProps = {
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
};
|
|
5
|
+
type RecurrenceValueProps = {
|
|
3
6
|
allowEmpty?: false;
|
|
4
7
|
value?: string;
|
|
5
8
|
onChangeValue?: (value: string) => void;
|
|
@@ -8,5 +11,5 @@ type RecurrenceControlProps = {
|
|
|
8
11
|
value?: string | undefined;
|
|
9
12
|
onChangeValue?: (value: string | undefined) => void;
|
|
10
13
|
};
|
|
11
|
-
export declare const RecurrenceControl: ControlFC<
|
|
14
|
+
export declare const RecurrenceControl: ControlFC<RecurrenceValueProps & RecurrenceProps>;
|
|
12
15
|
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getOrdinalSuffix as
|
|
3
|
-
import { noop as
|
|
4
|
-
import { t as
|
|
5
|
-
import { useMemo as
|
|
6
|
-
import { R as
|
|
7
|
-
import { useBaseControlProps as
|
|
8
|
-
import { BasePopoverControl as
|
|
1
|
+
import { jsx as l, jsxs as t, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { getOrdinalSuffix as C } from "../../../utils/date.js";
|
|
3
|
+
import { noop as M } from "../../../utils/noop.js";
|
|
4
|
+
import { t as V, r as W } from "../../../RadioButton.es-D3QVjfF9.js";
|
|
5
|
+
import { useMemo as A } from "react";
|
|
6
|
+
import { R as N, F as n } from "../../../style-D1AX7G7x.js";
|
|
7
|
+
import { useBaseControlProps as D } from "../base-control/props.js";
|
|
8
|
+
import { BasePopoverControl as K } from "../base-popover-control/index.js";
|
|
9
9
|
import { NumberControl as E } from "../number-control/index.js";
|
|
10
10
|
import { SelectControl as d } from "../select-control/control.js";
|
|
11
11
|
import '../../../assets/style16.css';import '../../../assets/styles.css';import '../../../assets/style6.css';import '../../../assets/style5.css';import '../../../assets/style4.css';import '../../../assets/style3.css';import '../../../assets/style2.css';import '../../../assets/style.css';import '../../../assets/style10.css';import '../../../assets/style7.css';/* empty css */
|
|
@@ -22,29 +22,30 @@ import "../../../primitives/symbol/index.js";
|
|
|
22
22
|
/* empty css */
|
|
23
23
|
import "../../../match-sorter.esm-MNVE8H_6.js";
|
|
24
24
|
/* empty css */
|
|
25
|
-
import { ToggleControl as
|
|
26
|
-
import { ToggleGroupControl as
|
|
27
|
-
const
|
|
28
|
-
var
|
|
29
|
-
const { baseProps:
|
|
25
|
+
import { ToggleControl as P } from "../toggle-control/index.js";
|
|
26
|
+
import { ToggleGroupControl as I } from "../toggle-group-control/index.js";
|
|
27
|
+
const _ = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", be = (c) => {
|
|
28
|
+
var b, h, f, v, g, L;
|
|
29
|
+
const { baseProps: i, controlProps: u } = D(c, {
|
|
30
30
|
className: "component-recurrence-control"
|
|
31
31
|
}), {
|
|
32
32
|
value: a,
|
|
33
|
-
onChangeValue: m =
|
|
34
|
-
allowEmpty:
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
onChangeValue: m = M,
|
|
34
|
+
allowEmpty: p = !1,
|
|
35
|
+
placeholder: Y = "",
|
|
36
|
+
...k
|
|
37
|
+
} = u, o = N.fromString(a || _), y = /* @__PURE__ */ l("span", { className: "component-recurrence-controller__placeholder", children: Y }), R = A(
|
|
38
|
+
() => a && (o == null ? void 0 : o.toText()) || y,
|
|
39
|
+
[a, p]
|
|
40
|
+
), F = (e) => {
|
|
41
|
+
p && m(e ? _ : void 0);
|
|
42
|
+
}, O = (e) => {
|
|
42
43
|
e === n.DAILY ? r({ freq: n.DAILY, bymonthday: [], byweekday: [] }) : e === n.WEEKLY ? r({ freq: n.WEEKLY, bymonthday: [], byweekday: [0] }) : e === n.MONTHLY && r({ freq: n.MONTHLY, bymonthday: [1], byweekday: [] });
|
|
43
44
|
}, r = (e) => {
|
|
44
|
-
const
|
|
45
|
+
const s = {
|
|
45
46
|
...o.options,
|
|
46
47
|
...e
|
|
47
|
-
},
|
|
48
|
+
}, S = [
|
|
48
49
|
"byhour",
|
|
49
50
|
"byminute",
|
|
50
51
|
"bysecond",
|
|
@@ -52,36 +53,36 @@ const N = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", de = (c) => {
|
|
|
52
53
|
"count",
|
|
53
54
|
"until"
|
|
54
55
|
];
|
|
55
|
-
for (const
|
|
56
|
-
delete
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
m(
|
|
56
|
+
for (const q of S)
|
|
57
|
+
delete s[q];
|
|
58
|
+
s.freq === n.DAILY && delete s.byweekday;
|
|
59
|
+
const x = new N(s);
|
|
60
|
+
m(x.toString());
|
|
60
61
|
};
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
|
|
62
|
+
return /* @__PURE__ */ t(
|
|
63
|
+
K,
|
|
63
64
|
{
|
|
64
|
-
...
|
|
65
|
-
placeholder:
|
|
66
|
-
inputProps:
|
|
65
|
+
...i,
|
|
66
|
+
placeholder: R,
|
|
67
|
+
inputProps: k,
|
|
67
68
|
children: [
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
p && /* @__PURE__ */ l("div", { className: "component-recurrence-control__row", children: /* @__PURE__ */ l(
|
|
70
|
+
P,
|
|
70
71
|
{
|
|
71
72
|
onLabel: "Repeats",
|
|
72
73
|
offLabel: "None",
|
|
73
74
|
value: a === void 0,
|
|
74
|
-
onChangeValue:
|
|
75
|
+
onChangeValue: F
|
|
75
76
|
}
|
|
76
77
|
) }),
|
|
77
|
-
(a !== void 0 || !
|
|
78
|
-
/* @__PURE__ */
|
|
78
|
+
(a !== void 0 || !p) && /* @__PURE__ */ t(w, { children: [
|
|
79
|
+
/* @__PURE__ */ t("div", { className: "component-recurrence-control__row", children: [
|
|
79
80
|
/* @__PURE__ */ l(
|
|
80
81
|
E,
|
|
81
82
|
{
|
|
82
83
|
value: o.options.interval,
|
|
83
84
|
onChangeValue: (e) => r({ interval: e || 1 }),
|
|
84
|
-
suffix:
|
|
85
|
+
suffix: C(o.options.interval),
|
|
85
86
|
min: 1,
|
|
86
87
|
"aria-label": "Recurrence frequency"
|
|
87
88
|
}
|
|
@@ -91,7 +92,7 @@ const N = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", de = (c) => {
|
|
|
91
92
|
{
|
|
92
93
|
"aria-label": "Recurrence period",
|
|
93
94
|
value: o.options.freq,
|
|
94
|
-
onChangeValue:
|
|
95
|
+
onChangeValue: O,
|
|
95
96
|
options: [
|
|
96
97
|
{ label: "Day", value: n.DAILY },
|
|
97
98
|
{ label: "Week", value: n.WEEKLY },
|
|
@@ -101,9 +102,9 @@ const N = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", de = (c) => {
|
|
|
101
102
|
)
|
|
102
103
|
] }),
|
|
103
104
|
o.options.freq === n.WEEKLY && /* @__PURE__ */ l("div", { className: "component-recurrence-control__row", children: /* @__PURE__ */ l(
|
|
104
|
-
|
|
105
|
+
I,
|
|
105
106
|
{
|
|
106
|
-
value: ((
|
|
107
|
+
value: ((b = o.options.byweekday) == null ? void 0 : b.map(String)) || [],
|
|
107
108
|
onChangeValue: (e) => r({ byweekday: e.map(Number) }),
|
|
108
109
|
label: "On every",
|
|
109
110
|
options: [
|
|
@@ -118,19 +119,19 @@ const N = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", de = (c) => {
|
|
|
118
119
|
multiple: !0
|
|
119
120
|
}
|
|
120
121
|
) }),
|
|
121
|
-
o.options.freq === n.MONTHLY && /* @__PURE__ */
|
|
122
|
+
o.options.freq === n.MONTHLY && /* @__PURE__ */ t(w, { children: [
|
|
122
123
|
/* @__PURE__ */ l(
|
|
123
124
|
T,
|
|
124
125
|
{
|
|
125
|
-
open: ((
|
|
126
|
+
open: ((h = o.options.bymonthday) == null ? void 0 : h.length) > 0,
|
|
126
127
|
onOpen: () => r({ bymonthday: [1], byweekday: [] }),
|
|
127
128
|
children: /* @__PURE__ */ l(
|
|
128
129
|
E,
|
|
129
130
|
{
|
|
130
131
|
prefix: "On the",
|
|
131
|
-
suffix:
|
|
132
|
+
suffix: C(o.options.bymonthday[0]) + " of the month",
|
|
132
133
|
placeholder: "4",
|
|
133
|
-
value: (
|
|
134
|
+
value: (f = o.options.bymonthday) == null ? void 0 : f[0],
|
|
134
135
|
onChangeValue: (e) => r({
|
|
135
136
|
bymonthday: [e || 1]
|
|
136
137
|
}),
|
|
@@ -140,7 +141,7 @@ const N = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", de = (c) => {
|
|
|
140
141
|
)
|
|
141
142
|
}
|
|
142
143
|
),
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ t(
|
|
144
145
|
T,
|
|
145
146
|
{
|
|
146
147
|
open: ((v = o.options.byweekday) == null ? void 0 : v.length) > 0,
|
|
@@ -177,7 +178,7 @@ const N = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", de = (c) => {
|
|
|
177
178
|
}
|
|
178
179
|
],
|
|
179
180
|
placeholder: "First",
|
|
180
|
-
value: String((
|
|
181
|
+
value: String((g = o.options.bysetpos) == null ? void 0 : g[0]),
|
|
181
182
|
onChangeValue: (e) => r({
|
|
182
183
|
bysetpos: [Number(e) || 0]
|
|
183
184
|
})
|
|
@@ -196,7 +197,7 @@ const N = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", de = (c) => {
|
|
|
196
197
|
{ label: "Sunday", value: "6" }
|
|
197
198
|
],
|
|
198
199
|
placeholder: "Monday",
|
|
199
|
-
value: String((
|
|
200
|
+
value: String((L = o.options.byweekday) == null ? void 0 : L[0]),
|
|
200
201
|
onChangeValue: (e) => r({
|
|
201
202
|
byweekday: [Number(e) || 0]
|
|
202
203
|
})
|
|
@@ -211,21 +212,21 @@ const N = "RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=MO", de = (c) => {
|
|
|
211
212
|
}
|
|
212
213
|
);
|
|
213
214
|
}, T = (c) => {
|
|
214
|
-
const { open:
|
|
215
|
-
return /* @__PURE__ */
|
|
215
|
+
const { open: i, onOpen: u, children: a } = c;
|
|
216
|
+
return /* @__PURE__ */ t("div", { className: "component-recurrence-control__frequency_type", children: [
|
|
216
217
|
/* @__PURE__ */ l(
|
|
217
218
|
"button",
|
|
218
219
|
{
|
|
219
220
|
className: "component-recurrence-control__radio",
|
|
220
|
-
"aria-pressed":
|
|
221
|
+
"aria-pressed": i,
|
|
221
222
|
onClick: u,
|
|
222
223
|
type: "button",
|
|
223
|
-
children:
|
|
224
|
+
children: i ? /* @__PURE__ */ l(V, { weight: "fill" }) : /* @__PURE__ */ l(W, {})
|
|
224
225
|
}
|
|
225
226
|
),
|
|
226
|
-
/* @__PURE__ */ l("fieldset", { className: "component-recurrence-control__row", disabled: !
|
|
227
|
+
/* @__PURE__ */ l("fieldset", { className: "component-recurrence-control__row", disabled: !i, children: a })
|
|
227
228
|
] });
|
|
228
229
|
};
|
|
229
230
|
export {
|
|
230
|
-
|
|
231
|
+
be as RecurrenceControl
|
|
231
232
|
};
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as v } from "react/jsx-runtime";
|
|
2
2
|
import { Button as N } from "../../button/index.js";
|
|
3
3
|
import { findOption as S } from "../../../types/options.js";
|
|
4
4
|
import * as m from "react";
|
|
5
5
|
import { p as O } from "../../../IconBase.es-rM5tt24D.js";
|
|
6
6
|
import { t as P } from "../../../CaretDown.es-CfgGfmY2.js";
|
|
7
|
-
import { BaseControl as
|
|
7
|
+
import { BaseControl as g } from "../base-control/index.js";
|
|
8
8
|
import { Affix as p } from "../base-control/affix.js";
|
|
9
|
-
import { useBaseControlProps as
|
|
10
|
-
import { Select as
|
|
9
|
+
import { useBaseControlProps as w } from "../base-control/props.js";
|
|
10
|
+
import { Select as C } from "./select.js";
|
|
11
11
|
import '../../../assets/style16.css';/* empty css */
|
|
12
|
-
import { S as
|
|
12
|
+
import { S as I } from "../../../select-value-B3DYk9eV.js";
|
|
13
13
|
const f = m.forwardRef((o, t) => /* @__PURE__ */ m.createElement(O, { ref: t, ...o, weights: P }));
|
|
14
14
|
f.displayName = "CaretDownIcon";
|
|
15
15
|
function G(o) {
|
|
16
|
-
const { baseProps: t, controlProps:
|
|
16
|
+
const { baseProps: t, controlProps: r } = w(o, {
|
|
17
17
|
className: "component-select-control"
|
|
18
18
|
}), {
|
|
19
19
|
placeholder: l,
|
|
20
20
|
options: d = [],
|
|
21
|
-
value:
|
|
22
|
-
withIcon:
|
|
21
|
+
value: h,
|
|
22
|
+
withIcon: _ = !1,
|
|
23
23
|
before: b,
|
|
24
24
|
after: u
|
|
25
|
-
} =
|
|
26
|
-
return /* @__PURE__ */ e(
|
|
25
|
+
} = r, { prefix: c, suffix: s, ...x } = t, a = S(d, h), i = !!a ? a : { label: l || "" };
|
|
26
|
+
return /* @__PURE__ */ e(g, { ...x, children: /* @__PURE__ */ n(C, { ...r, prefix: c, suffix: s, children: [
|
|
27
27
|
b,
|
|
28
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ n("div", { className: "component-select-control__btn", children: [
|
|
29
29
|
/* @__PURE__ */ e(p, { children: c }),
|
|
30
|
-
/* @__PURE__ */ e(
|
|
31
|
-
|
|
30
|
+
/* @__PURE__ */ e(I, { fallback: l, children: () => /* @__PURE__ */ e(v, { children: /* @__PURE__ */ n("span", { className: "component-select-control__btn__value", children: [
|
|
31
|
+
_ && i.icon,
|
|
32
32
|
/* @__PURE__ */ e("span", { className: "component-select-control__btn__value__label", children: i.label })
|
|
33
33
|
] }) }) }),
|
|
34
34
|
/* @__PURE__ */ e(p, { suffix: !0, children: s })
|
|
35
35
|
] }),
|
|
36
|
-
/* @__PURE__ */ e(
|
|
36
|
+
o.variant !== "ghost" && /* @__PURE__ */ e(
|
|
37
37
|
N.Icon,
|
|
38
38
|
{
|
|
39
39
|
className: "component-select-control__btn__caret",
|