2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
8 YUI.add('panel', function (Y, NAME) {
10 // TODO: Change this description!
12 Provides a Panel widget, a widget that mimics the functionality of a regular OS
13 window. Comes with Standard Module support, XY Positioning, Alignment Support,
14 Stack (z-index) support, modality, auto-focus and auto-hide functionality, and
15 header/footer button support.
20 var getClassName = Y.ClassNameManager.getClassName;
22 // TODO: Change this description!
24 A basic Panel Widget, which can be positioned based on Page XY co-ordinates and
25 is stackable (z-index support). It also provides alignment and centering support
26 and uses a standard module format for it's content, with header, body and footer
27 section support. It can be made modal, and has functionality to hide and focus
28 on different events. The header and footer sections can be modified to allow for
38 @uses WidgetPositionAlign
39 @uses WidgetPositionConstrain
44 Y.Panel = Y.Base.create('panel', Y.Widget, [
45 // Other Widget extensions depend on these two.
52 Y.WidgetPositionAlign,
53 Y.WidgetPositionConstrain,
56 // -- Public Properties ----------------------------------------------------
59 Collection of predefined buttons mapped from name => config.
61 Panel includes a "close" button which can be use by name. When the close
62 button is in the header (which is the default), it will look like: [x].
64 See `addButton()` for a list of possible configuration values.
67 // Panel with close button in header.
68 var panel = new Y.Panel({
72 // Panel with close button in footer.
73 var otherPanel = new Y.Panel({
90 // Uses `type="button"` so the button's default action can still
91 // occur but it won't cause things like a form to submit.
92 template : '<button type="button" />',
93 classNames: getClassName('button', 'close')
113 "widget-position-align",
114 "widget-position-constrain",