@vielzeug/refine 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button.cjs +6 -4
- package/dist/button.cjs.map +1 -1
- package/dist/button.js +11 -9
- package/dist/button.js.map +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.cjs.map +1 -1
- package/dist/card.js +4 -2
- package/dist/card.js.map +1 -1
- package/dist/custom-elements.json +518 -504
- package/dist/feedback/skeleton/skeleton.css.cjs +1 -1
- package/dist/feedback/skeleton/skeleton.css.cjs.map +1 -1
- package/dist/feedback/skeleton/skeleton.css.js +1 -1
- package/dist/feedback/skeleton/skeleton.css.js.map +1 -1
- package/dist/feedback/skeleton/skeleton.d.ts +1 -1
- package/dist/inputs/date-picker/date-picker.css.cjs +1 -1
- package/dist/inputs/date-picker/date-picker.css.cjs.map +1 -1
- package/dist/inputs/date-picker/date-picker.css.js +1 -1
- package/dist/inputs/date-picker/date-picker.css.js.map +1 -1
- package/dist/inputs/input/input.css.cjs +1 -1
- package/dist/inputs/input/input.css.cjs.map +1 -1
- package/dist/inputs/input/input.css.js +1 -1
- package/dist/inputs/input/input.css.js.map +1 -1
- package/dist/inputs/switch/switch.css.cjs +1 -1
- package/dist/inputs/switch/switch.css.cjs.map +1 -1
- package/dist/inputs/switch/switch.css.js +1 -1
- package/dist/inputs/switch/switch.css.js.map +1 -1
- package/dist/inputs/switch/switch.d.ts.map +1 -1
- package/dist/layout/navbar/navbar.css.cjs +1 -1
- package/dist/layout/navbar/navbar.css.cjs.map +1 -1
- package/dist/layout/navbar/navbar.css.js +1 -1
- package/dist/layout/navbar/navbar.css.js.map +1 -1
- package/dist/layout/navbar/navbar.d.ts +6 -0
- package/dist/layout/navbar/navbar.d.ts.map +1 -1
- package/dist/layout/sidebar/sidebar-item.css.cjs +1 -1
- package/dist/layout/sidebar/sidebar-item.css.cjs.map +1 -1
- package/dist/layout/sidebar/sidebar-item.css.js +1 -1
- package/dist/layout/sidebar/sidebar-item.css.js.map +1 -1
- package/dist/layout/sidebar/sidebar.css.cjs +1 -1
- package/dist/layout/sidebar/sidebar.css.cjs.map +1 -1
- package/dist/layout/sidebar/sidebar.css.js +1 -1
- package/dist/layout/sidebar/sidebar.css.js.map +1 -1
- package/dist/layout/sidebar/sidebar.d.ts +1 -0
- package/dist/layout/sidebar/sidebar.d.ts.map +1 -1
- package/dist/navbar.cjs +10 -10
- package/dist/navbar.cjs.map +1 -1
- package/dist/navbar.js +99 -97
- package/dist/navbar.js.map +1 -1
- package/dist/overlay/menu/menu.css.cjs +1 -1
- package/dist/overlay/menu/menu.css.cjs.map +1 -1
- package/dist/overlay/menu/menu.css.js +1 -1
- package/dist/overlay/menu/menu.css.js.map +1 -1
- package/dist/overlay/shared/use-floating-trigger.cjs +1 -1
- package/dist/overlay/shared/use-floating-trigger.cjs.map +1 -1
- package/dist/overlay/shared/use-floating-trigger.d.ts +3 -3
- package/dist/overlay/shared/use-floating-trigger.d.ts.map +1 -1
- package/dist/overlay/shared/use-floating-trigger.js +16 -4
- package/dist/overlay/shared/use-floating-trigger.js.map +1 -1
- package/dist/refine.cjs +95 -45
- package/dist/refine.cjs.map +1 -1
- package/dist/refine.iife.js +95 -45
- package/dist/refine.iife.js.map +1 -1
- package/dist/refine.js +180 -130
- package/dist/refine.js.map +1 -1
- package/dist/sidebar.cjs +10 -2
- package/dist/sidebar.cjs.map +1 -1
- package/dist/sidebar.js +10 -1
- package/dist/sidebar.js.map +1 -1
- package/dist/skeleton.cjs.map +1 -1
- package/dist/skeleton.js.map +1 -1
- package/dist/styles/mixins/field-variants.css.cjs +15 -0
- package/dist/styles/mixins/field-variants.css.cjs.map +1 -1
- package/dist/styles/mixins/field-variants.css.d.ts.map +1 -1
- package/dist/styles/mixins/field-variants.css.js +15 -0
- package/dist/styles/mixins/field-variants.css.js.map +1 -1
- package/dist/styles/mixins/variants.css.cjs +4 -4
- package/dist/styles/mixins/variants.css.cjs.map +1 -1
- package/dist/styles/mixins/variants.css.js +4 -4
- package/dist/styles/mixins/variants.css.js.map +1 -1
- package/dist/switch.cjs +28 -3
- package/dist/switch.cjs.map +1 -1
- package/dist/switch.js +54 -30
- package/dist/switch.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=`@layer refine.base{:host{--_bg:var(--skeleton-bg,var(--color-contrast-200));--_highlight:var(--skeleton-highlight,var(--color-contrast-100));--_radius:var(--skeleton-radius,var(--rounded-lg));--_circle-size:var(--skeleton-size,var(--size-10));--_width:var(--skeleton-width,100%);--_height:var(--skeleton-height,var(--size-4));--_line-gap:var(--skeleton-line-gap,var(--size-2));--_last-line-width:var(--skeleton-last-line-width,60%);--_duration:var(--skeleton-duration,1.6s);--_stripe-size:var(--skeleton-stripe-size,8px);width:var(--_width);height:var(--_height);display:inline-block}.stack{gap:var(--_line-gap);width:100%;height:100%;display:grid}.bone{background:var(--_bg);border-radius:var(--_radius);width:100%;height:100%;position:relative;overflow:hidden}.bone:after{content:"";background:linear-gradient(90deg, var(--_bg) 0%, var(--_highlight) 50%, var(--_bg) 100%);animation:var(--_motion-animation,ore-skeleton-shimmer var(--_duration) linear infinite);position:absolute;inset:0;transform:translate(-100%)}:host([data-animated=false]) .bone:after{display:none}:host([data-paused]) .bone:after{animation-play-state:paused}@keyframes ore-skeleton-shimmer{to{transform:translate(100%)}}:host(:dir(rtl)) .bone:after{animation-direction:reverse}}@layer refine.variants{:host([variant=circle]){--_radius:var(--rounded-full);width:var(--skeleton-width,var(--_circle-size));height:var(--skeleton-height,var(--_circle-size));aspect-ratio:1}:host([variant=text]){--_height:var(--size-3);--_radius:var(--rounded-sm);height:auto}:host([variant=text]) .stack{height:auto}:host([variant=text]) .bone{height:var(--_height)}:host([variant=text]) .bone[data-last=true]{width:var(--_last-line-width)}}@layer refine.striped{:host([striped]) .
|
|
1
|
+
var e=`@layer refine.base{:host{--_bg:var(--skeleton-bg,var(--color-contrast-200));--_highlight:var(--skeleton-highlight,var(--color-contrast-100));--_radius:var(--skeleton-radius,var(--rounded-lg));--_circle-size:var(--skeleton-size,var(--size-10));--_width:var(--skeleton-width,100%);--_height:var(--skeleton-height,var(--size-4));--_line-gap:var(--skeleton-line-gap,var(--size-2));--_last-line-width:var(--skeleton-last-line-width,60%);--_duration:var(--skeleton-duration,1.6s);--_stripe-size:var(--skeleton-stripe-size,8px);width:var(--_width);height:var(--_height);display:inline-block}:host(:not([variant=text])){position:relative}:host(:not([variant=text])) .stack{position:absolute;inset:0}.stack{gap:var(--_line-gap);width:100%;height:100%;display:grid}.bone{box-sizing:border-box;background:var(--_bg);border-radius:var(--_radius);width:100%;height:100%;position:relative;overflow:hidden}.bone:after{content:"";background:linear-gradient(90deg, var(--_bg) 0%, var(--_highlight) 50%, var(--_bg) 100%);animation:var(--_motion-animation,ore-skeleton-shimmer var(--_duration) linear infinite);position:absolute;inset:0;transform:translate(-100%)}:host([data-animated=false]) .bone:after{display:none}:host([data-paused]) .bone:after{animation-play-state:paused}@keyframes ore-skeleton-shimmer{to{transform:translate(100%)}}:host(:dir(rtl)) .bone:after{animation-direction:reverse}}@layer refine.variants{:host([variant=circle]){--_radius:var(--rounded-full);width:var(--skeleton-width,var(--_circle-size));height:var(--skeleton-height,var(--_circle-size));aspect-ratio:1}:host([variant=text]){--_height:var(--size-3);--_radius:var(--rounded-sm);height:auto}:host([variant=text]) .stack{height:auto}:host([variant=text]) .bone{height:var(--_height)}:host([variant=text]) .bone[data-last=true]{width:var(--_last-line-width)}}@layer refine.striped{:host([striped]) .bone{--_stripe-color:var(--skeleton-stripe-color,var(--color-contrast-400));border:var(--border) dashed var(--_stripe-color);background-color:#0000}:host([striped]) .bone:before{--_stripe-color:var(--skeleton-stripe-color,var(--color-contrast-300));content:"";background-color:var(--_stripe-color);-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cline x1='0' y1='8' x2='8' y2='0' stroke='white' stroke-width='1'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cline x1='0' y1='8' x2='8' y2='0' stroke='white' stroke-width='1'/%3E%3C/svg%3E");-webkit-mask-size:var(--_stripe-size) var(--_stripe-size);-webkit-mask-size:var(--_stripe-size) var(--_stripe-size);mask-size:var(--_stripe-size) var(--_stripe-size);position:absolute;inset:0}:host([striped]) .bone:after{display:none}}@layer refine.utilities{:host([size=sm]){--_height:var(--size-3);--_circle-size:var(--size-8)}:host([size=md]){--_height:var(--size-4);--_circle-size:var(--size-10)}:host([size=lg]){--_height:var(--size-6);--_circle-size:var(--size-14)}}@media (forced-colors:active){.bone{background:buttonface;border:1px solid buttontext}.bone:after{display:none}}`;exports.default=e;
|
|
2
2
|
//# sourceMappingURL=skeleton.css.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.css.cjs","names":[],"sources":["../../../src/feedback/skeleton/skeleton.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_bg: var(--skeleton-bg, var(--color-contrast-200));\n --_highlight: var(--skeleton-highlight, var(--color-contrast-100));\n --_radius: var(--skeleton-radius, var(--rounded-lg));\n --_circle-size: var(--skeleton-size, var(--size-10));\n --_width: var(--skeleton-width, 100%);\n --_height: var(--skeleton-height, var(--size-4));\n --_line-gap: var(--skeleton-line-gap, var(--size-2));\n --_last-line-width: var(--skeleton-last-line-width, 60%);\n --_duration: var(--skeleton-duration, 1.6s);\n --_stripe-size: var(--skeleton-stripe-size, 8px);\n\n display: inline-block;\n width: var(--_width);\n height: var(--_height);\n }\n\n .stack {\n display: grid;\n gap: var(--_line-gap);\n width: 100%;\n height: 100%;\n }\n\n .bone {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n background: var(--_bg);\n border-radius: var(--_radius);\n }\n\n .bone::after {\n position: absolute;\n inset: 0;\n content: '';\n background: linear-gradient(90deg, var(--_bg) 0%, var(--_highlight) 50%, var(--_bg) 100%);\n transform: translateX(-100%);\n animation: var(--_motion-animation, ore-skeleton-shimmer var(--_duration) linear infinite);\n }\n\n :host([data-animated='false']) .bone::after {\n display: none;\n }\n\n /* Pause shimmer when scrolled out of the viewport — no visible effect, saves GPU */\n :host([data-paused]) .bone::after {\n animation-play-state: paused;\n }\n\n @keyframes ore-skeleton-shimmer {\n to {\n transform: translateX(100%);\n }\n }\n\n /* In RTL the shimmer should sweep right-to-left */\n :host(:dir(rtl)) .bone::after {\n animation-direction: reverse;\n }\n}\n\n@layer refine.variants {\n /* Circle variant — avatars, icons */\n :host([variant='circle']) {\n --_radius: var(--rounded-full);\n\n width: var(--skeleton-width, var(--_circle-size));\n height: var(--skeleton-height, var(--_circle-size));\n aspect-ratio: 1 / 1;\n }\n\n /* Text variant — thinner, for inline text lines */\n :host([variant='text']) {\n --_height: var(--size-3);\n --_radius: var(--rounded-sm);\n\n height: auto;\n }\n\n :host([variant='text']) .stack {\n height: auto;\n }\n\n :host([variant='text']) .bone {\n height: var(--_height);\n }\n\n :host([variant='text']) .bone[data-last='true'] {\n width: var(--_last-line-width);\n }\n}\n\n@layer refine.striped {\n :host([striped]) .
|
|
1
|
+
{"version":3,"file":"skeleton.css.cjs","names":[],"sources":["../../../src/feedback/skeleton/skeleton.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_bg: var(--skeleton-bg, var(--color-contrast-200));\n --_highlight: var(--skeleton-highlight, var(--color-contrast-100));\n --_radius: var(--skeleton-radius, var(--rounded-lg));\n --_circle-size: var(--skeleton-size, var(--size-10));\n --_width: var(--skeleton-width, 100%);\n --_height: var(--skeleton-height, var(--size-4));\n --_line-gap: var(--skeleton-line-gap, var(--size-2));\n --_last-line-width: var(--skeleton-last-line-width, 60%);\n --_duration: var(--skeleton-duration, 1.6s);\n --_stripe-size: var(--skeleton-stripe-size, 8px);\n\n display: inline-block;\n width: var(--_width);\n height: var(--_height);\n }\n\n :host(:not([variant='text'])) {\n position: relative;\n }\n\n :host(:not([variant='text'])) .stack {\n position: absolute;\n inset: 0;\n }\n\n .stack {\n display: grid;\n gap: var(--_line-gap);\n width: 100%;\n height: 100%;\n }\n\n .bone {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n overflow: hidden;\n background: var(--_bg);\n border-radius: var(--_radius);\n }\n\n .bone::after {\n position: absolute;\n inset: 0;\n content: '';\n background: linear-gradient(90deg, var(--_bg) 0%, var(--_highlight) 50%, var(--_bg) 100%);\n transform: translateX(-100%);\n animation: var(--_motion-animation, ore-skeleton-shimmer var(--_duration) linear infinite);\n }\n\n :host([data-animated='false']) .bone::after {\n display: none;\n }\n\n /* Pause shimmer when scrolled out of the viewport — no visible effect, saves GPU */\n :host([data-paused]) .bone::after {\n animation-play-state: paused;\n }\n\n @keyframes ore-skeleton-shimmer {\n to {\n transform: translateX(100%);\n }\n }\n\n /* In RTL the shimmer should sweep right-to-left */\n :host(:dir(rtl)) .bone::after {\n animation-direction: reverse;\n }\n}\n\n@layer refine.variants {\n /* Circle variant — avatars, icons */\n :host([variant='circle']) {\n --_radius: var(--rounded-full);\n\n width: var(--skeleton-width, var(--_circle-size));\n height: var(--skeleton-height, var(--_circle-size));\n aspect-ratio: 1 / 1;\n }\n\n /* Text variant — thinner, for inline text lines */\n :host([variant='text']) {\n --_height: var(--size-3);\n --_radius: var(--rounded-sm);\n\n height: auto;\n }\n\n :host([variant='text']) .stack {\n height: auto;\n }\n\n :host([variant='text']) .bone {\n height: var(--_height);\n }\n\n :host([variant='text']) .bone[data-last='true'] {\n width: var(--_last-line-width);\n }\n}\n\n@layer refine.striped {\n :host([striped]) .bone {\n --_stripe-color: var(--skeleton-stripe-color, var(--color-contrast-400));\n\n background-color: transparent;\n border: var(--border) dashed var(--_stripe-color);\n }\n\n :host([striped]) .bone::before {\n --_stripe-color: var(--skeleton-stripe-color, var(--color-contrast-300));\n\n position: absolute;\n inset: 0;\n content: '';\n background-color: var(--_stripe-color);\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cline x1='0' y1='8' x2='8' y2='0' stroke='white' stroke-width='1'/%3E%3C/svg%3E\");\n mask-size: var(--_stripe-size) var(--_stripe-size);\n }\n\n :host([striped]) .bone::after {\n display: none;\n }\n}\n\n@layer refine.utilities {\n :host([size='sm']) {\n --_height: var(--size-3);\n --_circle-size: var(--size-8);\n }\n\n :host([size='md']) {\n --_height: var(--size-4);\n --_circle-size: var(--size-10);\n }\n\n :host([size='lg']) {\n --_height: var(--size-6);\n --_circle-size: var(--size-14);\n }\n}\n\n@media (forced-colors: active) {\n .bone {\n background: ButtonFace;\n border: 1px solid ButtonText;\n }\n\n .bone::after {\n display: none;\n }\n}\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/feedback/skeleton/skeleton.css?inline
|
|
2
|
-
var e = "@layer refine.base{:host{--_bg:var(--skeleton-bg,var(--color-contrast-200));--_highlight:var(--skeleton-highlight,var(--color-contrast-100));--_radius:var(--skeleton-radius,var(--rounded-lg));--_circle-size:var(--skeleton-size,var(--size-10));--_width:var(--skeleton-width,100%);--_height:var(--skeleton-height,var(--size-4));--_line-gap:var(--skeleton-line-gap,var(--size-2));--_last-line-width:var(--skeleton-last-line-width,60%);--_duration:var(--skeleton-duration,1.6s);--_stripe-size:var(--skeleton-stripe-size,8px);width:var(--_width);height:var(--_height);display:inline-block}.stack{gap:var(--_line-gap);width:100%;height:100%;display:grid}.bone{background:var(--_bg);border-radius:var(--_radius);width:100%;height:100%;position:relative;overflow:hidden}.bone:after{content:\"\";background:linear-gradient(90deg, var(--_bg) 0%, var(--_highlight) 50%, var(--_bg) 100%);animation:var(--_motion-animation,ore-skeleton-shimmer var(--_duration) linear infinite);position:absolute;inset:0;transform:translate(-100%)}:host([data-animated=false]) .bone:after{display:none}:host([data-paused]) .bone:after{animation-play-state:paused}@keyframes ore-skeleton-shimmer{to{transform:translate(100%)}}:host(:dir(rtl)) .bone:after{animation-direction:reverse}}@layer refine.variants{:host([variant=circle]){--_radius:var(--rounded-full);width:var(--skeleton-width,var(--_circle-size));height:var(--skeleton-height,var(--_circle-size));aspect-ratio:1}:host([variant=text]){--_height:var(--size-3);--_radius:var(--rounded-sm);height:auto}:host([variant=text]) .stack{height:auto}:host([variant=text]) .bone{height:var(--_height)}:host([variant=text]) .bone[data-last=true]{width:var(--_last-line-width)}}@layer refine.striped{:host([striped]) .
|
|
2
|
+
var e = "@layer refine.base{:host{--_bg:var(--skeleton-bg,var(--color-contrast-200));--_highlight:var(--skeleton-highlight,var(--color-contrast-100));--_radius:var(--skeleton-radius,var(--rounded-lg));--_circle-size:var(--skeleton-size,var(--size-10));--_width:var(--skeleton-width,100%);--_height:var(--skeleton-height,var(--size-4));--_line-gap:var(--skeleton-line-gap,var(--size-2));--_last-line-width:var(--skeleton-last-line-width,60%);--_duration:var(--skeleton-duration,1.6s);--_stripe-size:var(--skeleton-stripe-size,8px);width:var(--_width);height:var(--_height);display:inline-block}:host(:not([variant=text])){position:relative}:host(:not([variant=text])) .stack{position:absolute;inset:0}.stack{gap:var(--_line-gap);width:100%;height:100%;display:grid}.bone{box-sizing:border-box;background:var(--_bg);border-radius:var(--_radius);width:100%;height:100%;position:relative;overflow:hidden}.bone:after{content:\"\";background:linear-gradient(90deg, var(--_bg) 0%, var(--_highlight) 50%, var(--_bg) 100%);animation:var(--_motion-animation,ore-skeleton-shimmer var(--_duration) linear infinite);position:absolute;inset:0;transform:translate(-100%)}:host([data-animated=false]) .bone:after{display:none}:host([data-paused]) .bone:after{animation-play-state:paused}@keyframes ore-skeleton-shimmer{to{transform:translate(100%)}}:host(:dir(rtl)) .bone:after{animation-direction:reverse}}@layer refine.variants{:host([variant=circle]){--_radius:var(--rounded-full);width:var(--skeleton-width,var(--_circle-size));height:var(--skeleton-height,var(--_circle-size));aspect-ratio:1}:host([variant=text]){--_height:var(--size-3);--_radius:var(--rounded-sm);height:auto}:host([variant=text]) .stack{height:auto}:host([variant=text]) .bone{height:var(--_height)}:host([variant=text]) .bone[data-last=true]{width:var(--_last-line-width)}}@layer refine.striped{:host([striped]) .bone{--_stripe-color:var(--skeleton-stripe-color,var(--color-contrast-400));border:var(--border) dashed var(--_stripe-color);background-color:#0000}:host([striped]) .bone:before{--_stripe-color:var(--skeleton-stripe-color,var(--color-contrast-300));content:\"\";background-color:var(--_stripe-color);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cline x1='0' y1='8' x2='8' y2='0' stroke='white' stroke-width='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cline x1='0' y1='8' x2='8' y2='0' stroke='white' stroke-width='1'/%3E%3C/svg%3E\");-webkit-mask-size:var(--_stripe-size) var(--_stripe-size);-webkit-mask-size:var(--_stripe-size) var(--_stripe-size);mask-size:var(--_stripe-size) var(--_stripe-size);position:absolute;inset:0}:host([striped]) .bone:after{display:none}}@layer refine.utilities{:host([size=sm]){--_height:var(--size-3);--_circle-size:var(--size-8)}:host([size=md]){--_height:var(--size-4);--_circle-size:var(--size-10)}:host([size=lg]){--_height:var(--size-6);--_circle-size:var(--size-14)}}@media (forced-colors:active){.bone{background:buttonface;border:1px solid buttontext}.bone:after{display:none}}";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as default };
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skeleton.css.js","names":[],"sources":["../../../src/feedback/skeleton/skeleton.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_bg: var(--skeleton-bg, var(--color-contrast-200));\n --_highlight: var(--skeleton-highlight, var(--color-contrast-100));\n --_radius: var(--skeleton-radius, var(--rounded-lg));\n --_circle-size: var(--skeleton-size, var(--size-10));\n --_width: var(--skeleton-width, 100%);\n --_height: var(--skeleton-height, var(--size-4));\n --_line-gap: var(--skeleton-line-gap, var(--size-2));\n --_last-line-width: var(--skeleton-last-line-width, 60%);\n --_duration: var(--skeleton-duration, 1.6s);\n --_stripe-size: var(--skeleton-stripe-size, 8px);\n\n display: inline-block;\n width: var(--_width);\n height: var(--_height);\n }\n\n .stack {\n display: grid;\n gap: var(--_line-gap);\n width: 100%;\n height: 100%;\n }\n\n .bone {\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden;\n background: var(--_bg);\n border-radius: var(--_radius);\n }\n\n .bone::after {\n position: absolute;\n inset: 0;\n content: '';\n background: linear-gradient(90deg, var(--_bg) 0%, var(--_highlight) 50%, var(--_bg) 100%);\n transform: translateX(-100%);\n animation: var(--_motion-animation, ore-skeleton-shimmer var(--_duration) linear infinite);\n }\n\n :host([data-animated='false']) .bone::after {\n display: none;\n }\n\n /* Pause shimmer when scrolled out of the viewport — no visible effect, saves GPU */\n :host([data-paused]) .bone::after {\n animation-play-state: paused;\n }\n\n @keyframes ore-skeleton-shimmer {\n to {\n transform: translateX(100%);\n }\n }\n\n /* In RTL the shimmer should sweep right-to-left */\n :host(:dir(rtl)) .bone::after {\n animation-direction: reverse;\n }\n}\n\n@layer refine.variants {\n /* Circle variant — avatars, icons */\n :host([variant='circle']) {\n --_radius: var(--rounded-full);\n\n width: var(--skeleton-width, var(--_circle-size));\n height: var(--skeleton-height, var(--_circle-size));\n aspect-ratio: 1 / 1;\n }\n\n /* Text variant — thinner, for inline text lines */\n :host([variant='text']) {\n --_height: var(--size-3);\n --_radius: var(--rounded-sm);\n\n height: auto;\n }\n\n :host([variant='text']) .stack {\n height: auto;\n }\n\n :host([variant='text']) .bone {\n height: var(--_height);\n }\n\n :host([variant='text']) .bone[data-last='true'] {\n width: var(--_last-line-width);\n }\n}\n\n@layer refine.striped {\n :host([striped]) .
|
|
1
|
+
{"version":3,"file":"skeleton.css.js","names":[],"sources":["../../../src/feedback/skeleton/skeleton.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_bg: var(--skeleton-bg, var(--color-contrast-200));\n --_highlight: var(--skeleton-highlight, var(--color-contrast-100));\n --_radius: var(--skeleton-radius, var(--rounded-lg));\n --_circle-size: var(--skeleton-size, var(--size-10));\n --_width: var(--skeleton-width, 100%);\n --_height: var(--skeleton-height, var(--size-4));\n --_line-gap: var(--skeleton-line-gap, var(--size-2));\n --_last-line-width: var(--skeleton-last-line-width, 60%);\n --_duration: var(--skeleton-duration, 1.6s);\n --_stripe-size: var(--skeleton-stripe-size, 8px);\n\n display: inline-block;\n width: var(--_width);\n height: var(--_height);\n }\n\n :host(:not([variant='text'])) {\n position: relative;\n }\n\n :host(:not([variant='text'])) .stack {\n position: absolute;\n inset: 0;\n }\n\n .stack {\n display: grid;\n gap: var(--_line-gap);\n width: 100%;\n height: 100%;\n }\n\n .bone {\n position: relative;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n overflow: hidden;\n background: var(--_bg);\n border-radius: var(--_radius);\n }\n\n .bone::after {\n position: absolute;\n inset: 0;\n content: '';\n background: linear-gradient(90deg, var(--_bg) 0%, var(--_highlight) 50%, var(--_bg) 100%);\n transform: translateX(-100%);\n animation: var(--_motion-animation, ore-skeleton-shimmer var(--_duration) linear infinite);\n }\n\n :host([data-animated='false']) .bone::after {\n display: none;\n }\n\n /* Pause shimmer when scrolled out of the viewport — no visible effect, saves GPU */\n :host([data-paused]) .bone::after {\n animation-play-state: paused;\n }\n\n @keyframes ore-skeleton-shimmer {\n to {\n transform: translateX(100%);\n }\n }\n\n /* In RTL the shimmer should sweep right-to-left */\n :host(:dir(rtl)) .bone::after {\n animation-direction: reverse;\n }\n}\n\n@layer refine.variants {\n /* Circle variant — avatars, icons */\n :host([variant='circle']) {\n --_radius: var(--rounded-full);\n\n width: var(--skeleton-width, var(--_circle-size));\n height: var(--skeleton-height, var(--_circle-size));\n aspect-ratio: 1 / 1;\n }\n\n /* Text variant — thinner, for inline text lines */\n :host([variant='text']) {\n --_height: var(--size-3);\n --_radius: var(--rounded-sm);\n\n height: auto;\n }\n\n :host([variant='text']) .stack {\n height: auto;\n }\n\n :host([variant='text']) .bone {\n height: var(--_height);\n }\n\n :host([variant='text']) .bone[data-last='true'] {\n width: var(--_last-line-width);\n }\n}\n\n@layer refine.striped {\n :host([striped]) .bone {\n --_stripe-color: var(--skeleton-stripe-color, var(--color-contrast-400));\n\n background-color: transparent;\n border: var(--border) dashed var(--_stripe-color);\n }\n\n :host([striped]) .bone::before {\n --_stripe-color: var(--skeleton-stripe-color, var(--color-contrast-300));\n\n position: absolute;\n inset: 0;\n content: '';\n background-color: var(--_stripe-color);\n mask-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cline x1='0' y1='8' x2='8' y2='0' stroke='white' stroke-width='1'/%3E%3C/svg%3E\");\n mask-size: var(--_stripe-size) var(--_stripe-size);\n }\n\n :host([striped]) .bone::after {\n display: none;\n }\n}\n\n@layer refine.utilities {\n :host([size='sm']) {\n --_height: var(--size-3);\n --_circle-size: var(--size-8);\n }\n\n :host([size='md']) {\n --_height: var(--size-4);\n --_circle-size: var(--size-10);\n }\n\n :host([size='lg']) {\n --_height: var(--size-6);\n --_circle-size: var(--size-14);\n }\n}\n\n@media (forced-colors: active) {\n .bone {\n background: ButtonFace;\n border: 1px solid ButtonText;\n }\n\n .bone::after {\n display: none;\n }\n}\n"],"mappings":""}
|
|
@@ -21,7 +21,7 @@ export type OreSkeletonProps = {
|
|
|
21
21
|
/**
|
|
22
22
|
* A shimmer placeholder that represents loading content.
|
|
23
23
|
* Control dimensions via the `--skeleton-width` and `--skeleton-height` CSS custom properties,
|
|
24
|
-
* or via `width` / `height` inline styles.
|
|
24
|
+
* or via `width` / `height` inline styles. Rectangle and circle bones fill the rendered host box.
|
|
25
25
|
*
|
|
26
26
|
* @element ore-skeleton
|
|
27
27
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=`@layer refine.base{:host{--_day-selected-bg:var(--date-picker-day-selected-bg,var(--_theme-focus));--_day-today-color:var(--date-picker-day-today-color,var(--_theme-focus));--_day-outside-opacity:var(--date-picker-day-outside-opacity,.35);--_bg:var(--date-picker-bg,var(--color-canvas));--_border-color:var(--date-picker-border-color,var(--color-contrast-200));--_radius:var(--date-picker-radius,var(--rounded-xl));min-width:var(--date-picker-min-width,12rem);display:inline-block}:host([fullwidth]){display:block}:host([color=secondary]){--_day-selected-bg:var(--date-picker-day-selected-bg,var(--_theme-base));--_day-today-color:var(--date-picker-day-today-color,var(--_theme-base))}.trigger{cursor:pointer;width:100%}.trigger::part(input){cursor:pointer;caret-color:#0000;-webkit-user-select:none;user-select:none}.calendar{z-index:var(--z-dropdown,8000);gap:var(--size-2);min-width:18rem;padding:var(--size-3);pointer-events:none;background:var(--_bg);border:var(--border) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--date-picker-shadow,var(--shadow-lg));opacity:0;-webkit-backdrop-filter:blur(var(--blur-sm));backdrop-filter:blur(var(--blur-sm));transform:translateY(var(--overlay-enter-translate-y));transition:var(--_motion-transition,opacity var(--transition-fast), transform var(--transition-fast), display var(--transition-fast) allow-discrete);flex-direction:column;display:flex;position:fixed;inset:0 auto auto 0}.calendar[data-open]{pointer-events:auto;opacity:1;transform:translateY(0)}@starting-style{.calendar[data-open]{opacity:0;transform:translateY(var(--overlay-enter-translate-y))}}.cal-header{gap:var(--size-1);border-bottom:var(--border) solid var(--_border-color);padding-bottom:var(--size-2);justify-content:space-between;align-items:center;display:flex}.nav-btn{width:var(--size-8);height:var(--size-8);color:var(--color-contrast-600);cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast), color var(--transition-fast);background:0 0;border:none;outline:none;justify-content:center;align-items:center;padding:0;display:flex}.nav-btn:hover{color:var(--color-contrast-900);background:var(--color-contrast-300)}.nav-btn:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-label-btn{padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-weight:var(--font-semibold);color:var(--color-contrast-900);text-align:center;cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast);background:0 0;border:none;outline:none;flex:1}.cal-label-btn:hover{background:var(--color-contrast-300)}.cal-label-btn:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-label-month,.cal-label-year{display:inline-block}.cal-label-sep{padding-inline:var(--size-1);font-weight:var(--font-normal);color:var(--color-contrast-400);display:inline-block}[hidden]{display:none}.cal-grid{gap:var(--size-0-5);flex-direction:column;display:flex}.cal-grid-days{gap:var(--size-0-5);min-height:calc(7 * var(--size-10) + 6 * var(--size-0-5));grid-template-columns:repeat(7,1fr);display:grid}.cal-grid [role=row]{display:contents}.cal-cell{font-size:var(--text-sm);cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast), color var(--transition-fast);outline:none;justify-content:center;align-items:center;display:flex}.cal-cell-head{height:var(--size-8);font-size:var(--text-xs);font-weight:var(--font-medium);color:var(--color-contrast-500);cursor:default}.cal-cell-day{height:var(--size-8);color:var(--color-contrast-800)}.cal-cell-day:hover:not([data-disabled]){color:var(--color-contrast-900);background:color-mix(in oklch, var(--_day-selected-bg) 15%, transparent)}.cal-cell-day:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-cell-day[data-today]{font-weight:var(--font-semibold);color:var(--_day-today-color)}.cal-cell-day[data-selected]{font-weight:var(--font-semibold);color:var(--color-white,#fff);background:var(--_day-selected-bg)}.cal-cell-day[data-outside]{opacity:var(--_day-outside-opacity)}.cal-cell-day[data-disabled]{pointer-events:none;cursor:not-allowed;opacity:.3}.cal-grid-months,.cal-grid-years{gap:var(--size-1);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}.cal-cell-month,.cal-cell-year{height:var(--size-10);font-size:var(--text-sm);color:var(--color-contrast-800);cursor:pointer;border-radius:var(--rounded-md)}.cal-cell-month:hover:not([data-disabled]),.cal-cell-year:hover:not([data-disabled]){background:color-mix(in oklch, var(--_day-selected-bg) 15%, transparent)}.cal-cell-month:focus-visible,.cal-cell-year:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-cell-month[data-selected],.cal-cell-year[data-selected]{font-weight:var(--font-semibold);color:var(--color-white,#fff);background:var(--_day-selected-bg)}.cal-cell-month[data-disabled],.cal-cell-year[data-disabled]{pointer-events:none;cursor:not-allowed;opacity:.3}@media (prefers-reduced-motion:reduce){.field,.nav-btn,.cal-label-btn,.cal-cell{transition:none}}}`;exports.default=e;
|
|
1
|
+
var e=`@layer refine.base{:host{--_day-selected-bg:var(--date-picker-day-selected-bg,var(--_theme-focus));--_day-today-color:var(--date-picker-day-today-color,var(--_theme-focus));--_day-outside-opacity:var(--date-picker-day-outside-opacity,.35);--_bg:var(--date-picker-bg,var(--color-canvas));--_border-color:var(--date-picker-border-color,var(--color-contrast-200));--_radius:var(--date-picker-radius,var(--rounded-xl));min-width:var(--date-picker-min-width,12rem);display:inline-block}:host([fullwidth]){display:block}:host([color=secondary]){--_day-selected-bg:var(--date-picker-day-selected-bg,var(--_theme-base));--_day-today-color:var(--date-picker-day-today-color,var(--_theme-base))}.trigger{cursor:pointer;width:100%}.trigger::part(input){cursor:pointer;caret-color:#0000;-webkit-user-select:none;user-select:none}.calendar{z-index:var(--z-dropdown,8000);gap:var(--size-2);min-width:18rem;padding:var(--size-3);pointer-events:none;background:var(--_bg);border:var(--border) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--date-picker-shadow,var(--shadow-lg));opacity:0;-webkit-backdrop-filter:blur(var(--blur-sm));backdrop-filter:blur(var(--blur-sm));transform:translateY(var(--overlay-enter-translate-y));transition:var(--_motion-transition,opacity var(--transition-fast), transform var(--transition-fast), display var(--transition-fast) allow-discrete);flex-direction:column;display:flex;position:fixed;inset:0 auto auto 0}.calendar[data-open]{pointer-events:auto;opacity:1;transform:translateY(0)}@starting-style{.calendar[data-open]{opacity:0;transform:translateY(var(--overlay-enter-translate-y))}}.cal-header{gap:var(--size-1);border-bottom:var(--border) solid var(--_border-color);padding-bottom:var(--size-2);justify-content:space-between;align-items:center;display:flex}.nav-btn{width:var(--size-8);height:var(--size-8);color:var(--color-contrast-600);cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast), color var(--transition-fast);background:0 0;border:none;outline:none;justify-content:center;align-items:center;padding:0;display:flex}.nav-btn:hover{color:var(--color-contrast-900);background:var(--color-contrast-300)}.nav-btn:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-label-btn{padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-weight:var(--font-semibold);color:var(--color-contrast-900);text-align:center;cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast);background:0 0;border:none;outline:none;flex:1}.cal-label-btn:hover{background:var(--color-contrast-300)}.cal-label-btn:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-label-month,.cal-label-year{display:inline-block}.cal-label-sep{padding-inline:var(--size-1);font-weight:var(--font-normal);color:var(--color-contrast-400);display:inline-block}.cal-grid[hidden]{display:none}.cal-grid{gap:var(--size-0-5);flex-direction:column;display:flex}.cal-grid-days{gap:var(--size-0-5);min-height:calc(7 * var(--size-10) + 6 * var(--size-0-5));grid-template-columns:repeat(7,1fr);display:grid}.cal-grid [role=row]{display:contents}.cal-cell{font-size:var(--text-sm);cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast), color var(--transition-fast);outline:none;justify-content:center;align-items:center;display:flex}.cal-cell-head{height:var(--size-8);font-size:var(--text-xs);font-weight:var(--font-medium);color:var(--color-contrast-500);cursor:default}.cal-cell-day{height:var(--size-8);color:var(--color-contrast-800)}.cal-cell-day:hover:not([data-disabled]){color:var(--color-contrast-900);background:color-mix(in oklch, var(--_day-selected-bg) 15%, transparent)}.cal-cell-day:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-cell-day[data-today]{font-weight:var(--font-semibold);color:var(--_day-today-color)}.cal-cell-day[data-selected]{font-weight:var(--font-semibold);color:var(--color-white,#fff);background:var(--_day-selected-bg)}.cal-cell-day[data-outside]{opacity:var(--_day-outside-opacity)}.cal-cell-day[data-disabled]{pointer-events:none;cursor:not-allowed;opacity:.3}.cal-grid-months,.cal-grid-years{gap:var(--size-1);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}.cal-cell-month,.cal-cell-year{height:var(--size-10);font-size:var(--text-sm);color:var(--color-contrast-800);cursor:pointer;border-radius:var(--rounded-md)}.cal-cell-month:hover:not([data-disabled]),.cal-cell-year:hover:not([data-disabled]){background:color-mix(in oklch, var(--_day-selected-bg) 15%, transparent)}.cal-cell-month:focus-visible,.cal-cell-year:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-cell-month[data-selected],.cal-cell-year[data-selected]{font-weight:var(--font-semibold);color:var(--color-white,#fff);background:var(--_day-selected-bg)}.cal-cell-month[data-disabled],.cal-cell-year[data-disabled]{pointer-events:none;cursor:not-allowed;opacity:.3}@media (prefers-reduced-motion:reduce){.field,.nav-btn,.cal-label-btn,.cal-cell{transition:none}}}`;exports.default=e;
|
|
2
2
|
//# sourceMappingURL=date-picker.css.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.css.cjs","names":[],"sources":["../../../src/inputs/date-picker/date-picker.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_day-selected-bg: var(--date-picker-day-selected-bg, var(--_theme-focus));\n --_day-today-color: var(--date-picker-day-today-color, var(--_theme-focus));\n --_day-outside-opacity: var(--date-picker-day-outside-opacity, 0.35);\n --_bg: var(--date-picker-bg, var(--color-canvas));\n --_border-color: var(--date-picker-border-color, var(--color-contrast-200));\n --_radius: var(--date-picker-radius, var(--rounded-xl));\n\n display: inline-block;\n min-width: var(--date-picker-min-width, 12rem);\n }\n\n :host([fullwidth]) {\n display: block;\n }\n\n :host([color='secondary']) {\n --_day-selected-bg: var(--date-picker-day-selected-bg, var(--_theme-base));\n --_day-today-color: var(--date-picker-day-today-color, var(--_theme-base));\n }\n\n /* Make the trigger look like a button — ore-input is readonly so pointer changes to text by\n default. `width: 100%` matters just as much — see ore-select's own `.trigger` for why:\n `:host` is `display: inline-block`, which never stretches its own children to fill its own\n box the way a flex/grid container with `stretch` alignment would. */\n .trigger {\n width: 100%;\n cursor: pointer;\n }\n\n .trigger::part(input) {\n cursor: pointer;\n caret-color: transparent;\n user-select: none;\n }\n\n /* ── Calendar popup ──────────────────────────────────────────────────────── */\n\n /* `fixed` (not `absolute`) — positioned via JS-computed top/left (see the positioner in\n date-picker.ts), same as ore-select's own `.dropdown`. Laid out relative to the viewport,\n so it never affects any ancestor's box size or scrollable-overflow area — `absolute`\n positioned relative to the host did, once the host sat near a scroll/clip ancestor's edge. */\n .calendar {\n position: fixed;\n inset: 0 auto auto 0;\n z-index: var(--z-dropdown, 8000);\n display: flex;\n flex-direction: column;\n gap: var(--size-2);\n min-width: 18rem;\n padding: var(--size-3);\n pointer-events: none;\n background: var(--_bg);\n border: var(--border) solid var(--_border-color);\n border-radius: var(--_radius);\n box-shadow: var(--date-picker-shadow, var(--shadow-lg));\n\n /* Hidden by default */\n opacity: 0;\n backdrop-filter: blur(var(--blur-sm));\n transform: translateY(var(--overlay-enter-translate-y));\n transition: var(\n --_motion-transition,\n opacity var(--transition-fast),\n transform var(--transition-fast),\n display var(--transition-fast) allow-discrete\n );\n }\n\n .calendar[data-open] {\n pointer-events: auto;\n opacity: 1;\n transform: translateY(0);\n\n @starting-style {\n opacity: 0;\n transform: translateY(var(--overlay-enter-translate-y));\n }\n }\n\n /* ── Calendar header ─────────────────────────────────────────────────────── */\n\n .cal-header {\n display: flex;\n gap: var(--size-1);\n align-items: center;\n justify-content: space-between;\n padding-block-end: var(--size-2);\n border-block-end: var(--border) solid var(--_border-color);\n }\n\n .nav-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--size-8);\n height: var(--size-8);\n padding: 0;\n color: var(--color-contrast-600);\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n border-radius: var(--rounded-md);\n transition:\n background var(--transition-fast),\n color var(--transition-fast);\n }\n\n .nav-btn:hover {\n color: var(--color-contrast-900);\n background: var(--color-contrast-300);\n }\n\n .nav-btn:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-label-btn {\n flex: 1;\n padding: var(--size-1) var(--size-2);\n font-size: var(--text-sm);\n font-weight: var(--font-semibold);\n color: var(--color-contrast-900);\n text-align: center;\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n border-radius: var(--rounded-md);\n transition: background var(--transition-fast);\n }\n\n .cal-label-btn:hover {\n background: var(--color-contrast-300);\n }\n\n .cal-label-btn:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-label-month,\n .cal-label-year {\n display: inline-block;\n }\n\n .cal-label-sep {\n display: inline-block;\n padding-inline: var(--size-1);\n font-weight: var(--font-normal);\n color: var(--color-contrast-400);\n }\n\n /* ── Day grid ────────────────────────────────────────────────────────────── */\n\n /* Prevent display:flex from overriding the [hidden] attribute */\n [hidden] {\n display: none;\n }\n\n .cal-grid {\n display: flex;\n flex-direction: column;\n gap: var(--size-0-5);\n }\n\n .cal-grid-days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: var(--size-0-5);\n min-height: calc(7 * var(--size-10) + 6 * var(--size-0-5));\n }\n\n /* role=\"row\" wrappers exist for ARIA grid structure only — `display: contents`\n removes them from layout so their children still participate directly in the\n parent's CSS grid tracks. */\n .cal-grid [role='row'] {\n display: contents;\n }\n\n .cal-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--text-sm);\n cursor: pointer;\n outline: none;\n border-radius: var(--rounded-md);\n transition:\n background var(--transition-fast),\n color var(--transition-fast);\n }\n\n .cal-cell-head {\n height: var(--size-8);\n font-size: var(--text-xs);\n font-weight: var(--font-medium);\n color: var(--color-contrast-500);\n cursor: default;\n }\n\n .cal-cell-day {\n height: var(--size-8);\n color: var(--color-contrast-800);\n }\n\n .cal-cell-day:hover:not([data-disabled]) {\n color: var(--color-contrast-900);\n background: color-mix(in oklch, var(--_day-selected-bg) 15%, transparent);\n }\n\n .cal-cell-day:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-cell-day[data-today] {\n font-weight: var(--font-semibold);\n color: var(--_day-today-color);\n }\n\n .cal-cell-day[data-selected] {\n font-weight: var(--font-semibold);\n color: var(--color-white, #fff);\n background: var(--_day-selected-bg);\n }\n\n .cal-cell-day[data-outside] {\n opacity: var(--_day-outside-opacity);\n }\n\n .cal-cell-day[data-disabled] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.3;\n }\n\n /* ── Month / Year grids ──────────────────────────────────────────────────── */\n\n .cal-grid-months,\n .cal-grid-years {\n /* 4-column grid — same width as cal-grid-days, natural height. */\n display: grid;\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: var(--size-1);\n }\n\n .cal-cell-month,\n .cal-cell-year {\n height: var(--size-10);\n font-size: var(--text-sm);\n color: var(--color-contrast-800);\n cursor: pointer;\n border-radius: var(--rounded-md);\n }\n\n .cal-cell-month:hover:not([data-disabled]),\n .cal-cell-year:hover:not([data-disabled]) {\n background: color-mix(in oklch, var(--_day-selected-bg) 15%, transparent);\n }\n\n .cal-cell-month:focus-visible,\n .cal-cell-year:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-cell-month[data-selected],\n .cal-cell-year[data-selected] {\n font-weight: var(--font-semibold);\n color: var(--color-white, #fff);\n background: var(--_day-selected-bg);\n }\n\n .cal-cell-month[data-disabled],\n .cal-cell-year[data-disabled] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.3;\n }\n\n /* ── Reduced motion ──────────────────────────────────────────────────────── */\n\n @media (prefers-reduced-motion: reduce) {\n .field,\n .nav-btn,\n .cal-label-btn,\n .cal-cell {\n transition: none;\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"date-picker.css.cjs","names":[],"sources":["../../../src/inputs/date-picker/date-picker.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_day-selected-bg: var(--date-picker-day-selected-bg, var(--_theme-focus));\n --_day-today-color: var(--date-picker-day-today-color, var(--_theme-focus));\n --_day-outside-opacity: var(--date-picker-day-outside-opacity, 0.35);\n --_bg: var(--date-picker-bg, var(--color-canvas));\n --_border-color: var(--date-picker-border-color, var(--color-contrast-200));\n --_radius: var(--date-picker-radius, var(--rounded-xl));\n\n display: inline-block;\n min-width: var(--date-picker-min-width, 12rem);\n }\n\n :host([fullwidth]) {\n display: block;\n }\n\n :host([color='secondary']) {\n --_day-selected-bg: var(--date-picker-day-selected-bg, var(--_theme-base));\n --_day-today-color: var(--date-picker-day-today-color, var(--_theme-base));\n }\n\n /* Make the trigger look like a button — ore-input is readonly so pointer changes to text by\n default. `width: 100%` matters just as much — see ore-select's own `.trigger` for why:\n `:host` is `display: inline-block`, which never stretches its own children to fill its own\n box the way a flex/grid container with `stretch` alignment would. */\n .trigger {\n width: 100%;\n cursor: pointer;\n }\n\n .trigger::part(input) {\n cursor: pointer;\n caret-color: transparent;\n user-select: none;\n }\n\n /* ── Calendar popup ──────────────────────────────────────────────────────── */\n\n /* `fixed` (not `absolute`) — positioned via JS-computed top/left (see the positioner in\n date-picker.ts), same as ore-select's own `.dropdown`. Laid out relative to the viewport,\n so it never affects any ancestor's box size or scrollable-overflow area — `absolute`\n positioned relative to the host did, once the host sat near a scroll/clip ancestor's edge. */\n .calendar {\n position: fixed;\n inset: 0 auto auto 0;\n z-index: var(--z-dropdown, 8000);\n display: flex;\n flex-direction: column;\n gap: var(--size-2);\n min-width: 18rem;\n padding: var(--size-3);\n pointer-events: none;\n background: var(--_bg);\n border: var(--border) solid var(--_border-color);\n border-radius: var(--_radius);\n box-shadow: var(--date-picker-shadow, var(--shadow-lg));\n\n /* Hidden by default */\n opacity: 0;\n backdrop-filter: blur(var(--blur-sm));\n transform: translateY(var(--overlay-enter-translate-y));\n transition: var(\n --_motion-transition,\n opacity var(--transition-fast),\n transform var(--transition-fast),\n display var(--transition-fast) allow-discrete\n );\n }\n\n .calendar[data-open] {\n pointer-events: auto;\n opacity: 1;\n transform: translateY(0);\n\n @starting-style {\n opacity: 0;\n transform: translateY(var(--overlay-enter-translate-y));\n }\n }\n\n /* ── Calendar header ─────────────────────────────────────────────────────── */\n\n .cal-header {\n display: flex;\n gap: var(--size-1);\n align-items: center;\n justify-content: space-between;\n padding-block-end: var(--size-2);\n border-block-end: var(--border) solid var(--_border-color);\n }\n\n .nav-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--size-8);\n height: var(--size-8);\n padding: 0;\n color: var(--color-contrast-600);\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n border-radius: var(--rounded-md);\n transition:\n background var(--transition-fast),\n color var(--transition-fast);\n }\n\n .nav-btn:hover {\n color: var(--color-contrast-900);\n background: var(--color-contrast-300);\n }\n\n .nav-btn:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-label-btn {\n flex: 1;\n padding: var(--size-1) var(--size-2);\n font-size: var(--text-sm);\n font-weight: var(--font-semibold);\n color: var(--color-contrast-900);\n text-align: center;\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n border-radius: var(--rounded-md);\n transition: background var(--transition-fast);\n }\n\n .cal-label-btn:hover {\n background: var(--color-contrast-300);\n }\n\n .cal-label-btn:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-label-month,\n .cal-label-year {\n display: inline-block;\n }\n\n .cal-label-sep {\n display: inline-block;\n padding-inline: var(--size-1);\n font-weight: var(--font-normal);\n color: var(--color-contrast-400);\n }\n\n /* ── Day grid ────────────────────────────────────────────────────────────── */\n\n /* Prevent display:flex from overriding the [hidden] attribute */\n .cal-grid[hidden] {\n display: none;\n }\n\n .cal-grid {\n display: flex;\n flex-direction: column;\n gap: var(--size-0-5);\n }\n\n .cal-grid-days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: var(--size-0-5);\n min-height: calc(7 * var(--size-10) + 6 * var(--size-0-5));\n }\n\n /* role=\"row\" wrappers exist for ARIA grid structure only — `display: contents`\n removes them from layout so their children still participate directly in the\n parent's CSS grid tracks. */\n .cal-grid [role='row'] {\n display: contents;\n }\n\n .cal-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--text-sm);\n cursor: pointer;\n outline: none;\n border-radius: var(--rounded-md);\n transition:\n background var(--transition-fast),\n color var(--transition-fast);\n }\n\n .cal-cell-head {\n height: var(--size-8);\n font-size: var(--text-xs);\n font-weight: var(--font-medium);\n color: var(--color-contrast-500);\n cursor: default;\n }\n\n .cal-cell-day {\n height: var(--size-8);\n color: var(--color-contrast-800);\n }\n\n .cal-cell-day:hover:not([data-disabled]) {\n color: var(--color-contrast-900);\n background: color-mix(in oklch, var(--_day-selected-bg) 15%, transparent);\n }\n\n .cal-cell-day:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-cell-day[data-today] {\n font-weight: var(--font-semibold);\n color: var(--_day-today-color);\n }\n\n .cal-cell-day[data-selected] {\n font-weight: var(--font-semibold);\n color: var(--color-white, #fff);\n background: var(--_day-selected-bg);\n }\n\n .cal-cell-day[data-outside] {\n opacity: var(--_day-outside-opacity);\n }\n\n .cal-cell-day[data-disabled] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.3;\n }\n\n /* ── Month / Year grids ──────────────────────────────────────────────────── */\n\n .cal-grid-months,\n .cal-grid-years {\n /* 4-column grid — same width as cal-grid-days, natural height. */\n display: grid;\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: var(--size-1);\n }\n\n .cal-cell-month,\n .cal-cell-year {\n height: var(--size-10);\n font-size: var(--text-sm);\n color: var(--color-contrast-800);\n cursor: pointer;\n border-radius: var(--rounded-md);\n }\n\n .cal-cell-month:hover:not([data-disabled]),\n .cal-cell-year:hover:not([data-disabled]) {\n background: color-mix(in oklch, var(--_day-selected-bg) 15%, transparent);\n }\n\n .cal-cell-month:focus-visible,\n .cal-cell-year:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-cell-month[data-selected],\n .cal-cell-year[data-selected] {\n font-weight: var(--font-semibold);\n color: var(--color-white, #fff);\n background: var(--_day-selected-bg);\n }\n\n .cal-cell-month[data-disabled],\n .cal-cell-year[data-disabled] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.3;\n }\n\n /* ── Reduced motion ──────────────────────────────────────────────────────── */\n\n @media (prefers-reduced-motion: reduce) {\n .field,\n .nav-btn,\n .cal-label-btn,\n .cal-cell {\n transition: none;\n }\n }\n}\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/inputs/date-picker/date-picker.css?inline
|
|
2
|
-
var e = "@layer refine.base{:host{--_day-selected-bg:var(--date-picker-day-selected-bg,var(--_theme-focus));--_day-today-color:var(--date-picker-day-today-color,var(--_theme-focus));--_day-outside-opacity:var(--date-picker-day-outside-opacity,.35);--_bg:var(--date-picker-bg,var(--color-canvas));--_border-color:var(--date-picker-border-color,var(--color-contrast-200));--_radius:var(--date-picker-radius,var(--rounded-xl));min-width:var(--date-picker-min-width,12rem);display:inline-block}:host([fullwidth]){display:block}:host([color=secondary]){--_day-selected-bg:var(--date-picker-day-selected-bg,var(--_theme-base));--_day-today-color:var(--date-picker-day-today-color,var(--_theme-base))}.trigger{cursor:pointer;width:100%}.trigger::part(input){cursor:pointer;caret-color:#0000;-webkit-user-select:none;user-select:none}.calendar{z-index:var(--z-dropdown,8000);gap:var(--size-2);min-width:18rem;padding:var(--size-3);pointer-events:none;background:var(--_bg);border:var(--border) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--date-picker-shadow,var(--shadow-lg));opacity:0;-webkit-backdrop-filter:blur(var(--blur-sm));backdrop-filter:blur(var(--blur-sm));transform:translateY(var(--overlay-enter-translate-y));transition:var(--_motion-transition,opacity var(--transition-fast), transform var(--transition-fast), display var(--transition-fast) allow-discrete);flex-direction:column;display:flex;position:fixed;inset:0 auto auto 0}.calendar[data-open]{pointer-events:auto;opacity:1;transform:translateY(0)}@starting-style{.calendar[data-open]{opacity:0;transform:translateY(var(--overlay-enter-translate-y))}}.cal-header{gap:var(--size-1);border-bottom:var(--border) solid var(--_border-color);padding-bottom:var(--size-2);justify-content:space-between;align-items:center;display:flex}.nav-btn{width:var(--size-8);height:var(--size-8);color:var(--color-contrast-600);cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast), color var(--transition-fast);background:0 0;border:none;outline:none;justify-content:center;align-items:center;padding:0;display:flex}.nav-btn:hover{color:var(--color-contrast-900);background:var(--color-contrast-300)}.nav-btn:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-label-btn{padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-weight:var(--font-semibold);color:var(--color-contrast-900);text-align:center;cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast);background:0 0;border:none;outline:none;flex:1}.cal-label-btn:hover{background:var(--color-contrast-300)}.cal-label-btn:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-label-month,.cal-label-year{display:inline-block}.cal-label-sep{padding-inline:var(--size-1);font-weight:var(--font-normal);color:var(--color-contrast-400);display:inline-block}[hidden]{display:none}.cal-grid{gap:var(--size-0-5);flex-direction:column;display:flex}.cal-grid-days{gap:var(--size-0-5);min-height:calc(7 * var(--size-10) + 6 * var(--size-0-5));grid-template-columns:repeat(7,1fr);display:grid}.cal-grid [role=row]{display:contents}.cal-cell{font-size:var(--text-sm);cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast), color var(--transition-fast);outline:none;justify-content:center;align-items:center;display:flex}.cal-cell-head{height:var(--size-8);font-size:var(--text-xs);font-weight:var(--font-medium);color:var(--color-contrast-500);cursor:default}.cal-cell-day{height:var(--size-8);color:var(--color-contrast-800)}.cal-cell-day:hover:not([data-disabled]){color:var(--color-contrast-900);background:color-mix(in oklch, var(--_day-selected-bg) 15%, transparent)}.cal-cell-day:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-cell-day[data-today]{font-weight:var(--font-semibold);color:var(--_day-today-color)}.cal-cell-day[data-selected]{font-weight:var(--font-semibold);color:var(--color-white,#fff);background:var(--_day-selected-bg)}.cal-cell-day[data-outside]{opacity:var(--_day-outside-opacity)}.cal-cell-day[data-disabled]{pointer-events:none;cursor:not-allowed;opacity:.3}.cal-grid-months,.cal-grid-years{gap:var(--size-1);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}.cal-cell-month,.cal-cell-year{height:var(--size-10);font-size:var(--text-sm);color:var(--color-contrast-800);cursor:pointer;border-radius:var(--rounded-md)}.cal-cell-month:hover:not([data-disabled]),.cal-cell-year:hover:not([data-disabled]){background:color-mix(in oklch, var(--_day-selected-bg) 15%, transparent)}.cal-cell-month:focus-visible,.cal-cell-year:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-cell-month[data-selected],.cal-cell-year[data-selected]{font-weight:var(--font-semibold);color:var(--color-white,#fff);background:var(--_day-selected-bg)}.cal-cell-month[data-disabled],.cal-cell-year[data-disabled]{pointer-events:none;cursor:not-allowed;opacity:.3}@media (prefers-reduced-motion:reduce){.field,.nav-btn,.cal-label-btn,.cal-cell{transition:none}}}";
|
|
2
|
+
var e = "@layer refine.base{:host{--_day-selected-bg:var(--date-picker-day-selected-bg,var(--_theme-focus));--_day-today-color:var(--date-picker-day-today-color,var(--_theme-focus));--_day-outside-opacity:var(--date-picker-day-outside-opacity,.35);--_bg:var(--date-picker-bg,var(--color-canvas));--_border-color:var(--date-picker-border-color,var(--color-contrast-200));--_radius:var(--date-picker-radius,var(--rounded-xl));min-width:var(--date-picker-min-width,12rem);display:inline-block}:host([fullwidth]){display:block}:host([color=secondary]){--_day-selected-bg:var(--date-picker-day-selected-bg,var(--_theme-base));--_day-today-color:var(--date-picker-day-today-color,var(--_theme-base))}.trigger{cursor:pointer;width:100%}.trigger::part(input){cursor:pointer;caret-color:#0000;-webkit-user-select:none;user-select:none}.calendar{z-index:var(--z-dropdown,8000);gap:var(--size-2);min-width:18rem;padding:var(--size-3);pointer-events:none;background:var(--_bg);border:var(--border) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--date-picker-shadow,var(--shadow-lg));opacity:0;-webkit-backdrop-filter:blur(var(--blur-sm));backdrop-filter:blur(var(--blur-sm));transform:translateY(var(--overlay-enter-translate-y));transition:var(--_motion-transition,opacity var(--transition-fast), transform var(--transition-fast), display var(--transition-fast) allow-discrete);flex-direction:column;display:flex;position:fixed;inset:0 auto auto 0}.calendar[data-open]{pointer-events:auto;opacity:1;transform:translateY(0)}@starting-style{.calendar[data-open]{opacity:0;transform:translateY(var(--overlay-enter-translate-y))}}.cal-header{gap:var(--size-1);border-bottom:var(--border) solid var(--_border-color);padding-bottom:var(--size-2);justify-content:space-between;align-items:center;display:flex}.nav-btn{width:var(--size-8);height:var(--size-8);color:var(--color-contrast-600);cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast), color var(--transition-fast);background:0 0;border:none;outline:none;justify-content:center;align-items:center;padding:0;display:flex}.nav-btn:hover{color:var(--color-contrast-900);background:var(--color-contrast-300)}.nav-btn:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-label-btn{padding:var(--size-1) var(--size-2);font-size:var(--text-sm);font-weight:var(--font-semibold);color:var(--color-contrast-900);text-align:center;cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast);background:0 0;border:none;outline:none;flex:1}.cal-label-btn:hover{background:var(--color-contrast-300)}.cal-label-btn:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-label-month,.cal-label-year{display:inline-block}.cal-label-sep{padding-inline:var(--size-1);font-weight:var(--font-normal);color:var(--color-contrast-400);display:inline-block}.cal-grid[hidden]{display:none}.cal-grid{gap:var(--size-0-5);flex-direction:column;display:flex}.cal-grid-days{gap:var(--size-0-5);min-height:calc(7 * var(--size-10) + 6 * var(--size-0-5));grid-template-columns:repeat(7,1fr);display:grid}.cal-grid [role=row]{display:contents}.cal-cell{font-size:var(--text-sm);cursor:pointer;border-radius:var(--rounded-md);transition:background var(--transition-fast), color var(--transition-fast);outline:none;justify-content:center;align-items:center;display:flex}.cal-cell-head{height:var(--size-8);font-size:var(--text-xs);font-weight:var(--font-medium);color:var(--color-contrast-500);cursor:default}.cal-cell-day{height:var(--size-8);color:var(--color-contrast-800)}.cal-cell-day:hover:not([data-disabled]){color:var(--color-contrast-900);background:color-mix(in oklch, var(--_day-selected-bg) 15%, transparent)}.cal-cell-day:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-cell-day[data-today]{font-weight:var(--font-semibold);color:var(--_day-today-color)}.cal-cell-day[data-selected]{font-weight:var(--font-semibold);color:var(--color-white,#fff);background:var(--_day-selected-bg)}.cal-cell-day[data-outside]{opacity:var(--_day-outside-opacity)}.cal-cell-day[data-disabled]{pointer-events:none;cursor:not-allowed;opacity:.3}.cal-grid-months,.cal-grid-years{gap:var(--size-1);grid-template-columns:repeat(4,minmax(0,1fr));display:grid}.cal-cell-month,.cal-cell-year{height:var(--size-10);font-size:var(--text-sm);color:var(--color-contrast-800);cursor:pointer;border-radius:var(--rounded-md)}.cal-cell-month:hover:not([data-disabled]),.cal-cell-year:hover:not([data-disabled]){background:color-mix(in oklch, var(--_day-selected-bg) 15%, transparent)}.cal-cell-month:focus-visible,.cal-cell-year:focus-visible{box-shadow:0 0 0 2px var(--_day-selected-bg)}.cal-cell-month[data-selected],.cal-cell-year[data-selected]{font-weight:var(--font-semibold);color:var(--color-white,#fff);background:var(--_day-selected-bg)}.cal-cell-month[data-disabled],.cal-cell-year[data-disabled]{pointer-events:none;cursor:not-allowed;opacity:.3}@media (prefers-reduced-motion:reduce){.field,.nav-btn,.cal-label-btn,.cal-cell{transition:none}}}";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as default };
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-picker.css.js","names":[],"sources":["../../../src/inputs/date-picker/date-picker.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_day-selected-bg: var(--date-picker-day-selected-bg, var(--_theme-focus));\n --_day-today-color: var(--date-picker-day-today-color, var(--_theme-focus));\n --_day-outside-opacity: var(--date-picker-day-outside-opacity, 0.35);\n --_bg: var(--date-picker-bg, var(--color-canvas));\n --_border-color: var(--date-picker-border-color, var(--color-contrast-200));\n --_radius: var(--date-picker-radius, var(--rounded-xl));\n\n display: inline-block;\n min-width: var(--date-picker-min-width, 12rem);\n }\n\n :host([fullwidth]) {\n display: block;\n }\n\n :host([color='secondary']) {\n --_day-selected-bg: var(--date-picker-day-selected-bg, var(--_theme-base));\n --_day-today-color: var(--date-picker-day-today-color, var(--_theme-base));\n }\n\n /* Make the trigger look like a button — ore-input is readonly so pointer changes to text by\n default. `width: 100%` matters just as much — see ore-select's own `.trigger` for why:\n `:host` is `display: inline-block`, which never stretches its own children to fill its own\n box the way a flex/grid container with `stretch` alignment would. */\n .trigger {\n width: 100%;\n cursor: pointer;\n }\n\n .trigger::part(input) {\n cursor: pointer;\n caret-color: transparent;\n user-select: none;\n }\n\n /* ── Calendar popup ──────────────────────────────────────────────────────── */\n\n /* `fixed` (not `absolute`) — positioned via JS-computed top/left (see the positioner in\n date-picker.ts), same as ore-select's own `.dropdown`. Laid out relative to the viewport,\n so it never affects any ancestor's box size or scrollable-overflow area — `absolute`\n positioned relative to the host did, once the host sat near a scroll/clip ancestor's edge. */\n .calendar {\n position: fixed;\n inset: 0 auto auto 0;\n z-index: var(--z-dropdown, 8000);\n display: flex;\n flex-direction: column;\n gap: var(--size-2);\n min-width: 18rem;\n padding: var(--size-3);\n pointer-events: none;\n background: var(--_bg);\n border: var(--border) solid var(--_border-color);\n border-radius: var(--_radius);\n box-shadow: var(--date-picker-shadow, var(--shadow-lg));\n\n /* Hidden by default */\n opacity: 0;\n backdrop-filter: blur(var(--blur-sm));\n transform: translateY(var(--overlay-enter-translate-y));\n transition: var(\n --_motion-transition,\n opacity var(--transition-fast),\n transform var(--transition-fast),\n display var(--transition-fast) allow-discrete\n );\n }\n\n .calendar[data-open] {\n pointer-events: auto;\n opacity: 1;\n transform: translateY(0);\n\n @starting-style {\n opacity: 0;\n transform: translateY(var(--overlay-enter-translate-y));\n }\n }\n\n /* ── Calendar header ─────────────────────────────────────────────────────── */\n\n .cal-header {\n display: flex;\n gap: var(--size-1);\n align-items: center;\n justify-content: space-between;\n padding-block-end: var(--size-2);\n border-block-end: var(--border) solid var(--_border-color);\n }\n\n .nav-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--size-8);\n height: var(--size-8);\n padding: 0;\n color: var(--color-contrast-600);\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n border-radius: var(--rounded-md);\n transition:\n background var(--transition-fast),\n color var(--transition-fast);\n }\n\n .nav-btn:hover {\n color: var(--color-contrast-900);\n background: var(--color-contrast-300);\n }\n\n .nav-btn:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-label-btn {\n flex: 1;\n padding: var(--size-1) var(--size-2);\n font-size: var(--text-sm);\n font-weight: var(--font-semibold);\n color: var(--color-contrast-900);\n text-align: center;\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n border-radius: var(--rounded-md);\n transition: background var(--transition-fast);\n }\n\n .cal-label-btn:hover {\n background: var(--color-contrast-300);\n }\n\n .cal-label-btn:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-label-month,\n .cal-label-year {\n display: inline-block;\n }\n\n .cal-label-sep {\n display: inline-block;\n padding-inline: var(--size-1);\n font-weight: var(--font-normal);\n color: var(--color-contrast-400);\n }\n\n /* ── Day grid ────────────────────────────────────────────────────────────── */\n\n /* Prevent display:flex from overriding the [hidden] attribute */\n [hidden] {\n display: none;\n }\n\n .cal-grid {\n display: flex;\n flex-direction: column;\n gap: var(--size-0-5);\n }\n\n .cal-grid-days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: var(--size-0-5);\n min-height: calc(7 * var(--size-10) + 6 * var(--size-0-5));\n }\n\n /* role=\"row\" wrappers exist for ARIA grid structure only — `display: contents`\n removes them from layout so their children still participate directly in the\n parent's CSS grid tracks. */\n .cal-grid [role='row'] {\n display: contents;\n }\n\n .cal-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--text-sm);\n cursor: pointer;\n outline: none;\n border-radius: var(--rounded-md);\n transition:\n background var(--transition-fast),\n color var(--transition-fast);\n }\n\n .cal-cell-head {\n height: var(--size-8);\n font-size: var(--text-xs);\n font-weight: var(--font-medium);\n color: var(--color-contrast-500);\n cursor: default;\n }\n\n .cal-cell-day {\n height: var(--size-8);\n color: var(--color-contrast-800);\n }\n\n .cal-cell-day:hover:not([data-disabled]) {\n color: var(--color-contrast-900);\n background: color-mix(in oklch, var(--_day-selected-bg) 15%, transparent);\n }\n\n .cal-cell-day:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-cell-day[data-today] {\n font-weight: var(--font-semibold);\n color: var(--_day-today-color);\n }\n\n .cal-cell-day[data-selected] {\n font-weight: var(--font-semibold);\n color: var(--color-white, #fff);\n background: var(--_day-selected-bg);\n }\n\n .cal-cell-day[data-outside] {\n opacity: var(--_day-outside-opacity);\n }\n\n .cal-cell-day[data-disabled] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.3;\n }\n\n /* ── Month / Year grids ──────────────────────────────────────────────────── */\n\n .cal-grid-months,\n .cal-grid-years {\n /* 4-column grid — same width as cal-grid-days, natural height. */\n display: grid;\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: var(--size-1);\n }\n\n .cal-cell-month,\n .cal-cell-year {\n height: var(--size-10);\n font-size: var(--text-sm);\n color: var(--color-contrast-800);\n cursor: pointer;\n border-radius: var(--rounded-md);\n }\n\n .cal-cell-month:hover:not([data-disabled]),\n .cal-cell-year:hover:not([data-disabled]) {\n background: color-mix(in oklch, var(--_day-selected-bg) 15%, transparent);\n }\n\n .cal-cell-month:focus-visible,\n .cal-cell-year:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-cell-month[data-selected],\n .cal-cell-year[data-selected] {\n font-weight: var(--font-semibold);\n color: var(--color-white, #fff);\n background: var(--_day-selected-bg);\n }\n\n .cal-cell-month[data-disabled],\n .cal-cell-year[data-disabled] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.3;\n }\n\n /* ── Reduced motion ──────────────────────────────────────────────────────── */\n\n @media (prefers-reduced-motion: reduce) {\n .field,\n .nav-btn,\n .cal-label-btn,\n .cal-cell {\n transition: none;\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"date-picker.css.js","names":[],"sources":["../../../src/inputs/date-picker/date-picker.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_day-selected-bg: var(--date-picker-day-selected-bg, var(--_theme-focus));\n --_day-today-color: var(--date-picker-day-today-color, var(--_theme-focus));\n --_day-outside-opacity: var(--date-picker-day-outside-opacity, 0.35);\n --_bg: var(--date-picker-bg, var(--color-canvas));\n --_border-color: var(--date-picker-border-color, var(--color-contrast-200));\n --_radius: var(--date-picker-radius, var(--rounded-xl));\n\n display: inline-block;\n min-width: var(--date-picker-min-width, 12rem);\n }\n\n :host([fullwidth]) {\n display: block;\n }\n\n :host([color='secondary']) {\n --_day-selected-bg: var(--date-picker-day-selected-bg, var(--_theme-base));\n --_day-today-color: var(--date-picker-day-today-color, var(--_theme-base));\n }\n\n /* Make the trigger look like a button — ore-input is readonly so pointer changes to text by\n default. `width: 100%` matters just as much — see ore-select's own `.trigger` for why:\n `:host` is `display: inline-block`, which never stretches its own children to fill its own\n box the way a flex/grid container with `stretch` alignment would. */\n .trigger {\n width: 100%;\n cursor: pointer;\n }\n\n .trigger::part(input) {\n cursor: pointer;\n caret-color: transparent;\n user-select: none;\n }\n\n /* ── Calendar popup ──────────────────────────────────────────────────────── */\n\n /* `fixed` (not `absolute`) — positioned via JS-computed top/left (see the positioner in\n date-picker.ts), same as ore-select's own `.dropdown`. Laid out relative to the viewport,\n so it never affects any ancestor's box size or scrollable-overflow area — `absolute`\n positioned relative to the host did, once the host sat near a scroll/clip ancestor's edge. */\n .calendar {\n position: fixed;\n inset: 0 auto auto 0;\n z-index: var(--z-dropdown, 8000);\n display: flex;\n flex-direction: column;\n gap: var(--size-2);\n min-width: 18rem;\n padding: var(--size-3);\n pointer-events: none;\n background: var(--_bg);\n border: var(--border) solid var(--_border-color);\n border-radius: var(--_radius);\n box-shadow: var(--date-picker-shadow, var(--shadow-lg));\n\n /* Hidden by default */\n opacity: 0;\n backdrop-filter: blur(var(--blur-sm));\n transform: translateY(var(--overlay-enter-translate-y));\n transition: var(\n --_motion-transition,\n opacity var(--transition-fast),\n transform var(--transition-fast),\n display var(--transition-fast) allow-discrete\n );\n }\n\n .calendar[data-open] {\n pointer-events: auto;\n opacity: 1;\n transform: translateY(0);\n\n @starting-style {\n opacity: 0;\n transform: translateY(var(--overlay-enter-translate-y));\n }\n }\n\n /* ── Calendar header ─────────────────────────────────────────────────────── */\n\n .cal-header {\n display: flex;\n gap: var(--size-1);\n align-items: center;\n justify-content: space-between;\n padding-block-end: var(--size-2);\n border-block-end: var(--border) solid var(--_border-color);\n }\n\n .nav-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: var(--size-8);\n height: var(--size-8);\n padding: 0;\n color: var(--color-contrast-600);\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n border-radius: var(--rounded-md);\n transition:\n background var(--transition-fast),\n color var(--transition-fast);\n }\n\n .nav-btn:hover {\n color: var(--color-contrast-900);\n background: var(--color-contrast-300);\n }\n\n .nav-btn:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-label-btn {\n flex: 1;\n padding: var(--size-1) var(--size-2);\n font-size: var(--text-sm);\n font-weight: var(--font-semibold);\n color: var(--color-contrast-900);\n text-align: center;\n cursor: pointer;\n outline: none;\n background: transparent;\n border: none;\n border-radius: var(--rounded-md);\n transition: background var(--transition-fast);\n }\n\n .cal-label-btn:hover {\n background: var(--color-contrast-300);\n }\n\n .cal-label-btn:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-label-month,\n .cal-label-year {\n display: inline-block;\n }\n\n .cal-label-sep {\n display: inline-block;\n padding-inline: var(--size-1);\n font-weight: var(--font-normal);\n color: var(--color-contrast-400);\n }\n\n /* ── Day grid ────────────────────────────────────────────────────────────── */\n\n /* Prevent display:flex from overriding the [hidden] attribute */\n .cal-grid[hidden] {\n display: none;\n }\n\n .cal-grid {\n display: flex;\n flex-direction: column;\n gap: var(--size-0-5);\n }\n\n .cal-grid-days {\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: var(--size-0-5);\n min-height: calc(7 * var(--size-10) + 6 * var(--size-0-5));\n }\n\n /* role=\"row\" wrappers exist for ARIA grid structure only — `display: contents`\n removes them from layout so their children still participate directly in the\n parent's CSS grid tracks. */\n .cal-grid [role='row'] {\n display: contents;\n }\n\n .cal-cell {\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: var(--text-sm);\n cursor: pointer;\n outline: none;\n border-radius: var(--rounded-md);\n transition:\n background var(--transition-fast),\n color var(--transition-fast);\n }\n\n .cal-cell-head {\n height: var(--size-8);\n font-size: var(--text-xs);\n font-weight: var(--font-medium);\n color: var(--color-contrast-500);\n cursor: default;\n }\n\n .cal-cell-day {\n height: var(--size-8);\n color: var(--color-contrast-800);\n }\n\n .cal-cell-day:hover:not([data-disabled]) {\n color: var(--color-contrast-900);\n background: color-mix(in oklch, var(--_day-selected-bg) 15%, transparent);\n }\n\n .cal-cell-day:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-cell-day[data-today] {\n font-weight: var(--font-semibold);\n color: var(--_day-today-color);\n }\n\n .cal-cell-day[data-selected] {\n font-weight: var(--font-semibold);\n color: var(--color-white, #fff);\n background: var(--_day-selected-bg);\n }\n\n .cal-cell-day[data-outside] {\n opacity: var(--_day-outside-opacity);\n }\n\n .cal-cell-day[data-disabled] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.3;\n }\n\n /* ── Month / Year grids ──────────────────────────────────────────────────── */\n\n .cal-grid-months,\n .cal-grid-years {\n /* 4-column grid — same width as cal-grid-days, natural height. */\n display: grid;\n grid-template-columns: repeat(4, minmax(0, 1fr));\n gap: var(--size-1);\n }\n\n .cal-cell-month,\n .cal-cell-year {\n height: var(--size-10);\n font-size: var(--text-sm);\n color: var(--color-contrast-800);\n cursor: pointer;\n border-radius: var(--rounded-md);\n }\n\n .cal-cell-month:hover:not([data-disabled]),\n .cal-cell-year:hover:not([data-disabled]) {\n background: color-mix(in oklch, var(--_day-selected-bg) 15%, transparent);\n }\n\n .cal-cell-month:focus-visible,\n .cal-cell-year:focus-visible {\n box-shadow: 0 0 0 2px var(--_day-selected-bg);\n }\n\n .cal-cell-month[data-selected],\n .cal-cell-year[data-selected] {\n font-weight: var(--font-semibold);\n color: var(--color-white, #fff);\n background: var(--_day-selected-bg);\n }\n\n .cal-cell-month[data-disabled],\n .cal-cell-year[data-disabled] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.3;\n }\n\n /* ── Reduced motion ──────────────────────────────────────────────────────── */\n\n @media (prefers-reduced-motion: reduce) {\n .field,\n .nav-btn,\n .cal-label-btn,\n .cal-cell {\n transition: none;\n }\n }\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=`@layer refine.base{:host{--_font-size:var(--input-font-size,var(--text-sm));--_gap:var(--input-gap,var(--size-2));--_field-height:var(--input-height,var(--size-10));--_padding:var(--input-padding,var(--size-1-5) var(--size-3));--_label-block-inset:var(--input-label-block-inset,var(--size-2));--_label-inset:var(--input-label-inset,var(--size-3));--_radius:var(--input-radius,var(--rounded-lg));--_placeholder:var(--input-placeholder-color,var(--color-contrast-500));--_bg:var(--input-bg,var(--color-contrast-100));--_border-color:var(--input-border-color,var(--color-contrast-300));min-width:var(--input-min-width,12rem);flex-direction:column;align-items:stretch;display:inline-flex}.input-wrapper{flex-direction:column;gap:0;width:100%;display:flex}.field{box-sizing:border-box;height:var(--_field-height);min-height:var(--_field-height);padding:var(--_padding);background:var(--_bg);border:var(--border) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--shadow-2xs);transition:var(--_motion-transition,background var(--transition-fast), backdrop-filter var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast));flex-direction:column;justify-content:center;align-items:stretch;gap:0;display:flex}.input-wrapper:has(.label:not([hidden])) .field{height:auto}:host(:not([label-placement=outside])) .input-wrapper{position:relative}:host(:not([label-placement=outside])) .label{z-index:1;pointer-events:none;top:var(--_label-block-inset);position:absolute}:host(:not([label-placement=outside])) .label:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:var(--_label-inset)}:host(:not([label-placement=outside])) .label:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:var(--_label-inset)}:host(:not([label-placement=outside])) .input-wrapper:has(.label:not([hidden])) .field{padding-top:calc(var(--_label-block-inset) + 1lh + 2px)}.input-row{gap:var(--_gap);flex:1;align-items:center;display:flex}.label,label.label{text-overflow:ellipsis;font-size:var(--text-xs);font-weight:var(--font-medium);line-height:var(--leading-tight);color:var(--color-contrast-
|
|
1
|
+
var e=`@layer refine.base{:host{--_font-size:var(--input-font-size,var(--text-sm));--_gap:var(--input-gap,var(--size-2));--_field-height:var(--input-height,var(--size-10));--_padding:var(--input-padding,var(--size-1-5) var(--size-3));--_label-block-inset:var(--input-label-block-inset,var(--size-2));--_label-inset:var(--input-label-inset,var(--size-3));--_radius:var(--input-radius,var(--rounded-lg));--_placeholder:var(--input-placeholder-color,var(--color-contrast-500));--_bg:var(--input-bg,var(--color-contrast-100));--_border-color:var(--input-border-color,var(--color-contrast-300));min-width:var(--input-min-width,12rem);flex-direction:column;align-items:stretch;display:inline-flex}.input-wrapper{flex-direction:column;gap:0;width:100%;display:flex}.field{box-sizing:border-box;height:var(--_field-height);min-height:var(--_field-height);padding:var(--_padding);background:var(--_bg);border:var(--border) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--shadow-2xs);transition:var(--_motion-transition,background var(--transition-fast), backdrop-filter var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast));flex-direction:column;justify-content:center;align-items:stretch;gap:0;display:flex}.input-wrapper:has(.label:not([hidden])) .field{height:auto}:host(:not([label-placement=outside])) .input-wrapper{position:relative}:host(:not([label-placement=outside])) .label{z-index:1;pointer-events:none;top:var(--_label-block-inset);position:absolute}:host(:not([label-placement=outside])) .label:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:var(--_label-inset)}:host(:not([label-placement=outside])) .label:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:var(--_label-inset)}:host(:not([label-placement=outside])) .input-wrapper:has(.label:not([hidden])) .field{padding-top:calc(var(--_label-block-inset) + 1lh + 2px)}.input-row{gap:var(--_gap);flex:1;align-items:center;display:flex}.label,label.label{text-overflow:ellipsis;font-size:var(--text-xs);font-weight:var(--font-medium);line-height:var(--leading-tight);color:var(--color-contrast-600);white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;transition:var(--_motion-transition,color var(--transition-fast));margin-bottom:2px;overflow:hidden}:host([label-placement=outside]) .label,:host([label-placement=outside]) label.label{font-size:var(--text-xs);line-height:var(--leading-loose);order:-1}.helper-text{margin-top:var(--size-1-5);font-size:var(--text-xs);line-height:var(--leading-tight);color:color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));overflow-wrap:anywhere;padding-left:2px;padding-right:2px}.helper-text[hidden]{display:none}::slotted(svg){width:var(--_icon-size,var(--leading-6));height:var(--_icon-size,var(--leading-6));flex-shrink:0}}@layer refine.overrides{input{min-width:0;min-height:var(--size-6);font:inherit;font-size:var(--_font-size);line-height:var(--leading-normal);color:var(--color-contrast-900);background:0 0;border:none;outline:none;flex:1}input::placeholder{color:var(--_placeholder);transition:color var(--transition-fast)}input:focus-visible{outline:none}:host(:not([disabled],[variant=bordered],[variant=flat])) .field:hover{border-color:var(--color-contrast-400)}:host(:not([disabled])) .field:focus-within .label,:host(:not([disabled])) .field:focus-within ::slotted([slot=prefix]),:host(:not([disabled])) .field:focus-within ::slotted([slot=suffix]){color:var(--_theme-focus)}.clear-btn{width:var(--size-5);min-width:var(--_touch-target);height:var(--size-5);min-height:var(--_touch-target);color:var(--color-contrast-500);cursor:pointer;border-radius:var(--rounded-sm);transition:var(--_motion-transition,color var(--transition-fast));background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:none}.clear-btn:hover{color:var(--color-contrast-900)}.clear-btn:focus-visible{outline:var(--border-2) solid var(--_theme-focus);outline-offset:var(--border)}:host([clearable]) .clear-btn{display:flex}:host([clearable]:not([has-value])) .clear-btn{visibility:hidden;pointer-events:none}.pwd-toggle-btn{width:var(--size-5);min-width:var(--_touch-target);height:var(--size-5);min-height:var(--_touch-target);color:var(--color-contrast-500);cursor:pointer;border-radius:var(--rounded-sm);transition:var(--_motion-transition,color var(--transition-fast));background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:none}.pwd-toggle-btn:hover{color:var(--color-contrast-900)}.pwd-toggle-btn:focus-visible{outline:var(--border-2) solid var(--_theme-focus);outline-offset:var(--border)}:host([type=password]) .pwd-toggle-btn{display:flex}.char-counter{font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-contrast-400);white-space:nowrap;padding-left:2px;padding-right:2px}.char-counter:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){text-align:right}.char-counter:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){text-align:left}.char-counter[data-near-limit]{color:var(--color-warning,#f59e0b)}.char-counter[data-at-limit]{color:var(--color-error)}:host([error]:not([error=""])) .field{border-color:var(--color-error)}:host([error]:not([error=""])) .label,.helper-text[role=alert]{color:var(--color-error)}:host([success]) .field{border-color:var(--color-success)}.status-icon{width:var(--size-5);height:var(--size-5);flex-shrink:0;justify-content:center;align-items:center;display:none}:host([error]:not([error=""])) .status-icon,:host([success]) .status-icon{display:flex}.status-icon[data-status=error]{color:var(--color-error)}.status-icon[data-status=success]{color:var(--color-success)}@keyframes spin{to{transform:rotate(360deg)}}.field-spinner{width:var(--size-4);height:var(--size-4);border:var(--border-2) solid var(--_theme-focus,currentcolor);animation:var(--_motion-animation,spin var(--transition-loader) infinite);border-radius:50%;flex-shrink:0;display:none}.field-spinner:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-right-color:#0000}.field-spinner:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-left-color:#0000}:host([loading]) .field-spinner{display:inline-block}}@layer refine.variants{:host([variant=text]){--_bg:var(--input-bg,transparent);--_border-color:var(--input-border-color,var(--color-contrast-300))}:host([variant=text]) .field{box-shadow:none;background:0 0;border:none;border-radius:0}:host([variant=text]) .field:focus-within{box-shadow:none}:host(:not([disabled],[variant=text],[variant=flat])) .field:focus-within{background:var(--color-canvas);border-color:var(--_theme-focus);box-shadow:var(--_theme-shadow,var(--color-primary-focus-shadow))}:host([error]:not([error=""])) .field:focus-within{border-color:var(--color-error);box-shadow:var(--color-error-focus-shadow)}:host([success]) .field:focus-within{border-color:var(--color-success);box-shadow:var(--color-success-focus-shadow)}}@layer refine.utilities{:host([fullwidth]){width:100%}}:host([disabled]){opacity:1}:host([disabled]) .field{background:var(--color-contrast-100);border-color:var(--color-contrast-200);box-shadow:none}:host([disabled]) input{color:var(--color-contrast-400)}:host([disabled]) input::placeholder{color:var(--color-contrast-300)}:host([disabled]) .label{color:var(--color-contrast-400)}`;exports.default=e;
|
|
2
2
|
//# sourceMappingURL=input.css.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.css.cjs","names":[],"sources":["../../../src/inputs/input/input.css?inline"],"sourcesContent":["@layer refine.base {\n /* ========================================\n Base Styles & Defaults\n ======================================== */\n\n :host {\n --_font-size: var(--input-font-size, var(--text-sm));\n --_gap: var(--input-gap, var(--size-2));\n --_field-height: var(--input-height, var(--size-10));\n --_padding: var(--input-padding, var(--size-1-5) var(--size-3));\n --_label-block-inset: var(--input-label-block-inset, var(--size-2));\n --_label-inset: var(--input-label-inset, var(--size-3));\n --_radius: var(--input-radius, var(--rounded-lg));\n --_placeholder: var(--input-placeholder-color, var(--color-contrast-500));\n --_bg: var(--input-bg, var(--color-contrast-100));\n --_border-color: var(--input-border-color, var(--color-contrast-300));\n\n display: inline-flex;\n flex-direction: column;\n align-items: stretch;\n min-width: var(--input-min-width, 12rem);\n }\n\n .input-wrapper {\n display: flex;\n flex-direction: column;\n gap: 0;\n width: 100%;\n }\n\n .field {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 0;\n align-items: stretch;\n justify-content: center;\n height: var(--_field-height);\n min-height: var(--_field-height);\n padding: var(--_padding);\n background: var(--_bg);\n border: var(--border) solid var(--_border-color);\n border-radius: var(--_radius);\n box-shadow: var(--shadow-2xs);\n transition: var(\n --_motion-transition,\n background var(--transition-fast),\n backdrop-filter var(--transition-fast),\n border-color var(--transition-fast),\n box-shadow var(--transition-fast)\n );\n }\n\n /* Expand height to fit inset label + input row */\n .input-wrapper:has(.label:not([hidden])) .field {\n height: auto;\n }\n\n /* Outside placement: label is above the field (natural flow) */\n\n /* Inset placement (default): label appears inside the field border */\n :host(:not([label-placement='outside'])) .input-wrapper {\n position: relative;\n }\n\n :host(:not([label-placement='outside'])) .label {\n position: absolute;\n inset-block-start: var(--_label-block-inset);\n inset-inline-start: var(--_label-inset);\n z-index: 1;\n pointer-events: none;\n }\n\n :host(:not([label-placement='outside'])) .input-wrapper:has(.label:not([hidden])) .field {\n padding-block-start: calc(var(--_label-block-inset) + 1lh + 2px);\n }\n\n .input-row {\n display: flex;\n flex: 1;\n gap: var(--_gap);\n align-items: center;\n }\n\n /* ========================================\n Label Styles\n ======================================== */\n\n .label,\n label.label {\n margin-bottom: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--text-xs);\n font-weight: var(--font-medium);\n line-height: var(--leading-tight);\n color: var(--color-contrast-500);\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n /* Outside placement: label moves outside the field via CSS */\n :host([label-placement='outside']) .label,\n :host([label-placement='outside']) label.label {\n order: -1;\n font-size: var(--text-xs);\n line-height: var(--leading-loose);\n }\n\n /* ========================================\n Helper Text\n ======================================== */\n\n .helper-text {\n padding-inline: 2px;\n margin-top: var(--size-1-5);\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));\n overflow-wrap: anywhere;\n }\n\n .helper-text[hidden] {\n display: none;\n }\n\n /* ========================================\n Slotted Prefix/Suffix Icons\n ======================================== */\n\n ::slotted(svg) {\n flex-shrink: 0;\n width: var(--_icon-size, var(--leading-6));\n height: var(--_icon-size, var(--leading-6));\n }\n}\n\n@layer refine.overrides {\n /* ========================================\n Input Element\n ======================================== */\n\n input {\n flex: 1;\n min-width: 0;\n min-height: var(--size-6);\n font: inherit;\n font-size: var(--_font-size);\n line-height: var(--leading-normal);\n\n /* No all: unset needed - reset layer handles it */\n color: var(--color-contrast-900);\n outline: none;\n background: transparent;\n border: none;\n }\n\n input::placeholder {\n color: var(--_placeholder);\n transition: color var(--transition-fast);\n }\n\n input:focus-visible {\n outline: none;\n }\n\n /* ========================================\n Hover & Focus States\n ======================================== */\n\n :host(:not([disabled], [variant='bordered'], [variant='flat'])) .field:hover {\n border-color: var(--color-contrast-400);\n }\n\n :host(:not([disabled])) .field:focus-within .label {\n color: var(--_theme-focus);\n }\n\n :host(:not([disabled])) .field:focus-within ::slotted([slot='prefix']),\n :host(:not([disabled])) .field:focus-within ::slotted([slot='suffix']) {\n color: var(--_theme-focus);\n }\n\n /* ========================================\n Clear button\n ======================================== */\n\n .clear-btn {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n min-width: var(--_touch-target);\n height: var(--size-5);\n min-height: var(--_touch-target);\n padding: 0;\n color: var(--color-contrast-500);\n cursor: pointer;\n background: transparent;\n border: none;\n border-radius: var(--rounded-sm);\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n .clear-btn:hover {\n color: var(--color-contrast-900);\n }\n\n .clear-btn:focus-visible {\n outline: var(--border-2) solid var(--_theme-focus);\n outline-offset: var(--border);\n }\n\n :host([clearable]) .clear-btn {\n display: flex;\n }\n\n :host([clearable]:not([has-value])) .clear-btn {\n visibility: hidden;\n pointer-events: none;\n }\n\n /* ========================================\n Password visibility toggle\n ======================================== */\n\n .pwd-toggle-btn {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n min-width: var(--_touch-target);\n height: var(--size-5);\n min-height: var(--_touch-target);\n padding: 0;\n color: var(--color-contrast-500);\n cursor: pointer;\n background: transparent;\n border: none;\n border-radius: var(--rounded-sm);\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n .pwd-toggle-btn:hover {\n color: var(--color-contrast-900);\n }\n\n .pwd-toggle-btn:focus-visible {\n outline: var(--border-2) solid var(--_theme-focus);\n outline-offset: var(--border);\n }\n\n :host([type='password']) .pwd-toggle-btn {\n display: flex;\n }\n\n /* ========================================\n Character counter\n ======================================== */\n\n .char-counter {\n padding-inline: 2px;\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: var(--color-contrast-400);\n text-align: end;\n white-space: nowrap;\n }\n\n .char-counter[data-near-limit] {\n color: var(--color-warning, #f59e0b);\n }\n\n .char-counter[data-at-limit] {\n color: var(--color-error);\n }\n\n /* ========================================\n Error State\n ======================================== */\n\n :host([error]:not([error=''])) .field {\n border-color: var(--color-error);\n }\n\n :host([error]:not([error=''])) .label {\n color: var(--color-error);\n }\n\n .helper-text[role='alert'] {\n color: var(--color-error);\n }\n\n /* ========================================\n Success State (Signal 04)\n ======================================== */\n\n :host([success]) .field {\n border-color: var(--color-success);\n }\n\n /* ========================================\n Status Icon (Signals 03/04: error/success — never color alone)\n ======================================== */\n\n .status-icon {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n height: var(--size-5);\n }\n\n :host([error]:not([error=''])) .status-icon,\n :host([success]) .status-icon {\n display: flex;\n }\n\n .status-icon[data-status='error'] {\n color: var(--color-error);\n }\n\n .status-icon[data-status='success'] {\n color: var(--color-success);\n }\n\n /* ========================================\n Loading Spinner (Signal 06)\n ======================================== */\n\n /* Keyframe must live in shadow DOM — @keyframes don't inherit across shadow roots */\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n .field-spinner {\n display: none;\n flex-shrink: 0;\n width: var(--size-4);\n height: var(--size-4);\n border: var(--border-2) solid var(--_theme-focus, currentcolor);\n border-inline-end-color: transparent;\n border-radius: 50%;\n animation: var(--_motion-animation, spin var(--transition-loader) infinite);\n }\n\n :host([loading]) .field-spinner {\n display: inline-block;\n }\n}\n\n/*\n * The solid/flat/bordered/outline/ghost variant switch (previously here) now lives in\n * `fieldVariantMixin({ container: '.field', tokenPrefix: 'input' })` in `input.ts`'s `styles`\n * array — shared with `ore-textarea`/`ore-message-composer` instead of hand-duplicated across\n * all three (see the mixin's own doc comment for what it covers and why). `ore-input`'s extra\n * `text` variant (below) is not part of that shared set, so it keeps its own block here.\n */\n@layer refine.variants {\n /* Text — underline style */\n :host([variant='text']) {\n --_bg: var(--input-bg, transparent);\n --_border-color: var(--input-border-color, var(--color-contrast-300));\n }\n\n :host([variant='text']) .field {\n background: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n\n :host([variant='text']) .field:focus-within {\n box-shadow: none;\n }\n\n /*\n * Focus/error/success `box-shadow` on `.field` — kept here in `refine.variants` (alongside\n * `fieldVariantMixin`'s rest-state `box-shadow` for solid/outline/ghost) rather than\n * `refine.overrides`, so normal specificity decides the winner. Cascade layers beat\n * specificity outright, so a `refine.overrides` box-shadow always lost to every variant's\n * unconditional rest-state `box-shadow`, focused/error/success or not — the same bug class\n * fixed for `ore-otp-input`'s focus ring.\n */\n :host(:not([disabled], [variant='text'], [variant='flat'])) .field:focus-within {\n background: var(--color-canvas);\n border-color: var(--_theme-focus);\n box-shadow: var(--_theme-shadow, var(--color-primary-focus-shadow));\n }\n\n :host([error]:not([error=''])) .field:focus-within {\n border-color: var(--color-error);\n box-shadow: var(--color-error-focus-shadow);\n }\n\n :host([success]) .field:focus-within {\n border-color: var(--color-success);\n box-shadow: var(--color-success-focus-shadow);\n }\n}\n\n@layer refine.utilities {\n /* Full width */\n :host([fullwidth]) {\n width: 100%;\n }\n}\n\n/* ========================================\n Disabled State (Signal 05) — intentionally unlayered\n ======================================== */\n\n/*\n * The shared `disabledLoadingMixin` (pulled in via `fieldMixins`) dims `:host([disabled])`\n * with `opacity: 0.5` as bare, unlayered CSS. Cascade layers always lose to unlayered rules\n * regardless of source order or specificity, so overriding that from inside any `@layer`\n * block in this file (including `refine.overrides`) would be a no-op — this has to stay\n * unlayered too, to actually win.\n *\n * Per the field-state UX review: opacity-based dimming reads as a washed-out/loading look\n * and can mimic reduced-contrast content for low-vision users, rather than a clearly locked\n * field. Swapped for an explicit grayscale surface + `not-allowed` cursor (the cursor already\n * comes from the shared mixin, left untouched here).\n */\n:host([disabled]) {\n opacity: 1;\n}\n\n:host([disabled]) .field {\n background: var(--color-contrast-100);\n border-color: var(--color-contrast-200);\n box-shadow: none;\n}\n\n:host([disabled]) input {\n color: var(--color-contrast-400);\n}\n\n:host([disabled]) input::placeholder {\n color: var(--color-contrast-300);\n}\n\n:host([disabled]) .label {\n color: var(--color-contrast-400);\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"input.css.cjs","names":[],"sources":["../../../src/inputs/input/input.css?inline"],"sourcesContent":["@layer refine.base {\n /* ========================================\n Base Styles & Defaults\n ======================================== */\n\n :host {\n --_font-size: var(--input-font-size, var(--text-sm));\n --_gap: var(--input-gap, var(--size-2));\n --_field-height: var(--input-height, var(--size-10));\n --_padding: var(--input-padding, var(--size-1-5) var(--size-3));\n --_label-block-inset: var(--input-label-block-inset, var(--size-2));\n --_label-inset: var(--input-label-inset, var(--size-3));\n --_radius: var(--input-radius, var(--rounded-lg));\n --_placeholder: var(--input-placeholder-color, var(--color-contrast-500));\n --_bg: var(--input-bg, var(--color-contrast-100));\n --_border-color: var(--input-border-color, var(--color-contrast-300));\n\n display: inline-flex;\n flex-direction: column;\n align-items: stretch;\n min-width: var(--input-min-width, 12rem);\n }\n\n .input-wrapper {\n display: flex;\n flex-direction: column;\n gap: 0;\n width: 100%;\n }\n\n .field {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 0;\n align-items: stretch;\n justify-content: center;\n height: var(--_field-height);\n min-height: var(--_field-height);\n padding: var(--_padding);\n background: var(--_bg);\n border: var(--border) solid var(--_border-color);\n border-radius: var(--_radius);\n box-shadow: var(--shadow-2xs);\n transition: var(\n --_motion-transition,\n background var(--transition-fast),\n backdrop-filter var(--transition-fast),\n border-color var(--transition-fast),\n box-shadow var(--transition-fast)\n );\n }\n\n /* Expand height to fit inset label + input row */\n .input-wrapper:has(.label:not([hidden])) .field {\n height: auto;\n }\n\n /* Outside placement: label is above the field (natural flow) */\n\n /* Inset placement (default): label appears inside the field border */\n :host(:not([label-placement='outside'])) .input-wrapper {\n position: relative;\n }\n\n :host(:not([label-placement='outside'])) .label {\n position: absolute;\n inset-block-start: var(--_label-block-inset);\n inset-inline-start: var(--_label-inset);\n z-index: 1;\n pointer-events: none;\n }\n\n :host(:not([label-placement='outside'])) .input-wrapper:has(.label:not([hidden])) .field {\n padding-block-start: calc(var(--_label-block-inset) + 1lh + 2px);\n }\n\n .input-row {\n display: flex;\n flex: 1;\n gap: var(--_gap);\n align-items: center;\n }\n\n /* ========================================\n Label Styles\n ======================================== */\n\n .label,\n label.label {\n margin-bottom: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--text-xs);\n font-weight: var(--font-medium);\n line-height: var(--leading-tight);\n color: var(--color-contrast-600);\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n /* Outside placement: label moves outside the field via CSS */\n :host([label-placement='outside']) .label,\n :host([label-placement='outside']) label.label {\n order: -1;\n font-size: var(--text-xs);\n line-height: var(--leading-loose);\n }\n\n /* ========================================\n Helper Text\n ======================================== */\n\n .helper-text {\n padding-inline: 2px;\n margin-top: var(--size-1-5);\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));\n overflow-wrap: anywhere;\n }\n\n .helper-text[hidden] {\n display: none;\n }\n\n /* ========================================\n Slotted Prefix/Suffix Icons\n ======================================== */\n\n ::slotted(svg) {\n flex-shrink: 0;\n width: var(--_icon-size, var(--leading-6));\n height: var(--_icon-size, var(--leading-6));\n }\n}\n\n@layer refine.overrides {\n /* ========================================\n Input Element\n ======================================== */\n\n input {\n flex: 1;\n min-width: 0;\n min-height: var(--size-6);\n font: inherit;\n font-size: var(--_font-size);\n line-height: var(--leading-normal);\n\n /* No all: unset needed - reset layer handles it */\n color: var(--color-contrast-900);\n outline: none;\n background: transparent;\n border: none;\n }\n\n input::placeholder {\n color: var(--_placeholder);\n transition: color var(--transition-fast);\n }\n\n input:focus-visible {\n outline: none;\n }\n\n /* ========================================\n Hover & Focus States\n ======================================== */\n\n :host(:not([disabled], [variant='bordered'], [variant='flat'])) .field:hover {\n border-color: var(--color-contrast-400);\n }\n\n :host(:not([disabled])) .field:focus-within .label {\n color: var(--_theme-focus);\n }\n\n :host(:not([disabled])) .field:focus-within ::slotted([slot='prefix']),\n :host(:not([disabled])) .field:focus-within ::slotted([slot='suffix']) {\n color: var(--_theme-focus);\n }\n\n /* ========================================\n Clear button\n ======================================== */\n\n .clear-btn {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n min-width: var(--_touch-target);\n height: var(--size-5);\n min-height: var(--_touch-target);\n padding: 0;\n color: var(--color-contrast-500);\n cursor: pointer;\n background: transparent;\n border: none;\n border-radius: var(--rounded-sm);\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n .clear-btn:hover {\n color: var(--color-contrast-900);\n }\n\n .clear-btn:focus-visible {\n outline: var(--border-2) solid var(--_theme-focus);\n outline-offset: var(--border);\n }\n\n :host([clearable]) .clear-btn {\n display: flex;\n }\n\n :host([clearable]:not([has-value])) .clear-btn {\n visibility: hidden;\n pointer-events: none;\n }\n\n /* ========================================\n Password visibility toggle\n ======================================== */\n\n .pwd-toggle-btn {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n min-width: var(--_touch-target);\n height: var(--size-5);\n min-height: var(--_touch-target);\n padding: 0;\n color: var(--color-contrast-500);\n cursor: pointer;\n background: transparent;\n border: none;\n border-radius: var(--rounded-sm);\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n .pwd-toggle-btn:hover {\n color: var(--color-contrast-900);\n }\n\n .pwd-toggle-btn:focus-visible {\n outline: var(--border-2) solid var(--_theme-focus);\n outline-offset: var(--border);\n }\n\n :host([type='password']) .pwd-toggle-btn {\n display: flex;\n }\n\n /* ========================================\n Character counter\n ======================================== */\n\n .char-counter {\n padding-inline: 2px;\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: var(--color-contrast-400);\n text-align: end;\n white-space: nowrap;\n }\n\n .char-counter[data-near-limit] {\n color: var(--color-warning, #f59e0b);\n }\n\n .char-counter[data-at-limit] {\n color: var(--color-error);\n }\n\n /* ========================================\n Error State\n ======================================== */\n\n :host([error]:not([error=''])) .field {\n border-color: var(--color-error);\n }\n\n :host([error]:not([error=''])) .label {\n color: var(--color-error);\n }\n\n .helper-text[role='alert'] {\n color: var(--color-error);\n }\n\n /* ========================================\n Success State (Signal 04)\n ======================================== */\n\n :host([success]) .field {\n border-color: var(--color-success);\n }\n\n /* ========================================\n Status Icon (Signals 03/04: error/success — never color alone)\n ======================================== */\n\n .status-icon {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n height: var(--size-5);\n }\n\n :host([error]:not([error=''])) .status-icon,\n :host([success]) .status-icon {\n display: flex;\n }\n\n .status-icon[data-status='error'] {\n color: var(--color-error);\n }\n\n .status-icon[data-status='success'] {\n color: var(--color-success);\n }\n\n /* ========================================\n Loading Spinner (Signal 06)\n ======================================== */\n\n /* Keyframe must live in shadow DOM — @keyframes don't inherit across shadow roots */\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n .field-spinner {\n display: none;\n flex-shrink: 0;\n width: var(--size-4);\n height: var(--size-4);\n border: var(--border-2) solid var(--_theme-focus, currentcolor);\n border-inline-end-color: transparent;\n border-radius: 50%;\n animation: var(--_motion-animation, spin var(--transition-loader) infinite);\n }\n\n :host([loading]) .field-spinner {\n display: inline-block;\n }\n}\n\n/*\n * The solid/flat/bordered/outline/ghost variant switch (previously here) now lives in\n * `fieldVariantMixin({ container: '.field', tokenPrefix: 'input' })` in `input.ts`'s `styles`\n * array — shared with `ore-textarea`/`ore-message-composer` instead of hand-duplicated across\n * all three (see the mixin's own doc comment for what it covers and why). `ore-input`'s extra\n * `text` variant (below) is not part of that shared set, so it keeps its own block here.\n */\n@layer refine.variants {\n /* Text — underline style */\n :host([variant='text']) {\n --_bg: var(--input-bg, transparent);\n --_border-color: var(--input-border-color, var(--color-contrast-300));\n }\n\n :host([variant='text']) .field {\n background: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n\n :host([variant='text']) .field:focus-within {\n box-shadow: none;\n }\n\n /*\n * Focus/error/success `box-shadow` on `.field` — kept here in `refine.variants` (alongside\n * `fieldVariantMixin`'s rest-state `box-shadow` for solid/outline/ghost) rather than\n * `refine.overrides`, so normal specificity decides the winner. Cascade layers beat\n * specificity outright, so a `refine.overrides` box-shadow always lost to every variant's\n * unconditional rest-state `box-shadow`, focused/error/success or not — the same bug class\n * fixed for `ore-otp-input`'s focus ring.\n */\n :host(:not([disabled], [variant='text'], [variant='flat'])) .field:focus-within {\n background: var(--color-canvas);\n border-color: var(--_theme-focus);\n box-shadow: var(--_theme-shadow, var(--color-primary-focus-shadow));\n }\n\n :host([error]:not([error=''])) .field:focus-within {\n border-color: var(--color-error);\n box-shadow: var(--color-error-focus-shadow);\n }\n\n :host([success]) .field:focus-within {\n border-color: var(--color-success);\n box-shadow: var(--color-success-focus-shadow);\n }\n}\n\n@layer refine.utilities {\n /* Full width */\n :host([fullwidth]) {\n width: 100%;\n }\n}\n\n/* ========================================\n Disabled State (Signal 05) — intentionally unlayered\n ======================================== */\n\n/*\n * The shared `disabledLoadingMixin` (pulled in via `fieldMixins`) dims `:host([disabled])`\n * with `opacity: 0.5` as bare, unlayered CSS. Cascade layers always lose to unlayered rules\n * regardless of source order or specificity, so overriding that from inside any `@layer`\n * block in this file (including `refine.overrides`) would be a no-op — this has to stay\n * unlayered too, to actually win.\n *\n * Per the field-state UX review: opacity-based dimming reads as a washed-out/loading look\n * and can mimic reduced-contrast content for low-vision users, rather than a clearly locked\n * field. Swapped for an explicit grayscale surface + `not-allowed` cursor (the cursor already\n * comes from the shared mixin, left untouched here).\n */\n:host([disabled]) {\n opacity: 1;\n}\n\n:host([disabled]) .field {\n background: var(--color-contrast-100);\n border-color: var(--color-contrast-200);\n box-shadow: none;\n}\n\n:host([disabled]) input {\n color: var(--color-contrast-400);\n}\n\n:host([disabled]) input::placeholder {\n color: var(--color-contrast-300);\n}\n\n:host([disabled]) .label {\n color: var(--color-contrast-400);\n}\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/inputs/input/input.css?inline
|
|
2
|
-
var e = "@layer refine.base{:host{--_font-size:var(--input-font-size,var(--text-sm));--_gap:var(--input-gap,var(--size-2));--_field-height:var(--input-height,var(--size-10));--_padding:var(--input-padding,var(--size-1-5) var(--size-3));--_label-block-inset:var(--input-label-block-inset,var(--size-2));--_label-inset:var(--input-label-inset,var(--size-3));--_radius:var(--input-radius,var(--rounded-lg));--_placeholder:var(--input-placeholder-color,var(--color-contrast-500));--_bg:var(--input-bg,var(--color-contrast-100));--_border-color:var(--input-border-color,var(--color-contrast-300));min-width:var(--input-min-width,12rem);flex-direction:column;align-items:stretch;display:inline-flex}.input-wrapper{flex-direction:column;gap:0;width:100%;display:flex}.field{box-sizing:border-box;height:var(--_field-height);min-height:var(--_field-height);padding:var(--_padding);background:var(--_bg);border:var(--border) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--shadow-2xs);transition:var(--_motion-transition,background var(--transition-fast), backdrop-filter var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast));flex-direction:column;justify-content:center;align-items:stretch;gap:0;display:flex}.input-wrapper:has(.label:not([hidden])) .field{height:auto}:host(:not([label-placement=outside])) .input-wrapper{position:relative}:host(:not([label-placement=outside])) .label{z-index:1;pointer-events:none;top:var(--_label-block-inset);position:absolute}:host(:not([label-placement=outside])) .label:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:var(--_label-inset)}:host(:not([label-placement=outside])) .label:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:var(--_label-inset)}:host(:not([label-placement=outside])) .input-wrapper:has(.label:not([hidden])) .field{padding-top:calc(var(--_label-block-inset) + 1lh + 2px)}.input-row{gap:var(--_gap);flex:1;align-items:center;display:flex}.label,label.label{text-overflow:ellipsis;font-size:var(--text-xs);font-weight:var(--font-medium);line-height:var(--leading-tight);color:var(--color-contrast-
|
|
2
|
+
var e = "@layer refine.base{:host{--_font-size:var(--input-font-size,var(--text-sm));--_gap:var(--input-gap,var(--size-2));--_field-height:var(--input-height,var(--size-10));--_padding:var(--input-padding,var(--size-1-5) var(--size-3));--_label-block-inset:var(--input-label-block-inset,var(--size-2));--_label-inset:var(--input-label-inset,var(--size-3));--_radius:var(--input-radius,var(--rounded-lg));--_placeholder:var(--input-placeholder-color,var(--color-contrast-500));--_bg:var(--input-bg,var(--color-contrast-100));--_border-color:var(--input-border-color,var(--color-contrast-300));min-width:var(--input-min-width,12rem);flex-direction:column;align-items:stretch;display:inline-flex}.input-wrapper{flex-direction:column;gap:0;width:100%;display:flex}.field{box-sizing:border-box;height:var(--_field-height);min-height:var(--_field-height);padding:var(--_padding);background:var(--_bg);border:var(--border) solid var(--_border-color);border-radius:var(--_radius);box-shadow:var(--shadow-2xs);transition:var(--_motion-transition,background var(--transition-fast), backdrop-filter var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast));flex-direction:column;justify-content:center;align-items:stretch;gap:0;display:flex}.input-wrapper:has(.label:not([hidden])) .field{height:auto}:host(:not([label-placement=outside])) .input-wrapper{position:relative}:host(:not([label-placement=outside])) .label{z-index:1;pointer-events:none;top:var(--_label-block-inset);position:absolute}:host(:not([label-placement=outside])) .label:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:var(--_label-inset)}:host(:not([label-placement=outside])) .label:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:var(--_label-inset)}:host(:not([label-placement=outside])) .input-wrapper:has(.label:not([hidden])) .field{padding-top:calc(var(--_label-block-inset) + 1lh + 2px)}.input-row{gap:var(--_gap);flex:1;align-items:center;display:flex}.label,label.label{text-overflow:ellipsis;font-size:var(--text-xs);font-weight:var(--font-medium);line-height:var(--leading-tight);color:var(--color-contrast-600);white-space:nowrap;cursor:pointer;-webkit-user-select:none;user-select:none;transition:var(--_motion-transition,color var(--transition-fast));margin-bottom:2px;overflow:hidden}:host([label-placement=outside]) .label,:host([label-placement=outside]) label.label{font-size:var(--text-xs);line-height:var(--leading-loose);order:-1}.helper-text{margin-top:var(--size-1-5);font-size:var(--text-xs);line-height:var(--leading-tight);color:color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));overflow-wrap:anywhere;padding-left:2px;padding-right:2px}.helper-text[hidden]{display:none}::slotted(svg){width:var(--_icon-size,var(--leading-6));height:var(--_icon-size,var(--leading-6));flex-shrink:0}}@layer refine.overrides{input{min-width:0;min-height:var(--size-6);font:inherit;font-size:var(--_font-size);line-height:var(--leading-normal);color:var(--color-contrast-900);background:0 0;border:none;outline:none;flex:1}input::placeholder{color:var(--_placeholder);transition:color var(--transition-fast)}input:focus-visible{outline:none}:host(:not([disabled],[variant=bordered],[variant=flat])) .field:hover{border-color:var(--color-contrast-400)}:host(:not([disabled])) .field:focus-within .label,:host(:not([disabled])) .field:focus-within ::slotted([slot=prefix]),:host(:not([disabled])) .field:focus-within ::slotted([slot=suffix]){color:var(--_theme-focus)}.clear-btn{width:var(--size-5);min-width:var(--_touch-target);height:var(--size-5);min-height:var(--_touch-target);color:var(--color-contrast-500);cursor:pointer;border-radius:var(--rounded-sm);transition:var(--_motion-transition,color var(--transition-fast));background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:none}.clear-btn:hover{color:var(--color-contrast-900)}.clear-btn:focus-visible{outline:var(--border-2) solid var(--_theme-focus);outline-offset:var(--border)}:host([clearable]) .clear-btn{display:flex}:host([clearable]:not([has-value])) .clear-btn{visibility:hidden;pointer-events:none}.pwd-toggle-btn{width:var(--size-5);min-width:var(--_touch-target);height:var(--size-5);min-height:var(--_touch-target);color:var(--color-contrast-500);cursor:pointer;border-radius:var(--rounded-sm);transition:var(--_motion-transition,color var(--transition-fast));background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:none}.pwd-toggle-btn:hover{color:var(--color-contrast-900)}.pwd-toggle-btn:focus-visible{outline:var(--border-2) solid var(--_theme-focus);outline-offset:var(--border)}:host([type=password]) .pwd-toggle-btn{display:flex}.char-counter{font-size:var(--text-xs);line-height:var(--leading-tight);color:var(--color-contrast-400);white-space:nowrap;padding-left:2px;padding-right:2px}.char-counter:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){text-align:right}.char-counter:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){text-align:left}.char-counter[data-near-limit]{color:var(--color-warning,#f59e0b)}.char-counter[data-at-limit]{color:var(--color-error)}:host([error]:not([error=\"\"])) .field{border-color:var(--color-error)}:host([error]:not([error=\"\"])) .label,.helper-text[role=alert]{color:var(--color-error)}:host([success]) .field{border-color:var(--color-success)}.status-icon{width:var(--size-5);height:var(--size-5);flex-shrink:0;justify-content:center;align-items:center;display:none}:host([error]:not([error=\"\"])) .status-icon,:host([success]) .status-icon{display:flex}.status-icon[data-status=error]{color:var(--color-error)}.status-icon[data-status=success]{color:var(--color-success)}@keyframes spin{to{transform:rotate(360deg)}}.field-spinner{width:var(--size-4);height:var(--size-4);border:var(--border-2) solid var(--_theme-focus,currentcolor);animation:var(--_motion-animation,spin var(--transition-loader) infinite);border-radius:50%;flex-shrink:0;display:none}.field-spinner:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){border-right-color:#0000}.field-spinner:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){border-left-color:#0000}:host([loading]) .field-spinner{display:inline-block}}@layer refine.variants{:host([variant=text]){--_bg:var(--input-bg,transparent);--_border-color:var(--input-border-color,var(--color-contrast-300))}:host([variant=text]) .field{box-shadow:none;background:0 0;border:none;border-radius:0}:host([variant=text]) .field:focus-within{box-shadow:none}:host(:not([disabled],[variant=text],[variant=flat])) .field:focus-within{background:var(--color-canvas);border-color:var(--_theme-focus);box-shadow:var(--_theme-shadow,var(--color-primary-focus-shadow))}:host([error]:not([error=\"\"])) .field:focus-within{border-color:var(--color-error);box-shadow:var(--color-error-focus-shadow)}:host([success]) .field:focus-within{border-color:var(--color-success);box-shadow:var(--color-success-focus-shadow)}}@layer refine.utilities{:host([fullwidth]){width:100%}}:host([disabled]){opacity:1}:host([disabled]) .field{background:var(--color-contrast-100);border-color:var(--color-contrast-200);box-shadow:none}:host([disabled]) input{color:var(--color-contrast-400)}:host([disabled]) input::placeholder{color:var(--color-contrast-300)}:host([disabled]) .label{color:var(--color-contrast-400)}";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as default };
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.css.js","names":[],"sources":["../../../src/inputs/input/input.css?inline"],"sourcesContent":["@layer refine.base {\n /* ========================================\n Base Styles & Defaults\n ======================================== */\n\n :host {\n --_font-size: var(--input-font-size, var(--text-sm));\n --_gap: var(--input-gap, var(--size-2));\n --_field-height: var(--input-height, var(--size-10));\n --_padding: var(--input-padding, var(--size-1-5) var(--size-3));\n --_label-block-inset: var(--input-label-block-inset, var(--size-2));\n --_label-inset: var(--input-label-inset, var(--size-3));\n --_radius: var(--input-radius, var(--rounded-lg));\n --_placeholder: var(--input-placeholder-color, var(--color-contrast-500));\n --_bg: var(--input-bg, var(--color-contrast-100));\n --_border-color: var(--input-border-color, var(--color-contrast-300));\n\n display: inline-flex;\n flex-direction: column;\n align-items: stretch;\n min-width: var(--input-min-width, 12rem);\n }\n\n .input-wrapper {\n display: flex;\n flex-direction: column;\n gap: 0;\n width: 100%;\n }\n\n .field {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 0;\n align-items: stretch;\n justify-content: center;\n height: var(--_field-height);\n min-height: var(--_field-height);\n padding: var(--_padding);\n background: var(--_bg);\n border: var(--border) solid var(--_border-color);\n border-radius: var(--_radius);\n box-shadow: var(--shadow-2xs);\n transition: var(\n --_motion-transition,\n background var(--transition-fast),\n backdrop-filter var(--transition-fast),\n border-color var(--transition-fast),\n box-shadow var(--transition-fast)\n );\n }\n\n /* Expand height to fit inset label + input row */\n .input-wrapper:has(.label:not([hidden])) .field {\n height: auto;\n }\n\n /* Outside placement: label is above the field (natural flow) */\n\n /* Inset placement (default): label appears inside the field border */\n :host(:not([label-placement='outside'])) .input-wrapper {\n position: relative;\n }\n\n :host(:not([label-placement='outside'])) .label {\n position: absolute;\n inset-block-start: var(--_label-block-inset);\n inset-inline-start: var(--_label-inset);\n z-index: 1;\n pointer-events: none;\n }\n\n :host(:not([label-placement='outside'])) .input-wrapper:has(.label:not([hidden])) .field {\n padding-block-start: calc(var(--_label-block-inset) + 1lh + 2px);\n }\n\n .input-row {\n display: flex;\n flex: 1;\n gap: var(--_gap);\n align-items: center;\n }\n\n /* ========================================\n Label Styles\n ======================================== */\n\n .label,\n label.label {\n margin-bottom: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--text-xs);\n font-weight: var(--font-medium);\n line-height: var(--leading-tight);\n color: var(--color-contrast-500);\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n /* Outside placement: label moves outside the field via CSS */\n :host([label-placement='outside']) .label,\n :host([label-placement='outside']) label.label {\n order: -1;\n font-size: var(--text-xs);\n line-height: var(--leading-loose);\n }\n\n /* ========================================\n Helper Text\n ======================================== */\n\n .helper-text {\n padding-inline: 2px;\n margin-top: var(--size-1-5);\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));\n overflow-wrap: anywhere;\n }\n\n .helper-text[hidden] {\n display: none;\n }\n\n /* ========================================\n Slotted Prefix/Suffix Icons\n ======================================== */\n\n ::slotted(svg) {\n flex-shrink: 0;\n width: var(--_icon-size, var(--leading-6));\n height: var(--_icon-size, var(--leading-6));\n }\n}\n\n@layer refine.overrides {\n /* ========================================\n Input Element\n ======================================== */\n\n input {\n flex: 1;\n min-width: 0;\n min-height: var(--size-6);\n font: inherit;\n font-size: var(--_font-size);\n line-height: var(--leading-normal);\n\n /* No all: unset needed - reset layer handles it */\n color: var(--color-contrast-900);\n outline: none;\n background: transparent;\n border: none;\n }\n\n input::placeholder {\n color: var(--_placeholder);\n transition: color var(--transition-fast);\n }\n\n input:focus-visible {\n outline: none;\n }\n\n /* ========================================\n Hover & Focus States\n ======================================== */\n\n :host(:not([disabled], [variant='bordered'], [variant='flat'])) .field:hover {\n border-color: var(--color-contrast-400);\n }\n\n :host(:not([disabled])) .field:focus-within .label {\n color: var(--_theme-focus);\n }\n\n :host(:not([disabled])) .field:focus-within ::slotted([slot='prefix']),\n :host(:not([disabled])) .field:focus-within ::slotted([slot='suffix']) {\n color: var(--_theme-focus);\n }\n\n /* ========================================\n Clear button\n ======================================== */\n\n .clear-btn {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n min-width: var(--_touch-target);\n height: var(--size-5);\n min-height: var(--_touch-target);\n padding: 0;\n color: var(--color-contrast-500);\n cursor: pointer;\n background: transparent;\n border: none;\n border-radius: var(--rounded-sm);\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n .clear-btn:hover {\n color: var(--color-contrast-900);\n }\n\n .clear-btn:focus-visible {\n outline: var(--border-2) solid var(--_theme-focus);\n outline-offset: var(--border);\n }\n\n :host([clearable]) .clear-btn {\n display: flex;\n }\n\n :host([clearable]:not([has-value])) .clear-btn {\n visibility: hidden;\n pointer-events: none;\n }\n\n /* ========================================\n Password visibility toggle\n ======================================== */\n\n .pwd-toggle-btn {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n min-width: var(--_touch-target);\n height: var(--size-5);\n min-height: var(--_touch-target);\n padding: 0;\n color: var(--color-contrast-500);\n cursor: pointer;\n background: transparent;\n border: none;\n border-radius: var(--rounded-sm);\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n .pwd-toggle-btn:hover {\n color: var(--color-contrast-900);\n }\n\n .pwd-toggle-btn:focus-visible {\n outline: var(--border-2) solid var(--_theme-focus);\n outline-offset: var(--border);\n }\n\n :host([type='password']) .pwd-toggle-btn {\n display: flex;\n }\n\n /* ========================================\n Character counter\n ======================================== */\n\n .char-counter {\n padding-inline: 2px;\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: var(--color-contrast-400);\n text-align: end;\n white-space: nowrap;\n }\n\n .char-counter[data-near-limit] {\n color: var(--color-warning, #f59e0b);\n }\n\n .char-counter[data-at-limit] {\n color: var(--color-error);\n }\n\n /* ========================================\n Error State\n ======================================== */\n\n :host([error]:not([error=''])) .field {\n border-color: var(--color-error);\n }\n\n :host([error]:not([error=''])) .label {\n color: var(--color-error);\n }\n\n .helper-text[role='alert'] {\n color: var(--color-error);\n }\n\n /* ========================================\n Success State (Signal 04)\n ======================================== */\n\n :host([success]) .field {\n border-color: var(--color-success);\n }\n\n /* ========================================\n Status Icon (Signals 03/04: error/success — never color alone)\n ======================================== */\n\n .status-icon {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n height: var(--size-5);\n }\n\n :host([error]:not([error=''])) .status-icon,\n :host([success]) .status-icon {\n display: flex;\n }\n\n .status-icon[data-status='error'] {\n color: var(--color-error);\n }\n\n .status-icon[data-status='success'] {\n color: var(--color-success);\n }\n\n /* ========================================\n Loading Spinner (Signal 06)\n ======================================== */\n\n /* Keyframe must live in shadow DOM — @keyframes don't inherit across shadow roots */\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n .field-spinner {\n display: none;\n flex-shrink: 0;\n width: var(--size-4);\n height: var(--size-4);\n border: var(--border-2) solid var(--_theme-focus, currentcolor);\n border-inline-end-color: transparent;\n border-radius: 50%;\n animation: var(--_motion-animation, spin var(--transition-loader) infinite);\n }\n\n :host([loading]) .field-spinner {\n display: inline-block;\n }\n}\n\n/*\n * The solid/flat/bordered/outline/ghost variant switch (previously here) now lives in\n * `fieldVariantMixin({ container: '.field', tokenPrefix: 'input' })` in `input.ts`'s `styles`\n * array — shared with `ore-textarea`/`ore-message-composer` instead of hand-duplicated across\n * all three (see the mixin's own doc comment for what it covers and why). `ore-input`'s extra\n * `text` variant (below) is not part of that shared set, so it keeps its own block here.\n */\n@layer refine.variants {\n /* Text — underline style */\n :host([variant='text']) {\n --_bg: var(--input-bg, transparent);\n --_border-color: var(--input-border-color, var(--color-contrast-300));\n }\n\n :host([variant='text']) .field {\n background: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n\n :host([variant='text']) .field:focus-within {\n box-shadow: none;\n }\n\n /*\n * Focus/error/success `box-shadow` on `.field` — kept here in `refine.variants` (alongside\n * `fieldVariantMixin`'s rest-state `box-shadow` for solid/outline/ghost) rather than\n * `refine.overrides`, so normal specificity decides the winner. Cascade layers beat\n * specificity outright, so a `refine.overrides` box-shadow always lost to every variant's\n * unconditional rest-state `box-shadow`, focused/error/success or not — the same bug class\n * fixed for `ore-otp-input`'s focus ring.\n */\n :host(:not([disabled], [variant='text'], [variant='flat'])) .field:focus-within {\n background: var(--color-canvas);\n border-color: var(--_theme-focus);\n box-shadow: var(--_theme-shadow, var(--color-primary-focus-shadow));\n }\n\n :host([error]:not([error=''])) .field:focus-within {\n border-color: var(--color-error);\n box-shadow: var(--color-error-focus-shadow);\n }\n\n :host([success]) .field:focus-within {\n border-color: var(--color-success);\n box-shadow: var(--color-success-focus-shadow);\n }\n}\n\n@layer refine.utilities {\n /* Full width */\n :host([fullwidth]) {\n width: 100%;\n }\n}\n\n/* ========================================\n Disabled State (Signal 05) — intentionally unlayered\n ======================================== */\n\n/*\n * The shared `disabledLoadingMixin` (pulled in via `fieldMixins`) dims `:host([disabled])`\n * with `opacity: 0.5` as bare, unlayered CSS. Cascade layers always lose to unlayered rules\n * regardless of source order or specificity, so overriding that from inside any `@layer`\n * block in this file (including `refine.overrides`) would be a no-op — this has to stay\n * unlayered too, to actually win.\n *\n * Per the field-state UX review: opacity-based dimming reads as a washed-out/loading look\n * and can mimic reduced-contrast content for low-vision users, rather than a clearly locked\n * field. Swapped for an explicit grayscale surface + `not-allowed` cursor (the cursor already\n * comes from the shared mixin, left untouched here).\n */\n:host([disabled]) {\n opacity: 1;\n}\n\n:host([disabled]) .field {\n background: var(--color-contrast-100);\n border-color: var(--color-contrast-200);\n box-shadow: none;\n}\n\n:host([disabled]) input {\n color: var(--color-contrast-400);\n}\n\n:host([disabled]) input::placeholder {\n color: var(--color-contrast-300);\n}\n\n:host([disabled]) .label {\n color: var(--color-contrast-400);\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"input.css.js","names":[],"sources":["../../../src/inputs/input/input.css?inline"],"sourcesContent":["@layer refine.base {\n /* ========================================\n Base Styles & Defaults\n ======================================== */\n\n :host {\n --_font-size: var(--input-font-size, var(--text-sm));\n --_gap: var(--input-gap, var(--size-2));\n --_field-height: var(--input-height, var(--size-10));\n --_padding: var(--input-padding, var(--size-1-5) var(--size-3));\n --_label-block-inset: var(--input-label-block-inset, var(--size-2));\n --_label-inset: var(--input-label-inset, var(--size-3));\n --_radius: var(--input-radius, var(--rounded-lg));\n --_placeholder: var(--input-placeholder-color, var(--color-contrast-500));\n --_bg: var(--input-bg, var(--color-contrast-100));\n --_border-color: var(--input-border-color, var(--color-contrast-300));\n\n display: inline-flex;\n flex-direction: column;\n align-items: stretch;\n min-width: var(--input-min-width, 12rem);\n }\n\n .input-wrapper {\n display: flex;\n flex-direction: column;\n gap: 0;\n width: 100%;\n }\n\n .field {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n gap: 0;\n align-items: stretch;\n justify-content: center;\n height: var(--_field-height);\n min-height: var(--_field-height);\n padding: var(--_padding);\n background: var(--_bg);\n border: var(--border) solid var(--_border-color);\n border-radius: var(--_radius);\n box-shadow: var(--shadow-2xs);\n transition: var(\n --_motion-transition,\n background var(--transition-fast),\n backdrop-filter var(--transition-fast),\n border-color var(--transition-fast),\n box-shadow var(--transition-fast)\n );\n }\n\n /* Expand height to fit inset label + input row */\n .input-wrapper:has(.label:not([hidden])) .field {\n height: auto;\n }\n\n /* Outside placement: label is above the field (natural flow) */\n\n /* Inset placement (default): label appears inside the field border */\n :host(:not([label-placement='outside'])) .input-wrapper {\n position: relative;\n }\n\n :host(:not([label-placement='outside'])) .label {\n position: absolute;\n inset-block-start: var(--_label-block-inset);\n inset-inline-start: var(--_label-inset);\n z-index: 1;\n pointer-events: none;\n }\n\n :host(:not([label-placement='outside'])) .input-wrapper:has(.label:not([hidden])) .field {\n padding-block-start: calc(var(--_label-block-inset) + 1lh + 2px);\n }\n\n .input-row {\n display: flex;\n flex: 1;\n gap: var(--_gap);\n align-items: center;\n }\n\n /* ========================================\n Label Styles\n ======================================== */\n\n .label,\n label.label {\n margin-bottom: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--text-xs);\n font-weight: var(--font-medium);\n line-height: var(--leading-tight);\n color: var(--color-contrast-600);\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n /* Outside placement: label moves outside the field via CSS */\n :host([label-placement='outside']) .label,\n :host([label-placement='outside']) label.label {\n order: -1;\n font-size: var(--text-xs);\n line-height: var(--leading-loose);\n }\n\n /* ========================================\n Helper Text\n ======================================== */\n\n .helper-text {\n padding-inline: 2px;\n margin-top: var(--size-1-5);\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));\n overflow-wrap: anywhere;\n }\n\n .helper-text[hidden] {\n display: none;\n }\n\n /* ========================================\n Slotted Prefix/Suffix Icons\n ======================================== */\n\n ::slotted(svg) {\n flex-shrink: 0;\n width: var(--_icon-size, var(--leading-6));\n height: var(--_icon-size, var(--leading-6));\n }\n}\n\n@layer refine.overrides {\n /* ========================================\n Input Element\n ======================================== */\n\n input {\n flex: 1;\n min-width: 0;\n min-height: var(--size-6);\n font: inherit;\n font-size: var(--_font-size);\n line-height: var(--leading-normal);\n\n /* No all: unset needed - reset layer handles it */\n color: var(--color-contrast-900);\n outline: none;\n background: transparent;\n border: none;\n }\n\n input::placeholder {\n color: var(--_placeholder);\n transition: color var(--transition-fast);\n }\n\n input:focus-visible {\n outline: none;\n }\n\n /* ========================================\n Hover & Focus States\n ======================================== */\n\n :host(:not([disabled], [variant='bordered'], [variant='flat'])) .field:hover {\n border-color: var(--color-contrast-400);\n }\n\n :host(:not([disabled])) .field:focus-within .label {\n color: var(--_theme-focus);\n }\n\n :host(:not([disabled])) .field:focus-within ::slotted([slot='prefix']),\n :host(:not([disabled])) .field:focus-within ::slotted([slot='suffix']) {\n color: var(--_theme-focus);\n }\n\n /* ========================================\n Clear button\n ======================================== */\n\n .clear-btn {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n min-width: var(--_touch-target);\n height: var(--size-5);\n min-height: var(--_touch-target);\n padding: 0;\n color: var(--color-contrast-500);\n cursor: pointer;\n background: transparent;\n border: none;\n border-radius: var(--rounded-sm);\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n .clear-btn:hover {\n color: var(--color-contrast-900);\n }\n\n .clear-btn:focus-visible {\n outline: var(--border-2) solid var(--_theme-focus);\n outline-offset: var(--border);\n }\n\n :host([clearable]) .clear-btn {\n display: flex;\n }\n\n :host([clearable]:not([has-value])) .clear-btn {\n visibility: hidden;\n pointer-events: none;\n }\n\n /* ========================================\n Password visibility toggle\n ======================================== */\n\n .pwd-toggle-btn {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n min-width: var(--_touch-target);\n height: var(--size-5);\n min-height: var(--_touch-target);\n padding: 0;\n color: var(--color-contrast-500);\n cursor: pointer;\n background: transparent;\n border: none;\n border-radius: var(--rounded-sm);\n transition: var(--_motion-transition, color var(--transition-fast));\n }\n\n .pwd-toggle-btn:hover {\n color: var(--color-contrast-900);\n }\n\n .pwd-toggle-btn:focus-visible {\n outline: var(--border-2) solid var(--_theme-focus);\n outline-offset: var(--border);\n }\n\n :host([type='password']) .pwd-toggle-btn {\n display: flex;\n }\n\n /* ========================================\n Character counter\n ======================================== */\n\n .char-counter {\n padding-inline: 2px;\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: var(--color-contrast-400);\n text-align: end;\n white-space: nowrap;\n }\n\n .char-counter[data-near-limit] {\n color: var(--color-warning, #f59e0b);\n }\n\n .char-counter[data-at-limit] {\n color: var(--color-error);\n }\n\n /* ========================================\n Error State\n ======================================== */\n\n :host([error]:not([error=''])) .field {\n border-color: var(--color-error);\n }\n\n :host([error]:not([error=''])) .label {\n color: var(--color-error);\n }\n\n .helper-text[role='alert'] {\n color: var(--color-error);\n }\n\n /* ========================================\n Success State (Signal 04)\n ======================================== */\n\n :host([success]) .field {\n border-color: var(--color-success);\n }\n\n /* ========================================\n Status Icon (Signals 03/04: error/success — never color alone)\n ======================================== */\n\n .status-icon {\n display: none;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: var(--size-5);\n height: var(--size-5);\n }\n\n :host([error]:not([error=''])) .status-icon,\n :host([success]) .status-icon {\n display: flex;\n }\n\n .status-icon[data-status='error'] {\n color: var(--color-error);\n }\n\n .status-icon[data-status='success'] {\n color: var(--color-success);\n }\n\n /* ========================================\n Loading Spinner (Signal 06)\n ======================================== */\n\n /* Keyframe must live in shadow DOM — @keyframes don't inherit across shadow roots */\n @keyframes spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n .field-spinner {\n display: none;\n flex-shrink: 0;\n width: var(--size-4);\n height: var(--size-4);\n border: var(--border-2) solid var(--_theme-focus, currentcolor);\n border-inline-end-color: transparent;\n border-radius: 50%;\n animation: var(--_motion-animation, spin var(--transition-loader) infinite);\n }\n\n :host([loading]) .field-spinner {\n display: inline-block;\n }\n}\n\n/*\n * The solid/flat/bordered/outline/ghost variant switch (previously here) now lives in\n * `fieldVariantMixin({ container: '.field', tokenPrefix: 'input' })` in `input.ts`'s `styles`\n * array — shared with `ore-textarea`/`ore-message-composer` instead of hand-duplicated across\n * all three (see the mixin's own doc comment for what it covers and why). `ore-input`'s extra\n * `text` variant (below) is not part of that shared set, so it keeps its own block here.\n */\n@layer refine.variants {\n /* Text — underline style */\n :host([variant='text']) {\n --_bg: var(--input-bg, transparent);\n --_border-color: var(--input-border-color, var(--color-contrast-300));\n }\n\n :host([variant='text']) .field {\n background: transparent;\n border: none;\n border-radius: 0;\n box-shadow: none;\n }\n\n :host([variant='text']) .field:focus-within {\n box-shadow: none;\n }\n\n /*\n * Focus/error/success `box-shadow` on `.field` — kept here in `refine.variants` (alongside\n * `fieldVariantMixin`'s rest-state `box-shadow` for solid/outline/ghost) rather than\n * `refine.overrides`, so normal specificity decides the winner. Cascade layers beat\n * specificity outright, so a `refine.overrides` box-shadow always lost to every variant's\n * unconditional rest-state `box-shadow`, focused/error/success or not — the same bug class\n * fixed for `ore-otp-input`'s focus ring.\n */\n :host(:not([disabled], [variant='text'], [variant='flat'])) .field:focus-within {\n background: var(--color-canvas);\n border-color: var(--_theme-focus);\n box-shadow: var(--_theme-shadow, var(--color-primary-focus-shadow));\n }\n\n :host([error]:not([error=''])) .field:focus-within {\n border-color: var(--color-error);\n box-shadow: var(--color-error-focus-shadow);\n }\n\n :host([success]) .field:focus-within {\n border-color: var(--color-success);\n box-shadow: var(--color-success-focus-shadow);\n }\n}\n\n@layer refine.utilities {\n /* Full width */\n :host([fullwidth]) {\n width: 100%;\n }\n}\n\n/* ========================================\n Disabled State (Signal 05) — intentionally unlayered\n ======================================== */\n\n/*\n * The shared `disabledLoadingMixin` (pulled in via `fieldMixins`) dims `:host([disabled])`\n * with `opacity: 0.5` as bare, unlayered CSS. Cascade layers always lose to unlayered rules\n * regardless of source order or specificity, so overriding that from inside any `@layer`\n * block in this file (including `refine.overrides`) would be a no-op — this has to stay\n * unlayered too, to actually win.\n *\n * Per the field-state UX review: opacity-based dimming reads as a washed-out/loading look\n * and can mimic reduced-contrast content for low-vision users, rather than a clearly locked\n * field. Swapped for an explicit grayscale surface + `not-allowed` cursor (the cursor already\n * comes from the shared mixin, left untouched here).\n */\n:host([disabled]) {\n opacity: 1;\n}\n\n:host([disabled]) .field {\n background: var(--color-contrast-100);\n border-color: var(--color-contrast-200);\n box-shadow: none;\n}\n\n:host([disabled]) input {\n color: var(--color-contrast-400);\n}\n\n:host([disabled]) input::placeholder {\n color: var(--color-contrast-300);\n}\n\n:host([disabled]) .label {\n color: var(--color-contrast-400);\n}\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var e=`@layer refine.base{:host{--_width:var(--switch-width,var(--size-10));--_height:var(--switch-height,var(--size-5));--_padding:var(--size-0-5);--_thumb-size:calc(var(--_height) - var(--_padding) * 2);--_track-bg:var(--switch-track-bg,var(--color-contrast-300));--_thumb-bg:var(--switch-thumb-bg,white);--_font-size:var(--switch-font-size,var(--text-sm));gap:var(--_gap,var(--size-2-5));min-height:var(--_touch-target);touch-action:manipulation;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;display:inline-flex}.switch-wrapper{flex-shrink:0;display:flex}.switch-track{width:var(--_width);height:var(--_height);background:var(--_track-bg);border-radius:var(--rounded-full);transition:background var(--transition-normal), box-shadow var(--transition-normal);position:relative}.switch-thumb{top:var(--_padding);width:var(--_thumb-size);height:var(--_thumb-size);background:var(--_thumb-bg);border-radius:var(--rounded-full);box-shadow:var(--shadow-sm);transition:transform var(--transition-spring), box-shadow var(--transition-normal);will-change:transform;position:absolute}.switch-thumb:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:var(--_padding)}.switch-thumb:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:var(--_padding)}:host(:focus-visible) .switch-track{box-shadow:var(--_focus-shadow)}.label{font-size:var(--_font-size);color:var(--color-contrast)}}@layer refine.overrides{:host{--_active-bg:var(--switch-checked-bg,var(--_theme-base));--_focus-shadow:var(--_theme-shadow)}:host([checked]) .switch-track{background:var(--_active-bg)}:host([checked]) .switch-thumb{transform:translateX(calc(var(--_width) - var(--_height)))}:host(:dir(rtl)[checked]) .switch-thumb{transform:translateX(calc(-1 * (var(--_width) - var(--_height))))}:host(:hover:not([disabled],[checked])) .switch-track{background:var(--color-contrast-400)}:host(:hover:not([disabled])[checked]) .switch-track{filter:brightness(1.1)}.helper-text[hidden]{display:none}.helper-text{width:100%;font-size:var(--text-xs);line-height:var(--leading-tight);color:color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas))}.helper-text:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){padding-left:calc(var(--_width) + var(--size-2-5))}.helper-text:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){padding-right:calc(var(--_width) + var(--size-2-5))}.helper-text[role=alert]{color:var(--color-error)}}`;exports.default=e;
|
|
1
|
+
var e=`@layer refine.base{:host{--_width:var(--switch-width,var(--size-10));--_height:var(--switch-height,var(--size-5));--_padding:var(--size-0-5);--_thumb-size:calc(var(--_height) - var(--_padding) * 2);--_track-bg:var(--switch-track-bg,var(--color-contrast-300));--_thumb-bg:var(--switch-thumb-bg,white);--_font-size:var(--switch-font-size,var(--text-sm));gap:var(--_gap,var(--size-2-5));min-height:var(--_touch-target);touch-action:manipulation;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;flex-shrink:0;align-items:center;display:inline-flex}.switch-wrapper{flex-shrink:0;display:flex}.switch-track{width:var(--_width);height:var(--_height);background:var(--_track-bg);border-radius:var(--rounded-full);transition:background var(--transition-normal), box-shadow var(--transition-normal);position:relative}.switch-thumb{top:var(--_padding);width:var(--_thumb-size);height:var(--_thumb-size);background:var(--_thumb-bg);border-radius:var(--rounded-full);box-shadow:var(--shadow-sm);transition:transform var(--transition-spring), box-shadow var(--transition-normal);will-change:transform;position:absolute}.switch-thumb:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:var(--_padding)}.switch-thumb:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:var(--_padding)}:host(:focus-visible) .switch-track{box-shadow:var(--_focus-shadow)}.label{font-size:var(--_font-size);color:var(--color-contrast)}}@layer refine.overrides{:host{--_active-bg:var(--switch-checked-bg,var(--_theme-base));--_focus-shadow:var(--_theme-shadow)}:host([checked]) .switch-track{background:var(--_active-bg)}:host([checked]) .switch-thumb{transform:translateX(calc(var(--_width) - var(--_height)))}:host(:dir(rtl)[checked]) .switch-thumb{transform:translateX(calc(-1 * (var(--_width) - var(--_height))))}:host(:hover:not([disabled],[checked])) .switch-track{background:var(--color-contrast-400)}:host(:hover:not([disabled])[checked]) .switch-track{filter:brightness(1.1)}.helper-text[hidden]{display:none}.helper-text{width:100%;font-size:var(--text-xs);line-height:var(--leading-tight);color:color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas))}.helper-text:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){padding-left:calc(var(--_width) + var(--size-2-5))}.helper-text:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){padding-right:calc(var(--_width) + var(--size-2-5))}.helper-text[role=alert]{color:var(--color-error)}}`;exports.default=e;
|
|
2
2
|
//# sourceMappingURL=switch.css.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.css.cjs","names":[],"sources":["../../../src/inputs/switch/switch.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_width: var(--switch-width, var(--size-10));\n --_height: var(--switch-height, var(--size-5));\n --_padding: var(--size-0-5);\n --_thumb-size: calc(var(--_height) - var(--_padding) * 2);\n --_track-bg: var(--switch-track-bg, var(--color-contrast-300));\n --_thumb-bg: var(--switch-thumb-bg, white);\n --_font-size: var(--switch-font-size, var(--text-sm));\n\n display: inline-flex;\n flex-wrap: wrap;\n gap: var(--_gap, var(--size-2-5));\n align-items: center;\n min-height: var(--_touch-target);\n touch-action: manipulation;\n cursor: pointer;\n user-select: none;\n }\n\n /* ========================================\n Track & Thumb\n ======================================== */\n\n .switch-wrapper {\n display: flex;\n flex-shrink: 0;\n }\n\n .switch-track {\n position: relative;\n width: var(--_width);\n height: var(--_height);\n background: var(--_track-bg);\n border-radius: var(--rounded-full);\n transition:\n background var(--transition-normal),\n box-shadow var(--transition-normal);\n }\n\n .switch-thumb {\n position: absolute;\n inset-inline-start: var(--_padding);\n top: var(--_padding);\n width: var(--_thumb-size);\n height: var(--_thumb-size);\n background: var(--_thumb-bg);\n border-radius: var(--rounded-full);\n box-shadow: var(--shadow-sm);\n transition:\n transform var(--transition-spring),\n box-shadow var(--transition-normal);\n will-change: transform;\n }\n\n /* ========================================\n Focus State\n ======================================== */\n\n :host(:focus-visible) .switch-track {\n box-shadow: var(--_focus-shadow);\n }\n\n /* ========================================\n Label\n ======================================== */\n\n .label {\n font-size: var(--_font-size);\n color: var(--color-contrast);\n }\n}\n\n@layer refine.overrides {\n /* Map theme variables to switch-specific variables */\n :host {\n --_active-bg: var(--switch-checked-bg, var(--_theme-base));\n --_focus-shadow: var(--_theme-shadow);\n }\n\n /* ========================================\n Checked State\n ======================================== */\n\n :host([checked]) .switch-track {\n background: var(--_active-bg);\n }\n\n :host([checked]) .switch-thumb {\n transform: translateX(calc(var(--_width) - var(--_height)));\n }\n\n /* In RTL the thumb starts at the inline-end edge; slide left to reach inline-start */\n :host(:dir(rtl)[checked]) .switch-thumb {\n transform: translateX(calc(-1 * (var(--_width) - var(--_height))));\n }\n\n /* ========================================\n Hover & Active States\n ======================================== */\n\n :host(:hover:not([disabled], [checked])) .switch-track {\n background: var(--color-contrast-400);\n }\n\n :host(:hover:not([disabled])[checked]) .switch-track {\n filter: brightness(1.1);\n }\n\n /* ========================================\n Helper / Error Text\n ======================================== */\n\n .helper-text[hidden] {\n display: none;\n }\n\n .helper-text {\n width: 100%;\n padding-inline-start: calc(var(--_width) + var(--size-2-5));\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));\n }\n\n .helper-text[role='alert'] {\n color: var(--color-error);\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"switch.css.cjs","names":[],"sources":["../../../src/inputs/switch/switch.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_width: var(--switch-width, var(--size-10));\n --_height: var(--switch-height, var(--size-5));\n --_padding: var(--size-0-5);\n --_thumb-size: calc(var(--_height) - var(--_padding) * 2);\n --_track-bg: var(--switch-track-bg, var(--color-contrast-300));\n --_thumb-bg: var(--switch-thumb-bg, white);\n --_font-size: var(--switch-font-size, var(--text-sm));\n\n display: inline-flex;\n flex-shrink: 0;\n flex-wrap: wrap;\n gap: var(--_gap, var(--size-2-5));\n align-items: center;\n min-height: var(--_touch-target);\n touch-action: manipulation;\n cursor: pointer;\n user-select: none;\n }\n\n /* ========================================\n Track & Thumb\n ======================================== */\n\n .switch-wrapper {\n display: flex;\n flex-shrink: 0;\n }\n\n .switch-track {\n position: relative;\n width: var(--_width);\n height: var(--_height);\n background: var(--_track-bg);\n border-radius: var(--rounded-full);\n transition:\n background var(--transition-normal),\n box-shadow var(--transition-normal);\n }\n\n .switch-thumb {\n position: absolute;\n inset-inline-start: var(--_padding);\n top: var(--_padding);\n width: var(--_thumb-size);\n height: var(--_thumb-size);\n background: var(--_thumb-bg);\n border-radius: var(--rounded-full);\n box-shadow: var(--shadow-sm);\n transition:\n transform var(--transition-spring),\n box-shadow var(--transition-normal);\n will-change: transform;\n }\n\n /* ========================================\n Focus State\n ======================================== */\n\n :host(:focus-visible) .switch-track {\n box-shadow: var(--_focus-shadow);\n }\n\n /* ========================================\n Label\n ======================================== */\n\n .label {\n font-size: var(--_font-size);\n color: var(--color-contrast);\n }\n}\n\n@layer refine.overrides {\n /* Map theme variables to switch-specific variables */\n :host {\n --_active-bg: var(--switch-checked-bg, var(--_theme-base));\n --_focus-shadow: var(--_theme-shadow);\n }\n\n /* ========================================\n Checked State\n ======================================== */\n\n :host([checked]) .switch-track {\n background: var(--_active-bg);\n }\n\n :host([checked]) .switch-thumb {\n transform: translateX(calc(var(--_width) - var(--_height)));\n }\n\n /* In RTL the thumb starts at the inline-end edge; slide left to reach inline-start */\n :host(:dir(rtl)[checked]) .switch-thumb {\n transform: translateX(calc(-1 * (var(--_width) - var(--_height))));\n }\n\n /* ========================================\n Hover & Active States\n ======================================== */\n\n :host(:hover:not([disabled], [checked])) .switch-track {\n background: var(--color-contrast-400);\n }\n\n :host(:hover:not([disabled])[checked]) .switch-track {\n filter: brightness(1.1);\n }\n\n /* ========================================\n Helper / Error Text\n ======================================== */\n\n .helper-text[hidden] {\n display: none;\n }\n\n .helper-text {\n width: 100%;\n padding-inline-start: calc(var(--_width) + var(--size-2-5));\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));\n }\n\n .helper-text[role='alert'] {\n color: var(--color-error);\n }\n}\n"],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/inputs/switch/switch.css?inline
|
|
2
|
-
var e = "@layer refine.base{:host{--_width:var(--switch-width,var(--size-10));--_height:var(--switch-height,var(--size-5));--_padding:var(--size-0-5);--_thumb-size:calc(var(--_height) - var(--_padding) * 2);--_track-bg:var(--switch-track-bg,var(--color-contrast-300));--_thumb-bg:var(--switch-thumb-bg,white);--_font-size:var(--switch-font-size,var(--text-sm));gap:var(--_gap,var(--size-2-5));min-height:var(--_touch-target);touch-action:manipulation;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;align-items:center;display:inline-flex}.switch-wrapper{flex-shrink:0;display:flex}.switch-track{width:var(--_width);height:var(--_height);background:var(--_track-bg);border-radius:var(--rounded-full);transition:background var(--transition-normal), box-shadow var(--transition-normal);position:relative}.switch-thumb{top:var(--_padding);width:var(--_thumb-size);height:var(--_thumb-size);background:var(--_thumb-bg);border-radius:var(--rounded-full);box-shadow:var(--shadow-sm);transition:transform var(--transition-spring), box-shadow var(--transition-normal);will-change:transform;position:absolute}.switch-thumb:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:var(--_padding)}.switch-thumb:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:var(--_padding)}:host(:focus-visible) .switch-track{box-shadow:var(--_focus-shadow)}.label{font-size:var(--_font-size);color:var(--color-contrast)}}@layer refine.overrides{:host{--_active-bg:var(--switch-checked-bg,var(--_theme-base));--_focus-shadow:var(--_theme-shadow)}:host([checked]) .switch-track{background:var(--_active-bg)}:host([checked]) .switch-thumb{transform:translateX(calc(var(--_width) - var(--_height)))}:host(:dir(rtl)[checked]) .switch-thumb{transform:translateX(calc(-1 * (var(--_width) - var(--_height))))}:host(:hover:not([disabled],[checked])) .switch-track{background:var(--color-contrast-400)}:host(:hover:not([disabled])[checked]) .switch-track{filter:brightness(1.1)}.helper-text[hidden]{display:none}.helper-text{width:100%;font-size:var(--text-xs);line-height:var(--leading-tight);color:color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas))}.helper-text:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){padding-left:calc(var(--_width) + var(--size-2-5))}.helper-text:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){padding-right:calc(var(--_width) + var(--size-2-5))}.helper-text[role=alert]{color:var(--color-error)}}";
|
|
2
|
+
var e = "@layer refine.base{:host{--_width:var(--switch-width,var(--size-10));--_height:var(--switch-height,var(--size-5));--_padding:var(--size-0-5);--_thumb-size:calc(var(--_height) - var(--_padding) * 2);--_track-bg:var(--switch-track-bg,var(--color-contrast-300));--_thumb-bg:var(--switch-thumb-bg,white);--_font-size:var(--switch-font-size,var(--text-sm));gap:var(--_gap,var(--size-2-5));min-height:var(--_touch-target);touch-action:manipulation;cursor:pointer;-webkit-user-select:none;user-select:none;flex-wrap:wrap;flex-shrink:0;align-items:center;display:inline-flex}.switch-wrapper{flex-shrink:0;display:flex}.switch-track{width:var(--_width);height:var(--_height);background:var(--_track-bg);border-radius:var(--rounded-full);transition:background var(--transition-normal), box-shadow var(--transition-normal);position:relative}.switch-thumb{top:var(--_padding);width:var(--_thumb-size);height:var(--_thumb-size);background:var(--_thumb-bg);border-radius:var(--rounded-full);box-shadow:var(--shadow-sm);transition:transform var(--transition-spring), box-shadow var(--transition-normal);will-change:transform;position:absolute}.switch-thumb:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:var(--_padding)}.switch-thumb:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:var(--_padding)}:host(:focus-visible) .switch-track{box-shadow:var(--_focus-shadow)}.label{font-size:var(--_font-size);color:var(--color-contrast)}}@layer refine.overrides{:host{--_active-bg:var(--switch-checked-bg,var(--_theme-base));--_focus-shadow:var(--_theme-shadow)}:host([checked]) .switch-track{background:var(--_active-bg)}:host([checked]) .switch-thumb{transform:translateX(calc(var(--_width) - var(--_height)))}:host(:dir(rtl)[checked]) .switch-thumb{transform:translateX(calc(-1 * (var(--_width) - var(--_height))))}:host(:hover:not([disabled],[checked])) .switch-track{background:var(--color-contrast-400)}:host(:hover:not([disabled])[checked]) .switch-track{filter:brightness(1.1)}.helper-text[hidden]{display:none}.helper-text{width:100%;font-size:var(--text-xs);line-height:var(--leading-tight);color:color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas))}.helper-text:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){padding-left:calc(var(--_width) + var(--size-2-5))}.helper-text:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){padding-right:calc(var(--_width) + var(--size-2-5))}.helper-text[role=alert]{color:var(--color-error)}}";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as default };
|
|
5
5
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.css.js","names":[],"sources":["../../../src/inputs/switch/switch.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_width: var(--switch-width, var(--size-10));\n --_height: var(--switch-height, var(--size-5));\n --_padding: var(--size-0-5);\n --_thumb-size: calc(var(--_height) - var(--_padding) * 2);\n --_track-bg: var(--switch-track-bg, var(--color-contrast-300));\n --_thumb-bg: var(--switch-thumb-bg, white);\n --_font-size: var(--switch-font-size, var(--text-sm));\n\n display: inline-flex;\n flex-wrap: wrap;\n gap: var(--_gap, var(--size-2-5));\n align-items: center;\n min-height: var(--_touch-target);\n touch-action: manipulation;\n cursor: pointer;\n user-select: none;\n }\n\n /* ========================================\n Track & Thumb\n ======================================== */\n\n .switch-wrapper {\n display: flex;\n flex-shrink: 0;\n }\n\n .switch-track {\n position: relative;\n width: var(--_width);\n height: var(--_height);\n background: var(--_track-bg);\n border-radius: var(--rounded-full);\n transition:\n background var(--transition-normal),\n box-shadow var(--transition-normal);\n }\n\n .switch-thumb {\n position: absolute;\n inset-inline-start: var(--_padding);\n top: var(--_padding);\n width: var(--_thumb-size);\n height: var(--_thumb-size);\n background: var(--_thumb-bg);\n border-radius: var(--rounded-full);\n box-shadow: var(--shadow-sm);\n transition:\n transform var(--transition-spring),\n box-shadow var(--transition-normal);\n will-change: transform;\n }\n\n /* ========================================\n Focus State\n ======================================== */\n\n :host(:focus-visible) .switch-track {\n box-shadow: var(--_focus-shadow);\n }\n\n /* ========================================\n Label\n ======================================== */\n\n .label {\n font-size: var(--_font-size);\n color: var(--color-contrast);\n }\n}\n\n@layer refine.overrides {\n /* Map theme variables to switch-specific variables */\n :host {\n --_active-bg: var(--switch-checked-bg, var(--_theme-base));\n --_focus-shadow: var(--_theme-shadow);\n }\n\n /* ========================================\n Checked State\n ======================================== */\n\n :host([checked]) .switch-track {\n background: var(--_active-bg);\n }\n\n :host([checked]) .switch-thumb {\n transform: translateX(calc(var(--_width) - var(--_height)));\n }\n\n /* In RTL the thumb starts at the inline-end edge; slide left to reach inline-start */\n :host(:dir(rtl)[checked]) .switch-thumb {\n transform: translateX(calc(-1 * (var(--_width) - var(--_height))));\n }\n\n /* ========================================\n Hover & Active States\n ======================================== */\n\n :host(:hover:not([disabled], [checked])) .switch-track {\n background: var(--color-contrast-400);\n }\n\n :host(:hover:not([disabled])[checked]) .switch-track {\n filter: brightness(1.1);\n }\n\n /* ========================================\n Helper / Error Text\n ======================================== */\n\n .helper-text[hidden] {\n display: none;\n }\n\n .helper-text {\n width: 100%;\n padding-inline-start: calc(var(--_width) + var(--size-2-5));\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));\n }\n\n .helper-text[role='alert'] {\n color: var(--color-error);\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"switch.css.js","names":[],"sources":["../../../src/inputs/switch/switch.css?inline"],"sourcesContent":["@layer refine.base {\n :host {\n --_width: var(--switch-width, var(--size-10));\n --_height: var(--switch-height, var(--size-5));\n --_padding: var(--size-0-5);\n --_thumb-size: calc(var(--_height) - var(--_padding) * 2);\n --_track-bg: var(--switch-track-bg, var(--color-contrast-300));\n --_thumb-bg: var(--switch-thumb-bg, white);\n --_font-size: var(--switch-font-size, var(--text-sm));\n\n display: inline-flex;\n flex-shrink: 0;\n flex-wrap: wrap;\n gap: var(--_gap, var(--size-2-5));\n align-items: center;\n min-height: var(--_touch-target);\n touch-action: manipulation;\n cursor: pointer;\n user-select: none;\n }\n\n /* ========================================\n Track & Thumb\n ======================================== */\n\n .switch-wrapper {\n display: flex;\n flex-shrink: 0;\n }\n\n .switch-track {\n position: relative;\n width: var(--_width);\n height: var(--_height);\n background: var(--_track-bg);\n border-radius: var(--rounded-full);\n transition:\n background var(--transition-normal),\n box-shadow var(--transition-normal);\n }\n\n .switch-thumb {\n position: absolute;\n inset-inline-start: var(--_padding);\n top: var(--_padding);\n width: var(--_thumb-size);\n height: var(--_thumb-size);\n background: var(--_thumb-bg);\n border-radius: var(--rounded-full);\n box-shadow: var(--shadow-sm);\n transition:\n transform var(--transition-spring),\n box-shadow var(--transition-normal);\n will-change: transform;\n }\n\n /* ========================================\n Focus State\n ======================================== */\n\n :host(:focus-visible) .switch-track {\n box-shadow: var(--_focus-shadow);\n }\n\n /* ========================================\n Label\n ======================================== */\n\n .label {\n font-size: var(--_font-size);\n color: var(--color-contrast);\n }\n}\n\n@layer refine.overrides {\n /* Map theme variables to switch-specific variables */\n :host {\n --_active-bg: var(--switch-checked-bg, var(--_theme-base));\n --_focus-shadow: var(--_theme-shadow);\n }\n\n /* ========================================\n Checked State\n ======================================== */\n\n :host([checked]) .switch-track {\n background: var(--_active-bg);\n }\n\n :host([checked]) .switch-thumb {\n transform: translateX(calc(var(--_width) - var(--_height)));\n }\n\n /* In RTL the thumb starts at the inline-end edge; slide left to reach inline-start */\n :host(:dir(rtl)[checked]) .switch-thumb {\n transform: translateX(calc(-1 * (var(--_width) - var(--_height))));\n }\n\n /* ========================================\n Hover & Active States\n ======================================== */\n\n :host(:hover:not([disabled], [checked])) .switch-track {\n background: var(--color-contrast-400);\n }\n\n :host(:hover:not([disabled])[checked]) .switch-track {\n filter: brightness(1.1);\n }\n\n /* ========================================\n Helper / Error Text\n ======================================== */\n\n .helper-text[hidden] {\n display: none;\n }\n\n .helper-text {\n width: 100%;\n padding-inline-start: calc(var(--_width) + var(--size-2-5));\n font-size: var(--text-xs);\n line-height: var(--leading-tight);\n color: color-mix(in oklch, var(--color-contrast-500) 80%, var(--color-canvas));\n }\n\n .helper-text[role='alert'] {\n color: var(--color-error);\n }\n}\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/inputs/switch/switch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../src/inputs/switch/switch.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAM7E,MAAM,MAAM,eAAe,GAAG;IAC5B,MAAM,EAAE,KAAK,CAAC;IACd,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,cAAc,GAAG;IAC5C,kBAAkB;IAClB,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB;IACrB,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,UAAU,EAAG,YAAqB,CAAC"}
|