UNPKG

@carbon/react

Version:

React components for the Carbon Design System

57 lines (55 loc) 2 kB
/** * Copyright IBM Corp. 2016, 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ const require_runtime = require("../../_virtual/_rolldown/runtime.js"); const require_usePrefix = require("../../internal/usePrefix.js"); let classnames = require("classnames"); classnames = require_runtime.__toESM(classnames); let react = require("react"); react = require_runtime.__toESM(react); let prop_types = require("prop-types"); prop_types = require_runtime.__toESM(prop_types); let react_jsx_runtime = require("react/jsx-runtime"); let _carbon_icons_react = require("@carbon/icons-react"); //#region src/components/TimePickerSelect/TimePickerSelect.tsx /** * Copyright IBM Corp. 2016, 2026 * * This source code is licensed under the Apache-2.0 license found in the * LICENSE file in the root directory of this source tree. */ const TimePickerSelect = (0, react.forwardRef)((props, ref) => { const { ["aria-label"]: ariaLabel = "open list of options", children, id, disabled = false, className, ...rest } = props; const prefix = require_usePrefix.usePrefix(); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: (0, classnames.default)({ [`${prefix}--select`]: true, [`${prefix}--time-picker__select`]: true, ...className && { [className]: true } }), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", { "aria-label": ariaLabel, className: `${prefix}--select-input`, disabled, id, ref, ...rest, children }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_carbon_icons_react.ChevronDown, { className: `${prefix}--select__arrow`, "aria-hidden": "true" })] }); }); TimePickerSelect.propTypes = { children: prop_types.default.node, className: prop_types.default.string, defaultValue: prop_types.default.any, disabled: prop_types.default.bool, id: prop_types.default.string.isRequired }; //#endregion exports.default = TimePickerSelect;