@backstage/ui 0.15.0-next.3 → 0.15.1-next.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/CHANGELOG.md +188 -0
- package/dist/components/Combobox/Combobox.module.css.esm.js +2 -2
- package/dist/components/DatePicker/DatePicker.module.css.esm.js +2 -2
- package/dist/components/DateRangePicker/DateRangePicker.module.css.esm.js +2 -2
- package/dist/components/Header/Header.esm.js +48 -32
- package/dist/components/Header/Header.esm.js.map +1 -1
- package/dist/components/Header/Header.module.css.esm.js +2 -2
- package/dist/components/NumberField/NumberField.esm.js +113 -0
- package/dist/components/NumberField/NumberField.esm.js.map +1 -0
- package/dist/components/NumberField/NumberField.module.css.esm.js +8 -0
- package/dist/components/NumberField/NumberField.module.css.esm.js.map +1 -0
- package/dist/components/NumberField/definition.esm.js +34 -0
- package/dist/components/NumberField/definition.esm.js.map +1 -0
- package/dist/components/PasswordField/PasswordField.module.css.esm.js +2 -2
- package/dist/components/PasswordField/definition.esm.js +1 -0
- package/dist/components/PasswordField/definition.esm.js.map +1 -1
- package/dist/components/SearchField/SearchField.module.css.esm.js +2 -2
- package/dist/components/Select/Select.module.css.esm.js +2 -2
- package/dist/components/Switch/Switch.esm.js +17 -5
- package/dist/components/Switch/Switch.esm.js.map +1 -1
- package/dist/components/Switch/Switch.module.css.esm.js +2 -2
- package/dist/components/Switch/definition.esm.js +1 -0
- package/dist/components/Switch/definition.esm.js.map +1 -1
- package/dist/components/TextField/TextField.module.css.esm.js +2 -2
- package/dist/css/styles.css +184 -68
- package/dist/index.d.ts +67 -3
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { forwardRef, useEffect, useMemo } from 'react';
|
|
3
|
+
import { NumberField as NumberField$1, Group, Input } from 'react-aria-components';
|
|
4
|
+
import { RiSubtractLine, RiAddLine } from '@remixicon/react';
|
|
5
|
+
import { FieldLabel } from '../FieldLabel/FieldLabel.esm.js';
|
|
6
|
+
import { useDefinition } from '../../hooks/useDefinition/useDefinition.esm.js';
|
|
7
|
+
import '../FieldLabel/FieldLabel.module.css.esm.js';
|
|
8
|
+
import { FieldError } from '../FieldError/FieldError.esm.js';
|
|
9
|
+
import '../FieldError/FieldError.module.css.esm.js';
|
|
10
|
+
import { ButtonIcon } from '../ButtonIcon/ButtonIcon.esm.js';
|
|
11
|
+
import '../ButtonIcon/ButtonIcon.module.css.esm.js';
|
|
12
|
+
import { NumberFieldDefinition } from './definition.esm.js';
|
|
13
|
+
|
|
14
|
+
const NumberField = forwardRef(
|
|
15
|
+
(props, ref) => {
|
|
16
|
+
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
17
|
+
NumberFieldDefinition,
|
|
18
|
+
props
|
|
19
|
+
);
|
|
20
|
+
const { classes, label, icon, secondaryLabel, placeholder, description } = ownProps;
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
if (!label && !restProps["aria-label"] && !restProps["aria-labelledby"]) {
|
|
23
|
+
console.warn(
|
|
24
|
+
"NumberField requires either a visible label, aria-label, or aria-labelledby for accessibility"
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
}, [label, restProps["aria-label"], restProps["aria-labelledby"]]);
|
|
28
|
+
const secondaryLabelText = secondaryLabel || (restProps.isRequired ? "Required" : null);
|
|
29
|
+
const formatOptions = useMemo(
|
|
30
|
+
() => ({
|
|
31
|
+
useGrouping: false,
|
|
32
|
+
...restProps.formatOptions
|
|
33
|
+
}),
|
|
34
|
+
[restProps.formatOptions]
|
|
35
|
+
);
|
|
36
|
+
return /* @__PURE__ */ jsxs(
|
|
37
|
+
NumberField$1,
|
|
38
|
+
{
|
|
39
|
+
className: classes.root,
|
|
40
|
+
...dataAttributes,
|
|
41
|
+
...restProps,
|
|
42
|
+
formatOptions,
|
|
43
|
+
ref,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
FieldLabel,
|
|
47
|
+
{
|
|
48
|
+
label,
|
|
49
|
+
secondaryLabel: secondaryLabelText,
|
|
50
|
+
description,
|
|
51
|
+
descriptionSlot: "description"
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
/* @__PURE__ */ jsxs(
|
|
55
|
+
Group,
|
|
56
|
+
{
|
|
57
|
+
className: classes.inputWrapper,
|
|
58
|
+
"data-size": dataAttributes["data-size"],
|
|
59
|
+
children: [
|
|
60
|
+
icon && /* @__PURE__ */ jsx(
|
|
61
|
+
"div",
|
|
62
|
+
{
|
|
63
|
+
className: classes.inputIcon,
|
|
64
|
+
"data-size": dataAttributes["data-size"],
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
children: icon
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ jsx(
|
|
70
|
+
Input,
|
|
71
|
+
{
|
|
72
|
+
className: classes.input,
|
|
73
|
+
...icon && { "data-icon": true },
|
|
74
|
+
placeholder
|
|
75
|
+
}
|
|
76
|
+
),
|
|
77
|
+
/* @__PURE__ */ jsxs("div", { className: classes.stepperButtons, children: [
|
|
78
|
+
/* @__PURE__ */ jsx(
|
|
79
|
+
ButtonIcon,
|
|
80
|
+
{
|
|
81
|
+
slot: "decrement",
|
|
82
|
+
variant: "tertiary",
|
|
83
|
+
size: ownProps.size,
|
|
84
|
+
className: classes.stepperButton,
|
|
85
|
+
icon: /* @__PURE__ */ jsx(RiSubtractLine, {}),
|
|
86
|
+
"aria-label": "Decrease"
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ jsx(
|
|
90
|
+
ButtonIcon,
|
|
91
|
+
{
|
|
92
|
+
slot: "increment",
|
|
93
|
+
variant: "tertiary",
|
|
94
|
+
size: ownProps.size,
|
|
95
|
+
className: classes.stepperButton,
|
|
96
|
+
icon: /* @__PURE__ */ jsx(RiAddLine, {}),
|
|
97
|
+
"aria-label": "Increase"
|
|
98
|
+
}
|
|
99
|
+
)
|
|
100
|
+
] })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsx(FieldError, {})
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
);
|
|
110
|
+
NumberField.displayName = "NumberField";
|
|
111
|
+
|
|
112
|
+
export { NumberField };
|
|
113
|
+
//# sourceMappingURL=NumberField.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.esm.js","sources":["../../../src/components/NumberField/NumberField.tsx"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef, useEffect, useMemo } from 'react';\nimport {\n Group,\n Input,\n NumberField as AriaNumberField,\n} from 'react-aria-components';\nimport { RiAddLine, RiSubtractLine } from '@remixicon/react';\nimport { FieldLabel } from '../FieldLabel';\nimport { FieldError } from '../FieldError';\nimport { ButtonIcon } from '../ButtonIcon';\nimport type { NumberFieldProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { NumberFieldDefinition } from './definition';\n\n/**\n * A numeric input with an integrated label, optional icon, and inline error display.\n *\n * @public\n */\nexport const NumberField = forwardRef<HTMLDivElement, NumberFieldProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n NumberFieldDefinition,\n props,\n );\n const { classes, label, icon, secondaryLabel, placeholder, description } =\n ownProps;\n\n useEffect(() => {\n if (!label && !restProps['aria-label'] && !restProps['aria-labelledby']) {\n console.warn(\n 'NumberField requires either a visible label, aria-label, or aria-labelledby for accessibility',\n );\n }\n }, [label, restProps['aria-label'], restProps['aria-labelledby']]);\n\n const secondaryLabelText =\n secondaryLabel || (restProps.isRequired ? 'Required' : null);\n\n const formatOptions = useMemo(\n () => ({\n useGrouping: false,\n ...restProps.formatOptions,\n }),\n [restProps.formatOptions],\n );\n\n return (\n <AriaNumberField\n className={classes.root}\n {...dataAttributes}\n {...restProps}\n formatOptions={formatOptions}\n ref={ref}\n >\n <FieldLabel\n label={label}\n secondaryLabel={secondaryLabelText}\n description={description}\n descriptionSlot=\"description\"\n />\n <Group\n className={classes.inputWrapper}\n data-size={dataAttributes['data-size']}\n >\n {icon && (\n <div\n className={classes.inputIcon}\n data-size={dataAttributes['data-size']}\n aria-hidden=\"true\"\n >\n {icon}\n </div>\n )}\n <Input\n className={classes.input}\n {...(icon && { 'data-icon': true })}\n placeholder={placeholder}\n />\n <div className={classes.stepperButtons}>\n <ButtonIcon\n slot=\"decrement\"\n variant=\"tertiary\"\n size={ownProps.size}\n className={classes.stepperButton}\n icon={<RiSubtractLine />}\n aria-label=\"Decrease\"\n />\n <ButtonIcon\n slot=\"increment\"\n variant=\"tertiary\"\n size={ownProps.size}\n className={classes.stepperButton}\n icon={<RiAddLine />}\n aria-label=\"Increase\"\n />\n </div>\n </Group>\n <FieldError />\n </AriaNumberField>\n );\n },\n);\n\nNumberField.displayName = 'NumberField';\n"],"names":["AriaNumberField"],"mappings":";;;;;;;;;;;;;AAmCO,MAAM,WAAA,GAAc,UAAA;AAAA,EACzB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,qBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAO,MAAM,cAAA,EAAgB,WAAA,EAAa,aAAY,GACrE,QAAA;AAEF,IAAA,SAAA,CAAU,MAAM;AACd,MAAA,IAAI,CAAC,SAAS,CAAC,SAAA,CAAU,YAAY,CAAA,IAAK,CAAC,SAAA,CAAU,iBAAiB,CAAA,EAAG;AACvE,QAAA,OAAA,CAAQ,IAAA;AAAA,UACN;AAAA,SACF;AAAA,MACF;AAAA,IACF,CAAA,EAAG,CAAC,KAAA,EAAO,SAAA,CAAU,YAAY,CAAA,EAAG,SAAA,CAAU,iBAAiB,CAAC,CAAC,CAAA;AAEjE,IAAA,MAAM,kBAAA,GACJ,cAAA,KAAmB,SAAA,CAAU,UAAA,GAAa,UAAA,GAAa,IAAA,CAAA;AAEzD,IAAA,MAAM,aAAA,GAAgB,OAAA;AAAA,MACpB,OAAO;AAAA,QACL,WAAA,EAAa,KAAA;AAAA,QACb,GAAG,SAAA,CAAU;AAAA,OACf,CAAA;AAAA,MACA,CAAC,UAAU,aAAa;AAAA,KAC1B;AAEA,IAAA,uBACE,IAAA;AAAA,MAACA,aAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QAClB,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QACJ,aAAA;AAAA,QACA,GAAA;AAAA,QAEA,QAAA,EAAA;AAAA,0BAAA,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,KAAA;AAAA,cACA,cAAA,EAAgB,kBAAA;AAAA,cAChB,WAAA;AAAA,cACA,eAAA,EAAgB;AAAA;AAAA,WAClB;AAAA,0BACA,IAAA;AAAA,YAAC,KAAA;AAAA,YAAA;AAAA,cACC,WAAW,OAAA,CAAQ,YAAA;AAAA,cACnB,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,cAEpC,QAAA,EAAA;AAAA,gBAAA,IAAA,oBACC,GAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,WAAW,OAAA,CAAQ,SAAA;AAAA,oBACnB,WAAA,EAAW,eAAe,WAAW,CAAA;AAAA,oBACrC,aAAA,EAAY,MAAA;AAAA,oBAEX,QAAA,EAAA;AAAA;AAAA,iBACH;AAAA,gCAEF,GAAA;AAAA,kBAAC,KAAA;AAAA,kBAAA;AAAA,oBACC,WAAW,OAAA,CAAQ,KAAA;AAAA,oBAClB,GAAI,IAAA,IAAQ,EAAE,WAAA,EAAa,IAAA,EAAK;AAAA,oBACjC;AAAA;AAAA,iBACF;AAAA,gCACA,IAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,cAAA,EACtB,QAAA,EAAA;AAAA,kCAAA,GAAA;AAAA,oBAAC,UAAA;AAAA,oBAAA;AAAA,sBACC,IAAA,EAAK,WAAA;AAAA,sBACL,OAAA,EAAQ,UAAA;AAAA,sBACR,MAAM,QAAA,CAAS,IAAA;AAAA,sBACf,WAAW,OAAA,CAAQ,aAAA;AAAA,sBACnB,IAAA,sBAAO,cAAA,EAAA,EAAe,CAAA;AAAA,sBACtB,YAAA,EAAW;AAAA;AAAA,mBACb;AAAA,kCACA,GAAA;AAAA,oBAAC,UAAA;AAAA,oBAAA;AAAA,sBACC,IAAA,EAAK,WAAA;AAAA,sBACL,OAAA,EAAQ,UAAA;AAAA,sBACR,MAAM,QAAA,CAAS,IAAA;AAAA,sBACf,WAAW,OAAA,CAAQ,aAAA;AAAA,sBACnB,IAAA,sBAAO,SAAA,EAAA,EAAU,CAAA;AAAA,sBACjB,YAAA,EAAW;AAAA;AAAA;AACb,iBAAA,EACF;AAAA;AAAA;AAAA,WACF;AAAA,8BACC,UAAA,EAAA,EAAW;AAAA;AAAA;AAAA,KACd;AAAA,EAEJ;AACF;AAEA,WAAA,CAAY,WAAA,GAAc,aAAA;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
|
+
|
|
3
|
+
var css_248z = "/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .NumberField_bui-NumberField__9e112f194d {\n display: flex;\n flex-direction: column;\n font-family: var(--bui-font-regular);\n width: 100%;\n flex-shrink: 0;\n\n &[data-on-bg='neutral-1'] .NumberField_bui-Input__9e112f194d {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] .NumberField_bui-Input__9e112f194d {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] .NumberField_bui-Input__9e112f194d {\n background-color: var(--bui-bg-neutral-4);\n }\n }\n\n .NumberField_bui-InputWrapper__9e112f194d {\n position: relative;\n\n &[data-size='small'] .NumberField_bui-Input__9e112f194d {\n height: 2rem;\n padding-right: 3.5rem;\n }\n\n &[data-size='medium'] .NumberField_bui-Input__9e112f194d {\n height: 2.5rem;\n padding-right: 4.5rem;\n }\n\n &[data-size='small'] .NumberField_bui-Input__9e112f194d[data-icon] {\n padding-left: var(--bui-space-8);\n }\n\n &[data-size='medium'] .NumberField_bui-Input__9e112f194d[data-icon] {\n padding-left: var(--bui-space-9);\n }\n\n &[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n\n .NumberField_bui-InputIcon__9e112f194d {\n position: absolute;\n left: var(--bui-space-3);\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--bui-space-1);\n color: var(--bui-fg-primary);\n flex-shrink: 0;\n pointer-events: none;\n /* To animate the icon when the input is collapsed */\n transition: left 0.2s ease-in-out;\n\n &[data-size='small'],\n &[data-size='small'] svg {\n width: 1rem;\n height: 1rem;\n }\n\n &[data-size='medium'],\n &[data-size='medium'] svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .NumberField_bui-Input__9e112f194d {\n display: flex;\n align-items: center;\n padding: 0 var(--bui-space-3);\n border-radius: var(--bui-radius-2);\n border: none;\n background-color: var(--bui-bg-neutral-1);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n transition: box-shadow 0.2s ease-in-out;\n width: 100%;\n height: 100%;\n cursor: inherit;\n\n &[data-focused] {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--bui-ring);\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &[data-invalid] {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n }\n\n .NumberField_bui-StepperButtons__9e112f194d {\n position: absolute;\n right: var(--bui-space-1);\n top: 50%;\n transform: translateY(-50%);\n display: flex;\n align-items: center;\n }\n\n .NumberField_bui-NumberField__9e112f194d .NumberField_bui-StepperButton__9e112f194d {\n width: 1.5rem;\n height: 1.5rem;\n }\n\n .NumberField_bui-NumberField__9e112f194d[data-size='medium'] .NumberField_bui-StepperButton__9e112f194d {\n width: 2rem;\n height: 2rem;\n }\n}\n";
|
|
4
|
+
var styles = {"bui-NumberField":"NumberField_bui-NumberField__9e112f194d","bui-Input":"NumberField_bui-Input__9e112f194d","bui-InputWrapper":"NumberField_bui-InputWrapper__9e112f194d","bui-InputIcon":"NumberField_bui-InputIcon__9e112f194d","bui-StepperButtons":"NumberField_bui-StepperButtons__9e112f194d","bui-StepperButton":"NumberField_bui-StepperButton__9e112f194d"};
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
7
|
+
export { styles as default };
|
|
8
|
+
//# sourceMappingURL=NumberField.module.css.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.module.css.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import 'react/jsx-runtime';
|
|
2
|
+
import 'clsx';
|
|
3
|
+
import '../../hooks/useBreakpoint.esm.js';
|
|
4
|
+
import '../../hooks/useBg.esm.js';
|
|
5
|
+
import '../../hooks/useDefinition/helpers.esm.js';
|
|
6
|
+
import '../../analytics/useAnalytics.esm.js';
|
|
7
|
+
import 'react-router-dom';
|
|
8
|
+
import { defineComponent } from '../../hooks/useDefinition/defineComponent.esm.js';
|
|
9
|
+
import styles from './NumberField.module.css.esm.js';
|
|
10
|
+
|
|
11
|
+
const NumberFieldDefinition = defineComponent()({
|
|
12
|
+
styles,
|
|
13
|
+
classNames: {
|
|
14
|
+
root: "bui-NumberField",
|
|
15
|
+
inputWrapper: "bui-InputWrapper",
|
|
16
|
+
input: "bui-Input",
|
|
17
|
+
inputIcon: "bui-InputIcon",
|
|
18
|
+
stepperButtons: "bui-StepperButtons",
|
|
19
|
+
stepperButton: "bui-StepperButton"
|
|
20
|
+
},
|
|
21
|
+
bg: "consumer",
|
|
22
|
+
propDefs: {
|
|
23
|
+
size: { dataAttribute: true, default: "small" },
|
|
24
|
+
className: {},
|
|
25
|
+
icon: {},
|
|
26
|
+
placeholder: {},
|
|
27
|
+
label: {},
|
|
28
|
+
description: {},
|
|
29
|
+
secondaryLabel: {}
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export { NumberFieldDefinition };
|
|
34
|
+
//# sourceMappingURL=definition.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/NumberField/definition.ts"],"sourcesContent":["/*\n * Copyright 2026 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { NumberFieldOwnProps } from './types';\nimport styles from './NumberField.module.css';\n\n/**\n * Component definition for NumberField\n * @public\n */\nexport const NumberFieldDefinition = defineComponent<NumberFieldOwnProps>()({\n styles,\n classNames: {\n root: 'bui-NumberField',\n inputWrapper: 'bui-InputWrapper',\n input: 'bui-Input',\n inputIcon: 'bui-InputIcon',\n stepperButtons: 'bui-StepperButtons',\n stepperButton: 'bui-StepperButton',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\n label: {},\n description: {},\n secondaryLabel: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,qBAAA,GAAwB,iBAAqC,CAAE;AAAA,EAC1E,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,iBAAA;AAAA,IACN,YAAA,EAAc,kBAAA;AAAA,IACd,KAAA,EAAO,WAAA;AAAA,IACP,SAAA,EAAW,eAAA;AAAA,IACX,cAAA,EAAgB,oBAAA;AAAA,IAChB,aAAA,EAAe;AAAA,GACjB;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,IAC9C,WAAW,EAAC;AAAA,IACZ,MAAM,EAAC;AAAA,IACP,aAAa,EAAC;AAAA,IACd,OAAO,EAAC;AAAA,IACR,aAAa,EAAC;AAAA,IACd,gBAAgB;AAAC;AAErB,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .PasswordField_bui-
|
|
4
|
-
var styles = {"bui-PasswordField":"PasswordField_bui-
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .PasswordField_bui-PasswordField__ea6db47237 {\n display: flex;\n flex-direction: column;\n font-family: var(--bui-font-regular);\n width: 100%;\n flex: 1;\n\n &[data-on-bg='neutral-1'] .PasswordField_bui-PasswordFieldInput__ea6db47237 {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] .PasswordField_bui-PasswordFieldInput__ea6db47237 {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] .PasswordField_bui-PasswordFieldInput__ea6db47237 {\n background-color: var(--bui-bg-neutral-4);\n }\n }\n\n .PasswordField_bui-PasswordFieldInputWrapper__ea6db47237 {\n position: relative;\n\n &[data-size='small'] .PasswordField_bui-PasswordFieldInput__ea6db47237 {\n height: 2rem;\n padding-right: 2rem;\n }\n\n &[data-size='medium'] .PasswordField_bui-PasswordFieldInput__ea6db47237 {\n height: 2.5rem;\n padding-right: 2.5rem;\n }\n\n &[data-size='small'] .PasswordField_bui-PasswordFieldInput__ea6db47237[data-icon] {\n padding-left: var(--bui-space-8);\n }\n\n &[data-size='medium'] .PasswordField_bui-PasswordFieldInput__ea6db47237[data-icon] {\n padding-left: var(--bui-space-9);\n }\n\n &:has([data-disabled]) {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n\n .PasswordField_bui-PasswordFieldIcon__ea6db47237 {\n position: absolute;\n left: var(--bui-space-3);\n top: 50%;\n transform: translateY(-50%);\n color: var(--bui-fg-primary);\n flex-shrink: 0;\n pointer-events: none;\n\n &[data-size='small'],\n &[data-size='small'] svg {\n width: 1rem;\n height: 1rem;\n }\n\n &[data-size='medium'],\n &[data-size='medium'] svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .PasswordField_bui-PasswordFieldInput__ea6db47237 {\n display: flex;\n align-items: center;\n padding: 0 var(--bui-space-3);\n border-radius: var(--bui-radius-2);\n border: none;\n background-color: var(--bui-bg-neutral-1);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n transition: box-shadow 0.2s ease-in-out;\n width: 100%;\n height: 100%;\n cursor: inherit;\n\n &[data-focused] {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--bui-ring);\n }\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &[data-invalid] {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n }\n\n .PasswordField_bui-PasswordFieldVisibility__ea6db47237 {\n position: absolute;\n right: 0;\n top: 50%;\n transform: translateY(-50%);\n display: grid;\n place-content: center;\n background-color: transparent;\n cursor: pointer;\n border: none;\n padding: 0;\n margin: 0;\n color: var(--bui-fg-primary);\n\n &[data-size='small'] {\n width: 2rem;\n height: 2rem;\n\n & svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n &[data-size='medium'] {\n width: 2.5rem;\n height: 2.5rem;\n\n & svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-PasswordField":"PasswordField_bui-PasswordField__ea6db47237","bui-PasswordFieldInput":"PasswordField_bui-PasswordFieldInput__ea6db47237","bui-PasswordFieldInputWrapper":"PasswordField_bui-PasswordFieldInputWrapper__ea6db47237","bui-PasswordFieldIcon":"PasswordField_bui-PasswordFieldIcon__ea6db47237","bui-PasswordFieldVisibility":"PasswordField_bui-PasswordFieldVisibility__ea6db47237"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/PasswordField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { PasswordFieldOwnProps } from './types';\nimport styles from './PasswordField.module.css';\n\n/**\n * Component definition for PasswordField\n * @public\n */\nexport const PasswordFieldDefinition = defineComponent<PasswordFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-PasswordField',\n inputWrapper: 'bui-PasswordFieldInputWrapper',\n input: 'bui-PasswordFieldInput',\n inputIcon: 'bui-PasswordFieldIcon',\n inputVisibility: 'bui-PasswordFieldVisibility',\n },\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\n label: {},\n description: {},\n secondaryLabel: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,YAAA,EAAc,+BAAA;AAAA,MACd,KAAA,EAAO,wBAAA;AAAA,MACP,SAAA,EAAW,uBAAA;AAAA,MACX,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,MAAM,EAAC;AAAA,MACP,aAAa,EAAC;AAAA,MACd,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/PasswordField/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { PasswordFieldOwnProps } from './types';\nimport styles from './PasswordField.module.css';\n\n/**\n * Component definition for PasswordField\n * @public\n */\nexport const PasswordFieldDefinition = defineComponent<PasswordFieldOwnProps>()(\n {\n styles,\n classNames: {\n root: 'bui-PasswordField',\n inputWrapper: 'bui-PasswordFieldInputWrapper',\n input: 'bui-PasswordFieldInput',\n inputIcon: 'bui-PasswordFieldIcon',\n inputVisibility: 'bui-PasswordFieldVisibility',\n },\n bg: 'consumer',\n propDefs: {\n size: { dataAttribute: true, default: 'small' },\n className: {},\n icon: {},\n placeholder: {},\n label: {},\n description: {},\n secondaryLabel: {},\n },\n },\n);\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,0BAA0B,eAAA,EAAuC;AAAA,EAC5E;AAAA,IACE,MAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,IAAA,EAAM,mBAAA;AAAA,MACN,YAAA,EAAc,+BAAA;AAAA,MACd,KAAA,EAAO,wBAAA;AAAA,MACP,SAAA,EAAW,uBAAA;AAAA,MACX,eAAA,EAAiB;AAAA,KACnB;AAAA,IACA,EAAA,EAAI,UAAA;AAAA,IACJ,QAAA,EAAU;AAAA,MACR,IAAA,EAAM,EAAE,aAAA,EAAe,IAAA,EAAM,SAAS,OAAA,EAAQ;AAAA,MAC9C,WAAW,EAAC;AAAA,MACZ,MAAM,EAAC;AAAA,MACP,aAAa,EAAC;AAAA,MACd,OAAO,EAAC;AAAA,MACR,aAAa,EAAC;AAAA,MACd,gBAAgB;AAAC;AACnB;AAEJ;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .SearchField_bui-
|
|
4
|
-
var styles = {"bui-SearchField":"SearchField_bui-
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .SearchField_bui-SearchField__50c7756e9a {\n display: flex;\n flex-direction: column;\n font-family: var(--bui-font-regular);\n width: 100%;\n flex: 1;\n\n &[data-size='small'] {\n --search-field-item-height: 2rem;\n }\n\n &[data-size='medium'] {\n --search-field-item-height: 2.5rem;\n }\n\n &[data-empty] {\n .SearchField_bui-SearchFieldClear__50c7756e9a {\n display: none;\n }\n }\n\n &[data-on-bg='neutral-1'] .SearchField_bui-SearchFieldInputWrapper__50c7756e9a {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] .SearchField_bui-SearchFieldInputWrapper__50c7756e9a {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] .SearchField_bui-SearchFieldInputWrapper__50c7756e9a {\n background-color: var(--bui-bg-neutral-4);\n }\n\n &[data-startcollapsed='true'] {\n transition: flex-basis 0.3s ease-in-out, width 0.3s ease-in-out,\n max-width 0.3s ease-in-out;\n padding: 0;\n flex: 0 1 auto;\n\n &[data-collapsed='true'] {\n cursor: pointer;\n\n &[data-size='medium'] {\n flex-basis: 2.5rem;\n width: 2.5rem;\n max-width: 2.5rem;\n height: 2.5rem;\n }\n\n &[data-size='small'] {\n flex-basis: 2rem;\n width: 2rem;\n max-width: 2rem;\n height: 2rem;\n }\n\n &[data-size='medium'] .SearchField_bui-SearchFieldInput__50c7756e9a {\n &::placeholder {\n opacity: 0;\n }\n }\n\n &[data-size='small'] .SearchField_bui-SearchFieldInput__50c7756e9a {\n &::placeholder {\n opacity: 0;\n }\n }\n\n .SearchField_bui-SearchFieldInputWrapper__50c7756e9a {\n .SearchField_bui-SearchFieldInput__50c7756e9a[data-icon] {\n padding-right: 0px;\n }\n }\n }\n\n &[data-collapsed='false'] {\n flex-basis: 200px;\n width: 200px;\n max-width: 200px;\n }\n }\n }\n\n .SearchField_bui-SearchFieldInputWrapper__50c7756e9a {\n display: flex;\n align-items: center;\n border-radius: var(--bui-radius-2);\n background-color: var(--bui-bg-neutral-1);\n transition: box-shadow 0.2s ease-in-out;\n\n &:has([data-focused]) {\n box-shadow: inset 0 0 0 1px var(--bui-ring);\n }\n\n &:has([data-invalid]) {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n &[data-size='small'] {\n height: 2rem;\n }\n\n &[data-size='medium'] {\n height: 2.5rem;\n }\n\n &[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n\n .SearchField_bui-SearchFieldInputIcon__50c7756e9a {\n flex: 0 0 auto;\n display: grid;\n place-content: center;\n color: var(--bui-fg-primary);\n pointer-events: none;\n width: var(--search-field-item-height);\n height: var(--search-field-item-height);\n /* To animate the icon when the input is collapsed */\n transition: opacity 0.2s ease-in-out;\n\n & svg {\n .SearchField_bui-SearchField__50c7756e9a[data-size='small'] & {\n width: 1rem;\n height: 1rem;\n }\n\n .SearchField_bui-SearchField__50c7756e9a[data-size='medium'] & {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n }\n\n .SearchField_bui-SearchFieldInput__50c7756e9a {\n flex: 1;\n display: flex;\n align-items: center;\n padding: 0;\n border: none;\n background-color: transparent;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n transition: padding 0.3s ease-in-out;\n width: 100%;\n height: 100%;\n outline: none;\n cursor: inherit;\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n &:first-child {\n .SearchField_bui-SearchField__50c7756e9a[data-size='small'] & {\n padding-inline: var(--bui-space-3) 0;\n }\n\n .SearchField_bui-SearchField__50c7756e9a[data-size='medium'] & {\n padding-inline: var(--bui-space-3) 0;\n }\n }\n }\n\n .SearchField_bui-SearchFieldClear__50c7756e9a {\n flex: 0 0 auto;\n display: grid;\n place-content: center;\n background-color: transparent;\n border: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n color: var(--bui-fg-secondary);\n transition: color 0.2s ease-in-out;\n width: var(--search-field-item-height);\n height: var(--search-field-item-height);\n\n &:hover {\n color: var(--bui-fg-primary);\n }\n\n & svg {\n width: 1rem;\n height: 1rem;\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-SearchField":"SearchField_bui-SearchField__50c7756e9a","bui-SearchFieldClear":"SearchField_bui-SearchFieldClear__50c7756e9a","bui-SearchFieldInputWrapper":"SearchField_bui-SearchFieldInputWrapper__50c7756e9a","bui-SearchFieldInput":"SearchField_bui-SearchFieldInput__50c7756e9a","bui-SearchFieldInputIcon":"SearchField_bui-SearchFieldInputIcon__50c7756e9a"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Select_bui-
|
|
4
|
-
var styles = {"bui-Select":"Select_bui-
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Select_bui-Select__2bfd6c12b2,\n .Select_bui-SelectPopover__2bfd6c12b2 {\n &[data-size='small'] {\n --select-item-height: 2rem;\n }\n\n &[data-size='medium'] {\n --select-item-height: 2.5rem;\n }\n }\n\n .Select_bui-Select__2bfd6c12b2 {\n display: flex;\n flex-direction: column;\n width: 100%;\n flex: 1;\n }\n\n .Select_bui-SelectPopover__2bfd6c12b2 {\n min-width: var(--trigger-width);\n }\n\n .Select_bui-SelectTrigger__2bfd6c12b2 {\n box-sizing: border-box;\n border-radius: var(--bui-radius-3);\n border: none;\n outline: none;\n background-color: var(--bui-bg-neutral-1);\n transition: box-shadow 0.2s ease-in-out;\n\n &[data-on-bg='neutral-1'] {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] {\n background-color: var(--bui-bg-neutral-4);\n }\n\n .Select_bui-Select__2bfd6c12b2[data-focused] & {\n box-shadow: inset 0 0 0 1px var(--bui-ring);\n }\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n gap: var(--bui-space-2);\n width: 100%;\n height: var(--select-item-height);\n\n .Select_bui-Select__2bfd6c12b2[data-size='small'] & {\n padding-inline: var(--bui-space-3) 0;\n }\n\n .Select_bui-Select__2bfd6c12b2[data-size='medium'] & {\n padding-inline: var(--bui-space-4) 0;\n }\n\n & svg {\n flex-shrink: 0;\n color: var(--bui-fg-secondary);\n\n .Select_bui-Select__2bfd6c12b2[data-size='small'] & {\n width: 1rem;\n height: 1rem;\n }\n\n .Select_bui-Select__2bfd6c12b2[data-size='medium'] & {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n .Select_bui-Select__2bfd6c12b2[data-invalid] & {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n &[disabled] {\n cursor: not-allowed;\n color: var(--bui-fg-disabled);\n }\n }\n\n .Select_bui-SelectTriggerChevron__2bfd6c12b2 {\n display: grid;\n place-content: center;\n width: var(--select-item-height);\n height: var(--select-item-height);\n flex-shrink: 0;\n flex-grow: 0;\n }\n\n .Select_bui-SelectValue__2bfd6c12b2 {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n width: 100%;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n text-align: left;\n\n & .Select_bui-SelectItemIndicator__2bfd6c12b2 {\n display: none;\n }\n\n &[disabled] {\n color: var(--bui-fg-disabled);\n }\n }\n\n .Select_bui-SelectList__2bfd6c12b2 {\n overflow: auto;\n min-height: 0;\n padding-block: var(--bui-space-1);\n padding-inline: var(--bui-space-1);\n\n &[data-focus-visible] {\n /* Remove default focus-visible outline because React Aria\n * triggers it on mouse click open of the list for some reason.\n * On keyboard use, the top item receives the focus style,\n * so it's not needed anyway. */\n outline: none;\n }\n }\n\n .Select_bui-SelectItem__2bfd6c12b2 {\n box-sizing: border-box;\n position: relative;\n display: grid;\n grid-template-areas: 'icon text';\n grid-template-columns: 1rem 1fr;\n align-items: center;\n min-height: var(--select-item-height);\n padding-block: var(--bui-space-1);\n padding-left: var(--bui-space-3);\n padding-right: var(--bui-space-4);\n color: var(--bui-fg-primary);\n cursor: pointer;\n user-select: none;\n font-size: var(--bui-font-size-3);\n gap: var(--bui-space-2);\n outline: none;\n border-radius: var(--bui-radius-2);\n\n &[data-focused] {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n color: var(--bui-fg-disabled);\n }\n\n &[data-selected] .Select_bui-SelectItemIndicator__2bfd6c12b2 {\n opacity: 1;\n }\n }\n\n .Select_bui-SelectItemIndicator__2bfd6c12b2 {\n grid-area: icon;\n display: flex;\n align-items: center;\n justify-content: center;\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n }\n\n .Select_bui-SelectItemLabel__2bfd6c12b2 {\n flex: 1;\n grid-area: text;\n }\n\n .Select_bui-SelectSearchWrapper__2bfd6c12b2 {\n flex-shrink: 0;\n margin-bottom: var(--bui-space-1);\n display: flex;\n align-items: center;\n padding-inline: var(--bui-space-3) 0;\n border-bottom: 1px solid var(--bui-border-2);\n }\n\n .Select_bui-SelectSearch__2bfd6c12b2 {\n border: none;\n background-color: transparent;\n padding: 0;\n color: var(--bui-fg-primary);\n flex: 1;\n outline: none;\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n height: var(--select-item-height);\n line-height: var(--select-item-height);\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n /* Hide native browser clear button */\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n }\n\n .Select_bui-SelectSearchClear__2bfd6c12b2 {\n flex: 0 0 auto;\n display: grid;\n place-content: center;\n background-color: transparent;\n border: none;\n padding: 0;\n margin: 0;\n cursor: pointer;\n color: var(--bui-fg-secondary);\n transition: color 0.2s ease-in-out;\n width: var(--select-item-height);\n height: var(--select-item-height);\n\n input:placeholder-shown + & {\n display: none;\n }\n\n &:hover {\n color: var(--bui-fg-primary);\n }\n\n & svg {\n width: 1rem;\n height: 1rem;\n }\n }\n\n .Select_bui-SelectSection__2bfd6c12b2 {\n &:first-child .Select_bui-SelectSectionHeader__2bfd6c12b2 {\n padding-top: 0;\n }\n }\n\n .Select_bui-SelectSectionHeader__2bfd6c12b2 {\n height: 2rem;\n display: flex;\n align-items: center;\n padding-top: var(--bui-space-3);\n padding-left: var(--bui-space-3);\n color: var(--bui-fg-primary);\n font-size: var(--bui-font-size-1);\n font-weight: bold;\n letter-spacing: 0.05rem;\n text-transform: uppercase;\n }\n\n .Select_bui-SelectNoResults__2bfd6c12b2 {\n padding-inline: var(--bui-space-3);\n padding-block: var(--bui-space-2);\n color: var(--bui-fg-secondary);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n }\n}\n";
|
|
4
|
+
var styles = {"bui-Select":"Select_bui-Select__2bfd6c12b2","bui-SelectPopover":"Select_bui-SelectPopover__2bfd6c12b2","bui-SelectTrigger":"Select_bui-SelectTrigger__2bfd6c12b2","bui-SelectTriggerChevron":"Select_bui-SelectTriggerChevron__2bfd6c12b2","bui-SelectValue":"Select_bui-SelectValue__2bfd6c12b2","bui-SelectItemIndicator":"Select_bui-SelectItemIndicator__2bfd6c12b2","bui-SelectList":"Select_bui-SelectList__2bfd6c12b2","bui-SelectItem":"Select_bui-SelectItem__2bfd6c12b2","bui-SelectItemLabel":"Select_bui-SelectItemLabel__2bfd6c12b2","bui-SelectSearchWrapper":"Select_bui-SelectSearchWrapper__2bfd6c12b2","bui-SelectSearch":"Select_bui-SelectSearch__2bfd6c12b2","bui-SelectSearchClear":"Select_bui-SelectSearchClear__2bfd6c12b2","bui-SelectSection":"Select_bui-SelectSection__2bfd6c12b2","bui-SelectSectionHeader":"Select_bui-SelectSectionHeader__2bfd6c12b2","bui-SelectNoResults":"Select_bui-SelectNoResults__2bfd6c12b2"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -6,12 +6,24 @@ import { SwitchDefinition } from './definition.esm.js';
|
|
|
6
6
|
|
|
7
7
|
const Switch = forwardRef(
|
|
8
8
|
(props, ref) => {
|
|
9
|
-
const { ownProps, restProps } = useDefinition(
|
|
9
|
+
const { ownProps, restProps, dataAttributes } = useDefinition(
|
|
10
|
+
SwitchDefinition,
|
|
11
|
+
props
|
|
12
|
+
);
|
|
10
13
|
const { classes, label } = ownProps;
|
|
11
|
-
return /* @__PURE__ */ jsxs(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
return /* @__PURE__ */ jsxs(
|
|
15
|
+
Switch$1,
|
|
16
|
+
{
|
|
17
|
+
className: classes.root,
|
|
18
|
+
ref,
|
|
19
|
+
...dataAttributes,
|
|
20
|
+
...restProps,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx("div", { className: classes.indicator }),
|
|
23
|
+
label
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
);
|
|
15
27
|
}
|
|
16
28
|
);
|
|
17
29
|
Switch.displayName = "Switch";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.esm.js","sources":["../../../src/components/Switch/Switch.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport { Switch as AriaSwitch } from 'react-aria-components';\nimport type { SwitchProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SwitchDefinition } from './definition';\n\n/**\n * A toggle control for switching between on and off states, with an optional visible label.\n *\n * @public\n */\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const { ownProps, restProps } = useDefinition(SwitchDefinition
|
|
1
|
+
{"version":3,"file":"Switch.esm.js","sources":["../../../src/components/Switch/Switch.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { forwardRef } from 'react';\nimport { Switch as AriaSwitch } from 'react-aria-components';\nimport type { SwitchProps } from './types';\nimport { useDefinition } from '../../hooks/useDefinition';\nimport { SwitchDefinition } from './definition';\n\n/**\n * A toggle control for switching between on and off states, with an optional visible label.\n *\n * @public\n */\nexport const Switch = forwardRef<HTMLLabelElement, SwitchProps>(\n (props, ref) => {\n const { ownProps, restProps, dataAttributes } = useDefinition(\n SwitchDefinition,\n props,\n );\n const { classes, label } = ownProps;\n\n return (\n <AriaSwitch\n className={classes.root}\n ref={ref}\n {...dataAttributes}\n {...restProps}\n >\n <div className={classes.indicator} />\n {label}\n </AriaSwitch>\n );\n },\n);\n\nSwitch.displayName = 'Switch';\n"],"names":["AriaSwitch"],"mappings":";;;;;;AA2BO,MAAM,MAAA,GAAS,UAAA;AAAA,EACpB,CAAC,OAAO,GAAA,KAAQ;AACd,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,cAAA,EAAe,GAAI,aAAA;AAAA,MAC9C,gBAAA;AAAA,MACA;AAAA,KACF;AACA,IAAA,MAAM,EAAE,OAAA,EAAS,KAAA,EAAM,GAAI,QAAA;AAE3B,IAAA,uBACE,IAAA;AAAA,MAACA,QAAA;AAAA,MAAA;AAAA,QACC,WAAW,OAAA,CAAQ,IAAA;AAAA,QACnB,GAAA;AAAA,QACC,GAAG,cAAA;AAAA,QACH,GAAG,SAAA;AAAA,QAEJ,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAW,CAAA;AAAA,UAClC;AAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Switch_bui-
|
|
4
|
-
var styles = {"bui-Switch":"Switch_bui-
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .Switch_bui-Switch__2f8b39dbc2 {\n --switch-indicator-bg: var(--bui-gray-4);\n\n [data-theme-mode='dark'] & {\n --switch-indicator-bg: var(--bui-gray-6);\n }\n\n display: flex;\n /* This is needed so the HiddenInput is positioned correctly */\n position: relative;\n align-items: center;\n gap: var(--bui-space-3);\n font-size: var(--bui-font-size-3);\n color: var(--bui-fg-primary);\n cursor: pointer;\n\n &[data-disabled] {\n --switch-thumb-bg: var(--bui-gray-3);\n\n &[data-on-bg='neutral-1'] {\n --switch-thumb-bg: var(--bui-gray-2);\n }\n\n &[data-on-bg='neutral-2'] {\n --switch-thumb-bg: var(--bui-gray-3);\n }\n\n &[data-on-bg='neutral-3'] {\n --switch-thumb-bg: var(--bui-gray-2);\n }\n\n cursor: not-allowed;\n color: var(--bui-fg-disabled);\n }\n\n [data-theme-mode='dark'] &[data-disabled] {\n --switch-thumb-bg: var(--bui-gray-5);\n }\n\n &[data-selected] {\n .Switch_bui-SwitchIndicator__2f8b39dbc2 {\n background: var(--bui-accent-bg);\n\n &:before {\n background: var(--bui-accent-fg);\n transform: translateX(100%);\n }\n }\n\n &[data-disabled] {\n .Switch_bui-SwitchIndicator__2f8b39dbc2 {\n background: var(--bui-accent-bg-disabled);\n\n &:before {\n background: var(--bui-accent-fg-disabled);\n }\n }\n }\n\n &[data-pressed] {\n .Switch_indicator__2f8b39dbc2 {\n background: var(--bui-bg-neutral-3);\n }\n }\n }\n\n &[data-focus-visible] .Switch_bui-SwitchIndicator__2f8b39dbc2 {\n outline: 2px solid;\n outline-offset: 2px;\n }\n }\n\n .Switch_bui-SwitchIndicator__2f8b39dbc2 {\n width: 2rem;\n height: 1.143rem;\n border: 2px;\n background: var(--switch-indicator-bg);\n border-radius: 1.143rem;\n transition: all 200ms;\n\n &:before {\n content: '';\n display: block;\n margin: 0.143rem;\n width: 0.857rem;\n height: 0.857rem;\n background: var(--switch-thumb-bg, var(--bui-accent-fg));\n border-radius: 16px;\n transition: all 200ms;\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-Switch":"Switch_bui-Switch__2f8b39dbc2","bui-SwitchIndicator":"Switch_bui-SwitchIndicator__2f8b39dbc2","indicator":"Switch_indicator__2f8b39dbc2"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Switch/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SwitchOwnProps } from './types';\nimport styles from './Switch.module.css';\n\n/**\n * Component definition for Switch\n * @public\n */\nexport const SwitchDefinition = defineComponent<SwitchOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n propDefs: {\n label: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"definition.esm.js","sources":["../../../src/components/Switch/definition.ts"],"sourcesContent":["/*\n * Copyright 2024 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { defineComponent } from '../../hooks/useDefinition';\nimport type { SwitchOwnProps } from './types';\nimport styles from './Switch.module.css';\n\n/**\n * Component definition for Switch\n * @public\n */\nexport const SwitchDefinition = defineComponent<SwitchOwnProps>()({\n styles,\n classNames: {\n root: 'bui-Switch',\n indicator: 'bui-SwitchIndicator',\n },\n bg: 'consumer',\n propDefs: {\n label: {},\n className: {},\n },\n});\n"],"names":[],"mappings":";;;;;;;;;;AAwBO,MAAM,gBAAA,GAAmB,iBAAgC,CAAE;AAAA,EAChE,MAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,IAAA,EAAM,YAAA;AAAA,IACN,SAAA,EAAW;AAAA,GACb;AAAA,EACA,EAAA,EAAI,UAAA;AAAA,EACJ,QAAA,EAAU;AAAA,IACR,OAAO,EAAC;AAAA,IACR,WAAW;AAAC;AAEhB,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import styleInject from '../../node_modules_dist/style-inject/dist/style-inject.es.esm.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .TextField_bui-
|
|
4
|
-
var styles = {"bui-TextField":"TextField_bui-
|
|
3
|
+
var css_248z = "/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n@layer tokens, base, components, utilities;\n\n@layer components {\n .TextField_bui-TextField__4a2695a9f1 {\n display: flex;\n flex-direction: column;\n font-family: var(--bui-font-regular);\n width: 100%;\n flex: 1;\n\n &[data-on-bg='neutral-1'] .TextField_bui-Input__4a2695a9f1 {\n background-color: var(--bui-bg-neutral-2);\n }\n\n &[data-on-bg='neutral-2'] .TextField_bui-Input__4a2695a9f1 {\n background-color: var(--bui-bg-neutral-3);\n }\n\n &[data-on-bg='neutral-3'] .TextField_bui-Input__4a2695a9f1 {\n background-color: var(--bui-bg-neutral-4);\n }\n }\n\n .TextField_bui-InputWrapper__4a2695a9f1 {\n position: relative;\n\n &[data-size='small'] .TextField_bui-Input__4a2695a9f1 {\n height: 2rem;\n }\n\n &[data-size='medium'] .TextField_bui-Input__4a2695a9f1 {\n height: 2.5rem;\n }\n\n &[data-size='small'] .TextField_bui-Input__4a2695a9f1[data-icon] {\n padding-left: var(--bui-space-8);\n }\n\n &[data-size='medium'] .TextField_bui-Input__4a2695a9f1[data-icon] {\n padding-left: var(--bui-space-9);\n }\n }\n\n .TextField_bui-InputIcon__4a2695a9f1 {\n position: absolute;\n left: var(--bui-space-3);\n top: 50%;\n transform: translateY(-50%);\n margin-right: var(--bui-space-1);\n color: var(--bui-fg-primary);\n flex-shrink: 0;\n pointer-events: none;\n /* To animate the icon when the input is collapsed */\n transition: left 0.2s ease-in-out;\n\n &[data-size='small'],\n &[data-size='small'] svg {\n width: 1rem;\n height: 1rem;\n }\n\n &[data-size='medium'],\n &[data-size='medium'] svg {\n width: 1.25rem;\n height: 1.25rem;\n }\n }\n\n .TextField_bui-Input__4a2695a9f1 {\n display: flex;\n align-items: center;\n padding: 0 var(--bui-space-3);\n border-radius: var(--bui-radius-2);\n border: none;\n background-color: var(--bui-bg-neutral-1);\n font-size: var(--bui-font-size-3);\n font-family: var(--bui-font-regular);\n font-weight: var(--bui-font-weight-regular);\n color: var(--bui-fg-primary);\n transition: box-shadow 0.2s ease-in-out;\n width: 100%;\n height: 100%;\n cursor: inherit;\n\n &[data-focused] {\n outline: none;\n box-shadow: inset 0 0 0 1px var(--bui-ring);\n }\n\n &::-webkit-search-cancel-button,\n &::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n &::placeholder {\n color: var(--bui-fg-secondary);\n }\n\n &[data-invalid] {\n box-shadow: inset 0 0 0 1px var(--bui-border-danger);\n }\n\n &[data-disabled] {\n opacity: 0.5;\n cursor: not-allowed;\n }\n }\n}\n";
|
|
4
|
+
var styles = {"bui-TextField":"TextField_bui-TextField__4a2695a9f1","bui-Input":"TextField_bui-Input__4a2695a9f1","bui-InputWrapper":"TextField_bui-InputWrapper__4a2695a9f1","bui-InputIcon":"TextField_bui-InputIcon__4a2695a9f1"};
|
|
5
5
|
styleInject(css_248z);
|
|
6
6
|
|
|
7
7
|
export { styles as default };
|